ref: ce49c3f9d82b95fd032a5903a67465dfab357a9a
parent: 08d6dad3eec9028d82cb8b679fd23635c90c9707
author: Snesrev <snesrev@protonmail.com>
date: Mon Sep 5 20:30:52 EDT 2022
Fix bug with scrolling ow map
--- a/messaging.c
+++ b/messaging.c
@@ -309,7 +309,7 @@
static const uint8 kOverworldMap_Table4[4] = {0x34, 0x74, 0xf4, 0xb4};
static const uint8 kOverworldMap_Timer[2] = {33, 12};
static const int16 kOverworldMap_Table3[8] = {0, 0, 1, 2, -1, -2, 1, 2};
-static const int16 kOverworldMap_Table2[6] = {0, 0, 224, 480, -72, -224};
+static const int16 kOverworldMap_Table2[8] = {0, 0, 224, 480, -72, -224, 0, 0};
static PlayerHandlerFunc *const kMessagingSubmodules[12] = {
&Module_Messaging_0,
&Hud_Module_Run,
@@ -1313,12 +1313,12 @@
if (overworld_map_flags) {
int k = (joypad1H_last & 12) >> 1;
- if (BG1VOFS_copy2 != kOverworldMap_Table2[k]) {
+ if (BG1VOFS_copy2 != (uint16)kOverworldMap_Table2[k]||1) {
BG1VOFS_copy2 += kOverworldMap_Table3[k];
M7Y_copy = BG1VOFS_copy2 + 0x100;
}
k = (joypad1H_last & 3) * 2 + 1;
- if (BG1HOFS_copy2 != kOverworldMap_Table2[k])
+ if (BG1HOFS_copy2 != (uint16)kOverworldMap_Table2[k]||1)
BG1HOFS_copy2 += kOverworldMap_Table3[k];
}
WorldMap_HandleSprites();