原著:乐水 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这个参数不能少否则将没有任何显示。为了能够正常的显示图象还需要设置调色板。 |



