diff options
author | RSDuck <RSDuck@users.noreply.github.com> | 2021-03-16 20:57:23 +0100 |
---|---|---|
committer | RSDuck <RSDuck@users.noreply.github.com> | 2021-03-16 20:57:30 +0100 |
commit | fbe691a673333ca44de1e18eceb8443c308adc69 (patch) | |
tree | d72c5761985d5eef329eb1733dd0e824d2bbf92c | |
parent | 7f8a58b8feefa41ad61931971edb5151b185f34d (diff) |
fix read from unassigned variable for large BGs
-rw-r--r-- | src/GPU2D_Soft.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/GPU2D_Soft.cpp b/src/GPU2D_Soft.cpp index b7fced6..f7adc53 100644 --- a/src/GPU2D_Soft.cpp +++ b/src/GPU2D_Soft.cpp @@ -1464,7 +1464,6 @@ void SoftRenderer::DrawBG_Large(u32 line) // BG is always BG2 { u16 bgcnt = CurUnit->BGCnt[2]; - u32 tilesetaddr, tilemapaddr; u16* pal; // large BG sizes: @@ -1539,7 +1538,7 @@ void SoftRenderer::DrawBG_Large(u32 line) // BG is always BG2 if (!(finalX & ofxmask) && !(finalY & ofymask)) { - color = bgvram[(tilemapaddr + (((finalY & ymask) >> 8) << yshift) + ((finalX & xmask) >> 8)) & bgvrammask]; + color = bgvram[((((finalY & ymask) >> 8) << yshift) + ((finalX & xmask) >> 8)) & bgvrammask]; if (color) drawPixel(&BGOBJLine[i], pal[color], 0x01000000<<2); |