coarse 16bpp version works
[gbajam22] / src / gamescr.c
index 2d283d8..9686456 100644 (file)
@@ -17,7 +17,6 @@
 static int gamescr_start(void);
 static void gamescr_stop(void);
 static void gamescr_frame(void);
-static void gamescr_vblank(void);
 
 static void update(void);
 static void draw(void);
@@ -27,7 +26,7 @@ static struct screen gamescr = {
        gamescr_start,
        gamescr_stop,
        gamescr_frame,
-       gamescr_vblank
+       0
 };
 
 static int nframes, num_vbl, backbuf;
@@ -36,8 +35,8 @@ static uint16_t *vram[] = { gba_vram_lfb0, gba_vram_lfb1 };
 static int32_t pos[2], angle;
 static struct voxscape *vox;
 
-#define COLOR_HORIZON  192
-#define COLOR_ZENITH   255
+#define COLOR_HORIZON  0x7dd9
+#define COLOR_ZENITH   0x662a
 
 
 
@@ -48,8 +47,6 @@ struct screen *init_game_screen(void)
 
 static int gamescr_start(void)
 {
-       int i;
-
        gba_setmode(5, DISPCNT_BG2 | DISPCNT_OBJ | DISPCNT_FB1);
 
        vblperf_setcolor(0);
@@ -88,11 +85,15 @@ static void gamescr_frame(void)
        if(!(nframes & 15)) {
                emuprint("vbl: %d", vblperf_count);
        }
+#ifdef VBLBAR
        vblperf_begin();
+#else
+       vblperf_count = 0;
+#endif
 }
 
 #define WALK_SPEED     0x40000
-#define TURN_SPEED     0x100
+#define TURN_SPEED     0x200
 
 static void update(void)
 {
@@ -133,12 +134,6 @@ static void update(void)
 static void draw(void)
 {
        vox_render(vox);
-       //vox_sky_grad(vox, COLOR_HORIZON, COLOR_ZENITH);
-       vox_sky_solid(vox, COLOR_ZENITH);
-}
-
-ARM_IWRAM
-static void gamescr_vblank(void)
-{
-       num_vbl++;
+       vox_sky_grad(vox, COLOR_HORIZON, COLOR_ZENITH);
+       //vox_sky_solid(vox, COLOR_ZENITH);
 }