41 // default constructor |
41 // default constructor |
42 Engine (const std::string resource_xml_path = RESOURCE_XML_PATH); |
42 Engine (const std::string resource_xml_path = RESOURCE_XML_PATH); |
43 |
43 |
44 /** |
44 /** |
45 * Setup game world using the given terrain, returning the new GameState |
45 * Setup game world using the given terrain, returning the new GameState |
|
46 * |
|
47 * XXX: fix to return void |
46 */ |
48 */ |
47 GameState& setupGame (Terrain *terrain); |
49 GameState& setupGame (Terrain *terrain); |
48 |
50 |
49 /** |
51 /** |
50 * Setup default game world using constants from Config.hh |
52 * Setup game world using given terrain configuration |
51 */ |
53 */ |
52 GameState& setupGame (void); |
54 void setupGame (const TerrainConfig &config); |
53 |
55 |
54 // setup graphics |
56 /** |
55 void setupGraphics (const GraphicsConfiguration &config); |
57 * Enable graphics |
|
58 */ |
|
59 void setupGraphics (const GraphicsConfig &config); |
56 |
60 |
57 // set up network server/client |
61 /** |
58 // setting up both of these will lead to odd behaviour :) |
62 * Setup server, must call setupGame first |
|
63 */ |
59 void setupNetworkServer (const std::string &listen_port); |
64 void setupNetworkServer (const std::string &listen_port); |
|
65 |
|
66 /** |
|
67 * Setup client, do *not* call setupGame, configuration comes from the server |
|
68 */ |
60 void setupNetworkClient (const std::string &connect_host, const std::string &connect_port); |
69 void setupNetworkClient (const std::string &connect_host, const std::string &connect_port); |
|
70 |
|
71 /** |
|
72 * Setup singleplayer, must call setupGame first |
|
73 */ |
61 void setupSinglePlayer (void); |
74 void setupSinglePlayer (void); |
62 |
75 |
63 /** |
76 /** |
64 * Run the game main loop. This will not return until the game aborts due to an error, or someone calls stop(). |
77 * Run the game main loop. This will not return until the game aborts due to an error, or someone calls stop(). |
65 */ |
78 */ |