diff options
author | drumsetmonkey <abelleisle@roadrunner.com> | 2016-01-03 21:46:03 -0500 |
---|---|---|
committer | drumsetmonkey <abelleisle@roadrunner.com> | 2016-01-03 21:46:03 -0500 |
commit | 5c7c99ac5fe1158adbdf0469fb36ddd153511f5d (patch) | |
tree | 1c50bda4f3e4a530fde7f97169dbd52a004d903a /include/common.h | |
parent | 1ccd85fd022ab5d628c9e26a213e47cf2687fce7 (diff) | |
parent | 272a152b54a198a84f122ab8bedb1019708b7008 (diff) |
shit
Diffstat (limited to 'include/common.h')
-rw-r--r-- | include/common.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/include/common.h b/include/common.h index 31126d7..5713c56 100644 --- a/include/common.h +++ b/include/common.h @@ -70,7 +70,7 @@ typedef struct{ * The desired width of the game window. */ -#define SCREEN_WIDTH 1024 +#define SCREEN_WIDTH 1280 /** * The desired height of the game window. @@ -142,6 +142,23 @@ extern vec2 offset; extern unsigned int loops; /** + * This class contains a string for identification and a value. It can be used to + * save certain events for and decisions so that they can be recalled later. + */ + +class Condition { +private: + char *id; + void *value; +public: + Condition(const char *_id,void *val); + ~Condition(); + + bool sameID(const char *s); + void *getValue(void); +}; + +/** * Prints a formatted debug message to the console, along with the callee's file and line * number. */ @@ -160,4 +177,17 @@ void safeSetColor(int r,int g,int b); void safeSetColorA(int r,int g,int b,int a); +/** + * We've encountered many problems when attempting to create delays for triggering + * the logic function. As a result, we decided on using the timing libraries given + * by <chrono> in the standard C++ library. This function simply returns the amount + * of milliseconds that have passed sine the epoch. + */ + +#ifdef __WIN32__ +#define millis() SDL_GetTicks() +#else +unsigned int millis(void); +#endif // __WIN32__ + #endif // COMMON_H |