{
int i;
- gba_setmode(4, DISPCNT_BG2 | DISPCNT_OBJ | DISPCNT_FB1);
+ gba_setmode(5, DISPCNT_BG2 | DISPCNT_OBJ | DISPCNT_FB1);
vblperf_setcolor(0);
}
vox_proj(vox, 45, 2, VOX_SZ / 5);
- /* setup color image palette */
- for(i=0; i<192; i++) {
- int r = color_cmap[i * 3];
- int g = color_cmap[i * 3 + 1];
- int b = color_cmap[i * 3 + 2];
- gba_bgpal[i] = (((uint16_t)b << 7) & 0x7c00) | (((uint16_t)g << 2) & 0x3e0) | (((uint16_t)r >> 3) & 0x1f);
- }
-
- /* setup sky gradient palette */
- for(i=0; i<64; i++) {
- int t = (i << 8) / 64;
- int r = (0xcc00 + (0x55 - 0xcc) * t) >> 8;
- int g = (0x7700 + (0x88 - 0x77) * t) >> 8;
- int b = (0xff00 + (0xcc - 0xff) * t) >> 8;
- int cidx = COLOR_HORIZON + i;
- gba_bgpal[cidx] = ((b << 7) & 0x7c00) | ((g << 2) & 0x3e0) | (r >> 3);
- }
-
nframes = 0;
return 0;
}
backbuf = ++nframes & 1;
fb = (unsigned char*)vram[backbuf];
- vox_framebuf(vox, 240, 160, fb, -1);
+ vox_framebuf(vox, 160, 128, fb, -1);
update();
draw();