Merge branch 'tunsweep'
authorJohn Tsiombikas <nuclear@member.fsf.org>
Thu, 22 Apr 2021 09:01:25 +0000 (12:01 +0300)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Thu, 22 Apr 2021 09:01:25 +0000 (12:01 +0300)
src/gamescr.c

index 7da593a..2744d5d 100644 (file)
@@ -24,13 +24,13 @@ static uint16_t oam[4 * MAX_SPR];
 static short x = 120, y = 80;
 static unsigned char rot;
 
-static int32_t bgmat[4];
-static int32_t bgx, bgy;
 static int32_t tunrot;
+static int32_t tunmat[4], tunx, tuny;
 
 void gamescr(void)
 {
        int i;
+       int32_t scale;
        uint16_t *cdst;
        unsigned char *csrc;
 
@@ -61,6 +61,14 @@ void gamescr(void)
        tex = iwram_sbrk(32 * 32);
        memcpy(tex, tuncross_pixels, 32 * 32);
 
+       scale = 0x100;//230;
+       REG_BG2PA = scale;
+       REG_BG2PB = 0;
+       REG_BG2PC = 0;
+       REG_BG2PD = scale;
+       REG_BG2X = (120 << 8) - scale * 120;
+       REG_BG2Y = (80 << 8) - scale * 80;
+
        /*select_input(BN_DPAD);*/
 
        mask(INTR_VBLANK);