# HG changeset patch # User ekku # Date 1227036811 0 # Node ID 38f269310f77497d83089cc9a683b175afec8f01 # Parent 8ae9dd0ae3376c237de290e422f3b85df1ee9c15 Single player. diff -r 8ae9dd0ae337 -r 38f269310f77 src/proto2/Engine.cc --- 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; } diff -r 8ae9dd0ae337 -r 38f269310f77 src/proto2/Engine.hh --- 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);