shithub: cstory

Download patch

ref: f0273ecf3f0df7f8b9ee232de87af3cb789c699c
parent: 7c33b0ac5f40118d59629b6b711cb7c782262eea
author: Clownacy <Clownacy@users.noreply.github.com>
date: Tue Jan 7 01:52:36 EST 2020

More-accurate MyChar.cpp variable arrangement

--- a/src/MyChar.cpp
+++ b/src/MyChar.cpp
@@ -19,9 +19,6 @@
 
 MYCHAR gMC;
 
-int noise_no;
-unsigned int noise_freq;
-
 void InitMyChar(void)
 {
 	memset(&gMC, 0, sizeof(MYCHAR));
@@ -253,8 +250,7 @@
 	int dash2;
 	int resist;
 
-	int a;
-	int x;
+	int a, x;
 
 	if (gMC.cond & 2)
 		return;
@@ -933,6 +929,8 @@
 
 void SetMyCharDirect(unsigned char dir)
 {
+	int i;
+
 	if (dir == 3)
 	{
 		gMC.cond |= 1;
@@ -947,8 +945,6 @@
 		}
 		else
 		{
-			int i;
-
 			for (i = 0; i < NPC_MAX; ++i)
 				if (gNPC[i].code_event == dir)
 					break;
@@ -989,6 +985,9 @@
 {
 	gMC.cond &= ~1;
 }
+
+int noise_no;
+unsigned int noise_freq;
 
 void SetNoise(int no, int freq)
 {