mirror of https://github.com/OpenRCT2/OpenRCT2.git
Attempt to fix Windows build errors.
This commit is contained in:
parent
dab714d4a6
commit
89fde291c4
|
@ -538,7 +538,7 @@ static Widget window_object_load_error_widgets[] = {
|
|||
auto name = entry.GetName();
|
||||
char buffer[256];
|
||||
String::Set(buffer, sizeof(buffer), name.data(), name.size());
|
||||
DrawText(dpi, screenCoords, { COLOUR_DARK_GREEN }, buffer);
|
||||
DrawText(dpi, screenCoords, { COLOUR_DARK_GREEN }, static_cast<const char*>(buffer));
|
||||
|
||||
if (entry.Generation == ObjectGeneration::DAT)
|
||||
{
|
||||
|
|
|
@ -423,7 +423,7 @@ static Widget _serverListWidgets[] = {
|
|||
|
||||
// Draw number of players
|
||||
screenCoords.x = right - numPlayersStringWidth;
|
||||
DrawText(dpi, screenCoords + ScreenCoordsXY{ 0, 3 }, { colours[1] }, players);
|
||||
DrawText(dpi, screenCoords + ScreenCoordsXY{ 0, 3 }, { colours[1] }, static_cast<const char*>(players));
|
||||
|
||||
screenCoords.y += ITEM_HEIGHT;
|
||||
}
|
||||
|
|
|
@ -262,7 +262,7 @@ void GfxDrawStringLeftCentred(DrawPixelInfo& dpi, StringId format, void* args, c
|
|||
auto bufferPtr = buffer;
|
||||
FormatStringLegacy(bufferPtr, sizeof(buffer), format, args);
|
||||
int32_t height = StringGetHeightRaw(bufferPtr, FontStyle::Medium);
|
||||
DrawText(dpi, coords - ScreenCoordsXY{ 0, (height / 2) }, { colour }, bufferPtr);
|
||||
DrawText(dpi, coords - ScreenCoordsXY{ 0, (height / 2) }, { colour }, static_cast<const char*>(bufferPtr));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -324,13 +324,13 @@ void DrawStringCentredRaw(
|
|||
DrawPixelInfo& dpi, const ScreenCoordsXY& coords, int32_t numLines, const utf8* text, FontStyle fontStyle)
|
||||
{
|
||||
ScreenCoordsXY screenCoords(dpi.x, dpi.y);
|
||||
DrawText(dpi, screenCoords, { COLOUR_BLACK, fontStyle }, "");
|
||||
DrawText(dpi, screenCoords, { COLOUR_BLACK, fontStyle }, static_cast<const char*>(""));
|
||||
screenCoords = coords;
|
||||
|
||||
for (int32_t i = 0; i <= numLines; i++)
|
||||
{
|
||||
int32_t width = GfxGetStringWidth(text, fontStyle);
|
||||
DrawText(dpi, screenCoords - ScreenCoordsXY{ width / 2, 0 }, { TEXT_COLOUR_254, fontStyle }, text);
|
||||
DrawText(dpi, screenCoords - ScreenCoordsXY{ width / 2, 0 }, { TEXT_COLOUR_254, fontStyle }, static_cast<const char*>(text));
|
||||
|
||||
const utf8* ch = text;
|
||||
const utf8* nextCh = nullptr;
|
||||
|
@ -422,7 +422,7 @@ void DrawNewsTicker(
|
|||
int32_t numLines, lineHeight, lineY;
|
||||
ScreenCoordsXY screenCoords(dpi.x, dpi.y);
|
||||
|
||||
DrawText(dpi, screenCoords, { colour }, "");
|
||||
DrawText(dpi, screenCoords, { colour }, static_cast<const char*>(""));
|
||||
|
||||
u8string wrappedString;
|
||||
GfxWrapString(FormatStringID(format, args), width, FontStyle::Small, &wrappedString, &numLines);
|
||||
|
@ -461,7 +461,7 @@ void DrawNewsTicker(
|
|||
}
|
||||
|
||||
screenCoords = { coords.x - halfWidth, lineY };
|
||||
DrawText(dpi, screenCoords, { TEXT_COLOUR_254, FontStyle::Small }, buffer);
|
||||
DrawText(dpi, screenCoords, { TEXT_COLOUR_254, FontStyle::Small }, static_cast<const char*>(buffer));
|
||||
|
||||
if (numCharactersDrawn > numCharactersToDraw)
|
||||
{
|
||||
|
|
|
@ -287,7 +287,7 @@ static int32_t ChatHistoryDrawString(DrawPixelInfo& dpi, const char* text, const
|
|||
int32_t lineY = screenCoords.y;
|
||||
for (int32_t line = 0; line <= numLines; ++line)
|
||||
{
|
||||
DrawText(dpi, { screenCoords.x, lineY - (numLines * lineHeight) }, { TEXT_COLOUR_254 }, bufferPtr);
|
||||
DrawText(dpi, { screenCoords.x, lineY - (numLines * lineHeight) }, { TEXT_COLOUR_254 }, static_cast<const char*>(bufferPtr));
|
||||
bufferPtr = GetStringEnd(bufferPtr) + 1;
|
||||
lineY += lineHeight;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue