X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FColorFade.cpp;h=f194665d1daecb35694880474e2b35dba549f2e8;hb=3f8fac16c7ae2cbe7da47b98aba9b558825723e7;hp=ac45a9e6fb8dd6ae887c624d2b6f1616d9a62864;hpb=65158353d1ecbed0032752863c6c4eb96b1a084a;p=l2e.git diff --git a/src/graphics/ColorFade.cpp b/src/graphics/ColorFade.cpp index ac45a9e..f194665 100644 --- a/src/graphics/ColorFade.cpp +++ b/src/graphics/ColorFade.cpp @@ -16,8 +16,7 @@ using app::Input; namespace graphics { ColorFade::ColorFade(State *slave, Uint32 color, int duration, bool in, bool interactive) -: ctrl(0) -, slave(slave) +: slave(slave) , blinds(0) , color(color) , duration(duration) @@ -31,7 +30,6 @@ ColorFade::ColorFade(State *slave, Uint32 color, int duration, bool in, bool int } void ColorFade::OnEnterState(Application &c, SDL_Surface *screen) { - ctrl = &c; if (leadIn > 0) { timer = GraphicsTimers().StartCountdown(leadIn); } else { @@ -56,7 +54,7 @@ void ColorFade::OnPauseState(Application &ctrl, SDL_Surface *screen) { } -void ColorFade::Resize(int width, int height) { +void ColorFade::OnResize(int width, int height) { slave->Resize(width, height); UpdateBlinds(width, height); } @@ -94,10 +92,10 @@ void ColorFade::HandleEvents(const Input &input) { if (leadOut > 0) { timer = GraphicsTimers().StartCountdown(leadOut); } else { - ctrl->PopState(); + Ctrl().PopState(); } } else { - ctrl->PopState(); + Ctrl().PopState(); } } }