mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-28 23:06:24 +02:00
cc7be20b07
Because of really huge amount of modifications here I've probably missed some minor stuff. I doubt if it's still compatible with gcc - some changes should be reapplied.
43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
#ifndef COBJINFOECTHANDLER_H
|
|
#define COBJINFOECTHANDLER_H
|
|
#include <vector>
|
|
#include <map>
|
|
#include "../global.h"
|
|
class CDefHandler;
|
|
class CLodHandler;
|
|
class DLL_EXPORT CGDefInfo
|
|
{
|
|
public:
|
|
std::string name;
|
|
|
|
unsigned char visitMap[6];
|
|
unsigned char blockMap[6];
|
|
unsigned char visitDir; //directions from which object can be entered, format same as for moveDir in CGHeroInstance(but 0 - 7)
|
|
int id, subid; //of object described by this defInfo
|
|
int terrainAllowed, //on which terrain it is possible to place object
|
|
terrainMenu; //in which menus in map editor object will be showed
|
|
int width, height; //tiles
|
|
int type; //(0- ground, 1- towns, 2-creatures, 3- heroes, 4-artifacts, 5- resources)
|
|
CDefHandler * handler;
|
|
int printPriority;
|
|
bool isVisitable();
|
|
bool operator<(const CGDefInfo& por)
|
|
{
|
|
if(id!=por.id)
|
|
return id<por.id;
|
|
else
|
|
return subid<por.subid;
|
|
}
|
|
CGDefInfo();
|
|
};
|
|
class DLL_EXPORT CDefObjInfoHandler
|
|
{
|
|
public:
|
|
std::map<int,std::map<int,CGDefInfo*> > gobjs;
|
|
std::map<int,CGDefInfo*> castles;
|
|
//std::vector<DefObjInfo> objs;
|
|
void load();
|
|
};
|
|
|
|
#endif //COBJINFOECTHANDLER_H
|