1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Our changes.

Restructured instances classes.
Still very instable.
This commit is contained in:
Michał W. Urbańczyk
2007-10-27 19:38:48 +00:00
parent c18e4573f1
commit 4f316cd7e6
22 changed files with 888 additions and 525 deletions

View File

@@ -7,12 +7,12 @@ class CGameState;
class CHeroInstance;
class CTownInstance;
class CPath;
class CObjectInstance;
class CGObjectInstance;
struct HeroMoveDetails
{
int3 src, dst; //source and destination points
CObjectInstance * ho; //object instance of this hero
CGHeroInstance * ho; //object instance of this hero
int owner;
};
@@ -22,8 +22,8 @@ private:
void newTurn();
CCallback(CGameState * GS, int Player):gs(GS),player(Player){};
CGameState * gs;
int lowestSpeed(CHeroInstance * chi); //speed of the slowest stack
int valMovePoints(CHeroInstance * chi);
int lowestSpeed(CGHeroInstance * chi); //speed of the slowest stack
int valMovePoints(CGHeroInstance * chi);
bool isVisible(int3 pos, int Player);
protected:
@@ -38,17 +38,20 @@ public:
bool verifyPath(CPath * path, bool blockSea);
int getDate(int mode=0); //mode=0 - total days in game, mode=1 - day of week, mode=2 - current week, mode=3 - current month
PseudoV< PseudoV< PseudoV<unsigned char> > > & getVisibilityMap(); //returns visibility map (TODO: make it const)
const CHeroInstance * getHeroInfo(int player, int val, bool mode); //mode = 0 -> val = serial; mode = 1 -> val = ID
const CGHeroInstance * getHeroInfo(int player, int val, bool mode); //mode = 0 -> val = serial; mode = 1 -> val = ID
int getResourceAmount(int type);
int howManyHeroes();
const CTownInstance * getTownInfo(int val, bool mode); //mode = 0 -> val = serial; mode = 1 -> val = ID
const CGTownInstance * getTownInfo(int val, bool mode); //mode = 0 -> val = serial; mode = 1 -> val = ID
int howManyTowns();
std::vector < std::string > getObjDescriptions(int3 pos); //returns descriptions of objects at pos in order from the lowest to the highest
std::vector < const CHeroInstance *> * getHeroesInfo(bool onlyOur=true);
std::vector < const CGHeroInstance *> * getHeroesInfo(bool onlyOur=true);
bool isVisible(int3 pos);
//friends
friend int _tmain(int argc, _TCHAR* argv[]);
};
class CLuaCallback
{
};
#endif //CCALLBACK_H