⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fivechess.h

📁 在ARM7 44B0上开发的一个能下五子棋的程序 ADS1.2版本
💻 H
字号:
#include "option.h"
#include "44b.h"
#include "44blib.h"
#include "def.h"
#include "cache.h"
#include "44blcd.h"
#include <string.h>

#define ChessLen 11 //棋盘大小
#define ChessWid 11
#define ChessR 6 //棋子半径
#define WinNum 5

#define FCOLOR 0xA3  //前景色
#define BGCOLOR 0xFE //背景色

#define COLOR1 0xAA
#define COLOR2 0xF0
#define COLOR3 0xFE

unsigned int ChessBG[ChessLen][ChessWid];//positon=(10+i*20,220-j*20)
unsigned int Player;
unsigned int x,y;//current position

void Isr_Init(void);
void HaltUndef(void);
void HaltSwi(void);
void HaltPabort(void);      
void HaltDabort(void);
void Test_Kb(void);

void InitVarible(void);
void InitScreen(void);//初始化屏幕
void DrawChess(U32 x,U32 y,U8 c);
void DrawChessBG(void);
void KeyAction(U32 key);
void DrawCurrentPlayer(U32 p);
unsigned int IsWin(unsigned int p);
void DrawWinner();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -