Single player.
authorekku
Tue, 18 Nov 2008 19:33:31 +0000
changeset 56 38f269310f77
parent 55 8ae9dd0ae337
child 57 a89e02118931
Single player.
src/proto2/Engine.cc
src/proto2/Engine.hh
--- 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);