1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00
vcmi/CGameInterface.h
Michał W. Urbańczyk d3f5a1c1e7 Finished drawing selection window for treasure chest.
(trzeba dorobic jego zamykanie, zwrocenie infa, zwrot pamieci)
2007-12-27 00:11:46 +00:00

42 lines
1.3 KiB
C++

#ifndef CGAMEINTERFACE_H
#define CGAMEINTERFACE_H
#include "global.h"
#include "CCallback.h"
BOOST_TRIBOOL_THIRD_STATE(outOfRange)
using namespace boost::logic;
class CCallback;
class CGlobalAI;
class CGHeroInstance;
class CSelectableComponent;
class CGameInterface
{
public:
bool human;
int playerID, serialID;
virtual void init(ICallback * CB)=0{};
virtual void yourTurn()=0{};
virtual void heroKilled(const CGHeroInstance*)=0{};
virtual void heroCreated(const CGHeroInstance*)=0{};
virtual void heroPrimarySkillChanged(const CGHeroInstance * hero, int which, int val)=0{};
virtual void heroMoved(const HeroMoveDetails & details)=0{};
virtual void tileRevealed(int3 pos)=0{};
virtual void tileHidden(int3 pos)=0{};
virtual void receivedResource(int type, int val){};
virtual void showSelDialog(std::string text, std::vector<CSelectableComponent*> & components, int askID)=0{};
};
class CAIHandler
{
public:
static CGlobalAI * getNewAI(CCallback * cb, std::string dllname);
};
class CGlobalAI : public CGameInterface // AI class (to derivate)
{
public:
//CGlobalAI();
virtual void yourTurn(){};
virtual void heroKilled(const CGHeroInstance*){};
virtual void heroCreated(const CGHeroInstance*){};
};
#endif //CGAMEINTERFACE_H