#include "../app/State.h"
#include "../geometry/Point.h"
#include "../geometry/Vector.h"
+#include "../graphics/Animation.h"
#include "../graphics/Menu.h"
-#include "../graphics/SimpleAnimation.h"
#include <vector>
#include <SDL.h>
Monster &MonsterAt(int index) { return monsters[index]; }
const Monster &MonsterAt(int index) const { return monsters[index]; }
- graphics::SimpleAnimation &HeroAnimationAt(int index) { return heroAnimations[index]; }
- const graphics::SimpleAnimation &HeroAnimationAt(int index) const { return heroAnimations[index]; }
-
const HeroTag &HeroTagAt(int index) const { return heroTags[index]; }
const geometry::Point<int> &HeroTagPositionAt(int index) const { return heroTagPositions[index]; }
void SetRunaway() { ranAway = true; }
void ClearAllAttacks();
+ struct Order {
+ Order(int index, bool isMonster)
+ : index(index), isMonster(isMonster) { }
+ int index;
+ bool isMonster;
+ };
+
+ void WriteOrder(std::vector<Order> &);
+
public:
geometry::Vector<int> CalculateScreenOffset(SDL_Surface *screen) const {
return geometry::Vector<int>(
(screen->w - background->w) / 2,
(screen->h - background->h) / 2);
}
- int BackgroundWidth() const { return background->w; }
- int BackgroundHeight() const { return background->h; }
+ int Width() const { return background->w; }
+ int Height() const { return background->h; }
void RenderBackground(SDL_Surface *screen, const geometry::Vector<int> &offset);
void RenderMonsters(SDL_Surface *screen, const geometry::Vector<int> &offset);
std::vector<geometry::Point<int> > heroesPositions;
std::vector<Monster> monsters;
Hero heroes[4];
- graphics::SimpleAnimation heroAnimations[4];
graphics::Menu<const common::Spell *> spellMenus[4];
graphics::Menu<const common::Item *> itemMenu;
graphics::Menu<const common::Item *> ikariMenus[4];