X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FBattleState.cpp;h=c294e1a28feda13da5b9f81be3b9e15aa4aecdc3;hb=69123d71dacfdd6592c00ead8b92b6441d0f0228;hp=cbea81a82cb5d1564344abe6e24d757bbca70d0e;hpb=62c0a1d0ac98eb51418e4daa59e80b6cc97b522f;p=l2e.git diff --git a/src/battle/BattleState.cpp b/src/battle/BattleState.cpp index cbea81a..c294e1a 100644 --- a/src/battle/BattleState.cpp +++ b/src/battle/BattleState.cpp @@ -187,7 +187,11 @@ void BattleState::ExitState(Application &ctrl, SDL_Surface *screen) { } void BattleState::ResumeState(Application &ctrl, SDL_Surface *screen) { - // TODO: check for victory, defeat or run + // TODO: check for victory or defeat + if (ranAway) { + ctrl.PopState(); // quit the battle scene + return; + } // reset attack choices activeHero = -1; for (vector::size_type i(0), end(heroes.size()); i < end; ++i) { @@ -201,7 +205,7 @@ void BattleState::PauseState(Application &ctrl, SDL_Surface *screen) { } -void BattleState::HandleInput(const Input &input) { +void BattleState::HandleEvents(const Input &input) { } @@ -237,7 +241,7 @@ void BattleState::RenderMonsters(SDL_Surface *screen, const Vector &offset) void BattleState::RenderHeroes(SDL_Surface *screen, const Vector &offset) { for (vector::size_type i(0), end(heroes.size()); i < end; ++i) { - heroes[i].Sprite()->DrawCenterBottom(screen, heroesPositions[i] + offset); + heroes[i].Sprite()->DrawCenterBottom(screen, heroesPositions[i] + offset, 0, 1); } }