_________ __ __
/ _____// |_____________ _/ |______ ____ __ __ ______
\_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
/ \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \
/_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
\/ \/ \//_____/ \/
______________________ ______________________
T H E W A R B E G I N S
Stratagus - A free fantasy real time strategy game engine
Go to the documentation of this file.
30 #ifndef __STRATAGUS_H__
31 #define __STRATAGUS_H__
33 #ifdef HAVE_COZ_PROFILER
43 #define omp_get_thread_num() 0
44 #define omp_get_num_threads() 1
62 #ifndef WIN32_LEAN_AND_MEAN
63 #define WIN32_LEAN_AND_MEAN
73 #pragma warning(disable:4244)
74 #pragma warning(disable:4761)
75 #pragma warning(disable:4786)
76 #pragma warning(disable:4996)
79 #define __func__ __FUNCTION__
82 #define snprintf _snprintf
83 #if !(_MSC_VER >= 1500 && _MSC_VER < 1600)
84 #define vsnprintf _vsnprintf
86 #define unlink _unlink
87 #define strdup _strdup
88 #define strcasecmp _stricmp
89 #define strncasecmp _strnicmp
100 #define UNUSED(var) do {__typeof__ (&var) __attribute__ ((unused)) __tmp = &var; } while(0)
102 #define UNUSED(var) (var)
106 #define PRINTF_VAARG_ATTRIBUTE(a, b) __attribute__((format (printf, a, b)))
108 #define PRINTF_VAARG_ATTRIBUTE(a, b)
122 extern void PrintLocation(
const char *file,
int line,
const char *funcName);
125 #define PrintFunction() PrintLocation(__FILE__, __LINE__, __func__);
136 extern void AbortAt(
const char *file,
int line,
const char *funcName,
const char *conditionStr);
142 #define Assert(cond) \
143 do { if (EnableAssert && !(cond)) { AbortAt(__FILE__, __LINE__, __func__, #cond); }} while (0)
148 #define DebugPrint(args) \
149 do { if (EnableDebugPrint) { PrintFunction(); PrintOnStdOut(args); } } while (0)
160 int len = strlen(str) + 1;
161 char *newstr =
new char[len];
183 extern void Exit(
int err);
193 #endif // !__STRATAGUS_H__
unsigned long GameCycle
Definition: game.cpp:94
bool EnableAssert
if enabled, print the debug messages
Definition: stratagus.cpp:247
int stratagusMain(int argc, char **argv)
Game main loop.
Definition: stratagus.cpp:692
void DrawMapArea()
Game display update.
Definition: mainloop.cpp:160
bool EnableDebugPrint
Definition: stratagus.cpp:246
char * new_strdup(const char *str)
Definition: stratagus.h:158
bool EnableUnitDebug
if enabled, halt on assertion failures
Definition: stratagus.cpp:248
std::vector< std::string > OriginalArgv
if true, the game skips some things like title screens
Definition: stratagus.cpp:251
errno_t strcpy_s(char *dst, size_t dstsize, const char *src)
Definition: util.cpp:217
const char NameLine[]
Text string: Name, Version, Copyright.
Definition: stratagus.cpp:241
void GameMainLoop()
Draw the map area.
Definition: mainloop.cpp:403
void PrintLocation(const char *file, int line, const char *funcName)
Definition: util.cpp:477
std::string MenuRace
Location of stratagus data.
Definition: stratagus.cpp:244
void AbortAt(const char *file, int line, const char *funcName, const char *conditionStr)
Definition: util.cpp:482
void UpdateDisplay()
Exit with fatal error.
Definition: mainloop.cpp:182
std::string StratagusLibPath
Definition: stratagus.cpp:238
void PrintOnStdOut(const char *format,...)
Definition: util.cpp:497
void Exit(int err)
Game Replay Fast Forward Counter.
Definition: stratagus.cpp:388
bool IsRestart
if enabled, a unit info dump will be created
Definition: stratagus.cpp:249
bool IsDebugEnabled
Definition: stratagus.cpp:256
unsigned long FastForwardCycle
Game simulation cycle counter.
Definition: game.cpp:95
void ExitFatal(int err)
Exit.
Definition: stratagus.cpp:433
bool EnableWallsInSinglePlayer
Is debug enabled? Flag to pass into lua code.
Definition: stratagus.cpp:258
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.