1
0
forked from 0ad/0ad
0ad/source/tools/atlas/GameInterface/GameLoop.h
Ykkrosh cbafd43eea # Changed handling of command-line arguments.
* Added CmdLineArgs, which does the parsing then lets various pieces of
code check for whatever arguments they want.
 * Made Atlas exit out of main() cleanly, instead of calling exit()
itself.
 * Disabled the global exception-catching in unit tests, via a
entry_noSEH, so it doesn't make debugging harder.
 * Added nice printing of CStr in unit test failure messages, and added
comparison of vector vs constant array.

This was SVN commit r4688.
2006-12-09 14:39:52 +00:00

30 lines
576 B
C++

#ifndef GAMELOOP_H__
#define GAMELOOP_H__
#include "ps/GameSetup/CmdLineArgs.h"
extern void (*Atlas_GLSetCurrent)(void* context);
class View;
struct GameLoopState
{
CmdLineArgs args;
bool running; // whether the Atlas game loop is still running
View* view; // current 'view' (controls updates, rendering, etc)
const void* glContext;
float frameLength; // smoothed to avoid large jumps
struct Input
{
float scrollSpeed[4]; // [fwd, bwd, left, right]. 0.0f for disabled.
float zoomDelta;
} input;
};
extern GameLoopState* g_GameLoop;
#endif // GAMELOOP_H__