diff --git a/src/openrct2-ui/CursorData.cpp b/src/openrct2-ui/CursorData.cpp index c94e26d70b..53840c0b53 100644 --- a/src/openrct2-ui/CursorData.cpp +++ b/src/openrct2-ui/CursorData.cpp @@ -17,6 +17,7 @@ #include #include "CursorRepository.h" +// clang-format off namespace OpenRCT2::Ui { static constexpr const CursorData BlankCursorData = @@ -665,3 +666,4 @@ namespace OpenRCT2::Ui return result; } } +// clang-format on diff --git a/src/openrct2-ui/interface/LandTool.cpp b/src/openrct2-ui/interface/LandTool.cpp index 9d05e3c71a..2f8eacc09c 100644 --- a/src/openrct2-ui/interface/LandTool.cpp +++ b/src/openrct2-ui/interface/LandTool.cpp @@ -23,6 +23,7 @@ #include #include +// clang-format off static uint16 toolSizeSpriteIndices[] = { SPR_LAND_TOOL_SIZE_0, @@ -68,6 +69,7 @@ uint32 WallTexturePreviews[] = SPR_G2_WALL_TEXTURE_SKYSCRAPER_A, SPR_G2_WALL_TEXTURE_SKYSCRAPER_B, }; +// clang-format on uint16 gLandToolSize; money32 gLandToolRaiseCost; diff --git a/src/openrct2-ui/windows/About.cpp b/src/openrct2-ui/windows/About.cpp index 8f70adf07c..9970464a25 100644 --- a/src/openrct2-ui/windows/About.cpp +++ b/src/openrct2-ui/windows/About.cpp @@ -28,6 +28,7 @@ #define WH 350 #define TABHEIGHT 50 +// clang-format off enum { WINDOW_ABOUT_PAGE_OPENRCT2, @@ -157,6 +158,7 @@ static rct_window_event_list *window_about_page_events[] = { &window_about_openrct2_events, &window_about_rct2_events, }; +// clang-format on static void window_about_set_page(rct_window *w, sint32 page); diff --git a/src/openrct2-ui/windows/Banner.cpp b/src/openrct2-ui/windows/Banner.cpp index 9dd0d3860b..4635b589d4 100644 --- a/src/openrct2-ui/windows/Banner.cpp +++ b/src/openrct2-ui/windows/Banner.cpp @@ -30,6 +30,7 @@ #define WW 113 #define WH 96 +// clang-format off enum WINDOW_BANNER_WIDGET_IDX { WIDX_BACKGROUND, WIDX_TITLE, @@ -112,6 +113,7 @@ static rct_window_event_list window_banner_events = { window_banner_paint, nullptr }; +// clang-format on /** * diff --git a/src/openrct2-ui/windows/Changelog.cpp b/src/openrct2-ui/windows/Changelog.cpp index e694bc3703..4e8fba9aaa 100644 --- a/src/openrct2-ui/windows/Changelog.cpp +++ b/src/openrct2-ui/windows/Changelog.cpp @@ -30,6 +30,7 @@ using namespace OpenRCT2; +// clang-format off enum { WIDX_BACKGROUND, WIDX_TITLE, @@ -90,6 +91,7 @@ static rct_window_event_list window_changelog_events = { window_changelog_paint, window_changelog_scrollpaint }; +// clang-format on static bool window_changelog_read_file(); static void window_changelog_dispose_file(); diff --git a/src/openrct2-ui/windows/Cheats.cpp b/src/openrct2-ui/windows/Cheats.cpp index 5c08f63029..44e58b03b2 100644 --- a/src/openrct2-ui/windows/Cheats.cpp +++ b/src/openrct2-ui/windows/Cheats.cpp @@ -36,6 +36,7 @@ static utf8 _moneySpinnerText[MONEY_STRING_MAXLENGTH]; static money32 _moneySpinnerValue = CHEATS_MONEY_DEFAULT; static sint32 _selectedStaffSpeed = 1; +// clang-format off enum { WINDOW_CHEATS_PAGE_MONEY, @@ -614,6 +615,7 @@ static rct_string_id window_cheats_page_titles[] = { STR_CHEAT_TITLE_PARK, STR_CHEAT_TITLE_RIDE, }; +// clang-format on static void window_cheats_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w); diff --git a/src/openrct2-ui/windows/ClearScenery.cpp b/src/openrct2-ui/windows/ClearScenery.cpp index 353ddfa0fb..a1129ea340 100644 --- a/src/openrct2-ui/windows/ClearScenery.cpp +++ b/src/openrct2-ui/windows/ClearScenery.cpp @@ -23,6 +23,7 @@ #include #include +// clang-format off enum WINDOW_CLEAR_SCENERY_WIDGET_IDX { WIDX_BACKGROUND, WIDX_TITLE, @@ -89,6 +90,7 @@ static rct_window_event_list window_clear_scenery_events = { window_clear_scenery_paint, nullptr }; +// clang-format on /** * diff --git a/src/openrct2-ui/windows/CustomCurrency.cpp b/src/openrct2-ui/windows/CustomCurrency.cpp index c262afecba..2cf4cfcf25 100644 --- a/src/openrct2-ui/windows/CustomCurrency.cpp +++ b/src/openrct2-ui/windows/CustomCurrency.cpp @@ -24,6 +24,7 @@ #include #include +// clang-format off enum WINDOW_CUSTOM_CURRENCY_WIDGET_IDX { WIDX_BACKGROUND, WIDX_TITLE, @@ -87,6 +88,7 @@ static rct_window_event_list _windowCustomCurrencyEvents = { custom_currency_window_paint, nullptr }; +// clang-format on rct_window * custom_currency_window_open() diff --git a/src/openrct2-ui/windows/DebugPaint.cpp b/src/openrct2-ui/windows/DebugPaint.cpp index 86ed4cd0cf..caaf6edeaa 100644 --- a/src/openrct2-ui/windows/DebugPaint.cpp +++ b/src/openrct2-ui/windows/DebugPaint.cpp @@ -18,11 +18,12 @@ #include #include - #include - #include - #include - #include +#include +#include +#include +#include +// clang-format off enum WINDOW_DEBUG_PAINT_WIDGET_IDX { WIDX_BACKGROUND, @@ -78,6 +79,7 @@ static rct_window_event_list window_debug_paint_events = { window_debug_paint_paint, nullptr }; +// clang-format on rct_window * window_debug_paint_open() { diff --git a/src/openrct2-ui/windows/DemolishRidePrompt.cpp b/src/openrct2-ui/windows/DemolishRidePrompt.cpp index 04d46aa191..d7c3fa8072 100644 --- a/src/openrct2-ui/windows/DemolishRidePrompt.cpp +++ b/src/openrct2-ui/windows/DemolishRidePrompt.cpp @@ -25,6 +25,7 @@ #define WW 200 #define WH 100 +// clang-format off enum WINDOW_RIDE_DEMOLISH_WIDGET_IDX { WIDX_BACKGROUND, WIDX_TITLE, @@ -77,6 +78,7 @@ static rct_window_event_list window_ride_demolish_events = { window_ride_demolish_paint, nullptr }; +// clang-format on /** Based off of rct2: 0x006B486A */ rct_window * window_ride_demolish_prompt_open(sint32 rideIndex) diff --git a/src/openrct2-ui/windows/Dropdown.cpp b/src/openrct2-ui/windows/Dropdown.cpp index 160bf15da1..0165dbbe95 100644 --- a/src/openrct2-ui/windows/Dropdown.cpp +++ b/src/openrct2-ui/windows/Dropdown.cpp @@ -99,6 +99,7 @@ void dropdown_set_disabled(sint32 index, bool value) static void window_dropdown_paint(rct_window *w, rct_drawpixelinfo *dpi); +// clang-format off static rct_window_event_list window_dropdown_events = { nullptr, nullptr, @@ -129,6 +130,7 @@ static rct_window_event_list window_dropdown_events = { window_dropdown_paint, nullptr }; +// clang-format on /** * Shows a text dropdown menu. diff --git a/src/openrct2-ui/windows/EditorBottomToolbar.cpp b/src/openrct2-ui/windows/EditorBottomToolbar.cpp index 647eb16ec6..47632b01a0 100644 --- a/src/openrct2-ui/windows/EditorBottomToolbar.cpp +++ b/src/openrct2-ui/windows/EditorBottomToolbar.cpp @@ -34,6 +34,7 @@ #include #include +// clang-format off enum { WIDX_PREVIOUS_IMAGE, // 1 WIDX_PREVIOUS_STEP_BUTTON, // 2 @@ -127,6 +128,7 @@ static constexpr const rct_string_id EditorStepNames[] = { STR_EDITOR_STEP_ROLLERCOASTER_DESIGNER, STR_EDITOR_STEP_TRACK_DESIGNS_MANAGER, }; +// clang-format on /** * Creates the main editor top toolbar window. diff --git a/src/openrct2-ui/windows/EditorInventionsList.cpp b/src/openrct2-ui/windows/EditorInventionsList.cpp index 2d25860366..6d5451b715 100644 --- a/src/openrct2-ui/windows/EditorInventionsList.cpp +++ b/src/openrct2-ui/windows/EditorInventionsList.cpp @@ -34,6 +34,7 @@ #pragma region Widgets +// clang-format off enum { WIDX_BACKGROUND, WIDX_TITLE, @@ -167,6 +168,7 @@ static constexpr const rct_string_id EditorInventionsResearchCategories[] = { STR_RESEARCH_NEW_SHOPS_AND_STALLS, STR_RESEARCH_NEW_SCENERY_AND_THEMING, }; +// clang-format on static void window_editor_inventions_list_drag_open(rct_research_item *researchItem); static void move_research_item(rct_research_item *beforeItem); diff --git a/src/openrct2-ui/windows/EditorObjectSelection.cpp b/src/openrct2-ui/windows/EditorObjectSelection.cpp index c224fd63a4..29eba71377 100644 --- a/src/openrct2-ui/windows/EditorObjectSelection.cpp +++ b/src/openrct2-ui/windows/EditorObjectSelection.cpp @@ -41,6 +41,7 @@ #include #include +// clang-format off enum { FILTER_RCT1 = (1 << 0), @@ -214,6 +215,7 @@ static rct_window_event_list window_editor_object_selection_events = { window_editor_object_selection_paint, window_editor_object_selection_scrollpaint }; +// clang-format on #pragma endregion diff --git a/src/openrct2-ui/windows/EditorObjectiveOptions.cpp b/src/openrct2-ui/windows/EditorObjectiveOptions.cpp index 6ef1f1ac3c..72cec09b92 100644 --- a/src/openrct2-ui/windows/EditorObjectiveOptions.cpp +++ b/src/openrct2-ui/windows/EditorObjectiveOptions.cpp @@ -33,6 +33,7 @@ #pragma region Widgets +// clang-format off enum { WINDOW_EDITOR_OBJECTIVE_OPTIONS_PAGE_MAIN, WINDOW_EDITOR_OBJECTIVE_OPTIONS_PAGE_RIDES, @@ -254,6 +255,7 @@ static uint64 window_editor_objective_options_page_hold_down_widgets[] = { 0 }; +// clang-format on #pragma endregion diff --git a/src/openrct2-ui/windows/EditorScenarioOptions.cpp b/src/openrct2-ui/windows/EditorScenarioOptions.cpp index 3e3b4abb56..76ac549652 100644 --- a/src/openrct2-ui/windows/EditorScenarioOptions.cpp +++ b/src/openrct2-ui/windows/EditorScenarioOptions.cpp @@ -32,6 +32,7 @@ #pragma region Widgets +// clang-format off enum { WINDOW_EDITOR_SCENARIO_OPTIONS_PAGE_FINANCIAL, WINDOW_EDITOR_SCENARIO_OPTIONS_PAGE_GUESTS, @@ -383,6 +384,7 @@ static uint32 window_editor_scenario_options_page_hold_down_widgets[] = { (1ULL << WIDX_ENTRY_PRICE_INCREASE) | (1ULL << WIDX_ENTRY_PRICE_DECREASE) }; +// clang-format on #pragma endregion diff --git a/src/openrct2-ui/windows/Error.cpp b/src/openrct2-ui/windows/Error.cpp index f314774b41..9c774b5e9a 100644 --- a/src/openrct2-ui/windows/Error.cpp +++ b/src/openrct2-ui/windows/Error.cpp @@ -25,6 +25,7 @@ #include #include +// clang-format off enum { WIDX_BACKGROUND }; @@ -67,6 +68,7 @@ static rct_window_event_list window_error_events = { window_error_paint, nullptr }; +// clang-format on static char _window_error_text[512]; static uint16 _window_error_num_lines; diff --git a/src/openrct2-ui/windows/Finances.cpp b/src/openrct2-ui/windows/Finances.cpp index 39fd2ffe5f..8796fb9392 100644 --- a/src/openrct2-ui/windows/Finances.cpp +++ b/src/openrct2-ui/windows/Finances.cpp @@ -33,6 +33,7 @@ #include #include +// clang-format off enum { WINDOW_FINANCES_PAGE_SUMMARY, @@ -518,6 +519,7 @@ static constexpr const rct_string_id window_finances_summary_row_labels[RCT_EXPE STR_FINANCES_SUMMARY_RESEARCH, STR_FINANCES_SUMMARY_LOAN_INTEREST, }; +// clang-format on static void window_finances_set_page(rct_window *w, sint32 page); static void window_finances_set_pressed_tab(rct_window *w); diff --git a/src/openrct2-ui/windows/Footpath.cpp b/src/openrct2-ui/windows/Footpath.cpp index 7c8fce9fa7..82ae85d419 100644 --- a/src/openrct2-ui/windows/Footpath.cpp +++ b/src/openrct2-ui/windows/Footpath.cpp @@ -31,6 +31,7 @@ #include #include +// clang-format off enum { PATH_CONSTRUCTION_MODE_LAND, @@ -104,25 +105,15 @@ static rct_widget window_footpath_widgets[] = { }; static void window_footpath_close(rct_window * w); - static void window_footpath_mouseup(rct_window * w, rct_widgetindex widgetIndex); - static void window_footpath_mousedown(rct_window * w, rct_widgetindex widgetIndex, rct_widget * widget); - static void window_footpath_dropdown(rct_window * w, rct_widgetindex widgetIndex, sint32 dropdownIndex); - static void window_footpath_update(rct_window * w); - static void window_footpath_toolupdate(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y); - static void window_footpath_tooldown(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y); - static void window_footpath_tooldrag(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y); - static void window_footpath_toolup(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y); - static void window_footpath_invalidate(rct_window * w); - static void window_footpath_paint(rct_window * w, rct_drawpixelinfo * dpi); static rct_window_event_list window_footpath_events = { @@ -155,6 +146,7 @@ static rct_window_event_list window_footpath_events = { window_footpath_paint, nullptr }; +// clang-format on static money32 _window_footpath_cost; static sint8 _window_footpath_provisional_path_arrow_timer; @@ -189,27 +181,16 @@ static constexpr const uint8 ConstructionPreviewImages[][4] = { }; static void window_footpath_mousedown_direction(sint32 direction); - static void window_footpath_mousedown_slope(sint32 slope); - static void window_footpath_show_footpath_types_dialog(rct_window * w, rct_widget * widget, bool showQueues); - static void window_footpath_set_provisional_path_at_point(sint32 x, sint32 y); - static void window_footpath_set_selection_start_bridge_at_point(sint32 screenX, sint32 screenY); - static void window_footpath_place_path_at_point(sint32 x, sint32 y); - static void window_footpath_start_bridge_at_point(sint32 screenX, sint32 screenY); - static void window_footpath_construct(); - static void window_footpath_remove(); - static void window_footpath_set_enabled_and_pressed_widgets(); - static void footpath_get_next_path_info(sint32 * type, sint32 * x, sint32 * y, sint32 * z, sint32 * slope); - static bool footpath_select_default(); /** diff --git a/src/openrct2-ui/windows/GameBottomToolbar.cpp b/src/openrct2-ui/windows/GameBottomToolbar.cpp index cb797e4f96..73aece126a 100644 --- a/src/openrct2-ui/windows/GameBottomToolbar.cpp +++ b/src/openrct2-ui/windows/GameBottomToolbar.cpp @@ -34,6 +34,7 @@ #include #include +// clang-format off enum WINDOW_GAME_BOTTOM_TOOLBAR_WIDGET_IDX { WIDX_LEFT_OUTSET, @@ -122,6 +123,7 @@ static rct_window_event_list window_game_bottom_toolbar_events = window_game_bottom_toolbar_paint, nullptr }; +// clang-format on static void window_game_bottom_toolbar_invalidate_dirty_widgets(rct_window *w); diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index e2e33beda4..eb902d16a8 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -36,6 +36,7 @@ #include #include +// clang-format off enum WINDOW_GUEST_PAGE { WINDOW_GUEST_OVERVIEW, WINDOW_GUEST_STATS, @@ -475,6 +476,7 @@ static constexpr const uint32 window_guest_page_enabled_widgets[] = { (1 << WIDX_TAB_5) | (1 << WIDX_TAB_6) }; +// clang-format on /** * diff --git a/src/openrct2-ui/windows/GuestList.cpp b/src/openrct2-ui/windows/GuestList.cpp index 0b20b9db08..c3c7d77a3f 100644 --- a/src/openrct2-ui/windows/GuestList.cpp +++ b/src/openrct2-ui/windows/GuestList.cpp @@ -30,6 +30,7 @@ #include #include +// clang-format off enum { PAGE_INDIVIDUAL, PAGE_SUMMARISED @@ -141,6 +142,7 @@ static rct_window_event_list window_guest_list_events = { window_guest_list_paint, window_guest_list_scrollpaint }; +// clang-format on static uint32 _window_guest_list_last_find_groups_tick; static uint32 _window_guest_list_last_find_groups_selected_view; diff --git a/src/openrct2-ui/windows/InstallTrack.cpp b/src/openrct2-ui/windows/InstallTrack.cpp index bf39553ed7..f7f68482da 100644 --- a/src/openrct2-ui/windows/InstallTrack.cpp +++ b/src/openrct2-ui/windows/InstallTrack.cpp @@ -31,6 +31,7 @@ #include #include +// clang-format off enum { WIDX_BACKGROUND, WIDX_TITLE, @@ -96,6 +97,7 @@ static rct_window_event_list window_install_track_events = { window_install_track_paint, nullptr }; +// clang-format on static rct_track_td6 * _trackDesign; static std::string _trackPath; diff --git a/src/openrct2-ui/windows/Land.cpp b/src/openrct2-ui/windows/Land.cpp index fa15b7893f..76c8f3beab 100644 --- a/src/openrct2-ui/windows/Land.cpp +++ b/src/openrct2-ui/windows/Land.cpp @@ -26,6 +26,7 @@ #include #include +// clang-format off enum WINDOW_LAND_WIDGET_IDX { WIDX_BACKGROUND, WIDX_TITLE, @@ -98,6 +99,7 @@ static rct_window_event_list window_land_events = { window_land_paint, nullptr }; +// clang-format on static sint32 _selectedFloorTexture; static sint32 _selectedWallTexture; diff --git a/src/openrct2-ui/windows/LandRights.cpp b/src/openrct2-ui/windows/LandRights.cpp index 1f65739ec2..02b39878aa 100644 --- a/src/openrct2-ui/windows/LandRights.cpp +++ b/src/openrct2-ui/windows/LandRights.cpp @@ -27,6 +27,7 @@ #include #include +// clang-format off enum WINDOW_WATER_WIDGET_IDX { WIDX_BACKGROUND, WIDX_TITLE, @@ -97,6 +98,7 @@ static rct_window_event_list window_land_rights_events = { window_land_rights_paint, nullptr }; +// clang-format on #define LAND_RIGHTS_MODE_BUY_CONSTRUCTION_RIGHTS 0 #define LAND_RIGHTS_MODE_BUY_LAND 1 diff --git a/src/openrct2-ui/windows/LoadSave.cpp b/src/openrct2-ui/windows/LoadSave.cpp index fdb0f5c71f..a8a44b9ce8 100644 --- a/src/openrct2-ui/windows/LoadSave.cpp +++ b/src/openrct2-ui/windows/LoadSave.cpp @@ -46,6 +46,7 @@ #define WW 340 #define WH 400 +// clang-format off enum { WIDX_BACKGROUND, @@ -128,6 +129,7 @@ static rct_window_event_list window_loadsave_events = window_loadsave_paint, window_loadsave_scrollpaint }; +// clang-format on #pragma endregion diff --git a/src/openrct2-ui/windows/Main.cpp b/src/openrct2-ui/windows/Main.cpp index 307e463998..d6e424634b 100644 --- a/src/openrct2-ui/windows/Main.cpp +++ b/src/openrct2-ui/windows/Main.cpp @@ -22,6 +22,7 @@ #include #include +// clang-format off static rct_widget window_main_widgets[] = { { WWT_VIEWPORT, 0, 0x0000, -1, 0x0000, -1, STR_VIEWPORT, 0xFFFF }, { WIDGETS_END }, @@ -59,6 +60,7 @@ static rct_window_event_list window_main_events = { window_main_paint, nullptr }; +// clang-format on /** * Creates the main window that holds the main viewport. diff --git a/src/openrct2-ui/windows/Map.cpp b/src/openrct2-ui/windows/Map.cpp index 8874c4d24e..555698de06 100644 --- a/src/openrct2-ui/windows/Map.cpp +++ b/src/openrct2-ui/windows/Map.cpp @@ -46,6 +46,7 @@ // minimap. In order to distinguish those from actual coordinates, we use a separate name. using MapCoordsXY = TileCoordsXY; +// clang-format off enum { PAGE_PEEPS, PAGE_RIDES @@ -173,6 +174,7 @@ static rct_window_event_list window_map_events = { window_map_paint, window_map_scrollpaint }; +// clang-format on /** rct2: 0x00F1AD61 */ static uint8 _activeTool; diff --git a/src/openrct2-ui/windows/MapGen.cpp b/src/openrct2-ui/windows/MapGen.cpp index 4a04a5ce55..4831b23cff 100644 --- a/src/openrct2-ui/windows/MapGen.cpp +++ b/src/openrct2-ui/windows/MapGen.cpp @@ -29,6 +29,7 @@ #include #include +// clang-format off enum { WINDOW_MAPGEN_PAGE_BASE, WINDOW_MAPGEN_PAGE_RANDOM, @@ -539,6 +540,7 @@ static constexpr const sint32 TabAnimationFrames[WINDOW_MAPGEN_PAGE_COUNT] = { static constexpr const sint32 TabAnimationLoops[WINDOW_MAPGEN_PAGE_COUNT] = { 16, 16, 16, 0 }; +// clang-format on #define BASESIZE_MIN 0 #define BASESIZE_MAX 60 diff --git a/src/openrct2-ui/windows/MapTooltip.cpp b/src/openrct2-ui/windows/MapTooltip.cpp index 0c0d796f9e..5165d73708 100644 --- a/src/openrct2-ui/windows/MapTooltip.cpp +++ b/src/openrct2-ui/windows/MapTooltip.cpp @@ -23,6 +23,7 @@ #include #include +// clang-format off static rct_widget window_map_tooltip_widgets[] = { { WWT_IMGBTN, 0, 0, 199, 0, 29, 0xFFFFFFFF, STR_NONE }, { WIDGETS_END } @@ -61,6 +62,7 @@ static rct_window_event_list window_map_tooltip_events = { window_map_tooltip_paint, nullptr }; +// clang-format on #define MAP_TOOLTIP_ARGS diff --git a/src/openrct2-ui/windows/MazeConstruction.cpp b/src/openrct2-ui/windows/MazeConstruction.cpp index 5c8f184ad6..e1f5c51bb7 100644 --- a/src/openrct2-ui/windows/MazeConstruction.cpp +++ b/src/openrct2-ui/windows/MazeConstruction.cpp @@ -30,6 +30,7 @@ #pragma region Widgets +// clang-format off enum { WIDX_BACKGROUND, WIDX_TITLE, @@ -129,6 +130,7 @@ static rct_window_event_list window_maze_construction_events = { window_maze_construction_paint, nullptr }; +// clang-format on #pragma endregion diff --git a/src/openrct2-ui/windows/Multiplayer.cpp b/src/openrct2-ui/windows/Multiplayer.cpp index ae13c1b48c..44b41ce3f2 100644 --- a/src/openrct2-ui/windows/Multiplayer.cpp +++ b/src/openrct2-ui/windows/Multiplayer.cpp @@ -25,6 +25,7 @@ #include #include +// clang-format off enum { WINDOW_MULTIPLAYER_PAGE_INFORMATION, WINDOW_MULTIPLAYER_PAGE_PLAYERS, @@ -296,6 +297,7 @@ static rct_window_event_list *window_multiplayer_page_events[] = { &window_multiplayer_groups_events, &window_multiplayer_options_events }; +// clang-format on static constexpr const sint32 window_multiplayer_animation_divisor[] = { 4, 4, 2, 2 }; static constexpr const sint32 window_multiplayer_animation_frames[] = { 8, 8, 7, 4 }; diff --git a/src/openrct2-ui/windows/MusicCredits.cpp b/src/openrct2-ui/windows/MusicCredits.cpp index 2872f3e057..8c02538132 100644 --- a/src/openrct2-ui/windows/MusicCredits.cpp +++ b/src/openrct2-ui/windows/MusicCredits.cpp @@ -23,6 +23,7 @@ #include #include +// clang-format off enum WINDOW_MUSIC_CREDITS_WIDGET_IDX { WIDX_BACKGROUND, WIDX_TITLE, @@ -120,6 +121,7 @@ static rct_window_event_list window_music_credits_events = { window_music_credits_paint, window_music_credits_scrollpaint }; +// clang-format on /** * diff --git a/src/openrct2-ui/windows/NetworkStatus.cpp b/src/openrct2-ui/windows/NetworkStatus.cpp index e168eee2ac..963f772ff4 100644 --- a/src/openrct2-ui/windows/NetworkStatus.cpp +++ b/src/openrct2-ui/windows/NetworkStatus.cpp @@ -22,6 +22,7 @@ #include #include +// clang-format off static char _password[33]; enum WINDOW_NETWORK_STATUS_WIDGET_IDX { @@ -77,6 +78,7 @@ static rct_window_event_list window_network_status_events = { window_network_status_paint, nullptr }; +// clang-format on static close_callback _onClose = nullptr; diff --git a/src/openrct2-ui/windows/NewCampaign.cpp b/src/openrct2-ui/windows/NewCampaign.cpp index ab5c3843dd..fd8786f72f 100644 --- a/src/openrct2-ui/windows/NewCampaign.cpp +++ b/src/openrct2-ui/windows/NewCampaign.cpp @@ -29,6 +29,7 @@ #define SELECTED_RIDE_UNDEFINED ((uint16)0xFFFF) +// clang-format off enum WINDOW_NEW_CAMPAIGN_WIDGET_IDX { WIDX_BACKGROUND, WIDX_TITLE, @@ -95,6 +96,7 @@ static rct_window_event_list window_new_campaign_events = { window_new_campaign_paint, nullptr }; +// clang-format on static uint8 window_new_campaign_rides[MAX_RIDES]; static uint8 window_new_campaign_shop_items[64]; diff --git a/src/openrct2-ui/windows/NewRide.cpp b/src/openrct2-ui/windows/NewRide.cpp index b37b7af89b..2273e5af1c 100644 --- a/src/openrct2-ui/windows/NewRide.cpp +++ b/src/openrct2-ui/windows/NewRide.cpp @@ -50,6 +50,7 @@ static ride_list_item _windowNewRideListItems[384]; #pragma region Ride type view order +// clang-format off /** * The order of ride types shown in the new ride window so that the order stays consistent across games and rides of the same * type are kept together. @@ -267,6 +268,7 @@ static constexpr const rct_string_id window_new_ride_titles[WINDOW_NEW_RIDE_PAGE static constexpr const sint32 window_new_ride_tab_animation_loops[] = { 20, 32, 10, 72, 24, 28, 16 }; static constexpr const sint32 window_new_ride_tab_animation_divisor[] = { 4, 8, 2, 4, 4, 4, 2 }; +// clang-format on static void window_new_ride_set_page(rct_window *w, sint32 page); static void window_new_ride_refresh_widget_sizing(rct_window *w); diff --git a/src/openrct2-ui/windows/News.cpp b/src/openrct2-ui/windows/News.cpp index ecab93901b..8d4edc8cdb 100644 --- a/src/openrct2-ui/windows/News.cpp +++ b/src/openrct2-ui/windows/News.cpp @@ -27,6 +27,7 @@ #include #include +// clang-format off enum WINDOW_NEWS_WIDGET_IDX { WIDX_BACKGROUND, WIDX_TITLE, @@ -82,6 +83,7 @@ static rct_window_event_list window_news_events = { window_news_paint, window_news_scrollpaint }; +// clang-format on /** * diff --git a/src/openrct2-ui/windows/NewsOptions.cpp b/src/openrct2-ui/windows/NewsOptions.cpp index 2ed280ee15..f48e6094e0 100644 --- a/src/openrct2-ui/windows/NewsOptions.cpp +++ b/src/openrct2-ui/windows/NewsOptions.cpp @@ -25,6 +25,7 @@ #include #include +// clang-format off enum { NOTIFICATION_CATEGORY_PARK, NOTIFICATION_CATEGORY_RIDE, @@ -125,6 +126,7 @@ static rct_window_event_list window_news_options_events = { window_news_options_paint, nullptr }; +// clang-format on static void window_news_options_set_page(rct_window *w, sint32 page); static void window_news_options_draw_tab_images(rct_window *w, rct_drawpixelinfo *dpi); diff --git a/src/openrct2-ui/windows/ObjectLoadError.cpp b/src/openrct2-ui/windows/ObjectLoadError.cpp index 314fed406b..c68c6d236f 100644 --- a/src/openrct2-ui/windows/ObjectLoadError.cpp +++ b/src/openrct2-ui/windows/ObjectLoadError.cpp @@ -23,6 +23,7 @@ #include #include +// clang-format off enum WINDOW_OBJECT_LOAD_ERROR_WIDGET_IDX { WIDX_BACKGROUND, WIDX_TITLE, @@ -96,6 +97,7 @@ static rct_window_event_list window_object_load_error_events = { window_object_load_error_paint, window_object_load_error_scrollpaint }; +// clang-format on static std::vector _invalid_entries; static sint32 highlighted_index = -1; diff --git a/src/openrct2-ui/windows/Options.cpp b/src/openrct2-ui/windows/Options.cpp index 96eed6565c..3269991d26 100644 --- a/src/openrct2-ui/windows/Options.cpp +++ b/src/openrct2-ui/windows/Options.cpp @@ -47,6 +47,7 @@ #include #include +// clang-format off enum WINDOW_OPTIONS_PAGE { WINDOW_OPTIONS_PAGE_DISPLAY, WINDOW_OPTIONS_PAGE_RENDERING, @@ -609,6 +610,7 @@ static uint64 window_options_page_enabled_widgets[] = { (1 << WIDX_CHAT_PEEP_TRACKING_CHECKBOX) | (1 << WIDX_NEWS_CHECKBOX) }; +// clang-format on #pragma endregion diff --git a/src/openrct2-ui/windows/Park.cpp b/src/openrct2-ui/windows/Park.cpp index c3a712631e..f62fd84f40 100644 --- a/src/openrct2-ui/windows/Park.cpp +++ b/src/openrct2-ui/windows/Park.cpp @@ -36,6 +36,7 @@ #include #include +// clang-format off enum WINDOW_PARK_PAGE { WINDOW_PARK_PAGE_ENTRANCE, WINDOW_PARK_PAGE_RATING, @@ -545,6 +546,7 @@ static constexpr const window_park_award ParkAwards[] = { { STR_AWARD_MOST_CONFUSING_LAYOUT, SPR_AWARD_MOST_CONFUSING_LAYOUT }, { STR_AWARD_BEST_GENTLE_RIDES, SPR_AWARD_BEST_GENTLE_RIDES }, }; +// clang-format on static void window_park_init_viewport(rct_window *w); static void window_park_set_page(rct_window *w, sint32 page); diff --git a/src/openrct2-ui/windows/Player.cpp b/src/openrct2-ui/windows/Player.cpp index 83c0d5bab9..199296dd12 100644 --- a/src/openrct2-ui/windows/Player.cpp +++ b/src/openrct2-ui/windows/Player.cpp @@ -29,6 +29,7 @@ #include #include +// clang-format off enum WINDOW_PLAYER_PAGE { WINDOW_PLAYER_PAGE_OVERVIEW, WINDOW_PLAYER_PAGE_STATISTICS, @@ -186,6 +187,7 @@ static uint32 window_player_page_enabled_widgets[] = { (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) }; +// clang-format on rct_window * window_player_open(uint8 id) { diff --git a/src/openrct2-ui/windows/Research.cpp b/src/openrct2-ui/windows/Research.cpp index 04ddabb268..b7b1c200c1 100644 --- a/src/openrct2-ui/windows/Research.cpp +++ b/src/openrct2-ui/windows/Research.cpp @@ -28,6 +28,7 @@ #include #include +// clang-format off enum { WINDOW_RESEARCH_PAGE_DEVELOPMENT, WINDOW_RESEARCH_PAGE_FUNDING, @@ -229,6 +230,7 @@ static constexpr const rct_string_id ResearchStageNames[] = { STR_RESEARCH_STAGE_COMPLETING_DESIGN, STR_RESEARCH_STAGE_UNKNOWN, }; +// clang-format on static void window_research_set_page(rct_window *w, sint32 page); static void window_research_set_pressed_tab(rct_window *w); diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index 7316fdcd6a..f73dec1804 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -67,6 +67,7 @@ enum { #pragma region Widgets +// clang-format off enum { WIDX_BACKGROUND, WIDX_TITLE, @@ -1211,6 +1212,7 @@ static constexpr const window_ride_colour_preview TrackColourPreviews[] = { { 0, 0 }, // 59 { SPR_RIDE_DESIGN_PREVIEW_LIM_LAUNCHED_ROLLER_COASTER_TRACK, SPR_RIDE_DESIGN_PREVIEW_LIM_LAUNCHED_ROLLER_COASTER_SUPPORTS}, }; +// clang-format on struct rct_window_graphs_y_axis { uint8 interval; diff --git a/src/openrct2-ui/windows/RideConstruction.cpp b/src/openrct2-ui/windows/RideConstruction.cpp index 4aff38e5f6..ac41fd3b7b 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -42,6 +42,7 @@ #pragma region Widgets +// clang-format off enum { WIDX_BACKGROUND, WIDX_TITLE, @@ -442,6 +443,7 @@ static constexpr const rct_string_id RideConfigurationStringIds[] = { STR_QUARTER_LOOP, // 254 STR_QUARTER_LOOP // 255 }; +// clang-format on #pragma endregion diff --git a/src/openrct2-ui/windows/RideList.cpp b/src/openrct2-ui/windows/RideList.cpp index 04cbcda21f..6d5760b848 100644 --- a/src/openrct2-ui/windows/RideList.cpp +++ b/src/openrct2-ui/windows/RideList.cpp @@ -31,6 +31,7 @@ #include #include +// clang-format off enum { PAGE_RIDES, PAGE_SHOPS_AND_STALLS, @@ -187,6 +188,7 @@ static constexpr const rct_string_id page_names[] = { STR_SHOPS_AND_STALLS, STR_RESTROOMS_AND_INFORMATION_KIOSKS, }; +// clang-format on static sint32 _window_ride_list_information_type; diff --git a/src/openrct2-ui/windows/SavePrompt.cpp b/src/openrct2-ui/windows/SavePrompt.cpp index b49d59c226..375c02e9a2 100644 --- a/src/openrct2-ui/windows/SavePrompt.cpp +++ b/src/openrct2-ui/windows/SavePrompt.cpp @@ -27,6 +27,7 @@ #include #include +// clang-format off enum WINDOW_SAVE_PROMPT_WIDGET_IDX { WIDX_BACKGROUND, WIDX_TITLE, @@ -107,6 +108,7 @@ static rct_window_event_list window_save_prompt_events = { window_save_prompt_paint, nullptr }; +// clang-format on /** * diff --git a/src/openrct2-ui/windows/Scenery.cpp b/src/openrct2-ui/windows/Scenery.cpp index 4f24b2c942..e13a9b1a1a 100644 --- a/src/openrct2-ui/windows/Scenery.cpp +++ b/src/openrct2-ui/windows/Scenery.cpp @@ -38,6 +38,7 @@ #define SCENERY_BUTTON_HEIGHT 80 #define SCENERY_WINDOW_TABS (MAX_SCENERY_GROUP_OBJECTS + 1) // The + 1 is for the 'Miscellaneous' tab +// clang-format off enum { WINDOW_SCENERY_TAB_1, WINDOW_SCENERY_TAB_2, @@ -181,6 +182,7 @@ static rct_widget window_scenery_widgets[] = { { WWT_FLATBTN, 1, 609, 632, 154, 177, SPR_SCENERY_CLUSTER, STR_SCENERY_CLUSTER_TIP }, // 40000000 0x009DE478 { WIDGETS_END }, }; +// clang-format on void window_scenery_update_scroll(rct_window *w); diff --git a/src/openrct2-ui/windows/ServerList.cpp b/src/openrct2-ui/windows/ServerList.cpp index c7f372cb21..9ad41b4317 100644 --- a/src/openrct2-ui/windows/ServerList.cpp +++ b/src/openrct2-ui/windows/ServerList.cpp @@ -45,6 +45,7 @@ static std::mutex _mutex; static uint32 _numPlayersOnline = 0; static rct_string_id status_text = STR_SERVER_LIST_CONNECTING; +// clang-format off enum { WIDX_BACKGROUND, WIDX_TITLE, @@ -116,6 +117,7 @@ static rct_window_event_list window_server_list_events = { window_server_list_paint, window_server_list_scrollpaint }; +// clang-format on enum { DDIDX_JOIN, diff --git a/src/openrct2-ui/windows/ServerStart.cpp b/src/openrct2-ui/windows/ServerStart.cpp index b8caf712a3..ca67c15c77 100644 --- a/src/openrct2-ui/windows/ServerStart.cpp +++ b/src/openrct2-ui/windows/ServerStart.cpp @@ -33,6 +33,7 @@ static char _description[MAX_SERVER_DESCRIPTION_LENGTH]; static char _greeting[CHAT_INPUT_SIZE]; static char _password[33]; +// clang-format off enum { WIDX_BACKGROUND, WIDX_TITLE, @@ -108,6 +109,7 @@ static rct_window_event_list window_server_start_events = { window_server_start_paint, nullptr }; +// clang-format on rct_window * window_server_start_open() { diff --git a/src/openrct2-ui/windows/ShortcutKeyChange.cpp b/src/openrct2-ui/windows/ShortcutKeyChange.cpp index e9f137ab4a..7fb74c2de5 100644 --- a/src/openrct2-ui/windows/ShortcutKeyChange.cpp +++ b/src/openrct2-ui/windows/ShortcutKeyChange.cpp @@ -26,6 +26,7 @@ #define WW 250 #define WH 60 +// clang-format off enum WINDOW_SHORTCUT_CHANGE_WIDGET_IDX { WIDX_BACKGROUND, WIDX_TITLE, @@ -74,6 +75,7 @@ static rct_window_event_list window_shortcut_change_events = { window_shortcut_change_paint, nullptr }; +// clang-format on rct_window * window_shortcut_change_open(sint32 selected_key) { diff --git a/src/openrct2-ui/windows/ShortcutKeys.cpp b/src/openrct2-ui/windows/ShortcutKeys.cpp index 67778aee21..f25d87ca01 100644 --- a/src/openrct2-ui/windows/ShortcutKeys.cpp +++ b/src/openrct2-ui/windows/ShortcutKeys.cpp @@ -28,6 +28,7 @@ #define WW_SC_MAX 1200 #define WH_SC_MAX 800 +// clang-format off enum WINDOW_SHORTCUT_WIDGET_IDX { WIDX_BACKGROUND, WIDX_TITLE, @@ -156,6 +157,7 @@ const rct_string_id ShortcutStringIds[SHORTCUT_COUNT] = { STR_SHORTCUT_VIEW_CLIPPING, STR_SHORTCUT_HIGHLIGHT_PATH_ISSUES_TOGGLE, }; +// clang-format on /** diff --git a/src/openrct2-ui/windows/Sign.cpp b/src/openrct2-ui/windows/Sign.cpp index 77dc7db00f..ffa19b66db 100644 --- a/src/openrct2-ui/windows/Sign.cpp +++ b/src/openrct2-ui/windows/Sign.cpp @@ -34,6 +34,7 @@ #define WW 113 #define WH 96 +// clang-format off enum WINDOW_SIGN_WIDGET_IDX { WIDX_BACKGROUND, WIDX_TITLE, @@ -134,6 +135,7 @@ static rct_window_event_list window_sign_small_events = { window_sign_paint, nullptr }; +// clang-format on /** * diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index 08436f7ae5..6825179228 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -37,6 +37,7 @@ #define WW 190 #define WH 180 +// clang-format off enum WINDOW_STAFF_PAGE { WINDOW_STAFF_OVERVIEW, WINDOW_STAFF_OPTIONS, @@ -293,6 +294,7 @@ static constexpr const uint32 window_staff_page_enabled_widgets[] = { (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) }; +// clang-format on static uint8 _availableCostumes[ENTERTAINER_COSTUME_COUNT]; diff --git a/src/openrct2-ui/windows/StaffFirePrompt.cpp b/src/openrct2-ui/windows/StaffFirePrompt.cpp index ca7bea9557..5fef092d3a 100644 --- a/src/openrct2-ui/windows/StaffFirePrompt.cpp +++ b/src/openrct2-ui/windows/StaffFirePrompt.cpp @@ -25,6 +25,7 @@ #define WW 200 #define WH 100 +// clang-format off enum WINDOW_STAFF_FIRE_WIDGET_IDX { WIDX_BACKGROUND, WIDX_TITLE, @@ -77,6 +78,9 @@ static rct_window_event_list window_staff_fire_events = { window_staff_fire_paint, nullptr }; +//clang-format on + + /** Based off of rct2: 0x6C0A77 */ rct_window* window_staff_fire_prompt_open(rct_peep* peep) { diff --git a/src/openrct2-ui/windows/StaffList.cpp b/src/openrct2-ui/windows/StaffList.cpp index 3b482cf0a0..9fd3d51ecc 100644 --- a/src/openrct2-ui/windows/StaffList.cpp +++ b/src/openrct2-ui/windows/StaffList.cpp @@ -36,6 +36,7 @@ #include #include +// clang-format off enum { WINDOW_STAFF_LIST_TAB_HANDYMEN, WINDOW_STAFF_LIST_TAB_MECHANICS, @@ -151,6 +152,7 @@ static constexpr const staff_naming_convention StaffNamingConvention[] = { { STR_SECURITY_GUARD_PLURAL, STR_SECURITY_GUARD_SINGULAR, STR_HIRE_SECURITY_GUARD }, { STR_ENTERTAINER_PLURAL, STR_ENTERTAINER_SINGULAR, STR_HIRE_ENTERTAINER }, }; +// clang-format on /* * rct2: 0x006BD3CC diff --git a/src/openrct2-ui/windows/TextInput.cpp b/src/openrct2-ui/windows/TextInput.cpp index 85fc166a0d..09ca09faf1 100644 --- a/src/openrct2-ui/windows/TextInput.cpp +++ b/src/openrct2-ui/windows/TextInput.cpp @@ -36,6 +36,7 @@ #define WW 250 #define WH 90 +// clang-format off enum WINDOW_TEXT_INPUT_WIDGET_IDX { WIDX_BACKGROUND, WIDX_TITLE, @@ -92,6 +93,7 @@ static rct_window_event_list window_text_input_events = { window_text_input_paint, nullptr }; +// clang-format on static rct_string_id input_text_description; static utf8 text_input[TEXT_INPUT_SIZE] = { 0 }; diff --git a/src/openrct2-ui/windows/Themes.cpp b/src/openrct2-ui/windows/Themes.cpp index ad881d3caf..84814da7b6 100644 --- a/src/openrct2-ui/windows/Themes.cpp +++ b/src/openrct2-ui/windows/Themes.cpp @@ -28,6 +28,7 @@ #include #include +// clang-format off enum { WINDOW_THEMES_TAB_SETTINGS, WINDOW_THEMES_TAB_MAIN_UI, @@ -271,6 +272,7 @@ static rct_windowclass *window_themes_tab_classes[] = { window_themes_tab_6_classes, window_themes_tab_7_classes, }; +// clang-format on static uint8 _selected_tab = 0; static sint16 _colour_index_1 = -1; diff --git a/src/openrct2-ui/windows/TileInspector.cpp b/src/openrct2-ui/windows/TileInspector.cpp index a100e8a8cc..1697caf77d 100644 --- a/src/openrct2-ui/windows/TileInspector.cpp +++ b/src/openrct2-ui/windows/TileInspector.cpp @@ -39,6 +39,7 @@ #include #include +// clang-format off static constexpr const rct_string_id TerrainTypeStringIds[] = { STR_TILE_INSPECTOR_TERRAIN_GRASS, STR_TILE_INSPECTOR_TERRAIN_SAND, @@ -545,6 +546,7 @@ static uint64 PageDisabledWidgets[] = { 0, (1ULL << WIDX_BUTTON_ROTATE), }; +// clang-format on rct_window * window_tile_inspector_open() { diff --git a/src/openrct2-ui/windows/TitleCommandEditor.cpp b/src/openrct2-ui/windows/TitleCommandEditor.cpp index 45f0846d5a..9e8321452e 100644 --- a/src/openrct2-ui/windows/TitleCommandEditor.cpp +++ b/src/openrct2-ui/windows/TitleCommandEditor.cpp @@ -34,6 +34,7 @@ #include #include +// clang-format off struct TITLE_COMMAND_ORDER { // originally a uint8, but the new millisecond wait times require a uint16. uint16 command; @@ -162,6 +163,7 @@ static rct_window_event_list window_title_command_editor_events = { window_title_command_editor_paint, nullptr }; +// clang-format on static void scenario_select_callback(const utf8 * path) { diff --git a/src/openrct2-ui/windows/TitleEditor.cpp b/src/openrct2-ui/windows/TitleEditor.cpp index 1ad2800a2a..746e7ec75b 100644 --- a/src/openrct2-ui/windows/TitleEditor.cpp +++ b/src/openrct2-ui/windows/TitleEditor.cpp @@ -37,6 +37,7 @@ #include #include +// clang-format off enum WINDOW_TITLE_EDITOR_TAB { WINDOW_TITLE_EDITOR_TAB_PRESETS, WINDOW_TITLE_EDITOR_TAB_SAVES, @@ -216,6 +217,7 @@ static sint32 window_title_editor_tab_sprites[] = { SPR_FLOPPY, SPR_TAB_STATS_0 }; +// clang-format on void window_title_editor_open(sint32 tab) { diff --git a/src/openrct2-ui/windows/TitleExit.cpp b/src/openrct2-ui/windows/TitleExit.cpp index 87065cb7b3..b9aeb361ae 100644 --- a/src/openrct2-ui/windows/TitleExit.cpp +++ b/src/openrct2-ui/windows/TitleExit.cpp @@ -23,6 +23,7 @@ #include #include +// clang-format off enum WINDOW_TITLE_EXIT_WIDGET_IDX { WIDX_EXIT, }; @@ -65,6 +66,7 @@ static rct_window_event_list window_title_exit_events = { window_title_exit_paint, nullptr }; +// clang-format on /** * Creates the window containing the exit button on the title screen. diff --git a/src/openrct2-ui/windows/TitleLogo.cpp b/src/openrct2-ui/windows/TitleLogo.cpp index 86eb504922..eb8631e8b3 100644 --- a/src/openrct2-ui/windows/TitleLogo.cpp +++ b/src/openrct2-ui/windows/TitleLogo.cpp @@ -22,6 +22,7 @@ #include #include +// clang-format off static rct_widget window_title_logo_widgets[] = { { WIDGETS_END }, }; @@ -58,6 +59,7 @@ static rct_window_event_list window_title_logo_events = { window_title_logo_paint, nullptr }; +// clang-format on /** * Creates the window containing the logo and the expansion packs on the title screen. diff --git a/src/openrct2-ui/windows/TitleMenu.cpp b/src/openrct2-ui/windows/TitleMenu.cpp index bf9daaa70a..de968789f1 100644 --- a/src/openrct2-ui/windows/TitleMenu.cpp +++ b/src/openrct2-ui/windows/TitleMenu.cpp @@ -27,6 +27,7 @@ #include #include +// clang-format off enum { WIDX_START_NEW_GAME, WIDX_CONTINUE_SAVED_GAME, @@ -78,6 +79,7 @@ static rct_window_event_list window_title_menu_events = { window_title_menu_paint, nullptr }; +// clang-format on /** * Creates the window containing the menu buttons on the title screen. diff --git a/src/openrct2-ui/windows/TitleOptions.cpp b/src/openrct2-ui/windows/TitleOptions.cpp index b188cdab9f..7203aa4889 100644 --- a/src/openrct2-ui/windows/TitleOptions.cpp +++ b/src/openrct2-ui/windows/TitleOptions.cpp @@ -22,6 +22,7 @@ #include #include +// clang-format off enum WINDOW_TITLE_OPTIONS_WIDGET_IDX { WIDX_OPTIONS, }; @@ -64,6 +65,7 @@ static rct_window_event_list window_title_options_events = { window_title_options_paint, nullptr }; +// clang-format on /** * Creates the window containing the options button on the title screen. diff --git a/src/openrct2-ui/windows/TitleScenarioSelect.cpp b/src/openrct2-ui/windows/TitleScenarioSelect.cpp index 5e5e9eb95a..127c6588d9 100644 --- a/src/openrct2-ui/windows/TitleScenarioSelect.cpp +++ b/src/openrct2-ui/windows/TitleScenarioSelect.cpp @@ -32,6 +32,7 @@ #define INITIAL_NUM_UNLOCKED_SCENARIOS 5 +// clang-format off enum class LIST_ITEM_TYPE : uint8 { HEADING, @@ -143,6 +144,7 @@ static rct_window_event_list window_scenarioselect_events = { window_scenarioselect_paint, window_scenarioselect_scrollpaint }; +// clang-format on static void draw_category_heading(rct_window *w, rct_drawpixelinfo *dpi, sint32 left, sint32 right, sint32 y, rct_string_id stringId); static void initialise_list_items(rct_window *w); diff --git a/src/openrct2-ui/windows/Tooltip.cpp b/src/openrct2-ui/windows/Tooltip.cpp index 808523c47e..5895fcf1b7 100644 --- a/src/openrct2-ui/windows/Tooltip.cpp +++ b/src/openrct2-ui/windows/Tooltip.cpp @@ -22,6 +22,7 @@ #include #include +// clang-format off enum { WIDX_BACKGROUND }; @@ -64,6 +65,7 @@ static rct_window_event_list window_tooltip_events = { window_tooltip_paint, nullptr }; +// clang-format on static utf8 _tooltipText[sizeof(gCommonStringFormatBuffer)]; static sint16 _tooltipNumLines; diff --git a/src/openrct2-ui/windows/TopToolbar.cpp b/src/openrct2-ui/windows/TopToolbar.cpp index 9c89f17604..9c4c8b72d9 100644 --- a/src/openrct2-ui/windows/TopToolbar.cpp +++ b/src/openrct2-ui/windows/TopToolbar.cpp @@ -53,6 +53,7 @@ using namespace OpenRCT2::Ui; +// clang-format off enum { WIDX_PAUSE, WIDX_FILE_MENU, @@ -275,6 +276,7 @@ static rct_window_event_list window_top_toolbar_events = { window_top_toolbar_paint, nullptr }; +// clang-format on static void top_toolbar_init_view_menu(rct_window *window, rct_widget *widget); static void top_toolbar_view_menu_dropdown(sint16 dropdownIndex); diff --git a/src/openrct2-ui/windows/TrackDesignManage.cpp b/src/openrct2-ui/windows/TrackDesignManage.cpp index 34f40981fa..a1c7706639 100644 --- a/src/openrct2-ui/windows/TrackDesignManage.cpp +++ b/src/openrct2-ui/windows/TrackDesignManage.cpp @@ -26,6 +26,7 @@ #pragma region Widgets +// clang-format off enum { WIDX_BACKGROUND, WIDX_TITLE, @@ -130,6 +131,7 @@ static rct_window_event_list window_track_delete_prompt_events = { window_track_delete_prompt_paint, nullptr }; +// clang-format on #pragma endregion diff --git a/src/openrct2-ui/windows/TrackDesignPlace.cpp b/src/openrct2-ui/windows/TrackDesignPlace.cpp index ac123499e1..ccc54e1e4d 100644 --- a/src/openrct2-ui/windows/TrackDesignPlace.cpp +++ b/src/openrct2-ui/windows/TrackDesignPlace.cpp @@ -45,6 +45,7 @@ struct rct_track_td6; +// clang-format off enum { WIDX_BACKGROUND, WIDX_TITLE, @@ -108,6 +109,7 @@ static rct_window_event_list window_track_place_events = { window_track_place_paint, nullptr }; +// clang-format on static std::vector _window_track_place_mini_preview; static sint16 _window_track_place_last_x; diff --git a/src/openrct2-ui/windows/TrackList.cpp b/src/openrct2-ui/windows/TrackList.cpp index d9ff6f6aab..2d9dc47813 100644 --- a/src/openrct2-ui/windows/TrackList.cpp +++ b/src/openrct2-ui/windows/TrackList.cpp @@ -31,6 +31,7 @@ #include #include +// clang-format off enum { WIDX_BACKGROUND, WIDX_TITLE, @@ -102,6 +103,7 @@ static rct_window_event_list window_track_list_events = { window_track_list_paint, window_track_list_scrollpaint }; +// clang-format on #define TRACK_DESIGN_INDEX_UNLOADED UINT16_MAX diff --git a/src/openrct2-ui/windows/ViewClipping.cpp b/src/openrct2-ui/windows/ViewClipping.cpp index cabf503830..36ca0b0d77 100644 --- a/src/openrct2-ui/windows/ViewClipping.cpp +++ b/src/openrct2-ui/windows/ViewClipping.cpp @@ -26,6 +26,7 @@ #include #include +// clang-format off enum WINDOW_VIEW_CLIPPING_WIDGET_IDX { WIDX_BACKGROUND, WIDX_TITLE, @@ -125,6 +126,7 @@ static rct_window_event_list window_view_clipping_events = { window_view_clipping_paint, nullptr }; +// clang-format on #pragma endregion diff --git a/src/openrct2-ui/windows/Viewport.cpp b/src/openrct2-ui/windows/Viewport.cpp index a8f5911f6e..09e25b72b0 100644 --- a/src/openrct2-ui/windows/Viewport.cpp +++ b/src/openrct2-ui/windows/Viewport.cpp @@ -26,6 +26,7 @@ #define INITIAL_WIDTH 500 #define INITIAL_HEIGHT 350 +// clang-format off enum { WIDX_BACKGROUND, WIDX_TITLE, @@ -86,6 +87,7 @@ static rct_window_event_list window_viewport_events = { window_viewport_paint, nullptr }; +// clang-format on static sint32 _viewportNumber = 1; diff --git a/src/openrct2-ui/windows/Water.cpp b/src/openrct2-ui/windows/Water.cpp index f65f805475..c7f0a873eb 100644 --- a/src/openrct2-ui/windows/Water.cpp +++ b/src/openrct2-ui/windows/Water.cpp @@ -23,6 +23,7 @@ #include #include +// clang-format off enum WINDOW_WATER_WIDGET_IDX { WIDX_BACKGROUND, WIDX_TITLE, @@ -83,6 +84,7 @@ static rct_window_event_list window_water_events = { window_water_paint, nullptr }; +// clang-format on /** * diff --git a/src/openrct2/Game.cpp b/src/openrct2/Game.cpp index 3d1a859832..a3aa578523 100644 --- a/src/openrct2/Game.cpp +++ b/src/openrct2/Game.cpp @@ -89,6 +89,7 @@ uint8 gUnk141F568; uint32 gCurrentTicks; +// clang-format off GAME_COMMAND_CALLBACK_POINTER * game_command_callback = nullptr; static GAME_COMMAND_CALLBACK_POINTER * const game_command_callback_table[] = { nullptr, @@ -102,6 +103,7 @@ static GAME_COMMAND_CALLBACK_POINTER * const game_command_callback_table[] = { game_command_callback_pickup_guest, game_command_callback_pickup_staff }; +// clang-format on sint32 game_command_playerid = -1; rct_string_id gGameCommandErrorTitle; diff --git a/src/openrct2/drawing/Sprite.cpp b/src/openrct2/drawing/Sprite.cpp index 6dfd43ccf3..2811659d4e 100644 --- a/src/openrct2/drawing/Sprite.cpp +++ b/src/openrct2/drawing/Sprite.cpp @@ -48,6 +48,7 @@ struct rct_gx void * data; }; +// clang-format off constexpr struct { int start; @@ -85,6 +86,7 @@ static inline uint32 rctc_to_rct2_index(uint32 image) else if (image >= 28246 ) return image - 49; else throw std::runtime_error("Invalid RCTC g1.dat file"); } +// clang-format on static void read_and_convert_gxdat(IStream * stream, size_t count, bool is_rctc, rct_g1_element *elements) { diff --git a/src/openrct2/drawing/X8DrawingEngine.cpp b/src/openrct2/drawing/X8DrawingEngine.cpp index 381bcb1f77..bc88be037a 100644 --- a/src/openrct2/drawing/X8DrawingEngine.cpp +++ b/src/openrct2/drawing/X8DrawingEngine.cpp @@ -54,6 +54,7 @@ void X8RainDrawer::SetDPI(rct_drawpixelinfo * dpi) void X8RainDrawer::Draw(sint32 x, sint32 y, sint32 width, sint32 height, sint32 xStart, sint32 yStart) { + // clang-format off static constexpr const uint8 RainPattern[] = { 32, 32, 0, 12, 0, 14, 0, 16, 255, 0, 255, 0, 255, 0, 255, 0, 255, @@ -61,6 +62,7 @@ void X8RainDrawer::Draw(sint32 x, sint32 y, sint32 width, sint32 height, sint32 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 0, 0 }; + // clang-format on const uint8 * pattern = RainPattern; uint8 patternXSpace = *pattern++; diff --git a/src/openrct2/interface/Console.cpp b/src/openrct2/interface/Console.cpp index 29f4c18075..822608d286 100644 --- a/src/openrct2/interface/Console.cpp +++ b/src/openrct2/interface/Console.cpp @@ -1030,6 +1030,7 @@ struct console_command { const utf8 * usage; }; +// clang-format off static constexpr const utf8* console_variable_table[] = { "park_rating", "park_value", @@ -1105,6 +1106,7 @@ static constexpr const console_command console_command_table[] = { { "show_limits", cc_show_limits, "Shows the map data counts and limits.", "show_limits" }, { "date", cc_for_date, "Sets the date to a given date.", "Format [ [ ]]."} }; +// clang-format on static sint32 cc_windows(InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] sint32 argc) { diff --git a/src/openrct2/world/Duck.cpp b/src/openrct2/world/Duck.cpp index f638cf78b8..e60feaffff 100644 --- a/src/openrct2/world/Duck.cpp +++ b/src/openrct2/world/Duck.cpp @@ -25,6 +25,7 @@ #include "../world/Surface.h" #include "Sprite.h" +// clang-format off enum DUCK_STATE { FLY_TO_WATER, @@ -77,6 +78,7 @@ static constexpr const uint8 * DuckAnimations[] = DuckAnimationDoubleDrink, // DOUBLE_DRINK DuckAnimationFlyAway, // FLY_AWAY }; +// clang-format on bool rct_sprite::IsDuck() {