16bit LUT
[gbajam21] / src / gamescr.c
index 452709c..8d5f344 100644 (file)
@@ -80,10 +80,10 @@ void gamescr(void)
                present(backbuf);
 
                tunrot = nframes;
-               bgmat[0] = (COS(tunrot) * 280) >> 8;
-               bgmat[1] = (-SIN(tunrot) * 280) >> 8;
-               bgmat[2] = (SIN(tunrot) * 280) >> 8;
-               bgmat[3] = (COS(tunrot) * 280) >> 8;
+               bgmat[0] = (COS(tunrot) * 140) >> 8;
+               bgmat[1] = (-SIN(tunrot) * 140) >> 8;
+               bgmat[2] = (SIN(tunrot) * 140) >> 8;
+               bgmat[3] = (COS(tunrot) * 140) >> 8;
                bgx = (120 << 8) - bgmat[0] * 120 + bgmat[1] * -80;
                bgy = (80 << 8) - bgmat[2] * 120 + bgmat[3] * -80;
 
@@ -101,7 +101,7 @@ static void draw_tunnel(void)
 
        zoffs = nframes;
 
-       uoffs = tunrot;
+       uoffs = tunrot >> 1;
 
        top = vram[backbuf] + 20;
        bot = vram[backbuf] + 159 * 240 / 2 + 20;
@@ -182,10 +182,10 @@ static void vblank(void)
        spr_oam(oam, 0, 512 + 256, x - 64, y - 64, SPR_256COL | SPR_SZ64 | SPR_DBLSZ |
                        SPR_ROTSCL | SPR_ROTSCL_SEL(0));
 
-       mat[0] = COS(rot) << 1;
-       mat[1] = -SIN(rot) << 1;
-       mat[2] = SIN(rot) << 1;
-       mat[3] = COS(rot) << 1;
+       mat[0] = COS(rot);
+       mat[1] = -SIN(rot);
+       mat[2] = SIN(rot);
+       mat[3] = COS(rot);
        spr_transform(oam, 0, mat);