📄 cdefines.h
字号:
#ifndef CDEFINES_H
#define CDEFINES_H
const int crWaitCursor = 1;
/*在#include声明里,定义一个常数标识客户自定义光标
Cursors数组系统定义了18个标准光标,它们的索引值从-17到0,所
以自定义光标从1开始。
*/
const BACK = -256;
const MAXPLY = 45;
const LOSEVALUE = 0x7D00;
const MATEVALUE = 0x7B60;
const DEPTHFACTOR = 0x80;
const SQUARE_SIZE = 36;
const MYFRAMESIZE = 3;
#define MAXINT 32767
/*
* 类型定义
*/
typedef int MAXTYPE; /* 估值类型 */
enum PIECETYPE {empty, king, rook, gunner, knight, assist, bishop, pawn};
enum COLORTYPE {red, black};
typedef int INDEXTYPE;
typedef int SQUARETYPE;
typedef int EDGESQUARETYPE;
typedef short DEPTHTYPE;
struct MOVETYPE
{
int newpos1, oldpos; /* newpos1 和 oldpos 格子 */
short spe; /* 指示特殊移动 */
PIECETYPE movpiece, content; /* 移动棋子,吃掉的棋子 */
};
struct BOARDTYPE
{
PIECETYPE piece;
COLORTYPE color;
short index;
unsigned char attacked;
};
typedef MOVETYPE PATHTYPE[MAXPLY]; /* 主要棋路变化类型 */
typedef unsigned char *LIBTYPE; /* 棋谱库 */
struct CHESSCLOCKTYPE
{
int hour, minute, second, sec100;
int totalhours, totmins, totalsecs, tots100;
int number;
double totaltime;
};
typedef char DIRTYPE;
typedef short SETOFPIECE;
typedef unsigned char SIXTYTYPE;
typedef unsigned char REPEATTYPE;
struct NODEVAL
{
unsigned long nodebase, nodeoffset;
};
enum LEVELTYPE { normal, fullgametime, easygame, infinite, plysearch,
matesearch, matching };
struct BOARDIDTYPE
{
PIECETYPE piece;
COLORTYPE color;
};
struct PIECETABLE
{
SQUARETYPE isquare;
PIECETYPE ipiece;
};
struct ATTACKTABTYPE
{
SETOFPIECE pieceset;
int direction; /* 棋子的移动方位 */
};
#endif // CDEFINES_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -