aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRSDuck <rsduck@users.noreply.github.com>2020-12-03 14:52:36 +0100
committerRSDuck <rsduck@users.noreply.github.com>2020-12-03 14:52:36 +0100
commit906521e7e9ab32f0502a680244db22f53f23b0b7 (patch)
tree9d8eab0e7f883f30dc4a18b9fc9e7ac611682f60 /src
parent07423492c434f2d0e54790e87562da25cd382bd9 (diff)
fix 4-bit affine sprites
Diffstat (limited to 'src')
-rw-r--r--src/GPU2D.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/GPU2D.cpp b/src/GPU2D.cpp
index 07b5b21..c1a2d47 100644
--- a/src/GPU2D.cpp
+++ b/src/GPU2D.cpp
@@ -2596,11 +2596,12 @@ void GPU2D::DrawSprite_Rotscale(u32 num, u32 boundwidth, u32 boundheight, u32 wi
if (spritemode == 1) pixelattr |= 0x80000000;
else pixelattr |= 0x10000000;
+ ytilefactor <<= 5;
+ pixelsaddr <<= 5;
+
if (attrib[0] & 0x2000)
{
// 256-color
- ytilefactor <<= 5;
- pixelsaddr <<= 5;
if (!window)
{
@@ -2640,10 +2641,6 @@ void GPU2D::DrawSprite_Rotscale(u32 num, u32 boundwidth, u32 boundheight, u32 wi
else
{
// 16-color
- tilenum <<= 5;
- ytilefactor <<= 5;
- u32 pixelsaddr = (Num ? 0x06600000 : 0x06400000) + tilenum;
-
if (!window)
{
pixelattr |= 0x1000;