-/*
- * BattleState.h
- *
- * Created on: Aug 5, 2012
- * Author: holy
- */
-
#ifndef BATTLE_BATTLESTATE_H_
#define BATTLE_BATTLESTATE_H_
#include "fwd.h"
#include "AttackTypeMenu.h"
+#include "Capsule.h"
#include "Hero.h"
#include "HeroTag.h"
#include "Monster.h"
public:
void AddMonster(const Monster &);
void AddHero(const Hero &);
+ void SetCapsule(const Capsule &);
public:
- virtual void OnEnterState(app::Application &ctrl, SDL_Surface *screen);
- virtual void OnExitState(app::Application &ctrl, SDL_Surface *screen);
- virtual void OnResumeState(app::Application &ctrl, SDL_Surface *screen);
- virtual void OnPauseState(app::Application &ctrl, SDL_Surface *screen);
-
- virtual void OnResize(int width, int height);
-
virtual void HandleEvents(const app::Input &);
virtual void UpdateWorld(float deltaT);
virtual void Render(SDL_Surface *);
void RenderBackground(SDL_Surface *screen, const geometry::Vector<int> &offset);
void RenderMonsters(SDL_Surface *screen, const geometry::Vector<int> &offset);
void RenderHeroes(SDL_Surface *screen, const geometry::Vector<int> &offset);
+ void RenderCapsule(SDL_Surface *screen, const geometry::Vector<int> &offset);
void RenderHeroTags(SDL_Surface *screen, const geometry::Vector<int> &offset);
void RenderSmallHeroTags(SDL_Surface *screen, const geometry::Vector<int> &offset);
+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 LoadInventory();
SmallHeroTag smallHeroTags[4];
geometry::Vector<int> heroTagPositions[4];
geometry::Vector<int> smallHeroTagPositions[4];
+ Capsule capsule;
int numHeroes;
int activeHero;
int attackCursor;