diff --git a/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.cpp b/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.cpp index f9217295afe3..331a3004ea64 100644 --- a/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.cpp @@ -29,11 +29,11 @@ constexpr VDStruct kVertexData[4] = { { 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f }, }; -constexpr size_t InitialInstancesBufferSize = 32768; +constexpr size_t kInitialInstancesBufferSize = 32768; DrawRectShader::DrawRectShader() : OpenGLShaderProgram("drawrect") - , _maxInstancesBufferSize(InitialInstancesBufferSize) + , _maxInstancesBufferSize(kInitialInstancesBufferSize) { GetLocations(); @@ -57,7 +57,7 @@ DrawRectShader::DrawRectShader() glVertexAttribPointer(vVertVec, 2, GL_FLOAT, GL_FALSE, sizeof(VDStruct), reinterpret_cast(offsetof(VDStruct, vec))); glBindBuffer(GL_ARRAY_BUFFER, _vboInstances); - glBufferData(GL_ARRAY_BUFFER, sizeof(DrawRectCommand) * InitialInstancesBufferSize, NULL, GL_STREAM_DRAW); + glBufferData(GL_ARRAY_BUFFER, sizeof(DrawRectCommand) * kInitialInstancesBufferSize, nullptr, GL_STREAM_DRAW); glVertexAttribIPointer(vClip, 4, GL_INT, sizeof(DrawRectCommand), reinterpret_cast(offsetof(DrawRectCommand, clip))); glVertexAttribIPointer( diff --git a/src/openrct2-ui/input/InputManager.cpp b/src/openrct2-ui/input/InputManager.cpp index d9d652f8651c..ce73541c3847 100644 --- a/src/openrct2-ui/input/InputManager.cpp +++ b/src/openrct2-ui/input/InputManager.cpp @@ -365,9 +365,9 @@ bool InputManager::GetState(const RegisteredShortcut& shortcut) const bool InputManager::GetState(const ShortcutInput& shortcut) const { - constexpr uint32_t UsefulModifiers = KMOD_SHIFT | KMOD_CTRL | KMOD_ALT | KMOD_GUI; - auto modifiers = SDL_GetModState() & UsefulModifiers; - if ((shortcut.Modifiers & UsefulModifiers) == modifiers) + constexpr uint32_t kUsefulModifiers = KMOD_SHIFT | KMOD_CTRL | KMOD_ALT | KMOD_GUI; + auto modifiers = SDL_GetModState() & kUsefulModifiers; + if ((shortcut.Modifiers & kUsefulModifiers) == modifiers) { switch (shortcut.Kind) { diff --git a/src/openrct2-ui/interface/LandTool.cpp b/src/openrct2-ui/interface/LandTool.cpp index 8c9c3c165eea..c1d2f03ea1c3 100644 --- a/src/openrct2-ui/interface/LandTool.cpp +++ b/src/openrct2-ui/interface/LandTool.cpp @@ -103,7 +103,7 @@ ObjectEntryIndex LandTool::GetSurfaceStyleFromDropdownIndex(size_t index) itemIndex++; } } - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; } void LandTool::ShowEdgeStyleDropdown(WindowBase* w, Widget* widget, ObjectEntryIndex currentEdgeType) @@ -154,5 +154,5 @@ ObjectEntryIndex LandTool::GetEdgeStyleFromDropdownIndex(size_t index) itemIndex++; } } - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; } diff --git a/src/openrct2-ui/interface/Objective.cpp b/src/openrct2-ui/interface/Objective.cpp index fa161be18486..cc18987d26dd 100644 --- a/src/openrct2-ui/interface/Objective.cpp +++ b/src/openrct2-ui/interface/Objective.cpp @@ -39,7 +39,7 @@ namespace OpenRCT2::Ui { StringId rideTypeString = kStringIdNone; auto rideTypeId = objective.RideId; - if (rideTypeId != RIDE_TYPE_NULL && rideTypeId < RIDE_TYPE_COUNT) + if (rideTypeId != kRideTypeNull && rideTypeId < RIDE_TYPE_COUNT) { rideTypeString = GetRideTypeDescriptor(rideTypeId).Naming.Name; } diff --git a/src/openrct2-ui/ride/Construction.cpp b/src/openrct2-ui/ride/Construction.cpp index caf313fa0153..252e6d7404ab 100644 --- a/src/openrct2-ui/ride/Construction.cpp +++ b/src/openrct2-ui/ride/Construction.cpp @@ -159,7 +159,7 @@ namespace OpenRCT2 entranceExitCoords = { coordsAtHeight->ToTileStart(), stationBaseZ, INVALID_DIRECTION }; - if (ride->type == RIDE_TYPE_NULL) + if (ride->type == kRideTypeNull) { entranceExitCoords.SetNull(); return entranceExitCoords; diff --git a/src/openrct2-ui/windows/Dropdown.cpp b/src/openrct2-ui/windows/Dropdown.cpp index 488e288e13ff..19cf2ffc984b 100644 --- a/src/openrct2-ui/windows/Dropdown.cpp +++ b/src/openrct2-ui/windows/Dropdown.cpp @@ -25,10 +25,10 @@ namespace OpenRCT2::Ui::Windows { - constexpr int32_t DROPDOWN_ITEM_HEIGHT = 12; - constexpr int32_t DROPDOWN_ITEM_HEIGHT_TOUCH = 24; + constexpr int32_t kDropdownItemHeight = 12; + constexpr int32_t kDropdownItemHeightTouch = 24; - static constexpr std::array _appropriateImageDropdownItemsPerRow = { + static constexpr std::array kAppropriateImageDropdownItemsPerRow = { 1, 1, 1, 1, 2, 2, 3, 3, 4, 3, // 10 5, 4, 4, 5, 5, 5, 4, 5, 6, 5, // 20 5, 7, 4, 5, 6, 5, 6, 6, 6, 6, // 30 @@ -42,7 +42,7 @@ namespace OpenRCT2::Ui::Windows WIDX_BACKGROUND, }; - static constexpr Widget window_dropdown_widgets[] = { + static constexpr Widget kWindowDropdownWidgets[] = { MakeWidget({ 0, 0 }, { 1, 1 }, WindowWidgetType::ImgBtn, WindowColour::Primary), }; @@ -75,7 +75,7 @@ namespace OpenRCT2::Ui::Windows public: void OnOpen() override { - SetWidgets(window_dropdown_widgets); + SetWidgets(kWindowDropdownWidgets); // Input state gDropdownHighlightedIndex = -1; @@ -87,7 +87,7 @@ namespace OpenRCT2::Ui::Windows static int32_t GetDefaultRowHeight() { - return Config::Get().interface.EnlargedUi ? DROPDOWN_ITEM_HEIGHT_TOUCH : DROPDOWN_ITEM_HEIGHT; + return Config::Get().interface.EnlargedUi ? kDropdownItemHeightTouch : kDropdownItemHeight; } static int32_t GetAdditionalRowPadding() @@ -533,8 +533,8 @@ static constexpr colour_t kColoursDropdownOrder[] = { uint32_t DropdownGetAppropriateImageDropdownItemsPerRow(uint32_t numItems) { // If above the table size return the last element - return _appropriateImageDropdownItemsPerRow[std::min( - numItems, static_cast(std::size(_appropriateImageDropdownItemsPerRow) - 1))]; + return kAppropriateImageDropdownItemsPerRow[std::min( + numItems, static_cast(std::size(kAppropriateImageDropdownItemsPerRow) - 1))]; } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/EditorBottomToolbar.cpp b/src/openrct2-ui/windows/EditorBottomToolbar.cpp index e0e56a98038d..8d22ece9f8e5 100644 --- a/src/openrct2-ui/windows/EditorBottomToolbar.cpp +++ b/src/openrct2-ui/windows/EditorBottomToolbar.cpp @@ -39,7 +39,7 @@ namespace OpenRCT2::Ui::Windows }; // clang-format off - static constexpr Widget _editorBottomToolbarWidgets[] = { + static constexpr Widget kEditorBottomToolbarWidgets[] = { MakeWidget({ 0, 0}, {200, 34}, WindowWidgetType::ImgBtn, WindowColour::Primary), MakeWidget({ 2, 2}, {196, 30}, WindowWidgetType::FlatBtn, WindowColour::Primary), MakeWidget({440, 0}, {200, 34}, WindowWidgetType::ImgBtn, WindowColour::Primary), @@ -52,7 +52,7 @@ namespace OpenRCT2::Ui::Windows private: using FuncPtr = void (EditorBottomToolbarWindow::*)() const; - static constexpr StringId _editorStepNames[] = { + static constexpr StringId kEditorStepNames[] = { STR_EDITOR_STEP_OBJECT_SELECTION, STR_EDITOR_STEP_LANDSCAPE_EDITOR, STR_EDITOR_STEP_INVENTIONS_LIST_SET_UP, STR_EDITOR_STEP_OPTIONS_SELECTION, STR_EDITOR_STEP_OBJECTIVE_SELECTION, STR_EDITOR_STEP_SAVE_SCENARIO, @@ -62,7 +62,7 @@ namespace OpenRCT2::Ui::Windows public: void OnOpen() override { - SetWidgets(_editorBottomToolbarWidgets); + SetWidgets(kEditorBottomToolbarWidgets); InitScrollWidgets(); SetAllSceneryItemsInvented(); @@ -143,12 +143,12 @@ namespace OpenRCT2::Ui::Windows if ((gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) || (GetNumFreeEntities() == kMaxEntities && !(gameState.Park.Flags & PARK_FLAGS_SPRITES_INITIALISED))) { - ((this)->*(_previousButtonMouseUp[EnumValue(gameState.EditorStep)]))(); + ((this)->*(kPreviousButtonMouseUp[EnumValue(gameState.EditorStep)]))(); } } else if (widgetIndex == WIDX_NEXT_STEP_BUTTON) { - ((this)->*(_nextButtonMouseUp[EnumValue(gameState.EditorStep)]))(); + ((this)->*(kNextButtonMouseUp[EnumValue(gameState.EditorStep)]))(); } } @@ -310,7 +310,7 @@ namespace OpenRCT2::Ui::Windows int16_t textX = (widgets[WIDX_PREVIOUS_IMAGE].left + 30 + widgets[WIDX_PREVIOUS_IMAGE].right) / 2 + windowPos.x; int16_t textY = widgets[WIDX_PREVIOUS_IMAGE].top + 6 + windowPos.y; - StringId stringId = _editorStepNames[EnumValue(GetGameState().EditorStep) - 1]; + StringId stringId = kEditorStepNames[EnumValue(GetGameState().EditorStep) - 1]; if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) stringId = STR_EDITOR_STEP_OBJECT_SELECTION; @@ -349,7 +349,7 @@ namespace OpenRCT2::Ui::Windows int16_t textX = (widgets[WIDX_NEXT_IMAGE].left + widgets[WIDX_NEXT_IMAGE].right - 30) / 2 + windowPos.x; int16_t textY = widgets[WIDX_NEXT_IMAGE].top + 6 + windowPos.y; - StringId stringId = _editorStepNames[EnumValue(GetGameState().EditorStep) + 1]; + StringId stringId = kEditorStepNames[EnumValue(GetGameState().EditorStep) + 1]; if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) stringId = STR_EDITOR_STEP_ROLLERCOASTER_DESIGNER; @@ -363,11 +363,11 @@ namespace OpenRCT2::Ui::Windows int16_t stateY = height - 0x0C + windowPos.y; auto colour = colours[2].withFlag(ColourFlag::translucent, false).withFlag(ColourFlag::withOutline, true); DrawTextBasic( - dpi, { stateX, stateY }, _editorStepNames[EnumValue(GetGameState().EditorStep)], {}, + dpi, { stateX, stateY }, kEditorStepNames[EnumValue(GetGameState().EditorStep)], {}, { colour, TextAlignment::CENTRE }); } - static constexpr FuncPtr _previousButtonMouseUp[] = { + static constexpr FuncPtr kPreviousButtonMouseUp[] = { nullptr, &EditorBottomToolbarWindow::JumpBackToObjectSelection, &EditorBottomToolbarWindow::JumpBackToLandscapeEditor, @@ -378,7 +378,7 @@ namespace OpenRCT2::Ui::Windows nullptr, }; - static constexpr FuncPtr _nextButtonMouseUp[] = { + static constexpr FuncPtr kNextButtonMouseUp[] = { &EditorBottomToolbarWindow::JumpForwardFromObjectSelection, &EditorBottomToolbarWindow::JumpForwardToInventionListSetUp, &EditorBottomToolbarWindow::JumpForwardToOptionsSelection, diff --git a/src/openrct2-ui/windows/EditorObjectSelection.cpp b/src/openrct2-ui/windows/EditorObjectSelection.cpp index 0b373f10a50f..7f3eac93a13d 100644 --- a/src/openrct2-ui/windows/EditorObjectSelection.cpp +++ b/src/openrct2-ui/windows/EditorObjectSelection.cpp @@ -475,7 +475,7 @@ namespace OpenRCT2::Ui::Windows auto descriptor = _loadedObject->GetDescriptor(); auto& objectManager = GetContext()->GetObjectManager(); auto entryIndex = objectManager.GetLoadedObjectEntryIndex(descriptor); - if (entryIndex != OBJECT_ENTRY_INDEX_NULL) + if (entryIndex != kObjectEntryIndexNull) { objectManager.UnloadObjects({ descriptor }); objectManager.LoadObject(descriptor, entryIndex); @@ -1025,7 +1025,7 @@ namespace OpenRCT2::Ui::Windows } } - constexpr int32_t ThrillRidesTabAnimationSequence[] = { + constexpr int32_t kThrillRidesTabAnimationSequence[] = { 5, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, }; @@ -1049,7 +1049,7 @@ namespace OpenRCT2::Ui::Windows // TODO: generalise this? if (currentPage.Caption == STR_OBJECT_SELECTION_RIDE_VEHICLES_ATTRACTIONS && i == 4) - spriteIndex += ThrillRidesTabAnimationSequence[frame]; + spriteIndex += kThrillRidesTabAnimationSequence[frame]; else spriteIndex += frame; @@ -1531,7 +1531,7 @@ namespace OpenRCT2::Ui::Windows ride_type_t rideType = 0; for (int32_t i = 0; i < RCT2::ObjectLimits::kMaxRideTypesPerRideEntry; i++) { - if (item->RideInfo.RideType[i] != RIDE_TYPE_NULL) + if (item->RideInfo.RideType[i] != kRideTypeNull) { rideType = item->RideInfo.RideType[i]; break; @@ -1670,7 +1670,7 @@ namespace OpenRCT2::Ui::Windows for (int32_t i = 0; i < RCT2::ObjectLimits::kMaxRideTypesPerRideEntry; i++) { auto rideType = item->RideInfo.RideType[i]; - if (rideType != RIDE_TYPE_NULL) + if (rideType != kRideTypeNull) { result = GetRideTypeDescriptor(rideType).Naming.Name; break; diff --git a/src/openrct2-ui/windows/EditorObjectiveOptions.cpp b/src/openrct2-ui/windows/EditorObjectiveOptions.cpp index fb019a519dcc..93f41366e73d 100644 --- a/src/openrct2-ui/windows/EditorObjectiveOptions.cpp +++ b/src/openrct2-ui/windows/EditorObjectiveOptions.cpp @@ -36,30 +36,30 @@ namespace OpenRCT2::Ui::Windows static constexpr int32_t WH = 229; static constexpr int32_t WW = 450; - static constexpr money64 ObjectiveCurrencyLoanAndValueMax = 2000000.00_GBP; - static constexpr money64 ObjectiveCurrencyLoanAndValueMin = 1000.00_GBP; - static constexpr money64 ObjectiveCurrencyLoanAndValueAdjustment = 1000.00_GBP; + static constexpr money64 kObjectiveCurrencyLoanAndValueMax = 2000000.00_GBP; + static constexpr money64 kObjectiveCurrencyLoanAndValueMin = 1000.00_GBP; + static constexpr money64 kObjectiveCurrencyLoanAndValueAdjustment = 1000.00_GBP; - static constexpr money64 ObjectiveCurrencyFoodMax = 2000000.00_GBP; - static constexpr money64 ObjectiveCurrencyFoodMin = 1000.00_GBP; - static constexpr money64 ObjectiveCurrencyFoodAdjustment = 100.00_GBP; + static constexpr money64 kObjectiveCurrencyFoodMax = 2000000.00_GBP; + static constexpr money64 kObjectiveCurrencyFoodMin = 1000.00_GBP; + static constexpr money64 kObjectiveCurrencyFoodAdjustment = 100.00_GBP; - static constexpr uint16_t ObjectiveLengthMax = 5000; - static constexpr uint16_t ObjectiveLengthMin = 1000; - static constexpr uint16_t ObjectiveLengthAdjustment = 100; + static constexpr uint16_t kObjectiveLengthMax = 5000; + static constexpr uint16_t kObjectiveLengthMin = 1000; + static constexpr uint16_t kObjectiveLengthAdjustment = 100; - static constexpr uint16_t ObjectiveExcitementMax = FIXED_2DP(9, 90); - static constexpr uint16_t ObjectiveExcitementMin = FIXED_2DP(4, 00); - static constexpr uint16_t ObjectiveExcitementAdjustment = FIXED_2DP(0, 10); + static constexpr uint16_t kObjectiveExcitementMax = FIXED_2DP(9, 90); + static constexpr uint16_t kObjectiveExcitementMin = FIXED_2DP(4, 00); + static constexpr uint16_t kObjectiveExcitementAdjustment = FIXED_2DP(0, 10); // The number has to leave a bit of room for other entities like vehicles, litter and balloons. - static constexpr uint16_t ObjectiveGuestsMax = 50000; - static constexpr uint16_t ObjectiveGuestsMin = 250; - static constexpr uint16_t ObjectiveGuestsAdjustment = 50; + static constexpr uint16_t kObjectiveGuestsMax = 50000; + static constexpr uint16_t kObjectiveGuestsMin = 250; + static constexpr uint16_t kObjectiveGuestsAdjustment = 50; - static constexpr uint8_t ObjectiveYearMax = 25; - static constexpr uint8_t ObjectiveYearMin = 1; - static constexpr uint8_t ObjectiveYearAdjustment = 1; + static constexpr uint8_t kObjectiveYearMax = 25; + static constexpr uint8_t kObjectiveYearMin = 1; + static constexpr uint8_t kObjectiveYearAdjustment = 1; #pragma region Widgets @@ -475,7 +475,7 @@ namespace OpenRCT2::Ui::Windows for (i = SCENARIO_CATEGORY_BEGINNER; i <= SCENARIO_CATEGORY_OTHER; i++) { gDropdownItems[i].Format = STR_DROPDOWN_MENU_LABEL; - gDropdownItems[i].Args = ScenarioCategoryStringIds[i]; + gDropdownItems[i].Args = kScenarioCategoryStringIds[i]; } WindowDropdownShowTextCustomWidth( { windowPos.x + dropdownWidget->left, windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1, @@ -491,57 +491,57 @@ namespace OpenRCT2::Ui::Windows case OBJECTIVE_PARK_VALUE_BY: case OBJECTIVE_MONTHLY_RIDE_INCOME: case OBJECTIVE_REPAY_LOAN_AND_PARK_VALUE: - if (gameState.ScenarioObjective.Currency >= ObjectiveCurrencyLoanAndValueMax) + if (gameState.ScenarioObjective.Currency >= kObjectiveCurrencyLoanAndValueMax) { ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.Currency += ObjectiveCurrencyLoanAndValueAdjustment; + gameState.ScenarioObjective.Currency += kObjectiveCurrencyLoanAndValueAdjustment; Invalidate(); } break; case OBJECTIVE_MONTHLY_FOOD_INCOME: - if (gameState.ScenarioObjective.Currency >= ObjectiveCurrencyFoodMax) + if (gameState.ScenarioObjective.Currency >= kObjectiveCurrencyFoodMax) { ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.Currency += ObjectiveCurrencyFoodAdjustment; + gameState.ScenarioObjective.Currency += kObjectiveCurrencyFoodAdjustment; Invalidate(); } break; case OBJECTIVE_10_ROLLERCOASTERS_LENGTH: - if (gameState.ScenarioObjective.MinimumLength >= ObjectiveLengthMax) + if (gameState.ScenarioObjective.MinimumLength >= kObjectiveLengthMax) { ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.MinimumLength += ObjectiveLengthAdjustment; + gameState.ScenarioObjective.MinimumLength += kObjectiveLengthAdjustment; Invalidate(); } break; case OBJECTIVE_FINISH_5_ROLLERCOASTERS: - if (gameState.ScenarioObjective.MinimumExcitement >= ObjectiveExcitementMax) + if (gameState.ScenarioObjective.MinimumExcitement >= kObjectiveExcitementMax) { ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.MinimumExcitement += ObjectiveExcitementAdjustment; + gameState.ScenarioObjective.MinimumExcitement += kObjectiveExcitementAdjustment; Invalidate(); } break; default: - if (gameState.ScenarioObjective.NumGuests >= ObjectiveGuestsMax) + if (gameState.ScenarioObjective.NumGuests >= kObjectiveGuestsMax) { ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.NumGuests += ObjectiveGuestsAdjustment; + gameState.ScenarioObjective.NumGuests += kObjectiveGuestsAdjustment; Invalidate(); } break; @@ -556,57 +556,57 @@ namespace OpenRCT2::Ui::Windows case OBJECTIVE_PARK_VALUE_BY: case OBJECTIVE_MONTHLY_RIDE_INCOME: case OBJECTIVE_REPAY_LOAN_AND_PARK_VALUE: - if (gameState.ScenarioObjective.Currency <= ObjectiveCurrencyLoanAndValueMin) + if (gameState.ScenarioObjective.Currency <= kObjectiveCurrencyLoanAndValueMin) { ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.Currency -= ObjectiveCurrencyLoanAndValueAdjustment; + gameState.ScenarioObjective.Currency -= kObjectiveCurrencyLoanAndValueAdjustment; Invalidate(); } break; case OBJECTIVE_MONTHLY_FOOD_INCOME: - if (gameState.ScenarioObjective.Currency <= ObjectiveCurrencyFoodMin) + if (gameState.ScenarioObjective.Currency <= kObjectiveCurrencyFoodMin) { ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.Currency -= ObjectiveCurrencyFoodAdjustment; + gameState.ScenarioObjective.Currency -= kObjectiveCurrencyFoodAdjustment; Invalidate(); } break; case OBJECTIVE_10_ROLLERCOASTERS_LENGTH: - if (gameState.ScenarioObjective.MinimumLength <= ObjectiveLengthMin) + if (gameState.ScenarioObjective.MinimumLength <= kObjectiveLengthMin) { ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.MinimumLength -= ObjectiveLengthAdjustment; + gameState.ScenarioObjective.MinimumLength -= kObjectiveLengthAdjustment; Invalidate(); } break; case OBJECTIVE_FINISH_5_ROLLERCOASTERS: - if (gameState.ScenarioObjective.MinimumExcitement <= ObjectiveExcitementMin) + if (gameState.ScenarioObjective.MinimumExcitement <= kObjectiveExcitementMin) { ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.MinimumExcitement -= ObjectiveExcitementAdjustment; + gameState.ScenarioObjective.MinimumExcitement -= kObjectiveExcitementAdjustment; Invalidate(); } break; default: - if (gameState.ScenarioObjective.NumGuests <= ObjectiveGuestsMin) + if (gameState.ScenarioObjective.NumGuests <= kObjectiveGuestsMin) { ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.NumGuests -= ObjectiveGuestsAdjustment; + gameState.ScenarioObjective.NumGuests -= kObjectiveGuestsAdjustment; Invalidate(); } break; @@ -616,13 +616,13 @@ namespace OpenRCT2::Ui::Windows void Arg2Increase() { auto& gameState = GetGameState(); - if (gameState.ScenarioObjective.Year >= ObjectiveYearMax) + if (gameState.ScenarioObjective.Year >= kObjectiveYearMax) { ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.Year += ObjectiveYearAdjustment; + gameState.ScenarioObjective.Year += kObjectiveYearAdjustment; Invalidate(); } } @@ -630,13 +630,13 @@ namespace OpenRCT2::Ui::Windows void Arg2Decrease() { auto& gameState = GetGameState(); - if (gameState.ScenarioObjective.Year <= ObjectiveYearMin) + if (gameState.ScenarioObjective.Year <= kObjectiveYearMin) { ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.Year -= ObjectiveYearAdjustment; + gameState.ScenarioObjective.Year -= kObjectiveYearAdjustment; Invalidate(); } } @@ -993,7 +993,7 @@ namespace OpenRCT2::Ui::Windows // Scenario category value screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_CATEGORY].left + 1, widgets[WIDX_CATEGORY].top }; ft = Formatter(); - ft.Add(ScenarioCategoryStringIds[gameState.ScenarioCategory]); + ft.Add(kScenarioCategoryStringIds[gameState.ScenarioCategory]); DrawTextBasic(dpi, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); } diff --git a/src/openrct2-ui/windows/EditorParkEntrance.cpp b/src/openrct2-ui/windows/EditorParkEntrance.cpp index fe7bb598816c..2a3a47474bed 100644 --- a/src/openrct2-ui/windows/EditorParkEntrance.cpp +++ b/src/openrct2-ui/windows/EditorParkEntrance.cpp @@ -39,7 +39,7 @@ namespace OpenRCT2::Ui::Windows struct EntranceSelection { - ObjectEntryIndex entryIndex = OBJECT_ENTRY_INDEX_NULL; + ObjectEntryIndex entryIndex = kObjectEntryIndexNull; StringId stringId = kStringIdNone; ImageIndex imageId = kSpriteIdNull; }; @@ -223,16 +223,16 @@ namespace OpenRCT2::Ui::Windows ObjectEntryIndex ScrollGetEntranceListItemAt(const ScreenCoordsXY& screenCoords) { if (screenCoords.x <= 0 || screenCoords.y <= 0) - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; size_t column = screenCoords.x / kImageSize; size_t row = screenCoords.y / kImageSize; if (column >= 5) - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; size_t index = column + (row * kNumColumns); if (index >= _entranceTypes.size()) - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; return _entranceTypes[index].entryIndex; } @@ -368,7 +368,7 @@ namespace OpenRCT2::Ui::Windows void OnScrollMouseOver(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override { auto highlighted = ScrollGetEntranceListItemAt(screenCoords); - if (highlighted != OBJECT_ENTRY_INDEX_NULL) + if (highlighted != kObjectEntryIndexNull) { _highlightedEntranceType = highlighted; Invalidate(); @@ -378,7 +378,7 @@ namespace OpenRCT2::Ui::Windows void OnScrollMouseDown(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override { auto selected = ScrollGetEntranceListItemAt(screenCoords); - if (selected == OBJECT_ENTRY_INDEX_NULL) + if (selected == kObjectEntryIndexNull) { return; } diff --git a/src/openrct2-ui/windows/EditorScenarioOptions.cpp b/src/openrct2-ui/windows/EditorScenarioOptions.cpp index f07afefe44b5..0081d6365eb8 100644 --- a/src/openrct2-ui/windows/EditorScenarioOptions.cpp +++ b/src/openrct2-ui/windows/EditorScenarioOptions.cpp @@ -1036,7 +1036,7 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; case WIDX_ENTRY_PRICE_INCREASE: - if (gameState.Park.EntranceFee < MAX_ENTRANCE_FEE) + if (gameState.Park.EntranceFee < kMaxEntranceFee) { auto scenarioSetSetting = ScenarioSetSettingAction( ScenarioSetSetting::ParkChargeEntryFee, gameState.Park.EntranceFee + 1.00_GBP); diff --git a/src/openrct2-ui/windows/Footpath.cpp b/src/openrct2-ui/windows/Footpath.cpp index d25f948d14f4..fc48b79dbd1c 100644 --- a/src/openrct2-ui/windows/Footpath.cpp +++ b/src/openrct2-ui/windows/Footpath.cpp @@ -370,7 +370,7 @@ namespace OpenRCT2::Ui::Windows } else { - gFootpathSelection.LegacyPath = OBJECT_ENTRY_INDEX_NULL; + gFootpathSelection.LegacyPath = kObjectEntryIndexNull; gFootpathSelection.NormalSurface = entryIndex.second; } } @@ -383,7 +383,7 @@ namespace OpenRCT2::Ui::Windows } else { - gFootpathSelection.LegacyPath = OBJECT_ENTRY_INDEX_NULL; + gFootpathSelection.LegacyPath = kObjectEntryIndexNull; gFootpathSelection.QueueSurface = entryIndex.second; } } @@ -454,7 +454,7 @@ namespace OpenRCT2::Ui::Windows ? WindowWidgetType::ImgBtn : WindowWidgetType::Empty; - if (gFootpathSelection.LegacyPath == OBJECT_ENTRY_INDEX_NULL) + if (gFootpathSelection.LegacyPath == kObjectEntryIndexNull) { widgets[WIDX_RAILINGS_TYPE].type = WindowWidgetType::FlatBtn; } @@ -485,7 +485,7 @@ namespace OpenRCT2::Ui::Windows } std::optional baseImage; - if (gFootpathSelection.LegacyPath == OBJECT_ENTRY_INDEX_NULL) + if (gFootpathSelection.LegacyPath == kObjectEntryIndexNull) { auto selectedPath = gFootpathSelection.GetSelectedSurface(); const auto* pathType = GetPathSurfaceEntry(selectedPath); @@ -602,7 +602,7 @@ namespace OpenRCT2::Ui::Windows void WindowFootpathDrawDropdownButtons(DrawPixelInfo& dpi) { - if (gFootpathSelection.LegacyPath == OBJECT_ENTRY_INDEX_NULL) + if (gFootpathSelection.LegacyPath == kObjectEntryIndexNull) { // Set footpath and queue type button images auto pathImage = kSpriteIdNull; @@ -699,7 +699,7 @@ namespace OpenRCT2::Ui::Windows continue; } - if (gFootpathSelection.LegacyPath == OBJECT_ENTRY_INDEX_NULL + if (gFootpathSelection.LegacyPath == kObjectEntryIndexNull && i == (showQueues ? gFootpathSelection.QueueSurface : gFootpathSelection.NormalSurface)) { defaultIndex = numPathTypes; @@ -725,7 +725,7 @@ namespace OpenRCT2::Ui::Windows continue; } - if (gFootpathSelection.LegacyPath != OBJECT_ENTRY_INDEX_NULL && gFootpathSelection.LegacyPath == i) + if (gFootpathSelection.LegacyPath != kObjectEntryIndexNull && gFootpathSelection.LegacyPath == i) { defaultIndex = numPathTypes; } @@ -1496,7 +1496,7 @@ namespace OpenRCT2::Ui::Windows PathConstructFlags pathConstructFlags = 0; if (gFootpathSelection.IsQueueSelected) pathConstructFlags |= PathConstructFlag::IsQueue; - if (gFootpathSelection.LegacyPath != OBJECT_ENTRY_INDEX_NULL) + if (gFootpathSelection.LegacyPath != kObjectEntryIndexNull) { pathConstructFlags |= PathConstructFlag::IsLegacyPathObject; type = gFootpathSelection.LegacyPath; @@ -1793,7 +1793,7 @@ namespace OpenRCT2::Ui::Windows else { // Going up in the world! - VirtualFloorSetHeight(_provisionalFootpath.position.z + LAND_HEIGHT_STEP); + VirtualFloorSetHeight(_provisionalFootpath.position.z + kLandHeightStep); } } diff --git a/src/openrct2-ui/windows/InstallTrack.cpp b/src/openrct2-ui/windows/InstallTrack.cpp index 74814047bba5..f03ff264c6d8 100644 --- a/src/openrct2-ui/windows/InstallTrack.cpp +++ b/src/openrct2-ui/windows/InstallTrack.cpp @@ -410,7 +410,7 @@ namespace OpenRCT2::Ui::Windows } ObjectManagerUnloadAllObjects(); - if (trackDesign->trackAndVehicle.rtdIndex == RIDE_TYPE_NULL) + if (trackDesign->trackAndVehicle.rtdIndex == kRideTypeNull) { LOG_ERROR("Failed to load track (ride type null): %s", path); return nullptr; diff --git a/src/openrct2-ui/windows/Land.cpp b/src/openrct2-ui/windows/Land.cpp index 0637b3ce13d2..bef43874f7b1 100644 --- a/src/openrct2-ui/windows/Land.cpp +++ b/src/openrct2-ui/windows/Land.cpp @@ -95,8 +95,8 @@ namespace OpenRCT2::Ui::Windows WindowPushOthersBelow(*this); gLandToolSize = 1; - gLandToolTerrainSurface = OBJECT_ENTRY_INDEX_NULL; - gLandToolTerrainEdge = OBJECT_ENTRY_INDEX_NULL; + gLandToolTerrainSurface = kObjectEntryIndexNull; + gLandToolTerrainEdge = kObjectEntryIndexNull; _selectedFloorTexture = LandTool::GetSurfaceStyleFromDropdownIndex(0); _selectedWallTexture = LandTool::GetEdgeStyleFromDropdownIndex(0); @@ -179,7 +179,7 @@ namespace OpenRCT2::Ui::Windows if (gLandToolTerrainSurface == type) { - gLandToolTerrainSurface = OBJECT_ENTRY_INDEX_NULL; + gLandToolTerrainSurface = kObjectEntryIndexNull; } else { @@ -197,7 +197,7 @@ namespace OpenRCT2::Ui::Windows if (gLandToolTerrainEdge == type) { - gLandToolTerrainEdge = OBJECT_ENTRY_INDEX_NULL; + gLandToolTerrainEdge = kObjectEntryIndexNull; } else { @@ -237,9 +237,9 @@ namespace OpenRCT2::Ui::Windows { pressed_widgets = 0; SetWidgetPressed(WIDX_PREVIEW, true); - if (gLandToolTerrainSurface != OBJECT_ENTRY_INDEX_NULL) + if (gLandToolTerrainSurface != kObjectEntryIndexNull) SetWidgetPressed(WIDX_FLOOR, true); - if (gLandToolTerrainEdge != OBJECT_ENTRY_INDEX_NULL) + if (gLandToolTerrainEdge != kObjectEntryIndexNull) SetWidgetPressed(WIDX_WALL, true); if (_landToolMountainMode) SetWidgetPressed(WIDX_MOUNTAINMODE, true); @@ -303,7 +303,7 @@ namespace OpenRCT2::Ui::Windows // Draw paint price numTiles = gLandToolSize * gLandToolSize; price = 0; - if (gLandToolTerrainSurface != OBJECT_ENTRY_INDEX_NULL) + if (gLandToolTerrainSurface != kObjectEntryIndexNull) { auto& objManager = GetContext()->GetObjectManager(); const auto surfaceObj = static_cast( @@ -314,7 +314,7 @@ namespace OpenRCT2::Ui::Windows } } - if (gLandToolTerrainEdge != OBJECT_ENTRY_INDEX_NULL) + if (gLandToolTerrainEdge != kObjectEntryIndexNull) price += numTiles * 100LL; if (price != 0) diff --git a/src/openrct2-ui/windows/MapGen.cpp b/src/openrct2-ui/windows/MapGen.cpp index 22ccfaeeef49..9b12af0ffd4f 100644 --- a/src/openrct2-ui/windows/MapGen.cpp +++ b/src/openrct2-ui/windows/MapGen.cpp @@ -1126,7 +1126,7 @@ namespace OpenRCT2::Ui::Windows if (gLandToolTerrainSurface == type) { - gLandToolTerrainSurface = OBJECT_ENTRY_INDEX_NULL; + gLandToolTerrainSurface = kObjectEntryIndexNull; } else { @@ -1143,7 +1143,7 @@ namespace OpenRCT2::Ui::Windows if (gLandToolTerrainEdge == type) { - gLandToolTerrainEdge = OBJECT_ENTRY_INDEX_NULL; + gLandToolTerrainEdge = kObjectEntryIndexNull; } else { diff --git a/src/openrct2-ui/windows/NewRide.cpp b/src/openrct2-ui/windows/NewRide.cpp index 80a0bedaf7dd..a71b61640e5f 100644 --- a/src/openrct2-ui/windows/NewRide.cpp +++ b/src/openrct2-ui/windows/NewRide.cpp @@ -304,9 +304,9 @@ namespace OpenRCT2::Ui::Windows _filter.clear(); frame_no = 0; - _newRideVars.SelectedRide = { RIDE_TYPE_NULL, OBJECT_ENTRY_INDEX_NULL }; - _lastTrackDesignCountRideType.Type = RIDE_TYPE_NULL; - _lastTrackDesignCountRideType.EntryIndex = OBJECT_ENTRY_INDEX_NULL; + _newRideVars.SelectedRide = { kRideTypeNull, kObjectEntryIndexNull }; + _lastTrackDesignCountRideType.Type = kRideTypeNull; + _lastTrackDesignCountRideType.EntryIndex = kObjectEntryIndexNull; width = 1; RefreshWidgetSizing(); @@ -332,7 +332,7 @@ namespace OpenRCT2::Ui::Windows WidgetInvalidate(*this, WIDX_FILTER_TEXT_BOX); } - if (_newRideVars.SelectedRide.Type != RIDE_TYPE_NULL && _newRideVars.SelectedRideCountdown-- == 0) + if (_newRideVars.SelectedRide.Type != kRideTypeNull && _newRideVars.SelectedRideCountdown-- == 0) { RideSelect(); } @@ -346,7 +346,7 @@ namespace OpenRCT2::Ui::Windows // Remove highlight when mouse leaves rides list if (!WidgetIsHighlighted(*this, WIDX_RIDE_LIST)) { - _newRideVars.HighlightedRide = { RIDE_TYPE_NULL, OBJECT_ENTRY_INDEX_NULL }; + _newRideVars.HighlightedRide = { kRideTypeNull, kObjectEntryIndexNull }; WidgetInvalidate(*this, WIDX_RIDE_LIST); } } @@ -425,7 +425,7 @@ namespace OpenRCT2::Ui::Windows if (_currentTab != RESEARCH_TAB) { RideSelection item = _newRideVars.HighlightedRide; - if (item.Type != RIDE_TYPE_NULL || item.EntryIndex != OBJECT_ENTRY_INDEX_NULL) + if (item.Type != kRideTypeNull || item.EntryIndex != kObjectEntryIndexNull) DrawRideInformation(dpi, item, windowPos + ScreenCoordsXY{ 3, height - 64 }, width - 6); } else @@ -439,7 +439,7 @@ namespace OpenRCT2::Ui::Windows RideSelection* listItem = _windowNewRideListItems; int32_t count = 0; - while (listItem->Type != RIDE_TYPE_NULL || listItem->EntryIndex != OBJECT_ENTRY_INDEX_NULL) + while (listItem->Type != kRideTypeNull || listItem->EntryIndex != kObjectEntryIndexNull) { count++; listItem++; @@ -462,7 +462,7 @@ namespace OpenRCT2::Ui::Windows void OnScrollMouseDown(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override { RideSelection item = ScrollGetRideListItemAt(screenCoords); - if (item.Type == RIDE_TYPE_NULL && item.EntryIndex == OBJECT_ENTRY_INDEX_NULL) + if (item.Type == kRideTypeNull && item.EntryIndex == kObjectEntryIndexNull) { return; } @@ -485,7 +485,7 @@ namespace OpenRCT2::Ui::Windows ScreenCoordsXY coords{ 1, 1 }; RideSelection* listItem = _windowNewRideListItems; - while (listItem->Type != RIDE_TYPE_NULL || listItem->EntryIndex != OBJECT_ENTRY_INDEX_NULL) + while (listItem->Type != kRideTypeNull || listItem->EntryIndex != kObjectEntryIndexNull) { // Draw flat button rectangle int32_t buttonFlags = 0; @@ -540,7 +540,7 @@ namespace OpenRCT2::Ui::Windows { _currentTab = tab; frame_no = 0; - _newRideVars.HighlightedRide = { RIDE_TYPE_NULL, OBJECT_ENTRY_INDEX_NULL }; + _newRideVars.HighlightedRide = { kRideTypeNull, kObjectEntryIndexNull }; _newRideVars.SelectedRideCountdown = std::numeric_limits::max(); PopulateRideList(); RefreshWidgetSizing(); @@ -556,7 +556,7 @@ namespace OpenRCT2::Ui::Windows void RideSelect() { RideSelection item = _newRideVars.SelectedRide; - if (item.Type == RIDE_TYPE_NULL) + if (item.Type == kRideTypeNull) { return; } @@ -655,7 +655,7 @@ namespace OpenRCT2::Ui::Windows for (int32_t i = 0; i < static_cast(std::size(RideTypeViewOrder)); i++) { auto rideType = RideTypeViewOrder[i]; - if (rideType == RIDE_TYPE_NULL) + if (rideType == kRideTypeNull) continue; if (GetRideTypeDescriptor(rideType).Category != currentCategory) @@ -664,8 +664,8 @@ namespace OpenRCT2::Ui::Windows nextListItem = IterateOverRideType(rideType, nextListItem, listEnd); } - nextListItem->Type = RIDE_TYPE_NULL; - nextListItem->EntryIndex = OBJECT_ENTRY_INDEX_NULL; + nextListItem->Type = kRideTypeNull; + nextListItem->EntryIndex = kObjectEntryIndexNull; } RideSelection* IterateOverRideType(ride_type_t rideType, RideSelection* nextListItem, RideSelection* listEnd) @@ -875,8 +875,8 @@ namespace OpenRCT2::Ui::Windows RideSelection ScrollGetRideListItemAt(const ScreenCoordsXY& screenCoords) { RideSelection result; - result.Type = RIDE_TYPE_NULL; - result.EntryIndex = OBJECT_ENTRY_INDEX_NULL; + result.Type = kRideTypeNull; + result.EntryIndex = kObjectEntryIndexNull; if (screenCoords.x <= 0 || screenCoords.y <= 0) return result; @@ -889,7 +889,7 @@ namespace OpenRCT2::Ui::Windows int32_t index = column + (row * 5); RideSelection* listItem = _windowNewRideListItems; - while (listItem->Type != RIDE_TYPE_NULL || listItem->EntryIndex != OBJECT_ENTRY_INDEX_NULL) + while (listItem->Type != kRideTypeNull || listItem->EntryIndex != kObjectEntryIndexNull) { if (index-- == 0) { diff --git a/src/openrct2-ui/windows/Park.cpp b/src/openrct2-ui/windows/Park.cpp index 733fb6181633..128c683850ce 100644 --- a/src/openrct2-ui/windows/Park.cpp +++ b/src/openrct2-ui/windows/Park.cpp @@ -835,7 +835,7 @@ namespace OpenRCT2::Ui::Windows { case WIDX_INCREASE_PRICE: { - const auto newFee = std::min(MAX_ENTRANCE_FEE, gameState.Park.EntranceFee + 1.00_GBP); + const auto newFee = std::min(kMaxEntranceFee, gameState.Park.EntranceFee + 1.00_GBP); auto gameAction = ParkSetEntranceFeeAction(newFee); GameActions::Execute(&gameAction); break; @@ -1059,7 +1059,7 @@ namespace OpenRCT2::Ui::Windows return; } - money = std::clamp(money, 0.00_GBP, MAX_ENTRANCE_FEE); + money = std::clamp(money, 0.00_GBP, kMaxEntranceFee); auto gameAction = ParkSetEntranceFeeAction(money); GameActions::Execute(&gameAction); } @@ -1113,7 +1113,7 @@ namespace OpenRCT2::Ui::Windows // Objective outcome if (gameState.ScenarioCompletedCompanyValue != kMoney64Undefined) { - if (gameState.ScenarioCompletedCompanyValue == COMPANY_VALUE_ON_FAILED_OBJECTIVE) + if (gameState.ScenarioCompletedCompanyValue == kCompanyValueOnFailedObjective) { // Objective failed DrawTextWrapped(dpi, screenCoords, 222, STR_OBJECTIVE_FAILED); diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index 9c2d1bf3c99e..6eed235e522f 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -3116,7 +3116,7 @@ namespace OpenRCT2::Ui::Windows if (availableModes & (1uLL << i)) { gDropdownItems[numAvailableModes].Format = STR_DROPDOWN_MENU_LABEL; - gDropdownItems[numAvailableModes].Args = RideModeNames[i]; + gDropdownItems[numAvailableModes].Args = kRideModeNames[i]; if (ride->mode == static_cast(i)) checkedIndex = numAvailableModes; @@ -3546,7 +3546,7 @@ namespace OpenRCT2::Ui::Windows } // Mode - widgets[WIDX_MODE].text = RideModeNames[EnumValue(ride->mode)]; + widgets[WIDX_MODE].text = kRideModeNames[EnumValue(ride->mode)]; // Waiting widgets[WIDX_LOAD].text = VehicleLoadNames[(ride->depart_flags & RIDE_DEPART_WAIT_FOR_LOAD_MASK)]; @@ -3805,7 +3805,7 @@ namespace OpenRCT2::Ui::Windows numItems = 1; for (j = 0; j < RCT2::ObjectLimits::kMaxRideTypesPerRideEntry; j++) { - if (rideEntry->ride_type[j] != RIDE_TYPE_NULL) + if (rideEntry->ride_type[j] != kRideTypeNull) break; } gDropdownItems[0].Format = STR_DROPDOWN_MENU_LABEL; @@ -3945,7 +3945,7 @@ namespace OpenRCT2::Ui::Windows int32_t j; for (j = 0; j < RCT2::ObjectLimits::kMaxRideTypesPerRideEntry; j++) { - if (rideEntry->ride_type[j] != RIDE_TYPE_NULL) + if (rideEntry->ride_type[j] != kRideTypeNull) break; } int32_t i; diff --git a/src/openrct2-ui/windows/RideConstruction.cpp b/src/openrct2-ui/windows/RideConstruction.cpp index 003731f04349..4d768aa86446 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -77,11 +77,11 @@ namespace OpenRCT2::Ui::Windows SelectedLiftAndInverted liftHillAndAlternativeState, const CoordsXYZ& trackPos); static std::pair WindowRideConstructionUpdateStateGetTrackElement(); - static constexpr StringId WINDOW_TITLE = STR_RIDE_CONSTRUCTION_WINDOW_TITLE; + static constexpr StringId kWindowTitle = STR_RIDE_CONSTRUCTION_WINDOW_TITLE; static constexpr int32_t WH = 394; static constexpr int32_t WW = 210; - static constexpr uint16_t ARROW_PULSE_DURATION = 200; + static constexpr uint16_t kArrowPulseDuration = 200; // Width of the group boxes, e.g. “Banking” static constexpr int32_t GW = WW - 6; @@ -141,8 +141,8 @@ namespace OpenRCT2::Ui::Windows validate_global_widx(WC_RIDE_CONSTRUCTION, WIDX_ROTATE); // clang-format off - static constexpr Widget _rideConstructionWidgets[] = { - WINDOW_SHIM(WINDOW_TITLE, WW, WH), + static constexpr Widget kRideConstructionWidgets[] = { + WINDOW_SHIM(kWindowTitle, WW, WH), MakeWidget ({ 3, 17}, { GW, 57}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_RIDE_CONSTRUCTION_DIRECTION ), MakeWidget ({ 3, 76}, { GW, 41}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_RIDE_CONSTRUCTION_SLOPE ), MakeWidget ({ 3, 120}, { GW, 41}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_RIDE_CONSTRUCTION_ROLL_BANKING ), @@ -194,7 +194,7 @@ namespace OpenRCT2::Ui::Windows static bool _autoRotatingShop; static bool _gotoStartPlacementMode = false; - static constexpr StringId RideConstructionSeatAngleRotationStrings[] = { + static constexpr StringId kSeatAngleRotationStrings[] = { STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_NEG_180, STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_NEG_135, STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_NEG_90, STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_NEG_45, STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_0, STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_45, @@ -237,7 +237,7 @@ namespace OpenRCT2::Ui::Windows return; } - SetWidgets(_rideConstructionWidgets); + SetWidgets(kRideConstructionWidgets); number = _currentRideIndex.ToUnderlying(); InitScrollWidgets(); @@ -1554,8 +1554,7 @@ namespace OpenRCT2::Ui::Windows ft.Increment(2); } - widgets[WIDX_SEAT_ROTATION_ANGLE_SPINNER].text = RideConstructionSeatAngleRotationStrings - [_currentSeatRotationAngle]; + widgets[WIDX_SEAT_ROTATION_ANGLE_SPINNER].text = kSeatAngleRotationStrings[_currentSeatRotationAngle]; // Simulate button auto& simulateWidget = widgets[WIDX_SIMULATE]; @@ -3183,7 +3182,7 @@ namespace OpenRCT2::Ui::Windows auto curTime = Platform::GetTicks(); if (_rideConstructionNextArrowPulse >= curTime) break; - _rideConstructionNextArrowPulse = curTime + ARROW_PULSE_DURATION; + _rideConstructionNextArrowPulse = curTime + kArrowPulseDuration; _currentTrackSelectionFlags ^= TRACK_SELECTION_FLAG_ARROW; trackPos = _currentTrackBegin; @@ -3207,7 +3206,7 @@ namespace OpenRCT2::Ui::Windows auto curTime = Platform::GetTicks(); if (_rideConstructionNextArrowPulse >= curTime) break; - _rideConstructionNextArrowPulse = curTime + ARROW_PULSE_DURATION; + _rideConstructionNextArrowPulse = curTime + kArrowPulseDuration; _currentTrackSelectionFlags ^= TRACK_SELECTION_FLAG_ARROW; direction = _currentTrackPieceDirection & 3; @@ -3230,7 +3229,7 @@ namespace OpenRCT2::Ui::Windows auto curTime = Platform::GetTicks(); if (_rideConstructionNextArrowPulse >= curTime) break; - _rideConstructionNextArrowPulse = curTime + ARROW_PULSE_DURATION; + _rideConstructionNextArrowPulse = curTime + kArrowPulseDuration; _currentTrackSelectionFlags ^= TRACK_SELECTION_FLAG_ARROW; trackPos = CoordsXYZ{ _currentTrackBegin.x & 0xFFE0, _currentTrackBegin.y & 0xFFE0, _currentTrackBegin.z + 15 }; @@ -3590,7 +3589,7 @@ namespace OpenRCT2::Ui::Windows // clearance if (!GetGameState().Cheats.disableClearanceChecks && z > kMinimumLandZ) { - z -= LAND_HEIGHT_STEP; + z -= kLandHeightStep; } } else diff --git a/src/openrct2-ui/windows/ScenarioSelect.cpp b/src/openrct2-ui/windows/ScenarioSelect.cpp index 0f97bc6b3508..bc318e1247ec 100644 --- a/src/openrct2-ui/windows/ScenarioSelect.cpp +++ b/src/openrct2-ui/windows/ScenarioSelect.cpp @@ -31,17 +31,17 @@ namespace OpenRCT2::Ui::Windows { - static constexpr StringId WINDOW_TITLE = STR_SELECT_SCENARIO; - static constexpr int32_t WW = 734; - static constexpr int32_t WH = 384; - static constexpr int32_t SidebarWidth = 180; - static constexpr int32_t TabWidth = 92; - static constexpr int32_t TabHeight = 34; - static constexpr int32_t TrueFontSize = 24; - static constexpr int32_t WidgetsStart = 17; - static constexpr int32_t TabsStart = WidgetsStart; - static constexpr int32_t InitialNumUnlockedScenarios = 5; - constexpr uint8_t NumTabs = 10; + static constexpr StringId kWindowTitle = STR_SELECT_SCENARIO; + static constexpr int32_t kWindowWidth = 734; + static constexpr int32_t kWindowHeight = 384; + static constexpr int32_t kSidebarWidth = 180; + static constexpr int32_t kTabWidth = 92; + static constexpr int32_t kTabHeight = 34; + static constexpr int32_t kTrueFontSize = 24; + static constexpr int32_t kWidgetsStart = 17; + static constexpr int32_t kTabsStart = kWidgetsStart; + static constexpr int32_t kInitialNumUnlockedScenarios = 5; + constexpr uint8_t kNumTabs = 10; enum class ListItemType : uint8_t { @@ -94,19 +94,19 @@ namespace OpenRCT2::Ui::Windows // clang-format off static constexpr Widget _scenarioSelectWidgets[] = { - WINDOW_SHIM(WINDOW_TITLE, WW, WH), - MakeWidget({ TabWidth + 1, WidgetsStart }, { WW, 284 }, WindowWidgetType::Resize, WindowColour::Secondary), // tab content panel - MakeRemapWidget({ 3, TabsStart + (TabHeight * 0) }, { TabWidth, TabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 01 - MakeRemapWidget({ 3, TabsStart + (TabHeight * 1) }, { TabWidth, TabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 02 - MakeRemapWidget({ 3, TabsStart + (TabHeight * 2) }, { TabWidth, TabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 03 - MakeRemapWidget({ 3, TabsStart + (TabHeight * 3) }, { TabWidth, TabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 04 - MakeRemapWidget({ 3, TabsStart + (TabHeight * 4) }, { TabWidth, TabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 05 - MakeRemapWidget({ 3, TabsStart + (TabHeight * 5) }, { TabWidth, TabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 06 - MakeRemapWidget({ 3, TabsStart + (TabHeight * 6) }, { TabWidth, TabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 07 - MakeRemapWidget({ 3, TabsStart + (TabHeight * 7) }, { TabWidth, TabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 08 - MakeRemapWidget({ 3, TabsStart + (TabHeight * 8) }, { TabWidth, TabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 09 - MakeRemapWidget({ 3, TabsStart + (TabHeight * 8) }, { TabWidth, TabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 10 - MakeWidget({ TabWidth + 3, WidgetsStart + 1 }, { WW - SidebarWidth, 362 }, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_VERTICAL), // level list + WINDOW_SHIM(kWindowTitle, kWindowWidth, kWindowHeight), + MakeWidget({ kTabWidth + 1, kWidgetsStart }, { kWindowWidth, 284 }, WindowWidgetType::Resize, WindowColour::Secondary), // tab content panel + MakeRemapWidget({ 3, kTabsStart + (kTabHeight * 0) }, { kTabWidth, kTabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 01 + MakeRemapWidget({ 3, kTabsStart + (kTabHeight * 1) }, { kTabWidth, kTabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 02 + MakeRemapWidget({ 3, kTabsStart + (kTabHeight * 2) }, { kTabWidth, kTabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 03 + MakeRemapWidget({ 3, kTabsStart + (kTabHeight * 3) }, { kTabWidth, kTabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 04 + MakeRemapWidget({ 3, kTabsStart + (kTabHeight * 4) }, { kTabWidth, kTabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 05 + MakeRemapWidget({ 3, kTabsStart + (kTabHeight * 5) }, { kTabWidth, kTabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 06 + MakeRemapWidget({ 3, kTabsStart + (kTabHeight * 6) }, { kTabWidth, kTabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 07 + MakeRemapWidget({ 3, kTabsStart + (kTabHeight * 7) }, { kTabWidth, kTabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 08 + MakeRemapWidget({ 3, kTabsStart + (kTabHeight * 8) }, { kTabWidth, kTabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 09 + MakeRemapWidget({ 3, kTabsStart + (kTabHeight * 8) }, { kTabWidth, kTabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 10 + MakeWidget({ kTabWidth + 3, kWidgetsStart + 1 }, { kWindowWidth - kSidebarWidth, 362 }, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_VERTICAL), // level list }; // clang-format on @@ -191,7 +191,7 @@ namespace OpenRCT2::Ui::Windows } else { // old-style - ft.Add(ScenarioCategoryStringIds[i]); + ft.Add(kScenarioCategoryStringIds[i]); } auto stringCoords = windowPos + ScreenCoordsXY{ widget.midX(), widget.midY() - 3 }; @@ -226,11 +226,12 @@ namespace OpenRCT2::Ui::Windows // Scenario path if (Config::Get().general.DebuggingTools) { - const auto shortPath = ShortenPath(scenario->Path, width - 6 - TabWidth, FontStyle::Medium); + const auto shortPath = ShortenPath(scenario->Path, width - 6 - kTabWidth, FontStyle::Medium); auto ft = Formatter(); ft.Add(shortPath.c_str()); - DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ TabWidth + 3, height - 3 - 11 }, STR_STRING, ft, { colours[1] }); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ kTabWidth + 3, height - 3 - 11 }, STR_STRING, ft, { colours[1] }); } // Scenario name @@ -310,7 +311,7 @@ namespace OpenRCT2::Ui::Windows } } - return { WW, y }; + return { kWindowWidth, y }; } void OnScrollMouseOver(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override @@ -538,7 +539,7 @@ namespace OpenRCT2::Ui::Windows uint32_t rct1CompletedScenarios = 0; std::optional megaParkListItemIndex = std::nullopt; - int32_t numUnlocks = InitialNumUnlockedScenarios; + int32_t numUnlocks = kInitialNumUnlockedScenarios; uint8_t currentHeading = UINT8_MAX; for (size_t i = 0; i < numScenarios; i++) { @@ -554,7 +555,7 @@ namespace OpenRCT2::Ui::Windows if (selected_tab != static_cast(ScenarioSource::Real) && currentHeading != scenario->Category) { currentHeading = scenario->Category; - headingStringId = ScenarioCategoryStringIds[currentHeading]; + headingStringId = kScenarioCategoryStringIds[currentHeading]; } } else @@ -577,7 +578,7 @@ namespace OpenRCT2::Ui::Windows if (currentHeading != category) { currentHeading = category; - headingStringId = ScenarioCategoryStringIds[category]; + headingStringId = kScenarioCategoryStringIds[category]; } } } @@ -724,8 +725,8 @@ namespace OpenRCT2::Ui::Windows } } - int32_t y = TabsStart; - for (int32_t i = 0; i < NumTabs; i++) + int32_t y = kTabsStart; + for (int32_t i = 0; i < kNumTabs; i++) { auto& widget = widgets[i + WIDX_TAB1]; if (!(showPages & (1 << i))) @@ -736,8 +737,8 @@ namespace OpenRCT2::Ui::Windows widget.type = WindowWidgetType::Tab; widget.top = y; - widget.bottom = y + (TabHeight - 1); - y += TabHeight; + widget.bottom = y + (kTabHeight - 1); + y += kTabHeight; } } @@ -749,7 +750,7 @@ namespace OpenRCT2::Ui::Windows static int32_t GetScenarioListItemSize() { if (!LocalisationService_UseTrueTypeFont()) - return TrueFontSize; + return kTrueFontSize; // Scenario title int32_t lineHeight = FontGetLineHeight(FontStyle::Medium); @@ -777,8 +778,10 @@ namespace OpenRCT2::Ui::Windows int32_t screenWidth = ContextGetWidth(); int32_t screenHeight = ContextGetHeight(); - ScreenCoordsXY screenPos = { (screenWidth - WW) / 2, std::max(kTopToolbarHeight + 1, (screenHeight - WH) / 2) }; - window = windowMgr->Create(WindowClass::ScenarioSelect, screenPos, WW, WH, 0, callback); + ScreenCoordsXY screenPos = { (screenWidth - kWindowWidth) / 2, + std::max(kTopToolbarHeight + 1, (screenHeight - kWindowHeight) / 2) }; + window = windowMgr->Create( + WindowClass::ScenarioSelect, screenPos, kWindowWidth, kWindowHeight, 0, callback); return window; } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/Scenery.cpp b/src/openrct2-ui/windows/Scenery.cpp index b56296791273..b3f3a5030e7f 100644 --- a/src/openrct2-ui/windows/Scenery.cpp +++ b/src/openrct2-ui/windows/Scenery.cpp @@ -156,7 +156,7 @@ namespace OpenRCT2::Ui::Windows struct SceneryTabInfo { SceneryTabType Type = SCENERY_TAB_TYPE_GROUP; - ObjectEntryIndex SceneryGroupIndex = OBJECT_ENTRY_INDEX_NULL; + ObjectEntryIndex SceneryGroupIndex = kObjectEntryIndexNull; std::deque Entries{}; u8string Filter = ""; @@ -1246,7 +1246,7 @@ namespace OpenRCT2::Ui::Windows void InitSceneryEntry(const ScenerySelection& selection, const ObjectEntryIndex sceneryGroupIndex) { - Guard::ArgumentInRange(selection.EntryIndex, 0, OBJECT_ENTRY_INDEX_NULL); + Guard::ArgumentInRange(selection.EntryIndex, 0, kObjectEntryIndexNull); if (IsSceneryAvailableToBuild(selection)) { @@ -1258,7 +1258,7 @@ namespace OpenRCT2::Ui::Windows } // Add scenery to primary group (usually trees or path additions) - if (sceneryGroupIndex != OBJECT_ENTRY_INDEX_NULL) + if (sceneryGroupIndex != kObjectEntryIndexNull) { auto* tabInfo = GetSceneryTabInfoForGroup(sceneryGroupIndex); if (tabInfo != nullptr) @@ -1339,9 +1339,9 @@ namespace OpenRCT2::Ui::Windows if (a.SceneryGroupIndex == b.SceneryGroupIndex) return false; - if (a.SceneryGroupIndex == OBJECT_ENTRY_INDEX_NULL) + if (a.SceneryGroupIndex == kObjectEntryIndexNull) return false; - if (b.SceneryGroupIndex == OBJECT_ENTRY_INDEX_NULL) + if (b.SceneryGroupIndex == kObjectEntryIndexNull) return true; const auto* entryA = a.GetSceneryGroupEntry(); diff --git a/src/openrct2-ui/windows/Sign.cpp b/src/openrct2-ui/windows/Sign.cpp index 09ad795111a8..8e0deba9f6ac 100644 --- a/src/openrct2-ui/windows/Sign.cpp +++ b/src/openrct2-ui/windows/Sign.cpp @@ -63,7 +63,7 @@ namespace OpenRCT2::Ui::Windows { private: bool _isSmall = false; - ObjectEntryIndex _sceneryEntry = OBJECT_ENTRY_INDEX_NULL; + ObjectEntryIndex _sceneryEntry = kObjectEntryIndexNull; colour_t _mainColour = {}; colour_t _textColour = {}; diff --git a/src/openrct2-ui/windows/TileInspector.cpp b/src/openrct2-ui/windows/TileInspector.cpp index a686f45ca9ef..843729d7628b 100644 --- a/src/openrct2-ui/windows/TileInspector.cpp +++ b/src/openrct2-ui/windows/TileInspector.cpp @@ -775,7 +775,7 @@ static uint64_t PageDisabledWidgets[] = { { case WIDX_SPINNER_X_INCREASE: windowTileInspectorTile.x = std::min(windowTileInspectorTile.x + 1, kMaximumMapSizeTechnical - 1); - _toolMap.x = std::min(_toolMap.x + 32, MAXIMUM_TILE_START_XY); + _toolMap.x = std::min(_toolMap.x + 32, kMaximumTileStartXY); LoadTile(nullptr); break; @@ -787,7 +787,7 @@ static uint64_t PageDisabledWidgets[] = { case WIDX_SPINNER_Y_INCREASE: windowTileInspectorTile.y = std::min(windowTileInspectorTile.y + 1, kMaximumMapSizeTechnical - 1); - _toolMap.y = std::min(_toolMap.y + 32, MAXIMUM_TILE_START_XY); + _toolMap.y = std::min(_toolMap.y + 32, kMaximumTileStartXY); LoadTile(nullptr); break; diff --git a/src/openrct2-ui/windows/TrackDesignPlace.cpp b/src/openrct2-ui/windows/TrackDesignPlace.cpp index 077be124d63a..313fa8f57045 100644 --- a/src/openrct2-ui/windows/TrackDesignPlace.cpp +++ b/src/openrct2-ui/windows/TrackDesignPlace.cpp @@ -48,10 +48,10 @@ namespace OpenRCT2::Ui::Windows constexpr int16_t TRACK_MINI_PREVIEW_HEIGHT = 78; constexpr uint16_t TRACK_MINI_PREVIEW_SIZE = TRACK_MINI_PREVIEW_WIDTH * TRACK_MINI_PREVIEW_HEIGHT; - static constexpr uint8_t _PaletteIndexColourEntrance = PALETTE_INDEX_20; // White - static constexpr uint8_t _PaletteIndexColourExit = PALETTE_INDEX_10; // Black - static constexpr uint8_t _PaletteIndexColourTrack = PALETTE_INDEX_248; // Grey (dark) - static constexpr uint8_t _PaletteIndexColourStation = PALETTE_INDEX_252; // Grey (light) + static constexpr uint8_t kPaletteIndexColourEntrance = PALETTE_INDEX_20; // White + static constexpr uint8_t kPaletteIndexColourExit = PALETTE_INDEX_10; // Black + static constexpr uint8_t kPaletteIndexColourTrack = PALETTE_INDEX_248; // Grey (dark) + static constexpr uint8_t kPaletteIndexColourStation = PALETTE_INDEX_252; // Grey (light) enum { @@ -567,7 +567,7 @@ namespace OpenRCT2::Ui::Windows if (DrawMiniPreviewIsPixelInBounds(pixelPosition)) { uint8_t* pixel = DrawMiniPreviewGetPixelPtr(pixelPosition); - uint8_t colour = entrance.isExit ? _PaletteIndexColourExit : _PaletteIndexColourEntrance; + uint8_t colour = entrance.isExit ? kPaletteIndexColourExit : kPaletteIndexColourEntrance; for (int32_t i = 0; i < 4; i++) { pixel[338 + i] = colour; // x + 2, y + 2 @@ -613,8 +613,8 @@ namespace OpenRCT2::Ui::Windows auto bits = trackBlock.quarterTile.Rotate(curTrackRotation & 3).GetBaseQuarterOccupied(); // Station track is a lighter colour - uint8_t colour = (ted.sequences[0].flags & TRACK_SEQUENCE_FLAG_ORIGIN) ? _PaletteIndexColourStation - : _PaletteIndexColourTrack; + uint8_t colour = (ted.sequences[0].flags & TRACK_SEQUENCE_FLAG_ORIGIN) ? kPaletteIndexColourStation + : kPaletteIndexColourTrack; for (int32_t i = 0; i < 4; i++) { @@ -673,7 +673,7 @@ namespace OpenRCT2::Ui::Windows { uint8_t* pixel = DrawMiniPreviewGetPixelPtr(pixelPosition); - uint8_t colour = _PaletteIndexColourTrack; + uint8_t colour = kPaletteIndexColourTrack; for (int32_t i = 0; i < 4; i++) { pixel[338 + i] = colour; // x + 2, y + 2 diff --git a/src/openrct2-ui/windows/ViewClipping.cpp b/src/openrct2-ui/windows/ViewClipping.cpp index b1e75e7c1deb..1e6ea9b1e1d1 100644 --- a/src/openrct2-ui/windows/ViewClipping.cpp +++ b/src/openrct2-ui/windows/ViewClipping.cpp @@ -124,7 +124,7 @@ namespace OpenRCT2::Ui::Windows _previousClipSelectionA = gClipSelectionA; _previousClipSelectionB = gClipSelectionB; gClipSelectionA = { 0, 0 }; - gClipSelectionB = { MAXIMUM_MAP_SIZE_BIG - 1, MAXIMUM_MAP_SIZE_BIG - 1 }; + gClipSelectionB = { kMaximumMapSizeBig - 1, kMaximumMapSizeBig - 1 }; GfxInvalidateScreen(); break; case WIDX_CLIP_CLEAR: @@ -134,7 +134,7 @@ namespace OpenRCT2::Ui::Windows _toolActive = false; } gClipSelectionA = { 0, 0 }; - gClipSelectionB = { MAXIMUM_MAP_SIZE_BIG - 1, MAXIMUM_MAP_SIZE_BIG - 1 }; + gClipSelectionB = { kMaximumMapSizeBig - 1, kMaximumMapSizeBig - 1 }; GfxInvalidateScreen(); break; } diff --git a/src/openrct2/Diagnostic.cpp b/src/openrct2/Diagnostic.cpp index 7cb528387a36..9d6114b53734 100644 --- a/src/openrct2/Diagnostic.cpp +++ b/src/openrct2/Diagnostic.cpp @@ -75,7 +75,7 @@ void DiagnosticLogWithLocation( #else -static constexpr const char* _level_strings[] = { +static constexpr const char* kLevelStrings[] = { "FATAL", "ERROR", "WARNING", "VERBOSE", "INFO", }; @@ -94,7 +94,7 @@ void DiagnosticLog(DiagnosticLevel diagnosticLevel, const char* format, ...) if (_log_levels[EnumValue(diagnosticLevel)]) { // Level - auto prefix = String::stdFormat("%s: ", _level_strings[EnumValue(diagnosticLevel)]); + auto prefix = String::stdFormat("%s: ", kLevelStrings[EnumValue(diagnosticLevel)]); // Message va_start(args, format); @@ -115,11 +115,11 @@ void DiagnosticLogWithLocation( std::string prefix; if (_log_location_enabled) { - prefix = String::stdFormat("%s[%s:%d (%s)]: ", _level_strings[EnumValue(diagnosticLevel)], file, line, function); + prefix = String::stdFormat("%s[%s:%d (%s)]: ", kLevelStrings[EnumValue(diagnosticLevel)], file, line, function); } else { - prefix = String::stdFormat("%s: ", _level_strings[EnumValue(diagnosticLevel)]); + prefix = String::stdFormat("%s: ", kLevelStrings[EnumValue(diagnosticLevel)]); } // Message diff --git a/src/openrct2/Editor.cpp b/src/openrct2/Editor.cpp index 4387ba5cee5c..031241aab194 100644 --- a/src/openrct2/Editor.cpp +++ b/src/openrct2/Editor.cpp @@ -107,7 +107,7 @@ namespace OpenRCT2::Editor auto& gameState = GetGameState(); Audio::StopAll(); ObjectListLoad(); - gameStateInitAll(gameState, DEFAULT_MAP_SIZE); + gameStateInitAll(gameState, kDefaultMapSize); gScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR; gameState.EditorStep = EditorStep::ObjectSelection; gameState.Park.Flags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES; @@ -173,7 +173,7 @@ namespace OpenRCT2::Editor ObjectManagerUnloadAllObjects(); ObjectListLoad(); - gameStateInitAll(GetGameState(), DEFAULT_MAP_SIZE); + gameStateInitAll(GetGameState(), kDefaultMapSize); SetAllLandOwned(); GetGameState().EditorStep = EditorStep::ObjectSelection; ViewportInitAll(); @@ -198,7 +198,7 @@ namespace OpenRCT2::Editor ObjectManagerUnloadAllObjects(); ObjectListLoad(); - gameStateInitAll(GetGameState(), DEFAULT_MAP_SIZE); + gameStateInitAll(GetGameState(), kDefaultMapSize); SetAllLandOwned(); GetGameState().EditorStep = EditorStep::ObjectSelection; ViewportInitAll(); @@ -298,7 +298,7 @@ namespace OpenRCT2::Editor gameState.Park.Flags &= ~PARK_FLAGS_SPRITES_INITIALISED; - gameState.GuestInitialCash = std::clamp(gameState.GuestInitialCash, 10.00_GBP, MAX_ENTRANCE_FEE); + gameState.GuestInitialCash = std::clamp(gameState.GuestInitialCash, 10.00_GBP, kMaxEntranceFee); gameState.InitialCash = std::min(gameState.InitialCash, 100000); FinanceResetCashToInitial(); @@ -536,7 +536,7 @@ namespace OpenRCT2::Editor void SetSelectedObject(ObjectType objectType, size_t index, uint32_t flags) { - if (index != OBJECT_ENTRY_INDEX_NULL) + if (index != kObjectEntryIndexNull) { assert(static_cast(objectType) < getObjectEntryGroupCount(ObjectType::Paths)); auto& list = _editorSelectedObjectFlags[EnumValue(objectType)]; diff --git a/src/openrct2/EditorObjectSelectionSession.cpp b/src/openrct2/EditorObjectSelectionSession.cpp index 4ffb6f6f710a..1cab6da468f5 100644 --- a/src/openrct2/EditorObjectSelectionSession.cpp +++ b/src/openrct2/EditorObjectSelectionSession.cpp @@ -115,7 +115,7 @@ static void SetupTrackDesignerObjects() for (auto rideType : item->RideInfo.RideType) { - if (rideType != RIDE_TYPE_NULL) + if (rideType != kRideTypeNull) { if (GetRideTypeDescriptor(rideType).HasFlag(RtdFlag::showInTrackDesigner)) { @@ -175,7 +175,7 @@ void SetupInUseSelectionFlags() { auto footpathEl = iter.element->AsPath(); auto legacyPathEntryIndex = footpathEl->GetLegacyPathEntryIndex(); - if (legacyPathEntryIndex == OBJECT_ENTRY_INDEX_NULL) + if (legacyPathEntryIndex == kObjectEntryIndexNull) { auto surfaceEntryIndex = footpathEl->GetSurfaceEntryIndex(); auto railingEntryIndex = footpathEl->GetRailingsEntryIndex(); @@ -211,7 +211,7 @@ void SetupInUseSelectionFlags() break; auto legacyPathEntryIndex = parkEntranceEl->GetLegacyPathEntryIndex(); - if (legacyPathEntryIndex == OBJECT_ENTRY_INDEX_NULL) + if (legacyPathEntryIndex == kObjectEntryIndexNull) { auto surfaceEntryIndex = parkEntranceEl->GetSurfaceEntryIndex(); Editor::SetSelectedObject(ObjectType::FootpathSurface, surfaceEntryIndex, ObjectSelectionFlags::InUse); @@ -250,7 +250,7 @@ void SetupInUseSelectionFlags() Editor::SetSelectedObject(ObjectType::Music, ride.music, ObjectSelectionFlags::InUse); } - ObjectEntryIndex lastIndex = OBJECT_ENTRY_INDEX_NULL; + ObjectEntryIndex lastIndex = kObjectEntryIndexNull; for (auto* peep : EntityList()) { if (peep->AnimationObjectIndex == lastIndex) @@ -272,7 +272,7 @@ void SetupInUseSelectionFlags() for (auto* vehicle : TrainManager::View()) { ObjectEntryIndex type = vehicle->ride_subtype; - if (type != OBJECT_ENTRY_INDEX_NULL) // cable lifts use index null. Ignore them + if (type != kObjectEntryIndexNull) // cable lifts use index null. Ignore them { Editor::SetSelectedObject(ObjectType::Ride, type, ObjectSelectionFlags::InUse); } @@ -280,7 +280,7 @@ void SetupInUseSelectionFlags() for (auto vehicle : EntityList()) { ObjectEntryIndex type = vehicle->ride_subtype; - if (type != OBJECT_ENTRY_INDEX_NULL) // cable lifts use index null. Ignore them + if (type != kObjectEntryIndexNull) // cable lifts use index null. Ignore them { Editor::SetSelectedObject(ObjectType::Ride, type, ObjectSelectionFlags::InUse); } @@ -518,7 +518,7 @@ void FinishObjectSelection() auto& objManager = OpenRCT2::GetContext()->GetObjectManager(); gameState.LastEntranceStyle = objManager.GetLoadedObjectEntryIndex("rct2.station.plain"); - if (gameState.LastEntranceStyle == OBJECT_ENTRY_INDEX_NULL) + if (gameState.LastEntranceStyle == kObjectEntryIndexNull) { gameState.LastEntranceStyle = 0; } diff --git a/src/openrct2/actions/LandSmoothAction.cpp b/src/openrct2/actions/LandSmoothAction.cpp index 58a5f8322f7b..2addb0150e0c 100644 --- a/src/openrct2/actions/LandSmoothAction.cpp +++ b/src/openrct2/actions/LandSmoothAction.cpp @@ -339,8 +339,8 @@ GameActions::Result LandSmoothAction::SmoothLand(bool isExecuting) const // Cap bounds to map auto l = std::max(normRange.GetLeft(), 32); auto t = std::max(normRange.GetTop(), 32); - auto r = std::clamp(normRange.GetRight(), 0, MAXIMUM_TILE_START_XY); - auto b = std::clamp(normRange.GetBottom(), 0, MAXIMUM_TILE_START_XY); + auto r = std::clamp(normRange.GetRight(), 0, kMaximumTileStartXY); + auto b = std::clamp(normRange.GetBottom(), 0, kMaximumTileStartXY); auto validRange = MapRange{ l, t, r, b }; int32_t centreZ = TileElementHeight(_coords); diff --git a/src/openrct2/actions/LargeSceneryPlaceAction.cpp b/src/openrct2/actions/LargeSceneryPlaceAction.cpp index 7009ceaf6d32..c312d378f6ee 100644 --- a/src/openrct2/actions/LargeSceneryPlaceAction.cpp +++ b/src/openrct2/actions/LargeSceneryPlaceAction.cpp @@ -372,10 +372,10 @@ int16_t LargeSceneryPlaceAction::GetMaxSurfaceHeight(std::spanGetBaseZ(); if (heightDifference >= 0 && !gameState.Cheats.disableSupportLimits) @@ -128,7 +128,7 @@ GameActions::Result MazePlaceTrackAction::Query() const } auto ride = GetRide(_rideIndex); - if (ride == nullptr || ride->type == RIDE_TYPE_NULL) + if (ride == nullptr || ride->type == kRideTypeNull) { LOG_ERROR("Ride not found for rideIndex %u", _rideIndex); res.Error = GameActions::Status::InvalidParameters; @@ -166,7 +166,7 @@ GameActions::Result MazePlaceTrackAction::Execute() const } auto baseHeight = _loc.z; - auto clearanceHeight = _loc.z + MAZE_CLEARANCE_HEIGHT; + auto clearanceHeight = _loc.z + kMazeClearanceHeight; auto canBuild = MapCanConstructWithClearAt( { _loc.ToTileStart(), baseHeight, clearanceHeight }, &MapPlaceNonSceneryClearFunc, { 0b1111, 0 }, diff --git a/src/openrct2/actions/MazeSetTrackAction.cpp b/src/openrct2/actions/MazeSetTrackAction.cpp index 52b0d96d38f1..4406e1528810 100644 --- a/src/openrct2/actions/MazeSetTrackAction.cpp +++ b/src/openrct2/actions/MazeSetTrackAction.cpp @@ -222,7 +222,7 @@ GameActions::Result MazeSetTrackAction::Execute() const auto* trackElement = TileElementInsert(_loc, 0b1111); Guard::Assert(trackElement != nullptr); - trackElement->SetClearanceZ(_loc.z + MAZE_CLEARANCE_HEIGHT); + trackElement->SetClearanceZ(_loc.z + kMazeClearanceHeight); trackElement->SetTrackType(TrackElemType::Maze); trackElement->SetRideType(ride->type); trackElement->SetRideIndex(_rideIndex); diff --git a/src/openrct2/actions/ParkEntrancePlaceAction.cpp b/src/openrct2/actions/ParkEntrancePlaceAction.cpp index 19ddcf144b21..87971a7bed4e 100644 --- a/src/openrct2/actions/ParkEntrancePlaceAction.cpp +++ b/src/openrct2/actions/ParkEntrancePlaceAction.cpp @@ -162,7 +162,7 @@ GameActions::Result ParkEntrancePlaceAction::Execute() const entranceElement->SetSequenceIndex(index); entranceElement->SetEntranceType(ENTRANCE_TYPE_PARK_ENTRANCE); entranceElement->setEntryIndex(_entranceType); - if (gFootpathSelection.LegacyPath == OBJECT_ENTRY_INDEX_NULL) + if (gFootpathSelection.LegacyPath == kObjectEntryIndexNull) { entranceElement->SetSurfaceEntryIndex(gFootpathSelection.NormalSurface); } diff --git a/src/openrct2/actions/ParkSetEntranceFeeAction.cpp b/src/openrct2/actions/ParkSetEntranceFeeAction.cpp index 7257fa492531..f388b31ed221 100644 --- a/src/openrct2/actions/ParkSetEntranceFeeAction.cpp +++ b/src/openrct2/actions/ParkSetEntranceFeeAction.cpp @@ -53,7 +53,7 @@ GameActions::Result ParkSetEntranceFeeAction::Query() const LOG_ERROR("Park entrance fee is locked"); return GameActions::Result(GameActions::Status::Disallowed, STR_ERR_CANT_CHANGE_PARK_ENTRANCE_FEE, kStringIdNone); } - else if (_fee < 0.00_GBP || _fee > MAX_ENTRANCE_FEE) + else if (_fee < 0.00_GBP || _fee > kMaxEntranceFee) { LOG_ERROR("Invalid park entrance fee %d", _fee); return GameActions::Result( diff --git a/src/openrct2/actions/RideCreateAction.cpp b/src/openrct2/actions/RideCreateAction.cpp index 6a081539cc3a..a6e9d4c669ce 100644 --- a/src/openrct2/actions/RideCreateAction.cpp +++ b/src/openrct2/actions/RideCreateAction.cpp @@ -188,7 +188,7 @@ GameActions::Result RideCreateAction::Execute() const { auto& objManager = OpenRCT2::GetContext()->GetObjectManager(); ride->music = objManager.GetLoadedObjectEntryIndex(rtd.DefaultMusic); - if (ride->music != OBJECT_ENTRY_INDEX_NULL) + if (ride->music != kObjectEntryIndexNull) { if (rtd.HasFlag(RtdFlag::hasMusicByDefault)) { @@ -274,7 +274,7 @@ GameActions::Result RideCreateAction::Execute() const ride->satisfaction = 255; ride->popularity = 255; ride->build_date = GetDate().GetMonthsElapsed(); - ride->music_tune_id = TUNE_ID_NULL; + ride->music_tune_id = kTuneIDNull; ride->breakdown_reason = 255; ride->upkeep_cost = kMoney64Undefined; @@ -285,7 +285,7 @@ GameActions::Result RideCreateAction::Execute() const ride->income_per_hour = kMoney64Undefined; ride->profit = kMoney64Undefined; - ride->entrance_style = OBJECT_ENTRY_INDEX_NULL; + ride->entrance_style = kObjectEntryIndexNull; if (rtd.HasFlag(RtdFlag::hasEntranceAndExit)) { ride->entrance_style = _entranceObjectIndex; diff --git a/src/openrct2/actions/RideCreateAction.h b/src/openrct2/actions/RideCreateAction.h index b581e8ad58d5..5688db878a5f 100644 --- a/src/openrct2/actions/RideCreateAction.h +++ b/src/openrct2/actions/RideCreateAction.h @@ -14,9 +14,9 @@ class RideCreateAction final : public GameActionBase { private: - ride_type_t _rideType{ RIDE_TYPE_NULL }; - ObjectEntryIndex _subType{ OBJECT_ENTRY_INDEX_NULL }; - ObjectEntryIndex _entranceObjectIndex{ OBJECT_ENTRY_INDEX_NULL }; + ride_type_t _rideType{ kRideTypeNull }; + ObjectEntryIndex _subType{ kObjectEntryIndexNull }; + ObjectEntryIndex _entranceObjectIndex{ kObjectEntryIndexNull }; colour_t _colour1{ COLOUR_NULL }; colour_t _colour2{ COLOUR_NULL }; diff --git a/src/openrct2/actions/RideSetSettingAction.cpp b/src/openrct2/actions/RideSetSettingAction.cpp index 996a00365ecc..ba49af931db3 100644 --- a/src/openrct2/actions/RideSetSettingAction.cpp +++ b/src/openrct2/actions/RideSetSettingAction.cpp @@ -220,7 +220,7 @@ GameActions::Result RideSetSettingAction::Execute() const if (_value != ride->music) { ride->music = _value; - ride->music_tune_id = TUNE_ID_NULL; + ride->music_tune_id = kTuneIDNull; } break; case RideSetSetting::LiftHillSpeed: diff --git a/src/openrct2/actions/ScenarioSetSettingAction.cpp b/src/openrct2/actions/ScenarioSetSettingAction.cpp index 545e82c1572a..5a7a194edd74 100644 --- a/src/openrct2/actions/ScenarioSetSettingAction.cpp +++ b/src/openrct2/actions/ScenarioSetSettingAction.cpp @@ -193,7 +193,7 @@ GameActions::Result ScenarioSetSettingAction::Execute() const } break; case ScenarioSetSetting::ParkChargeEntryFee: - gameState.Park.EntranceFee = std::clamp(_value, 0.00_GBP, MAX_ENTRANCE_FEE); + gameState.Park.EntranceFee = std::clamp(_value, 0.00_GBP, kMaxEntranceFee); WindowInvalidateByClass(WindowClass::ParkInformation); break; case ScenarioSetSetting::ForbidTreeRemoval: diff --git a/src/openrct2/actions/StaffSetCostumeAction.h b/src/openrct2/actions/StaffSetCostumeAction.h index 0912663bb1d7..23102f85328f 100644 --- a/src/openrct2/actions/StaffSetCostumeAction.h +++ b/src/openrct2/actions/StaffSetCostumeAction.h @@ -16,7 +16,7 @@ class StaffSetCostumeAction final : public GameActionBaseGetObjectManager(); - if (_surfaceStyle != OBJECT_ENTRY_INDEX_NULL) + if (_surfaceStyle != kObjectEntryIndexNull) { const auto surfaceObj = static_cast( objManager.GetLoadedObject(ObjectType::TerrainSurface, _surfaceStyle)); @@ -65,7 +65,7 @@ GameActions::Result SurfaceSetStyleAction::Query() const } } - if (_edgeStyle != OBJECT_ENTRY_INDEX_NULL) + if (_edgeStyle != kObjectEntryIndexNull) { const auto edgeObj = objManager.GetLoadedObject(_edgeStyle); @@ -117,7 +117,7 @@ GameActions::Result SurfaceSetStyleAction::Query() const continue; } - if (_surfaceStyle != OBJECT_ENTRY_INDEX_NULL) + if (_surfaceStyle != kObjectEntryIndexNull) { uint8_t curSurfaceStyle = surfaceElement->GetSurfaceObjectIndex(); @@ -132,7 +132,7 @@ GameActions::Result SurfaceSetStyleAction::Query() const } } - if (_edgeStyle != OBJECT_ENTRY_INDEX_NULL) + if (_edgeStyle != kObjectEntryIndexNull) { uint8_t curEdgeStyle = surfaceElement->GetEdgeObjectIndex(); @@ -185,7 +185,7 @@ GameActions::Result SurfaceSetStyleAction::Execute() const continue; } - if (_surfaceStyle != OBJECT_ENTRY_INDEX_NULL) + if (_surfaceStyle != kObjectEntryIndexNull) { uint8_t curSurfaceStyle = surfaceElement->GetSurfaceObjectIndex(); @@ -206,7 +206,7 @@ GameActions::Result SurfaceSetStyleAction::Execute() const } } - if (_edgeStyle != OBJECT_ENTRY_INDEX_NULL) + if (_edgeStyle != kObjectEntryIndexNull) { uint8_t curEdgeStyle = surfaceElement->GetEdgeObjectIndex(); diff --git a/src/openrct2/actions/TrackDesignAction.cpp b/src/openrct2/actions/TrackDesignAction.cpp index 0476492c13bb..367407757172 100644 --- a/src/openrct2/actions/TrackDesignAction.cpp +++ b/src/openrct2/actions/TrackDesignAction.cpp @@ -68,13 +68,13 @@ GameActions::Result TrackDesignAction::Query() const auto& gameState = GetGameState(); auto& objManager = GetContext()->GetObjectManager(); auto entryIndex = objManager.GetLoadedObjectEntryIndex(_td.trackAndVehicle.vehicleObject); - if (entryIndex == OBJECT_ENTRY_INDEX_NULL) + if (entryIndex == kObjectEntryIndexNull) { // Force a fallback if the entry is not invented yet a track design of it is selected, // which can happen in select-by-track-type mode if (!RideEntryIsInvented(entryIndex) && !gameState.Cheats.ignoreResearchStatus) { - entryIndex = OBJECT_ENTRY_INDEX_NULL; + entryIndex = kObjectEntryIndexNull; } } @@ -142,13 +142,13 @@ GameActions::Result TrackDesignAction::Execute() const auto& gameState = GetGameState(); auto& objManager = GetContext()->GetObjectManager(); auto entryIndex = objManager.GetLoadedObjectEntryIndex(_td.trackAndVehicle.vehicleObject); - if (entryIndex != OBJECT_ENTRY_INDEX_NULL) + if (entryIndex != kObjectEntryIndexNull) { // Force a fallback if the entry is not invented yet a track design using it is selected. // This can happen on rides with multiple vehicles where some have been invented and some haven’t. if (!RideEntryIsInvented(entryIndex) && !gameState.Cheats.ignoreResearchStatus) { - entryIndex = OBJECT_ENTRY_INDEX_NULL; + entryIndex = kObjectEntryIndexNull; } } @@ -214,7 +214,7 @@ GameActions::Result TrackDesignAction::Execute() const return res; } - if (entryIndex != OBJECT_ENTRY_INDEX_NULL) + if (entryIndex != kObjectEntryIndexNull) { auto colour = RideGetUnusedPresetVehicleColour(entryIndex); auto rideSetVehicleAction = RideSetVehicleAction(ride->id, RideSetVehicleType::RideEntry, entryIndex, colour); @@ -243,7 +243,7 @@ GameActions::Result TrackDesignAction::Execute() const ride->vehicleColourSettings = _td.appearance.vehicleColourSettings; ride->entrance_style = objManager.GetLoadedObjectEntryIndex(_td.appearance.stationObjectIdentifier); - if (ride->entrance_style == OBJECT_ENTRY_INDEX_NULL) + if (ride->entrance_style == kObjectEntryIndexNull) { ride->entrance_style = gameState.LastEntranceStyle; } diff --git a/src/openrct2/actions/TrackPlaceAction.cpp b/src/openrct2/actions/TrackPlaceAction.cpp index dffddd7d036d..264b8509fb6d 100644 --- a/src/openrct2/actions/TrackPlaceAction.cpp +++ b/src/openrct2/actions/TrackPlaceAction.cpp @@ -344,7 +344,7 @@ GameActions::Result TrackPlaceAction::Query() const GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_CAN_ONLY_BUILD_THIS_ON_WATER); } - waterHeight -= LAND_HEIGHT_STEP; + waterHeight -= kLandHeightStep; if (waterHeight == surfaceElement->GetBaseZ()) { uint8_t slope = surfaceElement->GetSlope() & kTileSlopeRaisedCornersMask; diff --git a/src/openrct2/actions/WallPlaceAction.h b/src/openrct2/actions/WallPlaceAction.h index be12d0f99304..1581221be4df 100644 --- a/src/openrct2/actions/WallPlaceAction.h +++ b/src/openrct2/actions/WallPlaceAction.h @@ -26,7 +26,7 @@ struct WallPlaceActionResult class WallPlaceAction final : public GameActionBase { private: - ObjectEntryIndex _wallType{ OBJECT_ENTRY_INDEX_NULL }; + ObjectEntryIndex _wallType{ kObjectEntryIndexNull }; CoordsXYZ _loc; Direction _edge{ INVALID_DIRECTION }; int32_t _primaryColour{ COLOUR_BLACK }; diff --git a/src/openrct2/audio/Audio.cpp b/src/openrct2/audio/Audio.cpp index 437bab483650..b5fb026463b8 100644 --- a/src/openrct2/audio/Audio.cpp +++ b/src/openrct2/audio/Audio.cpp @@ -50,9 +50,9 @@ namespace OpenRCT2::Audio static std::vector _audioDevices; static int32_t _currentAudioDevice = -1; - static ObjectEntryIndex _soundsAudioObjectEntryIndex = OBJECT_ENTRY_INDEX_NULL; - static ObjectEntryIndex _soundsAdditionalAudioObjectEntryIndex = OBJECT_ENTRY_INDEX_NULL; - static ObjectEntryIndex _titleAudioObjectEntryIndex = OBJECT_ENTRY_INDEX_NULL; + static ObjectEntryIndex _soundsAudioObjectEntryIndex = kObjectEntryIndexNull; + static ObjectEntryIndex _soundsAdditionalAudioObjectEntryIndex = kObjectEntryIndexNull; + static ObjectEntryIndex _titleAudioObjectEntryIndex = kObjectEntryIndexNull; bool gGameSoundsOff = false; int32_t gVolumeAdjustZoom = 0; @@ -360,7 +360,7 @@ namespace OpenRCT2::Audio } // Unload the audio object - if (_titleAudioObjectEntryIndex != OBJECT_ENTRY_INDEX_NULL) + if (_titleAudioObjectEntryIndex != kObjectEntryIndexNull) { auto& objManager = GetContext()->GetObjectManager(); auto* obj = objManager.GetLoadedObject(ObjectType::Audio, _titleAudioObjectEntryIndex); @@ -368,7 +368,7 @@ namespace OpenRCT2::Audio { objManager.UnloadObjects({ obj->GetDescriptor() }); } - _titleAudioObjectEntryIndex = OBJECT_ENTRY_INDEX_NULL; + _titleAudioObjectEntryIndex = kObjectEntryIndexNull; } } diff --git a/src/openrct2/command_line/CommandLine.cpp b/src/openrct2/command_line/CommandLine.cpp index fd0f56ba8dba..74d2e5f92089 100644 --- a/src/openrct2/command_line/CommandLine.cpp +++ b/src/openrct2/command_line/CommandLine.cpp @@ -116,12 +116,12 @@ namespace OpenRCT2::CommandLine void PrintHelp(bool allCommands) { - PrintHelpFor(RootCommands); - PrintExamples(RootExamples); + PrintHelpFor(kRootCommands); + PrintExamples(kRootExamples); if (allCommands) { - for (const CommandLineCommand* command = RootCommands; command->Name != nullptr; command++) + for (const CommandLineCommand* command = kRootCommands; command->Name != nullptr; command++) { if (command->SubCommands != nullptr) { @@ -533,7 +533,7 @@ int32_t CommandLineRun(const char** argv, int32_t argc) // Pop process path argEnumerator.TryPop(); - const CommandLineCommand* command = CommandLine::FindCommandFor(CommandLine::RootCommands, &argEnumerator); + const CommandLineCommand* command = CommandLine::FindCommandFor(CommandLine::kRootCommands, &argEnumerator); if (command == nullptr) { @@ -549,7 +549,7 @@ int32_t CommandLineRun(const char** argv, int32_t argc) } } - if (command == CommandLine::RootCommands && command->Func == nullptr) + if (command == CommandLine::kRootCommands && command->Func == nullptr) { return CommandLine::HandleCommandDefault(); } diff --git a/src/openrct2/command_line/CommandLine.hpp b/src/openrct2/command_line/CommandLine.hpp index 88081bc7c2b2..401bfb792130 100644 --- a/src/openrct2/command_line/CommandLine.hpp +++ b/src/openrct2/command_line/CommandLine.hpp @@ -107,13 +107,13 @@ consteval CommandLineCommand DefineSubCommand(const char* name, const CommandLin namespace OpenRCT2::CommandLine { - extern const CommandLineCommand RootCommands[]; - extern const CommandLineCommand ScreenshotCommands[]; - extern const CommandLineCommand SpriteCommands[]; - extern const CommandLineCommand SimulateCommands[]; - extern const CommandLineCommand ParkInfoCommands[]; + extern const CommandLineCommand kRootCommands[]; + extern const CommandLineCommand kScreenshotCommands[]; + extern const CommandLineCommand kSpriteCommands[]; + extern const CommandLineCommand kSimulateCommands[]; + extern const CommandLineCommand kParkInfoCommands[]; - extern const CommandLineExample RootExamples[]; + extern const CommandLineExample kRootExamples[]; void PrintHelp(bool allCommands = false); exitcode_t HandleCommandDefault(); diff --git a/src/openrct2/command_line/ParkInfoCommands.cpp b/src/openrct2/command_line/ParkInfoCommands.cpp index d952de391532..415155ddc1ae 100644 --- a/src/openrct2/command_line/ParkInfoCommands.cpp +++ b/src/openrct2/command_line/ParkInfoCommands.cpp @@ -26,7 +26,7 @@ static constexpr CommandLineOptionDefinition kNoOptions[] static exitcode_t HandleObjectsInfo(CommandLineArgEnumerator *argEnumerator); -const CommandLineCommand CommandLine::ParkInfoCommands[]{ +const CommandLineCommand CommandLine::kParkInfoCommands[]{ // Main commands DefineCommand("objects", "", kNoOptions, HandleObjectsInfo), diff --git a/src/openrct2/command_line/RootCommands.cpp b/src/openrct2/command_line/RootCommands.cpp index 9f9fc56483bd..d074408270d2 100644 --- a/src/openrct2/command_line/RootCommands.cpp +++ b/src/openrct2/command_line/RootCommands.cpp @@ -117,7 +117,7 @@ static void PrintAbout(); static void PrintVersion(); static void PrintLaunchInformation(); -const CommandLineCommand CommandLine::RootCommands[] +const CommandLineCommand CommandLine::kRootCommands[] { // Main commands #ifndef DISABLE_HTTP @@ -142,14 +142,14 @@ const CommandLineCommand CommandLine::RootCommands[] #endif // Sub-commands - DefineSubCommand("screenshot", CommandLine::ScreenshotCommands ), - DefineSubCommand("sprite", CommandLine::SpriteCommands ), - DefineSubCommand("simulate", CommandLine::SimulateCommands ), - DefineSubCommand("parkinfo", CommandLine::ParkInfoCommands ), + DefineSubCommand("screenshot", CommandLine::kScreenshotCommands ), + DefineSubCommand("sprite", CommandLine::kSpriteCommands ), + DefineSubCommand("simulate", CommandLine::kSimulateCommands ), + DefineSubCommand("parkinfo", CommandLine::kParkInfoCommands ), kCommandTableEnd }; -const CommandLineExample CommandLine::RootExamples[] +const CommandLineExample CommandLine::kRootExamples[] { { "./my_park.sv6", "open a saved park" }, { "./SnowyPark.sc6", "install and open a scenario" }, diff --git a/src/openrct2/command_line/ScreenshotCommands.cpp b/src/openrct2/command_line/ScreenshotCommands.cpp index d9ef9a4684db..b473a6296b0d 100644 --- a/src/openrct2/command_line/ScreenshotCommands.cpp +++ b/src/openrct2/command_line/ScreenshotCommands.cpp @@ -32,7 +32,7 @@ static constexpr CommandLineOptionDefinition kScreenshotOptionsDef[] static exitcode_t HandleScreenshot(CommandLineArgEnumerator *argEnumerator); -const CommandLineCommand CommandLine::ScreenshotCommands[] +const CommandLineCommand CommandLine::kScreenshotCommands[] { // Main commands DefineCommand("", " [ ]", kScreenshotOptionsDef, HandleScreenshot), diff --git a/src/openrct2/command_line/SimulateCommands.cpp b/src/openrct2/command_line/SimulateCommands.cpp index ebcf443101fd..86150b996992 100644 --- a/src/openrct2/command_line/SimulateCommands.cpp +++ b/src/openrct2/command_line/SimulateCommands.cpp @@ -25,9 +25,9 @@ using namespace OpenRCT2; static exitcode_t HandleSimulate(CommandLineArgEnumerator* argEnumerator); -const CommandLineCommand CommandLine::SimulateCommands[]{ // Main commands - DefineCommand("", "", nullptr, HandleSimulate), - kCommandTableEnd +const CommandLineCommand CommandLine::kSimulateCommands[]{ // Main commands + DefineCommand("", "", nullptr, HandleSimulate), + kCommandTableEnd }; static exitcode_t HandleSimulate(CommandLineArgEnumerator* argEnumerator) diff --git a/src/openrct2/command_line/SpriteCommands.cpp b/src/openrct2/command_line/SpriteCommands.cpp index 9998f7badb0f..dae0d6779c9a 100644 --- a/src/openrct2/command_line/SpriteCommands.cpp +++ b/src/openrct2/command_line/SpriteCommands.cpp @@ -33,7 +33,7 @@ static constexpr CommandLineOptionDefinition kSpriteOptions[] static exitcode_t HandleSprite(CommandLineArgEnumerator *argEnumerator); -const CommandLineCommand CommandLine::SpriteCommands[] +const CommandLineCommand CommandLine::kSpriteCommands[] { // Main commands DefineCommand("append", " [x_offset y_offset]", kSpriteOptions, HandleSprite), diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index 006ca7eea65f..bea039e15e4a 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -1959,7 +1959,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b if (ride.status == RideStatus::Open && !(ride.lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)) { // Peeps that are leaving the park will refuse to go on any rides, with the exception of free transport rides. - assert(ride.type < std::size(RideTypeDescriptors)); + assert(ride.type < std::size(kRideTypeDescriptors)); if (!ride.GetRideTypeDescriptor().HasFlag(RtdFlag::isTransportRide) || ride.value == RIDE_VALUE_UNDEFINED || RideGetPrice(ride) != 0) { @@ -2949,8 +2949,8 @@ static PeepThoughtType PeepAssessSurroundings(int16_t centre_x, int16_t centre_y // TODO: Refactor this to step as tiles, 160 units is 5 tiles. int16_t initial_x = std::max(centre_x - 160, 0); int16_t initial_y = std::max(centre_y - 160, 0); - int16_t final_x = std::min(centre_x + 160, MAXIMUM_MAP_SIZE_BIG); - int16_t final_y = std::min(centre_y + 160, MAXIMUM_MAP_SIZE_BIG); + int16_t final_x = std::min(centre_x + 160, kMaximumMapSizeBig); + int16_t final_y = std::min(centre_y + 160, kMaximumMapSizeBig); for (int16_t x = initial_x; x < final_x; x += kCoordsXYStep) { @@ -3544,7 +3544,7 @@ void Guest::UpdateRideAtEntrance() } /** rct2: 0x00981FD4, 0x00981FD6 */ -static constexpr CoordsXY _MazeEntranceStart[] = { +static constexpr CoordsXY kMazeEntranceStart[] = { { 8, 8 }, { 8, 24 }, { 24, 24 }, @@ -3570,8 +3570,8 @@ void PeepUpdateRideLeaveEntranceMaze(Guest* peep, Ride& ride, CoordsXYZD& entran peep->Var37 = direction; peep->MazeLastEdge &= 3; - entrance_loc.x += _MazeEntranceStart[direction / 4].x; - entrance_loc.y += _MazeEntranceStart[direction / 4].y; + entrance_loc.x += kMazeEntranceStart[direction / 4].x; + entrance_loc.y += kMazeEntranceStart[direction / 4].y; peep->SetDestination(entrance_loc, 3); diff --git a/src/openrct2/entity/Staff.cpp b/src/openrct2/entity/Staff.cpp index ae7136ccc119..22325114f3d0 100644 --- a/src/openrct2/entity/Staff.cpp +++ b/src/openrct2/entity/Staff.cpp @@ -403,7 +403,7 @@ uint8_t Staff::HandymanDirectionToUncutGrass(uint8_t valid_directions) const if (GetNextIsSloped()) { - if (surfaceElement->GetSlope() != PathSlopeToLandSlope[GetNextDirection()]) + if (surfaceElement->GetSlope() != kPathSlopeToLandSlope[GetNextDirection()]) return INVALID_DIRECTION; } else if (surfaceElement->GetSlope() != kTileSlopeFlat) diff --git a/src/openrct2/interface/InteractiveConsole.cpp b/src/openrct2/interface/InteractiveConsole.cpp index fd92cd1fe7b5..bdc439f109f8 100644 --- a/src/openrct2/interface/InteractiveConsole.cpp +++ b/src/openrct2/interface/InteractiveConsole.cpp @@ -176,7 +176,7 @@ static void ConsoleCommandRides(InteractiveConsole& console, const arguments_t& for (int32_t i = 0; i < static_cast(RideMode::Count); i++) { char mode_name[128] = { 0 }; - StringId mode_string_id = RideModeNames[i]; + StringId mode_string_id = kRideModeNames[i]; OpenRCT2::FormatStringLegacy(mode_name, 128, mode_string_id, nullptr); console.WriteFormatLine("%02d - %s", i, mode_name); } @@ -1117,7 +1117,7 @@ static void ConsoleCommandLoadObject(InteractiveConsole& console, const argument for (int32_t j = 0; j < RCT2::ObjectLimits::kMaxRideTypesPerRideEntry; j++) { auto rideType = rideEntry->ride_type[j]; - if (rideType != RIDE_TYPE_NULL) + if (rideType != kRideTypeNull) { ResearchCategory category = GetRideTypeDescriptor(rideType).GetResearchCategory(); ResearchInsertRideEntry(rideType, groupIndex, category, true); @@ -1285,7 +1285,7 @@ static void ConsoleCommandShowLimits(InteractiveConsole& console, [[maybe_unused auto bannerCount = GetNumBanners(); console.WriteFormatLine("Sprites: %d/%d", spriteCount, kMaxEntities); - console.WriteFormatLine("Map Elements: %zu/%d", tileElementCount, MAX_TILE_ELEMENTS); + console.WriteFormatLine("Map Elements: %zu/%d", tileElementCount, kMaxTileElements); console.WriteFormatLine("Banners: %d/%zu", bannerCount, MAX_BANNERS); console.WriteFormatLine("Rides: %d/%d", rideCount, OpenRCT2::Limits::kMaxRidesInPark); console.WriteFormatLine("Images: %zu/%zu", ImageListGetUsedCount(), ImageListGetMaximum()); diff --git a/src/openrct2/management/Research.cpp b/src/openrct2/management/Research.cpp index 46f52224cefd..8c02ba50466f 100644 --- a/src/openrct2/management/Research.cpp +++ b/src/openrct2/management/Research.cpp @@ -204,7 +204,7 @@ void ResearchFinishItem(const ResearchItem& researchItem) ObjectEntryIndex rideEntryIndex = researchItem.entryIndex; const auto* rideEntry = GetRideEntryByIndex(rideEntryIndex); - if (rideEntry != nullptr && base_ride_type != RIDE_TYPE_NULL) + if (rideEntry != nullptr && base_ride_type != kRideTypeNull) { if (!RideTypeIsValid(base_ride_type)) { @@ -477,7 +477,7 @@ void ResearchPopulateListRandom() int32_t researched = (ScenarioRand() & 0xFF) > 128; for (auto rideType : rideEntry->ride_type) { - if (rideType != RIDE_TYPE_NULL) + if (rideType != kRideTypeNull) { ResearchCategory category = GetRideTypeDescriptor(rideType).GetResearchCategory(); ResearchInsertRideEntry(rideType, i, category, researched); @@ -501,7 +501,7 @@ void ResearchPopulateListRandom() bool ResearchInsertRideEntry(ride_type_t rideType, ObjectEntryIndex entryIndex, ResearchCategory category, bool researched) { - if (rideType != RIDE_TYPE_NULL && entryIndex != OBJECT_ENTRY_INDEX_NULL) + if (rideType != kRideTypeNull && entryIndex != kObjectEntryIndexNull) { auto tmpItem = ResearchItem(Research::EntryType::Ride, entryIndex, rideType, category, 0); ResearchInsert(std::move(tmpItem), researched); @@ -519,7 +519,7 @@ void ResearchInsertRideEntry(ObjectEntryIndex entryIndex, bool researched) for (auto rideType : rideEntry->ride_type) { - if (rideType != RIDE_TYPE_NULL) + if (rideType != kRideTypeNull) { ResearchCategory category = GetRideTypeDescriptor(rideType).GetResearchCategory(); ResearchInsertRideEntry(rideType, entryIndex, category, researched); @@ -529,7 +529,7 @@ void ResearchInsertRideEntry(ObjectEntryIndex entryIndex, bool researched) bool ResearchInsertSceneryGroupEntry(ObjectEntryIndex entryIndex, bool researched) { - if (entryIndex != OBJECT_ENTRY_INDEX_NULL) + if (entryIndex != kObjectEntryIndexNull) { auto tmpItem = ResearchItem(Research::EntryType::Scenery, entryIndex, 0, ResearchCategory::SceneryGroup, 0); ResearchInsert(std::move(tmpItem), researched); @@ -787,7 +787,7 @@ static void ResearchMarkItemAsResearched(const ResearchItem& item) RideEntrySetInvented(item.entryIndex); for (auto rideType : rideEntry->ride_type) { - if (rideType != RIDE_TYPE_NULL) + if (rideType != kRideTypeNull) { RideTypeSetInvented(rideType); } @@ -953,12 +953,12 @@ bool ResearchItem::IsAlwaysResearched() const bool ResearchItem::IsNull() const { - return entryIndex == OBJECT_ENTRY_INDEX_NULL; + return entryIndex == kObjectEntryIndexNull; } void ResearchItem::SetNull() { - entryIndex = OBJECT_ENTRY_INDEX_NULL; + entryIndex = kObjectEntryIndexNull; } bool ResearchItem::Exists() const diff --git a/src/openrct2/object/BannerObject.cpp b/src/openrct2/object/BannerObject.cpp index b11c8d683ffa..74dcc6688065 100644 --- a/src/openrct2/object/BannerObject.cpp +++ b/src/openrct2/object/BannerObject.cpp @@ -26,7 +26,7 @@ void BannerObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStream* st _legacyType.scrolling_mode = stream->ReadValue(); _legacyType.flags = stream->ReadValue(); _legacyType.price = stream->ReadValue(); - _legacyType.scenery_tab_id = OBJECT_ENTRY_INDEX_NULL; + _legacyType.scenery_tab_id = kObjectEntryIndexNull; stream->Seek(2, OpenRCT2::STREAM_SEEK_CURRENT); GetStringTable().Read(context, stream, ObjectStringID::NAME); diff --git a/src/openrct2/object/LargeSceneryObject.cpp b/src/openrct2/object/LargeSceneryObject.cpp index 7b9b444c3046..87dfd274fb37 100644 --- a/src/openrct2/object/LargeSceneryObject.cpp +++ b/src/openrct2/object/LargeSceneryObject.cpp @@ -60,7 +60,7 @@ void LargeSceneryObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStre _legacyType.price = stream->ReadValue() * 10; _legacyType.removal_price = stream->ReadValue() * 10; stream->Seek(5, OpenRCT2::STREAM_SEEK_CURRENT); - _legacyType.scenery_tab_id = OBJECT_ENTRY_INDEX_NULL; + _legacyType.scenery_tab_id = kObjectEntryIndexNull; _legacyType.scrolling_mode = stream->ReadValue(); stream->Seek(4, OpenRCT2::STREAM_SEEK_CURRENT); diff --git a/src/openrct2/object/MusicObject.cpp b/src/openrct2/object/MusicObject.cpp index 97136822f44f..9fb7f2300a7e 100644 --- a/src/openrct2/object/MusicObject.cpp +++ b/src/openrct2/object/MusicObject.cpp @@ -149,7 +149,7 @@ void MusicObject::ParseRideTypes(const json_t& jRideTypes) if (!szRideType.empty()) { auto rideType = RideObject::ParseRideType(szRideType); - if (rideType != RIDE_TYPE_NULL) + if (rideType != kRideTypeNull) { _rideTypes.push_back(rideType); } diff --git a/src/openrct2/object/ObjectList.cpp b/src/openrct2/object/ObjectList.cpp index be2c8be252b2..0f7a1da9427f 100644 --- a/src/openrct2/object/ObjectList.cpp +++ b/src/openrct2/object/ObjectList.cpp @@ -180,7 +180,7 @@ ObjectEntryIndex ObjectList::Find(ObjectType type, std::string_view identifier) return static_cast(i); } } - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; } // Intended to be used to find non-custom legacy objects. For internal use only. @@ -195,7 +195,7 @@ ObjectEntryIndex ObjectList::FindLegacy(ObjectType type, std::string_view identi return static_cast(i); } } - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; } /** diff --git a/src/openrct2/object/ObjectManager.cpp b/src/openrct2/object/ObjectManager.cpp index 4020106c61fd..7b3608b1529d 100644 --- a/src/openrct2/object/ObjectManager.cpp +++ b/src/openrct2/object/ObjectManager.cpp @@ -80,7 +80,7 @@ class ObjectManager final : public IObjectManager Object* GetLoadedObject(ObjectType objectType, size_t index) override { // This is sometimes done deliberately (to avoid boilerplate), so no need to log_warn for this. - if (index == OBJECT_ENTRY_INDEX_NULL) + if (index == kObjectEntryIndexNull) { return nullptr; } @@ -88,7 +88,7 @@ class ObjectManager final : public IObjectManager if (index >= static_cast(getObjectEntryGroupCount(objectType))) { #ifdef DEBUG - if (index != OBJECT_ENTRY_INDEX_NULL) + if (index != kObjectEntryIndexNull) { LOG_WARNING("Object index %u exceeds maximum for type %d.", index, objectType); } @@ -121,7 +121,7 @@ class ObjectManager final : public IObjectManager { return GetLoadedObjectEntryIndex(obj); } - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; } ObjectEntryIndex GetLoadedObjectEntryIndex(const ObjectEntryDescriptor& descriptor) override @@ -131,12 +131,12 @@ class ObjectManager final : public IObjectManager { return GetLoadedObjectEntryIndex(obj); } - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; } ObjectEntryIndex GetLoadedObjectEntryIndex(const Object* object) override { - ObjectEntryIndex result = OBJECT_ENTRY_INDEX_NULL; + ObjectEntryIndex result = kObjectEntryIndexNull; size_t index = GetLoadedObjectIndex(object); if (index != SIZE_MAX) { @@ -511,7 +511,7 @@ class ObjectManager final : public IObjectManager const auto& primarySGEntry = sceneryObject->GetPrimarySceneryGroup(); Object* sgObject = GetLoadedObject(primarySGEntry); - auto entryIndex = OBJECT_ENTRY_INDEX_NULL; + auto entryIndex = kObjectEntryIndexNull; if (sgObject != nullptr) { entryIndex = GetLoadedObjectEntryIndex(sgObject); diff --git a/src/openrct2/object/ObjectTypes.h b/src/openrct2/object/ObjectTypes.h index 75dadd261c47..38e2efa81e61 100644 --- a/src/openrct2/object/ObjectTypes.h +++ b/src/openrct2/object/ObjectTypes.h @@ -16,7 +16,7 @@ #include using ObjectEntryIndex = uint16_t; -constexpr ObjectEntryIndex OBJECT_ENTRY_INDEX_NULL = std::numeric_limits::max(); +constexpr ObjectEntryIndex kObjectEntryIndexNull = std::numeric_limits::max(); // First 0xF of RCTObjectEntry->flags enum class ObjectType : uint8_t diff --git a/src/openrct2/object/PathAdditionObject.cpp b/src/openrct2/object/PathAdditionObject.cpp index e1fdf821ca15..f8f139bff652 100644 --- a/src/openrct2/object/PathAdditionObject.cpp +++ b/src/openrct2/object/PathAdditionObject.cpp @@ -29,7 +29,7 @@ void PathAdditionObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStre _legacyType.draw_type = static_cast(stream->ReadValue()); _legacyType.tool_id = static_cast(stream->ReadValue()); _legacyType.price = stream->ReadValue(); - _legacyType.scenery_tab_id = OBJECT_ENTRY_INDEX_NULL; + _legacyType.scenery_tab_id = kObjectEntryIndexNull; stream->Seek(2, OpenRCT2::STREAM_SEEK_CURRENT); GetStringTable().Read(context, stream, ObjectStringID::NAME); @@ -68,7 +68,7 @@ void PathAdditionObject::Load() _legacyType.name = LanguageAllocateObjectString(GetName()); _legacyType.image = LoadImages(); - _legacyType.scenery_tab_id = OBJECT_ENTRY_INDEX_NULL; + _legacyType.scenery_tab_id = kObjectEntryIndexNull; } void PathAdditionObject::Unload() diff --git a/src/openrct2/object/RideObject.cpp b/src/openrct2/object/RideObject.cpp index d370f5f603da..84b09a03963b 100644 --- a/src/openrct2/object/RideObject.cpp +++ b/src/openrct2/object/RideObject.cpp @@ -122,7 +122,7 @@ static void RideObjectUpdateRideType(RideObjectEntry& rideEntry) for (auto i = 0; i < RCT2::ObjectLimits::kMaxRideTypesPerRideEntry; i++) { auto oldRideType = rideEntry.ride_type[i]; - if (oldRideType != RIDE_TYPE_NULL) + if (oldRideType != kRideTypeNull) { rideEntry.ride_type[i] = RCT2::RCT2RideTypeToOpenRCT2RideType(oldRideType, rideEntry); } @@ -137,7 +137,7 @@ void RideObject::ReadLegacy(IReadObjectContext* context, IStream* stream) { rideType = stream->ReadValue(); if (!RideTypeIsValid(rideType)) - rideType = RIDE_TYPE_NULL; + rideType = kRideTypeNull; } _legacyType.min_cars_in_train = stream->ReadValue(); _legacyType.max_cars_in_train = stream->ReadValue(); @@ -354,7 +354,7 @@ void RideObject::DrawPreview(DrawPixelInfo& dpi, [[maybe_unused]] int32_t width, for (auto rideType : _legacyType.ride_type) { - if (rideType != RIDE_TYPE_NULL) + if (rideType != kRideTypeNull) break; imageId++; @@ -528,13 +528,13 @@ void RideObject::ReadJson(IReadObjectContext* context, json_t& root) for (size_t i = 0; i < RCT2::ObjectLimits::kMaxRideTypesPerRideEntry; i++) { - auto rideType = RIDE_TYPE_NULL; + auto rideType = kRideTypeNull; if (i < numRideTypes) { rideType = ParseRideType(Json::GetString(rideTypes[i])); - if (rideType == RIDE_TYPE_NULL) + if (rideType == kRideTypeNull) { context->LogError(ObjectError::InvalidProperty, "Unknown ride type"); } @@ -970,11 +970,11 @@ bool RideObject::IsRideTypeShopOrFacility(ride_type_t rideType) ride_type_t RideObject::ParseRideType(const std::string& s) { auto result = std::find_if( - std::begin(RideTypeDescriptors), std::end(RideTypeDescriptors), [s](const auto& rtd) { return rtd.Name == s; }); - if (result == std::end(RideTypeDescriptors)) - return RIDE_TYPE_NULL; + std::begin(kRideTypeDescriptors), std::end(kRideTypeDescriptors), [s](const auto& rtd) { return rtd.Name == s; }); + if (result == std::end(kRideTypeDescriptors)) + return kRideTypeNull; else - return std::distance(std::begin(RideTypeDescriptors), result); + return std::distance(std::begin(kRideTypeDescriptors), result); } static const EnumMap RideCategoryLookupTable{ diff --git a/src/openrct2/object/SceneryGroupObject.cpp b/src/openrct2/object/SceneryGroupObject.cpp index 3310c2103c09..315d8e74dc1e 100644 --- a/src/openrct2/object/SceneryGroupObject.cpp +++ b/src/openrct2/object/SceneryGroupObject.cpp @@ -113,7 +113,7 @@ void SceneryGroupObject::UpdateEntryIndexes() continue; auto entryIndex = objectManager.GetLoadedObjectEntryIndex(ori->LoadedObject.get()); - if (entryIndex == OBJECT_ENTRY_INDEX_NULL) + if (entryIndex == kObjectEntryIndexNull) { // Some parks have manually deleted objects from the save so they might not be loaded // silently remove the object from the SceneryGroupObject diff --git a/src/openrct2/object/SmallSceneryObject.cpp b/src/openrct2/object/SmallSceneryObject.cpp index e4ddc7e43475..de5570a5aed3 100644 --- a/src/openrct2/object/SmallSceneryObject.cpp +++ b/src/openrct2/object/SmallSceneryObject.cpp @@ -34,7 +34,7 @@ void SmallSceneryObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStre _legacyType.animation_delay = stream->ReadValue(); _legacyType.animation_mask = stream->ReadValue(); _legacyType.num_frames = stream->ReadValue(); - _legacyType.scenery_tab_id = OBJECT_ENTRY_INDEX_NULL; + _legacyType.scenery_tab_id = kObjectEntryIndexNull; GetStringTable().Read(context, stream, ObjectStringID::NAME); @@ -75,7 +75,7 @@ void SmallSceneryObject::Load() _legacyType.name = LanguageAllocateObjectString(GetName()); _legacyType.image = LoadImages(); - _legacyType.scenery_tab_id = OBJECT_ENTRY_INDEX_NULL; + _legacyType.scenery_tab_id = kObjectEntryIndexNull; _legacyType.FrameOffsetCount = 0; if (_legacyType.HasFlag(SMALL_SCENERY_FLAG_HAS_FRAME_OFFSETS)) diff --git a/src/openrct2/object/WallObject.cpp b/src/openrct2/object/WallObject.cpp index a5223d3d2066..0de0b94d4dd2 100644 --- a/src/openrct2/object/WallObject.cpp +++ b/src/openrct2/object/WallObject.cpp @@ -28,7 +28,7 @@ void WallObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStream* stre _legacyType.height = stream->ReadValue(); _legacyType.flags2 = stream->ReadValue(); _legacyType.price = stream->ReadValue(); - _legacyType.scenery_tab_id = OBJECT_ENTRY_INDEX_NULL; + _legacyType.scenery_tab_id = kObjectEntryIndexNull; stream->Seek(1, OpenRCT2::STREAM_SEEK_CURRENT); _legacyType.scrolling_mode = stream->ReadValue(); diff --git a/src/openrct2/paint/Paint.cpp b/src/openrct2/paint/Paint.cpp index f3c4a248c0fb..51f4a253ca37 100644 --- a/src/openrct2/paint/Paint.cpp +++ b/src/openrct2/paint/Paint.cpp @@ -36,7 +36,7 @@ using namespace OpenRCT2::Numerics; // Globals for paint clipping uint8_t gClipHeight = 128; // Default to middle value CoordsXY gClipSelectionA = { 0, 0 }; -CoordsXY gClipSelectionB = { MAXIMUM_TILE_START_XY, MAXIMUM_TILE_START_XY }; +CoordsXY gClipSelectionB = { kMaximumTileStartXY, kMaximumTileStartXY }; static constexpr uint8_t BoundBoxDebugColours[] = { 0, // NONE diff --git a/src/openrct2/paint/VirtualFloor.cpp b/src/openrct2/paint/VirtualFloor.cpp index e4acb8a42d57..b40b7cdc19e9 100644 --- a/src/openrct2/paint/VirtualFloor.cpp +++ b/src/openrct2/paint/VirtualFloor.cpp @@ -264,7 +264,7 @@ static void VirtualFloorGetTileProperties( { *outBelowGround = true; } - else if (height < (tileElement->GetBaseZ() + LAND_HEIGHT_STEP) && tileElement->AsSurface()->GetSlope() != 0) + else if (height < (tileElement->GetBaseZ() + kLandHeightStep) && tileElement->AsSurface()->GetSlope() != 0) { *outBelowGround = true; *outOccupied = true; diff --git a/src/openrct2/paint/support/WoodenSupports.cpp b/src/openrct2/paint/support/WoodenSupports.cpp index 84ee8037bf0f..a17f4a73471b 100644 --- a/src/openrct2/paint/support/WoodenSupports.cpp +++ b/src/openrct2/paint/support/WoodenSupports.cpp @@ -331,7 +331,7 @@ static void PaintRepeatedWoodenSupports( { while (heightSteps > 0) { - const bool isHalf = baseHeight & 0x10 || heightSteps == 1 || baseHeight + WATER_HEIGHT_STEP == session.WaterHeight; + const bool isHalf = baseHeight & 0x10 || heightSteps == 1 || baseHeight + kWaterHeightStep == session.WaterHeight; if (isHalf) { // Half support diff --git a/src/openrct2/paint/tile_element/Paint.Banner.cpp b/src/openrct2/paint/tile_element/Paint.Banner.cpp index 4510028bad1c..023b1d3a4ec8 100644 --- a/src/openrct2/paint/tile_element/Paint.Banner.cpp +++ b/src/openrct2/paint/tile_element/Paint.Banner.cpp @@ -28,9 +28,9 @@ using namespace OpenRCT2; -// BannerBoundBoxes[rotation][0] is for the pole in the back -// BannerBoundBoxes[rotation][1] is for the pole and the banner in the front -constexpr CoordsXY BannerBoundBoxes[][2] = { +// kBannerBoundBoxes[rotation][0] is for the pole in the back +// kBannerBoundBoxes[rotation][1] is for the pole and the banner in the front +constexpr CoordsXY kBannerBoundBoxes[][2] = { { { 1, 2 }, { 1, 29 } }, { { 2, 32 }, { 29, 32 } }, { { 32, 2 }, { 32, 29 } }, @@ -117,10 +117,10 @@ void PaintBanner(PaintSession& session, uint8_t direction, int32_t height, const auto imageIndex = (direction << 1) + bannerEntry->image; auto imageId = imageTemplate.WithIndex(imageIndex); - auto bbOffset = CoordsXYZ(BannerBoundBoxes[direction][0], height + 2); + auto bbOffset = CoordsXYZ(kBannerBoundBoxes[direction][0], height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { bbOffset, { 1, 1, 21 } }); - bbOffset = CoordsXYZ(BannerBoundBoxes[direction][1], height + 2); + bbOffset = CoordsXYZ(kBannerBoundBoxes[direction][1], height + 2); PaintAddImageAsParent(session, imageId.WithIndexOffset(1), { 0, 0, height }, { bbOffset, { 1, 1, 21 } }); PaintBannerScrollingText(session, *bannerEntry, *banner, bannerElement, direction, height, bbOffset); diff --git a/src/openrct2/paint/tile_element/Paint.Path.cpp b/src/openrct2/paint/tile_element/Paint.Path.cpp index 5f73a841d33b..7b5f19e840e6 100644 --- a/src/openrct2/paint/tile_element/Paint.Path.cpp +++ b/src/openrct2/paint/tile_element/Paint.Path.cpp @@ -50,7 +50,7 @@ using namespace OpenRCT2; bool gPaintWidePathsAsGhost = false; -const uint8_t PathSlopeToLandSlope[] = { +const uint8_t kPathSlopeToLandSlope[] = { kTileSlopeSWSideUp, kTileSlopeNWSideUp, kTileSlopeNESideUp, @@ -132,7 +132,7 @@ static void PathPaintQueueBanner( direction += session.CurrentRotation; direction &= 3; - CoordsXYZ boundBoxOffsets = CoordsXYZ(BannerBoundBoxes[direction][0], height + 2); + CoordsXYZ boundBoxOffsets = CoordsXYZ(kBannerBoundBoxes[direction][0], height + 2); imageId = imageId.WithIndexOffset(28 + (direction << 1)); @@ -140,8 +140,8 @@ static void PathPaintQueueBanner( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { boundBoxOffsets, { 1, 1, 21 } }); // Draw pole in the front and banner - boundBoxOffsets.x = BannerBoundBoxes[direction][1].x; - boundBoxOffsets.y = BannerBoundBoxes[direction][1].y; + boundBoxOffsets.x = kBannerBoundBoxes[direction][1].x; + boundBoxOffsets.y = kBannerBoundBoxes[direction][1].y; imageId = imageId.WithIndexOffset(1); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { boundBoxOffsets, { 1, 1, 21 } }); @@ -723,7 +723,7 @@ static bool ShouldDrawSupports(PaintSession& session, const PathElement& pathEl, else if (pathEl.IsSloped()) { // Diagonal path - if (surface->GetSlope() != PathSlopeToLandSlope[pathEl.GetSlopeDirection()]) + if (surface->GetSlope() != kPathSlopeToLandSlope[pathEl.GetSlopeDirection()]) { return true; } diff --git a/src/openrct2/paint/tile_element/Paint.Surface.cpp b/src/openrct2/paint/tile_element/Paint.Surface.cpp index b00186e4f95b..e7827bf1db95 100644 --- a/src/openrct2/paint/tile_element/Paint.Surface.cpp +++ b/src/openrct2/paint/tile_element/Paint.Surface.cpp @@ -841,7 +841,7 @@ static std::pair SurfaceGetHeightAboveWater( int32_t waterHeight = surfaceElement.GetWaterHeight(); if (waterHeight > height) { - localHeight += LAND_HEIGHT_STEP; + localHeight += kLandHeightStep; if (waterHeight != localHeight || !(localSurfaceShape & static_cast(kTileSlopeDiagonalFlag))) { diff --git a/src/openrct2/paint/tile_element/Paint.TileElement.cpp b/src/openrct2/paint/tile_element/Paint.TileElement.cpp index 9221103396c7..0352fba40764 100644 --- a/src/openrct2/paint/tile_element/Paint.TileElement.cpp +++ b/src/openrct2/paint/tile_element/Paint.TileElement.cpp @@ -350,7 +350,7 @@ void PaintUtilForceSetGeneralSupportHeight(PaintSession& session, int16_t height session.Support.slope = slope; } -const uint16_t segment_offsets[9] = { +const uint16_t kSegmentOffsets[9] = { EnumToFlag(PaintSegment::topCorner), EnumToFlag(PaintSegment::leftCorner), EnumToFlag(PaintSegment::rightCorner), EnumToFlag(PaintSegment::bottomCorner), EnumToFlag(PaintSegment::centre), EnumToFlag(PaintSegment::topLeftSide), EnumToFlag(PaintSegment::topRightSide), EnumToFlag(PaintSegment::bottomLeftSide), EnumToFlag(PaintSegment::bottomRightSide), @@ -359,9 +359,9 @@ const uint16_t segment_offsets[9] = { void PaintUtilSetSegmentSupportHeight(PaintSession& session, int32_t segments, uint16_t height, uint8_t slope) { SupportHeight* supportSegments = session.SupportSegments; - for (std::size_t s = 0; s < std::size(segment_offsets); s++) + for (std::size_t s = 0; s < std::size(kSegmentOffsets); s++) { - if (segments & segment_offsets[s]) + if (segments & kSegmentOffsets[s]) { supportSegments[s].height = height; if (height != 0xFFFF) diff --git a/src/openrct2/paint/tile_element/Paint.TileElement.h b/src/openrct2/paint/tile_element/Paint.TileElement.h index 6489dbee1e4b..5e8eeb648efb 100644 --- a/src/openrct2/paint/tile_element/Paint.TileElement.h +++ b/src/openrct2/paint/tile_element/Paint.TileElement.h @@ -25,13 +25,13 @@ enum edge_t EDGE_TOPRIGHT = EDGE_NE }; -extern const uint16_t segment_offsets[9]; +extern const uint16_t kSegmentOffsets[9]; extern bool gShowSupportSegmentHeights; -extern const CoordsXY BannerBoundBoxes[][2]; +extern const CoordsXY kBannerBoundBoxes[][2]; -extern const uint8_t PathSlopeToLandSlope[4]; +extern const uint8_t kPathSlopeToLandSlope[4]; void PaintUtilSetGeneralSupportHeight(PaintSession& session, int16_t height); void PaintUtilForceSetGeneralSupportHeight(PaintSession& session, int16_t height, uint8_t slope); diff --git a/src/openrct2/paint/track/coaster/BobsleighCoaster.cpp b/src/openrct2/paint/track/coaster/BobsleighCoaster.cpp index f2ff7dc1eaaa..2bdeda97ab01 100644 --- a/src/openrct2/paint/track/coaster/BobsleighCoaster.cpp +++ b/src/openrct2/paint/track/coaster/BobsleighCoaster.cpp @@ -31,7 +31,7 @@ static constexpr uint32_t BOBSLEIGH_BLOCK_BRAKE_NW_SE_OPEN = 14587; static constexpr uint32_t BOBSLEIGH_BLOCK_BRAKE_SW_NE_CLOSED = 14588; static constexpr uint32_t BOBSLEIGH_BLOCK_BRAKE_NW_SE_CLOSED = 14589; -static constexpr uint32_t _BobsleighBlockBrakeImages[kNumOrthogonalDirections][2] = { +static constexpr uint32_t kBobsleighBlockBrakeImages[kNumOrthogonalDirections][2] = { { BOBSLEIGH_BLOCK_BRAKE_SW_NE_OPEN, BOBSLEIGH_BLOCK_BRAKE_SW_NE_CLOSED }, { BOBSLEIGH_BLOCK_BRAKE_NW_SE_OPEN, BOBSLEIGH_BLOCK_BRAKE_NW_SE_CLOSED }, { BOBSLEIGH_BLOCK_BRAKE_SW_NE_OPEN, BOBSLEIGH_BLOCK_BRAKE_SW_NE_CLOSED }, @@ -4049,7 +4049,7 @@ static void BobsleighRCTrackBlockBrakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(_BobsleighBlockBrakeImages[direction][isClosed]), + session, direction, session.TrackColours.WithIndex(kBobsleighBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(14590), { 0, 0, height }, @@ -4058,7 +4058,7 @@ static void BobsleighRCTrackBlockBrakes( case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(_BobsleighBlockBrakeImages[direction][isClosed]), + session, direction, session.TrackColours.WithIndex(kBobsleighBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(14591), { 0, 0, height }, diff --git a/src/openrct2/paint/track/coaster/LatticeTriangleTrack.cpp b/src/openrct2/paint/track/coaster/LatticeTriangleTrack.cpp index 4a7ee9614318..ae8ffce7f30c 100644 --- a/src/openrct2/paint/track/coaster/LatticeTriangleTrack.cpp +++ b/src/openrct2/paint/track/coaster/LatticeTriangleTrack.cpp @@ -36,7 +36,7 @@ static constexpr uint32_t LATTICE_TRIANGLE_BRAKE_NW_SE_OPEN_2 = 18081; static constexpr uint32_t LATTICE_TRIANGLE_BRAKE_SW_NE_CLOSED_2 = 18082; static constexpr uint32_t LATTICE_TRIANGLE_BRAKE_NW_SE_CLOSED_2 = 18083; -static constexpr uint32_t _LatticeTriangleBrakeImages[kNumOrthogonalDirections][2][2] = { +static constexpr uint32_t kLatticeTriangleBrakeImages[kNumOrthogonalDirections][2][2] = { { { LATTICE_TRIANGLE_BRAKE_SW_NE_OPEN_1, LATTICE_TRIANGLE_BRAKE_SW_NE_OPEN_2 }, { LATTICE_TRIANGLE_BRAKE_SW_NE_CLOSED_1, LATTICE_TRIANGLE_BRAKE_SW_NE_CLOSED_2 } }, { { LATTICE_TRIANGLE_BRAKE_NW_SE_OPEN_1, LATTICE_TRIANGLE_BRAKE_NW_SE_OPEN_2 }, @@ -51,7 +51,7 @@ static constexpr uint32_t _LatticeTriangleBrakeImages[kNumOrthogonalDirections][ * second level: background, foreground * third level: direction */ -static constexpr uint32_t LatticeTriangleBrakeImages[2][2][kNumOrthogonalDirections] = { +static constexpr uint32_t kLatticeTriangleDiagBrakeImages[2][2][kNumOrthogonalDirections] = { { // Open { @@ -187,7 +187,7 @@ static void LatticeTriangleTrackStation( { bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(_LatticeTriangleBrakeImages[direction][isClosed][0]), + session, direction, session.TrackColours.WithIndex(kLatticeTriangleBrakeImages[direction][isClosed][0]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } else @@ -9001,10 +9001,10 @@ static void LatticeTriangleTrackBlockBrakes( { bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(_LatticeTriangleBrakeImages[direction][isClosed][0]), + session, direction, session.TrackColours.WithIndex(kLatticeTriangleBrakeImages[direction][isClosed][0]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(_LatticeTriangleBrakeImages[direction][isClosed][1]), + session, direction, session.TrackColours.WithIndex(kLatticeTriangleBrakeImages[direction][isClosed][1]), { 0, 0, height }, { { 0, 27, height + 5 }, { 32, 1, 11 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -18404,11 +18404,11 @@ static void LatticeTriangleTrackDiagBrakes( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, LatticeTriangleBrakeImages[trackElement.IsBrakeClosed()][0], + session, 3, height, direction, trackSequence, kLatticeTriangleDiagBrakeImages[trackElement.IsBrakeClosed()][0], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, LatticeTriangleBrakeImages[trackElement.IsBrakeClosed()][1], + session, 3, height, direction, trackSequence, kLatticeTriangleDiagBrakeImages[trackElement.IsBrakeClosed()][1], defaultDiagTileOffsets, defaultDiagBoundLengths, diagBrakeBoundsOffsets); if (trackSequence == 3) diff --git a/src/openrct2/paint/track/coaster/LatticeTriangleTrackAlt.cpp b/src/openrct2/paint/track/coaster/LatticeTriangleTrackAlt.cpp index 0f356637ab7b..384e1a3a76fc 100644 --- a/src/openrct2/paint/track/coaster/LatticeTriangleTrackAlt.cpp +++ b/src/openrct2/paint/track/coaster/LatticeTriangleTrackAlt.cpp @@ -26,14 +26,14 @@ using namespace OpenRCT2; static constexpr TunnelGroup kTunnelGroup = TunnelGroup::Square; -static constexpr uint32_t _LatticeTriangleAltBrakeImages[kNumOrthogonalDirections][2] = { +static constexpr uint32_t kLatticeTriangleAltBrakeImages[kNumOrthogonalDirections][2] = { { SPR_G2_LATTICE_TRIANGLE_TRACK_BRAKE_ALT_OPEN_NE_SW, SPR_G2_LATTICE_TRIANGLE_TRACK_BRAKE_ALT_CLOSED_NE_SW }, { SPR_G2_LATTICE_TRIANGLE_TRACK_BRAKE_ALT_OPEN_NW_SE, SPR_G2_LATTICE_TRIANGLE_TRACK_BRAKE_ALT_CLOSED_NW_SE }, { SPR_G2_LATTICE_TRIANGLE_TRACK_BRAKE_ALT_OPEN_SW_NE, SPR_G2_LATTICE_TRIANGLE_TRACK_BRAKE_ALT_CLOSED_SW_NE }, { SPR_G2_LATTICE_TRIANGLE_TRACK_BRAKE_ALT_OPEN_SE_NW, SPR_G2_LATTICE_TRIANGLE_TRACK_BRAKE_ALT_CLOSED_SE_NW }, }; -static constexpr uint32_t _LatticeTriangleAltBlockBrakeImages[kNumOrthogonalDirections][2] = { +static constexpr uint32_t kLatticeTriangleAltBlockBrakeImages[kNumOrthogonalDirections][2] = { { SPR_G2_LATTICE_TRIANGLE_TRACK_BLOCK_BRAKE_ALT_OPEN_NE_SW, SPR_G2_LATTICE_TRIANGLE_TRACK_BLOCK_BRAKE_ALT_CLOSED_NE_SW }, { SPR_G2_LATTICE_TRIANGLE_TRACK_BLOCK_BRAKE_ALT_OPEN_NW_SE, SPR_G2_LATTICE_TRIANGLE_TRACK_BLOCK_BRAKE_ALT_CLOSED_NW_SE }, { SPR_G2_LATTICE_TRIANGLE_TRACK_BLOCK_BRAKE_ALT_OPEN_SW_NE, SPR_G2_LATTICE_TRIANGLE_TRACK_BLOCK_BRAKE_ALT_CLOSED_SW_NE }, @@ -74,7 +74,7 @@ static void LatticeTriangleTrackAltStation( { bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(_LatticeTriangleAltBlockBrakeImages[direction][isClosed]), + session, direction, session.TrackColours.WithIndex(kLatticeTriangleAltBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } else @@ -101,7 +101,7 @@ static void LatticeTriangleTrackAltBrakes( { bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(_LatticeTriangleAltBrakeImages[direction][isClosed]), + session, direction, session.TrackColours.WithIndex(kLatticeTriangleAltBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -120,7 +120,7 @@ static void LatticeTriangleTrackAltBlockBrakes( { bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(_LatticeTriangleAltBlockBrakeImages[direction][isClosed]), + session, direction, session.TrackColours.WithIndex(kLatticeTriangleAltBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) diff --git a/src/openrct2/paint/track/coaster/LimLaunchedRollerCoaster.cpp b/src/openrct2/paint/track/coaster/LimLaunchedRollerCoaster.cpp index 920fac2f31b1..9c1d5045bd20 100644 --- a/src/openrct2/paint/track/coaster/LimLaunchedRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/LimLaunchedRollerCoaster.cpp @@ -31,7 +31,7 @@ static constexpr uint32_t LIM_LAUNCHED_RC_BLOCK_BRAKE_NW_SE_OPEN = 15021; static constexpr uint32_t LIM_LAUNCHED_RC_BLOCK_BRAKE_SW_NE_CLOSED = 15022; static constexpr uint32_t LIM_LAUNCHED_RC_BLOCK_BRAKE_NW_SE_CLOSED = 15023; -static constexpr uint32_t _LimLauncherBlockBrakeImages[kNumOrthogonalDirections][2] = { +static constexpr uint32_t kLimLauncherBlockBrakeImages[kNumOrthogonalDirections][2] = { { LIM_LAUNCHED_RC_BLOCK_BRAKE_SW_NE_OPEN, LIM_LAUNCHED_RC_BLOCK_BRAKE_SW_NE_CLOSED }, { LIM_LAUNCHED_RC_BLOCK_BRAKE_NW_SE_OPEN, LIM_LAUNCHED_RC_BLOCK_BRAKE_NW_SE_CLOSED }, { LIM_LAUNCHED_RC_BLOCK_BRAKE_SW_NE_OPEN, LIM_LAUNCHED_RC_BLOCK_BRAKE_SW_NE_CLOSED }, @@ -54,7 +54,7 @@ static void LimLaunchedRCTrackStation( { bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(_LimLauncherBlockBrakeImages[direction][isClosed]), + session, direction, session.TrackColours.WithIndex(kLimLauncherBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } else @@ -1827,7 +1827,7 @@ static void LimLaunchedRCTrackBlockBrakes( { bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(_LimLauncherBlockBrakeImages[direction][isClosed]), { 0, 0, height }, + session, direction, session.TrackColours.WithIndex(kLimLauncherBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) diff --git a/src/openrct2/paint/track/coaster/LoopingRollerCoaster.cpp b/src/openrct2/paint/track/coaster/LoopingRollerCoaster.cpp index 8ea2428a0146..185531208e2c 100644 --- a/src/openrct2/paint/track/coaster/LoopingRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/LoopingRollerCoaster.cpp @@ -32,7 +32,7 @@ static constexpr auto SPR_LOOPING_RC_BOOSTER_NW_SE = 15011; static constexpr auto SPR_LOOPING_RC_FLAT_CHAINED_SW_NE = 15016; static constexpr auto SPR_LOOPING_RC_FLAT_CHAINED_NW_SE = 15017; -static constexpr const uint32_t LoopingRCDiagBrakeImages[2 * kNumOrthogonalDirections] = { +static constexpr const uint32_t kLoopingRCDiagBrakeImages[2 * kNumOrthogonalDirections] = { SPR_G2_LOOPING_DIAG_BRAKES, SPR_G2_LOOPING_DIAG_BRAKES + 2, SPR_G2_LOOPING_DIAG_BRAKES, SPR_G2_LOOPING_DIAG_BRAKES + 2, SPR_G2_LOOPING_DIAG_BRAKES + 1, SPR_G2_LOOPING_DIAG_BRAKES + 3, SPR_G2_LOOPING_DIAG_BRAKES + 1, SPR_G2_LOOPING_DIAG_BRAKES + 3, @@ -5737,11 +5737,11 @@ static void LoopingRCTrackDiagBrakes( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, LoopingRCDiagBrakeImages, defaultDiagTileOffsets, defaultDiagBoundLengths, - nullptr); + session, 3, height, direction, trackSequence, kLoopingRCDiagBrakeImages, defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, LoopingRCDiagBrakeImages + 4, defaultDiagTileOffsets, + session, 3, height, direction, trackSequence, kLoopingRCDiagBrakeImages + 4, defaultDiagTileOffsets, defaultDiagBoundLengths, diagBrakeBoundsOffsets); if (trackSequence == 3) diff --git a/src/openrct2/paint/track/coaster/MineTrainCoaster.cpp b/src/openrct2/paint/track/coaster/MineTrainCoaster.cpp index 5d9c5f6af6fa..2233087056b0 100644 --- a/src/openrct2/paint/track/coaster/MineTrainCoaster.cpp +++ b/src/openrct2/paint/track/coaster/MineTrainCoaster.cpp @@ -32,21 +32,21 @@ static constexpr uint32_t MINE_TRAIN_BLOCK_BRAKE_NW_SE_OPEN = 20061; static constexpr uint32_t MINE_TRAIN_BLOCK_BRAKE_SW_NE_CLOSED = 20062; static constexpr uint32_t MINE_TRAIN_BLOCK_BRAKE_NW_SE_CLOSED = 20063; -static constexpr uint32_t _MineTrainBlockBrakeImages[kNumOrthogonalDirections][2] = { +static constexpr uint32_t kMineTrainBlockBrakeImages[kNumOrthogonalDirections][2] = { { MINE_TRAIN_BLOCK_BRAKE_SW_NE_OPEN, MINE_TRAIN_BLOCK_BRAKE_SW_NE_CLOSED }, { MINE_TRAIN_BLOCK_BRAKE_NW_SE_OPEN, MINE_TRAIN_BLOCK_BRAKE_NW_SE_CLOSED }, { MINE_TRAIN_BLOCK_BRAKE_SW_NE_OPEN, MINE_TRAIN_BLOCK_BRAKE_SW_NE_CLOSED }, { MINE_TRAIN_BLOCK_BRAKE_NW_SE_OPEN, MINE_TRAIN_BLOCK_BRAKE_NW_SE_CLOSED }, }; -static constexpr const uint32_t MinetrainRCDiagBrakeImages[kNumOrthogonalDirections] = { +static constexpr const uint32_t kMinetrainRCDiagBrakeImages[kNumOrthogonalDirections] = { SPR_G2_MINETRAIN_DIAG_BRAKES, SPR_G2_MINETRAIN_DIAG_BRAKES + 1, SPR_G2_MINETRAIN_DIAG_BRAKES, SPR_G2_MINETRAIN_DIAG_BRAKES + 1, }; -static constexpr const uint32_t MinetrainRCDiagBlockBrakeImages[2][kNumOrthogonalDirections] = { +static constexpr const uint32_t kMinetrainRCDiagBlockBrakeImages[2][kNumOrthogonalDirections] = { { SPR_G2_MINETRAIN_DIAG_BRAKES + 3, SPR_G2_MINETRAIN_DIAG_BRAKES + 5, @@ -146,7 +146,7 @@ static void MineTrainRCTrackStation( { bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsChildRotated( - session, direction, session.TrackColours.WithIndex(_MineTrainBlockBrakeImages[direction][isClosed]), + session, direction, session.TrackColours.WithIndex(kMineTrainBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 0, height }, { 32, 20, 1 } }); } else @@ -5349,7 +5349,7 @@ static void MineTrainRCTrackDiagBrakes( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, MinetrainRCDiagBrakeImages, defaultDiagTileOffsets, + session, 1, height, direction, trackSequence, kMinetrainRCDiagBrakeImages, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (MineTrainRCDiagonalSupports[trackSequence][direction] != WoodenSupportSubType::Null) @@ -5367,7 +5367,7 @@ static void MineTrainRCTrackDiagBlockBrakes( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilDiagTilesPaint( - session, 13, height, direction, trackSequence, MinetrainRCDiagBlockBrakeImages[trackElement.IsBrakeClosed()], + session, 13, height, direction, trackSequence, kMinetrainRCDiagBlockBrakeImages[trackElement.IsBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (MineTrainRCDiagonalSupports[trackSequence][direction] != WoodenSupportSubType::Null) @@ -7011,7 +7011,7 @@ static void MineTrainRCTrackBlockBrakes( { bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(_MineTrainBlockBrakeImages[direction][isClosed]), { 0, 0, height }, + session, direction, session.TrackColours.WithIndex(kMineTrainBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetupRotated( session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); diff --git a/src/openrct2/paint/track/coaster/MiniRollerCoaster.cpp b/src/openrct2/paint/track/coaster/MiniRollerCoaster.cpp index 36cd774755f5..e93f3027791e 100644 --- a/src/openrct2/paint/track/coaster/MiniRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/MiniRollerCoaster.cpp @@ -31,7 +31,7 @@ static constexpr uint32_t MINI_RC_BLOCK_BRAKE_NW_SE_OPEN = 18743; static constexpr uint32_t MINI_RC_BLOCK_BRAKE_SW_NE_CLOSED = 18744; static constexpr uint32_t MINI_RC_BLOCK_BRAKE_NW_SE_CLOSED = 18745; -static constexpr uint32_t _MiniRCBlockBrakeImages[kNumOrthogonalDirections][2] = { +static constexpr uint32_t kMiniRCBlockBrakeImages[kNumOrthogonalDirections][2] = { { MINI_RC_BLOCK_BRAKE_SW_NE_OPEN, MINI_RC_BLOCK_BRAKE_SW_NE_CLOSED }, { MINI_RC_BLOCK_BRAKE_NW_SE_OPEN, MINI_RC_BLOCK_BRAKE_NW_SE_CLOSED }, { MINI_RC_BLOCK_BRAKE_SW_NE_OPEN, MINI_RC_BLOCK_BRAKE_SW_NE_CLOSED }, @@ -112,7 +112,7 @@ static void MiniRCTrackStation( { bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(_MiniRCBlockBrakeImages[direction][isClosed]), { 0, 0, height }, + session, direction, session.TrackColours.WithIndex(kMiniRCBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } else @@ -7705,7 +7705,7 @@ static void MiniRCTrackBlockBrakes( { bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(_MiniRCBlockBrakeImages[direction][isClosed]), { 0, 0, height }, + session, direction, session.TrackColours.WithIndex(kMiniRCBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { diff --git a/src/openrct2/paint/track/coaster/ReverseFreefallCoaster.cpp b/src/openrct2/paint/track/coaster/ReverseFreefallCoaster.cpp index 0a9a7ecf6670..c473d571cdd4 100644 --- a/src/openrct2/paint/track/coaster/ReverseFreefallCoaster.cpp +++ b/src/openrct2/paint/track/coaster/ReverseFreefallCoaster.cpp @@ -98,14 +98,14 @@ enum SPR_AIR_POWERED_VERTICAL_RC_FLAT_NW_SE = 22227, }; -static constexpr uint32_t reverse_freefall_rc_track_pieces_station[4] = { +static constexpr uint32_t kPiecesStation[4] = { SPR_REVERSE_FREEFALL_RC_STATION_SW_NE, SPR_REVERSE_FREEFALL_RC_STATION_NW_SE, SPR_REVERSE_FREEFALL_RC_STATION_SW_NE, SPR_REVERSE_FREEFALL_RC_STATION_NW_SE, }; -static constexpr uint32_t reverse_freefall_rc_track_pieces_slope[7][4] = { +static constexpr uint32_t kPiecesSlope[7][4] = { { SPR_REVERSE_FREEFALL_RC_SLOPE_SW_NE_0, SPR_REVERSE_FREEFALL_RC_SLOPE_NW_SE_0, @@ -145,7 +145,7 @@ static constexpr uint32_t reverse_freefall_rc_track_pieces_slope[7][4] = { }, }; -static constexpr uint32_t reverse_freefall_rc_track_pieces_slope_supports[7][4] = { +static constexpr uint32_t kPiecesSlopeSupports[7][4] = { { SPR_REVERSE_FREEFALL_RC_SLOPE_SUPPORTS_SW_NE_0, SPR_REVERSE_FREEFALL_RC_SLOPE_SUPPORTS_NW_SE_0, @@ -190,14 +190,14 @@ static constexpr uint32_t reverse_freefall_rc_track_pieces_slope_supports[7][4] }, }; -static constexpr uint32_t reverse_freefall_rc_track_pieces_vertical[4] = { +static constexpr uint32_t kPiecesVertical[4] = { SPR_REVERSE_FREEFALL_RC_VERTICAL_SW_NE, SPR_REVERSE_FREEFALL_RC_VERTICAL_NW_SE, SPR_REVERSE_FREEFALL_RC_VERTICAL_NE_SW, SPR_REVERSE_FREEFALL_RC_VERTICAL_SE_NW, }; -static constexpr uint32_t reverse_freefall_rc_track_pieces_vertical_supports[4] = { +static constexpr uint32_t kPiecesVerticalSupports[4] = { SPR_REVERSE_FREEFALL_RC_VERTICAL_SUPPORTS_SW_NE, SPR_REVERSE_FREEFALL_RC_VERTICAL_SUPPORTS_NW_SE, SPR_REVERSE_FREEFALL_RC_VERTICAL_SUPPORTS_NE_SW, @@ -240,7 +240,7 @@ static void PaintReverseFreefallRCStation( PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 1 } }); // height += 2 (height) - imageId = session.TrackColours.WithIndex(reverse_freefall_rc_track_pieces_station[direction]); + imageId = session.TrackColours.WithIndex(kPiecesStation[direction]); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); } else if (direction == 1 || direction == 3) @@ -250,7 +250,7 @@ static void PaintReverseFreefallRCStation( PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 2, 0, height }, { 28, 32, 1 } }); // height += 2 (height) - imageId = session.TrackColours.WithIndex(reverse_freefall_rc_track_pieces_station[direction]); + imageId = session.TrackColours.WithIndex(kPiecesStation[direction]); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); } DrawSupportForSequenceA( @@ -272,9 +272,8 @@ static void PaintReverseFreefallRCSlope( static constexpr int32_t supportHeights[] = { 48, 64, 128, 176, 208, 240, 240 }; static constexpr int32_t tunnelOffsets03[] = { 0, 0, 0, 16, 64 }; - auto supportsImageId = session.SupportColours.WithIndex( - reverse_freefall_rc_track_pieces_slope_supports[trackSequence][direction]); - auto trackImageId = session.TrackColours.WithIndex(reverse_freefall_rc_track_pieces_slope[trackSequence][direction]); + auto supportsImageId = session.SupportColours.WithIndex(kPiecesSlopeSupports[trackSequence][direction]); + auto trackImageId = session.TrackColours.WithIndex(kPiecesSlope[trackSequence][direction]); int8_t bbHeight; bool isDirection03 = (direction == 0 || direction == 3); switch (trackSequence) @@ -374,13 +373,13 @@ static void PaintReverseFreefallRCVertical( switch (trackSequence) { case 0: - supportsImageId = session.SupportColours.WithIndex(reverse_freefall_rc_track_pieces_vertical_supports[direction]); + supportsImageId = session.SupportColours.WithIndex(kPiecesVerticalSupports[direction]); PaintAddImageAsParent(session, supportsImageId, { 0, 0, height }, { { 3, 3, height }, { 26, 26, 79 } }); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); break; case 1: - trackImageId = session.TrackColours.WithIndex(reverse_freefall_rc_track_pieces_vertical[direction]); + trackImageId = session.TrackColours.WithIndex(kPiecesVertical[direction]); if (direction == 0 || direction == 3) { PaintAddImageAsParentRotated( diff --git a/src/openrct2/paint/track/coaster/StandUpRollerCoaster.cpp b/src/openrct2/paint/track/coaster/StandUpRollerCoaster.cpp index dd9a0d67f7f8..bfb023a7b48c 100644 --- a/src/openrct2/paint/track/coaster/StandUpRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/StandUpRollerCoaster.cpp @@ -31,21 +31,21 @@ static constexpr uint32_t STAND_UP_BLOCK_BRAKE_NW_SE_OPEN = 25572; static constexpr uint32_t STAND_UP_BLOCK_BRAKE_SW_NE_CLOSED = 25573; static constexpr uint32_t STAND_UP_BLOCK_BRAKE_NW_SE_CLOSED = 25574; -static constexpr uint32_t _StandUpBlockBrakeImages[kNumOrthogonalDirections][2] = { +static constexpr uint32_t kStandUpBlockBrakeImages[kNumOrthogonalDirections][2] = { { STAND_UP_BLOCK_BRAKE_SW_NE_OPEN, STAND_UP_BLOCK_BRAKE_SW_NE_CLOSED }, { STAND_UP_BLOCK_BRAKE_NW_SE_OPEN, STAND_UP_BLOCK_BRAKE_NW_SE_CLOSED }, { STAND_UP_BLOCK_BRAKE_SW_NE_OPEN, STAND_UP_BLOCK_BRAKE_SW_NE_CLOSED }, { STAND_UP_BLOCK_BRAKE_NW_SE_OPEN, STAND_UP_BLOCK_BRAKE_NW_SE_CLOSED }, }; -static constexpr const uint32_t StandupRCDiagBrakeImages[kNumOrthogonalDirections] = { +static constexpr const uint32_t kStandupRCDiagBrakeImages[kNumOrthogonalDirections] = { SPR_G2_STANDUP_DIAG_BRAKES, SPR_G2_STANDUP_DIAG_BRAKES + 1, SPR_G2_STANDUP_DIAG_BRAKES, SPR_G2_STANDUP_DIAG_BRAKES + 1, }; -static constexpr const uint32_t StandupRCDiagBlockBrakeImages[2][kNumOrthogonalDirections] = { +static constexpr const uint32_t kStandupRCDiagBlockBrakeImages[2][kNumOrthogonalDirections] = { { SPR_G2_STANDUP_DIAG_BRAKES + 3, SPR_G2_STANDUP_DIAG_BRAKES + 5, @@ -132,7 +132,7 @@ static void StandUpRCTrackStation( { bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(_StandUpBlockBrakeImages[direction][isClosed]), { 0, 6, height }, + session, direction, session.TrackColours.WithIndex(kStandUpBlockBrakeImages[direction][isClosed]), { 0, 6, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } else @@ -6385,7 +6385,7 @@ static void StandUpRCTrackDiagBrakes( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilDiagTilesPaintExtra( - session, 3, height, direction, trackSequence, StandupRCDiagBrakeImages, supportType.metal); + session, 3, height, direction, trackSequence, kStandupRCDiagBrakeImages, supportType.metal); } static void StandUpRCTrackDiagBlockBrakes( @@ -6393,7 +6393,7 @@ static void StandUpRCTrackDiagBlockBrakes( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilDiagTilesPaintExtra( - session, 3, height, direction, trackSequence, StandupRCDiagBlockBrakeImages[trackElement.IsBrakeClosed()], + session, 3, height, direction, trackSequence, kStandupRCDiagBlockBrakeImages[trackElement.IsBrakeClosed()], supportType.metal); } @@ -9848,7 +9848,7 @@ static void StandUpRCTrackBlockBrakes( { bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(_StandUpBlockBrakeImages[direction][isClosed]), { 0, 6, height }, + session, direction, session.TrackColours.WithIndex(kStandUpBlockBrakeImages[direction][isClosed]), { 0, 6, height }, { 32, 20, 3 }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) diff --git a/src/openrct2/paint/track/coaster/TwisterRollerCoaster.cpp b/src/openrct2/paint/track/coaster/TwisterRollerCoaster.cpp index 8b48e2c18e94..4d8b3afb91b2 100644 --- a/src/openrct2/paint/track/coaster/TwisterRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/TwisterRollerCoaster.cpp @@ -28,26 +28,26 @@ using namespace OpenRCT2; static constexpr TunnelGroup kTunnelGroup = TunnelGroup::Square; -static constexpr uint32_t BM_BLOCK_BRAKE_SW_NE_OPEN = 17150; -static constexpr uint32_t BM_BLOCK_BRAKE_NW_SE_OPEN = 17151; -static constexpr uint32_t BM_BLOCK_BRAKE_SW_NE_CLOSED = 17152; -static constexpr uint32_t BM_BLOCK_BRAKE_NW_SE_CLOSED = 17153; - -static constexpr uint32_t _TwisterRCBlockBrakeImages[kNumOrthogonalDirections][2] = { - { BM_BLOCK_BRAKE_SW_NE_OPEN, BM_BLOCK_BRAKE_SW_NE_CLOSED }, - { BM_BLOCK_BRAKE_NW_SE_OPEN, BM_BLOCK_BRAKE_NW_SE_CLOSED }, - { BM_BLOCK_BRAKE_SW_NE_OPEN, BM_BLOCK_BRAKE_SW_NE_CLOSED }, - { BM_BLOCK_BRAKE_NW_SE_OPEN, BM_BLOCK_BRAKE_NW_SE_CLOSED }, +static constexpr uint32_t kTwisterBlockBrakeSwNeOpen = 17150; +static constexpr uint32_t kTwisterBlockBrakeNwSeOpen = 17151; +static constexpr uint32_t kTwisterBlockBrakeSwNeClosed = 17152; +static constexpr uint32_t kTwisterBlockBrakeNwSeClosed = 17153; + +static constexpr uint32_t kTwisterRCBlockBrakeImages[kNumOrthogonalDirections][2] = { + { kTwisterBlockBrakeSwNeOpen, kTwisterBlockBrakeSwNeClosed }, + { kTwisterBlockBrakeNwSeOpen, kTwisterBlockBrakeNwSeClosed }, + { kTwisterBlockBrakeSwNeOpen, kTwisterBlockBrakeSwNeClosed }, + { kTwisterBlockBrakeNwSeOpen, kTwisterBlockBrakeNwSeClosed }, }; -static constexpr const uint32_t TwisterRCDiagBrakeImages[kNumOrthogonalDirections] = { +static constexpr const uint32_t kTwisterRCDiagBrakeImages[kNumOrthogonalDirections] = { SPR_G2_BM_DIAG_BRAKES, SPR_G2_BM_DIAG_BRAKES + 1, SPR_G2_BM_DIAG_BRAKES, SPR_G2_BM_DIAG_BRAKES + 1, }; -static constexpr const uint32_t TwisterRCDiagBlockBrakeImages[2][kNumOrthogonalDirections] = { +static constexpr const uint32_t kTwisterRCDiagBlockBrakeImages[2][kNumOrthogonalDirections] = { { SPR_G2_BM_DIAG_BRAKES + 3, SPR_G2_BM_DIAG_BRAKES + 5, @@ -121,7 +121,7 @@ static void TwisterRCTrackStation( { bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(_TwisterRCBlockBrakeImages[direction][isClosed]), + session, direction, session.TrackColours.WithIndex(kTwisterRCBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } else @@ -10299,13 +10299,13 @@ static void TwisterRCTrackBlockBrakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(_TwisterRCBlockBrakeImages[direction][isClosed]), + session, direction, session.TrackColours.WithIndex(kTwisterRCBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(_TwisterRCBlockBrakeImages[direction][isClosed]), + session, direction, session.TrackColours.WithIndex(kTwisterRCBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } @@ -14168,8 +14168,8 @@ void TwisterRCTrackDiagBrakes( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, TwisterRCDiagBrakeImages, defaultDiagTileOffsets, defaultDiagBoundLengths, - nullptr); + session, 3, height, direction, trackSequence, kTwisterRCDiagBrakeImages, defaultDiagTileOffsets, + defaultDiagBoundLengths, nullptr); if (trackSequence == 3) { @@ -14187,7 +14187,7 @@ void TwisterRCTrackDiagBlockBrakes( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, TwisterRCDiagBlockBrakeImages[trackElement.IsBrakeClosed()], + session, 3, height, direction, trackSequence, kTwisterRCDiagBlockBrakeImages[trackElement.IsBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) diff --git a/src/openrct2/paint/track/coaster/VirginiaReel.cpp b/src/openrct2/paint/track/coaster/VirginiaReel.cpp index 30f62aadf617..d7dc1fe45808 100644 --- a/src/openrct2/paint/track/coaster/VirginiaReel.cpp +++ b/src/openrct2/paint/track/coaster/VirginiaReel.cpp @@ -75,63 +75,63 @@ enum SPR_VIRGINIA_REEL_25_DEG_UP_LIFT_HILL_SE_NW = 21503, }; -static constexpr uint32_t virginia_reel_track_pieces_flat[4] = { +static constexpr uint32_t kPiecesFlat[4] = { SPR_VIRGINIA_REEL_FLAT_SW_NE, SPR_VIRGINIA_REEL_FLAT_NW_SE, SPR_VIRGINIA_REEL_FLAT_SW_NE, SPR_VIRGINIA_REEL_FLAT_NW_SE, }; -static constexpr uint32_t virginia_reel_track_pieces_flat_lift_hill[4] = { +static constexpr uint32_t kPiecesFlatLiftHill[4] = { SPR_VIRGINIA_REEL_FLAT_LIFT_HILL_SW_NE, SPR_VIRGINIA_REEL_FLAT_LIFT_HILL_NW_SE, SPR_VIRGINIA_REEL_FLAT_LIFT_HILL_NE_SW, SPR_VIRGINIA_REEL_FLAT_LIFT_HILL_SE_NW, }; -static constexpr uint32_t virginia_reel_track_pieces_flat_to_25_deg_up[4] = { +static constexpr uint32_t kPiecesFlatTo25DegUp[4] = { SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_SW_NE, SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_NW_SE, SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_NE_SW, SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_SE_NW, }; -static constexpr uint32_t virginia_reel_track_pieces_flat_to_25_deg_up_lift_hill[4] = { +static constexpr uint32_t kPiecesFlatTo25DegUpLiftHill[4] = { SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_LIFT_HILL_SW_NE, SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_LIFT_HILL_NW_SE, SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_LIFT_HILL_NE_SW, SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_LIFT_HILL_SE_NW, }; -static constexpr uint32_t virginia_reel_track_pieces_25_deg_up_to_flat[4] = { +static constexpr uint32_t kPieces25DegUpToFlat[4] = { SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_SW_NE, SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_NW_SE, SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_NE_SW, SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_SE_NW, }; -static constexpr uint32_t virginia_reel_track_pieces_25_deg_up_to_flat_lift_hill[4] = { +static constexpr uint32_t kPieces25DegUpToFlatLiftHill[4] = { SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_LIFT_HILL_SW_NE, SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_LIFT_HILL_NW_SE, SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_LIFT_HILL_NE_SW, SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_LIFT_HILL_SE_NW, }; -static constexpr uint32_t virginia_reel_track_pieces_25_deg_up[4] = { +static constexpr uint32_t kPieces25DegUp[4] = { SPR_VIRGINIA_REEL_25_DEG_UP_SW_NE, SPR_VIRGINIA_REEL_25_DEG_UP_NW_SE, SPR_VIRGINIA_REEL_25_DEG_UP_NE_SW, SPR_VIRGINIA_REEL_25_DEG_UP_SE_NW, }; -static constexpr uint32_t virginia_reel_track_pieces_25_deg_up_lift_hill[4] = { +static constexpr uint32_t kPieces25DegUpLiftHill[4] = { SPR_VIRGINIA_REEL_25_DEG_UP_LIFT_HILL_SW_NE, SPR_VIRGINIA_REEL_25_DEG_UP_LIFT_HILL_NW_SE, SPR_VIRGINIA_REEL_25_DEG_UP_LIFT_HILL_NE_SW, SPR_VIRGINIA_REEL_25_DEG_UP_LIFT_HILL_SE_NW, }; -static constexpr uint32_t virginia_reel_track_pieces_flat_quarter_turn_3_tiles[4][3] = { +static constexpr uint32_t kPiecesFlatQuarterTurn3Tiles[4][3] = { { SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_0, SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_1, @@ -154,7 +154,7 @@ static constexpr uint32_t virginia_reel_track_pieces_flat_quarter_turn_3_tiles[4 }, }; -static constexpr uint32_t virginia_reel_track_pieces_flat_quarter_turn_1_tile[4] = { +static constexpr uint32_t kPiecesFlatQuarterTurn1Tile[4] = { SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_1_TILE_SW_NW, SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_1_TILE_NW_NE, SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_1_TILE_NE_SE, @@ -166,10 +166,10 @@ static void PaintVirginiaReelTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - const uint32_t* sprites = virginia_reel_track_pieces_flat; + const uint32_t* sprites = kPiecesFlat; if (trackElement.HasChain()) { - sprites = virginia_reel_track_pieces_flat_lift_hill; + sprites = kPiecesFlatLiftHill; } auto imageId = session.TrackColours.WithIndex(sprites[direction]); @@ -196,10 +196,10 @@ static void PaintVirginiaReelTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - const uint32_t* sprites = virginia_reel_track_pieces_25_deg_up; + const uint32_t* sprites = kPieces25DegUp; if (trackElement.HasChain()) { - sprites = virginia_reel_track_pieces_25_deg_up_lift_hill; + sprites = kPieces25DegUpLiftHill; } auto imageId = session.TrackColours.WithIndex(sprites[direction]); @@ -246,10 +246,10 @@ static void PaintVirginiaReelTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - const uint32_t* sprites = virginia_reel_track_pieces_flat_to_25_deg_up; + const uint32_t* sprites = kPiecesFlatTo25DegUp; if (trackElement.HasChain()) { - sprites = virginia_reel_track_pieces_flat_to_25_deg_up_lift_hill; + sprites = kPiecesFlatTo25DegUpLiftHill; } auto imageId = session.TrackColours.WithIndex(sprites[direction]); @@ -286,10 +286,10 @@ static void PaintVirginiaReelTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - const uint32_t* sprites = virginia_reel_track_pieces_25_deg_up_to_flat; + const uint32_t* sprites = kPieces25DegUpToFlat; if (trackElement.HasChain()) { - sprites = virginia_reel_track_pieces_25_deg_up_to_flat_lift_hill; + sprites = kPieces25DegUpToFlatLiftHill; } auto imageId = session.TrackColours.WithIndex(sprites[direction]); @@ -397,8 +397,7 @@ static void PaintVirginiaReelTrackLeftQuarterTurn3Tiles( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilLeftQuarterTurn3TilesPaint( - session, 2, height, direction, trackSequence, session.TrackColours, - virginia_reel_track_pieces_flat_quarter_turn_3_tiles); + session, 2, height, direction, trackSequence, session.TrackColours, kPiecesFlatQuarterTurn3Tiles); TrackPaintUtilLeftQuarterTurn3TilesTunnel(session, kTunnelGroup, TunnelSubType::Flat, height, direction, trackSequence); switch (trackSequence) @@ -447,7 +446,7 @@ static void PaintVirginiaReelTrackLeftQuarterTurn1Tile( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilLeftQuarterTurn1TilePaint( - session, 2, height, 0, direction, session.TrackColours, virginia_reel_track_pieces_flat_quarter_turn_1_tile); + session, 2, height, 0, direction, session.TrackColours, kPiecesFlatQuarterTurn1Tile); DrawSupportForSequenceA( session, supportType.wooden, trackSequence, direction, height, session.SupportColours); diff --git a/src/openrct2/paint/track/coaster/WoodenRollerCoaster.cpp b/src/openrct2/paint/track/coaster/WoodenRollerCoaster.cpp index 5a8de377c1cd..aae9c200a957 100644 --- a/src/openrct2/paint/track/coaster/WoodenRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/WoodenRollerCoaster.cpp @@ -844,28 +844,28 @@ enum SPR_WOODEN_RC_LEFT_EIGHTH_BANK_TO_DIAG_FRONT_HANDRAIL_3_3 = 25074, }; -static constexpr uint32_t _wooden_rc_block_brakes_image_ids[4][3] = { +static constexpr uint32_t kBlockBrakesImageIds[4][3] = { { SPR_WOODEN_RC_BLOCK_BRAKES_SW_NE_OPEN, SPR_WOODEN_RC_BLOCK_BRAKES_SW_NE_CLOSED, SPR_WOODEN_RC_BLOCK_BRAKES_RAILS_SW_NE }, { SPR_WOODEN_RC_BLOCK_BRAKES_NW_SE_OPEN, SPR_WOODEN_RC_BLOCK_BRAKES_NW_SE_CLOSED, SPR_WOODEN_RC_BLOCK_BRAKES_RAILS_NW_SE }, { SPR_WOODEN_RC_BLOCK_BRAKES_SW_NE_OPEN, SPR_WOODEN_RC_BLOCK_BRAKES_SW_NE_CLOSED, SPR_WOODEN_RC_BLOCK_BRAKES_RAILS_SW_NE }, { SPR_WOODEN_RC_BLOCK_BRAKES_NW_SE_OPEN, SPR_WOODEN_RC_BLOCK_BRAKES_NW_SE_CLOSED, SPR_WOODEN_RC_BLOCK_BRAKES_RAILS_NW_SE }, }; -static constexpr uint32_t _wooden_rc_station_block_brakes_image_ids[4][2] = { +static constexpr uint32_t kStationBlockBrakesImageIds[4][2] = { { SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_OPEN_SW_NE, SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_CLOSED_SW_NE }, { SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_OPEN_NW_SE, SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_CLOSED_NW_SE }, { SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_OPEN_SW_NE, SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_CLOSED_SW_NE }, { SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_OPEN_NW_SE, SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_CLOSED_NW_SE }, }; -static constexpr const uint32_t WoodenRCDiagBrakeImages[kNumOrthogonalDirections] = { +static constexpr const uint32_t kWoodenRCDiagBrakeImages[kNumOrthogonalDirections] = { SPR_G2_WOODEN_RC_DIAG_BRAKES, SPR_G2_WOODEN_RC_DIAG_BRAKES + 1, SPR_G2_WOODEN_RC_DIAG_BRAKES, SPR_G2_WOODEN_RC_DIAG_BRAKES + 1, }; -static constexpr const uint32_t WoodenRCDiagBlockBrakeImages[2][kNumOrthogonalDirections] = { +static constexpr const uint32_t kWoodenRCDiagBlockBrakeImages[2][kNumOrthogonalDirections] = { { SPR_G2_WOODEN_RC_DIAG_BRAKES + 3, SPR_G2_WOODEN_RC_DIAG_BRAKES + 5, @@ -2044,8 +2044,8 @@ static void WoodenRCTrackStation( auto trackType = trackElement.GetTrackType(); if (trackType == TrackElemType::EndStation) { - const auto brakeImg = trackElement.IsBrakeClosed() ? _wooden_rc_station_block_brakes_image_ids[direction][1] - : _wooden_rc_station_block_brakes_image_ids[direction][0]; + const auto brakeImg = trackElement.IsBrakeClosed() ? kStationBlockBrakesImageIds[direction][1] + : kStationBlockBrakesImageIds[direction][0]; WoodenRCTrackPaint( session, direction, brakeImg, SPR_G2_EMPTY, { 0, 2, height }, { { 0, 2, height }, { 32, 27, 2 } }); } @@ -7637,7 +7637,7 @@ static void WoodenRCTrackDiagBrakes( { // direction 3 { - WoodenRCDiagBrakeImages[3], + kWoodenRCDiagBrakeImages[3], 24916, // diagonal vertical trim image { -16, -16, 0 }, { { -16, -16, 0 }, { 32, 32, 2 } }, @@ -7650,7 +7650,7 @@ static void WoodenRCTrackDiagBrakes( { // direction 0 { - WoodenRCDiagBrakeImages[0], + kWoodenRCDiagBrakeImages[0], 24913, // diagonal horizontal trim image { -16, -16, 0 }, { { -16, -16, 0 }, { 32, 32, 2 } }, @@ -7693,7 +7693,7 @@ static void WoodenRCTrackDiagBrakes( { // direction 2 { - WoodenRCDiagBrakeImages[2], + kWoodenRCDiagBrakeImages[2], 24913, // diagonal vertical trim image { -16, -16, 0 }, { { -16, -16, 0 }, { 32, 32, 2 } }, @@ -7720,7 +7720,7 @@ static void WoodenRCTrackDiagBrakes( { // direction 1 { - WoodenRCDiagBrakeImages[1], + kWoodenRCDiagBrakeImages[1], 24916, // diagonal vertical trim image { -16, -16, 0 }, { { -16, -16, 0 }, { 32, 32, 2 } }, @@ -7743,10 +7743,10 @@ static void WoodenRCTrackDiagBrakes( WoodenRCTrackPaintBb(session, &imageIds[trackSequence][direction][0], height); WoodenRCTrackPaintBb(session, &imageIds[trackSequence][direction][0], height); - if (WoodenRCDiagonalSupports[trackSequence][direction] != WoodenSupportSubType::Null) + if (kWoodenRCDiagonalSupports[trackSequence][direction] != WoodenSupportSubType::Null) { WoodenASupportsPaintSetup( - session, supportType.wooden, WoodenRCDiagonalSupports[trackSequence][direction], height, session.SupportColours); + session, supportType.wooden, kWoodenRCDiagonalSupports[trackSequence][direction], height, session.SupportColours); } int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; @@ -7781,7 +7781,7 @@ static void WoodenRCTrackDiagBlockBrakes( { // direction 3 { - WoodenRCDiagBlockBrakeImages[0][3], + kWoodenRCDiagBlockBrakeImages[0][3], 24916, // diagonal vertical trim image { -16, -16, 0 }, // todo: rotate these bboxes BoundBoxXYZ({ -16, -16, 0 }, { 32, 32, 2 }), @@ -7794,7 +7794,7 @@ static void WoodenRCTrackDiagBlockBrakes( { // direction 0 { - WoodenRCDiagBlockBrakeImages[0][0], + kWoodenRCDiagBlockBrakeImages[0][0], 24913, // diagonal horizontal trim image { -16, -16, 0 }, BoundBoxXYZ({ -16, -16, 0 }, { 32, 32, 2 }), @@ -7837,7 +7837,7 @@ static void WoodenRCTrackDiagBlockBrakes( { // direction 2 { - WoodenRCDiagBlockBrakeImages[0][2], + kWoodenRCDiagBlockBrakeImages[0][2], 24913, // diagonal vertical trim image { -16, -16, 0 }, BoundBoxXYZ({ -16, -16, 0 }, { 32, 32, 2 }), @@ -7865,7 +7865,7 @@ static void WoodenRCTrackDiagBlockBrakes( { // direction 1 { - WoodenRCDiagBlockBrakeImages[0][1], + kWoodenRCDiagBlockBrakeImages[0][1], 24916, // diagonal vertical trim image { -16, -16, 0 }, BoundBoxXYZ({ -16, -16, 0 }, { 32, 32, 2 }), @@ -7905,7 +7905,7 @@ static void WoodenRCTrackDiagBlockBrakes( { // direction 3 { - WoodenRCDiagBlockBrakeImages[1][3], + kWoodenRCDiagBlockBrakeImages[1][3], 24916, // diagonal vertical trim image { -16, -16, 0 }, BoundBoxXYZ({ -16, -16, 0 }, { 32, 32, 2 }), @@ -7918,7 +7918,7 @@ static void WoodenRCTrackDiagBlockBrakes( { // direction 0 { - WoodenRCDiagBlockBrakeImages[1][0], + kWoodenRCDiagBlockBrakeImages[1][0], 24913, // diagonal horizontal trim image { -16, -16, 0 }, BoundBoxXYZ({ -16, -16, 0 }, { 32, 32, 2 }), @@ -7961,7 +7961,7 @@ static void WoodenRCTrackDiagBlockBrakes( { // direction 2 { - WoodenRCDiagBlockBrakeImages[1][2], + kWoodenRCDiagBlockBrakeImages[1][2], 24913, // diagonal vertical trim image { -16, -16, 0 }, BoundBoxXYZ({ -16, -16, 0 }, { 32, 32, 2 }), @@ -7989,7 +7989,7 @@ static void WoodenRCTrackDiagBlockBrakes( { // direction 1 { - WoodenRCDiagBlockBrakeImages[1][1], + kWoodenRCDiagBlockBrakeImages[1][1], 24916, // diagonal vertical trim image { -16, -16, 0 }, BoundBoxXYZ({ -16, -16, 0 }, { 32, 32, 2 }), @@ -8013,10 +8013,10 @@ static void WoodenRCTrackDiagBlockBrakes( WoodenRCTrackPaintBb(session, &imageIds[trackElement.IsBrakeClosed()][trackSequence][direction][0], height); WoodenRCTrackPaintBb(session, &imageIds[trackElement.IsBrakeClosed()][trackSequence][direction][0], height); - if (WoodenRCDiagonalSupports[trackSequence][direction] != WoodenSupportSubType::Null) + if (kWoodenRCDiagonalSupports[trackSequence][direction] != WoodenSupportSubType::Null) { WoodenASupportsPaintSetup( - session, supportType.wooden, WoodenRCDiagonalSupports[trackSequence][direction], height, session.SupportColours); + session, supportType.wooden, kWoodenRCDiagonalSupports[trackSequence][direction], height, session.SupportColours); } int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; @@ -10143,10 +10143,10 @@ static void WoodenRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - const auto brakeImg = trackElement.IsBrakeClosed() ? _wooden_rc_block_brakes_image_ids[direction][1] - : _wooden_rc_block_brakes_image_ids[direction][0]; + const auto brakeImg = trackElement.IsBrakeClosed() ? kBlockBrakesImageIds[direction][1] + : kBlockBrakesImageIds[direction][0]; WoodenRCTrackPaint( - session, direction, brakeImg, _wooden_rc_block_brakes_image_ids[direction][2], { 0, 2, height }, + session, direction, brakeImg, kBlockBrakesImageIds[direction][2], { 0, 2, height }, { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetupRotated( session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); diff --git a/src/openrct2/paint/track/coaster/WoodenRollerCoaster.hpp b/src/openrct2/paint/track/coaster/WoodenRollerCoaster.hpp index 4df92567a4a8..e5e83f357a36 100644 --- a/src/openrct2/paint/track/coaster/WoodenRollerCoaster.hpp +++ b/src/openrct2/paint/track/coaster/WoodenRollerCoaster.hpp @@ -40,7 +40,7 @@ struct SpriteBoundBox2 }; // Magic number 4 refers to the number of track blocks in a diagonal track element -static constexpr const WoodenSupportSubType WoodenRCDiagonalSupports[4][kNumOrthogonalDirections] = { +static constexpr const WoodenSupportSubType kWoodenRCDiagonalSupports[4][kNumOrthogonalDirections] = { { WoodenSupportSubType::Null, WoodenSupportSubType::Null, WoodenSupportSubType::Null, WoodenSupportSubType::Null }, // sequence 0 { WoodenSupportSubType::Corner0, WoodenSupportSubType::Corner1, WoodenSupportSubType::Corner2, diff --git a/src/openrct2/paint/track/gentle/CarRide.cpp b/src/openrct2/paint/track/gentle/CarRide.cpp index 88a0e04b7484..7d6a4b4b9166 100644 --- a/src/openrct2/paint/track/gentle/CarRide.cpp +++ b/src/openrct2/paint/track/gentle/CarRide.cpp @@ -75,70 +75,70 @@ enum SprCarRideQuarterTurn3TilesSeNePart2 = 28820, }; -static constexpr uint32_t CarRideTrackPiecesFlat[4] = { +static constexpr uint32_t kPiecesFlat[4] = { SprCarRideFlatSwNe, SprCarRideFlatNwSe, SprCarRideFlatSwNe, SprCarRideFlatNwSe, }; -static constexpr uint32_t CarRideTrackPiecesLogBumps[4] = { +static constexpr uint32_t kPiecesLogBumps[4] = { SprCarRideLogBumpsSwNe, SprCarRideLogBumpsNwSe, SprCarRideLogBumpsSwNe, SprCarRideLogBumpsNwSe, }; -static constexpr uint32_t CarRideTrackPieces25DegUp[4] = { +static constexpr uint32_t kPieces25DegUp[4] = { SprCarRide25DegUpSwNe, SprCarRide25DegUpNwSe, SprCarRide25DegUpNeSw, SprCarRide25DegUpSeNw, }; -static constexpr uint32_t CarRideTrackPiecesFlatTo25DegUp[4] = { +static constexpr uint32_t kPiecesFlatTo25DegUp[4] = { SprCarRideFlatTo25DegUpSwNe, SprCarRideFlatTo25DegUpNwSe, SprCarRideFlatTo25DegUpNeSw, SprCarRideFlatTo25DegUpSeNw, }; -static constexpr uint32_t CarRideTrackPieces25DegUpToFlat[4] = { +static constexpr uint32_t kPieces25DegUpToFlat[4] = { SprCarRideDegUpToFlatSwNe, SprCarRideDegUpToFlatNwSe, SprCarRideDegUpToFlatNeSw, SprCarRideDegUpToFlatSeNw, }; -static constexpr uint32_t CarRideTrackPieces60DegUp[4] = { +static constexpr uint32_t kPieces60DegUp[4] = { SprCarRide60DegUpSwNe, SprCarRide60DegUpNwSe, SprCarRide60DegUpNeSw, SprCarRide60DegUpSeNw, }; -static constexpr uint32_t CarRideTrackPieces25DegUpTo60DegUp[4][2] = { +static constexpr uint32_t kPieces25DegUpTo60DegUp[4][2] = { { SprCarRide25DegUpTo60DegUpSwNe, 0 }, { SprCarRide25DegUpTo60DegUpNwSe, SprCarRide25DegUpTo60DegUpFrontNwSe }, { SprCarRide25DegUpTo60DegUpNeSw, SprCarRide25DegUpTo60DegUpFrontNeSw }, { SprCarRide25DegUpTo60DegUpSeNw, 0 }, }; -static constexpr uint32_t CarRideTrackPieces60DegUpTo25DegUp[4][2] = { +static constexpr uint32_t kPieces60DegUpTo25DegUp[4][2] = { { SprCarRide60DegUpTo25DegUpSwNe, 0 }, { SprCarRide60DegUpTo25DegUpNwSe, SprCarRide60DegUpTo25DegUpFrontNwSe }, { SprCarRide60DegUpTo25DegUpNeSw, SprCarRide60DegUpTo25DegUpFrontNeSw }, { SprCarRide60DegUpTo25DegUpSeNw, 0 }, }; -static constexpr uint32_t CarRideTrackPiecesLeftQuarterTurn1Tile[4] = { +static constexpr uint32_t kPiecesLeftQuarterTurn1Tile[4] = { SprCarRideQuarterTurn1TileSwNw, SprCarRideQuarterTurn1TileNwNe, SprCarRideQuarterTurn1TileNeSe, SprCarRideQuarterTurn1TileSeSw, }; -static constexpr uint32_t CarRideTrackPiecesQuarterTurn3Tiles[4][3] = { +static constexpr uint32_t kPiecesQuarterTurn3Tiles[4][3] = { { SprCarRideQuarterTurn3TilesSwSePart0, SprCarRideQuarterTurn3TilesSwSePart1, @@ -166,7 +166,7 @@ static void PaintCarRideTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(CarRideTrackPiecesFlat[direction]); + auto imageId = session.TrackColours.WithIndex(kPiecesFlat[direction]); if (direction == 0 || direction == 2) { @@ -200,7 +200,7 @@ static void PaintCarRideTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(CarRideTrackPieces25DegUp[direction]); + auto imageId = session.TrackColours.WithIndex(kPieces25DegUp[direction]); if (direction == 0 || direction == 2) { @@ -241,7 +241,7 @@ static void PaintCarRideTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(CarRideTrackPiecesFlatTo25DegUp[direction]); + auto imageId = session.TrackColours.WithIndex(kPiecesFlatTo25DegUp[direction]); if (direction == 0 || direction == 2) { @@ -282,7 +282,7 @@ static void PaintCarRideTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(CarRideTrackPieces25DegUpToFlat[direction]); + auto imageId = session.TrackColours.WithIndex(kPieces25DegUpToFlat[direction]); if (direction == 0 || direction == 2) { @@ -360,7 +360,7 @@ static void PaintCarRideStation( PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 2, 0, height }, { 28, 32, 1 } }); } - imageId = session.TrackColours.WithIndex(CarRideTrackPiecesFlat[direction]); + imageId = session.TrackColours.WithIndex(kPiecesFlat[direction]); if (direction == 0 || direction == 2) { PaintAddImageAsChild(session, imageId, { 0, 6, height }, { { 0, 0, height }, { 32, 20, 1 } }); @@ -386,7 +386,7 @@ static void PaintCarRideTrackRightQuarterTurn3Tiles( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilRightQuarterTurn3TilesPaint( - session, 3, height, direction, trackSequence, session.TrackColours, CarRideTrackPiecesQuarterTurn3Tiles, + session, 3, height, direction, trackSequence, session.TrackColours, kPiecesQuarterTurn3Tiles, defaultRightQuarterTurn3TilesOffsets, defaultRightQuarterTurn3TilesBoundLengths, nullptr); TrackPaintUtilRightQuarterTurn3TilesTunnel(session, kTunnelGroup, TunnelSubType::Flat, height, direction, trackSequence); @@ -434,7 +434,7 @@ static void PaintCarRideTrackLeftQuarterTurn1Tile( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(CarRideTrackPiecesLeftQuarterTurn1Tile[direction]); + auto imageId = session.TrackColours.WithIndex(kPiecesLeftQuarterTurn1Tile[direction]); CoordsXYZ offset; switch (direction) @@ -477,7 +477,7 @@ static void PaintCarRideTrackSpinningTunnel( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(CarRideTrackPiecesFlat[direction]); + auto imageId = session.TrackColours.WithIndex(kPiecesFlat[direction]); if (direction == 0 || direction == 2) { @@ -512,7 +512,7 @@ static void PaintCarRideTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(CarRideTrackPieces60DegUp[direction]); + auto imageId = session.TrackColours.WithIndex(kPieces60DegUp[direction]); switch (direction) { @@ -564,7 +564,7 @@ static void PaintCarRideTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(CarRideTrackPieces25DegUpTo60DegUp[direction][0]); + auto imageId = session.TrackColours.WithIndex(kPieces25DegUpTo60DegUp[direction][0]); if (direction == 0 || direction == 2) { @@ -575,9 +575,9 @@ static void PaintCarRideTrack25DegUpTo60DegUp( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); } - if (CarRideTrackPieces25DegUpTo60DegUp[direction][1] != 0) + if (kPieces25DegUpTo60DegUp[direction][1] != 0) { - imageId = session.TrackColours.WithIndex(CarRideTrackPieces25DegUpTo60DegUp[direction][1]); + imageId = session.TrackColours.WithIndex(kPieces25DegUpTo60DegUp[direction][1]); if (direction == 0 || direction == 2) { @@ -623,7 +623,7 @@ static void PaintCarRideTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(CarRideTrackPieces60DegUpTo25DegUp[direction][0]); + auto imageId = session.TrackColours.WithIndex(kPieces60DegUpTo25DegUp[direction][0]); if (direction == 0 || direction == 2) { @@ -634,9 +634,9 @@ static void PaintCarRideTrack60DegUpTo25DegUp( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); } - if (CarRideTrackPieces60DegUpTo25DegUp[direction][1] != 0) + if (kPieces60DegUpTo25DegUp[direction][1] != 0) { - imageId = session.TrackColours.WithIndex(CarRideTrackPieces60DegUpTo25DegUp[direction][1]); + imageId = session.TrackColours.WithIndex(kPieces60DegUpTo25DegUp[direction][1]); if (direction == 0 || direction == 2) { @@ -706,7 +706,7 @@ static void PaintCarRideTrackLogBumps( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(CarRideTrackPiecesLogBumps[direction]); + auto imageId = session.TrackColours.WithIndex(kPiecesLogBumps[direction]); if (direction == 0 || direction == 2) { diff --git a/src/openrct2/paint/track/gentle/CrookedHouse.cpp b/src/openrct2/paint/track/gentle/CrookedHouse.cpp index 9872cca4126f..7573d2e0a849 100644 --- a/src/openrct2/paint/track/gentle/CrookedHouse.cpp +++ b/src/openrct2/paint/track/gentle/CrookedHouse.cpp @@ -24,7 +24,7 @@ using namespace OpenRCT2; -static constexpr BoundBoxXY CrookedHouseData[] = { +static constexpr BoundBoxXY kCrookedHouseData[] = { { { 6, 0 }, { 42, 24 }, @@ -77,7 +77,7 @@ static void PaintCrookedHouseStructure( } } - const auto& boundBox = CrookedHouseData[segment]; + const auto& boundBox = kCrookedHouseData[segment]; auto imageIndex = rideEntry->Cars[0].base_image_id + direction; PaintAddImageAsParent( session, stationColour.WithIndex(imageIndex), { x_offset, y_offset, height + 3 }, diff --git a/src/openrct2/paint/track/gentle/Dodgems.cpp b/src/openrct2/paint/track/gentle/Dodgems.cpp index 037301a68d9a..370957b480ae 100644 --- a/src/openrct2/paint/track/gentle/Dodgems.cpp +++ b/src/openrct2/paint/track/gentle/Dodgems.cpp @@ -30,7 +30,7 @@ enum SprDodgemsFenceTopLeft = 21937 }; -static constexpr uint32_t DodgemsFenceSprites[] = { +static constexpr uint32_t kDodgemsFenceSprites[] = { SprDodgemsFenceTopRight, SprDodgemsFenceBottomRight, SprDodgemsFenceBottomLeft, @@ -66,7 +66,7 @@ static void PaintDodgems( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 1, 1, height }, { 30, 30, 1 } }); TrackPaintUtilPaintFences( - session, edges, session.MapPosition, trackElement, ride, session.SupportColours, height, DodgemsFenceSprites, + session, edges, session.MapPosition, trackElement, ride, session.SupportColours, height, kDodgemsFenceSprites, session.CurrentRotation); switch (direction) diff --git a/src/openrct2/paint/track/gentle/FerrisWheel.cpp b/src/openrct2/paint/track/gentle/FerrisWheel.cpp index b6badab1843e..5c9f7e0c7dba 100644 --- a/src/openrct2/paint/track/gentle/FerrisWheel.cpp +++ b/src/openrct2/paint/track/gentle/FerrisWheel.cpp @@ -23,14 +23,14 @@ using namespace OpenRCT2; -static constexpr uint8_t Edges1X4NeSw[] = { +static constexpr uint8_t kEdges1X4NeSw[] = { EDGE_NW | EDGE_SE, EDGE_NW | EDGE_SE | EDGE_NE, EDGE_NW | EDGE_SE, EDGE_NW | EDGE_SE | EDGE_SW, }; -static constexpr uint8_t Edges1X4NwSe[] = { +static constexpr uint8_t kEdges1X4NwSe[] = { EDGE_NE | EDGE_SW, EDGE_NE | EDGE_SW | EDGE_NW, EDGE_NE | EDGE_SW, @@ -38,7 +38,7 @@ static constexpr uint8_t Edges1X4NwSe[] = { }; /** rct2: 0x008A8CA8 */ -static constexpr BoundBoxXY FerrisWheelData[] = { +static constexpr BoundBoxXY kFerrisWheelData[] = { { { 1, 8 }, { 31, 16 } }, { { 8, 1 }, { 16, 31 } }, { { 1, 8 }, { 31, 16 } }, @@ -76,7 +76,7 @@ static void PaintFerrisWheelStructure( session.CurrentlyDrawnEntity = vehicle; } - auto boundBox = FerrisWheelData[direction]; + auto boundBox = kFerrisWheelData[direction]; CoordsXYZ offset((direction & 1) ? 0 : axisOffset, (direction & 1) ? axisOffset : 0, height + 7); BoundBoxXYZ bb = { { boundBox.offset, height + 7 }, { boundBox.length, 127 } }; @@ -113,11 +113,11 @@ static void PaintFerrisWheel( int32_t edges; if (direction & 1) { - edges = Edges1X4NwSe[relativeTrackSequence]; + edges = kEdges1X4NwSe[relativeTrackSequence]; } else { - edges = Edges1X4NeSw[relativeTrackSequence]; + edges = kEdges1X4NeSw[relativeTrackSequence]; } auto stationColour = GetStationColourScheme(session, trackElement); diff --git a/src/openrct2/paint/track/gentle/GhostTrain.cpp b/src/openrct2/paint/track/gentle/GhostTrain.cpp index 7e138d5a5990..7f094d2c9f50 100644 --- a/src/openrct2/paint/track/gentle/GhostTrain.cpp +++ b/src/openrct2/paint/track/gentle/GhostTrain.cpp @@ -81,42 +81,42 @@ enum SprGhostTrainTrackBrakesNwSe = 28882 }; -static constexpr uint32_t GhostTrainTrackPiecesFlat[4] = { +static constexpr uint32_t kGhostTrainTrackPiecesFlat[4] = { SprGhostTrainTrackFlatSwNe, SprGhostTrainTrackFlatNwSe, SprGhostTrainTrackFlatSwNe, SprGhostTrainTrackFlatNwSe, }; -static constexpr uint32_t GhostTrainTrackPiecesFlatTo25DegUp[4][2] = { +static constexpr uint32_t kGhostTrainTrackPiecesFlatTo25DegUp[4][2] = { { SprGhostTrainTrackFlatTo25DegUpSwNe, SprGhostTrainTrackFlatTo25DegUpFrontSwNe }, { SprGhostTrainTrackFlatTo25DegUpNwSe, SprGhostTrainTrackFlatTo25DegUpFrontNwSe }, { SprGhostTrainTrackFlatTo25DegUpNeSw, SprGhostTrainTrackFlatTo25DegUpFrontNeSw }, { SprGhostTrainTrackFlatTo25DegUpSeNw, SprGhostTrainTrackFlatTo25DegUpFrontSeNw }, }; -static constexpr uint32_t GhostTrainTrackPieces25DegUpToFlat[4][2] = { +static constexpr uint32_t kGhostTrainTrackPieces25DegUpToFlat[4][2] = { { SprGhostTrainTrack25DegUpToFlatSwNe, SprGhostTrainTrack25DegUpToFlatFrontSwNe }, { SprGhostTrainTrack25DegUpToFlatNwSe, SprGhostTrainTrack25DegUpToFlatFrontNwSe }, { SprGhostTrainTrack25DegUpToFlatNeSw, SprGhostTrainTrack25DegUpToFlatFrontNeSw }, { SprGhostTrainTrack25DegUpToFlatSeNw, SprGhostTrainTrack25DegUpToFlatFrontSeNw }, }; -static constexpr uint32_t GhostTrainTrackPieces25DegUp[4][2] = { +static constexpr uint32_t kGhostTrainTrackPieces25DegUp[4][2] = { { SprGhostTrainTrack25DegUpSwNe, SprGhostTrainTrack25DegUpFrontSwNe }, { SprGhostTrainTrack25DegUpNwSe, SprGhostTrainTrack25DegUpFrontNwSe }, { SprGhostTrainTrack25DegUpNeSw, SprGhostTrainTrack25DegUpFrontNeSw }, { SprGhostTrainTrack25DegUpSeNw, SprGhostTrainTrack25DegUpFrontSeNw }, }; -static constexpr uint32_t GhostTrainTrackPiecesQuarterTurn1Tile[4] = { +static constexpr uint32_t kGhostTrainTrackPiecesQuarterTurn1Tile[4] = { SprGhostTrainQuarterTurn1TileSwNw, SprGhostTrainQuarterTurn1TileNwNe, SprGhostTrainQuarterTurn1TileNeSe, SprGhostTrainQuarterTurn1TileSeSw, }; -static constexpr uint32_t GhostTrainTrackPiecesQuarterTurn3Tiles[4][3] = { +static constexpr uint32_t kGhostTrainTrackPiecesQuarterTurn3Tiles[4][3] = { { SprGhostTrainQuarterTurn3TilesSwSePart0, SprGhostTrainQuarterTurn3TilesSwSePart1, @@ -139,21 +139,21 @@ static constexpr uint32_t GhostTrainTrackPiecesQuarterTurn3Tiles[4][3] = { }, }; -static constexpr uint32_t ghost_train_track_pieces_spinning_tunnel_track[4] = { +static constexpr uint32_t kGhostTrainTrackPiecesSpinningTunnelTrack[4] = { SprGhostTrainSpinningTunnelTrackSwNe, SprGhostTrainSpinningTunnelTrackNwSe, SprGhostTrainSpinningTunnelTrackSwNe, SprGhostTrainSpinningTunnelTrackNwSe, }; -static constexpr uint32_t GhostTrainTrackPiecesBrakes[4] = { +static constexpr uint32_t kGhostTrainTrackPiecesBrakes[4] = { SprGhostTrainTrackBrakesSwNe, SprGhostTrainTrackBrakesNwSe, SprGhostTrainTrackBrakesSwNe, SprGhostTrainTrackBrakesNwSe, }; -static constexpr TunnelType DoorOpeningOutwardsToImage[] = { +static constexpr TunnelType kDoorOpeningOutwardsToImage[] = { TunnelType::Doors2, // Closed TunnelType::Doors2, // Unused? TunnelType::Doors3, // Half open @@ -163,7 +163,7 @@ static constexpr TunnelType DoorOpeningOutwardsToImage[] = { TunnelType::Doors2, // Unused? }; -static constexpr TunnelType DoorOpeningInwardsToImage[] = { +static constexpr TunnelType kDoorOpeningInwardsToImage[] = { TunnelType::Doors2, // Closed TunnelType::Doors2, // Unused? TunnelType::Doors5, // Half open @@ -178,13 +178,13 @@ static TunnelType GetTunnelDoorsImageStraightFlat(const TrackElement& trackEleme switch (direction) { case 0: - return DoorOpeningInwardsToImage[trackElement.GetDoorAState()]; + return kDoorOpeningInwardsToImage[trackElement.GetDoorAState()]; case 1: - return DoorOpeningOutwardsToImage[trackElement.GetDoorBState()]; + return kDoorOpeningOutwardsToImage[trackElement.GetDoorBState()]; case 2: - return DoorOpeningOutwardsToImage[trackElement.GetDoorBState()]; + return kDoorOpeningOutwardsToImage[trackElement.GetDoorBState()]; case 3: - return DoorOpeningInwardsToImage[trackElement.GetDoorAState()]; + return kDoorOpeningInwardsToImage[trackElement.GetDoorAState()]; } return TunnelType::Doors2; } @@ -194,7 +194,7 @@ static void PaintGhostTrainTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(GhostTrainTrackPiecesFlat[direction]); + auto imageId = session.TrackColours.WithIndex(kGhostTrainTrackPiecesFlat[direction]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); @@ -219,10 +219,10 @@ static void PaintGhostTrainTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(GhostTrainTrackPieces25DegUp[direction][0]); + auto imageId = session.TrackColours.WithIndex(kGhostTrainTrackPieces25DegUp[direction][0]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - imageId = session.TrackColours.WithIndex(GhostTrainTrackPieces25DegUp[direction][1]); + imageId = session.TrackColours.WithIndex(kGhostTrainTrackPieces25DegUp[direction][1]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 23 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -263,17 +263,17 @@ static void PaintGhostTrainTrackFlatTo25DegUp( TunnelType doorImage; if (!isBackwards) { - doorImage = DoorOpeningInwardsToImage[trackElement.GetDoorAState()]; + doorImage = kDoorOpeningInwardsToImage[trackElement.GetDoorAState()]; } else { - doorImage = DoorOpeningOutwardsToImage[trackElement.GetDoorBState()]; + doorImage = kDoorOpeningOutwardsToImage[trackElement.GetDoorBState()]; } - auto imageId = session.TrackColours.WithIndex(GhostTrainTrackPiecesFlatTo25DegUp[direction][0]); + auto imageId = session.TrackColours.WithIndex(kGhostTrainTrackPiecesFlatTo25DegUp[direction][0]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - imageId = session.TrackColours.WithIndex(GhostTrainTrackPiecesFlatTo25DegUp[direction][1]); + imageId = session.TrackColours.WithIndex(kGhostTrainTrackPiecesFlatTo25DegUp[direction][1]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 15 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -309,10 +309,10 @@ static void PaintGhostTrainTrack25DegUpToFlatShared( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(GhostTrainTrackPieces25DegUpToFlat[direction][0]); + auto imageId = session.TrackColours.WithIndex(kGhostTrainTrackPieces25DegUpToFlat[direction][0]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - imageId = session.TrackColours.WithIndex(GhostTrainTrackPieces25DegUpToFlat[direction][1]); + imageId = session.TrackColours.WithIndex(kGhostTrainTrackPieces25DegUpToFlat[direction][1]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 15 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -341,10 +341,10 @@ static void PaintGhostTrainTrack25DegUpToFlat( PaintUtilPushTunnelLeft(session, height - 8, kTunnelGroupIncline, TunnelSubType::Flat); break; case 1: - PaintUtilPushTunnelRight(session, height + 8, DoorOpeningOutwardsToImage[trackElement.GetDoorBState()]); + PaintUtilPushTunnelRight(session, height + 8, kDoorOpeningOutwardsToImage[trackElement.GetDoorBState()]); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, DoorOpeningOutwardsToImage[trackElement.GetDoorBState()]); + PaintUtilPushTunnelLeft(session, height + 8, kDoorOpeningOutwardsToImage[trackElement.GetDoorBState()]); break; case 3: PaintUtilPushTunnelRight(session, height - 8, kTunnelGroupIncline, TunnelSubType::Flat); @@ -374,10 +374,10 @@ static void PaintGhostTrainTrackFlatTo25DegDown( PaintUtilPushTunnelLeft(session, height - 8, kTunnelGroupIncline, TunnelSubType::Flat); break; case 1: - PaintUtilPushTunnelRight(session, height + 8, DoorOpeningInwardsToImage[trackElement.GetDoorAState()]); + PaintUtilPushTunnelRight(session, height + 8, kDoorOpeningInwardsToImage[trackElement.GetDoorAState()]); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, DoorOpeningInwardsToImage[trackElement.GetDoorAState()]); + PaintUtilPushTunnelLeft(session, height + 8, kDoorOpeningInwardsToImage[trackElement.GetDoorAState()]); break; case 3: PaintUtilPushTunnelRight(session, height - 8, kTunnelGroupIncline, TunnelSubType::Flat); @@ -410,7 +410,7 @@ static void PaintGhostTrainStation( imageId = GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 3 } }); - imageId = session.TrackColours.WithIndex(GhostTrainTrackPiecesFlat[direction]); + imageId = session.TrackColours.WithIndex(kGhostTrainTrackPiecesFlat[direction]); PaintAddImageAsChildRotated(session, direction, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 20, 3 } }); TrackPaintUtilDrawStationTunnel(session, direction, height); @@ -429,12 +429,12 @@ static void PaintGhostTrainTrackRightQuarterTurn3Tiles( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilRightQuarterTurn3TilesPaint( - session, 3, height, direction, trackSequence, session.TrackColours, GhostTrainTrackPiecesQuarterTurn3Tiles, nullptr, + session, 3, height, direction, trackSequence, session.TrackColours, kGhostTrainTrackPiecesQuarterTurn3Tiles, nullptr, defaultRightQuarterTurn3TilesBoundLengths, defaultRightQuarterTurn3TilesBoundOffsets); bool isBackwards = trackElement.GetTrackType() == TrackElemType::LeftQuarterTurn3Tiles; bool isDoorA = (!isBackwards && trackSequence == 0) || (isBackwards && trackSequence == 3); - auto tunnelType = isDoorA ? DoorOpeningInwardsToImage[trackElement.GetDoorAState()] - : DoorOpeningOutwardsToImage[trackElement.GetDoorBState()]; + auto tunnelType = isDoorA ? kDoorOpeningInwardsToImage[trackElement.GetDoorAState()] + : kDoorOpeningOutwardsToImage[trackElement.GetDoorBState()]; TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, tunnelType); switch (trackSequence) @@ -485,17 +485,17 @@ static void PaintGhostTrainTrackLeftQuarterTurn1Tile( TunnelType tunnelStartImage, tunnelEndImage; if (!isBackwards) { - tunnelStartImage = DoorOpeningInwardsToImage[trackElement.GetDoorAState()]; - tunnelEndImage = DoorOpeningOutwardsToImage[trackElement.GetDoorBState()]; + tunnelStartImage = kDoorOpeningInwardsToImage[trackElement.GetDoorAState()]; + tunnelEndImage = kDoorOpeningOutwardsToImage[trackElement.GetDoorBState()]; } else { - tunnelStartImage = DoorOpeningOutwardsToImage[trackElement.GetDoorBState()]; - tunnelEndImage = DoorOpeningInwardsToImage[trackElement.GetDoorAState()]; + tunnelStartImage = kDoorOpeningOutwardsToImage[trackElement.GetDoorBState()]; + tunnelEndImage = kDoorOpeningInwardsToImage[trackElement.GetDoorAState()]; } TrackPaintUtilLeftQuarterTurn1TilePaint( - session, 3, height, 0, direction, session.TrackColours, GhostTrainTrackPiecesQuarterTurn1Tile); + session, 3, height, 0, direction, session.TrackColours, kGhostTrainTrackPiecesQuarterTurn1Tile); TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, 0, tunnelStartImage, 0, tunnelEndImage); MetalASupportsPaintSetup(session, supportType.metal, MetalSupportPlace::Centre, 0, height, session.SupportColours); @@ -517,7 +517,7 @@ static void PaintGhostTrainTrackSpinningTunnel( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(ghost_train_track_pieces_spinning_tunnel_track[direction]); + auto imageId = session.TrackColours.WithIndex(kGhostTrainTrackPiecesSpinningTunnelTrack[direction]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 2, 6, height }, { 28, 20, 3 } }); @@ -539,7 +539,7 @@ static void PaintGhostTrainTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(GhostTrainTrackPiecesBrakes[direction]); + auto imageId = session.TrackColours.WithIndex(kGhostTrainTrackPiecesBrakes[direction]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); diff --git a/src/openrct2/paint/track/gentle/HauntedHouse.cpp b/src/openrct2/paint/track/gentle/HauntedHouse.cpp index 063c962b8efb..f15bfb1c8b0e 100644 --- a/src/openrct2/paint/track/gentle/HauntedHouse.cpp +++ b/src/openrct2/paint/track/gentle/HauntedHouse.cpp @@ -23,7 +23,7 @@ using namespace OpenRCT2; -static constexpr BoundBoxXY HauntedHouseData[] = { +static constexpr BoundBoxXY kHauntedHouseData[] = { { { 6, 0 }, { 42, 24 } }, { { 0, 0 }, { 0, 0 } }, { { -16, -16 }, { 32, 32 } }, { { 0, 0 }, { 0, 0 } }, { { 0, 6 }, { 24, 42 } }, { { 0, 0 }, { 0, 0 } }, }; @@ -46,7 +46,7 @@ static void PaintHauntedHouseStructure( frameNum = vehicle->Pitch; } - const auto& boundBox = HauntedHouseData[part]; + const auto& boundBox = kHauntedHouseData[part]; auto baseImageIndex = rideEntry->Cars[0].base_image_id; auto imageIndex = baseImageIndex + direction; diff --git a/src/openrct2/paint/track/gentle/MerryGoRound.cpp b/src/openrct2/paint/track/gentle/MerryGoRound.cpp index ec7325da1610..ea7849d85a88 100644 --- a/src/openrct2/paint/track/gentle/MerryGoRound.cpp +++ b/src/openrct2/paint/track/gentle/MerryGoRound.cpp @@ -21,11 +21,11 @@ using namespace OpenRCT2; -static constexpr uint32_t MerryGoRoundRiderOffsets[] = { +static constexpr uint32_t kMerryGoRoundRiderOffsets[] = { 0, 32, 64, 96, 16, 48, 80, 112, }; -static constexpr uint16_t MerryGoRoundBreakdownVibration[] = { +static constexpr uint16_t kMerryGoRoundBreakdownVibration[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 0, }; @@ -43,7 +43,7 @@ static void PaintRiders( if (vehicle.num_peeps <= peep) break; - auto imageOffset = (MerryGoRoundRiderOffsets[peep / 2] + rotationOffset) % 128; + auto imageOffset = (kMerryGoRoundRiderOffsets[peep / 2] + rotationOffset) % 128; imageOffset -= 13; if (imageOffset >= 68) continue; @@ -73,7 +73,7 @@ static void PaintCarousel( if (ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN) && ride.breakdown_reason_pending == BREAKDOWN_CONTROL_FAILURE && ride.breakdown_sound_modifier >= 128) { - height += MerryGoRoundBreakdownVibration[(vehicle->current_time >> 1) & 7]; + height += kMerryGoRoundBreakdownVibration[(vehicle->current_time >> 1) & 7]; } } diff --git a/src/openrct2/paint/track/gentle/MiniGolf.cpp b/src/openrct2/paint/track/gentle/MiniGolf.cpp index 4198b69dabac..9bc947211633 100644 --- a/src/openrct2/paint/track/gentle/MiniGolf.cpp +++ b/src/openrct2/paint/track/gentle/MiniGolf.cpp @@ -192,7 +192,7 @@ enum SprMiniGolfHoleETrimPart3SwNw = 14556, }; -static constexpr uint32_t MiniGolfTrackSprites25DegUp[][3] = { +static constexpr uint32_t kMiniGolfTrackSprites25DegUp[][3] = { { SprMiniGolf25DegUpSwNe, SprMiniGolf25DegUpFenceBackSwNe, @@ -215,7 +215,7 @@ static constexpr uint32_t MiniGolfTrackSprites25DegUp[][3] = { }, }; -static constexpr uint32_t MiniGolfTrackSpritesFlatTo25DegUp[][3] = { +static constexpr uint32_t kMiniGolfTrackSpritesFlatTo25DegUp[][3] = { { SprMiniGolfFlatTo25DegUpSwNe, SprMiniGolfFlatTo25DegUpFenceBackSwNe, @@ -238,7 +238,7 @@ static constexpr uint32_t MiniGolfTrackSpritesFlatTo25DegUp[][3] = { }, }; -static constexpr uint32_t MiniGolfTrackSprites25DegUpToFlat[][3] = { +static constexpr uint32_t kMiniGolfTrackSprites25DegUpToFlat[][3] = { { SprMiniGolf25DegUpToFlatSwNe, SprMiniGolf25DegUpToFlatFenceBackSwNe, @@ -261,21 +261,21 @@ static constexpr uint32_t MiniGolfTrackSprites25DegUpToFlat[][3] = { }, }; -static constexpr uint32_t MiniGolfTrackSpritesQuarterTurn1Tile[] = { +static constexpr uint32_t kMiniGolfTrackSpritesQuarterTurn1Tile[] = { SprMiniGolfQuarterTurn1TileSwNw, SprMiniGolfQuarterTurn1TileNwNe, SprMiniGolfQuarterTurn1TileNeSe, SprMiniGolfQuarterTurn1TileSeSw, }; -static constexpr uint32_t MiniGolfTrackSpritesQuarterTurn1TileFenceFront[] = { +static constexpr uint32_t kMiniGolfTrackSpritesQuarterTurn1TileFenceFront[] = { SprMiniGolfQuarterTurn1TileFenceFrontSwNw, SprMiniGolfQuarterTurn1TileFenceFrontNwNe, SprMiniGolfQuarterTurn1TileFenceFrontNeSe, SprMiniGolfQuarterTurn1TileFenceFrontSeSw, }; -static constexpr uint32_t MiniGolfTrackSpritesHoleA[4][2][2] = { +static constexpr uint32_t kMiniGolfTrackSpritesHoleA[4][2][2] = { { { SprMiniGolfHoleABasePart1SwNe, SprMiniGolfHoleATrimPart1SwNe }, { SprMiniGolfHoleABasePart2SwNe, SprMiniGolfHoleATrimPart2SwNe }, @@ -294,7 +294,7 @@ static constexpr uint32_t MiniGolfTrackSpritesHoleA[4][2][2] = { }, }; -static constexpr uint32_t MiniGolfTrackSpritesHoleB[4][2][2] = { +static constexpr uint32_t kMiniGolfTrackSpritesHoleB[4][2][2] = { { { SprMiniGolfHoleBBasePart1SwNe, SprMiniGolfHoleBTrimPart1SwNe }, { SprMiniGolfHoleBBasePart2SwNe, SprMiniGolfHoleBTrimPart2SwNe }, @@ -313,7 +313,7 @@ static constexpr uint32_t MiniGolfTrackSpritesHoleB[4][2][2] = { }, }; -static constexpr uint32_t MiniGolfTrackSpritesHoleC[][2][2] = { +static constexpr uint32_t kMiniGolfTrackSpritesHoleC[][2][2] = { { { SprMiniGolfHoleCBasePart1SwNe, SprMiniGolfHoleCTrimPart1SwNe }, { SprMiniGolfHoleCBasePart2SwNe, SprMiniGolfHoleCTrimPart2SwNe }, @@ -332,7 +332,7 @@ static constexpr uint32_t MiniGolfTrackSpritesHoleC[][2][2] = { }, }; -static constexpr uint32_t MiniGolfTrackSpritesHoleD[][3][2] = { +static constexpr uint32_t kMiniGolfTrackSpritesHoleD[][3][2] = { { { SprMiniGolfHoleDBasePart1SwSe, SprMiniGolfHoleDTrimPart1SwSe }, { SprMiniGolfHoleDBasePart2SwSe, SprMiniGolfHoleDTrimPart2SwSe }, @@ -355,7 +355,7 @@ static constexpr uint32_t MiniGolfTrackSpritesHoleD[][3][2] = { }, }; -static constexpr uint32_t MiniGolfTrackSpritesHoleE[][3][2] = { +static constexpr uint32_t kMiniGolfTrackSpritesHoleE[][3][2] = { { { SprMiniGolfHoleEBasePart1SwNw, SprMiniGolfHoleETrimPart1SwNw }, { SprMiniGolfHoleEBasePart2SwNw, SprMiniGolfHoleETrimPart2SwNw }, @@ -457,7 +457,7 @@ static void PaintMiniGolfTrack25DegUp( { ImageId imageId; - imageId = session.TrackColours.WithIndex(MiniGolfTrackSprites25DegUp[direction][0]); + imageId = session.TrackColours.WithIndex(kMiniGolfTrackSprites25DegUp[direction][0]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 1 }); MetalASupportsPaintSetup(session, supportType.metal, MetalSupportPlace::Centre, 8, height, session.SupportColours); @@ -467,10 +467,10 @@ static void PaintMiniGolfTrack25DegUp( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - imageId = GetStationColourScheme(session, trackElement).WithIndex(MiniGolfTrackSprites25DegUp[direction][1]); + imageId = GetStationColourScheme(session, trackElement).WithIndex(kMiniGolfTrackSprites25DegUp[direction][1]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 10, height + 2 }, { 32, 1, 15 } }); - imageId = GetStationColourScheme(session, trackElement).WithIndex(MiniGolfTrackSprites25DegUp[direction][2]); + imageId = GetStationColourScheme(session, trackElement).WithIndex(kMiniGolfTrackSprites25DegUp[direction][2]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 22, height + 2 }, { 32, 1, 15 } }); switch (direction) @@ -499,7 +499,7 @@ static void PaintMiniGolfTrackFlatTo25DegUp( { ImageId imageId; - imageId = session.TrackColours.WithIndex(MiniGolfTrackSpritesFlatTo25DegUp[direction][0]); + imageId = session.TrackColours.WithIndex(kMiniGolfTrackSpritesFlatTo25DegUp[direction][0]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); MetalASupportsPaintSetup(session, supportType.metal, MetalSupportPlace::Centre, 0, height, session.SupportColours); @@ -509,10 +509,10 @@ static void PaintMiniGolfTrackFlatTo25DegUp( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - imageId = GetStationColourScheme(session, trackElement).WithIndex(MiniGolfTrackSpritesFlatTo25DegUp[direction][1]); + imageId = GetStationColourScheme(session, trackElement).WithIndex(kMiniGolfTrackSpritesFlatTo25DegUp[direction][1]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 10, height + 2 }, { 32, 1, 11 } }); - imageId = GetStationColourScheme(session, trackElement).WithIndex(MiniGolfTrackSpritesFlatTo25DegUp[direction][2]); + imageId = GetStationColourScheme(session, trackElement).WithIndex(kMiniGolfTrackSpritesFlatTo25DegUp[direction][2]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 22, height + 2 }, { 32, 1, 11 } }); switch (direction) @@ -541,7 +541,7 @@ static void PaintMiniGolfTrack25DegUpToFlat( { ImageId imageId; - imageId = session.TrackColours.WithIndex(MiniGolfTrackSprites25DegUpToFlat[direction][0]); + imageId = session.TrackColours.WithIndex(kMiniGolfTrackSprites25DegUpToFlat[direction][0]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); MetalASupportsPaintSetup(session, supportType.metal, MetalSupportPlace::Centre, 8, height, session.SupportColours); @@ -551,10 +551,10 @@ static void PaintMiniGolfTrack25DegUpToFlat( EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), 0xFFFF, 0); - imageId = GetStationColourScheme(session, trackElement).WithIndex(MiniGolfTrackSprites25DegUpToFlat[direction][1]); + imageId = GetStationColourScheme(session, trackElement).WithIndex(kMiniGolfTrackSprites25DegUpToFlat[direction][1]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 10, height + 2 }, { 32, 1, 11 } }); - imageId = GetStationColourScheme(session, trackElement).WithIndex(MiniGolfTrackSprites25DegUpToFlat[direction][2]); + imageId = GetStationColourScheme(session, trackElement).WithIndex(kMiniGolfTrackSprites25DegUpToFlat[direction][2]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 22, height + 2 }, { 32, 1, 11 } }); switch (direction) @@ -669,7 +669,7 @@ static void PaintMiniGolfTrackLeftQuarterTurn1Tile( ImageId imageId; TrackPaintUtilLeftQuarterTurn1TilePaint( - session, 1, height, 0, direction, session.TrackColours, MiniGolfTrackSpritesQuarterTurn1Tile); + session, 1, height, 0, direction, session.TrackColours, kMiniGolfTrackSpritesQuarterTurn1Tile); MetalASupportsPaintSetup(session, supportType.metal, MetalSupportPlace::Centre, 0, height, session.SupportColours); @@ -728,7 +728,7 @@ static void PaintMiniGolfTrackLeftQuarterTurn1Tile( // TODO: The back fence uses the same x/y offsets, but uses another paint function. See if this occurs more often. TrackPaintUtilLeftQuarterTurn1TilePaint( session, 0, height, 24, direction, GetStationColourScheme(session, trackElement), - MiniGolfTrackSpritesQuarterTurn1TileFenceFront); + kMiniGolfTrackSpritesQuarterTurn1TileFenceFront); switch (direction) { @@ -815,7 +815,7 @@ static void PaintMiniGolfHoleA( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - PaintMiniGolfHoleAb(session, trackSequence, direction, height, MiniGolfTrackSpritesHoleA); + PaintMiniGolfHoleAb(session, trackSequence, direction, height, kMiniGolfTrackSpritesHoleA); } /** rct2: 0x0087F1DC */ @@ -823,7 +823,7 @@ static void PaintMiniGolfHoleB( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - PaintMiniGolfHoleAb(session, trackSequence, direction, height, MiniGolfTrackSpritesHoleB); + PaintMiniGolfHoleAb(session, trackSequence, direction, height, kMiniGolfTrackSpritesHoleB); } /** rct2: 0x0087F1EC */ @@ -860,7 +860,7 @@ static void PaintMiniGolfHoleC( boundBoxOffset = { 0, 3 }; } - imageId = session.TrackColours.WithIndex(MiniGolfTrackSpritesHoleC[direction][trackSequence][1]); + imageId = session.TrackColours.WithIndex(kMiniGolfTrackSpritesHoleC[direction][trackSequence][1]); switch ((direction << 4) | trackSequence) { @@ -885,12 +885,12 @@ static void PaintMiniGolfHoleC( imageId = session.SupportColours.WithIndex(((direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS)); PaintAddImageAsParent(session, imageId, { 0, 0, height }, bb); - imageId = session.TrackColours.WithIndex(MiniGolfTrackSpritesHoleC[direction][trackSequence][0]); + imageId = session.TrackColours.WithIndex(kMiniGolfTrackSpritesHoleC[direction][trackSequence][0]); PaintAddImageAsChild(session, imageId, { 0, 0, height }, bb); } else { - imageId = session.TrackColours.WithIndex(MiniGolfTrackSpritesHoleC[direction][trackSequence][0]); + imageId = session.TrackColours.WithIndex(kMiniGolfTrackSpritesHoleC[direction][trackSequence][0]); PaintAddImageAsParent(session, imageId, { 0, 0, height }, bb); } } @@ -936,7 +936,7 @@ static void PaintMiniGolfHoleD( boundBoxOffset = { 0, 3 }; } - imageId = session.TrackColours.WithIndex(MiniGolfTrackSpritesHoleD[direction][trackSequence][1]); + imageId = session.TrackColours.WithIndex(kMiniGolfTrackSpritesHoleD[direction][trackSequence][1]); switch ((direction << 4) | trackSequence) { @@ -979,12 +979,12 @@ static void PaintMiniGolfHoleD( ((supportSubType == WoodenSupportSubType::NeSw) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS)); PaintAddImageAsParent(session, imageId, offset, bb); - imageId = session.TrackColours.WithIndex(MiniGolfTrackSpritesHoleD[direction][trackSequence][0]); + imageId = session.TrackColours.WithIndex(kMiniGolfTrackSpritesHoleD[direction][trackSequence][0]); PaintAddImageAsChild(session, imageId, offset, bb); } else { - imageId = session.TrackColours.WithIndex(MiniGolfTrackSpritesHoleD[direction][trackSequence][0]); + imageId = session.TrackColours.WithIndex(kMiniGolfTrackSpritesHoleD[direction][trackSequence][0]); PaintAddImageAsParent(session, imageId, offset, bb); } } @@ -1030,7 +1030,7 @@ static void PaintMiniGolfHoleE( boundBoxOffset = { 0, 3 }; } - imageId = session.TrackColours.WithIndex(MiniGolfTrackSpritesHoleE[direction][trackSequence][1]); + imageId = session.TrackColours.WithIndex(kMiniGolfTrackSpritesHoleE[direction][trackSequence][1]); switch ((direction << 4) | trackSequence) { @@ -1073,12 +1073,12 @@ static void PaintMiniGolfHoleE( ((supportSubType == WoodenSupportSubType::NwSe) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS)); PaintAddImageAsParent(session, imageId, offset, bb); - imageId = session.TrackColours.WithIndex(MiniGolfTrackSpritesHoleE[direction][trackSequence][0]); + imageId = session.TrackColours.WithIndex(kMiniGolfTrackSpritesHoleE[direction][trackSequence][0]); PaintAddImageAsChild(session, imageId, offset, bb); } else { - imageId = session.TrackColours.WithIndex(MiniGolfTrackSpritesHoleE[direction][trackSequence][0]); + imageId = session.TrackColours.WithIndex(kMiniGolfTrackSpritesHoleE[direction][trackSequence][0]); PaintAddImageAsParent(session, imageId, offset, bb); } } diff --git a/src/openrct2/paint/track/gentle/MiniHelicopters.cpp b/src/openrct2/paint/track/gentle/MiniHelicopters.cpp index d305a746f27c..26f06794844e 100644 --- a/src/openrct2/paint/track/gentle/MiniHelicopters.cpp +++ b/src/openrct2/paint/track/gentle/MiniHelicopters.cpp @@ -297,7 +297,7 @@ static void PaintMiniHelicoptersTrackLeftQuarterTurn3Tiles( PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } -static constexpr uint8_t MiniHelicoptersRightQuarterTurn3TilesToLeftTurnMap[] = { +static constexpr uint8_t kMiniHelicoptersRightQuarterTurn3TilesToLeftTurnMap[] = { 3, 1, 2, @@ -309,7 +309,7 @@ static void PaintMiniHelicoptersTrackRightQuarterTurn3Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - trackSequence = MiniHelicoptersRightQuarterTurn3TilesToLeftTurnMap[trackSequence]; + trackSequence = kMiniHelicoptersRightQuarterTurn3TilesToLeftTurnMap[trackSequence]; PaintMiniHelicoptersTrackLeftQuarterTurn3Tiles( session, ride, trackSequence, (direction + 3) % 4, height, trackElement, supportType); } diff --git a/src/openrct2/paint/track/gentle/MonorailCycles.cpp b/src/openrct2/paint/track/gentle/MonorailCycles.cpp index 4ea945c49243..f15568d01f26 100644 --- a/src/openrct2/paint/track/gentle/MonorailCycles.cpp +++ b/src/openrct2/paint/track/gentle/MonorailCycles.cpp @@ -75,12 +75,12 @@ enum SprMonorailCyclesSBendRightNwSePart3 = 16869, }; -static constexpr uint32_t MonorailCyclesTrackPiecesFlat[2] = { +static constexpr uint32_t kMonorailCyclesTrackPiecesFlat[2] = { SprMonorailCyclesFlatSwNe, SprMonorailCyclesFlatNwSe, }; -static constexpr uint32_t MonorailCyclesTrackPiecesFlatQuarterTurn5Tiles[4][5] = { +static constexpr uint32_t kMonorailCyclesTrackPiecesFlatQuarterTurn5Tiles[4][5] = { { SprMonorailCyclesFlatQuarterTurn5TilesSwSePart0, SprMonorailCyclesFlatQuarterTurn5TilesSwSePart1, @@ -111,7 +111,7 @@ static constexpr uint32_t MonorailCyclesTrackPiecesFlatQuarterTurn5Tiles[4][5] = }, }; -static constexpr uint32_t MonorailCyclesTrackPiecesSBendLeft[2][4] = { +static constexpr uint32_t kMonorailCyclesTrackPiecesSBendLeft[2][4] = { { SprMonorailCyclesSBendLeftSwNePart0, SprMonorailCyclesSBendLeftSwNePart1, @@ -126,7 +126,7 @@ static constexpr uint32_t MonorailCyclesTrackPiecesSBendLeft[2][4] = { }, }; -static constexpr uint32_t MonorailCyclesTrackPiecesSBendRight[2][4] = { +static constexpr uint32_t kMonorailCyclesTrackPiecesSBendRight[2][4] = { { SprMonorailCyclesSBendRightSwNePart0, SprMonorailCyclesSBendRightSwNePart1, @@ -141,7 +141,7 @@ static constexpr uint32_t MonorailCyclesTrackPiecesSBendRight[2][4] = { }, }; -static constexpr uint32_t MonorailCyclesTrackPiecesFlatQuarterTurn3Tiles[4][3] = { +static constexpr uint32_t kMonorailCyclesTrackPiecesFlatQuarterTurn3Tiles[4][3] = { { SprMonorailCyclesFlatQuarterTurn3TilesSwSePart0, SprMonorailCyclesFlatQuarterTurn3TilesSwSePart1, @@ -169,7 +169,7 @@ static void PaintMonorailCyclesTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(MonorailCyclesTrackPiecesFlat[(direction & 1)]); + auto imageId = session.TrackColours.WithIndex(kMonorailCyclesTrackPiecesFlat[(direction & 1)]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); if (direction & 1) @@ -231,7 +231,7 @@ static void PaintMonorailCyclesTrackLeftQuarterTurn3Tiles( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilLeftQuarterTurn3TilesPaint( - session, 3, height, direction, trackSequence, session.TrackColours, MonorailCyclesTrackPiecesFlatQuarterTurn3Tiles); + session, 3, height, direction, trackSequence, session.TrackColours, kMonorailCyclesTrackPiecesFlatQuarterTurn3Tiles); TrackPaintUtilLeftQuarterTurn3TilesTunnel(session, kTunnelGroup, TunnelSubType::Flat, height, direction, trackSequence); switch (trackSequence) @@ -290,14 +290,14 @@ static void PaintMonorailCyclesTrackRightQuarterTurn3Tiles( session, ride, trackSequence, (direction + 3) % 4, height, trackElement, supportType); } -static constexpr int8_t MonorailCyclesTrackRightQuarterTurn5TilesSupportHeightOffset[][7] = { +static constexpr int8_t kMonorailCyclesTrackRightQuarterTurn5TilesSupportHeightOffset[][7] = { { -2, 0, -2, 0, 0, -3, -1 }, { -3, 0, 0, 0, 0, 0, 0 }, { 0 }, { 0, 0, 0, 0, 0, -2, -3 }, }; -static constexpr int8_t MonorailCyclesTrackRightQuarterTurn5TilesSupportSpecial[][7] = { +static constexpr int8_t kMonorailCyclesTrackRightQuarterTurn5TilesSupportSpecial[][7] = { { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 1 }, { 0, 0, 1, 0, 0, 1, 1 }, @@ -310,11 +310,11 @@ static void PaintMonorailCyclesTrackRightQuarterTurn5Tiles( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilRightQuarterTurn5TilesPaint( - session, 1, height, direction, trackSequence, session.TrackColours, MonorailCyclesTrackPiecesFlatQuarterTurn5Tiles, + session, 1, height, direction, trackSequence, session.TrackColours, kMonorailCyclesTrackPiecesFlatQuarterTurn5Tiles, nullptr, kDefaultRightQuarterTurn5TilesBoundLengths, kDefaultRightQuarterTurn5TilesBoundOffsets); - int32_t supportHeight = height + MonorailCyclesTrackRightQuarterTurn5TilesSupportHeightOffset[direction][trackSequence]; - int32_t supportSpecial = MonorailCyclesTrackRightQuarterTurn5TilesSupportSpecial[direction][trackSequence]; + int32_t supportHeight = height + kMonorailCyclesTrackRightQuarterTurn5TilesSupportHeightOffset[direction][trackSequence]; + int32_t supportSpecial = kMonorailCyclesTrackRightQuarterTurn5TilesSupportSpecial[direction][trackSequence]; switch (trackSequence) { case 0: @@ -436,7 +436,7 @@ static void PaintMonorailCyclesTrackSBendLeft( trackSequence = 3 - trackSequence; } - auto imageId = session.TrackColours.WithIndex(MonorailCyclesTrackPiecesSBendLeft[direction & 1][trackSequence]); + auto imageId = session.TrackColours.WithIndex(kMonorailCyclesTrackPiecesSBendLeft[direction & 1][trackSequence]); switch (trackSequence) { case 0: @@ -527,7 +527,7 @@ static void PaintMonorailCyclesTrackSBendRight( trackSequence = 3 - trackSequence; } - auto imageId = session.TrackColours.WithIndex(MonorailCyclesTrackPiecesSBendRight[direction & 1][trackSequence]); + auto imageId = session.TrackColours.WithIndex(kMonorailCyclesTrackPiecesSBendRight[direction & 1][trackSequence]); switch (trackSequence) { case 0: diff --git a/src/openrct2/paint/track/gentle/SpaceRings.cpp b/src/openrct2/paint/track/gentle/SpaceRings.cpp index ccdd4983b2e4..6a2c2d5088fe 100644 --- a/src/openrct2/paint/track/gentle/SpaceRings.cpp +++ b/src/openrct2/paint/track/gentle/SpaceRings.cpp @@ -30,7 +30,7 @@ enum SprSpaceRingsFenceNw = 22149, }; -static constexpr uint32_t SpaceRingsFenceSprites[] = { +static constexpr uint32_t kSpaceRingsFenceSprites[] = { SprSpaceRingsFenceNe, SprSpaceRingsFenceSe, SprSpaceRingsFenceSw, @@ -123,7 +123,7 @@ static void PaintSpaceRings( break; default: TrackPaintUtilPaintFences( - session, edges, position, trackElement, ride, stationColour, height, SpaceRingsFenceSprites, + session, edges, position, trackElement, ride, stationColour, height, kSpaceRingsFenceSprites, session.CurrentRotation); break; } diff --git a/src/openrct2/paint/track/thrill/MagicCarpet.cpp b/src/openrct2/paint/track/thrill/MagicCarpet.cpp index 87bdd8ae2608..ac8d78bf83ca 100644 --- a/src/openrct2/paint/track/thrill/MagicCarpet.cpp +++ b/src/openrct2/paint/track/thrill/MagicCarpet.cpp @@ -41,16 +41,16 @@ enum SPR_MAGIC_CARPET_PENDULUM_SW = 22102, }; -static constexpr int16_t MagicCarpetOscillationZ[] = { +static constexpr int16_t kMagicCarpetOscillationZ[] = { -2, -1, 1, 5, 10, 16, 23, 30, 37, 45, 52, 59, 65, 70, 74, 76, 77, 76, 74, 70, 65, 59, 52, 45, 37, 30, 23, 16, 10, 5, 1, -1, }; -static constexpr int8_t MagicCarpetOscillationXY[] = { +static constexpr int8_t kMagicCarpetOscillationXY[] = { 0, 6, 12, 18, 23, 27, 30, 31, 32, 31, 30, 27, 23, 18, 12, 6, 0, -5, -11, -17, -22, -26, -29, -30, -31, -30, -29, -26, -22, -17, -11, -5, }; -static constexpr BoundBoxXY MagicCarpetBounds[] = { +static constexpr BoundBoxXY kMagicCarpetBounds[] = { { { 0, 8 }, { 32, 16 } }, { { 8, 0 }, { 16, 32 } }, { { 0, 8 }, { 32, 16 } }, @@ -150,7 +150,7 @@ static void PaintMagicCarpetVehicle( if (rideEntry == nullptr) return; - auto directionalOffset = MagicCarpetOscillationXY[swing]; + auto directionalOffset = kMagicCarpetOscillationXY[swing]; switch (direction) { case 0: @@ -166,7 +166,7 @@ static void PaintMagicCarpetVehicle( offset.y -= directionalOffset; break; } - offset.z += MagicCarpetOscillationZ[swing]; + offset.z += kMagicCarpetOscillationZ[swing]; // Vehicle auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); @@ -201,7 +201,7 @@ static void PaintMagicCarpetStructure( (direction & 1) ? axisOffset : 0, height + 7, }; - BoundBoxXYZ bb = { { MagicCarpetBounds[direction].offset, height + 7 }, { MagicCarpetBounds[direction].length, 127 } }; + BoundBoxXYZ bb = { { kMagicCarpetBounds[direction].offset, height + 7 }, { kMagicCarpetBounds[direction].length, 127 } }; PaintMagicCarpetFrame(session, Plane::Back, direction, offset, bb); PaintMagicCarpetPendulum(session, Plane::Back, swing, direction, offset, bb); diff --git a/src/openrct2/paint/track/thrill/SwingingInverterShip.cpp b/src/openrct2/paint/track/thrill/SwingingInverterShip.cpp index 4c3663357ecc..4f696b6d438d 100644 --- a/src/openrct2/paint/track/thrill/SwingingInverterShip.cpp +++ b/src/openrct2/paint/track/thrill/SwingingInverterShip.cpp @@ -24,7 +24,7 @@ using namespace OpenRCT2; /** rct2: 0x01428010 */ -static constexpr uint32_t SwingingInverterShipBaseSpriteOffset[] = { +static constexpr uint32_t kSwingingInverterShipBaseSpriteOffset[] = { 0, 16, 0, @@ -32,7 +32,7 @@ static constexpr uint32_t SwingingInverterShipBaseSpriteOffset[] = { }; /** rct2: 0x01428020 */ -static constexpr uint32_t SwingingInverterShipAnimatingBaseSpriteOffset[] = { +static constexpr uint32_t kSwingingInverterShipAnimatingBaseSpriteOffset[] = { 32, 33, 32, @@ -40,7 +40,7 @@ static constexpr uint32_t SwingingInverterShipAnimatingBaseSpriteOffset[] = { }; /** rct2: 0x01428020 */ -static constexpr BoundBoxXY SwingingInverterShipBounds[] = { +static constexpr BoundBoxXY kSwingingInverterShipBounds[] = { { { 0, 8 }, { 32, 16 } }, { { 8, 0 }, { 16, 32 } }, { { 0, 8 }, { 32, 16 } }, @@ -55,7 +55,7 @@ enum SPR_SWINGING_INVERTER_SHIP_FRAME_3 = 22001, }; -static constexpr uint32_t SwingingInverterShipFrameSprites[] = { +static constexpr uint32_t kSwingingInverterShipFrameSprites[] = { SPR_SWINGING_INVERTER_SHIP_FRAME_0, SPR_SWINGING_INVERTER_SHIP_FRAME_1, SPR_SWINGING_INVERTER_SHIP_FRAME_2, @@ -69,7 +69,7 @@ static void PaintSwingingInverterShipStructure( if (rideEntry == nullptr) return; - const auto& boundBox = SwingingInverterShipBounds[direction]; + const auto& boundBox = kSwingingInverterShipBounds[direction]; CoordsXYZ offset((direction & 1) ? 0 : axisOffset, (direction & 1) ? axisOffset : 0, height); BoundBoxXYZ bb = { { boundBox.offset, height }, { boundBox.length, 127 } }; @@ -84,13 +84,13 @@ static void PaintSwingingInverterShipStructure( } } - ImageIndex vehicleImageIndex = rideEntry->Cars[0].base_image_id + SwingingInverterShipBaseSpriteOffset[direction]; + ImageIndex vehicleImageIndex = rideEntry->Cars[0].base_image_id + kSwingingInverterShipBaseSpriteOffset[direction]; if (vehicle != nullptr) { int32_t rotation = static_cast(vehicle->Pitch); if (rotation != 0) { - vehicleImageIndex = rideEntry->Cars[0].base_image_id + SwingingInverterShipAnimatingBaseSpriteOffset[direction]; + vehicleImageIndex = rideEntry->Cars[0].base_image_id + kSwingingInverterShipAnimatingBaseSpriteOffset[direction]; if (direction & 2) { rotation = -rotation; @@ -110,7 +110,7 @@ static void PaintSwingingInverterShipStructure( } auto frameImageTemplate = session.TrackColours; auto vehicleImageId = vehicleImageTemplate.WithIndex(vehicleImageIndex); - auto frameImageId = frameImageTemplate.WithIndex(SwingingInverterShipFrameSprites[direction]); + auto frameImageId = frameImageTemplate.WithIndex(kSwingingInverterShipFrameSprites[direction]); if (direction & 2) { diff --git a/src/openrct2/paint/track/thrill/SwingingShip.cpp b/src/openrct2/paint/track/thrill/SwingingShip.cpp index 6ec48242053b..c80968a3255f 100644 --- a/src/openrct2/paint/track/thrill/SwingingShip.cpp +++ b/src/openrct2/paint/track/thrill/SwingingShip.cpp @@ -24,14 +24,14 @@ using namespace OpenRCT2; // 1 2 0 3 4 -static constexpr uint8_t track_map_1x5[][5] = { +static constexpr uint8_t kTrackMap1x5[][5] = { { 0, 1, 2, 3, 4 }, { 0, 4, 3, 2, 1 }, { 0, 4, 3, 2, 1 }, { 0, 1, 2, 3, 4 }, }; /** rct2: 0x008A83B0 */ -static constexpr uint32_t SwingingShipBaseSpriteOffset[] = { +static constexpr uint32_t kSwingingShipBaseSpriteOffset[] = { 0, 9, 0, @@ -39,7 +39,7 @@ static constexpr uint32_t SwingingShipBaseSpriteOffset[] = { }; /** rct2: 0x008A83C0 */ -static constexpr BoundBoxXY SwingingShipData[] = { +static constexpr BoundBoxXY kSwingingShipData[] = { { { 1, 8 }, { 31, 16 } }, { { 8, 1 }, { 16, 31 } }, { { 1, 8 }, { 31, 16 } }, @@ -54,7 +54,7 @@ enum SPR_SWINGING_SHIP_FRAME_FRONT_NW_SE = 21997, }; -static constexpr uint32_t SwingingShipFrameSprites[][2] = { +static constexpr uint32_t kSwingingShipFrameSprites[][2] = { { SPR_SWINGING_SHIP_FRAME_SW_NE, SPR_SWINGING_SHIP_FRAME_FRONT_SW_NE }, { SPR_SWINGING_SHIP_FRAME_NW_SE, SPR_SWINGING_SHIP_FRAME_FRONT_NW_SE }, }; @@ -102,11 +102,11 @@ static void PaintSwingingShipStructure( session.CurrentlyDrawnEntity = vehicle; } - const auto& bounds = SwingingShipData[direction]; + const auto& bounds = kSwingingShipData[direction]; CoordsXYZ offset((direction & 1) ? 0 : axisOffset, (direction & 1) ? axisOffset : 0, height + 7); BoundBoxXYZ bb = { { bounds.offset, height + 7 }, { bounds.length, 80 } }; - auto baseImageId = rideEntry->Cars[0].base_image_id + SwingingShipBaseSpriteOffset[direction]; + auto baseImageId = rideEntry->Cars[0].base_image_id + kSwingingShipBaseSpriteOffset[direction]; if (vehicle != nullptr) { int32_t rotation = static_cast(vehicle->Pitch); @@ -133,7 +133,7 @@ static void PaintSwingingShipStructure( } // Supports (back) - auto imageId = supportsImageTemplate.WithIndex(SwingingShipFrameSprites[(direction & 1)][0]); + auto imageId = supportsImageTemplate.WithIndex(kSwingingShipFrameSprites[(direction & 1)][0]); PaintAddImageAsParent(session, imageId, offset, bb); // Ship @@ -146,7 +146,7 @@ static void PaintSwingingShipStructure( } // Supports (front) - imageId = supportsImageTemplate.WithIndex(SwingingShipFrameSprites[(direction & 1)][1]); + imageId = supportsImageTemplate.WithIndex(kSwingingShipFrameSprites[(direction & 1)][1]); PaintAddImageAsChild(session, imageId, offset, bb); session.CurrentlyDrawnEntity = nullptr; @@ -157,7 +157,7 @@ static void PaintSwingingShip( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - uint8_t relativeTrackSequence = track_map_1x5[direction][trackSequence]; + uint8_t relativeTrackSequence = kTrackMap1x5[direction][trackSequence]; ImageId imageId; bool hasFence; diff --git a/src/openrct2/paint/track/transport/Chairlift.cpp b/src/openrct2/paint/track/transport/Chairlift.cpp index d4cb51c19077..641d32a3bc2f 100644 --- a/src/openrct2/paint/track/transport/Chairlift.cpp +++ b/src/openrct2/paint/track/transport/Chairlift.cpp @@ -91,9 +91,9 @@ static void ChairliftPaintUtilDrawSupports(PaintSession& session, int32_t segmen { bool success = false; - for (uint8_t s = 0; s < std::size(segment_offsets); s++) + for (uint8_t s = 0; s < std::size(kSegmentOffsets); s++) { - if (!(segments & segment_offsets[s])) + if (!(segments & kSegmentOffsets[s])) { continue; } @@ -111,9 +111,9 @@ static void ChairliftPaintUtilDrawSupports(PaintSession& session, int32_t segmen } SupportHeight* supportSegments = session.SupportSegments; - for (uint8_t s = 0; s < std::size(segment_offsets); s++) + for (uint8_t s = 0; s < std::size(kSegmentOffsets); s++) { - if (!(segments & segment_offsets[s])) + if (!(segments & kSegmentOffsets[s])) { continue; } diff --git a/src/openrct2/paint/track/transport/Lift.cpp b/src/openrct2/paint/track/transport/Lift.cpp index 9b4c8e328b21..aa3ae26034a3 100644 --- a/src/openrct2/paint/track/transport/Lift.cpp +++ b/src/openrct2/paint/track/transport/Lift.cpp @@ -32,7 +32,7 @@ enum SPR_LIFT_CAGE_NW_FRONT = 15003, }; -static constexpr uint32_t lift_cage_sprites[][2] = { +static constexpr uint32_t kLiftCageSprites[][2] = { { SPR_LIFT_CAGE_BACK, SPR_LIFT_CAGE_FRONT }, { SPR_LIFT_CAGE_NE_BACK, SPR_LIFT_CAGE_NE_FRONT }, { SPR_LIFT_CAGE_SE_BACK, SPR_LIFT_CAGE_SE_FRONT }, { SPR_LIFT_CAGE_SW_BACK, SPR_LIFT_CAGE_SW_FRONT }, { SPR_LIFT_CAGE_NW_BACK, SPR_LIFT_CAGE_NW_FRONT }, @@ -42,10 +42,10 @@ static void PaintLiftCage(PaintSession& session, int8_t index, ImageId colourFla { ImageId imageId; - imageId = colourFlags.WithIndex(lift_cage_sprites[1 + index][0]); + imageId = colourFlags.WithIndex(kLiftCageSprites[1 + index][0]); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 2, 2, height }, { 2, 2, 30 } }); - imageId = colourFlags.WithIndex(lift_cage_sprites[1 + index][1]); + imageId = colourFlags.WithIndex(kLiftCageSprites[1 + index][1]); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 28, 28, height }, { 2, 2, 30 } }); } diff --git a/src/openrct2/paint/track/transport/MiniatureRailway.cpp b/src/openrct2/paint/track/transport/MiniatureRailway.cpp index 62d853cbe33f..cf4d7167bd6e 100644 --- a/src/openrct2/paint/track/transport/MiniatureRailway.cpp +++ b/src/openrct2/paint/track/transport/MiniatureRailway.cpp @@ -1614,7 +1614,7 @@ static void PaintMiniatureRailwayTrackLeftEighthToDiag( PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } -static constexpr uint32_t miniature_railway_floor_track_pieces_right_eight_to_diag[4][5] = { +static constexpr uint32_t kFloorPiecesRightEighthToDiag[4][5] = { { SPR_FLOOR_PLANKS_90_DEG, SPR_FLOOR_PLANKS_90_DEG, @@ -1645,7 +1645,7 @@ static constexpr uint32_t miniature_railway_floor_track_pieces_right_eight_to_di }, }; -static constexpr CoordsXYZ miniature_railway_track_floor_pieces_right_eight_to_diag_bounds[4][5] = { +static constexpr CoordsXYZ kFloorPiecesRightEighthToDiagBounds[4][5] = { { { 32, 32, 2 }, { 32, 16, 2 }, @@ -1676,7 +1676,7 @@ static constexpr CoordsXYZ miniature_railway_track_floor_pieces_right_eight_to_d }, }; -static constexpr CoordsXY miniature_railway_track_floor_pieces_right_eight_to_diag_offset[4][5] = { +static constexpr CoordsXY kFloorPiecesRightEighthToDiagOffset[4][5] = { { { 0, 0 }, { 0, 16 }, @@ -1752,10 +1752,9 @@ static void PaintMiniatureRailwayTrackRightEighthToDiag( } else { - imageId = session.SupportColours.WithIndex( - miniature_railway_floor_track_pieces_right_eight_to_diag[direction][trackSequence]); - CoordsXY offset = miniature_railway_track_floor_pieces_right_eight_to_diag_offset[direction][trackSequence]; - CoordsXYZ bounds = miniature_railway_track_floor_pieces_right_eight_to_diag_bounds[direction][trackSequence]; + imageId = session.SupportColours.WithIndex(kFloorPiecesRightEighthToDiag[direction][trackSequence]); + CoordsXY offset = kFloorPiecesRightEighthToDiagOffset[direction][trackSequence]; + CoordsXYZ bounds = kFloorPiecesRightEighthToDiagBounds[direction][trackSequence]; PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { offset, height }, bounds }); int8_t index = paint_miniature_railway_eighth_to_diag_index[trackSequence]; @@ -1801,7 +1800,7 @@ static void PaintMiniatureRailwayTrackRightEighthToOrthogonal( session, ride, trackSequence, (direction + 3) % 4, height, trackElement, supportType); } -static constexpr WoodenSupportSubType _diagSupportTypes[kNumOrthogonalDirections][4] = { +static constexpr WoodenSupportSubType kDiagSupportTypes[kNumOrthogonalDirections][4] = { { WoodenSupportSubType::Null, WoodenSupportSubType::Corner0, WoodenSupportSubType::Corner2, WoodenSupportSubType::NeSw }, { WoodenSupportSubType::Null, WoodenSupportSubType::Corner1, WoodenSupportSubType::Corner3, WoodenSupportSubType::NwSe }, { WoodenSupportSubType::Null, WoodenSupportSubType::Corner2, WoodenSupportSubType::Corner0, WoodenSupportSubType::NeSw }, @@ -1815,7 +1814,7 @@ struct FloorDescriptor CoordsXY bound_offset; }; -static constexpr FloorDescriptor floors[] = { +static constexpr FloorDescriptor kFloors[] = { { SPR_FLOOR_PLANKS, { 32, 32 }, { 0, 0 } }, { SPR_FLOOR_PLANKS_90_DEG, { 32, 32 }, { 0, 0 } }, // -16,-16(1:3) { SPR_FLOOR_PLANKS_N_SEGMENT, { 32, 32 }, { -16, -16 } }, @@ -1830,7 +1829,7 @@ static void MiniatureRailwayTrackDiagFlat( const TrackElement& trackElement, SupportType supportType) { bool isSupported = false; - auto supportSubType = _diagSupportTypes[direction][trackSequence]; + auto supportSubType = kDiagSupportTypes[direction][trackSequence]; uint32_t floorImage = 0; CoordsXY floorBoundSize; @@ -1839,9 +1838,9 @@ static void MiniatureRailwayTrackDiagFlat( if (supportSubType != WoodenSupportSubType::Null) { const auto enumValue = EnumValue(supportSubType); - floorImage = floors[enumValue].image_id; - floorBoundSize = floors[enumValue].bound_size; - floorBoundOffset = floors[enumValue].bound_offset; + floorImage = kFloors[enumValue].image_id; + floorBoundSize = kFloors[enumValue].bound_size; + floorBoundOffset = kFloors[enumValue].bound_offset; isSupported = WoodenASupportsPaintSetup(session, supportType.wooden, supportSubType, height, session.SupportColours); } @@ -1893,13 +1892,13 @@ static void MiniatureRailwayTrackDiag25DegUp( CoordsXY floorBoundSize; CoordsXY floorBoundOffset; - auto supportSubType = _diagSupportTypes[direction][trackSequence]; + auto supportSubType = kDiagSupportTypes[direction][trackSequence]; if (supportSubType != WoodenSupportSubType::Null) { const auto enumValue = EnumValue(supportSubType); - floorImage = floors[enumValue].image_id; - floorBoundSize = floors[enumValue].bound_size; - floorBoundOffset = floors[enumValue].bound_offset; + floorImage = kFloors[enumValue].image_id; + floorBoundSize = kFloors[enumValue].bound_size; + floorBoundOffset = kFloors[enumValue].bound_offset; if (trackSequence == 3) { @@ -1967,13 +1966,13 @@ static void MiniatureRailwayTrackDiagFlatTo25DegUp( CoordsXY floorBoundSize; CoordsXY floorBoundOffset; - auto supportSubType = _diagSupportTypes[direction][trackSequence]; + auto supportSubType = kDiagSupportTypes[direction][trackSequence]; if (supportSubType != WoodenSupportSubType::Null) { const auto enumValue = EnumValue(supportSubType); - floorImage = floors[enumValue].image_id; - floorBoundSize = floors[enumValue].bound_size; - floorBoundOffset = floors[enumValue].bound_offset; + floorImage = kFloors[enumValue].image_id; + floorBoundSize = kFloors[enumValue].bound_size; + floorBoundOffset = kFloors[enumValue].bound_offset; hasSupports = WoodenASupportsPaintSetup(session, supportType.wooden, supportSubType, height, session.SupportColours); } @@ -2020,7 +2019,7 @@ static void MiniatureRailwayTrackDiag25DegUpToFlat( }; bool hasSupports = false; - auto supportSubType = _diagSupportTypes[direction][trackSequence]; + auto supportSubType = kDiagSupportTypes[direction][trackSequence]; uint32_t floorImage = 0; CoordsXY floorBoundSize; @@ -2029,9 +2028,9 @@ static void MiniatureRailwayTrackDiag25DegUpToFlat( if (supportSubType != WoodenSupportSubType::Null) { const auto enumValue = EnumValue(supportSubType); - floorImage = floors[enumValue].image_id; - floorBoundSize = floors[enumValue].bound_size; - floorBoundOffset = floors[enumValue].bound_offset; + floorImage = kFloors[enumValue].image_id; + floorBoundSize = kFloors[enumValue].bound_size; + floorBoundOffset = kFloors[enumValue].bound_offset; if (trackSequence == 3) { hasSupports = WoodenASupportsPaintSetup( @@ -2103,14 +2102,14 @@ static void MiniatureRailwayTrackDiag25DegDown( uint32_t floorImage = 0; CoordsXY floorBoundSize; CoordsXY floorBoundOffset; - auto supportSubType = _diagSupportTypes[direction][trackSequence]; + auto supportSubType = kDiagSupportTypes[direction][trackSequence]; if (supportSubType != WoodenSupportSubType::Null) { const auto enumValue = EnumValue(supportSubType); - floorImage = floors[enumValue].image_id; - floorBoundSize = floors[enumValue].bound_size; - floorBoundOffset = floors[enumValue].bound_offset; + floorImage = kFloors[enumValue].image_id; + floorBoundSize = kFloors[enumValue].bound_size; + floorBoundOffset = kFloors[enumValue].bound_offset; if (trackSequence == 3) { hasSupports = WoodenASupportsPaintSetup( @@ -2180,14 +2179,14 @@ static void MiniatureRailwayTrackDiagFlatTo25DegDown( uint32_t floorImage = 0; CoordsXY floorBoundSize; CoordsXY floorBoundOffset; - auto supportSubType = _diagSupportTypes[direction][trackSequence]; + auto supportSubType = kDiagSupportTypes[direction][trackSequence]; if (supportSubType != WoodenSupportSubType::Null) { const auto enumValue = EnumValue(supportSubType); - floorImage = floors[enumValue].image_id; - floorBoundSize = floors[enumValue].bound_size; - floorBoundOffset = floors[enumValue].bound_offset; + floorImage = kFloors[enumValue].image_id; + floorBoundSize = kFloors[enumValue].bound_size; + floorBoundOffset = kFloors[enumValue].bound_offset; if (trackSequence == 3) { hasSupports = WoodenASupportsPaintSetup( @@ -2249,14 +2248,14 @@ static void MiniatureRailwayTrackDiag25DegDownToFlat( uint32_t floorImage = 0; CoordsXY floorBoundSize; CoordsXY floorBoundOffset; - auto supportSubType = _diagSupportTypes[direction][trackSequence]; + auto supportSubType = kDiagSupportTypes[direction][trackSequence]; if (supportSubType != WoodenSupportSubType::Null) { const auto enumValue = EnumValue(supportSubType); - floorImage = floors[enumValue].image_id; - floorBoundSize = floors[enumValue].bound_size; - floorBoundOffset = floors[enumValue].bound_offset; + floorImage = kFloors[enumValue].image_id; + floorBoundSize = kFloors[enumValue].bound_size; + floorBoundOffset = kFloors[enumValue].bound_offset; hasSupports = WoodenASupportsPaintSetup(session, supportType.wooden, supportSubType, height, session.SupportColours); } diff --git a/src/openrct2/paint/track/transport/Monorail.cpp b/src/openrct2/paint/track/transport/Monorail.cpp index b745b59b106d..b80996fcc55d 100644 --- a/src/openrct2/paint/track/transport/Monorail.cpp +++ b/src/openrct2/paint/track/transport/Monorail.cpp @@ -138,7 +138,7 @@ enum SPR_MONORAIL_DIAG_25_DEG_UP_S_N = 23340, }; -static constexpr uint32_t monorail_track_pieces_flat[kNumOrthogonalDirections] = { +static constexpr uint32_t kTrackPiecesFlat[kNumOrthogonalDirections] = { SPR_MONORAIL_FLAT_SW_NE, SPR_MONORAIL_FLAT_NW_SE, SPR_MONORAIL_FLAT_SW_NE, @@ -414,7 +414,7 @@ static void PaintMonorailTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(monorail_track_pieces_flat[direction]); + auto imageId = session.TrackColours.WithIndex(kTrackPiecesFlat[direction]); if (direction == 0 || direction == 2) { @@ -471,7 +471,7 @@ static void PaintMonorailStation( } } - imageId = session.TrackColours.WithIndex(monorail_track_pieces_flat[direction]); + imageId = session.TrackColours.WithIndex(kTrackPiecesFlat[direction]); if (direction == 0 || direction == 2) { PaintAddImageAsChild(session, imageId, { 0, 6, height }, { { 0, 0, height }, { 32, 20, 2 } }); diff --git a/src/openrct2/paint/track/water/LogFlume.cpp b/src/openrct2/paint/track/water/LogFlume.cpp index 289aa5f724f9..a5d1aa27e34c 100644 --- a/src/openrct2/paint/track/water/LogFlume.cpp +++ b/src/openrct2/paint/track/water/LogFlume.cpp @@ -161,7 +161,7 @@ enum SPR_LOG_FLUME_3_TURN_NW_NE_NW_SEQ_0 = 21131, }; -static constexpr uint32_t LogFlumeTrackFlatImageIds[4][2] = { +static constexpr uint32_t kLogFlumeTrackFlatImageIds[4][2] = { { SPR_LOG_FLUME_FLAT_SW_NE, SPR_LOG_FLUME_FLAT_FRONT_SW_NE }, { SPR_LOG_FLUME_FLAT_NW_SE, SPR_LOG_FLUME_FLAT_FRONT_NW_SE }, { SPR_LOG_FLUME_FLAT_NE_SW, SPR_LOG_FLUME_FLAT_FRONT_NE_SW }, @@ -172,8 +172,8 @@ static void PaintLogFlumeTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(LogFlumeTrackFlatImageIds[direction][0]); - auto frontImageId = session.TrackColours.WithIndex(LogFlumeTrackFlatImageIds[direction][1]); + auto imageId = session.TrackColours.WithIndex(kLogFlumeTrackFlatImageIds[direction][0]); + auto frontImageId = session.TrackColours.WithIndex(kLogFlumeTrackFlatImageIds[direction][1]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); @@ -192,7 +192,7 @@ static void PaintLogFlumeTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(LogFlumeTrackFlatImageIds[direction][0]); + auto imageId = session.TrackColours.WithIndex(kLogFlumeTrackFlatImageIds[direction][0]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); if (direction & 1) @@ -848,10 +848,10 @@ static void PaintLogFlumeTrackOnRidePhoto( { TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, supportType.metal); - auto imageId = session.TrackColours.WithIndex(LogFlumeTrackFlatImageIds[direction][0]); + auto imageId = session.TrackColours.WithIndex(kLogFlumeTrackFlatImageIds[direction][0]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); - imageId = session.TrackColours.WithIndex(LogFlumeTrackFlatImageIds[direction][1]); + imageId = session.TrackColours.WithIndex(kLogFlumeTrackFlatImageIds[direction][1]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height + 5 }, { 32, 1, 21 } }); TrackPaintUtilOnridePhotoPaint2(session, direction, trackElement, height); diff --git a/src/openrct2/paint/track/water/SplashBoats.cpp b/src/openrct2/paint/track/water/SplashBoats.cpp index d44a5a12cd55..e2ce17a8ec32 100644 --- a/src/openrct2/paint/track/water/SplashBoats.cpp +++ b/src/openrct2/paint/track/water/SplashBoats.cpp @@ -229,133 +229,133 @@ enum SPR_SPLASH_BOATS_S_BEND_TOP_NW_NE_NW_SEQ_0 = 20995, }; -static constexpr uint32_t SplashBoats25DegUpImageId[4] = { +static constexpr uint32_t kSplashBoats25DegUpImageId[4] = { SPR_SPLASH_BOATS_25_DEG_UP_SW_NE, SPR_SPLASH_BOATS_25_DEG_UP_NW_SE, SPR_SPLASH_BOATS_25_DEG_UP_NE_SW, SPR_SPLASH_BOATS_25_DEG_UP_SE_NW, }; -static constexpr uint32_t SplashBoats25DegUpFrontImageId[4] = { +static constexpr uint32_t kSplashBoats25DegUpFrontImageId[4] = { SPR_SPLASH_BOATS_25_DEG_UP_FRONT_SW_NE, SPR_SPLASH_BOATS_25_DEG_UP_FRONT_NW_SE, SPR_SPLASH_BOATS_25_DEG_UP_FRONT_NE_SW, SPR_SPLASH_BOATS_25_DEG_UP_FRONT_SE_NW, }; -static constexpr uint32_t SplashBoats60DegUpImageId[4] = { +static constexpr uint32_t kSplashBoats60DegUpImageId[4] = { SPR_SPLASH_BOATS_60_DEG_UP_SW_NE, SPR_SPLASH_BOATS_60_DEG_UP_NW_SE, SPR_SPLASH_BOATS_60_DEG_UP_NE_SW, SPR_SPLASH_BOATS_60_DEG_UP_SE_NW, }; -static constexpr uint32_t SplashBoats60DegUpFrontImageId[4] = { +static constexpr uint32_t kSplashBoats60DegUpFrontImageId[4] = { SPR_SPLASH_BOATS_60_DEG_UP_FRONT_SW_NE, SPR_SPLASH_BOATS_60_DEG_UP_FRONT_NW_SE, SPR_SPLASH_BOATS_60_DEG_UP_FRONT_NE_SW, SPR_SPLASH_BOATS_60_DEG_UP_FRONT_SE_NW, }; -static constexpr uint32_t SplashBoatsFlatTo25DegUpImageId[4] = { +static constexpr uint32_t kSplashBoatsFlatTo25DegUpImageId[4] = { SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_SW_NE, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_NW_SE, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_NE_SW, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_SE_NW, }; -static constexpr uint32_t SplashBoatsFlatTo25DegUpFrontImageId[4] = { +static constexpr uint32_t kSplashBoatsFlatTo25DegUpFrontImageId[4] = { SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_FRONT_SW_NE, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_FRONT_NW_SE, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_FRONT_NE_SW, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_FRONT_SE_NW, }; -static constexpr uint32_t SplashBoats25DegUpToFlatImageId[4] = { +static constexpr uint32_t kSplashBoats25DegUpToFlatImageId[4] = { SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_SW_NE, SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_NW_SE, SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_NE_SW, SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_SE_NW, }; -static constexpr uint32_t SplashBoats25DegUpToFlatFrontImageId[4] = { +static constexpr uint32_t kSplashBoats25DegUpToFlatFrontImageId[4] = { SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_FRONT_SW_NE, SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_FRONT_NW_SE, SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_FRONT_NE_SW, SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_FRONT_SE_NW, }; -static constexpr uint32_t SplashBoats25DegUpTo60DegUpImageId[4] = { +static constexpr uint32_t kSplashBoats25DegUpTo60DegUpImageId[4] = { SPR_SPLASH_BOATS_25_DEG_UP_TO_60_DEG_UP_SW_NE, SPR_SPLASH_BOATS_25_DEG_UP_TO_60_DEG_UP_NW_SE, SPR_SPLASH_BOATS_25_DEG_UP_TO_60_DEG_UP_NE_SW, SPR_SPLASH_BOATS_25_DEG_UP_TO_60_DEG_UP_SE_NW, }; -static constexpr uint32_t SplashBoats25DegUpTo60DegUpFrontImageId[4] = { +static constexpr uint32_t kSplashBoats25DegUpTo60DegUpFrontImageId[4] = { SPR_SPLASH_BOATS_25_DEG_UP_TO_60_DEG_UP_FRONT_SW_NE, SPR_SPLASH_BOATS_25_DEG_UP_TO_60_DEG_UP_FRONT_NW_SE, SPR_SPLASH_BOATS_25_DEG_UP_TO_60_DEG_UP_FRONT_NE_SW, SPR_SPLASH_BOATS_25_DEG_UP_TO_60_DEG_UP_FRONT_SE_NW, }; -static constexpr uint32_t SplashBoats60DegUpTo25DegUpImageId[4] = { +static constexpr uint32_t kSplashBoats60DegUpTo25DegUpImageId[4] = { SPR_SPLASH_BOATS_60_DEG_UP_TO_25_DEG_UP_SW_NE, SPR_SPLASH_BOATS_60_DEG_UP_TO_25_DEG_UP_NW_SE, SPR_SPLASH_BOATS_60_DEG_UP_TO_25_DEG_UP_NE_SW, SPR_SPLASH_BOATS_60_DEG_UP_TO_25_DEG_UP_SE_NW, }; -static constexpr uint32_t SplashBoats60DegUpTo25DegUpFrontImageId[4] = { +static constexpr uint32_t kSplashBoats60DegUpTo25DegUpFrontImageId[4] = { SPR_SPLASH_BOATS_60_DEG_UP_TO_25_DEG_UP_FRONT_SW_NE, SPR_SPLASH_BOATS_60_DEG_UP_TO_25_DEG_UP_FRONT_NW_SE, SPR_SPLASH_BOATS_60_DEG_UP_TO_25_DEG_UP_FRONT_NE_SW, SPR_SPLASH_BOATS_60_DEG_UP_TO_25_DEG_UP_FRONT_SE_NW, }; -static constexpr uint32_t SplashBoats25DegDownImageId[4] = { +static constexpr uint32_t kSplashBoats25DegDownImageId[4] = { SPR_SPLASH_BOATS_25_DEG_DOWN_SW_NE, SPR_SPLASH_BOATS_25_DEG_DOWN_NW_SE, SPR_SPLASH_BOATS_25_DEG_DOWN_NE_SW, SPR_SPLASH_BOATS_25_DEG_DOWN_SE_NW, }; -static constexpr uint32_t SplashBoats25DegDownFrontImageId[4] = { +static constexpr uint32_t kSplashBoats25DegDownFrontImageId[4] = { SPR_SPLASH_BOATS_25_DEG_UP_FRONT_NE_SW, SPR_SPLASH_BOATS_25_DEG_UP_FRONT_SE_NW, SPR_SPLASH_BOATS_25_DEG_UP_FRONT_SW_NE, SPR_SPLASH_BOATS_25_DEG_UP_FRONT_NW_SE, }; -static constexpr uint32_t SplashBoatsFlatTo25DegDownImageId[4] = { +static constexpr uint32_t kSplashBoatsFlatTo25DegDownImageId[4] = { SPR_SPLASH_BOATS_FLAT_TO_25_DEG_DOWN_SW_NE, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_DOWN_NW_SE, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_DOWN_NE_SW, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_DOWN_SE_NW, }; -static constexpr uint32_t SplashBoatsFlatTo25DegDownFrontImageId[4] = { +static constexpr uint32_t kSplashBoatsFlatTo25DegDownFrontImageId[4] = { SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_FRONT_NE_SW, SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_FRONT_SE_NW, SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_FRONT_SW_NE, SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_FRONT_NW_SE, }; -static constexpr uint32_t SplashBoats25DegDownToFlatImageId[4] = { +static constexpr uint32_t kSplashBoats25DegDownToFlatImageId[4] = { SPR_SPLASH_BOATS_25_DEG_DOWN_TO_FLAT_SW_NE, SPR_SPLASH_BOATS_25_DEG_DOWN_TO_FLAT_NW_SE, SPR_SPLASH_BOATS_25_DEG_DOWN_TO_FLAT_NE_SW, SPR_SPLASH_BOATS_25_DEG_DOWN_TO_FLAT_SE_NW, }; -static constexpr uint32_t SplashBoats25DegDownToFlatFrontImageId[4] = { +static constexpr uint32_t kSplashBoats25DegDownToFlatFrontImageId[4] = { SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_FRONT_NE_SW, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_FRONT_SE_NW, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_FRONT_SW_NE, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_FRONT_NW_SE, }; -static constexpr SpriteBb RiverRaftsLeftQuarterTurn5_Top[4][5] = { +static constexpr SpriteBb kSplashBoatsLeftQuarterTurn5_Top[4][5] = { { SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_SW_NW_SEQ_0, { 0, 0, 0 }, { 0, 2, 0 }, { 32, 27, 2 }, SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_SW_NW_SEQ_2, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 2 }, @@ -386,7 +386,7 @@ static constexpr SpriteBb RiverRaftsLeftQuarterTurn5_Top[4][5] = { }, }; -static constexpr SpriteBb RiverRaftsLeftQuarterTurn5_Side[4][5] = { +static constexpr SpriteBb kSplashBoatsLeftQuarterTurn5_Side[4][5] = { { SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_SW_NW_SEQ_0, { 0, 0, 0 }, { 0, 2, 27 }, { 32, 27, 0 }, SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_SW_NW_SEQ_2, { 0, 0, 0 }, { 0, 0, 27 }, { 32, 16, 0 }, @@ -417,7 +417,7 @@ static constexpr SpriteBb RiverRaftsLeftQuarterTurn5_Side[4][5] = { }, }; -static constexpr SpriteBb RiverRaftsRightQuarterTurn5_Top[4][5] = { +static constexpr SpriteBb kSplashBoatsRightQuarterTurn5_Top[4][5] = { { SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_SW_SE_SEQ_0, { 0, 0, 0 }, { 0, 2, 0 }, { 32, 32, 2 }, SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_SW_SE_SEQ_2, { 0, 0, 0 }, { 0, 16, 0 }, { 32, 16, 2 }, @@ -448,7 +448,7 @@ static constexpr SpriteBb RiverRaftsRightQuarterTurn5_Top[4][5] = { }, }; -static constexpr SpriteBb RiverRaftsRightQuarterTurn5_Side[4][5] = { +static constexpr SpriteBb kSplashBoatsRightQuarterTurn5_Side[4][5] = { { SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_SW_SE_SEQ_0, { 0, 0, 0 }, { 0, 2, 27 }, { 32, 32, 0 }, SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_SW_SE_SEQ_2, { 0, 0, 0 }, { 0, 16, 27 }, { 32, 16, 0 }, @@ -483,8 +483,8 @@ static void PaintSplashBoatsTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(SplashBoats25DegUpImageId[direction]); - auto frontImageId = session.TrackColours.WithIndex(SplashBoats25DegUpFrontImageId[direction]); + auto imageId = session.TrackColours.WithIndex(kSplashBoats25DegUpImageId[direction]); + auto frontImageId = session.TrackColours.WithIndex(kSplashBoats25DegUpFrontImageId[direction]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 50 } }); @@ -508,8 +508,8 @@ static void PaintSplashBoatsTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(SplashBoats60DegUpImageId[direction]); - auto frontImageId = session.TrackColours.WithIndex(SplashBoats60DegUpFrontImageId[direction]); + auto imageId = session.TrackColours.WithIndex(kSplashBoats60DegUpImageId[direction]); + auto frontImageId = session.TrackColours.WithIndex(kSplashBoats60DegUpFrontImageId[direction]); session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); @@ -534,8 +534,8 @@ static void PaintSplashBoatsTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(SplashBoatsFlatTo25DegUpImageId[direction]); - auto frontImageId = session.TrackColours.WithIndex(SplashBoatsFlatTo25DegUpFrontImageId[direction]); + auto imageId = session.TrackColours.WithIndex(kSplashBoatsFlatTo25DegUpImageId[direction]); + auto frontImageId = session.TrackColours.WithIndex(kSplashBoatsFlatTo25DegUpFrontImageId[direction]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 42 } }); @@ -559,8 +559,8 @@ static void PaintSplashBoatsTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(SplashBoats25DegUpToFlatImageId[direction]); - auto frontImageId = session.TrackColours.WithIndex(SplashBoats25DegUpToFlatFrontImageId[direction]); + auto imageId = session.TrackColours.WithIndex(kSplashBoats25DegUpToFlatImageId[direction]); + auto frontImageId = session.TrackColours.WithIndex(kSplashBoats25DegUpToFlatFrontImageId[direction]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); @@ -584,8 +584,8 @@ static void PaintSplashBoatsTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(SplashBoats25DegUpTo60DegUpImageId[direction]); - auto frontImageId = session.TrackColours.WithIndex(SplashBoats25DegUpTo60DegUpFrontImageId[direction]); + auto imageId = session.TrackColours.WithIndex(kSplashBoats25DegUpTo60DegUpImageId[direction]); + auto frontImageId = session.TrackColours.WithIndex(kSplashBoats25DegUpTo60DegUpFrontImageId[direction]); session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); @@ -610,8 +610,8 @@ static void PaintSplashBoatsTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(SplashBoats60DegUpTo25DegUpImageId[direction]); - auto frontImageId = session.TrackColours.WithIndex(SplashBoats60DegUpTo25DegUpFrontImageId[direction]); + auto imageId = session.TrackColours.WithIndex(kSplashBoats60DegUpTo25DegUpImageId[direction]); + auto frontImageId = session.TrackColours.WithIndex(kSplashBoats60DegUpTo25DegUpFrontImageId[direction]); session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); @@ -636,8 +636,8 @@ static void PaintSplashBoatsTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(SplashBoats25DegDownImageId[direction]); - auto frontImageId = session.TrackColours.WithIndex(SplashBoats25DegDownFrontImageId[direction]); + auto imageId = session.TrackColours.WithIndex(kSplashBoats25DegDownImageId[direction]); + auto frontImageId = session.TrackColours.WithIndex(kSplashBoats25DegDownFrontImageId[direction]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 50 } }); @@ -668,8 +668,8 @@ static void PaintSplashBoatsTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(SplashBoatsFlatTo25DegDownImageId[direction]); - auto frontImageId = session.TrackColours.WithIndex(SplashBoatsFlatTo25DegDownFrontImageId[direction]); + auto imageId = session.TrackColours.WithIndex(kSplashBoatsFlatTo25DegDownImageId[direction]); + auto frontImageId = session.TrackColours.WithIndex(kSplashBoatsFlatTo25DegDownFrontImageId[direction]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); @@ -707,8 +707,8 @@ static void PaintSplashBoatsTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(SplashBoats25DegDownToFlatImageId[direction]); - auto frontImageId = session.TrackColours.WithIndex(SplashBoats25DegDownToFlatFrontImageId[direction]); + auto imageId = session.TrackColours.WithIndex(kSplashBoats25DegDownToFlatImageId[direction]); + auto frontImageId = session.TrackColours.WithIndex(kSplashBoats25DegDownToFlatFrontImageId[direction]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 42 } }); @@ -814,9 +814,9 @@ static void PaintSplashBoatsTrackLeftQuarterTurn5Tiles( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilRightQuarterTurn5TilesPaint2( - session, height, direction, trackSequence, session.TrackColours, RiverRaftsLeftQuarterTurn5_Top); + session, height, direction, trackSequence, session.TrackColours, kSplashBoatsLeftQuarterTurn5_Top); TrackPaintUtilRightQuarterTurn5TilesPaint2( - session, height, direction, trackSequence, session.TrackColours, RiverRaftsLeftQuarterTurn5_Side); + session, height, direction, trackSequence, session.TrackColours, kSplashBoatsLeftQuarterTurn5_Side); DrawSupportForSequenceA( session, supportType.wooden, trackSequence, direction, height, session.SupportColours); @@ -903,9 +903,9 @@ static void PaintSplashBoatsTrackRightQuarterTurn5Tiles( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilRightQuarterTurn5TilesPaint2( - session, height, direction, trackSequence, session.TrackColours, RiverRaftsRightQuarterTurn5_Top); + session, height, direction, trackSequence, session.TrackColours, kSplashBoatsRightQuarterTurn5_Top); TrackPaintUtilRightQuarterTurn5TilesPaint2( - session, height, direction, trackSequence, session.TrackColours, RiverRaftsRightQuarterTurn5_Side); + session, height, direction, trackSequence, session.TrackColours, kSplashBoatsRightQuarterTurn5_Side); DrawSupportForSequenceA( session, supportType.wooden, trackSequence, direction, height, session.SupportColours); diff --git a/src/openrct2/paint/vehicle/Vehicle.MiniGolf.cpp b/src/openrct2/paint/vehicle/Vehicle.MiniGolf.cpp index dd94d6783db3..ed9cf897271a 100644 --- a/src/openrct2/paint/vehicle/Vehicle.MiniGolf.cpp +++ b/src/openrct2/paint/vehicle/Vehicle.MiniGolf.cpp @@ -80,7 +80,7 @@ namespace OpenRCT2 MiniGolfPeepAnimationFramesPutt, }; - const size_t MiniGolfPeepAnimationLengths[] = { + const size_t kMiniGolfPeepAnimationLengths[] = { std::size(MiniGolfPeepAnimationFramesWalk), std::size(MiniGolfPeepAnimationFramesPlaceBallDownwards), std::size(MiniGolfPeepAnimationFramesSwingLeft), diff --git a/src/openrct2/paint/vehicle/Vehicle.MiniGolf.h b/src/openrct2/paint/vehicle/Vehicle.MiniGolf.h index 74a111b7368d..affeca1e9771 100644 --- a/src/openrct2/paint/vehicle/Vehicle.MiniGolf.h +++ b/src/openrct2/paint/vehicle/Vehicle.MiniGolf.h @@ -13,5 +13,5 @@ namespace OpenRCT2 { - extern const size_t MiniGolfPeepAnimationLengths[]; + extern const size_t kMiniGolfPeepAnimationLengths[]; } diff --git a/src/openrct2/paint/vehicle/VehiclePaint.cpp b/src/openrct2/paint/vehicle/VehiclePaint.cpp index a85c51f1cb88..7c5f8adc37ee 100644 --- a/src/openrct2/paint/vehicle/VehiclePaint.cpp +++ b/src/openrct2/paint/vehicle/VehiclePaint.cpp @@ -4326,7 +4326,7 @@ void Vehicle::Paint(PaintSession& session, int32_t imageDirection) const int32_t zOffset = 0; if (IsCableLift()) { - carEntry = &CableLiftVehicle; + carEntry = &kCableLiftVehicle; } else { diff --git a/src/openrct2/park/Legacy.cpp b/src/openrct2/park/Legacy.cpp index 6e6bab6c0133..b07b2fc2353e 100644 --- a/src/openrct2/park/Legacy.cpp +++ b/src/openrct2/park/Legacy.cpp @@ -2250,7 +2250,7 @@ void UpdateFootpathsFromMapping( const RCT2::FootpathMapping* footpathMapping) { auto surfaceIndex = requiredObjects.Find(ObjectType::FootpathSurface, footpathMapping->NormalSurface); - if (surfaceIndex == OBJECT_ENTRY_INDEX_NULL) + if (surfaceIndex == kObjectEntryIndexNull) { requiredObjects.SetObject(ObjectType::FootpathSurface, surfaceCount, footpathMapping->NormalSurface); surfaceIndex = surfaceCount++; @@ -2258,7 +2258,7 @@ void UpdateFootpathsFromMapping( pathToSurfaceMap[entryIndex] = surfaceIndex; surfaceIndex = requiredObjects.Find(ObjectType::FootpathSurface, footpathMapping->QueueSurface); - if (surfaceIndex == OBJECT_ENTRY_INDEX_NULL) + if (surfaceIndex == kObjectEntryIndexNull) { requiredObjects.SetObject(ObjectType::FootpathSurface, surfaceCount, footpathMapping->QueueSurface); surfaceIndex = surfaceCount++; @@ -2266,7 +2266,7 @@ void UpdateFootpathsFromMapping( pathToQueueSurfaceMap[entryIndex] = surfaceIndex; auto railingIndex = requiredObjects.Find(ObjectType::FootpathRailings, footpathMapping->Railing); - if (railingIndex == OBJECT_ENTRY_INDEX_NULL) + if (railingIndex == kObjectEntryIndexNull) { requiredObjects.SetObject(ObjectType::FootpathRailings, railingCount, footpathMapping->Railing); railingIndex = railingCount++; @@ -2327,7 +2327,7 @@ static AnimObjectConversionTable BuildPeepAnimObjectConversionTable() template static bool ConvertPeepAnimationType(TPeepType* peep, AnimObjectConversionTable& table) { - if (peep->AnimationObjectIndex != OBJECT_ENTRY_INDEX_NULL) + if (peep->AnimationObjectIndex != kObjectEntryIndexNull) return false; // TODO: catch missings diff --git a/src/openrct2/park/ParkFile.cpp b/src/openrct2/park/ParkFile.cpp index 2c6ac17179b0..4dd162001229 100644 --- a/src/openrct2/park/ParkFile.cpp +++ b/src/openrct2/park/ParkFile.cpp @@ -272,9 +272,9 @@ namespace OpenRCT2 if (os.GetMode() == OrcaStream::Mode::READING) { - std::fill(std::begin(_pathToSurfaceMap), std::end(_pathToSurfaceMap), OBJECT_ENTRY_INDEX_NULL); - std::fill(std::begin(_pathToQueueSurfaceMap), std::end(_pathToQueueSurfaceMap), OBJECT_ENTRY_INDEX_NULL); - std::fill(std::begin(_pathToRailingsMap), std::end(_pathToRailingsMap), OBJECT_ENTRY_INDEX_NULL); + std::fill(std::begin(_pathToSurfaceMap), std::end(_pathToSurfaceMap), kObjectEntryIndexNull); + std::fill(std::begin(_pathToQueueSurfaceMap), std::end(_pathToQueueSurfaceMap), kObjectEntryIndexNull); + std::fill(std::begin(_pathToRailingsMap), std::end(_pathToRailingsMap), kObjectEntryIndexNull); auto* pathToSurfaceMap = _pathToSurfaceMap; auto* pathToQueueSurfaceMap = _pathToQueueSurfaceMap; auto* pathToRailingsMap = _pathToRailingsMap; @@ -450,7 +450,7 @@ namespace OpenRCT2 cs.ReadWrite(gameState.ScenarioCompletedCompanyValue); if (gameState.ScenarioCompletedCompanyValue == kMoney64Undefined - || gameState.ScenarioCompletedCompanyValue == COMPANY_VALUE_ON_FAILED_OBJECTIVE) + || gameState.ScenarioCompletedCompanyValue == kCompanyValueOnFailedObjective) { cs.Write(""); } @@ -1142,7 +1142,7 @@ namespace OpenRCT2 if (pathElement->HasLegacyPathEntry()) { auto pathEntryIndex = pathElement->GetLegacyPathEntryIndex(); - if (pathToRailingsMap[pathEntryIndex] != OBJECT_ENTRY_INDEX_NULL) + if (pathToRailingsMap[pathEntryIndex] != kObjectEntryIndexNull) { if (pathElement->IsQueue()) pathElement->SetSurfaceEntryIndex(pathToQueueSurfaceMap[pathEntryIndex]); @@ -1728,7 +1728,7 @@ namespace OpenRCT2 if (version >= kPeepAnimationObjectsVersion) cs.ReadWrite(entity.AnimationObjectIndex); else - entity.AnimationObjectIndex = OBJECT_ENTRY_INDEX_NULL; + entity.AnimationObjectIndex = kObjectEntryIndexNull; cs.ReadWrite(entity.AnimationGroup); diff --git a/src/openrct2/peep/GuestPathfinding.cpp b/src/openrct2/peep/GuestPathfinding.cpp index cce333e31a40..7a27c7aa18d7 100644 --- a/src/openrct2/peep/GuestPathfinding.cpp +++ b/src/openrct2/peep/GuestPathfinding.cpp @@ -201,7 +201,7 @@ namespace OpenRCT2::PathFinding assert(DirectionValid(direction)); auto newTile = CoordsXY{ CoordsXY{ peep.NextLoc } + CoordsDirectionDelta[direction] }.ToTileCentre(); - if (newTile.x >= MAXIMUM_MAP_SIZE_BIG || newTile.y >= MAXIMUM_MAP_SIZE_BIG) + if (newTile.x >= kMaximumMapSizeBig || newTile.y >= kMaximumMapSizeBig) { // This could loop! return GuestSurfacePathFinding(peep); diff --git a/src/openrct2/peep/PeepAnimations.cpp b/src/openrct2/peep/PeepAnimations.cpp index dc205cc928d6..e5fc7026644b 100644 --- a/src/openrct2/peep/PeepAnimations.cpp +++ b/src/openrct2/peep/PeepAnimations.cpp @@ -136,7 +136,7 @@ namespace OpenRCT2 if (animObj != nullptr && animObj->GetPeepType() == type) return i; } - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; } PeepAnimationsObject* findPeepAnimationsObjectForType(const AnimationPeepType type) @@ -198,11 +198,11 @@ namespace OpenRCT2 // Still no costumes available? Bail out if (costumes.empty()) - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; std::vector out{}; std::sample(costumes.begin(), costumes.end(), std::back_inserter(out), 1, std::mt19937{ std::random_device{}() }); - return !out.empty() ? out[0] : OBJECT_ENTRY_INDEX_NULL; + return !out.empty() ? out[0] : kObjectEntryIndexNull; } std::vector getAnimationGroupsByPeepType(const AnimationPeepType type) diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index bea9e9f18adf..26ae7525bbce 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -373,23 +373,22 @@ namespace OpenRCT2::RCT1 void InitialiseEntryMaps() { - std::fill(std::begin(_rideTypeToRideEntryMap), std::end(_rideTypeToRideEntryMap), OBJECT_ENTRY_INDEX_NULL); - std::fill(std::begin(_vehicleTypeToRideEntryMap), std::end(_vehicleTypeToRideEntryMap), OBJECT_ENTRY_INDEX_NULL); - std::fill(std::begin(_smallSceneryTypeToEntryMap), std::end(_smallSceneryTypeToEntryMap), OBJECT_ENTRY_INDEX_NULL); - std::fill(std::begin(_largeSceneryTypeToEntryMap), std::end(_largeSceneryTypeToEntryMap), OBJECT_ENTRY_INDEX_NULL); - std::fill(std::begin(_wallTypeToEntryMap), std::end(_wallTypeToEntryMap), OBJECT_ENTRY_INDEX_NULL); - std::fill(std::begin(_bannerTypeToEntryMap), std::end(_bannerTypeToEntryMap), OBJECT_ENTRY_INDEX_NULL); - std::fill(std::begin(_pathTypeToEntryMap), std::end(_pathTypeToEntryMap), OBJECT_ENTRY_INDEX_NULL); - std::fill(std::begin(_pathAdditionTypeToEntryMap), std::end(_pathAdditionTypeToEntryMap), OBJECT_ENTRY_INDEX_NULL); - std::fill(std::begin(_sceneryThemeTypeToEntryMap), std::end(_sceneryThemeTypeToEntryMap), OBJECT_ENTRY_INDEX_NULL); + std::fill(std::begin(_rideTypeToRideEntryMap), std::end(_rideTypeToRideEntryMap), kObjectEntryIndexNull); + std::fill(std::begin(_vehicleTypeToRideEntryMap), std::end(_vehicleTypeToRideEntryMap), kObjectEntryIndexNull); + std::fill(std::begin(_smallSceneryTypeToEntryMap), std::end(_smallSceneryTypeToEntryMap), kObjectEntryIndexNull); + std::fill(std::begin(_largeSceneryTypeToEntryMap), std::end(_largeSceneryTypeToEntryMap), kObjectEntryIndexNull); + std::fill(std::begin(_wallTypeToEntryMap), std::end(_wallTypeToEntryMap), kObjectEntryIndexNull); + std::fill(std::begin(_bannerTypeToEntryMap), std::end(_bannerTypeToEntryMap), kObjectEntryIndexNull); + std::fill(std::begin(_pathTypeToEntryMap), std::end(_pathTypeToEntryMap), kObjectEntryIndexNull); + std::fill(std::begin(_pathAdditionTypeToEntryMap), std::end(_pathAdditionTypeToEntryMap), kObjectEntryIndexNull); + std::fill(std::begin(_sceneryThemeTypeToEntryMap), std::end(_sceneryThemeTypeToEntryMap), kObjectEntryIndexNull); std::fill( - std::begin(_terrainSurfaceTypeToEntryMap), std::end(_terrainSurfaceTypeToEntryMap), OBJECT_ENTRY_INDEX_NULL); - std::fill(std::begin(_terrainEdgeTypeToEntryMap), std::end(_terrainEdgeTypeToEntryMap), OBJECT_ENTRY_INDEX_NULL); + std::begin(_terrainSurfaceTypeToEntryMap), std::end(_terrainSurfaceTypeToEntryMap), kObjectEntryIndexNull); + std::fill(std::begin(_terrainEdgeTypeToEntryMap), std::end(_terrainEdgeTypeToEntryMap), kObjectEntryIndexNull); std::fill( - std::begin(_footpathSurfaceTypeToEntryMap), std::end(_footpathSurfaceTypeToEntryMap), OBJECT_ENTRY_INDEX_NULL); + std::begin(_footpathSurfaceTypeToEntryMap), std::end(_footpathSurfaceTypeToEntryMap), kObjectEntryIndexNull); std::fill( - std::begin(_footpathRailingsTypeToEntryMap), std::end(_footpathRailingsTypeToEntryMap), - OBJECT_ENTRY_INDEX_NULL); + std::begin(_footpathRailingsTypeToEntryMap), std::end(_footpathRailingsTypeToEntryMap), kObjectEntryIndexNull); } /** @@ -575,7 +574,7 @@ namespace OpenRCT2::RCT1 { for (int32_t sceneryTheme = 0; sceneryTheme <= RCT1_SCENERY_THEME_PAGODA; sceneryTheme++) { - if (sceneryTheme != 0 && _sceneryThemeTypeToEntryMap[sceneryTheme] == OBJECT_ENTRY_INDEX_NULL) + if (sceneryTheme != 0 && _sceneryThemeTypeToEntryMap[sceneryTheme] == kObjectEntryIndexNull) continue; auto objects = RCT1::GetSceneryObjects(sceneryTheme); @@ -648,7 +647,7 @@ namespace OpenRCT2::RCT1 { Guard::Assert(EnumValue(rideType) < std::size(_rideTypeToRideEntryMap)); - if (_rideTypeToRideEntryMap[EnumValue(rideType)] == OBJECT_ENTRY_INDEX_NULL) + if (_rideTypeToRideEntryMap[EnumValue(rideType)] == kObjectEntryIndexNull) { auto entryName = RCT1::GetRideTypeObject(rideType, _gameVersion == FILE_VERSION_RCT1_LL); if (!entryName.empty()) @@ -663,7 +662,7 @@ namespace OpenRCT2::RCT1 { Guard::Assert(EnumValue(rideType) < std::size(_rideTypeToRideEntryMap)); - if (_vehicleTypeToRideEntryMap[EnumValue(vehicleType)] == OBJECT_ENTRY_INDEX_NULL) + if (_vehicleTypeToRideEntryMap[EnumValue(vehicleType)] == kObjectEntryIndexNull) { auto entryName = RCT1::GetVehicleObject(vehicleType); if (!entryName.empty()) @@ -680,7 +679,7 @@ namespace OpenRCT2::RCT1 void AddEntryForSmallScenery(ObjectEntryIndex smallSceneryType) { assert(smallSceneryType < std::size(_smallSceneryTypeToEntryMap)); - if (_smallSceneryTypeToEntryMap[smallSceneryType] == OBJECT_ENTRY_INDEX_NULL) + if (_smallSceneryTypeToEntryMap[smallSceneryType] == kObjectEntryIndexNull) { auto entryName = RCT1::GetSmallSceneryObject(smallSceneryType); auto entryIndex = _smallSceneryEntries.GetOrAddEntry(entryName); @@ -692,7 +691,7 @@ namespace OpenRCT2::RCT1 void AddEntryForLargeScenery(ObjectEntryIndex largeSceneryType) { assert(largeSceneryType < std::size(_largeSceneryTypeToEntryMap)); - if (_largeSceneryTypeToEntryMap[largeSceneryType] == OBJECT_ENTRY_INDEX_NULL) + if (_largeSceneryTypeToEntryMap[largeSceneryType] == kObjectEntryIndexNull) { auto entryName = RCT1::GetLargeSceneryObject(largeSceneryType); auto entryIndex = _largeSceneryEntries.GetOrAddEntry(entryName); @@ -704,7 +703,7 @@ namespace OpenRCT2::RCT1 void AddEntryForWall(ObjectEntryIndex wallType) { assert(wallType < std::size(_wallTypeToEntryMap)); - if (_wallTypeToEntryMap[wallType] == OBJECT_ENTRY_INDEX_NULL) + if (_wallTypeToEntryMap[wallType] == kObjectEntryIndexNull) { auto entryName = RCT1::GetWallObject(wallType); auto entryIndex = _wallEntries.GetOrAddEntry(entryName); @@ -716,7 +715,7 @@ namespace OpenRCT2::RCT1 void AddEntryForBanner(BannerType bannerType) { assert(EnumValue(bannerType) < std::size(_bannerTypeToEntryMap)); - if (_bannerTypeToEntryMap[EnumValue(bannerType)] == OBJECT_ENTRY_INDEX_NULL) + if (_bannerTypeToEntryMap[EnumValue(bannerType)] == kObjectEntryIndexNull) { auto entryName = RCT1::GetBannerObject(bannerType); auto entryIndex = _bannerEntries.GetOrAddEntry(entryName); @@ -728,7 +727,7 @@ namespace OpenRCT2::RCT1 void AddEntryForPathSurface(ObjectEntryIndex pathType) { assert(pathType < std::size(_footpathSurfaceTypeToEntryMap)); - if (_footpathSurfaceTypeToEntryMap[pathType] == OBJECT_ENTRY_INDEX_NULL) + if (_footpathSurfaceTypeToEntryMap[pathType] == kObjectEntryIndexNull) { auto identifier = RCT1::GetPathSurfaceObject(pathType); if (!identifier.empty()) @@ -744,10 +743,10 @@ namespace OpenRCT2::RCT1 if (pathAdditionType == RCT1_PATH_ADDITION_NONE) return; - if (_pathAdditionTypeToEntryMap[pathAdditionType] == OBJECT_ENTRY_INDEX_NULL) + if (_pathAdditionTypeToEntryMap[pathAdditionType] == kObjectEntryIndexNull) { uint8_t normalisedPathAdditionType = RCT1::NormalisePathAddition(pathAdditionType); - if (_pathAdditionTypeToEntryMap[normalisedPathAdditionType] == OBJECT_ENTRY_INDEX_NULL) + if (_pathAdditionTypeToEntryMap[normalisedPathAdditionType] == kObjectEntryIndexNull) { auto entryName = RCT1::GetPathAddtionObject(normalisedPathAdditionType); auto entryIndex = _pathAdditionEntries.GetOrAddEntry(entryName); @@ -786,7 +785,7 @@ namespace OpenRCT2::RCT1 void AddEntryForTerrainSurface(ObjectEntryIndex terrainSurfaceType) { assert(terrainSurfaceType < std::size(_terrainSurfaceTypeToEntryMap)); - if (_terrainSurfaceTypeToEntryMap[terrainSurfaceType] == OBJECT_ENTRY_INDEX_NULL) + if (_terrainSurfaceTypeToEntryMap[terrainSurfaceType] == kObjectEntryIndexNull) { auto identifier = RCT1::GetTerrainSurfaceObject(terrainSurfaceType); if (!identifier.empty()) @@ -800,7 +799,7 @@ namespace OpenRCT2::RCT1 void AddEntryForTerrainEdge(ObjectEntryIndex terrainEdgeType) { assert(terrainEdgeType < std::size(_terrainEdgeTypeToEntryMap)); - if (_terrainEdgeTypeToEntryMap[terrainEdgeType] == OBJECT_ENTRY_INDEX_NULL) + if (_terrainEdgeTypeToEntryMap[terrainEdgeType] == kObjectEntryIndexNull) { auto identifier = RCT1::GetTerrainEdgeObject(terrainEdgeType); if (!identifier.empty()) @@ -814,7 +813,7 @@ namespace OpenRCT2::RCT1 void AddEntryForFootpathRailings(ObjectEntryIndex railingsType) { assert(railingsType < std::size(_footpathRailingsTypeToEntryMap)); - if (_footpathRailingsTypeToEntryMap[railingsType] == OBJECT_ENTRY_INDEX_NULL) + if (_footpathRailingsTypeToEntryMap[railingsType] == kObjectEntryIndexNull) { auto identifier = RCT1::GetFootpathRailingsObject(railingsType); if (!identifier.empty()) @@ -866,7 +865,7 @@ namespace OpenRCT2::RCT1 if (rideEntry == nullptr) { LOG_WARNING("Discarding ride with invalid ride entry"); - dst->type = RIDE_TYPE_NULL; + dst->type = kRideTypeNull; return; } @@ -982,7 +981,7 @@ namespace OpenRCT2::RCT1 // RCT1 used 5mph / 8 km/h for every lift hill dst->lift_hill_speed = 5; - dst->music = OBJECT_ENTRY_INDEX_NULL; + dst->music = kObjectEntryIndexNull; if (GetRideTypeDescriptor(dst->type).HasFlag(RtdFlag::allowMusic)) { if (_gameVersion == FILE_VERSION_RCT1) @@ -1111,7 +1110,7 @@ namespace OpenRCT2::RCT1 dst->num_riders = src->NumRiders; - dst->music_tune_id = TUNE_ID_NULL; + dst->music_tune_id = kTuneIDNull; } void SetRideColourScheme(::Ride* dst, RCT1::Ride* src) @@ -1144,7 +1143,7 @@ namespace OpenRCT2::RCT1 } } - dst->entrance_style = OBJECT_ENTRY_INDEX_NULL; + dst->entrance_style = kObjectEntryIndexNull; if (dst->GetRideTypeDescriptor().HasFlag(RtdFlag::hasEntranceAndExit)) { // Entrance styles were introduced with AA. They correspond directly with those in RCT2. @@ -1346,7 +1345,7 @@ namespace OpenRCT2::RCT1 void ImportPeep(::Peep* dst, const RCT1::Peep* src) { - dst->AnimationObjectIndex = OBJECT_ENTRY_INDEX_NULL; + dst->AnimationObjectIndex = kObjectEntryIndexNull; auto rct12AnimGroup = RCT1::GetPeepAnimationGroup(src->AnimationGroup); dst->AnimationGroup = static_cast<::PeepAnimationGroup>(rct12AnimGroup); @@ -1716,7 +1715,7 @@ namespace OpenRCT2::RCT1 auto dst2 = dst->AsTrack(); auto src2 = src->AsTrack(); const auto* ride = GetRide(RCT12RideIdToOpenRCT2RideId(src2->GetRideIndex())); - auto rideType = (ride != nullptr) ? ride->type : RIDE_TYPE_NULL; + auto rideType = (ride != nullptr) ? ride->type : kRideTypeNull; auto rct1RideType = _s4.Rides[src2->GetRideIndex()].Type; dst2->SetTrackType(RCT1TrackTypeToOpenRCT2(src2->GetTrackType(), rideType)); @@ -1847,13 +1846,13 @@ namespace OpenRCT2::RCT1 auto edgeSlope = GetWallSlopeFromEdgeSlope(slope, edge & 3); if (edgeSlope & (EDGE_SLOPE_UPWARDS | EDGE_SLOPE_DOWNWARDS)) { - clearanceZ += LAND_HEIGHT_STEP; + clearanceZ += kLandHeightStep; } if (edgeSlope & EDGE_SLOPE_ELEVATED) { edgeSlope &= ~EDGE_SLOPE_ELEVATED; - baseZ += LAND_HEIGHT_STEP; - clearanceZ += LAND_HEIGHT_STEP; + baseZ += kLandHeightStep; + clearanceZ += kLandHeightStep; } dst->SetType(TileElementType::Wall); @@ -1974,8 +1973,7 @@ namespace OpenRCT2::RCT1 { uint8_t rct1SceneryTheme = researchItem.Item; auto sceneryGroupEntryIndex = _sceneryThemeTypeToEntryMap[rct1SceneryTheme]; - if (sceneryGroupEntryIndex != ObjectEntryIndexIgnore - && sceneryGroupEntryIndex != OBJECT_ENTRY_INDEX_NULL) + if (sceneryGroupEntryIndex != ObjectEntryIndexIgnore && sceneryGroupEntryIndex != kObjectEntryIndexNull) { ResearchInsertSceneryGroupEntry(sceneryGroupEntryIndex, researched); } @@ -1988,7 +1986,7 @@ namespace OpenRCT2::RCT1 auto ownRideEntryIndex = _rideTypeToRideEntryMap[EnumValue(rct1RideType)]; Guard::Assert( - ownRideEntryIndex != OBJECT_ENTRY_INDEX_NULL, "ownRideEntryIndex was OBJECT_ENTRY_INDEX_NULL"); + ownRideEntryIndex != kObjectEntryIndexNull, "ownRideEntryIndex was kObjectEntryIndexNull"); bool foundOwnType = false; // If the ride type does not use vehicles, no point looking for them in the research list. @@ -2161,7 +2159,7 @@ namespace OpenRCT2::RCT1 { uint8_t vehicle = researchItem.Item; // RCT1 research sometimes contain vehicles that aren’t actually researched. - // In such cases, `_vehicleTypeToRideEntryMap` will return OBJECT_ENTRY_INDEX_NULL. This is expected. + // In such cases, `_vehicleTypeToRideEntryMap` will return kObjectEntryIndexNull. This is expected. auto rideEntryIndex = _vehicleTypeToRideEntryMap[vehicle]; if (rideEntryIndex < std::size(_researchRideEntryUsed) && !_researchRideEntryUsed[rideEntryIndex]) @@ -2303,7 +2301,7 @@ namespace OpenRCT2::RCT1 { auto entryIndex = _rideTypeToRideEntryMap[srcItem]; - if (entryIndex != OBJECT_ENTRY_INDEX_NULL) + if (entryIndex != kObjectEntryIndexNull) { const auto* rideEntry = GetRideEntryByIndex(entryIndex); @@ -2322,7 +2320,7 @@ namespace OpenRCT2::RCT1 { auto entryIndex = _vehicleTypeToRideEntryMap[srcItem]; - if (entryIndex != OBJECT_ENTRY_INDEX_NULL) + if (entryIndex != kObjectEntryIndexNull) { const auto* rideEntry = GetRideEntryByIndex(entryIndex); @@ -2341,7 +2339,7 @@ namespace OpenRCT2::RCT1 { auto entryIndex = _sceneryThemeTypeToEntryMap[srcItem]; - if (entryIndex != ObjectEntryIndexIgnore && entryIndex != OBJECT_ENTRY_INDEX_NULL) + if (entryIndex != ObjectEntryIndexIgnore && entryIndex != kObjectEntryIndexNull) { dst->entryIndex = entryIndex; dst->type = Research::EntryType::Scenery; @@ -2476,7 +2474,7 @@ namespace OpenRCT2::RCT1 if (type < std::size(_bannerTypeToEntryMap)) type = _bannerTypeToEntryMap[type]; else - type = OBJECT_ENTRY_INDEX_NULL; + type = kObjectEntryIndexNull; dst->type = type; dst->flags = 0; @@ -2662,7 +2660,7 @@ namespace OpenRCT2::RCT1 } } - return RIDE_TYPE_NULL; + return kRideTypeNull; } }; diff --git a/src/openrct2/rct1/Tables.cpp b/src/openrct2/rct1/Tables.cpp index 534b32cea05e..acd10dbbb4fb 100644 --- a/src/openrct2/rct1/Tables.cpp +++ b/src/openrct2/rct1/Tables.cpp @@ -235,11 +235,11 @@ namespace OpenRCT2::RCT1 RIDE_TYPE_MINI_HELICOPTERS, // RCT1_RIDE_TYPE_CYCLE_MONORAIL RIDE_TYPE_LAY_DOWN_ROLLER_COASTER, // RCT1_RIDE_TYPE_FLYING_ROLLER_COASTER RIDE_TYPE_SUSPENDED_MONORAIL, // RCT1_RIDE_TYPE_SUSPENDED_MONORAIL - RIDE_TYPE_NULL, // RCT1_RIDE_TYPE_40 + kRideTypeNull, // RCT1_RIDE_TYPE_40 RIDE_TYPE_REVERSER_ROLLER_COASTER, // RCT1_RIDE_TYPE_WOODEN_REVERSER_ROLLER_COASTER RIDE_TYPE_HEARTLINE_TWISTER_COASTER, // RCT1_RIDE_TYPE_HEARTLINE_TWISTER_ROLLER_COASTER RIDE_TYPE_MINI_GOLF, // RCT1_RIDE_TYPE_MINIATURE_GOLF - RIDE_TYPE_NULL, // RCT1_RIDE_TYPE_44 + kRideTypeNull, // RCT1_RIDE_TYPE_44 RIDE_TYPE_ROTO_DROP, // RCT1_RIDE_TYPE_ROTO_DROP RIDE_TYPE_FLYING_SAUCERS, // RCT1_RIDE_TYPE_FLYING_SAUCERS RIDE_TYPE_CROOKED_HOUSE, // RCT1_RIDE_TYPE_CROOKED_HOUSE diff --git a/src/openrct2/rct12/RCT12.cpp b/src/openrct2/rct12/RCT12.cpp index 5e1e54edcc47..c564cbe9ed92 100644 --- a/src/openrct2/rct12/RCT12.cpp +++ b/src/openrct2/rct12/RCT12.cpp @@ -107,7 +107,7 @@ uint8_t RCT12SurfaceElement::GetOwnership() const uint32_t RCT12SurfaceElement::GetWaterHeight() const { - return (Terrain & RCT12_TILE_ELEMENT_SURFACE_WATER_HEIGHT_MASK) * WATER_HEIGHT_STEP; + return (Terrain & RCT12_TILE_ELEMENT_SURFACE_WATER_HEIGHT_MASK) * kWaterHeightStep; } uint8_t RCT12SurfaceElement::GetParkFences() const @@ -511,8 +511,8 @@ bool RCT12ResearchItem::IsRandomEndMarker() const ObjectEntryIndex RCTEntryIndexToOpenRCT2EntryIndex(const RCT12ObjectEntryIndex index) { - if (index == RCT12_OBJECT_ENTRY_INDEX_NULL) - return OBJECT_ENTRY_INDEX_NULL; + if (index == RCT12_kObjectEntryIndexNull) + return kObjectEntryIndexNull; return index; } @@ -835,8 +835,8 @@ void AppendRequiredObjects(ObjectList& objectList, ObjectType objectType, const money64 RCT12CompletedCompanyValueToOpenRCT2(money32 origValue) { - if (origValue == RCT12_COMPANY_VALUE_ON_FAILED_OBJECTIVE) - return COMPANY_VALUE_ON_FAILED_OBJECTIVE; + if (origValue == kRCT12CompanyValueOnFailedObjective) + return kCompanyValueOnFailedObjective; return ToMoney64(origValue); } diff --git a/src/openrct2/rct12/RCT12.h b/src/openrct2/rct12/RCT12.h index 145689d7b1cc..4d61f2d2cf82 100644 --- a/src/openrct2/rct12/RCT12.h +++ b/src/openrct2/rct12/RCT12.h @@ -338,7 +338,7 @@ constexpr uint16_t RCT12_TILE_ELEMENT_LARGE_TYPE_MASK = 0x3FF; constexpr uint16_t const RCT12_XY8_UNDEFINED = 0xFFFF; using RCT12ObjectEntryIndex = uint8_t; -constexpr RCT12ObjectEntryIndex RCT12_OBJECT_ENTRY_INDEX_NULL = 255; +constexpr RCT12ObjectEntryIndex RCT12_kObjectEntryIndexNull = 255; // Everything before this point has been researched constexpr uint32_t RCT12_RESEARCHED_ITEMS_SEPARATOR = 0xFFFFFFFF; @@ -1259,7 +1259,7 @@ void AppendRequiredObjects(ObjectList& objectList, ObjectType objectType, const void AppendRequiredObjects(ObjectList& objectList, ObjectType objectType, const OpenRCT2::RCT12::EntryList& entryList); bool IsUserStringID(StringId stringId); -static constexpr money32 RCT12_COMPANY_VALUE_ON_FAILED_OBJECTIVE = 0x80000001; +static constexpr money32 kRCT12CompanyValueOnFailedObjective = 0x80000001; money64 RCT12CompletedCompanyValueToOpenRCT2(money32 origValue); diff --git a/src/openrct2/rct12/ScenarioPatcher.cpp b/src/openrct2/rct12/ScenarioPatcher.cpp index a6850adb6464..12a43e2e276d 100644 --- a/src/openrct2/rct12/ScenarioPatcher.cpp +++ b/src/openrct2/rct12/ScenarioPatcher.cpp @@ -636,13 +636,13 @@ static void ApplyPathFixes(const json_t& scenarioPatch) auto railingsObjIndex = objectManager.GetLoadedObjectEntryIndex(railings); auto surfaceObjIndex = objectManager.GetLoadedObjectEntryIndex(surface); - if (railingsObjIndex == OBJECT_ENTRY_INDEX_NULL) + if (railingsObjIndex == kObjectEntryIndexNull) { OpenRCT2::Guard::Assert(0, "Railings object not found"); return; } - if (surfaceObjIndex == OBJECT_ENTRY_INDEX_NULL) + if (surfaceObjIndex == kObjectEntryIndexNull) { OpenRCT2::Guard::Assert(0, "Surface object not found"); return; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 6097ad1b3a8a..cc5af8ced027 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -640,7 +640,7 @@ namespace OpenRCT2::RCT2 for (uint8_t index = 0; index < Limits::kMaxRidesInPark; index++) { auto src = &_s6.Rides[index]; - if (src->Type != RIDE_TYPE_NULL) + if (src->Type != kRideTypeNull) { const auto rideId = RideId::FromUnderlying(index); auto dst = RideAllocateAtIndex(rideId); @@ -666,7 +666,7 @@ namespace OpenRCT2::RCT2 for (uint8_t index = 0; index < Limits::kMaxRidesInPark; index++) { auto src = &_s6.Rides[index]; - if (src->Type == RIDE_TYPE_NULL) + if (src->Type == kRideTypeNull) continue; auto subtype = RCTEntryIndexToOpenRCT2EntryIndex(src->Subtype); @@ -973,7 +973,7 @@ namespace OpenRCT2::RCT2 } } - auto musicStyle = OBJECT_ENTRY_INDEX_NULL; + auto musicStyle = kObjectEntryIndexNull; if (GetRideTypeDescriptor(dst->type).HasFlag(RtdFlag::allowMusic)) { musicStyle = src->Music; @@ -981,7 +981,7 @@ namespace OpenRCT2::RCT2 dst->music = musicStyle; // In SV7, "plain" entrances are invisible. - auto entranceStyle = OBJECT_ENTRY_INDEX_NULL; + auto entranceStyle = kObjectEntryIndexNull; if (!_isSV7 && GetRideTypeDescriptor(dst->type).HasFlag(RtdFlag::hasEntranceAndExit)) { entranceStyle = src->EntranceStyle; @@ -1021,7 +1021,7 @@ namespace OpenRCT2::RCT2 dst.ProximityStart = { src.ProximityStartX, src.ProximityStartY, src.ProximityStartZ }; dst.CurrentRide = RCT12RideIdToOpenRCT2RideId(src.CurrentRide); dst.State = src.State; - if (src.CurrentRide < Limits::kMaxRidesInPark && _s6.Rides[src.CurrentRide].Type < std::size(RideTypeDescriptors)) + if (src.CurrentRide < Limits::kMaxRidesInPark && _s6.Rides[src.CurrentRide].Type < std::size(kRideTypeDescriptors)) { dst.ProximityTrackType = RCT2TrackTypeToOpenRCT2( src.ProximityTrackType, _s6.Rides[src.CurrentRide].Type, IsFlatRide(src.CurrentRide)); @@ -1312,7 +1312,7 @@ namespace OpenRCT2::RCT2 auto pathEntryIndex = src2->GetEntryIndex(); auto surfaceEntry = src2->IsQueue() ? _pathToQueueSurfaceMap[pathEntryIndex] : _pathToSurfaceMap[pathEntryIndex]; - if (surfaceEntry == OBJECT_ENTRY_INDEX_NULL) + if (surfaceEntry == kObjectEntryIndexNull) { // Legacy footpath object dst2->SetLegacyPathEntryIndex(pathEntryIndex); @@ -1433,7 +1433,7 @@ namespace OpenRCT2::RCT2 { auto pathEntryIndex = src2->GetPathType(); auto surfaceEntry = _pathToSurfaceMap[pathEntryIndex]; - if (surfaceEntry == OBJECT_ENTRY_INDEX_NULL) + if (surfaceEntry == kObjectEntryIndexNull) { // Legacy footpath object dst2->SetLegacyPathEntryIndex(pathEntryIndex); @@ -1446,7 +1446,7 @@ namespace OpenRCT2::RCT2 } else { - dst2->SetSurfaceEntryIndex(OBJECT_ENTRY_INDEX_NULL); + dst2->SetSurfaceEntryIndex(kObjectEntryIndexNull); } break; } @@ -1650,7 +1650,7 @@ namespace OpenRCT2::RCT2 dst->SubState = src->SubState; // TODO - dst->AnimationObjectIndex = OBJECT_ENTRY_INDEX_NULL; + dst->AnimationObjectIndex = kObjectEntryIndexNull; dst->AnimationGroup = static_cast(src->AnimationGroup); dst->TshirtColour = src->TshirtColour; @@ -1799,9 +1799,9 @@ namespace OpenRCT2::RCT2 ObjectList GetRequiredObjects() { - std::fill(std::begin(_pathToSurfaceMap), std::end(_pathToSurfaceMap), OBJECT_ENTRY_INDEX_NULL); - std::fill(std::begin(_pathToQueueSurfaceMap), std::end(_pathToQueueSurfaceMap), OBJECT_ENTRY_INDEX_NULL); - std::fill(std::begin(_pathToRailingMap), std::end(_pathToRailingMap), OBJECT_ENTRY_INDEX_NULL); + std::fill(std::begin(_pathToSurfaceMap), std::end(_pathToSurfaceMap), kObjectEntryIndexNull); + std::fill(std::begin(_pathToQueueSurfaceMap), std::end(_pathToQueueSurfaceMap), kObjectEntryIndexNull); + std::fill(std::begin(_pathToRailingMap), std::end(_pathToRailingMap), kObjectEntryIndexNull); ObjectList objectList; int objectIt = 0; @@ -1827,7 +1827,7 @@ namespace OpenRCT2::RCT2 // We have surface objects for this footpath auto surfaceIndex = objectList.Find( ObjectType::FootpathSurface, footpathMapping->NormalSurface); - if (surfaceIndex == OBJECT_ENTRY_INDEX_NULL) + if (surfaceIndex == kObjectEntryIndexNull) { objectList.SetObject( ObjectType::FootpathSurface, surfaceCount, footpathMapping->NormalSurface); @@ -1836,7 +1836,7 @@ namespace OpenRCT2::RCT2 _pathToSurfaceMap[i] = surfaceIndex; surfaceIndex = objectList.Find(ObjectType::FootpathSurface, footpathMapping->QueueSurface); - if (surfaceIndex == OBJECT_ENTRY_INDEX_NULL) + if (surfaceIndex == kObjectEntryIndexNull) { objectList.SetObject( ObjectType::FootpathSurface, surfaceCount, footpathMapping->QueueSurface); @@ -1845,7 +1845,7 @@ namespace OpenRCT2::RCT2 _pathToQueueSurfaceMap[i] = surfaceIndex; auto railingIndex = objectList.Find(ObjectType::FootpathRailings, footpathMapping->Railing); - if (railingIndex == OBJECT_ENTRY_INDEX_NULL) + if (railingIndex == kObjectEntryIndexNull) { objectList.SetObject(ObjectType::FootpathRailings, railingCount, footpathMapping->Railing); railingIndex = railingCount++; diff --git a/src/openrct2/ride/CableLift.cpp b/src/openrct2/ride/CableLift.cpp index 00613a67cd4b..07772f90774e 100644 --- a/src/openrct2/ride/CableLift.cpp +++ b/src/openrct2/ride/CableLift.cpp @@ -28,7 +28,7 @@ Vehicle* CableLiftSegmentCreate( { Vehicle* current = CreateEntity(); current->ride = ride.id; - current->ride_subtype = OBJECT_ENTRY_INDEX_NULL; + current->ride_subtype = kObjectEntryIndexNull; if (head) { ride.cable_lift = current->Id; diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index 95e908452ad9..ae1855e57b13 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -174,7 +174,7 @@ Ride& RideGetTemporaryForPreview() static void RideReset(Ride& ride) { ride.id = RideId::GetNull(); - ride.type = RIDE_TYPE_NULL; + ride.type = kRideTypeNull; ride.custom_name = {}; ride.measurement = {}; } @@ -185,7 +185,7 @@ void RideDelete(RideId id) const auto idx = id.ToUnderlying(); assert(idx < gs.Rides.size()); - assert(gs.Rides[idx].type != RIDE_TYPE_NULL); + assert(gs.Rides[idx].type != kRideTypeNull); auto& ride = gs.Rides[idx]; RideReset(ride); @@ -213,7 +213,7 @@ Ride* GetRide(RideId index) } auto& ride = gameState.Rides[idx]; - if (ride.type != RIDE_TYPE_NULL) + if (ride.type != kRideTypeNull) { assert(ride.id == index); return &ride; @@ -1894,7 +1894,7 @@ static bool RideMusicBreakdownEffect(Ride& ride) if (ride.breakdown_sound_modifier == 255) { - ride.music_tune_id = TUNE_ID_NULL; + ride.music_tune_id = kTuneIDNull; return true; } } @@ -1912,7 +1912,7 @@ void CircusMusicUpdate(Ride& ride) if (vehicle == nullptr || vehicle->status != Vehicle::Status::DoingCircusShow) { ride.music_position = 0; - ride.music_tune_id = TUNE_ID_NULL; + ride.music_tune_id = kTuneIDNull; return; } @@ -1936,7 +1936,7 @@ void DefaultMusicUpdate(Ride& ride) { if (ride.status != RideStatus::Open || !(ride.lifecycle_flags & RIDE_LIFECYCLE_MUSIC)) { - ride.music_tune_id = TUNE_ID_NULL; + ride.music_tune_id = kTuneIDNull; return; } @@ -1946,7 +1946,7 @@ void DefaultMusicUpdate(Ride& ride) } // Select random tune from available tunes for a music style (of course only merry-go-rounds have more than one tune) - if (ride.music_tune_id == TUNE_ID_NULL) + if (ride.music_tune_id == kTuneIDNull) { auto& objManager = GetContext()->GetObjectManager(); auto musicObj = objManager.GetLoadedObject(ride.music); @@ -2016,7 +2016,7 @@ static void RideMeasurementUpdate(Ride& ride, RideMeasurement& measurement) if (vehicle->velocity == 0) return; - if (measurement.current_item >= RideMeasurement::MAX_ITEMS) + if (measurement.current_item >= RideMeasurement::kMaxItems) return; const auto currentTicks = GetGameState().CurrentTicks; @@ -3581,7 +3581,7 @@ static void RideCreateVehiclesFindFirstBlock(const Ride& ride, CoordsXYE* outXYE ResultWithMessage Ride::CreateVehicles(const CoordsXYE& element, bool isApplying) { UpdateMaxVehicles(); - if (subtype == OBJECT_ENTRY_INDEX_NULL) + if (subtype == kObjectEntryIndexNull) { return { true }; } @@ -4024,7 +4024,7 @@ TrackElement* Ride::GetOriginElement(StationIndex stationIndex) const ResultWithMessage Ride::Test(bool isApplying) { - if (type == RIDE_TYPE_NULL) + if (type == kRideTypeNull) { LOG_WARNING("Invalid ride type for ride %u", id.ToUnderlying()); return { false }; @@ -4072,7 +4072,7 @@ ResultWithMessage Ride::Test(bool isApplying) ResultWithMessage Ride::Simulate(bool isApplying) { CoordsXYE trackElement, problematicTrackElement = {}; - if (type == RIDE_TYPE_NULL) + if (type == kRideTypeNull) { LOG_WARNING("Invalid ride type for ride %u", id.ToUnderlying()); return { false }; @@ -4271,7 +4271,7 @@ bool Ride::NameExists(std::string_view name, RideId excludeRideId) int32_t RideGetRandomColourPresetIndex(ride_type_t rideType) { - if (rideType >= std::size(RideTypeDescriptors)) + if (rideType >= std::size(kRideTypeDescriptors)) { return 0; } @@ -5059,7 +5059,7 @@ static int32_t RideGetTrackLength(const Ride& ride) */ void Ride::UpdateMaxVehicles() { - if (subtype == OBJECT_ENTRY_INDEX_NULL) + if (subtype == kObjectEntryIndexNull) return; const auto* rideEntry = GetRideEntryByIndex(subtype); @@ -5512,7 +5512,7 @@ ObjectEntryIndex RideGetEntryIndex(ride_type_t rideType, ObjectEntryIndex rideSu { auto subType = rideSubType; - if (subType == OBJECT_ENTRY_INDEX_NULL) + if (subType == kObjectEntryIndexNull) { auto& objManager = GetContext()->GetObjectManager(); auto& rideEntries = objManager.GetAllRideEntries(rideType); @@ -5524,7 +5524,7 @@ ObjectEntryIndex RideGetEntryIndex(ride_type_t rideType, ObjectEntryIndex rideSu const auto* rideEntry = GetRideEntryByIndex(rideEntryIndex); if (rideEntry == nullptr) { - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; } // Can happen in select-by-track-type mode @@ -5758,7 +5758,7 @@ void Ride::FormatNameTo(Formatter& ft) const uint64_t Ride::GetAvailableModes() const { if (GetGameState().Cheats.showAllOperatingModes) - return AllRideModesAvailable; + return kAllRideModesAvailable; return GetRideTypeDescriptor().RideModes; } @@ -5770,7 +5770,7 @@ const RideTypeDescriptor& Ride::GetRideTypeDescriptor() const uint8_t Ride::GetNumShelteredSections() const { - return num_sheltered_sections & ShelteredSectionsBits::NumShelteredSectionsMask; + return num_sheltered_sections & ShelteredSectionsBits::kNumShelteredSectionsMask; } void Ride::IncreaseNumShelteredSections() @@ -5778,7 +5778,7 @@ void Ride::IncreaseNumShelteredSections() auto newNumShelteredSections = GetNumShelteredSections(); if (newNumShelteredSections != 0x1F) newNumShelteredSections++; - num_sheltered_sections &= ~ShelteredSectionsBits::NumShelteredSectionsMask; + num_sheltered_sections &= ~ShelteredSectionsBits::kNumShelteredSectionsMask; num_sheltered_sections |= newNumShelteredSections; } @@ -5939,7 +5939,7 @@ ResultWithMessage Ride::ChangeStatusCheckTrackValidity(const CoordsXYE& trackEle } } - if (subtype != OBJECT_ENTRY_INDEX_NULL && !GetGameState().Cheats.enableAllDrawableTrackPieces) + if (subtype != kObjectEntryIndexNull && !GetGameState().Cheats.enableAllDrawableTrackPieces) { const auto* rideEntry = GetRideEntryByIndex(subtype); if (rideEntry == nullptr) diff --git a/src/openrct2/ride/Ride.h b/src/openrct2/ride/Ride.h index 6ea063cb6462..99a62f3e4af2 100644 --- a/src/openrct2/ride/Ride.h +++ b/src/openrct2/ride/Ride.h @@ -46,11 +46,11 @@ struct TrackElement; constexpr uint8_t kRideAdjacencyCheckDistance = 5; -constexpr uint8_t TUNE_ID_NULL = 0xFF; +constexpr uint8_t kTuneIDNull = 0xFF; -constexpr uint16_t MAX_STATION_LOCATIONS = OpenRCT2::Limits::kMaxStationsPerRide * 2; // Entrance and exit per station +constexpr uint16_t kMaxStationLocations = OpenRCT2::Limits::kMaxStationsPerRide * 2; // Entrance and exit per station -constexpr uint16_t MAZE_CLEARANCE_HEIGHT = 4 * kCoordsZStep; +constexpr uint16_t kMazeClearanceHeight = 4 * kCoordsZStep; constexpr uint8_t kRideMaxDropsCount = 63; constexpr uint8_t kRideNumDropsMask = 0b00111111; @@ -86,7 +86,7 @@ struct RideStation struct RideMeasurement { - static constexpr size_t MAX_ITEMS = 4800; + static constexpr size_t kMaxItems = 4800; uint8_t flags{}; uint32_t last_use_tick{}; @@ -94,10 +94,10 @@ struct RideMeasurement uint16_t current_item{}; uint8_t vehicle_index{}; StationIndex current_station{}; - int8_t vertical[MAX_ITEMS]{}; - int8_t lateral[MAX_ITEMS]{}; - uint8_t velocity[MAX_ITEMS]{}; - uint8_t altitude[MAX_ITEMS]{}; + int8_t vertical[kMaxItems]{}; + int8_t lateral[kMaxItems]{}; + uint8_t velocity[kMaxItems]{}; + uint8_t altitude[kMaxItems]{}; }; enum class RideClassification @@ -109,9 +109,9 @@ enum class RideClassification namespace OpenRCT2::ShelteredSectionsBits { - constexpr uint8_t NumShelteredSectionsMask = 0b00011111; - constexpr uint8_t RotatingWhileSheltered = 0b00100000; - constexpr uint8_t BankingWhileSheltered = 0b01000000; + constexpr uint8_t kNumShelteredSectionsMask = 0b00011111; + constexpr uint8_t kRotatingWhileSheltered = 0b00100000; + constexpr uint8_t kBankingWhileSheltered = 0b01000000; }; // namespace OpenRCT2::ShelteredSectionsBits struct TrackDesign; @@ -128,10 +128,10 @@ enum class RideStatus : uint8_t; struct Ride { RideId id{ RideId::GetNull() }; - ride_type_t type{ RIDE_TYPE_NULL }; + ride_type_t type{ kRideTypeNull }; // pointer to static info. for example, wild mouse type is 0x36, subtype is // 0x4c. - ObjectEntryIndex subtype{ OBJECT_ENTRY_INDEX_NULL }; + ObjectEntryIndex subtype{ kObjectEntryIndexNull }; RideMode mode{}; VehicleColourSettings vehicleColourSettings{}; VehicleColour vehicle_colours[OpenRCT2::Limits::kMaxVehicleColours]{}; @@ -265,8 +265,8 @@ struct Ride money64 income_per_hour{}; money64 profit{}; TrackColour track_colour[kNumRideColourSchemes]{}; - ObjectEntryIndex music{ OBJECT_ENTRY_INDEX_NULL }; - ObjectEntryIndex entrance_style{ OBJECT_ENTRY_INDEX_NULL }; + ObjectEntryIndex music{ kObjectEntryIndexNull }; + ObjectEntryIndex entrance_style{ kObjectEntryIndexNull }; uint16_t vehicle_change_timeout{}; uint8_t num_block_brakes{}; uint8_t lift_hill_speed{}; diff --git a/src/openrct2/ride/RideAudio.cpp b/src/openrct2/ride/RideAudio.cpp index 6d0053d47ca3..d55f85f23195 100644 --- a/src/openrct2/ride/RideAudio.cpp +++ b/src/openrct2/ride/RideAudio.cpp @@ -305,7 +305,7 @@ namespace OpenRCT2::RideAudio } else { - ride.music_tune_id = TUNE_ID_NULL; + ride.music_tune_id = kTuneIDNull; ride.music_position = 0; } } @@ -329,7 +329,7 @@ namespace OpenRCT2::RideAudio } else { - ride.music_tune_id = TUNE_ID_NULL; + ride.music_tune_id = kTuneIDNull; ride.music_position = 0; } } @@ -353,7 +353,7 @@ namespace OpenRCT2::RideAudio { // We had a real music channel, but it isn't playing anymore, so stop the track ride.music_position = 0; - ride.music_tune_id = TUNE_ID_NULL; + ride.music_tune_id = kTuneIDNull; } } else diff --git a/src/openrct2/ride/RideConstruction.cpp b/src/openrct2/ride/RideConstruction.cpp index 000a34435e7d..7460477bc71b 100644 --- a/src/openrct2/ride/RideConstruction.cpp +++ b/src/openrct2/ride/RideConstruction.cpp @@ -1257,7 +1257,7 @@ void Ride::ValidateStations() } } // determine what entrances and exits exist - sfl::static_vector locations; + sfl::static_vector locations; for (auto& station : stations) { if (!station.Entrance.IsNull()) diff --git a/src/openrct2/ride/RideData.cpp b/src/openrct2/ride/RideData.cpp index 16530ec139c0..cba4f979be8e 100644 --- a/src/openrct2/ride/RideData.cpp +++ b/src/openrct2/ride/RideData.cpp @@ -129,7 +129,7 @@ using namespace OpenRCT2::Entity::Yaw; // clang-format off -const CarEntry CableLiftVehicle = { +const CarEntry kCableLiftVehicle = { .TabRotationMask = 31, .spacing = 0, .car_mass = 0, @@ -208,13 +208,13 @@ const CarEntry CableLiftVehicle = { }; /* rct2: 0x009A0AA0 */ -const uint16_t RideFilmLength[3] = { +const uint16_t kRideFilmLength[3] = { 5000, // MOUSE_TAILS 6000, // STORM_CHASERS 7000, // SPACE_RAIDERS }; -const StringId RideModeNames[] = { +const StringId kRideModeNames[] = { STR_RIDE_MODE_NORMAL, STR_RIDE_MODE_CONTINUOUS_CIRCUIT, STR_RIDE_MODE_REVERSE_INCLINE_LAUNCHED_SHUTTLE, @@ -255,7 +255,7 @@ const StringId RideModeNames[] = { }; // clang-format on -constexpr RideTypeDescriptor RideTypeDescriptors[RIDE_TYPE_COUNT] = { +constexpr RideTypeDescriptor kRideTypeDescriptors[RIDE_TYPE_COUNT] = { /* RIDE_TYPE_SPIRAL_ROLLER_COASTER */ SpiralRollerCoasterRTD, /* RIDE_TYPE_STAND_UP_ROLLER_COASTER */ StandUpRollerCoasterRTD, /* RIDE_TYPE_SUSPENDED_SWINGING_COASTER */ SuspendedSwingingCoasterRTD, @@ -285,12 +285,12 @@ constexpr RideTypeDescriptor RideTypeDescriptors[RIDE_TYPE_COUNT] = { /* RIDE_TYPE_SWINGING_SHIP */ SwingingShipRTD, /* RIDE_TYPE_SWINGING_INVERTER_SHIP */ SwingingInverterShipRTD, /* RIDE_TYPE_FOOD_STALL */ FoodStallRTD, - /* RIDE_TYPE_1D */ DummyRTD, + /* RIDE_TYPE_1D */ kDummyRTD, /* RIDE_TYPE_DRINK_STALL */ DrinkStallRTD, - /* RIDE_TYPE_1F */ DummyRTD, + /* RIDE_TYPE_1F */ kDummyRTD, /* RIDE_TYPE_SHOP */ ShopRTD, /* RIDE_TYPE_MERRY_GO_ROUND */ MerryGoRoundRTD, - /* RIDE_TYPE_22 */ DummyRTD, + /* RIDE_TYPE_22 */ kDummyRTD, /* RIDE_TYPE_INFORMATION_KIOSK */ InformationKioskRTD, /* RIDE_TYPE_TOILETS */ ToiletsRTD, /* RIDE_TYPE_FERRIS_WHEEL */ FerrisWheelRTD, @@ -336,16 +336,16 @@ constexpr RideTypeDescriptor RideTypeDescriptors[RIDE_TYPE_COUNT] = { /* RIDE_TYPE_MAGIC_CARPET */ MagicCarpetRTD, /* RIDE_TYPE_SUBMARINE_RIDE */ SubmarineRideRTD, /* RIDE_TYPE_RIVER_RAFTS */ RiverRaftsRTD, - /* RIDE_TYPE_50 */ DummyRTD, + /* RIDE_TYPE_50 */ kDummyRTD, /* RIDE_TYPE_ENTERPRISE */ EnterpriseRTD, - /* RIDE_TYPE_52 */ DummyRTD, - /* RIDE_TYPE_53 */ DummyRTD, - /* RIDE_TYPE_54 */ DummyRTD, - /* RIDE_TYPE_55 */ DummyRTD, + /* RIDE_TYPE_52 */ kDummyRTD, + /* RIDE_TYPE_53 */ kDummyRTD, + /* RIDE_TYPE_54 */ kDummyRTD, + /* RIDE_TYPE_55 */ kDummyRTD, /* RIDE_TYPE_INVERTED_IMPULSE_COASTER */ InvertedImpulseCoasterRTD, /* RIDE_TYPE_MINI_ROLLER_COASTER */ MiniRollerCoasterRTD, /* RIDE_TYPE_MINE_RIDE */ MineRideRTD, - /* RIDE_TYPE_59 */ DummyRTD, + /* RIDE_TYPE_59 */ kDummyRTD, /* RIDE_TYPE_LIM_LAUNCHED_ROLLER_COASTER */ LIMLaunchedRollerCoasterRTD, /* RIDE_TYPE_HYPERCOASTER, */ HypercoasterRTD, /* RIDE_TYPE_HYPER_TWISTER, */ HyperTwisterRTD, diff --git a/src/openrct2/ride/RideData.h b/src/openrct2/ride/RideData.h index d82ea4b07ad0..d852df29fef9 100644 --- a/src/openrct2/ride/RideData.h +++ b/src/openrct2/ride/RideData.h @@ -16,8 +16,8 @@ __VA_ARGS__ \ } \ } -#define DEFAULT_FLAT_RIDE_COLOUR_PRESET TRACK_COLOUR_PRESETS({ COLOUR_BRIGHT_RED, COLOUR_LIGHT_BLUE, COLOUR_YELLOW }) -#define DEFAULT_STALL_COLOUR_PRESET TRACK_COLOUR_PRESETS({ COLOUR_BRIGHT_RED, COLOUR_BRIGHT_RED, COLOUR_BRIGHT_RED }) +#define kDefaultFlatRideColourPreset TRACK_COLOUR_PRESETS({ COLOUR_BRIGHT_RED, COLOUR_LIGHT_BLUE, COLOUR_YELLOW }) +#define kDefaultStallColourPreset TRACK_COLOUR_PRESETS({ COLOUR_BRIGHT_RED, COLOUR_BRIGHT_RED, COLOUR_BRIGHT_RED }) #include "../audio/audio.h" #include "../core/BitSet.hpp" @@ -39,13 +39,13 @@ enum class ResearchCategory : uint8_t; -constexpr uint8_t DefaultFoodStallHeight = 8 * kCoordsZStep; -constexpr uint8_t DefaultDrinksStallHeight = 8 * kCoordsZStep; -constexpr uint8_t DefaultShopHeight = 8 * kCoordsZStep; -constexpr uint8_t DefaultToiletHeight = 4 * kCoordsZStep; -constexpr uint8_t DefaultInformationKioskHeight = 6 * kCoordsZStep; -constexpr uint8_t DefaultFirstAidHeight = 6 * kCoordsZStep; -constexpr uint8_t DefaultCashMachineHeight = 8 * kCoordsZStep; +constexpr uint8_t kDefaultFoodStallHeight = 8 * kCoordsZStep; +constexpr uint8_t kDefaultDrinksStallHeight = 8 * kCoordsZStep; +constexpr uint8_t kDefaultShopHeight = 8 * kCoordsZStep; +constexpr uint8_t kDefaultToiletHeight = 4 * kCoordsZStep; +constexpr uint8_t kDefaultInformationKioskHeight = 6 * kCoordsZStep; +constexpr uint8_t kDefaultFirstAidHeight = 6 * kCoordsZStep; +constexpr uint8_t kDefaultCashMachineHeight = 8 * kCoordsZStep; struct RideComponentName { @@ -543,10 +543,10 @@ struct RideTypeDescriptor int32_t GetUnifiedBoosterSpeed(int32_t relativeSpeed) const; }; -extern const RideTypeDescriptor RideTypeDescriptors[RIDE_TYPE_COUNT]; +extern const RideTypeDescriptor kRideTypeDescriptors[RIDE_TYPE_COUNT]; // clang-format off -constexpr RideComponentName RideComponentNames[] = +constexpr RideComponentName kRideComponentNames[] = { { STR_RIDE_COMPONENT_TRAIN, STR_RIDE_COMPONENT_TRAIN_PLURAL, STR_RIDE_COMPONENT_TRAIN_CAPITALISED, STR_RIDE_COMPONENT_TRAIN_CAPITALISED_PLURAL, STR_RIDE_COMPONENT_TRAIN_COUNT, STR_RIDE_COMPONENT_TRAIN_COUNT_PLURAL, STR_RIDE_COMPONENT_TRAIN_NO }, { STR_RIDE_COMPONENT_BOAT, STR_RIDE_COMPONENT_BOAT_PLURAL, STR_RIDE_COMPONENT_BOAT_CAPITALISED, STR_RIDE_COMPONENT_BOAT_CAPITALISED_PLURAL, STR_RIDE_COMPONENT_BOAT_COUNT, STR_RIDE_COMPONENT_BOAT_COUNT_PLURAL, STR_RIDE_COMPONENT_BOAT_NO }, @@ -565,27 +565,27 @@ constexpr RideComponentName RideComponentNames[] = }; // clang-format on -constexpr std::string_view MUSIC_OBJECT_DODGEMS = "rct2.music.dodgems"; -constexpr std::string_view MUSIC_OBJECT_EGYPTIAN = "rct2.music.egyptian"; -constexpr std::string_view MUSIC_OBJECT_FAIRGROUND = "rct2.music.fairground"; -constexpr std::string_view MUSIC_OBJECT_GENTLE = "rct2.music.gentle"; -constexpr std::string_view MUSIC_OBJECT_HORROR = "rct2.music.horror"; -constexpr std::string_view MUSIC_OBJECT_PIRATE = "rct2.music.pirate"; -constexpr std::string_view MUSIC_OBJECT_ROCK_1 = "rct2.music.rock1"; -constexpr std::string_view MUSIC_OBJECT_ROCK_2 = "rct2.music.rock2"; -constexpr std::string_view MUSIC_OBJECT_ROCK_3 = "rct2.music.rock3"; -constexpr std::string_view MUSIC_OBJECT_SUMMER = "rct2.music.summer"; -constexpr std::string_view MUSIC_OBJECT_TECHNO = "rct2.music.techno"; -constexpr std::string_view MUSIC_OBJECT_WATER = "rct2.music.water"; -constexpr std::string_view MUSIC_OBJECT_WILD_WEST = "rct2.music.wildwest"; -constexpr std::string_view MUSIC_OBJECT_MODERN = "rct2.music.modern"; +constexpr std::string_view kMusicObjectDodgems = "rct2.music.dodgems"; +constexpr std::string_view kMusicObjectEgyptian = "rct2.music.egyptian"; +constexpr std::string_view kMusicObjectFairground = "rct2.music.fairground"; +constexpr std::string_view kMusicObjectGentle = "rct2.music.gentle"; +constexpr std::string_view kMusicObjectHorror = "rct2.music.horror"; +constexpr std::string_view kMusicObjectPirate = "rct2.music.pirate"; +constexpr std::string_view kMusicObjectRock1 = "rct2.music.rock1"; +constexpr std::string_view kMusicObjectRock2 = "rct2.music.rock2"; +constexpr std::string_view kMusicObjectRock3 = "rct2.music.rock3"; +constexpr std::string_view kMusicObjectSummer = "rct2.music.summer"; +constexpr std::string_view kMusicObjectTechno = "rct2.music.techno"; +constexpr std::string_view kMusicObjectWater = "rct2.music.water"; +constexpr std::string_view kMusicObjectWildWest = "rct2.music.wildwest"; +constexpr std::string_view kMusicObjectModern = "rct2.music.modern"; constexpr const RideComponentName& GetRideComponentName(const RideComponentType type) { - return RideComponentNames[EnumValue(type)]; + return kRideComponentNames[EnumValue(type)]; } -constexpr uint64_t AllRideModesAvailable = EnumsToFlags( +constexpr uint64_t kAllRideModesAvailable = EnumsToFlags( RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned, RideMode::ReverseInclineLaunchedShuttle, RideMode::PoweredLaunchPasstrough, RideMode::Shuttle, RideMode::Normal, RideMode::BoatHire, RideMode::UpwardLaunch, RideMode::RotatingLift, RideMode::StationToStation, RideMode::SingleRidePerAdmission, RideMode::UnlimitedRidesPerAdmission, @@ -596,14 +596,14 @@ constexpr uint64_t AllRideModesAvailable = EnumsToFlags( RideMode::Circus, RideMode::DownwardLaunch, RideMode::CrookedHouse, RideMode::FreefallDrop, RideMode::PoweredLaunch, RideMode::PoweredLaunchBlockSectioned); -extern const CarEntry CableLiftVehicle; +extern const CarEntry kCableLiftVehicle; -extern const uint16_t RideFilmLength[3]; +extern const uint16_t kRideFilmLength[3]; -extern const StringId RideModeNames[EnumValue(RideMode::Count)]; +extern const StringId kRideModeNames[EnumValue(RideMode::Count)]; // clang-format off -constexpr RideTypeDescriptor DummyRTD = +constexpr RideTypeDescriptor kDummyRTD = { .Category = RIDE_CATEGORY_NONE, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, @@ -626,10 +626,10 @@ constexpr RideTypeDescriptor DummyRTD = .UpkeepCosts = { 50, 1, 0, 0, 0, 0 }, .BuildCosts = { 0.00_GBP, 0.00_GBP, 1 }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_GENTLE, + .DefaultMusic = kMusicObjectGentle, .PhotoItem = ShopItem::Photo, .BonusValue = 0, - .ColourPresets = DEFAULT_FLAT_RIDE_COLOUR_PRESET, + .ColourPresets = kDefaultFlatRideColourPreset, .ColourPreview = { kSpriteIdNull, kSpriteIdNull }, .ColourKey = RideColourKey::Ride, .Name = "invalid", @@ -656,15 +656,15 @@ constexpr RideTypeDescriptor DummyRTD = constexpr const RideTypeDescriptor& GetRideTypeDescriptor(ride_type_t rideType) { - if (rideType >= std::size(RideTypeDescriptors)) - return DummyRTD; + if (rideType >= std::size(kRideTypeDescriptors)) + return kDummyRTD; - return RideTypeDescriptors[rideType]; + return kRideTypeDescriptors[rideType]; } constexpr bool RideTypeIsValid(ride_type_t rideType) { - return rideType < std::size(RideTypeDescriptors); + return rideType < std::size(kRideTypeDescriptors); } bool IsTrackEnabled(TrackGroup trackGroup); diff --git a/src/openrct2/ride/RideEntry.h b/src/openrct2/ride/RideEntry.h index c8787a0a782d..3a26a41c0a7d 100644 --- a/src/openrct2/ride/RideEntry.h +++ b/src/openrct2/ride/RideEntry.h @@ -20,7 +20,7 @@ // Set to 255 on all tracked ride entries static uint8_t constexpr NoFlatRideCars = 0xFF; -static ride_type_t constexpr RIDE_TYPE_NULL = 0xFF; +static ride_type_t constexpr kRideTypeNull = 0xFF; struct RideNaming { @@ -92,11 +92,11 @@ struct RideObjectEntry { for (const auto& currentRideType : ride_type) { - if (currentRideType != RIDE_TYPE_NULL) + if (currentRideType != kRideTypeNull) return currentRideType; } - return RIDE_TYPE_NULL; + return kRideTypeNull; } }; diff --git a/src/openrct2/ride/RideRatings.cpp b/src/openrct2/ride/RideRatings.cpp index de9127ae8aa1..e291022b9acb 100644 --- a/src/openrct2/ride/RideRatings.cpp +++ b/src/openrct2/ride/RideRatings.cpp @@ -83,7 +83,7 @@ struct ShelteredEights }; // Amount of updates allowed per updating state on the current tick. -// The total amount would be MaxRideRatingSubSteps * RideRatingMaxUpdateStates which +// The total amount would be MaxRideRatingSubSteps * kRideRatingMaxUpdateStates which // would be currently 80, this is the worst case of sub-steps and may break out earlier. static constexpr size_t MaxRideRatingUpdateSubSteps = 20; @@ -1661,13 +1661,13 @@ static RatingTuple ride_ratings_get_sheltered_ratings(const Ride& ride) /*eax = (ride.var_11C * 30340) >> 16;*/ /*nausea += eax;*/ - if (ride.num_sheltered_sections & ShelteredSectionsBits::BankingWhileSheltered) + if (ride.num_sheltered_sections & ShelteredSectionsBits::kBankingWhileSheltered) { excitement += 20; nausea += 15; } - if (ride.num_sheltered_sections & ShelteredSectionsBits::RotatingWhileSheltered) + if (ride.num_sheltered_sections & ShelteredSectionsBits::kRotatingWhileSheltered) { excitement += 20; nausea += 15; diff --git a/src/openrct2/ride/RideRatings.h b/src/openrct2/ride/RideRatings.h index 4e2f93d87f7a..4fac7b9542f2 100644 --- a/src/openrct2/ride/RideRatings.h +++ b/src/openrct2/ride/RideRatings.h @@ -61,8 +61,8 @@ struct RideRatingUpdateState uint16_t StationFlags; }; -static constexpr size_t RideRatingMaxUpdateStates = 4; -using RideRatingUpdateStates = std::array; +static constexpr size_t kRideRatingMaxUpdateStates = 4; +using RideRatingUpdateStates = std::array; void RideRatingResetUpdateStates(); diff --git a/src/openrct2/ride/TrackData.cpp b/src/openrct2/ride/TrackData.cpp index c9dcc0139c56..93f801be70c6 100644 --- a/src/openrct2/ride/TrackData.cpp +++ b/src/openrct2/ride/TrackData.cpp @@ -28,7 +28,7 @@ namespace OpenRCT2::TrackMetaData }; // clang-format off - static constexpr TrackCoordinates _trackCoordinates[] = { + static constexpr TrackCoordinates kTrackCoordinates[] = { { 0, 0, 0, 0, 0, 0 }, // ELEM_FLAT { 0, 0, 0, 0, 0, 0 }, // ELEM_END_STATION { 0, 0, 0, 0, 0, 0 }, // ELEM_BEGIN_STATION @@ -379,9 +379,9 @@ namespace OpenRCT2::TrackMetaData { 0, 7,152, 0, -96, -32 }, // TrackElemType::LeftEighthDiveLoopDownToDiag { 0, 4,152, 0, -96, 32 }, // TrackElemType::RightEighthDiveLoopDownToDiag }; - static_assert(std::size(_trackCoordinates) == EnumValue(TrackElemType::Count)); + static_assert(std::size(kTrackCoordinates) == EnumValue(TrackElemType::Count)); - static constexpr uint8_t TrackPieceLengths[] = { + static constexpr uint8_t kTrackPieceLengths[] = { 32, // TrackElemType::Flat 32, // TrackElemType::EndStation 32, // TrackElemType::BeginStation @@ -733,10 +733,10 @@ namespace OpenRCT2::TrackMetaData 165, // TrackElemType::RightEighthDiveLoopDownToDiag }; - static_assert(std::size(TrackPieceLengths) == EnumValue(TrackElemType::Count)); + static_assert(std::size(kTrackPieceLengths) == EnumValue(TrackElemType::Count)); // rct2: 0x00998C95 - static constexpr TrackCurveChain gTrackCurveChain[] = { + static constexpr TrackCurveChain kTrackCurveChain[] = { { TrackCurve::None, TrackCurve::None }, { TrackElemType::EndStation, TrackElemType::EndStation }, { TrackElemType::EndStation, TrackElemType::EndStation }, @@ -1087,7 +1087,7 @@ namespace OpenRCT2::TrackMetaData { TrackCurve::None, TrackElemType::RightEighthDiveLoopUpToOrthogonal }, // TrackElemType::LeftEighthDiveLoopDownToDiag { TrackCurve::None, TrackElemType::LeftEighthDiveLoopUpToOrthogonal }, // TrackElemType::RightEighthDiveLoopDownToDiag }; - static_assert(std::size(gTrackCurveChain) == EnumValue(TrackElemType::Count)); + static_assert(std::size(kTrackCurveChain) == EnumValue(TrackElemType::Count)); const TrackDescriptor gTrackDescriptors[186] = { { true, TrackPitch::Down60, TrackRoll::None, TrackCurve::None, TrackPitch::Down60, TrackRoll::None, TrackElemType::DiagDown60 }, @@ -1279,7 +1279,7 @@ namespace OpenRCT2::TrackMetaData }; /** rct2: 0x00993D1C */ - static constexpr OpenRCT2::TrackElemType AlternativeTrackTypes[] = { + static constexpr OpenRCT2::TrackElemType kAlternativeTrackTypes[] = { TrackElemType::FlatCovered, // TrackElemType::Flat TrackElemType::None, TrackElemType::None, @@ -1630,10 +1630,10 @@ namespace OpenRCT2::TrackMetaData TrackElemType::None, // TrackElemType::LeftEighthDiveLoopDownToDiag TrackElemType::None, // TrackElemType::RightEighthDiveLoopDownToDiag }; - static_assert(std::size(AlternativeTrackTypes) == EnumValue(TrackElemType::Count)); + static_assert(std::size(kAlternativeTrackTypes) == EnumValue(TrackElemType::Count)); /** rct2: 0x0099DA34 */ - static constexpr money64 TrackPricing[] = { + static constexpr money64 kTrackPricing[] = { 65536, // TrackElemType::Flat 98304, // TrackElemType::EndStation 98304, // TrackElemType::BeginStation @@ -1984,10 +1984,10 @@ namespace OpenRCT2::TrackMetaData 458752, // TrackElemType::LeftEighthDiveLoopDownToDiag 458752, // TrackElemType::RightEighthDiveLoopDownToDiag }; - static_assert(std::size(TrackPricing) == EnumValue(TrackElemType::Count)); + static_assert(std::size(kTrackPricing) == EnumValue(TrackElemType::Count)); /** rct2: 0x0099EA1C */ - static constexpr OpenRCT2::TrackElemType TrackElementMirrorMap[] = { + static constexpr OpenRCT2::TrackElemType kTrackElementMirrorMap[] = { TrackElemType::Flat, TrackElemType::EndStation, TrackElemType::BeginStation, @@ -2338,10 +2338,10 @@ namespace OpenRCT2::TrackMetaData TrackElemType::RightEighthDiveLoopDownToDiag, // TrackElemType::LeftEighthDiveLoopDownToDiag TrackElemType::LeftEighthDiveLoopDownToDiag, // TrackElemType::RightEighthDiveLoopDownToDiag }; - static_assert(std::size(TrackElementMirrorMap) == EnumValue(TrackElemType::Count)); + static_assert(std::size(kTrackElementMirrorMap) == EnumValue(TrackElemType::Count)); /** rct2: 0x00999694 */ - static constexpr uint32_t TrackHeightMarkerPositions[] = { + static constexpr uint32_t kTrackHeightMarkerPositions[] = { (1 << 0), // TrackElemType::Flat (1 << 0), // TrackElemType::EndStation (1 << 0), // TrackElemType::BeginStation @@ -2692,13 +2692,13 @@ namespace OpenRCT2::TrackMetaData (1 << 0) | (1 << 5), // TrackElemType::LeftEighthDiveLoopDownToDiag (1 << 0) | (1 << 5), // TrackElemType::RightEighthDiveLoopDownToDiag }; - static_assert(std::size(TrackHeightMarkerPositions) == EnumValue(TrackElemType::Count)); + static_assert(std::size(kTrackHeightMarkerPositions) == EnumValue(TrackElemType::Count)); /** rct2: 0x0099423C */ - static constexpr uint32_t TrackFlags[] = { + static constexpr uint32_t kTrackFlags[] = { /* TrackElemType::Flat */ TRACK_ELEM_FLAG_ALLOW_LIFT_HILL, /* TrackElemType::EndStation */ 0, /* TrackElemType::BeginStation */ 0, @@ -3049,12 +3049,12 @@ namespace OpenRCT2::TrackMetaData /* TrackElemType::LeftEighthDiveLoopDownToDiag */ TRACK_ELEM_FLAG_DOWN | TRACK_ELEM_FLAG_STARTS_AT_HALF_HEIGHT | TRACK_ELEM_FLAG_INVERSION_TO_NORMAL, /* TrackElemType::RightEighthDiveLoopDownToDiag */ TRACK_ELEM_FLAG_DOWN | TRACK_ELEM_FLAG_STARTS_AT_HALF_HEIGHT | TRACK_ELEM_FLAG_INVERSION_TO_NORMAL, }; - static_assert(std::size(TrackFlags) == EnumValue(TrackElemType::Count)); + static_assert(std::size(kTrackFlags) == EnumValue(TrackElemType::Count)); // clang-format on /** rct2: 0x00997C9D */ // clang-format off - static constexpr TrackDefinition TrackDefinitions[] = + static constexpr TrackDefinition kTrackDefinitions[] = { // TYPE VANGLE END VANGLE START BANK END BANK START PREVIEW Z OFFSET { TrackGroup::straight, TrackPitch::None, TrackPitch::None, TrackRoll::None, TrackRoll::None, 0 }, // TrackElemType::Flat @@ -3407,11 +3407,11 @@ namespace OpenRCT2::TrackMetaData { TrackGroup::diveLoop, TrackPitch::Down60, TrackPitch::None, TrackRoll::None, TrackRoll::UpsideDown, -56 }, // TrackElemType::LeftEighthDiveLoopDownToDiag { TrackGroup::diveLoop, TrackPitch::Down60, TrackPitch::None, TrackRoll::None, TrackRoll::UpsideDown, -56 }, // TrackElemType::RightEighthDiveLoopDownToDiag }; - static_assert(std::size(TrackDefinitions) == EnumValue(TrackElemType::Count)); + static_assert(std::size(kTrackDefinitions) == EnumValue(TrackElemType::Count)); // clang-format on - constexpr static SpinFunction TrackTypeToSpinFunction[] = { + constexpr static SpinFunction kTrackTypeToSpinFunction[] = { SpinFunction::None, SpinFunction::None, SpinFunction::None, SpinFunction::None, SpinFunction::None, SpinFunction::None, SpinFunction::None, SpinFunction::None, SpinFunction::None, SpinFunction::None, SpinFunction::None, SpinFunction::None, SpinFunction::None, SpinFunction::None, SpinFunction::None, SpinFunction::None, SpinFunction::L8, SpinFunction::R8, @@ -3472,7 +3472,7 @@ namespace OpenRCT2::TrackMetaData SpinFunction::None, SpinFunction::None, SpinFunction::None, SpinFunction::L9, SpinFunction::R9, SpinFunction::L9, SpinFunction::R9 }; - static_assert(std::size(TrackTypeToSpinFunction) == EnumValue(TrackElemType::Count)); + static_assert(std::size(kTrackTypeToSpinFunction) == EnumValue(TrackElemType::Count)); #pragma region GForces @@ -4482,7 +4482,7 @@ namespace OpenRCT2::TrackMetaData #pragma endregion - static constexpr StringId RideConfigurationStringIds[] = { + static constexpr StringId kRideConfigurationStringIds[] = { kStringIdEmpty, // 0 STR_STATION_PLATFORM, // 1 kStringIdEmpty, // 2 @@ -4833,7 +4833,7 @@ namespace OpenRCT2::TrackMetaData STR_DIVE_LOOP_LEFT, // TrackElemType::LeftEighthDiveLoopDownToDiag STR_DIVE_LOOP_RIGHT, // TrackElemType::RightEighthDiveLoopDownToDiag }; - static_assert(std::size(RideConfigurationStringIds) == EnumValue(TrackElemType::Count)); + static_assert(std::size(kRideConfigurationStringIds) == EnumValue(TrackElemType::Count)); #pragma region trackBlocks @@ -13060,17 +13060,17 @@ namespace OpenRCT2::TrackMetaData for (int i = 0; i < EnumValue(TrackElemType::Count); i++) { TrackElementDescriptor& desc = res[i]; - desc.description = RideConfigurationStringIds[i]; - desc.alternativeType = AlternativeTrackTypes[i]; - desc.coordinates = _trackCoordinates[i]; - desc.curveChain = gTrackCurveChain[i]; - desc.flags = TrackFlags[i]; - desc.heightMarkerPositions = TrackHeightMarkerPositions[i]; - desc.mirrorElement = TrackElementMirrorMap[i]; - desc.pieceLength = TrackPieceLengths[i]; - desc.priceModifier = TrackPricing[i]; - desc.definition = TrackDefinitions[i]; - desc.spinFunction = TrackTypeToSpinFunction[i]; + desc.description = kRideConfigurationStringIds[i]; + desc.alternativeType = kAlternativeTrackTypes[i]; + desc.coordinates = kTrackCoordinates[i]; + desc.curveChain = kTrackCurveChain[i]; + desc.flags = kTrackFlags[i]; + desc.heightMarkerPositions = kTrackHeightMarkerPositions[i]; + desc.mirrorElement = kTrackElementMirrorMap[i]; + desc.pieceLength = kTrackPieceLengths[i]; + desc.priceModifier = kTrackPricing[i]; + desc.definition = kTrackDefinitions[i]; + desc.spinFunction = kTrackTypeToSpinFunction[i]; desc.verticalFactor = GetVerticalFunction(static_cast(i)); desc.lateralFactor = GetLateralFunction(static_cast(i)); desc.numSequences = kSequenceDescriptorsByElement[i].numSequences; @@ -13084,13 +13084,13 @@ namespace OpenRCT2::TrackMetaData return res; } - static constexpr auto _trackElementDescriptors = BuildDescriptorTable(); + static constexpr auto kTrackElementDescriptors = BuildDescriptorTable(); const TrackElementDescriptor& GetTrackElementDescriptor(OpenRCT2::TrackElemType type) { - if (EnumValue(type) >= _trackElementDescriptors.size()) - return _trackElementDescriptors[0]; - return _trackElementDescriptors[EnumValue(type)]; + if (EnumValue(type) >= kTrackElementDescriptors.size()) + return kTrackElementDescriptors[0]; + return kTrackElementDescriptors[EnumValue(type)]; } } // namespace OpenRCT2::TrackMetaData diff --git a/src/openrct2/ride/TrackDesign.cpp b/src/openrct2/ride/TrackDesign.cpp index 3326069dd4b1..5ff455185440 100644 --- a/src/openrct2/ride/TrackDesign.cpp +++ b/src/openrct2/ride/TrackDesign.cpp @@ -365,9 +365,9 @@ ResultWithMessage TrackDesign::CreateTrackDesignMaze(TrackDesignState& tds, cons // x is defined here as we can start the search // on tile start_x, start_y but then the next row // must restart on 0 - for (int32_t y = startLoc.y, x = startLoc.x; y < MAXIMUM_MAP_SIZE_BIG; y += kCoordsXYStep) + for (int32_t y = startLoc.y, x = startLoc.x; y < kMaximumMapSizeBig; y += kCoordsXYStep) { - for (; x < MAXIMUM_MAP_SIZE_BIG; x += kCoordsXYStep) + for (; x < kMaximumMapSizeBig; x += kCoordsXYStep) { auto tileElement = MapGetFirstElementAt(CoordsXY{ x, y }); do @@ -467,9 +467,9 @@ ResultWithMessage TrackDesign::CreateTrackDesignMaze(TrackDesignState& tds, cons CoordsXYE TrackDesign::MazeGetFirstElement(const Ride& ride) { CoordsXYE tile{}; - for (tile.y = 0; tile.y < MAXIMUM_MAP_SIZE_BIG; tile.y += kCoordsXYStep) + for (tile.y = 0; tile.y < kMaximumMapSizeBig; tile.y += kCoordsXYStep) { - for (tile.x = 0; tile.x < MAXIMUM_MAP_SIZE_BIG; tile.x += kCoordsXYStep) + for (tile.x = 0; tile.x < kMaximumMapSizeBig; tile.x += kCoordsXYStep) { tile.element = MapGetFirstElementAt(CoordsXY{ tile.x, tile.y }); do @@ -638,8 +638,8 @@ static void TrackDesignLoadSceneryObjects(const TrackDesign& td) struct TrackSceneryEntry { ObjectType Type = ObjectType::None; - ObjectEntryIndex Index = OBJECT_ENTRY_INDEX_NULL; - ObjectEntryIndex SecondaryIndex = OBJECT_ENTRY_INDEX_NULL; // For footpath railing + ObjectEntryIndex Index = kObjectEntryIndexNull; + ObjectEntryIndex SecondaryIndex = kObjectEntryIndexNull; // For footpath railing }; static ObjectEntryIndex TrackDesignGetDefaultSurfaceIndex(bool isQueue) @@ -662,7 +662,7 @@ static ObjectEntryIndex TrackDesignGetDefaultSurfaceIndex(bool isQueue) return i; } } - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; } static ObjectEntryIndex TrackDesignGetDefaultRailingIndex() @@ -675,7 +675,7 @@ static ObjectEntryIndex TrackDesignGetDefaultRailingIndex() return i; } } - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; } static std::optional TrackDesignPlaceSceneryElementGetEntry(const TrackDesignSceneryElement& scenery) @@ -708,12 +708,12 @@ static std::optional TrackDesignPlaceSceneryElementGetEntry(c result.SecondaryIndex = objectMgr.GetLoadedObjectEntryIndex(ObjectEntryDescriptor(footpathMapping->Railing)); } - if (result.Index == OBJECT_ENTRY_INDEX_NULL) + if (result.Index == kObjectEntryIndexNull) result.Index = TrackDesignGetDefaultSurfaceIndex(scenery.isQueue()); - if (result.SecondaryIndex == OBJECT_ENTRY_INDEX_NULL) + if (result.SecondaryIndex == kObjectEntryIndexNull) result.SecondaryIndex = TrackDesignGetDefaultRailingIndex(); - if (result.Index == OBJECT_ENTRY_INDEX_NULL || result.SecondaryIndex == OBJECT_ENTRY_INDEX_NULL) + if (result.Index == kObjectEntryIndexNull || result.SecondaryIndex == kObjectEntryIndexNull) { _trackDesignPlaceStateSceneryUnavailable = true; return {}; @@ -1499,10 +1499,10 @@ static GameActions::Result TrackDesignPlaceMaze( int16_t surfaceZ = surfaceElement->GetBaseZ(); if (surfaceElement->GetSlope() & kTileSlopeRaisedCornersMask) { - surfaceZ += LAND_HEIGHT_STEP; + surfaceZ += kLandHeightStep; if (surfaceElement->GetSlope() & kTileSlopeDiagonalFlag) { - surfaceZ += LAND_HEIGHT_STEP; + surfaceZ += kLandHeightStep; } } @@ -1667,10 +1667,10 @@ static GameActions::Result TrackDesignPlaceRide( int32_t surfaceZ = surfaceElement->GetBaseZ(); if (surfaceElement->GetSlope() & kTileSlopeRaisedCornersMask) { - surfaceZ += LAND_HEIGHT_STEP; + surfaceZ += kLandHeightStep; if (surfaceElement->GetSlope() & kTileSlopeDiagonalFlag) { - surfaceZ += LAND_HEIGHT_STEP; + surfaceZ += kLandHeightStep; } } @@ -1895,7 +1895,7 @@ static bool TrackDesignPlacePreview( ride->custom_name = {}; ride->entrance_style = objManager.GetLoadedObjectEntryIndex(td.appearance.stationObjectIdentifier); - if (ride->entrance_style == OBJECT_ENTRY_INDEX_NULL) + if (ride->entrance_style == kObjectEntryIndexNull) { ride->entrance_style = gameState.LastEntranceStyle; } @@ -1946,7 +1946,7 @@ static bool TrackDesignPlacePreview( if (res.Error == GameActions::Status::Ok) { - if (entry_index == OBJECT_ENTRY_INDEX_NULL) + if (entry_index == kObjectEntryIndexNull) { gameStateData.setFlag(TrackDesignGameStateFlag::VehicleUnavailable, true); } diff --git a/src/openrct2/ride/TrackDesignRepository.cpp b/src/openrct2/ride/TrackDesignRepository.cpp index 2abb5982c84d..c2bd99c39fd8 100644 --- a/src/openrct2/ride/TrackDesignRepository.cpp +++ b/src/openrct2/ride/TrackDesignRepository.cpp @@ -32,7 +32,7 @@ struct TrackRepositoryItem { std::string Name; std::string Path; - ride_type_t RideType = RIDE_TYPE_NULL; + ride_type_t RideType = kRideTypeNull; std::string ObjectEntry; uint32_t Flags = 0; }; diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index c46255ef8346..123a289ce293 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -1981,7 +1981,7 @@ void PaintTrack(PaintSession& session, Direction direction, int32_t height, cons const auto* originElement = ride->GetOriginElement(StationIndex::FromUnderlying(0)); if (originElement != nullptr && originElement->GetTrackType() == TrackElemType::FlatTrack1x1B) LightFx::AddKioskLights(session.MapPosition, height, zOffset); - else if (RideTypeDescriptors[ride->type].HasFlag(RtdFlag::isShopOrFacility)) + else if (kRideTypeDescriptors[ride->type].HasFlag(RtdFlag::isShopOrFacility)) LightFx::AddShopLights(session.MapPosition, trackElement.GetDirection(), height, zOffset); } diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index 4da220dc4b40..06b5676a1036 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -72,12 +72,12 @@ using namespace OpenRCT2::TrackMetaData; using namespace OpenRCT2::Math::Trigonometry; static bool vehicle_boat_is_location_accessible(const CoordsXYZ& location); -constexpr int16_t VEHICLE_MAX_SPIN_SPEED = 1536; -constexpr int16_t VEHICLE_MIN_SPIN_SPEED = -VEHICLE_MAX_SPIN_SPEED; -constexpr int16_t VEHICLE_MAX_SPIN_SPEED_FOR_STOPPING = 700; -constexpr int16_t VEHICLE_MAX_SPIN_SPEED_WATER_RIDE = 512; -constexpr int16_t VEHICLE_MIN_SPIN_SPEED_WATER_RIDE = -VEHICLE_MAX_SPIN_SPEED_WATER_RIDE; -constexpr int16_t VEHICLE_STOPPING_SPIN_SPEED = 600; +constexpr int16_t kVehicleMaxSpinSpeed = 1536; +constexpr int16_t kVehicleMinSpinSpeed = -kVehicleMaxSpinSpeed; +constexpr int16_t kVehicleMaxSpinSpeedForStopping = 700; +constexpr int16_t kVehicleMaxSpinSpeedWaterRide = 512; +constexpr int16_t kVehicleMinSpinSpeedWaterRide = -kVehicleMaxSpinSpeedWaterRide; +constexpr int16_t kVehicleStoppingSpinSpeed = 600; constexpr uint8_t kTrackSpeedShiftAmount = 16; constexpr uint8_t kBoosterAccelerationShiftAmount = 16; @@ -109,7 +109,7 @@ static constexpr OpenRCT2::Audio::SoundId _screamSet2[] = { }; // clang-format off -static constexpr uint8_t SpaceRingsTimeToSpriteMap[] = +static constexpr uint8_t kSpaceRingsTimeToSpriteMap[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, @@ -244,21 +244,21 @@ static constexpr uint8_t SpaceRingsTimeToSpriteMap[] = }; // clang-format on -static constexpr int8_t SwingingTimeToSpriteMap_0[] = { +static constexpr int8_t kSwingingTimeToSpriteMap0[] = { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, 0, 0, -128, }; -static constexpr int8_t SwingingTimeToSpriteMap_1[] = { +static constexpr int8_t kSwingingTimeToSpriteMap1[] = { 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, -1, -1, -1, -1, -2, -2, -2, -2, -2, -3, -3, -3, -3, -3, -3, -4, -4, -4, -4, -4, -4, -4, -4, -4, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -4, -4, -4, -4, -4, -4, -4, -4, -4, -3, -3, -3, -3, -3, -3, -2, -2, -2, -2, -2, -1, -1, -1, -1, 0, -128, }; -static constexpr int8_t SwingingTimeToSpriteMap_2[] = { +static constexpr int8_t kSwingingTimeToSpriteMap2[] = { 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 0, 0, 0, @@ -266,7 +266,7 @@ static constexpr int8_t SwingingTimeToSpriteMap_2[] = { -6, -6, -6, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -6, -6, -6, -6, -6, -6, -6, -6, -5, -5, -5, -5, -5, -5, -4, -4, -4, -4, -4, -3, -3, -3, -3, -2, -2, -2, -1, -1, -1, 0, -128, }; -static constexpr int8_t SwingingTimeToSpriteMap_3[] = { +static constexpr int8_t kSwingingTimeToSpriteMap3[] = { 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 3, 3, 2, 2, 1, 1, 0, 0, -1, @@ -274,7 +274,7 @@ static constexpr int8_t SwingingTimeToSpriteMap_3[] = { -8, -8, -8, -8, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -8, -8, -8, -8, -8, -8, -8, -8, -7, -7, -7, -7, -7, -7, -6, -6, -6, -6, -6, -5, -5, -5, -5, -4, -4, -4, -3, -3, -2, -2, -1, -1, 0, -128, }; -static constexpr int8_t SwingingTimeToSpriteMap_4[] = { +static constexpr int8_t kSwingingTimeToSpriteMap4[] = { 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, @@ -284,7 +284,7 @@ static constexpr int8_t SwingingTimeToSpriteMap_4[] = { -7, -7, -7, -7, -7, -7, -7, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -5, -5, -5, -5, -5, -5, -5, -4, -4, -4, -4, -4, -3, -3, -3, -3, -3, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, 0, 0, -128, }; -static constexpr int8_t SwingingTimeToSpriteMap_5[] = { +static constexpr int8_t kSwingingTimeToSpriteMap5[] = { 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, @@ -299,7 +299,7 @@ static constexpr int8_t SwingingTimeToSpriteMap_5[] = { -11, -11, -10, -10, -10, -10, -9, -9, -9, -9, -8, -8, -8, -8, -7, -7, -7, -7, -6, -6, -6, -6, -5, -5, -5, -5, -4, -4, -4, -4, -3, -3, -3, -3, -2, -2, -2, -2, -1, -1, -1, -1, 0, 0, -128, }; -static constexpr int8_t SwingingTimeToSpriteMap_6[] = { +static constexpr int8_t kSwingingTimeToSpriteMap6[] = { 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, @@ -317,7 +317,7 @@ static constexpr int8_t SwingingTimeToSpriteMap_6[] = { -14, -13, -13, -13, -12, -12, -12, -11, -11, -11, -10, -10, -10, -9, -9, -9, -8, -8, -8, -7, -7, -7, -6, -6, -6, -5, -5, -5, -4, -4, -4, -3, -3, -3, -2, -2, -2, -1, -1, -1, 0, 0, -128, }; -static constexpr int8_t SwingingTimeToSpriteMap_7[] = { +static constexpr int8_t kSwingingTimeToSpriteMap7[] = { 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 21, 22, 22, @@ -329,7 +329,7 @@ static constexpr int8_t SwingingTimeToSpriteMap_7[] = { -13, -13, -12, -12, -12, -11, -11, -11, -10, -10, -10, -9, -9, -9, -8, -8, -8, -7, -7, -7, -6, -6, -6, -5, -5, -5, -4, -4, -4, -3, -3, -3, -2, -2, -2, -1, -1, -1, 0, 0, -128, }; -static constexpr int8_t SwingingTimeToSpriteMap_8[] = { +static constexpr int8_t kSwingingTimeToSpriteMap8[] = { 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, @@ -339,7 +339,7 @@ static constexpr int8_t SwingingTimeToSpriteMap_8[] = { 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 0, 0, -128, }; -static constexpr int8_t SwingingTimeToSpriteMap_9[] = { +static constexpr int8_t kSwingingTimeToSpriteMap9[] = { 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, @@ -349,7 +349,7 @@ static constexpr int8_t SwingingTimeToSpriteMap_9[] = { 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 0, 0, -128, }; -static constexpr int8_t SwingingTimeToSpriteMap_10[] = { +static constexpr int8_t kSwingingTimeToSpriteMap10[] = { 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, @@ -363,7 +363,7 @@ static constexpr int8_t SwingingTimeToSpriteMap_10[] = { 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 27, 28, 28, 28, 28, 29, 29, 29, 29, 30, 30, 30, 30, 31, 31, 31, 31, 0, 0, -128, }; -static constexpr int8_t SwingingTimeToSpriteMap_11[] = { +static constexpr int8_t kSwingingTimeToSpriteMap11[] = { 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, @@ -372,9 +372,9 @@ static constexpr int8_t SwingingTimeToSpriteMap_11[] = { /** rct2: 0x0099F9D0 */ static constexpr const int8_t* SwingingTimeToSpriteMaps[] = { - SwingingTimeToSpriteMap_0, SwingingTimeToSpriteMap_1, SwingingTimeToSpriteMap_2, SwingingTimeToSpriteMap_3, - SwingingTimeToSpriteMap_4, SwingingTimeToSpriteMap_5, SwingingTimeToSpriteMap_6, SwingingTimeToSpriteMap_7, - SwingingTimeToSpriteMap_8, SwingingTimeToSpriteMap_9, SwingingTimeToSpriteMap_10, SwingingTimeToSpriteMap_11, + kSwingingTimeToSpriteMap0, kSwingingTimeToSpriteMap1, kSwingingTimeToSpriteMap2, kSwingingTimeToSpriteMap3, + kSwingingTimeToSpriteMap4, kSwingingTimeToSpriteMap5, kSwingingTimeToSpriteMap6, kSwingingTimeToSpriteMap7, + kSwingingTimeToSpriteMap8, kSwingingTimeToSpriteMap9, kSwingingTimeToSpriteMap10, kSwingingTimeToSpriteMap11, }; struct Unk9A36C4Struct @@ -385,7 +385,7 @@ struct Unk9A36C4Struct }; /** rct2: 0x009A36C4 */ -static constexpr Unk9A36C4Struct Unk9A36C4[] = { +static constexpr Unk9A36C4Struct kUnk9A36C4[] = { { -1, 0, 8716 }, { -1, 0, 8716 }, { -1, 0, 8716 }, { -1, 1, 12327 }, { -1, 1, 12327 }, { -1, 1, 12327 }, { 0, 1, 8716 }, { -1, 1, 12327 }, { 0, 1, 8716 }, { 0, 1, 8716 }, { 0, 1, 8716 }, { 1, 1, 12327 }, { 1, 1, 12327 }, { 1, 1, 12327 }, { 1, 0, 8716 }, { 1, 1, 12327 }, { 1, 0, 8716 }, { 1, 0, 8716 }, @@ -395,7 +395,7 @@ static constexpr Unk9A36C4Struct Unk9A36C4[] = { }; /** rct2: 0x009A37C4 */ -static constexpr CoordsXY SurroundingTiles[] = { +static constexpr CoordsXY kSurroundingTiles[] = { { 0, 0 }, { 0, +kCoordsXYStep }, { +kCoordsXYStep, 0 }, @@ -408,7 +408,7 @@ static constexpr CoordsXY SurroundingTiles[] = { }; /** rct2: 0x009A37E4 */ -static constexpr int32_t Unk9A37E4[] = { +static constexpr int32_t kUnk9A37E4[] = { 2147483647, 2106585154, 1985590284, 1636362342, 1127484953, 2106585154, 1985590284, 1636362342, 1127484953, 58579923, 0, -555809667, -1073741824, -1518500249, -1859775391, -2074309916, -2147483647, 58579923, 0, -555809667, -1073741824, -1518500249, -1859775391, -2074309916, 1859775393, 1073741824, 0, @@ -419,7 +419,7 @@ static constexpr int32_t Unk9A37E4[] = { }; /** rct2: 0x009A38D4 */ -static constexpr int32_t Unk9A38D4[] = { +static constexpr int32_t kUnk9A38D4[] = { 0, 417115092, 817995863, 1390684831, 1827693544, -417115092, -817995863, -1390684831, -1827693544, 2066040965, 2147483647, 2074309916, 1859775393, 1518500249, 1073741824, 555809666, 0, -2066040965, -2147483647, -2074309916, -1859775393, -1518500249, -1073741824, -555809666, 1073741824, 1859775393, 2147483647, @@ -430,25 +430,25 @@ static constexpr int32_t Unk9A38D4[] = { }; /** rct2: 0x009A39C4 */ -static constexpr int32_t Unk9A39C4[] = { +static constexpr int32_t kUnk9A39C4[] = { 2147483647, 2096579710, 1946281152, 2096579710, 1946281152, 1380375879, 555809667, -372906620, -1231746017, -1859775391, 1380375879, 555809667, -372906620, -1231746017, -1859775391, 0, 2096579710, 1946281152, 2096579710, 1946281152, }; -static constexpr CoordsXY AvoidCollisionMoveOffset[] = { +static constexpr CoordsXY kAvoidCollisionMoveOffset[] = { { -1, 0 }, { 0, 1 }, { 1, 0 }, { 0, -1 }, }; -static constexpr OpenRCT2::Audio::SoundId DoorOpenSoundIds[] = { +static constexpr OpenRCT2::Audio::SoundId kDoorOpenSoundIds[] = { OpenRCT2::Audio::SoundId::Null, // DoorSoundType::none OpenRCT2::Audio::SoundId::DoorOpen, // DoorSoundType::door OpenRCT2::Audio::SoundId::Portcullis, // DoorSoundType::portcullis }; -static constexpr OpenRCT2::Audio::SoundId DoorCloseSoundIds[] = { +static constexpr OpenRCT2::Audio::SoundId kDoorCloseSoundIds[] = { OpenRCT2::Audio::SoundId::Null, // DoorSoundType::none OpenRCT2::Audio::SoundId::DoorClose, // DoorSoundType::door OpenRCT2::Audio::SoundId::Portcullis, // DoorSoundType::portcullis @@ -704,7 +704,7 @@ bool Vehicle::OpenRestraints() // If the vehicle is a spinner it must be spinning slow // For vehicles without additional frames there are 4 rotations it can unload from // For vehicles with additional frames it must be facing forward - if (abs(vehicle->spin_speed) <= VEHICLE_MAX_SPIN_SPEED_FOR_STOPPING && !(vehicle->spin_sprite & 0x30) + if (abs(vehicle->spin_speed) <= kVehicleMaxSpinSpeedForStopping && !(vehicle->spin_sprite & 0x30) && (!(carEntry.flags & CAR_ENTRY_FLAG_SPINNING_ADDITIONAL_FRAMES) || !(vehicle->spin_sprite & 0xF8))) { vehicle->spin_speed = 0; @@ -713,10 +713,10 @@ bool Vehicle::OpenRestraints() { restraintsOpen = false; - if (abs(vehicle->spin_speed) < VEHICLE_STOPPING_SPIN_SPEED) + if (abs(vehicle->spin_speed) < kVehicleStoppingSpinSpeed) { // Note will look odd if spinning right. - vehicle->spin_speed = VEHICLE_STOPPING_SPIN_SPEED; + vehicle->spin_speed = kVehicleStoppingSpinSpeed; } int16_t value = vehicle->spin_speed / 256; vehicle->spin_sprite += value; @@ -1166,12 +1166,12 @@ void Vehicle::UpdateMeasurements() if (Pitch != 0) { - curRide->num_sheltered_sections |= ShelteredSectionsBits::RotatingWhileSheltered; + curRide->num_sheltered_sections |= ShelteredSectionsBits::kRotatingWhileSheltered; } if (bank_rotation != 0) { - curRide->num_sheltered_sections |= ShelteredSectionsBits::BankingWhileSheltered; + curRide->num_sheltered_sections |= ShelteredSectionsBits::kBankingWhileSheltered; } } @@ -1219,7 +1219,7 @@ static SoundIdVolume VehicleSoundFadeInOut( void Vehicle::GetLiftHillSound(const Ride& curRide, SoundIdVolume& curSound) { scream_sound_id = OpenRCT2::Audio::SoundId::Null; - if (curRide.type < std::size(RideTypeDescriptors)) + if (curRide.type < std::size(kRideTypeDescriptors)) { // Get lift hill sound curSound.id = GetRideTypeDescriptor(curRide.type).LiftData.sound_id; @@ -2945,9 +2945,9 @@ void Vehicle::UpdateCrashSetup() trainVehicle->sub_state = 0; int32_t trainX = stru_9A3AC4[trainVehicle->Orientation / 2].x; int32_t trainY = stru_9A3AC4[trainVehicle->Orientation / 2].y; - auto trainZ = Unk9A38D4[trainVehicle->Pitch] >> 23; + auto trainZ = kUnk9A38D4[trainVehicle->Pitch] >> 23; - int32_t ecx = Unk9A37E4[trainVehicle->Pitch] >> 15; + int32_t ecx = kUnk9A37E4[trainVehicle->Pitch] >> 15; trainX *= ecx; trainY *= ecx; trainX >>= 16; @@ -3767,7 +3767,7 @@ void Vehicle::UpdateMotionBoatHire() } int32_t edi = (Orientation | (var_35 & 1)) & 0x1F; - loc2 = { x + Unk9A36C4[edi].x, y + Unk9A36C4[edi].y }; + loc2 = { x + kUnk9A36C4[edi].x, y + kUnk9A36C4[edi].y }; if (UpdateMotionCollisionDetection({ loc2, z }, nullptr)) { remaining_distance = 0; @@ -3865,7 +3865,7 @@ void Vehicle::UpdateMotionBoatHire() TrackLocation = { flooredLocation, TrackLocation.z }; } - remaining_distance -= Unk9A36C4[edi].distance; + remaining_distance -= kUnk9A36C4[edi].distance; _vehicleCurPosition.x = loc2.x; _vehicleCurPosition.y = loc2.y; if (remaining_distance < 0x368A) @@ -4319,7 +4319,7 @@ void Vehicle::UpdateSpaceRingsOperating() if (_vehicleBreakdown == 0) return; - uint8_t spriteType = SpaceRingsTimeToSpriteMap[current_time + 1]; + uint8_t spriteType = kSpaceRingsTimeToSpriteMap[current_time + 1]; if (spriteType != 255) { current_time++; @@ -4453,7 +4453,7 @@ void Vehicle::UpdateShowingFilm() if (_vehicleBreakdown == 0) return; - totalTime = RideFilmLength[sub_state]; + totalTime = kRideFilmLength[sub_state]; currentTime = current_time + 1; if (currentTime <= totalTime) { @@ -5043,8 +5043,8 @@ OpenRCT2::Audio::SoundId Vehicle::ProduceScreamSound(const int32_t totalNumPeeps */ GForces Vehicle::GetGForces() const { - int32_t gForceVert = ((static_cast(0x280000)) * Unk9A37E4[Pitch]) >> 32; - gForceVert = ((static_cast(gForceVert)) * Unk9A39C4[bank_rotation]) >> 32; + int32_t gForceVert = ((static_cast(0x280000)) * kUnk9A37E4[Pitch]) >> 32; + gForceVert = ((static_cast(gForceVert)) * kUnk9A39C4[bank_rotation]) >> 32; const auto& ted = GetTrackElementDescriptor(GetTrackType()); const int32_t vertFactor = ted.verticalFactor(track_progress); @@ -5200,10 +5200,10 @@ int32_t Vehicle::UpdateMotionDodgems() CoordsXYZ location = { x, y, z }; - location.x += Unk9A36C4[oldCollisionDirection].x; - location.y += Unk9A36C4[oldCollisionDirection].y; - location.x += Unk9A36C4[oldCollisionDirection + 1].x; - location.y += Unk9A36C4[oldCollisionDirection + 1].y; + location.x += kUnk9A36C4[oldCollisionDirection].x; + location.y += kUnk9A36C4[oldCollisionDirection].y; + location.x += kUnk9A36C4[oldCollisionDirection + 1].x; + location.y += kUnk9A36C4[oldCollisionDirection + 1].y; if (collideSprite = DodgemsCarWouldCollideAt(location); !collideSprite.has_value()) { @@ -5227,15 +5227,15 @@ int32_t Vehicle::UpdateMotionDodgems() direction |= var_35 & 1; CoordsXY location = _vehicleCurPosition; - location.x += Unk9A36C4[direction].x; - location.y += Unk9A36C4[direction].y; + location.x += kUnk9A36C4[direction].x; + location.y += kUnk9A36C4[direction].y; if (collideSprite = DodgemsCarWouldCollideAt(location); collideSprite.has_value()) { break; } - remaining_distance -= Unk9A36C4[direction].distance; + remaining_distance -= kUnk9A36C4[direction].distance; _vehicleCurPosition.x = location.x; _vehicleCurPosition.y = location.y; if (remaining_distance < 13962) @@ -5340,7 +5340,7 @@ std::optional Vehicle::DodgemsCarWouldCollideAt(const CoordsXY& coords auto location = coords; RideId rideIndex = ride; - for (auto xy_offset : SurroundingTiles) + for (auto xy_offset : kSurroundingTiles) { location += xy_offset; @@ -6002,7 +6002,7 @@ void Vehicle::UpdateSpinningCar() break; } - spinSpeed = std::clamp(spin_speed, VEHICLE_MIN_SPIN_SPEED, VEHICLE_MAX_SPIN_SPEED); + spinSpeed = std::clamp(spin_speed, kVehicleMinSpinSpeed, kVehicleMaxSpinSpeed); spin_speed = spinSpeed; spin_sprite += spinSpeed >> 8; // Note this actually increases the spin speed if going right! @@ -6261,7 +6261,7 @@ static void play_scenery_door_open_sound(const CoordsXYZ& loc, WallElement* tile if (doorSoundType == DoorSoundType::none) return; - auto soundId = DoorOpenSoundIds[EnumValue(doorSoundType)]; + auto soundId = kDoorOpenSoundIds[EnumValue(doorSoundType)]; OpenRCT2::Audio::Play3D(soundId, loc); } @@ -6279,7 +6279,7 @@ static void play_scenery_door_close_sound(const CoordsXYZ& loc, WallElement* til if (doorSoundType == DoorSoundType::none) return; - auto soundId = DoorCloseSoundIds[EnumValue(doorSoundType)]; + auto soundId = kDoorCloseSoundIds[EnumValue(doorSoundType)]; Play3D(soundId, loc); } @@ -6515,7 +6515,7 @@ void Vehicle::UpdateReverserCarBogies() bool Vehicle::IsCableLift() const { - return ride_subtype == OBJECT_ENTRY_INDEX_NULL; + return ride_subtype == kObjectEntryIndexNull; } /** @@ -6579,7 +6579,7 @@ bool Vehicle::UpdateMotionCollisionDetection(const CoordsXYZ& loc, EntityId* oth bool mayCollide = false; Vehicle* collideVehicle = nullptr; - for (auto xy_offset : SurroundingTiles) + for (auto xy_offset : kSurroundingTiles) { location += xy_offset; @@ -6639,8 +6639,8 @@ bool Vehicle::UpdateMotionCollisionDetection(const CoordsXYZ& loc, EntityId* oth uint32_t offsetSpriteDirection = (Orientation + 4) & 31; uint32_t offsetDirection = offsetSpriteDirection >> 3; - uint32_t next_x_diff = abs(loc.x + AvoidCollisionMoveOffset[offsetDirection].x - vehicle2->x); - uint32_t next_y_diff = abs(loc.y + AvoidCollisionMoveOffset[offsetDirection].y - vehicle2->y); + uint32_t next_x_diff = abs(loc.x + kAvoidCollisionMoveOffset[offsetDirection].x - vehicle2->x); + uint32_t next_y_diff = abs(loc.y + kAvoidCollisionMoveOffset[offsetDirection].y - vehicle2->y); if (next_x_diff + next_y_diff < x_diff + y_diff) { @@ -7648,7 +7648,7 @@ Vehicle::UpdateMiniGolfFlagsStatus Vehicle::UpdateTrackMotionMiniGolfFlagsStatus if (mini_golf_flags & MiniGolfFlag::Flag2) { uint8_t nextFrame = animation_frame + 1; - if (nextFrame < MiniGolfPeepAnimationLengths[EnumValue(mini_golf_current_animation)]) + if (nextFrame < kMiniGolfPeepAnimationLengths[EnumValue(mini_golf_current_animation)]) { animation_frame = nextFrame; remaining_distance -= 0x368A; @@ -8397,7 +8397,7 @@ int32_t Vehicle::UpdateTrackMotionPoweredRideAcceleration( if (carEntry->flags & CAR_ENTRY_FLAG_SPINNING) { - spin_speed = std::clamp(spin_speed, VEHICLE_MIN_SPIN_SPEED_WATER_RIDE, VEHICLE_MAX_SPIN_SPEED_WATER_RIDE); + spin_speed = std::clamp(spin_speed, kVehicleMinSpinSpeedWaterRide, kVehicleMaxSpinSpeedWaterRide); } if (Pitch != 0) diff --git a/src/openrct2/ride/rtd/coaster/AirPoweredVerticalCoaster.h b/src/openrct2/ride/rtd/coaster/AirPoweredVerticalCoaster.h index 2a419f5a4e62..5b6f9717682e 100644 --- a/src/openrct2/ride/rtd/coaster/AirPoweredVerticalCoaster.h +++ b/src/openrct2/ride/rtd/coaster/AirPoweredVerticalCoaster.h @@ -43,7 +43,7 @@ constexpr RideTypeDescriptor AirPoweredVerticalCoasterRTD = .UpkeepCosts = { 90, 20, 0, 0, 0, 10 }, .BuildCosts = { 100.00_GBP, 0.00_GBP, 45, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_2, + .DefaultMusic = kMusicObjectRock2, .PhotoItem = ShopItem::Photo, .BonusValue = 70, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/AlpineCoaster.h b/src/openrct2/ride/rtd/coaster/AlpineCoaster.h index a3fae3e8ec0c..b90c15c4590d 100644 --- a/src/openrct2/ride/rtd/coaster/AlpineCoaster.h +++ b/src/openrct2/ride/rtd/coaster/AlpineCoaster.h @@ -44,7 +44,7 @@ constexpr RideTypeDescriptor AlpineCoasterRTD = .UpkeepCosts = { 35, 20, 80, 8, 3, 10 }, .BuildCosts = { 22.50_GBP, 2.50_GBP, 50}, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_GENTLE, + .DefaultMusic = kMusicObjectGentle, .PhotoItem = ShopItem::Photo, .BonusValue = 65, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/BobsleighCoaster.h b/src/openrct2/ride/rtd/coaster/BobsleighCoaster.h index c47c240b6aa8..ff3e35597a96 100644 --- a/src/openrct2/ride/rtd/coaster/BobsleighCoaster.h +++ b/src/openrct2/ride/rtd/coaster/BobsleighCoaster.h @@ -41,7 +41,7 @@ constexpr RideTypeDescriptor BobsleighCoasterRTD = .UpkeepCosts = { 40, 20, 80, 10, 3, 10 }, .BuildCosts = { 40.00_GBP, 2.50_GBP, 45, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo, .BonusValue = 75, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/ClassicMiniRollerCoaster.h b/src/openrct2/ride/rtd/coaster/ClassicMiniRollerCoaster.h index d4911403a618..787136a68451 100644 --- a/src/openrct2/ride/rtd/coaster/ClassicMiniRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/ClassicMiniRollerCoaster.h @@ -43,7 +43,7 @@ constexpr RideTypeDescriptor ClassicMiniRollerCoasterRTD = .UpkeepCosts = { 40, 20, 80, 8, 3, 5 }, .BuildCosts = { 22.50_GBP, 2.00_GBP, 40, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_SUMMER, + .DefaultMusic = kMusicObjectSummer, .PhotoItem = ShopItem::Photo, .BonusValue = 60, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/ClassicStandUpRollerCoaster.h b/src/openrct2/ride/rtd/coaster/ClassicStandUpRollerCoaster.h index d314775550c0..79d3f320645c 100644 --- a/src/openrct2/ride/rtd/coaster/ClassicStandUpRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/ClassicStandUpRollerCoaster.h @@ -42,7 +42,7 @@ constexpr RideTypeDescriptor ClassicStandUpRollerCoasterRTD = .UpkeepCosts = { 40, 20, 80, 10, 3, 10 }, .BuildCosts = { 50.00_GBP, 2.50_GBP, 50, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_TECHNO, + .DefaultMusic = kMusicObjectTechno, .PhotoItem = ShopItem::Photo, .BonusValue = 90, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/ClassicWoodenRollerCoaster.h b/src/openrct2/ride/rtd/coaster/ClassicWoodenRollerCoaster.h index 8418d1bb964e..f09475c7af69 100644 --- a/src/openrct2/ride/rtd/coaster/ClassicWoodenRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/ClassicWoodenRollerCoaster.h @@ -43,7 +43,7 @@ constexpr RideTypeDescriptor ClassicWoodenRollerCoasterRTD = .UpkeepCosts = { 40, 20, 80, 10, 3, 10 }, .BuildCosts = {37.50_GBP, 3.50_GBP, 50, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_WILD_WEST, + .DefaultMusic = kMusicObjectWildWest, .PhotoItem = ShopItem::Photo3, .BonusValue = 105, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/ClassicWoodenTwisterRollerCoaster.h b/src/openrct2/ride/rtd/coaster/ClassicWoodenTwisterRollerCoaster.h index c06a2337b62a..8f68bfe4da07 100644 --- a/src/openrct2/ride/rtd/coaster/ClassicWoodenTwisterRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/ClassicWoodenTwisterRollerCoaster.h @@ -43,7 +43,7 @@ constexpr RideTypeDescriptor ClassicWoodenTwisterRollerCoasterRTD = .UpkeepCosts = { 40, 20, 80, 10, 3, 10 }, .BuildCosts = {37.50_GBP, 3.50_GBP, 50, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_WILD_WEST, + .DefaultMusic = kMusicObjectWildWest, .PhotoItem = ShopItem::Photo3, .BonusValue = 105, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/CompactInvertedCoaster.h b/src/openrct2/ride/rtd/coaster/CompactInvertedCoaster.h index bced45aa5ea9..47e9959a63f3 100644 --- a/src/openrct2/ride/rtd/coaster/CompactInvertedCoaster.h +++ b/src/openrct2/ride/rtd/coaster/CompactInvertedCoaster.h @@ -42,7 +42,7 @@ constexpr RideTypeDescriptor CompactInvertedCoasterRTD = .UpkeepCosts = { 40, 20, 80, 13, 3, 10 }, .BuildCosts = { 50.00_GBP, 2.50_GBP, 50, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_TECHNO, + .DefaultMusic = kMusicObjectTechno, .PhotoItem = ShopItem::Photo2, .BonusValue = 80, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/CorkscrewRollerCoaster.h b/src/openrct2/ride/rtd/coaster/CorkscrewRollerCoaster.h index 149cd8a6e7a7..a89b1a75321e 100644 --- a/src/openrct2/ride/rtd/coaster/CorkscrewRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/CorkscrewRollerCoaster.h @@ -44,7 +44,7 @@ constexpr RideTypeDescriptor CorkscrewRollerCoasterRTD = .UpkeepCosts = { 40, 20, 80, 11, 3, 10 }, .BuildCosts = { 52.50_GBP, 2.50_GBP, 50, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo, .BonusValue = 100, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/FlyingRollerCoaster.h b/src/openrct2/ride/rtd/coaster/FlyingRollerCoaster.h index ef8b5737e7b2..5a0f53f73918 100644 --- a/src/openrct2/ride/rtd/coaster/FlyingRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/FlyingRollerCoaster.h @@ -50,7 +50,7 @@ constexpr RideTypeDescriptor FlyingRollerCoasterRTD = .UpkeepCosts = { 49, 20, 90, 11, 3, 15 }, .BuildCosts = { 62.50_GBP, 2.50_GBP, 50, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo2, .BonusValue = 100, .ColourPresets = TRACK_COLOUR_PRESETS( @@ -125,7 +125,7 @@ constexpr RideTypeDescriptor FlyingRollerCoasterAltRTD = .UpkeepCosts = { 49, 20, 90, 11, 3, 15 }, .BuildCosts = { 62.50_GBP, 2.50_GBP, 50, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo2, .BonusValue = 100, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/GigaCoaster.h b/src/openrct2/ride/rtd/coaster/GigaCoaster.h index 19e4c1dc74ed..c03f9b9f3336 100644 --- a/src/openrct2/ride/rtd/coaster/GigaCoaster.h +++ b/src/openrct2/ride/rtd/coaster/GigaCoaster.h @@ -45,7 +45,7 @@ constexpr RideTypeDescriptor GigaCoasterRTD = .UpkeepCosts = { 10, 20, 80, 12, 3, 40 }, .BuildCosts = { 60.00_GBP, 2.50_GBP, 55, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_3, + .DefaultMusic = kMusicObjectRock3, .PhotoItem = ShopItem::Photo, .BonusValue = 120, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/HeartlineTwisterCoaster.h b/src/openrct2/ride/rtd/coaster/HeartlineTwisterCoaster.h index 681fd0f206be..55fd77460d62 100644 --- a/src/openrct2/ride/rtd/coaster/HeartlineTwisterCoaster.h +++ b/src/openrct2/ride/rtd/coaster/HeartlineTwisterCoaster.h @@ -44,7 +44,7 @@ constexpr RideTypeDescriptor HeartlineTwisterCoasterRTD = .UpkeepCosts = { 47, 20, 80, 11, 3, 10 }, .BuildCosts = { 72.50_GBP, 3.50_GBP, 30, }, .DefaultPrices = { 15, 20 }, - .DefaultMusic = MUSIC_OBJECT_TECHNO, + .DefaultMusic = kMusicObjectTechno, .PhotoItem = ShopItem::Photo, .BonusValue = 70, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/HybridCoaster.h b/src/openrct2/ride/rtd/coaster/HybridCoaster.h index a8075dfcf697..34dfb7dde195 100644 --- a/src/openrct2/ride/rtd/coaster/HybridCoaster.h +++ b/src/openrct2/ride/rtd/coaster/HybridCoaster.h @@ -43,7 +43,7 @@ constexpr RideTypeDescriptor HybridCoasterRTD = .UpkeepCosts = { 40, 20, 80, 10, 3, 10 }, .BuildCosts = { 65.00_GBP, 3.50_GBP, 55}, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_2, + .DefaultMusic = kMusicObjectRock2, .PhotoItem = ShopItem::Photo, .BonusValue = 120, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/HyperTwister.h b/src/openrct2/ride/rtd/coaster/HyperTwister.h index 46f3b6ebb392..cec3f8fcb676 100644 --- a/src/openrct2/ride/rtd/coaster/HyperTwister.h +++ b/src/openrct2/ride/rtd/coaster/HyperTwister.h @@ -46,7 +46,7 @@ constexpr RideTypeDescriptor HyperTwisterRTD = .UpkeepCosts = { 43, 20, 80, 11, 3, 10 }, .BuildCosts = { 60.00_GBP, 2.50_GBP, 55, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo, .BonusValue = 120, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/Hypercoaster.h b/src/openrct2/ride/rtd/coaster/Hypercoaster.h index 0534e34359c8..f29c3179b275 100644 --- a/src/openrct2/ride/rtd/coaster/Hypercoaster.h +++ b/src/openrct2/ride/rtd/coaster/Hypercoaster.h @@ -45,7 +45,7 @@ constexpr RideTypeDescriptor HypercoasterRTD = .UpkeepCosts = { 40, 20, 80, 11, 3, 10 }, .BuildCosts = { 52.50_GBP, 2.50_GBP, 50, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo, .BonusValue = 100, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/InvertedHairpinCoaster.h b/src/openrct2/ride/rtd/coaster/InvertedHairpinCoaster.h index 52b43ed7e1e7..971b9b37b9df 100644 --- a/src/openrct2/ride/rtd/coaster/InvertedHairpinCoaster.h +++ b/src/openrct2/ride/rtd/coaster/InvertedHairpinCoaster.h @@ -41,7 +41,7 @@ constexpr RideTypeDescriptor InvertedHairpinCoasterRTD = .UpkeepCosts = { 40, 20, 80, 9, 3, 10 }, .BuildCosts = { 33.50_GBP, 2.00_GBP, 40, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_2, + .DefaultMusic = kMusicObjectRock2, .PhotoItem = ShopItem::Photo2, .BonusValue = 55, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/InvertedImpulseCoaster.h b/src/openrct2/ride/rtd/coaster/InvertedImpulseCoaster.h index a6f41853ee53..a8d79c077421 100644 --- a/src/openrct2/ride/rtd/coaster/InvertedImpulseCoaster.h +++ b/src/openrct2/ride/rtd/coaster/InvertedImpulseCoaster.h @@ -44,7 +44,7 @@ constexpr RideTypeDescriptor InvertedImpulseCoasterRTD = .UpkeepCosts = { 180, 20, 80, 11, 3, 10 }, .BuildCosts = { 62.50_GBP, 2.50_GBP, 25, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo2, .BonusValue = 75, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/InvertedRollerCoaster.h b/src/openrct2/ride/rtd/coaster/InvertedRollerCoaster.h index ac07104b6daa..eef22f0c3988 100644 --- a/src/openrct2/ride/rtd/coaster/InvertedRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/InvertedRollerCoaster.h @@ -44,7 +44,7 @@ constexpr RideTypeDescriptor InvertedRollerCoasterRTD = .UpkeepCosts = { 40, 20, 80, 13, 3, 10 }, .BuildCosts = { 65.00_GBP, 2.50_GBP, 50, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_TECHNO, + .DefaultMusic = kMusicObjectTechno, .PhotoItem = ShopItem::Photo2, .BonusValue = 100, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/JuniorRollerCoaster.h b/src/openrct2/ride/rtd/coaster/JuniorRollerCoaster.h index ca9289c612d2..b87ca581c27a 100644 --- a/src/openrct2/ride/rtd/coaster/JuniorRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/JuniorRollerCoaster.h @@ -44,7 +44,7 @@ constexpr RideTypeDescriptor JuniorRollerCoasterRTD = .UpkeepCosts = { 40, 20, 80, 8, 3, 5 }, .BuildCosts = { 22.50_GBP, 2.00_GBP, 40, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_SUMMER, + .DefaultMusic = kMusicObjectSummer, .PhotoItem = ShopItem::Photo, .BonusValue = 60, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/LIMLaunchedRollerCoaster.h b/src/openrct2/ride/rtd/coaster/LIMLaunchedRollerCoaster.h index 25e37827f93c..52998a013ea5 100644 --- a/src/openrct2/ride/rtd/coaster/LIMLaunchedRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/LIMLaunchedRollerCoaster.h @@ -44,7 +44,7 @@ constexpr RideTypeDescriptor LIMLaunchedRollerCoasterRTD = .UpkeepCosts = { 42, 20, 80, 9, 3, 10 }, .BuildCosts = { 47.50_GBP, 2.50_GBP, 50, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo, .BonusValue = 55, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/LSMLaunchedRollerCoaster.h b/src/openrct2/ride/rtd/coaster/LSMLaunchedRollerCoaster.h index 4268b7cca443..9b99d025cd36 100644 --- a/src/openrct2/ride/rtd/coaster/LSMLaunchedRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/LSMLaunchedRollerCoaster.h @@ -45,7 +45,7 @@ constexpr RideTypeDescriptor LSMLaunchedRollerCoasterRTD = .UpkeepCosts = { 10, 20, 80, 12, 3, 40 }, .BuildCosts = { 57.00_GBP, 2.50_GBP, 55, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_MODERN, + .DefaultMusic = kMusicObjectModern, .PhotoItem = ShopItem::Photo, .BonusValue = 120, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/LayDownRollerCoaster.h b/src/openrct2/ride/rtd/coaster/LayDownRollerCoaster.h index 2637ff7a01f9..af4f63e0b915 100644 --- a/src/openrct2/ride/rtd/coaster/LayDownRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/LayDownRollerCoaster.h @@ -53,7 +53,7 @@ constexpr RideTypeDescriptor LayDownRollerCoasterRTD = .UpkeepCosts = { 49, 20, 90, 11, 3, 15 }, .BuildCosts = { 53.50_GBP, 2.50_GBP, 50, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo2, .BonusValue = 100, .ColourPresets = TRACK_COLOUR_PRESETS( @@ -124,7 +124,7 @@ constexpr RideTypeDescriptor LayDownRollerCoasterAltRTD = .UpkeepCosts = { 49, 20, 90, 11, 3, 15 }, .BuildCosts = { 53.50_GBP, 2.50_GBP, 50, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo2, .BonusValue = 100, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/LoopingRollerCoaster.h b/src/openrct2/ride/rtd/coaster/LoopingRollerCoaster.h index 665895eb850e..d4aeaf40e0c9 100644 --- a/src/openrct2/ride/rtd/coaster/LoopingRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/LoopingRollerCoaster.h @@ -44,7 +44,7 @@ constexpr RideTypeDescriptor LoopingRollerCoasterRTD = .UpkeepCosts = { 40, 20, 80, 10, 3, 10 }, .BuildCosts = { 45.00_GBP, 2.50_GBP, 50, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo, .BonusValue = 95, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/MineRide.h b/src/openrct2/ride/rtd/coaster/MineRide.h index b866973bad28..3071e4bf522a 100644 --- a/src/openrct2/ride/rtd/coaster/MineRide.h +++ b/src/openrct2/ride/rtd/coaster/MineRide.h @@ -41,7 +41,7 @@ constexpr RideTypeDescriptor MineRideRTD = .UpkeepCosts = { 50, 20, 80, 10, 3, 10 }, .BuildCosts = { 42.50_GBP, 2.00_GBP, 40, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_WILD_WEST, + .DefaultMusic = kMusicObjectWildWest, .PhotoItem = ShopItem::Photo, .BonusValue = 70, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/MineTrainCoaster.h b/src/openrct2/ride/rtd/coaster/MineTrainCoaster.h index e1f8401e6e4b..94bd03b7040c 100644 --- a/src/openrct2/ride/rtd/coaster/MineTrainCoaster.h +++ b/src/openrct2/ride/rtd/coaster/MineTrainCoaster.h @@ -42,7 +42,7 @@ constexpr RideTypeDescriptor MineTrainCoasterRTD = .UpkeepCosts = { 40, 20, 80, 10, 3, 10 }, .BuildCosts = { 41.00_GBP, 3.00_GBP, 50, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_WILD_WEST, + .DefaultMusic = kMusicObjectWildWest, .PhotoItem = ShopItem::Photo, .BonusValue = 85, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/MiniRollerCoaster.h b/src/openrct2/ride/rtd/coaster/MiniRollerCoaster.h index b3582ad5eb5c..f659106cd9b5 100644 --- a/src/openrct2/ride/rtd/coaster/MiniRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/MiniRollerCoaster.h @@ -43,7 +43,7 @@ constexpr RideTypeDescriptor MiniRollerCoasterRTD = .UpkeepCosts = { 35, 20, 80, 8, 3, 10 }, .BuildCosts = { 32.50_GBP, 2.00_GBP, 40, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_SUMMER, + .DefaultMusic = kMusicObjectSummer, .PhotoItem = ShopItem::Photo, .BonusValue = 60, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/MiniSuspendedCoaster.h b/src/openrct2/ride/rtd/coaster/MiniSuspendedCoaster.h index 98797eeba46d..a7ee4ce4b7e7 100644 --- a/src/openrct2/ride/rtd/coaster/MiniSuspendedCoaster.h +++ b/src/openrct2/ride/rtd/coaster/MiniSuspendedCoaster.h @@ -41,7 +41,7 @@ constexpr RideTypeDescriptor MiniSuspendedCoasterRTD = .UpkeepCosts = { 40, 20, 80, 10, 3, 10 }, .BuildCosts = { 30.00_GBP, 2.50_GBP, 40, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_WILD_WEST, + .DefaultMusic = kMusicObjectWildWest, .PhotoItem = ShopItem::Photo2, .BonusValue = 50, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/MultiDimensionRollerCoaster.h b/src/openrct2/ride/rtd/coaster/MultiDimensionRollerCoaster.h index f84961a7f66d..9989322af3b2 100644 --- a/src/openrct2/ride/rtd/coaster/MultiDimensionRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/MultiDimensionRollerCoaster.h @@ -50,7 +50,7 @@ constexpr RideTypeDescriptor MultiDimensionRollerCoasterRTD = .UpkeepCosts = { 75, 20, 90, 11, 3, 15 }, .BuildCosts = { 90.00_GBP, 2.50_GBP, 50, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_3, + .DefaultMusic = kMusicObjectRock3, .PhotoItem = ShopItem::Photo2, .BonusValue = 100, .ColourPresets = TRACK_COLOUR_PRESETS( @@ -124,7 +124,7 @@ constexpr RideTypeDescriptor MultiDimensionRollerCoasterAltRTD = .UpkeepCosts = { 75, 20, 90, 11, 3, 15 }, .BuildCosts = { 90.00_GBP, 2.50_GBP, 50, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_3, + .DefaultMusic = kMusicObjectRock3, .PhotoItem = ShopItem::Photo2, .BonusValue = 100, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/ReverseFreefallCoaster.h b/src/openrct2/ride/rtd/coaster/ReverseFreefallCoaster.h index 33c53d3a3080..1d39dbab3f38 100644 --- a/src/openrct2/ride/rtd/coaster/ReverseFreefallCoaster.h +++ b/src/openrct2/ride/rtd/coaster/ReverseFreefallCoaster.h @@ -44,7 +44,7 @@ constexpr RideTypeDescriptor ReverseFreefallCoasterRTD = .UpkeepCosts = { 80, 20, 0, 0, 0, 10 }, .BuildCosts = { 100.00_GBP, 0.00_GBP, 45, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo, .BonusValue = 70, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/ReverserRollerCoaster.h b/src/openrct2/ride/rtd/coaster/ReverserRollerCoaster.h index 6a12a3a3fbc1..8215f4f33204 100644 --- a/src/openrct2/ride/rtd/coaster/ReverserRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/ReverserRollerCoaster.h @@ -41,7 +41,7 @@ constexpr RideTypeDescriptor ReverserRollerCoasterRTD = .UpkeepCosts = { 39, 20, 80, 10, 3, 10 }, .BuildCosts = { 27.50_GBP, 3.00_GBP, 37, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_TECHNO, + .DefaultMusic = kMusicObjectTechno, .PhotoItem = ShopItem::Photo3, .BonusValue = 65, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/SideFrictionRollerCoaster.h b/src/openrct2/ride/rtd/coaster/SideFrictionRollerCoaster.h index 4c416f1216b3..2e98d49dc62a 100644 --- a/src/openrct2/ride/rtd/coaster/SideFrictionRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/SideFrictionRollerCoaster.h @@ -41,7 +41,7 @@ constexpr RideTypeDescriptor SideFrictionRollerCoasterRTD = .UpkeepCosts = { 39, 20, 80, 10, 3, 10 }, .BuildCosts = { 27.50_GBP, 3.00_GBP, 37, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_GENTLE, + .DefaultMusic = kMusicObjectGentle, .PhotoItem = ShopItem::Photo3, .BonusValue = 65, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/SingleRailRollerCoaster.h b/src/openrct2/ride/rtd/coaster/SingleRailRollerCoaster.h index c9eb1f3f15e8..60a34281301a 100644 --- a/src/openrct2/ride/rtd/coaster/SingleRailRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/SingleRailRollerCoaster.h @@ -42,7 +42,7 @@ constexpr RideTypeDescriptor SingleRailRollerCoasterRTD = .UpkeepCosts = { 40, 20, 80, 10, 3, 10 }, .BuildCosts = { 37.50_GBP, 2.50_GBP, 50}, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo, .BonusValue = 80, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/SpinningWildMouse.h b/src/openrct2/ride/rtd/coaster/SpinningWildMouse.h index 41c2c46330c9..ad8cd72a2a88 100644 --- a/src/openrct2/ride/rtd/coaster/SpinningWildMouse.h +++ b/src/openrct2/ride/rtd/coaster/SpinningWildMouse.h @@ -40,7 +40,7 @@ constexpr RideTypeDescriptor SpinningWildMouseRTD = .UpkeepCosts = { 40, 20, 80, 9, 3, 10 }, .BuildCosts = { 27.50_GBP, 2.00_GBP, 40, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo, .BonusValue = 55, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/SpiralRollerCoaster.h b/src/openrct2/ride/rtd/coaster/SpiralRollerCoaster.h index a03c8a27eab8..30930b617a7d 100644 --- a/src/openrct2/ride/rtd/coaster/SpiralRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/SpiralRollerCoaster.h @@ -44,7 +44,7 @@ constexpr RideTypeDescriptor SpiralRollerCoasterRTD = .UpkeepCosts = { 41, 20, 80, 10, 3, 10 }, .BuildCosts = { 35.00_GBP, 2.50_GBP, 50, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_3, + .DefaultMusic = kMusicObjectRock3, .PhotoItem = ShopItem::Photo, .BonusValue = 85, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/StandUpRollerCoaster.h b/src/openrct2/ride/rtd/coaster/StandUpRollerCoaster.h index bbec980768a0..5e5bf43e3106 100644 --- a/src/openrct2/ride/rtd/coaster/StandUpRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/StandUpRollerCoaster.h @@ -42,7 +42,7 @@ constexpr RideTypeDescriptor StandUpRollerCoasterRTD = .UpkeepCosts = { 40, 20, 80, 10, 3, 10 }, .BuildCosts = { 50.00_GBP, 2.50_GBP, 50, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_TECHNO, + .DefaultMusic = kMusicObjectTechno, .PhotoItem = ShopItem::Photo, .BonusValue = 90, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/SteelWildMouse.h b/src/openrct2/ride/rtd/coaster/SteelWildMouse.h index 2cb7b54399b5..9eb8118e56a0 100644 --- a/src/openrct2/ride/rtd/coaster/SteelWildMouse.h +++ b/src/openrct2/ride/rtd/coaster/SteelWildMouse.h @@ -41,7 +41,7 @@ constexpr RideTypeDescriptor SteelWildMouseRTD = .UpkeepCosts = { 40, 20, 80, 9, 3, 10 }, .BuildCosts = { 27.50_GBP, 2.00_GBP, 40, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo, .BonusValue = 55, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/Steeplechase.h b/src/openrct2/ride/rtd/coaster/Steeplechase.h index 005d4ed1e315..5cf16c2a8711 100644 --- a/src/openrct2/ride/rtd/coaster/Steeplechase.h +++ b/src/openrct2/ride/rtd/coaster/Steeplechase.h @@ -40,7 +40,7 @@ constexpr RideTypeDescriptor SteeplechaseRTD = .UpkeepCosts = { 40, 20, 80, 10, 3, 10 }, .BuildCosts = { 28.50_GBP, 2.00_GBP, 40, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo, .BonusValue = 60, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/SuspendedSwingingCoaster.h b/src/openrct2/ride/rtd/coaster/SuspendedSwingingCoaster.h index 64f0914d2fd4..242e5decb030 100644 --- a/src/openrct2/ride/rtd/coaster/SuspendedSwingingCoaster.h +++ b/src/openrct2/ride/rtd/coaster/SuspendedSwingingCoaster.h @@ -40,7 +40,7 @@ constexpr RideTypeDescriptor SuspendedSwingingCoasterRTD = .UpkeepCosts = { 40, 20, 80, 20, 3, 10 }, .BuildCosts = { 47.50_GBP, 2.50_GBP, 50, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo2, .BonusValue = 90, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/TwisterRollerCoaster.h b/src/openrct2/ride/rtd/coaster/TwisterRollerCoaster.h index bca66759caab..7f6d1793f449 100644 --- a/src/openrct2/ride/rtd/coaster/TwisterRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/TwisterRollerCoaster.h @@ -45,7 +45,7 @@ constexpr RideTypeDescriptor TwisterRollerCoasterRTD = .UpkeepCosts = { 43, 20, 80, 11, 3, 10 }, .BuildCosts = { 60.00_GBP, 2.50_GBP, 55, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo, .BonusValue = 120, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/VerticalDropCoaster.h b/src/openrct2/ride/rtd/coaster/VerticalDropCoaster.h index 77f88d4464b0..fb54a92144e4 100644 --- a/src/openrct2/ride/rtd/coaster/VerticalDropCoaster.h +++ b/src/openrct2/ride/rtd/coaster/VerticalDropCoaster.h @@ -44,7 +44,7 @@ constexpr RideTypeDescriptor VerticalDropCoasterRTD = .UpkeepCosts = { 44, 20, 80, 11, 3, 10 }, .BuildCosts = { 60.00_GBP, 2.50_GBP, 42, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo, .BonusValue = 95, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/VirginiaReel.h b/src/openrct2/ride/rtd/coaster/VirginiaReel.h index 771dd8b2b5d7..82b08ffcf502 100644 --- a/src/openrct2/ride/rtd/coaster/VirginiaReel.h +++ b/src/openrct2/ride/rtd/coaster/VirginiaReel.h @@ -40,7 +40,7 @@ constexpr RideTypeDescriptor VirginiaReelRTD = .UpkeepCosts = { 39, 20, 80, 10, 3, 10 }, .BuildCosts = { 26.50_GBP, 3.00_GBP, 25, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo3, .BonusValue = 50, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/WaterCoaster.h b/src/openrct2/ride/rtd/coaster/WaterCoaster.h index 63cc48b92d2e..aa61b19d07ed 100644 --- a/src/openrct2/ride/rtd/coaster/WaterCoaster.h +++ b/src/openrct2/ride/rtd/coaster/WaterCoaster.h @@ -57,7 +57,7 @@ constexpr RideTypeDescriptor WaterCoasterRTD = .UpkeepCosts = { 60, 20, 80, 8, 3, 10 }, .BuildCosts = { 27.50_GBP, 2.00_GBP, 40, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_WATER, + .DefaultMusic = kMusicObjectWater, .PhotoItem = ShopItem::Photo4, .BonusValue = 60, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/WoodenRollerCoaster.h b/src/openrct2/ride/rtd/coaster/WoodenRollerCoaster.h index 858bdf3245ff..d5f04e249cd6 100644 --- a/src/openrct2/ride/rtd/coaster/WoodenRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/WoodenRollerCoaster.h @@ -43,7 +43,7 @@ constexpr RideTypeDescriptor WoodenRollerCoasterRTD = .UpkeepCosts = { 40, 20, 80, 10, 3, 10 }, .BuildCosts = { 37.50_GBP, 3.50_GBP, 50, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_WILD_WEST, + .DefaultMusic = kMusicObjectWildWest, .PhotoItem = ShopItem::Photo3, .BonusValue = 105, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/coaster/WoodenWildMouse.h b/src/openrct2/ride/rtd/coaster/WoodenWildMouse.h index aafd893a567a..4d536689f437 100644 --- a/src/openrct2/ride/rtd/coaster/WoodenWildMouse.h +++ b/src/openrct2/ride/rtd/coaster/WoodenWildMouse.h @@ -41,7 +41,7 @@ constexpr RideTypeDescriptor WoodenWildMouseRTD = .UpkeepCosts = { 40, 20, 80, 9, 3, 10 }, .BuildCosts = { 25.00_GBP, 3.00_GBP, 40, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_WILD_WEST, + .DefaultMusic = kMusicObjectWildWest, .PhotoItem = ShopItem::Photo3, .BonusValue = 55, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/gentle/CarRide.h b/src/openrct2/ride/rtd/gentle/CarRide.h index e1353688b797..0c40818b8ae3 100644 --- a/src/openrct2/ride/rtd/gentle/CarRide.h +++ b/src/openrct2/ride/rtd/gentle/CarRide.h @@ -45,7 +45,7 @@ constexpr RideTypeDescriptor CarRideRTD = .UpkeepCosts = { 70, 20, 0, 8, 3, 5 }, .BuildCosts = { 12.50_GBP, 2.50_GBP, 30, }, .DefaultPrices = { 15, 0 }, - .DefaultMusic = MUSIC_OBJECT_SUMMER, + .DefaultMusic = kMusicObjectSummer, .PhotoItem = ShopItem::Photo, .BonusValue = 50, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/gentle/Circus.h b/src/openrct2/ride/rtd/gentle/Circus.h index d60e86ce317b..79fc0c4c720e 100644 --- a/src/openrct2/ride/rtd/gentle/Circus.h +++ b/src/openrct2/ride/rtd/gentle/Circus.h @@ -45,7 +45,7 @@ constexpr RideTypeDescriptor CircusRTD = .DefaultMusic = {}, .PhotoItem = ShopItem::Photo, .BonusValue = 39, - .ColourPresets = DEFAULT_FLAT_RIDE_COLOUR_PRESET, + .ColourPresets = kDefaultFlatRideColourPreset, .ColourPreview = { 0, 0 }, .ColourKey = RideColourKey::Ride, .Name = "circus", diff --git a/src/openrct2/ride/rtd/gentle/CrookedHouse.h b/src/openrct2/ride/rtd/gentle/CrookedHouse.h index 7326e0b82f06..c2610b61e09f 100644 --- a/src/openrct2/ride/rtd/gentle/CrookedHouse.h +++ b/src/openrct2/ride/rtd/gentle/CrookedHouse.h @@ -42,7 +42,7 @@ constexpr RideTypeDescriptor CrookedHouseRTD = .UpkeepCosts = { 30, 1, 0, 0, 0, 0 }, .BuildCosts = { 32.50_GBP, 1.00_GBP, 1, }, .DefaultPrices = { 6, 0 }, - .DefaultMusic = MUSIC_OBJECT_GENTLE, + .DefaultMusic = kMusicObjectGentle, .PhotoItem = ShopItem::Photo, .BonusValue = 22, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/gentle/Dodgems.h b/src/openrct2/ride/rtd/gentle/Dodgems.h index ca02949e66c3..aa1fc4dbed75 100644 --- a/src/openrct2/ride/rtd/gentle/Dodgems.h +++ b/src/openrct2/ride/rtd/gentle/Dodgems.h @@ -44,7 +44,7 @@ constexpr RideTypeDescriptor DodgemsRTD = .UpkeepCosts = { 50, 1, 0, 5, 0, 0 }, .BuildCosts = { 27.50_GBP, 1.00_GBP, 1, }, .DefaultPrices = { 15, 0 }, - .DefaultMusic = MUSIC_OBJECT_DODGEMS, + .DefaultMusic = kMusicObjectDodgems, .PhotoItem = ShopItem::Photo, .BonusValue = 35, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/gentle/FerrisWheel.h b/src/openrct2/ride/rtd/gentle/FerrisWheel.h index 27cd2c472ee4..6e2f26757d63 100644 --- a/src/openrct2/ride/rtd/gentle/FerrisWheel.h +++ b/src/openrct2/ride/rtd/gentle/FerrisWheel.h @@ -43,7 +43,7 @@ constexpr RideTypeDescriptor FerrisWheelRTD = .UpkeepCosts = { 50, 1, 0, 0, 0, 0 }, .BuildCosts = { 112.50_GBP, 1.00_GBP, 1, }, .DefaultPrices = { 10, 0 }, - .DefaultMusic = MUSIC_OBJECT_SUMMER, + .DefaultMusic = kMusicObjectSummer, .PhotoItem = ShopItem::Photo, .BonusValue = 45, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/gentle/FlyingSaucers.h b/src/openrct2/ride/rtd/gentle/FlyingSaucers.h index 47c22d65a141..2acb43b24b58 100644 --- a/src/openrct2/ride/rtd/gentle/FlyingSaucers.h +++ b/src/openrct2/ride/rtd/gentle/FlyingSaucers.h @@ -43,7 +43,7 @@ constexpr RideTypeDescriptor FlyingSaucersRTD = .UpkeepCosts = { 90, 1, 0, 5, 0, 0 }, .BuildCosts = { 35.00_GBP, 2.00_GBP, 1, }, .DefaultPrices = { 15, 0 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo, .BonusValue = 35, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/gentle/GhostTrain.h b/src/openrct2/ride/rtd/gentle/GhostTrain.h index 0779dd7a4b05..f37d7037a818 100644 --- a/src/openrct2/ride/rtd/gentle/GhostTrain.h +++ b/src/openrct2/ride/rtd/gentle/GhostTrain.h @@ -46,7 +46,7 @@ constexpr RideTypeDescriptor GhostTrainRTD = .UpkeepCosts = { 80, 20, 0, 8, 3, 5 }, .BuildCosts = { 13.00_GBP, 2.50_GBP, 30, }, .DefaultPrices = { 15, 0 }, - .DefaultMusic = MUSIC_OBJECT_HORROR, + .DefaultMusic = kMusicObjectHorror, .PhotoItem = ShopItem::Photo, .BonusValue = 50, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/gentle/HauntedHouse.h b/src/openrct2/ride/rtd/gentle/HauntedHouse.h index 974834de516a..d4a6e3b7e62a 100644 --- a/src/openrct2/ride/rtd/gentle/HauntedHouse.h +++ b/src/openrct2/ride/rtd/gentle/HauntedHouse.h @@ -42,10 +42,10 @@ constexpr RideTypeDescriptor HauntedHouseRTD = .UpkeepCosts = { 50, 1, 0, 0, 0, 0 }, .BuildCosts = { 42.50_GBP, 1.00_GBP, 1, }, .DefaultPrices = { 10, 0 }, - .DefaultMusic = MUSIC_OBJECT_HORROR, + .DefaultMusic = kMusicObjectHorror, .PhotoItem = ShopItem::Photo, .BonusValue = 22, - .ColourPresets = DEFAULT_FLAT_RIDE_COLOUR_PRESET, + .ColourPresets = kDefaultFlatRideColourPreset, .ColourPreview = { 0, 0 }, .ColourKey = RideColourKey::Ride, .Name = "haunted_house", diff --git a/src/openrct2/ride/rtd/gentle/Maze.h b/src/openrct2/ride/rtd/gentle/Maze.h index a4019bd6a696..c75b179a43f8 100644 --- a/src/openrct2/ride/rtd/gentle/Maze.h +++ b/src/openrct2/ride/rtd/gentle/Maze.h @@ -43,7 +43,7 @@ constexpr RideTypeDescriptor MazeRTD = .UpkeepCosts = { 50, 1, 0, 0, 0, 0 }, .BuildCosts = { 27.50_GBP, 1.00_GBP, 8, }, .DefaultPrices = { 10, 0 }, - .DefaultMusic = MUSIC_OBJECT_SUMMER, + .DefaultMusic = kMusicObjectSummer, .PhotoItem = ShopItem::Photo, .BonusValue = 40, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/gentle/MerryGoRound.h b/src/openrct2/ride/rtd/gentle/MerryGoRound.h index e755e6a307a6..5452d8e7c7de 100644 --- a/src/openrct2/ride/rtd/gentle/MerryGoRound.h +++ b/src/openrct2/ride/rtd/gentle/MerryGoRound.h @@ -43,10 +43,10 @@ constexpr RideTypeDescriptor MerryGoRoundRTD = .UpkeepCosts = { 50, 1, 0, 0, 0, 0 }, .BuildCosts = { 57.50_GBP, 1.00_GBP, 1, }, .DefaultPrices = { 10, 0 }, - .DefaultMusic = MUSIC_OBJECT_FAIRGROUND, + .DefaultMusic = kMusicObjectFairground, .PhotoItem = ShopItem::Photo, .BonusValue = 45, - .ColourPresets = DEFAULT_FLAT_RIDE_COLOUR_PRESET, + .ColourPresets = kDefaultFlatRideColourPreset, .ColourPreview = { 0, 0 }, .ColourKey = RideColourKey::Ride, .Name = "merry_go_round", diff --git a/src/openrct2/ride/rtd/gentle/MiniGolf.h b/src/openrct2/ride/rtd/gentle/MiniGolf.h index b94fc744e599..2ddc5ca6bfb1 100644 --- a/src/openrct2/ride/rtd/gentle/MiniGolf.h +++ b/src/openrct2/ride/rtd/gentle/MiniGolf.h @@ -41,7 +41,7 @@ constexpr RideTypeDescriptor MiniGolfRTD = .UpkeepCosts = { 30, 60, 0, 0, 0, 0 }, .BuildCosts = { 25.00_GBP, 3.50_GBP, 20, }, .DefaultPrices = { 10, 0 }, - .DefaultMusic = MUSIC_OBJECT_SUMMER, + .DefaultMusic = kMusicObjectSummer, .PhotoItem = ShopItem::Photo, .BonusValue = 23, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/gentle/MiniHelicopters.h b/src/openrct2/ride/rtd/gentle/MiniHelicopters.h index efdf0988ae81..91821da27055 100644 --- a/src/openrct2/ride/rtd/gentle/MiniHelicopters.h +++ b/src/openrct2/ride/rtd/gentle/MiniHelicopters.h @@ -45,7 +45,7 @@ constexpr RideTypeDescriptor MiniHelicoptersRTD = .UpkeepCosts = { 70, 20, 0, 8, 3, 5 }, .BuildCosts = { 12.50_GBP, 2.50_GBP, 30, }, .DefaultPrices = { 15, 0 }, - .DefaultMusic = MUSIC_OBJECT_SUMMER, + .DefaultMusic = kMusicObjectSummer, .PhotoItem = ShopItem::Photo, .BonusValue = 45, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/gentle/MonorailCycles.h b/src/openrct2/ride/rtd/gentle/MonorailCycles.h index a4ba5475f906..8a20d4272f8d 100644 --- a/src/openrct2/ride/rtd/gentle/MonorailCycles.h +++ b/src/openrct2/ride/rtd/gentle/MonorailCycles.h @@ -44,7 +44,7 @@ constexpr RideTypeDescriptor MonorailCyclesRTD = .UpkeepCosts = { 47, 20, 0, 8, 3, 5 }, .BuildCosts = { 10.00_GBP, 2.50_GBP, 30, }, .DefaultPrices = { 15, 0 }, - .DefaultMusic = MUSIC_OBJECT_SUMMER, + .DefaultMusic = kMusicObjectSummer, .PhotoItem = ShopItem::Photo, .BonusValue = 45, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/gentle/MonsterTrucks.h b/src/openrct2/ride/rtd/gentle/MonsterTrucks.h index 159d3fc87e0a..640121d46a9e 100644 --- a/src/openrct2/ride/rtd/gentle/MonsterTrucks.h +++ b/src/openrct2/ride/rtd/gentle/MonsterTrucks.h @@ -45,7 +45,7 @@ constexpr RideTypeDescriptor MonsterTrucksRTD = .UpkeepCosts = { 70, 20, 0, 8, 3, 5 }, .BuildCosts = { 12.50_GBP, 2.50_GBP, 30, }, .DefaultPrices = { 15, 0 }, - .DefaultMusic = MUSIC_OBJECT_SUMMER, + .DefaultMusic = kMusicObjectSummer, .PhotoItem = ShopItem::Photo, .BonusValue = 50, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/gentle/ObservationTower.h b/src/openrct2/ride/rtd/gentle/ObservationTower.h index 91ddb97f70fd..76910c96ac5e 100644 --- a/src/openrct2/ride/rtd/gentle/ObservationTower.h +++ b/src/openrct2/ride/rtd/gentle/ObservationTower.h @@ -42,7 +42,7 @@ constexpr RideTypeDescriptor ObservationTowerRTD = .UpkeepCosts = { 50, 20, 0, 10, 0, 0 }, .BuildCosts = { 18.50_GBP, 0.00_GBP, 4, }, .DefaultPrices = { 10, 0 }, - .DefaultMusic = MUSIC_OBJECT_SUMMER, + .DefaultMusic = kMusicObjectSummer, .PhotoItem = ShopItem::Photo, .BonusValue = 45, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/gentle/SpaceRings.h b/src/openrct2/ride/rtd/gentle/SpaceRings.h index 81d986b24527..6a386e1b303a 100644 --- a/src/openrct2/ride/rtd/gentle/SpaceRings.h +++ b/src/openrct2/ride/rtd/gentle/SpaceRings.h @@ -41,10 +41,10 @@ constexpr RideTypeDescriptor SpaceRingsRTD = .UpkeepCosts = { 50, 1, 0, 0, 0, 0 }, .BuildCosts = { 36.00_GBP, 1.00_GBP, 1, }, .DefaultPrices = { 5, 0 }, - .DefaultMusic = MUSIC_OBJECT_GENTLE, + .DefaultMusic = kMusicObjectGentle, .PhotoItem = ShopItem::Photo, .BonusValue = 30, - .ColourPresets = DEFAULT_FLAT_RIDE_COLOUR_PRESET, + .ColourPresets = kDefaultFlatRideColourPreset, .ColourPreview = { 0, 0 }, .ColourKey = RideColourKey::Ride, .Name = "space_rings", diff --git a/src/openrct2/ride/rtd/gentle/SpiralSlide.h b/src/openrct2/ride/rtd/gentle/SpiralSlide.h index 5f500c39e058..03d72f6346de 100644 --- a/src/openrct2/ride/rtd/gentle/SpiralSlide.h +++ b/src/openrct2/ride/rtd/gentle/SpiralSlide.h @@ -43,7 +43,7 @@ constexpr RideTypeDescriptor SpiralSlideRTD = .UpkeepCosts = { 50, 1, 0, 0, 0, 0 }, .BuildCosts = { 82.50_GBP, 1.00_GBP, 1, }, .DefaultPrices = { 15, 0 }, - .DefaultMusic = MUSIC_OBJECT_SUMMER, + .DefaultMusic = kMusicObjectSummer, .PhotoItem = ShopItem::Photo, .BonusValue = 40, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/shops/CashMachine.h b/src/openrct2/ride/rtd/shops/CashMachine.h index e05069941788..9eb11486073d 100644 --- a/src/openrct2/ride/rtd/shops/CashMachine.h +++ b/src/openrct2/ride/rtd/shops/CashMachine.h @@ -32,17 +32,17 @@ constexpr RideTypeDescriptor CashMachineRTD = .Naming = { STR_RIDE_NAME_CASH_MACHINE, STR_RIDE_DESCRIPTION_CASH_MACHINE }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .AvailableBreakdowns = 0, - .Heights = { 12, DefaultCashMachineHeight, 0, 0, }, + .Heights = { 12, kDefaultCashMachineHeight, 0, 0, }, .MaxMass = 255, .LiftData = { OpenRCT2::Audio::SoundId::Null, 5, 5 }, .RatingsMultipliers = { 0, 0, 0 }, .UpkeepCosts = { 40, 1, 0, 0, 0, 0 }, .BuildCosts = { 200.00_GBP, 0.00_GBP, 1, }, .DefaultPrices = { 0, 0 }, - .DefaultMusic = MUSIC_OBJECT_GENTLE, + .DefaultMusic = kMusicObjectGentle, .PhotoItem = ShopItem::Photo, .BonusValue = 5, - .ColourPresets = DEFAULT_FLAT_RIDE_COLOUR_PRESET, + .ColourPresets = kDefaultFlatRideColourPreset, .ColourPreview = { 0, 0 }, .ColourKey = RideColourKey::CashMachine, .Name = "cash_machine", diff --git a/src/openrct2/ride/rtd/shops/DrinkStall.h b/src/openrct2/ride/rtd/shops/DrinkStall.h index 478054148c40..585634964313 100644 --- a/src/openrct2/ride/rtd/shops/DrinkStall.h +++ b/src/openrct2/ride/rtd/shops/DrinkStall.h @@ -33,17 +33,17 @@ constexpr RideTypeDescriptor DrinkStallRTD = .Naming = { STR_RIDE_NAME_DRINK_STALL, STR_RIDE_DESCRIPTION_DRINK_STALL }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .AvailableBreakdowns = 0, - .Heights = { 12, DefaultDrinksStallHeight, 0, 0, }, + .Heights = { 12, kDefaultDrinksStallHeight, 0, 0, }, .MaxMass = 255, .LiftData = { OpenRCT2::Audio::SoundId::Null, 5, 5 }, .RatingsMultipliers = { 0, 0, 0 }, .UpkeepCosts = { 50, 1, 0, 0, 0, 0 }, .BuildCosts = { 250.00_GBP, 0.00_GBP, 1, }, .DefaultPrices = { 0, 0 }, - .DefaultMusic = MUSIC_OBJECT_GENTLE, + .DefaultMusic = kMusicObjectGentle, .PhotoItem = ShopItem::Photo, .BonusValue = 15, - .ColourPresets = DEFAULT_STALL_COLOUR_PRESET, + .ColourPresets = kDefaultStallColourPreset, .ColourPreview = { 0, 0 }, .ColourKey = RideColourKey::Drink, .Name = "drink_stall", diff --git a/src/openrct2/ride/rtd/shops/FirstAid.h b/src/openrct2/ride/rtd/shops/FirstAid.h index 197fbb706b3c..ed4543009df3 100644 --- a/src/openrct2/ride/rtd/shops/FirstAid.h +++ b/src/openrct2/ride/rtd/shops/FirstAid.h @@ -34,17 +34,17 @@ constexpr RideTypeDescriptor FirstAidRTD = .Naming = { STR_RIDE_NAME_FIRST_AID, STR_RIDE_DESCRIPTION_FIRST_AID }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .AvailableBreakdowns = 0, - .Heights = { 12, DefaultFirstAidHeight, 0, 0, }, + .Heights = { 12, kDefaultFirstAidHeight, 0, 0, }, .MaxMass = 255, .LiftData = { OpenRCT2::Audio::SoundId::Null, 5, 5 }, .RatingsMultipliers = { 0, 0, 0 }, .UpkeepCosts = { 45, 1, 0, 0, 0, 0 }, .BuildCosts = { 250.00_GBP, 0.00_GBP, 1, }, .DefaultPrices = { 0, 0 }, - .DefaultMusic = MUSIC_OBJECT_GENTLE, + .DefaultMusic = kMusicObjectGentle, .PhotoItem = ShopItem::Photo, .BonusValue = 5, - .ColourPresets = DEFAULT_FLAT_RIDE_COLOUR_PRESET, + .ColourPresets = kDefaultFlatRideColourPreset, .ColourPreview = { 0, 0 }, .ColourKey = RideColourKey::FirstAid, .Name = "first_aid", diff --git a/src/openrct2/ride/rtd/shops/FoodStall.h b/src/openrct2/ride/rtd/shops/FoodStall.h index 261830017a2b..f0f1412a1842 100644 --- a/src/openrct2/ride/rtd/shops/FoodStall.h +++ b/src/openrct2/ride/rtd/shops/FoodStall.h @@ -33,17 +33,17 @@ constexpr RideTypeDescriptor FoodStallRTD = .Naming = { STR_RIDE_NAME_FOOD_STALL, STR_RIDE_DESCRIPTION_FOOD_STALL }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .AvailableBreakdowns = 0, - .Heights = { 12, DefaultFoodStallHeight, 0, 0, }, + .Heights = { 12, kDefaultFoodStallHeight, 0, 0, }, .MaxMass = 255, .LiftData = { OpenRCT2::Audio::SoundId::Null, 5, 5 }, .RatingsMultipliers = { 0, 0, 0 }, .UpkeepCosts = { 50, 1, 0, 0, 0, 0 }, .BuildCosts = { 300.00_GBP, 0.00_GBP, 1, }, .DefaultPrices = { 0, 0 }, - .DefaultMusic = MUSIC_OBJECT_GENTLE, + .DefaultMusic = kMusicObjectGentle, .PhotoItem = ShopItem::Photo, .BonusValue = 15, - .ColourPresets = DEFAULT_STALL_COLOUR_PRESET, + .ColourPresets = kDefaultStallColourPreset, .ColourPreview = { 0, 0 }, .ColourKey = RideColourKey::Food, .Name = "food_stall", diff --git a/src/openrct2/ride/rtd/shops/InformationKiosk.h b/src/openrct2/ride/rtd/shops/InformationKiosk.h index a408588d4768..10575ccbea45 100644 --- a/src/openrct2/ride/rtd/shops/InformationKiosk.h +++ b/src/openrct2/ride/rtd/shops/InformationKiosk.h @@ -33,17 +33,17 @@ constexpr RideTypeDescriptor InformationKioskRTD = .Naming = { STR_RIDE_NAME_INFORMATION_KIOSK, STR_RIDE_DESCRIPTION_INFORMATION_KIOSK }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .AvailableBreakdowns = 0, - .Heights = { 12, DefaultInformationKioskHeight, 0, 0, }, + .Heights = { 12, kDefaultInformationKioskHeight, 0, 0, }, .MaxMass = 255, .LiftData = { OpenRCT2::Audio::SoundId::Null, 5, 5 }, .RatingsMultipliers = { 0, 0, 0 }, .UpkeepCosts = { 50, 1, 0, 0, 0, 0 }, .BuildCosts = { 250.00_GBP, 0.00_GBP, 1, }, .DefaultPrices = { 0, 0 }, - .DefaultMusic = MUSIC_OBJECT_GENTLE, + .DefaultMusic = kMusicObjectGentle, .PhotoItem = ShopItem::Photo, .BonusValue = 15, - .ColourPresets = DEFAULT_STALL_COLOUR_PRESET, + .ColourPresets = kDefaultStallColourPreset, .ColourPreview = { 0, 0 }, .ColourKey = RideColourKey::InfoKiosk, .Name = "information_kiosk", diff --git a/src/openrct2/ride/rtd/shops/Shop.h b/src/openrct2/ride/rtd/shops/Shop.h index 8d612d2d3b6e..0b049cd7e565 100644 --- a/src/openrct2/ride/rtd/shops/Shop.h +++ b/src/openrct2/ride/rtd/shops/Shop.h @@ -33,17 +33,17 @@ constexpr RideTypeDescriptor ShopRTD = .Naming = { STR_RIDE_NAME_SHOP, STR_RIDE_DESCRIPTION_SHOP }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .AvailableBreakdowns = 0, - .Heights = { 12, DefaultShopHeight, 0, 0, }, + .Heights = { 12, kDefaultShopHeight, 0, 0, }, .MaxMass = 255, .LiftData = { OpenRCT2::Audio::SoundId::Null, 5, 5 }, .RatingsMultipliers = { 0, 0, 0 }, .UpkeepCosts = { 50, 1, 0, 0, 0, 0 }, .BuildCosts = { 200.00_GBP, 0.00_GBP, 1, }, .DefaultPrices = { 0, 0 }, - .DefaultMusic = MUSIC_OBJECT_GENTLE, + .DefaultMusic = kMusicObjectGentle, .PhotoItem = ShopItem::Photo, .BonusValue = 15, - .ColourPresets = DEFAULT_STALL_COLOUR_PRESET, + .ColourPresets = kDefaultStallColourPreset, .ColourPreview = { 0, 0 }, .ColourKey = RideColourKey::Shop, .Name = "shop", diff --git a/src/openrct2/ride/rtd/shops/Toilets.h b/src/openrct2/ride/rtd/shops/Toilets.h index d11f9d1beae9..14d5f02143c9 100644 --- a/src/openrct2/ride/rtd/shops/Toilets.h +++ b/src/openrct2/ride/rtd/shops/Toilets.h @@ -34,17 +34,17 @@ constexpr RideTypeDescriptor ToiletsRTD = .Naming = { STR_RIDE_NAME_TOILETS, STR_RIDE_DESCRIPTION_TOILETS }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .AvailableBreakdowns = 0, - .Heights = { 12, DefaultToiletHeight, 0, 0, }, + .Heights = { 12, kDefaultToiletHeight, 0, 0, }, .MaxMass = 255, .LiftData = { OpenRCT2::Audio::SoundId::Null, 5, 5 }, .RatingsMultipliers = { 0, 0, 0 }, .UpkeepCosts = { 50, 1, 0, 0, 0, 0 }, .BuildCosts = { 225.00_GBP, 0.00_GBP, 1, }, .DefaultPrices = { 0, 0 }, - .DefaultMusic = MUSIC_OBJECT_GENTLE, + .DefaultMusic = kMusicObjectGentle, .PhotoItem = ShopItem::Photo, .BonusValue = 5, - .ColourPresets = DEFAULT_FLAT_RIDE_COLOUR_PRESET, + .ColourPresets = kDefaultFlatRideColourPreset, .ColourPreview = { 0, 0 }, .ColourKey = RideColourKey::Toilets, .Name = "toilets", diff --git a/src/openrct2/ride/rtd/thrill/3DCinema.h b/src/openrct2/ride/rtd/thrill/3DCinema.h index 415bb9ba1fac..88b71e6d2ea2 100644 --- a/src/openrct2/ride/rtd/thrill/3DCinema.h +++ b/src/openrct2/ride/rtd/thrill/3DCinema.h @@ -42,10 +42,10 @@ constexpr RideTypeDescriptor CinemaRTD = .UpkeepCosts = { 50, 1, 0, 0, 0, 0 }, .BuildCosts = { 70.00_GBP, 1.00_GBP, 1, }, .DefaultPrices = { 20, 0 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo, .BonusValue = 45, - .ColourPresets = DEFAULT_FLAT_RIDE_COLOUR_PRESET, + .ColourPresets = kDefaultFlatRideColourPreset, .ColourPreview = { 0, 0 }, .ColourKey = RideColourKey::Ride, .Name = "3d_cinema", diff --git a/src/openrct2/ride/rtd/thrill/Enterprise.h b/src/openrct2/ride/rtd/thrill/Enterprise.h index b65d76df53c7..106dadcb3729 100644 --- a/src/openrct2/ride/rtd/thrill/Enterprise.h +++ b/src/openrct2/ride/rtd/thrill/Enterprise.h @@ -42,10 +42,10 @@ constexpr RideTypeDescriptor EnterpriseRTD = .UpkeepCosts = { 50, 1, 0, 0, 0, 0 }, .BuildCosts = { 50.00_GBP, 1.00_GBP, 1, }, .DefaultPrices = { 20, 0 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_2, + .DefaultMusic = kMusicObjectRock2, .PhotoItem = ShopItem::Photo, .BonusValue = 45, - .ColourPresets = DEFAULT_FLAT_RIDE_COLOUR_PRESET, + .ColourPresets = kDefaultFlatRideColourPreset, .ColourPreview = { 0, 0 }, .ColourKey = RideColourKey::Ride, .Name = "enterprise", diff --git a/src/openrct2/ride/rtd/thrill/GoKarts.h b/src/openrct2/ride/rtd/thrill/GoKarts.h index 34cbd6f02027..93d6389e9e3b 100644 --- a/src/openrct2/ride/rtd/thrill/GoKarts.h +++ b/src/openrct2/ride/rtd/thrill/GoKarts.h @@ -43,7 +43,7 @@ constexpr RideTypeDescriptor GoKartsRTD = .UpkeepCosts = { 50, 20, 0, 8, 0, 0 }, .BuildCosts = { 31.00_GBP, 2.00_GBP, 20, }, .DefaultPrices = { 20, 0 }, - .DefaultMusic = MUSIC_OBJECT_TECHNO, + .DefaultMusic = kMusicObjectTechno, .PhotoItem = ShopItem::Photo, .BonusValue = 55, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/thrill/LaunchedFreefall.h b/src/openrct2/ride/rtd/thrill/LaunchedFreefall.h index 0da8aa4dc233..c6811de05280 100644 --- a/src/openrct2/ride/rtd/thrill/LaunchedFreefall.h +++ b/src/openrct2/ride/rtd/thrill/LaunchedFreefall.h @@ -42,7 +42,7 @@ constexpr RideTypeDescriptor LaunchedFreefallRTD = .UpkeepCosts = { 50, 20, 0, 10, 0, 0 }, .BuildCosts = { 25.00_GBP, 0.00_GBP, 4, }, .DefaultPrices = { 20, 0 }, - .DefaultMusic = MUSIC_OBJECT_TECHNO, + .DefaultMusic = kMusicObjectTechno, .PhotoItem = ShopItem::Photo, .BonusValue = 65, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/thrill/MagicCarpet.h b/src/openrct2/ride/rtd/thrill/MagicCarpet.h index 9479432b54ec..ba2694e7b022 100644 --- a/src/openrct2/ride/rtd/thrill/MagicCarpet.h +++ b/src/openrct2/ride/rtd/thrill/MagicCarpet.h @@ -43,7 +43,7 @@ constexpr RideTypeDescriptor MagicCarpetRTD = .UpkeepCosts = { 50, 1, 0, 0, 0, 0 }, .BuildCosts = { 99.00_GBP, 1.00_GBP, 1, }, .DefaultPrices = { 15, 0 }, - .DefaultMusic = MUSIC_OBJECT_EGYPTIAN, + .DefaultMusic = kMusicObjectEgyptian, .PhotoItem = ShopItem::Photo, .BonusValue = 35, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/thrill/MotionSimulator.h b/src/openrct2/ride/rtd/thrill/MotionSimulator.h index 41914794d6ab..228c910f4b5e 100644 --- a/src/openrct2/ride/rtd/thrill/MotionSimulator.h +++ b/src/openrct2/ride/rtd/thrill/MotionSimulator.h @@ -41,10 +41,10 @@ constexpr RideTypeDescriptor MotionSimulatorRTD = .UpkeepCosts = { 50, 1, 0, 0, 0, 0 }, .BuildCosts = { 110.00_GBP, 1.00_GBP, 1, }, .DefaultPrices = { 20, 0 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo, .BonusValue = 45, - .ColourPresets = DEFAULT_FLAT_RIDE_COLOUR_PRESET, + .ColourPresets = kDefaultFlatRideColourPreset, .ColourPreview = { 0, 0 }, .ColourKey = RideColourKey::Ride, .Name = "motion_simulator", diff --git a/src/openrct2/ride/rtd/thrill/RotoDrop.h b/src/openrct2/ride/rtd/thrill/RotoDrop.h index d78b93bf7a8b..424d749af224 100644 --- a/src/openrct2/ride/rtd/thrill/RotoDrop.h +++ b/src/openrct2/ride/rtd/thrill/RotoDrop.h @@ -42,7 +42,7 @@ constexpr RideTypeDescriptor RotoDropRTD = .UpkeepCosts = { 50, 20, 0, 10, 0, 0 }, .BuildCosts = { 22.50_GBP, 0.00_GBP, 4, }, .DefaultPrices = { 20, 0 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, + .DefaultMusic = kMusicObjectRock1, .PhotoItem = ShopItem::Photo, .BonusValue = 45, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/thrill/SwingingInverterShip.h b/src/openrct2/ride/rtd/thrill/SwingingInverterShip.h index d796da1e4105..95c59ef8f091 100644 --- a/src/openrct2/ride/rtd/thrill/SwingingInverterShip.h +++ b/src/openrct2/ride/rtd/thrill/SwingingInverterShip.h @@ -43,7 +43,7 @@ constexpr RideTypeDescriptor SwingingInverterShipRTD = .UpkeepCosts = { 50, 1, 0, 0, 0, 0 }, .BuildCosts = { 106.00_GBP, 1.00_GBP, 1, }, .DefaultPrices = { 15, 0 }, - .DefaultMusic = MUSIC_OBJECT_TECHNO, + .DefaultMusic = kMusicObjectTechno, .PhotoItem = ShopItem::Photo, .BonusValue = 35, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/thrill/SwingingShip.h b/src/openrct2/ride/rtd/thrill/SwingingShip.h index 2045040f106f..62cb6548af20 100644 --- a/src/openrct2/ride/rtd/thrill/SwingingShip.h +++ b/src/openrct2/ride/rtd/thrill/SwingingShip.h @@ -44,7 +44,7 @@ constexpr RideTypeDescriptor SwingingShipRTD = .UpkeepCosts = { 50, 1, 0, 0, 0, 0 }, .BuildCosts = { 77.50_GBP, 1.00_GBP, 1, }, .DefaultPrices = { 15, 0 }, - .DefaultMusic = MUSIC_OBJECT_PIRATE, + .DefaultMusic = kMusicObjectPirate, .PhotoItem = ShopItem::Photo, .BonusValue = 35, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/thrill/TopSpin.h b/src/openrct2/ride/rtd/thrill/TopSpin.h index 72db72f8bf9b..b756efc29b15 100644 --- a/src/openrct2/ride/rtd/thrill/TopSpin.h +++ b/src/openrct2/ride/rtd/thrill/TopSpin.h @@ -42,7 +42,7 @@ constexpr RideTypeDescriptor TopSpinRTD = .UpkeepCosts = { 50, 1, 0, 0, 0, 0 }, .BuildCosts = { 72.50_GBP, 1.00_GBP, 1, }, .DefaultPrices = { 20, 0 }, - .DefaultMusic = MUSIC_OBJECT_TECHNO, + .DefaultMusic = kMusicObjectTechno, .PhotoItem = ShopItem::Photo, .BonusValue = 55, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/thrill/Twist.h b/src/openrct2/ride/rtd/thrill/Twist.h index 6a36511e94ce..36c171c03885 100644 --- a/src/openrct2/ride/rtd/thrill/Twist.h +++ b/src/openrct2/ride/rtd/thrill/Twist.h @@ -41,10 +41,10 @@ constexpr RideTypeDescriptor TwistRTD = .UpkeepCosts = { 50, 1, 0, 0, 0, 0 }, .BuildCosts = { 45.00_GBP, 1.00_GBP, 1, }, .DefaultPrices = { 10, 0 }, - .DefaultMusic = MUSIC_OBJECT_GENTLE, + .DefaultMusic = kMusicObjectGentle, .PhotoItem = ShopItem::Photo, .BonusValue = 40, - .ColourPresets = DEFAULT_FLAT_RIDE_COLOUR_PRESET, + .ColourPresets = kDefaultFlatRideColourPreset, .ColourPreview = { 0, 0 }, .ColourKey = RideColourKey::Ride, .Name = "twist", diff --git a/src/openrct2/ride/rtd/transport/Chairlift.h b/src/openrct2/ride/rtd/transport/Chairlift.h index 8951dcb3b001..a785b6289ce1 100644 --- a/src/openrct2/ride/rtd/transport/Chairlift.h +++ b/src/openrct2/ride/rtd/transport/Chairlift.h @@ -45,7 +45,7 @@ constexpr RideTypeDescriptor ChairliftRTD = .UpkeepCosts = { 60, 20, 0, 4, 3, 10 }, .BuildCosts = { 32.50_GBP, 0.50_GBP, 30, }, .DefaultPrices = { 10, 0 }, - .DefaultMusic = MUSIC_OBJECT_SUMMER, + .DefaultMusic = kMusicObjectSummer, .PhotoItem = ShopItem::Photo, .BonusValue = 55, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/transport/Lift.h b/src/openrct2/ride/rtd/transport/Lift.h index 4d68846a408d..21404b06d94f 100644 --- a/src/openrct2/ride/rtd/transport/Lift.h +++ b/src/openrct2/ride/rtd/transport/Lift.h @@ -41,7 +41,7 @@ constexpr RideTypeDescriptor LiftRTD = .UpkeepCosts = { 50, 20, 0, 10, 0, 0 }, .BuildCosts = { 19.50_GBP, 0.00_GBP, 4, }, .DefaultPrices = { 10, 0 }, - .DefaultMusic = MUSIC_OBJECT_SUMMER, + .DefaultMusic = kMusicObjectSummer, .PhotoItem = ShopItem::Photo, .BonusValue = 45, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/transport/MiniatureRailway.h b/src/openrct2/ride/rtd/transport/MiniatureRailway.h index e9f21f853a9a..700e1da249c8 100644 --- a/src/openrct2/ride/rtd/transport/MiniatureRailway.h +++ b/src/openrct2/ride/rtd/transport/MiniatureRailway.h @@ -45,7 +45,7 @@ constexpr RideTypeDescriptor MiniatureRailwayRTD = .UpkeepCosts = { 60, 20, 0, 10, 3, 5 }, .BuildCosts = { 17.50_GBP, 3.00_GBP, 50, }, .DefaultPrices = { 10, 0 }, - .DefaultMusic = MUSIC_OBJECT_SUMMER, + .DefaultMusic = kMusicObjectSummer, .PhotoItem = ShopItem::Photo, .BonusValue = 50, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/transport/Monorail.h b/src/openrct2/ride/rtd/transport/Monorail.h index ca2203e32ebe..213c7ee9d966 100644 --- a/src/openrct2/ride/rtd/transport/Monorail.h +++ b/src/openrct2/ride/rtd/transport/Monorail.h @@ -45,7 +45,7 @@ constexpr RideTypeDescriptor MonorailRTD = .UpkeepCosts = { 65, 20, 0, 10, 3, 10 }, .BuildCosts = { 21.00_GBP, 2.50_GBP, 50, }, .DefaultPrices = { 10, 0 }, - .DefaultMusic = MUSIC_OBJECT_SUMMER, + .DefaultMusic = kMusicObjectSummer, .PhotoItem = ShopItem::Photo, .BonusValue = 60, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/transport/SuspendedMonorail.h b/src/openrct2/ride/rtd/transport/SuspendedMonorail.h index 5091101229e4..4b108f71ebc2 100644 --- a/src/openrct2/ride/rtd/transport/SuspendedMonorail.h +++ b/src/openrct2/ride/rtd/transport/SuspendedMonorail.h @@ -45,7 +45,7 @@ constexpr RideTypeDescriptor SuspendedMonorailRTD = .UpkeepCosts = { 70, 20, 0, 10, 3, 10 }, .BuildCosts = { 32.50_GBP, 2.50_GBP, 50, }, .DefaultPrices = { 10, 0 }, - .DefaultMusic = MUSIC_OBJECT_SUMMER, + .DefaultMusic = kMusicObjectSummer, .PhotoItem = ShopItem::Photo, .BonusValue = 60, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/water/BoatHire.h b/src/openrct2/ride/rtd/water/BoatHire.h index 95651806d5c7..33f2f43ce0e6 100644 --- a/src/openrct2/ride/rtd/water/BoatHire.h +++ b/src/openrct2/ride/rtd/water/BoatHire.h @@ -41,7 +41,7 @@ constexpr RideTypeDescriptor BoatHireRTD = .UpkeepCosts = { 50, 1, 0, 4, 0, 0 }, .BuildCosts = { 27.50_GBP, 0.00_GBP, 5, }, .DefaultPrices = { 10, 0 }, - .DefaultMusic = MUSIC_OBJECT_WATER, + .DefaultMusic = kMusicObjectWater, .PhotoItem = ShopItem::Photo, .BonusValue = 40, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/water/DinghySlide.h b/src/openrct2/ride/rtd/water/DinghySlide.h index c7325934f1ba..e51a665b68be 100644 --- a/src/openrct2/ride/rtd/water/DinghySlide.h +++ b/src/openrct2/ride/rtd/water/DinghySlide.h @@ -58,7 +58,7 @@ constexpr RideTypeDescriptor DinghySlideRTD = .UpkeepCosts = { 40, 20, 80, 4, 3, 10 }, .BuildCosts = { 20.00_GBP, 2.00_GBP, 40, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_WATER, + .DefaultMusic = kMusicObjectWater, .PhotoItem = ShopItem::Photo4, .BonusValue = 55, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/water/LogFlume.h b/src/openrct2/ride/rtd/water/LogFlume.h index 097f7141a141..db13843628c9 100644 --- a/src/openrct2/ride/rtd/water/LogFlume.h +++ b/src/openrct2/ride/rtd/water/LogFlume.h @@ -44,7 +44,7 @@ constexpr RideTypeDescriptor LogFlumeRTD = .UpkeepCosts = { 80, 20, 0, 9, 0, 10 }, .BuildCosts = { 22.50_GBP, 2.50_GBP, 40, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_WATER, + .DefaultMusic = kMusicObjectWater, .PhotoItem = ShopItem::Photo4, .BonusValue = 65, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/water/RiverRafts.h b/src/openrct2/ride/rtd/water/RiverRafts.h index 02c48ee8c654..a9a0f3e8ada1 100644 --- a/src/openrct2/ride/rtd/water/RiverRafts.h +++ b/src/openrct2/ride/rtd/water/RiverRafts.h @@ -44,7 +44,7 @@ constexpr RideTypeDescriptor RiverRaftsRTD = .UpkeepCosts = { 50, 20, 0, 9, 0, 10 }, .BuildCosts = { 20.00_GBP, 2.50_GBP, 30, }, .DefaultPrices = { 10, 20 }, - .DefaultMusic = MUSIC_OBJECT_GENTLE, + .DefaultMusic = kMusicObjectGentle, .PhotoItem = ShopItem::Photo4, .BonusValue = 65, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/water/RiverRapids.h b/src/openrct2/ride/rtd/water/RiverRapids.h index bd77e175d502..95854495c100 100644 --- a/src/openrct2/ride/rtd/water/RiverRapids.h +++ b/src/openrct2/ride/rtd/water/RiverRapids.h @@ -45,7 +45,7 @@ constexpr RideTypeDescriptor RiverRapidsRTD = .UpkeepCosts = { 82, 20, 0, 10, 0, 10 }, .BuildCosts = { 31.00_GBP, 3.00_GBP, 40, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_WATER, + .DefaultMusic = kMusicObjectWater, .PhotoItem = ShopItem::Photo4, .BonusValue = 70, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/water/SplashBoats.h b/src/openrct2/ride/rtd/water/SplashBoats.h index df0e2d23dd2f..801376ebe72a 100644 --- a/src/openrct2/ride/rtd/water/SplashBoats.h +++ b/src/openrct2/ride/rtd/water/SplashBoats.h @@ -45,7 +45,7 @@ constexpr RideTypeDescriptor SplashBoatsRTD = .UpkeepCosts = { 70, 20, 0, 9, 0, 10 }, .BuildCosts = { 28.50_GBP, 2.50_GBP, 30, }, .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_WATER, + .DefaultMusic = kMusicObjectWater, .PhotoItem = ShopItem::Photo4, .BonusValue = 65, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/ride/rtd/water/SubmarineRide.h b/src/openrct2/ride/rtd/water/SubmarineRide.h index d72a72107c73..085e652a54c0 100644 --- a/src/openrct2/ride/rtd/water/SubmarineRide.h +++ b/src/openrct2/ride/rtd/water/SubmarineRide.h @@ -44,7 +44,7 @@ constexpr RideTypeDescriptor SubmarineRideRTD = .UpkeepCosts = { 50, 1, 0, 4, 0, 0 }, .BuildCosts = { 35.00_GBP, 2.50_GBP, 5, }, .DefaultPrices = { 10, 0 }, - .DefaultMusic = MUSIC_OBJECT_WATER, + .DefaultMusic = kMusicObjectWater, .PhotoItem = ShopItem::Photo, .BonusValue = 40, .ColourPresets = TRACK_COLOUR_PRESETS( diff --git a/src/openrct2/scenario/Scenario.cpp b/src/openrct2/scenario/Scenario.cpp index 345a49530a84..822bf9aac9e7 100644 --- a/src/openrct2/scenario/Scenario.cpp +++ b/src/openrct2/scenario/Scenario.cpp @@ -69,7 +69,7 @@ using namespace OpenRCT2; -const StringId ScenarioCategoryStringIds[SCENARIO_CATEGORY_COUNT] = { +const StringId kScenarioCategoryStringIds[SCENARIO_CATEGORY_COUNT] = { STR_BEGINNER_PARKS, STR_CHALLENGING_PARKS, STR_EXPERT_PARKS, STR_REAL_PARKS, STR_OTHER_PARKS, STR_DLC_PARKS, STR_BUILD_YOUR_OWN_PARKS, STR_COMPETITIONS, STR_UCES_TM, STR_UCES_KD, }; @@ -151,7 +151,7 @@ void ScenarioReset(GameState_t& gameState) Staff::ResetStats(); gameState.LastEntranceStyle = objManager.GetLoadedObjectEntryIndex("rct2.station.plain"); - if (gameState.LastEntranceStyle == OBJECT_ENTRY_INDEX_NULL) + if (gameState.LastEntranceStyle == kObjectEntryIndexNull) { // Fall back to first entrance object gameState.LastEntranceStyle = 0; @@ -188,7 +188,7 @@ static void ScenarioEnd() */ void ScenarioFailure(GameState_t& gameState) { - gameState.ScenarioCompletedCompanyValue = COMPANY_VALUE_ON_FAILED_OBJECTIVE; + gameState.ScenarioCompletedCompanyValue = kCompanyValueOnFailedObjective; ScenarioEnd(); } @@ -662,7 +662,7 @@ ObjectiveStatus Objective::Check10RollerCoasters() const for (const auto& ride : GetRideManager()) { if (ride.status == RideStatus::Open && ride.ratings.excitement >= RIDE_RATING(6, 00) - && ride.subtype != OBJECT_ENTRY_INDEX_NULL) + && ride.subtype != kObjectEntryIndexNull) { auto rideEntry = ride.GetRideEntry(); if (rideEntry != nullptr) @@ -729,7 +729,7 @@ ObjectiveStatus Objective::CheckGuestsAndRating() const return ObjectiveStatus::Failure; } } - else if (gameState.ScenarioCompletedCompanyValue != COMPANY_VALUE_ON_FAILED_OBJECTIVE) + else if (gameState.ScenarioCompletedCompanyValue != kCompanyValueOnFailedObjective) { gameState.ScenarioParkRatingWarningDays = 0; } @@ -764,7 +764,7 @@ ObjectiveStatus Objective::Check10RollerCoastersLength() const for (const auto& ride : GetRideManager()) { if (ride.status == RideStatus::Open && ride.ratings.excitement >= RIDE_RATING(7, 00) - && ride.subtype != OBJECT_ENTRY_INDEX_NULL) + && ride.subtype != kObjectEntryIndexNull) { auto rideEntry = ride.GetRideEntry(); if (rideEntry != nullptr) diff --git a/src/openrct2/scenario/Scenario.h b/src/openrct2/scenario/Scenario.h index 1bbca1bdb06c..86d25bdf7668 100644 --- a/src/openrct2/scenario/Scenario.h +++ b/src/openrct2/scenario/Scenario.h @@ -150,9 +150,9 @@ enum constexpr uint8_t kAutosavePause = 0; constexpr uint8_t kDefaultNumAutosavesToKeep = 10; -static constexpr money64 COMPANY_VALUE_ON_FAILED_OBJECTIVE = 0x8000000000000001; +static constexpr money64 kCompanyValueOnFailedObjective = 0x8000000000000001; -extern const StringId ScenarioCategoryStringIds[SCENARIO_CATEGORY_COUNT]; +extern const StringId kScenarioCategoryStringIds[SCENARIO_CATEGORY_COUNT]; extern bool gAllowEarlyCompletionInNetworkPlay; diff --git a/src/openrct2/scenario/ScenarioSources.cpp b/src/openrct2/scenario/ScenarioSources.cpp index 3958e3a188d9..8b24eba61135 100644 --- a/src/openrct2/scenario/ScenarioSources.cpp +++ b/src/openrct2/scenario/ScenarioSources.cpp @@ -37,7 +37,7 @@ namespace OpenRCT2::ScenarioSources #pragma region Scenario Data // clang-format off - static constexpr ScenarioAlias ScenarioAliases[] = + static constexpr ScenarioAlias kScenarioAliases[] = { // UK - US differences: { "Katie's Dreamland", "Katie's World" }, @@ -119,7 +119,7 @@ namespace OpenRCT2::ScenarioSources }; // RCT - static constexpr ScenarioTitleDescriptor ScenarioTitlesRCT1[] = + static constexpr ScenarioTitleDescriptor kScenarioTitlesRCT1[] = { { SC_FOREST_FRONTIERS, "Forest Frontiers", SCENARIO_CATEGORY_BEGINNER, "rct1.scenario_text.forest_frontiers" }, { SC_DYNAMITE_DUNES, "Dynamite Dunes", SCENARIO_CATEGORY_BEGINNER, "rct1.scenario_text.dynamite_dunes" }, @@ -146,7 +146,7 @@ namespace OpenRCT2::ScenarioSources }; // RCT: Added Attractions - static constexpr ScenarioTitleDescriptor ScenarioTitlesRCT1AA[] = + static constexpr ScenarioTitleDescriptor kScenarioTitlesRCT1AA[] = { { SC_WHISPERING_CLIFFS, "Whispering Cliffs", SCENARIO_CATEGORY_BEGINNER, "rct1aa.scenario_text.whispering_cliffs" }, { SC_THREE_MONKEYS_PARK, "Three Monkeys Park", SCENARIO_CATEGORY_BEGINNER, "rct1aa.scenario_text.three_monkeys_park" }, @@ -181,7 +181,7 @@ namespace OpenRCT2::ScenarioSources }; // RCT: Loopy Landscapes - static constexpr ScenarioTitleDescriptor ScenarioTitlesRCT1LL[] = + static constexpr ScenarioTitleDescriptor kScenarioTitlesRCT1LL[] = { { SC_ICEBERG_ISLANDS, "Iceberg Islands", SCENARIO_CATEGORY_BEGINNER, "rct1ll.scenario_text.iceberg_islands" }, { SC_VOLCANIA, "Volcania", SCENARIO_CATEGORY_BEGINNER, "rct1ll.scenario_text.volcania" }, @@ -216,7 +216,7 @@ namespace OpenRCT2::ScenarioSources }; // RCT2 - static constexpr ScenarioTitleDescriptor ScenarioTitlesRCT2[] = + static constexpr ScenarioTitleDescriptor kScenarioTitlesRCT2[] = { { SC_UNIDENTIFIED, "Electric Fields", SCENARIO_CATEGORY_BEGINNER, "rct2.scenario_text.electric_fields" }, { SC_UNIDENTIFIED, "Factory Capers", SCENARIO_CATEGORY_BEGINNER, "rct2.scenario_text.factory_capers" }, @@ -236,7 +236,7 @@ namespace OpenRCT2::ScenarioSources }; // RCT2: Wacky Worlds - static constexpr ScenarioTitleDescriptor ScenarioTitlesRCT2WW[] = + static constexpr ScenarioTitleDescriptor kScenarioTitlesRCT2WW[] = { { SC_UNIDENTIFIED, "North America - Grand Canyon", SCENARIO_CATEGORY_BEGINNER, "rct2ww.scenario_text.canyon_calamities" }, { SC_UNIDENTIFIED, "Asia - Great Wall of China Tourism Enhancement", SCENARIO_CATEGORY_BEGINNER, "rct2ww.scenario_text.great_wall_of_china" }, @@ -258,7 +258,7 @@ namespace OpenRCT2::ScenarioSources }; // RCT2: Time Twister - static constexpr ScenarioTitleDescriptor ScenarioTitlesRCT2TT[] = + static constexpr ScenarioTitleDescriptor kScenarioTitlesRCT2TT[] = { { SC_UNIDENTIFIED, "Dark Age - Robin Hood", SCENARIO_CATEGORY_BEGINNER, "rct2tt.scenario_text.sherwood_forest" }, { SC_UNIDENTIFIED, "Prehistoric - After the Asteroid", SCENARIO_CATEGORY_BEGINNER, "rct2tt.scenario_text.crater_carnage" }, @@ -277,7 +277,7 @@ namespace OpenRCT2::ScenarioSources }; // User Created Expansion Sets - static constexpr ScenarioTitleDescriptor ScenarioTitlesUCES[] = + static constexpr ScenarioTitleDescriptor kScenarioTitlesUCES[] = { { SC_UNIDENTIFIED, "Lighthouse of Alexandria by Katatude for UCES", SCENARIO_CATEGORY_TIME_MACHINE, "uces.scenario_text.the_lighthouse_of_alexandria" }, { SC_UNIDENTIFIED, "Cleveland's Luna Park", SCENARIO_CATEGORY_TIME_MACHINE, "uces.scenario_text.luna_park_cleveland" }, @@ -300,7 +300,7 @@ namespace OpenRCT2::ScenarioSources }; // Real parks - static constexpr ScenarioTitleDescriptor ScenarioTitlesRealParks[] = + static constexpr ScenarioTitleDescriptor kScenarioTitlesRealParks[] = { { SC_ALTON_TOWERS, "Alton Towers", SCENARIO_CATEGORY_REAL, "rct1ll.scenario_text.alton_towers" }, { SC_HEIDE_PARK, "Heide-Park", SCENARIO_CATEGORY_REAL, "rct1ll.scenario_text.heidepark" }, @@ -313,7 +313,7 @@ namespace OpenRCT2::ScenarioSources }; // Other parks - static constexpr ScenarioTitleDescriptor ScenarioTitlesExtrasParks[] = + static constexpr ScenarioTitleDescriptor kScenarioTitlesExtrasParks[] = { { SC_FORT_ANACHRONISM, "Fort Anachronism", SCENARIO_CATEGORY_DLC, "rct1dlc.scenario_text.fort_anachronism" }, { SC_PCPLAYER, "PC Player", SCENARIO_CATEGORY_DLC, {} }, @@ -342,16 +342,16 @@ namespace OpenRCT2::ScenarioSources { SC_UNIDENTIFIED, "Tycoon Park", SCENARIO_CATEGORY_OTHER, "rct2.scenario_text.tycoon_park" }, }; - constexpr std::span ScenarioTitlesBySource[] = { - ScenarioTitlesRCT1, - ScenarioTitlesRCT1AA, - ScenarioTitlesRCT1LL, - ScenarioTitlesRCT2, - ScenarioTitlesRCT2WW, - ScenarioTitlesRCT2TT, - ScenarioTitlesUCES, - ScenarioTitlesRealParks, - ScenarioTitlesExtrasParks, + constexpr std::span kScenarioTitlesBySource[] = { + kScenarioTitlesRCT1, + kScenarioTitlesRCT1AA, + kScenarioTitlesRCT1LL, + kScenarioTitlesRCT2, + kScenarioTitlesRCT2WW, + kScenarioTitlesRCT2TT, + kScenarioTitlesUCES, + kScenarioTitlesRealParks, + kScenarioTitlesExtrasParks, }; // clang-format on @@ -362,11 +362,11 @@ namespace OpenRCT2::ScenarioSources Guard::ArgumentNotNull(outDesc, GUARD_LINE); int32_t currentIndex = 0; - for (size_t i = 0; i < std::size(ScenarioTitlesBySource); i++) + for (size_t i = 0; i < std::size(kScenarioTitlesBySource); i++) { - for (size_t j = 0; j < std::size(ScenarioTitlesBySource[i]); j++) + for (size_t j = 0; j < std::size(kScenarioTitlesBySource[i]); j++) { - const ScenarioTitleDescriptor* desc = &ScenarioTitlesBySource[i][j]; + const ScenarioTitleDescriptor* desc = &kScenarioTitlesBySource[i][j]; if (String::iequals(name, desc->Title)) { outDesc->title = desc->Title; @@ -395,11 +395,11 @@ namespace OpenRCT2::ScenarioSources Guard::ArgumentNotNull(outDesc, GUARD_LINE); int32_t currentIndex = 0; - for (size_t i = 0; i < std::size(ScenarioTitlesBySource); i++) + for (size_t i = 0; i < std::size(kScenarioTitlesBySource); i++) { - for (size_t j = 0; j < std::size(ScenarioTitlesBySource[i]); j++) + for (size_t j = 0; j < std::size(kScenarioTitlesBySource[i]); j++) { - const ScenarioTitleDescriptor* desc = &ScenarioTitlesBySource[i][j]; + const ScenarioTitleDescriptor* desc = &kScenarioTitlesBySource[i][j]; if (id == desc->Id) { outDesc->title = desc->Title; @@ -449,7 +449,7 @@ namespace OpenRCT2::ScenarioSources // American scenario titles should be converted to British name // Don't worry, names will be translated using language packs later - for (const ScenarioAlias& alias : ScenarioAliases) + for (const ScenarioAlias& alias : kScenarioAliases) { if (String::equals(alias.Alternative, normalisedName)) { diff --git a/src/openrct2/scenes/preloader/PreloaderScene.cpp b/src/openrct2/scenes/preloader/PreloaderScene.cpp index ec1282129a74..c434ebaf92e5 100644 --- a/src/openrct2/scenes/preloader/PreloaderScene.cpp +++ b/src/openrct2/scenes/preloader/PreloaderScene.cpp @@ -36,7 +36,7 @@ void PreloaderScene::Load() LOG_VERBOSE("PreloaderScene::Load()"); gScreenFlags = SCREEN_FLAGS_PLAYING; - gameStateInitAll(GetGameState(), DEFAULT_MAP_SIZE); + gameStateInitAll(GetGameState(), kDefaultMapSize); ViewportInitAll(); ContextOpenWindow(WindowClass::MainWindow); WindowSetFlagForAllViewports(VIEWPORT_FLAG_RENDERING_INHIBITED, true); diff --git a/src/openrct2/scenes/title/TitleScene.cpp b/src/openrct2/scenes/title/TitleScene.cpp index 8fdb7259ed22..5da6d067aced 100644 --- a/src/openrct2/scenes/title/TitleScene.cpp +++ b/src/openrct2/scenes/title/TitleScene.cpp @@ -106,7 +106,7 @@ void TitleScene::Load() #ifndef DISABLE_NETWORK GetContext().GetNetwork().Close(); #endif - gameStateInitAll(GetGameState(), DEFAULT_MAP_SIZE); + gameStateInitAll(GetGameState(), kDefaultMapSize); ViewportInitAll(); ContextOpenWindow(WindowClass::MainWindow); @@ -318,7 +318,7 @@ bool TitleScene::TryLoadSequence(bool loadPreview) _loadedTitleSequenceId = SIZE_MAX; if (!loadPreview) { - gameStateInitAll(GetGameState(), DEFAULT_MAP_SIZE); + gameStateInitAll(GetGameState(), kDefaultMapSize); GameNotifyMapChanged(); } return false; diff --git a/src/openrct2/scripting/Duktape.hpp b/src/openrct2/scripting/Duktape.hpp index 088b383d0178..ac71d5d8454e 100644 --- a/src/openrct2/scripting/Duktape.hpp +++ b/src/openrct2/scripting/Duktape.hpp @@ -495,7 +495,7 @@ namespace OpenRCT2::Scripting return static_cast(value); } } - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; } uint32_t ImageFromDuk(const DukValue& d); diff --git a/src/openrct2/scripting/bindings/entity/ScGuest.cpp b/src/openrct2/scripting/bindings/entity/ScGuest.cpp index 11277b9b6ec4..a8dce9ce696a 100644 --- a/src/openrct2/scripting/bindings/entity/ScGuest.cpp +++ b/src/openrct2/scripting/bindings/entity/ScGuest.cpp @@ -514,7 +514,7 @@ namespace OpenRCT2::Scripting { auto& gameState = GetGameState(); if (value.type() == DukValue::Type::NUMBER && value.as_uint() < gameState.Rides.size() - && gameState.Rides[value.as_uint()].type != RIDE_TYPE_NULL) + && gameState.Rides[value.as_uint()].type != kRideTypeNull) { peep->FavouriteRide = RideId::FromUnderlying(value.as_uint()); } diff --git a/src/openrct2/scripting/bindings/world/ScScenario.hpp b/src/openrct2/scripting/bindings/world/ScScenario.hpp index 3cd3dafa0b78..2a772f55db88 100644 --- a/src/openrct2/scripting/bindings/world/ScScenario.hpp +++ b/src/openrct2/scripting/bindings/world/ScScenario.hpp @@ -261,7 +261,7 @@ namespace OpenRCT2::Scripting const auto& gameState = GetGameState(); auto ctx = GetContext()->GetScriptEngine().GetContext(); if (gameState.ScenarioCompletedCompanyValue == kMoney64Undefined - || gameState.ScenarioCompletedCompanyValue == COMPANY_VALUE_ON_FAILED_OBJECTIVE) + || gameState.ScenarioCompletedCompanyValue == kCompanyValueOnFailedObjective) { return ToDuk(ctx, nullptr); } @@ -278,7 +278,7 @@ namespace OpenRCT2::Scripting const auto& gameState = GetGameState(); if (gameState.ScenarioCompletedCompanyValue == kMoney64Undefined) return "inProgress"; - if (gameState.ScenarioCompletedCompanyValue == COMPANY_VALUE_ON_FAILED_OBJECTIVE) + if (gameState.ScenarioCompletedCompanyValue == kCompanyValueOnFailedObjective) return "failed"; return "completed"; } @@ -289,7 +289,7 @@ namespace OpenRCT2::Scripting if (value == "inProgress") gameState.ScenarioCompletedCompanyValue = kMoney64Undefined; else if (value == "failed") - gameState.ScenarioCompletedCompanyValue = COMPANY_VALUE_ON_FAILED_OBJECTIVE; + gameState.ScenarioCompletedCompanyValue = kCompanyValueOnFailedObjective; else if (value == "completed") gameState.ScenarioCompletedCompanyValue = gameState.CompanyValue; } diff --git a/src/openrct2/scripting/bindings/world/ScTileElement.cpp b/src/openrct2/scripting/bindings/world/ScTileElement.cpp index 813114f3fd44..ebb7251d2cdc 100644 --- a/src/openrct2/scripting/bindings/world/ScTileElement.cpp +++ b/src/openrct2/scripting/bindings/world/ScTileElement.cpp @@ -1134,7 +1134,7 @@ namespace OpenRCT2::Scripting { auto* el = _element->AsPath(); auto index = el->GetLegacyPathEntryIndex(); - if (index != OBJECT_ENTRY_INDEX_NULL) + if (index != kObjectEntryIndexNull) duk_push_int(ctx, index); else duk_push_null(ctx); @@ -1784,7 +1784,7 @@ namespace OpenRCT2::Scripting { auto* el = _element->AsPath(); auto index = el->GetSurfaceEntryIndex(); - if (index != OBJECT_ENTRY_INDEX_NULL) + if (index != kObjectEntryIndexNull) { duk_push_int(ctx, index); } @@ -1822,7 +1822,7 @@ namespace OpenRCT2::Scripting { auto* el = _element->AsPath(); auto index = el->GetRailingsEntryIndex(); - if (index != OBJECT_ENTRY_INDEX_NULL) + if (index != kObjectEntryIndexNull) { duk_push_int(ctx, index); } @@ -1969,7 +1969,7 @@ namespace OpenRCT2::Scripting if (el != nullptr) { auto index = el->GetLegacyPathEntryIndex(); - if (index != OBJECT_ENTRY_INDEX_NULL) + if (index != kObjectEntryIndexNull) { duk_push_int(ctx, index); } @@ -2006,7 +2006,7 @@ namespace OpenRCT2::Scripting if (el != nullptr) { auto index = el->GetSurfaceEntryIndex(); - if (index != OBJECT_ENTRY_INDEX_NULL) + if (index != kObjectEntryIndexNull) { duk_push_int(ctx, index); } diff --git a/src/openrct2/world/Banner.h b/src/openrct2/world/Banner.h index 49aeeadf3377..7b2fd2ae5625 100644 --- a/src/openrct2/world/Banner.h +++ b/src/openrct2/world/Banner.h @@ -24,7 +24,7 @@ namespace OpenRCT2 struct GameState_t; } -constexpr ObjectEntryIndex BANNER_NULL = OBJECT_ENTRY_INDEX_NULL; +constexpr ObjectEntryIndex BANNER_NULL = kObjectEntryIndexNull; constexpr size_t MAX_BANNERS = 8192; constexpr uint8_t SCROLLING_MODE_NONE = 255; diff --git a/src/openrct2/world/ConstructionClearance.cpp b/src/openrct2/world/ConstructionClearance.cpp index 6d9a0a82d3ee..35e2167e4b7a 100644 --- a/src/openrct2/world/ConstructionClearance.cpp +++ b/src/openrct2/world/ConstructionClearance.cpp @@ -234,27 +234,27 @@ GameActions::Result MapCanConstructWithClearAt( const auto slope = tileElement->AsSurface()->GetSlope(); if (slope & kTileSlopeNCornerUp) { - northZ += LAND_HEIGHT_STEP; + northZ += kLandHeightStep; if (slope == (kTileSlopeSCornerDown | kTileSlopeDiagonalFlag)) - northZ += LAND_HEIGHT_STEP; + northZ += kLandHeightStep; } if (slope & kTileSlopeECornerUp) { - eastZ += LAND_HEIGHT_STEP; + eastZ += kLandHeightStep; if (slope == (kTileSlopeWCornerDown | kTileSlopeDiagonalFlag)) - eastZ += LAND_HEIGHT_STEP; + eastZ += kLandHeightStep; } if (slope & kTileSlopeSCornerUp) { - southZ += LAND_HEIGHT_STEP; + southZ += kLandHeightStep; if (slope == (kTileSlopeNCornerDown | kTileSlopeDiagonalFlag)) - southZ += LAND_HEIGHT_STEP; + southZ += kLandHeightStep; } if (slope & kTileSlopeWCornerUp) { - westZ += LAND_HEIGHT_STEP; + westZ += kLandHeightStep; if (slope == (kTileSlopeECornerDown | kTileSlopeDiagonalFlag)) - westZ += LAND_HEIGHT_STEP; + westZ += kLandHeightStep; } const auto baseHeight = pos.baseZ + (4 * kCoordsZStep); const auto baseQuarter = quarterTile.GetBaseQuarterOccupied(); diff --git a/src/openrct2/world/Footpath.cpp b/src/openrct2/world/Footpath.cpp index 7d2841643255..39fcaef603b8 100644 --- a/src/openrct2/world/Footpath.cpp +++ b/src/openrct2/world/Footpath.cpp @@ -432,7 +432,7 @@ static bool FootpathReconnectQueueToPath( } int32_t z = tileElement->GetBaseZ(); - TileElement* targetFootpathElement = FootpathGetElement({ targetQueuePos, z - LAND_HEIGHT_STEP, z }, direction); + TileElement* targetFootpathElement = FootpathGetElement({ targetQueuePos, z - kLandHeightStep, z }, direction); if (targetFootpathElement != nullptr && !targetFootpathElement->AsPath()->IsQueue()) { auto targetQueueElement = targetFootpathElement->AsPath(); @@ -589,7 +589,7 @@ static void Loc6A6D7E( } return; } - if (tileElement->GetBaseZ() == initialTileElementPos.z - LAND_HEIGHT_STEP) + if (tileElement->GetBaseZ() == initialTileElementPos.z - kLandHeightStep) { if (tileElement->AsPath()->IsSloped() && tileElement->AsPath()->GetSlopeDirection() == DirectionReverse(direction)) @@ -726,7 +726,7 @@ static void Loc6A6C85( } if (tileElementPos.element->AsPath()->GetSlopeDirection() == direction) { - pos.z += LAND_HEIGHT_STEP; + pos.z += kLandHeightStep; } } } @@ -823,7 +823,7 @@ void FootpathChainRideQueue( { if (tileElement->AsPath()->GetSlopeDirection() == direction) { - baseZ += LAND_HEIGHT_STEP; + baseZ += kLandHeightStep; } } } @@ -849,7 +849,7 @@ void FootpathChainRideQueue( foundQueue = true; break; } - if (tileElement->GetBaseZ() == baseZ - LAND_HEIGHT_STEP) + if (tileElement->GetBaseZ() == baseZ - kLandHeightStep) { if (!tileElement->AsPath()->IsSloped()) break; @@ -857,7 +857,7 @@ void FootpathChainRideQueue( if (DirectionReverse(tileElement->AsPath()->GetSlopeDirection()) != direction) break; - baseZ -= LAND_HEIGHT_STEP; + baseZ -= kLandHeightStep; foundQueue = true; break; } @@ -1824,7 +1824,7 @@ static ObjectEntryIndex FootpathGetDefaultSurface(bool queue) } } } - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; } static bool FootpathIsSurfaceEntryOkay(ObjectEntryIndex index, bool queue) @@ -1855,7 +1855,7 @@ static ObjectEntryIndex FootpathGetDefaultRailings() return i; } } - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; } static bool FootpathIsLegacyPathEntryOkay(ObjectEntryIndex index) @@ -1880,7 +1880,7 @@ static ObjectEntryIndex FootpathGetDefaultLegacyPath() return i; } } - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; } bool FootpathSelectDefault() @@ -1909,7 +1909,7 @@ bool FootpathSelectDefault() // Select default legacy path auto legacyPathIndex = FootpathGetDefaultLegacyPath(); - if (gFootpathSelection.LegacyPath != OBJECT_ENTRY_INDEX_NULL) + if (gFootpathSelection.LegacyPath != kObjectEntryIndexNull) { if (FootpathIsLegacyPathEntryOkay(gFootpathSelection.LegacyPath)) { @@ -1919,13 +1919,13 @@ bool FootpathSelectDefault() else { // Reset legacy path, we default to a surface (if there are any) - gFootpathSelection.LegacyPath = OBJECT_ENTRY_INDEX_NULL; + gFootpathSelection.LegacyPath = kObjectEntryIndexNull; } } - if (surfaceIndex == OBJECT_ENTRY_INDEX_NULL) + if (surfaceIndex == kObjectEntryIndexNull) { - if (legacyPathIndex == OBJECT_ENTRY_INDEX_NULL) + if (legacyPathIndex == kObjectEntryIndexNull) { // No surfaces or legacy paths available return false; diff --git a/src/openrct2/world/Footpath.h b/src/openrct2/world/Footpath.h index c7823488cf45..f73432c6dcf3 100644 --- a/src/openrct2/world/Footpath.h +++ b/src/openrct2/world/Footpath.h @@ -59,10 +59,10 @@ namespace OpenRCT2::PathConstructFlag struct FootpathSelection { - ObjectEntryIndex LegacyPath = OBJECT_ENTRY_INDEX_NULL; - ObjectEntryIndex NormalSurface = OBJECT_ENTRY_INDEX_NULL; - ObjectEntryIndex QueueSurface = OBJECT_ENTRY_INDEX_NULL; - ObjectEntryIndex Railings = OBJECT_ENTRY_INDEX_NULL; + ObjectEntryIndex LegacyPath = kObjectEntryIndexNull; + ObjectEntryIndex NormalSurface = kObjectEntryIndexNull; + ObjectEntryIndex QueueSurface = kObjectEntryIndexNull; + ObjectEntryIndex Railings = kObjectEntryIndexNull; bool IsQueueSelected{}; ObjectEntryIndex GetSelectedSurface() const diff --git a/src/openrct2/world/Map.cpp b/src/openrct2/world/Map.cpp index cc1a0efd5498..cec026da67a7 100644 --- a/src/openrct2/world/Map.cpp +++ b/src/openrct2/world/Map.cpp @@ -259,7 +259,7 @@ void ReorganiseTileElements() static bool MapCheckFreeElementsAndReorganise(size_t numElementsOnTile, size_t numNewElements) { // Check hard cap on num in use tiles (this would be the size of _tileElements immediately after a reorg) - if (_tileElementsInUse + numNewElements > MAX_TILE_ELEMENTS) + if (_tileElementsInUse + numNewElements > kMaxTileElements) { return false; } @@ -284,7 +284,7 @@ static bool MapCheckFreeElementsAndReorganise(size_t numElementsOnTile, size_t n } } - // Capacity must increase to handle the space (Note capacity can go above MAX_TILE_ELEMENTS) + // Capacity must increase to handle the space (Note capacity can go above kMaxTileElements) auto newCapacity = gameState.TileElements.capacity() * 2; ReorganiseTileElements(newCapacity); return true; @@ -670,7 +670,7 @@ int16_t TileElementHeight(const CoordsXYZ& loc, uint8_t slope) return height; } // This tile is essentially at the next height level - height += LAND_HEIGHT_STEP; + height += kLandHeightStep; // so we move *down* the slope if (quad < 0) { @@ -816,8 +816,8 @@ int32_t MapHeightFromSlope(const CoordsXY& coords, int32_t slopeDirection, bool bool MapIsLocationValid(const CoordsXY& coords) { - const bool is_x_valid = coords.x < MAXIMUM_MAP_SIZE_BIG && coords.x >= 0; - const bool is_y_valid = coords.y < MAXIMUM_MAP_SIZE_BIG && coords.y >= 0; + const bool is_x_valid = coords.x < kMaximumMapSizeBig && coords.x >= 0; + const bool is_y_valid = coords.y < kMaximumMapSizeBig && coords.y >= 0; return is_x_valid && is_y_valid; } @@ -855,7 +855,7 @@ bool MapIsLocationOwned(const CoordsXYZ& loc) if (surfaceElement->GetOwnership() & OWNERSHIP_CONSTRUCTION_RIGHTS_OWNED) { - if (loc.z < surfaceElement->GetBaseZ() || loc.z >= surfaceElement->GetBaseZ() + ConstructionRightsClearanceBig) + if (loc.z < surfaceElement->GetBaseZ() || loc.z >= surfaceElement->GetBaseZ() + kConstructionRightsClearanceBig) return true; } } @@ -1019,7 +1019,7 @@ uint8_t MapGetHighestLandHeight(const MapRange& range) bool MapIsLocationAtEdge(const CoordsXY& loc) { - return loc.x < 32 || loc.y < 32 || loc.x >= (MAXIMUM_TILE_START_XY) || loc.y >= (MAXIMUM_TILE_START_XY); + return loc.x < 32 || loc.y < 32 || loc.x >= (kMaximumTileStartXY) || loc.y >= (kMaximumTileStartXY); } /** @@ -1322,9 +1322,9 @@ void MapRemoveOutOfRangeElements() bool buildState = gameState.Cheats.buildInPauseMode; gameState.Cheats.buildInPauseMode = true; - for (int32_t y = MAXIMUM_MAP_SIZE_BIG - kCoordsXYStep; y >= 0; y -= kCoordsXYStep) + for (int32_t y = kMaximumMapSizeBig - kCoordsXYStep; y >= 0; y -= kCoordsXYStep) { - for (int32_t x = MAXIMUM_MAP_SIZE_BIG - kCoordsXYStep; x >= 0; x -= kCoordsXYStep) + for (int32_t x = kMaximumMapSizeBig - kCoordsXYStep; x >= 0; x -= kCoordsXYStep) { if (x == 0 || y == 0 || x >= mapSizeMax.x || y >= mapSizeMax.y) { @@ -1543,9 +1543,9 @@ int32_t MapGetHighestZ(const CoordsXY& loc) // Raise z so that is above highest point of land and water on tile if ((surfaceElement->GetSlope() & kTileSlopeRaisedCornersMask) != kTileSlopeFlat) - z += LAND_HEIGHT_STEP; + z += kLandHeightStep; if ((surfaceElement->GetSlope() & kTileSlopeDiagonalFlag) != 0) - z += LAND_HEIGHT_STEP; + z += kLandHeightStep; z = std::max(z, surfaceElement->GetWaterHeight()); return z; @@ -1869,9 +1869,9 @@ bool MapSurfaceIsBlocked(const CoordsXY& mapCoords) /* Clears all map elements, to be used before generating a new map */ void MapClearAllElements() { - for (int32_t y = 0; y < MAXIMUM_MAP_SIZE_BIG; y += kCoordsXYStep) + for (int32_t y = 0; y < kMaximumMapSizeBig; y += kCoordsXYStep) { - for (int32_t x = 0; x < MAXIMUM_MAP_SIZE_BIG; x += kCoordsXYStep) + for (int32_t x = 0; x < kMaximumMapSizeBig; x += kCoordsXYStep) { ClearElementsAt({ x, y }); } @@ -2152,7 +2152,7 @@ uint16_t CheckMaxAllowableLandRightsForTile(const CoordsXYZ& tileMapPos) { destOwnership = OWNERSHIP_CONSTRUCTION_RIGHTS_OWNED; // Do not own construction rights if too high/below surface - if (tileElement->BaseHeight - ConstructionRightsClearanceSmall > tilePos.z || tileElement->BaseHeight < tilePos.z) + if (tileElement->BaseHeight - kConstructionRightsClearanceSmall > tilePos.z || tileElement->BaseHeight < tilePos.z) { destOwnership = OWNERSHIP_UNOWNED; break; diff --git a/src/openrct2/world/Map.h b/src/openrct2/world/Map.h index 72c6df576104..5673076c6ab7 100644 --- a/src/openrct2/world/Map.h +++ b/src/openrct2/world/Map.h @@ -30,21 +30,21 @@ constexpr uint8_t kMinimumMapSizeTechnical = 5; constexpr uint16_t kMaximumMapSizeTechnical = 1001; constexpr int16_t kMinimumMapSizePractical = (kMinimumMapSizeTechnical - 2); constexpr int16_t kMaximumMapSizePractical = (kMaximumMapSizeTechnical - 2); -constexpr const int32_t MAXIMUM_MAP_SIZE_BIG = kCoordsXYStep * kMaximumMapSizeTechnical; -constexpr int32_t MAXIMUM_TILE_START_XY = MAXIMUM_MAP_SIZE_BIG - kCoordsXYStep; -constexpr const int32_t LAND_HEIGHT_STEP = 2 * kCoordsZStep; -constexpr const int32_t WATER_HEIGHT_STEP = 2 * kCoordsZStep; +constexpr const int32_t kMaximumMapSizeBig = kCoordsXYStep * kMaximumMapSizeTechnical; +constexpr int32_t kMaximumTileStartXY = kMaximumMapSizeBig - kCoordsXYStep; +constexpr const int32_t kLandHeightStep = 2 * kCoordsZStep; +constexpr const int32_t kWaterHeightStep = 2 * kCoordsZStep; constexpr const int32_t kMinimumLandZ = kMinimumLandHeight * kCoordsZStep; -constexpr TileCoordsXY DEFAULT_MAP_SIZE = { 150, 150 }; +constexpr TileCoordsXY kDefaultMapSize = { 150, 150 }; // How high construction has to be off the ground when the player owns construction rights, in tile coords. -constexpr uint8_t ConstructionRightsClearanceSmall = 3; +constexpr uint8_t kConstructionRightsClearanceSmall = 3; // Same as previous, but in big coords. -constexpr const uint8_t ConstructionRightsClearanceBig = 3 * kCoordsZStep; +constexpr const uint8_t kConstructionRightsClearanceBig = 3 * kCoordsZStep; constexpr int16_t kMapMinimumXY = (-kMaximumMapSizeTechnical); -constexpr uint32_t MAX_TILE_ELEMENTS_WITH_SPARE_ROOM = 0x1000000; -constexpr uint32_t MAX_TILE_ELEMENTS = MAX_TILE_ELEMENTS_WITH_SPARE_ROOM - 512; +constexpr uint32_t kMaxTileElementsWithSpaceRoom = 0x1000000; +constexpr uint32_t kMaxTileElements = kMaxTileElementsWithSpaceRoom - 512; using PeepSpawn = CoordsXYZD; struct BannerElement; diff --git a/src/openrct2/world/MapAnimation.cpp b/src/openrct2/world/MapAnimation.cpp index b9190fd2be31..98c1819b822c 100644 --- a/src/openrct2/world/MapAnimation.cpp +++ b/src/openrct2/world/MapAnimation.cpp @@ -42,7 +42,7 @@ using map_animation_invalidate_event_handler = bool (*)(const CoordsXYZ& loc); static std::vector _mapAnimations; -constexpr size_t MAX_ANIMATED_OBJECTS = 2000; +constexpr size_t kMaxAnimatedObjects = 2000; static bool InvalidateMapAnimation(const MapAnimation& obj); @@ -63,7 +63,7 @@ void MapAnimationCreate(int32_t type, const CoordsXYZ& loc) { if (!DoesAnimationExist(type, loc)) { - if (_mapAnimations.size() < MAX_ANIMATED_OBJECTS) + if (_mapAnimations.size() < kMaxAnimatedObjects) { // Create new animation _mapAnimations.push_back({ static_cast(type), loc }); diff --git a/src/openrct2/world/Park.h b/src/openrct2/world/Park.h index 3a28c34e1fe1..7adab5dba85c 100644 --- a/src/openrct2/world/Park.h +++ b/src/openrct2/world/Park.h @@ -14,7 +14,7 @@ #include -constexpr auto MAX_ENTRANCE_FEE = 999.00_GBP; +constexpr auto kMaxEntranceFee = 999.00_GBP; constexpr uint16_t kParkRatingHistoryUndefined = std::numeric_limits::max(); constexpr uint32_t kGuestsInParkHistoryUndefined = std::numeric_limits::max(); diff --git a/src/openrct2/world/Scenery.cpp b/src/openrct2/world/Scenery.cpp index 4642a3fdc34a..ec0e620e7670 100644 --- a/src/openrct2/world/Scenery.cpp +++ b/src/openrct2/world/Scenery.cpp @@ -448,7 +448,7 @@ static MiscScenery GetAllMiscScenery() const auto maxObjects = GetMaxObjectsForSceneryType(sceneryType); for (ObjectEntryIndex i = 0; i < maxObjects; i++) { - ObjectEntryIndex linkedSceneryGroup = OBJECT_ENTRY_INDEX_NULL; + ObjectEntryIndex linkedSceneryGroup = kObjectEntryIndexNull; const auto objectType = GetObjectTypeFromSceneryType(sceneryType); switch (objectType) { @@ -504,7 +504,7 @@ static MiscScenery GetAllMiscScenery() // An object may link itself against a scenery group, in which case it should not be marked as miscellaneous. bool isLinkedToKnownSceneryGroup = false; - if (linkedSceneryGroup != OBJECT_ENTRY_INDEX_NULL) + if (linkedSceneryGroup != kObjectEntryIndexNull) { if (std::find(std::begin(sceneryGroupIds), std::end(sceneryGroupIds), linkedSceneryGroup) != std::end(sceneryGroupIds)) diff --git a/src/openrct2/world/ScenerySelection.h b/src/openrct2/world/ScenerySelection.h index 19573d7fb7ef..0e11d48f1f9d 100644 --- a/src/openrct2/world/ScenerySelection.h +++ b/src/openrct2/world/ScenerySelection.h @@ -14,12 +14,10 @@ #include #include -constexpr auto WINDOW_SCENERY_TAB_SELECTION_UNDEFINED = std::numeric_limits::max(); - struct ScenerySelection { uint8_t SceneryType{}; - ObjectEntryIndex EntryIndex = OBJECT_ENTRY_INDEX_NULL; + ObjectEntryIndex EntryIndex = kObjectEntryIndexNull; inline bool operator==(const ScenerySelection& rhs) const { @@ -33,6 +31,6 @@ struct ScenerySelection bool IsUndefined() const { - return EntryIndex == OBJECT_ENTRY_INDEX_NULL; + return EntryIndex == kObjectEntryIndexNull; } }; diff --git a/src/openrct2/world/SurfaceData.cpp b/src/openrct2/world/SurfaceData.cpp index fb88659d73f4..7cbe11030961 100644 --- a/src/openrct2/world/SurfaceData.cpp +++ b/src/openrct2/world/SurfaceData.cpp @@ -15,7 +15,7 @@ // Table of pre-calculated surface slopes (32) when raising the land tile for a given selection (5) // 0x1F = new slope // 0x20 = base height increases -constexpr uint8_t TileElementRaiseStyles[9][32] = { +constexpr uint8_t kTileElementRaiseStyles[9][32] = { // MAP_SELECT_TYPE_CORNER_0 { kTileSlopeNCornerUp, kTileSlopeDiagonalFlag | kTileSlopeNCornerUp | kTileSlopeECornerUp | kTileSlopeWCornerUp, @@ -324,7 +324,7 @@ constexpr uint8_t TileElementRaiseStyles[9][32] = { // Basically the inverse of the table above. // 0x1F = new slope // 0x20 = base height increases -constexpr uint8_t TileElementLowerStyles[9][32] = { +constexpr uint8_t kTileElementLowerStyles[9][32] = { // MAP_SELECT_TYPE_CORNER_0 { kTileSlopeRaiseOrLowerBaseHeight | kTileSlopeECornerUp | kTileSlopeSCornerUp | kTileSlopeWCornerUp, 0, @@ -646,10 +646,10 @@ constexpr uint8_t TileElementLowerStyles[9][32] = { uint8_t LowerSurfaceCornerFlags(size_t SelectedCorner, size_t CurrentSlope) { - return TileElementLowerStyles[SelectedCorner][CurrentSlope]; + return kTileElementLowerStyles[SelectedCorner][CurrentSlope]; } uint8_t RaiseSurfaceCornerFlags(size_t SelectedCorner, size_t CurrentSlope) { - return TileElementRaiseStyles[SelectedCorner][CurrentSlope]; + return kTileElementRaiseStyles[SelectedCorner][CurrentSlope]; } diff --git a/src/openrct2/world/Wall.cpp b/src/openrct2/world/Wall.cpp index c5bc23e6ac46..4d0641cecda6 100644 --- a/src/openrct2/world/Wall.cpp +++ b/src/openrct2/world/Wall.cpp @@ -69,7 +69,7 @@ void WallRemoveIntersectingWalls(const CoordsXYRangedZ& wallPos, Direction direc // clang-format off // rct2: 0x009A3FEC -constexpr static uint8_t LandSlopeToWallSlope[][kNumOrthogonalDirections] = { +constexpr static uint8_t kLandSlopeToWallSlope[][kNumOrthogonalDirections] = { // Top right Bottom right Bottom left Top left { 0, 0, 0, 0 }, { 0, EDGE_SLOPE_UPWARDS, EDGE_SLOPE_DOWNWARDS, 0 }, @@ -110,5 +110,5 @@ constexpr static uint8_t LandSlopeToWallSlope[][kNumOrthogonalDirections] = { uint8_t GetWallSlopeFromEdgeSlope(uint8_t Slope, uint8_t Edge) { - return LandSlopeToWallSlope[Slope][Edge]; + return kLandSlopeToWallSlope[Slope][Edge]; } diff --git a/src/openrct2/world/map_generator/MapGen.cpp b/src/openrct2/world/map_generator/MapGen.cpp index 0ca7bcf66dd3..44c9fdc29e51 100644 --- a/src/openrct2/world/map_generator/MapGen.cpp +++ b/src/openrct2/world/map_generator/MapGen.cpp @@ -89,7 +89,7 @@ namespace OpenRCT2::World::MapGenerator static void addBeaches(Settings* settings) { auto beachTextureId = generateBeachTextureId(); - if (beachTextureId == OBJECT_ENTRY_INDEX_NULL) + if (beachTextureId == kObjectEntryIndexNull) return; // Add sandy beaches diff --git a/src/openrct2/world/map_generator/SurfaceSelection.cpp b/src/openrct2/world/map_generator/SurfaceSelection.cpp index b83a0e0179f2..c7141d8c65a7 100644 --- a/src/openrct2/world/map_generator/SurfaceSelection.cpp +++ b/src/openrct2/world/map_generator/SurfaceSelection.cpp @@ -95,7 +95,7 @@ namespace OpenRCT2::World::MapGenerator availableBeachTextures.push_back("rct2.terrain_surface.sand_brown"); if (availableBeachTextures.empty()) - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; std::string_view beachTexture = availableBeachTextures[UtilRand() % availableBeachTextures.size()]; return objectManager.GetLoadedObjectEntryIndex(ObjectEntryDescriptor(beachTexture)); diff --git a/src/openrct2/world/map_generator/TreePlacement.cpp b/src/openrct2/world/map_generator/TreePlacement.cpp index 8061e50b0406..48a1fce1ff04 100644 --- a/src/openrct2/world/map_generator/TreePlacement.cpp +++ b/src/openrct2/world/map_generator/TreePlacement.cpp @@ -171,7 +171,7 @@ namespace OpenRCT2::World::MapGenerator // On sand surfaces, give the tile a score based on nearby water, to be used to determine whether to spawn // vegetation float oasisScore = 0.0f; - ObjectEntryIndex treeObjectEntryIndex = OBJECT_ENTRY_INDEX_NULL; + ObjectEntryIndex treeObjectEntryIndex = kObjectEntryIndexNull; const auto& surfaceStyleObject = *TerrainSurfaceObject::GetById(surfaceElement->GetSurfaceObjectIndex()); if (surfaceTakesSandTrees(surfaceStyleObject)) { @@ -224,7 +224,7 @@ namespace OpenRCT2::World::MapGenerator treeObjectEntryIndex = snowTreeIds[UtilRand() % snowTreeIds.size()]; } - if (treeObjectEntryIndex != OBJECT_ENTRY_INDEX_NULL) + if (treeObjectEntryIndex != kObjectEntryIndexNull) placeTree(treeObjectEntryIndex, pos); } } diff --git a/src/openrct2/world/tile_element/EntranceElement.cpp b/src/openrct2/world/tile_element/EntranceElement.cpp index ebbb5e641779..3d1b5794e488 100644 --- a/src/openrct2/world/tile_element/EntranceElement.cpp +++ b/src/openrct2/world/tile_element/EntranceElement.cpp @@ -17,7 +17,7 @@ #include "../Entrance.h" // rct2: 0x0097B974 -static constexpr uint16_t EntranceDirections[] = { +static constexpr uint16_t kEntranceDirections[] = { (4), 0, 0, 0, 0, 0, 0, 0, // ENTRANCE_TYPE_RIDE_ENTRANCE, (4), 0, 0, 0, 0, 0, 0, 0, // ENTRANCE_TYPE_RIDE_EXIT, (4 | 1), 0, 0, 0, 0, 0, 0, 0, // ENTRANCE_TYPE_PARK_ENTRANCE @@ -74,7 +74,7 @@ ObjectEntryIndex EntranceElement::GetLegacyPathEntryIndex() const if (HasLegacyPathEntry()) return PathType; - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; } const FootpathObject* EntranceElement::GetLegacyPathEntry() const @@ -92,7 +92,7 @@ void EntranceElement::SetLegacyPathEntryIndex(ObjectEntryIndex newPathType) ObjectEntryIndex EntranceElement::GetSurfaceEntryIndex() const { if (HasLegacyPathEntry()) - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; return PathType; } @@ -129,7 +129,7 @@ const PathSurfaceDescriptor* EntranceElement::GetPathSurfaceDescriptor() const int32_t EntranceElement::GetDirections() const { - return EntranceDirections[(GetEntranceType() * 8) + GetSequenceIndex()]; + return kEntranceDirections[(GetEntranceType() * 8) + GetSequenceIndex()]; } ObjectEntryIndex EntranceElement::getEntryIndex() const diff --git a/src/openrct2/world/tile_element/PathElement.cpp b/src/openrct2/world/tile_element/PathElement.cpp index 6347f9305485..e1ba6e89de95 100644 --- a/src/openrct2/world/tile_element/PathElement.cpp +++ b/src/openrct2/world/tile_element/PathElement.cpp @@ -184,7 +184,7 @@ ObjectEntryIndex PathElement::GetLegacyPathEntryIndex() const if (Flags2 & FOOTPATH_ELEMENT_FLAGS2_LEGACY_PATH_ENTRY) return SurfaceIndex; - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; } const FootpathObject* PathElement::GetLegacyPathEntry() const @@ -195,7 +195,7 @@ const FootpathObject* PathElement::GetLegacyPathEntry() const void PathElement::SetLegacyPathEntryIndex(ObjectEntryIndex newIndex) { SurfaceIndex = newIndex; - RailingsIndex = OBJECT_ENTRY_INDEX_NULL; + RailingsIndex = kObjectEntryIndexNull; Flags2 |= FOOTPATH_ELEMENT_FLAGS2_LEGACY_PATH_ENTRY; } @@ -246,7 +246,7 @@ const PathRailingsDescriptor* PathElement::GetRailingsDescriptor() const ObjectEntryIndex PathElement::GetSurfaceEntryIndex() const { if (Flags2 & FOOTPATH_ELEMENT_FLAGS2_LEGACY_PATH_ENTRY) - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; return SurfaceIndex; } @@ -266,7 +266,7 @@ void PathElement::SetSurfaceEntryIndex(ObjectEntryIndex newIndex) ObjectEntryIndex PathElement::GetRailingsEntryIndex() const { if (Flags2 & FOOTPATH_ELEMENT_FLAGS2_LEGACY_PATH_ENTRY) - return OBJECT_ENTRY_INDEX_NULL; + return kObjectEntryIndexNull; return RailingsIndex; } diff --git a/src/openrct2/world/tile_element/SurfaceElement.cpp b/src/openrct2/world/tile_element/SurfaceElement.cpp index 040ca39e0163..c3d58f6d6a49 100644 --- a/src/openrct2/world/tile_element/SurfaceElement.cpp +++ b/src/openrct2/world/tile_element/SurfaceElement.cpp @@ -52,12 +52,12 @@ void SurfaceElement::SetEdgeObjectIndex(ObjectEntryIndex newIndex) int32_t SurfaceElement::GetWaterHeight() const { - return WaterHeight * WATER_HEIGHT_STEP; + return WaterHeight * kWaterHeightStep; } void SurfaceElement::SetWaterHeight(int32_t newWaterHeight) { - WaterHeight = newWaterHeight / WATER_HEIGHT_STEP; + WaterHeight = newWaterHeight / kWaterHeightStep; } bool SurfaceElement::CanGrassGrow() const @@ -135,9 +135,9 @@ void SurfaceElement::UpdateGrassLength(const CoordsXY& coords) // if there is an object placed on top of it. int32_t baseZ = GetBaseZ(); - int32_t clearZ = GetBaseZ() + LAND_HEIGHT_STEP; + int32_t clearZ = GetBaseZ() + kLandHeightStep; if (Slope & kTileSlopeDiagonalFlag) - clearZ += LAND_HEIGHT_STEP; + clearZ += kLandHeightStep; // Check objects above grass TileElement* tileElementAbove = reinterpret_cast(this);