--- /dev/null
+#ifndef BATTLE_DEFEATSTATE_H_
+#define BATTLE_DEFEATSTATE_H_
+
+namespace battle {
+ class Battle;
+ class BattleState;
+}
+
+#include "../../app/State.h"
+#include "../../math/Vector.h"
+
+#include <SDL.h>
+
+namespace battle {
+
+class DefeatState
+: public app::State {
+
+public:
+ DefeatState(
+ Battle *battle,
+ BattleState *parent);
+
+public:
+ virtual void HandleEvents(const app::Input &);
+ virtual void UpdateWorld(Uint32 deltaT);
+ virtual void Render(SDL_Surface *);
+
+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 OnResize(int width, int height);
+
+private:
+ void RenderTitleBar(SDL_Surface *screen);
+
+private:
+ Battle *battle;
+ BattleState *parent;
+ SDL_Surface *cache;
+ SDL_PixelFormat *format;
+ app::Timer<Uint32> timer;
+ math::Vector<int> framePosition;
+ math::Vector<int> frameSize;
+ math::Vector<int> textPosition;
+
+};
+
+}
+
+#endif