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;
if (leadIn > 0) {
timer = GraphicsTimers().StartCountdown(leadIn);
} else {
}
-void ColorFade::Resize(int width, int height) {
+void ColorFade::OnResize(int width, int height) {
slave->Resize(width, height);
UpdateBlinds(width, height);
}
if (leadOut > 0) {
timer = GraphicsTimers().StartCountdown(leadOut);
} else {
- ctrl->PopState();
+ Ctrl().PopState();
}
} else {
- ctrl->PopState();
+ Ctrl().PopState();
}
}
}