X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2FApplication.h;h=41198bce88c4f2e4f5ca1a7c07c8af9c713d9c8b;hb=6e88a625710c7936f87b38ecf6094472f3a49f4f;hp=853d0cb25cefc91897beeaa41e7365f027a2604a;hpb=2a0eca649009f78028db286a67a532429cab5b88;p=l2e.git diff --git a/src/app/Application.h b/src/app/Application.h index 853d0cb..41198bc 100644 --- a/src/app/Application.h +++ b/src/app/Application.h @@ -8,7 +8,9 @@ #ifndef APP_APPLICATION_H_ #define APP_APPLICATION_H_ +#include "fwd.h" #include "Input.h" +#include "Timer.h" #include "../sdl/InitScreen.h" #include @@ -18,8 +20,6 @@ namespace app { -class State; - class Application { public: @@ -40,6 +40,7 @@ public: void Quit(); Input &Buttons() { return input; } const Input &Buttons() const { return input; } + Timers &GlobalTimers() { return globalTimers; } private: struct StateCommand { @@ -51,6 +52,7 @@ private: private: State *CurrentState(); + bool StateChangePending() const { return !stateChanges.empty(); } void UpdateState(); void RealChangeState(State *); void RealPushState(State *); @@ -66,8 +68,10 @@ private: sdl::InitScreen *screen; std::stack states; std::queue stateChanges; + Timers globalTimers; Input input; Uint32 last; + bool inStateChage; };