namespace battle {
void RunState::OnEnterState(Application &c, SDL_Surface *screen) {
- ctrl = &c;
+
}
void RunState::OnExitState(Application &c, SDL_Surface *screen) {
- ctrl = 0;
+
}
void RunState::OnResumeState(Application &ctrl, SDL_Surface *screen) {
void RunState::HandleEvents(const Input &input) {
if (timer.Finished()) {
battle->SetRunaway();
- ctrl->PopState(); // pop self
+ Ctrl().PopState(); // pop self
}
}