aboutsummaryrefslogtreecommitdiffstats
path: root/src/common.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2015-12-21 08:46:35 -0500
committerClyne Sullivan <tullivan99@gmail.com>2015-12-21 08:46:35 -0500
commit272a152b54a198a84f122ab8bedb1019708b7008 (patch)
treec47419145a1b03bc6b6a58ea2983a0819cb972e6 /src/common.cpp
parent0b9561febb7677de8792ba0feb056139ba7c94ea (diff)
pages, quests
Diffstat (limited to 'src/common.cpp')
-rw-r--r--src/common.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/common.cpp b/src/common.cpp
index 7449a35..dbcef0b 100644
--- a/src/common.cpp
+++ b/src/common.cpp
@@ -1,4 +1,5 @@
#include <common.h>
+#include <cstring>
#include <cstdio>
#include <chrono>
@@ -11,6 +12,22 @@ unsigned int millis(void){
#endif // __WIN32__
+Condition::Condition(const char *_id,void *val){
+ id = new char[strlen(_id)+1];
+ strcpy(id,_id);
+ value = val;
+}
+Condition::~Condition(){
+ delete[] id;
+}
+
+bool Condition::sameID(const char *s){
+ return !strcmp(id,s);
+}
+void *Condition::getValue(void){
+ return value;
+}
+
void DEBUG_prints(const char* file, int line, const char *s,...){
va_list args;
printf("%s:%d: ",file,line);