#include <string>
#include <vector>
#include "util.h"
#include "settings.h"
Go to the source code of this file.
|
#define | omp_get_thread_num() 0 |
|
#define | omp_get_num_threads() 1 |
|
#define | UNUSED(var) (var) |
|
#define | PRINTF_VAARG_ATTRIBUTE(a, b) |
|
#define | _C_ , |
|
#define | PrintFunction() PrintLocation(__FILE__, __LINE__, __func__); |
| Print function in debug macros. More...
|
|
#define | Assert(cond) do { if (EnableAssert && !(cond)) { AbortAt(__FILE__, __LINE__, __func__, #cond); }} while (0) |
|
#define | DebugPrint(args) do { if (EnableDebugPrint) { PrintFunction(); PrintOnStdOut(args); } } while (0) |
|
bool | EnableDebugPrint |
|
bool | EnableAssert |
| if enabled, print the debug messages More...
|
|
bool | EnableUnitDebug |
| if enabled, halt on assertion failures More...
|
|
bool | IsRestart |
| if enabled, a unit info dump will be created More...
|
|
bool | IsDebugEnabled |
|
bool | EnableWallsInSinglePlayer |
| Is debug enabled? Flag to pass into lua code. More...
|
|
std::vector< std::string > | OriginalArgv |
| if true, the game skips some things like title screens More...
|
|
const char | NameLine [] |
| Text string: Name, Version, Copyright. More...
|
|
std::string | StratagusLibPath |
|
std::string | MenuRace |
| Location of stratagus data. More...
|
|
unsigned long | GameCycle |
|
unsigned long | FastForwardCycle |
| Game simulation cycle counter. More...
|
|
void | PrintLocation (const char *file, int line, const char *funcName) |
|
void | AbortAt (const char *file, int line, const char *funcName, const char *conditionStr) |
|
void | PrintOnStdOut (const char *format,...) |
|
char * | new_strdup (const char *str) |
|
void | Exit (int err) |
| Game Replay Fast Forward Counter. More...
|
|
void | ExitFatal (int err) |
| Exit. More...
|
|
void | UpdateDisplay () |
| Exit with fatal error. More...
|
|
void | DrawMapArea () |
| Game display update. More...
|
|
void | GameMainLoop () |
| Draw the map area. More...
|
|
int | stratagusMain (int argc, char **argv) |
| Game main loop. More...
|
|
◆ _C_
This simulates vararg macros. Example: DebugPrint("Test %d %d\n" C 1 C 2);
◆ Assert
#define Assert |
( |
|
cond | ) |
do { if (EnableAssert && !(cond)) { AbortAt(__FILE__, __LINE__, __func__, #cond); }} while (0) |
Assert a condition. If cond is not true abort with file,line.
◆ DebugPrint
Print debug information with function name.
◆ omp_get_num_threads
#define omp_get_num_threads |
( |
| ) |
1 |
◆ omp_get_thread_num
#define omp_get_thread_num |
( |
| ) |
0 |
◆ PRINTF_VAARG_ATTRIBUTE
#define PRINTF_VAARG_ATTRIBUTE |
( |
|
a, |
|
|
|
b |
|
) |
| |
◆ PrintFunction
#define PrintFunction |
( |
| ) |
PrintLocation(__FILE__, __LINE__, __func__); |
Print function in debug macros.
◆ UNUSED
#define UNUSED |
( |
|
var | ) |
(var) |
◆ AbortAt()
void AbortAt |
( |
const char * |
file, |
|
|
int |
line, |
|
|
const char * |
funcName, |
|
|
const char * |
conditionStr |
|
) |
| |
◆ DrawMapArea()
Game display update.
Draw map area
◆ Exit()
Game Replay Fast Forward Counter.
Exit the game.
- Parameters
-
err | Error code to pass to shell. |
◆ ExitFatal()
void ExitFatal |
( |
int |
err | ) |
|
Exit.
Do a fatal exit. Called on out of memory or crash.
- Parameters
-
err | Error code to pass to shell. |
◆ GameMainLoop()
Draw the map area.
Game main loop.
Unit actions. Missile actions. Players (AI). Cyclic events (color cycle,...) Display update. Input/Network/Sound.
◆ new_strdup()
char* new_strdup |
( |
const char * |
str | ) |
|
|
inline |
◆ PrintLocation()
void PrintLocation |
( |
const char * |
file, |
|
|
int |
line, |
|
|
const char * |
funcName |
|
) |
| |
◆ PrintOnStdOut()
void PrintOnStdOut |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
◆ stratagusMain()
int stratagusMain |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Game main loop.
The main program: initialise, parse options and arguments.
- Parameters
-
argc | Number of arguments. |
argv | Vector of arguments. |
◆ UpdateDisplay()
Exit with fatal error.
Display update.
This functions updates everything on screen. The map, the gui, the cursors.
◆ EnableAssert
if enabled, print the debug messages
◆ EnableDebugPrint
◆ EnableUnitDebug
if enabled, halt on assertion failures
◆ EnableWallsInSinglePlayer
bool EnableWallsInSinglePlayer |
Is debug enabled? Flag to pass into lua code.
◆ FastForwardCycle
unsigned long FastForwardCycle |
Game simulation cycle counter.
◆ GameCycle
◆ IsDebugEnabled
◆ IsRestart
if enabled, a unit info dump will be created
◆ MenuRace
Location of stratagus data.
Location of stratagus data.
◆ NameLine
Text string: Name, Version, Copyright.
Text string: Name, Version, Copyright.
Name, Version, Copyright
◆ OriginalArgv
std::vector<std::string> OriginalArgv |
if true, the game skips some things like title screens
◆ StratagusLibPath
std::string StratagusLibPath |
(C) Copyright 1998-2012 by The