From 90b9831d6fb89feedeec63cb392c4535c5df60fe Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 24 Feb 2019 12:30:40 -0500 Subject: Started state machine The "--editor" flag can be passed to the program to start it in editor mode, which is currently nothing. The Renderer class was removed here, as each state basically needs to do its own rendering. However, refactoring to make this more elegant will probably occur in the future. --- src/simulation.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/simulation.h') diff --git a/src/simulation.h b/src/simulation.h index abff3da..1502a70 100644 --- a/src/simulation.h +++ b/src/simulation.h @@ -1,8 +1,8 @@ #ifndef SIMULATION_H_7BF6EEA4 #define SIMULATION_H_7BF6EEA4 +#include "state.h" #include "entity.h" -#include "renderer.h" #include "schedule.h" #include #include @@ -11,7 +11,7 @@ class Level; -class Simulation { +class Simulation : public State { public: // Constructor @@ -19,7 +19,9 @@ public: void tick( double dt, - const Uint8* keystate); + const Uint8* keystate) override; + + void render(SDL_Renderer* ren) override; id_type emplaceEntity(); -- cgit 1.4.1