namespace Deeangband
{

#pragma once

#include "resource.h"

#define GAME_TITLE "D'angband"
#define WINDOW_WIDTH 1024
#define WINDOW_HEIGHT 600

#define CREATURE_MAX_SOUL 999999999L //!< 嵟戝僜僂儖抣
#define CREATURE_MAX_GOLD 999999999L //!< 嵟戝僑乕儖僪抣
#define CREATURE_MAX_MORTAL_LEVEL 30 //!< 掕柦嵟戝儗儀儖
#define CREATURE_MAX_DIVINE_LEVEL 30 //!< 恄奿嵟戝抣
#define FIELD_MAX_WIDTH  512  //!< 僼傿乕儖僪嵟戝暆 
#define FIELD_MAX_HEIGHT 512  //!< 僼傿乕儖僪嵟戝崅偝
#define FIELD_BUFFER_SIZE (FIELD_MAX_WIDTH * FIELD_MAX_HEIGHT)
#define FIELD_BUFFER(X, Y) (FIELD_MAX_HEIGHT * Y + X) 
#define CREATURE_MAX_LEVEL CREATURE_MAX_MORTAL_LEVEL+CREATURE_MAX_DIVINE_LEVEL //!< 恄奿崬傒嵟戝儗儀儖

#define SPECIAL_NAME_UNKNOWN "UNKNOWN" //!< 柤徧偺僟儈乕柤
#define SPECIAL_TAG_UNKNOWN "XXX_UNKNOWN" //!< 僎乕儉梫慺僞僌偺僟儈乕柤

#define TAG_VARIABLE "VARIABLE" //!< 梫慺壜曄僞僌

#define BASE_SIGHT_RANGE 12; //!< 昗弨帇奅斖埻

/*!
 * 僎乕儉僐儅儞僪掕媊
 */

	typedef enum GAME_COMMAND
	{
		GAME_COMMAND_VIEW_PLAYER_STATUS,
		GAME_COMMAND_DEBUG_XML_SAVE,
		GAME_COMMAND_DEBUG_XML_LOAD,
		GAME_COMMAND_EXIT,
		GAME_COMMAND_STAY,
		GAME_COMMAND_NORTH,
		GAME_COMMAND_NORTH_EAST,
		GAME_COMMAND_EAST,
		GAME_COMMAND_SOUTH_EAST,
		GAME_COMMAND_SOUTH,	
		GAME_COMMAND_SOUTH_WEST,
		GAME_COMMAND_WEST,
		GAME_COMMAND_NORTH_WEST,

	} GAME_COMMAND;

	/*!
	 * 僾儗僀廔椆僐乕僪
	 */
	typedef enum PLAY_EXIT_CODE
	{
		PLAY_EXIT_NONE,  //!<僾儗僀廔椆僐乕僪:側偟(僾儗僀宲懕)
		PLAY_EXIT_DEAD,  //!<僾儗僀廔椆僐乕僪:僎乕儉僆乕僶乕
		PLAY_EXIT_QUIT,  //!<僾儗僀廔椆僐乕僪:捠忢廔椆
		PLAY_EXIT_ERROR, //!<僾儗僀廔椆僐乕僪:堎忢廔椆
	} PLAY_EXIT_CODE;

	/*!
	 * 憰旛晹埵
	 */
	typedef enum EQUIP_SLOT
	{
		SLOT_ID_INVENTORY,  //!<憰旛晹埵: 強帩
		SLOT_ID_HAND,       //!<憰旛晹埵: 庤
		SLOT_ID_AMMO,       //!<憰旛晹埵: 抏栻
		SLOT_ID_RING,       //!<憰旛晹埵: 巜椫
		SLOT_ID_AMULET,     //!<憰旛晹埵: 傾儈儏儗僢僩
		SLOT_ID_BODY,       //!<憰旛晹埵: 懱
		SLOT_ID_OUTER,      //!<憰旛晹埵: 懱偺忋
		SLOT_ID_HEAD,       //!<憰旛晹埵: 摢晹
		SLOT_ID_ARMS,       //!<憰旛晹埵: 榬晹
		SLOT_ID_FEET,       //!<憰旛晹埵: 媟晹
		SLOT_ID_INSTRUMENT, //!<憰旛晹埵: 妝婍
		SLOT_ID_LITE,       //!<憰旛晹埵: 岝尮
		SLOT_ID_TAIL,       //!<憰旛晹埵: 旜晹
		SLOT_ID_INTAKE,     //!<憰旛晹埵: 庢崬
		SLOT_ID_ORGAN,      //!<憰旛晹埵: 婍姱
		MAX_SLOT_IDS        //!<憰旛晹埵悢
	} EQUIP_SLOT;

	/*!
	 * 曽妏
	 */
	typedef enum DIRECTION
	{
		DIRECTION_NORTH_EAST,
		DIRECTION_EAST,
		DIRECTION_SOUTH_EAST,
		DIRECTION_SOUTH,
		DIRECTION_SOUTH_WEST,
		DIRECTION_WEST,
		DIRECTION_NORTH_WEST,
		DIRECTION_NORTH,
		DIRECTION_STAY,
		MAX_DIRECTION        //!<憰旛晹埵悢
	} DIRECTION;

	/*!
	 * @brief 僋儕乕僠儍乕偺婎慴擻椡抣6庬偺楍嫇懱
	 */
	enum CREATURE_STATUS
	{
		CS_STR, /*!<榬椡*/
		CS_INT, /*!<抦椡*/
		CS_WIS, /*!<尗偝*/
		CS_DEX, /*!<婍梡*/
		CS_CON, /*!<懴媣*/
		CS_CHA, /*!<枺椡*/
		CS_MAX  /*!<憤悢:6*/
	};

	/*!
	 * @brief 僾儗僀儎乕偺峴摦張棟偺寢壥
	 */
	typedef enum ACTION_RESULT
	{
		AR_SUCCESS, /*!< 惉岟偟偨 */
		AR_FAILURE, /*!< 枹掕媊偺棟桼偱幐攕偟偨 */
	} ACTION_RESULT;

	/*!
	 * @brief 僋儕乕僠儍乕偺婎杮摿惈掕媊
	 */
	typedef enum CREATURE_BASE_TRAIT
	{
		CBT_SUSTAIN_STR, /*!< 榬椡堐帩 */
		CBT_SUSTAIN_INT, /*!< 抦椡堐帩 */
		CBT_SUSTAIN_WIS, /*!< 尗偝堐帩 */
		CBT_SUSTAIN_DEX, /*!< 婍梡堐帩 */
		CBT_SUSTAIN_CON, /*!< 懴媣堐帩 */
		CBT_SUSTAIN_CHA, /*!< 枺椡堐帩 */
		CBT_MAX          /*!< 憤悢:6 */
	} CREATURE_BASE_TRAIT;



typedef int BASE_STATUS; //!< 婎慴擻椡抣偺曄悢宆
typedef int LEVEL;  //!< LEVEL偺曄悢宆
typedef int HP;     //!< HP偺曄悢宆
typedef int MP;     //!< MP偺曄悢宆
typedef int FEED;     //!< 帬梴搙偺曄悢宆
typedef int64_t SOUL;   //!< 僜僂儖偺曄悢宆
typedef int DISCIPLINE_POINT; //!< 廋梴抣偺曄悢宆
typedef int AC;     //!< 婃寬惈
typedef int EV;     //!< 斀墳椡
typedef int VO;     //!< 堄巙椡
typedef int ID;     //!< 僎乕儉梫慺ID
typedef std::string TAG;  //!< 僎乕儉梫慺暥帤楍ID
typedef std::string NAME; //!< 柤徧
typedef std::string DESCRIPTION; //!< 夝愢
typedef std::string SYMBOL; //!< 僔儞儃儖
typedef double HEIGHT; //!< 挿偝
typedef double WEIGHT; //!< 廳検
typedef int DEPTH;  //!< 奒憌怺搙
typedef int RARITY;  //!< 儗傾儕僥傿
typedef int NUMBER; //!< 屄悢
typedef int PPM;    //!< 昐枩暘棪
typedef int MAP_LENGTH;   //!<儅僢僾嫍棧
typedef int POWER;        //!<岠椡
typedef int BODY_SIZE;    //!<懱奿
typedef int GAME_TIME;    //!<僎乕儉帪娫
typedef int TURN;         //!<僞乕儞悢
typedef int ACTION_WAIT;  //!<峴摦僂僃僀僩悢
typedef int SKILL_EXP;    //!<僗僉儖宱尡抣
typedef int SKILL_RANK;   //!<僗僉儖儔儞僋
typedef int MAP_POSITION;     //!<嵗昗
typedef int DICE_NUMBER;      //!<僟僀僗偺悢
typedef int DICE_SIDE;        //!<僟僀僗偺柺悢

//typedef int ACTION_RESULT; //!<僎乕儉拞偺峴摦張棟僐乕僪

};


class Authority;
class BaseStatusTable;
class Building;
class Coordinates;
class Creature;
class CreatureTemplate;
class CreatureTrait;
class Dice;
class Discipline;
class Door;
class Dungeon;
class Effect;
class GameElement;
class GameSurfaceSDL;
class GameWorld;
class HaveGameTime;
class HavePosition;
class HaveHp;
class HaveInventory;
class HaveSize;
class HaveSymbol;
class Floor;
class FixedArtifact;
class Field;
class Item;
class ItemBase;
class ItemEgo;
class ItemTemplate;
class Karma;
class Skill;
class Square;
class Trap;


