582e1c5e0d9c992713d3b453c666d11b982ffc0e.svn-base (714B)
1 #ifndef CONTEXT_H 2 #define CONTEXT_H 3 4 #include "Utils.h" 5 #include "Console.h" 6 #include "Event.h" 7 //#include "Level.h" 8 9 class Context 10 { 11 public: 12 13 Context() {} 14 15 virtual bool Load(const char* filename) = 0; 16 17 virtual bool Update() = 0; 18 19 SDL_Renderer* mRen; 20 EventFeed mFeed; 21 22 protected: 23 }; 24 25 class ContextManager : public EventReceiver 26 { 27 public: 28 29 ContextManager() {} 30 31 ContextManager(char* GameDataPath) : mGameDataPath(GameDataPath) {} 32 33 bool LogContext(Context* con, char* name); 34 35 bool LoadContext(char* ContextName); 36 37 bool ContextUpdate(); 38 39 bool EventProcess(Event eve); 40 41 protected: 42 43 char* mGameDataPath; 44 Context* mActiveContext; 45 std::vector<Context*> mContexts; 46 std::vector<char*> mNames; 47 48 }; 49 50 #endif