From 95ce592579462e7eda982bb7aff079536e8a1514 Mon Sep 17 00:00:00 2001 From: clang-format Date: Sat, 21 Jul 2018 11:50:45 +0200 Subject: [PATCH] Enforce not breaking before assignments and function names Co-authored-by: Hielke Morsink --- .clang-format | 4 +- src/openrct2-ui/TextComposition.cpp | 4 +- src/openrct2-ui/UiContext.Linux.cpp | 8 +- .../drawing/engines/DrawingEngineFactory.hpp | 4 +- .../engines/HardwareDisplayDrawingEngine.cpp | 4 +- src/openrct2-ui/input/MouseInput.cpp | 12 +- src/openrct2-ui/interface/Graph.cpp | 16 +- .../interface/ViewportInteraction.cpp | 4 +- src/openrct2-ui/interface/Widget.cpp | 8 +- src/openrct2-ui/title/TitleSequencePlayer.h | 4 +- src/openrct2-ui/windows/Banner.cpp | 8 +- src/openrct2-ui/windows/Cheats.cpp | 4 +- src/openrct2-ui/windows/Dropdown.cpp | 4 +- .../windows/EditorInventionsList.cpp | 18 +- .../windows/EditorObjectSelection.cpp | 4 +- .../windows/EditorObjectiveOptions.cpp | 18 +- src/openrct2-ui/windows/Footpath.cpp | 17 +- src/openrct2-ui/windows/GameBottomToolbar.cpp | 4 +- src/openrct2-ui/windows/Guest.cpp | 8 +- src/openrct2-ui/windows/GuestList.cpp | 8 +- src/openrct2-ui/windows/InstallTrack.cpp | 4 +- src/openrct2-ui/windows/LoadSave.cpp | 33 +- src/openrct2-ui/windows/Map.cpp | 4 +- src/openrct2-ui/windows/MapGen.cpp | 8 +- src/openrct2-ui/windows/NewRide.cpp | 16 +- src/openrct2-ui/windows/Options.cpp | 42 +- src/openrct2-ui/windows/Park.cpp | 8 +- src/openrct2-ui/windows/Research.cpp | 5 +- src/openrct2-ui/windows/Ride.cpp | 90 ++-- src/openrct2-ui/windows/RideConstruction.cpp | 36 +- src/openrct2-ui/windows/RideList.cpp | 16 +- src/openrct2-ui/windows/SavePrompt.cpp | 4 +- src/openrct2-ui/windows/Scenery.cpp | 17 +- src/openrct2-ui/windows/Staff.cpp | 4 +- src/openrct2-ui/windows/StaffList.cpp | 5 +- src/openrct2-ui/windows/Themes.cpp | 22 +- src/openrct2-ui/windows/TileInspector.cpp | 4 +- .../windows/TitleCommandEditor.cpp | 4 +- src/openrct2-ui/windows/TitleLogo.cpp | 4 +- .../windows/TitleScenarioSelect.cpp | 9 +- src/openrct2-ui/windows/TopToolbar.cpp | 16 +- src/openrct2-ui/windows/TrackDesignPlace.cpp | 4 +- src/openrct2-ui/windows/ViewClipping.cpp | 4 +- src/openrct2/CmdlineSprite.cpp | 12 +- src/openrct2/Context.cpp | 4 +- src/openrct2/Diagnostic.cpp | 5 +- src/openrct2/Game.cpp | 4 +- src/openrct2/Game.h | 8 +- src/openrct2/Intro.cpp | 4 +- src/openrct2/ParkImporter.h | 4 +- src/openrct2/actions/GuestSetNameAction.hpp | 8 +- src/openrct2/actions/MazeSetTrackAction.hpp | 4 +- src/openrct2/actions/RideSetName.hpp | 8 +- src/openrct2/actions/StaffSetNameAction.hpp | 8 +- src/openrct2/audio/DummyAudioContext.cpp | 4 +- src/openrct2/cmdline/UriHandler.cpp | 8 +- src/openrct2/config/Config.cpp | 12 +- src/openrct2/core/FileIndex.hpp | 4 +- src/openrct2/core/FileScanner.cpp | 8 +- src/openrct2/drawing/Image.cpp | 8 +- src/openrct2/drawing/ImageImporter.cpp | 12 +- src/openrct2/drawing/ImageImporter.h | 8 +- src/openrct2/drawing/LightFX.cpp | 4 +- src/openrct2/drawing/ScrollingText.cpp | 12 +- src/openrct2/interface/Chat.cpp | 4 +- src/openrct2/interface/InteractiveConsole.cpp | 20 +- src/openrct2/interface/Viewport.cpp | 8 +- src/openrct2/interface/Window.cpp | 8 +- .../localisation/LocalisationService.cpp | 8 +- .../localisation/LocalisationService.h | 4 +- src/openrct2/localisation/UTF8.cpp | 4 +- src/openrct2/management/Award.cpp | 5 +- src/openrct2/network/Network.cpp | 8 +- src/openrct2/object/FootpathItemObject.cpp | 4 +- src/openrct2/object/LargeSceneryObject.cpp | 4 +- src/openrct2/object/ObjectFactory.cpp | 8 +- src/openrct2/object/ObjectJsonHelpers.cpp | 4 +- src/openrct2/object/ObjectRepository.cpp | 4 +- src/openrct2/object/RideObject.cpp | 4 +- src/openrct2/object/SmallSceneryObject.cpp | 4 +- src/openrct2/object/WallObject.cpp | 4 +- src/openrct2/paint/Paint.cpp | 8 +- src/openrct2/paint/VirtualFloor.cpp | 4 +- src/openrct2/paint/sprite/Paint.Peep.cpp | 4 +- .../paint/tile_element/Paint.Entrance.cpp | 4 +- .../paint/tile_element/Paint.Path.cpp | 9 +- .../paint/tile_element/Paint.SmallScenery.cpp | 4 +- .../paint/tile_element/Paint.Surface.cpp | 4 +- .../paint/tile_element/Paint.TileElement.cpp | 8 +- src/openrct2/peep/Guest.cpp | 4 +- src/openrct2/peep/GuestPathfinding.cpp | 4 +- src/openrct2/peep/Peep.cpp | 8 +- src/openrct2/peep/Peep.h | 14 +- src/openrct2/peep/Staff.cpp | 12 +- src/openrct2/platform/Crash.cpp | 12 +- src/openrct2/platform/macos.mm | 11 +- src/openrct2/rct1/S4Importer.cpp | 17 +- src/openrct2/rct2/S6Exporter.cpp | 4 +- src/openrct2/rct2/S6Importer.cpp | 9 +- src/openrct2/ride/CableLift.cpp | 8 +- src/openrct2/ride/Ride.cpp | 40 +- src/openrct2/ride/Ride.h | 4 +- src/openrct2/ride/Track.cpp | 4 +- src/openrct2/ride/Track.h | 4 +- src/openrct2/ride/TrackDesign.cpp | 12 +- src/openrct2/ride/TrackDesignSave.cpp | 8 +- src/openrct2/ride/TrackPaint.cpp | 24 +- src/openrct2/ride/Vehicle.cpp | 114 ++--- src/openrct2/ride/Vehicle.h | 4 +- src/openrct2/ride/VehiclePaint.cpp | 76 ++-- .../coaster/AirPoweredVerticalCoaster.cpp | 126 +++--- .../ride/coaster/JuniorRollerCoaster.cpp | 299 ++++++------- .../ride/coaster/ReverseFreefallCoaster.cpp | 12 +- src/openrct2/ride/coaster/VirginiaReel.cpp | 27 +- src/openrct2/ride/coaster/WildMouse.cpp | 113 ++--- .../ride/coaster/WoodenRollerCoaster.cpp | 161 +++---- src/openrct2/ride/coaster/WoodenWildMouse.cpp | 55 +-- src/openrct2/ride/gentle/CarRide.cpp | 27 +- src/openrct2/ride/gentle/CircusShow.cpp | 8 +- src/openrct2/ride/gentle/FerrisWheel.cpp | 4 +- src/openrct2/ride/gentle/GhostTrain.cpp | 27 +- src/openrct2/ride/gentle/MerryGoRound.cpp | 8 +- src/openrct2/ride/gentle/MiniGolf.cpp | 110 ++--- src/openrct2/ride/gentle/MonorailCycles.cpp | 156 +++---- src/openrct2/ride/gentle/ObservationTower.cpp | 4 +- src/openrct2/ride/shops/Facility.cpp | 8 +- src/openrct2/ride/shops/Shop.cpp | 8 +- src/openrct2/ride/thrill/3dCinema.cpp | 4 +- src/openrct2/ride/thrill/Enterprise.cpp | 4 +- src/openrct2/ride/thrill/LaunchedFreefall.cpp | 5 +- src/openrct2/ride/thrill/MagicCarpet.cpp | 19 +- src/openrct2/ride/thrill/MotionSimulator.cpp | 4 +- src/openrct2/ride/thrill/PirateShip.cpp | 16 +- .../ride/thrill/SwingingInverterShip.cpp | 9 +- src/openrct2/ride/thrill/Twist.cpp | 4 +- src/openrct2/ride/transport/Chairlift.cpp | 4 +- .../ride/transport/MiniatureRailway.cpp | 290 +++++++------ src/openrct2/ride/transport/Monorail.cpp | 94 ++-- src/openrct2/ride/water/DingySlide.cpp | 408 +++++++++--------- src/openrct2/ride/water/LogFlume.cpp | 11 +- src/openrct2/ride/water/RiverRapids.cpp | 13 +- src/openrct2/ride/water/SplashBoats.cpp | 236 +++++----- src/openrct2/ride/water/SubmarineRide.cpp | 4 +- src/openrct2/ui/DummyUiContext.cpp | 4 +- src/openrct2/ui/UiContext.h | 4 +- src/openrct2/world/Banner.cpp | 5 +- src/openrct2/world/Climate.cpp | 12 +- src/openrct2/world/Footpath.cpp | 8 +- src/openrct2/world/Fountain.cpp | 21 +- src/openrct2/world/Map.cpp | 64 +-- src/openrct2/world/Map.h | 8 +- src/openrct2/world/MapAnimation.cpp | 35 +- src/openrct2/world/MapGen.cpp | 4 +- src/openrct2/world/MapHelpers.cpp | 4 +- src/openrct2/world/SmallScenery.cpp | 4 +- src/openrct2/world/SmallScenery.h | 12 +- src/openrct2/world/TileInspector.cpp | 4 +- src/openrct2/world/TileInspector.h | 4 +- 158 files changed, 1885 insertions(+), 1798 deletions(-) diff --git a/.clang-format b/.clang-format index 6e2e87d924..df0aa3179b 100644 --- a/.clang-format +++ b/.clang-format @@ -69,13 +69,13 @@ MacroBlockBegin: '' MacroBlockEnd: '' MaxEmptyLinesToKeep: 1 NamespaceIndentation: All -PenaltyBreakAssignment: 2 +PenaltyBreakAssignment: 1000 PenaltyBreakBeforeFirstCallParameter: 19 PenaltyBreakComment: 300 PenaltyBreakFirstLessLess: 120 PenaltyBreakString: 1000 PenaltyExcessCharacter: 1000000 -PenaltyReturnTypeOnItsOwnLine: 60 +PenaltyReturnTypeOnItsOwnLine: 1000 PointerAlignment: Left ReflowComments: true SortIncludes: true diff --git a/src/openrct2-ui/TextComposition.cpp b/src/openrct2-ui/TextComposition.cpp index d8198f401c..4314edfbb4 100644 --- a/src/openrct2-ui/TextComposition.cpp +++ b/src/openrct2-ui/TextComposition.cpp @@ -307,8 +307,8 @@ void TextComposition::Delete() size_t bytesToSkip = selectionOffset - _session.SelectionStart; // std::min() is used to ensure that shiftSize doesn't underflow; it should be between 0 and _session.Size - size_t shiftSize - = _session.Size - std::min(_session.Size, (_session.SelectionStart - _session.SelectionSize + bytesToSkip)); + size_t shiftSize = _session.Size + - std::min(_session.Size, (_session.SelectionStart - _session.SelectionSize + bytesToSkip)); memmove(targetShiftPtr, sourceShiftPtr, shiftSize); _session.SelectionSize = 0; RecalculateLength(); diff --git a/src/openrct2-ui/UiContext.Linux.cpp b/src/openrct2-ui/UiContext.Linux.cpp index 6248d5fbd2..4440c6b734 100644 --- a/src/openrct2-ui/UiContext.Linux.cpp +++ b/src/openrct2-ui/UiContext.Linux.cpp @@ -95,8 +95,8 @@ namespace OpenRCT2::Ui { case DIALOG_TYPE::KDIALOG: { - std::string cmd - = String::Format("%s --title \"OpenRCT2\" --msgbox \"%s\"", executablePath.c_str(), message.c_str()); + std::string cmd = String::Format( + "%s --title \"OpenRCT2\" --msgbox \"%s\"", executablePath.c_str(), message.c_str()); Execute(cmd); break; } @@ -220,8 +220,8 @@ namespace OpenRCT2::Ui case DIALOG_TYPE::KDIALOG: { std::string output; - std::string cmd - = String::Format("%s --title '%s' --getexistingdirectory /", executablePath.c_str(), title.c_str()); + std::string cmd = String::Format( + "%s --title '%s' --getexistingdirectory /", executablePath.c_str(), title.c_str()); if (Execute(cmd, &output) == 0) { result = output; diff --git a/src/openrct2-ui/drawing/engines/DrawingEngineFactory.hpp b/src/openrct2-ui/drawing/engines/DrawingEngineFactory.hpp index 33e9c7b0c5..64924a7999 100644 --- a/src/openrct2-ui/drawing/engines/DrawingEngineFactory.hpp +++ b/src/openrct2-ui/drawing/engines/DrawingEngineFactory.hpp @@ -30,8 +30,8 @@ namespace OpenRCT2 class DrawingEngineFactory final : public IDrawingEngineFactory { public: - std::unique_ptr - Create(DRAWING_ENGINE_TYPE type, const std::shared_ptr& uiContext) override + std::unique_ptr Create( + DRAWING_ENGINE_TYPE type, const std::shared_ptr& uiContext) override { switch ((int32_t)type) { diff --git a/src/openrct2-ui/drawing/engines/HardwareDisplayDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/HardwareDisplayDrawingEngine.cpp index a00d9e66e5..cbdf7b9e40 100644 --- a/src/openrct2-ui/drawing/engines/HardwareDisplayDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/HardwareDisplayDrawingEngine.cpp @@ -141,8 +141,8 @@ public: SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, scaleQualityBuffer); uint32_t scale = std::ceil(gConfigGeneral.window_scale); - _scaledScreenTexture - = SDL_CreateTexture(_sdlRenderer, pixelFormat, SDL_TEXTUREACCESS_TARGET, width * scale, height * scale); + _scaledScreenTexture = SDL_CreateTexture( + _sdlRenderer, pixelFormat, SDL_TEXTUREACCESS_TARGET, width * scale, height * scale); } else { diff --git a/src/openrct2-ui/input/MouseInput.cpp b/src/openrct2-ui/input/MouseInput.cpp index 28aaab61db..5b81b6d28c 100644 --- a/src/openrct2-ui/input/MouseInput.cpp +++ b/src/openrct2-ui/input/MouseInput.cpp @@ -65,8 +65,8 @@ static int16_t _clickRepeatTicks; static int32_t game_get_next_input(int32_t* x, int32_t* y); static void input_widget_over(int32_t x, int32_t y, rct_window* w, rct_widgetindex widgetIndex); -static void - input_widget_over_change_check(rct_windowclass windowClass, rct_windownumber windowNumber, rct_widgetindex widgetIndex); +static void input_widget_over_change_check( + rct_windowclass windowClass, rct_windownumber windowNumber, rct_widgetindex widgetIndex); static void input_widget_over_flatbutton_invalidate(); void process_mouse_over(int32_t x, int32_t y); void process_mouse_tool(int32_t x, int32_t y); @@ -949,8 +949,8 @@ static void input_widget_over(int32_t x, int32_t y, rct_window* w, rct_widgetind * * rct2: 0x006E9269 */ -static void - input_widget_over_change_check(rct_windowclass windowClass, rct_windownumber windowNumber, rct_widgetindex widgetIndex) +static void input_widget_over_change_check( + rct_windowclass windowClass, rct_windownumber windowNumber, rct_widgetindex widgetIndex) { // Prevents invalid widgets being clicked source of bug is elsewhere if (widgetIndex == -1) @@ -1113,8 +1113,8 @@ void process_mouse_over(int32_t x, int32_t y) break; } cursorId = gCurrentToolId; - subWindow - = window_find_by_number(gCurrentToolWidget.window_classification, gCurrentToolWidget.window_number); + subWindow = window_find_by_number( + gCurrentToolWidget.window_classification, gCurrentToolWidget.window_number); if (subWindow == nullptr) break; diff --git a/src/openrct2-ui/interface/Graph.cpp b/src/openrct2-ui/interface/Graph.cpp index 4e5fe08fe5..86d28a08dc 100644 --- a/src/openrct2-ui/interface/Graph.cpp +++ b/src/openrct2-ui/interface/Graph.cpp @@ -11,8 +11,8 @@ #include #include -static void - graph_draw_months_uint8_t(rct_drawpixelinfo* dpi, const uint8_t* history, int32_t count, int32_t baseX, int32_t baseY) +static void graph_draw_months_uint8_t( + rct_drawpixelinfo* dpi, const uint8_t* history, int32_t count, int32_t baseX, int32_t baseY) { int32_t i, x, y, yearOver32, currentMonth, currentDay; @@ -38,8 +38,8 @@ static void } } -static void - graph_draw_line_a_uint8_t(rct_drawpixelinfo* dpi, const uint8_t* history, int32_t count, int32_t baseX, int32_t baseY) +static void graph_draw_line_a_uint8_t( + rct_drawpixelinfo* dpi, const uint8_t* history, int32_t count, int32_t baseX, int32_t baseY) { int32_t i, x, y, lastX, lastY; lastX = -1; @@ -66,8 +66,8 @@ static void } } -static void - graph_draw_line_b_uint8_t(rct_drawpixelinfo* dpi, const uint8_t* history, int32_t count, int32_t baseX, int32_t baseY) +static void graph_draw_line_b_uint8_t( + rct_drawpixelinfo* dpi, const uint8_t* history, int32_t count, int32_t baseX, int32_t baseY) { int32_t i, x, y, lastX, lastY; @@ -99,8 +99,8 @@ void graph_draw_uint8_t(rct_drawpixelinfo* dpi, uint8_t* history, int32_t count, graph_draw_line_b_uint8_t(dpi, history, count, baseX, baseY); } -static void - graph_draw_months_money32(rct_drawpixelinfo* dpi, const money32* history, int32_t count, int32_t baseX, int32_t baseY) +static void graph_draw_months_money32( + rct_drawpixelinfo* dpi, const money32* history, int32_t count, int32_t baseX, int32_t baseY) { int32_t i, x, y, yearOver32, currentMonth, currentDay; diff --git a/src/openrct2-ui/interface/ViewportInteraction.cpp b/src/openrct2-ui/interface/ViewportInteraction.cpp index 1aad654893..dfe4c4a23a 100644 --- a/src/openrct2-ui/interface/ViewportInteraction.cpp +++ b/src/openrct2-ui/interface/ViewportInteraction.cpp @@ -634,8 +634,8 @@ static rct_peep* viewport_interaction_get_closest_peep(int32_t x, int32_t y, int if (peep->sprite_left == LOCATION_NULL) continue; - distance - = abs(((peep->sprite_left + peep->sprite_right) / 2) - x) + abs(((peep->sprite_top + peep->sprite_bottom) / 2) - y); + distance = abs(((peep->sprite_left + peep->sprite_right) / 2) - x) + + abs(((peep->sprite_top + peep->sprite_bottom) / 2) - y); if (distance > maxDistance) continue; diff --git a/src/openrct2-ui/interface/Widget.cpp b/src/openrct2-ui/interface/Widget.cpp index 04dbae930c..1b07e28661 100644 --- a/src/openrct2-ui/interface/Widget.cpp +++ b/src/openrct2-ui/interface/Widget.cpp @@ -191,8 +191,8 @@ static void widget_button_draw(rct_drawpixelinfo* dpi, rct_window* w, rct_widget int32_t b = w->y + widget->bottom; // Check if the button is pressed down - uint8_t press - = widget_is_pressed(w, widgetIndex) || widget_is_active_tool(w, widgetIndex) ? INSET_RECT_FLAG_BORDER_INSET : 0; + uint8_t press = widget_is_pressed(w, widgetIndex) || widget_is_active_tool(w, widgetIndex) ? INSET_RECT_FLAG_BORDER_INSET + : 0; // Get the colour uint8_t colour = w->colours[widget->colour]; @@ -312,8 +312,8 @@ static void widget_text_button(rct_drawpixelinfo* dpi, rct_window* w, rct_widget uint8_t colour = w->colours[widget->colour]; // Border - uint8_t press - = widget_is_pressed(w, widgetIndex) || widget_is_active_tool(w, widgetIndex) ? INSET_RECT_FLAG_BORDER_INSET : 0; + uint8_t press = widget_is_pressed(w, widgetIndex) || widget_is_active_tool(w, widgetIndex) ? INSET_RECT_FLAG_BORDER_INSET + : 0; gfx_fill_rect_inset(dpi, l, t, r, b, colour, press); // Button caption diff --git a/src/openrct2-ui/title/TitleSequencePlayer.h b/src/openrct2-ui/title/TitleSequencePlayer.h index d5059eee38..bcf9ae6e6a 100644 --- a/src/openrct2-ui/title/TitleSequencePlayer.h +++ b/src/openrct2-ui/title/TitleSequencePlayer.h @@ -20,5 +20,5 @@ namespace OpenRCT2 class GameState; } -std::unique_ptr - CreateTitleSequencePlayer(IScenarioRepository& scenarioRepository, OpenRCT2::GameState& gameState); +std::unique_ptr CreateTitleSequencePlayer( + IScenarioRepository& scenarioRepository, OpenRCT2::GameState& gameState); diff --git a/src/openrct2-ui/windows/Banner.cpp b/src/openrct2-ui/windows/Banner.cpp index 99278a2fe2..2e5589cf49 100644 --- a/src/openrct2-ui/windows/Banner.cpp +++ b/src/openrct2-ui/windows/Banner.cpp @@ -331,14 +331,14 @@ static void window_banner_invalidate(rct_window* w) } w->pressed_widgets &= ~(1ULL << WIDX_BANNER_NO_ENTRY); - w->disabled_widgets - &= ~((1ULL << WIDX_BANNER_TEXT) | (1ULL << WIDX_TEXT_COLOUR_DROPDOWN) | (1ULL << WIDX_TEXT_COLOUR_DROPDOWN_BUTTON)); + w->disabled_widgets &= ~( + (1ULL << WIDX_BANNER_TEXT) | (1ULL << WIDX_TEXT_COLOUR_DROPDOWN) | (1ULL << WIDX_TEXT_COLOUR_DROPDOWN_BUTTON)); if (banner->flags & BANNER_FLAG_NO_ENTRY) { w->pressed_widgets |= (1ULL << WIDX_BANNER_NO_ENTRY); - w->disabled_widgets - |= (1ULL << WIDX_BANNER_TEXT) | (1ULL << WIDX_TEXT_COLOUR_DROPDOWN) | (1ULL << WIDX_TEXT_COLOUR_DROPDOWN_BUTTON); + w->disabled_widgets |= (1ULL << WIDX_BANNER_TEXT) | (1ULL << WIDX_TEXT_COLOUR_DROPDOWN) + | (1ULL << WIDX_TEXT_COLOUR_DROPDOWN_BUTTON); } colour_btn->image = SPRITE_ID_PALETTE_COLOUR_1(banner->colour) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; diff --git a/src/openrct2-ui/windows/Cheats.cpp b/src/openrct2-ui/windows/Cheats.cpp index a8e28fc4cc..a4f350e69a 100644 --- a/src/openrct2-ui/windows/Cheats.cpp +++ b/src/openrct2-ui/windows/Cheats.cpp @@ -1252,8 +1252,8 @@ static void window_cheats_invalidate(rct_window* w) widget_set_checkbox_value(w, WIDX_DISABLE_LITTERING, gCheatsDisableLittering); break; case WINDOW_CHEATS_PAGE_MISC: - w->widgets[WIDX_OPEN_CLOSE_PARK].text - = (gParkFlags & PARK_FLAGS_PARK_OPEN) ? STR_CHEAT_CLOSE_PARK : STR_CHEAT_OPEN_PARK; + w->widgets[WIDX_OPEN_CLOSE_PARK].text = (gParkFlags & PARK_FLAGS_PARK_OPEN) ? STR_CHEAT_CLOSE_PARK + : STR_CHEAT_OPEN_PARK; widget_set_checkbox_value(w, WIDX_FORCE_PARK_RATING, get_forced_park_rating() >= 0); w->widgets[WIDX_SANDBOX_MODE].text = gCheatsSandboxMode ? STR_CHEAT_SANDBOX_MODE_DISABLE : STR_CHEAT_SANDBOX_MODE; w->widgets[WIDX_FREEZE_CLIMATE].text = gCheatsFreezeClimate ? STR_CHEAT_UNFREEZE_CLIMATE : STR_CHEAT_FREEZE_CLIMATE; diff --git a/src/openrct2-ui/windows/Dropdown.cpp b/src/openrct2-ui/windows/Dropdown.cpp index b6aafa9eed..b300a18536 100644 --- a/src/openrct2-ui/windows/Dropdown.cpp +++ b/src/openrct2-ui/windows/Dropdown.cpp @@ -22,8 +22,8 @@ #define DROPDOWN_ITEM_HEIGHT 12 -int32_t gAppropriateImageDropdownItemsPerRow[] - = { 1, 1, 1, 1, 2, 2, 3, 3, 4, 3, 5, 4, 4, 5, 5, 5, 4, 5, 6, 5, 5, 7, 4, 5, 6, 5, 6, 6, 6, 6, 6, 8, 8, 0 }; +int32_t gAppropriateImageDropdownItemsPerRow[] = { 1, 1, 1, 1, 2, 2, 3, 3, 4, 3, 5, 4, 4, 5, 5, 5, 4, + 5, 6, 5, 5, 7, 4, 5, 6, 5, 6, 6, 6, 6, 6, 8, 8, 0 }; enum { diff --git a/src/openrct2-ui/windows/EditorInventionsList.cpp b/src/openrct2-ui/windows/EditorInventionsList.cpp index 10618c31bf..a9e76be1fa 100644 --- a/src/openrct2-ui/windows/EditorInventionsList.cpp +++ b/src/openrct2-ui/windows/EditorInventionsList.cpp @@ -564,8 +564,8 @@ static void window_editor_inventions_list_tooltip(rct_window* w, rct_widgetindex * * rct2: 0x00685291 */ -static void - window_editor_inventions_list_cursor(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y, int32_t* cursorId) +static void window_editor_inventions_list_cursor( + rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y, int32_t* cursorId) { rct_research_item* researchItem; int32_t scrollIndex; @@ -815,8 +815,9 @@ static void window_editor_inventions_list_scrollpaint(rct_window* w, rct_drawpix if (researchItem->type == RESEARCH_ENTRY_TYPE_RIDE && !RideGroupManager::RideTypeIsIndependent(researchItem->baseRideType)) { - const rct_string_id rideGroupName - = get_ride_naming(researchItem->baseRideType, get_ride_entry(researchItem->entryIndex)).name; + const rct_string_id rideGroupName = get_ride_naming( + researchItem->baseRideType, get_ride_entry(researchItem->entryIndex)) + .name; format_string( groupNamePtr, Util::CountOf(groupNameBuffer), STR_INVENTIONS_LIST_RIDE_AND_VEHICLE_NAME, (void*)&rideGroupName); format_string(vehicleNamePtr, Util::CountOf(vehicleNameBuffer), itemNameId, nullptr); @@ -859,8 +860,9 @@ static void window_editor_inventions_list_drag_open(rct_research_item* researchI ptr = buffer; if (researchItem->type == RESEARCH_ENTRY_TYPE_RIDE && !RideGroupManager::RideTypeIsIndependent(researchItem->baseRideType)) { - const rct_string_id rideGroupName - = get_ride_naming(researchItem->baseRideType, get_ride_entry(researchItem->entryIndex)).name; + const rct_string_id rideGroupName = get_ride_naming( + researchItem->baseRideType, get_ride_entry(researchItem->entryIndex)) + .name; rct_string_id args[] = { rideGroupName, stringId }; format_string(ptr, 256, STR_INVENTIONS_LIST_RIDE_AND_VEHICLE_NAME, &args); } @@ -951,8 +953,8 @@ static rct_string_id window_editor_inventions_list_prepare_name(const rct_resear if (researchItem->type == RESEARCH_ENTRY_TYPE_RIDE && !RideGroupManager::RideTypeIsIndependent(researchItem->baseRideType)) { drawString = withGap ? STR_INVENTIONS_LIST_RIDE_AND_VEHICLE_NAME_DRAG : STR_WINDOW_COLOUR_2_STRINGID_STRINGID; - rct_string_id rideGroupName - = get_ride_naming(researchItem->baseRideType, get_ride_entry(researchItem->entryIndex)).name; + rct_string_id rideGroupName = get_ride_naming(researchItem->baseRideType, get_ride_entry(researchItem->entryIndex)) + .name; set_format_arg(0, rct_string_id, rideGroupName); set_format_arg(2, rct_string_id, stringId); } diff --git a/src/openrct2-ui/windows/EditorObjectSelection.cpp b/src/openrct2-ui/windows/EditorObjectSelection.cpp index c7804e37b2..7b6789d097 100644 --- a/src/openrct2-ui/windows/EditorObjectSelection.cpp +++ b/src/openrct2-ui/windows/EditorObjectSelection.cpp @@ -1156,8 +1156,8 @@ static void window_editor_object_selection_scrollpaint(rct_window* w, rct_drawpi if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) && (*listItem.flags & OBJECT_SELECTION_FLAG_SELECTED)) { x = 2; - gCurrentFontSpriteBase - = colour == COLOUR_BRIGHT_GREEN ? FONT_SPRITE_BASE_MEDIUM_EXTRA_DARK : FONT_SPRITE_BASE_MEDIUM_DARK; + gCurrentFontSpriteBase = colour == COLOUR_BRIGHT_GREEN ? FONT_SPRITE_BASE_MEDIUM_EXTRA_DARK + : FONT_SPRITE_BASE_MEDIUM_DARK; colour2 = NOT_TRANSLUCENT(w->colours[1]); if (*listItem.flags & (OBJECT_SELECTION_FLAG_IN_USE | OBJECT_SELECTION_FLAG_ALWAYS_REQUIRED)) colour2 |= COLOUR_FLAG_INSET; diff --git a/src/openrct2-ui/windows/EditorObjectiveOptions.cpp b/src/openrct2-ui/windows/EditorObjectiveOptions.cpp index 31ef107ff6..6e0f4c5d79 100644 --- a/src/openrct2-ui/windows/EditorObjectiveOptions.cpp +++ b/src/openrct2-ui/windows/EditorObjectiveOptions.cpp @@ -895,8 +895,9 @@ static void window_editor_objective_options_main_invalidate(rct_window* w) break; } - window_editor_objective_options_main_widgets[WIDX_CLOSE].type - = (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) ? WWT_EMPTY : WWT_CLOSEBOX; + window_editor_objective_options_main_widgets[WIDX_CLOSE].type = (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + ? WWT_EMPTY + : WWT_CLOSEBOX; window_editor_objective_options_anchor_border_widgets(w); } @@ -1140,8 +1141,8 @@ static void window_editor_objective_options_rides_update(rct_window* w) * * rct2: 0x006724BF */ -static void - window_editor_objective_options_rides_scrollgetheight(rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height) +static void window_editor_objective_options_rides_scrollgetheight( + rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height) { *height = w->no_list_items * 12; } @@ -1200,8 +1201,9 @@ static void window_editor_objective_options_rides_invalidate(rct_window* w) window_editor_objective_options_set_pressed_tab(w); - window_editor_objective_options_main_widgets[WIDX_CLOSE].type - = (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) ? WWT_EMPTY : WWT_CLOSEBOX; + window_editor_objective_options_main_widgets[WIDX_CLOSE].type = (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + ? WWT_EMPTY + : WWT_CLOSEBOX; window_editor_objective_options_anchor_border_widgets(w); } @@ -1256,8 +1258,8 @@ static void window_editor_objective_options_rides_scrollpaint(rct_window* w, rct ride = get_ride(w->list_item_positions[i]); if (ride->lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE) { - gCurrentFontSpriteBase - = stringId == STR_WINDOW_COLOUR_2_STRINGID ? FONT_SPRITE_BASE_MEDIUM_EXTRA_DARK : FONT_SPRITE_BASE_MEDIUM_DARK; + gCurrentFontSpriteBase = stringId == STR_WINDOW_COLOUR_2_STRINGID ? FONT_SPRITE_BASE_MEDIUM_EXTRA_DARK + : FONT_SPRITE_BASE_MEDIUM_DARK; gfx_draw_string(dpi, (char*)CheckBoxMarkString, w->colours[1] & 0x7F, 2, y); } diff --git a/src/openrct2-ui/windows/Footpath.cpp b/src/openrct2-ui/windows/Footpath.cpp index 2cab310900..4139168c63 100644 --- a/src/openrct2-ui/windows/Footpath.cpp +++ b/src/openrct2-ui/windows/Footpath.cpp @@ -568,12 +568,13 @@ static void window_footpath_invalidate(rct_window* w) // Press / unpress footpath and queue type buttons w->pressed_widgets &= ~(1 << WIDX_FOOTPATH_TYPE); w->pressed_widgets &= ~(1 << WIDX_QUEUELINE_TYPE); - w->pressed_widgets - |= gFootpathSelectedType == SELECTED_PATH_TYPE_NORMAL ? (1 << WIDX_FOOTPATH_TYPE) : (1 << WIDX_QUEUELINE_TYPE); + w->pressed_widgets |= gFootpathSelectedType == SELECTED_PATH_TYPE_NORMAL ? (1 << WIDX_FOOTPATH_TYPE) + : (1 << WIDX_QUEUELINE_TYPE); // Enable / disable construct button - window_footpath_widgets[WIDX_CONSTRUCT].type - = gFootpathConstructionMode == PATH_CONSTRUCTION_MODE_BRIDGE_OR_TUNNEL ? WWT_IMGBTN : WWT_EMPTY; + window_footpath_widgets[WIDX_CONSTRUCT].type = gFootpathConstructionMode == PATH_CONSTRUCTION_MODE_BRIDGE_OR_TUNNEL + ? WWT_IMGBTN + : WWT_EMPTY; // Set footpath and queue type button images selectedPath = gFootpathSelectedId; @@ -969,8 +970,8 @@ static void window_footpath_construct() footpath_get_next_path_info(&type, &x, &y, &z, &slope); gGameCommandErrorTitle = STR_CANT_BUILD_FOOTPATH_HERE; - money32 cost - = footpath_place_remove_intersecting(type, x, y, z, slope, GAME_COMMAND_FLAG_APPLY, gFootpathConstructDirection); + money32 cost = footpath_place_remove_intersecting( + type, x, y, z, slope, GAME_COMMAND_FLAG_APPLY, gFootpathConstructDirection); if (cost != MONEY32_UNDEFINED) { @@ -1194,8 +1195,8 @@ static void window_footpath_set_enabled_and_pressed_widgets() direction = gFootpathConstructValidDirections; if (direction != 255) { - disabledWidgets - |= (1 << WIDX_DIRECTION_NW) | (1 << WIDX_DIRECTION_NE) | (1 << WIDX_DIRECTION_SW) | (1 << WIDX_DIRECTION_SE); + disabledWidgets |= (1 << WIDX_DIRECTION_NW) | (1 << WIDX_DIRECTION_NE) | (1 << WIDX_DIRECTION_SW) + | (1 << WIDX_DIRECTION_SE); direction = (direction + currentRotation) & 3; disabledWidgets &= ~(1 << (WIDX_DIRECTION_NW + direction)); diff --git a/src/openrct2-ui/windows/GameBottomToolbar.cpp b/src/openrct2-ui/windows/GameBottomToolbar.cpp index 0942b83b71..3cd9aa7f78 100644 --- a/src/openrct2-ui/windows/GameBottomToolbar.cpp +++ b/src/openrct2-ui/windows/GameBottomToolbar.cpp @@ -745,8 +745,8 @@ static void window_game_bottom_toolbar_update(rct_window* w) * * rct2: 0x0066C644 */ -static void - window_game_bottom_toolbar_cursor(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y, int32_t* cursorId) +static void window_game_bottom_toolbar_cursor( + rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y, int32_t* cursorId) { switch (widgetIndex) { diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index b8acd8c4c3..4f715064e0 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -1373,8 +1373,8 @@ void window_guest_stats_invalidate(rct_window* w) * * ebp: colour, contains flag BAR_BLINK for blinking */ -static void - window_guest_stats_bars_paint(int32_t value, int32_t x, int32_t y, rct_window* w, rct_drawpixelinfo* dpi, int32_t colour) +static void window_guest_stats_bars_paint( + int32_t value, int32_t x, int32_t y, rct_window* w, rct_drawpixelinfo* dpi, int32_t colour) { if (font_get_line_height(gCurrentFontSpriteBase) > 10) { @@ -1651,8 +1651,8 @@ void window_guest_rides_scroll_get_size(rct_window* w, int32_t scrollIndex, int3 window_invalidate(w); } - int32_t visable_height - = *height - window_guest_rides_widgets[WIDX_RIDE_SCROLL].bottom + window_guest_rides_widgets[WIDX_RIDE_SCROLL].top + 21; + int32_t visable_height = *height - window_guest_rides_widgets[WIDX_RIDE_SCROLL].bottom + + window_guest_rides_widgets[WIDX_RIDE_SCROLL].top + 21; if (visable_height < 0) visable_height = 0; diff --git a/src/openrct2-ui/windows/GuestList.cpp b/src/openrct2-ui/windows/GuestList.cpp index b64b3f262a..f360ec8692 100644 --- a/src/openrct2-ui/windows/GuestList.cpp +++ b/src/openrct2-ui/windows/GuestList.cpp @@ -1018,8 +1018,8 @@ static void window_guest_list_find_groups() _window_guest_list_group_index[groupIndex] = groupIndex; faceIndex = groupIndex * 56; - _window_guest_list_groups_guest_faces[faceIndex++] - = get_peep_face_sprite_small(peep) - SPR_PEEP_SMALL_FACE_VERY_VERY_UNHAPPY; + _window_guest_list_groups_guest_faces[faceIndex++] = get_peep_face_sprite_small(peep) + - SPR_PEEP_SMALL_FACE_VERY_VERY_UNHAPPY; // Find more peeps that belong to same group FOR_ALL_GUESTS (spriteIndex2, peep2) @@ -1041,8 +1041,8 @@ static void window_guest_list_find_groups() // Add face sprite, cap at 56 though if (_window_guest_list_groups_num_guests[groupIndex] >= 56) continue; - _window_guest_list_groups_guest_faces[faceIndex++] - = get_peep_face_sprite_small(peep2) - SPR_PEEP_SMALL_FACE_VERY_VERY_UNHAPPY; + _window_guest_list_groups_guest_faces[faceIndex++] = get_peep_face_sprite_small(peep2) + - SPR_PEEP_SMALL_FACE_VERY_VERY_UNHAPPY; } if (_window_guest_list_filter_arguments[0] == 0) diff --git a/src/openrct2-ui/windows/InstallTrack.cpp b/src/openrct2-ui/windows/InstallTrack.cpp index dd9ef64694..45e7b37b8a 100644 --- a/src/openrct2-ui/windows/InstallTrack.cpp +++ b/src/openrct2-ui/windows/InstallTrack.cpp @@ -136,8 +136,8 @@ rct_window* window_install_track_open(const utf8* path) rct_window* w = window_create(x, y, WW, WH, &window_install_track_events, WC_INSTALL_TRACK, 0); w->widgets = window_install_track_widgets; - w->enabled_widgets - = (1 << WIDX_CLOSE) | (1 << WIDX_ROTATE) | (1 << WIDX_TOGGLE_SCENERY) | (1 << WIDX_INSTALL) | (1 << WIDX_CANCEL); + w->enabled_widgets = (1 << WIDX_CLOSE) | (1 << WIDX_ROTATE) | (1 << WIDX_TOGGLE_SCENERY) | (1 << WIDX_INSTALL) + | (1 << WIDX_CANCEL); window_init_scroll_widgets(w); w->track_list.track_list_being_updated = false; window_push_others_right(w); diff --git a/src/openrct2-ui/windows/LoadSave.cpp b/src/openrct2-ui/windows/LoadSave.cpp index 2d6056ce44..b64e1f4271 100644 --- a/src/openrct2-ui/windows/LoadSave.cpp +++ b/src/openrct2-ui/windows/LoadSave.cpp @@ -245,8 +245,8 @@ rct_window* window_loadsave_open(int32_t type, const char* defaultName) break; case LOADSAVETYPE_TRACK: - w->widgets[WIDX_TITLE].text - = isSave ? STR_FILE_DIALOG_TITLE_SAVE_TRACK : STR_FILE_DIALOG_TITLE_INSTALL_NEW_TRACK_DESIGN; + w->widgets[WIDX_TITLE].text = isSave ? STR_FILE_DIALOG_TITLE_SAVE_TRACK + : STR_FILE_DIALOG_TITLE_INSTALL_NEW_TRACK_DESIGN; if (window_loadsave_get_dir(gConfigGeneral.last_save_track_directory, path, "track", sizeof(path))) { window_loadsave_populate_list(w, isSave, path, isSave ? ".td6" : ".td6;.td4"); @@ -1092,20 +1092,21 @@ enum WIDX_OVERWRITE_CANCEL }; -static rct_widget window_overwrite_prompt_widgets[] - = { { WWT_FRAME, 0, 0, OVERWRITE_WW - 1, 0, OVERWRITE_WH - 1, STR_NONE, STR_NONE }, - { WWT_CAPTION, 0, 1, OVERWRITE_WW - 2, 1, 14, STR_FILEBROWSER_OVERWRITE_TITLE, STR_WINDOW_TITLE_TIP }, - { WWT_CLOSEBOX, 0, OVERWRITE_WW - 13, OVERWRITE_WW - 3, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, - { WWT_BUTTON, 0, 10, 94, OVERWRITE_WH - 20, OVERWRITE_WH - 9, STR_FILEBROWSER_OVERWRITE_TITLE, STR_NONE }, - { WWT_BUTTON, - 0, - OVERWRITE_WW - 95, - OVERWRITE_WW - 11, - OVERWRITE_WH - 20, - OVERWRITE_WH - 9, - STR_SAVE_PROMPT_CANCEL, - STR_NONE }, - { WIDGETS_END } }; +static rct_widget window_overwrite_prompt_widgets[] = { + { WWT_FRAME, 0, 0, OVERWRITE_WW - 1, 0, OVERWRITE_WH - 1, STR_NONE, STR_NONE }, + { WWT_CAPTION, 0, 1, OVERWRITE_WW - 2, 1, 14, STR_FILEBROWSER_OVERWRITE_TITLE, STR_WINDOW_TITLE_TIP }, + { WWT_CLOSEBOX, 0, OVERWRITE_WW - 13, OVERWRITE_WW - 3, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, + { WWT_BUTTON, 0, 10, 94, OVERWRITE_WH - 20, OVERWRITE_WH - 9, STR_FILEBROWSER_OVERWRITE_TITLE, STR_NONE }, + { WWT_BUTTON, + 0, + OVERWRITE_WW - 95, + OVERWRITE_WW - 11, + OVERWRITE_WH - 20, + OVERWRITE_WH - 9, + STR_SAVE_PROMPT_CANCEL, + STR_NONE }, + { WIDGETS_END } +}; static void window_overwrite_prompt_mouseup(rct_window* w, rct_widgetindex widgetIndex); static void window_overwrite_prompt_paint(rct_window* w, rct_drawpixelinfo* dpi); diff --git a/src/openrct2-ui/windows/Map.cpp b/src/openrct2-ui/windows/Map.cpp index 9938b032f0..4de20f1852 100644 --- a/src/openrct2-ui/windows/Map.cpp +++ b/src/openrct2-ui/windows/Map.cpp @@ -1215,8 +1215,8 @@ static void window_map_set_land_rights_tool_update(int32_t x, int32_t y) * * rct2: 0x00666EEF */ -static void - place_park_entrance_get_map_position(int32_t x, int32_t y, int16_t* mapX, int16_t* mapY, int16_t* mapZ, int32_t* direction) +static void place_park_entrance_get_map_position( + int32_t x, int32_t y, int16_t* mapX, int16_t* mapY, int16_t* mapZ, int32_t* direction) { rct_tile_element* tileElement; diff --git a/src/openrct2-ui/windows/MapGen.cpp b/src/openrct2-ui/windows/MapGen.cpp index e24931488a..5f20ce5275 100644 --- a/src/openrct2-ui/windows/MapGen.cpp +++ b/src/openrct2-ui/windows/MapGen.cpp @@ -652,8 +652,8 @@ static void window_mapgen_base_dropdown(rct_window* w, rct_widgetindex widgetInd if (dropdownIndex == -1) dropdownIndex = gDropdownHighlightedIndex; - type - = (dropdownIndex == -1) ? _floorTexture : (uint32_t)gDropdownItemsArgs[dropdownIndex] - SPR_FLOOR_TEXTURE_GRASS; + type = (dropdownIndex == -1) ? _floorTexture + : (uint32_t)gDropdownItemsArgs[dropdownIndex] - SPR_FLOOR_TEXTURE_GRASS; if (gLandToolTerrainSurface == type) { @@ -977,8 +977,8 @@ static void window_mapgen_simplex_dropdown(rct_window* w, rct_widgetindex widget if (dropdownIndex == -1) dropdownIndex = gDropdownHighlightedIndex; - type - = (dropdownIndex == -1) ? _floorTexture : (uint32_t)gDropdownItemsArgs[dropdownIndex] - SPR_FLOOR_TEXTURE_GRASS; + type = (dropdownIndex == -1) ? _floorTexture + : (uint32_t)gDropdownItemsArgs[dropdownIndex] - SPR_FLOOR_TEXTURE_GRASS; if (gLandToolTerrainSurface == type) { diff --git a/src/openrct2-ui/windows/NewRide.cpp b/src/openrct2-ui/windows/NewRide.cpp index 54f9c6cf9f..9a04b69850 100644 --- a/src/openrct2-ui/windows/NewRide.cpp +++ b/src/openrct2-ui/windows/NewRide.cpp @@ -269,8 +269,8 @@ static ride_list_item window_new_ride_scroll_get_ride_list_item_at(rct_window* w static void window_new_ride_paint_ride_information( rct_window* w, rct_drawpixelinfo* dpi, ride_list_item item, int32_t x, int32_t y, int32_t width); static void window_new_ride_select(rct_window* w); -static ride_list_item* - window_new_ride_iterate_over_ride_group(uint8_t rideType, uint8_t rideGroupIndex, ride_list_item* nextListItem); +static ride_list_item* window_new_ride_iterate_over_ride_group( + uint8_t rideType, uint8_t rideGroupIndex, ride_list_item* nextListItem); static ride_list_item _lastTrackDesignCountRideType; static int32_t _lastTrackDesignCount; @@ -342,8 +342,8 @@ static void window_new_ride_populate_list() nextListItem->entry_index = RIDE_ENTRY_INDEX_NULL; } -static ride_list_item* - window_new_ride_iterate_over_ride_group(uint8_t rideType, uint8_t rideGroupIndex, ride_list_item* nextListItem) +static ride_list_item* window_new_ride_iterate_over_ride_group( + uint8_t rideType, uint8_t rideGroupIndex, ride_list_item* nextListItem) { bool buttonForRideTypeCreated = false; bool allowDrawingOverLastButton = false; @@ -661,8 +661,8 @@ static void window_new_ride_set_pressed_tab(rct_window* w) w->pressed_widgets |= 1LL << (WIDX_TAB_1 + _windowNewRideCurrentTab); } -static constexpr const int32_t ThrillRidesTabAnimationSequence[] - = { 5, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0 }; +static constexpr const int32_t ThrillRidesTabAnimationSequence[] = { 5, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, + 0, 0, 0, 1, 2, 3, 4, 0, 0, 0 }; static void window_new_ride_draw_tab_image(rct_drawpixelinfo* dpi, rct_window* w, int32_t page, int32_t spriteIndex) { @@ -830,8 +830,8 @@ static void window_new_ride_invalidate(rct_window* w) { uint8_t type = gResearchLastItem.type; window_new_ride_widgets[WIDX_LAST_DEVELOPMENT_BUTTON].type = WWT_FLATBTN; - window_new_ride_widgets[WIDX_LAST_DEVELOPMENT_BUTTON].image - = (type == RESEARCH_ENTRY_TYPE_RIDE) ? SPR_NEW_RIDE : SPR_NEW_SCENERY; + window_new_ride_widgets[WIDX_LAST_DEVELOPMENT_BUTTON].image = (type == RESEARCH_ENTRY_TYPE_RIDE) ? SPR_NEW_RIDE + : SPR_NEW_SCENERY; } } } diff --git a/src/openrct2-ui/windows/Options.cpp b/src/openrct2-ui/windows/Options.cpp index bc3c0f9c86..8883095022 100644 --- a/src/openrct2-ui/windows/Options.cpp +++ b/src/openrct2-ui/windows/Options.cpp @@ -896,8 +896,8 @@ static void window_options_mouseup(rct_window* w, rct_widgetindex widgetIndex) window_invalidate(w); break; case WIDX_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM: - gConfigGeneral.allow_loading_with_incorrect_checksum - = !gConfigGeneral.allow_loading_with_incorrect_checksum; + gConfigGeneral.allow_loading_with_incorrect_checksum = !gConfigGeneral + .allow_loading_with_incorrect_checksum; config_save_default(); window_invalidate(w); break; @@ -1682,11 +1682,11 @@ static void window_options_invalidate(rct_window* w) widget_set_checkbox_value(w, WIDX_STEAM_OVERLAY_PAUSE, gConfigGeneral.steam_overlay_pause); // Dropdown captions for straightforward strings. - window_options_display_widgets[WIDX_FULLSCREEN].text - = window_options_fullscreen_mode_names[gConfigGeneral.fullscreen_mode]; + window_options_display_widgets[WIDX_FULLSCREEN].text = window_options_fullscreen_mode_names[gConfigGeneral + .fullscreen_mode]; window_options_display_widgets[WIDX_DRAWING_ENGINE].text = DrawingEngineStringIds[gConfigGeneral.drawing_engine]; - window_options_display_widgets[WIDX_SCALE_QUALITY].text - = window_options_scale_quality_names[gConfigGeneral.scale_quality - 1]; + window_options_display_widgets[WIDX_SCALE_QUALITY].text = window_options_scale_quality_names + [gConfigGeneral.scale_quality - 1]; break; } @@ -1699,11 +1699,12 @@ static void window_options_invalidate(rct_window* w) widget_set_checkbox_value(w, WIDX_SHOW_GUEST_PURCHASES_CHECKBOX, gConfigGeneral.show_guest_purchases); widget_set_checkbox_value(w, WIDX_UPPER_CASE_BANNERS_CHECKBOX, gConfigGeneral.upper_case_banners); - rct_string_id VirtualFloorStyleStrings[] - = { STR_VIRTUAL_FLOOR_STYLE_DISABLED, STR_VIRTUAL_FLOOR_STYLE_TRANSPARENT, STR_VIRTUAL_FLOOR_STYLE_GLASSY }; + rct_string_id VirtualFloorStyleStrings[] = { STR_VIRTUAL_FLOOR_STYLE_DISABLED, + STR_VIRTUAL_FLOOR_STYLE_TRANSPARENT, + STR_VIRTUAL_FLOOR_STYLE_GLASSY }; - window_options_rendering_widgets[WIDX_VIRTUAL_FLOOR].text - = VirtualFloorStyleStrings[gConfigGeneral.virtual_floor_style]; + window_options_rendering_widgets[WIDX_VIRTUAL_FLOOR].text = VirtualFloorStyleStrings[gConfigGeneral + .virtual_floor_style]; widget_set_checkbox_value(w, WIDX_ENABLE_LIGHT_FX_CHECKBOX, gConfigGeneral.enable_light_fx); if (gConfigGeneral.day_night_cycle @@ -1766,12 +1767,13 @@ static void window_options_invalidate(rct_window* w) window_options_culture_widgets[WIDX_DATE_FORMAT].text = DateFormatStringIds[gConfigGeneral.date_format]; // Temperature: celsius/fahrenheit - window_options_culture_widgets[WIDX_TEMPERATURE].text - = gConfigGeneral.temperature_format == TEMPERATURE_FORMAT_F ? STR_FAHRENHEIT : STR_CELSIUS; + window_options_culture_widgets[WIDX_TEMPERATURE].text = gConfigGeneral.temperature_format == TEMPERATURE_FORMAT_F + ? STR_FAHRENHEIT + : STR_CELSIUS; // Height: units/real values - window_options_culture_widgets[WIDX_HEIGHT_LABELS].text - = gConfigGeneral.show_height_as_units ? STR_UNITS : STR_REAL_VALUES; + window_options_culture_widgets[WIDX_HEIGHT_LABELS].text = gConfigGeneral.show_height_as_units ? STR_UNITS + : STR_REAL_VALUES; break; @@ -1877,8 +1879,8 @@ static void window_options_invalidate(rct_window* w) w->disabled_widgets |= (1ULL << WIDX_SCENARIO_UNLOCKING); } - window_options_misc_widgets[WIDX_DEFAULT_INSPECTION_INTERVAL].text - = RideInspectionIntervalNames[gConfigGeneral.default_inspection_interval]; + window_options_misc_widgets[WIDX_DEFAULT_INSPECTION_INTERVAL].text = RideInspectionIntervalNames + [gConfigGeneral.default_inspection_interval]; break; } @@ -1921,11 +1923,11 @@ static void window_options_update(rct_window* w) if (w->page == WINDOW_OPTIONS_PAGE_AUDIO) { rct_widget* widget = &window_options_audio_widgets[WIDX_SOUND_VOLUME]; - uint8_t sound_volume - = (uint8_t)(((float)w->scrolls[0].h_left / (w->scrolls[0].h_right - ((widget->right - widget->left) - 1))) * 100); + uint8_t sound_volume = (uint8_t)( + ((float)w->scrolls[0].h_left / (w->scrolls[0].h_right - ((widget->right - widget->left) - 1))) * 100); widget = &window_options_audio_widgets[WIDX_MUSIC_VOLUME]; - uint8_t ride_music_volume - = (uint8_t)(((float)w->scrolls[1].h_left / (w->scrolls[1].h_right - ((widget->right - widget->left) - 1))) * 100); + uint8_t ride_music_volume = (uint8_t)( + ((float)w->scrolls[1].h_left / (w->scrolls[1].h_right - ((widget->right - widget->left) - 1))) * 100); if (sound_volume != gConfigSound.sound_volume) { gConfigSound.sound_volume = sound_volume; diff --git a/src/openrct2-ui/windows/Park.cpp b/src/openrct2-ui/windows/Park.cpp index 1149bc2948..1dfdca998e 100644 --- a/src/openrct2-ui/windows/Park.cpp +++ b/src/openrct2-ui/windows/Park.cpp @@ -769,10 +769,10 @@ static void window_park_entrance_invalidate(rct_window* w) set_format_arg(0, rct_string_id, gParkName); set_format_arg(2, uint32_t, gParkNameArgs); window_park_entrance_widgets[WIDX_OPEN_OR_CLOSE].image = park_is_open() ? SPR_OPEN : SPR_CLOSED; - window_park_entrance_widgets[WIDX_CLOSE_LIGHT].image - = SPR_G2_RCT1_CLOSE_BUTTON_0 + !park_is_open() * 2 + widget_is_pressed(w, WIDX_CLOSE_LIGHT); - window_park_entrance_widgets[WIDX_OPEN_LIGHT].image - = SPR_G2_RCT1_OPEN_BUTTON_0 + park_is_open() * 2 + widget_is_pressed(w, WIDX_OPEN_LIGHT); + window_park_entrance_widgets[WIDX_CLOSE_LIGHT].image = SPR_G2_RCT1_CLOSE_BUTTON_0 + !park_is_open() * 2 + + widget_is_pressed(w, WIDX_CLOSE_LIGHT); + window_park_entrance_widgets[WIDX_OPEN_LIGHT].image = SPR_G2_RCT1_OPEN_BUTTON_0 + park_is_open() * 2 + + widget_is_pressed(w, WIDX_OPEN_LIGHT); // Only allow closing of park for guest / rating objective if (gScenarioObjectiveType == OBJECTIVE_GUESTS_AND_RATING) diff --git a/src/openrct2-ui/windows/Research.cpp b/src/openrct2-ui/windows/Research.cpp index 4a9ca9f9b7..e9e3b48559 100644 --- a/src/openrct2-ui/windows/Research.cpp +++ b/src/openrct2-ui/windows/Research.cpp @@ -316,8 +316,9 @@ static void window_research_development_invalidate(rct_window* w) { uint8_t type = gResearchLastItem.type; window_research_development_widgets[WIDX_LAST_DEVELOPMENT_BUTTON].type = WWT_FLATBTN; - window_research_development_widgets[WIDX_LAST_DEVELOPMENT_BUTTON].image - = type == RESEARCH_ENTRY_TYPE_RIDE ? SPR_NEW_RIDE : SPR_NEW_SCENERY; + window_research_development_widgets[WIDX_LAST_DEVELOPMENT_BUTTON].image = type == RESEARCH_ENTRY_TYPE_RIDE + ? SPR_NEW_RIDE + : SPR_NEW_SCENERY; } } diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index 0dfe1b6aa5..8ca6039e94 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -1331,8 +1331,8 @@ static void window_ride_draw_tab_vehicle(rct_drawpixelinfo* dpi, rct_window* w) y /= 4; } - const uint8_t vehicle - = ride_entry_get_vehicle_at_position(ride->subtype, ride->num_cars_per_train, rideEntry->tab_vehicle); + const uint8_t vehicle = ride_entry_get_vehicle_at_position( + ride->subtype, ride->num_cars_per_train, rideEntry->tab_vehicle); rct_ride_entry_vehicle* rideVehicleEntry = &rideEntry->vehicles[vehicle]; vehicle_colour vehicleColour = ride_get_vehicle_colour(ride, 0); @@ -2300,8 +2300,9 @@ static void populate_vehicle_type_dropdown(Ride* ride) continue; } - VehicleTypeLabel label - = { rideEntryIndex, currentRideEntry->naming.name, ls.GetString(currentRideEntry->naming.name) }; + VehicleTypeLabel label = { rideEntryIndex, + currentRideEntry->naming.name, + ls.GetString(currentRideEntry->naming.name) }; VehicleDropdownData.push_back(label); } } @@ -2531,12 +2532,12 @@ static void window_ride_main_invalidate(rct_window* w) }; window_ride_main_widgets[WIDX_OPEN].image = spriteIds[ride->status]; - window_ride_main_widgets[WIDX_CLOSE_LIGHT].image - = SPR_G2_RCT1_CLOSE_BUTTON_0 + (ride->status == RIDE_STATUS_CLOSED) * 2 + widget_is_pressed(w, WIDX_CLOSE_LIGHT); - window_ride_main_widgets[WIDX_TEST_LIGHT].image - = SPR_G2_RCT1_TEST_BUTTON_0 + (ride->status == RIDE_STATUS_TESTING) * 2 + widget_is_pressed(w, WIDX_TEST_LIGHT); - window_ride_main_widgets[WIDX_OPEN_LIGHT].image - = SPR_G2_RCT1_OPEN_BUTTON_0 + (ride->status == RIDE_STATUS_OPEN) * 2 + widget_is_pressed(w, WIDX_OPEN_LIGHT); + window_ride_main_widgets[WIDX_CLOSE_LIGHT].image = SPR_G2_RCT1_CLOSE_BUTTON_0 + (ride->status == RIDE_STATUS_CLOSED) * 2 + + widget_is_pressed(w, WIDX_CLOSE_LIGHT); + window_ride_main_widgets[WIDX_TEST_LIGHT].image = SPR_G2_RCT1_TEST_BUTTON_0 + (ride->status == RIDE_STATUS_TESTING) * 2 + + widget_is_pressed(w, WIDX_TEST_LIGHT); + window_ride_main_widgets[WIDX_OPEN_LIGHT].image = SPR_G2_RCT1_OPEN_BUTTON_0 + (ride->status == RIDE_STATUS_OPEN) * 2 + + widget_is_pressed(w, WIDX_OPEN_LIGHT); window_ride_anchor_border_widgets(w); @@ -3105,8 +3106,8 @@ static void window_ride_vehicle_scrollpaint(rct_window* w, rct_drawpixelinfo* dp int32_t startX = std::max(2, ((widget->right - widget->left) - ((ride->num_vehicles - 1) * 36)) / 2 - 25); int32_t startY = widget->bottom - widget->top - 4; - rct_ride_entry_vehicle* rideVehicleEntry - = &rideEntry->vehicles[ride_entry_get_vehicle_at_position(ride->subtype, ride->num_cars_per_train, 0)]; + rct_ride_entry_vehicle* rideVehicleEntry = &rideEntry->vehicles[ride_entry_get_vehicle_at_position( + ride->subtype, ride->num_cars_per_train, 0)]; startY += rideVehicleEntry->tab_height; // For each train @@ -3119,8 +3120,8 @@ static void window_ride_vehicle_scrollpaint(rct_window* w, rct_drawpixelinfo* dp // For each car in train for (int32_t j = 0; j < ride->num_cars_per_train; j++) { - rideVehicleEntry - = &rideEntry->vehicles[ride_entry_get_vehicle_at_position(ride->subtype, ride->num_cars_per_train, j)]; + rideVehicleEntry = &rideEntry + ->vehicles[ride_entry_get_vehicle_at_position(ride->subtype, ride->num_cars_per_train, j)]; x += rideVehicleEntry->spacing / 17432; y -= (rideVehicleEntry->spacing / 2) / 17432; @@ -3592,9 +3593,10 @@ static void window_ride_operating_invalidate(rct_window* w) window_ride_operating_widgets[WIDX_LEAVE_WHEN_ANOTHER_ARRIVES_CHECKBOX].type = WWT_CHECKBOX; window_ride_operating_widgets[WIDX_LEAVE_WHEN_ANOTHER_ARRIVES_CHECKBOX].tooltip = STR_LEAVE_IF_ANOTHER_VEHICLE_ARRIVES_TIP; - window_ride_operating_widgets[WIDX_LEAVE_WHEN_ANOTHER_ARRIVES_CHECKBOX].text - = RideNameConvention[ride->type].vehicle == RIDE_COMPONENT_TYPE_BOAT ? STR_LEAVE_IF_ANOTHER_BOAT_ARRIVES - : STR_LEAVE_IF_ANOTHER_TRAIN_ARRIVES; + window_ride_operating_widgets[WIDX_LEAVE_WHEN_ANOTHER_ARRIVES_CHECKBOX].text = RideNameConvention[ride->type].vehicle + == RIDE_COMPONENT_TYPE_BOAT + ? STR_LEAVE_IF_ANOTHER_BOAT_ARRIVES + : STR_LEAVE_IF_ANOTHER_TRAIN_ARRIVES; } else { @@ -3825,8 +3827,8 @@ static void window_ride_locate_mechanic(rct_window* w) * * rct2: 0x006B7D08 */ -static void - window_ride_maintenance_draw_bar(rct_window* w, rct_drawpixelinfo* dpi, int32_t x, int32_t y, int32_t value, int32_t colour) +static void window_ride_maintenance_draw_bar( + rct_window* w, rct_drawpixelinfo* dpi, int32_t x, int32_t y, int32_t value, int32_t colour) { gfx_fill_rect_inset(dpi, x, y, x + 149, y + 8, w->colours[1], INSET_RECT_F_30); if (colour & BAR_BLINK) @@ -4282,12 +4284,13 @@ static void window_ride_maintenance_paint(rct_window* w, rct_drawpixelinfo* dpi) #pragma region Colour -static constexpr const uint8_t window_ride_entrance_style_list[] - = { RIDE_ENTRANCE_STYLE_PLAIN, RIDE_ENTRANCE_STYLE_CANVAS_TENT, RIDE_ENTRANCE_STYLE_WOODEN, - RIDE_ENTRANCE_STYLE_CASTLE_BROWN, RIDE_ENTRANCE_STYLE_CASTLE_GREY, RIDE_ENTRANCE_STYLE_LOG_CABIN, - RIDE_ENTRANCE_STYLE_JUNGLE, RIDE_ENTRANCE_STYLE_CLASSICAL_ROMAN, RIDE_ENTRANCE_STYLE_ABSTRACT, - RIDE_ENTRANCE_STYLE_SNOW_ICE, RIDE_ENTRANCE_STYLE_PAGODA, RIDE_ENTRANCE_STYLE_SPACE, - RIDE_ENTRANCE_STYLE_NONE }; +static constexpr const uint8_t window_ride_entrance_style_list[] = { + RIDE_ENTRANCE_STYLE_PLAIN, RIDE_ENTRANCE_STYLE_CANVAS_TENT, RIDE_ENTRANCE_STYLE_WOODEN, + RIDE_ENTRANCE_STYLE_CASTLE_BROWN, RIDE_ENTRANCE_STYLE_CASTLE_GREY, RIDE_ENTRANCE_STYLE_LOG_CABIN, + RIDE_ENTRANCE_STYLE_JUNGLE, RIDE_ENTRANCE_STYLE_CLASSICAL_ROMAN, RIDE_ENTRANCE_STYLE_ABSTRACT, + RIDE_ENTRANCE_STYLE_SNOW_ICE, RIDE_ENTRANCE_STYLE_PAGODA, RIDE_ENTRANCE_STYLE_SPACE, + RIDE_ENTRANCE_STYLE_NONE +}; static uint32_t window_ride_get_colour_button_image(int32_t colour) { @@ -4495,8 +4498,8 @@ static void window_ride_colour_mousedown(rct_window* w, rct_widgetindex widgetIn for (i = 0; i < 3; i++) { gDropdownItemsFormat[i] = STR_DROPDOWN_MENU_LABEL; - gDropdownItemsArgs[i] - = (RideComponentNames[RideNameConvention[ride->type].vehicle].singular << 16) | VehicleColourSchemeNames[i]; + gDropdownItemsArgs[i] = (RideComponentNames[RideNameConvention[ride->type].vehicle].singular << 16) + | VehicleColourSchemeNames[i]; } window_dropdown_show_text_custom_width( @@ -4721,8 +4724,8 @@ static void window_ride_colour_invalidate(rct_window* w) if (window_ride_has_track_colour(ride, 1)) { window_ride_colour_widgets[WIDX_TRACK_ADDITIONAL_COLOUR].type = WWT_COLOURBTN; - window_ride_colour_widgets[WIDX_TRACK_ADDITIONAL_COLOUR].image - = window_ride_get_colour_button_image(trackColour.additional); + window_ride_colour_widgets[WIDX_TRACK_ADDITIONAL_COLOUR].image = window_ride_get_colour_button_image( + trackColour.additional); } else { @@ -4800,13 +4803,13 @@ static void window_ride_colour_invalidate(rct_window* w) if (allowChangingAdditionalColour1) { window_ride_colour_widgets[WIDX_VEHICLE_ADDITIONAL_COLOUR_1].type = WWT_COLOURBTN; - window_ride_colour_widgets[WIDX_VEHICLE_ADDITIONAL_COLOUR_1].image - = window_ride_get_colour_button_image(vehicleColour.additional_1); + window_ride_colour_widgets[WIDX_VEHICLE_ADDITIONAL_COLOUR_1].image = window_ride_get_colour_button_image( + vehicleColour.additional_1); if (allowChangingAdditionalColour2) { window_ride_colour_widgets[WIDX_VEHICLE_ADDITIONAL_COLOUR_2].type = WWT_COLOURBTN; - window_ride_colour_widgets[WIDX_VEHICLE_ADDITIONAL_COLOUR_2].image - = window_ride_get_colour_button_image(vehicleColour.additional_2); + window_ride_colour_widgets[WIDX_VEHICLE_ADDITIONAL_COLOUR_2].image = window_ride_get_colour_button_image( + vehicleColour.additional_2); } else { @@ -4839,8 +4842,9 @@ static void window_ride_colour_invalidate(rct_window* w) { window_ride_colour_widgets[WIDX_VEHICLE_COLOUR_INDEX].type = WWT_DROPDOWN; window_ride_colour_widgets[WIDX_VEHICLE_COLOUR_INDEX_DROPDOWN].type = WWT_BUTTON; - window_ride_colour_widgets[WIDX_VEHICLE_COLOUR_INDEX].text - = vehicleColourSchemeType == 1 ? STR_RIDE_COLOUR_TRAIN_VALUE : STR_RIDE_COLOUR_VEHICLE_VALUE; + window_ride_colour_widgets[WIDX_VEHICLE_COLOUR_INDEX].text = vehicleColourSchemeType == 1 + ? STR_RIDE_COLOUR_TRAIN_VALUE + : STR_RIDE_COLOUR_VEHICLE_VALUE; } else { @@ -4932,8 +4936,8 @@ static void window_ride_colour_paint(rct_window* w, rct_drawpixelinfo* dpi) int32_t x = w->x + (widget->left + widget->right) / 2 - 8; int32_t y = w->y + (widget->bottom + widget->top) / 2 - 6; - uint8_t shopItem - = rideEntry->shop_item_secondary == SHOP_ITEM_NONE ? rideEntry->shop_item : rideEntry->shop_item_secondary; + uint8_t shopItem = rideEntry->shop_item_secondary == SHOP_ITEM_NONE ? rideEntry->shop_item + : rideEntry->shop_item_secondary; int32_t spriteIndex = ShopItemImage[shopItem]; spriteIndex |= SPRITE_ID_PALETTE_COLOUR_1(ride->track_colour_main[0]); @@ -5007,11 +5011,11 @@ static void window_ride_colour_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi y = vehiclePreviewWidget->bottom - vehiclePreviewWidget->top - 15; // ? - trainCarIndex - = (ride->colour_scheme_type & 3) == RIDE_COLOUR_SCHEME_DIFFERENT_PER_CAR ? w->vehicleIndex : rideEntry->tab_vehicle; + trainCarIndex = (ride->colour_scheme_type & 3) == RIDE_COLOUR_SCHEME_DIFFERENT_PER_CAR ? w->vehicleIndex + : rideEntry->tab_vehicle; - rct_ride_entry_vehicle* rideVehicleEntry - = &rideEntry->vehicles[ride_entry_get_vehicle_at_position(ride->subtype, ride->num_cars_per_train, trainCarIndex)]; + rct_ride_entry_vehicle* rideVehicleEntry = &rideEntry->vehicles[ride_entry_get_vehicle_at_position( + ride->subtype, ride->num_cars_per_train, trainCarIndex)]; y += rideVehicleEntry->tab_height; @@ -5594,8 +5598,8 @@ static void window_ride_measurements_paint(rct_window* w, rct_drawpixelinfo* dpi rct_string_id ratingName = get_rating_name(ride->excitement); set_format_arg(0, uint32_t, ride->excitement); set_format_arg(4, rct_string_id, ratingName); - rct_string_id stringId - = ride->excitement == RIDE_RATING_UNDEFINED ? STR_EXCITEMENT_RATING_NOT_YET_AVAILABLE : STR_EXCITEMENT_RATING; + rct_string_id stringId = ride->excitement == RIDE_RATING_UNDEFINED ? STR_EXCITEMENT_RATING_NOT_YET_AVAILABLE + : STR_EXCITEMENT_RATING; gfx_draw_string_left(dpi, stringId, gCommonFormatArgs, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; diff --git a/src/openrct2-ui/windows/RideConstruction.cpp b/src/openrct2-ui/windows/RideConstruction.cpp index 68ef592b6d..88d6ef105e 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -479,8 +479,8 @@ static void sub_6CBCE2( static void window_ride_construction_update_map_selection(); static void window_ride_construction_update_possible_ride_configurations(); static void window_ride_construction_update_widgets(rct_window* w); -static void - window_ride_construction_select_map_tiles(Ride* ride, int32_t trackType, int32_t trackDirection, int32_t x, int32_t y); +static void window_ride_construction_select_map_tiles( + Ride* ride, int32_t trackType, int32_t trackDirection, int32_t x, int32_t y); static void window_ride_construction_show_special_track_dropdown(rct_window* w, rct_widget* widget); static void ride_selected_track_set_seat_rotation(int32_t seatRotation); static void loc_6C7502(int32_t al); @@ -1879,8 +1879,8 @@ static void window_ride_construction_mouseup_demolish(rct_window* w) return; } - const rct_preview_track* trackBlock - = get_track_def_from_ride_index(_currentRideIndex, track_element_get_type(tileElement)); + const rct_preview_track* trackBlock = get_track_def_from_ride_index( + _currentRideIndex, track_element_get_type(tileElement)); z = (tileElement->base_height * 8) - trackBlock->z; gGotoStartPlacementMode = true; } @@ -2204,8 +2204,8 @@ static void window_ride_construction_invalidate(rct_window* w) set_format_arg(2, uint16_t, brakeSpeed2); } - window_ride_construction_widgets[WIDX_SEAT_ROTATION_ANGLE_SPINNER].text - = RideConstructionSeatAngleRotationStrings[_currentSeatRotationAngle]; + window_ride_construction_widgets[WIDX_SEAT_ROTATION_ANGLE_SPINNER].text = RideConstructionSeatAngleRotationStrings + [_currentSeatRotationAngle]; // Set window title arguments set_format_arg(4, rct_string_id, ride->name); @@ -2517,8 +2517,8 @@ void window_ride_construction_update_enabled_track_pieces() { Ride* ride = get_ride(_currentRideIndex); rct_ride_entry* rideEntry = get_ride_entry_by_ride(ride); - int32_t rideType - = (_currentTrackAlternative & RIDE_TYPE_ALTERNATIVE_TRACK_TYPE) ? RideData4[ride->type].alternate_type : ride->type; + int32_t rideType = (_currentTrackAlternative & RIDE_TYPE_ALTERNATIVE_TRACK_TYPE) ? RideData4[ride->type].alternate_type + : ride->type; if (rideEntry == nullptr) return; @@ -2569,8 +2569,8 @@ void sub_6C94D8() } else { - _currentTrackPrice - = place_provisional_track_piece(rideIndex, type, direction, liftHillAndAlternativeState, x, y, z); + _currentTrackPrice = place_provisional_track_piece( + rideIndex, type, direction, liftHillAndAlternativeState, x, y, z); window_ride_construction_update_active_elements(); } } @@ -3313,8 +3313,8 @@ static void window_ride_construction_update_widgets(rct_window* w) window_invalidate(w); } -static void - window_ride_construction_select_map_tiles(Ride* ride, int32_t trackType, int32_t trackDirection, int32_t x, int32_t y) +static void window_ride_construction_select_map_tiles( + Ride* ride, int32_t trackType, int32_t trackDirection, int32_t x, int32_t y) { // If the scenery tool is active, we do not display our tiles as it // will conflict with larger scenery objects selecting tiles @@ -3574,8 +3574,8 @@ void ride_construction_toolupdate_construct(int32_t screenX, int32_t screenY) { window_ride_construction_update_state( &trackType, &trackDirection, &rideIndex, &liftHillAndAlternativeState, &x, &y, &z, nullptr); - _currentTrackPrice - = place_provisional_track_piece(rideIndex, trackType, trackDirection, liftHillAndAlternativeState, x, y, z); + _currentTrackPrice = place_provisional_track_piece( + rideIndex, trackType, trackDirection, liftHillAndAlternativeState, x, y, z); if (_currentTrackPrice != MONEY32_UNDEFINED) break; @@ -3601,8 +3601,8 @@ void ride_construction_toolupdate_construct(int32_t screenX, int32_t screenY) { window_ride_construction_update_state( &trackType, &trackDirection, &rideIndex, &liftHillAndAlternativeState, &x, &y, &z, nullptr); - _currentTrackPrice - = place_provisional_track_piece(rideIndex, trackType, trackDirection, liftHillAndAlternativeState, x, y, z); + _currentTrackPrice = place_provisional_track_piece( + rideIndex, trackType, trackDirection, liftHillAndAlternativeState, x, y, z); if (_currentTrackPrice != MONEY32_UNDEFINED) break; @@ -3721,8 +3721,8 @@ void ride_construction_toolupdate_entrance_exit(int32_t screenX, int32_t screenY || y != gRideEntranceExitGhostPosition.y || direction != gRideEntranceExitGhostPosition.direction || stationNum != gRideEntranceExitGhostStationIndex) { - _currentTrackPrice - = ride_entrance_exit_place_ghost(_currentRideIndex, x, y, direction, gRideEntranceExitPlaceType, stationNum); + _currentTrackPrice = ride_entrance_exit_place_ghost( + _currentRideIndex, x, y, direction, gRideEntranceExitPlaceType, stationNum); window_ride_construction_update_active_elements(); } } diff --git a/src/openrct2-ui/windows/RideList.cpp b/src/openrct2-ui/windows/RideList.cpp index 3c76830c0a..4ec3f8e169 100644 --- a/src/openrct2-ui/windows/RideList.cpp +++ b/src/openrct2-ui/windows/RideList.cpp @@ -503,8 +503,8 @@ static void window_ride_list_tooltip(rct_window* w, rct_widgetindex widgetIndex, */ static void window_ride_list_invalidate(rct_window* w) { - window_ride_list_widgets[WIDX_CURRENT_INFORMATION_TYPE].text - = ride_info_type_string_mapping[_window_ride_list_information_type]; + window_ride_list_widgets[WIDX_CURRENT_INFORMATION_TYPE].text = ride_info_type_string_mapping + [_window_ride_list_information_type]; // Set correct active tab for (int32_t i = 0; i < 3; i++) @@ -563,10 +563,10 @@ static void window_ride_list_invalidate(rct_window* w) allOpen = false; } } - w->widgets[WIDX_CLOSE_LIGHT].image - = SPR_G2_RCT1_CLOSE_BUTTON_0 + (allClosed == 1) * 2 + widget_is_pressed(w, WIDX_CLOSE_LIGHT); - w->widgets[WIDX_OPEN_LIGHT].image - = SPR_G2_RCT1_OPEN_BUTTON_0 + (allOpen == 1) * 2 + widget_is_pressed(w, WIDX_OPEN_LIGHT); + w->widgets[WIDX_CLOSE_LIGHT].image = SPR_G2_RCT1_CLOSE_BUTTON_0 + (allClosed == 1) * 2 + + widget_is_pressed(w, WIDX_CLOSE_LIGHT); + w->widgets[WIDX_OPEN_LIGHT].image = SPR_G2_RCT1_OPEN_BUTTON_0 + (allOpen == 1) * 2 + + widget_is_pressed(w, WIDX_OPEN_LIGHT); w->widgets[WIDX_QUICK_DEMOLISH].top = w->widgets[WIDX_OPEN_LIGHT].bottom + 3; } else @@ -750,8 +750,8 @@ static void window_ride_list_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi, if (gRideClassifications[ride->type] == RIDE_CLASS_RIDE) { set_format_arg(2, uint16_t, ride->guests_favourite); - formatSecondary - = ride->guests_favourite == 1 ? STR_GUESTS_FAVOURITE_LABEL : STR_GUESTS_FAVOURITE_PLURAL_LABEL; + formatSecondary = ride->guests_favourite == 1 ? STR_GUESTS_FAVOURITE_LABEL + : STR_GUESTS_FAVOURITE_PLURAL_LABEL; } break; } diff --git a/src/openrct2-ui/windows/SavePrompt.cpp b/src/openrct2-ui/windows/SavePrompt.cpp index a23ad2d0ec..09c9586e6b 100644 --- a/src/openrct2-ui/windows/SavePrompt.cpp +++ b/src/openrct2-ui/windows/SavePrompt.cpp @@ -168,8 +168,8 @@ rct_window* window_save_prompt_open() log_warning("Invalid save prompt mode %u", prompt_mode); return nullptr; } - window - = window_create_centred(width, height, &window_save_prompt_events, WC_SAVE_PROMPT, WF_TRANSPARENT | WF_STICK_TO_FRONT); + window = window_create_centred( + width, height, &window_save_prompt_events, WC_SAVE_PROMPT, WF_TRANSPARENT | WF_STICK_TO_FRONT); window->widgets = widgets; window->enabled_widgets = enabled_widgets; diff --git a/src/openrct2-ui/windows/Scenery.cpp b/src/openrct2-ui/windows/Scenery.cpp index b6a28ec796..a73dba0e83 100644 --- a/src/openrct2-ui/windows/Scenery.cpp +++ b/src/openrct2-ui/windows/Scenery.cpp @@ -826,8 +826,8 @@ static void window_scenery_update(rct_window* w) } else if (tabSelectedSceneryId >= 0x300) { // large scenery - gCurrentToolId - = static_cast(get_large_scenery_entry(tabSelectedSceneryId - 0x300)->large_scenery.tool_id); + gCurrentToolId = static_cast( + get_large_scenery_entry(tabSelectedSceneryId - 0x300)->large_scenery.tool_id); } else if (tabSelectedSceneryId >= 0x200) { // wall @@ -1006,12 +1006,13 @@ void window_scenery_invalidate(rct_window* w) } } - window_scenery_widgets[WIDX_SCENERY_PRIMARY_COLOUR_BUTTON].image - = SPRITE_ID_PALETTE_COLOUR_1(gWindowSceneryPrimaryColour) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; - window_scenery_widgets[WIDX_SCENERY_SECONDARY_COLOUR_BUTTON].image - = SPRITE_ID_PALETTE_COLOUR_1(gWindowScenerySecondaryColour) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; - window_scenery_widgets[WIDX_SCENERY_TERTIARY_COLOUR_BUTTON].image - = SPRITE_ID_PALETTE_COLOUR_1(gWindowSceneryTertiaryColour) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; + window_scenery_widgets[WIDX_SCENERY_PRIMARY_COLOUR_BUTTON].image = SPRITE_ID_PALETTE_COLOUR_1(gWindowSceneryPrimaryColour) + | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; + window_scenery_widgets[WIDX_SCENERY_SECONDARY_COLOUR_BUTTON].image = SPRITE_ID_PALETTE_COLOUR_1( + gWindowScenerySecondaryColour) + | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; + window_scenery_widgets[WIDX_SCENERY_TERTIARY_COLOUR_BUTTON].image = SPRITE_ID_PALETTE_COLOUR_1(gWindowSceneryTertiaryColour) + | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; window_scenery_widgets[WIDX_SCENERY_PRIMARY_COLOUR_BUTTON].type = WWT_EMPTY; window_scenery_widgets[WIDX_SCENERY_SECONDARY_COLOUR_BUTTON].type = WWT_EMPTY; diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index 6c4e47e387..f1ce916802 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -822,8 +822,8 @@ void window_staff_options_invalidate(rct_window* w) window_staff_options_widgets[WIDX_CHECKBOX_4].text = STR_STAFF_OPTION_MOW_GRASS; window_staff_options_widgets[WIDX_COSTUME_BOX].type = WWT_EMPTY; window_staff_options_widgets[WIDX_COSTUME_BTN].type = WWT_EMPTY; - w->pressed_widgets - &= ~((1 << WIDX_CHECKBOX_1) | (1 << WIDX_CHECKBOX_2) | (1 << WIDX_CHECKBOX_3) | (1 << WIDX_CHECKBOX_4)); + w->pressed_widgets &= ~( + (1 << WIDX_CHECKBOX_1) | (1 << WIDX_CHECKBOX_2) | (1 << WIDX_CHECKBOX_3) | (1 << WIDX_CHECKBOX_4)); w->pressed_widgets |= peep->staff_orders << WIDX_CHECKBOX_1; break; case STAFF_TYPE_MECHANIC: diff --git a/src/openrct2-ui/windows/StaffList.cpp b/src/openrct2-ui/windows/StaffList.cpp index 1c0bd70c23..171cf35ab7 100644 --- a/src/openrct2-ui/windows/StaffList.cpp +++ b/src/openrct2-ui/windows/StaffList.cpp @@ -524,8 +524,9 @@ void window_staff_list_invalidate(rct_window* w) if (tabIndex < 3) { window_staff_list_widgets[WIDX_STAFF_LIST_UNIFORM_COLOUR_PICKER].type = WWT_COLOURBTN; - window_staff_list_widgets[WIDX_STAFF_LIST_UNIFORM_COLOUR_PICKER].image - = SPRITE_ID_PALETTE_COLOUR_1((uint32_t)staff_get_colour(tabIndex)) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; + window_staff_list_widgets[WIDX_STAFF_LIST_UNIFORM_COLOUR_PICKER].image = SPRITE_ID_PALETTE_COLOUR_1( + (uint32_t)staff_get_colour(tabIndex)) + | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; } if (_quick_fire_mode) w->pressed_widgets |= (1ULL << WIDX_STAFF_LIST_QUICK_FIRE); diff --git a/src/openrct2-ui/windows/Themes.cpp b/src/openrct2-ui/windows/Themes.cpp index c325df9f55..a82d69dd8c 100644 --- a/src/openrct2-ui/windows/Themes.cpp +++ b/src/openrct2-ui/windows/Themes.cpp @@ -641,8 +641,8 @@ void window_themes_scrollgetsize(rct_window* w, int32_t scrollIndex, int32_t* wi return; int32_t scrollHeight = get_colour_scheme_tab_count() * _row_height; - int32_t i - = scrollHeight - window_themes_widgets[WIDX_THEMES_LIST].bottom + window_themes_widgets[WIDX_THEMES_LIST].top + 21; + int32_t i = scrollHeight - window_themes_widgets[WIDX_THEMES_LIST].bottom + window_themes_widgets[WIDX_THEMES_LIST].top + + 21; if (i < 0) i = 0; if (i < w->scrolls[0].v_top) @@ -676,14 +676,16 @@ void window_themes_scrollmousedown(rct_window* w, int32_t scrollIndex, int32_t x else { window_themes_widgets[WIDX_THEMES_COLOURBTN_MASK].type = WWT_COLOURBTN; - window_themes_widgets[WIDX_THEMES_COLOURBTN_MASK].left - = _button_offset_x + _colour_index_2 * 12 + window_themes_widgets[WIDX_THEMES_LIST].left; + window_themes_widgets[WIDX_THEMES_COLOURBTN_MASK].left = _button_offset_x + _colour_index_2 * 12 + + window_themes_widgets[WIDX_THEMES_LIST].left; window_themes_widgets[WIDX_THEMES_COLOURBTN_MASK].top = _colour_index_1 * _row_height + _button_offset_y - w->scrolls[0].v_top + window_themes_widgets[WIDX_THEMES_LIST].top; - window_themes_widgets[WIDX_THEMES_COLOURBTN_MASK].right - = window_themes_widgets[WIDX_THEMES_COLOURBTN_MASK].left + 12; - window_themes_widgets[WIDX_THEMES_COLOURBTN_MASK].bottom - = window_themes_widgets[WIDX_THEMES_COLOURBTN_MASK].top + 12; + window_themes_widgets[WIDX_THEMES_COLOURBTN_MASK].right = window_themes_widgets[WIDX_THEMES_COLOURBTN_MASK] + .left + + 12; + window_themes_widgets[WIDX_THEMES_COLOURBTN_MASK].bottom = window_themes_widgets[WIDX_THEMES_COLOURBTN_MASK] + .top + + 12; uint8_t colour = theme_get_colour(wc, _colour_index_2); window_dropdown_show_colour(w, &(window_themes_widgets[WIDX_THEMES_COLOURBTN_MASK]), w->colours[1], colour); @@ -951,8 +953,8 @@ void window_themes_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t sc gfx_draw_string_left(dpi, theme_desc_get_name(wc), nullptr, w->colours[1], 2, y + 4); uint8_t colour = theme_get_colour(wc, j); - uint32_t image - = SPRITE_ID_PALETTE_COLOUR_1(colour & ~COLOUR_FLAG_TRANSLUCENT) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; + uint32_t image = SPRITE_ID_PALETTE_COLOUR_1(colour & ~COLOUR_FLAG_TRANSLUCENT) | IMAGE_TYPE_TRANSPARENT + | SPR_PALETTE_BTN; if (i == _colour_index_1 && j == _colour_index_2) { image = SPRITE_ID_PALETTE_COLOUR_1(colour & ~COLOUR_FLAG_TRANSLUCENT) | IMAGE_TYPE_TRANSPARENT diff --git a/src/openrct2-ui/windows/TileInspector.cpp b/src/openrct2-ui/windows/TileInspector.cpp index 45f0c51b24..81040e82c4 100644 --- a/src/openrct2-ui/windows/TileInspector.cpp +++ b/src/openrct2-ui/windows/TileInspector.cpp @@ -2083,8 +2083,8 @@ static void window_tile_inspector_paint(rct_window* w, rct_drawpixelinfo* dpi) } else { - int16_t rideEntranceIndex - = (tileElement->properties.entrance.index & 0x30) >> 4; // TODO: use mask or function + int16_t rideEntranceIndex = (tileElement->properties.entrance.index & 0x30) + >> 4; // TODO: use mask or function if (tileElement->properties.entrance.type == ENTRANCE_TYPE_RIDE_ENTRANCE) { // Ride entrance ID diff --git a/src/openrct2-ui/windows/TitleCommandEditor.cpp b/src/openrct2-ui/windows/TitleCommandEditor.cpp index 8d61208c08..81a8ecf26e 100644 --- a/src/openrct2-ui/windows/TitleCommandEditor.cpp +++ b/src/openrct2-ui/windows/TitleCommandEditor.cpp @@ -244,8 +244,8 @@ void window_title_command_editor_open(TitleSequence* sequence, int32_t index, bo if (window_find_by_class(WC_TITLE_COMMAND_EDITOR) != nullptr) return; - rct_window* window - = window_create_centred(WW, WH, &window_title_command_editor_events, WC_TITLE_COMMAND_EDITOR, WF_STICK_TO_FRONT); + rct_window* window = window_create_centred( + WW, WH, &window_title_command_editor_events, WC_TITLE_COMMAND_EDITOR, WF_STICK_TO_FRONT); window_title_command_editor_widgets[WIDX_TEXTBOX_FULL].string = textbox1Buffer; window_title_command_editor_widgets[WIDX_TEXTBOX_X].string = textbox1Buffer; window_title_command_editor_widgets[WIDX_TEXTBOX_Y].string = textbox2Buffer; diff --git a/src/openrct2-ui/windows/TitleLogo.cpp b/src/openrct2-ui/windows/TitleLogo.cpp index 6d03b4a630..d9cf99afa1 100644 --- a/src/openrct2-ui/windows/TitleLogo.cpp +++ b/src/openrct2-ui/windows/TitleLogo.cpp @@ -59,8 +59,8 @@ static rct_window_event_list window_title_logo_events = { */ rct_window* window_title_logo_open() { - rct_window* window - = window_create(0, 0, 232, 136, &window_title_logo_events, WC_TITLE_LOGO, WF_STICK_TO_BACK | WF_TRANSPARENT); + rct_window* window = window_create( + 0, 0, 232, 136, &window_title_logo_events, WC_TITLE_LOGO, WF_STICK_TO_BACK | WF_TRANSPARENT); window->widgets = window_title_logo_widgets; window_init_scroll_widgets(window); window->colours[0] = TRANSLUCENT(COLOUR_GREY); diff --git a/src/openrct2-ui/windows/TitleScenarioSelect.cpp b/src/openrct2-ui/windows/TitleScenarioSelect.cpp index d86dc494cb..cf841137f0 100644 --- a/src/openrct2-ui/windows/TitleScenarioSelect.cpp +++ b/src/openrct2-ui/windows/TitleScenarioSelect.cpp @@ -530,8 +530,9 @@ static void window_scenarioselect_scrollpaint(rct_window* w, rct_drawpixelinfo* rct_string_id highlighted_format = (theme_get_flags() & UITHEME_FLAG_USE_ALTERNATIVE_SCENARIO_SELECT_FONT) ? STR_WHITE_STRING : STR_WINDOW_COLOUR_2_STRINGID; - rct_string_id unhighlighted_format - = (theme_get_flags() & UITHEME_FLAG_USE_ALTERNATIVE_SCENARIO_SELECT_FONT) ? STR_WHITE_STRING : STR_BLACK_STRING; + rct_string_id unhighlighted_format = (theme_get_flags() & UITHEME_FLAG_USE_ALTERNATIVE_SCENARIO_SELECT_FONT) + ? STR_WHITE_STRING + : STR_BLACK_STRING; bool wide = gConfigGeneral.scenario_select_mode == SCENARIO_SELECT_MODE_ORIGIN || _titleEditor; @@ -614,8 +615,8 @@ static void window_scenarioselect_scrollpaint(rct_window* w, rct_drawpixelinfo* } } -static void - draw_category_heading(rct_window* w, rct_drawpixelinfo* dpi, int32_t left, int32_t right, int32_t y, rct_string_id stringId) +static void draw_category_heading( + rct_window* w, rct_drawpixelinfo* dpi, int32_t left, int32_t right, int32_t y, rct_string_id stringId) { uint8_t baseColour = w->colours[1]; uint8_t lightColour = ColourMapA[baseColour].lighter; diff --git a/src/openrct2-ui/windows/TopToolbar.cpp b/src/openrct2-ui/windows/TopToolbar.cpp index d7ff11aca8..183af8a3fa 100644 --- a/src/openrct2-ui/windows/TopToolbar.cpp +++ b/src/openrct2-ui/windows/TopToolbar.cpp @@ -2299,11 +2299,11 @@ static void top_toolbar_tool_update_water(int16_t x, int16_t y) if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) return; - money32 lower_cost - = lower_water(gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y, 0); + money32 lower_cost = lower_water( + gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y, 0); - money32 raise_cost - = raise_water(gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y, 0); + money32 raise_cost = raise_water( + gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y, 0); if (gWaterToolRaiseCost != raise_cost || gWaterToolLowerCost != lower_cost) { @@ -2396,11 +2396,11 @@ static void top_toolbar_tool_update_water(int16_t x, int16_t y) if (!state_changed) return; - money32 lower_cost - = lower_water(gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y, 0); + money32 lower_cost = lower_water( + gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y, 0); - money32 raise_cost - = raise_water(gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y, 0); + money32 raise_cost = raise_water( + gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y, 0); if (gWaterToolRaiseCost != raise_cost || gWaterToolLowerCost != lower_cost) { diff --git a/src/openrct2-ui/windows/TrackDesignPlace.cpp b/src/openrct2-ui/windows/TrackDesignPlace.cpp index 4f4f41a3af..0758232d35 100644 --- a/src/openrct2-ui/windows/TrackDesignPlace.cpp +++ b/src/openrct2-ui/windows/TrackDesignPlace.cpp @@ -528,8 +528,8 @@ static void window_track_place_draw_mini_preview_track( uint8_t rotation = (_currentTrackPieceDirection + get_current_rotation()) & 3; rct_td6_track_element* trackElement = td6->track_elements; - const rct_preview_track** trackBlockArray - = (ride_type_has_flag(td6->type, RIDE_TYPE_FLAG_HAS_TRACK)) ? TrackBlocks : FlatRideTrackBlocks; + const rct_preview_track** trackBlockArray = (ride_type_has_flag(td6->type, RIDE_TYPE_FLAG_HAS_TRACK)) ? TrackBlocks + : FlatRideTrackBlocks; while (trackElement->type != 255) { diff --git a/src/openrct2-ui/windows/ViewClipping.cpp b/src/openrct2-ui/windows/ViewClipping.cpp index c3091446f1..87f9345591 100644 --- a/src/openrct2-ui/windows/ViewClipping.cpp +++ b/src/openrct2-ui/windows/ViewClipping.cpp @@ -127,8 +127,8 @@ static void window_view_clipping_set_clipheight(rct_window* w, const uint8_t cli gClipHeight = clipheight; rct_widget* widget = &window_view_clipping_widgets[WIDX_CLIP_HEIGHT_SLIDER]; const float clip_height_ratio = (float)gClipHeight / 255; - w->scrolls[0].h_left - = (int16_t)std::ceil(clip_height_ratio * (w->scrolls[0].h_right - ((widget->right - widget->left) - 1))); + w->scrolls[0].h_left = (int16_t)std::ceil( + clip_height_ratio * (w->scrolls[0].h_right - ((widget->right - widget->left) - 1))); } rct_window* window_view_clipping_open() diff --git a/src/openrct2/CmdlineSprite.cpp b/src/openrct2/CmdlineSprite.cpp index dd44441414..a8fa858e04 100644 --- a/src/openrct2/CmdlineSprite.cpp +++ b/src/openrct2/CmdlineSprite.cpp @@ -562,8 +562,8 @@ int32_t cmdline_for_sprite(const char** argv, int32_t argc) spriteFileEntries[spriteFileHeader.num_entries - 1] = spriteElement; memcpy(spriteFileData + (spriteFileHeader.total_size - bufferLength), buffer, bufferLength); - spriteFileEntries[spriteFileHeader.num_entries - 1].offset - = spriteFileData + (spriteFileHeader.total_size - bufferLength); + spriteFileEntries[spriteFileHeader.num_entries - 1].offset = spriteFileData + + (spriteFileHeader.total_size - bufferLength); free(buffer); if (!sprite_file_save(spriteFilePath)) @@ -689,8 +689,8 @@ int32_t cmdline_for_sprite(const char** argv, int32_t argc) spriteFileHeader.num_entries++; spriteFileHeader.total_size += bufferLength; - spriteFileEntries - = (rct_g1_element*)realloc(spriteFileEntries, spriteFileHeader.num_entries * sizeof(rct_g1_element)); + spriteFileEntries = (rct_g1_element*)realloc( + spriteFileEntries, spriteFileHeader.num_entries * sizeof(rct_g1_element)); sprite_entries_make_relative(); spriteFileData = (uint8_t*)realloc(spriteFileData, spriteFileHeader.total_size); @@ -698,8 +698,8 @@ int32_t cmdline_for_sprite(const char** argv, int32_t argc) spriteFileEntries[spriteFileHeader.num_entries - 1] = spriteElement; memcpy(spriteFileData + (spriteFileHeader.total_size - bufferLength), buffer, bufferLength); - spriteFileEntries[spriteFileHeader.num_entries - 1].offset - = spriteFileData + (spriteFileHeader.total_size - bufferLength); + spriteFileEntries[spriteFileHeader.num_entries - 1].offset = spriteFileData + + (spriteFileHeader.total_size - bufferLength); free(buffer); diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index 126d733bf7..4aa54704e1 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -497,8 +497,8 @@ namespace OpenRCT2 try { - auto result - = parkImporter->LoadFromStream(stream, info.Type == FILE_TYPE::SCENARIO, false, path.c_str()); + auto result = parkImporter->LoadFromStream( + stream, info.Type == FILE_TYPE::SCENARIO, false, path.c_str()); _objectManager->LoadObjects(result.RequiredObjects.data(), result.RequiredObjects.size()); parkImporter->Import(); String::Set(gScenarioSavePath, Util::CountOf(gScenarioSavePath), path.c_str()); diff --git a/src/openrct2/Diagnostic.cpp b/src/openrct2/Diagnostic.cpp index 8e097ae7fa..e9d59346e4 100644 --- a/src/openrct2/Diagnostic.cpp +++ b/src/openrct2/Diagnostic.cpp @@ -35,8 +35,9 @@ static FILE* diagnostic_get_stream(DIAGNOSTIC_LEVEL level) #ifdef __ANDROID__ -int _android_log_priority[DIAGNOSTIC_LEVEL_COUNT] - = { ANDROID_LOG_FATAL, ANDROID_LOG_ERROR, ANDROID_LOG_WARN, ANDROID_LOG_VERBOSE, ANDROID_LOG_INFO }; +int _android_log_priority[DIAGNOSTIC_LEVEL_COUNT] = { + ANDROID_LOG_FATAL, ANDROID_LOG_ERROR, ANDROID_LOG_WARN, ANDROID_LOG_VERBOSE, ANDROID_LOG_INFO +}; void diagnostic_log(DIAGNOSTIC_LEVEL diagnosticLevel, const char* format, ...) { diff --git a/src/openrct2/Game.cpp b/src/openrct2/Game.cpp index 14b6934fed..1b14d18d27 100644 --- a/src/openrct2/Game.cpp +++ b/src/openrct2/Game.cpp @@ -409,8 +409,8 @@ int32_t game_do_command_p( } // Log certain commands if we are in multiplayer and logging is enabled - bool serverLog - = (network_get_mode() == NETWORK_MODE_SERVER) && gGameCommandNestLevel == 1 && gConfigNetwork.log_server_actions; + bool serverLog = (network_get_mode() == NETWORK_MODE_SERVER) && gGameCommandNestLevel == 1 + && gConfigNetwork.log_server_actions; bool clientLog = (network_get_mode() == NETWORK_MODE_CLIENT) && (flags & GAME_COMMAND_FLAG_NETWORKED) && gGameCommandNestLevel == 1 && gConfigNetwork.log_server_actions; if (serverLog || clientLog) diff --git a/src/openrct2/Game.h b/src/openrct2/Game.h index 8e5053b9e0..dbcca96c55 100644 --- a/src/openrct2/Game.h +++ b/src/openrct2/Game.h @@ -118,10 +118,10 @@ enum ERROR_TYPE_FILE_LOAD = 255 }; -using GAME_COMMAND_POINTER - = void(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); -using GAME_COMMAND_CALLBACK_POINTER - = void(int32_t eax, int32_t ebx, int32_t ecx, int32_t edx, int32_t esi, int32_t edi, int32_t ebp); +using GAME_COMMAND_POINTER = void( + int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +using GAME_COMMAND_CALLBACK_POINTER = void( + int32_t eax, int32_t ebx, int32_t ecx, int32_t edx, int32_t esi, int32_t edi, int32_t ebp); extern GAME_COMMAND_CALLBACK_POINTER* game_command_callback; int32_t game_command_callback_get_index(GAME_COMMAND_CALLBACK_POINTER* callback); diff --git a/src/openrct2/Intro.cpp b/src/openrct2/Intro.cpp index 7e98d087c8..d55fe8fef7 100644 --- a/src/openrct2/Intro.cpp +++ b/src/openrct2/Intro.cpp @@ -92,8 +92,8 @@ void intro_update() } // Play the track friction sound - _soundChannel - = Mixer_Play_Effect(SOUND_TRACK_FRICTION_3, MIXER_LOOP_INFINITE, MIXER_VOLUME_MAX, 0.25f, 0.75, true); + _soundChannel = Mixer_Play_Effect( + SOUND_TRACK_FRICTION_3, MIXER_LOOP_INFINITE, MIXER_VOLUME_MAX, 0.25f, 0.75, true); } // Check if logo is off the screen...ish diff --git a/src/openrct2/ParkImporter.h b/src/openrct2/ParkImporter.h index 28a471bcb5..c715f58d63 100644 --- a/src/openrct2/ParkImporter.h +++ b/src/openrct2/ParkImporter.h @@ -65,8 +65,8 @@ namespace ParkImporter { std::unique_ptr Create(const std::string& hintPath); std::unique_ptr CreateS4(); - std::unique_ptr - CreateS6(std::shared_ptr objectRepository, std::shared_ptr objectManager); + std::unique_ptr CreateS6( + std::shared_ptr objectRepository, std::shared_ptr objectManager); bool ExtensionIsRCT1(const std::string& extension); bool ExtensionIsScenario(const std::string& extension); diff --git a/src/openrct2/actions/GuestSetNameAction.hpp b/src/openrct2/actions/GuestSetNameAction.hpp index 0ccde8df80..4b67d1bed1 100644 --- a/src/openrct2/actions/GuestSetNameAction.hpp +++ b/src/openrct2/actions/GuestSetNameAction.hpp @@ -69,8 +69,8 @@ public: return std::make_unique(GA_ERROR::INVALID_PARAMETERS, STR_CANT_NAME_GUEST, STR_NONE); } - rct_string_id newUserStringId - = user_string_allocate(USER_STRING_HIGH_ID_NUMBER | USER_STRING_DUPLICATION_PERMITTED, _name.c_str()); + rct_string_id newUserStringId = user_string_allocate( + USER_STRING_HIGH_ID_NUMBER | USER_STRING_DUPLICATION_PERMITTED, _name.c_str()); if (newUserStringId == 0) { // TODO: Probably exhausted, introduce new error. @@ -83,8 +83,8 @@ public: GameActionResult::Ptr Execute() const override { - rct_string_id newUserStringId - = user_string_allocate(USER_STRING_HIGH_ID_NUMBER | USER_STRING_DUPLICATION_PERMITTED, _name.c_str()); + rct_string_id newUserStringId = user_string_allocate( + USER_STRING_HIGH_ID_NUMBER | USER_STRING_DUPLICATION_PERMITTED, _name.c_str()); if (newUserStringId == 0) { // TODO: Probably exhausted, introduce new error. diff --git a/src/openrct2/actions/MazeSetTrackAction.hpp b/src/openrct2/actions/MazeSetTrackAction.hpp index d0db3ea7f1..fb068346e2 100644 --- a/src/openrct2/actions/MazeSetTrackAction.hpp +++ b/src/openrct2/actions/MazeSetTrackAction.hpp @@ -217,8 +217,8 @@ public: uint8_t baseHeight = _z >> 3; uint8_t clearanceHeight = (_z + 32) >> 3; - rct_tile_element* tileElement - = map_get_track_element_at_of_type_from_ride(_x, _y, baseHeight, TRACK_ELEM_MAZE, _rideIndex); + rct_tile_element* tileElement = map_get_track_element_at_of_type_from_ride( + _x, _y, baseHeight, TRACK_ELEM_MAZE, _rideIndex); if (tileElement == nullptr) { Ride* ride = get_ride(_rideIndex); diff --git a/src/openrct2/actions/RideSetName.hpp b/src/openrct2/actions/RideSetName.hpp index 92b32a8f64..151fddfa77 100644 --- a/src/openrct2/actions/RideSetName.hpp +++ b/src/openrct2/actions/RideSetName.hpp @@ -65,8 +65,8 @@ public: GA_ERROR::INVALID_PARAMETERS, STR_CANT_RENAME_RIDE_ATTRACTION, STR_INVALID_RIDE_ATTRACTION_NAME); } - rct_string_id newUserStringId - = user_string_allocate(USER_STRING_HIGH_ID_NUMBER | USER_STRING_DUPLICATION_PERMITTED, _name.c_str()); + rct_string_id newUserStringId = user_string_allocate( + USER_STRING_HIGH_ID_NUMBER | USER_STRING_DUPLICATION_PERMITTED, _name.c_str()); if (newUserStringId == 0) { // TODO: Probably exhausted, introduce new error. @@ -79,8 +79,8 @@ public: GameActionResult::Ptr Execute() const override { - rct_string_id newUserStringId - = user_string_allocate(USER_STRING_HIGH_ID_NUMBER | USER_STRING_DUPLICATION_PERMITTED, _name.c_str()); + rct_string_id newUserStringId = user_string_allocate( + USER_STRING_HIGH_ID_NUMBER | USER_STRING_DUPLICATION_PERMITTED, _name.c_str()); Ride* ride = get_ride(_rideIndex); if (ride->type == RIDE_TYPE_NULL) diff --git a/src/openrct2/actions/StaffSetNameAction.hpp b/src/openrct2/actions/StaffSetNameAction.hpp index 1ac1ad7af4..ef73c7494b 100644 --- a/src/openrct2/actions/StaffSetNameAction.hpp +++ b/src/openrct2/actions/StaffSetNameAction.hpp @@ -71,8 +71,8 @@ public: GA_ERROR::INVALID_PARAMETERS, STR_STAFF_ERROR_CANT_NAME_STAFF_MEMBER, STR_NONE); } - rct_string_id newUserStringId - = user_string_allocate(USER_STRING_HIGH_ID_NUMBER | USER_STRING_DUPLICATION_PERMITTED, _name.c_str()); + rct_string_id newUserStringId = user_string_allocate( + USER_STRING_HIGH_ID_NUMBER | USER_STRING_DUPLICATION_PERMITTED, _name.c_str()); if (newUserStringId == 0) { // TODO: Probably exhausted, introduce new error. @@ -86,8 +86,8 @@ public: GameActionResult::Ptr Execute() const override { - rct_string_id newUserStringId - = user_string_allocate(USER_STRING_HIGH_ID_NUMBER | USER_STRING_DUPLICATION_PERMITTED, _name.c_str()); + rct_string_id newUserStringId = user_string_allocate( + USER_STRING_HIGH_ID_NUMBER | USER_STRING_DUPLICATION_PERMITTED, _name.c_str()); if (newUserStringId == 0) { // TODO: Probably exhausted, introduce new error. diff --git a/src/openrct2/audio/DummyAudioContext.cpp b/src/openrct2/audio/DummyAudioContext.cpp index 700eaff3ee..9730a294b4 100644 --- a/src/openrct2/audio/DummyAudioContext.cpp +++ b/src/openrct2/audio/DummyAudioContext.cpp @@ -43,8 +43,8 @@ namespace OpenRCT2::Audio { return nullptr; } - IAudioChannel* - PlaySoundPanned(int32_t /*soundId*/, int32_t /*pan*/, int16_t /*x*/, int16_t /*y*/, int16_t /*z*/) override + IAudioChannel* PlaySoundPanned( + int32_t /*soundId*/, int32_t /*pan*/, int16_t /*x*/, int16_t /*y*/, int16_t /*z*/) override { return nullptr; } diff --git a/src/openrct2/cmdline/UriHandler.cpp b/src/openrct2/cmdline/UriHandler.cpp index 3ca0569c80..48c2737fb5 100644 --- a/src/openrct2/cmdline/UriHandler.cpp +++ b/src/openrct2/cmdline/UriHandler.cpp @@ -17,8 +17,8 @@ static exitcode_t HandleUri(const std::string& uri); #ifndef DISABLE_NETWORK static exitcode_t HandleUriJoin(const std::vector& args); -static bool - TryParseHostnamePort(const std::string& hostnamePort, std::string* outHostname, int32_t* outPort, int32_t defaultPort); +static bool TryParseHostnamePort( + const std::string& hostnamePort, std::string* outHostname, int32_t* outPort, int32_t defaultPort); #endif exitcode_t CommandLine::HandleCommandUri(CommandLineArgEnumerator* enumerator) @@ -75,8 +75,8 @@ static exitcode_t HandleUriJoin(const std::vector& args) } } -static bool - TryParseHostnamePort(const std::string& hostnamePort, std::string* outHostname, int32_t* outPort, int32_t defaultPort) +static bool TryParseHostnamePort( + const std::string& hostnamePort, std::string* outHostname, int32_t* outPort, int32_t defaultPort) { try { diff --git a/src/openrct2/config/Config.cpp b/src/openrct2/config/Config.cpp index adcc140bd4..566f3a2b41 100644 --- a/src/openrct2/config/Config.cpp +++ b/src/openrct2/config/Config.cpp @@ -139,8 +139,8 @@ namespace Config model->confirmation_prompt = reader->GetBoolean("confirmation_prompt", false); model->currency_format = reader->GetEnum("currency_format", platform_get_locale_currency(), Enum_Currency); model->custom_currency_rate = reader->GetInt32("custom_currency_rate", 10); - model->custom_currency_affix - = reader->GetEnum("custom_currency_affix", CURRENCY_SUFFIX, Enum_CurrencySymbolAffix); + model->custom_currency_affix = reader->GetEnum( + "custom_currency_affix", CURRENCY_SUFFIX, Enum_CurrencySymbolAffix); model->custom_currency_symbol = reader->GetCString("custom_currency_symbol", "Ctm"); model->edge_scrolling = reader->GetBoolean("edge_scrolling", true); model->edge_scrolling_speed = reader->GetInt32("edge_scrolling_speed", 12); @@ -157,8 +157,8 @@ namespace Config model->save_plugin_data = reader->GetBoolean("save_plugin_data", true); model->debugging_tools = reader->GetBoolean("debugging_tools", false); model->show_height_as_units = reader->GetBoolean("show_height_as_units", false); - model->temperature_format - = reader->GetEnum("temperature_format", platform_get_locale_temperature_format(), Enum_Temperature); + model->temperature_format = reader->GetEnum( + "temperature_format", platform_get_locale_temperature_format(), Enum_Temperature); model->window_height = reader->GetInt32("window_height", -1); model->window_snap_proximity = reader->GetInt32("window_snap_proximity", 5); model->window_width = reader->GetInt32("window_width", -1); @@ -166,8 +166,8 @@ namespace Config model->drawing_engine = reader->GetEnum("drawing_engine", DRAWING_ENGINE_SOFTWARE, Enum_DrawingEngine); model->uncap_fps = reader->GetBoolean("uncap_fps", false); model->use_vsync = reader->GetBoolean("use_vsync", true); - model->virtual_floor_style - = reader->GetEnum("virtual_floor_style", VIRTUAL_FLOOR_STYLE_GLASSY, Enum_VirtualFloorStyle); + model->virtual_floor_style = reader->GetEnum( + "virtual_floor_style", VIRTUAL_FLOOR_STYLE_GLASSY, Enum_VirtualFloorStyle); // Default config setting is false until ghost trains are implemented #4540 model->test_unfinished_tracks = reader->GetBoolean("test_unfinished_tracks", false); diff --git a/src/openrct2/core/FileIndex.hpp b/src/openrct2/core/FileIndex.hpp index 6de7e9a698..7ce9ccf5ff 100644 --- a/src/openrct2/core/FileIndex.hpp +++ b/src/openrct2/core/FileIndex.hpp @@ -163,8 +163,8 @@ private: stats.TotalFiles++; stats.TotalFileSize += fileInfo->Size; - stats.FileDateModifiedChecksum - ^= (uint32_t)(fileInfo->LastModified >> 32) ^ (uint32_t)(fileInfo->LastModified & 0xFFFFFFFF); + stats.FileDateModifiedChecksum ^= (uint32_t)(fileInfo->LastModified >> 32) + ^ (uint32_t)(fileInfo->LastModified & 0xFFFFFFFF); stats.FileDateModifiedChecksum = ror32(stats.FileDateModifiedChecksum, 5); stats.PathChecksum += GetPathChecksum(path); } diff --git a/src/openrct2/core/FileScanner.cpp b/src/openrct2/core/FileScanner.cpp index 51961b1b46..a7bbd64ebf 100644 --- a/src/openrct2/core/FileScanner.cpp +++ b/src/openrct2/core/FileScanner.cpp @@ -265,8 +265,8 @@ private: { result.Type = DIRECTORY_CHILD_TYPE::DC_FILE; result.Size = ((uint64_t)child->nFileSizeHigh << 32ULL) | (uint64_t)child->nFileSizeLow; - result.LastModified - = ((uint64_t)child->ftLastWriteTime.dwHighDateTime << 32ULL) | (uint64_t)child->ftLastWriteTime.dwLowDateTime; + result.LastModified = ((uint64_t)child->ftLastWriteTime.dwHighDateTime << 32ULL) + | (uint64_t)child->ftLastWriteTime.dwLowDateTime; } return result; } @@ -370,8 +370,8 @@ void Path::QueryDirectory(QueryDirectoryResult* result, const std::string& patte result->TotalFiles++; result->TotalFileSize += fileInfo->Size; - result->FileDateModifiedChecksum - ^= (uint32_t)(fileInfo->LastModified >> 32) ^ (uint32_t)(fileInfo->LastModified & 0xFFFFFFFF); + result->FileDateModifiedChecksum ^= (uint32_t)(fileInfo->LastModified >> 32) + ^ (uint32_t)(fileInfo->LastModified & 0xFFFFFFFF); result->FileDateModifiedChecksum = ror32(result->FileDateModifiedChecksum, 5); result->PathChecksum += GetPathChecksum(path); } diff --git a/src/openrct2/drawing/Image.cpp b/src/openrct2/drawing/Image.cpp index eeed5fb085..d1fc1ce997 100644 --- a/src/openrct2/drawing/Image.cpp +++ b/src/openrct2/drawing/Image.cpp @@ -40,10 +40,10 @@ static std::list _allocatedLists; [[maybe_unused]] static bool AllocatedListContains(uint32_t baseImageId, uint32_t count) { - bool contains - = std::any_of(_allocatedLists.begin(), _allocatedLists.end(), [baseImageId, count](const ImageList& imageList) -> bool { - return imageList.BaseId == baseImageId && imageList.Count == count; - }); + bool contains = std::any_of( + _allocatedLists.begin(), _allocatedLists.end(), [baseImageId, count](const ImageList& imageList) -> bool { + return imageList.BaseId == baseImageId && imageList.Count == count; + }); return contains; } diff --git a/src/openrct2/drawing/ImageImporter.cpp b/src/openrct2/drawing/ImageImporter.cpp index bd6162eef3..e462bf7efa 100644 --- a/src/openrct2/drawing/ImageImporter.cpp +++ b/src/openrct2/drawing/ImageImporter.cpp @@ -20,8 +20,8 @@ using ImportResult = ImageImporter::ImportResult; constexpr int32_t PALETTE_TRANSPARENT = -1; -ImportResult - ImageImporter::Import(const Image& image, int32_t offsetX, int32_t offsetY, IMPORT_FLAGS flags, IMPORT_MODE mode) const +ImportResult ImageImporter::Import( + const Image& image, int32_t offsetX, int32_t offsetY, IMPORT_FLAGS flags, IMPORT_MODE mode) const { if (image.Width > 256 || image.Height > 256) { @@ -37,8 +37,8 @@ ImportResult const auto height = image.Height; auto pixels = GetPixels(image.Pixels.data(), width, height, flags, mode); - auto [buffer, bufferLength] - = flags & IMPORT_FLAGS::RLE ? EncodeRLE(pixels.data(), width, height) : EncodeRaw(pixels.data(), width, height); + auto [buffer, bufferLength] = flags & IMPORT_FLAGS::RLE ? EncodeRLE(pixels.data(), width, height) + : EncodeRaw(pixels.data(), width, height); rct_g1_element outElement; outElement.offset = (uint8_t*)buffer; @@ -56,8 +56,8 @@ ImportResult return result; } -std::vector - ImageImporter::GetPixels(const uint8_t* pixels, uint32_t width, uint32_t height, IMPORT_FLAGS flags, IMPORT_MODE mode) +std::vector ImageImporter::GetPixels( + const uint8_t* pixels, uint32_t width, uint32_t height, IMPORT_FLAGS flags, IMPORT_MODE mode) { std::vector buffer; buffer.reserve(width * height); diff --git a/src/openrct2/drawing/ImageImporter.h b/src/openrct2/drawing/ImageImporter.h index 070e419acc..cd2cee78ad 100644 --- a/src/openrct2/drawing/ImageImporter.h +++ b/src/openrct2/drawing/ImageImporter.h @@ -54,13 +54,13 @@ namespace OpenRCT2::Drawing private: static const PaletteBGRA StandardPalette[256]; - static std::vector - GetPixels(const uint8_t* pixels, uint32_t width, uint32_t height, IMPORT_FLAGS flags, IMPORT_MODE mode); + static std::vector GetPixels( + const uint8_t* pixels, uint32_t width, uint32_t height, IMPORT_FLAGS flags, IMPORT_MODE mode); static std::tuple EncodeRaw(const int32_t* pixels, uint32_t width, uint32_t height); static std::tuple EncodeRLE(const int32_t* pixels, uint32_t width, uint32_t height); - static int32_t - CalculatePaletteIndex(IMPORT_MODE mode, int16_t* rgbaSrc, int32_t x, int32_t y, int32_t width, int32_t height); + static int32_t CalculatePaletteIndex( + IMPORT_MODE mode, int16_t* rgbaSrc, int32_t x, int32_t y, int32_t width, int32_t height); static int32_t GetPaletteIndex(const PaletteBGRA* palette, int16_t* colour); static bool IsTransparentPixel(const int16_t* colour); static bool IsChangablePixel(int32_t paletteIndex); diff --git a/src/openrct2/drawing/LightFX.cpp b/src/openrct2/drawing/LightFX.cpp index f3b31aa061..17b73fb19b 100644 --- a/src/openrct2/drawing/LightFX.cpp +++ b/src/openrct2/drawing/LightFX.cpp @@ -434,8 +434,8 @@ void lightfx_prepare_light_list() // log_warning("sample-count: %i, occlusion: %i", totalSamplePoints, lightIntensityOccluded / totalSamplePoints); - entry->lightIntensity - = std::min(0xFF, (entry->lightIntensity * lightIntensityOccluded) / (totalSamplePoints * 100)); + entry->lightIntensity = std::min( + 0xFF, (entry->lightIntensity * lightIntensityOccluded) / (totalSamplePoints * 100)); entry->lightIntensity = std::max(0x00, entry->lightIntensity - _current_view_zoom_front * 5); } diff --git a/src/openrct2/drawing/ScrollingText.cpp b/src/openrct2/drawing/ScrollingText.cpp index d02c21639d..dbb925e59d 100644 --- a/src/openrct2/drawing/ScrollingText.cpp +++ b/src/openrct2/drawing/ScrollingText.cpp @@ -39,10 +39,10 @@ static rct_draw_scroll_text _drawScrollTextList[MAX_SCROLLING_TEXT_ENTRIES]; static uint8_t _characterBitmaps[FONT_SPRITE_GLYPH_COUNT + SPR_G2_GLYPH_COUNT][8]; static uint32_t _drawSCrollNextIndex = 0; -static void - scrolling_text_set_bitmap_for_sprite(utf8* text, int32_t scroll, uint8_t* bitmap, const int16_t* scrollPositionOffsets); -static void - scrolling_text_set_bitmap_for_ttf(utf8* text, int32_t scroll, uint8_t* bitmap, const int16_t* scrollPositionOffsets); +static void scrolling_text_set_bitmap_for_sprite( + utf8* text, int32_t scroll, uint8_t* bitmap, const int16_t* scrollPositionOffsets); +static void scrolling_text_set_bitmap_for_ttf( + utf8* text, int32_t scroll, uint8_t* bitmap, const int16_t* scrollPositionOffsets); void scrolling_text_initialise_bitmaps() { @@ -1508,8 +1508,8 @@ int32_t scrolling_text_setup(paint_session* session, rct_string_id stringId, uin return imageId; } -static void - scrolling_text_set_bitmap_for_sprite(utf8* text, int32_t scroll, uint8_t* bitmap, const int16_t* scrollPositionOffsets) +static void scrolling_text_set_bitmap_for_sprite( + utf8* text, int32_t scroll, uint8_t* bitmap, const int16_t* scrollPositionOffsets) { uint8_t characterColour = scrolling_text_get_colour(gCommonFormatArgs[7]); diff --git a/src/openrct2/interface/Chat.cpp b/src/openrct2/interface/Chat.cpp index 72275d159f..6e91da75b7 100644 --- a/src/openrct2/interface/Chat.cpp +++ b/src/openrct2/interface/Chat.cpp @@ -181,8 +181,8 @@ void chat_draw(rct_drawpixelinfo* dpi, uint8_t chatBackgroundColor) y = _chatBottom - inputLineHeight - 5; lineCh = lineBuffer; - inputLineHeight - = gfx_draw_string_left_wrapped(dpi, (void*)&lineCh, x, y + 3, _chatWidth - 10, STR_STRING, TEXT_COLOUR_255); + inputLineHeight = gfx_draw_string_left_wrapped( + dpi, (void*)&lineCh, x, y + 3, _chatWidth - 10, STR_STRING, TEXT_COLOUR_255); gfx_set_dirty_blocks(x, y, x + _chatWidth, y + inputLineHeight + 15); // TODO: Show caret if the input text has multiple lines diff --git a/src/openrct2/interface/InteractiveConsole.cpp b/src/openrct2/interface/InteractiveConsole.cpp index 67ffc09091..c094f6fd8f 100644 --- a/src/openrct2/interface/InteractiveConsole.cpp +++ b/src/openrct2/interface/InteractiveConsole.cpp @@ -419,8 +419,8 @@ static int32_t cc_staff(InteractiveConsole& console, const utf8** argv, int32_t return 1; } peep = GET_PEEP(int_val[0]); - bool is_entertainer - = peep != nullptr && peep->type == PEEP_TYPE_STAFF && peep->staff_type == STAFF_TYPE_ENTERTAINER; + bool is_entertainer = peep != nullptr && peep->type == PEEP_TYPE_STAFF + && peep->staff_type == STAFF_TYPE_ENTERTAINER; if (!is_entertainer) { console.WriteLineError("Specified staff is not entertainer"); @@ -976,8 +976,8 @@ static int32_t cc_set(InteractiveConsole& console, const utf8** argv, int32_t ar return 0; } -static int32_t - cc_twitch([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const utf8** argv, [[maybe_unused]] int32_t argc) +static int32_t cc_twitch( + [[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const utf8** argv, [[maybe_unused]] int32_t argc) { #ifdef DISABLE_TWITCH console.WriteLineError("OpenRCT2 build not compiled with Twitch integration."); @@ -1139,16 +1139,16 @@ static int32_t cc_open(InteractiveConsole& console, const utf8** argv, int32_t a return 0; } -static int32_t - cc_remove_unused_objects(InteractiveConsole& console, [[maybe_unused]] const utf8** argv, [[maybe_unused]] int32_t argc) +static int32_t cc_remove_unused_objects( + InteractiveConsole& console, [[maybe_unused]] const utf8** argv, [[maybe_unused]] int32_t argc) { int32_t result = editor_remove_unused_objects(); console.WriteFormatLine("%d unused object entries have been removed.", result); return 0; } -static int32_t - cc_remove_park_fences(InteractiveConsole& console, [[maybe_unused]] const utf8** argv, [[maybe_unused]] int32_t argc) +static int32_t cc_remove_park_fences( + InteractiveConsole& console, [[maybe_unused]] const utf8** argv, [[maybe_unused]] int32_t argc) { tile_element_iterator it; tile_element_iterator_begin(&it); @@ -1212,8 +1212,8 @@ static int32_t cc_show_limits(InteractiveConsole& console, [[maybe_unused]] cons return 0; } -static int32_t - cc_for_date([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const utf8** argv, [[maybe_unused]] int32_t argc) +static int32_t cc_for_date( + [[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const utf8** argv, [[maybe_unused]] int32_t argc) { int32_t year = 0; int32_t month = 0; diff --git a/src/openrct2/interface/Viewport.cpp b/src/openrct2/interface/Viewport.cpp index f022517a6b..4738ad0743 100644 --- a/src/openrct2/interface/Viewport.cpp +++ b/src/openrct2/interface/Viewport.cpp @@ -253,8 +253,8 @@ void viewport_adjust_for_map_height(int16_t* x, int16_t* y, int16_t* z) /* * rct2: 0x006E7FF3 */ -static void - viewport_redraw_after_shift(rct_drawpixelinfo* dpi, rct_window* window, rct_viewport* viewport, int32_t x, int32_t y) +static void viewport_redraw_after_shift( + rct_drawpixelinfo* dpi, rct_window* window, rct_viewport* viewport, int32_t x, int32_t y) { // sub-divide by intersecting windows if (window != nullptr) @@ -375,8 +375,8 @@ static void } } -static void - viewport_shift_pixels(rct_drawpixelinfo* dpi, rct_window* window, rct_viewport* viewport, int16_t x_diff, int16_t y_diff) +static void viewport_shift_pixels( + rct_drawpixelinfo* dpi, rct_window* window, rct_viewport* viewport, int16_t x_diff, int16_t y_diff) { for (auto i = window_get_index(window); i < g_window_list.size(); i++) { diff --git a/src/openrct2/interface/Window.cpp b/src/openrct2/interface/Window.cpp index 2e072cfe58..b70661cdf1 100644 --- a/src/openrct2/interface/Window.cpp +++ b/src/openrct2/interface/Window.cpp @@ -77,8 +77,8 @@ static constexpr const float window_scroll_locations[][2] = { }; // clang-format on -static int32_t - window_draw_split(rct_drawpixelinfo* dpi, rct_window* w, int32_t left, int32_t top, int32_t right, int32_t bottom); +static int32_t window_draw_split( + rct_drawpixelinfo* dpi, rct_window* w, int32_t left, int32_t top, int32_t right, int32_t bottom); static void window_draw_single(rct_drawpixelinfo* dpi, rct_window* w, int32_t left, int32_t top, int32_t right, int32_t bottom); size_t window_get_index(const rct_window* w) @@ -1167,8 +1167,8 @@ void window_draw(rct_drawpixelinfo* dpi, rct_window* w, int32_t left, int32_t to * Splits a drawing of a window into regions that can be seen and are not hidden * by other opaque overlapping windows. */ -static int32_t - window_draw_split(rct_drawpixelinfo* dpi, rct_window* w, int32_t left, int32_t top, int32_t right, int32_t bottom) +static int32_t window_draw_split( + rct_drawpixelinfo* dpi, rct_window* w, int32_t left, int32_t top, int32_t right, int32_t bottom) { // Divide the draws up for only the visible regions of the window recursively for (auto i = window_get_index(w) + 1; i < g_window_list.size(); i++) diff --git a/src/openrct2/localisation/LocalisationService.cpp b/src/openrct2/localisation/LocalisationService.cpp index 370d30562b..b1fbc46f8e 100644 --- a/src/openrct2/localisation/LocalisationService.cpp +++ b/src/openrct2/localisation/LocalisationService.cpp @@ -86,8 +86,8 @@ void LocalisationService::OpenLanguage(int32_t id, IObjectManager& objectManager if (id != LANGUAGE_ENGLISH_UK) { filename = GetLanguagePath(LANGUAGE_ENGLISH_UK); - _languageFallback - = std::unique_ptr(LanguagePackFactory::FromFile(LANGUAGE_ENGLISH_UK, filename.c_str())); + _languageFallback = std::unique_ptr( + LanguagePackFactory::FromFile(LANGUAGE_ENGLISH_UK, filename.c_str())); } filename = GetLanguagePath(id); @@ -113,8 +113,8 @@ void LocalisationService::CloseLanguages() _currentLanguage = LANGUAGE_UNDEFINED; } -std::tuple - LocalisationService::GetLocalisedScenarioStrings(const std::string& scenarioFilename) const +std::tuple LocalisationService::GetLocalisedScenarioStrings( + const std::string& scenarioFilename) const { auto result0 = _languageCurrent->GetScenarioOverrideStringId(scenarioFilename.c_str(), 0); auto result1 = _languageCurrent->GetScenarioOverrideStringId(scenarioFilename.c_str(), 1); diff --git a/src/openrct2/localisation/LocalisationService.h b/src/openrct2/localisation/LocalisationService.h index 9e766e5173..54c7714f8f 100644 --- a/src/openrct2/localisation/LocalisationService.h +++ b/src/openrct2/localisation/LocalisationService.h @@ -54,8 +54,8 @@ namespace OpenRCT2::Localisation ~LocalisationService(); const char* GetString(rct_string_id id) const; - std::tuple - GetLocalisedScenarioStrings(const std::string& scenarioFilename) const; + std::tuple GetLocalisedScenarioStrings( + const std::string& scenarioFilename) const; rct_string_id GetObjectOverrideStringId(const char* identifier, uint8_t index) const; std::string GetLanguagePath(uint32_t languageId) const; diff --git a/src/openrct2/localisation/UTF8.cpp b/src/openrct2/localisation/UTF8.cpp index e420605c52..065c1b04ec 100644 --- a/src/openrct2/localisation/UTF8.cpp +++ b/src/openrct2/localisation/UTF8.cpp @@ -33,8 +33,8 @@ uint32_t utf8_get_next(const utf8* char_ptr, const utf8** nextchar_ptr) } else if ((char_ptr[0] & 0xF8) == 0xF0) { - result - = ((char_ptr[0] & 0x07) << 18) | ((char_ptr[1] & 0x3F) << 12) | ((char_ptr[1] & 0x3F) << 6) | (char_ptr[2] & 0x3F); + result = ((char_ptr[0] & 0x07) << 18) | ((char_ptr[1] & 0x3F) << 12) | ((char_ptr[1] & 0x3F) << 6) + | (char_ptr[2] & 0x3F); numBytes = 4; } else diff --git a/src/openrct2/management/Award.cpp b/src/openrct2/management/Award.cpp index 043b8b8243..baa604e89a 100644 --- a/src/openrct2/management/Award.cpp +++ b/src/openrct2/management/Award.cpp @@ -543,8 +543,9 @@ static bool award_is_deserved_best_custom_designed_rides(int32_t activeAwardType } /** At least 5 colourful rides and more than half of the rides are colourful. */ -static constexpr const uint8_t dazzling_ride_colours[] - = { COLOUR_BRIGHT_PURPLE, COLOUR_BRIGHT_GREEN, COLOUR_LIGHT_ORANGE, COLOUR_BRIGHT_PINK }; +static constexpr const uint8_t dazzling_ride_colours[] = { + COLOUR_BRIGHT_PURPLE, COLOUR_BRIGHT_GREEN, COLOUR_LIGHT_ORANGE, COLOUR_BRIGHT_PINK +}; static bool award_is_deserved_most_dazzling_ride_colours(int32_t activeAwardTypes) { diff --git a/src/openrct2/network/Network.cpp b/src/openrct2/network/Network.cpp index b1743f8721..c0e28a8383 100644 --- a/src/openrct2/network/Network.cpp +++ b/src/openrct2/network/Network.cpp @@ -694,8 +694,8 @@ bool Network::CheckSRAND(uint32_t tick, uint32_t srand0) server_srand0_tick = 0; // Check that the server and client sprite hashes match const char* client_sprite_hash = sprite_checksum(); - const bool sprites_mismatch - = server_sprite_hash[0] != '\0' && strcmp(client_sprite_hash, server_sprite_hash.c_str()) != 0; + const bool sprites_mismatch = server_sprite_hash[0] != '\0' + && strcmp(client_sprite_hash, server_sprite_hash.c_str()) != 0; // Check PRNG values and sprite hashes, if exist if ((srand0 != server_srand0) || sprites_mismatch) { @@ -2093,8 +2093,8 @@ void Network::Server_Handle_AUTH(NetworkConnection& connection, NetworkPacket& p throw std::runtime_error("Failed to load public key."); } - bool verified - = connection.Key.Verify(connection.Challenge.data(), connection.Challenge.size(), signature, sigsize); + bool verified = connection.Key.Verify( + connection.Challenge.data(), connection.Challenge.size(), signature, sigsize); const std::string hash = connection.Key.PublicKeyHash(); if (verified) { diff --git a/src/openrct2/object/FootpathItemObject.cpp b/src/openrct2/object/FootpathItemObject.cpp index 4a73fc98bb..63b1d6c46a 100644 --- a/src/openrct2/object/FootpathItemObject.cpp +++ b/src/openrct2/object/FootpathItemObject.cpp @@ -103,8 +103,8 @@ void FootpathItemObject::ReadJson(IReadObjectContext* context, const json_t* roo { auto properties = json_object_get(root, "properties"); _legacyType.path_bit.draw_type = ParseDrawType(ObjectJsonHelpers::GetString(properties, "renderAs")); - _legacyType.path_bit.tool_id - = ObjectJsonHelpers::ParseCursor(ObjectJsonHelpers::GetString(properties, "cursor"), CURSOR_LAMPPOST_DOWN); + _legacyType.path_bit.tool_id = ObjectJsonHelpers::ParseCursor( + ObjectJsonHelpers::GetString(properties, "cursor"), CURSOR_LAMPPOST_DOWN); _legacyType.path_bit.price = json_integer_value(json_object_get(properties, "price")); SetPrimarySceneryGroup(ObjectJsonHelpers::GetString(json_object_get(properties, "sceneryGroup"))); diff --git a/src/openrct2/object/LargeSceneryObject.cpp b/src/openrct2/object/LargeSceneryObject.cpp index 0431a92de5..4d793e01d7 100644 --- a/src/openrct2/object/LargeSceneryObject.cpp +++ b/src/openrct2/object/LargeSceneryObject.cpp @@ -125,8 +125,8 @@ void LargeSceneryObject::ReadJson(IReadObjectContext* context, const json_t* roo { auto properties = json_object_get(root, "properties"); - _legacyType.large_scenery.tool_id - = ObjectJsonHelpers::ParseCursor(ObjectJsonHelpers::GetString(properties, "cursor"), CURSOR_STATUE_DOWN); + _legacyType.large_scenery.tool_id = ObjectJsonHelpers::ParseCursor( + ObjectJsonHelpers::GetString(properties, "cursor"), CURSOR_STATUE_DOWN); _legacyType.large_scenery.price = json_integer_value(json_object_get(properties, "price")); _legacyType.large_scenery.removal_price = json_integer_value(json_object_get(properties, "removalPrice")); diff --git a/src/openrct2/object/ObjectFactory.cpp b/src/openrct2/object/ObjectFactory.cpp index dbef3db1b6..99bdedd0e0 100644 --- a/src/openrct2/object/ObjectFactory.cpp +++ b/src/openrct2/object/ObjectFactory.cpp @@ -152,8 +152,8 @@ public: namespace ObjectFactory { - static Object* - CreateObjectFromJson(IObjectRepository& objectRepository, const json_t* jRoot, const IFileDataRetriever* fileRetriever); + static Object* CreateObjectFromJson( + IObjectRepository& objectRepository, const json_t* jRoot, const IFileDataRetriever* fileRetriever); static void ReadObjectLegacy(Object* object, IReadObjectContext* context, IStream* stream) { @@ -357,8 +357,8 @@ namespace ObjectFactory return result; } - Object* - CreateObjectFromJson(IObjectRepository& objectRepository, const json_t* jRoot, const IFileDataRetriever* fileRetriever) + Object* CreateObjectFromJson( + IObjectRepository& objectRepository, const json_t* jRoot, const IFileDataRetriever* fileRetriever) { log_verbose("CreateObjectFromJson(...)"); diff --git a/src/openrct2/object/ObjectJsonHelpers.cpp b/src/openrct2/object/ObjectJsonHelpers.cpp index f4cdf3ab91..1ed700e188 100644 --- a/src/openrct2/object/ObjectJsonHelpers.cpp +++ b/src/openrct2/object/ObjectJsonHelpers.cpp @@ -215,8 +215,8 @@ namespace ObjectJsonHelpers return objectPath; } - static std::vector - LoadObjectImages(IReadObjectContext* context, const std::string& name, const std::vector& range) + static std::vector LoadObjectImages( + IReadObjectContext* context, const std::string& name, const std::vector& range) { std::vector result; auto objectPath = FindLegacyObject(name); diff --git a/src/openrct2/object/ObjectRepository.cpp b/src/openrct2/object/ObjectRepository.cpp index b350878756..057a5b64e1 100644 --- a/src/openrct2/object/ObjectRepository.cpp +++ b/src/openrct2/object/ObjectRepository.cpp @@ -443,8 +443,8 @@ private: } } - static void - SaveObject(const utf8* path, const rct_object_entry* entry, const void* data, size_t dataSize, bool fixChecksum = true) + static void SaveObject( + const utf8* path, const rct_object_entry* entry, const void* data, size_t dataSize, bool fixChecksum = true) { if (fixChecksum) { diff --git a/src/openrct2/object/RideObject.cpp b/src/openrct2/object/RideObject.cpp index 735628a876..14efaf82df 100644 --- a/src/openrct2/object/RideObject.cpp +++ b/src/openrct2/object/RideObject.cpp @@ -171,8 +171,8 @@ void RideObject::Load() // again. This has been changed to use the calculation results directly - num_vertical_frames and // num_horizontal_frames are no longer set on the vehicle entry. // 0x6DE946 - vehicleEntry->base_num_frames - = CalculateNumVerticalFrames(vehicleEntry) * CalculateNumHorizontalFrames(vehicleEntry); + vehicleEntry->base_num_frames = CalculateNumVerticalFrames(vehicleEntry) + * CalculateNumHorizontalFrames(vehicleEntry); vehicleEntry->base_image_id = cur_vehicle_images_offset; int32_t image_index = vehicleEntry->base_image_id; diff --git a/src/openrct2/object/SmallSceneryObject.cpp b/src/openrct2/object/SmallSceneryObject.cpp index 1d2ea44eea..97b89c683b 100644 --- a/src/openrct2/object/SmallSceneryObject.cpp +++ b/src/openrct2/object/SmallSceneryObject.cpp @@ -234,8 +234,8 @@ void SmallSceneryObject::ReadJson(IReadObjectContext* context, const json_t* roo auto properties = json_object_get(root, "properties"); _legacyType.small_scenery.height = json_integer_value(json_object_get(properties, "height")); - _legacyType.small_scenery.tool_id - = ObjectJsonHelpers::ParseCursor(ObjectJsonHelpers::GetString(properties, "cursor"), CURSOR_STATUE_DOWN); + _legacyType.small_scenery.tool_id = ObjectJsonHelpers::ParseCursor( + ObjectJsonHelpers::GetString(properties, "cursor"), CURSOR_STATUE_DOWN); _legacyType.small_scenery.price = json_integer_value(json_object_get(properties, "price")); _legacyType.small_scenery.removal_price = json_integer_value(json_object_get(properties, "removalPrice")); _legacyType.small_scenery.animation_delay = json_integer_value(json_object_get(properties, "animationDelay")); diff --git a/src/openrct2/object/WallObject.cpp b/src/openrct2/object/WallObject.cpp index d51ed63903..70586d66f1 100644 --- a/src/openrct2/object/WallObject.cpp +++ b/src/openrct2/object/WallObject.cpp @@ -88,8 +88,8 @@ void WallObject::ReadJson(IReadObjectContext* context, const json_t* root) { auto properties = json_object_get(root, "properties"); - _legacyType.wall.tool_id - = ObjectJsonHelpers::ParseCursor(ObjectJsonHelpers::GetString(properties, "cursor"), CURSOR_FENCE_DOWN); + _legacyType.wall.tool_id = ObjectJsonHelpers::ParseCursor( + ObjectJsonHelpers::GetString(properties, "cursor"), CURSOR_FENCE_DOWN); _legacyType.wall.height = json_integer_value(json_object_get(properties, "height")); _legacyType.wall.price = json_integer_value(json_object_get(properties, "price")); diff --git a/src/openrct2/paint/Paint.cpp b/src/openrct2/paint/Paint.cpp index 2d8f130f95..0bd555bcc1 100644 --- a/src/openrct2/paint/Paint.cpp +++ b/src/openrct2/paint/Paint.cpp @@ -50,8 +50,8 @@ bool gPaintBlockedTiles; static void paint_session_init(paint_session* session, rct_drawpixelinfo* dpi); static void paint_attached_ps(rct_drawpixelinfo* dpi, paint_struct* ps, uint32_t viewFlags); -static void - paint_ps_image_with_bounding_boxes(rct_drawpixelinfo* dpi, paint_struct* ps, uint32_t imageId, int16_t x, int16_t y); +static void paint_ps_image_with_bounding_boxes( + rct_drawpixelinfo* dpi, paint_struct* ps, uint32_t imageId, int16_t x, int16_t y); static void paint_ps_image(rct_drawpixelinfo* dpi, paint_struct* ps, uint32_t imageId, int16_t x, int16_t y); static uint32_t paint_ps_colourify_image(uint32_t imageId, uint8_t spriteType, uint32_t viewFlags); @@ -474,8 +474,8 @@ paint_struct paint_session_arrange(paint_session* session) } } while (++quadrantIndex <= session->QuadrantFrontIndex); - paint_struct* ps_cache - = paint_arrange_structs_helper(&psHead, session->QuadrantBackIndex & 0xFFFF, PAINT_QUADRANT_FLAG_NEXT, rotation); + paint_struct* ps_cache = paint_arrange_structs_helper( + &psHead, session->QuadrantBackIndex & 0xFFFF, PAINT_QUADRANT_FLAG_NEXT, rotation); quadrantIndex = session->QuadrantBackIndex; while (++quadrantIndex < session->QuadrantFrontIndex) diff --git a/src/openrct2/paint/VirtualFloor.cpp b/src/openrct2/paint/VirtualFloor.cpp index 2b4af83e13..fa8312bafa 100644 --- a/src/openrct2/paint/VirtualFloor.cpp +++ b/src/openrct2/paint/VirtualFloor.cpp @@ -425,8 +425,8 @@ void virtual_floor_paint(paint_session* session) if (!weAreOccupied && !weAreLit) { - int32_t imageColourFlats - = SPR_G2_SURFACE_GLASSY_RECOLOURABLE | IMAGE_TYPE_REMAP | IMAGE_TYPE_TRANSPARENT | PALETTE_WATER << 19; + int32_t imageColourFlats = SPR_G2_SURFACE_GLASSY_RECOLOURABLE | IMAGE_TYPE_REMAP | IMAGE_TYPE_TRANSPARENT + | PALETTE_WATER << 19; sub_98197C(session, imageColourFlats, 0, 0, 30, 30, 0, _virtualFloorHeight, 2, 2, _virtualFloorHeight - 3); } } diff --git a/src/openrct2/paint/sprite/Paint.Peep.cpp b/src/openrct2/paint/sprite/Paint.Peep.cpp index 12ec841f18..d39131e377 100644 --- a/src/openrct2/paint/sprite/Paint.Peep.cpp +++ b/src/openrct2/paint/sprite/Paint.Peep.cpp @@ -81,8 +81,8 @@ void peep_paint(paint_session* session, const rct_peep* peep, int32_t imageDirec // In the following 4 calls to sub_98197C/sub_98199C, we add 5 (instead of 3) to the // bound_box_offset_z to make sure peeps are drawn on top of railways uint32_t baseImageId = (imageDirection >> 3) + sprite.sprite_animation[spriteType].base_image + imageOffset * 4; - uint32_t imageId - = baseImageId | peep->tshirt_colour << 19 | peep->trousers_colour << 24 | IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS; + uint32_t imageId = baseImageId | peep->tshirt_colour << 19 | peep->trousers_colour << 24 | IMAGE_TYPE_REMAP + | IMAGE_TYPE_REMAP_2_PLUS; sub_98197C(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5); if (baseImageId >= 10717 && baseImageId < 10749) diff --git a/src/openrct2/paint/tile_element/Paint.Entrance.cpp b/src/openrct2/paint/tile_element/Paint.Entrance.cpp index 07598b3d8e..54b3dd479e 100644 --- a/src/openrct2/paint/tile_element/Paint.Entrance.cpp +++ b/src/openrct2/paint/tile_element/Paint.Entrance.cpp @@ -27,8 +27,8 @@ static uint32_t _unk9E32BC; * * rct2: 0x0066508C, 0x00665540 */ -static void - ride_entrance_exit_paint(paint_session* session, uint8_t direction, int32_t height, const rct_tile_element* tile_element) +static void ride_entrance_exit_paint( + paint_session* session, uint8_t direction, int32_t height, const rct_tile_element* tile_element) { uint8_t is_exit = tile_element->properties.entrance.type == ENTRANCE_TYPE_RIDE_EXIT; diff --git a/src/openrct2/paint/tile_element/Paint.Path.cpp b/src/openrct2/paint/tile_element/Paint.Path.cpp index 2fad716a68..e2fff39e61 100644 --- a/src/openrct2/paint/tile_element/Paint.Path.cpp +++ b/src/openrct2/paint/tile_element/Paint.Path.cpp @@ -466,8 +466,9 @@ static void sub_6A4101( direction += session->CurrentRotation; direction &= 3; - LocationXYZ16 boundBoxOffsets - = { BannerBoundBoxes[direction][0].x, BannerBoundBoxes[direction][0].y, static_cast(height + 2) }; + LocationXYZ16 boundBoxOffsets = { BannerBoundBoxes[direction][0].x, + BannerBoundBoxes[direction][0].y, + static_cast(height + 2) }; uint32_t imageId = (direction << 1) + base_image_id + 101; @@ -769,8 +770,8 @@ static void sub_6A3F61( } // Draw additional path bits (bins, benches, lamps, queue screens) - rct_scenery_entry* sceneryEntry - = get_footpath_item_entry(footpath_element_get_path_scenery_index(tile_element)); + rct_scenery_entry* sceneryEntry = get_footpath_item_entry( + footpath_element_get_path_scenery_index(tile_element)); if ((gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) && !(tile_element->flags & TILE_ELEMENT_FLAG_BROKEN) diff --git a/src/openrct2/paint/tile_element/Paint.SmallScenery.cpp b/src/openrct2/paint/tile_element/Paint.SmallScenery.cpp index 79f32e3a50..e034166d7f 100644 --- a/src/openrct2/paint/tile_element/Paint.SmallScenery.cpp +++ b/src/openrct2/paint/tile_element/Paint.SmallScenery.cpp @@ -175,8 +175,8 @@ void scenery_paint(paint_session* session, uint8_t direction, int32_t height, co { // Draw translucent overlay: // TODO: Name palette entries - int32_t image_id - = (baseImageid & 0x7FFFF) + (GlassPaletteIds[scenery_small_get_primary_colour(tileElement)] << 19) + 0x40000004; + int32_t image_id = (baseImageid & 0x7FFFF) + (GlassPaletteIds[scenery_small_get_primary_colour(tileElement)] << 19) + + 0x40000004; sub_98199C( session, image_id, diff --git a/src/openrct2/paint/tile_element/Paint.Surface.cpp b/src/openrct2/paint/tile_element/Paint.Surface.cpp index 8a5f897733..5d876c19b7 100644 --- a/src/openrct2/paint/tile_element/Paint.Surface.cpp +++ b/src/openrct2/paint/tile_element/Paint.Surface.cpp @@ -1484,8 +1484,8 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c image_offset = byte_97B740[surfaceShape & 0xF]; } - const int32_t image_id - = (SPR_WATER_MASK + image_offset) | IMAGE_TYPE_REMAP | IMAGE_TYPE_TRANSPARENT | PALETTE_WATER << 19; + const int32_t image_id = (SPR_WATER_MASK + image_offset) | IMAGE_TYPE_REMAP | IMAGE_TYPE_TRANSPARENT + | PALETTE_WATER << 19; sub_98196C(session, image_id, 0, 0, 32, 32, -1, waterHeight); paint_attach_to_previous_ps(session, SPR_WATER_OVERLAY + image_offset, 0, 0); diff --git a/src/openrct2/paint/tile_element/Paint.TileElement.cpp b/src/openrct2/paint/tile_element/Paint.TileElement.cpp index da959534ce..b974e1a74f 100644 --- a/src/openrct2/paint/tile_element/Paint.TileElement.cpp +++ b/src/openrct2/paint/tile_element/Paint.TileElement.cpp @@ -38,8 +38,8 @@ uint16_t testPaintVerticalTunnelHeight; static void blank_tiles_paint(paint_session* session, int32_t x, int32_t y); static void sub_68B3FB(paint_session* session, int32_t x, int32_t y); -const int32_t SEGMENTS_ALL - = SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4; +const int32_t SEGMENTS_ALL = SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC + | SEGMENT_D0 | SEGMENT_D4; /** * @@ -435,8 +435,8 @@ void paint_util_force_set_general_support_height(paint_session* session, int16_t session->Support.slope = slope; } -const uint16_t segment_offsets[9] - = { SEGMENT_B4, SEGMENT_B8, SEGMENT_BC, SEGMENT_C0, SEGMENT_C4, SEGMENT_C8, SEGMENT_CC, SEGMENT_D0, SEGMENT_D4 }; +const uint16_t segment_offsets[9] = { SEGMENT_B4, SEGMENT_B8, SEGMENT_BC, SEGMENT_C0, SEGMENT_C4, + SEGMENT_C8, SEGMENT_CC, SEGMENT_D0, SEGMENT_D4 }; void paint_util_set_segment_support_height(paint_session* session, int32_t segments, uint16_t height, uint8_t slope) { diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index 058016faaf..61da1e31f8 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -3480,8 +3480,8 @@ static void peep_update_ride_leave_entrance_spiral_slide(rct_peep* peep, Ride* r peep->sub_state = PEEP_RIDE_APPROACH_SPIRAL_SLIDE; } -static uint8_t - peep_get_waypointed_seat_location(rct_peep* peep, Ride* ride, rct_ride_entry_vehicle* vehicle_type, uint8_t track_direction) +static uint8_t peep_get_waypointed_seat_location( + rct_peep* peep, Ride* ride, rct_ride_entry_vehicle* vehicle_type, uint8_t track_direction) { // The seatlocation can be split into segments around the ride base // to decide the segment first split off the segmentable seat location diff --git a/src/openrct2/peep/GuestPathfinding.cpp b/src/openrct2/peep/GuestPathfinding.cpp index b775b994c9..42b08ba94d 100644 --- a/src/openrct2/peep/GuestPathfinding.cpp +++ b/src/openrct2/peep/GuestPathfinding.cpp @@ -1761,8 +1761,8 @@ static int32_t guest_path_find_park_entrance(rct_peep* peep, [[maybe_unused]] rc if (gParkEntrances[entranceNum].x == LOCATION_NULL) continue; - uint16_t dist - = abs(gParkEntrances[entranceNum].x - peep->next_x) + abs(gParkEntrances[entranceNum].y - peep->next_y); + uint16_t dist = abs(gParkEntrances[entranceNum].x - peep->next_x) + + abs(gParkEntrances[entranceNum].y - peep->next_y); if (dist >= nearestDist) continue; diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 12776c92c2..516870a9f4 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1022,8 +1022,8 @@ void rct_peep::UpdateFalling() // If a path check if we are on it if (tile_element->GetType() == TILE_ELEMENT_TYPE_PATH) { - int32_t height - = map_height_from_slope(x, y, tile_element->properties.surface.slope) + tile_element->base_height * 8; + int32_t height = map_height_from_slope(x, y, tile_element->properties.surface.slope) + + tile_element->base_height * 8; if (height < z - 1 || height > z + 4) continue; @@ -2427,8 +2427,8 @@ static void peep_return_to_centre_of_tile(rct_peep* peep) * * rct2: 0x00693f2C */ -static void - peep_interact_with_entrance(rct_peep* peep, int16_t x, int16_t y, rct_tile_element* tile_element, uint8_t& pathing_result) +static void peep_interact_with_entrance( + rct_peep* peep, int16_t x, int16_t y, rct_tile_element* tile_element, uint8_t& pathing_result) { uint8_t entranceType = tile_element->properties.entrance.type; uint8_t rideIndex = tile_element->properties.entrance.ride_index; diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 22cc779bf9..e5f2f94da6 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -357,13 +357,13 @@ enum PEEP_FLAGS : uint32_t PEEP_FLAGS_CONTAGIOUS = (1 << 22), // Makes any peeps in surrounding tiles sick PEEP_FLAGS_JOY = (1 << 23), // Makes the peep jump in joy PEEP_FLAGS_ANGRY = (1 << 24), - PEEP_FLAGS_ICE_CREAM = (1 << 25), // Gives passing peeps ice cream and they wave back - PEEP_FLAGS_NICE_RIDE_DEPRECATED - = (1 << 26), // Used to make the peep think "Nice ride! But not as good as the Phoenix..." on exiting a ride - PEEP_FLAGS_INTAMIN_DEPRECATED - = (1 << 27), // Used to make the peep think "I'm so excited - It's an Intamin ride!" while riding on a Intamin ride. - PEEP_FLAGS_HERE_WE_ARE = (1 << 28), // Makes the peep think "...and here we are on X!" while riding a ride - PEEP_FLAGS_TWITCH = (1u << 31), // Added for twitch integration + PEEP_FLAGS_ICE_CREAM = (1 << 25), // Gives passing peeps ice cream and they wave back + PEEP_FLAGS_NICE_RIDE_DEPRECATED = (1 << 26), // Used to make the peep think "Nice ride! But not as good as the Phoenix..." + // on exiting a ride + PEEP_FLAGS_INTAMIN_DEPRECATED = (1 << 27), // Used to make the peep think "I'm so excited - It's an Intamin ride!" while + // riding on a Intamin ride. + PEEP_FLAGS_HERE_WE_ARE = (1 << 28), // Makes the peep think "...and here we are on X!" while riding a ride + PEEP_FLAGS_TWITCH = (1u << 31), // Added for twitch integration }; enum PEEP_NEXT_FLAGS diff --git a/src/openrct2/peep/Staff.cpp b/src/openrct2/peep/Staff.cpp index 5a3a5ee834..d4aac0a840 100644 --- a/src/openrct2/peep/Staff.cpp +++ b/src/openrct2/peep/Staff.cpp @@ -921,8 +921,8 @@ static uint8_t staff_handyman_direction_to_nearest_litter(rct_peep* peep) return 0xFF; } - LocationXY16 litterTile - = { static_cast(nearestLitter->x & 0xFFE0), static_cast(nearestLitter->y & 0xFFE0) }; + LocationXY16 litterTile = { static_cast(nearestLitter->x & 0xFFE0), + static_cast(nearestLitter->y & 0xFFE0) }; if (!staff_is_location_in_patrol(peep, litterTile.x, litterTile.y)) { @@ -1324,8 +1324,8 @@ static uint8_t staff_mechanic_direction_path(rct_peep* peep, uint8_t validDirect pathfind_logging_enable(peep); #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 - int32_t pathfindDirection - = peep_pathfind_choose_direction({ peep->next_x / 32, peep->next_y / 32, peep->next_z }, peep); + int32_t pathfindDirection = peep_pathfind_choose_direction( + { peep->next_x / 32, peep->next_y / 32, peep->next_z }, peep); #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 pathfind_logging_disable(); @@ -1637,8 +1637,8 @@ uint32_t staff_get_available_entertainer_costumes() entertainerCostumes >>= 4; // Fix #6593: force enable the default costumes, which normally get enabled through the default scenery groups. - entertainerCostumes - |= (1 << ENTERTAINER_COSTUME_PANDA) | (1 << ENTERTAINER_COSTUME_TIGER) | (1 << ENTERTAINER_COSTUME_ELEPHANT); + entertainerCostumes |= (1 << ENTERTAINER_COSTUME_PANDA) | (1 << ENTERTAINER_COSTUME_TIGER) + | (1 << ENTERTAINER_COSTUME_ELEPHANT); return entertainerCostumes; } diff --git a/src/openrct2/platform/Crash.cpp b/src/openrct2/platform/Crash.cpp index 3f5592d19b..98e439e2cf 100644 --- a/src/openrct2/platform/Crash.cpp +++ b/src/openrct2/platform/Crash.cpp @@ -49,9 +49,9 @@ static bool OnCrash( { if (!succeeded) { - constexpr const char* DumpFailedMessage - = "Failed to create the dump. Please file an issue with OpenRCT2 on GitHub and provide latest save, and provide " - "information about what you did before the crash occurred."; + constexpr const char* DumpFailedMessage = "Failed to create the dump. Please file an issue with OpenRCT2 on GitHub and " + "provide latest save, and provide " + "information about what you did before the crash occurred."; printf("%s\n", DumpFailedMessage); if (!gOpenRCT2SilentBreakpad) { @@ -107,9 +107,9 @@ static bool OnCrash( return succeeded; } - constexpr const wchar_t* MessageFormat - = L"A crash has occurred and a dump was created at\n%s.\n\nPlease file an issue with OpenRCT2 on GitHub, and provide " - L"the dump and saved game there.\n\nVersion: %s\nCommit: %s"; + constexpr const wchar_t* MessageFormat = L"A crash has occurred and a dump was created at\n%s.\n\nPlease file an issue " + L"with OpenRCT2 on GitHub, and provide " + L"the dump and saved game there.\n\nVersion: %s\nCommit: %s"; wchar_t message[MAX_PATH * 2]; swprintf_s(message, MessageFormat, dumpFilePath, WSZ(OPENRCT2_VERSION), _wszCommitSha1Short); diff --git a/src/openrct2/platform/macos.mm b/src/openrct2/platform/macos.mm index 4f9d08284f..b0b7276e17 100644 --- a/src/openrct2/platform/macos.mm +++ b/src/openrct2/platform/macos.mm @@ -50,8 +50,8 @@ utf8* macos_str_decomp_to_precomp(utf8* input) bool platform_get_font_path(TTFFontDescriptor* font, utf8* buffer, size_t size) { @autoreleasepool { - CTFontDescriptorRef fontRef - = CTFontDescriptorCreateWithNameAndSize((CFStringRef)[NSString stringWithUTF8String:font->font_name], 0.0); + CTFontDescriptorRef fontRef = CTFontDescriptorCreateWithNameAndSize( + (CFStringRef)[NSString stringWithUTF8String:font->font_name], 0.0); CFURLRef url = (CFURLRef)CTFontDescriptorCopyAttribute(fontRef, kCTFontURLAttribute); if (url) { @@ -102,8 +102,8 @@ bool platform_has_matching_language(NSString* preferredLocale, uint16_t* languag NSString* languageCode = [[preferredLocale componentsSeparatedByString:@"-"] firstObject]; for (int i = 1; i < LANGUAGE_COUNT; i++) { - NSString* optionLanguageCode = - [[[NSString stringWithUTF8String:LanguagesDescriptors[i].locale] componentsSeparatedByString:@"-"] firstObject]; + NSString* optionLanguageCode = [ + [[NSString stringWithUTF8String:LanguagesDescriptors[i].locale] componentsSeparatedByString:@"-"] firstObject]; if ([languageCode isEqualToString:optionLanguageCode]) { *languageIdentifier = i; @@ -168,7 +168,8 @@ bool platform_get_steam_path(utf8* outPath, size_t outSize) if (homeDir != NULL) { safe_strcpy(steamPath, homeDir, sizeof(steamPath)); - safe_strcat_path(steamPath, "Library/Application Support/Steam/Steam.AppBundle/Steam/Contents/MacOS/steamapps", sizeof(steamPath)); + safe_strcat_path( + steamPath, "Library/Application Support/Steam/Steam.AppBundle/Steam/Contents/MacOS/steamapps", sizeof(steamPath)); if (platform_directory_exists(steamPath)) { safe_strcpy(outPath, steamPath, outSize); diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 5a541490f7..45c07a2038 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -167,8 +167,8 @@ public: return result; } - ParkLoadResult - LoadFromStream(IStream* stream, bool isScenario, [[maybe_unused]] bool skipObjectCheck, const utf8* path) override + ParkLoadResult LoadFromStream( + IStream* stream, bool isScenario, [[maybe_unused]] bool skipObjectCheck, const utf8* path) override { _s4 = *ReadAndDecodeS4(stream, isScenario); _s4Path = path; @@ -999,8 +999,8 @@ private: for (int i = 0; i < RCT1_MAX_TRAINS_PER_RIDE; i++) { // RCT1 had no third colour - RCT1::RCT1VehicleColourSchemeCopyDescriptor colourSchemeCopyDescriptor - = RCT1::GetColourSchemeCopyDescriptor(src->vehicle_type); + RCT1::RCT1VehicleColourSchemeCopyDescriptor colourSchemeCopyDescriptor = RCT1::GetColourSchemeCopyDescriptor( + src->vehicle_type); if (colourSchemeCopyDescriptor.colour1 == COPY_COLOUR_1) { dst->vehicle_colours[i].body_colour = RCT1::GetColour(src->vehicle_colours[i].body); @@ -1235,8 +1235,8 @@ private: { rct1_ride* srcRide = &_s4.rides[src->ride]; uint8_t vehicleTypeIndex = srcRide->vehicle_type; - RCT1::RCT1VehicleColourSchemeCopyDescriptor colourSchemeCopyDescriptor - = RCT1::GetColourSchemeCopyDescriptor(vehicleTypeIndex); + RCT1::RCT1VehicleColourSchemeCopyDescriptor colourSchemeCopyDescriptor = RCT1::GetColourSchemeCopyDescriptor( + vehicleTypeIndex); // RCT1 had no third colour if (colourSchemeCopyDescriptor.colour1 == COPY_COLOUR_1) @@ -1758,8 +1758,9 @@ private: { for (size_t i = 0; i < RCT12_MAX_PEEP_SPAWNS; i++) { - gPeepSpawns[i] - = { _s4.peep_spawn[i].x, _s4.peep_spawn[i].y, _s4.peep_spawn[i].z * 16, _s4.peep_spawn[i].direction }; + gPeepSpawns[i] = { + _s4.peep_spawn[i].x, _s4.peep_spawn[i].y, _s4.peep_spawn[i].z * 16, _s4.peep_spawn[i].direction + }; } for (size_t i = RCT12_MAX_PEEP_SPAWNS; i < MAX_PEEP_SPAWNS; i++) diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 31624ef458..cdcd98b7a5 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -137,8 +137,8 @@ void S6Exporter::Save(IStream* stream, bool isScenario) // Read all written bytes back into a single buffer stream->SetPosition(0); - auto data - = std::unique_ptr>(stream->ReadArray(fileSize), Memory::Free); + auto data = std::unique_ptr>( + stream->ReadArray(fileSize), Memory::Free); uint32_t checksum = sawyercoding_calculate_checksum(data.get(), fileSize); // Write the checksum on the end diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 94b68e2909..7adecd5ec3 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -805,8 +805,9 @@ public: for (size_t i = 0; i < RCT12_MAX_PEEP_SPAWNS; i++) { - gPeepSpawns[i] - = { _s6.peep_spawns[i].x, _s6.peep_spawns[i].y, _s6.peep_spawns[i].z * 16, _s6.peep_spawns[i].direction }; + gPeepSpawns[i] = { + _s6.peep_spawns[i].x, _s6.peep_spawns[i].y, _s6.peep_spawns[i].z * 16, _s6.peep_spawns[i].direction + }; } for (size_t i = RCT12_MAX_PEEP_SPAWNS; i < MAX_PEEP_SPAWNS; i++) @@ -834,8 +835,8 @@ public: } }; -std::unique_ptr - ParkImporter::CreateS6(std::shared_ptr objectRepository, std::shared_ptr objectManager) +std::unique_ptr ParkImporter::CreateS6( + std::shared_ptr objectRepository, std::shared_ptr objectManager) { return std::make_unique(objectRepository, objectManager); } diff --git a/src/openrct2/ride/CableLift.cpp b/src/openrct2/ride/CableLift.cpp index 507a999e47..677b6bcabc 100644 --- a/src/openrct2/ride/CableLift.cpp +++ b/src/openrct2/ride/CableLift.cpp @@ -246,8 +246,8 @@ static bool sub_6DF01A_loop(rct_vehicle* vehicle) { _vehicleVAngleEndF64E36 = TrackDefinitions[trackType].vangle_end; _vehicleBankEndF64E37 = TrackDefinitions[trackType].bank_end; - rct_tile_element* trackElement - = map_get_track_element_at_of_type_seq(vehicle->track_x, vehicle->track_y, vehicle->track_z / 8, trackType, 0); + rct_tile_element* trackElement = map_get_track_element_at_of_type_seq( + vehicle->track_x, vehicle->track_y, vehicle->track_z / 8, trackType, 0); CoordsXYE input; CoordsXYE output; @@ -321,8 +321,8 @@ static bool sub_6DF21B_loop(rct_vehicle* vehicle) _vehicleVAngleEndF64E36 = TrackDefinitions[trackType].vangle_start; _vehicleBankEndF64E37 = TrackDefinitions[trackType].bank_start; - rct_tile_element* trackElement - = map_get_track_element_at_of_type_seq(vehicle->track_x, vehicle->track_y, vehicle->track_z / 8, trackType, 0); + rct_tile_element* trackElement = map_get_track_element_at_of_type_seq( + vehicle->track_x, vehicle->track_y, vehicle->track_z / 8, trackType, 0); CoordsXYE input; diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index 569be7ad82..b37369f37f 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -457,8 +457,8 @@ static money32 ride_calculate_income_per_hour(Ride* ride) priceMinusCost -= get_shop_item_cost(currentShopItem); } - currentShopItem - = (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) ? RidePhotoItems[ride->type] : entry->shop_item_secondary; + currentShopItem = (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) ? RidePhotoItems[ride->type] + : entry->shop_item_secondary; if (currentShopItem != SHOP_ITEM_NONE) { @@ -1440,8 +1440,8 @@ void ride_restore_provisional_track_piece() } else { - _currentTrackPrice - = place_provisional_track_piece(rideIndex, type, direction, liftHillAndAlternativeState, x, y, z); + _currentTrackPrice = place_provisional_track_piece( + rideIndex, type, direction, liftHillAndAlternativeState, x, y, z); window_ride_construction_update_active_elements(); } } @@ -1465,8 +1465,8 @@ void ride_remove_provisional_track_piece() ride = get_ride(rideIndex); if (ride->type == RIDE_TYPE_MAZE) { - int32_t flags - = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_5 | GAME_COMMAND_FLAG_GHOST; + int32_t flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_5 + | GAME_COMMAND_FLAG_GHOST; maze_set_track(x, y, z, flags, false, 0, rideIndex, GC_SET_MAZE_TRACK_FILL); maze_set_track(x, y + 16, z, flags, false, 1, rideIndex, GC_SET_MAZE_TRACK_FILL); maze_set_track(x + 16, y + 16, z, flags, false, 2, rideIndex, GC_SET_MAZE_TRACK_FILL); @@ -1668,8 +1668,8 @@ void ride_construction_set_default_next_piece() // Set track slope and lift hill _currentTrackSlopeEnd = slope; _previousTrackSlopeEnd = slope; - _currentTrackLiftHill - = track_element_is_lift_hill(tileElement) && slope != TRACK_SLOPE_DOWN_25 && slope != TRACK_SLOPE_DOWN_60; + _currentTrackLiftHill = track_element_is_lift_hill(tileElement) && slope != TRACK_SLOPE_DOWN_25 + && slope != TRACK_SLOPE_DOWN_60; break; case RIDE_CONSTRUCTION_STATE_BACK: rideIndex = _currentRideIndex; @@ -2740,8 +2740,8 @@ static void ride_mechanic_status_update(int32_t rideIndex, int32_t mechanicStatu || breakdownReason == BREAKDOWN_CONTROL_FAILURE) { ride->lifecycle_flags |= RIDE_LIFECYCLE_BROKEN_DOWN; - ride->window_invalidate_flags - |= RIDE_INVALIDATE_RIDE_MAINTENANCE | RIDE_INVALIDATE_RIDE_LIST | RIDE_INVALIDATE_RIDE_MAIN; + ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE | RIDE_INVALIDATE_RIDE_LIST + | RIDE_INVALIDATE_RIDE_MAIN; ride->breakdown_reason = breakdownReason; ride_breakdown_add_news_item(rideIndex); } @@ -2757,8 +2757,8 @@ static void ride_mechanic_status_update(int32_t rideIndex, int32_t mechanicStatu case RIDE_MECHANIC_STATUS_CALLING: if (RideAvailableBreakdowns[ride->type] == 0) { - ride->lifecycle_flags - &= ~(RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_DUE_INSPECTION); + ride->lifecycle_flags &= ~( + RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_DUE_INSPECTION); break; } @@ -5042,8 +5042,8 @@ static train_ref vehicle_create_train( for (int32_t carIndex = 0; carIndex < ride->num_cars_per_train; carIndex++) { const uint8_t vehicle = ride_entry_get_vehicle_at_position(ride->subtype, ride->num_cars_per_train, carIndex); - rct_vehicle* car - = vehicle_create_car(rideIndex, vehicle, carIndex, vehicleIndex, x, y, z, remainingDistance, tileElement); + rct_vehicle* car = vehicle_create_car( + rideIndex, vehicle, carIndex, vehicleIndex, x, y, z, remainingDistance, tileElement); if (carIndex == 0) { train.head = car; @@ -5165,8 +5165,8 @@ static void ride_create_vehicles_find_first_block(Ride* ride, CoordsXYE* outXYEl case TRACK_ELEM_DIAG_60_DEG_UP_TO_FLAT: if (track_element_is_lift_hill(trackElement)) { - rct_tile_element* tileElement - = map_get_first_element_at(trackBeginEnd.begin_x >> 5, trackBeginEnd.begin_y >> 5); + rct_tile_element* tileElement = map_get_first_element_at( + trackBeginEnd.begin_x >> 5, trackBeginEnd.begin_y >> 5); do { if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK) @@ -7766,8 +7766,8 @@ void ride_update_max_vehicles(int32_t rideIndex) int32_t totalSpacing = 0; for (int32_t i = 0; i < newCarsPerTrain; i++) { - vehicleEntry - = &rideEntry->vehicles[ride_entry_get_vehicle_at_position(ride->subtype, newCarsPerTrain, i)]; + vehicleEntry = &rideEntry + ->vehicles[ride_entry_get_vehicle_at_position(ride->subtype, newCarsPerTrain, i)]; totalSpacing += vehicleEntry->spacing; } @@ -8228,8 +8228,8 @@ void sub_6CB945(int32_t rideIndex) uint8_t trackType = track_element_get_type(trackElement); uint8_t trackSequence = tile_element_get_track_sequence(trackElement); - uint8_t direction - = (tile_element_get_direction(tileElement) - tile_element_get_direction(trackElement) + 2) & 3; + uint8_t direction = (tile_element_get_direction(tileElement) - tile_element_get_direction(trackElement) + 2) + & 3; if (!(TrackSequenceProperties[trackType][trackSequence] & (1 << direction))) { diff --git a/src/openrct2/ride/Ride.h b/src/openrct2/ride/Ride.h index 6971affff3..2fe914be56 100644 --- a/src/openrct2/ride/Ride.h +++ b/src/openrct2/ride/Ride.h @@ -797,8 +797,8 @@ enum ride_type_flags : uint32_t RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS = 1 << 5, RIDE_TYPE_FLAG_TRACK_MUST_BE_ON_WATER = 1 << 6, // used only by boat Hire and submarine ride RIDE_TYPE_FLAG_HAS_G_FORCES = 1 << 7, - RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS - = 1 << 8, // used by rides that can't have gaps, like those with a vertical tower, such as the observation tower + RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS = 1 + << 8, // used by rides that can't have gaps, like those with a vertical tower, such as the observation tower RIDE_TYPE_FLAG_HAS_DATA_LOGGING = 1 << 9, RIDE_TYPE_FLAG_HAS_DROPS = 1 << 10, RIDE_TYPE_FLAG_NO_TEST_MODE = 1 << 11, diff --git a/src/openrct2/ride/Track.cpp b/src/openrct2/ride/Track.cpp index 37d089a657..21e33aada0 100644 --- a/src/openrct2/ride/Track.cpp +++ b/src/openrct2/ride/Track.cpp @@ -2192,8 +2192,8 @@ int32_t track_get_actual_bank_2(int32_t rideType, bool isInverted, int32_t bank) int32_t track_get_actual_bank_3(rct_vehicle* vehicle, rct_tile_element* tileElement) { - bool isInverted - = ((vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) > 0) ^ track_element_is_inverted(tileElement); + bool isInverted = ((vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) > 0) + ^ track_element_is_inverted(tileElement); int32_t trackType = track_element_get_type(tileElement); int32_t rideType = get_ride(track_element_get_ride_index(tileElement))->type; int32_t bankStart = TrackDefinitions[trackType].bank_start; diff --git a/src/openrct2/ride/Track.h b/src/openrct2/ride/Track.h index 2d85065f01..59025c66f9 100644 --- a/src/openrct2/ride/Track.h +++ b/src/openrct2/ride/Track.h @@ -199,8 +199,8 @@ enum TRACK_ELEM_FLAG_NORMAL_TO_INVERSION = (1 << 7), TRACK_ELEM_FLAG_STARTS_AT_HALF_HEIGHT = (1 << 8), TRACK_ELEM_FLAG_ONLY_ABOVE_GROUND = (1 << 9), - TRACK_ELEM_FLAG_IS_STEEP_UP - = (1 << 10), // Used to allow steep backwards lifts on roller coasters that do not allow steep forward lift hills + TRACK_ELEM_FLAG_IS_STEEP_UP = (1 << 10), // Used to allow steep backwards lifts on roller coasters that do not allow steep + // forward lift hills TRACK_ELEM_FLAG_HELIX = (1 << 11), TRACK_ELEM_FLAG_ALLOW_LIFT_HILL = (1 << 12), TRACK_ELEM_FLAG_CURVE_ALLOWS_LIFT = (1 << 13), diff --git a/src/openrct2/ride/TrackDesign.cpp b/src/openrct2/ride/TrackDesign.cpp index 0d7d524e7b..8c77696a15 100644 --- a/src/openrct2/ride/TrackDesign.cpp +++ b/src/openrct2/ride/TrackDesign.cpp @@ -208,8 +208,8 @@ static rct_track_td6* track_design_open_from_td4(uint8_t* src, size_t srcLength) for (int32_t i = 0; i < RCT1_MAX_TRAINS_PER_RIDE; i++) { // RCT1 had no third colour - RCT1::RCT1VehicleColourSchemeCopyDescriptor colourSchemeCopyDescriptor - = RCT1::GetColourSchemeCopyDescriptor(td4->vehicle_type); + RCT1::RCT1VehicleColourSchemeCopyDescriptor colourSchemeCopyDescriptor = RCT1::GetColourSchemeCopyDescriptor( + td4->vehicle_type); if (colourSchemeCopyDescriptor.colour1 == COPY_COLOUR_1) { td6->vehicle_colours[i].body_colour = RCT1::GetColour(td4->vehicle_colours[i].body_colour); @@ -695,8 +695,8 @@ static void track_design_update_max_min_coordinates(int16_t x, int16_t y, int16_ * * rct2: 0x006D0964 */ -static int32_t - track_design_place_scenery(rct_td6_scenery_element* scenery_start, int32_t originX, int32_t originY, int32_t originZ) +static int32_t track_design_place_scenery( + rct_td6_scenery_element* scenery_start, int32_t originX, int32_t originY, int32_t originZ) { for (uint8_t mode = 0; mode <= 1; mode++) { @@ -1395,8 +1395,8 @@ static int32_t track_design_place_maze(rct_track_td6* td6, int16_t x, int16_t y, static bool track_design_place_ride(rct_track_td6* td6, int16_t x, int16_t y, int16_t z, uint8_t rideIndex) { - const rct_preview_track** trackBlockArray - = (ride_type_has_flag(td6->type, RIDE_TYPE_FLAG_HAS_TRACK)) ? TrackBlocks : FlatRideTrackBlocks; + const rct_preview_track** trackBlockArray = (ride_type_has_flag(td6->type, RIDE_TYPE_FLAG_HAS_TRACK)) ? TrackBlocks + : FlatRideTrackBlocks; gTrackPreviewOrigin.x = x; gTrackPreviewOrigin.y = y; diff --git a/src/openrct2/ride/TrackDesignSave.cpp b/src/openrct2/ride/TrackDesignSave.cpp index 0a565f72ba..dddff86ed5 100644 --- a/src/openrct2/ride/TrackDesignSave.cpp +++ b/src/openrct2/ride/TrackDesignSave.cpp @@ -455,8 +455,8 @@ static void track_design_save_pop_tile_element(int32_t x, int32_t y, rct_tile_el * * rct2: 0x006D2FDD */ -static void - track_design_save_pop_tile_element_desc(const rct_object_entry* entry, int32_t x, int32_t y, int32_t z, uint8_t flags) +static void track_design_save_pop_tile_element_desc( + const rct_object_entry* entry, int32_t x, int32_t y, int32_t z, uint8_t flags) { size_t removeIndex = SIZE_MAX; for (size_t i = 0; i < _trackSavedTileElementsDescCount; i++) @@ -1095,8 +1095,8 @@ static bool track_design_save_to_td6_for_tracked_ride(uint8_t rideIndex, rct_tra } } while (trackElement.element != initialMap); - td6->track_elements - = (rct_td6_track_element*)realloc(td6->track_elements, numTrackElements * sizeof(rct_td6_track_element) + 1); + td6->track_elements = (rct_td6_track_element*)realloc( + td6->track_elements, numTrackElements * sizeof(rct_td6_track_element) + 1); *((uint8_t*)&td6->track_elements[numTrackElements]) = 0xFF; size_t numEntranceElements = 0; diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index 0b46d48a26..f88b1b9d8e 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -374,8 +374,8 @@ static void track_paint_util_draw_station_impl( } else { - imageId - = (hasFence ? SPR_STATION_PLATFORM_FENCED_END_RED_LIGHT_SW_NE : SPR_STATION_PLATFORM_END_RED_LIGHT_SW_NE) + imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_END_RED_LIGHT_SW_NE + : SPR_STATION_PLATFORM_END_RED_LIGHT_SW_NE) | session->TrackColours[SCHEME_SUPPORTS]; } } @@ -469,8 +469,8 @@ static void track_paint_util_draw_station_impl( } else { - imageId - = (hasFence ? SPR_STATION_PLATFORM_FENCED_END_RED_LIGHT_NW_SE : SPR_STATION_PLATFORM_END_RED_LIGHT_NW_SE) + imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_END_RED_LIGHT_NW_SE + : SPR_STATION_PLATFORM_END_RED_LIGHT_NW_SE) | session->TrackColours[SCHEME_SUPPORTS]; } } @@ -583,8 +583,8 @@ void track_paint_util_draw_station_inverted( } else { - imageId - = (hasFence ? SPR_STATION_PLATFORM_FENCED_END_RED_LIGHT_SW_NE : SPR_STATION_PLATFORM_END_RED_LIGHT_SW_NE) + imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_END_RED_LIGHT_SW_NE + : SPR_STATION_PLATFORM_END_RED_LIGHT_SW_NE) | session->TrackColours[SCHEME_SUPPORTS]; } } @@ -678,8 +678,8 @@ void track_paint_util_draw_station_inverted( } else { - imageId - = (hasFence ? SPR_STATION_PLATFORM_FENCED_END_RED_LIGHT_NW_SE : SPR_STATION_PLATFORM_END_RED_LIGHT_NW_SE) + imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_END_RED_LIGHT_NW_SE + : SPR_STATION_PLATFORM_END_RED_LIGHT_NW_SE) | session->TrackColours[SCHEME_SUPPORTS]; } } @@ -943,8 +943,8 @@ void track_paint_util_draw_pier( if (direction & 1) { hasFence = track_paint_util_has_fence(EDGE_NE, position, tileElement, ride, session->CurrentRotation); - imageId - = (hasFence ? SPR_STATION_PIER_EDGE_NE_FENCED : SPR_STATION_PIER_EDGE_NE) | session->TrackColours[SCHEME_SUPPORTS]; + imageId = (hasFence ? SPR_STATION_PIER_EDGE_NE_FENCED : SPR_STATION_PIER_EDGE_NE) + | session->TrackColours[SCHEME_SUPPORTS]; sub_98197C(session, imageId, 0, 0, 6, 32, 1, height, 2, 0, height); track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, entranceStyle, height); @@ -962,8 +962,8 @@ void track_paint_util_draw_pier( else { hasFence = track_paint_util_has_fence(EDGE_NW, position, tileElement, ride, rotation); - imageId - = (hasFence ? SPR_STATION_PIER_EDGE_NW_FENCED : SPR_STATION_PIER_EDGE_NW) | session->TrackColours[SCHEME_SUPPORTS]; + imageId = (hasFence ? SPR_STATION_PIER_EDGE_NW_FENCED : SPR_STATION_PIER_EDGE_NW) + | session->TrackColours[SCHEME_SUPPORTS]; sub_98197C(session, imageId, 0, 0, 32, 6, 1, height, 0, 2, height); track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, entranceStyle, height); diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index 6b8d595376..d48376cd22 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -1380,8 +1380,8 @@ static bool vehicle_close_restraints(rct_vehicle* vehicle) ride_breakdown_add_news_item(vehicle->ride); - ride->window_invalidate_flags - |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST | RIDE_INVALIDATE_RIDE_MAINTENANCE; + ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST + | RIDE_INVALIDATE_RIDE_MAINTENANCE; ride->mechanic_status = RIDE_MECHANIC_STATUS_CALLING; @@ -1487,8 +1487,8 @@ static bool vehicle_open_restraints(rct_vehicle* vehicle) ride_breakdown_add_news_item(vehicle->ride); - ride->window_invalidate_flags - |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST | RIDE_INVALIDATE_RIDE_MAINTENANCE; + ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST + | RIDE_INVALIDATE_RIDE_MAINTENANCE; ride->mechanic_status = RIDE_MECHANIC_STATUS_CALLING; @@ -1663,8 +1663,8 @@ static void vehicle_update_measurements(rct_vehicle* vehicle) } else if (testing_flags & RIDE_TESTING_TURN_RIGHT || testing_flags & RIDE_TESTING_TURN_LEFT) { - ride->testing_flags - &= ~(RIDE_TESTING_TURN_LEFT | RIDE_TESTING_TURN_RIGHT | RIDE_TESTING_TURN_BANKED | RIDE_TESTING_TURN_SLOPED); + ride->testing_flags &= ~( + RIDE_TESTING_TURN_LEFT | RIDE_TESTING_TURN_RIGHT | RIDE_TESTING_TURN_BANKED | RIDE_TESTING_TURN_SLOPED); uint8_t turn_type = 1; if (!(testing_flags & RIDE_TESTING_TURN_BANKED)) @@ -3133,8 +3133,8 @@ void vehicle_test_reset(rct_vehicle* vehicle) static bool vehicle_next_tower_element_is_top(rct_vehicle* vehicle) { - rct_tile_element* tileElement - = map_get_track_element_at_of_type(vehicle->track_x, vehicle->track_y, vehicle->track_z / 8, vehicle->track_type >> 2); + rct_tile_element* tileElement = map_get_track_element_at_of_type( + vehicle->track_x, vehicle->track_y, vehicle->track_z / 8, vehicle->track_type >> 2); if (tileElement->flags & TILE_ELEMENT_FLAG_LAST_TILE) { @@ -3172,9 +3172,10 @@ static void vehicle_update_travelling_boat_hire_setup(rct_vehicle* vehicle) vehicle->track_x = vehicle->x & 0xFFE0; vehicle->track_y = vehicle->y & 0xFFE0; - LocationXY8 location - = { static_cast((vehicle->track_x + CoordsDirectionDelta[vehicle->sprite_direction >> 3].x) / 32), - static_cast((vehicle->track_y + CoordsDirectionDelta[vehicle->sprite_direction >> 3].y) / 32) }; + LocationXY8 location = { + static_cast((vehicle->track_x + CoordsDirectionDelta[vehicle->sprite_direction >> 3].x) / 32), + static_cast((vehicle->track_y + CoordsDirectionDelta[vehicle->sprite_direction >> 3].y) / 32) + }; vehicle->boat_location = location; vehicle->var_35 = 0; @@ -3225,8 +3226,8 @@ static void vehicle_update_departing(rct_vehicle* vehicle) ride->lifecycle_flags |= RIDE_LIFECYCLE_BROKEN_DOWN; ride_breakdown_add_news_item(vehicle->ride); - ride->window_invalidate_flags - |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST | RIDE_INVALIDATE_RIDE_MAINTENANCE; + ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST + | RIDE_INVALIDATE_RIDE_MAINTENANCE; ride->mechanic_status = RIDE_MECHANIC_STATUS_CALLING; ride->inspection_station = vehicle->current_station; ride->breakdown_reason = ride->breakdown_reason_pending; @@ -4202,8 +4203,8 @@ static void vehicle_update_travelling_cable_lift(rct_vehicle* vehicle) ride->lifecycle_flags |= RIDE_LIFECYCLE_BROKEN_DOWN; ride_breakdown_add_news_item(vehicle->ride); - ride->window_invalidate_flags - |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST | RIDE_INVALIDATE_RIDE_MAINTENANCE; + ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST + | RIDE_INVALIDATE_RIDE_MAINTENANCE; ride->mechanic_status = RIDE_MECHANIC_STATUS_CALLING; ride->inspection_station = vehicle->current_station; @@ -6674,8 +6675,8 @@ static void check_and_apply_block_section_stop_site(rct_vehicle* vehicle) int32_t trackType = vehicle->track_type >> 2; - rct_tile_element* trackElement - = map_get_track_element_at_of_type(vehicle->track_x, vehicle->track_y, vehicle->track_z >> 3, trackType); + rct_tile_element* trackElement = map_get_track_element_at_of_type( + vehicle->track_x, vehicle->track_y, vehicle->track_z >> 3, trackType); if (trackElement == nullptr) { @@ -7096,27 +7097,28 @@ enum R9_SPIN }; -static const uint8_t TrackTypeToSpinFunction[256] - = { NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, - NO_SPIN, NO_SPIN, NO_SPIN, L8_SPIN, R8_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, L8_SPIN, R8_SPIN, NO_SPIN, NO_SPIN, - NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, L8_SPIN, R8_SPIN, L8_SPIN, R8_SPIN, LR_SPIN, - RL_SPIN, NO_SPIN, NO_SPIN, L7_SPIN, R7_SPIN, L7_SPIN, R7_SPIN, L7_SPIN, R7_SPIN, L7_SPIN, R7_SPIN, L5_SPIN, R5_SPIN, - NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, - NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, - NO_SPIN, NO_SPIN, NO_SPIN, L8_SPIN, R8_SPIN, LR_SPIN, RL_SPIN, L7_SPIN, R7_SPIN, L7_SPIN, R7_SPIN, L7_SPIN, R7_SPIN, - L8_SPIN, R8_SPIN, L8_SPIN, R8_SPIN, L5_SPIN, R5_SPIN, L5_SPIN, R5_SPIN, NO_SPIN, RC_SPIN, NO_SPIN, L8_SPIN, R8_SPIN, - L8_SPIN, R8_SPIN, L8_SPIN, R8_SPIN, L8_SPIN, R8_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, SP_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, - NO_SPIN, NO_SPIN, NO_SPIN, R5_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, - NO_SPIN, NO_SPIN, NO_SPIN, L9_SPIN, R9_SPIN, L9_SPIN, R9_SPIN, L9_SPIN, R9_SPIN, L9_SPIN, R9_SPIN, NO_SPIN, NO_SPIN, - NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, - NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, - NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, L7_SPIN, R7_SPIN, L7_SPIN, R7_SPIN, - NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, - NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, - NO_SPIN, L7_SPIN, R7_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, L7_SPIN, R7_SPIN, L7_SPIN, R7_SPIN, - L8_SPIN, R8_SPIN, L8_SPIN, R8_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, - NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, - NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN }; +static const uint8_t TrackTypeToSpinFunction[256] = { + NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, + NO_SPIN, NO_SPIN, NO_SPIN, L8_SPIN, R8_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, L8_SPIN, R8_SPIN, NO_SPIN, NO_SPIN, + NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, L8_SPIN, R8_SPIN, L8_SPIN, R8_SPIN, LR_SPIN, + RL_SPIN, NO_SPIN, NO_SPIN, L7_SPIN, R7_SPIN, L7_SPIN, R7_SPIN, L7_SPIN, R7_SPIN, L7_SPIN, R7_SPIN, L5_SPIN, R5_SPIN, + NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, + NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, + NO_SPIN, NO_SPIN, NO_SPIN, L8_SPIN, R8_SPIN, LR_SPIN, RL_SPIN, L7_SPIN, R7_SPIN, L7_SPIN, R7_SPIN, L7_SPIN, R7_SPIN, + L8_SPIN, R8_SPIN, L8_SPIN, R8_SPIN, L5_SPIN, R5_SPIN, L5_SPIN, R5_SPIN, NO_SPIN, RC_SPIN, NO_SPIN, L8_SPIN, R8_SPIN, + L8_SPIN, R8_SPIN, L8_SPIN, R8_SPIN, L8_SPIN, R8_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, SP_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, + NO_SPIN, NO_SPIN, NO_SPIN, R5_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, + NO_SPIN, NO_SPIN, NO_SPIN, L9_SPIN, R9_SPIN, L9_SPIN, R9_SPIN, L9_SPIN, R9_SPIN, L9_SPIN, R9_SPIN, NO_SPIN, NO_SPIN, + NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, + NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, + NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, L7_SPIN, R7_SPIN, L7_SPIN, R7_SPIN, + NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, + NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, + NO_SPIN, L7_SPIN, R7_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, L7_SPIN, R7_SPIN, L7_SPIN, R7_SPIN, + L8_SPIN, R8_SPIN, L8_SPIN, R8_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, + NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, + NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN +}; #pragma endregion @@ -7887,8 +7889,8 @@ static void sub_6DBF3E(rct_vehicle* vehicle) rct_tile_element* tileElement = nullptr; if (map_is_location_valid({ vehicle->track_x, vehicle->track_y })) { - tileElement - = map_get_track_element_at_of_type_seq(vehicle->track_x, vehicle->track_y, vehicle->track_z >> 3, trackType, 0); + tileElement = map_get_track_element_at_of_type_seq( + vehicle->track_x, vehicle->track_y, vehicle->track_z >> 3, trackType, 0); } if (tileElement == nullptr) @@ -7966,8 +7968,8 @@ static bool vehicle_update_track_motion_forwards_get_new_track( _vehicleVAngleEndF64E36 = TrackDefinitions[trackType].vangle_end; _vehicleBankEndF64E37 = TrackDefinitions[trackType].bank_end; - rct_tile_element* tileElement - = map_get_track_element_at_of_type_seq(vehicle->track_x, vehicle->track_y, vehicle->track_z >> 3, trackType, 0); + rct_tile_element* tileElement = map_get_track_element_at_of_type_seq( + vehicle->track_x, vehicle->track_y, vehicle->track_z >> 3, trackType, 0); if (tileElement == nullptr) { @@ -8302,8 +8304,8 @@ loc_6DAEB9: { vehicle_reverse_reverser_car(vehicle); - const rct_vehicle_info* moveInfo2 - = vehicle_get_move_info(vehicle->var_CD, vehicle->track_type, vehicle->track_progress); + const rct_vehicle_info* moveInfo2 = vehicle_get_move_info( + vehicle->var_CD, vehicle->track_type, vehicle->track_progress); x = vehicle->x + moveInfo2->x; y = vehicle->y + moveInfo2->y; } @@ -8403,8 +8405,8 @@ static bool vehicle_update_track_motion_backwards_get_new_track( { _vehicleVAngleEndF64E36 = TrackDefinitions[trackType].vangle_start; _vehicleBankEndF64E37 = TrackDefinitions[trackType].bank_start; - rct_tile_element* tileElement - = map_get_track_element_at_of_type_seq(vehicle->track_x, vehicle->track_y, vehicle->track_z >> 3, trackType, 0); + rct_tile_element* tileElement = map_get_track_element_at_of_type_seq( + vehicle->track_x, vehicle->track_y, vehicle->track_z >> 3, trackType, 0); if (tileElement == nullptr) return false; @@ -8450,8 +8452,8 @@ static bool vehicle_update_track_motion_backwards_get_new_track( return false; } - bool isInverted - = ((vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) > 0) ^ track_element_is_inverted(tileElement); + bool isInverted = ((vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) > 0) + ^ track_element_is_inverted(tileElement); int32_t bank = TrackDefinitions[trackType].bank_end; bank = track_get_actual_bank_2(ride->type, isInverted, bank); int32_t vAngle = TrackDefinitions[trackType].vangle_end; @@ -8865,8 +8867,8 @@ loc_6DC476: uint16_t trackType = vehicle->track_type >> 2; _vehicleVAngleEndF64E36 = TrackDefinitions[trackType].vangle_end; _vehicleBankEndF64E37 = TrackDefinitions[trackType].bank_end; - tileElement - = map_get_track_element_at_of_type_seq(vehicle->track_x, vehicle->track_y, vehicle->track_z >> 3, trackType, 0); + tileElement = map_get_track_element_at_of_type_seq( + vehicle->track_x, vehicle->track_y, vehicle->track_z >> 3, trackType, 0); } int16_t x, y, z; int32_t direction; @@ -9122,8 +9124,8 @@ loc_6DCA9A: _vehicleVAngleEndF64E36 = TrackDefinitions[trackType].vangle_end; _vehicleBankEndF64E37 = TrackDefinitions[trackType].bank_end; - tileElement - = map_get_track_element_at_of_type_seq(vehicle->track_x, vehicle->track_y, vehicle->track_z >> 3, trackType, 0); + tileElement = map_get_track_element_at_of_type_seq( + vehicle->track_x, vehicle->track_y, vehicle->track_z >> 3, trackType, 0); } { track_begin_end trackBeginEnd; @@ -9938,8 +9940,8 @@ void vehicle_update_crossings(const rct_vehicle* vehicle) while (true) { - rct_tile_element* tileElement - = map_get_path_element_at(xyElement.x / 32, xyElement.y / 32, xyElement.element->base_height); + rct_tile_element* tileElement = map_get_path_element_at( + xyElement.x / 32, xyElement.y / 32, xyElement.element->base_height); if (tileElement) { @@ -10011,8 +10013,8 @@ void vehicle_update_crossings(const rct_vehicle* vehicle) } } - rct_tile_element* tileElement - = map_get_path_element_at(xyElement.x / 32, xyElement.y / 32, xyElement.element->base_height); + rct_tile_element* tileElement = map_get_path_element_at( + xyElement.x / 32, xyElement.y / 32, xyElement.element->base_height); if (tileElement) { tileElement->flags &= ~TILE_ELEMENT_FLAG_BLOCKED_BY_VEHICLE; diff --git a/src/openrct2/ride/Vehicle.h b/src/openrct2/ride/Vehicle.h index 2835f6b991..0374840a73 100644 --- a/src/openrct2/ride/Vehicle.h +++ b/src/openrct2/ride/Vehicle.h @@ -293,8 +293,8 @@ enum : uint32_t VEHICLE_ENTRY_FLAG_25 = 1 << 25, VEHICLE_ENTRY_FLAG_LOADING_WAYPOINTS = 1 << 26, // Peep loading positions have x and y coordinates. Normal rides just have offsets - VEHICLE_ENTRY_FLAG_SLIDE_SWING - = 1 << 27, // Set on dingy slides. They have there own swing value calculations and have a different amount of images. + VEHICLE_ENTRY_FLAG_SLIDE_SWING = 1 + << 27, // Set on dingy slides. They have there own swing value calculations and have a different amount of images. VEHICLE_ENTRY_FLAG_CHAIRLIFT = 1 << 28, VEHICLE_ENTRY_FLAG_WATER_RIDE = 1 << 29, // Set on rides where water would provide continuous propulsion VEHICLE_ENTRY_FLAG_GO_KART = 1 << 30, diff --git a/src/openrct2/ride/VehiclePaint.cpp b/src/openrct2/ride/VehiclePaint.cpp index e3c7371cf5..cebc099d50 100644 --- a/src/openrct2/ride/VehiclePaint.cpp +++ b/src/openrct2/ride/VehiclePaint.cpp @@ -910,8 +910,8 @@ static void vehicle_sprite_paint( { baseImage_id += vehicle->animation_frame; } - int32_t image_id - = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | IMAGE_TYPE_REMAP_2_PLUS; + int32_t image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) + | IMAGE_TYPE_REMAP_2_PLUS; paint_struct* ps = sub_98197C( session, image_id, 0, 0, bb.length_x, bb.length_y, bb.length_z, z, bb.offset_x, bb.offset_y, bb.offset_z + z); if (ps != nullptr) @@ -1588,8 +1588,8 @@ static void vehicle_sprite_1_4( if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_WHILE_BANKED_TRANSITIONS) { int32_t ecx = imageDirection / 2; - int32_t ebx - = (((imageDirection / 8) + 4) * vehicleEntry->base_num_frames) + vehicleEntry->flat_bank_to_gentle_slope_image_id; + int32_t ebx = (((imageDirection / 8) + 4) * vehicleEntry->base_num_frames) + + vehicleEntry->flat_bank_to_gentle_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1762,8 +1762,8 @@ static void vehicle_sprite_2_3( if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TRANSITIONS) { int32_t ecx = (imageDirection / 2) + 16; - int32_t ebx - = (((imageDirection / 8) + 4) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_to_bank_image_id; + int32_t ebx = (((imageDirection / 8) + 4) * vehicleEntry->base_num_frames) + + vehicleEntry->gentle_slope_to_bank_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1786,15 +1786,15 @@ static void vehicle_sprite_2_4( if (vehicleEntry->draw_order < 5) { ecx = (ecx ^ 8) + 108; - int32_t ebx - = ((imageDirection + 32) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; + int32_t ebx = ((imageDirection + 32) * vehicleEntry->base_num_frames) + + vehicleEntry->gentle_slope_bank_turn_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else { ecx += 16; - int32_t ebx - = ((imageDirection + 32) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; + int32_t ebx = ((imageDirection + 32) * vehicleEntry->base_num_frames) + + vehicleEntry->gentle_slope_bank_turn_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } } @@ -1969,8 +1969,8 @@ static void vehicle_sprite_5_2( if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_WHILE_BANKED_TRANSITIONS) { int32_t ecx = imageDirection / 2; - int32_t ebx - = (((imageDirection / 8) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->flat_bank_to_gentle_slope_image_id; + int32_t ebx = (((imageDirection / 8) + 8) * vehicleEntry->base_num_frames) + + vehicleEntry->flat_bank_to_gentle_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2010,8 +2010,8 @@ static void vehicle_sprite_5_4( if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_WHILE_BANKED_TRANSITIONS) { int32_t ecx = imageDirection / 2; - int32_t ebx - = (((imageDirection / 8) + 12) * vehicleEntry->base_num_frames) + vehicleEntry->flat_bank_to_gentle_slope_image_id; + int32_t ebx = (((imageDirection / 8) + 12) * vehicleEntry->base_num_frames) + + vehicleEntry->flat_bank_to_gentle_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2134,8 +2134,8 @@ static void vehicle_sprite_6_1( if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TRANSITIONS) { int32_t ecx = ((imageDirection / 2) ^ 8) + 16; - int32_t ebx - = (((imageDirection / 8) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_to_bank_image_id; + int32_t ebx = (((imageDirection / 8) + 8) * vehicleEntry->base_num_frames) + + vehicleEntry->gentle_slope_to_bank_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2158,15 +2158,15 @@ static void vehicle_sprite_6_2( if (vehicleEntry->draw_order < 5) { ecx += 108; - int32_t ebx - = ((imageDirection + 64) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; + int32_t ebx = ((imageDirection + 64) * vehicleEntry->base_num_frames) + + vehicleEntry->gentle_slope_bank_turn_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else { ecx = (ecx ^ 8) + 16; - int32_t ebx - = ((imageDirection + 64) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; + int32_t ebx = ((imageDirection + 64) * vehicleEntry->base_num_frames) + + vehicleEntry->gentle_slope_bank_turn_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } } @@ -2187,8 +2187,8 @@ static void vehicle_sprite_6_3( if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TRANSITIONS) { int32_t ecx = ((imageDirection / 2) ^ 8) + 16; - int32_t ebx - = (((imageDirection / 8) + 12) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_to_bank_image_id; + int32_t ebx = (((imageDirection / 8) + 12) * vehicleEntry->base_num_frames) + + vehicleEntry->gentle_slope_to_bank_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2211,15 +2211,15 @@ static void vehicle_sprite_6_4( if (vehicleEntry->draw_order < 5) { ecx = (ecx ^ 8) + 108; - int32_t ebx - = ((imageDirection + 96) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; + int32_t ebx = ((imageDirection + 96) * vehicleEntry->base_num_frames) + + vehicleEntry->gentle_slope_bank_turn_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else { ecx = (ecx ^ 8) + 16; - int32_t ebx - = ((imageDirection + 96) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; + int32_t ebx = ((imageDirection + 96) * vehicleEntry->base_num_frames) + + vehicleEntry->gentle_slope_bank_turn_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } } @@ -2736,8 +2736,8 @@ static void vehicle_sprite_50_1( if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_GENTLE_SLOPE_BANKED_TRANSITIONS) { int32_t ecx = imageDirection / 2; - int32_t ebx - = ((imageDirection / 8) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_to_gentle_slope_bank_image_id; + int32_t ebx = ((imageDirection / 8) * vehicleEntry->base_num_frames) + + vehicleEntry->diagonal_to_gentle_slope_bank_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -3226,8 +3226,8 @@ static void vehicle_visual_splash1_effect(paint_session* session, int32_t z, con { return; } - int32_t image_id - = 29014 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8) + ((gCurrentTicks / 2) & 7); + int32_t image_id = 29014 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8) + + ((gCurrentTicks / 2) & 7); sub_98199C(session, image_id, 0, 0, 0, 0, 0, z, 0, 0, z); } @@ -3249,8 +3249,8 @@ static void vehicle_visual_splash2_effect(paint_session* session, int32_t z, con { return; } - int32_t image_id - = 29046 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8) + ((gCurrentTicks / 2) & 7); + int32_t image_id = 29046 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8) + + ((gCurrentTicks / 2) & 7); sub_98199C(session, image_id, 0, 0, 0, 0, 0, z, 0, 0, z); } @@ -3272,8 +3272,8 @@ static void vehicle_visual_splash3_effect(paint_session* session, int32_t z, con { return; } - int32_t image_id - = 29014 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8) + ((gCurrentTicks / 2) & 7); + int32_t image_id = 29014 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8) + + ((gCurrentTicks / 2) & 7); sub_98199C(session, image_id, 0, 0, 0, 0, 0, z, 0, 0, z); } @@ -3296,8 +3296,8 @@ static void vehicle_visual_splash4_effect(paint_session* session, int32_t z, con { return; } - int32_t image_id - = 29078 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8) + ((gCurrentTicks / 2) & 7); + int32_t image_id = 29078 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8) + + ((gCurrentTicks / 2) & 7); sub_98199C(session, image_id, 0, 0, 1, 1, 0, z, 0, 0, z); } @@ -3324,8 +3324,8 @@ static void vehicle_visual_splash5_effect(paint_session* session, int32_t z, con { return; } - int32_t image_id - = 29078 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8) + ((gCurrentTicks / 2) & 7); + int32_t image_id = 29078 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8) + + ((gCurrentTicks / 2) & 7); sub_98199C(session, image_id, 0, 0, 1, 1, 0, z, 0, 0, z); } diff --git a/src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp b/src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp index 81f48b2c22..67e77bc61a 100644 --- a/src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp +++ b/src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp @@ -261,35 +261,36 @@ static void air_powered_vertical_rc_track_right_quarter_turn_5( int32_t height, const rct_tile_element* tileElement) { - static constexpr const sprite_bb imageIds[4][5] - = { { - { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_SW_SE_PART_0, { 0, 2, 0 }, { 0, 0, 0 }, { 32, 32, 2 } }, - { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_SW_SE_PART_1, { 0, 16, 0 }, { 0, 0, 0 }, { 32, 16, 2 } }, - { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_SW_SE_PART_2, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 16, 2 } }, - { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_SW_SE_PART_3, { 16, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 } }, - { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_SW_SE_PART_4, { 2, 0, 0 }, { 0, 0, 0 }, { 32, 32, 2 } }, - }, - { - { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_NW_SW_PART_0, { 2, 0, 0 }, { 0, 0, 0 }, { 32, 32, 2 } }, - { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_NW_SW_PART_1, { 16, 0, 0 }, { 0, 0, 0 }, { 16, 34, 2 } }, - { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_NW_SW_PART_2, { 0, 16, 0 }, { 0, 0, 0 }, { 16, 16, 2 } }, - { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_NW_SW_PART_3, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 2 } }, - { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_NW_SW_PART_4, { 0, 2, 0 }, { 0, 0, 0 }, { 32, 27, 2 } }, - }, - { - { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_NE_NW_PART_0, { 0, 2, 0 }, { 0, 0, 0 }, { 32, 27, 2 } }, - { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 2 } }, - { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_NE_NW_PART_2, { 16, 16, 0 }, { 0, 0, 0 }, { 16, 16, 2 } }, - { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_NE_NW_PART_3, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 } }, - { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_NE_NW_PART_4, { 2, 0, 0 }, { 0, 0, 0 }, { 27, 32, 2 } }, - }, - { - { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_SE_NE_PART_0, { 2, 0, 0 }, { 0, 0, 0 }, { 27, 32, 2 } }, - { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_SE_NE_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 } }, - { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_SE_NE_PART_2, { 16, 0, 0 }, { 0, 0, 0 }, { 16, 16, 2 } }, - { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_SE_NE_PART_3, { 0, 16, 0 }, { 0, 0, 0 }, { 32, 16, 2 } }, - { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_SE_NE_PART_4, { 0, 2, 0 }, { 0, 0, 0 }, { 32, 32, 2 } }, - } }; + static constexpr const sprite_bb imageIds[4][5] = { + { + { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_SW_SE_PART_0, { 0, 2, 0 }, { 0, 0, 0 }, { 32, 32, 2 } }, + { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_SW_SE_PART_1, { 0, 16, 0 }, { 0, 0, 0 }, { 32, 16, 2 } }, + { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_SW_SE_PART_2, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 16, 2 } }, + { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_SW_SE_PART_3, { 16, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 } }, + { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_SW_SE_PART_4, { 2, 0, 0 }, { 0, 0, 0 }, { 32, 32, 2 } }, + }, + { + { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_NW_SW_PART_0, { 2, 0, 0 }, { 0, 0, 0 }, { 32, 32, 2 } }, + { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_NW_SW_PART_1, { 16, 0, 0 }, { 0, 0, 0 }, { 16, 34, 2 } }, + { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_NW_SW_PART_2, { 0, 16, 0 }, { 0, 0, 0 }, { 16, 16, 2 } }, + { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_NW_SW_PART_3, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 2 } }, + { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_NW_SW_PART_4, { 0, 2, 0 }, { 0, 0, 0 }, { 32, 27, 2 } }, + }, + { + { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_NE_NW_PART_0, { 0, 2, 0 }, { 0, 0, 0 }, { 32, 27, 2 } }, + { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 2 } }, + { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_NE_NW_PART_2, { 16, 16, 0 }, { 0, 0, 0 }, { 16, 16, 2 } }, + { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_NE_NW_PART_3, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 } }, + { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_NE_NW_PART_4, { 2, 0, 0 }, { 0, 0, 0 }, { 27, 32, 2 } }, + }, + { + { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_SE_NE_PART_0, { 2, 0, 0 }, { 0, 0, 0 }, { 27, 32, 2 } }, + { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_SE_NE_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 } }, + { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_SE_NE_PART_2, { 16, 0, 0 }, { 0, 0, 0 }, { 16, 16, 2 } }, + { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_SE_NE_PART_3, { 0, 16, 0 }, { 0, 0, 0 }, { 32, 16, 2 } }, + { SPR_AIR_POWERED_VERTICAL_RC_QUARTER_TURN_5_SE_NE_PART_4, { 0, 2, 0 }, { 0, 0, 0 }, { 32, 32, 2 } }, + } + }; track_paint_util_right_quarter_turn_5_tiles_paint_3( session, height, direction, trackSequence, session->TrackColours[SCHEME_TRACK], imageIds); @@ -454,49 +455,50 @@ static void air_powered_vertical_rc_track_banked_right_quarter_turn_5( int32_t height, const rct_tile_element* tileElement) { - static constexpr const sprite_bb imageIds[4][5] - = { { - { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_SW_SE_PART_0, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 3 } }, - { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_SW_SE_PART_1, { 0, 0, 0 }, { 0, 16, 0 }, { 32, 16, 3 } }, - { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_SW_SE_PART_2, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 16, 3 } }, - { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_SW_SE_PART_3, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 32, 3 } }, - { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_SW_SE_PART_4, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 3 } }, - }, - { - { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_NW_SW_PART_0, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 3 } }, - { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_NW_SW_PART_1, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 32, 3 } }, - { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_NW_SW_PART_2, { 0, 0, 0 }, { 0, 16, 0 }, { 16, 16, 3 } }, - { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_NW_SW_PART_3, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 3 } }, - { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_NW_SW_PART_4, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 3 } }, - }, - { - { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_NE_NW_PART_0, { 0, 0, 0 }, { 0, 27, 0 }, { 32, 1, 26 } }, - { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 27 }, { 32, 16, 1 } }, - { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_NE_NW_PART_2, { 0, 0, 0 }, { 16, 16, 27 }, { 16, 16, 1 } }, - { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_NE_NW_PART_3, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 32, 1 } }, - { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_NE_NW_PART_4, { 0, 0, 0 }, { 27, 0, 0 }, { 1, 32, 26 } }, - }, - { - { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_SE_NE_PART_0, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 3 } }, - { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_SE_NE_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 3 } }, - { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_SE_NE_PART_2, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 16, 3 } }, - { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_SE_NE_PART_3, { 0, 0, 0 }, { 0, 16, 0 }, { 32, 16, 3 } }, - { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_SE_NE_PART_4, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 3 } }, - } }; + static constexpr const sprite_bb imageIds[4][5] = { + { + { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_SW_SE_PART_0, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 3 } }, + { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_SW_SE_PART_1, { 0, 0, 0 }, { 0, 16, 0 }, { 32, 16, 3 } }, + { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_SW_SE_PART_2, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 16, 3 } }, + { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_SW_SE_PART_3, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 32, 3 } }, + { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_SW_SE_PART_4, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 3 } }, + }, + { + { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_NW_SW_PART_0, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 3 } }, + { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_NW_SW_PART_1, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 32, 3 } }, + { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_NW_SW_PART_2, { 0, 0, 0 }, { 0, 16, 0 }, { 16, 16, 3 } }, + { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_NW_SW_PART_3, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 3 } }, + { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_NW_SW_PART_4, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 3 } }, + }, + { + { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_NE_NW_PART_0, { 0, 0, 0 }, { 0, 27, 0 }, { 32, 1, 26 } }, + { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 27 }, { 32, 16, 1 } }, + { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_NE_NW_PART_2, { 0, 0, 0 }, { 16, 16, 27 }, { 16, 16, 1 } }, + { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_NE_NW_PART_3, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 32, 1 } }, + { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_NE_NW_PART_4, { 0, 0, 0 }, { 27, 0, 0 }, { 1, 32, 26 } }, + }, + { + { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_SE_NE_PART_0, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 3 } }, + { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_SE_NE_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 3 } }, + { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_SE_NE_PART_2, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 16, 3 } }, + { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_SE_NE_PART_3, { 0, 0, 0 }, { 0, 16, 0 }, { 32, 16, 3 } }, + { SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_SE_NE_PART_4, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 3 } }, + } + }; track_paint_util_right_quarter_turn_5_tiles_paint_2( session, height, direction, trackSequence, session->TrackColours[SCHEME_TRACK], imageIds); if (direction == 1 && trackSequence == 6) { - uint32_t imageId - = SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_FRONT_NW_SW_PART_4 | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_FRONT_NW_SW_PART_4 + | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, 0, 0, 32, 1, 26, height, 0, 27, height); } else if (direction == 3 && trackSequence == 0) { - uint32_t imageId - = SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_FRONT_SE_NE_PART_0 | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_FRONT_SE_NE_PART_0 + | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, 0, 0, 1, 32, 26, height, 27, 0, height); } diff --git a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp index afff5092be..12ce77a7d0 100644 --- a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp @@ -719,163 +719,172 @@ static constexpr const uint32_t junior_rc_track_pieces_25_deg_up_to_flat[3][4] = }, }; -static constexpr const uint32_t junior_rc_track_pieces_flat_to_left_bank[4][2] - = { { SPR_JUNIOR_RC_FLAT_TO_LEFT_BANK_SW_NE, SPR_JUNIOR_RC_FLAT_TO_LEFT_BANK_SW_NE_FRONT }, - { SPR_JUNIOR_RC_FLAT_TO_LEFT_BANK_NW_SE, SPR_JUNIOR_RC_FLAT_TO_LEFT_BANK_NW_SE_FRONT }, - { SPR_JUNIOR_RC_FLAT_TO_LEFT_BANK_NE_SW, 0 }, - { SPR_JUNIOR_RC_FLAT_TO_LEFT_BANK_SE_NW, 0 } }; +static constexpr const uint32_t junior_rc_track_pieces_flat_to_left_bank[4][2] = { + { SPR_JUNIOR_RC_FLAT_TO_LEFT_BANK_SW_NE, SPR_JUNIOR_RC_FLAT_TO_LEFT_BANK_SW_NE_FRONT }, + { SPR_JUNIOR_RC_FLAT_TO_LEFT_BANK_NW_SE, SPR_JUNIOR_RC_FLAT_TO_LEFT_BANK_NW_SE_FRONT }, + { SPR_JUNIOR_RC_FLAT_TO_LEFT_BANK_NE_SW, 0 }, + { SPR_JUNIOR_RC_FLAT_TO_LEFT_BANK_SE_NW, 0 } +}; -static constexpr const uint32_t junior_rc_track_pieces_flat_to_right_bank[4][2] - = { { SPR_JUNIOR_RC_FLAT_TO_RIGHT_BANK_SW_NE, 0 }, - { SPR_JUNIOR_RC_FLAT_TO_RIGHT_BANK_NW_SE, 0 }, - { SPR_JUNIOR_RC_FLAT_TO_RIGHT_BANK_NE_SW, SPR_JUNIOR_RC_FLAT_TO_RIGHT_BANK_NE_SW_FRONT }, - { SPR_JUNIOR_RC_FLAT_TO_RIGHT_BANK_SE_NW, SPR_JUNIOR_RC_FLAT_TO_RIGHT_BANK_SE_NW_FRONT } }; +static constexpr const uint32_t junior_rc_track_pieces_flat_to_right_bank[4][2] = { + { SPR_JUNIOR_RC_FLAT_TO_RIGHT_BANK_SW_NE, 0 }, + { SPR_JUNIOR_RC_FLAT_TO_RIGHT_BANK_NW_SE, 0 }, + { SPR_JUNIOR_RC_FLAT_TO_RIGHT_BANK_NE_SW, SPR_JUNIOR_RC_FLAT_TO_RIGHT_BANK_NE_SW_FRONT }, + { SPR_JUNIOR_RC_FLAT_TO_RIGHT_BANK_SE_NW, SPR_JUNIOR_RC_FLAT_TO_RIGHT_BANK_SE_NW_FRONT } +}; -static constexpr const uint32_t junior_rc_track_pieces_flat_quarter_turn_5_tiles[4][5] - = { { - SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_0, - SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_1, - SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_2, - SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_3, - SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_4, - }, - { - SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_0, - SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_1, - SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_2, - SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_3, - SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_4, - }, - { - SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_0, - SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_1, - SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_2, - SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_3, - SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_4, - }, - { - SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_0, - SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_1, - SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_2, - SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_3, - SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_4, - } }; +static constexpr const uint32_t junior_rc_track_pieces_flat_quarter_turn_5_tiles[4][5] = { + { + SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_0, + SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_1, + SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_2, + SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_3, + SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_4, + }, + { + SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_0, + SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_1, + SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_2, + SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_3, + SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_4, + }, + { + SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_0, + SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_1, + SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_2, + SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_3, + SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_4, + }, + { + SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_0, + SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_1, + SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_2, + SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_3, + SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_4, + } +}; -static constexpr const uint32_t junior_rc_track_pieces_banked_quarter_turn_5_tiles[4][5] - = { { - SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SW_SE_PART_0, - SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SW_SE_PART_1, - SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SW_SE_PART_2, - SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SW_SE_PART_3, - SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SW_SE_PART_4, - }, - { - SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NW_SW_PART_0, - SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NW_SW_PART_1, - SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NW_SW_PART_2, - SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NW_SW_PART_3, - SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NW_SW_PART_4, - }, - { - SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NE_NW_PART_0, - SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NE_NW_PART_1, - SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NE_NW_PART_2, - SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NE_NW_PART_3, - SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NE_NW_PART_4, - }, - { - SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SE_NE_PART_0, - SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SE_NE_PART_1, - SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SE_NE_PART_2, - SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SE_NE_PART_3, - SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SE_NE_PART_4, - } }; +static constexpr const uint32_t junior_rc_track_pieces_banked_quarter_turn_5_tiles[4][5] = { + { + SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SW_SE_PART_0, + SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SW_SE_PART_1, + SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SW_SE_PART_2, + SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SW_SE_PART_3, + SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SW_SE_PART_4, + }, + { + SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NW_SW_PART_0, + SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NW_SW_PART_1, + SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NW_SW_PART_2, + SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NW_SW_PART_3, + SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NW_SW_PART_4, + }, + { + SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NE_NW_PART_0, + SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NE_NW_PART_1, + SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NE_NW_PART_2, + SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NE_NW_PART_3, + SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NE_NW_PART_4, + }, + { + SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SE_NE_PART_0, + SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SE_NE_PART_1, + SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SE_NE_PART_2, + SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SE_NE_PART_3, + SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SE_NE_PART_4, + } +}; -static constexpr const uint32_t junior_rc_track_pieces_left_banked_to_25_deg_up[4][2] - = { { SPR_JUNIOR_RC_LEFT_BANK_TO_25_DEG_UP_SW_NE, SPR_JUNIOR_RC_LEFT_BANK_TO_25_DEG_UP_SW_NE_FRONT }, - { SPR_JUNIOR_RC_LEFT_BANK_TO_25_DEG_UP_NW_SE, SPR_JUNIOR_RC_LEFT_BANK_TO_25_DEG_UP_NW_SE_FRONT }, - { SPR_JUNIOR_RC_LEFT_BANK_TO_25_DEG_UP_NE_SW, 0 }, - { SPR_JUNIOR_RC_LEFT_BANK_TO_25_DEG_UP_SE_NW, 0 } }; +static constexpr const uint32_t junior_rc_track_pieces_left_banked_to_25_deg_up[4][2] = { + { SPR_JUNIOR_RC_LEFT_BANK_TO_25_DEG_UP_SW_NE, SPR_JUNIOR_RC_LEFT_BANK_TO_25_DEG_UP_SW_NE_FRONT }, + { SPR_JUNIOR_RC_LEFT_BANK_TO_25_DEG_UP_NW_SE, SPR_JUNIOR_RC_LEFT_BANK_TO_25_DEG_UP_NW_SE_FRONT }, + { SPR_JUNIOR_RC_LEFT_BANK_TO_25_DEG_UP_NE_SW, 0 }, + { SPR_JUNIOR_RC_LEFT_BANK_TO_25_DEG_UP_SE_NW, 0 } +}; -static constexpr const uint32_t junior_rc_track_pieces_right_banked_to_25_deg_up[4][2] - = { { SPR_JUNIOR_RC_RIGHT_BANK_TO_25_DEG_UP_SW_NE, 0 }, - { SPR_JUNIOR_RC_RIGHT_BANK_TO_25_DEG_UP_NW_SE, 0 }, - { SPR_JUNIOR_RC_RIGHT_BANK_TO_25_DEG_UP_NE_SW, SPR_JUNIOR_RC_RIGHT_BANK_TO_25_DEG_UP_NE_SW_FRONT }, - { SPR_JUNIOR_RC_RIGHT_BANK_TO_25_DEG_UP_SE_NW, SPR_JUNIOR_RC_RIGHT_BANK_TO_25_DEG_UP_SE_NW_FRONT } }; +static constexpr const uint32_t junior_rc_track_pieces_right_banked_to_25_deg_up[4][2] = { + { SPR_JUNIOR_RC_RIGHT_BANK_TO_25_DEG_UP_SW_NE, 0 }, + { SPR_JUNIOR_RC_RIGHT_BANK_TO_25_DEG_UP_NW_SE, 0 }, + { SPR_JUNIOR_RC_RIGHT_BANK_TO_25_DEG_UP_NE_SW, SPR_JUNIOR_RC_RIGHT_BANK_TO_25_DEG_UP_NE_SW_FRONT }, + { SPR_JUNIOR_RC_RIGHT_BANK_TO_25_DEG_UP_SE_NW, SPR_JUNIOR_RC_RIGHT_BANK_TO_25_DEG_UP_SE_NW_FRONT } +}; -static constexpr const uint32_t junior_rc_track_pieces_25_deg_up_to_left_bank[4][2] - = { { SPR_JUNIOR_RC_25_DEG_UP_TO_LEFT_BANK_SW_NE, SPR_JUNIOR_RC_25_DEG_UP_TO_LEFT_BANK_SW_NE_FRONT }, - { SPR_JUNIOR_RC_25_DEG_UP_TO_LEFT_BANK_NW_SE, SPR_JUNIOR_RC_25_DEG_UP_TO_LEFT_BANK_NW_SE_FRONT }, - { SPR_JUNIOR_RC_25_DEG_UP_TO_LEFT_BANK_NE_SW, 0 }, - { SPR_JUNIOR_RC_25_DEG_UP_TO_LEFT_BANK_SE_NW, 0 } }; +static constexpr const uint32_t junior_rc_track_pieces_25_deg_up_to_left_bank[4][2] = { + { SPR_JUNIOR_RC_25_DEG_UP_TO_LEFT_BANK_SW_NE, SPR_JUNIOR_RC_25_DEG_UP_TO_LEFT_BANK_SW_NE_FRONT }, + { SPR_JUNIOR_RC_25_DEG_UP_TO_LEFT_BANK_NW_SE, SPR_JUNIOR_RC_25_DEG_UP_TO_LEFT_BANK_NW_SE_FRONT }, + { SPR_JUNIOR_RC_25_DEG_UP_TO_LEFT_BANK_NE_SW, 0 }, + { SPR_JUNIOR_RC_25_DEG_UP_TO_LEFT_BANK_SE_NW, 0 } +}; -static constexpr const uint32_t junior_rc_track_pieces_25_deg_up_to_right_bank[4][2] - = { { SPR_JUNIOR_RC_25_DEG_UP_TO_RIGHT_BANK_SW_NE, 0 }, - { SPR_JUNIOR_RC_25_DEG_UP_TO_RIGHT_BANK_NW_SE, 0 }, - { SPR_JUNIOR_RC_25_DEG_UP_TO_RIGHT_BANK_NE_SW, SPR_JUNIOR_RC_25_DEG_UP_TO_RIGHT_BANK_NE_SW_FRONT }, - { SPR_JUNIOR_RC_25_DEG_UP_TO_RIGHT_BANK_SE_NW, SPR_JUNIOR_RC_25_DEG_UP_TO_RIGHT_BANK_SE_NW_FRONT } }; +static constexpr const uint32_t junior_rc_track_pieces_25_deg_up_to_right_bank[4][2] = { + { SPR_JUNIOR_RC_25_DEG_UP_TO_RIGHT_BANK_SW_NE, 0 }, + { SPR_JUNIOR_RC_25_DEG_UP_TO_RIGHT_BANK_NW_SE, 0 }, + { SPR_JUNIOR_RC_25_DEG_UP_TO_RIGHT_BANK_NE_SW, SPR_JUNIOR_RC_25_DEG_UP_TO_RIGHT_BANK_NE_SW_FRONT }, + { SPR_JUNIOR_RC_25_DEG_UP_TO_RIGHT_BANK_SE_NW, SPR_JUNIOR_RC_25_DEG_UP_TO_RIGHT_BANK_SE_NW_FRONT } +}; static constexpr const uint32_t junior_rc_track_pieces_left_bank[4] = { SPR_JUNIOR_RC_LEFT_BANK_SW_NE, SPR_JUNIOR_RC_LEFT_BANK_NW_SE, SPR_JUNIOR_RC_LEFT_BANK_NE_SW, SPR_JUNIOR_RC_LEFT_BANK_SE_NW }; -static constexpr const uint32_t junior_rc_track_pieces_left_quarter_turn_5_tiles_25_deg_up[2][4][5] - = { { { - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SW_SE_PART_0, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SW_SE_PART_1, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SW_SE_PART_2, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SW_SE_PART_3, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SW_SE_PART_4, - }, - { - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_NW_SW_PART_0, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_NW_SW_PART_1, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_NW_SW_PART_2, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_NW_SW_PART_3, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_NW_SW_PART_4, - }, - { - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_NE_NW_PART_0, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_NE_NW_PART_1, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_NE_NW_PART_2, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_NE_NW_PART_3, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_NE_NW_PART_4, - }, - { - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SE_NE_PART_0, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SE_NE_PART_1, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SE_NE_PART_2, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SE_NE_PART_3, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SE_NE_PART_4, - } }, - { { - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_SW_SE_PART_0, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_SW_SE_PART_1, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_SW_SE_PART_2, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_SW_SE_PART_3, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_SW_SE_PART_4, - }, - { - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_NW_SW_PART_0, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_NW_SW_PART_1, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_NW_SW_PART_2, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_NW_SW_PART_3, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_NW_SW_PART_4, - }, - { - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_NE_NW_PART_0, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_NE_NW_PART_1, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_NE_NW_PART_2, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_NE_NW_PART_3, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_NE_NW_PART_4, - }, - { - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_SE_NE_PART_0, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_SE_NE_PART_1, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_SE_NE_PART_2, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_SE_NE_PART_3, - SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_SE_NE_PART_4, - } } }; +static constexpr const uint32_t junior_rc_track_pieces_left_quarter_turn_5_tiles_25_deg_up[2][4][5] = { + { { + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SW_SE_PART_0, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SW_SE_PART_1, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SW_SE_PART_2, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SW_SE_PART_3, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SW_SE_PART_4, + }, + { + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_NW_SW_PART_0, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_NW_SW_PART_1, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_NW_SW_PART_2, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_NW_SW_PART_3, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_NW_SW_PART_4, + }, + { + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_NE_NW_PART_0, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_NE_NW_PART_1, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_NE_NW_PART_2, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_NE_NW_PART_3, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_NE_NW_PART_4, + }, + { + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SE_NE_PART_0, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SE_NE_PART_1, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SE_NE_PART_2, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SE_NE_PART_3, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SE_NE_PART_4, + } }, + { { + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_SW_SE_PART_0, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_SW_SE_PART_1, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_SW_SE_PART_2, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_SW_SE_PART_3, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_SW_SE_PART_4, + }, + { + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_NW_SW_PART_0, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_NW_SW_PART_1, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_NW_SW_PART_2, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_NW_SW_PART_3, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_NW_SW_PART_4, + }, + { + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_NE_NW_PART_0, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_NE_NW_PART_1, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_NE_NW_PART_2, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_NE_NW_PART_3, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_NE_NW_PART_4, + }, + { + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_SE_NE_PART_0, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_SE_NE_PART_1, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_SE_NE_PART_2, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_SE_NE_PART_3, + SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_CHAIN_SE_NE_PART_4, + } } +}; // clang-format off static constexpr const LocationXY16 junior_rc_left_quarter_turn_5_tiles_25_deg_up_offsets[4][5] = { { diff --git a/src/openrct2/ride/coaster/ReverseFreefallCoaster.cpp b/src/openrct2/ride/coaster/ReverseFreefallCoaster.cpp index ee66ab2ab4..e132bc456f 100644 --- a/src/openrct2/ride/coaster/ReverseFreefallCoaster.cpp +++ b/src/openrct2/ride/coaster/ReverseFreefallCoaster.cpp @@ -280,10 +280,10 @@ static void paint_reverse_freefall_rc_slope( static constexpr const int32_t supportHeights[] = { 48, 64, 128, 176, 208, 240, 240 }; static constexpr const int32_t tunnelOffsets03[] = { 0, 0, 0, 16, 64 }; - uint32_t supportsImageId - = reverse_freefall_rc_track_pieces_slope_supports[trackSequence][direction] | session->TrackColours[SCHEME_SUPPORTS]; - uint32_t trackImageId - = reverse_freefall_rc_track_pieces_slope[trackSequence][direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t supportsImageId = reverse_freefall_rc_track_pieces_slope_supports[trackSequence][direction] + | session->TrackColours[SCHEME_SUPPORTS]; + uint32_t trackImageId = reverse_freefall_rc_track_pieces_slope[trackSequence][direction] + | session->TrackColours[SCHEME_TRACK]; int8_t bbHeight; bool isDirection03 = (direction == 0 || direction == 3); switch (trackSequence) @@ -397,8 +397,8 @@ static void paint_reverse_freefall_rc_vertical( switch (trackSequence) { case 0: - supportsImageId - = reverse_freefall_rc_track_pieces_vertical_supports[direction] | session->TrackColours[SCHEME_SUPPORTS]; + supportsImageId = reverse_freefall_rc_track_pieces_vertical_supports[direction] + | session->TrackColours[SCHEME_SUPPORTS]; sub_98197C(session, supportsImageId, 0, 0, 26, 26, 79, height, 3, 3, height); paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0); paint_util_set_general_support_height(session, height + 80, 0x20); diff --git a/src/openrct2/ride/coaster/VirginiaReel.cpp b/src/openrct2/ride/coaster/VirginiaReel.cpp index efacaa6de2..54ccff0ae7 100644 --- a/src/openrct2/ride/coaster/VirginiaReel.cpp +++ b/src/openrct2/ride/coaster/VirginiaReel.cpp @@ -129,19 +129,20 @@ static constexpr const uint32_t virginia_reel_track_pieces_25_deg_up_lift_hill[4 SPR_VIRGINIA_REEL_25_DEG_UP_LIFT_HILL_SE_NW, }; -static constexpr const uint32_t virginia_reel_track_pieces_flat_quarter_turn_3_tiles[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, - SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_2 }, - { SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_0, - SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_1, - SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_2 }, - { SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_0, - SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_1, - SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_2 }, - { SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_0, - SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_1, - SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_2 } }; +static constexpr const uint32_t virginia_reel_track_pieces_flat_quarter_turn_3_tiles[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, + SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_2 }, + { SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_0, + SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_1, + SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_2 }, + { SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_0, + SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_1, + SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_2 }, + { SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_0, + SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_1, + SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_2 } +}; static constexpr const uint32_t virginia_reel_track_pieces_flat_quarter_turn_1_tile[4] = { SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_1_TILE_SW_NW, diff --git a/src/openrct2/ride/coaster/WildMouse.cpp b/src/openrct2/ride/coaster/WildMouse.cpp index 61764f167b..214471ea4f 100644 --- a/src/openrct2/ride/coaster/WildMouse.cpp +++ b/src/openrct2/ride/coaster/WildMouse.cpp @@ -599,27 +599,28 @@ static void wild_mouse_track_right_quarter_turn_3( int32_t height, const rct_tile_element* tileElement) { - static constexpr const sprite_bb imageIds[4][3] - = { { - { SPR_WILD_MOUSE_QUARTER_TURN_3_SW_SE_PART_0, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 3 } }, - { SPR_WILD_MOUSE_QUARTER_TURN_3_SW_SE_PART_1, { 0, 0, 0 }, { 16, 16, 0 }, { 16, 16, 3 } }, - { SPR_WILD_MOUSE_QUARTER_TURN_3_SW_SE_PART_2, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 3 } }, - }, - { - { SPR_WILD_MOUSE_QUARTER_TURN_3_NW_SW_PART_0, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 3 } }, - { SPR_WILD_MOUSE_QUARTER_TURN_3_NW_SW_PART_1, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 16, 3 } }, - { SPR_WILD_MOUSE_QUARTER_TURN_3_NW_SW_PART_2, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 3 } }, - }, - { - { SPR_WILD_MOUSE_QUARTER_TURN_3_NE_NW_PART_0, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 3 } }, - { SPR_WILD_MOUSE_QUARTER_TURN_3_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 16, 3 } }, - { SPR_WILD_MOUSE_QUARTER_TURN_3_NE_NW_PART_2, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 3 } }, - }, - { - { SPR_WILD_MOUSE_QUARTER_TURN_3_SE_NE_PART_0, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 3 } }, - { SPR_WILD_MOUSE_QUARTER_TURN_3_SE_NE_PART_1, { 0, 0, 0 }, { 0, 16, 0 }, { 16, 16, 3 } }, - { SPR_WILD_MOUSE_QUARTER_TURN_3_SE_NE_PART_2, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 3 } }, - } }; + static constexpr const sprite_bb imageIds[4][3] = { + { + { SPR_WILD_MOUSE_QUARTER_TURN_3_SW_SE_PART_0, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 3 } }, + { SPR_WILD_MOUSE_QUARTER_TURN_3_SW_SE_PART_1, { 0, 0, 0 }, { 16, 16, 0 }, { 16, 16, 3 } }, + { SPR_WILD_MOUSE_QUARTER_TURN_3_SW_SE_PART_2, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 3 } }, + }, + { + { SPR_WILD_MOUSE_QUARTER_TURN_3_NW_SW_PART_0, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 3 } }, + { SPR_WILD_MOUSE_QUARTER_TURN_3_NW_SW_PART_1, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 16, 3 } }, + { SPR_WILD_MOUSE_QUARTER_TURN_3_NW_SW_PART_2, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 3 } }, + }, + { + { SPR_WILD_MOUSE_QUARTER_TURN_3_NE_NW_PART_0, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 3 } }, + { SPR_WILD_MOUSE_QUARTER_TURN_3_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 16, 3 } }, + { SPR_WILD_MOUSE_QUARTER_TURN_3_NE_NW_PART_2, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 3 } }, + }, + { + { SPR_WILD_MOUSE_QUARTER_TURN_3_SE_NE_PART_0, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 3 } }, + { SPR_WILD_MOUSE_QUARTER_TURN_3_SE_NE_PART_1, { 0, 0, 0 }, { 0, 16, 0 }, { 16, 16, 3 } }, + { SPR_WILD_MOUSE_QUARTER_TURN_3_SE_NE_PART_2, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 3 } }, + } + }; track_paint_util_right_quarter_turn_3_tiles_paint_3( session, height, direction, trackSequence, session->TrackColours[SCHEME_TRACK], imageIds); @@ -658,23 +659,24 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_down( int32_t height, const rct_tile_element* tileElement) { - static constexpr const sprite_bb imageIds[4][2] - = { { - { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_DOWN_SW_SE_PART_0, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 3 } }, - { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_DOWN_SW_SE_PART_1, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 3 } }, - }, - { - { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_DOWN_NW_SW_PART_0, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 3 } }, - { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_DOWN_NW_SW_PART_1, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 3 } }, - }, - { - { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_DOWN_NE_NW_PART_0, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 3 } }, - { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_DOWN_NE_NW_PART_1, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 3 } }, - }, - { - { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_DOWN_SE_NE_PART_0, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 3 } }, - { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_DOWN_SE_NE_PART_1, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 3 } }, - } }; + static constexpr const sprite_bb imageIds[4][2] = { + { + { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_DOWN_SW_SE_PART_0, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 3 } }, + { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_DOWN_SW_SE_PART_1, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 3 } }, + }, + { + { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_DOWN_NW_SW_PART_0, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 3 } }, + { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_DOWN_NW_SW_PART_1, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 3 } }, + }, + { + { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_DOWN_NE_NW_PART_0, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 3 } }, + { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_DOWN_NE_NW_PART_1, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 3 } }, + }, + { + { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_DOWN_SE_NE_PART_0, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 3 } }, + { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_DOWN_SE_NE_PART_1, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 3 } }, + } + }; static constexpr const int16_t generalSupportHeights[] = { 72, 56, 56, 72 }; if (trackSequence == 0 || trackSequence == 3) @@ -739,23 +741,24 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_up( int32_t height, const rct_tile_element* tileElement) { - static constexpr const sprite_bb imageIds[4][2] - = { { - { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_UP_SW_SE_PART_0, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 3 } }, - { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_UP_SW_SE_PART_1, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 3 } }, - }, - { - { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_UP_NW_SW_PART_0, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 3 } }, - { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_UP_NW_SW_PART_1, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 3 } }, - }, - { - { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_UP_NE_NW_PART_0, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 3 } }, - { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_UP_NE_NW_PART_1, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 3 } }, - }, - { - { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_UP_SE_NE_PART_0, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 3 } }, - { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_UP_SE_NE_PART_1, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 3 } }, - } }; + static constexpr const sprite_bb imageIds[4][2] = { + { + { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_UP_SW_SE_PART_0, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 3 } }, + { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_UP_SW_SE_PART_1, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 3 } }, + }, + { + { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_UP_NW_SW_PART_0, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 3 } }, + { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_UP_NW_SW_PART_1, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 3 } }, + }, + { + { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_UP_NE_NW_PART_0, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 3 } }, + { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_UP_NE_NW_PART_1, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 3 } }, + }, + { + { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_UP_SE_NE_PART_0, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 3 } }, + { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_UP_SE_NE_PART_1, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 3 } }, + } + }; static constexpr const int16_t generalSupportHeights[] = { 72, 56, 56, 72 }; if (trackSequence == 0 || trackSequence == 3) diff --git a/src/openrct2/ride/coaster/WoodenRollerCoaster.cpp b/src/openrct2/ride/coaster/WoodenRollerCoaster.cpp index 4fd0c8f631..072d935d3b 100644 --- a/src/openrct2/ride/coaster/WoodenRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/WoodenRollerCoaster.cpp @@ -589,31 +589,32 @@ static void wooden_rc_track_25_deg_up( int32_t height, const rct_tile_element* tileElement) { - static constexpr const uint32_t imageIds[2][4][4] - = { { - { SPR_WOODEN_RC_25_DEG_SW_NE, SPR_WOODEN_RC_25_DEG_RAILS_SW_NE, 0, 0 }, - { SPR_WOODEN_RC_25_DEG_NW_SE, - SPR_WOODEN_RC_25_DEG_RAILS_NW_SE, - SPR_WOODEN_RC_25_DEG_FRONT_NW_SE, - SPR_WOODEN_RC_25_DEG_RAILS_FRONT_NW_SE }, - { SPR_WOODEN_RC_25_DEG_NE_SW, - SPR_WOODEN_RC_25_DEG_RAILS_NE_SW, - SPR_WOODEN_RC_25_DEG_FRONT_NE_SW, - SPR_WOODEN_RC_25_DEG_RAILS_FRONT_NE_SW }, - { SPR_WOODEN_RC_25_DEG_SE_NW, SPR_WOODEN_RC_25_DEG_RAILS_SE_NW, 0, 0 }, - }, - { - { SPR_WOODEN_RC_25_DEG_CHAIN_SW_NE, SPR_WOODEN_RC_25_DEG_CHAIN_RAILS_SW_NE, 0, 0 }, - { SPR_WOODEN_RC_25_DEG_CHAIN_NW_SE, - SPR_WOODEN_RC_25_DEG_CHAIN_RAILS_NW_SE, - SPR_WOODEN_RC_25_DEG_CHAIN_FRONT_NW_SE, - SPR_WOODEN_RC_25_DEG_CHAIN_RAILS_FRONT_NW_SE }, - { SPR_WOODEN_RC_25_DEG_CHAIN_NE_SW, - SPR_WOODEN_RC_25_DEG_CHAIN_RAILS_NE_SW, - SPR_WOODEN_RC_25_DEG_CHAIN_FRONT_NE_SW, - SPR_WOODEN_RC_25_DEG_CHAIN_RAILS_FRONT_NE_SW }, - { SPR_WOODEN_RC_25_DEG_CHAIN_SE_NW, SPR_WOODEN_RC_25_DEG_CHAIN_RAILS_SE_NW, 0, 0 }, - } }; + static constexpr const uint32_t imageIds[2][4][4] = { + { + { SPR_WOODEN_RC_25_DEG_SW_NE, SPR_WOODEN_RC_25_DEG_RAILS_SW_NE, 0, 0 }, + { SPR_WOODEN_RC_25_DEG_NW_SE, + SPR_WOODEN_RC_25_DEG_RAILS_NW_SE, + SPR_WOODEN_RC_25_DEG_FRONT_NW_SE, + SPR_WOODEN_RC_25_DEG_RAILS_FRONT_NW_SE }, + { SPR_WOODEN_RC_25_DEG_NE_SW, + SPR_WOODEN_RC_25_DEG_RAILS_NE_SW, + SPR_WOODEN_RC_25_DEG_FRONT_NE_SW, + SPR_WOODEN_RC_25_DEG_RAILS_FRONT_NE_SW }, + { SPR_WOODEN_RC_25_DEG_SE_NW, SPR_WOODEN_RC_25_DEG_RAILS_SE_NW, 0, 0 }, + }, + { + { SPR_WOODEN_RC_25_DEG_CHAIN_SW_NE, SPR_WOODEN_RC_25_DEG_CHAIN_RAILS_SW_NE, 0, 0 }, + { SPR_WOODEN_RC_25_DEG_CHAIN_NW_SE, + SPR_WOODEN_RC_25_DEG_CHAIN_RAILS_NW_SE, + SPR_WOODEN_RC_25_DEG_CHAIN_FRONT_NW_SE, + SPR_WOODEN_RC_25_DEG_CHAIN_RAILS_FRONT_NW_SE }, + { SPR_WOODEN_RC_25_DEG_CHAIN_NE_SW, + SPR_WOODEN_RC_25_DEG_CHAIN_RAILS_NE_SW, + SPR_WOODEN_RC_25_DEG_CHAIN_FRONT_NE_SW, + SPR_WOODEN_RC_25_DEG_CHAIN_RAILS_FRONT_NE_SW }, + { SPR_WOODEN_RC_25_DEG_CHAIN_SE_NW, SPR_WOODEN_RC_25_DEG_CHAIN_RAILS_SE_NW, 0, 0 }, + } + }; uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; wooden_rc_track_paint( @@ -714,31 +715,32 @@ static void wooden_rc_track_flat_to_25_deg_up( int32_t height, const rct_tile_element* tileElement) { - static constexpr const uint32_t imageIds[2][4][4] - = { { - { SPR_WOODEN_RC_FLAT_TO_25_DEG_SW_NE, SPR_WOODEN_RC_FLAT_TO_25_DEG_RAILS_SW_NE, 0, 0 }, - { SPR_WOODEN_RC_FLAT_TO_25_DEG_NW_SE, - SPR_WOODEN_RC_FLAT_TO_25_DEG_RAILS_NW_SE, - SPR_WOODEN_RC_FLAT_TO_25_DEG_FRONT_NW_SE, - SPR_WOODEN_RC_FLAT_TO_25_DEG_RAILS_FRONT_NW_SE }, - { SPR_WOODEN_RC_FLAT_TO_25_DEG_NE_SW, - SPR_WOODEN_RC_FLAT_TO_25_DEG_RAILS_NE_SW, - SPR_WOODEN_RC_FLAT_TO_25_DEG_FRONT_NE_SW, - SPR_WOODEN_RC_FLAT_TO_25_DEG_RAILS_FRONT_NE_SW }, - { SPR_WOODEN_RC_FLAT_TO_25_DEG_SE_NW, SPR_WOODEN_RC_FLAT_TO_25_DEG_RAILS_SE_NW, 0, 0 }, - }, - { - { SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_SW_NE, SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_RAILS_SW_NE, 0, 0 }, - { SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_NW_SE, - SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_RAILS_NW_SE, - SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_FRONT_NW_SE, - SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_RAILS_FRONT_NW_SE }, - { SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_NE_SW, - SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_RAILS_NE_SW, - SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_FRONT_NE_SW, - SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_RAILS_FRONT_NE_SW }, - { SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_SE_NW, SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_RAILS_SE_NW, 0, 0 }, - } }; + static constexpr const uint32_t imageIds[2][4][4] = { + { + { SPR_WOODEN_RC_FLAT_TO_25_DEG_SW_NE, SPR_WOODEN_RC_FLAT_TO_25_DEG_RAILS_SW_NE, 0, 0 }, + { SPR_WOODEN_RC_FLAT_TO_25_DEG_NW_SE, + SPR_WOODEN_RC_FLAT_TO_25_DEG_RAILS_NW_SE, + SPR_WOODEN_RC_FLAT_TO_25_DEG_FRONT_NW_SE, + SPR_WOODEN_RC_FLAT_TO_25_DEG_RAILS_FRONT_NW_SE }, + { SPR_WOODEN_RC_FLAT_TO_25_DEG_NE_SW, + SPR_WOODEN_RC_FLAT_TO_25_DEG_RAILS_NE_SW, + SPR_WOODEN_RC_FLAT_TO_25_DEG_FRONT_NE_SW, + SPR_WOODEN_RC_FLAT_TO_25_DEG_RAILS_FRONT_NE_SW }, + { SPR_WOODEN_RC_FLAT_TO_25_DEG_SE_NW, SPR_WOODEN_RC_FLAT_TO_25_DEG_RAILS_SE_NW, 0, 0 }, + }, + { + { SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_SW_NE, SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_RAILS_SW_NE, 0, 0 }, + { SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_NW_SE, + SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_RAILS_NW_SE, + SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_FRONT_NW_SE, + SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_RAILS_FRONT_NW_SE }, + { SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_NE_SW, + SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_RAILS_NE_SW, + SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_FRONT_NE_SW, + SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_RAILS_FRONT_NE_SW }, + { SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_SE_NW, SPR_WOODEN_RC_FLAT_TO_25_DEG_CHAIN_RAILS_SE_NW, 0, 0 }, + } + }; uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; wooden_rc_track_paint( @@ -897,31 +899,32 @@ static void wooden_rc_track_25_deg_up_to_flat( int32_t height, const rct_tile_element* tileElement) { - static constexpr const uint32_t imageIds[2][4][4] - = { { - { SPR_WOODEN_RC_25_DEG_TO_FLAT_SW_NE, SPR_WOODEN_RC_25_DEG_TO_FLAT_RAILS_SW_NE, 0, 0 }, - { SPR_WOODEN_RC_25_DEG_TO_FLAT_NW_SE, - SPR_WOODEN_RC_25_DEG_TO_FLAT_RAILS_NW_SE, - SPR_WOODEN_RC_25_DEG_TO_FLAT_FRONT_NW_SE, - SPR_WOODEN_RC_25_DEG_TO_FLAT_RAILS_FRONT_NW_SE }, - { SPR_WOODEN_RC_25_DEG_TO_FLAT_NE_SW, - SPR_WOODEN_RC_25_DEG_TO_FLAT_RAILS_NE_SW, - SPR_WOODEN_RC_25_DEG_TO_FLAT_FRONT_NE_SW, - SPR_WOODEN_RC_25_DEG_TO_FLAT_RAILS_FRONT_NE_SW }, - { SPR_WOODEN_RC_25_DEG_TO_FLAT_SE_NW, SPR_WOODEN_RC_25_DEG_TO_FLAT_RAILS_SE_NW, 0, 0 }, - }, - { - { SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_SW_NE, SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_RAILS_SW_NE, 0, 0 }, - { SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_NW_SE, - SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_RAILS_NW_SE, - SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_FRONT_NW_SE, - SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_RAILS_FRONT_NW_SE }, - { SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_NE_SW, - SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_RAILS_NE_SW, - SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_FRONT_NE_SW, - SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_RAILS_FRONT_NE_SW }, - { SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_SE_NW, SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_RAILS_SE_NW, 0, 0 }, - } }; + static constexpr const uint32_t imageIds[2][4][4] = { + { + { SPR_WOODEN_RC_25_DEG_TO_FLAT_SW_NE, SPR_WOODEN_RC_25_DEG_TO_FLAT_RAILS_SW_NE, 0, 0 }, + { SPR_WOODEN_RC_25_DEG_TO_FLAT_NW_SE, + SPR_WOODEN_RC_25_DEG_TO_FLAT_RAILS_NW_SE, + SPR_WOODEN_RC_25_DEG_TO_FLAT_FRONT_NW_SE, + SPR_WOODEN_RC_25_DEG_TO_FLAT_RAILS_FRONT_NW_SE }, + { SPR_WOODEN_RC_25_DEG_TO_FLAT_NE_SW, + SPR_WOODEN_RC_25_DEG_TO_FLAT_RAILS_NE_SW, + SPR_WOODEN_RC_25_DEG_TO_FLAT_FRONT_NE_SW, + SPR_WOODEN_RC_25_DEG_TO_FLAT_RAILS_FRONT_NE_SW }, + { SPR_WOODEN_RC_25_DEG_TO_FLAT_SE_NW, SPR_WOODEN_RC_25_DEG_TO_FLAT_RAILS_SE_NW, 0, 0 }, + }, + { + { SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_SW_NE, SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_RAILS_SW_NE, 0, 0 }, + { SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_NW_SE, + SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_RAILS_NW_SE, + SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_FRONT_NW_SE, + SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_RAILS_FRONT_NW_SE }, + { SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_NE_SW, + SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_RAILS_NE_SW, + SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_FRONT_NE_SW, + SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_RAILS_FRONT_NE_SW }, + { SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_SE_NW, SPR_WOODEN_RC_25_DEG_TO_FLAT_CHAIN_RAILS_SE_NW, 0, 0 }, + } + }; uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; wooden_rc_track_paint( @@ -1275,8 +1278,8 @@ static void wooden_rc_track_right_quarter_turn_5( blockedSegments = SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4; break; case 3: - blockedSegments - = SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4; + blockedSegments = SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 + | SEGMENT_D4; break; case 4: blockedSegments = SEGMENT_B4 | SEGMENT_C8 | SEGMENT_CC; @@ -1631,8 +1634,8 @@ static void wooden_rc_track_banked_right_quarter_turn_5( blockedSegments = SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4; break; case 3: - blockedSegments - = SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4; + blockedSegments = SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 + | SEGMENT_D4; break; case 4: blockedSegments = SEGMENT_B4 | SEGMENT_C8 | SEGMENT_CC; diff --git a/src/openrct2/ride/coaster/WoodenWildMouse.cpp b/src/openrct2/ride/coaster/WoodenWildMouse.cpp index 722d0831b2..bb627da2df 100644 --- a/src/openrct2/ride/coaster/WoodenWildMouse.cpp +++ b/src/openrct2/ride/coaster/WoodenWildMouse.cpp @@ -275,8 +275,8 @@ static void wooden_wild_mouse_track_60_deg_up( } else { - session->WoodenSupportsPrependTo - = sub_98197C_rotated(session, direction, imageId, 0, 6, 2, 24, 93, height, 28, 4, height - 16); + session->WoodenSupportsPrependTo = sub_98197C_rotated( + session, direction, imageId, 0, 6, 2, 24, 93, height, 28, 4, height - 16); } wooden_a_supports_paint_setup( @@ -373,8 +373,8 @@ static void wooden_wild_mouse_track_25_deg_up_to_60_deg_up( else { imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK]; - session->WoodenSupportsPrependTo - = sub_98197C_rotated(session, direction, imageId, 0, 6, 2, 24, 43, height, 28, 4, height + 2); + session->WoodenSupportsPrependTo = sub_98197C_rotated( + session, direction, imageId, 0, 6, 2, 24, 43, height, 28, 4, height + 2); imageId = imageIds[isChained][direction][1] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 6, 32, 2, 43, height, 0, 4, height); } @@ -428,8 +428,8 @@ static void wooden_wild_mouse_track_60_deg_to_25_deg_up( else { imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK]; - session->WoodenSupportsPrependTo - = sub_98197C_rotated(session, direction, imageId, 0, 6, 2, 24, 43, height, 28, 4, height + 2); + session->WoodenSupportsPrependTo = sub_98197C_rotated( + session, direction, imageId, 0, 6, 2, 24, 43, height, 28, 4, height + 2); imageId = imageIds[isChained][direction][1] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 6, 32, 2, 43, height, 0, 4, height); } @@ -574,27 +574,28 @@ static void wooden_wild_mouse_track_right_quarter_turn_3( int32_t height, const rct_tile_element* tileElement) { - static constexpr const sprite_bb imageIds[4][3] - = { { - { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_SW_SE_PART_0, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 1 } }, - { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_SW_SE_PART_1, { 16, 16, 0 }, { 0, 0, 0 }, { 16, 16, 1 } }, - { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_SW_SE_PART_2, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 1 } }, - }, - { - { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_NW_SW_PART_0, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 1 } }, - { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_NW_SW_PART_1, { 16, 0, 0 }, { 0, 0, 0 }, { 16, 16, 1 } }, - { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_NW_SW_PART_2, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 1 } }, - }, - { - { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_NE_NW_PART_0, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 1 } }, - { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 16, 1 } }, - { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_NE_NW_PART_2, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 1 } }, - }, - { - { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_SE_NE_PART_0, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 1 } }, - { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_SE_NE_PART_1, { 0, 16, 0 }, { 0, 0, 0 }, { 16, 16, 1 } }, - { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_SE_NE_PART_2, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 1 } }, - } }; + static constexpr const sprite_bb imageIds[4][3] = { + { + { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_SW_SE_PART_0, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 1 } }, + { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_SW_SE_PART_1, { 16, 16, 0 }, { 0, 0, 0 }, { 16, 16, 1 } }, + { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_SW_SE_PART_2, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 1 } }, + }, + { + { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_NW_SW_PART_0, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 1 } }, + { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_NW_SW_PART_1, { 16, 0, 0 }, { 0, 0, 0 }, { 16, 16, 1 } }, + { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_NW_SW_PART_2, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 1 } }, + }, + { + { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_NE_NW_PART_0, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 1 } }, + { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 16, 1 } }, + { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_NE_NW_PART_2, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 1 } }, + }, + { + { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_SE_NE_PART_0, { 6, 0, 0 }, { 0, 0, 0 }, { 20, 32, 1 } }, + { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_SE_NE_PART_1, { 0, 16, 0 }, { 0, 0, 0 }, { 16, 16, 1 } }, + { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_SE_NE_PART_2, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 1 } }, + } + }; static uint8_t supportType[] = { 4, 5, 2, 3 }; track_paint_util_right_quarter_turn_3_tiles_paint_4( diff --git a/src/openrct2/ride/gentle/CarRide.cpp b/src/openrct2/ride/gentle/CarRide.cpp index 0ffe68f554..02643f0042 100644 --- a/src/openrct2/ride/gentle/CarRide.cpp +++ b/src/openrct2/ride/gentle/CarRide.cpp @@ -132,19 +132,20 @@ static constexpr const uint32_t car_ride_track_pieces_left_quarter_turn_1_tile[4 SPR_CAR_RIDE_QUARTER_TURN_1_TILE_SE_SW, }; -static constexpr const uint32_t car_ride_track_pieces_quarter_turn_3_tiles[4][3] - = { { SPR_CAR_RIDE_QUARTER_TURN_3_TILES_SW_SE_PART_0, - SPR_CAR_RIDE_QUARTER_TURN_3_TILES_SW_SE_PART_1, - SPR_CAR_RIDE_QUARTER_TURN_3_TILES_SW_SE_PART_2 }, - { SPR_CAR_RIDE_QUARTER_TURN_3_TILES_NW_SW_PART_0, - SPR_CAR_RIDE_QUARTER_TURN_3_TILES_NW_SW_PART_1, - SPR_CAR_RIDE_QUARTER_TURN_3_TILES_NW_SW_PART_2 }, - { SPR_CAR_RIDE_QUARTER_TURN_3_TILES_NE_NW_PART_0, - SPR_CAR_RIDE_QUARTER_TURN_3_TILES_NE_NW_PART_1, - SPR_CAR_RIDE_QUARTER_TURN_3_TILES_NE_NW_PART_2 }, - { SPR_CAR_RIDE_QUARTER_TURN_3_TILES_SE_NE_PART_0, - SPR_CAR_RIDE_QUARTER_TURN_3_TILES_SE_NE_PART_1, - SPR_CAR_RIDE_QUARTER_TURN_3_TILES_SE_NE_PART_2 } }; +static constexpr const uint32_t car_ride_track_pieces_quarter_turn_3_tiles[4][3] = { + { SPR_CAR_RIDE_QUARTER_TURN_3_TILES_SW_SE_PART_0, + SPR_CAR_RIDE_QUARTER_TURN_3_TILES_SW_SE_PART_1, + SPR_CAR_RIDE_QUARTER_TURN_3_TILES_SW_SE_PART_2 }, + { SPR_CAR_RIDE_QUARTER_TURN_3_TILES_NW_SW_PART_0, + SPR_CAR_RIDE_QUARTER_TURN_3_TILES_NW_SW_PART_1, + SPR_CAR_RIDE_QUARTER_TURN_3_TILES_NW_SW_PART_2 }, + { SPR_CAR_RIDE_QUARTER_TURN_3_TILES_NE_NW_PART_0, + SPR_CAR_RIDE_QUARTER_TURN_3_TILES_NE_NW_PART_1, + SPR_CAR_RIDE_QUARTER_TURN_3_TILES_NE_NW_PART_2 }, + { SPR_CAR_RIDE_QUARTER_TURN_3_TILES_SE_NE_PART_0, + SPR_CAR_RIDE_QUARTER_TURN_3_TILES_SE_NE_PART_1, + SPR_CAR_RIDE_QUARTER_TURN_3_TILES_SE_NE_PART_2 } +}; /** rct2: 0x006F72C8 */ static void paint_car_ride_track_flat( diff --git a/src/openrct2/ride/gentle/CircusShow.cpp b/src/openrct2/ride/gentle/CircusShow.cpp index f2ea961f3d..9b8389a55e 100644 --- a/src/openrct2/ride/gentle/CircusShow.cpp +++ b/src/openrct2/ride/gentle/CircusShow.cpp @@ -17,8 +17,8 @@ /** * rct2: 0x0077084A */ -static void - paint_circus_show_tent(paint_session* session, uint8_t rideIndex, uint8_t direction, int8_t al, int8_t cl, uint16_t height) +static void paint_circus_show_tent( + paint_session* session, uint8_t rideIndex, uint8_t direction, int8_t al, int8_t cl, uint16_t height) { const rct_tile_element* savedTileElement = static_cast(session->CurrentlyDrawnItem); @@ -35,8 +35,8 @@ static void uint32_t imageId = rideEntry->vehicles[0].base_image_id; if (imageColourFlags == IMAGE_TYPE_REMAP) { - imageColourFlags - = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2( + ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); imageId += direction; } diff --git a/src/openrct2/ride/gentle/FerrisWheel.cpp b/src/openrct2/ride/gentle/FerrisWheel.cpp index ca3bd54a26..ab2f42d903 100644 --- a/src/openrct2/ride/gentle/FerrisWheel.cpp +++ b/src/openrct2/ride/gentle/FerrisWheel.cpp @@ -82,8 +82,8 @@ static void paint_ferris_wheel_structure( uint32_t imageColourFlags = session->TrackColours[SCHEME_MISC]; if (imageColourFlags == IMAGE_TYPE_REMAP) { - imageColourFlags - = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2( + ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } ferris_wheel_bound_box boundBox = ferris_wheel_data[direction]; diff --git a/src/openrct2/ride/gentle/GhostTrain.cpp b/src/openrct2/ride/gentle/GhostTrain.cpp index 1662c9b5e3..27c81014b5 100644 --- a/src/openrct2/ride/gentle/GhostTrain.cpp +++ b/src/openrct2/ride/gentle/GhostTrain.cpp @@ -102,19 +102,20 @@ static constexpr const uint32_t ghost_train_track_pieces_quarter_turn_1_tile[4] SPR_GHOST_TRAIN_QUARTER_TURN_1_TILE_SE_SW, }; -static constexpr const uint32_t ghost_train_track_pieces_quarter_turn_3_tiles[4][3] - = { { SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_SW_SE_PART_0, - SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_SW_SE_PART_1, - SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_SW_SE_PART_2 }, - { SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_NW_SW_PART_0, - SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_NW_SW_PART_1, - SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_NW_SW_PART_2 }, - { SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_NE_NW_PART_0, - SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_NE_NW_PART_1, - SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_NE_NW_PART_2 }, - { SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_SE_NE_PART_0, - SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_SE_NE_PART_1, - SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_SE_NE_PART_2 } }; +static constexpr const uint32_t ghost_train_track_pieces_quarter_turn_3_tiles[4][3] = { + { SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_SW_SE_PART_0, + SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_SW_SE_PART_1, + SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_SW_SE_PART_2 }, + { SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_NW_SW_PART_0, + SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_NW_SW_PART_1, + SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_NW_SW_PART_2 }, + { SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_NE_NW_PART_0, + SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_NE_NW_PART_1, + SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_NE_NW_PART_2 }, + { SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_SE_NE_PART_0, + SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_SE_NE_PART_1, + SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_SE_NE_PART_2 } +}; static constexpr const uint32_t ghost_train_track_pieces_spinning_tunnel_track[4] = { SPR_GHOST_TRAIN_SPINNING_TUNNEL_TRACK_SW_NE, diff --git a/src/openrct2/ride/gentle/MerryGoRound.cpp b/src/openrct2/ride/gentle/MerryGoRound.cpp index f3100d6e3c..eb17460e49 100644 --- a/src/openrct2/ride/gentle/MerryGoRound.cpp +++ b/src/openrct2/ride/gentle/MerryGoRound.cpp @@ -65,8 +65,8 @@ static void paint_merry_go_round_structure( uint32_t imageColourFlags = session->TrackColours[SCHEME_MISC]; if (imageColourFlags == IMAGE_TYPE_REMAP) { - imageColourFlags - = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2( + ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } uint32_t imageId = (baseImageId + imageOffset) | imageColourFlags; @@ -90,8 +90,8 @@ static void paint_merry_go_round_structure( continue; } - imageColourFlags - = SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[peep], vehicle->peep_tshirt_colours[peep + 1]); + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2( + vehicle->peep_tshirt_colours[peep], vehicle->peep_tshirt_colours[peep + 1]); imageId = (baseImageId + 32 + imageOffset) | imageColourFlags; sub_98199C(session, imageId, xOffset, yOffset, 24, 24, 48, height, xOffset + 16, yOffset + 16, height); } diff --git a/src/openrct2/ride/gentle/MiniGolf.cpp b/src/openrct2/ride/gentle/MiniGolf.cpp index 3e28ded43d..30b53ab1d2 100644 --- a/src/openrct2/ride/gentle/MiniGolf.cpp +++ b/src/openrct2/ride/gentle/MiniGolf.cpp @@ -203,49 +203,51 @@ static constexpr const uint32_t mini_golf_track_sprites_25_deg_up[][3] = { { SPR_MINI_GOLF_25_DEG_UP_FENCE_FRONT_SE_NW, } }; -static constexpr const uint32_t mini_golf_track_sprites_flat_to_25_deg_up[][3] - = { { - SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_SW_NE, - SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_FENCE_BACK_SW_NE, - SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_FENCE_FRONT_SW_NE, - }, - { - SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_NW_SE, - SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_FENCE_BACK_NW_SE, - SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_FENCE_FRONT_NW_SE, - }, - { - SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_NE_SW, - SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_FENCE_BACK_NE_SW, - SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_FENCE_FRONT_NE_SW, - }, - { - SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_SE_NW, - SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_FENCE_BACK_SE_NW, - SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_FENCE_FRONT_SE_NW, - } }; +static constexpr const uint32_t mini_golf_track_sprites_flat_to_25_deg_up[][3] = { + { + SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_SW_NE, + SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_FENCE_BACK_SW_NE, + SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_FENCE_FRONT_SW_NE, + }, + { + SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_NW_SE, + SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_FENCE_BACK_NW_SE, + SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_FENCE_FRONT_NW_SE, + }, + { + SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_NE_SW, + SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_FENCE_BACK_NE_SW, + SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_FENCE_FRONT_NE_SW, + }, + { + SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_SE_NW, + SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_FENCE_BACK_SE_NW, + SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_FENCE_FRONT_SE_NW, + } +}; -static constexpr const uint32_t mini_golf_track_sprites_25_deg_up_to_flat[][3] - = { { - SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_SW_NE, - SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_FENCE_BACK_SW_NE, - SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_FENCE_FRONT_SW_NE, - }, - { - SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_NW_SE, - SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_FENCE_BACK_NW_SE, - SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_FENCE_FRONT_NW_SE, - }, - { - SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_NE_SW, - SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_FENCE_BACK_NE_SW, - SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_FENCE_FRONT_NE_SW, - }, - { - SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_SE_NW, - SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_FENCE_BACK_SE_NW, - SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_FENCE_FRONT_SE_NW, - } }; +static constexpr const uint32_t mini_golf_track_sprites_25_deg_up_to_flat[][3] = { + { + SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_SW_NE, + SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_FENCE_BACK_SW_NE, + SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_FENCE_FRONT_SW_NE, + }, + { + SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_NW_SE, + SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_FENCE_BACK_NW_SE, + SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_FENCE_FRONT_NW_SE, + }, + { + SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_NE_SW, + SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_FENCE_BACK_NE_SW, + SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_FENCE_FRONT_NE_SW, + }, + { + SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_SE_NW, + SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_FENCE_BACK_SE_NW, + SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_FENCE_FRONT_SE_NW, + } +}; static constexpr const uint32_t mini_golf_track_sprites_quarter_turn_1_tile[] = { SPR_MINI_GOLF_QUARTER_TURN_1_TILE_SW_NW, @@ -331,8 +333,8 @@ static constexpr const uint8_t mini_golf_peep_animation_frames_walk[] = { 0, 1, static constexpr const uint8_t mini_golf_peep_animation_frames_place_ball_downwards[] = { 12, 13, 14, 15 }; /** rct2: 0x009334B5 */ -static constexpr const uint8_t mini_golf_peep_animation_frames_swing[] - = { 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 33, 33, 33, 33, 34 }; +static constexpr const uint8_t mini_golf_peep_animation_frames_swing[] = { 31, 31, 31, 31, 31, 31, 31, 31, + 31, 32, 33, 33, 33, 33, 34 }; /** rct2: 0x0093347D */ static constexpr const uint8_t mini_golf_peep_animation_frames_swing_left[] = { 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 8, 8, 8, 9 }; @@ -341,8 +343,8 @@ static constexpr const uint8_t mini_golf_peep_animation_frames_swing_left[] = { static constexpr const uint8_t mini_golf_peep_animation_frames_place_ball_upwards[] = { 12, 13, 14, 15, 14, 13, 12 }; /** rct2: 0x00933495 */ -static constexpr const uint8_t mini_golf_peep_animation_frames_jump[] - = { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 }; +static constexpr const uint8_t mini_golf_peep_animation_frames_jump[] = { 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30 }; /** rct2: 0x009334A5 */ static constexpr const uint8_t mini_golf_peep_animation_frames_pickup_ball[] = { 15, 14, 13, 12 }; @@ -832,8 +834,8 @@ static void paint_mini_golf_hole_ab( uint32_t imageId; LocationXY16 boundBox, boundBoxOffset; - bool drewSupports - = wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); + bool drewSupports = wooden_a_supports_paint_setup( + session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0); paint_util_set_general_support_height(session, height + 32, 0x20); @@ -912,8 +914,8 @@ static void paint_mini_golf_hole_c( uint32_t imageId; LocationXY16 boundBox, boundBoxOffset; - bool drewSupports - = wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); + bool drewSupports = wooden_a_supports_paint_setup( + session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0); paint_util_set_general_support_height(session, height + 32, 0x20); @@ -986,8 +988,8 @@ static void paint_mini_golf_hole_d( int32_t supportType = (direction & 1); if (trackSequence == 2) supportType = 1 - supportType; - bool drewSupports - = wooden_a_supports_paint_setup(session, supportType, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); + bool drewSupports = wooden_a_supports_paint_setup( + session, supportType, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0); paint_util_set_general_support_height(session, height + 32, 0x20); @@ -1080,8 +1082,8 @@ static void paint_mini_golf_hole_e( int32_t supportType = (direction & 1); if (trackSequence == 2) supportType = 1 - supportType; - bool drewSupports - = wooden_a_supports_paint_setup(session, supportType, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); + bool drewSupports = wooden_a_supports_paint_setup( + session, supportType, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0); paint_util_set_general_support_height(session, height + 32, 0x20); diff --git a/src/openrct2/ride/gentle/MonorailCycles.cpp b/src/openrct2/ride/gentle/MonorailCycles.cpp index 5450e9f979..1cabc35d44 100644 --- a/src/openrct2/ride/gentle/MonorailCycles.cpp +++ b/src/openrct2/ride/gentle/MonorailCycles.cpp @@ -70,80 +70,84 @@ enum SPR_MONORAIL_CYCLES_S_BEND_RIGHT_NW_SE_PART_3 = 16869, }; -static constexpr const uint32_t monorail_cycles_track_pieces_flat[4] - = { SPR_MONORAIL_CYCLES_FLAT_SW_NE, SPR_MONORAIL_CYCLES_FLAT_NW_SE }; +static constexpr const uint32_t monorail_cycles_track_pieces_flat[4] = { SPR_MONORAIL_CYCLES_FLAT_SW_NE, + SPR_MONORAIL_CYCLES_FLAT_NW_SE }; -static constexpr const uint32_t monorail_cycles_track_pieces_flat_quarter_turn_5_tiles[4][5] - = { { - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_0, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_1, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_2, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_3, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_4, - }, - { - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_0, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_1, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_2, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_3, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_4, - }, - { - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_0, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_1, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_2, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_3, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_4, - }, - { - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_0, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_1, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_2, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_3, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_4, - } }; +static constexpr const uint32_t monorail_cycles_track_pieces_flat_quarter_turn_5_tiles[4][5] = { + { + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_0, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_1, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_2, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_3, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_4, + }, + { + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_0, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_1, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_2, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_3, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_4, + }, + { + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_0, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_1, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_2, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_3, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_4, + }, + { + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_0, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_1, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_2, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_3, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_4, + } +}; -static constexpr const uint32_t monorail_cycles_track_pieces_s_bend_left[2][4] - = { { - SPR_MONORAIL_CYCLES_S_BEND_LEFT_SW_NE_PART_0, - SPR_MONORAIL_CYCLES_S_BEND_LEFT_SW_NE_PART_1, - SPR_MONORAIL_CYCLES_S_BEND_LEFT_SW_NE_PART_2, - SPR_MONORAIL_CYCLES_S_BEND_LEFT_SW_NE_PART_3, - }, - { - SPR_MONORAIL_CYCLES_S_BEND_LEFT_NW_SE_PART_0, - SPR_MONORAIL_CYCLES_S_BEND_LEFT_NW_SE_PART_1, - SPR_MONORAIL_CYCLES_S_BEND_LEFT_NW_SE_PART_2, - SPR_MONORAIL_CYCLES_S_BEND_LEFT_NW_SE_PART_3, - } }; +static constexpr const uint32_t monorail_cycles_track_pieces_s_bend_left[2][4] = { + { + SPR_MONORAIL_CYCLES_S_BEND_LEFT_SW_NE_PART_0, + SPR_MONORAIL_CYCLES_S_BEND_LEFT_SW_NE_PART_1, + SPR_MONORAIL_CYCLES_S_BEND_LEFT_SW_NE_PART_2, + SPR_MONORAIL_CYCLES_S_BEND_LEFT_SW_NE_PART_3, + }, + { + SPR_MONORAIL_CYCLES_S_BEND_LEFT_NW_SE_PART_0, + SPR_MONORAIL_CYCLES_S_BEND_LEFT_NW_SE_PART_1, + SPR_MONORAIL_CYCLES_S_BEND_LEFT_NW_SE_PART_2, + SPR_MONORAIL_CYCLES_S_BEND_LEFT_NW_SE_PART_3, + } +}; -static constexpr const uint32_t monorail_cycles_track_pieces_s_bend_right[2][4] - = { { - SPR_MONORAIL_CYCLES_S_BEND_RIGHT_SW_NE_PART_0, - SPR_MONORAIL_CYCLES_S_BEND_RIGHT_SW_NE_PART_1, - SPR_MONORAIL_CYCLES_S_BEND_RIGHT_SW_NE_PART_2, - SPR_MONORAIL_CYCLES_S_BEND_RIGHT_SW_NE_PART_3, - }, - { - SPR_MONORAIL_CYCLES_S_BEND_RIGHT_NW_SE_PART_0, - SPR_MONORAIL_CYCLES_S_BEND_RIGHT_NW_SE_PART_1, - SPR_MONORAIL_CYCLES_S_BEND_RIGHT_NW_SE_PART_2, - SPR_MONORAIL_CYCLES_S_BEND_RIGHT_NW_SE_PART_3, - } }; +static constexpr const uint32_t monorail_cycles_track_pieces_s_bend_right[2][4] = { + { + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_SW_NE_PART_0, + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_SW_NE_PART_1, + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_SW_NE_PART_2, + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_SW_NE_PART_3, + }, + { + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_NW_SE_PART_0, + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_NW_SE_PART_1, + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_NW_SE_PART_2, + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_NW_SE_PART_3, + } +}; -static constexpr const uint32_t monorail_cycles_track_pieces_flat_quarter_turn_3_tiles[4][3] - = { { SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_0, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_1, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_2 }, - { SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_0, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_1, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_2 }, - { SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_0, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_1, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_2 }, - { SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_0, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_1, - SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_2 } }; +static constexpr const uint32_t monorail_cycles_track_pieces_flat_quarter_turn_3_tiles[4][3] = { + { SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_0, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_1, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_2 }, + { SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_0, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_1, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_2 }, + { SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_0, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_1, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_2 }, + { SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_0, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_1, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_2 } +}; static paint_struct* paint_monorail_cycles_util_7c( paint_session* session, @@ -358,8 +362,8 @@ static void paint_monorail_cycles_track_right_quarter_turn_5_tiles( defaultRightQuarterTurn5TilesBoundLengths, defaultRightQuarterTurn5TilesBoundOffsets); - int32_t supportHeight - = height + monorail_cycles_track_right_quarter_turn_5_tiles_support_height_offset[direction][trackSequence]; + int32_t supportHeight = height + + monorail_cycles_track_right_quarter_turn_5_tiles_support_height_offset[direction][trackSequence]; int32_t supportSpecial = monorail_cycles_track_right_quarter_turn_5_tiles_support_special[direction][trackSequence]; switch (trackSequence) { @@ -534,8 +538,8 @@ static void paint_monorail_cycles_track_s_bend_left( trackSequence = 3 - trackSequence; } - uint32_t imageId - = monorail_cycles_track_pieces_s_bend_left[direction & 1][trackSequence] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = monorail_cycles_track_pieces_s_bend_left[direction & 1][trackSequence] + | session->TrackColours[SCHEME_TRACK]; switch (trackSequence) { case 0: @@ -653,8 +657,8 @@ static void paint_monorail_cycles_track_s_bend_right( trackSequence = 3 - trackSequence; } - uint32_t imageId - = monorail_cycles_track_pieces_s_bend_right[direction & 1][trackSequence] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = monorail_cycles_track_pieces_s_bend_right[direction & 1][trackSequence] + | session->TrackColours[SCHEME_TRACK]; switch (trackSequence) { case 0: diff --git a/src/openrct2/ride/gentle/ObservationTower.cpp b/src/openrct2/ride/gentle/ObservationTower.cpp index 2fb9a73680..437c210e99 100644 --- a/src/openrct2/ride/gentle/ObservationTower.cpp +++ b/src/openrct2/ride/gentle/ObservationTower.cpp @@ -59,8 +59,8 @@ void vehicle_visual_observation_tower( baseImage_id = (vehicle->animation_frame * 2) + vehicleEntry->base_image_id + 8; } - image_id - = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | IMAGE_TYPE_REMAP_2_PLUS; + image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) + | IMAGE_TYPE_REMAP_2_PLUS; paint_struct* ps = sub_98197C(session, image_id, 0, 0, 2, 2, 41, z, -11, -11, z + 1); if (ps != nullptr) { diff --git a/src/openrct2/ride/shops/Facility.cpp b/src/openrct2/ride/shops/Facility.cpp index 2cccdf0820..78f03a2dc3 100644 --- a/src/openrct2/ride/shops/Facility.cpp +++ b/src/openrct2/ride/shops/Facility.cpp @@ -30,8 +30,8 @@ static void facility_paint_setup( int32_t height, const rct_tile_element* tileElement) { - bool hasSupports - = wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_3], nullptr); + bool hasSupports = wooden_a_supports_paint_setup( + session, direction & 1, 0, height, session->TrackColours[SCHEME_3], nullptr); Ride* ride = get_ride(rideIndex); rct_ride_entry* rideEntry = get_ride_entry(ride->subtype); @@ -57,8 +57,8 @@ static void facility_paint_setup( int32_t lengthY = (direction & 1) == 0 ? 2 : 28; if (hasSupports) { - uint32_t foundationImageId - = ((direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | session->TrackColours[SCHEME_3]; + uint32_t foundationImageId = ((direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) + | session->TrackColours[SCHEME_3]; sub_98197C( session, foundationImageId, diff --git a/src/openrct2/ride/shops/Shop.cpp b/src/openrct2/ride/shops/Shop.cpp index 01cf7d4d5e..9ce236ee8d 100644 --- a/src/openrct2/ride/shops/Shop.cpp +++ b/src/openrct2/ride/shops/Shop.cpp @@ -30,8 +30,8 @@ static void shop_paint_setup( int32_t height, const rct_tile_element* tileElement) { - bool hasSupports - = wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_3], nullptr); + bool hasSupports = wooden_a_supports_paint_setup( + session, direction & 1, 0, height, session->TrackColours[SCHEME_3], nullptr); Ride* ride = get_ride(rideIndex); rct_ride_entry* rideEntry = get_ride_entry(ride->subtype); @@ -53,8 +53,8 @@ static void shop_paint_setup( if (hasSupports) { - uint32_t foundationImageId - = ((direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | session->TrackColours[SCHEME_3]; + uint32_t foundationImageId = ((direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) + | session->TrackColours[SCHEME_3]; sub_98197C(session, foundationImageId, 0, 0, 28, 28, 45, height, 2, 2, height); sub_98199C(session, imageId, 0, 0, 28, 28, 45, height, 2, 2, height); diff --git a/src/openrct2/ride/thrill/3dCinema.cpp b/src/openrct2/ride/thrill/3dCinema.cpp index 626a47fb4f..9d98b26133 100644 --- a/src/openrct2/ride/thrill/3dCinema.cpp +++ b/src/openrct2/ride/thrill/3dCinema.cpp @@ -39,8 +39,8 @@ static void paint_3d_cinema_structure( uint32_t imageColourFlags = session->TrackColours[SCHEME_MISC]; if (imageColourFlags == IMAGE_TYPE_REMAP) { - imageColourFlags - = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2( + ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } uint32_t imageId = (rideEntry->vehicles[0].base_image_id + direction) | imageColourFlags; diff --git a/src/openrct2/ride/thrill/Enterprise.cpp b/src/openrct2/ride/thrill/Enterprise.cpp index 1732067f15..4222808e01 100644 --- a/src/openrct2/ride/thrill/Enterprise.cpp +++ b/src/openrct2/ride/thrill/Enterprise.cpp @@ -48,8 +48,8 @@ static void paint_enterprise_structure( uint32_t imageColourFlags = session->TrackColours[SCHEME_MISC]; if (imageColourFlags == IMAGE_TYPE_REMAP) { - imageColourFlags - = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2( + ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } uint32_t imageId = (baseImageId + imageOffset) | imageColourFlags; diff --git a/src/openrct2/ride/thrill/LaunchedFreefall.cpp b/src/openrct2/ride/thrill/LaunchedFreefall.cpp index e8dbdda721..8ecf03761d 100644 --- a/src/openrct2/ride/thrill/LaunchedFreefall.cpp +++ b/src/openrct2/ride/thrill/LaunchedFreefall.cpp @@ -24,8 +24,9 @@ enum SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT_TOP = 14566, }; -static constexpr const uint32_t launched_freefall_fence_sprites[] - = { SPR_FENCE_METAL_NE, SPR_FENCE_METAL_SE, SPR_FENCE_METAL_SW, SPR_FENCE_METAL_NW }; +static constexpr const uint32_t launched_freefall_fence_sprites[] = { + SPR_FENCE_METAL_NE, SPR_FENCE_METAL_SE, SPR_FENCE_METAL_SW, SPR_FENCE_METAL_NW +}; /** * diff --git a/src/openrct2/ride/thrill/MagicCarpet.cpp b/src/openrct2/ride/thrill/MagicCarpet.cpp index a9c8efb5dd..d1d1ea1f56 100644 --- a/src/openrct2/ride/thrill/MagicCarpet.cpp +++ b/src/openrct2/ride/thrill/MagicCarpet.cpp @@ -45,13 +45,14 @@ static constexpr const int16_t MagicCarpetOscillationZ[] = { -2, -1, 1, 5, 10, 77, 76, 74, 70, 65, 59, 52, 45, 37, 30, 23, 16, 10, 5, 1, -1 }; /** rct2: 0x01428260 */ -static constexpr const int8_t MagicCarpetOscillationXY[] - = { 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 const int8_t MagicCarpetOscillationXY[] = { 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 }; /** rct2: 0x014281F0 */ -static constexpr const bound_box MagicCarpetBounds[] - = { { 0, 8, 32, 16 }, { 8, 0, 16, 32 }, { 0, 8, 32, 16 }, { 8, 0, 16, 32 } }; +static constexpr const bound_box MagicCarpetBounds[] = { + { 0, 8, 32, 16 }, { 8, 0, 16, 32 }, { 0, 8, 32, 16 }, { 8, 0, 16, 32 } +}; static rct_vehicle* get_first_vehicle(Ride* ride) { @@ -169,8 +170,8 @@ static void paint_magic_carpet_vehicle( uint32_t imageColourFlags = session->TrackColours[SCHEME_MISC]; if (imageColourFlags == IMAGE_TYPE_REMAP) { - imageColourFlags - = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2( + ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } int8_t directionalOffset = MagicCarpetOscillationXY[swingImageId]; @@ -235,8 +236,8 @@ static void paint_magic_carpet_vehicle( } /** rct2: 0x00899104 */ -static void - paint_magic_carpet_structure(paint_session* session, Ride* ride, uint8_t direction, int8_t axisOffset, uint16_t height) +static void paint_magic_carpet_structure( + paint_session* session, Ride* ride, uint8_t direction, int8_t axisOffset, uint16_t height) { const rct_tile_element* savedTileElement = static_cast(session->CurrentlyDrawnItem); rct_vehicle* vehicle = get_first_vehicle(ride); diff --git a/src/openrct2/ride/thrill/MotionSimulator.cpp b/src/openrct2/ride/thrill/MotionSimulator.cpp index f5f4d9f388..c85bafe1d5 100644 --- a/src/openrct2/ride/thrill/MotionSimulator.cpp +++ b/src/openrct2/ride/thrill/MotionSimulator.cpp @@ -71,8 +71,8 @@ static void paint_motionsimulator_vehicle( uint32_t imageColourFlags = session->TrackColours[SCHEME_MISC]; if (imageColourFlags == IMAGE_TYPE_REMAP) { - imageColourFlags - = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2( + ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } simulatorImageId |= imageColourFlags; diff --git a/src/openrct2/ride/thrill/PirateShip.cpp b/src/openrct2/ride/thrill/PirateShip.cpp index 1fefa90bee..9df6826698 100644 --- a/src/openrct2/ride/thrill/PirateShip.cpp +++ b/src/openrct2/ride/thrill/PirateShip.cpp @@ -55,8 +55,8 @@ static constexpr const uint32_t pirate_ship_frame_sprites[][2] = { }; /** rct2: 0x4AF254 */ -static void - paint_pirate_ship_structure(paint_session* session, Ride* ride, uint8_t direction, int8_t axisOffset, uint16_t height) +static void paint_pirate_ship_structure( + paint_session* session, Ride* ride, uint8_t direction, int8_t axisOffset, uint16_t height) { uint32_t imageId, baseImageId; @@ -100,8 +100,8 @@ static void uint32_t imageColourFlags = session->TrackColours[SCHEME_MISC]; if (imageColourFlags == IMAGE_TYPE_REMAP) { - imageColourFlags - = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2( + ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } pirate_ship_bound_box bounds = pirate_ship_data[direction]; @@ -148,8 +148,8 @@ static void } int32_t frameNum = offset + (direction >> 1); - imageColourFlags - = SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[peep], vehicle->peep_tshirt_colours[peep + 1]); + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2( + vehicle->peep_tshirt_colours[peep], vehicle->peep_tshirt_colours[peep + 1]); imageId = (baseImageId + frameNum) | imageColourFlags; sub_98199C( session, @@ -172,8 +172,8 @@ static void } frameNum = offset + ((direction >> 1) ^ 1); - imageColourFlags - = SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[peep], vehicle->peep_tshirt_colours[peep + 1]); + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2( + vehicle->peep_tshirt_colours[peep], vehicle->peep_tshirt_colours[peep + 1]); imageId = (baseImageId + frameNum) | imageColourFlags; sub_98199C( session, diff --git a/src/openrct2/ride/thrill/SwingingInverterShip.cpp b/src/openrct2/ride/thrill/SwingingInverterShip.cpp index 1615e44ea2..2ac5eefb9f 100644 --- a/src/openrct2/ride/thrill/SwingingInverterShip.cpp +++ b/src/openrct2/ride/thrill/SwingingInverterShip.cpp @@ -29,8 +29,9 @@ struct swinging_inverter_ship_bound_box }; /** rct2: 0x01428020 */ -static constexpr const swinging_inverter_ship_bound_box swinging_inverter_ship_bounds[] - = { { 32, 16, 0, 8 }, { 16, 32, 8, 0 }, { 32, 16, 0, 8 }, { 16, 32, 8, 0 } }; +static constexpr const swinging_inverter_ship_bound_box swinging_inverter_ship_bounds[] = { + { 32, 16, 0, 8 }, { 16, 32, 8, 0 }, { 32, 16, 0, 8 }, { 16, 32, 8, 0 } +}; enum { @@ -70,8 +71,8 @@ static void paint_swinging_inverter_ship_structure( int32_t rotation = (int8_t)vehicle->vehicle_sprite_type; if (rotation != 0) { - vehicleImageId - = rideEntry->vehicles[0].base_image_id + swinging_inverter_ship_animating_base_sprite_offset[direction]; + vehicleImageId = rideEntry->vehicles[0].base_image_id + + swinging_inverter_ship_animating_base_sprite_offset[direction]; if (direction & 2) { diff --git a/src/openrct2/ride/thrill/Twist.cpp b/src/openrct2/ride/thrill/Twist.cpp index 0fe07bc6b6..d1837718b2 100644 --- a/src/openrct2/ride/thrill/Twist.cpp +++ b/src/openrct2/ride/thrill/Twist.cpp @@ -51,8 +51,8 @@ static void paint_twist_structure( uint32_t imageColourFlags = session->TrackColours[SCHEME_MISC]; if (imageColourFlags == IMAGE_TYPE_REMAP) { - imageColourFlags - = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2( + ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } uint32_t structureFrameNum = frameNum % 24; diff --git a/src/openrct2/ride/transport/Chairlift.cpp b/src/openrct2/ride/transport/Chairlift.cpp index 22b8807c86..27063db21c 100644 --- a/src/openrct2/ride/transport/Chairlift.cpp +++ b/src/openrct2/ride/transport/Chairlift.cpp @@ -109,8 +109,8 @@ static void chairlift_paint_util_draw_supports(paint_session* session, int32_t s } } -static const rct_tile_element* - chairlift_paint_util_map_get_track_element_at_from_ride_fuzzy(int32_t x, int32_t y, int32_t z, int32_t rideIndex) +static const rct_tile_element* chairlift_paint_util_map_get_track_element_at_from_ride_fuzzy( + int32_t x, int32_t y, int32_t z, int32_t rideIndex) { const rct_tile_element* tileElement = map_get_first_element_at(x >> 5, y >> 5); if (tileElement == nullptr) diff --git a/src/openrct2/ride/transport/MiniatureRailway.cpp b/src/openrct2/ride/transport/MiniatureRailway.cpp index e345c2e4cc..15f9ae130c 100644 --- a/src/openrct2/ride/transport/MiniatureRailway.cpp +++ b/src/openrct2/ride/transport/MiniatureRailway.cpp @@ -134,8 +134,9 @@ enum SPR_MINIATURE_RAILWAY_DIAG_25_DEG_UP_S_N = 23452, }; -static constexpr const uint32_t miniature_railway_track_floor[4] - = { SPR_FLOOR_PLANKS, SPR_FLOOR_PLANKS_90_DEG, SPR_FLOOR_PLANKS, SPR_FLOOR_PLANKS_90_DEG }; +static constexpr const uint32_t miniature_railway_track_floor[4] = { + SPR_FLOOR_PLANKS, SPR_FLOOR_PLANKS_90_DEG, SPR_FLOOR_PLANKS, SPR_FLOOR_PLANKS_90_DEG +}; static constexpr const uint32_t miniature_railway_track_pieces_flat[4] = { SPR_MINIATURE_RAILWAY_FLAT_SW_NE, @@ -144,8 +145,9 @@ static constexpr const uint32_t miniature_railway_track_pieces_flat[4] = { SPR_MINIATURE_RAILWAY_FLAT_NW_SE, }; -static constexpr const uint32_t miniature_railway_station_floor[4] - = { SPR_STATION_BASE_A_SW_NE, SPR_STATION_BASE_A_NW_SE, SPR_STATION_BASE_A_SW_NE, SPR_STATION_BASE_A_NW_SE }; +static constexpr const uint32_t miniature_railway_station_floor[4] = { + SPR_STATION_BASE_A_SW_NE, SPR_STATION_BASE_A_NW_SE, SPR_STATION_BASE_A_SW_NE, SPR_STATION_BASE_A_NW_SE +}; static constexpr const uint32_t miniature_railway_track_pieces_flat_station[4] = { SPR_MINIATURE_RAILWAY_FLAT_NO_BASE_SW_NE, @@ -154,35 +156,36 @@ static constexpr const uint32_t miniature_railway_track_pieces_flat_station[4] = SPR_MINIATURE_RAILWAY_FLAT_NO_BASE_NW_SE, }; -static constexpr const uint32_t miniature_railway_track_pieces_flat_quarter_turn_5_tiles[4][5] - = { { - SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SW_SE_PART_0, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SW_SE_PART_1, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SW_SE_PART_2, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SW_SE_PART_3, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SW_SE_PART_4, - }, - { - SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_NW_SW_PART_0, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_NW_SW_PART_1, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_NW_SW_PART_2, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_NW_SW_PART_3, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_NW_SW_PART_4, - }, - { - SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_NE_NW_PART_0, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_NE_NW_PART_1, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_NE_NW_PART_2, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_NE_NW_PART_3, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_NE_NW_PART_4, - }, - { - SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SE_NE_PART_0, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SE_NE_PART_1, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SE_NE_PART_2, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SE_NE_PART_3, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SE_NE_PART_4, - } }; +static constexpr const uint32_t miniature_railway_track_pieces_flat_quarter_turn_5_tiles[4][5] = { + { + SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SW_SE_PART_0, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SW_SE_PART_1, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SW_SE_PART_2, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SW_SE_PART_3, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SW_SE_PART_4, + }, + { + SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_NW_SW_PART_0, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_NW_SW_PART_1, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_NW_SW_PART_2, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_NW_SW_PART_3, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_NW_SW_PART_4, + }, + { + SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_NE_NW_PART_0, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_NE_NW_PART_1, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_NE_NW_PART_2, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_NE_NW_PART_3, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_NE_NW_PART_4, + }, + { + SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SE_NE_PART_0, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SE_NE_PART_1, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SE_NE_PART_2, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SE_NE_PART_3, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SE_NE_PART_4, + } +}; static constexpr const uint32_t miniature_railway_track_pieces_25_deg_up[4] = { SPR_MINIATURE_RAILWAY_25_DEG_UP_SW_NE, @@ -205,47 +208,50 @@ static constexpr const uint32_t miniature_railway_track_pieces_25_deg_up_to_flat SPR_MINIATURE_RAILWAY_25_DEG_UP_TO_FLAT_SE_NW, }; -static constexpr const uint32_t miniature_railway_track_pieces_s_bend_left[2][4] - = { { - SPR_MINIATURE_RAILWAY_S_BEND_LEFT_SW_NE_PART_0, - SPR_MINIATURE_RAILWAY_S_BEND_LEFT_SW_NE_PART_1, - SPR_MINIATURE_RAILWAY_S_BEND_LEFT_SW_NE_PART_2, - SPR_MINIATURE_RAILWAY_S_BEND_LEFT_SW_NE_PART_3, - }, - { - SPR_MINIATURE_RAILWAY_S_BEND_LEFT_SE_NW_PART_3, - SPR_MINIATURE_RAILWAY_S_BEND_LEFT_SE_NW_PART_2, - SPR_MINIATURE_RAILWAY_S_BEND_LEFT_SE_NW_PART_1, - SPR_MINIATURE_RAILWAY_S_BEND_LEFT_SE_NW_PART_0, - } }; +static constexpr const uint32_t miniature_railway_track_pieces_s_bend_left[2][4] = { + { + SPR_MINIATURE_RAILWAY_S_BEND_LEFT_SW_NE_PART_0, + SPR_MINIATURE_RAILWAY_S_BEND_LEFT_SW_NE_PART_1, + SPR_MINIATURE_RAILWAY_S_BEND_LEFT_SW_NE_PART_2, + SPR_MINIATURE_RAILWAY_S_BEND_LEFT_SW_NE_PART_3, + }, + { + SPR_MINIATURE_RAILWAY_S_BEND_LEFT_SE_NW_PART_3, + SPR_MINIATURE_RAILWAY_S_BEND_LEFT_SE_NW_PART_2, + SPR_MINIATURE_RAILWAY_S_BEND_LEFT_SE_NW_PART_1, + SPR_MINIATURE_RAILWAY_S_BEND_LEFT_SE_NW_PART_0, + } +}; -static constexpr const uint32_t miniature_railway_track_pieces_s_bend_right[2][4] - = { { - SPR_MINIATURE_RAILWAY_S_BEND_RIGHT_SW_NE_PART_0, - SPR_MINIATURE_RAILWAY_S_BEND_RIGHT_SW_NE_PART_1, - SPR_MINIATURE_RAILWAY_S_BEND_RIGHT_SW_NE_PART_2, - SPR_MINIATURE_RAILWAY_S_BEND_RIGHT_SW_NE_PART_3, - }, - { - SPR_MINIATURE_RAILWAY_S_BEND_RIGHT_SE_NW_PART_3, - SPR_MINIATURE_RAILWAY_S_BEND_RIGHT_SE_NW_PART_2, - SPR_MINIATURE_RAILWAY_S_BEND_RIGHT_SE_NW_PART_1, - SPR_MINIATURE_RAILWAY_S_BEND_RIGHT_SE_NW_PART_0, - } }; +static constexpr const uint32_t miniature_railway_track_pieces_s_bend_right[2][4] = { + { + SPR_MINIATURE_RAILWAY_S_BEND_RIGHT_SW_NE_PART_0, + SPR_MINIATURE_RAILWAY_S_BEND_RIGHT_SW_NE_PART_1, + SPR_MINIATURE_RAILWAY_S_BEND_RIGHT_SW_NE_PART_2, + SPR_MINIATURE_RAILWAY_S_BEND_RIGHT_SW_NE_PART_3, + }, + { + SPR_MINIATURE_RAILWAY_S_BEND_RIGHT_SE_NW_PART_3, + SPR_MINIATURE_RAILWAY_S_BEND_RIGHT_SE_NW_PART_2, + SPR_MINIATURE_RAILWAY_S_BEND_RIGHT_SE_NW_PART_1, + SPR_MINIATURE_RAILWAY_S_BEND_RIGHT_SE_NW_PART_0, + } +}; -static constexpr const uint32_t miniature_railway_track_pieces_flat_quarter_turn_3_tiles[4][3] - = { { SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_SW_SE_PART_0, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_SW_SE_PART_1, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_SW_SE_PART_2 }, - { SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_NW_SW_PART_0, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_NW_SW_PART_1, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_NW_SW_PART_2 }, - { SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_NE_NW_PART_0, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_NE_NW_PART_1, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_NE_NW_PART_2 }, - { SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_SE_NE_PART_0, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_SE_NE_PART_1, - SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_SE_NE_PART_2 } }; +static constexpr const uint32_t miniature_railway_track_pieces_flat_quarter_turn_3_tiles[4][3] = { + { SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_SW_SE_PART_0, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_SW_SE_PART_1, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_SW_SE_PART_2 }, + { SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_NW_SW_PART_0, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_NW_SW_PART_1, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_NW_SW_PART_2 }, + { SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_NE_NW_PART_0, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_NE_NW_PART_1, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_NE_NW_PART_2 }, + { SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_SE_NE_PART_0, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_SE_NE_PART_1, + SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_SE_NE_PART_2 } +}; static constexpr const uint32_t miniature_railway_track_pieces_right_eight_to_diag[4][4] = { { @@ -604,8 +610,8 @@ static void paint_miniature_railway_track_flat( paintGrooved = true; } - bool isSupported - = wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); + bool isSupported = wooden_a_supports_paint_setup( + session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); uint32_t imageId, imageIdAlt; // In the following 3 calls to sub_98197C_rotated/sub_98199C_rotated, we add 1 to the @@ -972,8 +978,9 @@ static constexpr const uint32_t miniature_railway_right_quarter_turn_5_tiles_tra SPR_FLOOR_PLANKS }, }; -static constexpr const int8_t right_quarter_turn_5_supports_type[4][7] - = { { 0, -1, 4, 2, -1, 4, 1 }, { 1, -1, 5, 3, -1, 5, 0 }, { 0, -1, 2, 4, -1, 2, 1 }, { 1, -1, 3, 5, -1, 3, 0 } }; +static constexpr const int8_t right_quarter_turn_5_supports_type[4][7] = { + { 0, -1, 4, 2, -1, 4, 1 }, { 1, -1, 5, 3, -1, 5, 0 }, { 0, -1, 2, 4, -1, 2, 1 }, { 1, -1, 3, 5, -1, 3, 0 } +}; static constexpr const int8_t miniature_railway_right_quarter_turn_5_tiles_sprite_map[] = { 0, -1, 1, 2, -1, 3, 4 }; @@ -1078,8 +1085,8 @@ static void paint_miniature_railway_track_right_quarter_turn_5_tiles( blockedSegments = SEGMENT_D0 | SEGMENT_C4 | SEGMENT_D4 | SEGMENT_BC | SEGMENT_C0 | SEGMENT_CC; break; case 3: - blockedSegments - = SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4; + blockedSegments = SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 + | SEGMENT_D4; break; case 4: blockedSegments = SEGMENT_B4 | SEGMENT_C8 | SEGMENT_CC; @@ -1111,17 +1118,19 @@ static void paint_miniature_railway_track_left_quarter_turn_5_tiles( session, rideIndex, trackSequence, (direction + 1) % 4, height, tileElement); } -static constexpr const int8_t s_bend_left_supports_type[4][4] - = { { 0, 5, 3, 0 }, { 1, 2, 4, 1 }, { 0, 5, 3, 0 }, { 1, 2, 4, 1 } }; +static constexpr const int8_t s_bend_left_supports_type[4][4] = { + { 0, 5, 3, 0 }, { 1, 2, 4, 1 }, { 0, 5, 3, 0 }, { 1, 2, 4, 1 } +}; -static constexpr const uint32_t miniature_railway_s_bend_left_tiles_track_floor[2][4] - = { { SPR_FLOOR_PLANKS, SPR_FLOOR_PLANKS_W_SEGMENT, SPR_FLOOR_PLANKS_E_SEGMENT, SPR_FLOOR_PLANKS }, - { - SPR_FLOOR_PLANKS_90_DEG, - SPR_FLOOR_PLANKS_N_SEGMENT, - SPR_FLOOR_PLANKS_S_SEGMENT, - SPR_FLOOR_PLANKS_90_DEG, - } }; +static constexpr const uint32_t miniature_railway_s_bend_left_tiles_track_floor[2][4] = { + { SPR_FLOOR_PLANKS, SPR_FLOOR_PLANKS_W_SEGMENT, SPR_FLOOR_PLANKS_E_SEGMENT, SPR_FLOOR_PLANKS }, + { + SPR_FLOOR_PLANKS_90_DEG, + SPR_FLOOR_PLANKS_N_SEGMENT, + SPR_FLOOR_PLANKS_S_SEGMENT, + SPR_FLOOR_PLANKS_90_DEG, + } +}; /** rct2: 0x8AD150 */ static void paint_miniature_railway_track_s_bend_left( @@ -1159,8 +1168,8 @@ static void paint_miniature_railway_track_s_bend_left( { 32, 27 }, }; - uint32_t imageId - = miniature_railway_track_pieces_s_bend_left[direction & 1][trackSequence] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = miniature_railway_track_pieces_s_bend_left[direction & 1][trackSequence] + | session->TrackColours[SCHEME_TRACK]; LocationXY16 offset = offsetList[trackSequence]; LocationXY16 bounds = boundsList[trackSequence]; @@ -1186,8 +1195,8 @@ static void paint_miniature_railway_track_s_bend_left( | session->TrackColours[SCHEME_SUPPORTS]; sub_98197C_rotated(session, direction, imageId, 0, 0, bounds.x, bounds.y, 2, height, offset.x, offset.y, height); - imageId - = miniature_railway_track_pieces_s_bend_left[direction & 1][trackSequence] | session->TrackColours[SCHEME_TRACK]; + imageId = miniature_railway_track_pieces_s_bend_left[direction & 1][trackSequence] + | session->TrackColours[SCHEME_TRACK]; sub_98199C_rotated( session, direction, @@ -1238,17 +1247,19 @@ static void paint_miniature_railway_track_s_bend_left( paint_util_set_general_support_height(session, height + 32, 0x20); } -static constexpr const int8_t s_bend_right_supports_type[4][4] - = { { 0, 4, 2, 0 }, { 1, 5, 3, 1 }, { 0, 4, 2, 0 }, { 1, 5, 3, 1 } }; +static constexpr const int8_t s_bend_right_supports_type[4][4] = { + { 0, 4, 2, 0 }, { 1, 5, 3, 1 }, { 0, 4, 2, 0 }, { 1, 5, 3, 1 } +}; -static constexpr const uint32_t miniature_railway_s_bend_right_tiles_track_floor[2][4] - = { { SPR_FLOOR_PLANKS, SPR_FLOOR_PLANKS_S_SEGMENT, SPR_FLOOR_PLANKS_N_SEGMENT, SPR_FLOOR_PLANKS }, - { - SPR_FLOOR_PLANKS_90_DEG, - SPR_FLOOR_PLANKS_W_SEGMENT, - SPR_FLOOR_PLANKS_E_SEGMENT, - SPR_FLOOR_PLANKS_90_DEG, - } }; +static constexpr const uint32_t miniature_railway_s_bend_right_tiles_track_floor[2][4] = { + { SPR_FLOOR_PLANKS, SPR_FLOOR_PLANKS_S_SEGMENT, SPR_FLOOR_PLANKS_N_SEGMENT, SPR_FLOOR_PLANKS }, + { + SPR_FLOOR_PLANKS_90_DEG, + SPR_FLOOR_PLANKS_W_SEGMENT, + SPR_FLOOR_PLANKS_E_SEGMENT, + SPR_FLOOR_PLANKS_90_DEG, + } +}; /** rct2: 0x008AD160 */ static void paint_miniature_railway_track_s_bend_right( @@ -1286,8 +1297,8 @@ static void paint_miniature_railway_track_s_bend_right( { 32, 27 }, }; - uint32_t imageId - = miniature_railway_track_pieces_s_bend_right[direction & 1][trackSequence] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = miniature_railway_track_pieces_s_bend_right[direction & 1][trackSequence] + | session->TrackColours[SCHEME_TRACK]; LocationXY16 offset = offsetList[trackSequence]; LocationXY16 bounds = boundsList[trackSequence]; if (isSupported == false) @@ -1312,8 +1323,8 @@ static void paint_miniature_railway_track_s_bend_right( | session->TrackColours[SCHEME_SUPPORTS]; sub_98197C_rotated(session, direction, imageId, 0, 0, bounds.x, bounds.y, 2, height, offset.x, offset.y, height); - imageId - = miniature_railway_track_pieces_s_bend_right[direction & 1][trackSequence] | session->TrackColours[SCHEME_TRACK]; + imageId = miniature_railway_track_pieces_s_bend_right[direction & 1][trackSequence] + | session->TrackColours[SCHEME_TRACK]; sub_98199C_rotated( session, direction, @@ -1365,27 +1376,28 @@ static void paint_miniature_railway_track_s_bend_right( paint_util_set_general_support_height(session, height + 32, 0x20); } -static constexpr const uint32_t miniature_railway_right_quarter_turn_3_tile_track_floor[4][3] - = { { - SPR_FLOOR_PLANKS_S_SEGMENT, - 0, - SPR_FLOOR_PLANKS_S_SEGMENT, - }, - { - SPR_FLOOR_PLANKS_W_SEGMENT, - 0, - SPR_FLOOR_PLANKS_W_SEGMENT, - }, - { - SPR_FLOOR_PLANKS_N_SEGMENT, - 0, - SPR_FLOOR_PLANKS_N_SEGMENT, - }, - { - SPR_FLOOR_PLANKS_E_SEGMENT, - 0, - SPR_FLOOR_PLANKS_E_SEGMENT, - } }; +static constexpr const uint32_t miniature_railway_right_quarter_turn_3_tile_track_floor[4][3] = { + { + SPR_FLOOR_PLANKS_S_SEGMENT, + 0, + SPR_FLOOR_PLANKS_S_SEGMENT, + }, + { + SPR_FLOOR_PLANKS_W_SEGMENT, + 0, + SPR_FLOOR_PLANKS_W_SEGMENT, + }, + { + SPR_FLOOR_PLANKS_N_SEGMENT, + 0, + SPR_FLOOR_PLANKS_N_SEGMENT, + }, + { + SPR_FLOOR_PLANKS_E_SEGMENT, + 0, + SPR_FLOOR_PLANKS_E_SEGMENT, + } +}; static constexpr const LocationXYZ16 miniature_railway_right_quarter_turn_3_tile_bound_offsets[4][3] = { { { 0, 6, 0 }, @@ -1463,8 +1475,8 @@ static void paint_miniature_railway_track_right_quarter_turn_3_tiles( int32_t index = right_quarter_turn_3_tiles_sprite_map[trackSequence]; - uint32_t imageId - = miniature_railway_track_pieces_flat_quarter_turn_3_tiles[direction][index] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = miniature_railway_track_pieces_flat_quarter_turn_3_tiles[direction][index] + | session->TrackColours[SCHEME_TRACK]; LocationXY16 offset = defaultRightQuarterTurn3TilesOffsets[direction][index]; LocationXY16 boundsLength = defaultRightQuarterTurn3TilesBoundLengths[direction][index]; LocationXYZ16 boundsOffset = { offset.x, offset.y, 0 }; @@ -1771,8 +1783,8 @@ static void paint_miniature_railway_track_right_eighth_to_diag( int8_t index = paint_miniature_railway_eighth_to_diag_index[trackSequence]; if (index >= 0) { - imageId - = miniature_railway_track_pieces_right_eight_to_diag[direction][index] | session->TrackColours[SCHEME_TRACK]; + imageId = miniature_railway_track_pieces_right_eight_to_diag[direction][index] + | session->TrackColours[SCHEME_TRACK]; LocationXY16 offset = miniature_railway_track_pieces_right_eight_to_diag_offset[direction][index]; LocationXYZ16 bounds = miniature_railway_track_pieces_right_eight_to_diag_bounds[direction][index]; if (isLeftEighthToOrthog) @@ -1794,8 +1806,8 @@ static void paint_miniature_railway_track_right_eighth_to_diag( int8_t index = paint_miniature_railway_eighth_to_diag_index[trackSequence]; if (index >= 0) { - imageId - = miniature_railway_track_pieces_right_eight_to_diag[direction][index] | session->TrackColours[SCHEME_TRACK]; + imageId = miniature_railway_track_pieces_right_eight_to_diag[direction][index] + | session->TrackColours[SCHEME_TRACK]; offset = miniature_railway_track_pieces_right_eight_to_diag_offset[direction][index]; bounds = miniature_railway_track_pieces_right_eight_to_diag_bounds[direction][index]; sub_98199C(session, imageId, 0, 0, bounds.x, bounds.y, (int8_t)bounds.z, height, offset.x, offset.y, height); @@ -1904,8 +1916,8 @@ static void miniature_railway_track_diag_flat( floorImage = floors[supportType].image_id; floorBoundSize = floors[supportType].bound_size; floorBoundOffset = floors[supportType].bound_offset; - isSupported - = wooden_a_supports_paint_setup(session, supportType, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); + isSupported = wooden_a_supports_paint_setup( + session, supportType, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); } if (direction == 1 && trackSequence == 3) @@ -2097,8 +2109,8 @@ static void miniature_railway_track_diag_flat_to_25_deg_up( floorImage = floors[supportType].image_id; floorBoundSize = floors[supportType].bound_size; floorBoundOffset = floors[supportType].bound_offset; - hasSupports - = wooden_a_supports_paint_setup(session, supportType, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); + hasSupports = wooden_a_supports_paint_setup( + session, supportType, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); } if (direction == 1 && trackSequence == 3) @@ -2486,8 +2498,8 @@ static void miniature_railway_track_diag_25_deg_down_to_flat( floorImage = floors[supportType].image_id; floorBoundSize = floors[supportType].bound_size; floorBoundOffset = floors[supportType].bound_offset; - hasSupports - = wooden_a_supports_paint_setup(session, supportType, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); + hasSupports = wooden_a_supports_paint_setup( + session, supportType, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); } if (direction == 1 && trackSequence == 3) diff --git a/src/openrct2/ride/transport/Monorail.cpp b/src/openrct2/ride/transport/Monorail.cpp index ba72c75631..e7136b1b34 100644 --- a/src/openrct2/ride/transport/Monorail.cpp +++ b/src/openrct2/ride/transport/Monorail.cpp @@ -138,35 +138,36 @@ static constexpr const uint32_t monorail_track_pieces_flat[4] = { SPR_MONORAIL_FLAT_NW_SE, }; -static constexpr const uint32_t monorail_track_pieces_flat_quarter_turn_5_tiles[4][5] - = { { - SPR_MONORAIL_QUARTER_TURN_5_TILES_SW_SE_PART_0, - SPR_MONORAIL_QUARTER_TURN_5_TILES_SW_SE_PART_1, - SPR_MONORAIL_QUARTER_TURN_5_TILES_SW_SE_PART_2, - SPR_MONORAIL_QUARTER_TURN_5_TILES_SW_SE_PART_3, - SPR_MONORAIL_QUARTER_TURN_5_TILES_SW_SE_PART_4, - }, - { - SPR_MONORAIL_QUARTER_TURN_5_TILES_NW_SW_PART_0, - SPR_MONORAIL_QUARTER_TURN_5_TILES_NW_SW_PART_1, - SPR_MONORAIL_QUARTER_TURN_5_TILES_NW_SW_PART_2, - SPR_MONORAIL_QUARTER_TURN_5_TILES_NW_SW_PART_3, - SPR_MONORAIL_QUARTER_TURN_5_TILES_NW_SW_PART_4, - }, - { - SPR_MONORAIL_QUARTER_TURN_5_TILES_NE_NW_PART_0, - SPR_MONORAIL_QUARTER_TURN_5_TILES_NE_NW_PART_1, - SPR_MONORAIL_QUARTER_TURN_5_TILES_NE_NW_PART_2, - SPR_MONORAIL_QUARTER_TURN_5_TILES_NE_NW_PART_3, - SPR_MONORAIL_QUARTER_TURN_5_TILES_NE_NW_PART_4, - }, - { - SPR_MONORAIL_QUARTER_TURN_5_TILES_SE_NE_PART_0, - SPR_MONORAIL_QUARTER_TURN_5_TILES_SE_NE_PART_1, - SPR_MONORAIL_QUARTER_TURN_5_TILES_SE_NE_PART_2, - SPR_MONORAIL_QUARTER_TURN_5_TILES_SE_NE_PART_3, - SPR_MONORAIL_QUARTER_TURN_5_TILES_SE_NE_PART_4, - } }; +static constexpr const uint32_t monorail_track_pieces_flat_quarter_turn_5_tiles[4][5] = { + { + SPR_MONORAIL_QUARTER_TURN_5_TILES_SW_SE_PART_0, + SPR_MONORAIL_QUARTER_TURN_5_TILES_SW_SE_PART_1, + SPR_MONORAIL_QUARTER_TURN_5_TILES_SW_SE_PART_2, + SPR_MONORAIL_QUARTER_TURN_5_TILES_SW_SE_PART_3, + SPR_MONORAIL_QUARTER_TURN_5_TILES_SW_SE_PART_4, + }, + { + SPR_MONORAIL_QUARTER_TURN_5_TILES_NW_SW_PART_0, + SPR_MONORAIL_QUARTER_TURN_5_TILES_NW_SW_PART_1, + SPR_MONORAIL_QUARTER_TURN_5_TILES_NW_SW_PART_2, + SPR_MONORAIL_QUARTER_TURN_5_TILES_NW_SW_PART_3, + SPR_MONORAIL_QUARTER_TURN_5_TILES_NW_SW_PART_4, + }, + { + SPR_MONORAIL_QUARTER_TURN_5_TILES_NE_NW_PART_0, + SPR_MONORAIL_QUARTER_TURN_5_TILES_NE_NW_PART_1, + SPR_MONORAIL_QUARTER_TURN_5_TILES_NE_NW_PART_2, + SPR_MONORAIL_QUARTER_TURN_5_TILES_NE_NW_PART_3, + SPR_MONORAIL_QUARTER_TURN_5_TILES_NE_NW_PART_4, + }, + { + SPR_MONORAIL_QUARTER_TURN_5_TILES_SE_NE_PART_0, + SPR_MONORAIL_QUARTER_TURN_5_TILES_SE_NE_PART_1, + SPR_MONORAIL_QUARTER_TURN_5_TILES_SE_NE_PART_2, + SPR_MONORAIL_QUARTER_TURN_5_TILES_SE_NE_PART_3, + SPR_MONORAIL_QUARTER_TURN_5_TILES_SE_NE_PART_4, + } +}; static constexpr const uint32_t monorail_track_pieces_25_deg_up[4] = { SPR_MONORAIL_25_DEG_UP_SW_NE, @@ -215,19 +216,20 @@ static constexpr const uint32_t monorail_track_pieces_s_bend_right[2][4] = { { SPR_MONORAIL_S_BEND_RIGHT_SE_NW_PART_0, } }; -static constexpr const uint32_t monorail_track_pieces_flat_quarter_turn_3_tiles[4][3] - = { { SPR_MONORAIL_QUARTER_TURN_3_TILES_SW_SE_PART_0, - SPR_MONORAIL_QUARTER_TURN_3_TILES_SW_SE_PART_1, - SPR_MONORAIL_QUARTER_TURN_3_TILES_SW_SE_PART_2 }, - { SPR_MONORAIL_QUARTER_TURN_3_TILES_NW_SW_PART_0, - SPR_MONORAIL_QUARTER_TURN_3_TILES_NW_SW_PART_1, - SPR_MONORAIL_QUARTER_TURN_3_TILES_NW_SW_PART_2 }, - { SPR_MONORAIL_QUARTER_TURN_3_TILES_NE_NW_PART_0, - SPR_MONORAIL_QUARTER_TURN_3_TILES_NE_NW_PART_1, - SPR_MONORAIL_QUARTER_TURN_3_TILES_NE_NW_PART_2 }, - { SPR_MONORAIL_QUARTER_TURN_3_TILES_SE_NE_PART_0, - SPR_MONORAIL_QUARTER_TURN_3_TILES_SE_NE_PART_1, - SPR_MONORAIL_QUARTER_TURN_3_TILES_SE_NE_PART_2 } }; +static constexpr const uint32_t monorail_track_pieces_flat_quarter_turn_3_tiles[4][3] = { + { SPR_MONORAIL_QUARTER_TURN_3_TILES_SW_SE_PART_0, + SPR_MONORAIL_QUARTER_TURN_3_TILES_SW_SE_PART_1, + SPR_MONORAIL_QUARTER_TURN_3_TILES_SW_SE_PART_2 }, + { SPR_MONORAIL_QUARTER_TURN_3_TILES_NW_SW_PART_0, + SPR_MONORAIL_QUARTER_TURN_3_TILES_NW_SW_PART_1, + SPR_MONORAIL_QUARTER_TURN_3_TILES_NW_SW_PART_2 }, + { SPR_MONORAIL_QUARTER_TURN_3_TILES_NE_NW_PART_0, + SPR_MONORAIL_QUARTER_TURN_3_TILES_NE_NW_PART_1, + SPR_MONORAIL_QUARTER_TURN_3_TILES_NE_NW_PART_2 }, + { SPR_MONORAIL_QUARTER_TURN_3_TILES_SE_NE_PART_0, + SPR_MONORAIL_QUARTER_TURN_3_TILES_SE_NE_PART_1, + SPR_MONORAIL_QUARTER_TURN_3_TILES_SE_NE_PART_2 } +}; static constexpr const uint32_t ghost_train_track_pieces_right_eight_to_diag[4][4] = { { @@ -1418,8 +1420,8 @@ static void paint_monorail_track_diag_flat_to_25_deg_down( { if (monorail_diag_image_segment[direction][trackSequence]) { - uint32_t imageId - = monorail_track_pieces_diag_25_deg_up_to_flat[(direction + 2) % 4] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = monorail_track_pieces_diag_25_deg_up_to_flat[(direction + 2) % 4] + | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height); } @@ -1450,8 +1452,8 @@ static void paint_monorail_track_diag_25_deg_down_to_flat( { if (monorail_diag_image_segment[direction][trackSequence]) { - uint32_t imageId - = monorail_track_pieces_diag_flat_to_25_deg_up[(direction + 2) % 4] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = monorail_track_pieces_diag_flat_to_25_deg_up[(direction + 2) % 4] + | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height); } diff --git a/src/openrct2/ride/water/DingySlide.cpp b/src/openrct2/ride/water/DingySlide.cpp index 32099cd2a4..b03d3cfc17 100644 --- a/src/openrct2/ride/water/DingySlide.cpp +++ b/src/openrct2/ride/water/DingySlide.cpp @@ -765,64 +765,66 @@ static void dinghy_slide_track_right_quarter_turn_5( int32_t height, const rct_tile_element* tileElement) { - static constexpr const sprite_bb imageIds[4][5] - = { { - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_SW_SE_PART_0, { 0, 2, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_SW_SE_PART_1, { 0, 16, 0 }, { 0, 16, 0 }, { 32, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_SW_SE_PART_2, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_SW_SE_PART_3, { 16, 0, 0 }, { 16, 0, 0 }, { 16, 32, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_SW_SE_PART_4, { 2, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_NW_SW_PART_0, { 2, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_NW_SW_PART_1, { 16, 0, 0 }, { 16, 0, 0 }, { 16, 34, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_NW_SW_PART_2, { 0, 16, 0 }, { 0, 16, 0 }, { 16, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_NW_SW_PART_3, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_NW_SW_PART_4, { 0, 2, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_NE_NW_PART_0, { 0, 2, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_NE_NW_PART_2, { 16, 16, 0 }, { 16, 16, 0 }, { 16, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_NE_NW_PART_3, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_NE_NW_PART_4, { 2, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_SE_NE_PART_0, { 2, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_SE_NE_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_SE_NE_PART_2, { 16, 0, 0 }, { 16, 0, 0 }, { 16, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_SE_NE_PART_3, { 0, 16, 0 }, { 0, 16, 0 }, { 32, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_SE_NE_PART_4, { 0, 2, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, - } }; - static constexpr const sprite_bb frontImageIds[4][5] - = { { - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_SW_SE_PART_0, { 0, 2, 0 }, { 0, 6, 27 }, { 32, 30, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_SW_SE_PART_1, { 0, 16, 0 }, { 0, 16, 27 }, { 32, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_SW_SE_PART_2, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_SW_SE_PART_3, { 16, 0, 0 }, { 16, 0, 27 }, { 16, 32, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_SW_SE_PART_4, { 2, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_NW_SW_PART_0, { 2, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_NW_SW_PART_1, { 16, 0, 0 }, { 16, 0, 27 }, { 16, 34, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_NW_SW_PART_2, { 0, 16, 0 }, { 0, 16, 27 }, { 16, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_NW_SW_PART_3, { 0, 0, 0 }, { 0, 0, 27 }, { 32, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_NW_SW_PART_4, { 0, 2, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_NE_NW_PART_0, { 0, 2, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 27 }, { 32, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_NE_NW_PART_2, { 16, 16, 0 }, { 16, 16, 27 }, { 16, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_NE_NW_PART_3, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 32, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_NE_NW_PART_4, { 2, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_SE_NE_PART_0, { 2, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_SE_NE_PART_1, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 32, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_SE_NE_PART_2, { 16, 0, 0 }, { 16, 0, 27 }, { 16, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_SE_NE_PART_3, { 0, 16, 0 }, { 0, 16, 27 }, { 32, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_SE_NE_PART_4, { 0, 2, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, - } }; + static constexpr const sprite_bb imageIds[4][5] = { + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_SW_SE_PART_0, { 0, 2, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_SW_SE_PART_1, { 0, 16, 0 }, { 0, 16, 0 }, { 32, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_SW_SE_PART_2, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_SW_SE_PART_3, { 16, 0, 0 }, { 16, 0, 0 }, { 16, 32, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_SW_SE_PART_4, { 2, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_NW_SW_PART_0, { 2, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_NW_SW_PART_1, { 16, 0, 0 }, { 16, 0, 0 }, { 16, 34, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_NW_SW_PART_2, { 0, 16, 0 }, { 0, 16, 0 }, { 16, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_NW_SW_PART_3, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_NW_SW_PART_4, { 0, 2, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_NE_NW_PART_0, { 0, 2, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_NE_NW_PART_2, { 16, 16, 0 }, { 16, 16, 0 }, { 16, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_NE_NW_PART_3, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_NE_NW_PART_4, { 2, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_SE_NE_PART_0, { 2, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_SE_NE_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_SE_NE_PART_2, { 16, 0, 0 }, { 16, 0, 0 }, { 16, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_SE_NE_PART_3, { 0, 16, 0 }, { 0, 16, 0 }, { 32, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_SE_NE_PART_4, { 0, 2, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, + } + }; + static constexpr const sprite_bb frontImageIds[4][5] = { + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_SW_SE_PART_0, { 0, 2, 0 }, { 0, 6, 27 }, { 32, 30, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_SW_SE_PART_1, { 0, 16, 0 }, { 0, 16, 27 }, { 32, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_SW_SE_PART_2, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_SW_SE_PART_3, { 16, 0, 0 }, { 16, 0, 27 }, { 16, 32, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_SW_SE_PART_4, { 2, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_NW_SW_PART_0, { 2, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_NW_SW_PART_1, { 16, 0, 0 }, { 16, 0, 27 }, { 16, 34, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_NW_SW_PART_2, { 0, 16, 0 }, { 0, 16, 27 }, { 16, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_NW_SW_PART_3, { 0, 0, 0 }, { 0, 0, 27 }, { 32, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_NW_SW_PART_4, { 0, 2, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_NE_NW_PART_0, { 0, 2, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 27 }, { 32, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_NE_NW_PART_2, { 16, 16, 0 }, { 16, 16, 27 }, { 16, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_NE_NW_PART_3, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 32, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_NE_NW_PART_4, { 2, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_SE_NE_PART_0, { 2, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_SE_NE_PART_1, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 32, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_SE_NE_PART_2, { 16, 0, 0 }, { 16, 0, 27 }, { 16, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_SE_NE_PART_3, { 0, 16, 0 }, { 0, 16, 27 }, { 32, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_FRONT_SE_NE_PART_4, { 0, 2, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, + } + }; track_paint_util_right_quarter_turn_5_tiles_paint_2( session, height, direction, trackSequence, session->TrackColours[SCHEME_TRACK], imageIds); @@ -1128,48 +1130,50 @@ static void dinghy_slide_track_right_quarter_turn_3( int32_t height, const rct_tile_element* tileElement) { - static constexpr const sprite_bb imageIds[4][3] - = { { - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_SW_SE_PART_0, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_SW_SE_PART_1, { 0, 0, 0 }, { 16, 16, 0 }, { 16, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_SW_SE_PART_2, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_NW_SW_PART_0, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_NW_SW_PART_1, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_NW_SW_PART_2, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_NE_NW_PART_0, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_NE_NW_PART_2, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_SE_NE_PART_0, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_SE_NE_PART_1, { 0, 0, 0 }, { 0, 16, 0 }, { 16, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_SE_NE_PART_2, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, - } }; - static constexpr const sprite_bb frontImageIds[4][3] - = { { - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_SW_SE_PART_0, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_SW_SE_PART_1, { 0, 0, 0 }, { 16, 16, 27 }, { 16, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_SW_SE_PART_2, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_NW_SW_PART_0, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_NW_SW_PART_1, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_NW_SW_PART_2, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_NE_NW_PART_0, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_NE_NW_PART_2, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_SE_NE_PART_0, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_SE_NE_PART_1, { 0, 0, 0 }, { 0, 16, 27 }, { 16, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_SE_NE_PART_2, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, - } }; + static constexpr const sprite_bb imageIds[4][3] = { + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_SW_SE_PART_0, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_SW_SE_PART_1, { 0, 0, 0 }, { 16, 16, 0 }, { 16, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_SW_SE_PART_2, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_NW_SW_PART_0, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_NW_SW_PART_1, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_NW_SW_PART_2, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_NE_NW_PART_0, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_NE_NW_PART_2, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_SE_NE_PART_0, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_SE_NE_PART_1, { 0, 0, 0 }, { 0, 16, 0 }, { 16, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_SE_NE_PART_2, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, + } + }; + static constexpr const sprite_bb frontImageIds[4][3] = { + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_SW_SE_PART_0, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_SW_SE_PART_1, { 0, 0, 0 }, { 16, 16, 27 }, { 16, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_SW_SE_PART_2, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_NW_SW_PART_0, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_NW_SW_PART_1, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_NW_SW_PART_2, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_NE_NW_PART_0, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_NE_NW_PART_2, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_SE_NE_PART_0, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_SE_NE_PART_1, { 0, 0, 0 }, { 0, 16, 27 }, { 16, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_FRONT_SE_NE_PART_2, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, + } + }; track_paint_util_right_quarter_turn_3_tiles_paint_3( session, height, direction, trackSequence, session->TrackColours[SCHEME_TRACK], imageIds); @@ -1552,64 +1556,66 @@ static void dinghy_slide_track_right_quarter_turn_5_covered( int32_t height, const rct_tile_element* tileElement) { - static constexpr const sprite_bb imageIds[4][5] - = { { - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_SW_SE_PART_0, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_SW_SE_PART_1, { 0, 0, 0 }, { 0, 16, 0 }, { 32, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_SW_SE_PART_2, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_SW_SE_PART_3, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 32, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_SW_SE_PART_4, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_NW_SW_PART_0, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_NW_SW_PART_1, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 34, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_NW_SW_PART_2, { 0, 0, 0 }, { 0, 16, 0 }, { 16, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_NW_SW_PART_3, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_NW_SW_PART_4, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_NE_NW_PART_0, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_NE_NW_PART_2, { 0, 0, 0 }, { 16, 16, 0 }, { 16, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_NE_NW_PART_3, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_NE_NW_PART_4, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_SE_NE_PART_0, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_SE_NE_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_SE_NE_PART_2, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_SE_NE_PART_3, { 0, 0, 0 }, { 0, 16, 0 }, { 32, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_SE_NE_PART_4, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, - } }; - static constexpr const sprite_bb frontImageIds[4][5] - = { { - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_SW_SE_PART_0, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 30, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_SW_SE_PART_1, { 0, 0, 0 }, { 0, 16, 27 }, { 32, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_SW_SE_PART_2, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_SW_SE_PART_3, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 32, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_SW_SE_PART_4, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_NW_SW_PART_0, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_NW_SW_PART_1, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 34, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_NW_SW_PART_2, { 0, 0, 0 }, { 0, 16, 27 }, { 16, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_NW_SW_PART_3, { 0, 0, 0 }, { 0, 0, 27 }, { 32, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_NW_SW_PART_4, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_NE_NW_PART_0, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 27 }, { 32, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_NE_NW_PART_2, { 0, 0, 0 }, { 16, 16, 27 }, { 16, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_NE_NW_PART_3, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 32, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_NE_NW_PART_4, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_SE_NE_PART_0, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_SE_NE_PART_1, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 32, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_SE_NE_PART_2, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_SE_NE_PART_3, { 0, 0, 0 }, { 0, 16, 27 }, { 32, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_SE_NE_PART_4, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, - } }; + static constexpr const sprite_bb imageIds[4][5] = { + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_SW_SE_PART_0, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_SW_SE_PART_1, { 0, 0, 0 }, { 0, 16, 0 }, { 32, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_SW_SE_PART_2, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_SW_SE_PART_3, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 32, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_SW_SE_PART_4, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_NW_SW_PART_0, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_NW_SW_PART_1, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 34, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_NW_SW_PART_2, { 0, 0, 0 }, { 0, 16, 0 }, { 16, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_NW_SW_PART_3, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_NW_SW_PART_4, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_NE_NW_PART_0, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_NE_NW_PART_2, { 0, 0, 0 }, { 16, 16, 0 }, { 16, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_NE_NW_PART_3, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_NE_NW_PART_4, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_SE_NE_PART_0, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_SE_NE_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_SE_NE_PART_2, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_SE_NE_PART_3, { 0, 0, 0 }, { 0, 16, 0 }, { 32, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_SE_NE_PART_4, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, + } + }; + static constexpr const sprite_bb frontImageIds[4][5] = { + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_SW_SE_PART_0, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 30, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_SW_SE_PART_1, { 0, 0, 0 }, { 0, 16, 27 }, { 32, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_SW_SE_PART_2, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_SW_SE_PART_3, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 32, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_SW_SE_PART_4, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_NW_SW_PART_0, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_NW_SW_PART_1, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 34, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_NW_SW_PART_2, { 0, 0, 0 }, { 0, 16, 27 }, { 16, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_NW_SW_PART_3, { 0, 0, 0 }, { 0, 0, 27 }, { 32, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_NW_SW_PART_4, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_NE_NW_PART_0, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 27 }, { 32, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_NE_NW_PART_2, { 0, 0, 0 }, { 16, 16, 27 }, { 16, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_NE_NW_PART_3, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 32, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_NE_NW_PART_4, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_SE_NE_PART_0, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_SE_NE_PART_1, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 32, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_SE_NE_PART_2, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_SE_NE_PART_3, { 0, 0, 0 }, { 0, 16, 27 }, { 32, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_5_COVERED_FRONT_SE_NE_PART_4, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, + } + }; track_paint_util_right_quarter_turn_5_tiles_paint_2( session, height, direction, trackSequence, session->TrackColours[SCHEME_TRACK], imageIds); @@ -1905,48 +1911,50 @@ static void dinghy_slide_track_right_quarter_turn_3_covered( int32_t height, const rct_tile_element* tileElement) { - static constexpr const sprite_bb imageIds[4][3] - = { { - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_SW_SE_PART_0, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_SW_SE_PART_1, { 0, 0, 0 }, { 16, 16, 0 }, { 16, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_SW_SE_PART_2, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_NW_SW_PART_0, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_NW_SW_PART_1, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_NW_SW_PART_2, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_NE_NW_PART_0, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_NE_NW_PART_2, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_SE_NE_PART_0, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_SE_NE_PART_1, { 0, 0, 0 }, { 0, 16, 0 }, { 16, 16, 2 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_SE_NE_PART_2, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, - } }; - static constexpr const sprite_bb frontImageIds[4][3] - = { { - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_SW_SE_PART_0, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_SW_SE_PART_1, { 0, 0, 0 }, { 16, 16, 27 }, { 16, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_SW_SE_PART_2, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_NW_SW_PART_0, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_NW_SW_PART_1, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_NW_SW_PART_2, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_NE_NW_PART_0, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_NE_NW_PART_2, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, - }, - { - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_SE_NE_PART_0, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_SE_NE_PART_1, { 0, 0, 0 }, { 0, 16, 27 }, { 16, 16, 0 } }, - { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_SE_NE_PART_2, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, - } }; + static constexpr const sprite_bb imageIds[4][3] = { + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_SW_SE_PART_0, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_SW_SE_PART_1, { 0, 0, 0 }, { 16, 16, 0 }, { 16, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_SW_SE_PART_2, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_NW_SW_PART_0, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_NW_SW_PART_1, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_NW_SW_PART_2, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_NE_NW_PART_0, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_NE_NW_PART_2, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_SE_NE_PART_0, { 0, 0, 0 }, { 6, 0, 0 }, { 20, 32, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_SE_NE_PART_1, { 0, 0, 0 }, { 0, 16, 0 }, { 16, 16, 2 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_SE_NE_PART_2, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, + } + }; + static constexpr const sprite_bb frontImageIds[4][3] = { + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_SW_SE_PART_0, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_SW_SE_PART_1, { 0, 0, 0 }, { 16, 16, 27 }, { 16, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_SW_SE_PART_2, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_NW_SW_PART_0, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_NW_SW_PART_1, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_NW_SW_PART_2, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_NE_NW_PART_0, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_NE_NW_PART_1, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_NE_NW_PART_2, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, + }, + { + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_SE_NE_PART_0, { 0, 0, 0 }, { 6, 0, 27 }, { 20, 32, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_SE_NE_PART_1, { 0, 0, 0 }, { 0, 16, 27 }, { 16, 16, 0 } }, + { SPR_DINGHY_SLIDE_QUARTER_TURN_3_COVERED_FRONT_SE_NE_PART_2, { 0, 0, 0 }, { 0, 6, 27 }, { 32, 20, 0 } }, + } + }; track_paint_util_right_quarter_turn_3_tiles_paint_3( session, height, direction, trackSequence, session->TrackColours[SCHEME_TRACK], imageIds); diff --git a/src/openrct2/ride/water/LogFlume.cpp b/src/openrct2/ride/water/LogFlume.cpp index 51776301aa..764c535fd1 100644 --- a/src/openrct2/ride/water/LogFlume.cpp +++ b/src/openrct2/ride/water/LogFlume.cpp @@ -752,11 +752,12 @@ static void paint_log_flume_track_right_quarter_turn_3_tiles( int32_t height, const rct_tile_element* tileElement) { - static constexpr const uint32_t imageIds[4][3] - = { { SPR_LOG_FLUME_3_TURN_NW_NE_SEQ_0, SPR_LOG_FLUME_3_TURN_NW_NE_SEQ_2, SPR_LOG_FLUME_3_TURN_NW_NE_SEQ_3 }, - { SPR_LOG_FLUME_3_TURN_NE_SE_SEQ_0, SPR_LOG_FLUME_3_TURN_NE_SE_SEQ_2, SPR_LOG_FLUME_3_TURN_NE_SE_SEQ_3 }, - { SPR_LOG_FLUME_3_TURN_SE_SW_SEQ_0, SPR_LOG_FLUME_3_TURN_SE_SW_SEQ_2, SPR_LOG_FLUME_3_TURN_SE_SW_SEQ_3 }, - { SPR_LOG_FLUME_3_TURN_SW_NW_SEQ_0, SPR_LOG_FLUME_3_TURN_SW_NW_SEQ_2, SPR_LOG_FLUME_3_TURN_SW_NW_SEQ_3 } }; + static constexpr const uint32_t imageIds[4][3] = { + { SPR_LOG_FLUME_3_TURN_NW_NE_SEQ_0, SPR_LOG_FLUME_3_TURN_NW_NE_SEQ_2, SPR_LOG_FLUME_3_TURN_NW_NE_SEQ_3 }, + { SPR_LOG_FLUME_3_TURN_NE_SE_SEQ_0, SPR_LOG_FLUME_3_TURN_NE_SE_SEQ_2, SPR_LOG_FLUME_3_TURN_NE_SE_SEQ_3 }, + { SPR_LOG_FLUME_3_TURN_SE_SW_SEQ_0, SPR_LOG_FLUME_3_TURN_SE_SW_SEQ_2, SPR_LOG_FLUME_3_TURN_SE_SW_SEQ_3 }, + { SPR_LOG_FLUME_3_TURN_SW_NW_SEQ_0, SPR_LOG_FLUME_3_TURN_SW_NW_SEQ_2, SPR_LOG_FLUME_3_TURN_SW_NW_SEQ_3 } + }; static constexpr const uint32_t imageIdsFront[4][3] = { { SPR_LOG_FLUME_3_TURN_FRONT_NW_NE_SEQ_0, diff --git a/src/openrct2/ride/water/RiverRapids.cpp b/src/openrct2/ride/water/RiverRapids.cpp index 88a699e733..dc00ece1c3 100644 --- a/src/openrct2/ride/water/RiverRapids.cpp +++ b/src/openrct2/ride/water/RiverRapids.cpp @@ -21,10 +21,11 @@ #ifndef NO_VEHICLES // 0x0099279E: -static constexpr const vehicle_boundbox _riverRapidsBoundbox[] - = { { -13, -13, 1, 26, 26, 13 }, { -13, -13, 1, 26, 26, 13 }, { -13, -13, 1, 26, 26, 13 }, - { -13, -13, 1, 26, 26, 13 }, { -13, -13, 1, 26, 26, 13 }, { -13, -13, 1, 26, 26, 13 }, - { -13, -13, 1, 26, 26, 13 }, { -13, -13, 1, 26, 26, 13 }, { -13, -13, 1, 26, 26, 13 } }; +static constexpr const vehicle_boundbox _riverRapidsBoundbox[] = { { -13, -13, 1, 26, 26, 13 }, { -13, -13, 1, 26, 26, 13 }, + { -13, -13, 1, 26, 26, 13 }, { -13, -13, 1, 26, 26, 13 }, + { -13, -13, 1, 26, 26, 13 }, { -13, -13, 1, 26, 26, 13 }, + { -13, -13, 1, 26, 26, 13 }, { -13, -13, 1, 26, 26, 13 }, + { -13, -13, 1, 26, 26, 13 } }; #endif enum @@ -362,8 +363,8 @@ static void paint_river_rapids_station( paint_util_set_general_support_height(session, height + 32, 0x20); } -static void - paint_river_rapids_track_25_deg(paint_session* session, uint8_t direction, int32_t height, const uint32_t sprites[4][2]) +static void paint_river_rapids_track_25_deg( + paint_session* session, uint8_t direction, int32_t height, const uint32_t sprites[4][2]) { uint32_t imageId; paint_struct* ps; diff --git a/src/openrct2/ride/water/SplashBoats.cpp b/src/openrct2/ride/water/SplashBoats.cpp index bd9218b4bf..cb1a08d492 100644 --- a/src/openrct2/ride/water/SplashBoats.cpp +++ b/src/openrct2/ride/water/SplashBoats.cpp @@ -349,125 +349,129 @@ static constexpr const uint32_t SplashBoats25DegDownToFlatFrontImageId[4] = { SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_FRONT_NW_SE, }; -static constexpr const sprite_bb RiverRaftsLeftQuarterTurn5_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 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_SW_NW_SEQ_3, { 0, 0, 0 }, { 0, 16, 0 }, { 16, 16, 2 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_SW_NW_SEQ_5, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 34, 2 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_SW_NW_SEQ_6, { 0, 0, 0 }, { 2, 0, 0 }, { 32, 32, 2 }, - }, - { - SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_NW_NE_SEQ_0, { 0, 0, 0 }, { 2, 0, 0 }, { 27, 32, 2 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_NW_NE_SEQ_2, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_NW_NE_SEQ_3, { 0, 0, 0 }, { 16, 16, 0 }, { 16, 16, 2 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_NW_NE_SEQ_5, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 2 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_NW_NE_SEQ_6, { 0, 0, 0 }, { 0, 2, 0 }, { 32, 27, 2 }, - }, - { - SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_NE_SE_SEQ_0, { 0, 0, 0 }, { 0, 2, 0 }, { 32, 32, 2 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_NE_SE_SEQ_2, { 0, 0, 0 }, { 0, 16, 0 }, { 32, 16, 2 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_NE_SE_SEQ_3, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 16, 2 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_NE_SE_SEQ_5, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_NE_SE_SEQ_6, { 0, 0, 0 }, { 2, 0, 0 }, { 27, 32, 2 }, - }, - { - SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_SE_SW_SEQ_0, { 0, 0, 0 }, { 2, 0, 0 }, { 32, 32, 2 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_SE_SW_SEQ_2, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 32, 2 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_SE_SW_SEQ_3, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 16, 2 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_SE_SW_SEQ_5, { 0, 0, 0 }, { 0, 16, 0 }, { 32, 16, 2 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_SE_SW_SEQ_6, { 0, 0, 0 }, { 0, 2, 0 }, { 32, 32, 2 }, - } }; +static constexpr const sprite_bb RiverRaftsLeftQuarterTurn5_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 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_SW_NW_SEQ_3, { 0, 0, 0 }, { 0, 16, 0 }, { 16, 16, 2 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_SW_NW_SEQ_5, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 34, 2 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_SW_NW_SEQ_6, { 0, 0, 0 }, { 2, 0, 0 }, { 32, 32, 2 }, + }, + { + SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_NW_NE_SEQ_0, { 0, 0, 0 }, { 2, 0, 0 }, { 27, 32, 2 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_NW_NE_SEQ_2, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_NW_NE_SEQ_3, { 0, 0, 0 }, { 16, 16, 0 }, { 16, 16, 2 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_NW_NE_SEQ_5, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 2 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_NW_NE_SEQ_6, { 0, 0, 0 }, { 0, 2, 0 }, { 32, 27, 2 }, + }, + { + SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_NE_SE_SEQ_0, { 0, 0, 0 }, { 0, 2, 0 }, { 32, 32, 2 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_NE_SE_SEQ_2, { 0, 0, 0 }, { 0, 16, 0 }, { 32, 16, 2 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_NE_SE_SEQ_3, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 16, 2 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_NE_SE_SEQ_5, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_NE_SE_SEQ_6, { 0, 0, 0 }, { 2, 0, 0 }, { 27, 32, 2 }, + }, + { + SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_SE_SW_SEQ_0, { 0, 0, 0 }, { 2, 0, 0 }, { 32, 32, 2 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_SE_SW_SEQ_2, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 32, 2 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_SE_SW_SEQ_3, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 16, 2 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_SE_SW_SEQ_5, { 0, 0, 0 }, { 0, 16, 0 }, { 32, 16, 2 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_TOP_SE_SW_SEQ_6, { 0, 0, 0 }, { 0, 2, 0 }, { 32, 32, 2 }, + } +}; -static constexpr const sprite_bb RiverRaftsLeftQuarterTurn5_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 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_SW_NW_SEQ_3, { 0, 0, 0 }, { 0, 16, 27 }, { 16, 16, 0 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_SW_NW_SEQ_5, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 34, 0 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_SW_NW_SEQ_6, { 0, 0, 0 }, { 2, 0, 27 }, { 32, 32, 0 }, - }, - { - SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_NW_NE_SEQ_0, { 0, 0, 0 }, { 2, 0, 27 }, { 27, 32, 0 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_NW_NE_SEQ_2, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 32, 0 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_NW_NE_SEQ_3, { 0, 0, 0 }, { 16, 16, 27 }, { 16, 16, 0 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_NW_NE_SEQ_5, { 0, 0, 0 }, { 0, 0, 27 }, { 32, 16, 0 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_NW_NE_SEQ_6, { 0, 0, 0 }, { 0, 2, 27 }, { 32, 27, 0 }, - }, - { - SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_NE_SE_SEQ_0, { 0, 0, 0 }, { 0, 2, 27 }, { 32, 32, 0 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_NE_SE_SEQ_2, { 0, 0, 0 }, { 0, 16, 27 }, { 32, 16, 0 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_NE_SE_SEQ_3, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 16, 0 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_NE_SE_SEQ_5, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 32, 0 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_NE_SE_SEQ_6, { 0, 0, 0 }, { 2, 0, 27 }, { 27, 32, 0 }, - }, - { - SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_SE_SW_SEQ_0, { 0, 0, 0 }, { 2, 0, 27 }, { 32, 32, 0 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_SE_SW_SEQ_2, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 32, 0 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_SE_SW_SEQ_3, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 16, 0 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_SE_SW_SEQ_5, { 0, 0, 0 }, { 0, 16, 27 }, { 32, 16, 0 }, - SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_SE_SW_SEQ_6, { 0, 0, 0 }, { 0, 2, 27 }, { 32, 32, 0 }, - } }; +static constexpr const sprite_bb RiverRaftsLeftQuarterTurn5_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 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_SW_NW_SEQ_3, { 0, 0, 0 }, { 0, 16, 27 }, { 16, 16, 0 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_SW_NW_SEQ_5, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 34, 0 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_SW_NW_SEQ_6, { 0, 0, 0 }, { 2, 0, 27 }, { 32, 32, 0 }, + }, + { + SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_NW_NE_SEQ_0, { 0, 0, 0 }, { 2, 0, 27 }, { 27, 32, 0 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_NW_NE_SEQ_2, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 32, 0 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_NW_NE_SEQ_3, { 0, 0, 0 }, { 16, 16, 27 }, { 16, 16, 0 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_NW_NE_SEQ_5, { 0, 0, 0 }, { 0, 0, 27 }, { 32, 16, 0 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_NW_NE_SEQ_6, { 0, 0, 0 }, { 0, 2, 27 }, { 32, 27, 0 }, + }, + { + SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_NE_SE_SEQ_0, { 0, 0, 0 }, { 0, 2, 27 }, { 32, 32, 0 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_NE_SE_SEQ_2, { 0, 0, 0 }, { 0, 16, 27 }, { 32, 16, 0 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_NE_SE_SEQ_3, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 16, 0 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_NE_SE_SEQ_5, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 32, 0 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_NE_SE_SEQ_6, { 0, 0, 0 }, { 2, 0, 27 }, { 27, 32, 0 }, + }, + { + SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_SE_SW_SEQ_0, { 0, 0, 0 }, { 2, 0, 27 }, { 32, 32, 0 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_SE_SW_SEQ_2, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 32, 0 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_SE_SW_SEQ_3, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 16, 0 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_SE_SW_SEQ_5, { 0, 0, 0 }, { 0, 16, 27 }, { 32, 16, 0 }, + SPR_SPLASH_BOATS_TURN_LEFT_5_SIDE_SE_SW_SEQ_6, { 0, 0, 0 }, { 0, 2, 27 }, { 32, 32, 0 }, + } +}; -static constexpr const sprite_bb RiverRaftsRightQuarterTurn5_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 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_SW_SE_SEQ_3, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 16, 2 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_SW_SE_SEQ_5, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 32, 2 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_SW_SE_SEQ_6, { 0, 0, 0 }, { 2, 0, 0 }, { 32, 32, 2 }, - }, - { - SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_NW_SW_SEQ_0, { 0, 0, 0 }, { 2, 0, 0 }, { 32, 32, 2 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_NW_SW_SEQ_2, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 34, 2 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_NW_SW_SEQ_3, { 0, 0, 0 }, { 0, 16, 0 }, { 16, 16, 2 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_NW_SW_SEQ_5, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 2 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_NW_SW_SEQ_6, { 0, 0, 0 }, { 0, 2, 0 }, { 32, 27, 2 }, - }, - { - SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_NE_NW_SEQ_0, { 0, 0, 0 }, { 0, 2, 0 }, { 32, 27, 2 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_NE_NW_SEQ_2, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 2 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_NE_NW_SEQ_3, { 0, 0, 0 }, { 16, 16, 0 }, { 16, 16, 2 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_NE_NW_SEQ_5, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_NE_NW_SEQ_6, { 0, 0, 0 }, { 2, 0, 0 }, { 27, 32, 2 }, - }, - { - SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_SE_NE_SEQ_0, { 0, 0, 0 }, { 2, 0, 0 }, { 27, 32, 2 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_SE_NE_SEQ_2, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_SE_NE_SEQ_3, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 16, 2 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_SE_NE_SEQ_5, { 0, 0, 0 }, { 0, 16, 0 }, { 32, 16, 2 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_SE_NE_SEQ_6, { 0, 0, 0 }, { 0, 2, 0 }, { 32, 32, 2 }, - } }; +static constexpr const sprite_bb RiverRaftsRightQuarterTurn5_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 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_SW_SE_SEQ_3, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 16, 2 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_SW_SE_SEQ_5, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 32, 2 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_SW_SE_SEQ_6, { 0, 0, 0 }, { 2, 0, 0 }, { 32, 32, 2 }, + }, + { + SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_NW_SW_SEQ_0, { 0, 0, 0 }, { 2, 0, 0 }, { 32, 32, 2 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_NW_SW_SEQ_2, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 34, 2 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_NW_SW_SEQ_3, { 0, 0, 0 }, { 0, 16, 0 }, { 16, 16, 2 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_NW_SW_SEQ_5, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 2 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_NW_SW_SEQ_6, { 0, 0, 0 }, { 0, 2, 0 }, { 32, 27, 2 }, + }, + { + SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_NE_NW_SEQ_0, { 0, 0, 0 }, { 0, 2, 0 }, { 32, 27, 2 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_NE_NW_SEQ_2, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 16, 2 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_NE_NW_SEQ_3, { 0, 0, 0 }, { 16, 16, 0 }, { 16, 16, 2 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_NE_NW_SEQ_5, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_NE_NW_SEQ_6, { 0, 0, 0 }, { 2, 0, 0 }, { 27, 32, 2 }, + }, + { + SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_SE_NE_SEQ_0, { 0, 0, 0 }, { 2, 0, 0 }, { 27, 32, 2 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_SE_NE_SEQ_2, { 0, 0, 0 }, { 0, 0, 0 }, { 16, 32, 2 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_SE_NE_SEQ_3, { 0, 0, 0 }, { 16, 0, 0 }, { 16, 16, 2 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_SE_NE_SEQ_5, { 0, 0, 0 }, { 0, 16, 0 }, { 32, 16, 2 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_TOP_SE_NE_SEQ_6, { 0, 0, 0 }, { 0, 2, 0 }, { 32, 32, 2 }, + } +}; -static constexpr const sprite_bb RiverRaftsRightQuarterTurn5_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 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_SW_SE_SEQ_3, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 16, 0 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_SW_SE_SEQ_5, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 32, 0 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_SW_SE_SEQ_6, { 0, 0, 0 }, { 2, 0, 27 }, { 32, 32, 0 }, - }, - { - SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_NW_SW_SEQ_0, { 0, 0, 0 }, { 2, 0, 27 }, { 32, 32, 0 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_NW_SW_SEQ_2, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 34, 0 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_NW_SW_SEQ_3, { 0, 0, 0 }, { 0, 16, 27 }, { 16, 16, 0 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_NW_SW_SEQ_5, { 0, 0, 0 }, { 0, 0, 27 }, { 32, 16, 0 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_NW_SW_SEQ_6, { 0, 0, 0 }, { 0, 2, 27 }, { 32, 27, 0 }, - }, - { - SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_NE_NW_SEQ_0, { 0, 0, 0 }, { 0, 2, 27 }, { 32, 27, 0 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_NE_NW_SEQ_2, { 0, 0, 0 }, { 0, 0, 27 }, { 32, 16, 0 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_NE_NW_SEQ_3, { 0, 0, 0 }, { 16, 16, 27 }, { 16, 16, 0 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_NE_NW_SEQ_5, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 32, 0 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_NE_NW_SEQ_6, { 0, 0, 0 }, { 2, 0, 27 }, { 27, 32, 0 }, - }, - { - SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_SE_NE_SEQ_0, { 0, 0, 0 }, { 2, 0, 27 }, { 27, 32, 0 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_SE_NE_SEQ_2, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 32, 0 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_SE_NE_SEQ_3, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 16, 0 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_SE_NE_SEQ_5, { 0, 0, 0 }, { 0, 16, 27 }, { 32, 16, 0 }, - SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_SE_NE_SEQ_6, { 0, 0, 0 }, { 0, 2, 27 }, { 32, 32, 0 }, - } }; +static constexpr const sprite_bb RiverRaftsRightQuarterTurn5_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 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_SW_SE_SEQ_3, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 16, 0 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_SW_SE_SEQ_5, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 32, 0 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_SW_SE_SEQ_6, { 0, 0, 0 }, { 2, 0, 27 }, { 32, 32, 0 }, + }, + { + SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_NW_SW_SEQ_0, { 0, 0, 0 }, { 2, 0, 27 }, { 32, 32, 0 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_NW_SW_SEQ_2, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 34, 0 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_NW_SW_SEQ_3, { 0, 0, 0 }, { 0, 16, 27 }, { 16, 16, 0 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_NW_SW_SEQ_5, { 0, 0, 0 }, { 0, 0, 27 }, { 32, 16, 0 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_NW_SW_SEQ_6, { 0, 0, 0 }, { 0, 2, 27 }, { 32, 27, 0 }, + }, + { + SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_NE_NW_SEQ_0, { 0, 0, 0 }, { 0, 2, 27 }, { 32, 27, 0 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_NE_NW_SEQ_2, { 0, 0, 0 }, { 0, 0, 27 }, { 32, 16, 0 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_NE_NW_SEQ_3, { 0, 0, 0 }, { 16, 16, 27 }, { 16, 16, 0 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_NE_NW_SEQ_5, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 32, 0 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_NE_NW_SEQ_6, { 0, 0, 0 }, { 2, 0, 27 }, { 27, 32, 0 }, + }, + { + SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_SE_NE_SEQ_0, { 0, 0, 0 }, { 2, 0, 27 }, { 27, 32, 0 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_SE_NE_SEQ_2, { 0, 0, 0 }, { 0, 0, 27 }, { 16, 32, 0 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_SE_NE_SEQ_3, { 0, 0, 0 }, { 16, 0, 27 }, { 16, 16, 0 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_SE_NE_SEQ_5, { 0, 0, 0 }, { 0, 16, 27 }, { 32, 16, 0 }, + SPR_SPLASH_BOATS_TURN_RIGHT_5_SIDE_SE_NE_SEQ_6, { 0, 0, 0 }, { 0, 2, 27 }, { 32, 32, 0 }, + } +}; static void paint_splash_boats_track_25_deg_up( paint_session* session, diff --git a/src/openrct2/ride/water/SubmarineRide.cpp b/src/openrct2/ride/water/SubmarineRide.cpp index 3abf2f2cbc..b7d16d9ba5 100644 --- a/src/openrct2/ride/water/SubmarineRide.cpp +++ b/src/openrct2/ride/water/SubmarineRide.cpp @@ -58,8 +58,8 @@ void vehicle_visual_submarine( vehicle_boundbox bb = VehicleBoundboxes[vehicleEntry->draw_order][imageDirection / 2]; - image_id - = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | IMAGE_TYPE_REMAP_2_PLUS; + image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) + | IMAGE_TYPE_REMAP_2_PLUS; paint_struct* ps = sub_98197C( session, image_id, 0, 0, bb.length_x, bb.length_y, bb.length_z, z, bb.offset_x, bb.offset_y, bb.offset_z + z); if (ps != nullptr) diff --git a/src/openrct2/ui/DummyUiContext.cpp b/src/openrct2/ui/DummyUiContext.cpp index e5c97da06a..f2a79179c9 100644 --- a/src/openrct2/ui/DummyUiContext.cpp +++ b/src/openrct2/ui/DummyUiContext.cpp @@ -135,8 +135,8 @@ namespace OpenRCT2::Ui class X8DrawingEngineFactory final : public IDrawingEngineFactory { - std::unique_ptr - Create([[maybe_unused]] DRAWING_ENGINE_TYPE type, const std::shared_ptr& uiContext) override + std::unique_ptr Create( + [[maybe_unused]] DRAWING_ENGINE_TYPE type, const std::shared_ptr& uiContext) override { return std::make_unique(uiContext); } diff --git a/src/openrct2/ui/UiContext.h b/src/openrct2/ui/UiContext.h index b0757a7085..d701abd81a 100644 --- a/src/openrct2/ui/UiContext.h +++ b/src/openrct2/ui/UiContext.h @@ -26,8 +26,8 @@ namespace OpenRCT2 { interface IDrawingEngineFactory; interface IRainDrawer; - using DrawRainFunc - = void (*)(OpenRCT2::Drawing::IRainDrawer* rainDrawer, int32_t left, int32_t top, int32_t width, int32_t height); + using DrawRainFunc = void (*)( + OpenRCT2::Drawing::IRainDrawer* rainDrawer, int32_t left, int32_t top, int32_t width, int32_t height); } // namespace Drawing namespace Ui diff --git a/src/openrct2/world/Banner.cpp b/src/openrct2/world/Banner.cpp index 77096babd8..26569d455e 100644 --- a/src/openrct2/world/Banner.cpp +++ b/src/openrct2/world/Banner.cpp @@ -424,8 +424,9 @@ uint8_t banner_get_closest_ride_index(int32_t x, int32_t y, int32_t z) { Ride* ride; - static constexpr const LocationXY16 NeighbourCheckOrder[] - = { { 32, 0 }, { -32, 0 }, { 0, 32 }, { 0, -32 }, { -32, +32 }, { +32, -32 }, { +32, +32 }, { -32, +32 }, { 0, 0 } }; + static constexpr const LocationXY16 NeighbourCheckOrder[] = { { 32, 0 }, { -32, 0 }, { 0, 32 }, + { 0, -32 }, { -32, +32 }, { +32, -32 }, + { +32, +32 }, { -32, +32 }, { 0, 0 } }; for (size_t i = 0; i < (int32_t)Util::CountOf(NeighbourCheckOrder); i++) { diff --git a/src/openrct2/world/Climate.cpp b/src/openrct2/world/Climate.cpp index 28027408b0..ba8e0e99ff 100644 --- a/src/openrct2/world/Climate.cpp +++ b/src/openrct2/world/Climate.cpp @@ -143,14 +143,14 @@ void climate_update() } else if (gClimateNext.RainLevel <= RAIN_LEVEL_HEAVY) { - gClimateCurrent.RainLevel - = climate_step_weather_level(gClimateCurrent.RainLevel, gClimateNext.RainLevel); + gClimateCurrent.RainLevel = climate_step_weather_level( + gClimateCurrent.RainLevel, gClimateNext.RainLevel); } } else { - gClimateCurrent.WeatherGloom - = climate_step_weather_level(gClimateCurrent.WeatherGloom, gClimateNext.WeatherGloom); + gClimateCurrent.WeatherGloom = climate_step_weather_level( + gClimateCurrent.WeatherGloom, gClimateNext.WeatherGloom); gfx_invalidate_screen(); } } @@ -392,8 +392,8 @@ static void climate_update_thunder() static void climate_play_thunder(int32_t instanceIndex, int32_t soundId, int32_t volume, int32_t pan) { - _thunderSoundChannels[instanceIndex] - = Mixer_Play_Effect(soundId, MIXER_LOOP_NONE, DStoMixerVolume(volume), DStoMixerPan(pan), 1, 0); + _thunderSoundChannels[instanceIndex] = Mixer_Play_Effect( + soundId, MIXER_LOOP_NONE, DStoMixerVolume(volume), DStoMixerPan(pan), 1, 0); if (_thunderSoundChannels[instanceIndex] != nullptr) { _thunderStatus[instanceIndex] = THUNDER_STATUS::PLAYING; diff --git a/src/openrct2/world/Footpath.cpp b/src/openrct2/world/Footpath.cpp index 6ac7d62b3e..9fdc1d75ed 100644 --- a/src/openrct2/world/Footpath.cpp +++ b/src/openrct2/world/Footpath.cpp @@ -191,8 +191,8 @@ static void loc_6A6620(int32_t flags, int32_t x, int32_t y, rct_tile_element* ti /** rct2: 0x0098D7EC */ static constexpr const uint8_t byte_98D7EC[] = { 207, 159, 63, 111 }; -static money32 - footpath_element_insert(int32_t type, int32_t x, int32_t y, int32_t z, int32_t slope, int32_t flags, uint8_t pathItemType) +static money32 footpath_element_insert( + int32_t type, int32_t x, int32_t y, int32_t z, int32_t slope, int32_t flags, uint8_t pathItemType) { rct_tile_element *tileElement, *entranceElement; int32_t bl, zHigh; @@ -621,8 +621,8 @@ void game_command_place_footpath( *ebp & 0xFF); } -static money32 - footpath_place_from_track(int32_t type, int32_t x, int32_t y, int32_t z, int32_t slope, int32_t edges, int32_t flags) +static money32 footpath_place_from_track( + int32_t type, int32_t x, int32_t y, int32_t z, int32_t slope, int32_t edges, int32_t flags) { rct_tile_element *tileElement, *entranceElement; bool entrancePath = false, entranceIsSamePath = false; diff --git a/src/openrct2/world/Fountain.cpp b/src/openrct2/world/Fountain.cpp index b2e7f9cba2..a12713e996 100644 --- a/src/openrct2/world/Fountain.cpp +++ b/src/openrct2/world/Fountain.cpp @@ -42,15 +42,16 @@ static constexpr const LocationXY16 _fountainDirectionsNegative[] = { { -32, 0 }, { -32, -32 }, { 0, 0 }, { -32, 0 }, { 0, 0 }, { 0, -32 }, { 0, -32 }, { -32, -32 }, }; -static constexpr const LocationXY16 _fountainDirectionsPositive[] - = { { 32, 0 }, { 0, 0 }, { 0, 32 }, { 32, 32 }, { 32, 32 }, { 32, 0 }, { 0, 0 }, { 0, 32 } }; +static constexpr const LocationXY16 _fountainDirectionsPositive[] = { { 32, 0 }, { 0, 0 }, { 0, 32 }, { 32, 32 }, + { 32, 32 }, { 32, 0 }, { 0, 0 }, { 0, 32 } }; // rct2: 0x0097F040 const uint8_t _fountainDirections[] = { 0, 1, 2, 3, 0, 1, 2, 3 }; // rct2: 0x0097F048 -const uint8_t _fountainDirectionFlags[] - = { 0, 0, FOUNTAIN_FLAG::DIRECTION, FOUNTAIN_FLAG::DIRECTION, FOUNTAIN_FLAG::DIRECTION, FOUNTAIN_FLAG::DIRECTION, 0, 0 }; +const uint8_t _fountainDirectionFlags[] = { + 0, 0, FOUNTAIN_FLAG::DIRECTION, FOUNTAIN_FLAG::DIRECTION, FOUNTAIN_FLAG::DIRECTION, FOUNTAIN_FLAG::DIRECTION, 0, 0 +}; // rct2: 0x0097F050 const uint8_t _fountainPatternFlags[] = { @@ -166,8 +167,8 @@ void jumping_fountain_create(int32_t type, int32_t x, int32_t y, int32_t z, int3 jumpingFountain->sprite_height_positive = 12; jumpingFountain->sprite_identifier = SPRITE_IDENTIFIER_MISC; sprite_move(x, y, z, (rct_sprite*)jumpingFountain); - jumpingFountain->misc_identifier - = type == JUMPING_FOUNTAIN_TYPE_SNOW ? SPRITE_MISC_JUMPING_FOUNTAIN_SNOW : SPRITE_MISC_JUMPING_FOUNTAIN_WATER; + jumpingFountain->misc_identifier = type == JUMPING_FOUNTAIN_TYPE_SNOW ? SPRITE_MISC_JUMPING_FOUNTAIN_SNOW + : SPRITE_MISC_JUMPING_FOUNTAIN_WATER; jumpingFountain->num_ticks_alive = 0; jumpingFountain->frame = 0; } @@ -273,8 +274,8 @@ static bool is_jumping_fountain(int32_t type, int32_t x, int32_t y, int32_t z) { z = z >> 3; - int32_t pathBitFlagMask - = type == JUMPING_FOUNTAIN_TYPE_SNOW ? PATH_BIT_FLAG_JUMPING_FOUNTAIN_SNOW : PATH_BIT_FLAG_JUMPING_FOUNTAIN_WATER; + int32_t pathBitFlagMask = type == JUMPING_FOUNTAIN_TYPE_SNOW ? PATH_BIT_FLAG_JUMPING_FOUNTAIN_SNOW + : PATH_BIT_FLAG_JUMPING_FOUNTAIN_WATER; rct_tile_element* tileElement = map_get_first_element_at(x >> 5, y >> 5); do @@ -337,8 +338,8 @@ static void jumping_fountain_goto_edge( jumping_fountain_create_next(jumpingFountain, x, y, z, direction); } -static void - jumping_fountain_bounce(rct_jumping_fountain* jumpingFountain, int32_t x, int32_t y, int32_t z, int32_t availableDirections) +static void jumping_fountain_bounce( + rct_jumping_fountain* jumpingFountain, int32_t x, int32_t y, int32_t z, int32_t availableDirections) { jumpingFountain->iteration++; if (jumpingFountain->iteration < 8) diff --git a/src/openrct2/world/Map.cpp b/src/openrct2/world/Map.cpp index 5c3c415870..2ce7e3e5ac 100644 --- a/src/openrct2/world/Map.cpp +++ b/src/openrct2/world/Map.cpp @@ -48,11 +48,11 @@ /** * Replaces 0x00993CCC, 0x00993CCE */ -const CoordsXY CoordsDirectionDelta[] - = { { -32, 0 }, { 0, +32 }, { +32, 0 }, { 0, -32 }, { -32, +32 }, { +32, +32 }, { +32, -32 }, { -32, -32 } }; +const CoordsXY CoordsDirectionDelta[] = { { -32, 0 }, { 0, +32 }, { +32, 0 }, { 0, -32 }, + { -32, +32 }, { +32, +32 }, { +32, -32 }, { -32, -32 } }; -const TileCoordsXY TileDirectionDelta[] - = { { -1, 0 }, { 0, +1 }, { +1, 0 }, { 0, -1 }, { -1, +1 }, { +1, +1 }, { +1, -1 }, { -1, -1 } }; +const TileCoordsXY TileDirectionDelta[] = { { -1, 0 }, { 0, +1 }, { +1, 0 }, { 0, -1 }, + { -1, +1 }, { +1, +1 }, { +1, -1 }, { -1, -1 } }; /** rct2: 0x0097B8B8 */ const money32 TerrainPricing[] = { @@ -877,10 +877,10 @@ void game_command_remove_large_scenery( } rct_scenery_entry* scenery_entry = get_large_scenery_entry(scenery_large_get_type(tileElement)); - LocationXYZ16 firstTile - = { scenery_entry->large_scenery.tiles[tileIndex].x_offset, - scenery_entry->large_scenery.tiles[tileIndex].y_offset, - static_cast((base_height * 8) - scenery_entry->large_scenery.tiles[tileIndex].z_offset) }; + LocationXYZ16 firstTile = { scenery_entry->large_scenery.tiles[tileIndex].x_offset, + scenery_entry->large_scenery.tiles[tileIndex].y_offset, + static_cast( + (base_height * 8) - scenery_entry->large_scenery.tiles[tileIndex].z_offset) }; rotate_map_coordinates(&firstTile.x, &firstTile.y, tile_element_direction); @@ -1013,10 +1013,10 @@ void game_command_set_large_scenery_colour( rct_scenery_entry* scenery_entry = get_large_scenery_entry(scenery_large_get_type(tile_element)); // Work out the base tile coordinates (Tile with index 0) - LocationXYZ16 baseTile - = { scenery_entry->large_scenery.tiles[tileIndex].x_offset, - scenery_entry->large_scenery.tiles[tileIndex].y_offset, - static_cast((base_height * 8) - scenery_entry->large_scenery.tiles[tileIndex].z_offset) }; + LocationXYZ16 baseTile = { scenery_entry->large_scenery.tiles[tileIndex].x_offset, + scenery_entry->large_scenery.tiles[tileIndex].y_offset, + static_cast( + (base_height * 8) - scenery_entry->large_scenery.tiles[tileIndex].z_offset) }; rotate_map_coordinates(&baseTile.x, &baseTile.y, tile_element_direction); baseTile.x = x - baseTile.x; baseTile.y = y - baseTile.y; @@ -1045,8 +1045,8 @@ void game_command_set_large_scenery_colour( if (flags & GAME_COMMAND_FLAG_APPLY) { - rct_tile_element* tileElement - = map_get_large_scenery_segment(currentTile.x, currentTile.y, base_height, tile_element_direction, i); + rct_tile_element* tileElement = map_get_large_scenery_segment( + currentTile.x, currentTile.y, base_height, tile_element_direction, i); scenery_large_set_primary_colour(tileElement, colour1); scenery_large_set_secondary_colour(tileElement, colour2); @@ -1316,8 +1316,8 @@ static money32 map_change_surface_style( if (surfaceStyle != 0xFF) { - uint8_t cur_terrain - = (tile_element_get_direction(tileElement) << 3) | (tileElement->properties.surface.terrain >> 5); + uint8_t cur_terrain = (tile_element_get_direction(tileElement) << 3) + | (tileElement->properties.surface.terrain >> 5); if (surfaceStyle != cur_terrain) { @@ -2073,8 +2073,8 @@ money32 raise_water(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint8_t flag height = tile_element->base_height + 2; } - money32 tileCost - = game_do_command(xi, flags, yi, (max_height << 8) + height, GAME_COMMAND_SET_WATER_HEIGHT, 0, 0); + money32 tileCost = game_do_command( + xi, flags, yi, (max_height << 8) + height, GAME_COMMAND_SET_WATER_HEIGHT, 0, 0); if (tileCost == MONEY32_UNDEFINED) return MONEY32_UNDEFINED; @@ -2161,8 +2161,8 @@ money32 lower_water(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint8_t flag if (height < min_height) continue; height -= 2; - int32_t tileCost - = game_do_command(xi, flags, yi, (min_height << 8) + height, GAME_COMMAND_SET_WATER_HEIGHT, 0, 0); + int32_t tileCost = game_do_command( + xi, flags, yi, (min_height << 8) + height, GAME_COMMAND_SET_WATER_HEIGHT, 0, 0); if (tileCost == MONEY32_UNDEFINED) return MONEY32_UNDEFINED; cost += tileCost; @@ -2242,8 +2242,8 @@ void game_command_lower_land( *edi & 0xFFFF); } -static money32 - smooth_land_tile(int32_t direction, uint8_t flags, int32_t x, int32_t y, rct_tile_element* tileElement, bool raiseLand) +static money32 smooth_land_tile( + int32_t direction, uint8_t flags, int32_t x, int32_t y, rct_tile_element* tileElement, bool raiseLand) { int32_t targetBaseZ = tileElement->base_height; int32_t slope = tileElement->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK; @@ -3378,8 +3378,8 @@ void map_reorganise_elements() { context_setcurrentcursor(CURSOR_ZZZ); - rct_tile_element* new_tile_elements - = (rct_tile_element*)malloc(3 * (MAXIMUM_MAP_SIZE_TECHNICAL * MAXIMUM_MAP_SIZE_TECHNICAL) * sizeof(rct_tile_element)); + rct_tile_element* new_tile_elements = (rct_tile_element*)malloc( + 3 * (MAXIMUM_MAP_SIZE_TECHNICAL * MAXIMUM_MAP_SIZE_TECHNICAL) * sizeof(rct_tile_element)); rct_tile_element* new_elements_pointer = new_tile_elements; if (new_tile_elements == nullptr) @@ -3979,8 +3979,8 @@ void map_extend_boundary_surface() newTileElement = map_get_surface_element_at(x, y); newTileElement->type = (newTileElement->type & 0x7C) | (existingTileElement->type & 0x83); - newTileElement->properties.surface.slope - = existingTileElement->properties.surface.slope & TILE_ELEMENT_SURFACE_EDGE_STYLE_MASK; + newTileElement->properties.surface.slope = existingTileElement->properties.surface.slope + & TILE_ELEMENT_SURFACE_EDGE_STYLE_MASK; newTileElement->properties.surface.terrain = existingTileElement->properties.surface.terrain; newTileElement->properties.surface.grass_length = existingTileElement->properties.surface.grass_length; newTileElement->properties.surface.ownership = 0; @@ -4023,8 +4023,8 @@ void map_extend_boundary_surface() newTileElement = map_get_surface_element_at(x, y); newTileElement->type = (newTileElement->type & 0x7C) | (existingTileElement->type & 0x83); - newTileElement->properties.surface.slope - = existingTileElement->properties.surface.slope & TILE_ELEMENT_SURFACE_EDGE_STYLE_MASK; + newTileElement->properties.surface.slope = existingTileElement->properties.surface.slope + & TILE_ELEMENT_SURFACE_EDGE_STYLE_MASK; newTileElement->properties.surface.terrain = existingTileElement->properties.surface.terrain; newTileElement->properties.surface.grass_length = existingTileElement->properties.surface.grass_length; newTileElement->properties.surface.ownership = 0; @@ -4942,8 +4942,8 @@ rct_tile_element* map_get_track_element_at_of_type_seq(int32_t x, int32_t y, int * @param y y units, not tiles. * @param z Base height. */ -rct_tile_element* - map_get_track_element_at_of_type_from_ride(int32_t x, int32_t y, int32_t z, int32_t trackType, int32_t rideIndex) +rct_tile_element* map_get_track_element_at_of_type_from_ride( + int32_t x, int32_t y, int32_t z, int32_t trackType, int32_t rideIndex) { rct_tile_element* tileElement = map_get_first_element_at(x >> 5, y >> 5); do @@ -4994,8 +4994,8 @@ rct_tile_element* map_get_track_element_at_from_ride(int32_t x, int32_t y, int32 * @param z Base height. * @param direction The direction (0 - 3). */ -rct_tile_element* - map_get_track_element_at_with_direction_from_ride(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t rideIndex) +rct_tile_element* map_get_track_element_at_with_direction_from_ride( + int32_t x, int32_t y, int32_t z, int32_t direction, int32_t rideIndex) { rct_tile_element* tileElement = map_get_first_element_at(x >> 5, y >> 5); do diff --git a/src/openrct2/world/Map.h b/src/openrct2/world/Map.h index eb6925de97..c83c40dd5e 100644 --- a/src/openrct2/world/Map.h +++ b/src/openrct2/world/Map.h @@ -301,11 +301,11 @@ CoordsXY translate_3d_to_2d_with_z(int32_t rotation, CoordsXYZ pos); rct_tile_element* map_get_track_element_at(int32_t x, int32_t y, int32_t z); rct_tile_element* map_get_track_element_at_of_type(int32_t x, int32_t y, int32_t z, int32_t trackType); rct_tile_element* map_get_track_element_at_of_type_seq(int32_t x, int32_t y, int32_t z, int32_t trackType, int32_t sequence); -rct_tile_element* - map_get_track_element_at_of_type_from_ride(int32_t x, int32_t y, int32_t z, int32_t trackType, int32_t rideIndex); +rct_tile_element* map_get_track_element_at_of_type_from_ride( + int32_t x, int32_t y, int32_t z, int32_t trackType, int32_t rideIndex); rct_tile_element* map_get_track_element_at_from_ride(int32_t x, int32_t y, int32_t z, int32_t rideIndex); -rct_tile_element* - map_get_track_element_at_with_direction_from_ride(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t rideIndex); +rct_tile_element* map_get_track_element_at_with_direction_from_ride( + int32_t x, int32_t y, int32_t z, int32_t direction, int32_t rideIndex); bool map_is_location_at_edge(int32_t x, int32_t y); void map_obstruction_set_error_text(rct_tile_element* tileElement); diff --git a/src/openrct2/world/MapAnimation.cpp b/src/openrct2/world/MapAnimation.cpp index e3cb14d0e0..850fd729e9 100644 --- a/src/openrct2/world/MapAnimation.cpp +++ b/src/openrct2/world/MapAnimation.cpp @@ -410,8 +410,8 @@ static bool map_animation_invalidate_track_spinningtunnel(int32_t x, int32_t y, * * rct2: 0x0068DF8F */ -static bool - map_animation_invalidate_remove([[maybe_unused]] int32_t x, [[maybe_unused]] int32_t y, [[maybe_unused]] int32_t baseZ) +static bool map_animation_invalidate_remove( + [[maybe_unused]] int32_t x, [[maybe_unused]] int32_t y, [[maybe_unused]] int32_t baseZ) { return true; } @@ -568,21 +568,22 @@ static bool map_animation_invalidate_wall(int32_t x, int32_t y, int32_t baseZ) * * rct2: 0x009819DC */ -static constexpr const map_animation_invalidate_event_handler _animatedObjectEventHandlers[MAP_ANIMATION_TYPE_COUNT] - = { map_animation_invalidate_ride_entrance, - map_animation_invalidate_queue_banner, - map_animation_invalidate_small_scenery, - map_animation_invalidate_park_entrance, - map_animation_invalidate_track_waterfall, - map_animation_invalidate_track_rapids, - map_animation_invalidate_track_onridephoto, - map_animation_invalidate_track_whirlpool, - map_animation_invalidate_track_spinningtunnel, - map_animation_invalidate_remove, - map_animation_invalidate_banner, - map_animation_invalidate_large_scenery, - map_animation_invalidate_wall_door, - map_animation_invalidate_wall }; +static constexpr const map_animation_invalidate_event_handler _animatedObjectEventHandlers[MAP_ANIMATION_TYPE_COUNT] = { + map_animation_invalidate_ride_entrance, + map_animation_invalidate_queue_banner, + map_animation_invalidate_small_scenery, + map_animation_invalidate_park_entrance, + map_animation_invalidate_track_waterfall, + map_animation_invalidate_track_rapids, + map_animation_invalidate_track_onridephoto, + map_animation_invalidate_track_whirlpool, + map_animation_invalidate_track_spinningtunnel, + map_animation_invalidate_remove, + map_animation_invalidate_banner, + map_animation_invalidate_large_scenery, + map_animation_invalidate_wall_door, + map_animation_invalidate_wall +}; /** * @returns true if the animation should be removed. diff --git a/src/openrct2/world/MapGen.cpp b/src/openrct2/world/MapGen.cpp index d902ea16e2..aaa7de5c83 100644 --- a/src/openrct2/world/MapGen.cpp +++ b/src/openrct2/world/MapGen.cpp @@ -339,8 +339,8 @@ static void mapgen_place_trees() // Place trees float treeToLandRatio = (10 + (util_rand() % 30)) / 100.0f; - int32_t numTrees - = std::min(std::max(4, (int32_t)(availablePositions.size() * treeToLandRatio)), (int32_t)availablePositions.size()); + int32_t numTrees = std::min( + std::max(4, (int32_t)(availablePositions.size() * treeToLandRatio)), (int32_t)availablePositions.size()); for (int32_t i = 0; i < numTrees; i++) { diff --git a/src/openrct2/world/MapHelpers.cpp b/src/openrct2/world/MapHelpers.cpp index b87de04831..de1daa5aed 100644 --- a/src/openrct2/world/MapHelpers.cpp +++ b/src/openrct2/world/MapHelpers.cpp @@ -239,8 +239,8 @@ int32_t tile_smooth(int32_t x, int32_t y) // Get neighbour height. If the element is not valid (outside of map) assume the same height rct_tile_element* neighbour_element = map_get_surface_element_at(x + x_offset, y + y_offset); - neighbourHeightOffset.baseheight[index] - = neighbour_element ? neighbour_element->base_height : surfaceElement->base_height; + neighbourHeightOffset.baseheight[index] = neighbour_element ? neighbour_element->base_height + : surfaceElement->base_height; // Make the height relative to the current surface element neighbourHeightOffset.baseheight[index] -= surfaceElement->base_height; diff --git a/src/openrct2/world/SmallScenery.cpp b/src/openrct2/world/SmallScenery.cpp index 3b78e2d3e3..8cc67c384e 100644 --- a/src/openrct2/world/SmallScenery.cpp +++ b/src/openrct2/world/SmallScenery.cpp @@ -21,8 +21,8 @@ #include "Scenery.h" #include "Surface.h" -static money32 - SmallSceneryRemove(int16_t x, int16_t y, uint8_t baseHeight, uint8_t quadrant, uint8_t sceneryType, uint8_t flags) +static money32 SmallSceneryRemove( + int16_t x, int16_t y, uint8_t baseHeight, uint8_t quadrant, uint8_t sceneryType, uint8_t flags) { if (!map_is_location_valid({ x, y })) { diff --git a/src/openrct2/world/SmallScenery.h b/src/openrct2/world/SmallScenery.h index f0473f8f53..075b55aadd 100644 --- a/src/openrct2/world/SmallScenery.h +++ b/src/openrct2/world/SmallScenery.h @@ -38,12 +38,12 @@ enum SMALL_SCENERY_FLAGS SMALL_SCENERY_FLAG_NO_SUPPORTS = (1 << 20), // 0x100000 SMALL_SCENERY_FLAG_VISIBLE_WHEN_ZOOMED = (1 << 21), // 0x200000 SMALL_SCENERY_FLAG_COG = (1 << 22), // 0x400000 - SMALL_SCENERY_FLAG_BUILD_DIRECTLY_ONTOP - = (1 << 23), // 0x800000; means supports can be built on this object. Used for base blocks. - SMALL_SCENERY_FLAG_HALF_SPACE = (1 << 24), // 0x1000000 - SMALL_SCENERY_FLAG_THREE_QUARTERS = (1 << 25), // 0x2000000 - SMALL_SCENERY_FLAG_PAINT_SUPPORTS = (1 << 26), // 0x4000000; used for scenery items which are support structures - SMALL_SCENERY_FLAG27 = (1 << 27), // 0x8000000 + SMALL_SCENERY_FLAG_BUILD_DIRECTLY_ONTOP = (1 << 23), // 0x800000; means supports can be built on this object. Used for base + // blocks. + SMALL_SCENERY_FLAG_HALF_SPACE = (1 << 24), // 0x1000000 + SMALL_SCENERY_FLAG_THREE_QUARTERS = (1 << 25), // 0x2000000 + SMALL_SCENERY_FLAG_PAINT_SUPPORTS = (1 << 26), // 0x4000000; used for scenery items which are support structures + SMALL_SCENERY_FLAG27 = (1 << 27), // 0x8000000 }; enum diff --git a/src/openrct2/world/TileInspector.cpp b/src/openrct2/world/TileInspector.cpp index 3d9a3eda32..6905149281 100644 --- a/src/openrct2/world/TileInspector.cpp +++ b/src/openrct2/world/TileInspector.cpp @@ -984,8 +984,8 @@ int32_t tile_inspector_track_set_chain( return 0; } -int32_t - tile_inspector_scenery_set_quarter_location(int32_t x, int32_t y, int32_t elementIndex, int32_t quarterIndex, int32_t flags) +int32_t tile_inspector_scenery_set_quarter_location( + int32_t x, int32_t y, int32_t elementIndex, int32_t quarterIndex, int32_t flags) { rct_tile_element* const tileElement = map_get_nth_element_at(x, y, elementIndex); diff --git a/src/openrct2/world/TileInspector.h b/src/openrct2/world/TileInspector.h index 6b9f520d88..63aed0a870 100644 --- a/src/openrct2/world/TileInspector.h +++ b/src/openrct2/world/TileInspector.h @@ -71,6 +71,6 @@ int32_t tile_inspector_scenery_set_quarter_location( int32_t x, int32_t y, int32_t elementIndex, int32_t quarterIndex, int32_t flags); int32_t tile_inspector_scenery_set_quarter_collision( int32_t x, int32_t y, int32_t elementIndex, int32_t quarterIndex, int32_t flags); -int32_t - tile_inspector_banner_toggle_blocking_edge(int32_t x, int32_t y, int32_t elementIndex, int32_t edgeIndex, int32_t flags); +int32_t tile_inspector_banner_toggle_blocking_edge( + int32_t x, int32_t y, int32_t elementIndex, int32_t edgeIndex, int32_t flags); int32_t tile_inspector_corrupt_clamp(int32_t x, int32_t y, int32_t elementIndex, int32_t flags);