2007-06-06 19:12:12 +03:00
|
|
|
#ifndef GLOBAL_H
|
|
|
|
#define GLOBAL_H
|
2007-06-07 16:43:30 +03:00
|
|
|
#define CHECKTIME 1
|
|
|
|
#if CHECKTIME
|
|
|
|
#include "timeHandler.h"
|
2007-11-19 00:58:28 +02:00
|
|
|
#include <boost/logic/tribool.hpp>
|
2007-08-17 20:42:21 +03:00
|
|
|
#include "int3.h"
|
2007-06-07 16:43:30 +03:00
|
|
|
#include <iostream>
|
|
|
|
#define THC
|
|
|
|
#else
|
|
|
|
#define THC //
|
|
|
|
#endif
|
2007-08-06 16:09:41 +03:00
|
|
|
enum Ecolor {RED, BLUE, TAN, GREEN, ORANGE, PURPLE, TEAL, PINK}; //player's colors
|
2007-08-08 22:28:56 +03:00
|
|
|
enum EterrainType {border=-1, dirt, sand, grass, snow, swamp, rough, subterranean, lava, water, rock};
|
2007-07-31 16:09:34 +03:00
|
|
|
enum Eriver {noRiver=0, clearRiver, icyRiver, muddyRiver, lavaRiver};
|
2007-06-18 23:05:42 +03:00
|
|
|
enum Eroad {dirtRoad=1, grazvelRoad, cobblestoneRoad};
|
2007-06-06 19:12:12 +03:00
|
|
|
enum Eformat { WoG=0x33, AB=0x15, RoE=0x0e, SoD=0x1c};
|
|
|
|
enum EvictoryConditions {artifact, gatherTroop, gatherResource, buildCity, buildGrail, beatHero,
|
2007-07-29 02:01:25 +03:00
|
|
|
captureCity, beatMonster, takeDwellings, takeMines, transportItem, winStandard=255};
|
2007-06-06 19:12:12 +03:00
|
|
|
enum ElossCon {lossCastle, lossHero, timeExpires, lossStandard=255};
|
2007-08-15 18:13:11 +03:00
|
|
|
enum EHeroClasses {HERO_KNIGHT, HERO_CLERIC, HERO_RANGER, HERO_DRUID, HERO_ALCHEMIST, HERO_WIZARD,
|
2007-07-29 02:01:25 +03:00
|
|
|
HERO_DEMONIAC, HERO_HERETIC, HERO_DEATHKNIGHT, HERO_NECROMANCER, HERO_WARLOCK, HERO_OVERLORD,
|
|
|
|
HERO_BARBARIAN, HERO_BATTLEMAGE, HERO_BEASTMASTER, HERO_WITCH, HERO_PLANESWALKER, HERO_ELEMENTALIST};
|
2007-08-06 07:03:34 +03:00
|
|
|
|
2007-08-20 00:12:55 +03:00
|
|
|
#define CGI (CGameInfo::mainObj)
|
|
|
|
#define CURPLINT (((CPlayerInterface*)((CGameInfo::mainObj)->playerint[(CGameInfo::mainObj)->state->currentPlayer])))
|
|
|
|
#define LOCPLINT (((CPlayerInterface*)((CGameInfo::mainObj)->playerint[(CGameInfo::mainObj)->localPlayer])))
|
2007-08-06 07:03:34 +03:00
|
|
|
//CURPLINT gives pointer to the interface of human player which is currently making turn,
|
|
|
|
//LOCPLINT gives pointer to the interface which is currently showed (on this machine)
|
|
|
|
|
2007-09-30 19:16:00 +03:00
|
|
|
#define HEROI_TYPE (0)
|
|
|
|
#define TOWNI_TYPE (1)
|
2007-09-14 16:11:10 +03:00
|
|
|
|
2007-12-06 20:32:06 +02:00
|
|
|
//#define LOGUJ
|
|
|
|
|
|
|
|
#ifdef LOGUJ
|
|
|
|
#define LOG(x) std::cout<<x;
|
|
|
|
#define LOGE(x) std::cout<<x<<std::endl;
|
|
|
|
#else
|
|
|
|
#define LOG(x) ;
|
|
|
|
#define LOGE(x) ;
|
|
|
|
#endif
|
2007-08-06 07:03:34 +03:00
|
|
|
|
2007-08-06 16:09:41 +03:00
|
|
|
const int F_NUMBER = 9; //factions (town types) quantity
|
2007-07-17 23:51:49 +03:00
|
|
|
const int PLAYER_LIMIT = 8; //player limit per map
|
2007-07-24 03:25:46 +03:00
|
|
|
const int HEROES_PER_TYPE=8; //amount of heroes of each type
|
2007-08-04 22:01:22 +03:00
|
|
|
const int SKILL_QUANTITY=28;
|
|
|
|
const int ARTIFACTS_QUANTITY=171;
|
|
|
|
const int HEROES_QUANTITY=156;
|
2007-09-16 20:21:23 +03:00
|
|
|
const int RESOURCE_QUANTITY=8;
|
2007-08-20 00:12:55 +03:00
|
|
|
const int TERRAIN_TYPES=10;
|
2007-09-14 16:11:10 +03:00
|
|
|
const int PRIMARY_SKILLS=4;
|
2007-11-24 16:17:57 +02:00
|
|
|
const int NEUTRAL_PLAYER=255;
|
2007-09-16 20:21:23 +03:00
|
|
|
const int NAMES_PER_TOWN=16;
|
2008-01-09 21:59:23 +02:00
|
|
|
const int CREATURES_PER_TOWN = 7; //without upgrades
|
2007-09-16 20:21:23 +03:00
|
|
|
|
2007-08-11 17:58:07 +03:00
|
|
|
#define MARK_BLOCKED_POSITIONS false
|
|
|
|
#define MARK_VISITABLE_POSITIONS false
|
|
|
|
|
2007-06-06 19:12:12 +03:00
|
|
|
#define DEFBYPASS
|
2007-08-20 00:12:55 +03:00
|
|
|
|
2007-11-19 00:58:28 +02:00
|
|
|
#define HANDLE_EXCEPTION \
|
|
|
|
catch (const std::exception& e) { \
|
|
|
|
std::cerr << e.what() << std::endl; \
|
|
|
|
} \
|
|
|
|
catch (const std::exception * e) \
|
|
|
|
{ \
|
|
|
|
std::cerr << e->what()<< std::endl; \
|
|
|
|
delete e; \
|
|
|
|
}
|
|
|
|
|
2007-06-06 19:12:12 +03:00
|
|
|
#endif //GLOBAL_H
|