1) I'm stupid 2) Use RGB for the PutText calls
This commit is contained in:
parent
b648268283
commit
293dbd4e03
3 changed files with 11 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue