RTS2D
include/gamestate/State.h
00001 #ifndef STATE_H
00002 #include <cstdio>
00003 #include "StateManager.h"
00004 #include "allegro5/allegro.h"
00005 #include "allegro5/allegro_image.h"
00006 #include "allegro5/allegro_native_dialog.h"
00007 #include "allegro5/allegro_primitives.h"
00008 #include "allegro5/allegro_font.h"
00009 #include "allegro5/allegro_ttf.h"
00010 #define STATE_H
00011 
00012 enum STATE {PLAYING, PAUSE};
00013 
00017 class State {
00018 public:
00019     virtual ~State();
00020     virtual void readInput(StateManager* sm) = 0;
00021     virtual void update(StateManager* sm) = 0;
00022     virtual void render(StateManager* sm) = 0;
00023     void changeState(StateManager* sm, State* state) {
00024         sm->changeState(state);
00025     }
00026 protected:
00027     ALLEGRO_DISPLAY* display_;
00028     ALLEGRO_TIMER* timer_;
00029     ALLEGRO_EVENT_QUEUE* queue_;
00030     ALLEGRO_FONT* font;
00031     bool redraw;
00032     State(ALLEGRO_DISPLAY* display, ALLEGRO_TIMER* timer, ALLEGRO_EVENT_QUEUE* queue);
00033 
00034 private:
00035 };
00036 
00037 #endif // STATE_H
 Todos Classes Funções