summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2009-06-19 20:58:45 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2009-06-19 20:58:45 -0400
commitdf28032e41530c0230b1c72c3684e1bd49c7019e (patch)
tree47abb7f22de30c8e07eca3860c1f3ece77a96ae0
parentab18806cddf99514e7ac8d970587e5f1d6d01603 (diff)
downloadmazeoflife-df28032e41530c0230b1c72c3684e1bd49c7019e.tar.gz
mazeoflife-df28032e41530c0230b1c72c3684e1bd49c7019e.tar.bz2
mazeoflife-df28032e41530c0230b1c72c3684e1bd49c7019e.zip
Removed need for DummyState
-rw-r--r--dummystate.h12
-rw-r--r--includes.h1
-rw-r--r--mazeoflife.cpp2
-rw-r--r--state.h4
4 files changed, 3 insertions, 16 deletions
diff --git a/dummystate.h b/dummystate.h deleted file mode 100644 index 0f1e48b..0000000 --- a/dummystate.h +++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef DUMMYSTATE_H
2#define DUMMYSTATE_H
3
4class DummyState : public State
5{
6 public:
7 DummyState() {};
8 void input(SDLKey key) {};
9 void render(SDL_Surface* screen) {};
10};
11
12#endif
diff --git a/includes.h b/includes.h index aec00e7..d066b8e 100644 --- a/includes.h +++ b/includes.h
@@ -3,7 +3,6 @@
3#include <time.h> 3#include <time.h>
4#include <string> 4#include <string>
5#include "state.h" 5#include "state.h"
6#include "dummystate.h"
7#include "mazeoflife.h" 6#include "mazeoflife.h"
8#include "titlestate.h" 7#include "titlestate.h"
9#include "gamestate.h" 8#include "gamestate.h"
diff --git a/mazeoflife.cpp b/mazeoflife.cpp index ad1fda3..e962f2e 100644 --- a/mazeoflife.cpp +++ b/mazeoflife.cpp
@@ -2,7 +2,7 @@
2 2
3SDL_Surface *screen; 3SDL_Surface *screen;
4bool gameSleep = false; 4bool gameSleep = false;
5State* state = new DummyState(); 5State* state;
6 6
7int main(int argc, char *argv[]) 7int main(int argc, char *argv[])
8{ 8{
diff --git a/state.h b/state.h index aa83718..bcc7e4a 100644 --- a/state.h +++ b/state.h
@@ -4,9 +4,9 @@
4class State 4class State
5{ 5{
6 public: 6 public:
7 virtual void input(SDLKey key) = 0; 7 virtual void input(SDLKey key) {};
8 virtual void tick() {}; 8 virtual void tick() {};
9 virtual void render(SDL_Surface* screen) = 0; 9 virtual void render(SDL_Surface* screen) {};
10}; 10};
11 11
12#endif 12#endif