From f47fad4bc29404522996b252b87e5d3f05a05395 Mon Sep 17 00:00:00 2001 From: Daniel Evans Date: Tue, 16 Sep 2014 19:22:43 +0100 Subject: [PATCH] Move game code into RWGame class and refactor --- rwgame/CMakeLists.txt | 2 + rwgame/RWGame.cpp | 292 +++++++++++++++++++++++++ rwgame/RWGame.hpp | 79 +++++++ rwgame/State.cpp | 11 + rwgame/State.hpp | 12 +- rwgame/debugstate.cpp | 16 +- rwgame/debugstate.hpp | 2 +- rwgame/game.hpp | 12 +- rwgame/ingamestate.cpp | 14 +- rwgame/ingamestate.hpp | 2 +- rwgame/loadingstate.cpp | 9 +- rwgame/loadingstate.hpp | 2 +- rwgame/main.cpp | 472 +--------------------------------------- rwgame/menustate.cpp | 13 +- rwgame/menustate.hpp | 2 +- rwgame/pausestate.cpp | 9 +- rwgame/pausestate.hpp | 2 +- 17 files changed, 438 insertions(+), 513 deletions(-) create mode 100644 rwgame/RWGame.cpp create mode 100644 rwgame/RWGame.hpp diff --git a/rwgame/CMakeLists.txt b/rwgame/CMakeLists.txt index 0dd26253..bd5518cc 100644 --- a/rwgame/CMakeLists.txt +++ b/rwgame/CMakeLists.txt @@ -1,6 +1,8 @@ add_executable(rwgame main.cpp + RWGame.cpp + State.cpp loadingstate.cpp diff --git a/rwgame/RWGame.cpp b/rwgame/RWGame.cpp new file mode 100644 index 00000000..e0bf97da --- /dev/null +++ b/rwgame/RWGame.cpp @@ -0,0 +1,292 @@ +#include "RWGame.hpp" +#include "State.hpp" +#include "loadingstate.hpp" + +#include +#include +#include