shithub: cstory

Download patch

ref: 7c33b0ac5f40118d59629b6b711cb7c782262eea
parent: 295e70ded843f11151b84f91b8bce4ddeab5dcb6
author: Clownacy <Clownacy@users.noreply.github.com>
date: Tue Jan 7 01:47:55 EST 2020

More-accurate MiniMap.cpp variable arrangement

--- a/src/MiniMap.cpp
+++ b/src/MiniMap.cpp
@@ -14,8 +14,6 @@
 #include "MyChar.h"
 #include "Stage.h"
 
-char gMapping[0x80];
-
 void WriteMiniMapLine(int line)
 {
 	int x;
@@ -77,17 +75,18 @@
 
 int MiniMapLoop(void)
 {
-	int f;
-	int line;
-	unsigned char my_wait;
-
-	RECT rcMiniMap;
+	int f, line;
 	RECT rcView;
+	RECT rcMiniMap;
 
+	int my_x;
+	int my_y;
+	unsigned char my_wait;
 	RECT my_rect = {0, 57, 1, 58};
-	int my_x = ((gMC.x / 0x200) + 8) / 16;
-	int my_y = ((gMC.y / 0x200) + 8) / 16;
 
+	my_x = ((gMC.x / 0x200) + 8) / 16;
+	my_y = ((gMC.y / 0x200) + 8) / 16;
+
 	for (f = 0; f <= 8; ++f)
 	{
 		GetTrg();
@@ -210,6 +209,8 @@
 
 	return enum_ESCRETURN_continue;
 }
+
+char gMapping[0x80];
 
 BOOL IsMapping(void)
 {