Rename more enum members to lowerCamelCase (#26608)

* Rename enums in Cheats.h

* Rename enums in Diagnostic.h

* Rename enums in Editor.h

* Rename enums in Input.h

* Rename enums in OpenRCT2.h

* Rename enums in ConfigTypes.h

* Rename enums in Identifier.hpp
This commit is contained in:
Harry Hopkinson authored and GitHub committed 2026-05-28 10:54:24 +00:00
1 parent 133c1fde0c
commit 8ce9661dc9
58 files changed
+284 -284

No files matched your search

+5 -5
View File
@@ -78,7 +78,7 @@ private:
SDL_Window* _window = nullptr;
int32_t _width = 0;
int32_t _height = 0;
ScaleQuality _scaleQuality = ScaleQuality::NearestNeighbour;
ScaleQuality _scaleQuality = ScaleQuality::nearestNeighbour;
std::vector<Resolution> _fsResolutions;
@@ -602,16 +602,16 @@ public:
void TriggerResize() override
{
char scaleQualityBuffer[4];
_scaleQuality = ScaleQuality::SmoothNearestNeighbour;
_scaleQuality = ScaleQuality::smoothNearestNeighbour;
if (Config::Get().general.windowScale == std::floor(Config::Get().general.windowScale))
{
_scaleQuality = ScaleQuality::NearestNeighbour;
_scaleQuality = ScaleQuality::nearestNeighbour;
}
ScaleQuality scaleQuality = _scaleQuality;
if (_scaleQuality == ScaleQuality::SmoothNearestNeighbour)
if (_scaleQuality == ScaleQuality::smoothNearestNeighbour)
{
scaleQuality = ScaleQuality::Linear;
scaleQuality = ScaleQuality::linear;
}
snprintf(scaleQualityBuffer, sizeof(scaleQualityBuffer), "%d", static_cast<int32_t>(scaleQuality));
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, scaleQualityBuffer);
+1 -1
View File
@@ -1050,7 +1050,7 @@ public:
if (gLegacyScene == LegacyScene::scenarioEditor)
{
if (getGameState().editorStep != EditorStep::LandscapeEditor)
if (getGameState().editorStep != EditorStep::landscapeEditor)
return;
}
@@ -125,9 +125,9 @@ public:
}
ScaleQuality scaleQuality = GetContext()->GetUiContext().GetScaleQuality();
if (scaleQuality == ScaleQuality::SmoothNearestNeighbour)
if (scaleQuality == ScaleQuality::smoothNearestNeighbour)
{
scaleQuality = ScaleQuality::Linear;
scaleQuality = ScaleQuality::linear;
smoothNN = true;
}
else
@@ -605,11 +605,11 @@ private:
_screenFramebuffer = std::make_unique<OpenGLFramebuffer>(_window);
_smoothScaleFramebuffer.reset();
_scaleFramebuffer.reset();
if (GetContext()->GetUiContext().GetScaleQuality() != ScaleQuality::NearestNeighbour)
if (GetContext()->GetUiContext().GetScaleQuality() != ScaleQuality::nearestNeighbour)
{
_scaleFramebuffer = std::make_unique<OpenGLFramebuffer>(_width, _height, false, false);
}
if (GetContext()->GetUiContext().GetScaleQuality() == ScaleQuality::SmoothNearestNeighbour)
if (GetContext()->GetUiContext().GetScaleQuality() == ScaleQuality::smoothNearestNeighbour)
{
uint32_t scale = std::ceil(Config::Get().general.windowScale);
_smoothScaleFramebuffer = std::make_unique<OpenGLFramebuffer>(_width * scale, _height * scale, false, false);
+1 -1
View File
@@ -265,7 +265,7 @@ void InputManager::handleViewScrolling()
// Mouse edge scrolling
if (Config::Get().general.edgeScrolling)
{
if (InputGetState() != InputState::Normal)
if (InputGetState() != InputState::normal)
return;
if (isModifierKeyPressed(ModifierKey::shift) || isModifierKeyPressed(ModifierKey::ctrl))
+37 -37
View File
@@ -175,7 +175,7 @@ namespace OpenRCT2
*/
static void InputScrollDragBegin(const ScreenCoordsXY& screenCoords, WindowBase* w, WidgetIndex widgetIndex)
{
_inputState = InputState::ScrollRight;
_inputState = InputState::scrollRight;
gInputDragLast = screenCoords;
_dragWidget.windowClassification = w->classification;
_dragWidget.windowNumber = w->number;
@@ -244,7 +244,7 @@ namespace OpenRCT2
if (w == nullptr)
{
ContextShowCursor();
_inputState = InputState::Reset;
_inputState = InputState::reset;
return;
}
@@ -258,7 +258,7 @@ namespace OpenRCT2
}
break;
case MouseState::rightRelease:
_inputState = InputState::Reset;
_inputState = InputState::reset;
ContextShowCursor();
break;
case MouseState::leftPress:
@@ -288,10 +288,10 @@ namespace OpenRCT2
switch (_inputState)
{
case InputState::Reset:
case InputState::reset:
WindowTooltipReset(screenCoords);
[[fallthrough]];
case InputState::Normal:
case InputState::normal:
switch (state)
{
case MouseState::released:
@@ -333,14 +333,14 @@ namespace OpenRCT2
break;
}
break;
case InputState::WidgetPressed:
case InputState::widgetPressed:
InputStateWidgetPressed(screenCoords, state, widgetIndex, w, widget);
break;
case InputState::PositioningWindow:
case InputState::positioningWindow:
w = windowMgr->FindByNumber(_dragWidget.windowClassification, _dragWidget.windowNumber);
if (w == nullptr)
{
_inputState = InputState::Reset;
_inputState = InputState::reset;
}
else
{
@@ -351,7 +351,7 @@ namespace OpenRCT2
}
}
break;
case InputState::ViewportRight:
case InputState::viewportRight:
if (state == MouseState::released)
{
InputViewportDragContinue();
@@ -366,14 +366,14 @@ namespace OpenRCT2
}
}
break;
case InputState::DropdownActive:
case InputState::dropdownActive:
InputStateWidgetPressed(screenCoords, state, widgetIndex, w, widget);
break;
case InputState::ViewportLeft:
case InputState::viewportLeft:
w = windowMgr->FindByNumber(_dragWidget.windowClassification, _dragWidget.windowNumber);
if (w == nullptr)
{
_inputState = InputState::Reset;
_inputState = InputState::reset;
break;
}
@@ -382,7 +382,7 @@ namespace OpenRCT2
case MouseState::released:
if (w->viewport == nullptr)
{
_inputState = InputState::Reset;
_inputState = InputState::reset;
break;
}
@@ -404,7 +404,7 @@ namespace OpenRCT2
w->onToolDrag(gCurrentToolWidget.widgetIndex, screenCoords);
break;
case MouseState::leftRelease:
_inputState = InputState::Reset;
_inputState = InputState::reset;
if (_dragWidget.windowNumber == w->number)
{
if (gInputFlags.has(InputFlag::toolActive))
@@ -429,7 +429,7 @@ namespace OpenRCT2
break;
}
break;
case InputState::ScrollLeft:
case InputState::scrollLeft:
switch (state)
{
case MouseState::released:
@@ -445,11 +445,11 @@ namespace OpenRCT2
break;
}
break;
case InputState::Resizing:
case InputState::resizing:
w = windowMgr->FindByNumber(_dragWidget.windowClassification, _dragWidget.windowNumber);
if (w == nullptr)
{
_inputState = InputState::Reset;
_inputState = InputState::reset;
}
else
{
@@ -463,7 +463,7 @@ namespace OpenRCT2
}
}
break;
case InputState::ScrollRight:
case InputState::scrollRight:
InputScrollRight(screenCoords, state);
break;
}
@@ -473,7 +473,7 @@ namespace OpenRCT2
void InputWindowPositionBegin(WindowBase& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
{
_inputState = InputState::PositioningWindow;
_inputState = InputState::positioningWindow;
gInputDragLast = screenCoords - w.windowPos;
_dragWidget.windowClassification = w.classification;
_dragWidget.windowNumber = w.number;
@@ -489,7 +489,7 @@ namespace OpenRCT2
static void InputWindowPositionEnd(WindowBase& w, const ScreenCoordsXY& screenCoords)
{
_inputState = InputState::Normal;
_inputState = InputState::normal;
gTooltipCloseTimeout = 0;
gTooltipWidget = _dragWidget;
w.onMoved(screenCoords);
@@ -497,7 +497,7 @@ namespace OpenRCT2
static void InputWindowResizeBegin(WindowBase& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
{
_inputState = InputState::Resizing;
_inputState = InputState::resizing;
gInputDragLast = screenCoords;
_dragWidget.windowClassification = w.classification;
_dragWidget.windowNumber = w.number;
@@ -520,7 +520,7 @@ namespace OpenRCT2
static void InputWindowResizeEnd()
{
_inputState = InputState::Normal;
_inputState = InputState::normal;
gTooltipCloseTimeout = 0;
gTooltipWidget = _dragWidget;
}
@@ -532,7 +532,7 @@ namespace OpenRCT2
static void InputViewportDragBegin(WindowBase& w)
{
w.flags.unset(WindowFlag::scrollingToLocation);
_inputState = InputState::ViewportRight;
_inputState = InputState::viewportRight;
_dragWidget.windowClassification = w.classification;
_dragWidget.windowNumber = w.number;
_ticksSinceDragStart = gCurrentRealTimeTicks;
@@ -578,7 +578,7 @@ namespace OpenRCT2
if (viewport == nullptr)
{
ContextShowCursor();
_inputState = InputState::Reset;
_inputState = InputState::reset;
}
else if (differentialCoords.x != 0 || differentialCoords.y != 0)
{
@@ -627,7 +627,7 @@ namespace OpenRCT2
static void InputViewportDragEnd()
{
_inputState = InputState::Reset;
_inputState = InputState::reset;
ContextShowCursor();
}
@@ -639,7 +639,7 @@ namespace OpenRCT2
{
const auto& widget = w.widgets[widgetIndex];
_inputState = InputState::ScrollLeft;
_inputState = InputState::scrollLeft;
gPressedWidget.windowClassification = w.classification;
gPressedWidget.windowNumber = w.number;
gPressedWidget.widgetIndex = widgetIndex;
@@ -766,7 +766,7 @@ namespace OpenRCT2
static void InputScrollEnd()
{
_inputState = InputState::Reset;
_inputState = InputState::reset;
InvalidateScroll();
}
@@ -1072,7 +1072,7 @@ namespace OpenRCT2
InputWindowResizeBegin(*w, widgetIndex, screenCoords);
break;
case WidgetType::viewport:
_inputState = InputState::ViewportLeft;
_inputState = InputState::viewportLeft;
gInputDragLast = screenCoords;
_dragWidget.windowClassification = windowClass;
_dragWidget.windowNumber = windowNumber;
@@ -1124,7 +1124,7 @@ namespace OpenRCT2
gPressedWidget.windowNumber = windowNumber;
gPressedWidget.widgetIndex = widgetIndex;
gInputFlags.set(InputFlag::widgetPressed);
_inputState = InputState::WidgetPressed;
_inputState = InputState::widgetPressed;
_clickRepeatTicks = gCurrentRealTimeTicks;
windowMgr->InvalidateWidgetByNumber(windowClass, windowNumber, widgetIndex);
@@ -1225,7 +1225,7 @@ namespace OpenRCT2
if (w == nullptr)
ToolCancel();
else if (InputGetState() != InputState::ViewportRight)
else if (InputGetState() != InputState::viewportRight)
w->onToolUpdate(gCurrentToolWidget.widgetIndex, screenCoords);
}
}
@@ -1247,7 +1247,7 @@ namespace OpenRCT2
WindowBase* cursor_w = windowMgr->FindByNumber(cursor_w_class, cursor_w_number);
if (cursor_w == nullptr)
{
_inputState = InputState::Reset;
_inputState = InputState::reset;
return;
}
@@ -1309,7 +1309,7 @@ namespace OpenRCT2
if (gInputFlags.has(InputFlag::widgetPressed))
{
if (_inputState == InputState::DropdownActive)
if (_inputState == InputState::dropdownActive)
{
gDropdown.highlightedIndex = gDropdown.defaultIndex;
windowMgr->InvalidateByClass(WindowClass::dropdown);
@@ -1322,7 +1322,7 @@ namespace OpenRCT2
return;
case MouseState::leftRelease:
case MouseState::rightPress:
if (_inputState == InputState::DropdownActive)
if (_inputState == InputState::dropdownActive)
{
if (w != nullptr)
{
@@ -1376,7 +1376,7 @@ namespace OpenRCT2
windowMgr->InvalidateWidgetByNumber(cursor_w_class, cursor_w_number, cursor_widgetIndex);
}
_inputState = InputState::Normal;
_inputState = InputState::normal;
gTooltipCloseTimeout = 0;
gTooltipWidget.widgetIndex = cursor_widgetIndex;
gTooltipWidget.windowClassification = cursor_w_class;
@@ -1394,7 +1394,7 @@ namespace OpenRCT2
}
}
_inputState = InputState::Normal;
_inputState = InputState::normal;
if (state == MouseState::rightPress)
{
@@ -1429,7 +1429,7 @@ namespace OpenRCT2
}
_clickRepeatTicks = std::nullopt;
if (_inputState != InputState::DropdownActive)
if (_inputState != InputState::dropdownActive)
{
// Hold down widget and drag outside of area??
if (gInputFlags.has(InputFlag::widgetPressed))
@@ -1543,7 +1543,7 @@ namespace OpenRCT2
void SetCursor(CursorID cursor_id)
{
assert(cursor_id != CursorID::Undefined);
if (_inputState == InputState::Resizing)
if (_inputState == InputState::resizing)
{
cursor_id = CursorID::DiagonalArrows;
}
+8 -8
View File
@@ -199,7 +199,7 @@ static void ShortcutAdjustLand()
if (gLegacyScene == LegacyScene::titleSequence)
return;
if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::LandscapeEditor)
if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::landscapeEditor)
return;
if (isInTrackDesignerOrManager())
@@ -213,7 +213,7 @@ static void ShortcutAdjustWater()
if (gLegacyScene == LegacyScene::titleSequence)
return;
if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::LandscapeEditor)
if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::landscapeEditor)
return;
if (isInTrackDesignerOrManager())
@@ -227,7 +227,7 @@ static void ShortcutBuildScenery()
if (gLegacyScene == LegacyScene::titleSequence)
return;
if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::LandscapeEditor)
if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::landscapeEditor)
return;
if (isInTrackDesignerOrManager())
@@ -241,7 +241,7 @@ static void ShortcutBuildPaths()
if (gLegacyScene == LegacyScene::titleSequence)
return;
if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::LandscapeEditor)
if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::landscapeEditor)
return;
if (isInTrackDesignerOrManager())
@@ -343,7 +343,7 @@ static void ShortcutShowMap()
if (gLegacyScene == LegacyScene::titleSequence)
return;
if (gLegacyScene != LegacyScene::scenarioEditor || getGameState().editorStep == EditorStep::LandscapeEditor)
if (gLegacyScene != LegacyScene::scenarioEditor || getGameState().editorStep == EditorStep::landscapeEditor)
if (!(isInTrackDesignerOrManager()))
ContextOpenWindow(WindowClass::map);
}
@@ -400,7 +400,7 @@ static void ShortcutClearScenery()
if (gLegacyScene == LegacyScene::titleSequence)
return;
if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::LandscapeEditor)
if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::landscapeEditor)
return;
if (isInTrackDesignerOrManager())
@@ -440,7 +440,7 @@ static void ShortcutOpenSceneryPicker()
{
if ((gLegacyScene == LegacyScene::titleSequence || gLegacyScene == LegacyScene::trackDesigner
|| gLegacyScene == LegacyScene::trackDesignsManager)
|| (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::LandscapeEditor))
|| (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::landscapeEditor))
return;
auto* windowMgr = GetWindowManager();
@@ -762,7 +762,7 @@ void ShortcutManager::registerDefaultShortcuts()
{
windowMgr->CloseAll();
}
else if (getGameState().editorStep == EditorStep::LandscapeEditor)
else if (getGameState().editorStep == EditorStep::landscapeEditor)
{
windowMgr->CloseTop();
}
+10 -10
View File
@@ -90,17 +90,17 @@ namespace OpenRCT2::Ui::FileBrowser
switch (Config::Get().general.loadSaveSort)
{
case FileBrowserSort::NameAscending:
case FileBrowserSort::nameAscending:
return String::logicalCmp(a.name.c_str(), b.name.c_str()) < 0;
case FileBrowserSort::NameDescending:
case FileBrowserSort::nameDescending:
return -String::logicalCmp(a.name.c_str(), b.name.c_str()) < 0;
case FileBrowserSort::DateDescending:
case FileBrowserSort::dateDescending:
return -difftime(a.dateModified, b.dateModified) < 0;
case FileBrowserSort::DateAscending:
case FileBrowserSort::dateAscending:
return difftime(a.dateModified, b.dateModified) < 0;
case FileBrowserSort::SizeDescending:
case FileBrowserSort::sizeDescending:
return a.fileSizeBytes > b.fileSizeBytes;
case FileBrowserSort::SizeAscending:
case FileBrowserSort::sizeAscending:
return a.fileSizeBytes < b.fileSizeBytes;
}
return String::logicalCmp(a.name.c_str(), b.name.c_str()) < 0;
@@ -320,7 +320,7 @@ namespace OpenRCT2::Ui::FileBrowser
SetAndSaveConfigPath(Config::Get().general.lastSaveScenarioDirectory, pathBuffer);
int32_t parkFlagsBackup = gameState.park.flags;
gameState.park.flags &= ~PARK_FLAGS_SPRITES_INITIALISED;
gameState.editorStep = EditorStep::Invalid;
gameState.editorStep = EditorStep::invalid;
gameState.scenarioFileName = std::string(String::toStringView(pathBuffer, std::size(pathBuffer)));
int32_t success = ScenarioSave(gameState, pathBuffer, Config::Get().general.savePluginData ? 3 : 2);
gameState.park.flags = parkFlagsBackup;
@@ -336,7 +336,7 @@ namespace OpenRCT2::Ui::FileBrowser
else
{
ContextShowError(STR_FILE_DIALOG_TITLE_SAVE_SCENARIO, STR_SCENARIO_SAVE_FAILED, {});
gameState.editorStep = EditorStep::ObjectiveSelection;
gameState.editorStep = EditorStep::objectiveSelection;
InvokeCallback(ModalResult::fail, pathBuffer);
}
break;
@@ -409,7 +409,7 @@ namespace OpenRCT2::Ui::FileBrowser
SetAndSaveConfigPath(Config::Get().general.lastSaveScenarioDirectory, pathBuffer);
int32_t parkFlagsBackup = gameState.park.flags;
gameState.park.flags &= ~PARK_FLAGS_SPRITES_INITIALISED;
gameState.editorStep = EditorStep::Invalid;
gameState.editorStep = EditorStep::invalid;
gameState.scenarioFileName = std::string(String::toStringView(pathBuffer, std::size(pathBuffer)));
int32_t success = ScenarioSave(gameState, pathBuffer, Config::Get().general.savePluginData ? 3 : 2);
gameState.park.flags = parkFlagsBackup;
@@ -425,7 +425,7 @@ namespace OpenRCT2::Ui::FileBrowser
else
{
ContextShowError(STR_FILE_DIALOG_TITLE_SAVE_SCENARIO, STR_SCENARIO_SAVE_FAILED, {});
gameState.editorStep = EditorStep::ObjectiveSelection;
gameState.editorStep = EditorStep::objectiveSelection;
InvokeCallback(ModalResult::fail, pathBuffer);
}
break;
@@ -88,7 +88,7 @@ namespace OpenRCT2::Ui
return info;
//
if (gLegacyScene == LegacyScene::trackDesigner && getGameState().editorStep != EditorStep::RollercoasterDesigner)
if (gLegacyScene == LegacyScene::trackDesigner && getGameState().editorStep != EditorStep::rollerCoasterDesigner)
return info;
info = GetMapCoordinatesFromPos(
@@ -275,7 +275,7 @@ namespace OpenRCT2::Ui
return info;
//
if (gLegacyScene == LegacyScene::trackDesigner && getGameState().editorStep != EditorStep::RollercoasterDesigner)
if (gLegacyScene == LegacyScene::trackDesigner && getGameState().editorStep != EditorStep::rollerCoasterDesigner)
return info;
constexpr auto flags = static_cast<int32_t>(
+1 -1
View File
@@ -922,7 +922,7 @@ namespace OpenRCT2::Ui
if (w.widgets[widgetIndex].flags.has(WidgetFlag::isPressed))
return true;
if (InputGetState() == InputState::WidgetPressed || InputGetState() == InputState::DropdownActive)
if (InputGetState() == InputState::widgetPressed || InputGetState() == InputState::dropdownActive)
{
if (!gInputFlags.has(InputFlag::widgetPressed))
return false;
+1 -1
View File
@@ -1084,7 +1084,7 @@ namespace OpenRCT2::Ui::Windows
if (gLegacyScene == LegacyScene::titleSequence)
return;
if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::LandscapeEditor)
if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::landscapeEditor)
return;
if (gLegacyScene == LegacyScene::trackDesignsManager)
+1 -1
View File
@@ -109,7 +109,7 @@ namespace OpenRCT2::Audio
if (gLegacyScene == LegacyScene::scenarioEditor)
return false;
if (gLegacyScene == LegacyScene::trackDesigner && getGameState().editorStep != EditorStep::RollercoasterDesigner)
if (gLegacyScene == LegacyScene::trackDesigner && getGameState().editorStep != EditorStep::rollerCoasterDesigner)
return false;
if (vehicle.sound1_id == SoundId::null && vehicle.sound2_id == SoundId::null)
+3 -3
View File
@@ -1119,17 +1119,17 @@ static StringId window_cheats_page_titles[] = {
switch (dropdownIndex)
{
case 0:
gameState.cheats.selectedStaffSpeed = StaffSpeedCheat::None;
gameState.cheats.selectedStaffSpeed = StaffSpeedCheat::none;
speed = kCheatsStaffNormalSpeed;
break;
case 1:
gameState.cheats.selectedStaffSpeed = StaffSpeedCheat::Frozen;
gameState.cheats.selectedStaffSpeed = StaffSpeedCheat::frozen;
speed = kCheatsStaffFreezeSpeed;
break;
case 2:
gameState.cheats.selectedStaffSpeed = StaffSpeedCheat::Fast;
gameState.cheats.selectedStaffSpeed = StaffSpeedCheat::fast;
speed = kCheatsStaffFastSpeed;
}
CheatsSet(CheatType::setStaffSpeed, speed);
+1 -1
View File
@@ -77,7 +77,7 @@ namespace OpenRCT2::Ui::Windows
gDropdown.highlightedIndex = -1;
gDropdown.hasTooltips = false;
gDropdown.defaultIndex = -1;
InputSetState(InputState::DropdownActive);
InputSetState(InputState::dropdownActive);
}
static int32_t GetDefaultRowHeight()
+24 -24
View File
@@ -62,15 +62,15 @@ namespace OpenRCT2::Ui::Windows
using FuncPtr = void (EditorBottomToolbarWindow::*)() const;
static constexpr StringId kEditorStepNames[] = {
STR_EDITOR_STEP_OBJECT_SELECTION, // EditorStep::ObjectSelection
STR_EDITOR_STEP_LANDSCAPE_EDITOR, // EditorStep::LandscapeEditor
STR_EDITOR_STEP_INVENTIONS_LIST_SET_UP, // EditorStep::InventionsListSetUp
STR_EDITOR_STEP_OPTIONS_SELECTION, // EditorStep::OptionsSelection
STR_EDITOR_STEP_OBJECTIVE_SELECTION, // EditorStep::ObjectiveSelection
STR_EDITOR_STEP_SCENARIO_DETAILS, // EditorStep::ScenarioDetails
STR_EDITOR_STEP_SAVE_SCENARIO, // EditorStep::SaveScenario
STR_EDITOR_STEP_ROLLERCOASTER_DESIGNER, // EditorStep::RollercoasterDesigner
STR_EDITOR_STEP_TRACK_DESIGNS_MANAGER, // EditorStep::DesignsManager
STR_EDITOR_STEP_OBJECT_SELECTION, // EditorStep::objectSelection
STR_EDITOR_STEP_LANDSCAPE_EDITOR, // EditorStep::landscapeEditor
STR_EDITOR_STEP_INVENTIONS_LIST_SET_UP, // EditorStep::inventionsListSetUp
STR_EDITOR_STEP_OPTIONS_SELECTION, // EditorStep::optionsSelection
STR_EDITOR_STEP_OBJECTIVE_SELECTION, // EditorStep::objectiveSelection
STR_EDITOR_STEP_SCENARIO_DETAILS, // EditorStep::scenarioDetails
STR_EDITOR_STEP_SAVE_SCENARIO, // EditorStep::saveScenario
STR_EDITOR_STEP_ROLLERCOASTER_DESIGNER, // EditorStep::rollerCoasterDesigner
STR_EDITOR_STEP_TRACK_DESIGNS_MANAGER, // EditorStep::designsManager
};
public:
@@ -108,19 +108,19 @@ namespace OpenRCT2::Ui::Windows
widgets[WIDX_NEXT_IMAGE].type = WidgetType::imgBtn;
auto& gameState = getGameState();
if (gLegacyScene == LegacyScene::trackDesignsManager || gameState.editorStep == EditorStep::SaveScenario)
if (gLegacyScene == LegacyScene::trackDesignsManager || gameState.editorStep == EditorStep::saveScenario)
{
HidePreviousStepButton();
HideNextStepButton();
}
else
{
if (gameState.editorStep == EditorStep::ObjectSelection
|| (GameHasEntities() && gameState.editorStep == EditorStep::OptionsSelection))
if (gameState.editorStep == EditorStep::objectSelection
|| (GameHasEntities() && gameState.editorStep == EditorStep::optionsSelection))
{
HidePreviousStepButton();
}
else if (gameState.editorStep == EditorStep::RollercoasterDesigner)
else if (gameState.editorStep == EditorStep::rollerCoasterDesigner)
{
HideNextStepButton();
}
@@ -168,7 +168,7 @@ namespace OpenRCT2::Ui::Windows
auto* windowMgr = GetWindowManager();
windowMgr->CloseAll();
getGameState().editorStep = EditorStep::ObjectSelection;
getGameState().editorStep = EditorStep::objectSelection;
GfxInvalidateScreen();
}
@@ -179,7 +179,7 @@ namespace OpenRCT2::Ui::Windows
SetAllSceneryItemsInvented();
WindowScenerySetDefaultPlacementConfiguration();
getGameState().editorStep = EditorStep::LandscapeEditor;
getGameState().editorStep = EditorStep::landscapeEditor;
ContextOpenWindow(WindowClass::map);
GfxInvalidateScreen();
}
@@ -190,7 +190,7 @@ namespace OpenRCT2::Ui::Windows
windowMgr->CloseAll();
ContextOpenWindow(WindowClass::editorInventionList);
getGameState().editorStep = EditorStep::InventionsListSetUp;
getGameState().editorStep = EditorStep::inventionsListSetUp;
GfxInvalidateScreen();
}
@@ -200,7 +200,7 @@ namespace OpenRCT2::Ui::Windows
windowMgr->CloseAll();
ContextOpenWindow(WindowClass::editorScenarioOptions);
getGameState().editorStep = EditorStep::ObjectiveSelection;
getGameState().editorStep = EditorStep::objectiveSelection;
GfxInvalidateScreen();
}
@@ -210,7 +210,7 @@ namespace OpenRCT2::Ui::Windows
windowMgr->CloseAll();
ContextOpenWindow(WindowClass::editorScenarioOptions);
getGameState().editorStep = EditorStep::OptionsSelection;
getGameState().editorStep = EditorStep::optionsSelection;
GfxInvalidateScreen();
}
@@ -242,7 +242,7 @@ namespace OpenRCT2::Ui::Windows
auto* windowMgr = GetWindowManager();
windowMgr->CloseAll();
ContextOpenWindow(WindowClass::editorInventionList);
getGameState().editorStep = EditorStep::InventionsListSetUp;
getGameState().editorStep = EditorStep::inventionsListSetUp;
}
else
{
@@ -258,7 +258,7 @@ namespace OpenRCT2::Ui::Windows
windowMgr->CloseAll();
ContextOpenWindow(WindowClass::editorScenarioOptions);
getGameState().editorStep = EditorStep::ObjectiveSelection;
getGameState().editorStep = EditorStep::objectiveSelection;
GfxInvalidateScreen();
}
@@ -268,7 +268,7 @@ namespace OpenRCT2::Ui::Windows
windowMgr->CloseAll();
ContextOpenWindow(WindowClass::editorScenarioOptions);
getGameState().editorStep = EditorStep::OptionsSelection;
getGameState().editorStep = EditorStep::optionsSelection;
GfxInvalidateScreen();
}
@@ -278,7 +278,7 @@ namespace OpenRCT2::Ui::Windows
windowMgr->CloseAll();
ContextOpenWindow(WindowClass::editorScenarioOptions);
getGameState().editorStep = EditorStep::ScenarioDetails;
getGameState().editorStep = EditorStep::scenarioDetails;
GfxInvalidateScreen();
}
@@ -290,14 +290,14 @@ namespace OpenRCT2::Ui::Windows
}
else
{
getGameState().editorStep = EditorStep::ScenarioDetails;
getGameState().editorStep = EditorStep::scenarioDetails;
}
}
void JumpForwardToSaveScenario() const
{
auto& gameState = getGameState();
gameState.editorStep = EditorStep::SaveScenario;
gameState.editorStep = EditorStep::saveScenario;
GfxInvalidateScreen();
const auto savePrepareResult = ScenarioPrepareForSave(gameState);
@@ -1610,7 +1610,7 @@ namespace OpenRCT2::Ui::Windows
SetEveryRideTypeInvented();
SetEveryRideEntryInvented();
getGameState().editorStep = EditorStep::DesignsManager;
getGameState().editorStep = EditorStep::designsManager;
int32_t entry_index = 0;
for (; ObjectEntryGetChunk(ObjectType::ride, entry_index) == nullptr; entry_index++)
@@ -522,8 +522,8 @@ namespace OpenRCT2::Ui::Windows
return;
auto step = getGameState().editorStep;
bool isObjectiveSelection = step == EditorStep::ObjectiveSelection;
bool isScenarioDetails = step == EditorStep::ScenarioDetails;
bool isObjectiveSelection = step == EditorStep::objectiveSelection;
bool isScenarioDetails = step == EditorStep::scenarioDetails;
bool isOtherTab = !isObjectiveSelection && !isScenarioDetails;
// Disable tabs based on current editor step
@@ -215,7 +215,7 @@ namespace OpenRCT2::Ui::Windows
int32_t temperature = getGameState().weatherCurrent.temperature;
StringId format = STR_CELSIUS_VALUE;
if (Config::Get().general.temperatureFormat == TemperatureUnit::Fahrenheit)
if (Config::Get().general.temperatureFormat == TemperatureUnit::fahrenheit)
{
temperature = Weather::celsiusToFahrenheit(temperature);
format = STR_FAHRENHEIT_VALUE;
+13 -13
View File
@@ -777,16 +777,16 @@ namespace OpenRCT2::Ui::Windows
auto& config = Config::Get().general;
drawButtonCaption(
widgets[WIDX_SORT_NAME], STR_NAME_COLUMN, FileBrowserSort::NameAscending, FileBrowserSort::NameDescending);
widgets[WIDX_SORT_NAME], STR_NAME_COLUMN, FileBrowserSort::nameAscending, FileBrowserSort::nameDescending);
if (config.fileBrowserShowSizeColumn)
drawButtonCaption(
widgets[WIDX_SORT_SIZE], STR_FILEBROWSER_SIZE_COLUMN, FileBrowserSort::SizeAscending,
FileBrowserSort::SizeDescending);
widgets[WIDX_SORT_SIZE], STR_FILEBROWSER_SIZE_COLUMN, FileBrowserSort::sizeAscending,
FileBrowserSort::sizeDescending);
if (config.fileBrowserShowDateColumn)
drawButtonCaption(
widgets[WIDX_SORT_DATE], STR_DATE_COLUMN, FileBrowserSort::DateAscending, FileBrowserSort::DateDescending);
widgets[WIDX_SORT_DATE], STR_DATE_COLUMN, FileBrowserSort::dateAscending, FileBrowserSort::dateDescending);
// 'Filename:' label
if (action == LoadSaveAction::save)
@@ -836,13 +836,13 @@ namespace OpenRCT2::Ui::Windows
break;
case WIDX_SORT_NAME:
if (Config::Get().general.loadSaveSort == FileBrowserSort::NameAscending)
if (Config::Get().general.loadSaveSort == FileBrowserSort::nameAscending)
{
Config::Get().general.loadSaveSort = FileBrowserSort::NameDescending;
Config::Get().general.loadSaveSort = FileBrowserSort::nameDescending;
}
else
{
Config::Get().general.loadSaveSort = FileBrowserSort::NameAscending;
Config::Get().general.loadSaveSort = FileBrowserSort::nameAscending;
}
Config::Save();
SortList();
@@ -850,13 +850,13 @@ namespace OpenRCT2::Ui::Windows
break;
case WIDX_SORT_SIZE:
if (Config::Get().general.loadSaveSort == FileBrowserSort::SizeDescending)
if (Config::Get().general.loadSaveSort == FileBrowserSort::sizeDescending)
{
Config::Get().general.loadSaveSort = FileBrowserSort::SizeAscending;
Config::Get().general.loadSaveSort = FileBrowserSort::sizeAscending;
}
else
{
Config::Get().general.loadSaveSort = FileBrowserSort::SizeDescending;
Config::Get().general.loadSaveSort = FileBrowserSort::sizeDescending;
}
Config::Save();
SortList();
@@ -864,13 +864,13 @@ namespace OpenRCT2::Ui::Windows
break;
case WIDX_SORT_DATE:
if (Config::Get().general.loadSaveSort == FileBrowserSort::DateDescending)
if (Config::Get().general.loadSaveSort == FileBrowserSort::dateDescending)
{
Config::Get().general.loadSaveSort = FileBrowserSort::DateAscending;
Config::Get().general.loadSaveSort = FileBrowserSort::dateAscending;
}
else
{
Config::Get().general.loadSaveSort = FileBrowserSort::DateDescending;
Config::Get().general.loadSaveSort = FileBrowserSort::dateDescending;
}
Config::Save();
SortList();
+1 -1
View File
@@ -1409,7 +1409,7 @@ namespace OpenRCT2::Ui::Windows
{
switch (Config::Get().general.measurementFormat)
{
case MeasurementFormat::Imperial:
case MeasurementFormat::imperial:
value = FeetToMetres(value);
[[fallthrough]];
+1 -1
View File
@@ -88,7 +88,7 @@ namespace OpenRCT2::Ui::Windows
// Check for cursor movement
_cursorHoldDuration++;
if (abs(cursorChange.x) > 5 || abs(cursorChange.y) > 5 || gInputFlags.has(InputFlag::rightMousePressed)
|| InputGetState() == InputState::ViewportRight)
|| InputGetState() == InputState::viewportRight)
_cursorHoldDuration = 0;
_lastCursor = cursor;
+6 -6
View File
@@ -1344,10 +1344,10 @@ namespace OpenRCT2::Ui::Windows
StringId stringId = kStringIdNone;
switch (Config::Get().general.measurementFormat)
{
case MeasurementFormat::Imperial:
case MeasurementFormat::imperial:
stringId = STR_IMPERIAL;
break;
case MeasurementFormat::Metric:
case MeasurementFormat::metric:
stringId = STR_METRIC;
break;
case MeasurementFormat::SI:
@@ -1361,7 +1361,7 @@ namespace OpenRCT2::Ui::Windows
widgets[WIDX_DATE_FORMAT].text = DateFormatStringIDs[Config::Get().general.dateFormat];
// Temperature: celsius/fahrenheit
widgets[WIDX_TEMPERATURE].text = Config::Get().general.temperatureFormat == TemperatureUnit::Fahrenheit
widgets[WIDX_TEMPERATURE].text = Config::Get().general.temperatureFormat == TemperatureUnit::fahrenheit
? STR_FAHRENHEIT
: STR_CELSIUS;
@@ -1497,7 +1497,7 @@ namespace OpenRCT2::Ui::Windows
invalidate();
StopTitleMusic();
if (Config::Get().sound.titleMusic != TitleMusicKind::None)
if (Config::Get().sound.titleMusic != TitleMusicKind::none)
{
PlayTitleMusic();
}
@@ -2355,11 +2355,11 @@ namespace OpenRCT2::Ui::Windows
TitleMusicKind Kind;
StringId Name;
} TitleThemeOptions[] = {
{ TitleMusicKind::None, STR_OPTIONS_MUSIC_VALUE_NONE },
{ TitleMusicKind::none, STR_OPTIONS_MUSIC_VALUE_NONE },
{ TitleMusicKind::OpenRCT2, STR_OPENRCT2_DROPDOWN },
{ TitleMusicKind::RCT1, STR_ROLLERCOASTER_TYCOON_1_DROPDOWN },
{ TitleMusicKind::RCT2, STR_ROLLERCOASTER_TYCOON_2_DROPDOWN },
{ TitleMusicKind::Random, STR_OPTIONS_MUSIC_VALUE_RANDOM },
{ TitleMusicKind::random, STR_OPTIONS_MUSIC_VALUE_RANDOM },
};
static constexpr StringId FullscreenModeNames[] = {
+1 -1
View File
@@ -946,7 +946,7 @@ namespace OpenRCT2::Ui::Windows
// Draw park size
auto parkSize = _parkData.size * 10;
auto stringIndex = STR_PARK_SIZE_METRIC_LABEL;
if (Config::Get().general.measurementFormat == MeasurementFormat::Imperial)
if (Config::Get().general.measurementFormat == MeasurementFormat::imperial)
{
stringIndex = STR_PARK_SIZE_IMPERIAL_LABEL;
parkSize = SquaredMetresToSquaredFeet(parkSize);
+2 -2
View File
@@ -510,7 +510,7 @@ namespace OpenRCT2::Ui::Windows
_hoverCounter++;
if (_hoverCounter < 8)
{
if (InputGetState() != InputState::ScrollLeft)
if (InputGetState() != InputState::scrollLeft)
{
minHeight = _actualMinHeight;
maxHeight = _actualMinHeight;
@@ -543,7 +543,7 @@ namespace OpenRCT2::Ui::Windows
else
{
_hoverCounter = 0;
if (InputGetState() != InputState::ScrollLeft)
if (InputGetState() != InputState::scrollLeft)
{
minHeight = _actualMinHeight;
maxHeight = _actualMinHeight;
+1 -1
View File
@@ -161,7 +161,7 @@ namespace OpenRCT2::Ui::Windows
gTooltipCursor = screenCoords;
gTooltipCloseTimeout = 0;
gTooltipWidget.windowClassification = WindowClass::null;
InputSetState(InputState::Normal);
InputSetState(InputState::normal);
gInputFlags.unset(InputFlag::leftMousePressed);
}
+6 -6
View File
@@ -426,7 +426,7 @@ namespace OpenRCT2::Ui::Windows
auto i = 0;
gDropdown.items[i++] = Dropdown::PlainMenuLabel(STR_SHORTCUT_SHOW_MAP);
gDropdown.items[i++] = Dropdown::PlainMenuLabel(STR_EXTRA_VIEWPORT);
if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep == EditorStep::LandscapeEditor)
if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep == EditorStep::landscapeEditor)
{
gDropdown.items[i++] = Dropdown::PlainMenuLabel(STR_MAPGEN_MENU_ITEM);
}
@@ -456,7 +456,7 @@ namespace OpenRCT2::Ui::Windows
void mapMenuDropdown(int16_t dropdownIndex)
{
int32_t customStartIndex = 3;
if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep == EditorStep::LandscapeEditor)
if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep == EditorStep::landscapeEditor)
{
customStartIndex++;
}
@@ -1168,21 +1168,21 @@ namespace OpenRCT2::Ui::Windows
widgets[WIDX_NETWORK].type = WidgetType::empty;
auto& gameState = getGameState();
if (gameState.editorStep != EditorStep::LandscapeEditor)
if (gameState.editorStep != EditorStep::landscapeEditor)
{
widgets[WIDX_LAND].type = WidgetType::empty;
widgets[WIDX_WATER].type = WidgetType::empty;
}
if (gameState.editorStep != EditorStep::RollercoasterDesigner)
if (gameState.editorStep != EditorStep::rollerCoasterDesigner)
{
widgets[WIDX_RIDES].type = WidgetType::empty;
widgets[WIDX_CONSTRUCT_RIDE].type = WidgetType::empty;
widgets[WIDX_FASTFORWARD].type = WidgetType::empty;
}
if (gameState.editorStep != EditorStep::LandscapeEditor
&& gameState.editorStep != EditorStep::RollercoasterDesigner)
if (gameState.editorStep != EditorStep::landscapeEditor
&& gameState.editorStep != EditorStep::rollerCoasterDesigner)
{
widgets[WIDX_MAP].type = WidgetType::empty;
widgets[WIDX_SCENERY].type = WidgetType::empty;
+2 -2
View File
@@ -323,7 +323,7 @@ namespace OpenRCT2::Ui::Windows
// Print the value in the configured measurement units.
switch (Config::Get().general.measurementFormat)
{
case MeasurementFormat::Metric:
case MeasurementFormat::metric:
case MeasurementFormat::SI:
{
auto ft = Formatter();
@@ -332,7 +332,7 @@ namespace OpenRCT2::Ui::Windows
drawText(rt, screenCoords, STR_UNIT2DP_SUFFIX_METRES, ft, { this->colours[0] });
break;
}
case MeasurementFormat::Imperial:
case MeasurementFormat::imperial:
{
auto ft = Formatter();
ft.Add<fixed16_1dp>(
+1 -1
View File
@@ -55,7 +55,7 @@ void CheatsReset()
gameState.cheats.allowRegularPathAsQueue = false;
gameState.cheats.allowSpecialColourSchemes = false;
gameState.cheats.makeAllDestructible = false;
gameState.cheats.selectedStaffSpeed = StaffSpeedCheat::None;
gameState.cheats.selectedStaffSpeed = StaffSpeedCheat::none;
gameState.cheats.forcedParkRating = kForcedParkRatingDisabled;
}
+3 -3
View File
@@ -13,9 +13,9 @@
enum class StaffSpeedCheat
{
None,
Frozen,
Fast,
none,
frozen,
fast,
};
struct CheatsState
+9 -9
View File
@@ -574,7 +574,7 @@ namespace OpenRCT2
WindowInitAll();
gInputFlags.clearAll();
InputSetState(InputState::Reset);
InputSetState(InputState::reset);
gPressedWidget.windowClassification = WindowClass::null;
gPickupPeepImage = ImageId();
ResetTooltipNotShown();
@@ -1063,35 +1063,35 @@ namespace OpenRCT2
if (gOpenRCT2Headless)
{
// NONE or OPEN are the only allowed actions for headless mode
if (gOpenRCT2StartupAction != StartupAction::Open)
if (gOpenRCT2StartupAction != StartupAction::open)
{
gOpenRCT2StartupAction = StartupAction::None;
gOpenRCT2StartupAction = StartupAction::none;
}
}
else
{
if ((gOpenRCT2StartupAction == StartupAction::Title) && Config::Get().general.playIntro)
if ((gOpenRCT2StartupAction == StartupAction::title) && Config::Get().general.playIntro)
{
gOpenRCT2StartupAction = StartupAction::Intro;
gOpenRCT2StartupAction = StartupAction::intro;
}
}
IScene* nextScene{};
switch (gOpenRCT2StartupAction)
{
case StartupAction::Intro:
case StartupAction::intro:
{
nextScene = GetIntroScene();
break;
}
case StartupAction::Title:
case StartupAction::title:
{
nextScene = GetTitleScene();
break;
}
case StartupAction::Open:
case StartupAction::open:
{
// A path that includes "://" is illegal with all common filesystems, so it is almost certainly a URL
// This way all cURL supported protocols, like http, ftp, scp and smb are automatically handled
@@ -1139,7 +1139,7 @@ namespace OpenRCT2
break;
}
case StartupAction::Edit:
case StartupAction::edit:
{
if (String::sizeOf(gOpenRCT2StartupActionPath) == 0)
{
+4 -4
View File
@@ -23,7 +23,7 @@
using namespace OpenRCT2;
[[maybe_unused]] static bool _log_location_enabled = true;
bool _log_levels[EnumValue(DiagnosticLevel::Count)] = {
bool _log_levels[EnumValue(DiagnosticLevel::count)] = {
true, true, true, false, true,
};
@@ -31,8 +31,8 @@ static FILE* diagnostic_get_stream(DiagnosticLevel level)
{
switch (level)
{
case DiagnosticLevel::Verbose:
case DiagnosticLevel::Information:
case DiagnosticLevel::verbose:
case DiagnosticLevel::information:
return stdout;
default:
return stderr;
@@ -41,7 +41,7 @@ static FILE* diagnostic_get_stream(DiagnosticLevel level)
#ifdef __ANDROID__
int _android_log_priority[EnumValue(DiagnosticLevel::Count)] = {
int _android_log_priority[EnumValue(DiagnosticLevel::count)] = {
ANDROID_LOG_FATAL, ANDROID_LOG_ERROR, ANDROID_LOG_WARN, ANDROID_LOG_VERBOSE, ANDROID_LOG_INFO,
};
+12 -12
View File
@@ -13,12 +13,12 @@
enum class DiagnosticLevel
{
Fatal,
Error,
Warning,
Verbose,
Information,
Count
fatal,
error,
warning,
verbose,
information,
count
};
/**
@@ -68,7 +68,7 @@ enum class DiagnosticLevel
#define DEBUG_LEVEL_1 0
#endif // defined(DEBUG)
extern bool _log_levels[static_cast<uint8_t>(DiagnosticLevel::Count)];
extern bool _log_levels[static_cast<uint8_t>(DiagnosticLevel::count)];
void DiagnosticLog(DiagnosticLevel diagnosticLevel, const char* format, ...);
void DiagnosticLogWithLocation(
@@ -82,8 +82,8 @@ void DiagnosticLogWithLocation(
DiagnosticLogWithLocation(level, __FILE__, __func__, __LINE__, format, ##__VA_ARGS__)
#endif // _MSC_VER
#define LOG_FATAL(format, ...) DIAGNOSTIC_LOG_MACRO(DiagnosticLevel::Fatal, format, ##__VA_ARGS__)
#define LOG_ERROR(format, ...) DIAGNOSTIC_LOG_MACRO(DiagnosticLevel::Error, format, ##__VA_ARGS__)
#define LOG_WARNING(format, ...) DIAGNOSTIC_LOG_MACRO(DiagnosticLevel::Warning, format, ##__VA_ARGS__)
#define LOG_VERBOSE(format, ...) DiagnosticLog(DiagnosticLevel::Verbose, format, ##__VA_ARGS__)
#define LOG_INFO(format, ...) DIAGNOSTIC_LOG_MACRO(DiagnosticLevel::Information, format, ##__VA_ARGS__)
#define LOG_FATAL(format, ...) DIAGNOSTIC_LOG_MACRO(DiagnosticLevel::fatal, format, ##__VA_ARGS__)
#define LOG_ERROR(format, ...) DIAGNOSTIC_LOG_MACRO(DiagnosticLevel::error, format, ##__VA_ARGS__)
#define LOG_WARNING(format, ...) DIAGNOSTIC_LOG_MACRO(DiagnosticLevel::warning, format, ##__VA_ARGS__)
#define LOG_VERBOSE(format, ...) DiagnosticLog(DiagnosticLevel::verbose, format, ##__VA_ARGS__)
#define LOG_INFO(format, ...) DIAGNOSTIC_LOG_MACRO(DiagnosticLevel::information, format, ##__VA_ARGS__)
+15 -15
View File
@@ -115,7 +115,7 @@ namespace OpenRCT2::Editor
Audio::StopAll();
gameStateInitAll(gameState, kDefaultMapSize);
gLegacyScene = LegacyScene::scenarioEditor;
gameState.editorStep = EditorStep::ObjectSelection;
gameState.editorStep = EditorStep::objectSelection;
gameState.park.flags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES;
gameState.scenarioOptions.category = Scenario::Category::other;
ObjectListLoad();
@@ -160,7 +160,7 @@ namespace OpenRCT2::Editor
ScenarioReset(gameState);
gLegacyScene = LegacyScene::scenarioEditor;
gameState.editorStep = EditorStep::OptionsSelection;
gameState.editorStep = EditorStep::optionsSelection;
gameState.scenarioOptions.category = Scenario::Category::other;
ContextResetSubsystems();
OpenEditorWindows();
@@ -193,7 +193,7 @@ namespace OpenRCT2::Editor
auto& gameState = getGameState();
gameStateInitAll(gameState, kDefaultMapSize);
gameState.editorStep = EditorStep::ObjectSelection;
gameState.editorStep = EditorStep::objectSelection;
SetAllLandOwned();
ObjectListLoad();
ContextResetSubsystems();
@@ -222,7 +222,7 @@ namespace OpenRCT2::Editor
auto& gameState = getGameState();
gameStateInitAll(gameState, kDefaultMapSize);
SetAllLandOwned();
gameState.editorStep = EditorStep::ObjectSelection;
gameState.editorStep = EditorStep::objectSelection;
ObjectListLoad();
ContextResetSubsystems();
WindowBase* mainWindow = OpenEditorWindows();
@@ -261,7 +261,7 @@ namespace OpenRCT2::Editor
auto* context = GetContext();
context->SetActiveScene(context->GetGameScene());
getGameState().editorStep = EditorStep::LandscapeEditor;
getGameState().editorStep = EditorStep::landscapeEditor;
gScreenAge = 0;
gLegacyScene = LegacyScene::scenarioEditor;
ContextResetSubsystems();
@@ -361,7 +361,7 @@ namespace OpenRCT2::Editor
switch (getGameState().editorStep)
{
case EditorStep::ObjectSelection:
case EditorStep::objectSelection:
if (windowMgr->FindByClass(WindowClass::editorObjectSelection) != nullptr)
{
return;
@@ -379,7 +379,7 @@ namespace OpenRCT2::Editor
ContextOpenWindow(WindowClass::editorObjectSelection);
break;
case EditorStep::InventionsListSetUp:
case EditorStep::inventionsListSetUp:
if (windowMgr->FindByClass(WindowClass::editorInventionList) != nullptr)
{
return;
@@ -387,9 +387,9 @@ namespace OpenRCT2::Editor
ContextOpenWindow(WindowClass::editorInventionList);
break;
case EditorStep::OptionsSelection:
case EditorStep::ObjectiveSelection:
case EditorStep::ScenarioDetails:
case EditorStep::optionsSelection:
case EditorStep::objectiveSelection:
case EditorStep::scenarioDetails:
if (windowMgr->FindByClass(WindowClass::editorScenarioOptions) != nullptr)
{
return;
@@ -397,11 +397,11 @@ namespace OpenRCT2::Editor
ContextOpenWindow(WindowClass::editorScenarioOptions);
break;
case EditorStep::LandscapeEditor:
case EditorStep::SaveScenario:
case EditorStep::RollercoasterDesigner:
case EditorStep::DesignsManager:
case EditorStep::Invalid:
case EditorStep::landscapeEditor:
case EditorStep::saveScenario:
case EditorStep::rollerCoasterDesigner:
case EditorStep::designsManager:
case EditorStep::invalid:
break;
}
}
+10 -10
View File
@@ -35,16 +35,16 @@ namespace OpenRCT2::Editor
enum class EditorStep : uint8_t
{
ObjectSelection, // 0
LandscapeEditor, // 1
InventionsListSetUp, // 2
OptionsSelection, // 3
ObjectiveSelection, // 4
ScenarioDetails, // 5
SaveScenario, // 6
RollercoasterDesigner, // 7
DesignsManager, // 8
Invalid = 255, // 255
objectSelection, // 0
landscapeEditor, // 1
inventionsListSetUp, // 2
optionsSelection, // 3
objectiveSelection, // 4
scenarioDetails, // 5
saveScenario, // 6
rollerCoasterDesigner, // 7
designsManager, // 8
invalid = 255, // 255
};
void EditorOpenWindowsForCurrentStep();
@@ -533,7 +533,7 @@ void FinishObjectSelection()
gameState.lastEntranceStyle = 0;
}
gameState.editorStep = EditorStep::RollercoasterDesigner;
gameState.editorStep = EditorStep::rollerCoasterDesigner;
GfxInvalidateScreen();
}
else
@@ -543,7 +543,7 @@ void FinishObjectSelection()
auto intent = Intent(INTENT_ACTION_SET_DEFAULT_SCENERY_CONFIG);
ContextBroadcastIntent(&intent);
gameState.editorStep = EditorStep::LandscapeEditor;
gameState.editorStep = EditorStep::landscapeEditor;
GfxInvalidateScreen();
}
}
+1 -1
View File
@@ -195,7 +195,7 @@ namespace OpenRCT2
gameStateUpdateLogic();
if (gGameSpeed == 1)
{
if (InputGetState() == InputState::Reset || InputGetState() == InputState::Normal)
if (InputGetState() == InputState::reset || InputGetState() == InputState::normal)
{
if (gInputFlags.has(InputFlag::viewportScrolling))
{
+10 -10
View File
@@ -33,16 +33,16 @@ namespace OpenRCT2
enum class InputState
{
Reset,
Normal,
WidgetPressed,
PositioningWindow,
ViewportRight,
DropdownActive,
ViewportLeft,
ScrollLeft,
Resizing,
ScrollRight
reset,
normal,
widgetPressed,
positioningWindow,
viewportRight,
dropdownActive,
viewportLeft,
scrollLeft,
resizing,
scrollRight
};
struct CursorState
+1 -1
View File
@@ -11,7 +11,7 @@
#include "core/EnumUtils.hpp"
StartupAction gOpenRCT2StartupAction = StartupAction::Title;
StartupAction gOpenRCT2StartupAction = StartupAction::title;
utf8 gOpenRCT2StartupActionPath[512] = { 0 };
u8string gCustomUserDataPath = {};
u8string gCustomOpenRCT2DataPath = {};
+5 -5
View File
@@ -15,11 +15,11 @@ enum class PromptMode : uint8_t;
enum class StartupAction
{
None,
Intro,
Title,
Open,
Edit
none,
intro,
title,
open,
edit
};
enum class LegacyScene : uint8_t
@@ -196,17 +196,17 @@ namespace OpenRCT2::GameActions
// Staff energy determines their walking speed
switch (gameState.cheats.selectedStaffSpeed)
{
case StaffSpeedCheat::None:
case StaffSpeedCheat::none:
newPeep->Energy = kCheatsStaffNormalSpeed;
newPeep->EnergyTarget = kCheatsStaffNormalSpeed;
break;
case StaffSpeedCheat::Frozen:
case StaffSpeedCheat::frozen:
newPeep->Energy = kCheatsStaffFreezeSpeed;
newPeep->EnergyTarget = kCheatsStaffFreezeSpeed;
break;
case StaffSpeedCheat::Fast:
case StaffSpeedCheat::fast:
newPeep->Energy = kCheatsStaffFastSpeed;
newPeep->EnergyTarget = kCheatsStaffFastSpeed;
break;
+2 -2
View File
@@ -277,7 +277,7 @@ namespace OpenRCT2::Audio
{
auto musicMap = GetAvailableMusicMap();
auto it = musicMap.find(musicKind);
if (musicKind == TitleMusicKind::Random)
if (musicKind == TitleMusicKind::random)
{
it = std::next(musicMap.begin(), UtilRand() % musicMap.size());
}
@@ -287,7 +287,7 @@ namespace OpenRCT2::Audio
return ObjectEntryDescriptor(ObjectType::audio, it->second);
}
// No music descriptor for the current setting, intentional for TitleMusicKind::None
// No music descriptor for the current setting, intentional for TitleMusicKind::none
return {};
}
+5 -5
View File
@@ -177,7 +177,7 @@ namespace OpenRCT2
{
if (_verbose)
{
_log_levels[EnumValue(DiagnosticLevel::Verbose)] = true;
_log_levels[EnumValue(DiagnosticLevel::verbose)] = true;
PrintLaunchInformation();
}
@@ -246,7 +246,7 @@ namespace OpenRCT2
if (enumerator->TryPopString(&parkUri) && parkUri[0] != '-')
{
String::set(gOpenRCT2StartupActionPath, sizeof(gOpenRCT2StartupActionPath), parkUri);
gOpenRCT2StartupAction = StartupAction::Open;
gOpenRCT2StartupAction = StartupAction::open;
}
return EXITCODE_CONTINUE;
@@ -268,7 +268,7 @@ namespace OpenRCT2
}
String::set(gOpenRCT2StartupActionPath, sizeof(gOpenRCT2StartupActionPath), parkUri);
gOpenRCT2StartupAction = StartupAction::Edit;
gOpenRCT2StartupAction = StartupAction::edit;
return EXITCODE_CONTINUE;
}
@@ -280,7 +280,7 @@ namespace OpenRCT2
return result;
}
gOpenRCT2StartupAction = StartupAction::Intro;
gOpenRCT2StartupAction = StartupAction::intro;
return EXITCODE_CONTINUE;
}
@@ -301,7 +301,7 @@ namespace OpenRCT2
return EXITCODE_FAIL;
}
gOpenRCT2StartupAction = StartupAction::Open;
gOpenRCT2StartupAction = StartupAction::open;
String::set(gOpenRCT2StartupActionPath, sizeof(gOpenRCT2StartupActionPath), parkUri);
gNetworkStart = Network::Mode::server;
+11 -11
View File
@@ -69,8 +69,8 @@ namespace OpenRCT2::Config
#pragma region Enums
static const auto Enum_MeasurementFormat = ConfigEnum<MeasurementFormat>({
ConfigEnumEntry<MeasurementFormat>("IMPERIAL", MeasurementFormat::Imperial),
ConfigEnumEntry<MeasurementFormat>("METRIC", MeasurementFormat::Metric),
ConfigEnumEntry<MeasurementFormat>("IMPERIAL", MeasurementFormat::imperial),
ConfigEnumEntry<MeasurementFormat>("METRIC", MeasurementFormat::metric),
ConfigEnumEntry<MeasurementFormat>("SI", MeasurementFormat::SI),
});
@@ -113,17 +113,17 @@ namespace OpenRCT2::Config
});
static const auto Enum_Temperature = ConfigEnum<TemperatureUnit>({
ConfigEnumEntry<TemperatureUnit>("CELSIUS", TemperatureUnit::Celsius),
ConfigEnumEntry<TemperatureUnit>("FAHRENHEIT", TemperatureUnit::Fahrenheit),
ConfigEnumEntry<TemperatureUnit>("CELSIUS", TemperatureUnit::celsius),
ConfigEnumEntry<TemperatureUnit>("FAHRENHEIT", TemperatureUnit::fahrenheit),
});
static const auto Enum_FileBrowserSort = ConfigEnum<FileBrowserSort>({
ConfigEnumEntry<FileBrowserSort>("NAME_ASCENDING", FileBrowserSort::NameAscending),
ConfigEnumEntry<FileBrowserSort>("NAME_DESCENDING", FileBrowserSort::NameDescending),
ConfigEnumEntry<FileBrowserSort>("SIZE_ASCENDING", FileBrowserSort::SizeAscending),
ConfigEnumEntry<FileBrowserSort>("SIZE_DESCENDING", FileBrowserSort::SizeDescending),
ConfigEnumEntry<FileBrowserSort>("DATE_ASCENDING", FileBrowserSort::DateAscending),
ConfigEnumEntry<FileBrowserSort>("DATE_DESCENDING", FileBrowserSort::DateDescending),
ConfigEnumEntry<FileBrowserSort>("NAME_ASCENDING", FileBrowserSort::nameAscending),
ConfigEnumEntry<FileBrowserSort>("NAME_DESCENDING", FileBrowserSort::nameDescending),
ConfigEnumEntry<FileBrowserSort>("SIZE_ASCENDING", FileBrowserSort::sizeAscending),
ConfigEnumEntry<FileBrowserSort>("SIZE_DESCENDING", FileBrowserSort::sizeDescending),
ConfigEnumEntry<FileBrowserSort>("DATE_ASCENDING", FileBrowserSort::dateAscending),
ConfigEnumEntry<FileBrowserSort>("DATE_DESCENDING", FileBrowserSort::dateDescending),
});
static const auto Enum_ParkPreviewPref = ConfigEnum<ParkPreviewPref>({
@@ -226,7 +226,7 @@ namespace OpenRCT2::Config
model->lastRunVersion = reader->GetString("last_run_version", "");
model->invertViewportDrag = reader->GetBoolean("invert_viewport_drag", false);
model->loadSaveSort = reader->GetEnum<FileBrowserSort>(
"load_save_sort", FileBrowserSort::NameAscending, Enum_FileBrowserSort);
"load_save_sort", FileBrowserSort::nameAscending, Enum_FileBrowserSort);
model->minimizeFullscreenFocusLoss = reader->GetBoolean("minimize_fullscreen_focus_loss", true);
model->disableScreensaver = reader->GetBoolean("disable_screensaver", true);
+15 -15
View File
@@ -22,12 +22,12 @@ namespace OpenRCT2
enum class FileBrowserSort : int32_t
{
NameAscending,
NameDescending,
SizeAscending,
SizeDescending,
DateAscending,
DateDescending,
nameAscending,
nameDescending,
sizeAscending,
sizeDescending,
dateAscending,
dateDescending,
};
enum class ParkPreviewPref : int32_t
@@ -39,28 +39,28 @@ namespace OpenRCT2
enum class TemperatureUnit : int32_t
{
Celsius,
Fahrenheit
celsius,
fahrenheit
};
enum class ScaleQuality : int32_t
{
NearestNeighbour,
Linear,
SmoothNearestNeighbour
nearestNeighbour,
linear,
smoothNearestNeighbour
};
enum class MeasurementFormat : int32_t
{
Imperial,
Metric,
imperial,
metric,
SI
};
enum class TitleMusicKind : int32_t
{
None,
Random,
none,
random,
OpenRCT2,
RCT1,
RCT2,
+3 -3
View File
@@ -18,7 +18,7 @@ class TIdentifier
{
enum class ValueType : T
{
Null = TNullValue,
null = TNullValue,
} _handle;
private:
@@ -39,7 +39,7 @@ public:
static constexpr TIdentifier GetNull() noexcept
{
return TIdentifier{ ValueType::Null };
return TIdentifier{ ValueType::null };
}
static constexpr TIdentifier FromUnderlying(const T val) noexcept
@@ -60,7 +60,7 @@ public:
constexpr bool IsNull() const noexcept
{
return _handle == ValueType::Null;
return _handle == ValueType::null;
}
auto operator<=>(const TIdentifier&) const = default;
+1 -1
View File
@@ -1964,7 +1964,7 @@ namespace OpenRCT2
return 0;
// Height labels in feet
if (Config::Get().general.measurementFormat == MeasurementFormat::Imperial)
if (Config::Get().general.measurementFormat == MeasurementFormat::imperial)
return 1 * 256;
// Height labels in metres
+6 -6
View File
@@ -556,10 +556,10 @@ namespace OpenRCT2
switch (Config::Get().general.measurementFormat)
{
default:
case MeasurementFormat::Imperial:
case MeasurementFormat::imperial:
FormatStringID(ss, STR_UNIT_SUFFIX_MILES_PER_HOUR, arg);
break;
case MeasurementFormat::Metric:
case MeasurementFormat::metric:
FormatStringID(ss, STR_UNIT_SUFFIX_KILOMETRES_PER_HOUR, MphToKmph(arg));
break;
case MeasurementFormat::SI:
@@ -586,10 +586,10 @@ namespace OpenRCT2
switch (Config::Get().general.measurementFormat)
{
default:
case MeasurementFormat::Imperial:
case MeasurementFormat::imperial:
FormatStringID(ss, STR_UNIT_SUFFIX_FEET, MetresToFeet(arg));
break;
case MeasurementFormat::Metric:
case MeasurementFormat::metric:
case MeasurementFormat::SI:
FormatStringID(ss, STR_UNIT_SUFFIX_METRES, arg);
break;
@@ -603,10 +603,10 @@ namespace OpenRCT2
switch (Config::Get().general.measurementFormat)
{
default:
case MeasurementFormat::Imperial:
case MeasurementFormat::imperial:
FormatStringID(ss, STR_UNIT_SUFFIX_FEET, MetresToFeet(metres));
break;
case MeasurementFormat::Metric:
case MeasurementFormat::metric:
case MeasurementFormat::SI:
FormatStringID(ss, STR_UNIT_SUFFIX_METRES, metres);
break;
+1 -1
View File
@@ -163,7 +163,7 @@ namespace OpenRCT2::Platform
env->DeleteLocalRef(activity);
env->DeleteLocalRef(activityClass);
return isImperial == JNI_TRUE ? MeasurementFormat::Imperial : MeasurementFormat::Metric;
return isImperial == JNI_TRUE ? MeasurementFormat::imperial : MeasurementFormat::metric;
}
SteamPaths GetSteamPaths()
@@ -94,7 +94,7 @@ namespace OpenRCT2::Platform
return ([ "LR", "MM", "US" ]).includes(country) ? 1 : 0;
});
return isImperial == 1 ? MeasurementFormat::Imperial : MeasurementFormat::Metric;
return isImperial == 1 ? MeasurementFormat::imperial : MeasurementFormat::metric;
}
SteamPaths GetSteamPaths()
+2 -2
View File
@@ -336,10 +336,10 @@ namespace OpenRCT2::Platform
// using https://en.wikipedia.org/wiki/Metrication#Chronology_and_status_of_conversion_by_country as reference
if (!fnmatch("*_US*", langstring, 0) || !fnmatch("*_MM*", langstring, 0) || !fnmatch("*_LR*", langstring, 0))
{
return MeasurementFormat::Imperial;
return MeasurementFormat::imperial;
}
}
return MeasurementFormat::Metric;
return MeasurementFormat::metric;
}
SteamPaths GetSteamPaths()
+2 -2
View File
@@ -353,10 +353,10 @@ namespace OpenRCT2::Platform
if (!fnmatch("*_US*", langstring, 0) || !fnmatch("*_BS*", langstring, 0) || !fnmatch("*_BZ*", langstring, 0)
|| !fnmatch("*_PW*", langstring, 0))
{
return TemperatureUnit::Fahrenheit;
return TemperatureUnit::fahrenheit;
}
}
return TemperatureUnit::Celsius;
return TemperatureUnit::celsius;
}
bool ProcessIsElevated()
+4 -4
View File
@@ -645,10 +645,10 @@ namespace OpenRCT2::Platform
sizeof(measurement_system) / sizeof(wchar_t))
== 0)
{
return MeasurementFormat::Metric;
return MeasurementFormat::metric;
}
return measurement_system == 1 ? MeasurementFormat::Imperial : MeasurementFormat::Metric;
return measurement_system == 1 ? MeasurementFormat::imperial : MeasurementFormat::metric;
}
uint8_t GetLocaleDateFormat()
@@ -712,10 +712,10 @@ namespace OpenRCT2::Platform
== 0)
{
// Assume celsius by default if function call fails
return TemperatureUnit::Celsius;
return TemperatureUnit::celsius;
}
return fahrenheit == 1 ? TemperatureUnit::Fahrenheit : TemperatureUnit::Celsius;
return fahrenheit == 1 ? TemperatureUnit::fahrenheit : TemperatureUnit::celsius;
}
bool ProcessIsElevated()
+2 -2
View File
@@ -221,10 +221,10 @@ namespace OpenRCT2::Platform
if (metricSystem.boolValue)
{
return MeasurementFormat::Metric;
return MeasurementFormat::metric;
}
return MeasurementFormat::Imperial;
return MeasurementFormat::imperial;
}
}
+1 -1
View File
@@ -345,7 +345,7 @@ namespace OpenRCT2::RCT1
// Do map initialisation, same kind of stuff done when loading scenario editor
gameStateInitAll(gameState, { mapSize, mapSize });
gameState.editorStep = EditorStep::ObjectSelection;
gameState.editorStep = EditorStep::objectSelection;
gameState.park.flags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES;
gameState.scenarioOptions.category = Scenario::Category::other;
}
+10 -10
View File
@@ -699,21 +699,21 @@ void Ride::updateAll()
{
switch (getGameState().editorStep)
{
case EditorStep::ObjectSelection:
case EditorStep::LandscapeEditor:
case EditorStep::InventionsListSetUp:
case EditorStep::objectSelection:
case EditorStep::landscapeEditor:
case EditorStep::inventionsListSetUp:
{
for (auto& ride : RideManager(gameState))
ride.remove();
break;
}
case EditorStep::OptionsSelection:
case EditorStep::ObjectiveSelection:
case EditorStep::ScenarioDetails:
case EditorStep::SaveScenario:
case EditorStep::RollercoasterDesigner:
case EditorStep::DesignsManager:
case EditorStep::Invalid:
case EditorStep::optionsSelection:
case EditorStep::objectiveSelection:
case EditorStep::scenarioDetails:
case EditorStep::saveScenario:
case EditorStep::rollerCoasterDesigner:
case EditorStep::designsManager:
case EditorStep::invalid:
break;
}
return;
+1 -1
View File
@@ -251,7 +251,7 @@ void VehicleUpdateAll()
if (gLegacyScene == LegacyScene::scenarioEditor)
return;
if (gLegacyScene == LegacyScene::trackDesigner && getGameState().editorStep != EditorStep::RollercoasterDesigner)
if (gLegacyScene == LegacyScene::trackDesigner && getGameState().editorStep != EditorStep::rollerCoasterDesigner)
return;
for (auto vehicle : TrainManager::View())
+1 -1
View File
@@ -57,7 +57,7 @@ namespace OpenRCT2::Ui
}
ScaleQuality GetScaleQuality() override
{
return ScaleQuality::NearestNeighbour;
return ScaleQuality::nearestNeighbour;
}
void SetFullscreenMode(FullscreenMode /*mode*/) override
{
+4 -4
View File
@@ -210,14 +210,14 @@ TEST_F(FormattingTests, escaped_braces)
TEST_F(FormattingTests, velocity_mph)
{
Config::Get().general.measurementFormat = MeasurementFormat::Imperial;
Config::Get().general.measurementFormat = MeasurementFormat::imperial;
auto actual = FormatString("Train is going at {VELOCITY}.", 1024);
ASSERT_EQ("Train is going at 1,024 mph.", actual);
}
TEST_F(FormattingTests, velocity_kph)
{
Config::Get().general.measurementFormat = MeasurementFormat::Metric;
Config::Get().general.measurementFormat = MeasurementFormat::metric;
auto actual = FormatString("Train is going at {VELOCITY}.", 1024);
ASSERT_EQ("Train is going at 1,648 km/h.", actual);
}
@@ -231,14 +231,14 @@ TEST_F(FormattingTests, velocity_mps)
TEST_F(FormattingTests, length_imperial)
{
Config::Get().general.measurementFormat = MeasurementFormat::Imperial;
Config::Get().general.measurementFormat = MeasurementFormat::imperial;
auto actual = FormatString("Height: {LENGTH}", 1024);
ASSERT_EQ("Height: 3,360 ft", actual);
}
TEST_F(FormattingTests, length_metric)
{
Config::Get().general.measurementFormat = MeasurementFormat::Metric;
Config::Get().general.measurementFormat = MeasurementFormat::metric;
auto actual = FormatString("Height: {LENGTH}", 1024);
ASSERT_EQ("Height: 1,024 m", actual);
}