X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2Fstates%2FSelectTarget.h;h=121b8ad235f72638aef1c60698d3255e6921a87b;hb=092a2dd175a4001a495c84ee85211734fb928c83;hp=b9085a5b51bc56951bb772d174fcb6b611e3fe03;hpb=3c72a71fbf6de96333a641051a20c6bf8b3a5df3;p=l2e.git diff --git a/src/battle/states/SelectTarget.h b/src/battle/states/SelectTarget.h index b9085a5..121b8ad 100644 --- a/src/battle/states/SelectTarget.h +++ b/src/battle/states/SelectTarget.h @@ -8,42 +8,47 @@ #ifndef BATTLE_SELECTTARGET_H_ #define BATTLE_SELECTTARGET_H_ -#include "../../app/State.h" - -#include "../../geometry/Vector.h" +namespace battle { + class BattleState; + class SelectAttackType; + class TargetSelection; +} +namespace math { + template + class Vector; +} +namespace graphics { + class Sprite; +} -namespace graphics { class Sprite; } +#include "../../app/State.h" namespace battle { -class BattleState; -class TargetSelection; -class SelectAttackType; - class SelectTarget : public app::State { public: - SelectTarget(BattleState *battle, SelectAttackType *parent, TargetSelection *selection, const graphics::Sprite *cursorIcon, bool startWithEnemy) - : ctrl(0), battle(battle), parent(parent), selection(selection), cursorIcon(cursorIcon), flipFlop(true) { } + SelectTarget(BattleState *battle, SelectAttackType *parent, TargetSelection *selection, const graphics::Sprite *cursorIcon) + : battle(battle), parent(parent), selection(selection), cursorIcon(cursorIcon), flipFlop(true) { } public: - virtual void EnterState(app::Application &ctrl, SDL_Surface *screen); - virtual void ExitState(app::Application &ctrl, SDL_Surface *screen); - virtual void ResumeState(app::Application &ctrl, SDL_Surface *screen); - virtual void PauseState(app::Application &ctrl, SDL_Surface *screen); + virtual void HandleEvents(const app::Input &); + virtual void UpdateWorld(Uint32 deltaT); + virtual void Render(SDL_Surface *); - virtual void Resize(int width, int height); +private: + virtual void OnEnterState(SDL_Surface *screen); + virtual void OnExitState(SDL_Surface *screen); + virtual void OnResumeState(SDL_Surface *screen); + virtual void OnPauseState(SDL_Surface *screen); - virtual void HandleInput(const app::Input &); - virtual void UpdateWorld(float deltaT); - virtual void Render(SDL_Surface *); + virtual void OnResize(int width, int height); private: - void RenderCursors(SDL_Surface *screen, const geometry::Vector &offset); + void RenderCursors(SDL_Surface *screen, const math::Vector &offset); private: - app::Application *ctrl; BattleState *battle; SelectAttackType *parent; TargetSelection *selection;