map.h
来自「坦克大战,实现基本的游戏功能」· C头文件 代码 · 共 25 行
H
25 行
/*
map.h
地图操作相关的函数声明
最后修改: 2007-06-19
*/
#ifndef FILE_MAP_INCLUDED
#define FILE_MAP_INCLUDED
void SetMap(int nLX, int nLY, char byValue); /* 设地图值 */
char GetMap(int nLX, int nLY); /* 取地图值 */
char IsInMap(int nX, int nY); /* 物理点是否在地图内 */
char IsInMapL(int nLX, int nLY); /* 逻辑点是否在地图内 */
void DrawMapUnit(int nLX, int nLY, char byType); /* 画地图元素 */
void RestoreMapUnit(int nLX, int nLY); /* 还原地图元素 */
void ClearMapUnit(int nLX, int nLY); /* 清除地图元素 */
void DrawBase(); /* 画老家 */
void DrawMap(); /* 重绘整个地图 */
char ReadMap(char szPath[]); /* 从文件读取地图信息 */
char WriteMap(char szPath[]); /* 写地图信息到文件 */
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?