📄 gba编程初解(三).txt
字号:
GBA编程初解(三)
作者:乐水 文章来源:掌机之王 更新时间:2004-1-22
原著:乐水
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned long u32;
typedef struct BITMAP
{
int x,y,w,h;
u16 MskCol;
float bitx,bity;
u8 flag;
u16 *dat;
}BITMAP;
BITMAP screen;
u16 *palette_mem = (u16 *)PALETTE;
void grp_init()
{
SetMode(MODE_4|BG2_ENABLE);
screen.w=240;
screen.h=160;
screen.dat=(u16 *)VRAM;
}
这样我们就进入了240*160*256的模式了, SetMode中的BG2_ENABLE这个参数不能少否则将没有任何显示。为了能够正常的显示图象还需要设置调色板。
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -