From dae982963dfea28dba1f3e47d32bbe0eaac6ace2 Mon Sep 17 00:00:00 2001 From: aMannus Date: Mon, 30 Jun 2025 11:02:32 +0200 Subject: [PATCH] Run clang-format, add newline to SohModals.h --- run-clang-format.ps1 | 2 +- .../Enhancements/TimeDisplay/TimeDisplay.h | 4 ++-- soh/soh/Enhancements/audio/AudioEditor.h | 4 ++-- soh/soh/Enhancements/controls/InputViewer.h | 8 +++---- .../Enhancements/cosmetics/CosmeticsEditor.h | 2 +- .../custom-message/CustomMessageTypes.h | 9 +++---- .../Enhancements/debugger/SohStatsWindow.h | 6 ++--- soh/soh/Enhancements/debugger/actorViewer.h | 2 +- soh/soh/Enhancements/debugger/colViewer.cpp | 2 +- soh/soh/Enhancements/debugger/colViewer.h | 2 +- .../Enhancements/debugger/debugSaveEditor.h | 2 +- soh/soh/Enhancements/debugger/dlViewer.h | 2 +- soh/soh/Enhancements/debugger/hookDebugger.h | 2 +- soh/soh/Enhancements/debugger/valueViewer.h | 2 +- .../game-interactor/GameInteractionEffect.h | 2 +- soh/soh/Enhancements/gameplaystatswindow.h | 2 +- .../Enhancements/item-tables/ItemTableTypes.h | 24 ++++++++++--------- .../Enhancements/randomizer/3drando/fill.cpp | 2 +- .../Enhancements/randomizer/3drando/shops.cpp | 2 +- soh/soh/Enhancements/randomizer/Plandomizer.h | 2 +- soh/soh/Enhancements/randomizer/draw.h | 21 ++++++++++++---- .../Enhancements/randomizer/location_access.h | 3 +-- .../Enhancements/randomizer/randomizerTypes.h | 2 +- .../randomizer/randomizer_check_tracker.h | 8 +++---- .../randomizer/randomizer_entrance_tracker.h | 14 ++++------- .../randomizer/randomizer_item_tracker.h | 12 ++++------ soh/soh/Enhancements/savestates.cpp | 8 +++---- .../speechsynthesizer/SpeechSynthesizer.cpp | 2 +- soh/soh/Enhancements/timesplits/TimeSplits.h | 2 +- soh/soh/Extractor/Extract.cpp | 4 ++-- soh/soh/Extractor/portable-file-dialogs.h | 8 +++---- soh/soh/Notification/Notification.h | 4 ++-- soh/soh/OTRGlobals.cpp | 6 +++-- soh/soh/ShipUtils.h | 2 +- soh/soh/SohGui/SohMenuBar.h | 2 +- soh/soh/SohGui/SohModals.h | 6 ++--- 36 files changed, 96 insertions(+), 91 deletions(-) diff --git a/run-clang-format.ps1 b/run-clang-format.ps1 index 063cec7af..cbc9f4918 100644 --- a/run-clang-format.ps1 +++ b/run-clang-format.ps1 @@ -45,5 +45,5 @@ for ($i = 0; $i -lt $files.Length; $i++) { $file = $files[$i] $relativePath = $file.FullName.Substring($basePath.Length + 1) Write-Host "Formatting [$($i+1)/$($files.Length)] $relativePath" - .\clang-format.exe -i $file.FullName + clang-format.exe -i $file.FullName } diff --git a/soh/soh/Enhancements/TimeDisplay/TimeDisplay.h b/soh/soh/Enhancements/TimeDisplay/TimeDisplay.h index c6635b5a7..1d55711a3 100644 --- a/soh/soh/Enhancements/TimeDisplay/TimeDisplay.h +++ b/soh/soh/Enhancements/TimeDisplay/TimeDisplay.h @@ -5,9 +5,9 @@ class TimeDisplayWindow final : public Ship::GuiWindow { using GuiWindow::GuiWindow; void InitElement() override; - void DrawElement() override{}; + void DrawElement() override {}; void Draw() override; - void UpdateElement() override{}; + void UpdateElement() override {}; }; void TimeDisplayUpdateDisplayOptions(); diff --git a/soh/soh/Enhancements/audio/AudioEditor.h b/soh/soh/Enhancements/audio/AudioEditor.h index ca3636d9a..1552d7292 100644 --- a/soh/soh/Enhancements/audio/AudioEditor.h +++ b/soh/soh/Enhancements/audio/AudioEditor.h @@ -13,8 +13,8 @@ class AudioEditor final : public Ship::GuiWindow { void DrawElement() override; void InitElement() override; - void UpdateElement() override{}; - ~AudioEditor(){}; + void UpdateElement() override {}; + ~AudioEditor() {}; }; void AudioEditor_RandomizeAll(); diff --git a/soh/soh/Enhancements/controls/InputViewer.h b/soh/soh/Enhancements/controls/InputViewer.h index 67303b7eb..f7d117e71 100644 --- a/soh/soh/Enhancements/controls/InputViewer.h +++ b/soh/soh/Enhancements/controls/InputViewer.h @@ -22,9 +22,9 @@ class InputViewer final : public Ship::GuiWindow { using GuiWindow::GuiWindow; void Draw() override; - void InitElement() override{}; + void InitElement() override {}; void DrawElement() override; - void UpdateElement() override{}; + void UpdateElement() override {}; InputViewer(); ~InputViewer(); @@ -37,9 +37,9 @@ class InputViewerSettingsWindow final : public Ship::GuiWindow { public: using GuiWindow::GuiWindow; - void InitElement() override{}; + void InitElement() override {}; void DrawElement() override; - void UpdateElement() override{}; + void UpdateElement() override {}; InputViewerSettingsWindow(); ~InputViewerSettingsWindow(); diff --git a/soh/soh/Enhancements/cosmetics/CosmeticsEditor.h b/soh/soh/Enhancements/cosmetics/CosmeticsEditor.h index e10583081..bc1a6c650 100644 --- a/soh/soh/Enhancements/cosmetics/CosmeticsEditor.h +++ b/soh/soh/Enhancements/cosmetics/CosmeticsEditor.h @@ -67,6 +67,6 @@ class CosmeticsEditorWindow final : public Ship::GuiWindow { void InitElement() override; void DrawElement() override; void ApplyDungeonKeyColors(); - void UpdateElement() override{}; + void UpdateElement() override {}; }; #endif //__cplusplus \ No newline at end of file diff --git a/soh/soh/Enhancements/custom-message/CustomMessageTypes.h b/soh/soh/Enhancements/custom-message/CustomMessageTypes.h index b5bc0fd6e..7436e9702 100644 --- a/soh/soh/Enhancements/custom-message/CustomMessageTypes.h +++ b/soh/soh/Enhancements/custom-message/CustomMessageTypes.h @@ -206,13 +206,10 @@ typedef struct { std::string french; } GetItemMessage; -#define GIMESSAGE(giid, iid, english, german, french) \ - { giid, iid, english, german, french } +#define GIMESSAGE(giid, iid, english, german, french) { giid, iid, english, german, french } -#define GIMESSAGE_UNTRANSLATED(giid, iid, message) \ - { giid, iid, message, message, message } +#define GIMESSAGE_UNTRANSLATED(giid, iid, message) { giid, iid, message, message, message } -#define GIMESSAGE_NO_GERMAN(giid, iid, english, french) \ - { giid, iid, english, english, french } +#define GIMESSAGE_NO_GERMAN(giid, iid, english, french) { giid, iid, english, english, french } #endif diff --git a/soh/soh/Enhancements/debugger/SohStatsWindow.h b/soh/soh/Enhancements/debugger/SohStatsWindow.h index 09b495cdb..c0cd4872f 100644 --- a/soh/soh/Enhancements/debugger/SohStatsWindow.h +++ b/soh/soh/Enhancements/debugger/SohStatsWindow.h @@ -6,12 +6,12 @@ class SohStatsWindow final : public Ship::GuiWindow { public: using GuiWindow::GuiWindow; - ~SohStatsWindow(){}; + ~SohStatsWindow() {}; protected: - void InitElement() override{}; + void InitElement() override {}; void DrawElement() override; - void UpdateElement() override{}; + void UpdateElement() override {}; }; #endif // SOH_STATS_H diff --git a/soh/soh/Enhancements/debugger/actorViewer.h b/soh/soh/Enhancements/debugger/actorViewer.h index 07c7e5e24..1c9fd131e 100644 --- a/soh/soh/Enhancements/debugger/actorViewer.h +++ b/soh/soh/Enhancements/debugger/actorViewer.h @@ -12,7 +12,7 @@ class ActorViewerWindow final : public Ship::GuiWindow { void DrawElement() override; void InitElement() override; - void UpdateElement() override{}; + void UpdateElement() override {}; private: Actor* display = nullptr; diff --git a/soh/soh/Enhancements/debugger/colViewer.cpp b/soh/soh/Enhancements/debugger/colViewer.cpp index e180e93ef..3ca27d42d 100644 --- a/soh/soh/Enhancements/debugger/colViewer.cpp +++ b/soh/soh/Enhancements/debugger/colViewer.cpp @@ -157,7 +157,7 @@ void CalcTriNorm(const Vec3f& v1, const Vec3f& v2, const Vec3f& v3, Vec3f& norm) // Various macros used for creating verticies and rendering that aren't in gbi.h #define G_CC_MODULATERGB_PRIM_ENVA PRIMITIVE, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT #define G_CC_PRIMITIVE_ENVA 0, 0, 0, PRIMITIVE, 0, 0, 0, ENVIRONMENT -#define qs105(n) ((int16_t)((n)*0x0020)) +#define qs105(n) ((int16_t)((n) * 0x0020)) #define gdSPDefVtxN(x, y, z, s, t, nx, ny, nz, ca) \ { \ .n = {.ob = { x, y, z }, .tc = { qs105(s), qs105(t) }, .n = { nx, ny, nz }, .a = ca } \ diff --git a/soh/soh/Enhancements/debugger/colViewer.h b/soh/soh/Enhancements/debugger/colViewer.h index 04f457aa0..558080a6d 100644 --- a/soh/soh/Enhancements/debugger/colViewer.h +++ b/soh/soh/Enhancements/debugger/colViewer.h @@ -11,7 +11,7 @@ class ColViewerWindow final : public Ship::GuiWindow { void InitElement() override; void DrawElement() override; - void UpdateElement() override{}; + void UpdateElement() override {}; }; #endif diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.h b/soh/soh/Enhancements/debugger/debugSaveEditor.h index e8bdeb00a..bd67363e2 100644 --- a/soh/soh/Enhancements/debugger/debugSaveEditor.h +++ b/soh/soh/Enhancements/debugger/debugSaveEditor.h @@ -459,5 +459,5 @@ class SaveEditorWindow final : public Ship::GuiWindow { void InitElement() override; void DrawElement() override; - void UpdateElement() override{}; + void UpdateElement() override {}; }; diff --git a/soh/soh/Enhancements/debugger/dlViewer.h b/soh/soh/Enhancements/debugger/dlViewer.h index a75fead97..7bb22ccc2 100644 --- a/soh/soh/Enhancements/debugger/dlViewer.h +++ b/soh/soh/Enhancements/debugger/dlViewer.h @@ -8,5 +8,5 @@ class DLViewerWindow final : public Ship::GuiWindow { void InitElement() override; void DrawElement() override; - void UpdateElement() override{}; + void UpdateElement() override {}; }; diff --git a/soh/soh/Enhancements/debugger/hookDebugger.h b/soh/soh/Enhancements/debugger/hookDebugger.h index 1a586a09c..85c21ad1b 100644 --- a/soh/soh/Enhancements/debugger/hookDebugger.h +++ b/soh/soh/Enhancements/debugger/hookDebugger.h @@ -6,5 +6,5 @@ class HookDebuggerWindow final : public Ship::GuiWindow { void InitElement() override; void DrawElement() override; - void UpdateElement() override{}; + void UpdateElement() override {}; }; diff --git a/soh/soh/Enhancements/debugger/valueViewer.h b/soh/soh/Enhancements/debugger/valueViewer.h index 04d698d2c..5cf7cc3f6 100644 --- a/soh/soh/Enhancements/debugger/valueViewer.h +++ b/soh/soh/Enhancements/debugger/valueViewer.h @@ -39,7 +39,7 @@ class ValueViewerWindow final : public Ship::GuiWindow { void InitElement() override; void DrawElement() override; - void UpdateElement() override{}; + void UpdateElement() override {}; }; #endif diff --git a/soh/soh/Enhancements/game-interactor/GameInteractionEffect.h b/soh/soh/Enhancements/game-interactor/GameInteractionEffect.h index 72eb101b0..65457cad7 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractionEffect.h +++ b/soh/soh/Enhancements/game-interactor/GameInteractionEffect.h @@ -23,7 +23,7 @@ class RemovableGameInteractionEffect : public GameInteractionEffectBase { GameInteractionEffectQueryResult Remove(); protected: - virtual void _Remove(){}; + virtual void _Remove() {}; }; class ParameterizedGameInteractionEffect { diff --git a/soh/soh/Enhancements/gameplaystatswindow.h b/soh/soh/Enhancements/gameplaystatswindow.h index 515820307..e0de09134 100644 --- a/soh/soh/Enhancements/gameplaystatswindow.h +++ b/soh/soh/Enhancements/gameplaystatswindow.h @@ -6,5 +6,5 @@ class GameplayStatsWindow final : public Ship::GuiWindow { void InitElement() override; void DrawElement() override; - void UpdateElement() override{}; + void UpdateElement() override {}; }; \ No newline at end of file diff --git a/soh/soh/Enhancements/item-tables/ItemTableTypes.h b/soh/soh/Enhancements/item-tables/ItemTableTypes.h index df59d6770..a234f7310 100644 --- a/soh/soh/Enhancements/item-tables/ItemTableTypes.h +++ b/soh/soh/Enhancements/item-tables/ItemTableTypes.h @@ -29,18 +29,20 @@ typedef enum GetItemCategory { /* 0x05 */ ITEM_CATEGORY_MAJOR, } GetItemCategory; -#define GET_ITEM(itemId, objectId, drawId, textId, field, chestAnim, itemCategory, modIndex, getItemId) \ - { \ - itemId, field, (int16_t)((chestAnim != CHEST_ANIM_SHORT ? 1 : -1) * (drawId + 1)), textId, objectId, modIndex, \ - modIndex, getItemId, drawId, true, ITEM_FROM_NPC, itemCategory, itemId, modIndex, NULL \ - } +#define GET_ITEM(itemId, objectId, drawId, textId, field, chestAnim, itemCategory, modIndex, getItemId) \ + { itemId, field, (int16_t)((chestAnim != CHEST_ANIM_SHORT ? 1 : -1) * (drawId + 1)), \ + textId, objectId, modIndex, \ + modIndex, getItemId, drawId, \ + true, ITEM_FROM_NPC, itemCategory, \ + itemId, modIndex, NULL } -#define GET_ITEM_CUSTOM_TABLE(itemId, objectId, drawId, textId, field, chestAnim, itemCategory, modIndex, tableId, \ - getItemId) \ - { \ - itemId, field, (int16_t)((chestAnim != CHEST_ANIM_SHORT ? 1 : -1) * (drawId + 1)), textId, objectId, modIndex, \ - tableId, getItemId, drawId, true, ITEM_FROM_NPC, itemCategory, itemId, modIndex, NULL \ - } +#define GET_ITEM_CUSTOM_TABLE(itemId, objectId, drawId, textId, field, chestAnim, itemCategory, modIndex, tableId, \ + getItemId) \ + { itemId, field, (int16_t)((chestAnim != CHEST_ANIM_SHORT ? 1 : -1) * (drawId + 1)), \ + textId, objectId, modIndex, \ + tableId, getItemId, drawId, \ + true, ITEM_FROM_NPC, itemCategory, \ + itemId, modIndex, NULL } #define GET_ITEM_NONE \ { ITEM_NONE, 0, 0, 0, 0, 0, 0, 0, 0, false, ITEM_FROM_NPC, ITEM_CATEGORY_JUNK, ITEM_NONE, 0, NULL } diff --git a/soh/soh/Enhancements/randomizer/3drando/fill.cpp b/soh/soh/Enhancements/randomizer/3drando/fill.cpp index 2ac5a3592..22614dd8a 100644 --- a/soh/soh/Enhancements/randomizer/3drando/fill.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/fill.cpp @@ -9,7 +9,7 @@ #include "hints.hpp" #include "shops.hpp" #include "pool_functions.hpp" -//#include "debug.hpp" +// #include "debug.hpp" #include "soh/Enhancements/randomizer/static_data.h" #include "soh/Enhancements/debugger/performanceTimer.h" diff --git a/soh/soh/Enhancements/randomizer/3drando/shops.cpp b/soh/soh/Enhancements/randomizer/3drando/shops.cpp index 441454cd0..95ecdaca5 100644 --- a/soh/soh/Enhancements/randomizer/3drando/shops.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/shops.cpp @@ -588,7 +588,7 @@ void InitTrickNames() { }; trickNameTable[RG_PROGRESSIVE_GORONSWORD] = { Text{ "Progressive Titan Blade", "Lame des Titans (prog.)", - "Titanenklinge (prog.)" }, // "Hoja del Titán progresiva" + "Titanenklinge (prog.)" }, // "Hoja del Titán progresiva" Text{ "Progressive Goron Knife", "Lame Goron (prog.)", "Goronenmesser (prog.)" }, // "Daga Goron progresiva" Text{ "Progressive Giant Sword", "Épée géante (prog.)", "Riesenschwert (prog.)" }, // "Espada gigante progresiva" diff --git a/soh/soh/Enhancements/randomizer/Plandomizer.h b/soh/soh/Enhancements/randomizer/Plandomizer.h index bfb118bbf..81370ef59 100644 --- a/soh/soh/Enhancements/randomizer/Plandomizer.h +++ b/soh/soh/Enhancements/randomizer/Plandomizer.h @@ -22,7 +22,7 @@ class PlandomizerWindow final : public Ship::GuiWindow { void InitElement() override; void DrawElement() override; - void UpdateElement() override{}; + void UpdateElement() override {}; }; typedef struct { diff --git a/soh/soh/Enhancements/randomizer/draw.h b/soh/soh/Enhancements/randomizer/draw.h index 8483a7bf9..ffca78b6e 100644 --- a/soh/soh/Enhancements/randomizer/draw.h +++ b/soh/soh/Enhancements/randomizer/draw.h @@ -28,11 +28,22 @@ void Randomizer_DrawBombchuBagInLogic(PlayState* play, GetItemEntry* getItemEntr void Randomizer_DrawBombchuBag(PlayState* play, GetItemEntry* getItemEntry); void Randomizer_DrawOverworldKey(PlayState* play, GetItemEntry* getItemEntry); -#define GET_ITEM_MYSTERY \ - { \ - ITEM_NONE_FE, 0, 0, 0, 0, MOD_RANDOMIZER, MOD_RANDOMIZER, ITEM_NONE_FE, 0, false, ITEM_FROM_NPC, \ - ITEM_CATEGORY_JUNK, ITEM_NONE_FE, MOD_RANDOMIZER, (CustomDrawFunc)Randomizer_DrawMysteryItem \ - } +#define GET_ITEM_MYSTERY \ + { ITEM_NONE_FE, \ + 0, \ + 0, \ + 0, \ + 0, \ + MOD_RANDOMIZER, \ + MOD_RANDOMIZER, \ + ITEM_NONE_FE, \ + 0, \ + false, \ + ITEM_FROM_NPC, \ + ITEM_CATEGORY_JUNK, \ + ITEM_NONE_FE, \ + MOD_RANDOMIZER, \ + (CustomDrawFunc)Randomizer_DrawMysteryItem } #ifdef __cplusplus }; #endif diff --git a/soh/soh/Enhancements/randomizer/location_access.h b/soh/soh/Enhancements/randomizer/location_access.h index 5cbc84060..06286e517 100644 --- a/soh/soh/Enhancements/randomizer/location_access.h +++ b/soh/soh/Enhancements/randomizer/location_access.h @@ -52,8 +52,7 @@ class EventAccess { std::string CleanCheckConditionString(std::string condition); #define LOCATION(check, condition) \ - LocationAccess( \ - check, [] { return condition; }, CleanCheckConditionString(#condition)) + LocationAccess(check, [] { return condition; }, CleanCheckConditionString(#condition)) // this class is meant to hold an item location with a boolean function to determine its accessibility from a specific // area diff --git a/soh/soh/Enhancements/randomizer/randomizerTypes.h b/soh/soh/Enhancements/randomizer/randomizerTypes.h index ec44b1129..9798ad3d1 100644 --- a/soh/soh/Enhancements/randomizer/randomizerTypes.h +++ b/soh/soh/Enhancements/randomizer/randomizerTypes.h @@ -5,7 +5,7 @@ #define MAX_TRICK_NAME_SIZE 50 -#define TWO_ACTOR_PARAMS(a, b) ((((a)&0xFFFF) << 16) | ((b)&0xFFFF)) +#define TWO_ACTOR_PARAMS(a, b) ((((a) & 0xFFFF) << 16) | ((b) & 0xFFFF)) // This should probably go in a less rando-specific location // but the best location will probably be in the modding engine diff --git a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.h b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.h index 38c38a39b..4dd84c6f0 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.h +++ b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.h @@ -11,19 +11,19 @@ namespace CheckTracker { class CheckTrackerSettingsWindow final : public Ship::GuiWindow { public: using GuiWindow::GuiWindow; - ~CheckTrackerSettingsWindow(){}; + ~CheckTrackerSettingsWindow() {}; protected: - void InitElement() override{}; + void InitElement() override {}; void DrawElement() override; - void UpdateElement() override{}; + void UpdateElement() override {}; }; class CheckTrackerWindow final : public Ship::GuiWindow { public: using GuiWindow::GuiWindow; void Draw() override; - ~CheckTrackerWindow(){}; + ~CheckTrackerWindow() {}; protected: void InitElement() override; diff --git a/soh/soh/Enhancements/randomizer/randomizer_entrance_tracker.h b/soh/soh/Enhancements/randomizer/randomizer_entrance_tracker.h index 2d2f7143c..63d65ee82 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_entrance_tracker.h +++ b/soh/soh/Enhancements/randomizer/randomizer_entrance_tracker.h @@ -76,12 +76,8 @@ typedef struct { extern EntranceTrackingData gEntranceTrackingData; -#define SINGLE_SCENE_INFO(scene) \ - { \ - { scene, -1 } \ - } -#define SCENE_NO_SPAWN(scene) \ - { scene, -1 } +#define SINGLE_SCENE_INFO(scene) { { scene, -1 } } +#define SCENE_NO_SPAWN(scene) { scene, -1 } void SetCurrentGrottoIDForTracker(int16_t entranceIndex); void SetLastEntranceOverrideForTracker(int16_t entranceIndex); @@ -97,9 +93,9 @@ class EntranceTrackerSettingsWindow final : public Ship::GuiWindow { using GuiWindow::GuiWindow; protected: - void InitElement() override{}; + void InitElement() override {}; void DrawElement() override; - void UpdateElement() override{}; + void UpdateElement() override {}; }; class EntranceTrackerWindow final : public Ship::GuiWindow { @@ -109,5 +105,5 @@ class EntranceTrackerWindow final : public Ship::GuiWindow { void InitElement() override; void DrawElement() override; - void UpdateElement() override{}; + void UpdateElement() override {}; }; diff --git a/soh/soh/Enhancements/randomizer/randomizer_item_tracker.h b/soh/soh/Enhancements/randomizer/randomizer_item_tracker.h index 85a2b63a0..f671d5623 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_item_tracker.h +++ b/soh/soh/Enhancements/randomizer/randomizer_item_tracker.h @@ -19,11 +19,9 @@ bool HasSong(ItemTrackerItem); bool HasQuestItem(ItemTrackerItem); bool HasEquipment(ItemTrackerItem); -#define ITEM_TRACKER_ITEM(id, data, drawFunc) \ - { id, #id, #id "_Faded", data, drawFunc } +#define ITEM_TRACKER_ITEM(id, data, drawFunc) { id, #id, #id "_Faded", data, drawFunc } -#define ITEM_TRACKER_ITEM_CUSTOM(id, name, nameFaded, data, drawFunc) \ - { id, #name, #nameFaded "_Faded", data, drawFunc } +#define ITEM_TRACKER_ITEM_CUSTOM(id, name, nameFaded, data, drawFunc) { id, #name, #nameFaded "_Faded", data, drawFunc } static std::vector itemTrackerWindowIDs = { "Item Tracker", "Inventory Items Tracker", @@ -52,9 +50,9 @@ class ItemTrackerSettingsWindow final : public Ship::GuiWindow { using GuiWindow::GuiWindow; protected: - void InitElement() override{}; + void InitElement() override {}; void DrawElement() override; - void UpdateElement() override{}; + void UpdateElement() override {}; }; class ItemTrackerWindow final : public Ship::GuiWindow { @@ -65,5 +63,5 @@ class ItemTrackerWindow final : public Ship::GuiWindow { protected: void InitElement() override; void DrawElement() override; - void UpdateElement() override{}; + void UpdateElement() override {}; }; \ No newline at end of file diff --git a/soh/soh/Enhancements/savestates.cpp b/soh/soh/Enhancements/savestates.cpp index 270bdef7d..d0a756e25 100644 --- a/soh/soh/Enhancements/savestates.cpp +++ b/soh/soh/Enhancements/savestates.cpp @@ -852,8 +852,8 @@ void SaveStateMgr::ProcessSaveStateRequests(void) { SPDLOG_ERROR("Invalid SaveState slot: {}", request.slot); } break; - [[unlikely]] default - : SPDLOG_ERROR("Invalid SaveState request type: Unknown ({})", static_cast(request.type)); + [[unlikely]] default: + SPDLOG_ERROR("Invalid SaveState request type: Unknown ({})", static_cast(request.type)); break; } this->requests.pop(); @@ -882,8 +882,8 @@ SaveStateReturn SaveStateMgr::AddRequest(const SaveStateRequest request) { 1.0f, true, "state slot %u empty", request.slot); return SaveStateReturn::FAIL_INVALID_SLOT; } - [[unlikely]] default - : SPDLOG_ERROR("Invalid SaveState request type: Unknown ({})", static_cast(request.type)); + [[unlikely]] default: + SPDLOG_ERROR("Invalid SaveState request type: Unknown ({})", static_cast(request.type)); return SaveStateReturn::FAIL_BAD_REQUEST; } } diff --git a/soh/soh/Enhancements/speechsynthesizer/SpeechSynthesizer.cpp b/soh/soh/Enhancements/speechsynthesizer/SpeechSynthesizer.cpp index 2b5f3cf77..83e16752b 100644 --- a/soh/soh/Enhancements/speechsynthesizer/SpeechSynthesizer.cpp +++ b/soh/soh/Enhancements/speechsynthesizer/SpeechSynthesizer.cpp @@ -7,7 +7,7 @@ #include "SpeechSynthesizer.h" -SpeechSynthesizer::SpeechSynthesizer() : mInitialized(false){}; +SpeechSynthesizer::SpeechSynthesizer() : mInitialized(false) {}; bool SpeechSynthesizer::Init(void) { if (mInitialized) { diff --git a/soh/soh/Enhancements/timesplits/TimeSplits.h b/soh/soh/Enhancements/timesplits/TimeSplits.h index 2d4a4ba3f..3dd868cf3 100644 --- a/soh/soh/Enhancements/timesplits/TimeSplits.h +++ b/soh/soh/Enhancements/timesplits/TimeSplits.h @@ -13,7 +13,7 @@ class TimeSplitWindow final : public Ship::GuiWindow { void InitElement() override; void Draw() override; void DrawElement() override; - void UpdateElement() override{}; + void UpdateElement() override {}; }; typedef enum SplitAction { diff --git a/soh/soh/Extractor/Extract.cpp b/soh/soh/Extractor/Extract.cpp index a12be6264..c281e3e5b 100644 --- a/soh/soh/Extractor/Extract.cpp +++ b/soh/soh/Extractor/Extract.cpp @@ -24,10 +24,10 @@ #define BSWAP32 bswap_32 #define BSWAP16 bswap_16 #else -#define BSWAP16(value) ((((value)&0xff) << 8) | ((value) >> 8)) +#define BSWAP16(value) ((((value) & 0xff) << 8) | ((value) >> 8)) #define BSWAP32(value) \ - (((uint32_t)BSWAP16((uint16_t)((value)&0xffff)) << 16) | (uint32_t)BSWAP16((uint16_t)((value) >> 16))) + (((uint32_t)BSWAP16((uint16_t)((value) & 0xffff)) << 16) | (uint32_t)BSWAP16((uint16_t)((value) >> 16))) #endif #if defined(_MSC_VER) diff --git a/soh/soh/Extractor/portable-file-dialogs.h b/soh/soh/Extractor/portable-file-dialogs.h index 6deb9ed66..609aa8b0a 100644 --- a/soh/soh/Extractor/portable-file-dialogs.h +++ b/soh/soh/Extractor/portable-file-dialogs.h @@ -892,11 +892,11 @@ inline std::vector internal::dialog::desktop_helper() const { #if __APPLE__ return { "osascript" }; #else - return { flags(flag::has_zenity) ? "zenity" + return { flags(flag::has_zenity) ? "zenity" : flags(flag::has_matedialog) ? "matedialog" - : flags(flag::has_qarma) ? "qarma" - : flags(flag::has_kdialog) ? "kdialog" - : "echo" }; + : flags(flag::has_qarma) ? "qarma" + : flags(flag::has_kdialog) ? "kdialog" + : "echo" }; #endif } diff --git a/soh/soh/Notification/Notification.h b/soh/soh/Notification/Notification.h index 7eb4bb2d7..8bfa18acb 100644 --- a/soh/soh/Notification/Notification.h +++ b/soh/soh/Notification/Notification.h @@ -23,8 +23,8 @@ class Window final : public Ship::GuiWindow { public: using GuiWindow::GuiWindow; - void InitElement() override{}; - void DrawElement() override{}; + void InitElement() override {}; + void DrawElement() override {}; void Draw() override; void UpdateElement() override; }; diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 2bdcabfb5..d56f92008 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1411,7 +1411,8 @@ extern "C" void Graph_StartFrame() { case SaveStateReturn::FAIL_WRONG_GAMESTATE: SPDLOG_ERROR("[SOH] Can not save a state outside of \"GamePlay\""); break; - [[unlikely]] default : break; + [[unlikely]] default: + break; } break; } @@ -1453,7 +1454,8 @@ extern "C" void Graph_StartFrame() { case SaveStateReturn::FAIL_WRONG_GAMESTATE: SPDLOG_ERROR("[SOH] Can not load a state outside of \"GamePlay\""); break; - [[unlikely]] default : break; + [[unlikely]] default: + break; } break; diff --git a/soh/soh/ShipUtils.h b/soh/soh/ShipUtils.h index 85fc89cc5..fd98e8891 100644 --- a/soh/soh/ShipUtils.h +++ b/soh/soh/ShipUtils.h @@ -2,7 +2,7 @@ #define SHIP_UTILS_H #include -//#include "PR/ultratypes.h" +// #include "PR/ultratypes.h" #ifdef __cplusplus diff --git a/soh/soh/SohGui/SohMenuBar.h b/soh/soh/SohGui/SohMenuBar.h index 8c078e08f..b8c9a9bb5 100644 --- a/soh/soh/SohGui/SohMenuBar.h +++ b/soh/soh/SohGui/SohMenuBar.h @@ -12,6 +12,6 @@ class SohMenuBar : public Ship::GuiMenuBar { protected: void DrawElement() override; void InitElement() override; - void UpdateElement() override{}; + void UpdateElement() override {}; }; } // namespace SohGui \ No newline at end of file diff --git a/soh/soh/SohGui/SohModals.h b/soh/soh/SohGui/SohModals.h index f74f0b1bf..5846f5389 100644 --- a/soh/soh/SohGui/SohModals.h +++ b/soh/soh/SohGui/SohModals.h @@ -9,12 +9,12 @@ class SohModalWindow final : public Ship::GuiWindow { using GuiWindow::GuiWindow; void Draw() override; - void InitElement() override{}; + void InitElement() override {}; void DrawElement() override; - void UpdateElement() override{}; + void UpdateElement() override {}; void RegisterPopup(std::string title, std::string message, std::string button1 = "OK", std::string button2 = "", std::function button1callback = nullptr, std::function button2callback = nullptr); bool IsPopupOpen(std::string title); void DismissPopup(); -}; \ No newline at end of file +};