Mass rename constants (#23656)

This commit is contained in:
Michael Steenbeek 2025-01-19 16:59:45 +01:00 committed by GitHub
parent bf413b2ab7
commit be9f27e4f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
270 changed files with 1636 additions and 1640 deletions

View file

@ -15,9 +15,9 @@
namespace OpenRCT2::Ui
{
constexpr char rawTransparent = ' ';
constexpr char rawWhite = '.';
constexpr char rawBlack = 'X';
constexpr char kRawTransparent = ' ';
constexpr char kRawWhite = '.';
constexpr char kRawBlack = 'X';
constexpr static CursorData cursorFromBitMap(int x, int y, std::string_view bitmap)
{
@ -35,15 +35,15 @@ namespace OpenRCT2::Ui
uint8_t dataBit{}, maskBit{};
switch (rawPixel)
{
case rawBlack:
case kRawBlack:
dataBit = 1;
maskBit = 1;
break;
case rawWhite:
case kRawWhite:
dataBit = 0;
maskBit = 1;
break;
case rawTransparent:
case kRawTransparent:
dataBit = 0;
maskBit = 0;
break;
@ -947,7 +947,7 @@ namespace OpenRCT2::Ui
" X.X "
" X ");
static constexpr const CursorData* RawCursorData[] = {
static constexpr const CursorData* kRawCursorData[] = {
nullptr, // CursorID::Arrow
&kBlankCursorData, // CursorID::Blank
&kUpArrowCursorData, // CursorID::UpArrow
@ -983,7 +983,7 @@ namespace OpenRCT2::Ui
const CursorData* result = nullptr;
if (cursorId != CursorID::Undefined && cursorId != CursorID::Count)
{
result = RawCursorData[EnumValue(cursorId)];
result = kRawCursorData[EnumValue(cursorId)];
}
return result;
}

View file

@ -172,7 +172,7 @@ void TextComposition::HandleMessage(const SDL_Event* e)
if ((modifier & KEYBOARD_PRIMARY_MODIFIER) && _session.Length)
{
SDL_SetClipboardText(_session.Buffer->c_str());
ContextShowError(STR_COPY_INPUT_TO_CLIPBOARD, STR_NONE, {});
ContextShowError(STR_COPY_INPUT_TO_CLIPBOARD, kStringIdNone, {});
}
break;
case SDLK_v:

View file

@ -63,7 +63,7 @@ using namespace OpenRCT2::Ui;
class UiContext final : public IUiContext
{
private:
constexpr static uint32_t TOUCH_DOUBLE_TIMEOUT = 300;
constexpr static uint32_t kTouchDoubleTimeout = 300;
const std::unique_ptr<IPlatformUiContext> _platformUiContext;
const std::unique_ptr<IWindowManager> _windowManager;
@ -176,12 +176,12 @@ public:
void SetFullscreenMode(FULLSCREEN_MODE mode) override
{
static constexpr int32_t _sdlFullscreenFlags[] = {
static constexpr int32_t kSDLFullscreenFlags[] = {
0,
SDL_WINDOW_FULLSCREEN,
SDL_WINDOW_FULLSCREEN_DESKTOP,
};
uint32_t windowFlags = _sdlFullscreenFlags[EnumValue(mode)];
uint32_t windowFlags = kSDLFullscreenFlags[EnumValue(mode)];
// HACK Changing window size when in fullscreen usually has no effect
if (mode == FULLSCREEN_MODE::FULLSCREEN)
@ -475,7 +475,7 @@ public:
_cursorState.touchIsDouble
= (!_cursorState.touchIsDouble
&& e.tfinger.timestamp - _cursorState.touchDownTimestamp < TOUCH_DOUBLE_TIMEOUT);
&& e.tfinger.timestamp - _cursorState.touchDownTimestamp < kTouchDoubleTimeout);
if (_cursorState.touchIsDouble)
{

View file

@ -25,7 +25,7 @@ namespace OpenRCT2::Audio
class AudioContext final : public IAudioContext
{
private:
static constexpr size_t STREAM_MIN_SIZE = 2 * 1024 * 1024; // 2 MiB
static constexpr size_t kStreamMinSize = 2 * 1024 * 1024; // 2 MiB
std::unique_ptr<AudioMixer> _audioMixer;
@ -110,7 +110,7 @@ namespace OpenRCT2::Audio
// Load whole stream into memory if small enough
auto dataLength = source->GetLength();
if (dataLength < STREAM_MIN_SIZE)
if (dataLength < kStreamMinSize)
{
auto& targetFormat = _audioMixer->GetFormat();
source = source->ToMemory(targetFormat);

View file

@ -80,20 +80,20 @@ std::unique_ptr<SDLAudioSource> SDLAudioSource::ToMemory(const AudioFormat& targ
static AudioCodecKind GetAudioCodec(SDL_RWops* rw)
{
constexpr uint32_t MAGIC_FLAC = 0x43614C66;
constexpr uint32_t MAGIC_OGG = 0x5367674F;
constexpr uint32_t MAGIC_RIFF = 0x46464952;
constexpr uint32_t kMagicFLAC = 0x43614C66;
constexpr uint32_t kMagicOGG = 0x5367674F;
constexpr uint32_t kMagicRIFF = 0x46464952;
auto originalPosition = SDL_RWtell(rw);
auto magic = SDL_ReadLE32(rw);
SDL_RWseek(rw, originalPosition, RW_SEEK_SET);
switch (magic)
{
case MAGIC_FLAC:
case kMagicFLAC:
return AudioCodecKind::Flac;
case MAGIC_OGG:
case kMagicOGG:
return AudioCodecKind::Ogg;
case MAGIC_RIFF:
case kMagicRIFF:
return AudioCodecKind::Wav;
default:
return AudioCodecKind::Unknown;

View file

@ -20,11 +20,11 @@ namespace OpenRCT2::Audio
class WavAudioSource final : public SDLAudioSource
{
private:
static constexpr uint32_t DATA = 0x61746164;
static constexpr uint32_t FMT = 0x20746D66;
static constexpr uint32_t RIFF = 0x46464952;
static constexpr uint32_t WAVE = 0x45564157;
static constexpr uint16_t pcmformat = 0x0001;
static constexpr uint32_t kChunkIdDATA = 0x61746164;
static constexpr uint32_t kChunkIdFMT = 0x20746D66;
static constexpr uint32_t kChunkIdRIFF = 0x46464952;
static constexpr uint32_t kChunkIdWAVE = 0x45564157;
static constexpr uint16_t kPCMFormat = 0x0001;
SDL_RWops* _rw{};
AudioFormat _format = {};
@ -36,7 +36,7 @@ namespace OpenRCT2::Audio
: _rw(rw)
{
auto chunkId = SDL_ReadLE32(rw);
if (chunkId != RIFF)
if (chunkId != kChunkIdRIFF)
{
SDL_RWclose(rw);
throw std::runtime_error("Not a WAV file");
@ -45,13 +45,13 @@ namespace OpenRCT2::Audio
// Read and discard chunk size
SDL_ReadLE32(rw);
auto chunkFormat = SDL_ReadLE32(rw);
if (chunkFormat != WAVE)
if (chunkFormat != kChunkIdWAVE)
{
SDL_RWclose(rw);
throw std::runtime_error("Not in WAVE format");
}
auto fmtChunkSize = FindChunk(rw, FMT);
auto fmtChunkSize = FindChunk(rw, kChunkIdFMT);
if (!fmtChunkSize)
{
SDL_RWclose(rw);
@ -61,7 +61,7 @@ namespace OpenRCT2::Audio
auto chunkStart = SDL_RWtell(rw);
auto encoding = SDL_ReadLE16(rw);
if (encoding != pcmformat)
if (encoding != kPCMFormat)
{
SDL_RWclose(rw);
throw std::runtime_error("Not in PCM format");
@ -87,7 +87,7 @@ namespace OpenRCT2::Audio
SDL_RWseek(rw, chunkStart + fmtChunkSize, RW_SEEK_SET);
auto dataChunkSize = FindChunk(rw, DATA);
auto dataChunkSize = FindChunk(rw, kChunkIdDATA);
if (dataChunkSize == 0)
{
SDL_RWclose(rw);
@ -155,11 +155,12 @@ namespace OpenRCT2::Audio
{
return subchunkSize;
}
constexpr uint32_t FACT = 0x74636166;
constexpr uint32_t LIST = 0x5453494c;
constexpr uint32_t BEXT = 0x74786562;
constexpr uint32_t JUNK = 0x4B4E554A;
while (subchunkId == FACT || subchunkId == LIST || subchunkId == BEXT || subchunkId == JUNK)
constexpr uint32_t kChunkIdFACT = 0x74636166;
constexpr uint32_t kChunkIdLIST = 0x5453494c;
constexpr uint32_t kChunkIdBEXT = 0x74786562;
constexpr uint32_t kChunkIdJUNK = 0x4B4E554A;
while (subchunkId == kChunkIdFACT || subchunkId == kChunkIdLIST || subchunkId == kChunkIdBEXT
|| subchunkId == kChunkIdJUNK)
{
SDL_RWseek(rw, subchunkSize, RW_SEEK_CUR);
subchunkId = SDL_ReadLE32(rw);

View file

@ -30,7 +30,7 @@ using namespace OpenRCT2::Ui;
class HardwareDisplayDrawingEngine final : public X8DrawingEngine
{
private:
constexpr static uint32_t DIRTY_VISUAL_TIME = 32;
constexpr static uint32_t kDirtyVisualTime = 32;
std::shared_ptr<IUiContext> const _uiContext;
SDL_Window* _window = nullptr;
@ -223,7 +223,7 @@ protected:
{
for (uint32_t y = top; y < bottom; y++)
{
SetDirtyVisualTime(x, y, DIRTY_VISUAL_TIME);
SetDirtyVisualTime(x, y, kDirtyVisualTime);
}
}
}

View file

@ -22,7 +22,7 @@ namespace
};
} // namespace
constexpr VDStruct VertexData[4] = {
constexpr VDStruct kVertexData[4] = {
{ -1.0f, -1.0f, 0.0f, 0.0f },
{ 1.0f, -1.0f, 1.0f, 0.0f },
{ -1.0f, 1.0f, 0.0f, 1.0f },
@ -38,7 +38,7 @@ ApplyPaletteShader::ApplyPaletteShader()
glGenVertexArrays(1, &_vao);
glBindBuffer(GL_ARRAY_BUFFER, _vbo);
glBufferData(GL_ARRAY_BUFFER, sizeof(VertexData), VertexData, GL_STATIC_DRAW);
glBufferData(GL_ARRAY_BUFFER, sizeof(kVertexData), kVertexData, GL_STATIC_DRAW);
glBindVertexArray(_vao);
glVertexAttribPointer(

View file

@ -22,7 +22,7 @@ namespace
};
} // namespace
constexpr VDStruct VertexData[4] = {
constexpr VDStruct kVertexData[4] = {
{ -1.0f, -1.0f, 0.0f, 0.0f },
{ 1.0f, -1.0f, 1.0f, 0.0f },
{ -1.0f, 1.0f, 0.0f, 1.0f },
@ -38,7 +38,7 @@ ApplyTransparencyShader::ApplyTransparencyShader()
glGenVertexArrays(1, &_vao);
glBindBuffer(GL_ARRAY_BUFFER, _vbo);
glBufferData(GL_ARRAY_BUFFER, sizeof(VertexData), VertexData, GL_STATIC_DRAW);
glBufferData(GL_ARRAY_BUFFER, sizeof(kVertexData), kVertexData, GL_STATIC_DRAW);
glBindVertexArray(_vao);
glVertexAttribPointer(

View file

@ -23,7 +23,7 @@ namespace
};
} // namespace
constexpr VDStruct VertexData[2] = {
constexpr VDStruct kVertexData[2] = {
{ 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f },
{ 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f },
};
@ -38,7 +38,7 @@ DrawLineShader::DrawLineShader()
glGenVertexArrays(1, &_vao);
glBindBuffer(GL_ARRAY_BUFFER, _vbo);
glBufferData(GL_ARRAY_BUFFER, sizeof(VertexData), VertexData, GL_STATIC_DRAW);
glBufferData(GL_ARRAY_BUFFER, sizeof(kVertexData), kVertexData, GL_STATIC_DRAW);
glBindVertexArray(_vao);
glVertexAttribPointer(

View file

@ -22,7 +22,7 @@ namespace
};
} // namespace
constexpr VDStruct VertexData[4] = {
constexpr VDStruct kVertexData[4] = {
{ 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f },
{ 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f },
{ 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f },
@ -42,7 +42,7 @@ DrawRectShader::DrawRectShader()
glGenVertexArrays(1, &_vao);
glBindBuffer(GL_ARRAY_BUFFER, _vbo);
glBufferData(GL_ARRAY_BUFFER, sizeof(VertexData), VertexData, GL_STATIC_DRAW);
glBufferData(GL_ARRAY_BUFFER, sizeof(kVertexData), kVertexData, GL_STATIC_DRAW);
glBindVertexArray(_vao);

View file

@ -47,7 +47,7 @@ struct OpenGLVersion
GLint Minor;
};
constexpr OpenGLVersion OPENGL_MINIMUM_REQUIRED_VERSION = { 3, 3 };
constexpr OpenGLVersion kOpenGLMinimumRequiredVersion = { 3, 3 };
constexpr uint8_t kCSInside = 0b0000;
constexpr uint8_t kCSLeft = 0b0001;
@ -216,7 +216,7 @@ public:
void Initialise() override
{
OpenGLVersion requiredVersion = OPENGL_MINIMUM_REQUIRED_VERSION;
OpenGLVersion requiredVersion = kOpenGLMinimumRequiredVersion;
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, requiredVersion.Major);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, requiredVersion.Minor);

View file

@ -18,11 +18,11 @@
using namespace OpenRCT2::Ui;
constexpr GLuint BACKBUFFER_ID = 0;
constexpr GLuint kBackBufferID = 0;
OpenGLFramebuffer::OpenGLFramebuffer(SDL_Window* window)
{
_id = BACKBUFFER_ID;
_id = kBackBufferID;
_texture = 0;
_depth = 0;
SDL_GL_GetDrawableSize(window, &_width, &_height);
@ -65,7 +65,7 @@ OpenGLFramebuffer::OpenGLFramebuffer(int32_t width, int32_t height, bool depth,
OpenGLFramebuffer::~OpenGLFramebuffer()
{
if (_id != BACKBUFFER_ID)
if (_id != kBackBufferID)
{
glDeleteTextures(1, &_texture);
glDeleteTextures(1, &_depth);

View file

@ -77,7 +77,7 @@ std::string OpenGLShader::ReadSourceCode(const std::string& path)
auto fs = FileStream(path, FILE_MODE_OPEN);
uint64_t fileLength = fs.GetLength();
if (fileLength > MaxSourceSize)
if (fileLength > kMaxSourceSize)
{
throw IOException("Shader source too large.");
}

View file

@ -18,7 +18,7 @@ namespace OpenRCT2::Ui
class OpenGLShader final
{
private:
static constexpr uint64_t MaxSourceSize = 8 * 1024 * 1024; // 8 MiB
static constexpr uint64_t kMaxSourceSize = 8 * 1024 * 1024; // 8 MiB
GLenum _type;
GLuint _id = 0;

View file

@ -15,9 +15,9 @@
using namespace OpenRCT2::Ui;
constexpr GLfloat depthValue[1] = { 1.0f };
constexpr GLfloat depthValueTransparent[1] = { 0.0f };
constexpr GLuint indexValue[4] = { 0, 0, 0, 0 };
constexpr GLfloat kDepthValue[1] = { 1.0f };
constexpr GLfloat kDepthValueTransparent[1] = { 0.0f };
constexpr GLuint kIndexValue[4] = { 0, 0, 0, 0 };
SwapFramebuffer::SwapFramebuffer(int32_t width, int32_t height)
: _opaqueFramebuffer(width, height)
@ -26,7 +26,7 @@ SwapFramebuffer::SwapFramebuffer(int32_t width, int32_t height)
, _backDepth(OpenGLFramebuffer::CreateDepthTexture(width, height))
{
_transparentFramebuffer.Bind();
glClearBufferfv(GL_DEPTH, 0, depthValueTransparent);
glClearBufferfv(GL_DEPTH, 0, kDepthValueTransparent);
}
SwapFramebuffer::~SwapFramebuffer()
@ -48,8 +48,8 @@ void SwapFramebuffer::ApplyTransparency(ApplyTransparencyShader& shader, GLuint
// Clear transparency buffers
_transparentFramebuffer.Bind();
glClearBufferuiv(GL_COLOR, 0, indexValue);
glClearBufferfv(GL_DEPTH, 0, depthValueTransparent);
glClearBufferuiv(GL_COLOR, 0, kIndexValue);
glClearBufferfv(GL_DEPTH, 0, kDepthValueTransparent);
_opaqueFramebuffer.SwapColourBuffer(_mixFramebuffer);
// Change binding to guarantee no undefined behavior
@ -59,7 +59,7 @@ void SwapFramebuffer::ApplyTransparency(ApplyTransparencyShader& shader, GLuint
void SwapFramebuffer::Clear()
{
_opaqueFramebuffer.Bind();
glClearBufferfv(GL_DEPTH, 0, depthValue);
glClearBufferfv(GL_DEPTH, 0, kDepthValue);
}
#endif /* DISABLE_OPENGL */

View file

@ -175,9 +175,9 @@ void TextureCache::CreateTextures()
{
// Determine width and height to use for texture atlases
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &_atlasesTextureDimensions);
if (_atlasesTextureDimensions > TEXTURE_CACHE_MAX_ATLAS_SIZE)
if (_atlasesTextureDimensions > kTextureCacheMaxAtlasSize)
{
_atlasesTextureDimensions = TEXTURE_CACHE_MAX_ATLAS_SIZE;
_atlasesTextureDimensions = kTextureCacheMaxAtlasSize;
}
// Determine maximum number of atlases (minimum of size and array limit)

View file

@ -54,11 +54,11 @@ namespace OpenRCT2::Ui
// This is the maximum width and height of each atlas, basically the
// granularity at which new atlases are allocated (2048 -> 4 MB of VRAM)
constexpr int32_t TEXTURE_CACHE_MAX_ATLAS_SIZE = 2048;
constexpr int32_t kTextureCacheMaxAtlasSize = 2048;
// Pixel dimensions of smallest supported slots in texture atlases
// Must be a power of 2!
constexpr int32_t TEXTURE_CACHE_SMALLEST_SLOT = 32;
constexpr int32_t kTextureCacheSmallestSlot = 32;
struct BasicTextureInfo
{
@ -155,9 +155,9 @@ namespace OpenRCT2::Ui
{
int32_t actualSize = std::max(actualWidth, actualHeight);
if (actualSize < TEXTURE_CACHE_SMALLEST_SLOT)
if (actualSize < kTextureCacheSmallestSlot)
{
actualSize = TEXTURE_CACHE_SMALLEST_SLOT;
actualSize = kTextureCacheSmallestSlot;
}
return static_cast<int32_t>(ceil(log2f(static_cast<float>(actualSize))));

View file

@ -81,10 +81,10 @@ void InputManager::QueueInputEvent(InputEvent&& e)
void InputManager::CheckJoysticks()
{
constexpr uint32_t CHECK_INTERVAL_MS = 5000;
constexpr uint32_t kCheckInternalMs = 5000;
auto tick = SDL_GetTicks();
if (tick > _lastJoystickCheck + CHECK_INTERVAL_MS)
if (tick > _lastJoystickCheck + kCheckInternalMs)
{
_lastJoystickCheck = tick;

View file

@ -1142,7 +1142,7 @@ namespace OpenRCT2
{
CursorID cursorId = CursorID::Arrow;
auto ft = Formatter();
ft.Add<StringId>(STR_NONE);
ft.Add<StringId>(kStringIdNone);
SetMapTooltip(ft);
auto* windowMgr = GetWindowManager();
@ -1348,16 +1348,16 @@ namespace OpenRCT2
if (_clickRepeatTicks.has_value())
{
// The initial amount of time in ticks to wait until the first click repeat.
constexpr auto ticksUntilRepeats = 16U;
constexpr auto kTicksUntilRepeats = 16u;
// The amount of ticks between each click repeat.
constexpr auto eventDelayInTicks = 3U;
constexpr auto kEventDelayInTicks = 3u;
// The amount of ticks since the last click repeat.
const auto clickRepeatsDelta = gCurrentRealTimeTicks - _clickRepeatTicks.value();
// Handle click repeat, only start this when at least 16 ticks elapsed.
if (clickRepeatsDelta >= ticksUntilRepeats && (clickRepeatsDelta & eventDelayInTicks) == 0)
if (clickRepeatsDelta >= kTicksUntilRepeats && (clickRepeatsDelta & kEventDelayInTicks) == 0)
{
if (WidgetIsHoldable(*w, widgetIndex))
{
@ -1365,7 +1365,7 @@ namespace OpenRCT2
}
// Subtract initial delay from here on we want the event each third tick.
_clickRepeatTicks = gCurrentRealTimeTicks - ticksUntilRepeats;
_clickRepeatTicks = gCurrentRealTimeTicks - kTicksUntilRepeats;
}
}
@ -1397,7 +1397,7 @@ namespace OpenRCT2
{
dropdown_index = DropdownIndexFromPoint(screenCoords, w);
dropdownCleanup = dropdown_index == -1
|| (dropdown_index < Dropdown::ItemsMaxSize && Dropdown::IsDisabled(dropdown_index))
|| (dropdown_index < Dropdown::kItemsMaxSize && Dropdown::IsDisabled(dropdown_index))
|| gDropdownItems[dropdown_index].IsSeparator();
w = nullptr; // To be closed right next
}
@ -1531,7 +1531,7 @@ namespace OpenRCT2
OpenRCT2String{ kColourToTip.at(ColourDropDownIndexToColour(dropdown_index)), {} }, screenCoords);
}
if (dropdown_index < Dropdown::ItemsMaxSize && Dropdown::IsDisabled(dropdown_index))
if (dropdown_index < Dropdown::kItemsMaxSize && Dropdown::IsDisabled(dropdown_index))
{
return;
}

View file

@ -20,7 +20,7 @@
using namespace OpenRCT2;
using namespace OpenRCT2::Ui;
constexpr uint32_t UsefulModifiers = KMOD_SHIFT | KMOD_CTRL | KMOD_ALT | KMOD_GUI;
constexpr uint32_t kUsefulModifiers = KMOD_SHIFT | KMOD_CTRL | KMOD_ALT | KMOD_GUI;
static uint32_t ParseModifier(std::string_view text)
{
@ -202,7 +202,7 @@ std::string_view ShortcutInput::GetModifierName(uint32_t key, bool localised)
auto r = _keys.find(key);
if (r != _keys.end())
{
if (localised && r->second.second != STR_NONE)
if (localised && r->second.second != kStringIdNone)
{
return LanguageGetString(r->second.second);
}
@ -379,7 +379,7 @@ static bool HasModifier(uint32_t shortcut, uint32_t actual, uint32_t left, uint3
static bool CompareModifiers(uint32_t shortcut, uint32_t actual)
{
shortcut &= UsefulModifiers;
shortcut &= kUsefulModifiers;
return HasModifier(shortcut, actual, KMOD_LCTRL, KMOD_RCTRL) && HasModifier(shortcut, actual, KMOD_LSHIFT, KMOD_RSHIFT)
&& HasModifier(shortcut, actual, KMOD_LALT, KMOD_RALT) && HasModifier(shortcut, actual, KMOD_LGUI, KMOD_RGUI);
}
@ -399,7 +399,7 @@ bool ShortcutInput::Matches(const InputEvent& e) const
std::optional<ShortcutInput> ShortcutInput::FromInputEvent(const InputEvent& e)
{
// Assume any side modifier (more specific configurations can be done by manually editing config file)
auto modifiers = e.Modifiers & UsefulModifiers;
auto modifiers = e.Modifiers & kUsefulModifiers;
for (auto mod : { KMOD_CTRL, KMOD_SHIFT, KMOD_ALT, KMOD_GUI })
{
if (modifiers & mod)

View file

@ -227,26 +227,26 @@ void ShortcutManager::LoadUserBindings()
std::optional<ShortcutInput> ShortcutManager::ConvertLegacyBinding(uint16_t binding)
{
constexpr uint16_t nullBinding = 0xFFFF;
constexpr uint16_t shift = 0x100;
constexpr uint16_t ctrl = 0x200;
constexpr uint16_t alt = 0x400;
constexpr uint16_t cmd = 0x800;
constexpr uint16_t kNullBinding = 0xFFFF;
constexpr uint16_t kShift = 0x100;
constexpr uint16_t kCtrl = 0x200;
constexpr uint16_t kAlt = 0x400;
constexpr uint16_t kCmd = 0x800;
if (binding == nullBinding)
if (binding == kNullBinding)
{
return std::nullopt;
}
ShortcutInput result;
result.Kind = InputDeviceKind::Keyboard;
if (binding & shift)
if (binding & kShift)
result.Modifiers |= KMOD_SHIFT;
if (binding & ctrl)
if (binding & kCtrl)
result.Modifiers |= KMOD_CTRL;
if (binding & alt)
if (binding & kAlt)
result.Modifiers |= KMOD_ALT;
if (binding & cmd)
if (binding & kCmd)
result.Modifiers |= KMOD_GUI;
result.Button = SDL_GetKeyFromScancode(static_cast<SDL_Scancode>(binding & 0xFF));
return result;
@ -254,14 +254,14 @@ std::optional<ShortcutInput> ShortcutManager::ConvertLegacyBinding(uint16_t bind
void ShortcutManager::LoadLegacyBindings(const fs::path& path)
{
constexpr int32_t SUPPORTED_FILE_VERSION = 1;
constexpr int32_t MAX_LEGACY_SHORTCUTS = 85;
constexpr int32_t kSupportedFileVersion = 1;
constexpr int32_t kMaxLegacyShortcuts = 85;
auto fs = FileStream(path, FILE_MODE_OPEN);
auto version = fs.ReadValue<uint16_t>();
if (version == SUPPORTED_FILE_VERSION)
if (version == kSupportedFileVersion)
{
for (size_t i = 0; i < MAX_LEGACY_SHORTCUTS; i++)
for (size_t i = 0; i < kMaxLegacyShortcuts; i++)
{
auto value = fs.ReadValue<uint16_t>();
auto shortcutId = GetLegacyShortcutId(i);

View file

@ -57,7 +57,7 @@ namespace OpenRCT2::Ui
{
public:
std::string Id;
StringId LocalisedName = STR_NONE;
StringId LocalisedName = kStringIdNone;
std::string CustomName;
std::vector<ShortcutInput> Default;
std::vector<ShortcutInput> Current;

View file

@ -18,10 +18,10 @@ namespace OpenRCT2::Dropdown
{
struct Item;
constexpr StringId SeparatorString = 0;
constexpr StringId FormatColourPicker = 0xFFFE;
constexpr StringId FormatLandPicker = 0xFFFF;
constexpr int32_t ItemsMaxSize = 512;
constexpr StringId kSeparatorString = 0;
constexpr StringId kFormatColourPicker = 0xFFFE;
constexpr StringId kFormatLandPicker = 0xFFFF;
constexpr int32_t kItemsMaxSize = 512;
enum Flag
{
@ -39,7 +39,7 @@ namespace OpenRCT2::Dropdown
namespace OpenRCT2::Ui::Windows
{
extern int32_t gDropdownNumItems;
extern Dropdown::Item gDropdownItems[Dropdown::ItemsMaxSize];
extern Dropdown::Item gDropdownItems[Dropdown::kItemsMaxSize];
extern bool gDropdownIsColour;
extern int32_t gDropdownLastColourHover;
extern int32_t gDropdownHighlightedIndex;
@ -81,7 +81,7 @@ namespace OpenRCT2::Dropdown
constexpr bool IsSeparator() const
{
return Format == SeparatorString;
return Format == kSeparatorString;
}
constexpr bool IsDisabled() const
@ -116,7 +116,7 @@ namespace OpenRCT2::Dropdown
constexpr ItemExt Separator()
{
return ItemExt(-1, Dropdown::SeparatorString, STR_EMPTY);
return ItemExt(-1, Dropdown::kSeparatorString, kStringIdEmpty);
}
template<int N>

View file

@ -41,7 +41,7 @@ static int32_t InGameConsoleGetLineHeight()
void InGameConsole::WriteInitial()
{
InteractiveConsole::WriteLine(OPENRCT2_NAME " " OPENRCT2_VERSION);
InteractiveConsole::WriteLine(OPENRCT2_NAME " " kOpenRCT2Version);
InteractiveConsole::WriteLine(LanguageGetString(STR_CONSOLE_HELPER_TEXT));
InteractiveConsole::WriteLine("");
WritePrompt();
@ -135,13 +135,13 @@ void InGameConsole::ClearInput()
_consoleCurrentLine.clear();
if (_isOpen)
{
_consoleTextInputSession = ContextStartTextInput(_consoleCurrentLine, CONSOLE_INPUT_SIZE);
_consoleTextInputSession = ContextStartTextInput(_consoleCurrentLine, kConsoleInputSize);
}
}
void InGameConsole::HistoryAdd(const u8string& src)
{
if (_consoleHistory.size() >= CONSOLE_HISTORY_SIZE)
if (_consoleHistory.size() >= kConsoleHistorySize)
{
_consoleHistory.pop_front();
}
@ -201,7 +201,7 @@ void InGameConsole::Open()
_isOpen = true;
ScrollToEnd();
RefreshCaret();
_consoleTextInputSession = ContextStartTextInput(_consoleCurrentLine, CONSOLE_INPUT_SIZE);
_consoleTextInputSession = ContextStartTextInput(_consoleCurrentLine, kConsoleInputSize);
}
void InGameConsole::Close()
@ -242,9 +242,9 @@ void InGameConsole::WriteLine(const std::string& input, FormatToken colourFormat
stringOffset = splitPos + 1;
}
if (_consoleLines.size() > CONSOLE_MAX_LINES)
if (_consoleLines.size() > kConsoleMaxLines)
{
const std::size_t linesToErase = _consoleLines.size() - CONSOLE_MAX_LINES;
const std::size_t linesToErase = _consoleLines.size() - kConsoleMaxLines;
_consoleLines.erase(_consoleLines.begin(), _consoleLines.begin() + linesToErase);
}
}
@ -323,7 +323,7 @@ void InGameConsole::Draw(DrawPixelInfo& dpi) const
INSET_RECT_FLAG_BORDER_INSET);
std::string lineBuffer;
auto screenCoords = _consoleTopLeft + ScreenCoordsXY{ CONSOLE_EDGE_PADDING, CONSOLE_EDGE_PADDING };
auto screenCoords = _consoleTopLeft + ScreenCoordsXY{ kConsoleEdgePadding, kConsoleEdgePadding };
// Draw text inside console
for (std::size_t i = 0; i < _consoleLines.size() && i < static_cast<size_t>(maxLines); i++)
@ -353,7 +353,7 @@ void InGameConsole::Draw(DrawPixelInfo& dpi) const
screenCoords.y += lineHeight;
}
screenCoords.y = _consoleBottomRight.y - lineHeight - CONSOLE_EDGE_PADDING - 1;
screenCoords.y = _consoleBottomRight.y - lineHeight - kConsoleEdgePadding - 1;
// Draw current line
if (textColour.colour == COLOUR_BLACK)
@ -367,11 +367,11 @@ void InGameConsole::Draw(DrawPixelInfo& dpi) const
}
// Draw caret
if (_consoleCaretTicks < CONSOLE_CARET_FLASH_THRESHOLD)
if (_consoleCaretTicks < kConsoleCaretFlashThreshold)
{
auto caret = screenCoords + ScreenCoordsXY{ _caretScreenPosX, lineHeight };
uint8_t caretColour = ColourMapA[textColour.colour].lightest;
GfxFillRect(dpi, { caret, caret + ScreenCoordsXY{ CONSOLE_CARET_WIDTH, 1 } }, caretColour);
GfxFillRect(dpi, { caret, caret + ScreenCoordsXY{ kConsoleCaretWidth, 1 } }, caretColour);
}
// What about border colours?

View file

@ -21,12 +21,12 @@ namespace OpenRCT2::Ui
class InGameConsole final : public InteractiveConsole
{
private:
static constexpr int32_t CONSOLE_MAX_LINES = 300;
static constexpr int32_t CONSOLE_HISTORY_SIZE = 64;
static constexpr int32_t CONSOLE_INPUT_SIZE = 256;
static constexpr int32_t CONSOLE_CARET_FLASH_THRESHOLD = 15;
static constexpr int32_t CONSOLE_EDGE_PADDING = 4;
static constexpr int32_t CONSOLE_CARET_WIDTH = 6;
static constexpr int32_t kConsoleMaxLines = 300;
static constexpr int32_t kConsoleHistorySize = 64;
static constexpr int32_t kConsoleInputSize = 256;
static constexpr int32_t kConsoleCaretFlashThreshold = 15;
static constexpr int32_t kConsoleEdgePadding = 4;
static constexpr int32_t kConsoleCaretWidth = 6;
bool _isInitialised = false;
bool _isOpen = false;

View file

@ -68,7 +68,7 @@ void LandTool::ShowSurfaceStyleDropdown(WindowBase* w, Widget* widget, ObjectEnt
if (surfaceObj->Colour != TerrainSurfaceObject::kNoValue)
imageId = imageId.WithPrimary(surfaceObj->Colour);
gDropdownItems[itemIndex].Format = Dropdown::FormatLandPicker;
gDropdownItems[itemIndex].Format = Dropdown::kFormatLandPicker;
Dropdown::SetImage(itemIndex, imageId);
if (i == currentSurfaceType)
{
@ -118,7 +118,7 @@ void LandTool::ShowEdgeStyleDropdown(WindowBase* w, Widget* widget, ObjectEntryI
// If fallback images are loaded, the RCT1 styles will just look like copies of already existing styles, so hide them.
if (edgeObj != nullptr && !edgeObj->UsesFallbackImages())
{
gDropdownItems[itemIndex].Format = Dropdown::FormatLandPicker;
gDropdownItems[itemIndex].Format = Dropdown::kFormatLandPicker;
Dropdown::SetImage(itemIndex, ImageId(edgeObj->IconImageId));
if (i == currentEdgeType)
{

View file

@ -37,7 +37,7 @@ namespace OpenRCT2::Ui
{
if (objective.Type == OBJECTIVE_BUILD_THE_BEST)
{
StringId rideTypeString = STR_NONE;
StringId rideTypeString = kStringIdNone;
auto rideTypeId = objective.RideId;
if (rideTypeId != RIDE_TYPE_NULL && rideTypeId < RIDE_TYPE_COUNT)
{

View file

@ -896,7 +896,7 @@ static constexpr UIThemeWindowEntry PredefinedThemeRCT1_Entries[] =
const WindowThemeDesc* desc = GetWindowThemeDescriptor(wc);
if (desc == nullptr)
{
return STR_EMPTY;
return kStringIdEmpty;
}
return desc->WindowName;
}

View file

@ -506,7 +506,7 @@ namespace OpenRCT2::Ui
{
ft.Add<StringId>(STR_BROKEN);
}
ft.Add<StringId>(pathAddEntry != nullptr ? pathAddEntry->name : STR_NONE);
ft.Add<StringId>(pathAddEntry != nullptr ? pathAddEntry->name : kStringIdNone);
SetMapTooltip(ft);
return info;
}

View file

@ -227,7 +227,7 @@ namespace OpenRCT2::Ui
// Get the widget
auto& widget = w.widgets[widgetIndex];
if (widget.type != WindowWidgetType::Tab && widget.image.GetIndex() == ImageIndexUndefined)
if (widget.type != WindowWidgetType::Tab && widget.image.GetIndex() == kImageIndexUndefined)
return;
if (widget.type == WindowWidgetType::Tab)
@ -235,7 +235,7 @@ namespace OpenRCT2::Ui
if (WidgetIsDisabled(w, widgetIndex))
return;
if (widget.image.GetIndex() == ImageIndexUndefined)
if (widget.image.GetIndex() == kImageIndexUndefined)
{
// Set standard tab sprite to use.
widget.image = ImageId(SPR_TAB, FilterPaletteID::PaletteNull);
@ -346,7 +346,7 @@ namespace OpenRCT2::Ui
// Get the widget
const auto& widget = w.widgets[widgetIndex];
if (widget.text == STR_NONE)
if (widget.text == kStringIdNone)
return;
auto colour = w.colours[widget.colour];
@ -391,7 +391,7 @@ namespace OpenRCT2::Ui
// Get the widget
const auto& widget = w.widgets[widgetIndex];
if (widget.text == STR_NONE || widget.content == kWidgetContentEmpty)
if (widget.text == kStringIdNone || widget.content == kWidgetContentEmpty)
return;
auto colour = w.colours[widget.colour];
@ -457,7 +457,7 @@ namespace OpenRCT2::Ui
{
if (widget.string == nullptr || widget.string[0] == '\0')
{
stringId = STR_NONE;
stringId = kStringIdNone;
formatArgs = nullptr;
}
else
@ -485,7 +485,7 @@ namespace OpenRCT2::Ui
// Text
auto [stringId, formatArgs] = WidgetGetStringidAndArgs(widget);
if (stringId != STR_NONE)
if (stringId != kStringIdNone)
{
auto colour = w.colours[widget.colour].withFlag(ColourFlag::translucent, false);
if (WidgetIsDisabled(w, widgetIndex))
@ -561,7 +561,7 @@ namespace OpenRCT2::Ui
FilterPaletteID::PaletteDarken3);
// Draw text
if (widget->text == STR_NONE)
if (widget->text == kStringIdNone)
return;
topLeft = w.windowPos + ScreenCoordsXY{ widget->left + 2, widget->top + 1 };
@ -606,7 +606,7 @@ namespace OpenRCT2::Ui
// Draw the button
GfxFillRectInset(dpi, { topLeft, bottomRight }, colour, press);
if (widget.text == STR_NONE)
if (widget.text == kStringIdNone)
return;
topLeft = w.windowPos + ScreenCoordsXY{ widget.midX() - 1, std::max<int32_t>(widget.top, widget.midY() - 5) };
@ -652,7 +652,7 @@ namespace OpenRCT2::Ui
}
// draw the text
if (widget.text == STR_NONE)
if (widget.text == kStringIdNone)
return;
auto [stringId, formatArgs] = WidgetGetStringidAndArgs(widget);

View file

@ -19,7 +19,7 @@ namespace OpenRCT2::Ui
{
// clang-format off
#define WINDOW_SHIM_RAW(TITLE, WIDTH, HEIGHT, CLOSE_STR) \
{ WindowWidgetType::Frame, 0, 0, WIDTH - 1, 0, HEIGHT - 1, 0xFFFFFFFF, STR_NONE }, \
{ WindowWidgetType::Frame, 0, 0, WIDTH - 1, 0, HEIGHT - 1, 0xFFFFFFFF, kStringIdNone }, \
{ WindowWidgetType::Caption, 0, 1, WIDTH - 2, 1, 14, TITLE, STR_WINDOW_TITLE_TIP }, \
{ WindowWidgetType::CloseBox, 0, WIDTH - 13, WIDTH - 3, 2, 13, CLOSE_STR, STR_CLOSE_WINDOW_TIP }
@ -52,7 +52,7 @@ namespace OpenRCT2::Ui
constexpr Widget MakeWidget(
const ScreenCoordsXY& origin, const ScreenSize& size, WindowWidgetType type, WindowColour colour,
uint32_t content = kWidgetContentEmpty, StringId tooltip = STR_NONE)
uint32_t content = kWidgetContentEmpty, StringId tooltip = kStringIdNone)
{
Widget out = {};
out.left = origin.x;
@ -69,7 +69,7 @@ namespace OpenRCT2::Ui
constexpr Widget MakeWidget(
const ScreenCoordsXY& origin, const ScreenSize& size, WindowWidgetType type, WindowColour colour, ImageId image,
StringId tooltip = STR_NONE)
StringId tooltip = kStringIdNone)
{
Widget out = {};
out.left = origin.x;
@ -86,17 +86,17 @@ namespace OpenRCT2::Ui
constexpr Widget MakeRemapWidget(
const ScreenCoordsXY& origin, const ScreenSize& size, WindowWidgetType type, WindowColour colour, ImageIndex content,
StringId tooltip = STR_NONE)
StringId tooltip = kStringIdNone)
{
return MakeWidget(origin, size, type, colour, ImageId(content, FilterPaletteID::PaletteNull), tooltip);
}
constexpr Widget MakeTab(const ScreenCoordsXY& origin, StringId tooltip = STR_NONE)
constexpr Widget MakeTab(const ScreenCoordsXY& origin, StringId tooltip = kStringIdNone)
{
const ScreenSize size = kTabSize;
const WindowWidgetType type = WindowWidgetType::Tab;
const WindowColour colour = WindowColour::Secondary;
const auto content = ImageId(ImageIndexUndefined);
const auto content = ImageId(kImageIndexUndefined);
return MakeWidget(origin, size, type, colour, content, tooltip);
}
@ -113,7 +113,7 @@ namespace OpenRCT2::Ui
out.type = WindowWidgetType::ProgressBar;
out.colour = colour;
out.content = 0 | (lowerBlinkBound << 8) | (upperBlinkBound << 16);
out.tooltip = STR_NONE;
out.tooltip = kStringIdNone;
return out;
}
@ -125,7 +125,7 @@ namespace OpenRCT2::Ui
constexpr Widget MakeSpinnerDecreaseWidget(
const ScreenCoordsXY& origin, const ScreenSize& size, [[maybe_unused]] WindowWidgetType type, WindowColour colour,
[[maybe_unused]] uint32_t content = kWidgetContentEmpty, StringId tooltip = STR_NONE)
[[maybe_unused]] uint32_t content = kWidgetContentEmpty, StringId tooltip = kStringIdNone)
{
const int16_t xPos = origin.x + size.width - 26;
const int16_t yPos = origin.y + 1;
@ -137,7 +137,7 @@ namespace OpenRCT2::Ui
constexpr Widget MakeSpinnerIncreaseWidget(
const ScreenCoordsXY& origin, const ScreenSize& size, [[maybe_unused]] WindowWidgetType type, WindowColour colour,
[[maybe_unused]] uint32_t content = kWidgetContentEmpty, StringId tooltip = STR_NONE)
[[maybe_unused]] uint32_t content = kWidgetContentEmpty, StringId tooltip = kStringIdNone)
{
const int16_t xPos = origin.x + size.width - 13;
const int16_t yPos = origin.y + 1;
@ -152,14 +152,14 @@ namespace OpenRCT2::Ui
constexpr Widget MakeDropdownBoxWidget(
const ScreenCoordsXY& origin, const ScreenSize& size, [[maybe_unused]] WindowWidgetType type, WindowColour colour,
[[maybe_unused]] uint32_t content = kWidgetContentEmpty, StringId tooltip = STR_NONE)
[[maybe_unused]] uint32_t content = kWidgetContentEmpty, StringId tooltip = kStringIdNone)
{
return MakeWidget(origin, size, type, colour, content);
}
constexpr Widget MakeDropdownButtonWidget(
const ScreenCoordsXY& origin, const ScreenSize& size, [[maybe_unused]] WindowWidgetType type, WindowColour colour,
[[maybe_unused]] uint32_t content = kWidgetContentEmpty, StringId tooltip = STR_NONE)
[[maybe_unused]] uint32_t content = kWidgetContentEmpty, StringId tooltip = kStringIdNone)
{
const int16_t xPos = origin.x + size.width - 11;
const int16_t yPos = origin.y + 1;

View file

@ -37,7 +37,7 @@ namespace OpenRCT2
using namespace OpenRCT2::Ui;
// The amount of pixels to scroll per wheel click
constexpr int32_t WindowScrollPixels = 17;
constexpr int32_t kWindowScrollPixels = 17;
static int32_t _previousAbsoluteWheel = 0;
@ -259,7 +259,7 @@ namespace OpenRCT2
auto cursorState = ContextGetCursorState();
int32_t absolute_wheel = cursorState->wheel;
int32_t relative_wheel = absolute_wheel - _previousAbsoluteWheel;
int32_t pixel_scroll = relative_wheel * WindowScrollPixels;
int32_t pixel_scroll = relative_wheel * kWindowScrollPixels;
_previousAbsoluteWheel = absolute_wheel;
if (relative_wheel == 0)

View file

@ -145,7 +145,7 @@ namespace OpenRCT2
TrackElemType::RightFlyerLargeHalfLoopInvertedUp,
TrackElemType::RightFlyerLargeHalfLoopUninvertedDown,
};
constexpr size_t DropdownLength = DropdownOrder.size();
constexpr size_t kDropdownLength = DropdownOrder.size();
// Update the magic number with the current number of track elements to silence
static_assert(EnumValue(TrackElemType::Count) == 349, "Reminder to add new track element to special dropdown list");

View file

@ -83,7 +83,7 @@ namespace OpenRCT2::Scripting
images.resize(count);
auto base = GfxObjectAllocateImages(images.data(), count);
if (base == ImageIndexUndefined)
if (base == kImageIndexUndefined)
{
return {};
}

View file

@ -26,7 +26,7 @@ using namespace OpenRCT2::Ui::Windows;
namespace OpenRCT2::Scripting
{
constexpr size_t COLUMN_HEADER_HEIGHT = kListRowHeight + 1;
constexpr size_t kColumnHeaderHeight = kListRowHeight + 1;
template<>
ColumnSortOrder FromDuk(const DukValue& d)
@ -431,7 +431,7 @@ ScreenSize CustomListView::GetSize()
result.height = static_cast<int32_t>(Items.size() * kListRowHeight);
if (ShowColumnHeaders)
{
result.height += COLUMN_HEADER_HEIGHT;
result.height += kColumnHeaderHeight;
}
}
@ -472,7 +472,7 @@ void CustomListView::MouseOver(const ScreenCoordsXY& pos, bool isMouseDown)
HighlightedCell = hitResult;
if (HighlightedCell != LastHighlightedCell)
{
if (hitResult->Row != HEADER_ROW && OnHighlight.context() != nullptr && OnHighlight.is_function())
if (hitResult->Row != kHeaderRow && OnHighlight.context() != nullptr && OnHighlight.is_function())
{
auto ctx = OnHighlight.context();
duk_push_int(ctx, static_cast<int32_t>(HighlightedCell->Row));
@ -489,7 +489,7 @@ void CustomListView::MouseOver(const ScreenCoordsXY& pos, bool isMouseDown)
// Update the header currently held down
if (isMouseDown)
{
if (hitResult && hitResult->Row == HEADER_ROW)
if (hitResult && hitResult->Row == kHeaderRow)
{
ColumnHeaderPressedCurrentState = (hitResult->Column == ColumnHeaderPressed);
Invalidate();
@ -511,7 +511,7 @@ void CustomListView::MouseDown(const ScreenCoordsXY& pos)
auto hitResult = GetItemIndexAt(pos);
if (hitResult)
{
if (hitResult->Row != HEADER_ROW)
if (hitResult->Row != kHeaderRow)
{
if (CanSelect)
{
@ -531,7 +531,7 @@ void CustomListView::MouseDown(const ScreenCoordsXY& pos)
}
}
}
if (hitResult && hitResult->Row == HEADER_ROW)
if (hitResult && hitResult->Row == kHeaderRow)
{
if (Columns[hitResult->Column].CanSort)
{
@ -546,7 +546,7 @@ void CustomListView::MouseDown(const ScreenCoordsXY& pos)
void CustomListView::MouseUp(const ScreenCoordsXY& pos)
{
auto hitResult = GetItemIndexAt(pos);
if (hitResult && hitResult->Row == HEADER_ROW)
if (hitResult && hitResult->Row == kHeaderRow)
{
if (hitResult->Column == ColumnHeaderPressed)
{
@ -566,7 +566,7 @@ void CustomListView::Paint(WindowBase* w, DrawPixelInfo& dpi, const ScrollArea*
auto paletteIndex = ColourMapA[w->colours[1].colour].mid_light;
GfxFillRect(dpi, { { dpi.x, dpi.y }, { dpi.x + dpi.width, dpi.y + dpi.height } }, paletteIndex);
int32_t y = ShowColumnHeaders ? COLUMN_HEADER_HEIGHT : 0;
int32_t y = ShowColumnHeaders ? kColumnHeaderHeight : 0;
for (size_t i = 0; i < Items.size(); i++)
{
if (y > dpi.y + dpi.height)
@ -787,12 +787,12 @@ std::optional<RowColumn> CustomListView::GetItemIndexAt(const ScreenCoordsXY& po
if (ShowColumnHeaders && absoluteY >= 0 && absoluteY < kListRowHeight)
{
result = RowColumn();
result->Row = HEADER_ROW;
result->Row = kHeaderRow;
}
else
{
// Check what row we pressed
int32_t firstY = ShowColumnHeaders ? COLUMN_HEADER_HEIGHT : 0;
int32_t firstY = ShowColumnHeaders ? kColumnHeaderHeight : 0;
int32_t row = (pos.y - firstY) / kListRowHeight;
if (row >= 0 && row < static_cast<int32_t>(Items.size()))
{

View file

@ -94,7 +94,7 @@ namespace OpenRCT2::Ui::Windows
class CustomListView
{
private:
static constexpr int32_t HEADER_ROW = -1;
static constexpr int32_t kHeaderRow = -1;
WindowBase* ParentWindow{};
size_t ScrollIndex{};

View file

@ -259,7 +259,7 @@ namespace OpenRCT2::Scripting
}
else
{
customTool.Filter = ViewportInteractionItemAll;
customTool.Filter = kViewportInteractionItemAll;
}
customTool.onStart = dukValue["onStart"];

View file

@ -641,7 +641,7 @@ namespace OpenRCT2::Ui::Windows
widget--;
auto selectedIndex = widgetDesc->SelectedIndex;
const auto& items = widgetDesc->Items;
const auto numItems = std::min<size_t>(items.size(), Dropdown::ItemsMaxSize);
const auto numItems = std::min<size_t>(items.size(), Dropdown::kItemsMaxSize);
for (size_t i = 0; i < numItems; i++)
{
gDropdownItems[i].Format = STR_OPTIONS_DROPDOWN_ITEM;
@ -901,7 +901,7 @@ namespace OpenRCT2::Ui::Windows
widget.top = 17;
widget.bottom = 43;
widget.image = ImageId(SPR_TAB, FilterPaletteID::PaletteNull);
widget.tooltip = STR_NONE;
widget.tooltip = kStringIdNone;
widgetList.push_back(widget);
_info.WidgetIndexMap.push_back(std::numeric_limits<size_t>::max());
}
@ -958,7 +958,7 @@ namespace OpenRCT2::Ui::Windows
widget.right = desc.X + desc.Width - 1;
widget.bottom = desc.Y + desc.Height - 1;
widget.content = std::numeric_limits<uint32_t>::max();
widget.tooltip = STR_NONE;
widget.tooltip = kStringIdNone;
widget.sztooltip = const_cast<utf8*>(desc.Tooltip.c_str());
widget.flags |= WIDGET_FLAGS::TOOLTIP_IS_STRING;
if (desc.IsDisabled)
@ -1030,7 +1030,7 @@ namespace OpenRCT2::Ui::Windows
widget.top = desc.Y + 1;
widget.bottom = desc.Y + desc.Height - 2;
widget.text = STR_DROPDOWN_GLYPH;
widget.tooltip = STR_NONE;
widget.tooltip = kStringIdNone;
if (desc.IsDisabled)
widget.flags |= WIDGET_FLAGS::IS_DISABLED;
widgetList.push_back(widget);
@ -1081,7 +1081,7 @@ namespace OpenRCT2::Ui::Windows
widget.top = desc.Y + 1;
widget.bottom = desc.Y + desc.Height - 2;
widget.text = STR_NUMERIC_UP;
widget.tooltip = STR_NONE;
widget.tooltip = kStringIdNone;
if (desc.IsDisabled)
widget.flags |= WIDGET_FLAGS::IS_DISABLED;
widget.flags |= WIDGET_FLAGS::IS_HOLDABLE;
@ -1103,7 +1103,7 @@ namespace OpenRCT2::Ui::Windows
else if (desc.Type == "viewport")
{
widget.type = WindowWidgetType::Viewport;
widget.text = STR_NONE;
widget.text = kStringIdNone;
widgetList.push_back(widget);
}
}

View file

@ -238,15 +238,15 @@ namespace OpenRCT2::Scripting
{
try
{
constexpr int32_t MaxLengthAllowed = 4096;
constexpr int32_t kMaxLengthAllowed = 4096;
auto plugin = _scriptEngine.GetExecInfo().GetCurrentPlugin();
auto title = desc["title"].as_string();
auto description = desc["description"].as_string();
auto initialValue = AsOrDefault(desc["initialValue"], "");
auto maxLength = AsOrDefault(desc["maxLength"], MaxLengthAllowed);
auto maxLength = AsOrDefault(desc["maxLength"], kMaxLengthAllowed);
auto callback = desc["callback"];
WindowTextInputOpen(
title, description, initialValue, std::clamp(maxLength, 0, MaxLengthAllowed),
title, description, initialValue, std::clamp(maxLength, 0, kMaxLengthAllowed),
[this, plugin, callback](std::string_view value) {
auto dukValue = ToDuk(_scriptEngine.GetContext(), value);
_scriptEngine.ExecutePluginCall(plugin, callback, { dukValue }, false);

View file

@ -506,7 +506,7 @@ namespace OpenRCT2::Scripting
auto widget = GetWidget();
if (widget != nullptr && (widget->type == WindowWidgetType::FlatBtn || widget->type == WindowWidgetType::ImgBtn))
{
if (GetTargetAPIVersion() <= API_VERSION_63_G2_REORDER)
if (GetTargetAPIVersion() <= kApiVersionG2Reorder)
{
return LegacyIconIndex(widget->image.GetIndex());
}

View file

@ -66,8 +66,8 @@ namespace OpenRCT2::Ui::Windows
static constexpr Widget _windowAboutOpenRCT2Widgets[] = {
WIDGETS_MAIN,
MakeWidget({10, 60}, {WW - 20, 20}, WindowWidgetType::LabelCentred, WindowColour::Secondary, STR_ABOUT_OPENRCT2_DESCRIPTION), // Introduction
MakeWidget({30, 90}, {128, 128}, WindowWidgetType::Placeholder, WindowColour::Secondary, STR_NONE), // OpenRCT2 Logo
MakeWidget({168, 100}, {173, 24}, WindowWidgetType::Placeholder, WindowColour::Secondary, STR_NONE), // Build version
MakeWidget({30, 90}, {128, 128}, WindowWidgetType::Placeholder, WindowColour::Secondary, kStringIdNone), // OpenRCT2 Logo
MakeWidget({168, 100}, {173, 24}, WindowWidgetType::Placeholder, WindowColour::Secondary, kStringIdNone), // Build version
MakeWidget({344, 100 }, {24, 24}, WindowWidgetType::ImgBtn, WindowColour::Secondary, ImageId(SPR_G2_COPY), STR_COPY_BUILD_HASH ), // "Copy build info" button
MakeWidget({168, 115 + 20}, {200, 14}, WindowWidgetType::Placeholder, WindowColour::Secondary, STR_UPDATE_AVAILABLE ), // "new version" button
MakeWidget({168, 115 + 40}, {200, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_CHANGELOG_ELLIPSIS), // changelog button

View file

@ -348,7 +348,7 @@ static constexpr Widget window_cheats_weather_widgets[] =
{
MAIN_CHEATS_WIDGETS,
MakeWidget ({ 5, 48}, {238, 50}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_WEATHER_GROUP ), // Weather group
MakeWidget ({126, 62}, {111, 14}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_NONE, STR_CHANGE_WEATHER_TOOLTIP ), // Force weather
MakeWidget ({126, 62}, {111, 14}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, kStringIdNone, STR_CHANGE_WEATHER_TOOLTIP ), // Force weather
MakeWidget ({225, 63}, { 11, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_CHANGE_WEATHER_TOOLTIP ), // Force weather
MakeWidget ({ 11, 80}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_FREEZE_WEATHER, STR_CHEAT_FREEZE_WEATHER_TIP), // Freeze weather
MakeWidget ({ 5, 102}, {238, 37}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_FAUNA ), // Fauna group

View file

@ -47,7 +47,7 @@ namespace OpenRCT2::Ui::Windows
WINDOW_SHIM(WINDOW_TITLE, WW, WH),
MakeWidget(
{ 27, 17 }, { 44, 32 }, WindowWidgetType::ImgBtn, WindowColour::Primary, SPR_LAND_TOOL_SIZE_0,
STR_NONE), // preview box
kStringIdNone), // preview box
MakeRemapWidget(
{ 28, 18 }, { 16, 16 }, WindowWidgetType::TrnBtn, WindowColour::Secondary, SPR_LAND_TOOL_DECREASE,
STR_ADJUST_SMALLER_LAND_TIP), // decrement size
@ -104,7 +104,8 @@ namespace OpenRCT2::Ui::Windows
Formatter ft;
ft.Add<uint16_t>(kLandToolMinimumSize);
ft.Add<uint16_t>(kLandToolMaximumSize);
TextInputOpen(WIDX_PREVIEW, STR_SELECTION_SIZE, STR_ENTER_SELECTION_SIZE, ft, STR_NONE, STR_NONE, 3);
TextInputOpen(
WIDX_PREVIEW, STR_SELECTION_SIZE, STR_ENTER_SELECTION_SIZE, ft, kStringIdNone, kStringIdNone, 3);
break;
}
case WIDX_SMALL_SCENERY:

View file

@ -43,7 +43,7 @@ namespace OpenRCT2::Ui::Windows
static Widget window_custom_currency_widgets[] = {
WINDOW_SHIM(WINDOW_TITLE, WW, WH),
MakeSpinnerWidgets({100, 30}, {101, 11}, WindowWidgetType::Spinner, WindowColour::Secondary, STR_CURRENCY_FORMAT), // NB: 3 widgets
MakeWidget ({120, 50}, { 81, 11}, WindowWidgetType::Button, WindowColour::Secondary, STR_EMPTY ),
MakeWidget ({120, 50}, { 81, 11}, WindowWidgetType::Button, WindowColour::Secondary, kStringIdEmpty ),
MakeWidget ({220, 50}, {131, 11}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ),
MakeWidget ({339, 51}, { 11, 9}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH ),
};

View file

@ -47,8 +47,8 @@ namespace OpenRCT2::Ui::Windows
};
int32_t gDropdownNumItems;
Dropdown::Item gDropdownItems[Dropdown::ItemsMaxSize];
static ImageId _dropdownItemsImages[Dropdown::ItemsMaxSize];
Dropdown::Item gDropdownItems[Dropdown::kItemsMaxSize];
static ImageId _dropdownItemsImages[Dropdown::kItemsMaxSize];
bool gDropdownIsColour;
int32_t gDropdownLastColourHover;
int32_t gDropdownHighlightedIndex;
@ -141,26 +141,26 @@ namespace OpenRCT2::Ui::Windows
}
StringId item = gDropdownItems[i].Format;
if (item == Dropdown::FormatLandPicker || item == Dropdown::FormatColourPicker)
if (item == Dropdown::kFormatLandPicker || item == Dropdown::kFormatColourPicker)
{
// Image item
auto image = UseImages ? _dropdownItemsImages[i]
: ImageId(static_cast<uint32_t>(gDropdownItems[i].Args));
if (item == Dropdown::FormatColourPicker && highlightedIndex == i)
if (item == Dropdown::kFormatColourPicker && highlightedIndex == i)
image = image.WithIndexOffset(1);
GfxDrawSprite(dpi, image, screenCoords);
}
else
{
// Text item
if (i < Dropdown::ItemsMaxSize && Dropdown::IsChecked(i))
if (i < Dropdown::kItemsMaxSize && Dropdown::IsChecked(i))
item++;
// Calculate colour
ColourWithFlags colour = { colours[0].colour };
if (i == highlightedIndex)
colour.colour = COLOUR_WHITE;
if (i < Dropdown::ItemsMaxSize && Dropdown::IsDisabled(i))
if (i < Dropdown::kItemsMaxSize && Dropdown::IsDisabled(i))
colour = { colours[0].colour, EnumToFlag(ColourFlag::inset) };
// Draw item string
@ -513,7 +513,7 @@ static constexpr colour_t kColoursDropdownOrder[] = {
auto imageId = (orderedColour == COLOUR_INVISIBLE) ? ImageId(SPR_G2_ICON_PALETTE_INVISIBLE, COLOUR_WHITE)
: ImageId(SPR_PALETTE_BTN, orderedColour);
gDropdownItems[i].Format = Dropdown::FormatColourPicker;
gDropdownItems[i].Format = Dropdown::kFormatColourPicker;
Dropdown::SetImage(i, imageId);
}

View file

@ -105,7 +105,7 @@ namespace OpenRCT2::Ui::Windows
}
else if (!(gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER))
{
if (GetNumFreeEntities() != MAX_ENTITIES || GetGameState().Park.Flags & PARK_FLAGS_SPRITES_INITIALISED)
if (GetNumFreeEntities() != kMaxEntities || GetGameState().Park.Flags & PARK_FLAGS_SPRITES_INITIALISED)
{
HidePreviousStepButton();
}
@ -141,7 +141,7 @@ namespace OpenRCT2::Ui::Windows
if (widgetIndex == WIDX_PREVIOUS_STEP_BUTTON)
{
if ((gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER)
|| (GetNumFreeEntities() == MAX_ENTITIES && !(gameState.Park.Flags & PARK_FLAGS_SPRITES_INITIALISED)))
|| (GetNumFreeEntities() == kMaxEntities && !(gameState.Park.Flags & PARK_FLAGS_SPRITES_INITIALISED)))
{
((this)->*(_previousButtonMouseUp[EnumValue(gameState.EditorStep)]))();
}

View file

@ -523,7 +523,7 @@ namespace OpenRCT2::Ui::Windows
gDropdownItems[DDIX_FILTER_SEPARATOR].Format = 0;
gDropdownItems[DDIX_FILTER_SELECTED].Format = STR_TOGGLE_OPTION;
gDropdownItems[DDIX_FILTER_NONSELECTED].Format = STR_TOGGLE_OPTION;
gDropdownItems[DDIX_FILTER_SEPARATOR].Args = STR_NONE;
gDropdownItems[DDIX_FILTER_SEPARATOR].Args = kStringIdNone;
gDropdownItems[DDIX_FILTER_SELECTED].Args = STR_SELECTED_ONLY;
gDropdownItems[DDIX_FILTER_NONSELECTED].Args = STR_NON_SELECTED_ONLY;
}
@ -960,7 +960,7 @@ namespace OpenRCT2::Ui::Windows
const auto numSubTabs = static_cast<int8_t>(currentPage.subTabs.size());
for (int8_t i = 0; i <= 6; i++)
{
widgets[WIDX_SUB_TAB_0 + i].tooltip = i < numSubTabs ? currentPage.subTabs[i].tooltip : STR_NONE;
widgets[WIDX_SUB_TAB_0 + i].tooltip = i < numSubTabs ? currentPage.subTabs[i].tooltip : kStringIdNone;
widgets[WIDX_SUB_TAB_0 + i].type = i < numSubTabs ? WindowWidgetType::Tab : WindowWidgetType::Empty;
pressed_widgets &= ~(1uLL << (WIDX_SUB_TAB_0 + i));
}
@ -1085,7 +1085,7 @@ namespace OpenRCT2::Ui::Windows
{
auto ft = Formatter();
auto stringId = _listSortType == RIDE_SORT_TYPE ? static_cast<StringId>(_listSortDescending ? STR_DOWN : STR_UP)
: STR_NONE;
: kStringIdNone;
ft.Add<StringId>(stringId);
auto screenPos = windowPos + ScreenCoordsXY{ listSortTypeWidget.left + 1, listSortTypeWidget.top + 1 };
DrawTextEllipsised(dpi, screenPos, listSortTypeWidget.width(), STR_OBJECTS_SORT_TYPE, ft, { colours[1] });
@ -1095,7 +1095,7 @@ namespace OpenRCT2::Ui::Windows
{
auto ft = Formatter();
auto stringId = _listSortType == RIDE_SORT_RIDE ? static_cast<StringId>(_listSortDescending ? STR_DOWN : STR_UP)
: STR_NONE;
: kStringIdNone;
ft.Add<StringId>(stringId);
auto screenPos = windowPos + ScreenCoordsXY{ listSortRideWidget.left + 1, listSortRideWidget.top + 1 };
DrawTextEllipsised(dpi, screenPos, listSortRideWidget.width(), STR_OBJECTS_SORT_RIDE, ft, { colours[1] });
@ -1528,7 +1528,7 @@ namespace OpenRCT2::Ui::Windows
if (item->Type == ObjectType::Ride)
{
ride_type_t rideType = 0;
for (int32_t i = 0; i < RCT2::ObjectLimits::MaxRideTypesPerRideEntry; i++)
for (int32_t i = 0; i < RCT2::ObjectLimits::kMaxRideTypesPerRideEntry; i++)
{
if (item->RideInfo.RideType[i] != RIDE_TYPE_NULL)
{
@ -1665,8 +1665,8 @@ namespace OpenRCT2::Ui::Windows
static StringId GetRideTypeStringId(const ObjectRepositoryItem* item)
{
StringId result = STR_NONE;
for (int32_t i = 0; i < RCT2::ObjectLimits::MaxRideTypesPerRideEntry; i++)
StringId result = kStringIdNone;
for (int32_t i = 0; i < RCT2::ObjectLimits::kMaxRideTypesPerRideEntry; i++)
{
auto rideType = item->RideInfo.RideType[i];
if (rideType != RIDE_TYPE_NULL)
@ -1732,7 +1732,7 @@ namespace OpenRCT2::Ui::Windows
LoadPalette();
}
if (showFallbackWarning)
ContextShowError(STR_OBJECT_SELECTION_FALLBACK_IMAGES_WARNING, STR_EMPTY, Formatter::Common());
ContextShowError(STR_OBJECT_SELECTION_FALLBACK_IMAGES_WARNING, kStringIdEmpty, Formatter::Common());
}
bool EditorObjectSelectionWindowCheck()

View file

@ -120,13 +120,13 @@ namespace OpenRCT2::Ui::Windows
static constexpr Widget window_editor_objective_options_main_widgets[] = {
MAIN_OBJECTIVE_OPTIONS_WIDGETS,
MakeWidget ({ 98, 48}, {344, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_NONE, STR_SELECT_OBJECTIVE_FOR_THIS_SCENARIO_TIP ),
MakeWidget ({ 98, 48}, {344, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, kStringIdNone, STR_SELECT_OBJECTIVE_FOR_THIS_SCENARIO_TIP ),
MakeWidget ({430, 49}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_SELECT_OBJECTIVE_FOR_THIS_SCENARIO_TIP ),
MakeSpinnerWidgets({158, 65}, {120, 12}, WindowWidgetType::Button, WindowColour::Secondary ), // NB: 3 widgets
MakeSpinnerWidgets({158, 82}, {120, 12}, WindowWidgetType::Button, WindowColour::Secondary ), // NB: 3 widgets
MakeWidget ({370, 99}, { 75, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_CHANGE, STR_CHANGE_NAME_OF_PARK_TIP ),
MakeWidget ({370, 116}, { 75, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_CHANGE, STR_CHANGE_NAME_OF_SCENARIO_TIP ),
MakeWidget ({ 98, 133}, {180, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_NONE, STR_SELECT_WHICH_GROUP_THIS_SCENARIO_APPEARS_IN),
MakeWidget ({ 98, 133}, {180, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, kStringIdNone, STR_SELECT_WHICH_GROUP_THIS_SCENARIO_APPEARS_IN),
MakeWidget ({266, 134}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_SELECT_WHICH_GROUP_THIS_SCENARIO_APPEARS_IN),
MakeWidget ({370, 150}, { 75, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_CHANGE, STR_CHANGE_DETAIL_NOTES_ABOUT_PARK_SCENARIO_TIP),
};
@ -493,7 +493,7 @@ namespace OpenRCT2::Ui::Windows
case OBJECTIVE_REPAY_LOAN_AND_PARK_VALUE:
if (gameState.ScenarioObjective.Currency >= ObjectiveCurrencyLoanAndValueMax)
{
ContextShowError(STR_CANT_INCREASE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {});
}
else
{
@ -504,7 +504,7 @@ namespace OpenRCT2::Ui::Windows
case OBJECTIVE_MONTHLY_FOOD_INCOME:
if (gameState.ScenarioObjective.Currency >= ObjectiveCurrencyFoodMax)
{
ContextShowError(STR_CANT_INCREASE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {});
}
else
{
@ -515,7 +515,7 @@ namespace OpenRCT2::Ui::Windows
case OBJECTIVE_10_ROLLERCOASTERS_LENGTH:
if (gameState.ScenarioObjective.MinimumLength >= ObjectiveLengthMax)
{
ContextShowError(STR_CANT_INCREASE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {});
}
else
{
@ -526,7 +526,7 @@ namespace OpenRCT2::Ui::Windows
case OBJECTIVE_FINISH_5_ROLLERCOASTERS:
if (gameState.ScenarioObjective.MinimumExcitement >= ObjectiveExcitementMax)
{
ContextShowError(STR_CANT_INCREASE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {});
}
else
{
@ -537,7 +537,7 @@ namespace OpenRCT2::Ui::Windows
default:
if (gameState.ScenarioObjective.NumGuests >= ObjectiveGuestsMax)
{
ContextShowError(STR_CANT_INCREASE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {});
}
else
{
@ -558,7 +558,7 @@ namespace OpenRCT2::Ui::Windows
case OBJECTIVE_REPAY_LOAN_AND_PARK_VALUE:
if (gameState.ScenarioObjective.Currency <= ObjectiveCurrencyLoanAndValueMin)
{
ContextShowError(STR_CANT_REDUCE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {});
}
else
{
@ -569,7 +569,7 @@ namespace OpenRCT2::Ui::Windows
case OBJECTIVE_MONTHLY_FOOD_INCOME:
if (gameState.ScenarioObjective.Currency <= ObjectiveCurrencyFoodMin)
{
ContextShowError(STR_CANT_REDUCE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {});
}
else
{
@ -580,7 +580,7 @@ namespace OpenRCT2::Ui::Windows
case OBJECTIVE_10_ROLLERCOASTERS_LENGTH:
if (gameState.ScenarioObjective.MinimumLength <= ObjectiveLengthMin)
{
ContextShowError(STR_CANT_REDUCE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {});
}
else
{
@ -591,7 +591,7 @@ namespace OpenRCT2::Ui::Windows
case OBJECTIVE_FINISH_5_ROLLERCOASTERS:
if (gameState.ScenarioObjective.MinimumExcitement <= ObjectiveExcitementMin)
{
ContextShowError(STR_CANT_REDUCE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {});
}
else
{
@ -602,7 +602,7 @@ namespace OpenRCT2::Ui::Windows
default:
if (gameState.ScenarioObjective.NumGuests <= ObjectiveGuestsMin)
{
ContextShowError(STR_CANT_REDUCE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {});
}
else
{
@ -618,7 +618,7 @@ namespace OpenRCT2::Ui::Windows
auto& gameState = GetGameState();
if (gameState.ScenarioObjective.Year >= ObjectiveYearMax)
{
ContextShowError(STR_CANT_INCREASE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {});
}
else
{
@ -632,7 +632,7 @@ namespace OpenRCT2::Ui::Windows
auto& gameState = GetGameState();
if (gameState.ScenarioObjective.Year <= ObjectiveYearMin)
{
ContextShowError(STR_CANT_REDUCE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {});
}
else
{

View file

@ -40,7 +40,7 @@ namespace OpenRCT2::Ui::Windows
struct EntranceSelection
{
ObjectEntryIndex entryIndex = OBJECT_ENTRY_INDEX_NULL;
StringId stringId = STR_NONE;
StringId stringId = kStringIdNone;
ImageIndex imageId = kSpriteIdNull;
};
@ -61,7 +61,7 @@ namespace OpenRCT2::Ui::Windows
static Widget _widgets[] = {
WINDOW_SHIM(kWindowTitle, kWindowWidth, kWindowHeight),
MakeWidget ({ 0, 43 }, { kWindowWidth, kWindowHeight - 43 }, WindowWidgetType::Resize, WindowColour::Secondary ),
MakeTab ({ 3, 17 }, STR_NONE ),
MakeTab ({ 3, 17 }, kStringIdNone ),
MakeWidget ({ 2, 45 }, { kScrollWidth, kScrollHeight }, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_VERTICAL ),
MakeWidget ({ kWindowWidth - 26, 59 }, { 24, 24 }, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_ROTATE_ARROW), STR_ROTATE_OBJECTS_90 ),
};

View file

@ -51,7 +51,7 @@ namespace OpenRCT2::Ui::Windows
WINDOW_EDITOR_SCENARIO_OPTIONS_PAGE_COUNT
};
static constexpr StringId ClimateNames[] = {
static constexpr StringId kClimateNames[] = {
STR_CLIMATE_COOL_AND_WET,
STR_CLIMATE_WARM,
STR_CLIMATE_HOT_AND_DRY,
@ -161,10 +161,10 @@ namespace OpenRCT2::Ui::Windows
MakeRemapWidget ({ 65, 17}, { 31, 27}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_TAB, STR_SCENARIO_OPTIONS_PARK_TIP ),
MakeSpinnerWidgets({188, 48}, { 70, 12}, WindowWidgetType::Spinner, WindowColour::Secondary ), // NB: 3 widgets
MakeSpinnerWidgets({188, 65}, { 70, 12}, WindowWidgetType::Spinner, WindowColour::Secondary ), // NB: 3 widgets
MakeWidget ({ 8, 82}, { 210, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_NONE, STR_PAY_FOR_PARK_PAY_FOR_RIDES_TIP),
MakeWidget ({ 8, 82}, { 210, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, kStringIdNone, STR_PAY_FOR_PARK_PAY_FOR_RIDES_TIP),
MakeWidget ({206, 83}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_PAY_FOR_PARK_PAY_FOR_RIDES_TIP),
MakeSpinnerWidgets({328, 82}, { 67, 12}, WindowWidgetType::Spinner, WindowColour::Secondary ), // NB: 3 widgets
MakeWidget ({188, 99}, { 207, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_NONE, STR_SELECT_CLIMATE_TIP ),
MakeWidget ({188, 99}, { 207, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, kStringIdNone, STR_SELECT_CLIMATE_TIP ),
MakeWidget ({383, 100}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_SELECT_CLIMATE_TIP ),
MakeWidget ({ 8, 116}, {WW_PARK - 16, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_FORBID_TREE_REMOVAL, STR_FORBID_TREE_REMOVAL_TIP ),
MakeWidget ({ 8, 133}, {WW_PARK - 16, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_FORBID_LANDSCAPE_CHANGES, STR_FORBID_LANDSCAPE_CHANGES_TIP ),
@ -417,7 +417,7 @@ namespace OpenRCT2::Ui::Windows
for (i = 0; i < static_cast<uint8_t>(ClimateType::Count); i++)
{
gDropdownItems[i].Format = STR_DROPDOWN_MENU_LABEL;
gDropdownItems[i].Args = ClimateNames[i];
gDropdownItems[i].Args = kClimateNames[i];
}
WindowDropdownShowTextCustomWidth(
{ windowPos.x + dropdownWidget.left, windowPos.y + dropdownWidget.top }, dropdownWidget.height() + 1,
@ -439,7 +439,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_INCREASE_CASH, STR_NONE, {});
ContextShowError(STR_CANT_INCREASE_CASH, kStringIdNone, {});
}
Invalidate();
break;
@ -452,7 +452,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_REDUCE_CASH, STR_NONE, {});
ContextShowError(STR_CANT_REDUCE_CASH, kStringIdNone, {});
}
Invalidate();
break;
@ -465,7 +465,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_INCREASE_INIT_LOAN, STR_NONE, {});
ContextShowError(STR_CANT_INCREASE_INIT_LOAN, kStringIdNone, {});
}
Invalidate();
break;
@ -478,7 +478,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_REDUCE_INIT_LOAN, STR_NONE, {});
ContextShowError(STR_CANT_REDUCE_INIT_LOAN, kStringIdNone, {});
}
Invalidate();
break;
@ -491,7 +491,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_INCREASE_MAX_LOAN, STR_NONE, {});
ContextShowError(STR_CANT_INCREASE_MAX_LOAN, kStringIdNone, {});
}
Invalidate();
break;
@ -504,7 +504,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_REDUCE_MAX_LOAN, STR_NONE, {});
ContextShowError(STR_CANT_REDUCE_MAX_LOAN, kStringIdNone, {});
}
Invalidate();
break;
@ -517,7 +517,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_INCREASE_INTEREST_RATE, STR_NONE, {});
ContextShowError(STR_CANT_INCREASE_INTEREST_RATE, kStringIdNone, {});
}
Invalidate();
break;
@ -530,7 +530,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_REDUCE_INTEREST_RATE, STR_NONE, {});
ContextShowError(STR_CANT_REDUCE_INTEREST_RATE, kStringIdNone, {});
}
Invalidate();
break;
@ -718,7 +718,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_INCREASE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {});
}
Invalidate();
break;
@ -731,7 +731,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_REDUCE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {});
}
Invalidate();
break;
@ -744,7 +744,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_INCREASE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {});
}
Invalidate();
break;
@ -757,7 +757,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_REDUCE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {});
}
Invalidate();
break;
@ -770,7 +770,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_INCREASE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {});
}
Invalidate();
break;
@ -783,7 +783,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_REDUCE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {});
}
Invalidate();
break;
@ -796,7 +796,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_INCREASE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {});
}
Invalidate();
break;
@ -809,7 +809,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_REDUCE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {});
}
Invalidate();
break;
@ -992,7 +992,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_INCREASE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {});
}
Invalidate();
break;
@ -1005,7 +1005,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_REDUCE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {});
}
Invalidate();
break;
@ -1018,7 +1018,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_INCREASE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {});
}
Invalidate();
break;
@ -1031,7 +1031,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_REDUCE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {});
}
Invalidate();
break;
@ -1044,7 +1044,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_INCREASE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {});
}
Invalidate();
break;
@ -1057,7 +1057,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_REDUCE_FURTHER, STR_NONE, {});
ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {});
}
Invalidate();
break;
@ -1246,7 +1246,7 @@ namespace OpenRCT2::Ui::Windows
// Climate value
screenCoords = windowPos + ScreenCoordsXY{ climateWidget.left + 1, climateWidget.top };
auto ft = Formatter();
ft.Add<StringId>(ClimateNames[EnumValue(gameState.Climate)]);
ft.Add<StringId>(kClimateNames[EnumValue(gameState.Climate)]);
DrawTextBasic(dpi, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft);
}

View file

@ -722,7 +722,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ft.Add<StringId>(STR_NONE);
ft.Add<StringId>(kStringIdNone);
}
break;
}

View file

@ -705,7 +705,7 @@ namespace OpenRCT2::Ui::Windows
defaultIndex = numPathTypes;
}
gDropdownItems[numPathTypes].Format = STR_NONE;
gDropdownItems[numPathTypes].Format = kStringIdNone;
Dropdown::SetImage(numPathTypes, ImageId(pathType->PreviewImageId));
_dropdownEntries.push_back({ ObjectType::FootpathSurface, i });
numPathTypes++;
@ -730,7 +730,7 @@ namespace OpenRCT2::Ui::Windows
defaultIndex = numPathTypes;
}
gDropdownItems[numPathTypes].Format = STR_NONE;
gDropdownItems[numPathTypes].Format = kStringIdNone;
Dropdown::SetImage(
numPathTypes, ImageId(showQueues ? pathEntry->GetQueuePreviewImage() : pathEntry->GetPreviewImage()));
_dropdownEntries.push_back({ ObjectType::Paths, i });
@ -764,7 +764,7 @@ namespace OpenRCT2::Ui::Windows
defaultIndex = numRailingsTypes;
}
gDropdownItems[numRailingsTypes].Format = STR_NONE;
gDropdownItems[numRailingsTypes].Format = kStringIdNone;
Dropdown::SetImage(numRailingsTypes, ImageId(railingsEntry->PreviewImageId));
_dropdownEntries.push_back({ ObjectType::FootpathRailings, i });
numRailingsTypes++;

View file

@ -352,7 +352,7 @@ namespace OpenRCT2::Ui::Windows
StringId stringId;
auto ft = GetMapTooltip();
std::memcpy(&stringId, ft.Data(), sizeof(StringId));
if (stringId == STR_NONE)
if (stringId == kStringIdNone)
{
// TODO: this string probably shouldn't be reused for this
DrawTextWrapped(

View file

@ -950,7 +950,7 @@ namespace OpenRCT2::Ui::Windows
gPickupPeepImage = ImageId();
auto info = GetMapCoordinatesFromPos(screenCoords, ViewportInteractionItemAll);
auto info = GetMapCoordinatesFromPos(screenCoords, kViewportInteractionItemAll);
if (info.interactionType == ViewportInteractionItem::None)
return;

View file

@ -223,7 +223,7 @@ namespace OpenRCT2::Ui::Windows
auto guestRide = GetRide(RideId::FromUnderlying(index));
if (guestRide != nullptr)
{
ft.Add<StringId>(STR_NONE);
ft.Add<StringId>(kStringIdNone);
guestRide->FormatNameTo(ft);
_selectedFilter = GuestFilterType::GuestsThinking;
@ -459,7 +459,7 @@ namespace OpenRCT2::Ui::Windows
{
if (_selectedFilter)
{
if (_filterArguments.GetFirstStringId() != STR_NONE)
if (_filterArguments.GetFirstStringId() != kStringIdNone)
{
format = GetFilterString(*_selectedFilter);
}
@ -808,9 +808,9 @@ namespace OpenRCT2::Ui::Windows
{
auto guestViewType = _selectedFilter == GuestFilterType::Guests ? GuestViewType::Actions : GuestViewType::Thoughts;
auto peepArgs = GetArgumentsFromPeep(peep, guestViewType);
if (_filterArguments.GetFirstStringId() == STR_NONE && _selectedFilter == GuestFilterType::GuestsThinking)
if (_filterArguments.GetFirstStringId() == kStringIdNone && _selectedFilter == GuestFilterType::GuestsThinking)
{
Formatter(peepArgs.args).Add<StringId>(STR_NONE);
Formatter(peepArgs.args).Add<StringId>(kStringIdNone);
}
return _filterArguments == peepArgs;
}
@ -865,7 +865,7 @@ namespace OpenRCT2::Ui::Windows
// Remove empty group (basically guests with no thoughts)
auto foundGroup = std::find_if(std::begin(_groups), std::end(_groups), [](GuestGroup& group) {
return group.Arguments.GetFirstStringId() == STR_EMPTY;
return group.Arguments.GetFirstStringId() == kStringIdEmpty;
});
if (foundGroup != std::end(_groups))
{

View file

@ -372,7 +372,7 @@ namespace OpenRCT2::Ui::Windows
if (!Path::CreateDirectory(destPath))
{
LOG_ERROR("Unable to create directory '%s'", destPath.c_str());
ContextShowError(STR_CANT_SAVE_TRACK_DESIGN, STR_NONE, {});
ContextShowError(STR_CANT_SAVE_TRACK_DESIGN, kStringIdNone, {});
return;
}
@ -381,7 +381,7 @@ namespace OpenRCT2::Ui::Windows
if (File::Exists(destPath))
{
LOG_INFO("%s already exists, prompting user for a different track design name", destPath.c_str());
ContextShowError(STR_UNABLE_TO_INSTALL_THIS_TRACK_DESIGN, STR_NONE, {});
ContextShowError(STR_UNABLE_TO_INSTALL_THIS_TRACK_DESIGN, kStringIdNone, {});
WindowTextInputRawOpen(
this, WIDX_INSTALL, STR_SELECT_NEW_NAME_FOR_TRACK_DESIGN,
STR_AN_EXISTING_TRACK_DESIGN_ALREADY_HAS_THIS_NAME, {}, _trackName.c_str(), 255);
@ -394,7 +394,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CANT_SAVE_TRACK_DESIGN, STR_NONE, {});
ContextShowError(STR_CANT_SAVE_TRACK_DESIGN, kStringIdNone, {});
}
}
}
@ -405,7 +405,7 @@ namespace OpenRCT2::Ui::Windows
auto trackDesign = TrackDesignImport(path);
if (trackDesign == nullptr)
{
ContextShowError(STR_UNABLE_TO_LOAD_FILE, STR_NONE, {});
ContextShowError(STR_UNABLE_TO_LOAD_FILE, kStringIdNone, {});
return nullptr;
}

View file

@ -56,7 +56,7 @@ namespace OpenRCT2::Ui::Windows
WINDOW_SHIM(WINDOW_TITLE, WW, WH),
MakeWidget ({19, 19}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_UP), STR_ENABLE_MOUNTAIN_TOOL_TIP), // mountain mode
MakeWidget ({55, 19}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_PAINTBRUSH), STR_DISABLE_ELEVATION), // paint mode
MakeWidget ({27, 48}, {44, 32}, WindowWidgetType::ImgBtn, WindowColour::Primary , ImageId(SPR_LAND_TOOL_SIZE_0), STR_NONE), // preview box
MakeWidget ({27, 48}, {44, 32}, WindowWidgetType::ImgBtn, WindowColour::Primary , ImageId(SPR_LAND_TOOL_SIZE_0), kStringIdNone), // preview box
MakeRemapWidget({28, 49}, {16, 16}, WindowWidgetType::TrnBtn, WindowColour::Secondary, SPR_LAND_TOOL_DECREASE, STR_ADJUST_SMALLER_LAND_TIP), // decrement size
MakeRemapWidget({54, 63}, {16, 16}, WindowWidgetType::TrnBtn, WindowColour::Secondary, SPR_LAND_TOOL_INCREASE, STR_ADJUST_LARGER_LAND_TIP), // increment size
MakeWidget ({ 2, 106}, {47, 36}, WindowWidgetType::FlatBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_CHANGE_BASE_LAND_TIP), // floor texture
@ -82,7 +82,8 @@ namespace OpenRCT2::Ui::Windows
Formatter ft;
ft.Add<uint16_t>(kLandToolMinimumSize);
ft.Add<uint16_t>(kLandToolMaximumSize);
WindowTextInputOpen(this, WIDX_PREVIEW, STR_SELECTION_SIZE, STR_ENTER_SELECTION_SIZE, ft, STR_NONE, STR_NONE, 3);
WindowTextInputOpen(
this, WIDX_PREVIEW, STR_SELECTION_SIZE, STR_ENTER_SELECTION_SIZE, ft, kStringIdNone, kStringIdNone, 3);
}
public:

View file

@ -580,7 +580,8 @@ namespace OpenRCT2::Ui::Windows
Formatter ft;
ft.Add<uint16_t>(kLandToolMinimumSize);
ft.Add<uint16_t>(kLandToolMaximumSize);
WindowTextInputOpen(this, WIDX_PREVIEW, STR_SELECTION_SIZE, STR_ENTER_SELECTION_SIZE, ft, STR_NONE, STR_NONE, 3);
WindowTextInputOpen(
this, WIDX_PREVIEW, STR_SELECTION_SIZE, STR_ENTER_SELECTION_SIZE, ft, kStringIdNone, kStringIdNone, 3);
}
};

View file

@ -82,7 +82,7 @@ namespace OpenRCT2::Ui::Windows
// clang-format off
static constexpr Widget window_loadsave_widgets[] =
{
WINDOW_SHIM(STR_NONE, WW, WH),
WINDOW_SHIM(kStringIdNone, WW, WH),
MakeWidget({ 0, 15 }, { WW, WH - 15 }, WindowWidgetType::Resize, WindowColour::Secondary ), // WIDX_RESIZE
MakeWidget({ 4, 36 }, { 84, 14 }, WindowWidgetType::Button, WindowColour::Primary, STR_LOADSAVE_DEFAULT, STR_LOADSAVE_DEFAULT_TIP), // WIDX_DEFAULT
MakeWidget({ 88, 36 }, { 84, 14 }, WindowWidgetType::Button, WindowColour::Primary, STR_FILEBROWSER_ACTION_UP ), // WIDX_UP
@ -284,7 +284,7 @@ namespace OpenRCT2::Ui::Windows
{
if (!IsValidPath(path))
{
ContextShowError(STR_ERROR_INVALID_CHARACTERS, STR_NONE, {});
ContextShowError(STR_ERROR_INVALID_CHARACTERS, kStringIdNone, {});
return;
}
@ -444,7 +444,7 @@ namespace OpenRCT2::Ui::Windows
{
OpenRCT2::Ui::FileDialogDesc desc = {};
u8string extension;
StringId title = STR_NONE;
StringId title = kStringIdNone;
switch (_type & 0x0E)
{
case LOADSAVETYPE_GAME:
@ -923,7 +923,7 @@ namespace OpenRCT2::Ui::Windows
const auto drawButtonCaption = [dpi, this](
Widget& widget, StringId strId, FileBrowserSort ascSort,
FileBrowserSort descSort) {
StringId indicatorId = STR_NONE;
StringId indicatorId = kStringIdNone;
if (Config::Get().general.LoadSaveSort == ascSort)
indicatorId = STR_UP;
else if (Config::Get().general.LoadSaveSort == descSort)
@ -974,12 +974,13 @@ namespace OpenRCT2::Ui::Windows
case WIDX_NEW_FILE:
WindowTextInputOpen(
this, WIDX_NEW_FILE, STR_NONE, STR_FILEBROWSER_FILE_NAME_PROMPT, {}, STR_STRING,
this, WIDX_NEW_FILE, kStringIdNone, STR_FILEBROWSER_FILE_NAME_PROMPT, {}, STR_STRING,
reinterpret_cast<uintptr_t>(_defaultPath.c_str()), 64);
break;
case WIDX_NEW_FOLDER:
WindowTextInputRawOpen(this, WIDX_NEW_FOLDER, STR_NONE, STR_FILEBROWSER_FOLDER_NAME_PROMPT, {}, "", 64);
WindowTextInputRawOpen(
this, WIDX_NEW_FOLDER, kStringIdNone, STR_FILEBROWSER_FOLDER_NAME_PROMPT, {}, "", 64);
break;
case WIDX_BROWSE:
@ -1121,7 +1122,7 @@ namespace OpenRCT2::Ui::Windows
if (!Platform::IsFilenameValid(text))
{
ContextShowError(STR_ERROR_INVALID_CHARACTERS, STR_NONE, {});
ContextShowError(STR_ERROR_INVALID_CHARACTERS, kStringIdNone, {});
return;
}
@ -1132,7 +1133,7 @@ namespace OpenRCT2::Ui::Windows
const u8string path = Path::Combine(_directory, text);
if (!Path::CreateDirectory(path))
{
ContextShowError(STR_UNABLE_TO_CREATE_FOLDER, STR_NONE, {});
ContextShowError(STR_UNABLE_TO_CREATE_FOLDER, kStringIdNone, {});
return;
}

View file

@ -1129,7 +1129,7 @@ namespace OpenRCT2::Ui::Windows
Formatter ft;
ft.Add<int16_t>(kMinimumMapSizePractical);
ft.Add<int16_t>(kMaximumMapSizePractical);
TextInputOpen(callingWidget, STR_MAP_SIZE_2, STR_ENTER_MAP_SIZE, ft, STR_NONE, STR_NONE, 4);
TextInputOpen(callingWidget, STR_MAP_SIZE_2, STR_ENTER_MAP_SIZE, ft, kStringIdNone, kStringIdNone, 4);
}
CoordsXY ScreenToMap(ScreenCoordsXY screenCoords)

View file

@ -50,7 +50,7 @@ namespace OpenRCT2::Ui::Windows
{
StringId stringId;
std::memcpy(&stringId, _mapTooltipArgs.Data(), sizeof(StringId));
if (stringId == STR_NONE)
if (stringId == kStringIdNone)
{
return;
}
@ -97,7 +97,7 @@ namespace OpenRCT2::Ui::Windows
auto& im = GetInputManager();
auto* wm = GetWindowManager();
if (_cursorHoldDuration < 25 || stringId == STR_NONE || im.IsModifierKeyPressed(ModifierKey::ctrl)
if (_cursorHoldDuration < 25 || stringId == kStringIdNone || im.IsModifierKeyPressed(ModifierKey::ctrl)
|| im.IsModifierKeyPressed(ModifierKey::shift) || wm->FindByClass(WindowClass::Error) != nullptr)
{
WindowCloseByClass(WindowClass::MapTooltip);

View file

@ -295,7 +295,7 @@ namespace OpenRCT2::Ui::Windows
else
{
ft.Increment(4);
ft.Add<StringId>(STR_NONE);
ft.Add<StringId>(kStringIdNone);
}
}

View file

@ -65,7 +65,7 @@ namespace OpenRCT2::Ui::Windows
#define MAIN_MULTIPLAYER_WIDGETS \
MakeWidget({ 0, 0}, {340, 240}, WindowWidgetType::Frame, WindowColour::Primary ), /* panel / background */ \
MakeWidget({ 1, 1}, {338, 14}, WindowWidgetType::Caption, WindowColour::Primary, STR_NONE, STR_WINDOW_TITLE_TIP ), /* title bar */ \
MakeWidget({ 1, 1}, {338, 14}, WindowWidgetType::Caption, WindowColour::Primary, kStringIdNone, STR_WINDOW_TITLE_TIP ), /* title bar */ \
MakeWidget({327, 2}, { 11, 12}, WindowWidgetType::CloseBox, WindowColour::Primary, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP ), /* close x button */ \
MakeWidget({ 0, 43}, {340, 197}, WindowWidgetType::Resize, WindowColour::Secondary ), /* content panel */ \
MakeTab ({ 3, 17}, STR_SHOW_SERVER_INFO_TIP), /* tab */ \

View file

@ -27,7 +27,7 @@ namespace OpenRCT2::Ui::Windows
// clang-format off
static constexpr Widget window_network_status_widgets[] = {
MakeWidget({ 0, 0}, {400, 91}, WindowWidgetType::Frame, WindowColour::Primary ), // panel / background
MakeWidget({ 1, 1}, {397, 14}, WindowWidgetType::Caption, WindowColour::Primary, STR_NONE, STR_WINDOW_TITLE_TIP), // title bar
MakeWidget({ 1, 1}, {397, 14}, WindowWidgetType::Caption, WindowColour::Primary, kStringIdNone, STR_WINDOW_TITLE_TIP), // title bar
MakeWidget({388, 2}, { 11, 12}, WindowWidgetType::CloseBox, WindowColour::Primary, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP), // close x button
};
// clang-format on

View file

@ -26,7 +26,7 @@
namespace OpenRCT2::Ui::Windows
{
static constexpr StringId WINDOW_TITLE = STR_NONE;
static constexpr StringId WINDOW_TITLE = kStringIdNone;
static constexpr int32_t WH = 109;
static constexpr int32_t WW = 350;
@ -50,11 +50,11 @@ namespace OpenRCT2::Ui::Windows
// clang-format off
static constexpr Widget window_new_campaign_widgets[] = {
WINDOW_SHIM(WINDOW_TITLE, WW, WH),
MakeWidget ({ 14, 24}, {126, 12}, WindowWidgetType::Label, WindowColour::Primary, STR_EMPTY ), // ride label
MakeWidget ({100, 24}, {242, 12}, WindowWidgetType::DropdownMenu, WindowColour::Primary, STR_EMPTY ), // ride dropdown
MakeWidget ({ 14, 24}, {126, 12}, WindowWidgetType::Label, WindowColour::Primary, kStringIdEmpty ), // ride label
MakeWidget ({100, 24}, {242, 12}, WindowWidgetType::DropdownMenu, WindowColour::Primary, kStringIdEmpty ), // ride dropdown
MakeWidget ({330, 25}, { 11, 10}, WindowWidgetType::Button, WindowColour::Primary, STR_DROPDOWN_GLYPH ), // ride dropdown button
MakeWidget ({ 14, 41}, {126, 14}, WindowWidgetType::Label, WindowColour::Primary, STR_LENGTH_OF_TIME ), // weeks label
MakeSpinnerWidgets({120, 41}, {100, 14}, WindowWidgetType::Spinner, WindowColour::Primary, STR_EMPTY ), // weeks (3 widgets)
MakeSpinnerWidgets({120, 41}, {100, 14}, WindowWidgetType::Spinner, WindowColour::Primary, kStringIdEmpty ), // weeks (3 widgets)
MakeWidget ({ 14, 89}, {322, 14}, WindowWidgetType::Button, WindowColour::Primary, STR_MARKETING_START_THIS_MARKETING_CAMPAIGN), // start button
};
// clang-format on
@ -160,10 +160,10 @@ namespace OpenRCT2::Ui::Windows
}
}
if (RideList.size() > Dropdown::ItemsMaxSize)
if (RideList.size() > Dropdown::kItemsMaxSize)
{
std::sort(RideList.begin(), RideList.end(), RideValueCompare);
RideList.resize(Dropdown::ItemsMaxSize);
RideList.resize(Dropdown::kItemsMaxSize);
}
// Sort rides by name
@ -209,7 +209,7 @@ namespace OpenRCT2::Ui::Windows
if (!ShopItems.empty())
{
int32_t numItems = 0;
int32_t maxSize = std::min(Dropdown::ItemsMaxSize, static_cast<int32_t>(ShopItems.size()));
int32_t maxSize = std::min(Dropdown::kItemsMaxSize, static_cast<int32_t>(ShopItems.size()));
for (int32_t i = 0; i < maxSize; i++)
{
gDropdownItems[i].Format = STR_DROPDOWN_MENU_LABEL;
@ -353,7 +353,7 @@ namespace OpenRCT2::Ui::Windows
}
// Set current number of weeks spinner (moved to paint due to required parameter)
widgets[WIDX_WEEKS_SPINNER].text = STR_NONE;
widgets[WIDX_WEEKS_SPINNER].text = kStringIdNone;
// Enable / disable start button based on ride dropdown
WidgetSetDisabled(*this, WIDX_START_BUTTON, false);

View file

@ -42,7 +42,7 @@ using namespace OpenRCT2::TrackMetaData;
namespace OpenRCT2::Ui::Windows
{
static constexpr StringId WindowTitle = STR_NONE;
static constexpr StringId WindowTitle = kStringIdNone;
static constexpr int32_t WindowHeight = 382;
static constexpr int32_t WindowWidth = 601;
static constexpr int32_t RideListItemsMax = 384;
@ -640,7 +640,7 @@ namespace OpenRCT2::Ui::Windows
{
auto& objMgr = OpenRCT2::GetContext()->GetObjectManager();
auto obj = objMgr.GetLoadedObject<RideObject>(rideSelection.EntryIndex);
return obj == nullptr ? ImageIndexUndefined : obj->GetPreviewImage(rideSelection.Type);
return obj == nullptr ? kImageIndexUndefined : obj->GetPreviewImage(rideSelection.Type);
}
void PopulateRideList()

View file

@ -245,7 +245,7 @@ namespace OpenRCT2::Ui::Windows
MakeWidget ({155, 83}, {145, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_ARG_16_RESOLUTION_X_BY_Y ),
MakeWidget ({288, 84}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_DISPLAY_RESOLUTION_TIP ),
MakeWidget ({ 10, 98}, {145, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_UI_SCALING_DESC, STR_WINDOW_SCALE_TIP ), // Scale
MakeSpinnerWidgets({155, 98}, {145, 12}, WindowWidgetType::Spinner, WindowColour::Secondary, STR_NONE, STR_WINDOW_SCALE_TIP ), // Scale spinner (3 widgets)
MakeSpinnerWidgets({155, 98}, {145, 12}, WindowWidgetType::Spinner, WindowColour::Secondary, kStringIdNone, STR_WINDOW_SCALE_TIP ), // Scale spinner (3 widgets)
MakeWidget ({ 10, 113}, {145, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_DRAWING_ENGINE, STR_DRAWING_ENGINE_TIP ), // Drawing engine
MakeWidget ({155, 113}, {145, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ), // Drawing engine
MakeWidget ({288, 114}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_DRAWING_ENGINE_TIP ),
@ -270,7 +270,7 @@ namespace OpenRCT2::Ui::Windows
MakeWidget({ 10, kFrameRenderingStart + 60}, {281, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_SHOW_GUEST_PURCHASES, STR_SHOW_GUEST_PURCHASES_TIP ), // Guest purchases
MakeWidget({ 10, kFrameRenderingStart + 75}, {281, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_TRANSPARENT_SCREENSHOT, STR_TRANSPARENT_SCREENSHOT_TIP), // Transparent screenshot
MakeWidget({ 10, kFrameRenderingStart + 90}, {281, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_VIRTUAL_FLOOR_STYLE, STR_VIRTUAL_FLOOR_STYLE_TIP ), // Virtual floor
MakeWidget({155, kFrameRenderingStart + 90}, {145, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_NONE, STR_VIRTUAL_FLOOR_STYLE_TIP ), // Virtual floor dropdown
MakeWidget({155, kFrameRenderingStart + 90}, {145, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, kStringIdNone, STR_VIRTUAL_FLOOR_STYLE_TIP ), // Virtual floor dropdown
MakeWidget({288, kFrameRenderingStart + 91}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_VIRTUAL_FLOOR_STYLE_TIP ), // Virtual floor dropdown
MakeWidget({ 5, kFrameEffectStart + 0}, {300, 94}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_EFFECTS_GROUP ), // Rendering group
@ -392,11 +392,11 @@ namespace OpenRCT2::Ui::Windows
MakeWidget ({165, 113}, {135, 13}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ), // Autosave dropdown
MakeWidget ({288, 114}, { 11, 11}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_AUTOSAVE_FREQUENCY_TIP ), // Autosave dropdown button
MakeWidget ({ 23, 130}, {135, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_AUTOSAVE_AMOUNT, STR_AUTOSAVE_AMOUNT_TIP ),
MakeSpinnerWidgets({165, 130}, {135, 12}, WindowWidgetType::Spinner, WindowColour::Secondary, STR_NONE, STR_AUTOSAVE_AMOUNT_TIP ), // Autosave amount spinner
MakeSpinnerWidgets({165, 130}, {135, 12}, WindowWidgetType::Spinner, WindowColour::Secondary, kStringIdNone, STR_AUTOSAVE_AMOUNT_TIP ), // Autosave amount spinner
MakeWidget ({ 23, 145}, {276, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_PATH_TO_RCT1, STR_PATH_TO_RCT1_TIP ), // RCT 1 path text
MakeWidget ({ 24, 160}, {266, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_NONE, STR_STRING_TOOLTIP ), // RCT 1 path button
MakeWidget ({ 24, 160}, {266, 14}, WindowWidgetType::Button, WindowColour::Secondary, kStringIdNone, STR_STRING_TOOLTIP ), // RCT 1 path button
MakeWidget ({289, 160}, { 11, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_CLOSE_X, STR_PATH_TO_RCT1_CLEAR_TIP ), // RCT 1 path clear button
MakeWidget ({150, 176}, {150, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_EDIT_ASSET_PACKS_BUTTON, STR_NONE ), // Asset packs
MakeWidget ({150, 176}, {150, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_EDIT_ASSET_PACKS_BUTTON, kStringIdNone ), // Asset packs
};
static constexpr std::span<const Widget> window_options_page_widgets[] = {
@ -1110,7 +1110,7 @@ namespace OpenRCT2::Ui::Windows
gDropdownItems[i].Args = CurrencyDescriptors[i].stringId;
}
gDropdownItems[numOrdinaryCurrencies].Format = Dropdown::SeparatorString;
gDropdownItems[numOrdinaryCurrencies].Format = Dropdown::kSeparatorString;
gDropdownItems[numOrdinaryCurrencies + 1].Format = STR_DROPDOWN_MENU_LABEL;
gDropdownItems[numOrdinaryCurrencies + 1].Args = CurrencyDescriptors[EnumValue(CurrencyType::Custom)]
@ -1224,7 +1224,7 @@ namespace OpenRCT2::Ui::Windows
if (LanguageOpen(fallbackLanguage))
{
// It worked, so we can say it with error message in-game
ContextShowError(STR_LANGUAGE_LOAD_FAILED, STR_NONE, {});
ContextShowError(STR_LANGUAGE_LOAD_FAILED, kStringIdNone, {});
}
// report error to console regardless
LOG_ERROR("Failed to open language file.");
@ -1260,7 +1260,7 @@ namespace OpenRCT2::Ui::Windows
// Distance: metric / imperial / si
{
StringId stringId = STR_NONE;
StringId stringId = kStringIdNone;
switch (Config::Get().general.MeasurementFormat)
{
case MeasurementFormat::Imperial:
@ -1927,21 +1927,21 @@ namespace OpenRCT2::Ui::Windows
Config::Get().general.RCT1Path = std::move(rct1path);
Config::Get().interface.ScenarioselectLastTab = 0;
Config::Save();
ContextShowError(STR_RESTART_REQUIRED, STR_NONE, {});
ContextShowError(STR_RESTART_REQUIRED, kStringIdNone, {});
}
else
{
ContextShowError(STR_PATH_TO_RCT1_IS_WRONG_VERSION, STR_NONE, {});
ContextShowError(STR_PATH_TO_RCT1_IS_WRONG_VERSION, kStringIdNone, {});
}
}
else
{
ContextShowError(STR_PATH_TO_RCT1_DOES_NOT_CONTAIN_CSG1I_DAT, STR_NONE, {});
ContextShowError(STR_PATH_TO_RCT1_DOES_NOT_CONTAIN_CSG1I_DAT, kStringIdNone, {});
}
}
else
{
ContextShowError(STR_PATH_TO_RCT1_WRONG_ERROR, STR_NONE, {});
ContextShowError(STR_PATH_TO_RCT1_WRONG_ERROR, kStringIdNone, {});
}
}
Invalidate();
@ -2051,7 +2051,7 @@ namespace OpenRCT2::Ui::Windows
if (Config::Get().general.RCT1Path.empty())
{
// No tooltip if the path is empty
return { STR_NONE, {} };
return { kStringIdNone, {} };
}
auto ft = Formatter();

View file

@ -869,8 +869,8 @@ namespace OpenRCT2::Ui::Windows
PrepareWindowTitleText();
// Show a tooltip if the park is pay per ride.
widgets[WIDX_PRICE_LABEL].tooltip = STR_NONE;
widgets[WIDX_PRICE].tooltip = STR_NONE;
widgets[WIDX_PRICE_LABEL].tooltip = kStringIdNone;
widgets[WIDX_PRICE].tooltip = kStringIdNone;
if (!Park::EntranceFeeUnlocked())
{

View file

@ -263,7 +263,8 @@ namespace OpenRCT2::Ui::Windows
Formatter ft;
ft.Add<uint16_t>(kLandToolMinimumSize);
ft.Add<uint16_t>(kLandToolMaximumSize);
WindowTextInputOpen(this, WIDX_PREVIEW, STR_SELECTION_SIZE, STR_ENTER_SELECTION_SIZE, ft, STR_NONE, STR_NONE, 3);
WindowTextInputOpen(
this, WIDX_PREVIEW, STR_SELECTION_SIZE, STR_ENTER_SELECTION_SIZE, ft, kStringIdNone, kStringIdNone, 3);
}
bool PatrolAreaToolIsActive()

View file

@ -220,7 +220,7 @@ namespace OpenRCT2::Ui::Windows
void SetProgress(uint32_t currentProgress, uint32_t totalCount, StringId format)
{
if (format == STR_NONE)
if (format == kStringIdNone)
_progressFormat = STR_STRING_M_OF_N;
else
_progressFormat = format;

View file

@ -441,7 +441,7 @@ namespace OpenRCT2::Ui::Windows
if (gameState.ResearchLastItem.has_value())
{
StringId lastDevelopmentFormat = STR_EMPTY;
StringId lastDevelopmentFormat = kStringIdEmpty;
auto ft = Formatter();
if (gameState.ResearchLastItem->type == Research::EntryType::Scenery)
{

View file

@ -280,7 +280,7 @@ namespace OpenRCT2::Ui::Windows
MakeWidget ({ 7, 50}, {302, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ),
MakeWidget ({297, 51}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH ),
MakeWidget ({ 7, 137}, {302, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_OPTION_REVERSE_TRAINS, STR_OPTION_REVERSE_TRAINS_TIP ),
MakeWidget ({ 7, 154}, {302, 43}, WindowWidgetType::Scroll, WindowColour::Secondary, STR_EMPTY ),
MakeWidget ({ 7, 154}, {302, 43}, WindowWidgetType::Scroll, WindowColour::Secondary, kStringIdEmpty ),
MakeSpinnerWidgets({ 7, 203}, {145, 12}, WindowWidgetType::Spinner, WindowColour::Secondary, STR_RIDE_VEHICLE_COUNT, STR_MAX_VEHICLES_TIP ),
MakeSpinnerWidgets({164, 203}, {145, 12}, WindowWidgetType::Spinner, WindowColour::Secondary, STR_1_CAR_PER_TRAIN, STR_MAX_CARS_PER_TRAIN_TIP),
};
@ -310,7 +310,7 @@ namespace OpenRCT2::Ui::Windows
// 0x009AE190
static constexpr Widget _maintenanceWidgets[] = {
MAIN_RIDE_WIDGETS,
MakeWidget({107, 71}, {202, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_EMPTY, STR_SELECT_HOW_OFTEN_A_MECHANIC_SHOULD_CHECK_THIS_RIDE),
MakeWidget({107, 71}, {202, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, kStringIdEmpty, STR_SELECT_HOW_OFTEN_A_MECHANIC_SHOULD_CHECK_THIS_RIDE),
MakeWidget({297, 72}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_SELECT_HOW_OFTEN_A_MECHANIC_SHOULD_CHECK_THIS_RIDE),
MakeWidget({289, 108}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_LOCATE_NEAREST_AVAILABLE_MECHANIC_TIP ),
MakeWidget({265, 108}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_CONSTRUCTION), STR_REFURBISH_RIDE_TIP ),
@ -332,9 +332,9 @@ namespace OpenRCT2::Ui::Windows
MakeWidget({301, 50}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH ),
MakeWidget({289, 68}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_PAINTBRUSH), STR_PAINT_INDIVIDUAL_AREA_TIP ),
MakeWidget({245, 101}, { 68, 47}, WindowWidgetType::Spinner, WindowColour::Secondary ),
MakeWidget({103, 103}, {139, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_EMPTY ),
MakeWidget({103, 103}, {139, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, kStringIdEmpty ),
MakeWidget({230, 104}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_SELECT_STYLE_OF_ENTRANCE_EXIT_STATION_TIP),
MakeWidget({ 3, 157}, { 68, 47}, WindowWidgetType::Scroll, WindowColour::Secondary, STR_EMPTY ),
MakeWidget({ 3, 157}, { 68, 47}, WindowWidgetType::Scroll, WindowColour::Secondary, kStringIdEmpty ),
MakeWidget({ 74, 157}, {239, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_ARG_6_STRINGID ),
MakeWidget({301, 158}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_SELECT_VEHICLE_COLOUR_SCHEME_TIP ),
MakeWidget({ 74, 173}, {239, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ),
@ -350,7 +350,7 @@ namespace OpenRCT2::Ui::Windows
static constexpr Widget _musicWidgets[] = {
MAIN_RIDE_WIDGETS,
MakeWidget({ 7, 47}, {302, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_PLAY_MUSIC, STR_SELECT_MUSIC_TIP ),
MakeWidget({ 7, 62}, {302, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_EMPTY ),
MakeWidget({ 7, 62}, {302, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, kStringIdEmpty ),
MakeWidget({297, 63}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_SELECT_MUSIC_STYLE_TIP),
MakeWidget({154, 90}, {114, 114}, WindowWidgetType::FlatBtn, WindowColour::Secondary ),
MakeWidget({ 7, 90}, {500, 450}, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_BOTH ),
@ -2070,7 +2070,7 @@ namespace OpenRCT2::Ui::Windows
PopulateVehicleTypeDropdown(*ride);
size_t numItems = std::min<size_t>(_vehicleDropdownData.size(), Dropdown::ItemsMaxSize);
size_t numItems = std::min<size_t>(_vehicleDropdownData.size(), Dropdown::kItemsMaxSize);
for (size_t i = 0; i < numItems; i++)
{
@ -2452,7 +2452,7 @@ namespace OpenRCT2::Ui::Windows
StringId GetStatusOverallView(Formatter& ft) const
{
auto stringId = STR_NONE;
auto stringId = kStringIdNone;
auto ride = GetRide(rideId);
if (ride != nullptr)
{
@ -2470,11 +2470,11 @@ namespace OpenRCT2::Ui::Windows
{
auto ride = GetRide(rideId);
if (ride == nullptr)
return STR_EMPTY;
return kStringIdEmpty;
auto vehicle = GetEntity<Vehicle>(ride->vehicles[_viewIndex - 1]);
if (vehicle == nullptr)
return STR_EMPTY;
return kStringIdEmpty;
auto& rtd = ride->GetRideTypeDescriptor();
if (vehicle->status != Vehicle::Status::Crashing && vehicle->status != Vehicle::Status::Crashed)
@ -2494,7 +2494,7 @@ namespace OpenRCT2::Ui::Windows
}
if (rtd.specialType == RtdSpecialType::miniGolf)
return STR_EMPTY;
return kStringIdEmpty;
auto stringId = VehicleStatusNames[EnumValue(vehicle->status)];
if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::singleSession)
@ -2520,16 +2520,16 @@ namespace OpenRCT2::Ui::Windows
{
auto ride = GetRide(rideId);
if (ride == nullptr)
return STR_NONE;
return kStringIdNone;
const auto stationIndex = GetStationIndexFromViewSelection();
if (!stationIndex)
{
return STR_NONE;
return kStringIdNone;
}
const auto& station = ride->GetStation(*stationIndex);
StringId stringId = STR_EMPTY;
StringId stringId = kStringIdEmpty;
// Entrance / exit
if (ride->status == RideStatus::Closed)
{
@ -2544,7 +2544,7 @@ namespace OpenRCT2::Ui::Windows
stringId = STR_EXIT_ONLY;
}
// Queue length
if (stringId == STR_EMPTY)
if (stringId == kStringIdEmpty)
{
stringId = STR_QUEUE_EMPTY;
uint16_t queueLength = ride->GetStation(*stationIndex).QueueLength;
@ -2724,7 +2724,7 @@ namespace OpenRCT2::Ui::Windows
{
auto ride = GetRide(rideId);
if (ride == nullptr)
return { STR_NONE, {} };
return { kStringIdNone, {} };
switch (widgetIndex)
{
@ -2751,7 +2751,7 @@ namespace OpenRCT2::Ui::Windows
{
auto rideEntry = ride->GetRideEntry();
if (rideEntry == nullptr)
return { STR_NONE, {} };
return { kStringIdNone, {} };
auto ft = Formatter();
ft.Increment(16);
@ -3012,7 +3012,7 @@ namespace OpenRCT2::Ui::Windows
VehicleColour vehicleColour = RideGetVehicleColour(*ride, vehicleColourIndex);
ImageIndex imageIndex = carEntry.SpriteByYaw(
OpenRCT2::Entity::Yaw::BaseRotation / 2, SpriteGroupType::SlopeFlat);
OpenRCT2::Entity::Yaw::kBaseRotation / 2, SpriteGroupType::SlopeFlat);
if (isReversed)
{
auto baseRotation = carEntry.NumRotationSprites(SpriteGroupType::SlopeFlat);
@ -3730,7 +3730,7 @@ namespace OpenRCT2::Ui::Windows
mechanic = RideFindClosestMechanic(*ride, 1);
if (mechanic == nullptr)
ContextShowError(STR_UNABLE_TO_LOCATE_MECHANIC, STR_NONE, {});
ContextShowError(STR_UNABLE_TO_LOCATE_MECHANIC, kStringIdNone, {});
else
{
auto intent = Intent(WindowClass::Peep);
@ -3803,7 +3803,7 @@ namespace OpenRCT2::Ui::Windows
case WIDX_FORCE_BREAKDOWN:
numItems = 1;
for (j = 0; j < RCT2::ObjectLimits::MaxRideTypesPerRideEntry; j++)
for (j = 0; j < RCT2::ObjectLimits::kMaxRideTypesPerRideEntry; j++)
{
if (rideEntry->ride_type[j] != RIDE_TYPE_NULL)
break;
@ -3827,7 +3827,7 @@ namespace OpenRCT2::Ui::Windows
}
if (numItems == 1)
{
ContextShowError(STR_DEBUG_NO_BREAKDOWNS_AVAILABLE, STR_NONE, {});
ContextShowError(STR_DEBUG_NO_BREAKDOWNS_AVAILABLE, kStringIdNone, {});
}
else
{
@ -3943,7 +3943,7 @@ namespace OpenRCT2::Ui::Windows
else
{
int32_t j;
for (j = 0; j < RCT2::ObjectLimits::MaxRideTypesPerRideEntry; j++)
for (j = 0; j < RCT2::ObjectLimits::kMaxRideTypesPerRideEntry; j++)
{
if (rideEntry->ride_type[j] != RIDE_TYPE_NULL)
break;
@ -4115,11 +4115,11 @@ namespace OpenRCT2::Ui::Windows
stringId = STR_MECHANIC_IS_FIXING_THE_RIDE;
break;
default:
stringId = STR_EMPTY;
stringId = kStringIdEmpty;
break;
}
if (stringId != STR_EMPTY)
if (stringId != kStringIdEmpty)
{
if (stringId == STR_CALLING_MECHANIC || stringId == STR_NO_MECHANICS_ARE_HIRED_MESSAGE)
{
@ -4393,7 +4393,7 @@ namespace OpenRCT2::Ui::Windows
stringId = ride->vehicleColourSettings == VehicleColourSettings::perTrain ? STR_RIDE_COLOUR_TRAIN_OPTION
: STR_RIDE_COLOUR_VEHICLE_OPTION;
auto dropdownIndex = 0;
for (auto i = 0; i < std::min(numItems, Dropdown::ItemsMaxSize); i++)
for (auto i = 0; i < std::min(numItems, Dropdown::kItemsMaxSize); i++)
{
if (ride->vehicleColourSettings == VehicleColourSettings::perCar)
{
@ -4676,7 +4676,7 @@ namespace OpenRCT2::Ui::Windows
widgets[WIDX_ENTRANCE_STYLE].type = WindowWidgetType::DropdownMenu;
widgets[WIDX_ENTRANCE_STYLE_DROPDOWN].type = WindowWidgetType::Button;
auto stringId = STR_NONE;
auto stringId = kStringIdNone;
auto stationObj = ride->GetStationObject();
if (stationObj != nullptr)
{
@ -4899,7 +4899,7 @@ namespace OpenRCT2::Ui::Windows
GfxClear(clippedDpi, PALETTE_INDEX_12);
auto stationObj = ride->GetStationObject();
if (stationObj != nullptr && stationObj->BaseImageId != ImageIndexUndefined)
if (stationObj != nullptr && stationObj->BaseImageId != kImageIndexUndefined)
{
auto imageId = ImageId(stationObj->BaseImageId, trackColour.main, trackColour.additional);
@ -5185,7 +5185,7 @@ namespace OpenRCT2::Ui::Windows
widgets[WIDX_MUSIC_DROPDOWN].left = width - 19;
// Set selected music
StringId musicName = STR_NONE;
StringId musicName = kStringIdNone;
auto musicObj = ride->GetMusicObject();
if (musicObj != nullptr)
{
@ -5399,7 +5399,7 @@ namespace OpenRCT2::Ui::Windows
}
if (errMessage.HasMessage())
{
ContextShowError(errMessage.Message, STR_EMPTY, {});
ContextShowError(errMessage.Message, kStringIdEmpty, {});
}
}
@ -5990,7 +5990,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
return { STR_NONE, {} };
return { kStringIdNone, {} };
}
return { fallback, {} };
}
@ -6525,8 +6525,8 @@ namespace OpenRCT2::Ui::Windows
pressed_widgets &= ~(1uLL << WIDX_PRIMARY_PRICE_SAME_THROUGHOUT_PARK);
disabled_widgets &= ~(1uLL << WIDX_PRIMARY_PRICE);
widgets[WIDX_PRIMARY_PRICE_LABEL].tooltip = STR_NONE;
widgets[WIDX_PRIMARY_PRICE].tooltip = STR_NONE;
widgets[WIDX_PRIMARY_PRICE_LABEL].tooltip = kStringIdNone;
widgets[WIDX_PRIMARY_PRICE].tooltip = kStringIdNone;
// If ride prices are locked, do not allow setting the price, unless we're dealing with a shop or toilet.
const auto& rtd = ride->GetRideTypeDescriptor();

View file

@ -2248,7 +2248,7 @@ namespace OpenRCT2::Ui::Windows
_currentTrackPrice = kMoney64Undefined;
_trackPlaceCost = kMoney64Undefined;
_trackPlaceErrorMessage = STR_NONE;
_trackPlaceErrorMessage = kStringIdNone;
RideConstructionInvalidateCurrentTrack();
if (WindowRideConstructionUpdateState(
&trackType, &trackDirection, &rideIndex, &liftHillAndAlternativeState, &trackPos, &properties))
@ -2284,7 +2284,7 @@ namespace OpenRCT2::Ui::Windows
else
{
_trackPlaceCost = res.Cost;
_trackPlaceErrorMessage = STR_NONE;
_trackPlaceErrorMessage = kStringIdNone;
}
if (res.Error != GameActions::Status::Ok)
@ -3624,7 +3624,7 @@ namespace OpenRCT2::Ui::Windows
if (mazeSetTrackResult.Error == GameActions::Status::Ok)
{
_trackPlaceCost = mazeSetTrackResult.Cost;
_trackPlaceErrorMessage = STR_NONE;
_trackPlaceErrorMessage = kStringIdNone;
}
else
{

View file

@ -32,7 +32,7 @@
namespace OpenRCT2::Ui::Windows
{
static constexpr StringId WINDOW_TITLE = STR_NONE;
static constexpr StringId WINDOW_TITLE = kStringIdNone;
static constexpr int32_t WH = 240;
static constexpr int32_t WW = 340;

View file

@ -42,8 +42,8 @@ namespace OpenRCT2::Ui::Windows
// clang-format off
static constexpr Widget _savePromptWidgets[] = {
WINDOW_SHIM_WHITE(STR_NONE, WW_SAVE, WH_SAVE),
MakeWidget({ 2, 19}, {256, 12}, WindowWidgetType::LabelCentred, WindowColour::Primary, STR_EMPTY ), // question/label
WINDOW_SHIM_WHITE(kStringIdNone, WW_SAVE, WH_SAVE),
MakeWidget({ 2, 19}, {256, 12}, WindowWidgetType::LabelCentred, WindowColour::Primary, kStringIdEmpty ), // question/label
MakeWidget({ 8, 35}, { 78, 14}, WindowWidgetType::Button, WindowColour::Primary, STR_SAVE_PROMPT_SAVE ), // save
MakeWidget({ 91, 35}, { 78, 14}, WindowWidgetType::Button, WindowColour::Primary, STR_SAVE_PROMPT_DONT_SAVE), // don't save
MakeWidget({174, 35}, { 78, 14}, WindowWidgetType::Button, WindowColour::Primary, STR_SAVE_PROMPT_CANCEL ), // cancel

View file

@ -548,7 +548,7 @@ namespace OpenRCT2::Ui::Windows
continue;
// Category heading
StringId headingStringId = STR_NONE;
StringId headingStringId = kStringIdNone;
if (Config::Get().general.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN)
{
if (selected_tab != static_cast<uint8_t>(ScenarioSource::Real) && currentHeading != scenario->Category)
@ -582,7 +582,7 @@ namespace OpenRCT2::Ui::Windows
}
}
if (headingStringId != STR_NONE)
if (headingStringId != kStringIdNone)
{
ScenarioListItem headerItem;
headerItem.type = ListItemType::Heading;

View file

@ -66,7 +66,7 @@ using namespace OpenRCT2::Numerics;
namespace OpenRCT2::Ui::Windows
{
static constexpr StringId WINDOW_TITLE = STR_NONE;
static constexpr StringId WINDOW_TITLE = kStringIdNone;
constexpr int32_t WINDOW_SCENERY_MIN_WIDTH = 634;
constexpr int32_t WINDOW_SCENERY_MIN_HEIGHT = 195;
constexpr int32_t SCENERY_BUTTON_WIDTH = 66;
@ -627,7 +627,7 @@ namespace OpenRCT2::Ui::Windows
}
}
}
return { STR_NONE, Formatter() };
return { kStringIdNone, Formatter() };
}
void OnPrepareDraw() override

View file

@ -88,7 +88,7 @@ namespace OpenRCT2::Ui::Windows
break;
}
WindowTextInputOpen(
this, widgetIndex, STR_SELECTION_SIZE, STR_ENTER_SELECTION_SIZE, ft, STR_NONE, STR_NONE, maxLength);
this, widgetIndex, STR_SELECTION_SIZE, STR_ENTER_SELECTION_SIZE, ft, kStringIdNone, kStringIdNone, maxLength);
}
void OnMouseUp(WidgetIndex widgetIndex) override

View file

@ -156,7 +156,7 @@ namespace OpenRCT2::Ui::Windows
ServerListFetchServersBegin();
break;
case WIDX_ADD_SERVER:
TextInputOpen(widgetIndex, STR_ADD_SERVER, STR_ENTER_HOSTNAME_OR_IP_ADDRESS, {}, STR_NONE, 0, 128);
TextInputOpen(widgetIndex, STR_ADD_SERVER, STR_ENTER_HOSTNAME_OR_IP_ADDRESS, {}, kStringIdNone, 0, 128);
break;
case WIDX_START_SERVER:
ContextOpenWindow(WindowClass::ServerStart);
@ -265,7 +265,7 @@ namespace OpenRCT2::Ui::Windows
selected_list_item = itemIndex;
_showNetworkVersionTooltip = showNetworkVersionTooltip;
listWidget.tooltip = showNetworkVersionTooltip ? static_cast<StringId>(STR_NETWORK_VERSION_TIP) : STR_NONE;
listWidget.tooltip = showNetworkVersionTooltip ? static_cast<StringId>(STR_NETWORK_VERSION_TIP) : kStringIdNone;
WindowTooltipClose();
Invalidate();
@ -465,7 +465,7 @@ namespace OpenRCT2::Ui::Windows
{
}
auto status = STR_NONE;
auto status = kStringIdNone;
try
{
auto entries = wanF.get();
@ -499,7 +499,7 @@ namespace OpenRCT2::Ui::Windows
_serverList.WriteFavourites(); // Update favourites in case favourited server info changes
_numPlayersOnline = _serverList.GetTotalPlayerCount();
_statusText = STR_X_PLAYERS_ONLINE;
if (statusText != STR_NONE)
if (statusText != kStringIdNone)
{
_statusText = statusText;
}
@ -584,7 +584,7 @@ namespace OpenRCT2::Ui::Windows
if (!NetworkBeginClient(address, port))
{
ContextShowError(STR_UNABLE_TO_CONNECT_TO_SERVER, STR_NONE, {});
ContextShowError(STR_UNABLE_TO_CONNECT_TO_SERVER, kStringIdNone, {});
}
}
} // namespace OpenRCT2::Ui::Windows

View file

@ -163,7 +163,7 @@ namespace OpenRCT2::Ui::Windows
struct ShortcutStringPair
{
std::string ShortcutId;
::StringId StringId = STR_NONE;
::StringId StringId = kStringIdNone;
std::string CustomString;
std::string Binding;
};
@ -454,7 +454,7 @@ namespace OpenRCT2::Ui::Windows
int32_t x = 3;
for (size_t i = 0; i < _tabs.size(); i++)
{
auto tab = MakeTab({ x, 17 }, STR_NONE);
auto tab = MakeTab({ x, 17 }, kStringIdNone);
widgets.push_back(tab);
x += 31;
}

View file

@ -684,7 +684,7 @@ namespace OpenRCT2::Ui::Windows
gPickupPeepImage = ImageId();
auto info = GetMapCoordinatesFromPos(screenCoords, ViewportInteractionItemAll);
auto info = GetMapCoordinatesFromPos(screenCoords, kViewportInteractionItemAll);
if (info.interactionType == ViewportInteractionItem::None)
return;
@ -859,7 +859,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
widgets[WIDX_COSTUME_BOX].text = STR_EMPTY;
widgets[WIDX_COSTUME_BOX].text = kStringIdEmpty;
widgets[WIDX_COSTUME_BOX].flags &= ~WIDGET_FLAGS::TEXT_IS_STRING;
}

View file

@ -87,8 +87,8 @@ namespace OpenRCT2::Ui::Windows
MakeTab ({ 65, 17}, STR_STAFF_SECURITY_TAB_TIP ), // security guards tab
MakeTab ({ 96, 17}, STR_STAFF_ENTERTAINERS_TAB_TIP ), // entertainers tab
MakeWidget({ 3, 72}, {WW - 6, 195}, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_VERTICAL ), // staff list
MakeWidget({130, 58}, { 12, 12}, WindowWidgetType::ColourBtn, WindowColour::Secondary, STR_NONE, STR_UNIFORM_COLOUR_TIP ), // uniform colour picker
MakeWidget({165, 17}, { 145, 13}, WindowWidgetType::Button, WindowColour::Primary , STR_NONE, STR_HIRE_STAFF_TIP ), // hire button
MakeWidget({130, 58}, { 12, 12}, WindowWidgetType::ColourBtn, WindowColour::Secondary, kStringIdNone, STR_UNIFORM_COLOUR_TIP ), // uniform colour picker
MakeWidget({165, 17}, { 145, 13}, WindowWidgetType::Button, WindowColour::Primary , kStringIdNone, STR_HIRE_STAFF_TIP ), // hire button
MakeWidget({243, 46}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_DEMOLISH), STR_QUICK_FIRE_STAFF ), // quick fire staff
MakeWidget({267, 46}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_PATROL_BTN), STR_SHOW_PATROL_AREA_TIP ), // show staff patrol area tool
MakeWidget({291, 46}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_MAP), STR_SHOW_STAFF_ON_MAP_TIP), // show staff on map button
@ -483,7 +483,7 @@ namespace OpenRCT2::Ui::Windows
{
auto ft = Formatter();
ft.Add<StringId>(GetStaffNamingConvention(GetSelectedStaffType()).Plural);
ContextShowError(STR_NO_THING_IN_PARK_YET, STR_NONE, ft);
ContextShowError(STR_NO_THING_IN_PARK_YET, kStringIdNone, ft);
}
}
}

View file

@ -35,7 +35,7 @@ namespace OpenRCT2::Ui::Windows
};
static constexpr Widget _textInputWidgets[] = {
WINDOW_SHIM(STR_NONE, WW, WH),
WINDOW_SHIM(kStringIdNone, WW, WH),
MakeWidget({ 170, 68 }, { 71, 14 }, WindowWidgetType::Button, WindowColour::Secondary, STR_CANCEL),
MakeWidget({ 10, 68 }, { 71, 14 }, WindowWidgetType::Button, WindowColour::Secondary, STR_OK),
};
@ -46,10 +46,10 @@ namespace OpenRCT2::Ui::Windows
WidgetIdentifier _parentWidget{};
std::string _title;
StringId _titleStringId = STR_NONE;
StringId _titleStringId = kStringIdNone;
std::string _description;
StringId _descriptionStringId = STR_NONE;
StringId _descriptionStringId = kStringIdNone;
Formatter _descriptionArgs;
std::function<void(std::string_view)> _callback;
@ -101,9 +101,9 @@ namespace OpenRCT2::Ui::Windows
void SetTitle(std::string_view title, std::string_view description)
{
_titleStringId = STR_NONE;
_titleStringId = kStringIdNone;
_title = title;
_descriptionStringId = STR_NONE;
_descriptionStringId = kStringIdNone;
_description = description;
}
@ -182,7 +182,7 @@ namespace OpenRCT2::Ui::Windows
widgets[WIDX_BACKGROUND].bottom = newHeight - 1;
// Set window title argument
if (_titleStringId == STR_NONE)
if (_titleStringId == kStringIdNone)
{
auto ft = Formatter::Common();
ft.Add<const char*>(_title.c_str());
@ -203,7 +203,7 @@ namespace OpenRCT2::Ui::Windows
int32_t no_lines = 0;
if (_descriptionStringId == STR_NONE)
if (_descriptionStringId == kStringIdNone)
{
auto ft = Formatter();
ft.Add<const char*>(_description.c_str());

View file

@ -529,7 +529,7 @@ namespace OpenRCT2::Ui::Windows
case WIDX_THEMES_RCT1_RIDE_LIGHTS:
if (ThemeGetFlags() & UITHEME_FLAG_PREDEFINED)
{
ContextShowError(STR_THEMES_ERR_CANT_CHANGE_THIS_THEME, STR_NONE, {});
ContextShowError(STR_THEMES_ERR_CANT_CHANGE_THIS_THEME, kStringIdNone, {});
}
else
{
@ -541,7 +541,7 @@ namespace OpenRCT2::Ui::Windows
case WIDX_THEMES_RCT1_PARK_LIGHTS:
if (ThemeGetFlags() & UITHEME_FLAG_PREDEFINED)
{
ContextShowError(STR_THEMES_ERR_CANT_CHANGE_THIS_THEME, STR_NONE, {});
ContextShowError(STR_THEMES_ERR_CANT_CHANGE_THIS_THEME, kStringIdNone, {});
}
else
{
@ -553,7 +553,7 @@ namespace OpenRCT2::Ui::Windows
case WIDX_THEMES_RCT1_SCENARIO_FONT:
if (ThemeGetFlags() & UITHEME_FLAG_PREDEFINED)
{
ContextShowError(STR_THEMES_ERR_CANT_CHANGE_THIS_THEME, STR_NONE, {});
ContextShowError(STR_THEMES_ERR_CANT_CHANGE_THIS_THEME, kStringIdNone, {});
}
else
{
@ -566,7 +566,7 @@ namespace OpenRCT2::Ui::Windows
case WIDX_THEMES_RCT1_BOTTOM_TOOLBAR:
if (ThemeGetFlags() & UITHEME_FLAG_PREDEFINED)
{
ContextShowError(STR_THEMES_ERR_CANT_CHANGE_THIS_THEME, STR_NONE, {});
ContextShowError(STR_THEMES_ERR_CANT_CHANGE_THIS_THEME, kStringIdNone, {});
}
else
{
@ -597,7 +597,7 @@ namespace OpenRCT2::Ui::Windows
case WIDX_THEMES_DELETE_BUTTON:
if (ThemeGetFlags() & UITHEME_FLAG_PREDEFINED)
{
ContextShowError(STR_THEMES_ERR_CANT_CHANGE_THIS_THEME, STR_NONE, {});
ContextShowError(STR_THEMES_ERR_CANT_CHANGE_THIS_THEME, kStringIdNone, {});
}
else
{
@ -607,7 +607,7 @@ namespace OpenRCT2::Ui::Windows
case WIDX_THEMES_RENAME_BUTTON:
if (ThemeGetFlags() & UITHEME_FLAG_PREDEFINED)
{
ContextShowError(STR_THEMES_ERR_CANT_CHANGE_THIS_THEME, STR_NONE, {});
ContextShowError(STR_THEMES_ERR_CANT_CHANGE_THIS_THEME, kStringIdNone, {});
}
else
{
@ -673,12 +673,12 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_THEMES_ERR_NAME_ALREADY_EXISTS, STR_NONE, {});
ContextShowError(STR_THEMES_ERR_NAME_ALREADY_EXISTS, kStringIdNone, {});
}
}
else
{
ContextShowError(STR_ERROR_INVALID_CHARACTERS, STR_NONE, {});
ContextShowError(STR_ERROR_INVALID_CHARACTERS, kStringIdNone, {});
}
break;
}

View file

@ -301,8 +301,8 @@ namespace OpenRCT2::Ui::Windows
MakeWidget(GhostFlagColumnXY, GhostFlagColumnSize, WindowWidgetType::TableHeader, WindowColour::Secondary, STR_TILE_INSPECTOR_FLAG_GHOST_SHORT, STR_TILE_INSPECTOR_FLAG_GHOST), /* Ghost flag */ \
MakeWidget(LastFlagColumnXY, LastFlagColumnSize, WindowWidgetType::TableHeader, WindowColour::Secondary, STR_TILE_INSPECTOR_FLAG_LAST_SHORT, STR_TILE_INSPECTOR_FLAG_LAST), /* Last of tile flag */ \
/* Group boxes */ \
MakeWidget({6, 0}, {WW - 12, 0}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_NONE, STR_NONE ), /* Details group box */ \
MakeWidget({6, 0}, {WW - 12, 0}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_TILE_INSPECTOR_GROUPBOX_PROPERTIES, STR_NONE ) /* Properties group box */
MakeWidget({6, 0}, {WW - 12, 0}, WindowWidgetType::Groupbox, WindowColour::Secondary, kStringIdNone, kStringIdNone ), /* Details group box */ \
MakeWidget({6, 0}, {WW - 12, 0}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_TILE_INSPECTOR_GROUPBOX_PROPERTIES, kStringIdNone ) /* Properties group box */
static constexpr Widget DefaultWidgets[] = {
MAIN_TILE_INSPECTOR_WIDGETS,
@ -1093,7 +1093,7 @@ static uint64_t PageDisabledWidgets[] = {
{
// Details
// Terrain texture name
StringId terrainNameId = STR_EMPTY;
StringId terrainNameId = kStringIdEmpty;
auto surfaceStyle = tileElement->AsSurface()->GetSurfaceObject();
if (surfaceStyle != nullptr)
terrainNameId = surfaceStyle->NameStringId;
@ -1102,7 +1102,7 @@ static uint64_t PageDisabledWidgets[] = {
DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_SURFACE_TERAIN, ft, { colours[1] });
// Edge texture name
StringId terrainEdgeNameId = STR_EMPTY;
StringId terrainEdgeNameId = kStringIdEmpty;
auto edgeStyle = tileElement->AsSurface()->GetEdgeObject();
if (edgeStyle != nullptr)
terrainEdgeNameId = edgeStyle->NameStringId;

View file

@ -194,7 +194,7 @@ namespace OpenRCT2::Ui::Windows
if (!hasCustomItems)
{
hasCustomItems = true;
gDropdownItems[i++].Format = STR_EMPTY;
gDropdownItems[i++].Format = kStringIdEmpty;
}
gDropdownItems[i].Format = STR_STRING;

View file

@ -195,7 +195,7 @@ namespace OpenRCT2::Ui::Windows
gTooltipWidget.window_number = widgetWindow->number;
gTooltipWidget.widget_index = widgetIndex;
result = widgetWindow->OnTooltip(widgetIndex, stringId);
if (result.str == STR_NONE)
if (result.str == kStringIdNone)
return;
}

View file

@ -373,7 +373,7 @@ namespace OpenRCT2::Ui::Windows
}
else
{
ContextShowError(STR_CHAT_UNAVAILABLE, STR_NONE, {});
ContextShowError(STR_CHAT_UNAVAILABLE, kStringIdNone, {});
}
break;
}
@ -1179,7 +1179,7 @@ namespace OpenRCT2::Ui::Windows
const auto& customMenuItems = OpenRCT2::Scripting::CustomMenuItems;
if (!customMenuItems.empty())
{
gDropdownItems[i++].Format = STR_EMPTY;
gDropdownItems[i++].Format = kStringIdEmpty;
for (const auto& item : customMenuItems)
{
if (item.Kind == OpenRCT2::Scripting::CustomToolbarMenuItemKind::Standard)
@ -1253,7 +1253,7 @@ namespace OpenRCT2::Ui::Windows
gDropdownItems[3].Format = STR_TOGGLE_OPTION;
if (Config::Get().general.DebuggingTools)
{
gDropdownItems[4].Format = STR_EMPTY;
gDropdownItems[4].Format = kStringIdEmpty;
gDropdownItems[5].Format = STR_TOGGLE_OPTION;
gDropdownItems[5].Args = STR_SPEED_HYPER;
num_items = 6;
@ -1340,7 +1340,7 @@ namespace OpenRCT2::Ui::Windows
{
gDropdownItems[numItems++].Format = STR_SCREENSHOT;
gDropdownItems[numItems++].Format = STR_GIANT_SCREENSHOT;
gDropdownItems[numItems++].Format = STR_EMPTY;
gDropdownItems[numItems++].Format = kStringIdEmpty;
gDropdownItems[numItems++].Format = STR_ABOUT;
gDropdownItems[numItems++].Format = STR_FILE_BUG_ON_GITHUB;
@ -1348,7 +1348,7 @@ namespace OpenRCT2::Ui::Windows
gDropdownItems[numItems++].Format = STR_UPDATE_AVAILABLE;
gDropdownItems[numItems++].Format = STR_OPTIONS;
gDropdownItems[numItems++].Format = STR_EMPTY;
gDropdownItems[numItems++].Format = kStringIdEmpty;
if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER)
gDropdownItems[numItems++].Format = STR_QUIT_ROLLERCOASTER_DESIGNER;
@ -1360,12 +1360,12 @@ namespace OpenRCT2::Ui::Windows
else if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR)
{
gDropdownItems[numItems++].Format = STR_LOAD_LANDSCAPE;
gDropdownItems[numItems++].Format = STR_EMPTY;
gDropdownItems[numItems++].Format = kStringIdEmpty;
gDropdownItems[numItems++].Format = STR_SAVE_LANDSCAPE;
gDropdownItems[numItems++].Format = STR_EMPTY;
gDropdownItems[numItems++].Format = kStringIdEmpty;
gDropdownItems[numItems++].Format = STR_SCREENSHOT;
gDropdownItems[numItems++].Format = STR_GIANT_SCREENSHOT;
gDropdownItems[numItems++].Format = STR_EMPTY;
gDropdownItems[numItems++].Format = kStringIdEmpty;
gDropdownItems[numItems++].Format = STR_ABOUT;
gDropdownItems[numItems++].Format = STR_FILE_BUG_ON_GITHUB;
@ -1373,7 +1373,7 @@ namespace OpenRCT2::Ui::Windows
gDropdownItems[numItems++].Format = STR_UPDATE_AVAILABLE;
gDropdownItems[numItems++].Format = STR_OPTIONS;
gDropdownItems[numItems++].Format = STR_EMPTY;
gDropdownItems[numItems++].Format = kStringIdEmpty;
gDropdownItems[numItems++].Format = STR_QUIT_SCENARIO_EDITOR;
gDropdownItems[numItems++].Format = STR_EXIT_OPENRCT2;
}
@ -1381,13 +1381,13 @@ namespace OpenRCT2::Ui::Windows
{
gDropdownItems[numItems++].Format = STR_NEW_GAME;
gDropdownItems[numItems++].Format = STR_LOAD_GAME;
gDropdownItems[numItems++].Format = STR_EMPTY;
gDropdownItems[numItems++].Format = kStringIdEmpty;
gDropdownItems[numItems++].Format = STR_SAVE_GAME;
gDropdownItems[numItems++].Format = STR_SAVE_GAME_AS;
gDropdownItems[numItems++].Format = STR_EMPTY;
gDropdownItems[numItems++].Format = kStringIdEmpty;
gDropdownItems[numItems++].Format = STR_SCREENSHOT;
gDropdownItems[numItems++].Format = STR_GIANT_SCREENSHOT;
gDropdownItems[numItems++].Format = STR_EMPTY;
gDropdownItems[numItems++].Format = kStringIdEmpty;
gDropdownItems[numItems++].Format = STR_ABOUT;
gDropdownItems[numItems++].Format = STR_FILE_BUG_ON_GITHUB;
@ -1395,7 +1395,7 @@ namespace OpenRCT2::Ui::Windows
gDropdownItems[numItems++].Format = STR_UPDATE_AVAILABLE;
gDropdownItems[numItems++].Format = STR_OPTIONS;
gDropdownItems[numItems++].Format = STR_EMPTY;
gDropdownItems[numItems++].Format = kStringIdEmpty;
gDropdownItems[numItems++].Format = STR_QUIT_TO_MENU;
gDropdownItems[numItems++].Format = STR_EXIT_OPENRCT2;
}

View file

@ -159,7 +159,7 @@ namespace OpenRCT2::Ui::Windows
}
else if (text.empty())
{
ContextShowError(STR_CANT_RENAME_TRACK_DESIGN, STR_NONE, {});
ContextShowError(STR_CANT_RENAME_TRACK_DESIGN, kStringIdNone, {});
return;
}
else if (!Platform::IsFilenameValid(text))

View file

@ -154,7 +154,7 @@ namespace OpenRCT2::Ui::Windows
if (_loadedTrackDesignIndex != TRACK_DESIGN_INDEX_UNLOADED
&& (_loadedTrackDesign->gameStateData.hasFlag(TrackDesignGameStateFlag::VehicleUnavailable)))
{
ContextShowError(STR_THIS_DESIGN_WILL_BE_BUILT_WITH_AN_ALTERNATIVE_VEHICLE_TYPE, STR_NONE, {});
ContextShowError(STR_THIS_DESIGN_WILL_BE_BUILT_WITH_AN_ALTERNATIVE_VEHICLE_TYPE, kStringIdNone, {});
}
auto intent = Intent(WindowClass::TrackDesignPlace);
@ -377,7 +377,7 @@ namespace OpenRCT2::Ui::Windows
void OnPrepareDraw() override
{
StringId stringId = STR_NONE;
StringId stringId = kStringIdNone;
const auto* entry = GetRideEntryByIndex(_window_track_list_item.EntryIndex);
if (entry != nullptr)

View file

@ -75,12 +75,12 @@ namespace OpenRCT2::Ui::Windows
MakeWidget({152, 17}, HIDE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_GUESTS), STR_SEE_THROUGH_GUESTS),
MakeWidget({177, 17}, HIDE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_SEE_THROUGH_STAFF),
MakeWidget({ 2, 42}, INVISIBLE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Tertiary, STR_NONE, STR_INVISIBLE_VEGETATION),
MakeWidget({ 27, 42}, INVISIBLE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Tertiary, STR_NONE, STR_INVISIBLE_SCENERY),
MakeWidget({ 52, 42}, INVISIBLE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Tertiary, STR_NONE, STR_INVISIBLE_PATHS),
MakeWidget({ 77, 42}, INVISIBLE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Tertiary, STR_NONE, STR_INVISIBLE_RIDES),
MakeWidget({102, 42}, INVISIBLE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Tertiary, STR_NONE, STR_INVISIBLE_VEHICLES),
MakeWidget({127, 42}, INVISIBLE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Tertiary, STR_NONE, STR_INVISIBLE_SUPPORTS),
MakeWidget({ 2, 42}, INVISIBLE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Tertiary, kStringIdNone, STR_INVISIBLE_VEGETATION),
MakeWidget({ 27, 42}, INVISIBLE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Tertiary, kStringIdNone, STR_INVISIBLE_SCENERY),
MakeWidget({ 52, 42}, INVISIBLE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Tertiary, kStringIdNone, STR_INVISIBLE_PATHS),
MakeWidget({ 77, 42}, INVISIBLE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Tertiary, kStringIdNone, STR_INVISIBLE_RIDES),
MakeWidget({102, 42}, INVISIBLE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Tertiary, kStringIdNone, STR_INVISIBLE_VEHICLES),
MakeWidget({127, 42}, INVISIBLE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Tertiary, kStringIdNone, STR_INVISIBLE_SUPPORTS),
};
// clang-format on

View file

@ -56,7 +56,7 @@ namespace OpenRCT2::Ui::Windows
WINDOW_SHIM(WINDOW_TITLE, WW, WH),
MakeWidget ({ 11, 19}, { 159, 11}, WindowWidgetType::Checkbox, WindowColour::Primary, STR_VIEW_CLIPPING_HEIGHT_ENABLE, STR_VIEW_CLIPPING_HEIGHT_ENABLE_TIP ), // clip enable/disable check box
MakeWidget ({ 5, 36}, {WW - 10, 48}, WindowWidgetType::Groupbox, WindowColour::Primary, STR_VIEW_CLIPPING_VERTICAL_CLIPPING ),
MakeSpinnerWidgets({ 90, 51}, { 79, 12}, WindowWidgetType::Spinner, WindowColour::Primary, STR_NONE, STR_VIEW_CLIPPING_HEIGHT_VALUE_TOGGLE), // clip height (3 widgets)
MakeSpinnerWidgets({ 90, 51}, { 79, 12}, WindowWidgetType::Spinner, WindowColour::Primary, kStringIdNone, STR_VIEW_CLIPPING_HEIGHT_VALUE_TOGGLE), // clip height (3 widgets)
MakeWidget ({ 11, 66}, { 158, 13}, WindowWidgetType::Scroll, WindowColour::Primary, SCROLL_HORIZONTAL, STR_VIEW_CLIPPING_HEIGHT_SCROLL_TIP ), // clip height scrollbar
MakeWidget ({ 5, 90}, {WW - 10, 60}, WindowWidgetType::Groupbox, WindowColour::Primary, STR_VIEW_CLIPPING_HORIZONTAL_CLIPPING ),
MakeWidget ({ 11, 105}, { 158, 17}, WindowWidgetType::Button, WindowColour::Primary, STR_VIEW_CLIPPING_SELECT_AREA ), // selector

View file

@ -151,7 +151,7 @@ namespace OpenRCT2::Ui::Windows
if (mainWindow != nullptr)
{
auto info = GetMapCoordinatesFromPos(
{ windowPos.x + (width / 2), windowPos.y + (height / 2) }, ViewportInteractionItemAll);
{ windowPos.x + (width / 2), windowPos.y + (height / 2) }, kViewportInteractionItemAll);
WindowScrollToLocation(*mainWindow, { info.Loc, TileElementHeight(info.Loc) });
}
break;

View file

@ -42,7 +42,7 @@ namespace OpenRCT2::Ui::Windows
// clang-format off
static constexpr Widget _waterWidgets[] = {
WINDOW_SHIM(WINDOW_TITLE, WW, WH),
MakeWidget ({16, 17}, {44, 32}, WindowWidgetType::ImgBtn, WindowColour::Primary , ImageId(SPR_LAND_TOOL_SIZE_0), STR_NONE), // preview box
MakeWidget ({16, 17}, {44, 32}, WindowWidgetType::ImgBtn, WindowColour::Primary , ImageId(SPR_LAND_TOOL_SIZE_0), kStringIdNone), // preview box
MakeRemapWidget({17, 18}, {16, 16}, WindowWidgetType::TrnBtn, WindowColour::Tertiary, SPR_LAND_TOOL_DECREASE, STR_ADJUST_SMALLER_WATER_TIP), // decrement size
MakeRemapWidget({43, 32}, {16, 16}, WindowWidgetType::TrnBtn, WindowColour::Tertiary, SPR_LAND_TOOL_INCREASE, STR_ADJUST_LARGER_WATER_TIP), // increment size
};
@ -419,7 +419,8 @@ namespace OpenRCT2::Ui::Windows
Formatter ft;
ft.Add<uint16_t>(kLandToolMinimumSize);
ft.Add<uint16_t>(kLandToolMaximumSize);
WindowTextInputOpen(this, WIDX_PREVIEW, STR_SELECTION_SIZE, STR_ENTER_SELECTION_SIZE, ft, STR_NONE, STR_NONE, 3);
WindowTextInputOpen(
this, WIDX_PREVIEW, STR_SELECTION_SIZE, STR_ENTER_SELECTION_SIZE, ft, kStringIdNone, kStringIdNone, 3);
}
};

View file

@ -199,7 +199,7 @@ namespace OpenRCT2::Ui::Windows
// ProgressWindow
WindowBase* ProgressWindowOpen(const std::string& text, CloseCallback onClose = nullptr);
void ProgressWindowSet(uint32_t currentProgress, uint32_t totalCount, StringId format = STR_NONE);
void ProgressWindowSet(uint32_t currentProgress, uint32_t totalCount, StringId format = kStringIdNone);
void ProgressWindowClose();
// PatrolArea

View file

@ -411,14 +411,14 @@ namespace OpenRCT2
CrashInit();
if (String::equals(Config::Get().general.LastRunVersion, OPENRCT2_VERSION))
if (String::equals(Config::Get().general.LastRunVersion, kOpenRCT2Version))
{
gOpenRCT2ShowChangelog = false;
}
else
{
gOpenRCT2ShowChangelog = true;
Config::Get().general.LastRunVersion = OPENRCT2_VERSION;
Config::Get().general.LastRunVersion = kOpenRCT2Version;
Config::Save();
}
@ -665,7 +665,7 @@ namespace OpenRCT2
ContextOpenIntent(&intent);
}
void SetProgress(uint32_t currentProgress, uint32_t totalCount, StringId format = STR_NONE) override
void SetProgress(uint32_t currentProgress, uint32_t totalCount, StringId format = kStringIdNone) override
{
if (_forcedUpdateTimer.GetElapsedTime() < kForcedUpdateInterval)
return;
@ -741,7 +741,7 @@ namespace OpenRCT2
SetActiveScene(GetTitleScene());
}
auto windowManager = _uiContext->GetWindowManager();
windowManager->ShowError(STR_FAILED_TO_LOAD_FILE_CONTAINS_INVALID_DATA, STR_NONE, {});
windowManager->ShowError(STR_FAILED_TO_LOAD_FILE_CONTAINS_INVALID_DATA, kStringIdNone, {});
}
return false;
}
@ -867,14 +867,14 @@ namespace OpenRCT2
auto windowManager = _uiContext->GetWindowManager();
auto ft = Formatter();
ft.Add<uint32_t>(result.TargetVersion);
ft.Add<uint32_t>(OpenRCT2::PARK_FILE_CURRENT_VERSION);
ft.Add<uint32_t>(OpenRCT2::kParkFileCurrentVersion);
windowManager->ShowError(STR_WARNING_PARK_VERSION_TITLE, STR_WARNING_PARK_VERSION_MESSAGE, ft);
}
else if (HasObjectsThatUseFallbackImages())
{
Console::Error::WriteLine("Park has objects which require RCT1 linked. Fallback images will be used.");
auto windowManager = _uiContext->GetWindowManager();
windowManager->ShowError(STR_PARK_USES_FALLBACK_IMAGES_WARNING, STR_EMPTY, Formatter());
windowManager->ShowError(STR_PARK_USES_FALLBACK_IMAGES_WARNING, kStringIdEmpty, Formatter());
}
CloseProgress();
@ -909,7 +909,7 @@ namespace OpenRCT2
SetActiveScene(GetTitleScene());
}
auto windowManager = _uiContext->GetWindowManager();
windowManager->ShowError(STR_FILE_CONTAINS_UNSUPPORTED_RIDE_TYPES, STR_NONE, {});
windowManager->ShowError(STR_FILE_CONTAINS_UNSUPPORTED_RIDE_TYPES, kStringIdNone, {});
}
catch (const UnsupportedVersionException& e)
{
@ -921,7 +921,7 @@ namespace OpenRCT2
}
auto windowManager = _uiContext->GetWindowManager();
Formatter ft;
/*if (e.TargetVersion < PARK_FILE_MIN_SUPPORTED_VERSION)
/*if (e.TargetVersion < kParkFileMinSupportedVersion)
{
ft.Add<uint32_t>(e.TargetVersion);
windowManager->ShowError(STR_ERROR_PARK_VERSION_TITLE, STR_ERROR_PARK_VERSION_TOO_OLD_MESSAGE, ft);
@ -931,14 +931,14 @@ namespace OpenRCT2
if (e.MinVersion == e.TargetVersion)
{
ft.Add<uint32_t>(e.TargetVersion);
ft.Add<uint32_t>(OpenRCT2::PARK_FILE_CURRENT_VERSION);
ft.Add<uint32_t>(OpenRCT2::kParkFileCurrentVersion);
windowManager->ShowError(STR_ERROR_PARK_VERSION_TITLE, STR_ERROR_PARK_VERSION_TOO_NEW_MESSAGE_2, ft);
}
else
{
ft.Add<uint32_t>(e.TargetVersion);
ft.Add<uint32_t>(e.MinVersion);
ft.Add<uint32_t>(OpenRCT2::PARK_FILE_CURRENT_VERSION);
ft.Add<uint32_t>(OpenRCT2::kParkFileCurrentVersion);
windowManager->ShowError(STR_ERROR_PARK_VERSION_TITLE, STR_ERROR_PARK_VERSION_TOO_NEW_MESSAGE, ft);
}
}

View file

@ -160,7 +160,7 @@ namespace OpenRCT2
virtual void DisposeDrawingEngine() = 0;
virtual void OpenProgress(StringId captionStringId) = 0;
virtual void SetProgress(uint32_t currentProgress, uint32_t totalCount, StringId format = STR_NONE) = 0;
virtual void SetProgress(uint32_t currentProgress, uint32_t totalCount, StringId format = kStringIdNone) = 0;
virtual void CloseProgress() = 0;
virtual bool LoadParkFromFile(const u8string& path, bool loadTitleScreenOnFail = false, bool asScenario = false) = 0;

View file

@ -421,7 +421,7 @@ namespace OpenRCT2::Editor
const bool isTrackDesignerManager = gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER);
if (isTrackDesignerManager)
{
return { ObjectType::None, STR_NONE };
return { ObjectType::None, kStringIdNone };
}
if (!EditorCheckObjectGroupAtLeastOneSurfaceSelected(false))
@ -465,7 +465,7 @@ namespace OpenRCT2::Editor
}
}
return { ObjectType::None, STR_NONE };
return { ObjectType::None, kStringIdNone };
}
/**
@ -509,7 +509,7 @@ namespace OpenRCT2::Editor
return { false, STR_PEEP_SPAWNS_NOT_SET };
}
return { true, STR_NONE };
return { true, kStringIdNone };
}
uint8_t GetSelectedObjectFlags(ObjectType objectType, size_t index)

View file

@ -82,7 +82,7 @@ static bool TryClassifyAsPark(OpenRCT2::IStream* stream, ClassifiedFileInfo* res
try
{
auto magic = stream->ReadValue<uint32_t>();
if (magic == OpenRCT2::PARK_FILE_MAGIC)
if (magic == OpenRCT2::kParkFileMagic)
{
result->Type = FILE_TYPE::PARK;
result->Version = 0;

Some files were not shown because too many files have changed in this diff Show more