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/state.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/state.h (limited to 'src/state.h') diff --git a/src/state.h b/src/state.h new file mode 100644 index 0000000..3c3cfb4 --- /dev/null +++ b/src/state.h @@ -0,0 +1,19 @@ +#ifndef STATE_H_86BFEF59 +#define STATE_H_86BFEF59 + +#include "renderer.h" + +class State { +public: + + virtual ~State() = default; + + virtual void tick( + double dt, + const Uint8* keystate) = 0; + + virtual void render(SDL_Renderer* ren) = 0; + +}; + +#endif /* end of include guard: STATE_H_86BFEF59 */ -- cgit 1.4.1