Skip to content

Commit

Permalink
Move most ImGui-related files/code to an SohGui subfolder. (HarbourMa…
Browse files Browse the repository at this point in the history
  • Loading branch information
Malkierian authored Jan 29, 2025
1 parent 668e266 commit 1f65bde
Show file tree
Hide file tree
Showing 37 changed files with 118 additions and 118 deletions.
2 changes: 1 addition & 1 deletion soh/soh/Enhancements/TimeDisplay/TimeDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "assets/textures/parameter_static/parameter_static.h"
#include "assets/soh_assets.h"
#include "soh/ImGuiUtils.h"
#include "soh/SohGui/ImGuiUtils.h"

extern "C" {
#include "macros.h"
Expand Down
2 changes: 1 addition & 1 deletion soh/soh/Enhancements/audio/AudioEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "soh/OTRGlobals.h"
#include "soh/cvar_prefixes.h"
#include <utils/StringHelper.h>
#include "soh/UIWidgets.hpp"
#include "soh/SohGui/UIWidgets.hpp"
#include "AudioCollection.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"

Expand Down
2 changes: 1 addition & 1 deletion soh/soh/Enhancements/controls/InputViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <spdlog/spdlog.h>
#include <cmath>

#include "../../UIWidgets.hpp"
#include "soh/SohGui/UIWidgets.hpp"

// Text colors
static ImVec4 textColor = ImVec4(1.0f, 1.0f, 1.0f, 1.0f);
Expand Down
2 changes: 1 addition & 1 deletion soh/soh/Enhancements/controls/SohInputEditorWindow.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "SohInputEditorWindow.h"
#include <utils/StringHelper.h>
#include "soh/OTRGlobals.h"
#include "../../UIWidgets.hpp"
#include "soh/SohGui/UIWidgets.hpp"
#include "z64.h"
#include "soh/cvar_prefixes.h"
#ifndef __WIIU__
Expand Down
2 changes: 1 addition & 1 deletion soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <algorithm>
#include <libultraship/libultraship.h>

#include "soh/UIWidgets.hpp"
#include "soh/SohGui/UIWidgets.hpp"
#include "soh/OTRGlobals.h"
#include "soh/ResourceManagerHelpers.h"

Expand Down
2 changes: 1 addition & 1 deletion soh/soh/Enhancements/debugger/MessageViewer.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "MessageViewer.h"

#include <soh/UIWidgets.hpp>
#include <soh/SohGui/UIWidgets.hpp>
#include <textures/message_static/message_static.h>

#include "../custom-message/CustomMessageManager.h"
Expand Down
2 changes: 1 addition & 1 deletion soh/soh/Enhancements/debugger/actorViewer.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "actorViewer.h"
#include "../../util.h"
#include "../../UIWidgets.hpp"
#include "soh/SohGui/UIWidgets.hpp"
#include "soh/ActorDB.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/Enhancements/nametag.h"
Expand Down
2 changes: 1 addition & 1 deletion soh/soh/Enhancements/debugger/colViewer.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "colViewer.h"
#include "../../frame_interpolation.h"
#include "../../UIWidgets.hpp"
#include "soh/SohGui/UIWidgets.hpp"

#include <vector>
#include <string>
Expand Down
8 changes: 4 additions & 4 deletions soh/soh/Enhancements/debugger/debugSaveEditor.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "debugSaveEditor.h"
#include "../../util.h"
#include "../../ImGuiUtils.h"
#include "../../OTRGlobals.h"
#include "../../UIWidgets.hpp"
#include "soh/util.h"
#include "soh/SohGui/ImGuiUtils.h"
#include "soh/OTRGlobals.h"
#include "soh/SohGui/UIWidgets.hpp"

#include <spdlog/fmt/fmt.h>
#include <array>
Expand Down
6 changes: 3 additions & 3 deletions soh/soh/Enhancements/debugger/dlViewer.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "actorViewer.h"
#include "../../util.h"
#include "../../UIWidgets.hpp"
#include "soh/util.h"
#include "soh/SohGui/UIWidgets.hpp"
#include "ResourceManager.h"
#include "DisplayList.h"
#include "../../OTRGlobals.h"
#include "soh/OTRGlobals.h"

#include <array>
#include <bit>
Expand Down
4 changes: 2 additions & 2 deletions soh/soh/Enhancements/debugger/hookDebugger.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "hookDebugger.h"
#include "../game-interactor/GameInteractor.h"
#include "../../UIWidgets.hpp"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/SohGui/UIWidgets.hpp"
#include <string>
#include <version>

Expand Down
2 changes: 1 addition & 1 deletion soh/soh/Enhancements/debugger/valueViewer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "valueViewer.h"
#include "../../UIWidgets.hpp"
#include "soh/SohGui/UIWidgets.hpp"
#include "soh/OTRGlobals.h"

extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion soh/soh/Enhancements/gameplaystats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "functions.h"
#include "macros.h"
#include "soh/cvar_prefixes.h"
#include "../UIWidgets.hpp"
#include "soh/SohGui/UIWidgets.hpp"
#include "soh/util.h"

#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion soh/soh/Enhancements/presets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <string>
#include <cstdint>
#include <libultraship/bridge.h>
#include "soh/UIWidgets.hpp"
#include "soh/SohGui/UIWidgets.hpp"
#include <libultraship/libultraship.h>

void clearCvars(std::vector<const char*> cvarsToClear) {
Expand Down
4 changes: 2 additions & 2 deletions soh/soh/Enhancements/randomizer/Plandomizer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Plandomizer.h"
#include "soh/UIWidgets.hpp"
#include "soh/SohGui/UIWidgets.hpp"
#include "soh/util.h"
#include <vector>
#include "soh/Notification/Notification.h"
Expand All @@ -10,7 +10,7 @@
#include <filesystem>

#include "soh/OTRGlobals.h"
#include "soh/ImGuiUtils.h"
#include "soh/SohGui/ImGuiUtils.h"
#include "soh/Enhancements/randomizer/logic.h"
#include "soh/Enhancements/randomizer/randomizer_check_objects.h"
#include "soh/Enhancements/randomizer/rando_hash.h"
Expand Down
2 changes: 1 addition & 1 deletion soh/soh/Enhancements/randomizer/hook_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "soh/Enhancements/randomizer/ShuffleFreestanding.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ImGuiUtils.h"
#include "soh/SohGui/ImGuiUtils.h"
#include "soh/Notification/Notification.h"
#include "soh/SaveManager.h"
#include "soh/Enhancements/randomizer/ShuffleFairies.h"
Expand Down
2 changes: 1 addition & 1 deletion soh/soh/Enhancements/randomizer/option.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "libultraship/bridge.h"
#include <Context.h>
#include <imgui.h>
#include "soh/UIWidgets.hpp"
#include "soh/SohGui/UIWidgets.hpp"

namespace Rando {
Option Option::Bool(RandomizerSettingKey key_, std::string name_, std::vector<std::string> options_,
Expand Down
2 changes: 1 addition & 1 deletion soh/soh/Enhancements/randomizer/option.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "soh/UIWidgets.hpp"
#include "soh/SohGui/UIWidgets.hpp"

#include <cstdint>
#include <set>
Expand Down
4 changes: 2 additions & 2 deletions soh/soh/Enhancements/randomizer/randomizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
#include "3drando/rando_main.hpp"
#include "3drando/random.hpp"
#include "soh/ResourceManagerHelpers.h"
#include "soh/UIWidgets.hpp"
#include "soh/SohGui/UIWidgets.hpp"
#include "3drando/custom_messages.hpp"
#include "../../UIWidgets.hpp"
#include "soh/SohGui/UIWidgets.hpp"
#include <imgui.h>
#include <imgui_internal.h>
#include "../custom-message/CustomMessageTypes.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "soh/cvar_prefixes.h"
#include "soh/SaveManager.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh/UIWidgets.hpp"
#include "soh/SohGui/UIWidgets.hpp"
#include "dungeon.h"
#include "location_access.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "randomizer_entrance_tracker.h"
#include "soh/OTRGlobals.h"
#include "soh/cvar_prefixes.h"
#include "soh/UIWidgets.hpp"
#include "soh/SohGui/UIWidgets.hpp"

#include <map>
#include <string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "soh/cvar_prefixes.h"
#include "soh/SaveManager.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh/UIWidgets.hpp"
#include "soh/SohGui/UIWidgets.hpp"
#include "randomizerTypes.h"

#include <map>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <imgui.h>
#include <libultraship/libultraship.h>

#include <soh/UIWidgets.hpp>
#include "soh/SohGui/UIWidgets.hpp"
#include <graphic/Fast3D/gfx_pc.h>
#include "soh/OTRGlobals.h"
#include "soh/cvar_prefixes.h"
Expand Down
2 changes: 1 addition & 1 deletion soh/soh/Enhancements/timesplits/TimeSplits.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "TimeSplits.h"
#include "soh/UIWidgets.hpp"
#include "soh/SohGui/UIWidgets.hpp"
#include "soh/Enhancements/gameplaystats.h"
#include "soh/SaveManager.h"
#include "soh/util.h"
Expand Down
4 changes: 2 additions & 2 deletions soh/soh/OTRGlobals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include "Fonts.h"
#include <utils/StringHelper.h>
#include "Enhancements/custom-message/CustomMessageManager.h"
#include "ImGuiUtils.h"
#include "Enhancements/presets.h"
#include "util.h"
#include <boost_custom/container_hash/hash_32.hpp>
Expand Down Expand Up @@ -70,7 +69,8 @@
#include "Enhancements/custom-message/CustomMessageTypes.h"
#include <functions.h>
#include "Enhancements/item-tables/ItemTableManager.h"
#include "SohGui.hpp"
#include "soh/SohGui/SohGui.hpp"
#include "soh/SohGui/ImGuiUtils.h"
#include "ActorDB.h"
#include "SaveManager.h"

Expand Down
2 changes: 1 addition & 1 deletion soh/soh/SaveManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "macros.h"
#include <variables.h>
#include <libultraship/libultraship.h>
#include "SohGui.hpp"
#include "soh/SohGui/SohGui.hpp"

#define NOGDI // avoid various windows defines that conflict with things in z64.h
#include <spdlog/spdlog.h>
Expand Down
50 changes: 0 additions & 50 deletions soh/soh/SohGui.hpp

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion soh/soh/ImGuiUtils.h → soh/soh/SohGui/ImGuiUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <array>
#include <map>
#include <string>
#include "Enhancements/randomizer/randomizerTypes.h"
#include "soh/Enhancements/randomizer/randomizerTypes.h"
#include "variables.h" //only for gItemIcons

extern "C" {
Expand Down
10 changes: 5 additions & 5 deletions soh/soh/SohGui.cpp → soh/soh/SohGui/SohGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
#include "include/global.h"
#include "include/z64audio.h"
#include "soh/SaveManager.h"
#include "OTRGlobals.h"
#include "soh/OTRGlobals.h"
#include "soh/Enhancements/presets.h"
#include "soh/resource/type/Skeleton.h"
#include "libultraship/libultraship.h"

#include "Enhancements/game-interactor/GameInteractor.h"
#include "Enhancements/cosmetics/authenticGfxPatches.h"
#include "Enhancements/resolution-editor/ResolutionEditor.h"
#include "Enhancements/debugger/MessageViewer.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/Enhancements/cosmetics/authenticGfxPatches.h"
#include "soh/Enhancements/resolution-editor/ResolutionEditor.h"
#include "soh/Enhancements/debugger/MessageViewer.h"
#include "soh/Notification/Notification.h"
#include "soh/Enhancements/TimeDisplay/TimeDisplay.h"

Expand Down
50 changes: 50 additions & 0 deletions soh/soh/SohGui/SohGui.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
//
// SohGui.hpp
// soh
//
// Created by David Chavez on 24.08.22.
//

#ifndef SohGui_hpp
#define SohGui_hpp

#include <stdio.h>
#include "SohMenuBar.h"
#include "soh/Enhancements/audio/AudioEditor.h"
#include "soh/Enhancements/controls/InputViewer.h"
#include "soh/Enhancements/cosmetics/CosmeticsEditor.h"
#include "soh/Enhancements/debugger/actorViewer.h"
#include "soh/Enhancements/debugger/colViewer.h"
#include "soh/Enhancements/debugger/debugSaveEditor.h"
#include "soh/Enhancements/debugger/hookDebugger.h"
#include "soh/Enhancements/debugger/dlViewer.h"
#include "soh/Enhancements/debugger/valueViewer.h"
#include "soh/Enhancements/gameplaystatswindow.h"
#include "soh/Enhancements/randomizer/randomizer_check_tracker.h"
#include "soh/Enhancements/randomizer/randomizer_entrance_tracker.h"
#include "soh/Enhancements/randomizer/randomizer_item_tracker.h"
#include "soh/Enhancements/randomizer/randomizer_settings_window.h"
#include "soh/Enhancements/timesplits/TimeSplits.h"
#include "soh/Enhancements/randomizer/Plandomizer.h"
#include "soh/AboutWindow.h"
#include "SohModals.h"

#ifdef __cplusplus
extern "C" {
#endif
void enableBetaQuest();
void disableBetaQuest();
#ifdef __cplusplus
}
#endif

namespace SohGui {
void SetupHooks();
void SetupGuiElements();
void Draw();
void Destroy();
void RegisterPopup(std::string title, std::string message, std::string button1 = "OK", std::string button2 = "", std::function<void()> button1callback = nullptr, std::function<void()> button2callback = nullptr);
void ShowRandomizerSettingsMenu();
}

#endif /* SohGui_hpp */
Loading

0 comments on commit 1f65bde

Please sign in to comment.