📄 grtry.h
字号:
/* 头函数全加上,您可能要实现一些其他的功能 */
#include <conio.h>
#include <dir.h>
#include <dos.h>
#include <fcntl.h>
#include <io.h>
#include <malloc.h>
#include <math.h>
#include <mem.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <time.h>
/*============================== 几种图形模式宏 ================================*/
#define TRY320X200X256 0X013
#define TRY640X480X256 0X101
#define TRY800X600X256 0X103
#define TRY1024X768X256 0X105
typedef struct tagRGBQUAD /* 用于读取调色板信息 */
{
UINT8 r;
UINT8 g;
UINT8 b;
UINT8 reserved;
} RGBQUAD;
static UINT8 far *VideoBuffer = (UINT8 far *)0xA0000000; /* 定义画点函数的远指针 */
static INT16 COLS, ROWS; /* 记录当前图形模式分辨率 */
static INT16 OldSMode; /* 纪录原始模式 */
static UINT8 SetSVGAPaletteKey = 0; /* 标记是否已经设置过调色板 */
static UINT8 OldPage = 0; /* 记录上一显存页编号 */
void InitSVGA(); /* 图形初始化 */
void ExitSVGA(); /* 回到原来模式 */
void SetSVGAMode(INT16 vmode); /* 设置图形模式 */
INT16 GetSVGAMode(); /* 获取当前模式 */
void Dot(INT16 x, INT16 y, UINT8 color); /* 画点函数 */
void SelectPage(register UINT8 page); /* 换页函数 */
void Line(INT16 x0, INT16 y0, INT16 x1, INT16 y1, UINT8 color); /* 画线函数 */
void Rect(INT16 x0, INT16 y0, INT16 x1, INT16 y1, UINT8 color); /* 画矩形函数 */
void Rectfill(INT16 x0, INT16 y0, INT16 x1, INT16 y1, UINT8 color); /* 画矩形块函数 */
void Circle(INT16 x, INT16 y, UINT16 r, UINT8 color); /* 画圆函数 */
void Circlefill(INT16 x1, INT16 y1, UINT16 r, UINT8 color); /* 画实心圆函数 */
UINT8 SetSVGAPalette(INT8 *FillName); /* 设置调色板 */
void ShowBmp(INT8 *FillName, INT16 X, INT16 Y); /* 显示位图函数 */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -