X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2Fstates%2FSelectTarget.h;h=9bdc470519a7d1ce98e2006f2ffff954547cc2fe;hb=0b11a24a8b08c49d6e4301573602fb6d01e7a8c8;hp=f84dd3176abe6a8b6a4dd48752e7e192edaae46e;hpb=b7a90738b9ae701cfc86bf74a11ba59d7fcb17ba;p=l2e.git diff --git a/src/battle/states/SelectTarget.h b/src/battle/states/SelectTarget.h index f84dd31..9bdc470 100644 --- a/src/battle/states/SelectTarget.h +++ b/src/battle/states/SelectTarget.h @@ -1,57 +1,58 @@ -/* - * SelectTarget.h - * - * Created on: Aug 9, 2012 - * Author: holy - */ - #ifndef BATTLE_SELECTTARGET_H_ #define BATTLE_SELECTTARGET_H_ -#include "../../app/State.h" +namespace battle { + class BattleState; + class SelectAttackType; + class TargetSelection; +} +namespace graphics { + class Sprite; +} -#include "../../geometry/Vector.h" +#include "../../app/State.h" +#include "../../math/Vector.h" -namespace graphics { class Sprite; } +#include 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) - : ctrl(0), battle(battle), parent(parent), selection(selection), cursorIcon(cursorIcon), flipFlop(true) { } + : 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); private: - app::Application *ctrl; BattleState *battle; SelectAttackType *parent; TargetSelection *selection; const graphics::Sprite *cursorIcon; + std::vector > monsterPositions; + std::vector > heroPositions; + math::Vector cursorOffset; + math::Vector indicatorOffset; bool flipFlop; }; } -#endif /* BATTLE_SELECTTARGET_H_ */ +#endif