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)
}
-void ColorFade::OnEnterState(Application &c, SDL_Surface *screen) {
- ctrl = &c;
+void ColorFade::OnEnterState(SDL_Surface *screen) {
if (leadIn > 0) {
timer = GraphicsTimers().StartCountdown(leadIn);
} else {
}
}
-void ColorFade::OnExitState(Application &, SDL_Surface *screen) {
+void ColorFade::OnExitState(SDL_Surface *screen) {
if (blinds) {
SDL_FreeSurface(blinds);
blinds = 0;
}
}
-void ColorFade::OnResumeState(Application &ctrl, SDL_Surface *screen) {
+void ColorFade::OnResumeState(SDL_Surface *screen) {
UpdateBlinds(screen->w, screen->h);
}
-void ColorFade::OnPauseState(Application &ctrl, SDL_Surface *screen) {
+void ColorFade::OnPauseState(SDL_Surface *screen) {
}
if (leadOut > 0) {
timer = GraphicsTimers().StartCountdown(leadOut);
} else {
- ctrl->PopState();
+ Ctrl().PopState();
}
} else {
- ctrl->PopState();
+ Ctrl().PopState();
}
}
}