2007-07-03 08:10:37 +00:00
|
|
|
#ifndef COBJINFOECTHANDLER_H
|
|
|
|
#define COBJINFOECTHANDLER_H
|
|
|
|
#include <vector>
|
2008-02-05 03:56:45 +00:00
|
|
|
#include <map>
|
2008-06-12 21:08:04 +00:00
|
|
|
#include "../global.h"
|
2008-02-05 03:56:45 +00:00
|
|
|
class CDefHandler;
|
2008-06-12 21:08:04 +00:00
|
|
|
class CLodHandler;
|
|
|
|
class DLL_EXPORT CGDefInfo
|
2008-02-05 03:56:45 +00:00
|
|
|
{
|
|
|
|
public:
|
2008-08-02 15:08:03 +00:00
|
|
|
std::string name;
|
2007-07-03 08:10:37 +00:00
|
|
|
|
2008-02-05 03:56:45 +00:00
|
|
|
unsigned char visitMap[6];
|
|
|
|
unsigned char blockMap[6];
|
2008-02-15 18:40:58 +00:00
|
|
|
unsigned char visitDir; //directions from which object can be entered, format same as for moveDir in CGHeroInstance(but 0 - 7)
|
2008-02-05 03:56:45 +00:00
|
|
|
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
|
2008-06-17 17:48:32 +00:00
|
|
|
int width, height; //tiles
|
2008-02-05 03:56:45 +00:00
|
|
|
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;
|
|
|
|
}
|
2008-02-15 18:40:58 +00:00
|
|
|
CGDefInfo();
|
2008-02-05 03:56:45 +00:00
|
|
|
};
|
2008-06-12 21:08:04 +00:00
|
|
|
class DLL_EXPORT CDefObjInfoHandler
|
2007-07-03 08:10:37 +00:00
|
|
|
{
|
|
|
|
public:
|
2008-02-05 03:56:45 +00:00
|
|
|
std::map<int,std::map<int,CGDefInfo*> > gobjs;
|
|
|
|
std::map<int,CGDefInfo*> castles;
|
|
|
|
//std::vector<DefObjInfo> objs;
|
2007-07-03 08:10:37 +00:00
|
|
|
void load();
|
|
|
|
};
|
|
|
|
|
2008-08-02 15:08:03 +00:00
|
|
|
#endif //COBJINFOECTHANDLER_H
|