C语言编写象棋程序代码(3)
发布时间:2021-06-08
发布时间:2021-06-08
可编辑
char cursor[14][14]={
0,0,0,0,0,0,0,0,0,0,0,0,1,1,
0,0,0,0,0,0,0,0,0,0,0,1,1,1,
0,255,255,255,255,255,255,255,0,0,1,1,1,1,
0,255,255,255,255,255,255,0,0,1,1,1,1,1,
0,255,255,255,255,255,255,0,0,1,1,1,1,1,
0,255,255,255,255,255,255,255,0,0,1,1,1,1,
0,255,255,255,255,255,255,255,255,0,0,1,1,1,
0,255,255,255,255,255,255,255,255,255,0,0,1,1,
0,255,255,0,255,255,255,255,255,255,255,0,0,1,
0,255,0,1,1,0,255,255,255,255,255,255,255,0,
0,0,1,1,1,1,0,255,255,255,255,255,0,1,
0,1,1,1,1,1,1,0,255,255,255,0,1,1,
1,1,1,1,1,1,1,1,0,255,0,1,1,1,
1,1,1,1,1,1,1,1,1,0,1,1,1,1
};
struct pos{
int x;
int y;
}position[10][9],redcurpos,redtemppos,redoldpos,blackcurpos,blacktemppos,blackoldpos; /*----------------------------------------------------*/
selectpage(register char page) /*换页函数*/
{
union REGS r;
r.x.ax=0x4f05;
r.x.bx=0;
r.x.dx=page; /*选择页面*/
int86(0x10,&r,&r);
}
unsigned char set_SVGA_mode(int vmode) /*设置SVGA屏幕模式*/
{
union REGS r;
r.x.ax=0x4f02;
r.x.bx=vmode;
int86(0x10,&r,&r);
return(r.h.ah);
}
unsigned int get_SVGA_mode() /*获取当前SVGA屏幕模式*/
{
union REGS r;
.