2011-01-14 14:59:18 +01:00
|
|
|
/*
|
|
|
|
* Application.h
|
|
|
|
*
|
|
|
|
* Created on: 14.01.2011
|
|
|
|
* Author: gmueller
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef APPLICATION_H_
|
|
|
|
#define APPLICATION_H_
|
|
|
|
|
|
|
|
#include "game.h"
|
|
|
|
|
|
|
|
#include "Schedule.h"
|
2011-01-16 23:02:40 +01:00
|
|
|
#include "Arguments.h"
|
|
|
|
#include "Network.h"
|
2011-01-14 14:59:18 +01:00
|
|
|
|
|
|
|
class Application {
|
|
|
|
public:
|
|
|
|
Application();
|
|
|
|
virtual ~Application();
|
2011-01-16 23:02:40 +01:00
|
|
|
virtual void initialize(Arguments &arg);
|
2011-01-14 14:59:18 +01:00
|
|
|
virtual void update();
|
|
|
|
virtual void shutdown();
|
|
|
|
|
|
|
|
bool isRunning();
|
|
|
|
virtual void start();
|
|
|
|
virtual void stop();
|
|
|
|
|
|
|
|
inline bool isMaster() {
|
|
|
|
return master;
|
|
|
|
}
|
|
|
|
void setMaster(bool master);
|
|
|
|
|
|
|
|
inline game_t *getGame() {
|
|
|
|
return &game;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool running;
|
|
|
|
double lastTime;
|
|
|
|
Schedule gameUpdateSchudule;
|
|
|
|
bool master;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
game_t game;
|
2011-01-16 23:02:40 +01:00
|
|
|
Network network;
|
2011-01-14 14:59:18 +01:00
|
|
|
double dt;
|
|
|
|
double time;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* APPLICATION_H_ */
|