summary refs log tree commit diff stats
path: root/src/simulation.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2019-02-24 12:30:40 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2019-02-24 12:30:40 -0500
commit90b9831d6fb89feedeec63cb392c4535c5df60fe (patch)
tree78faf1865bc0566454254d072b85f872bbc585ea /src/simulation.h
parentf264cfd7655a48f7e9a6e2fc5b1c62d6d2036025 (diff)
downloaddispatcher-90b9831d6fb89feedeec63cb392c4535c5df60fe.tar.gz
dispatcher-90b9831d6fb89feedeec63cb392c4535c5df60fe.tar.bz2
dispatcher-90b9831d6fb89feedeec63cb392c4535c5df60fe.zip
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.
Diffstat (limited to 'src/simulation.h')
-rw-r--r--src/simulation.h8
1 files changed, 5 insertions, 3 deletions
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 @@
1#ifndef SIMULATION_H_7BF6EEA4 1#ifndef SIMULATION_H_7BF6EEA4
2#define SIMULATION_H_7BF6EEA4 2#define SIMULATION_H_7BF6EEA4
3 3
4#include "state.h"
4#include "entity.h" 5#include "entity.h"
5#include "renderer.h"
6#include "schedule.h" 6#include "schedule.h"
7#include <range/v3/all.hpp> 7#include <range/v3/all.hpp>
8#include <vector> 8#include <vector>
@@ -11,7 +11,7 @@
11 11
12class Level; 12class Level;
13 13
14class Simulation { 14class Simulation : public State {
15public: 15public:
16 16
17 // Constructor 17 // Constructor
@@ -19,7 +19,9 @@ public:
19 19
20 void tick( 20 void tick(
21 double dt, 21 double dt,
22 const Uint8* keystate); 22 const Uint8* keystate) override;
23
24 void render(SDL_Renderer* ren) override;
23 25
24 id_type emplaceEntity(); 26 id_type emplaceEntity();
25 27