/-----------------------------------------------------------------
// 名称:射击训练游戏
//-----------------------------------------------------------------
// 说明:程序启动时液晶屏显示游戏封面,然后显示游戏区,默认弹药为20发,
// K1,K2键用于向上或向下移动枪支,跟踪目标,K3用于发射并模拟枪声,
// 在每次发射时,如果击中则加1分,在击中后如果目标物体尚未移动时,
// 程序不重复加分.弹药用完后可按下K4重新开始.
//-----------------------------------------------------------------
#define F_CPU 4000000UL
#include <avr/io.h>
#include <avr/pgmspace.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include <stdio.h>
#include <stdlib.h>
#include "PG160128.h"
#include "PictureDots.h"
#define INT8U unsigned char
#define INT16U unsigned int
//LCD显示相关函数及相关变量
//按键定义
//蜂鸣器
INT8U HCount = 0,LCount = 0; //控制模拟枪声的延时变量
INT8U Score = 0, Bullet_Count = 20; //得分,剩余弹药数
INT8U Target_x = 0, Target_y = 0; //目标物体位置
INT8U Pre_Target_y = 0; //目标物体上次所在纵坐标位置
INT8U gun_y = 20; //枪支纵坐标(其中横坐标固定为16*8)
//-----------------------------------------------------------------
// 显示成绩与剩余弹药数
//-----------------------------------------------------------------
void Show_Score_and_Bullet()
{
}
//-----------------------------------------------------------------
// 键盘中断(INT1)
//-----------------------------------------------------------------
ISR (INT1_vect)
{
//-----------------------------------------------------------------
// 名称: PG12864LCD显示驱动程序(T6963C) (不带字库)
//-----------------------------------------------------------------
#include <avr/io.h>
#include <avr/pgmspace.h>
#include <util/delay.h>
#include <string.h>
#include <math.h>
#include <string.h>
#include "PG160128.h"
#define INT8U unsigned char
#define INT16U unsigned int
//-----------------------------------------------------------------
// 变更LCD与MCU的连接时,
// 只需要修改以下数据端口,控制端口及控制引脚定义
//-----------------------------------------------------------------
//LCD数据端口
//LCD控制端口
//LCD控制引脚定义(读,写,命令/数据寄存选择)
//-----------------------------------------------------------------
//LCD控制引脚相关操作
//ASCII字模宽度及高度定义
const INT8U LCD_WIDTH = 20; //宽160像素(160/8 = 20个字节)
const INT8U LCD_HEIGHT = 128; //高128像素
//下面的英文,数字,标点符号等字符点阵存放于程序Flash空间中
//使用时要用pgm_read_byte(INT8U*)函数读取,该函数在avr/pgmspace.h中申明
//本例使用的图像点阵也存放于Flash中.
prog_uchar ASC_MSK[96 * 12] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,// < 0x20时
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// ' '
0x00,0x30,0x78,0x78,0x78,0x30,0x30,0x00,0x30,0x30,0x00,0x00,// '!'
0x00,0x66,0x66,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// '"'
0x00,0x6c,0x6c,0xfe,0x6c,0x6c,0x6c,0xfe,0x6c,0x6c,0x00,0x00,// '#'
0x30,0x30,0x7c,0xc0,0xc0,0x78,0x0c,0x0c,0xf8,0x30,0x30,0x00,// '$'
0x00,0x00,0x00,0xc4,0xcc,0x18,0x30,0x60,0xcc,0x8c,0x00,0x00,// '%'
0x00,0x70,0xd8,0xd8,0x70,0xfa,0xde,0xcc,0xdc,0x76,0x00,0x00,// '&'
0x00,0x30,0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// '''
0x00,0x0c,0x18,0x30,0x60,0x60,0x60,0x30,0x18,0x0c,0x00,0x00,// '('
0x00,0x60,0x30,0x18,0x0c,0x0c,0x0c,0x18,0x30,0x60,0x00,0x00,// ')'
0x00,0x00,0x00,0x66,0x3c,0xff,0x3c,0x66,0x00,0x00,0x00,0x00,// '*'
0x00,0x00,0x00,0x18,0x18,0x7e,0x18,0x18,0x00,0x00,0x00,0x00,// '+'
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x38,0x60,0x00,// ','
0x00,0x00,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,// '-'
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x38,0x00,0x00,// '.'
0x00,0x00,0x02,0x06,0x0c,0x18,0x30,0x60,0xc0,0x80,0x00,0x00,// '/'
0x00,0x7c,0xc6,0xce,0xde,0xd6,0xf6,0xe6,0xc6,0x7c,0x00,0x00,// '0'
0x00,0x10,0x30,0xf0,0x30,0x30,0x30,0x30,0x30,0xfc,0x00,0x00,// '1'
0x00,0x78,0xcc,0xcc,0x0c,0x18,0x30,0x60,0xcc,0xfc,0x00,0x00,// '2'
0x00,0x78,0xcc,0x0c,0x0c,0x38,0x0c,0x0c,0xcc,0x78,0x00,0x00,// '3'
0x00,0x0c,0x1c,0x3c,0x6c,0xcc,0xfe,0x0c,0x0c,0x1e,0x00,0x00,// '4'
0x00,0xfc,0xc0,0xc0,0xc0,0xf8,0x0c,0x0c,0xcc,0x78,0x00,0x00,// '5'
0x00,0x38,0x60,0xc0,0xc0,0xf8,0xcc,0xcc,0xcc,0x78,0x00,0x00,// '6'
0x00,0xfe,0xc6,0xc6,0x06,0x0c,0x18,0x30,0x30,0x30,0x00,0x00,// '7'
0x00,0x78,0xcc,0xcc,0xec,0x78,0xdc,0xcc,0xcc,0x78,0x00,0x00,// '8'
0x00,0x78,0xcc,0xcc,0xcc,0x7c,0x18,0x18,0x30,0x70,0x00,0x00,// '9'
0x00,0x00,0x00,0x38,0x38,0x00,0x00,0x38,0x38,0x00,0x00,0x00,// ':'
0x00,0x00,0x00,0x38,0x38,0x00,0x00,0x38,0x38,0x18,0x30,0x00,// ';'
0x00,0x0c,0x18,0x30,0x60,0xc0,0x60,0x30,0x18,0x0c,0x00,0x00,// '<'
0x00,0x00,0x00,0x00,0x7e,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,// '='
0x00,0x60,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x60,0x00,0x00,// '>'
0x00,0x78,0xcc,0x0c,0x18,0x30,0x30,0x00,0x30,0x30,0x00,0x00,// '?'
0x00,0x7c,0xc6,0xc6,0xde,0xde,0xde,0xc0,0xc0,0x7c,0x00,0x00,// '@'
0x00,0x30,0x78,0xcc,0xcc,0xcc,0xfc,0xcc,0xcc,0xcc,0x00,0x00,// 'A'
0x00,0xfc,0x66,0x66,0x66,0x7c,0x66,0x66,0x66,0xfc,0x00,0x00,// 'B'
0x00,0x3c,0x66,0xc6,0xc0,0xc0,0xc0,0xc6,0x66,0x3c,0x00,0x00,// 'C'
0x00,0xf8,0x6c,0x66,0x66,0x66,0x66,0x66,0x6c,0xf8,0x00,0x00,// 'D'
0x00,0xfe,0x62,0x60,0x64,0x7c,0x64,0x60,0x62,0xfe,0x00,0x00,// 'E'
0x00,0xfe,0x66,0x62,0x64,0x7c,0x64,0x60,0x60,0xf0,0x00,0x00,// 'F'
0x00,0x3c,0x66,0xc6,0xc0,0xc0,0xce,0xc6,0x66,0x3e,0x00,0x00,// 'G'
0x00,0xcc,0xcc,0xcc,0xcc,0xfc,0xcc,0xcc,0xcc,0xcc,0x00,0x00,// 'H'
0x00,0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x78,0x00,0x00,// 'I'
0x00,0x1e,0x0c,0x0c,0x0c,0x0c,0xcc,0xcc,0xcc,0x78,0x00,0x00,// 'J'
0x00,0xe6,0x66,0x6c,0x6c,0x78,0x6c,0x6c,0x66,0xe6,0x00,0x00,// 'K'
0x00,0xf0,0x60,0x60,0x60,0x60,0x62,0x66,0x66,0xfe,0x00,0x00,// 'L'
0x00,0xc6,0xee,0xfe,0xfe,0xd6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,// 'M'
0x00,0xc6,0xc6,0xe6,0xf6,0xfe,0xde,0xce,0xc6,0xc6,0x00,0x00,// 'N'
0x00,0x38,0x6c,0xc6,0xc6,0xc6,0xc6,0xc6,0x6c,0x38,0x00,0x00,// 'O'
0x00,0xfc,0x66,0x66,0x66,0x7c,0x60,0x60,0x60,0xf0,0x00,0x00,// 'P'
0x00,0x38,0x6c,0xc6,0xc6,0xc6,0xce,0xde,0x7c,0x0c,0x1e,0x00,// 'Q'
0x00,0xfc,0x66,0x66,0x66,0x7c,0x6c,0x66,0x66,0xe6,0x00,0x00,// 'R'
0x00,0x78,0xcc,0xcc,0xc0,0x70,0x18,0xcc,0xcc,0x78,0x00,0x00,// 'S'
0x00,0xfc,0xb4,0x30,0x30,0x30,0x30,0x30,0x30,0x78,0x00,0x00,// 'T'
0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x78,0x00,0x00,// 'U'
0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x78,0x30,0x00,0x00,// 'V'
0x00,0xc6,0xc6,0xc6,0xc6,0xd6,0xd6,0x6c,0x6c,0x6c,0x00,0x00,// 'W'
0x00,0xcc,0xcc,0xcc,0x78,0x30,0x78,0xcc,0xcc,0xcc,0x00,0x00,// 'X'
0x00,0xcc,0xcc,0xcc,0xcc,0x78,0x30,0x30,0x30,0x78,0x00,0x00,// 'Y'
0x00,0xfe,0xce,0x98,0x18,0x30,0x60,0x62,0xc6,0xfe,0x00,0x00,// 'Z'
0x00,0x3c,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3c,0x00,0x00,// '['
0x00,0x00,0x80,0xc0,0x60,0x30,0x18,0x0c,0x06,0x02,0x00,0x00,// '\'
0x00,0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c,0x00,0x00,// ']'
0x10,0x38,0x6c,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// '^'
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,// '_'
0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// '`'
0x00,0x00,0x00,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0x76,0x00,0x00,// 'a'
0x00,0xe0,0x60,0x60,0x7c,0x66,0x66,0x66,0x66,0xdc,0x00,0x00,// 'b'
0x00,0x00,0x00,0x00,0x78,0xcc,0xc0,0xc0,0xcc,0x78,0x00,0x00,// 'c'
0x00,0x1c,0x0c,0x0c,0x7c,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,// 'd'
0x00,0x00,0x00,0x00,0x78,0xcc,0xfc,0xc0,0xcc,0x78,0x00,0x00,// 'e'
0x00,0x38,0x6c,0x60,0x60,0xf8,0x60,0x60,0x60,0xf0,0x00,0x00,// 'f'
0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0x7c,0x0c,0xcc,0x78,// 'g'
0x00,0xe0,0x60,0x60,0x6c,0x76,0x66,0x66,0x66,0xe6,0x00,0x00,// 'h'
0x00,0x18,0x18,0x00,0x78,0x18,0x18,0x18,0x18,0x7e,0x00,0x00,// 'i'
0x00,0x0c,0x0c,0x00,0x3c,0x0c,0x0c,0x0c,0x0c,0xcc,0xcc,0x78,// 'j'
0x00,0xe0,0x60,0x60,0x66,0x6c,0x78,0x6c,0x66,0xe6,0x00,0x00,// 'k'
0x00,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x7e,0x00,0x00,// 'l'
0x00,0x00,0x00,0x00,0xfc,0xd6,0xd6,0xd6,0xd6,0xc6,0x00,0x00,// 'm'
0x00,0x00,0x00,0x00,0xf8,0xcc,0xcc,0xcc,0xcc,0xcc,0x00,0x00,// 'n'
0x00,0x00,0x00,0x00,0x78,0xcc,0xcc,0xcc,0xcc,0x78,0x00,0x00,// 'o'
0x00,0x00,0x00,0x00,0xdc,0x66,0x66,0x66,0x66,0x7c,0x60,0xf0,// 'p'
0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0x7c,0x0c,0x1e,// 'q'
0x00,0x00,0x00,0x00,0xec,0x6e,0x76,0x60,0x60,0xf0,0x00,0x00,// 'r'
0x00,0x00,0x00,0x00,0x78,0xcc,0x60,0x18,0xcc,0x78,0x00,0x00,// 's'
0x00,0x00,0x20,0x60,0xfc,0x60,0x60,0x60,0x6c,0x38,0x00,0x00,// 't'
0x00,0x00,0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,// 'u'
0x00,0x00,0x00,0x00,0xcc,0xcc,0xcc,0xcc,0x78,0x30,0x00,0x00,// 'v'
0x00,0x00,0x00,0x00,0xc6,0xc6,0xd6,0xd6,0x6c,0x6c,0x00,0x00,// 'w'
0x00,0x00,0x00,0x00,0xc6,0x6c,0x38,0x38,0x6c,0xc6,0x00,0x00,// 'x'
0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x3c,0x0c,0x18,0xf0,// 'y'
0x00,0x00,0x00,0x00,0xfc,0x8c,0x18,0x60,0xc4,0xfc,0x00,0x00,// 'z'
0x00,0x1c,0x30,0x30,0x60,0xc0,0x60,0x30,0x30,0x1c,0x00,0x00,// '{'
0x00,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x00,0x00,// '|'
0x00,0xe0,0x30,0x30,0x18,0x0c,0x18,0x30,0x30,0xe0,0x00,0x00,// '}'
0x00,0x73,0xda,0xce,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// '~'
};
struct typFNT_GB16 //汉字字模数据结构
{
INT8U Index[2]; //汉字内码,2字节
INT8U Msk[24]; //汉字点阵
};
//本例汉字点阵库
const struct typFNT_GB16 GB_16[] = { //12*12点阵,宋体小五号,用Zimo软件取得点阵
{{"得"},{0x27,0xC0,0x24,0x40,0x57,0xC0,0x94,0x40,0x27,0xC0,0x60,0x00,
0xAF,0xE0,0x20,0x80,0x2F,0xE0,0x24,0x80,0x21,0x80,0x00,0x00}},
{{"分"},{0x11,0x00,0x11,0x00,0x20,0x80,0x20,0x80,0x40,0x40,0xBF,0xA0,
0x08,0x80,0x08,0x80,0x10,0x80,0x20,0x80,0xC7,0x00,0x00,0x00}},
{{":"},{0x00,0x00,0x00,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
{{"★"},{0x04,0x00,0x04,0x00,0x0E,0x00,0x0E,0x00,0xFF,0xE0,0x7F,0xC0,
0x1F,0x00,0x1F,0x00,0x3B,0x80,0x20,0x80,0x40,0x40,0x00,0x00}},
{{"■"},{0x00,0x00,0x7F,0xC0,0x7F,0xC0,0x7F,0xC0,0x7F,0xC0,0x7F,0xC0,
0x7F,0xC0,0x7F,0xC0,0x7F,0xC0,0x7F,0xC0,0x00,0x00,0x00,0x00}},
};
INT8U gCurRow,gCurCol; //当前行,列
//-----------------------------------------------------------------
// LCD控制相关函数
//-----------------------------------------------------------------
INT8U Status_BIT_01(); //状态位STA1,STA0判断(读写指令和读写数据)
INT8U Status_BIT_3(); //状态位ST3判断(数据自动写状态)
INT8U LCD_Write_Command(INT8U cmd); //写无参数的指令
INT8U LCD_Write_Command_P1(INT8U cmd,INT8U para1); //写单参数的指令
INT8U LCD_Write_Command_P2(INT8U cmd,INT8U para1,INT8U para2); //写双参数的指令
INT8U LCD_Write_Data(INT8U dat); //写数据
INT8U LCD_Read_Data(); //读数据
void Clear_Screen(); //清屏
char LCD_Initialise(); //LCD初始化
void Set_LCD_POS(INT8U row, INT8U col); //设置当前地址
void OutToLCD(INT8U Dat,INT8U x,INT8U y); //显示辅助函数
void Line(INT8U x1, INT8U y1, INT8U x2, INT8U y2, INT8U Mode); //绘制直线
void Pixel(INT8U x,INT8U y, INT8U Mode); //绘点
//-----------------------------------------------------------------
// 读状态
//-----------------------------------------------------------------
INT8U Read_LCD_Status()
{
}
//-----------------------------------------------------------------
// 读数据
//-----------------------------------------------------------------
INT8U Read_LCD_Data()
{
}
//-----------------------------------------------------------------
// 写数据
//-----------------------------------------------------------------
void Write_Data(INT8U dat)
{
}
//-----------------------------------------------------------------
// 写命令
//-----------------------------------------------------------------
void Write_Command(INT8U cmd)
{
}
//-----------------------------------------------------------------
// 状态位STA1,STA0判断(读写指令和读写数据)
//-----------------------------------------------------------------
INT8U Status_BIT_01()
{
}
//-----------------------------------------------------------------
// 状态位ST3判断(数据自动写状态)
//-----------------------------------------------------------------
INT8U Status_BIT_3()
{
}
//-----------------------------------------------------------------
// 写双参数的指令
//-----------------------------------------------------------------
INT8U LCD_Write_Command_P2(INT8U cmd,INT8U para1,INT8U para2)
{
}
//-----------------------------------------------------------------
// 写单参数的指令
//-----------------------------------------------------------------
INT8U LCD_Write_Command_P1(INT8U cmd,INT8U para1)
{
}
//-----------------------------------------------------------------
// 写无参数的指令
//-----------------------------------------------------------------
INT8U LCD_Write_Command(INT8U cmd)
{
}
//-----------------------------------------------------------------
// 写数据
//-----------------------------------------------------------------
INT8U LCD_Write_Data(INT8U dat)
{
}
//-----------------------------------------------------------------
// 读数据
//-----------------------------------------------------------------
INT8U LCD_Read_Data()
{
}
//-----------------------------------------------------------------
// 设置当前地址
//-----------------------------------------------------------------
void Set_LCD_POS(INT8U row, INT8U col)
{
}
//-----------------------------------------------------------------
// 清屏
//-----------------------------------------------------------------
void Clear_Screen()
{
}
//-----------------------------------------------------------------
// LCM 初始化
//-----------------------------------------------------------------
char LCD_Initialise()
{
}
//-----------------------------------------------------------------
// ASCII及汉字显示(wb表示是否反白显示)
//-----------------------------------------------------------------
void Display_Str_at_xy(INT8U x,INT8U y,char* Buffer,INT8U wb)
{
}
//-----------------------------------------------------------------
// 输出起点x不是8的倍数时,原字节分成两部分输出到LCD
//-----------------------------------------------------------------
void OutToLCD(INT8U Dat,INT8U x,INT8U y)
{
}
//-----------------------------------------------------------------
// 绘点函数
// 参数:点的坐标,模式1/0分别为显示与清除点
//-----------------------------------------------------------------
void Pixel(INT8U x,INT8U y, INT8U Mode)
{
}
//-----------------------------------------------------------------
// 两数交换
//-----------------------------------------------------------------
void Exchange(INT8U *a, INT8U *b)
{
}
//-----------------------------------------------------------------
// 绘制直线函数
// 参数:起点与终点坐标,模式为显示(1)或清除(0),点阵不超过255*255)
//-----------------------------------------------------------------
void Line(INT8U x1,INT8U y1, INT8U x2,INT8U y2, INT8U Mode)
{
}
//-----------------------------------------------------------------
// 绘制图像(图像数据来自于Flash程序ROM空间)
//-----------------------------------------------------------------
void Draw_Image(prog_uchar *G_Buffer, INT8U Start_Row, INT8U Start_Col)
{
}
/ 名称: PG12864LCD显示驱动程序头文件
//-----------------------------------------------------------------
#include <stdio.h>
#include <math.h>
#include <string.h>
#define STX 0x02
#define ETX 0x03
#define EOT 0x04
#define ENQ 0x05
#define BS 0x08
#define CR 0x0D
#define LF 0x0A
#define DLE 0x10
#define ETB 0x17
#define SPACE 0x20
#define COMMA 0x2C
#define TRUE 1
#define FALSE 0
#define HIGH 1
#define LOW 0
//T6963C 命令定义
#define LC_CUR_POS 0x21 //光标位置设置
#define LC_CGR_POS 0x22 //CGRAM偏置地址设置
#define LC_ADD_POS 0x24 //地址指针位置
#define LC_TXT_STP 0x40 //文本区首址
#define LC_TXT_WID 0x41 //文本区宽度
#define LC_GRH_STP 0x42 //图形区首址
#define LC_GRH_WID 0x43 //图形区宽度
#define LC_MOD_OR 0x80 //显示方式:逻辑或
#define LC_MOD_XOR 0x81 //显示方式:逻辑异或
#define LC_MOD_AND 0x82 //显示方式:逻辑与
#define LC_MOD_TCH 0x83 //显示方式:文本特征
#define LC_DIS_SW 0x90 //显示开关:
//D0=1/0:光标闪烁启用/禁用;
//D1=1/0:光标显示启用/禁用;
//D2=1/0:文本显示启用/禁用;
//D3=1/0:图形显示启用/禁用;
#define LC_CUR_SHP 0xA0 //光标形状选择:0xA0-0xA7表示光标占的行数
#define LC_AUT_WR 0xB0 //自动写设置
#define LC_AUT_RD 0xB1 //自动读设置
#define LC_AUT_OVR 0xB2 //自动读/写结束
#define LC_INC_WR 0xC0 //数据写,地址加1
#define LC_INC_RD 0xC1 //数据读,地址加1
#define LC_DEC_WR 0xC2 //数据写,地址减1
#define LC_DEC_RD 0xC3 //数据读,地址减1
#define LC_NOC_WR 0xC4 //数据写,地址不变
#define LC_NOC_RD 0xC5 //数据读,地址不变
#define LC_SCN_RD 0xE0 //读屏屏
#define LC_SCN_CP 0xE8 //屏幕拷贝
#define LC_BIT_OP 0xF0 //位操作:D0-D2:定义D0-D7位;D3:1置位;0:清除
/ 游戏封面数据存放于Flash程序空间
//-----------------------------------------------------------------
prog_uchar Game_Surface[] = { 160,110, //游戏封面:160x110
};
//-----------------------------------------------------------------
// 枪支图像数据存放于Flash程序空间
//-----------------------------------------------------------------
prog_uchar Gun_Image[] = { 24,12, //枪支图像,W/H:24*12
0x03,0x00,0x00,0x07,0x80,0x00,0x07,0x80,0x00,0x7F,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFC,0x7F,0xFF,0xFC,0x00,0x01,0xFC,0x00,0x01,0xFC,0x00,0x00,0x7F,0x00,0x00,
0x7F,0x00,0x00,0x1F
};
参考资料:片机C语言程序设计实训100例——基于8051+Proteus仿真 压缩包