X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Fbattle%2Fstates%2FPerformAttacks.cpp;h=a1a5b8b260226a5ad816765b1d14e419417f9582;hb=3f8fac16c7ae2cbe7da47b98aba9b558825723e7;hp=2c82c09aa1d6cb02ec2733a043710e03fdd5e32e;hpb=65158353d1ecbed0032752863c6c4eb96b1a084a;p=l2e.git diff --git a/src/battle/states/PerformAttacks.cpp b/src/battle/states/PerformAttacks.cpp index 2c82c09..a1a5b8b 100644 --- a/src/battle/states/PerformAttacks.cpp +++ b/src/battle/states/PerformAttacks.cpp @@ -30,7 +30,6 @@ using std::vector; namespace battle { void PerformAttacks::OnEnterState(Application &c, SDL_Surface *screen) { - ctrl = &c; battle->CalculateAttackOrder(); numberAnimation.reserve(battle->MaxMonsters() > battle->NumHeroes() + 1 ? battle->MaxMonsters() : battle->NumHeroes() + 1); numberPosition.reserve(numberAnimation.size()); @@ -38,7 +37,6 @@ void PerformAttacks::OnEnterState(Application &c, SDL_Surface *screen) { void PerformAttacks::OnExitState(Application &c, SDL_Surface *screen) { battle->ClearAllAttacks(); - ctrl = 0; } void PerformAttacks::OnResumeState(Application &ctrl, SDL_Surface *screen) { @@ -50,7 +48,7 @@ void PerformAttacks::OnPauseState(Application &ctrl, SDL_Surface *screen) { } -void PerformAttacks::Resize(int width, int height) { +void PerformAttacks::OnResize(int width, int height) { } @@ -62,7 +60,7 @@ void PerformAttacks::HandleEvents(const Input &input) { battle->ApplyDamage(); battle->NextAttack(); if (battle->AttacksFinished()) { - ctrl->PopState(); + Ctrl().PopState(); return; }