From df28032e41530c0230b1c72c3684e1bd49c7019e Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Fri, 19 Jun 2009 20:58:45 -0400 Subject: Removed need for DummyState --- dummystate.h | 12 ------------ includes.h | 1 - mazeoflife.cpp | 2 +- state.h | 4 ++-- 4 files changed, 3 insertions(+), 16 deletions(-) delete mode 100644 dummystate.h diff --git a/dummystate.h b/dummystate.h deleted file mode 100644 index 0f1e48b..0000000 --- a/dummystate.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef DUMMYSTATE_H -#define DUMMYSTATE_H - -class DummyState : public State -{ - public: - DummyState() {}; - void input(SDLKey key) {}; - void render(SDL_Surface* screen) {}; -}; - -#endif diff --git a/includes.h b/includes.h index aec00e7..d066b8e 100644 --- a/includes.h +++ b/includes.h @@ -3,7 +3,6 @@ #include #include #include "state.h" -#include "dummystate.h" #include "mazeoflife.h" #include "titlestate.h" #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 @@ SDL_Surface *screen; bool gameSleep = false; -State* state = new DummyState(); +State* state; int main(int argc, char *argv[]) { diff --git a/state.h b/state.h index aa83718..bcc7e4a 100644 --- a/state.h +++ b/state.h @@ -4,9 +4,9 @@ class State { public: - virtual void input(SDLKey key) = 0; + virtual void input(SDLKey key) {}; virtual void tick() {}; - virtual void render(SDL_Surface* screen) = 0; + virtual void render(SDL_Surface* screen) {}; }; #endif -- cgit 1.4.1