#include <conio.h>
#include <graphics.h>
#include <stdlib.h>
#include <dos.h>
#define LEFT 0x4b00
#define RIGHT 0x4d00
#define UP 0x4800
#define BANK 14624
#define ESC 0x011b
#define closegr closegraph
/* 【自学去】网站收集 http://www.zixue7.com */
/*设定初始化开关参数*/
int tankstart=0,planstart=0;
int first=1;
/*******************************************************************************
** 函数名称:drawmat
** 函数描述:依次:字模指针、点阵大小、起始坐标(x,y)、颜色
** 输入参数:*mat,matsize,x,y,color
** 输出参数:无
*******************************************************************************/
void drawmat(char *mat,int matsize,int x,int y,int color)
/*依次:字模指针、点阵大小、起始坐标(x,y)、颜色*/
{
int i, j, k, n;
n = (matsize - 1) / 8 + 1;
for(j = 0; j < matsize; j++)
for(i = 0; i < n; i++)
for(k = 0;k < 8; k++)
if(mat[j * n + i] & (0x80 >> k)) /*测试为1的位则显示*/
putpixel(x + i * 8 + k, y + j, color);
}
/*以下是字库*/
char di64H[]={
/* 以下是 '地' 的 64点阵华文行楷 字模,512 byte */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0x00,0x18,0x00,0x00,0x7F,0x00,0x00,0x00,
0x00,0x3F,0x00,0x00,0x7F,0x00,0x00,0x00,
0x00,0x1F,0x80,0x00,0x7F,0x00,0x00,0x00,
0x00,0x0F,0xE0,0x00,0x1F,0x00,0x00,0x00,
0x00,0x0F,0xE0,0x00,0x1E,0x1E,0x00,0x00,
0x00,0x07,0xF0,0x00,0x1E,0x7F,0x80,0x00,
0x00,0x07,0xF0,0x00,0x1C,0xFF,0xC0,0x00,
0x00,0x07,0xF0,0x00,0x1F,0xC7,0xE0,0x00,
0x00,0x07,0xF0,0x00,0x1F,0x87,0xF0,0x00,
0x00,0x07,0xFE,0x00,0x1F,0x07,0xF0,0x00,
0x00,0x07,0xFE,0x08,0x1E,0x07,0xE0,0x00,
0x00,0x07,0xFE,0x3C,0x3C,0x07,0xE0,0x00,
0x00,0x0F,0xFE,0x3C,0x7C,0x0F,0xC0,0x00,
0x00,0x1F,0xFE,0x3F,0xFC,0x0F,0xC0,0x00,
0x00,0x7F,0xF8,0x3F,0xFC,0x0F,0xC0,0x00,
0x00,0xFF,0xE0,0x1F,0xFC,0x1F,0x80,0x00,
0x03,0xFF,0xE0,0x1F,0xFC,0x1F,0x80,0x00,
0x0F,0xFF,0xE0,0x1F,0xBC,0x3F,0x00,0x00,
0x07,0xFF,0xE0,0x3F,0x3C,0x3F,0x00,0x00,
0x03,0xFF,0xE0,0x7E,0x3C,0x7F,0x00,0x00,
0x01,0xFF,0xE0,0xFE,0x38,0x7E,0x00,0x00,
0x00,0xFF,0xE1,0xFF,0x3F,0xFE,0x00,0x00,
0x00,0x0F,0xE3,0xF8,0xFF,0xFC,0x00,0x00,
0x00,0x0F,0xFE,0x30,0xFF,0xFC,0x00,0x00,
0x00,0x0F,0xFC,0x30,0x78,0xF8,0x00,0x00,
0x00,0x0F,0xFC,0x70,0x70,0xF0,0x00,0x08,
0x00,0x0F,0xF8,0x70,0x30,0x60,0x00,0x08,
0x00,0x0F,0xF8,0x70,0x30,0x00,0x00,0x18,
0x00,0x3F,0xF0,0x30,0x00,0x00,0x00,0x38,
0x00,0x7F,0xE0,0x30,0x00,0x00,0x00,0x7C,
0x01,0xFF,0x80,0x30,0x00,0x00,0x01,0xFC,
0x03,0xFF,0x00,0x38,0x00,0x00,0x07,0xFC,
0x07,0xFE,0x00,0x1F,0x00,0x00,0xFF,0xFC,
0x03,0xF8,0x00,0x0F,0xFF,0xFF,0xFF,0xFC,
0x01,0xF0,0x00,0x07,0xFF,0xFF,0xFF,0xF8,
0x00,0xE0,0x00,0x01,0xFF,0xFF,0xFF,0xC0,
0x00,0x40,0x00,0x00,0x3F,0xFF,0xE0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
char kong64H[]={
/* 以下是 '空' 的 64点阵华文行楷 字模,512 byte */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x1F,0x80,0x00,0x00,0x00,
0x00,0x00,0x00,0x0F,0x80,0x00,0x00,0x00,
0x00,0x00,0x00,0x0F,0xC0,0x00,0x00,0x00,
0x00,0x00,0x00,0x07,0xC0,0x00,0x00,0x00,
0x00,0x00,0x00,0x07,0xC0,0x7F,0xC0,0x00,
0x00,0x02,0x00,0x07,0xFF,0xFF,0xE0,0x00,
0x00,0x03,0x00,0x1F,0xFF,0xFF,0xF0,0x00,
0x00,0x03,0x03,0xFF,0xFE,0x00,0xF8,0x00,
0x00,0x03,0x3F,0xFF,0x80,0x01,0xF8,0x00,
0x00,0x03,0xFF,0xF8,0x00,0x03,0xFC,0x00,
0x00,0x03,0xFF,0xC0,0x20,0x07,0xFE,0x00,
0x00,0x07,0x81,0x00,0x78,0x1F,0xFC,0x00,
0x00,0x07,0x81,0x00,0x7C,0xFF,0xFC,0x00,
0x00,0x0F,0x01,0xC0,0x3F,0xFF,0xF8,0x00,
0x00,0x1F,0x01,0xE0,0x3E,0x3F,0x00,0x00,
0x00,0x3F,0x00,0xE0,0x3E,0x00,0x00,0x00,
0x00,0x3E,0x00,0xF0,0x3E,0x00,0x00,0x00,
0x00,0x3E,0x00,0xF0,0x3C,0x00,0x00,0x00,
0x00,0x3E,0x01,0xF8,0x3C,0x00,0x00,0x00,
0x00,0x3C,0x01,0xF0,0x3F,0x80,0x00,0x00,
0x00,0x3C,0x03,0xF0,0x3F,0xC0,0x00,0x00,
0x00,0x38,0x0F,0xE0,0x1F,0xE0,0x00,0x00,
0x00,0x38,0x1F,0xC0,0x1F,0xF0,0x00,0x00,
0x00,0x10,0x3F,0x80,0x0F,0xF0,0x00,0x00,
0x00,0x00,0x3F,0x00,0x0F,0xE0,0x00,0x00,
0x00,0x00,0x3E,0x00,0x1F,0x80,0x00,0x00,
0x00,0x00,0x3C,0x00,0x3C,0x00,0x00,0x00,
0x00,0x00,0x30,0x00,0xF0,0x00,0x00,0x00,
0x00,0x00,0x00,0x01,0xC0,0x00,0x00,0x00,
0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x1C,0x18,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x7E,0x00,0x00,0x00,
0x00,0x00,0x00,0x81,0xFF,0x00,0x00,0x00,
0x00,0x00,0x01,0xFF,0xFF,0x00,0x00,0x00,
0x00,0x00,0x01,0xFF,0xFF,0x00,0x00,0x00,
0x00,0x00,0x01,0xFF,0xFE,0x00,0x00,0x00,
0x00,0x00,0x01,0xFC,0xFC,0x00,0x00,0x00,
0x00,0x00,0x00,0x61,0xF8,0x00,0x00,0x00,
0x00,0x00,0x00,0x01,0xF0,0x00,0x00,0x00,
0x00,0x00,0x00,0x03,0xF0,0x00,0x00,0x00,
0x00,0x00,0x00,0x07,0xE0,0x00,0x00,0x00,
0x00,0x00,0x00,0x0F,0xC0,0xFC,0x00,0x00,
0x00,0x00,0x00,0x1F,0xFF,0xFF,0x00,0x00,
0x00,0x00,0x01,0xFF,0xFF,0xFF,0x80,0x00,
0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xC0,0x00,
0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xC0,0x00,
0x00,0x03,0xFF,0xFC,0x00,0x1F,0xE0,0x00,
0x00,0x01,0xFF,0x80,0x00,0x03,0xC0,0x00,
0x00,0x01,0xFC,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xE0,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
char dui64H[]={
/* 以下是 '对' 的 64点阵华文行楷 字模,512 byte */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x0E,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x07,0x80,0x00,
0x00,0x00,0x00,0x00,0x00,0x07,0x80,0x00,
0x00,0x00,0x00,0x00,0x00,0x07,0x80,0x00,
0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,
0x00,0x00,0x03,0xE0,0x00,0x07,0x00,0x00,
0x00,0x00,0x07,0xF0,0x00,0x07,0x0F,0x00,
0x00,0x00,0x1F,0xF8,0x00,0x07,0xFF,0x80,
0x00,0x00,0x7F,0xFC,0x00,0x07,0xFF,0xC0,
0x00,0x03,0xFF,0xFE,0x00,0x0F,0xFF,0xC0,
0x00,0x01,0xFF,0xFE,0x00,0x7F,0xFF,0xC0,
0x00,0x01,0xFF,0xFE,0x01,0xFF,0xFF,0x80,
0x00,0x00,0xFF,0xFC,0x07,0xFF,0xC0,0x00,
0x00,0x00,0x7F,0xFC,0x1F,0xFF,0x00,0x00,
0x00,0x00,0x1F,0xF8,0x7F,0xE7,0x00,0x00,
0x00,0x00,0x00,