2008-02-25 01:06:27 +02:00
|
|
|
#pragma once
|
|
|
|
#include "global.h"
|
|
|
|
#include "CPlayerInterface.h"
|
2008-02-26 20:01:26 +02:00
|
|
|
|
2008-02-25 01:06:27 +02:00
|
|
|
class CCreatureSet;
|
|
|
|
class CGHeroInstance;
|
2008-03-03 21:41:10 +02:00
|
|
|
class CDefHandler;
|
2008-02-26 20:01:26 +02:00
|
|
|
template <typename T> class AdventureMapButton;
|
|
|
|
|
2008-03-03 21:41:10 +02:00
|
|
|
class CBattleHero : public IShowable, public CIntObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CDefHandler * dh;
|
|
|
|
int phase;
|
|
|
|
int image;
|
|
|
|
void show(SDL_Surface * to);
|
|
|
|
~CBattleHero(); //d-tor
|
|
|
|
};
|
|
|
|
|
2008-02-26 20:01:26 +02:00
|
|
|
class CBattleInterface : public IActivable, public IShowable
|
2008-02-25 01:06:27 +02:00
|
|
|
{
|
2008-02-26 20:01:26 +02:00
|
|
|
private:
|
|
|
|
SDL_Surface * background, * menu;
|
|
|
|
AdventureMapButton<CBattleInterface> * bOptions, * bSurrender, * bFlee, * bAutofight, * bSpell,
|
|
|
|
* bWait, * bDefence, * bConsoleUp, * bConsoleDown;
|
2008-03-03 21:41:10 +02:00
|
|
|
CBattleHero * attackingHero, * defendingHero;
|
|
|
|
|
2008-02-25 01:06:27 +02:00
|
|
|
public:
|
|
|
|
CBattleInterface(CCreatureSet * army1, CCreatureSet * army2, int3 tile, CGHeroInstance *hero1, CGHeroInstance *hero2);
|
2008-02-26 20:01:26 +02:00
|
|
|
~CBattleInterface();
|
|
|
|
|
2008-03-03 21:41:10 +02:00
|
|
|
//std::vector<TimeInterested*> timeinterested; //animation handling
|
|
|
|
|
2008-02-26 20:01:26 +02:00
|
|
|
//button handle funcs:
|
|
|
|
void bOptionsf();
|
|
|
|
void bSurrenderf();
|
|
|
|
void bFleef();
|
|
|
|
void bAutofightf();
|
|
|
|
void bSpellf();
|
|
|
|
void bWaitf();
|
|
|
|
void bDefencef();
|
|
|
|
void bConsoleUpf();
|
|
|
|
void bConsoleDownf();
|
|
|
|
//end of button handle funcs
|
2008-02-25 01:06:27 +02:00
|
|
|
//napisz tu klase odpowiadajaca za wyswietlanie bitwy i obsluge uzytkownika, polecenia ma przekazywac callbackiem
|
|
|
|
void activate();
|
|
|
|
void deactivate();
|
2008-02-26 20:01:26 +02:00
|
|
|
void show(SDL_Surface * to);
|
2008-02-25 01:06:27 +02:00
|
|
|
};
|