mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 06:44:38 +01:00
Rename global variable text_palette -> gTextPalette (#17647)
This commit is contained in:
committed by
GitHub
parent
3c4a07859b
commit
575bae7ac4
@@ -992,10 +992,10 @@ void ttf_draw_string(
|
||||
info.flags |= TEXT_DRAW_FLAG_NO_FORMATTING;
|
||||
}
|
||||
|
||||
std::memcpy(info.palette, text_palette, sizeof(info.palette));
|
||||
std::memcpy(info.palette, gTextPalette, sizeof(info.palette));
|
||||
ttf_process_initial_colour(colour, &info);
|
||||
ttf_process_string(dpi, text, &info);
|
||||
std::memcpy(text_palette, info.palette, sizeof(info.palette));
|
||||
std::memcpy(gTextPalette, info.palette, sizeof(info.palette));
|
||||
|
||||
dpi->lastStringPos = { info.x, info.y };
|
||||
}
|
||||
@@ -1052,10 +1052,10 @@ void gfx_draw_string_with_y_offsets(
|
||||
info.flags |= TEXT_DRAW_FLAG_TTF;
|
||||
}
|
||||
|
||||
std::memcpy(info.palette, text_palette, sizeof(info.palette));
|
||||
std::memcpy(info.palette, gTextPalette, sizeof(info.palette));
|
||||
ttf_process_initial_colour(colour, &info);
|
||||
ttf_process_string(dpi, text, &info);
|
||||
std::memcpy(text_palette, info.palette, sizeof(info.palette));
|
||||
std::memcpy(gTextPalette, info.palette, sizeof(info.palette));
|
||||
|
||||
dpi->lastStringPos = { info.x, info.y };
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ thread_local uint8_t gOtherPalette[256] = {
|
||||
};
|
||||
|
||||
// Originally 0x9ABE04
|
||||
uint8_t text_palette[0x8] = {
|
||||
uint8_t gTextPalette[0x8] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
|
||||
@@ -481,7 +481,7 @@ extern uint32_t gPaletteEffectFrame;
|
||||
extern const FilterPaletteID GlassPaletteIds[COLOUR_COUNT];
|
||||
extern thread_local uint8_t gPeepPalette[256];
|
||||
extern thread_local uint8_t gOtherPalette[256];
|
||||
extern uint8_t text_palette[];
|
||||
extern uint8_t gTextPalette[];
|
||||
extern const translucent_window_palette TranslucentWindowPalettes[COLOUR_COUNT];
|
||||
|
||||
extern ImageId gPickupPeepImage;
|
||||
|
||||
@@ -106,12 +106,12 @@ static void DrawText(
|
||||
{
|
||||
gfx_fill_rect(
|
||||
dpi, { { alignedCoords + ScreenCoordsXY{ 0, 11 } }, { alignedCoords + ScreenCoordsXY{ width, 11 } } },
|
||||
text_palette[1]);
|
||||
if (text_palette[2] != 0)
|
||||
gTextPalette[1]);
|
||||
if (gTextPalette[2] != 0)
|
||||
{
|
||||
gfx_fill_rect(
|
||||
dpi, { { alignedCoords + ScreenCoordsXY{ 1, 12 } }, { alignedCoords + ScreenCoordsXY{ width + 1, 12 } } },
|
||||
text_palette[2]);
|
||||
gTextPalette[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user