that's not a prototype anymore... at least it shouldn't be
#ifndef ENGINE_HH
#define ENGINE_HH
// XXX: forward-declare Engine for other components
class Engine;
#include "GameState.hh"
#include "Graphics.hh"
#include "NetworkServer.hh"
#include "NetworkClient.hh"
#include "Logger.hh"
class Engine {
private:
// game state
GameState game_state;
// Graphics/Input
Graphics *graphics;
// network server/client
NetworkServer *net_server;
NetworkClient *net_client;
// to exit the mainloop
bool is_running;
public:
// default constructor
Engine (void);
// setup graphics
void setupGraphics (void);
// set up network server/client
// setting up both of these will lead to odd behaviour :)
void setupNetworkServer (const std::string &listen_port);
void setupNetworkClient (const std::string &connect_host, const std::string &connect_port);
void setupSinglePlayer (void);
// run the main loop
void run (void);
// terminate the main loop
void stop (void);
public:
// logging utility
static Logger log (enum LogLevel level, const char *type);
};
#endif /* ENGINE_HH */