diff options
author | StapleButter <thetotalworm@gmail.com> | 2017-07-06 12:17:45 +0200 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2017-07-06 12:17:45 +0200 |
commit | b29b128a1b696509f05fa7df2cb27740aa7b4389 (patch) | |
tree | 38c5743023a418920c13f562a959f073b3999ee5 | |
parent | dc326130286c5d562949afa0f7ee07abc790c0de (diff) |
2D: fix rotscaled bitmap sprites (dumb bug of the year).
fixes #41 and #34
-rw-r--r-- | src/GPU2D.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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 { |