From 293dbd4e03ab313af57abc17eabae3b0d47f581b Mon Sep 17 00:00:00 2001 From: Clownacy Date: Thu, 21 Feb 2019 21:16:57 +0000 Subject: [PATCH] 1) I'm stupid 2) Use RGB for the PutText calls --- src/Ending.cpp | 4 ++-- src/MapName.cpp | 8 ++++---- src/TextScr.cpp | 11 +++++------ 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/Ending.cpp b/src/Ending.cpp index 046b3dca..f9a13118 100644 --- a/src/Ending.cpp +++ b/src/Ending.cpp @@ -75,7 +75,7 @@ void SetStripper(int x, int y, char *text, int cast) //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 @@ void RestoreStripper() { 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); } } } diff --git a/src/MapName.cpp b/src/MapName.cpp index 4cfe28d5..d739e7d3 100644 --- a/src/MapName.cpp +++ b/src/MapName.cpp @@ -36,8 +36,8 @@ void ReadyMapName(const char *str) 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 @@ void RestoreMapName() 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); } diff --git a/src/TextScr.cpp b/src/TextScr.cpp index d65d579f..21f12dd6 100644 --- a/src/TextScr.cpp +++ b/src/TextScr.cpp @@ -54,7 +54,7 @@ static unsigned long nod_color; 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 @@ void SetNumberTextScript(int index) 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 @@ void PutTextScript() // 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 @@ int TextScriptProc() 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 @@ int TextScriptProc() } 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);