9 static int ctrlscr_start(void);
10 static void ctrlscr_stop(void);
11 static void ctrlscr_frame(void);
12 static void ctrlscr_vblank(void);
14 static struct screen ctrlscr = {
22 struct screen *init_controls_screen(void)
27 static void setup_palette(void)
30 unsigned char *cmap = gba_colors ? controls_gba_cmap : controls_cmap;
32 for(i=0; i<256; i++) {
34 int g = cmap[i * 3 + 1];
35 int b = cmap[i * 3 + 2];
36 gba_bgpal[i] = RGB555(r, g, b);
40 static int ctrlscr_start(void)
42 gba_setmode(4, DISPCNT_BG2 | DISPCNT_OBJ);
43 dma_copy16(3, gba_vram_lfb0, controls_pixels, 240 * 160 / 2, 0);
49 static void ctrlscr_stop(void)
54 static void ctrlscr_frame(void)
58 if(KEYPRESS(BN_START) || KEYPRESS(BN_A) || KEYPRESS(BN_B)) {
59 change_screen(find_screen("menu"));
66 static void ctrlscr_vblank(void)