X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2Fstates%2FSelectTarget.h;fp=src%2Fbattle%2Fstates%2FSelectTarget.h;h=b9085a5b51bc56951bb772d174fcb6b611e3fe03;hb=3c72a71fbf6de96333a641051a20c6bf8b3a5df3;hp=0000000000000000000000000000000000000000;hpb=7946f704a4cd3a985d2fb523079fce7fa14c341e;p=l2e.git diff --git a/src/battle/states/SelectTarget.h b/src/battle/states/SelectTarget.h new file mode 100644 index 0000000..b9085a5 --- /dev/null +++ b/src/battle/states/SelectTarget.h @@ -0,0 +1,57 @@ +/* + * SelectTarget.h + * + * Created on: Aug 9, 2012 + * Author: holy + */ + +#ifndef BATTLE_SELECTTARGET_H_ +#define BATTLE_SELECTTARGET_H_ + +#include "../../app/State.h" + +#include "../../geometry/Vector.h" + +namespace graphics { class Sprite; } + +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) { } + +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 Resize(int width, int height); + + virtual void HandleInput(const app::Input &); + virtual void UpdateWorld(float deltaT); + virtual void Render(SDL_Surface *); + +private: + void RenderCursors(SDL_Surface *screen, const geometry::Vector &offset); + +private: + app::Application *ctrl; + BattleState *battle; + SelectAttackType *parent; + TargetSelection *selection; + const graphics::Sprite *cursorIcon; + bool flipFlop; + +}; + +} + +#endif /* BATTLE_SELECTTARGET_H_ */