From 272a152b54a198a84f122ab8bedb1019708b7008 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Mon, 21 Dec 2015 08:46:35 -0500 Subject: pages, quests --- src/common.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/common.cpp') 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 +#include #include #include @@ -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); -- cgit v1.2.3