From b29b128a1b696509f05fa7df2cb27740aa7b4389 Mon Sep 17 00:00:00 2001
From: StapleButter <thetotalworm@gmail.com>
Date: Thu, 6 Jul 2017 12:17:45 +0200
Subject: 2D: fix rotscaled bitmap sprites (dumb bug of the year). fixes #41
 and #34

---
 src/GPU2D.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'src')

diff --git a/src/GPU2D.cpp b/src/GPU2D.cpp
index ee1fbc1..bcfa97d 100644
--- a/src/GPU2D.cpp
+++ b/src/GPU2D.cpp
@@ -1829,6 +1829,7 @@ void GPU2D::DrawSprite_Rotscale(u16* attrib, u16* rotparams, u32 boundwidth, u32
             if (DispCnt & 0x20)
             {
                 // TODO ("reserved")
+                printf("bad reserved mode\n");
             }
             else
             {
@@ -1856,7 +1857,7 @@ void GPU2D::DrawSprite_Rotscale(u16* attrib, u16* rotparams, u32 boundwidth, u32
         {
             if ((u32)rotX < width && (u32)rotY < height)
             {
-                u8 color = GPU::ReadVRAM_OBJ<u16>(pixelsaddr + ((rotY >> 8) * ytilefactor) + ((rotX >> 8) << 1));
+                u16 color = GPU::ReadVRAM_OBJ<u16>(pixelsaddr + ((rotY >> 8) * ytilefactor) + ((rotX >> 8) << 1));
 
                 if (color & 0x8000)
                 {
@@ -2000,6 +2001,7 @@ void GPU2D::DrawSprite_Normal(u16* attrib, u32 width, s32 xpos, u32 ypos, u32* d
             if (DispCnt & 0x20)
             {
                 // TODO ("reserved")
+                printf("bad reserved mode\n");
             }
             else
             {
-- 
cgit v1.2.3