diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-05-25 04:41:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-25 04:41:15 -0400 |
commit | 2b062e89c11c4a8804d2196d04fe95cfe0ac434c (patch) | |
tree | 43bdd9be5e054e9b960285ac5bb7ca1752051175 /src | |
parent | 94939e395b58cf3e774a76d49b8518b8c2937432 (diff) | |
parent | 5d5327c0b73784c47d18734a291b5463289ca9c5 (diff) |
Merge pull request #1448 from Kurausukun/dumb
[LEAK-INFORMED] Fix Fakematch in DrawWallpaper
Diffstat (limited to 'src')
-rw-r--r-- | src/pokemon_storage_system.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index e5720d914..c82caf0b0 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -5437,15 +5437,16 @@ static bool32 WaitForWallpaperGfxLoad(void) static void DrawWallpaper(const void *tilemap, s8 direction, u8 offset) { - s16 var = (offset * 2) + 3; + s16 var = offset * 256; + s16 var2 = (offset * 2) + 3; s16 x = ((sStorage->bg2_X / 8 + 10) + (direction * 24)) & 0x3F; - CopyRectToBgTilemapBufferRect(2, tilemap, 0, 0, 0x14, 0x12, x, 2, 0x14, 0x12, 0x11, offset << 8, var); + CopyRectToBgTilemapBufferRect(2, tilemap, 0, 0, 0x14, 0x12, x, 2, 0x14, 0x12, 0x11, var, var2); if (direction == 0) return; if (direction > 0) - x *= 1, x += 0x14; // x * 1 is needed to match, but can be safely removed as it makes no functional difference + x += 0x14; else x -= 4; |