shithub: cstory

Download patch

ref: 293dbd4e03ab313af57abc17eabae3b0d47f581b
parent: b648268283ac1506c53305a6e9c829fe97c2b45e
author: Clownacy <Clownacy@users.noreply.github.com>
date: Thu Feb 21 16:16:57 EST 2019

1) I'm stupid  2) Use RGB for the PutText calls

--- a/src/Ending.cpp
+++ b/src/Ending.cpp
@@ -75,7 +75,7 @@
 			//Draw text
 			RECT rc = {0, 16 * s, 320, 16 * s + 16};
 			CortBox2(&rc, 0, SURFACE_ID_CREDIT_CAST);
-			PutText2(0, 16 * s, text, 0xFFFFFE, SURFACE_ID_CREDIT_CAST);
+			PutText2(0, 16 * s, text, RGB(0xFF, 0xFF, 0xFE), SURFACE_ID_CREDIT_CAST);
 			break;
 		}
 	}
@@ -90,7 +90,7 @@
 		{
 			RECT rc = {0, 16 * s, 320, 16 * s + 16};
 			CortBox2(&rc, 0, SURFACE_ID_CREDIT_CAST);
-			PutText2(0, rc.top, Strip[s].str, 0xFFFFFE, SURFACE_ID_CREDIT_CAST);
+			PutText2(0, rc.top, Strip[s].str, RGB(0xFF, 0xFF, 0xFE), SURFACE_ID_CREDIT_CAST);
 		}
 	}
 }
--- a/src/MapName.cpp
+++ b/src/MapName.cpp
@@ -36,8 +36,8 @@
 	int len = strlen(gMapName.name);
 	
 	CortBox2(&rc, 0, SURFACE_ID_ROOM_NAME);
-	PutText2((-6 * len + 160) / 2 + 6, 1, gMapName.name, 0x110022, SURFACE_ID_ROOM_NAME);
-	PutText2((-6 * len + 160) / 2 + 6, 0, gMapName.name, 0xFFFFFE, SURFACE_ID_ROOM_NAME);
+	PutText2((-6 * len + 160) / 2 + 6, 1, gMapName.name, RGB(0x11, 0x00, 0x22), SURFACE_ID_ROOM_NAME);
+	PutText2((-6 * len + 160) / 2 + 6, 0, gMapName.name, RGB(0xFF, 0xFF, 0xFE), SURFACE_ID_ROOM_NAME);
 }
 
 void PutMapName(bool bMini)
@@ -69,6 +69,6 @@
 	int len = strlen(gMapName.name);
 	
 	CortBox2(&rc, 0, SURFACE_ID_ROOM_NAME);
-	PutText2((-6 * len + 160) / 2 + 6, 1, gMapName.name, 0x110022, SURFACE_ID_ROOM_NAME);
-	PutText2((-6 * len + 160) / 2 + 6, 0, gMapName.name, 0xFFFFFE, SURFACE_ID_ROOM_NAME);
+	PutText2((-6 * len + 160) / 2 + 6, 1, gMapName.name, RGB(0x11, 0x00, 0x22), SURFACE_ID_ROOM_NAME);
+	PutText2((-6 * len + 160) / 2 + 6, 0, gMapName.name, RGB(0xFF, 0xFF, 0xFE), SURFACE_ID_ROOM_NAME);
 }
--- a/src/TextScr.cpp
+++ b/src/TextScr.cpp
@@ -54,7 +54,7 @@
 BOOL InitTextScript2()
 {
 #ifdef FIX_BUGS
-	nod_color = GetCortBoxColor(RGB(0xFE, 0xFF, 0xFF));
+	nod_color = GetCortBoxColor(RGB(0xFF, 0xFF, 0xFE));
 #endif
 
 	//Clear flags
@@ -367,7 +367,7 @@
 	str[offset + 1] = 0;
 
 	//Append number to line
-	PutText2(6 * gTS.p_write, 0, str, 0xFFFFFE, (Surface_Ids)(gTS.line % 4 + SURFACE_ID_TEXT_LINE1));
+	PutText2(6 * gTS.p_write, 0, str, RGB(0xFF, 0xFF, 0xFE), (Surface_Ids)(gTS.line % 4 + SURFACE_ID_TEXT_LINE1));
 	strcat(&text[gTS.line % 4 * 0x40], str);
 
 	//Play sound and reset blinking cursor
@@ -471,10 +471,9 @@
 		// the way Pixel would do it (he only calls GetCortBoxColor
 		// once, during init functions, so our fix does it that way
 		// instead).
-		// Also, the red/blue values are swapped for some reason.
 		//CortBox(&rect, GetCortBoxColor(RGB(0xFF, 0xFF, 0xFE));
 #else
-		CortBox(&rect, RGB(0xFE, 0xFF, 0xFF));
+		CortBox(&rect, RGB(0xFF, 0xFF, 0xFE));
 #endif
 	}
 
@@ -1254,7 +1253,7 @@
 						gTS.p_write = x;
 
 						//Print text
-						PutText2(0, 0, str, 0xFFFFFE, (Surface_Ids)(gTS.line % 4 + SURFACE_ID_TEXT_LINE1));
+						PutText2(0, 0, str, RGB(0xFF, 0xFF, 0xFE), (Surface_Ids)(gTS.line % 4 + SURFACE_ID_TEXT_LINE1));
 						sprintf(&text[gTS.line % 4 * 0x40], str);
 
 						//Check if should move to next line (prevent a memory overflow, come on guys, this isn't a leftover of pixel trying to make text wrapping)
@@ -1288,7 +1287,7 @@
 						}
 						else
 						{
-							PutText2(6 * gTS.p_write, 0, c, 0xFFFFFE, (Surface_Ids)(gTS.line % 4 + SURFACE_ID_TEXT_LINE1));
+							PutText2(6 * gTS.p_write, 0, c, RGB(0xFF, 0xFF, 0xFE), (Surface_Ids)(gTS.line % 4 + SURFACE_ID_TEXT_LINE1));
 						}
 
 						strcat(&text[gTS.line % 4 * 0x40], c);