X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FColorFade.h;h=6505be186bc1179768722e0ec076a90247777e01;hb=3aca2860c95bb4d30569a23ab88a5286c3b9b757;hp=947675e23ca1b238485f509e41feb20391316df1;hpb=2ccc2369d32fb680a3047519d79c17de34c4e10a;p=l2e.git diff --git a/src/graphics/ColorFade.h b/src/graphics/ColorFade.h index 947675e..6505be1 100644 --- a/src/graphics/ColorFade.h +++ b/src/graphics/ColorFade.h @@ -1,10 +1,3 @@ -/* - * ColorFade.h - * - * Created on: Oct 7, 2012 - * Author: holy - */ - #ifndef GRAPHICS_COLORFADE_H_ #define GRAPHICS_COLORFADE_H_ @@ -19,32 +12,41 @@ class ColorFade : public app::State { public: - ColorFade(app::State *slave, Uint32 color, int duration, bool in = false, bool interactive = false); + ColorFade( + app::State *slave, + Uint32 color, + int duration, + bool in = false, + bool interactive = false); virtual ~ColorFade() { } public: - void SetLeadInTime(int ms) { leadIn = ms; if (ms > 0) leadInDone = false; } + void SetLeadInTime(int ms) { + leadIn = ms; + if (ms > 0) leadInDone = false; + } void SetLeadOutTime(int ms) { leadOut = ms; } + void SetDoublePop(bool b = true) { doublePop = b; } public: - virtual void OnEnterState(app::Application &ctrl, SDL_Surface *screen); - virtual void OnExitState(app::Application &ctrl, SDL_Surface *screen); - virtual void OnResumeState(app::Application &ctrl, SDL_Surface *screen); - virtual void OnPauseState(app::Application &ctrl, SDL_Surface *screen); - - virtual void OnResize(int width, int height); - virtual void HandleEvents(const app::Input &); - virtual void UpdateWorld(float deltaT); + virtual void UpdateWorld(Uint32 deltaT); virtual void Render(SDL_Surface *); +private: + virtual void OnEnterState(SDL_Surface *screen); + virtual void OnExitState(SDL_Surface *screen); + virtual void OnResumeState(SDL_Surface *screen); + virtual void OnPauseState(SDL_Surface *screen); + + virtual void OnResize(int width, int height); + private: void UpdateBlinds(int width, int height); Uint8 GetAlpha() const; private: app::Timer timer; - app::Application *ctrl; app::State *slave; SDL_Surface *blinds; Uint32 color; @@ -55,9 +57,10 @@ private: bool fadeDone; bool in; bool interactive; + bool doublePop; }; } -#endif /* GRAPHICS_COLORFADE_H_ */ +#endif