Single player.
--- a/src/proto2/Engine.cc Tue Nov 18 19:33:03 2008 +0000
+++ b/src/proto2/Engine.cc Tue Nov 18 19:33:31 2008 +0000
@@ -27,6 +27,11 @@
net_client = new NetworkClient(game_state, connect_addr);
}
+void Engine::setupSinglePlayer (void) {
+ LocalPlayer* lp = new LocalPlayer(Vector(400, 300), true);
+ game_state.newLocalPlayer(lp);
+}
+
void Engine::stop (void) {
is_running = false;
}
--- a/src/proto2/Engine.hh Tue Nov 18 19:33:03 2008 +0000
+++ b/src/proto2/Engine.hh Tue Nov 18 19:33:31 2008 +0000
@@ -37,6 +37,8 @@
// 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);