shithub: cstory

Download patch

ref: 13e5f446af50b89fe73e7c8b1a40060264939c99
parent: ddd0c17257a4ee3b21feda584514a7c6b5c8d13f
parent: 253b33d34f07017efcc365242b6e8fc03997ab2a
author: Clownacy <Clownacy@users.noreply.github.com>
date: Mon Oct 14 18:17:20 EDT 2019

Merge branch 'accurate' into portable

--- a/src/TextScr.cpp
+++ b/src/TextScr.cpp
@@ -41,7 +41,7 @@
 
 TEXT_SCRIPT gTS;
 
-int gNumberTextScript[4];	// Seems to be for debugging
+int gNumberTextScript[4];
 char text[0x100];
 
 RECT gRect_line = {0, 0, 216, 16};
@@ -643,10 +643,9 @@
 						w = GetTextScriptNo(gTS.p_read + 4);
 						x = GetTextScriptNo(gTS.p_read + 9);
 
-						// Looks like Pixel left some debug code in. Oops.
 						gNumberTextScript[0] = x;
 					#ifndef FIX_BUGS
-						// z is uninitialised. Probably a leftover from copypasting.
+						// z is uninitialised. Probably a leftover from copypasting this from elsewhere.
 						gNumberTextScript[1] = z;
 					#endif
 
@@ -1214,11 +1213,7 @@
 					}
 					else if (IS_COMMAND('N','U','M'))
 					{
-						// This seems to be a command used for debugging TSC scripts:
-						// It prints a selected char in the gNumberTextScript array.
-						// gNumberTextScript is only used by the '<AM+' command, and
-						// even then, part of it's assigned to an uninitialised
-						// variable, while the other half of it is completely unused.
+						// This supports up to four different values, but only one is actually used (a second is used erroneously)
 						z = GetTextScriptNo(gTS.p_read + 4);
 						SetNumberTextScript(z);
 						gTS.p_read += 8;
--