From 2a92ae52789ce96d5e82ea986c615dc6ad1559b5 Mon Sep 17 00:00:00 2001 From: MegaMech Date: Tue, 22 Mar 2022 22:00:02 -0700 Subject: [PATCH 001/146] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cc5fce64d..aebd5b71b 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,10 @@ The Ship does not include assets and as such requires a prior copy of the game t ## Quick Start 1) Download The Ship of Harkinian from Discord. -2) Get a ZRET OoT Debug ROM +2) Requires an `oot debug` rom (not Master Quest). ``` -Build date: `zelda@srd022j 03-02-21 00:49:18` +Build team: `zelda@srd022j` +Build date: `03-02-21 00:49:18` (year-month-day) sha1: cee6bc3c2a634b41728f2af8da54d9bf8cc14099 ``` 3) Use the OTRGui to generate an `oot.otr` archive file. From 2da6a2a78fe24626934ec4a3e8b71e7118ec63b1 Mon Sep 17 00:00:00 2001 From: MaikelChan Date: Thu, 24 Mar 2022 07:07:49 +0100 Subject: [PATCH 002/146] Improved window dragging. Fixed issues when dragging the window, like the window stopping its movement when moving the cursor too fast, or flickering all over the place. Also, the window position will be clamped to the area of the monitor/s to prevent it from going outside of them. Also, setting VSync instead of target FPS prevents possible stuttering and probably increased CPU usage. --- OTRGui/src/game/game.cpp | 135 ++++++++++++++++++++++++--------------- OTRGui/src/main.cpp | 2 +- 2 files changed, 85 insertions(+), 52 deletions(-) diff --git a/OTRGui/src/game/game.cpp b/OTRGui/src/game/game.cpp index 3fc6438a8..18226ae64 100644 --- a/OTRGui/src/game/game.cpp +++ b/OTRGui/src/game/game.cpp @@ -18,6 +18,7 @@ Shader shader = { 0 }; Light light = { 0 }; Vector3 lightPos = { -5.0f, 10.0f, 10.0f }; Vector2 dragOffset; +bool isDragging = false; std::string sohFolder = NULLSTR; bool extracting = false; bool rom_ready = false; @@ -95,69 +96,101 @@ void OTRGame::update(){ } void OTRGame::draw() { + Vector2 windowSize(GetScreenWidth(), GetScreenHeight()); + Rectangle titlebar = Rectangle(0, 0, windowSize.x - 50, 35); + Vector2 mousePos = GetMousePosition(); + Vector2 mouseDelta = GetMouseDelta(); + + if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT) && !isDragging && + mousePos.x >= titlebar.x && mousePos.y >= titlebar.y && mousePos.x <= titlebar.x + titlebar.width && mousePos.y <= titlebar.y + titlebar.height) { + isDragging = true; + dragOffset = mousePos; + } + else if (IsMouseButtonReleased(MOUSE_BUTTON_LEFT) && isDragging) { + isDragging = false; + dragOffset = Vector2(0, 0); + } + + if (isDragging && (mouseDelta.x != 0.0f || mouseDelta.y != 0.0f)) { + Vector2 wndPos = GetWindowPosition(); + wndPos = Vector2(wndPos.x + (mousePos.x - dragOffset.x), wndPos.y + (mousePos.y - dragOffset.y)); + + // Calculate virtual screen total size in case there are multiple monitors + + int vsX1 = 0, vsY1 = 0, vsX2 = 0, vsY2 = 0; + int monitorCount = GetMonitorCount(); + + for (int m = 0; m < monitorCount; m++) { + Vector2 monitorPos = GetMonitorPosition(m); + Vector2 monitorSize = Vector2(GetMonitorWidth(m), GetMonitorHeight(m)); + + if (monitorPos.x < vsX1) vsX1 = monitorPos.x; + if (monitorPos.y < vsY1) vsY1 = monitorPos.y; + if (monitorPos.x + monitorSize.x > vsX2) vsX2 = monitorPos.x + monitorSize.x; + if (monitorPos.y + monitorSize.y > vsY2) vsY2 = monitorPos.y + monitorSize.y; + } + + // Clamp the window to the borders of the monitors + + if (wndPos.x < vsX1) wndPos.x = vsX1; + if (wndPos.y < vsY1) wndPos.y = vsY1; + if (wndPos.x + windowSize.x > vsX2) wndPos.x = vsX2 - windowSize.x; + if (wndPos.y + windowSize.y > vsY2) wndPos.y = vsY2 - windowSize.y; + + SetWindowPosition(wndPos.x, wndPos.y); + } + BeginDrawing(); - ClearBackground(Color(40, 40, 40, 255)); - Vector3 windowSize(GetScreenWidth(), GetScreenHeight()); - Rectangle titlebar = Rectangle(0, 0, windowSize.x - 50, 35); - Vector2 mousePos = Vector2(GetMouseX(), GetMouseY()); - bool hoveredTitlebar = mousePos.x >= titlebar.x && mousePos.y >= titlebar.y && mousePos.x <= titlebar.x + titlebar.width && mousePos.y <= titlebar.y + titlebar.height; + ClearBackground(Color(40, 40, 40, 255)); - if (hoveredTitlebar && IsMouseButtonDown(MOUSE_BUTTON_LEFT)) { - if (dragOffset.x == 0 && dragOffset.y == 0) dragOffset = mousePos; - Vector2 wndPos = GetWindowPosition(); + DrawTexture(Textures["Frame"], 0, 0, WHITE); - SetWindowPosition(wndPos.x + (mousePos.x - dragOffset.x), wndPos.y + (mousePos.y - dragOffset.y)); - } - else dragOffset = Vector2(0, 0); + Texture2D titleTex = Textures["Title"]; + DrawTexture(titleTex, windowSize.x / 2 - titleTex.width / 2, titlebar.height / 2 - titleTex.height / 2, WHITE); - DrawTexture(Textures["Frame"], 0, 0, WHITE); + if (UIUtils::GuiIcon("Exit", windowSize.x - 36, titlebar.height / 2 - 10) && (extracting && currentStep.find("Done") != std::string::npos || !extracting)) { + CloseWindow(); + } - Texture2D titleTex = Textures["Title"]; - DrawTexture(titleTex, windowSize.x / 2 - titleTex.width / 2, titlebar.height / 2 - titleTex.height / 2, WHITE); + BeginMode3D(camera); + DrawModelEx(Models["Ship"], Vector3Zero(), Vector3(.0f, 1.0f, .0f), this->ModelRotation, SCALE(1.0f), WHITE); + EndMode3D(); - if (UIUtils::GuiIcon("Exit", windowSize.x - 36, titlebar.height / 2 - 10) && (extracting && currentStep.find("Done") != std::string::npos || !extracting)) { - CloseWindow(); - } + constexpr float text_y = 125.f; + UIUtils::GuiShadowText(("Rom Type: " + version.version).c_str(), 32, text_y, 10, WHITE, BLACK); + UIUtils::GuiShadowText("Tool Version: 1.0", 32, text_y + 15, 10, WHITE, BLACK); + UIUtils::GuiShadowText("OTR Version: 1.0", 32, text_y + 30, 10, WHITE, BLACK); + UIUtils::GuiToggle(&single_thread, "Single Thread", 32, text_y + 40, currentStep != NULLSTR); - BeginMode3D(camera); - DrawModelEx(Models["Ship"] ,Vector3Zero(), Vector3(.0f, 1.0f, .0f), this->ModelRotation, SCALE(1.0f), WHITE); - EndMode3D(); + if (!hide_second_btn && UIUtils::GuiIconButton("Folder", "Open\nShip Folder", 109, 50, currentStep != NULLSTR, "Select your Ship of Harkinian Folder\n\nYou could use another folder\nfor development purposes")) { + const std::string path = NativeFS->LaunchFileExplorer(LaunchType::FOLDER); + sohFolder = path; + } - constexpr float text_y = 125.f; - UIUtils::GuiShadowText(("Rom Type: " + version.version).c_str(), 32, text_y, 10, WHITE, BLACK); - UIUtils::GuiShadowText("Tool Version: 1.0", 32, text_y + 15, 10, WHITE, BLACK); - UIUtils::GuiShadowText("OTR Version: 1.0", 32, text_y + 30, 10, WHITE, BLACK); - UIUtils::GuiToggle(&single_thread, "Single Thread", 32, text_y + 40, currentStep != NULLSTR); - - if(!hide_second_btn && UIUtils::GuiIconButton("Folder", "Open\nShip Folder", 109, 50, currentStep != NULLSTR, "Select your Ship of Harkinian Folder\n\nYou could use another folder\nfor development purposes")) { - const std::string path = NativeFS->LaunchFileExplorer(LaunchType::FOLDER); - sohFolder = path; - } - - if (UIUtils::GuiIconButton("Cartridge", "Open\nOoT Rom", 32, 50, currentStep != NULLSTR, "Select an Ocarina of Time\nMaster Quest or Vanilla Debug Rom\n\nYou can dump it or lend one from Nintendo")) { - const std::string path = NativeFS->LaunchFileExplorer(LaunchType::FILE); - if (path != NULLSTR) { - const std::string patched_n64 = std::string(patched_rom); - MoonUtils::rm(patched_n64); - version = GetVersion(fopen(path.c_str(), "r")); - if (version.version != NULLSTR) { - MoonUtils::copy(path, patched_n64); - rom_ready = true; - return; - } - fix_baserom(path.c_str(), patched_rom); - version = GetVersion(fopen(patched_rom, "r")); - if (version.version != NULLSTR) rom_ready = true; + if (UIUtils::GuiIconButton("Cartridge", "Open\nOoT Rom", 32, 50, currentStep != NULLSTR, "Select an Ocarina of Time\nMaster Quest or Vanilla Debug Rom\n\nYou can dump it or lend one from Nintendo")) { + const std::string path = NativeFS->LaunchFileExplorer(LaunchType::FILE); + if (path != NULLSTR) { + const std::string patched_n64 = std::string(patched_rom); + MoonUtils::rm(patched_n64); + version = GetVersion(fopen(path.c_str(), "r")); + if (version.version != NULLSTR) { + MoonUtils::copy(path, patched_n64); + rom_ready = true; + return; } + fix_baserom(path.c_str(), patched_rom); + version = GetVersion(fopen(patched_rom, "r")); + if (version.version != NULLSTR) rom_ready = true; } + } - if(currentStep != NULLSTR) { - DrawRectangle(0, 0, windowSize.x, windowSize.y, Color(0, 0, 0, 160)); - DrawTexture(Textures["Modal"], windowSize.x / 2 - Textures["Modal"].width / 2, windowSize.y / 2 - Textures["Modal"].height / 2, WHITE); - UIUtils::GuiShadowText(currentStep.c_str(), 0, windowSize.y / 2, 10, WHITE, BLACK, windowSize.x, true); - } + if (currentStep != NULLSTR) { + DrawRectangle(0, 0, windowSize.x, windowSize.y, Color(0, 0, 0, 160)); + DrawTexture(Textures["Modal"], windowSize.x / 2 - Textures["Modal"].width / 2, windowSize.y / 2 - Textures["Modal"].height / 2, WHITE); + UIUtils::GuiShadowText(currentStep.c_str(), 0, windowSize.y / 2, 10, WHITE, BLACK, windowSize.x, true); + } - EndDrawing(); + EndDrawing(); } void setCurrentStep(const std::string& step) { diff --git a/OTRGui/src/main.cpp b/OTRGui/src/main.cpp index 87c9d26ee..a866673c5 100644 --- a/OTRGui/src/main.cpp +++ b/OTRGui/src/main.cpp @@ -18,7 +18,7 @@ void UpdateDrawFrame(void) { int main() { constexpr Vector2 windowSize = Vector2(400, 200); - SetTargetFPS(144); + SetConfigFlags(FLAG_VSYNC_HINT); SetConfigFlags(FLAG_WINDOW_HIGHDPI); SetConfigFlags(FLAG_WINDOW_UNDECORATED); SetConfigFlags(FLAG_MSAA_4X_HINT); From 3ab0c45bdb7e38798e394004b41286bf0747eb51 Mon Sep 17 00:00:00 2001 From: MaikelChan Date: Thu, 24 Mar 2022 19:48:22 +0100 Subject: [PATCH 003/146] Fixed window not properly disposing raylib and OpenGL when closing. (#59) Closing the window with the X button will not close it immediately during the rendering of a frame, causing it to actually crash, but will set the engine in a pending state until it finishes the current frame. --- OTRGui/src/game/game.cpp | 2 +- OTRGui/src/game/game.h | 5 +++++ OTRGui/src/main.cpp | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/OTRGui/src/game/game.cpp b/OTRGui/src/game/game.cpp index 18226ae64..ff7e7a22b 100644 --- a/OTRGui/src/game/game.cpp +++ b/OTRGui/src/game/game.cpp @@ -149,7 +149,7 @@ void OTRGame::draw() { DrawTexture(titleTex, windowSize.x / 2 - titleTex.width / 2, titlebar.height / 2 - titleTex.height / 2, WHITE); if (UIUtils::GuiIcon("Exit", windowSize.x - 36, titlebar.height / 2 - 10) && (extracting && currentStep.find("Done") != std::string::npos || !extracting)) { - CloseWindow(); + closeRequested = true; } BeginMode3D(camera); diff --git a/OTRGui/src/game/game.h b/OTRGui/src/game/game.h index b284f857a..bd74b1c3f 100644 --- a/OTRGui/src/game/game.h +++ b/OTRGui/src/game/game.h @@ -19,6 +19,8 @@ public: void update(); void draw(); void exit(); + + inline bool CloseRequested() { return closeRequested; } protected: void LoadTexture(const std::string& name, const std::string& path) { const Image tmp = LoadImage(path.c_str()); @@ -32,6 +34,9 @@ protected: SetTextureFilter(font.texture, TEXTURE_FILTER_POINT); Fonts[name] = font; } + +private: + bool closeRequested = false; }; extern OTRGame* Game; diff --git a/OTRGui/src/main.cpp b/OTRGui/src/main.cpp index a866673c5..2b3e40a7c 100644 --- a/OTRGui/src/main.cpp +++ b/OTRGui/src/main.cpp @@ -17,7 +17,7 @@ void UpdateDrawFrame(void) { } int main() { - constexpr Vector2 windowSize = Vector2(400, 200); + constexpr Vector2 windowSize = Vector2(400, 200); SetConfigFlags(FLAG_VSYNC_HINT); SetConfigFlags(FLAG_WINDOW_HIGHDPI); SetConfigFlags(FLAG_WINDOW_UNDECORATED); @@ -32,7 +32,7 @@ int main() { Game = new OTRGame(); Game->preload(); Game->init(); - while(!WindowShouldClose()) { + while(!WindowShouldClose() && !Game->CloseRequested()) { UpdateDrawFrame(); } CloseWindow(); From d528160684b414bc5350237a7ca8c9401efa06ae Mon Sep 17 00:00:00 2001 From: Emil Lenngren Date: Sun, 27 Mar 2022 17:14:07 +0200 Subject: [PATCH 004/146] Fix triforce vertex count --- soh/assets/xml/objects/object_triforce_spot.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/assets/xml/objects/object_triforce_spot.xml b/soh/assets/xml/objects/object_triforce_spot.xml index a9d52dd96..87d449458 100644 --- a/soh/assets/xml/objects/object_triforce_spot.xml +++ b/soh/assets/xml/objects/object_triforce_spot.xml @@ -1,6 +1,6 @@ - + From a9b56e78e26a82c7c14082efff17d54a27556a00 Mon Sep 17 00:00:00 2001 From: Sirius902 <3645979-Sirius902@users.noreply.gitlab.com> Date: Mon, 28 Mar 2022 14:11:37 -0700 Subject: [PATCH 005/146] Fix aiming items --- soh/src/overlays/actors/ovl_player_actor/z_player.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index d02788a8e..91fcf81ad 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -2321,10 +2321,10 @@ s32 func_8083501C(Player* this, GlobalContext* globalCtx) { if ((!Player_HoldsHookshot(this) || func_80834FBC(this)) && !func_80834758(globalCtx, this) && !func_80834F2C(this, globalCtx)) { return 0; - } - else - { - this->unk_6AD = 2; // OTRTODO: THIS IS A BAD IDEA BUT IT FIXES THE HORSE FIRST PERSON? + } else { + if (this->rideActor != NULL) { + this->unk_6AD = 2; // OTRTODO: THIS IS A BAD IDEA BUT IT FIXES THE HORSE FIRST PERSON? + } } return 1; @@ -14806,4 +14806,4 @@ void func_80853148(GlobalContext* globalCtx, Actor* actor) { this->naviActor->flags |= ACTOR_FLAG_8; func_80835EA4(globalCtx, 0xB); } -} \ No newline at end of file +} From 4a24b5afb432cd24c36e85db8c6e6bf17dedd04a Mon Sep 17 00:00:00 2001 From: Sirius902 <3645979-Sirius902@users.noreply.gitlab.com> Date: Mon, 28 Mar 2022 22:57:32 -0700 Subject: [PATCH 006/146] Use else if --- soh/src/overlays/actors/ovl_player_actor/z_player.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index 91fcf81ad..8ce8f1ae0 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -2321,10 +2321,8 @@ s32 func_8083501C(Player* this, GlobalContext* globalCtx) { if ((!Player_HoldsHookshot(this) || func_80834FBC(this)) && !func_80834758(globalCtx, this) && !func_80834F2C(this, globalCtx)) { return 0; - } else { - if (this->rideActor != NULL) { - this->unk_6AD = 2; // OTRTODO: THIS IS A BAD IDEA BUT IT FIXES THE HORSE FIRST PERSON? - } + } else if (this->rideActor != NULL) { + this->unk_6AD = 2; // OTRTODO: THIS IS A BAD IDEA BUT IT FIXES THE HORSE FIRST PERSON? } return 1; From dae8035314225b8c49999648f25c578b6bc53cbd Mon Sep 17 00:00:00 2001 From: Sirius902 <3645979-Sirius902@users.noreply.gitlab.com> Date: Sun, 27 Mar 2022 18:47:53 -0700 Subject: [PATCH 007/146] Load controller db from file --- libultraship/libultraship/Window.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libultraship/libultraship/Window.cpp b/libultraship/libultraship/Window.cpp index 24fda1ade..665483b35 100644 --- a/libultraship/libultraship/Window.cpp +++ b/libultraship/libultraship/Window.cpp @@ -39,6 +39,14 @@ extern "C" { exit(EXIT_FAILURE); } + const char* controllerDb = "gamecontrollerdb.txt"; + int mappingsAdded = SDL_GameControllerAddMappingsFromFile(controllerDb); + if (mappingsAdded >= 0) { + SPDLOG_INFO("Added SDL game controllers from \"{}\" ({})", controllerDb, mappingsAdded); + } else { + SPDLOG_ERROR("Failed add SDL game controller mappings from \"{}\" ({})", controllerDb, SDL_GetError()); + } + // TODO: This for loop is debug. Burn it with fire. for (size_t i = 0; i < SDL_NumJoysticks(); i++) { if (SDL_IsGameController(i)) { From 25468cf7223e8343091e5e7e0a99fe8fb7c473ee Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Sun, 27 Mar 2022 21:18:05 -0400 Subject: [PATCH 008/146] Add cheats menu. --- libultraship/libultraship/GameSettings.cpp | 48 +++++++++++-- libultraship/libultraship/GameSettings.h | 16 ++++- libultraship/libultraship/SohImGuiImpl.cpp | 61 +++++++++++++--- soh/src/code/game.c | 69 +++++++++++++++++++ soh/src/code/z_bgcheck.c | 10 ++- soh/src/code/z_parameter.c | 4 +- soh/src/code/z_player_lib.c | 4 +- .../actors/ovl_player_actor/z_player.c | 12 ++-- 8 files changed, 200 insertions(+), 24 deletions(-) diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index 8599367a7..c638468af 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -27,6 +27,7 @@ namespace Game { const std::string AudioSection = AUDIO_SECTION; const std::string ControllerSection = CONTROLLER_SECTION; const std::string EnhancementSection = ENHANCEMENTS_SECTION; + const std::string CheatSection = CHEATS_SECTION; void UpdateAudio() { Audio_SetGameVolume(SEQ_BGM_MAIN, Settings.audio.music_main); @@ -57,9 +58,7 @@ namespace Game { Settings.enhancements.animated_pause_menu = stob(Conf[EnhancementSection]["animated_pause_menu"]); CVar_SetS32(const_cast("gPauseLiveLink"), Settings.enhancements.animated_pause_menu); - Settings.enhancements.debug_mode = stob(Conf[EnhancementSection]["debug_mode"]); - CVar_SetS32(const_cast("gDebugEnabled"), Settings.enhancements.debug_mode); - + // Audio Settings.audio.master = Ship::stof(Conf[AudioSection]["master"]); CVar_SetFloat(const_cast("gGameMasterVolume"), Settings.audio.master); @@ -75,6 +74,7 @@ namespace Game { Settings.audio.fanfare = Ship::stof(Conf[AudioSection]["fanfare"]); CVar_SetFloat(const_cast("gFanfareVolume"), Settings.audio.fanfare); + // Controllers Settings.controller.gyro_sensitivity = Ship::stof(Conf[ControllerSection]["gyro_sensitivity"]); CVar_SetFloat(const_cast("gGyroSensitivity"), Settings.controller.gyro_sensitivity); @@ -86,6 +86,34 @@ namespace Game { Settings.controller.input_enabled = stob(Conf[ControllerSection]["input_enabled"]); CVar_SetS32(const_cast("gInputEnabled"), Settings.controller.input_enabled); + + // Cheats + Settings.cheats.debug_mode = stob(Conf[CheatSection]["debug_mode"]); + CVar_SetS32(const_cast("gDebugEnabled"), Settings.cheats.debug_mode); + + Settings.cheats.infinite_money = stob(Conf[CheatSection]["infinite_money"]); + CVar_SetS32(const_cast("gInfiniteMoney"), Settings.cheats.infinite_money); + + Settings.cheats.infinite_health = stob(Conf[CheatSection]["infinite_health"]); + CVar_SetS32(const_cast("gInfiniteHealth"), Settings.cheats.infinite_health); + + Settings.cheats.infinite_ammo = stob(Conf[CheatSection]["infinite_ammo"]); + CVar_SetS32(const_cast("gInfiniteAmmo"), Settings.cheats.infinite_ammo); + + Settings.cheats.infinite_magic = stob(Conf[CheatSection]["infinite_magic"]); + CVar_SetS32(const_cast("gInfiniteMagic"), Settings.cheats.infinite_magic); + + Settings.cheats.no_clip = stob(Conf[CheatSection]["no_clip"]); + CVar_SetS32(const_cast("gNoClip"), Settings.cheats.no_clip); + + Settings.cheats.climb_everything = stob(Conf[CheatSection]["climb_everything"]); + CVar_SetS32(const_cast("gClimbEverything"), Settings.cheats.climb_everything); + + Settings.cheats.moon_jump_on_l = stob(Conf[CheatSection]["moon_jump_on_l"]); + CVar_SetS32(const_cast("gMoonJumpOnL"), Settings.cheats.moon_jump_on_l); + + Settings.cheats.super_tunic = stob(Conf[CheatSection]["super_tunic"]); + CVar_SetS32(const_cast("gSuperTunic"), Settings.cheats.super_tunic); UpdateAudio(); } @@ -111,13 +139,25 @@ namespace Game { Conf[EnhancementSection]["fast_text"] = std::to_string(Settings.enhancements.fast_text); Conf[EnhancementSection]["disable_lod"] = std::to_string(Settings.enhancements.disable_lod); Conf[EnhancementSection]["animated_pause_menu"] = std::to_string(Settings.enhancements.animated_pause_menu); - Conf[EnhancementSection]["debug_mode"] = std::to_string(Settings.enhancements.debug_mode); + + // Controllers Conf[ControllerSection]["gyro_sensitivity"] = std::to_string(Settings.controller.gyro_sensitivity); Conf[ControllerSection]["rumble_strength"] = std::to_string(Settings.controller.rumble_strength); Conf[ControllerSection]["input_scale"] = std::to_string(Settings.controller.input_scale); Conf[ControllerSection]["input_enabled"] = std::to_string(Settings.controller.input_enabled); + // Cheats + Conf[CheatSection]["debug_mode"] = std::to_string(Settings.cheats.debug_mode); + Conf[CheatSection]["infinite_money"] = std::to_string(Settings.cheats.infinite_money); + Conf[CheatSection]["infinite_health"] = std::to_string(Settings.cheats.infinite_health); + Conf[CheatSection]["infinite_ammo"] = std::to_string(Settings.cheats.infinite_ammo); + Conf[CheatSection]["infinite_magic"] = std::to_string(Settings.cheats.infinite_magic); + Conf[CheatSection]["no_clip"] = std::to_string(Settings.cheats.no_clip); + Conf[CheatSection]["climb_everything"] = std::to_string(Settings.cheats.climb_everything); + Conf[CheatSection]["moon_jump_on_l"] = std::to_string(Settings.cheats.moon_jump_on_l); + Conf[CheatSection]["super_tunic"] = std::to_string(Settings.cheats.super_tunic); + Conf.Save(); } diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index 35d948d89..8508baeae 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -23,15 +23,28 @@ struct SoHConfigType { bool fast_text = false; bool disable_lod = false; bool animated_pause_menu = false; - bool debug_mode = false; } enhancements; + // Controller struct { float gyro_sensitivity = 1.0f; float rumble_strength = 1.0f; float input_scale = 1.0f; bool input_enabled = false; } controller; + + // Cheats + struct { + bool debug_mode = false; + bool infinite_money = false; + bool infinite_health = false; + bool infinite_ammo = false; + bool infinite_magic = false; + bool no_clip = false; + bool climb_everything = false; + bool moon_jump_on_l = false; + bool super_tunic = false; + } cheats; }; enum SeqPlayers { @@ -46,6 +59,7 @@ enum SeqPlayers { #define AUDIO_SECTION "AUDIO SETTINGS" #define CONTROLLER_SECTION "CONTROLLER SECTION" #define ENHANCEMENTS_SECTION "ENHANCEMENT SETTINGS" +#define CHEATS_SECTION "CHEATS SETTINGS" namespace Game { extern SoHConfigType Settings; diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 22b47f680..548b298ef 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -350,20 +350,65 @@ namespace SohImGui { needs_save = true; } - ImGui::Text("Debugging"); - ImGui::Separator(); - - if (ImGui::Checkbox("Debug Mode", &Game::Settings.enhancements.debug_mode)) { - CVar_SetS32(const_cast("gDebugEnabled"), Game::Settings.enhancements.debug_mode); - needs_save = true; - } - ImGui::EndMenu(); } if (ImGui::BeginMenu("Developer Tools")) { HOOK(ImGui::MenuItem("Stats", nullptr, &Game::Settings.debug.soh)); HOOK(ImGui::MenuItem("Console", nullptr, &console->opened)); + + ImGui::Text("Debug"); + ImGui::Separator(); + + if (ImGui::Checkbox("Debug Mode", &Game::Settings.cheats.debug_mode)) { + CVar_SetS32(const_cast("gDebugEnabled"), Game::Settings.cheats.debug_mode); + needs_save = true; + } + + ImGui::EndMenu(); + } + + if (ImGui::BeginMenu("Cheats")) { + if (ImGui::Checkbox("Infinite Money", &Game::Settings.cheats.infinite_money)) { + CVar_SetS32(const_cast("gInfiniteMoney"), Game::Settings.cheats.infinite_money); + needs_save = true; + } + + if (ImGui::Checkbox("Infinite Health", &Game::Settings.cheats.infinite_health)) { + CVar_SetS32(const_cast("gInfiniteHealth"), Game::Settings.cheats.infinite_health); + needs_save = true; + } + + if (ImGui::Checkbox("Infinite Ammo", &Game::Settings.cheats.infinite_ammo)) { + CVar_SetS32(const_cast("gInfiniteAmmo"), Game::Settings.cheats.infinite_ammo); + needs_save = true; + } + + if (ImGui::Checkbox("Infinite Magic", &Game::Settings.cheats.infinite_magic)) { + CVar_SetS32(const_cast("gInfiniteMagic"), Game::Settings.cheats.infinite_magic); + needs_save = true; + } + + if (ImGui::Checkbox("No Clip", &Game::Settings.cheats.no_clip)) { + CVar_SetS32(const_cast("gNoClip"), Game::Settings.cheats.no_clip); + needs_save = true; + } + + if (ImGui::Checkbox("Climb Everything", &Game::Settings.cheats.climb_everything)) { + CVar_SetS32(const_cast("gClimbEverything"), Game::Settings.cheats.climb_everything); + needs_save = true; + } + + if (ImGui::Checkbox("Moon Jump on L", &Game::Settings.cheats.moon_jump_on_l)) { + CVar_SetS32(const_cast("gMoonJumpOnL"), Game::Settings.cheats.moon_jump_on_l); + needs_save = true; + } + + if (ImGui::Checkbox("Super Tunic", &Game::Settings.cheats.super_tunic)) { + CVar_SetS32(const_cast("gSuperTunic"), Game::Settings.cheats.super_tunic); + needs_save = true; + } + ImGui::EndMenu(); } diff --git a/soh/src/code/game.c b/soh/src/code/game.c index ec8a0e9fa..9392cbc25 100644 --- a/soh/src/code/game.c +++ b/soh/src/code/game.c @@ -323,6 +323,75 @@ void GameState_Update(GameState* gameState) { GameState_Draw(gameState, gfxCtx); func_800C49F4(gfxCtx); } + + // ----------------------- + // Cheats hooks + // ----------------------- + + // Inf Money + if (CVar_GetS32("gInfiniteMoney", 0) != 0) { + if (gSaveContext.rupees < CUR_CAPACITY(UPG_WALLET)) { + gSaveContext.rupees = CUR_CAPACITY(UPG_WALLET); + } + } + + // Inf Health + if (CVar_GetS32("gInfiniteHealth", 0) != 0) { + if (gSaveContext.health < gSaveContext.healthCapacity) { + gSaveContext.health = gSaveContext.healthCapacity; + } + } + + // Inf Ammo + if (CVar_GetS32("gInfiniteAmmo", 0) != 0) { + // Deku Sticks + if (AMMO(ITEM_STICK) < CUR_CAPACITY(UPG_STICKS)) { + AMMO(ITEM_STICK) = CUR_CAPACITY(UPG_STICKS); + } + + // Deku Nuts + if (AMMO(ITEM_NUT) < CUR_CAPACITY(UPG_NUTS)) { + AMMO(ITEM_NUT) = CUR_CAPACITY(UPG_NUTS); + } + + // Bombs + if (AMMO(ITEM_BOMB) < CUR_CAPACITY(UPG_BOMB_BAG)) { + AMMO(ITEM_BOMB) = CUR_CAPACITY(UPG_BOMB_BAG); + } + + // Fairy Bow (Ammo) + if (AMMO(ITEM_BOW) < CUR_CAPACITY(UPG_QUIVER)) { + AMMO(ITEM_BOW) = CUR_CAPACITY(UPG_QUIVER); + } + + // Fairy Slingshot (Ammo) + if (AMMO(ITEM_SLINGSHOT) < CUR_CAPACITY(UPG_BULLET_BAG)) { + AMMO(ITEM_SLINGSHOT) = CUR_CAPACITY(UPG_BULLET_BAG); + } + + // Bombchus (max: 50, no upgrades) + if (AMMO(ITEM_BOMBCHU) < 50) { + AMMO(ITEM_BOMBCHU) = 50; + } + } + + // Inf Magic + if (CVar_GetS32("gInfiniteMagic", 0) != 0) { + if (gSaveContext.magicAcquired && gSaveContext.magic != (gSaveContext.doubleMagic + 1) * 0x30) { + gSaveContext.magic = (gSaveContext.doubleMagic + 1) * 0x30; + } + } + + // Moon Jump On L + if (CVar_GetS32("gMoonJumpOnL", 0) != 0) { + if (gGlobalCtx) { + Player* player = GET_PLAYER(gGlobalCtx); + + if (CHECK_BTN_ANY(gGlobalCtx->state.input[0].cur.button, BTN_L)) { + player->actor.velocity.y = 6.34375f; + } + } + } gameState->frames++; } diff --git a/soh/src/code/z_bgcheck.c b/soh/src/code/z_bgcheck.c index b736d0cf0..9ce139eed 100644 --- a/soh/src/code/z_bgcheck.c +++ b/soh/src/code/z_bgcheck.c @@ -1874,6 +1874,10 @@ s32 BgCheck_CheckWallImpl(CollisionContext* colCtx, u16 xpFlags, Vec3f* posResul s32 bgId2; f32 nx, ny, nz; // unit normal of polygon + if (CVar_GetS32("gNoClip", 0) != 0) { + return false; + } + result = false; *outBgId = BGCHECK_SCENE; *outPoly = NULL; @@ -3996,7 +4000,11 @@ u32 func_80041D94(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) { * SurfaceType Get Wall Flags */ s32 func_80041DB8(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) { - return D_80119D90[func_80041D94(colCtx, poly, bgId)]; + if (CVar_GetS32("gClimbEverything", 0) != 0) { + return (1 << 3) | D_80119D90[func_80041D94(colCtx, poly, bgId)]; + } else { + return D_80119D90[func_80041D94(colCtx, poly, bgId)]; + } } /** diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index 3219527a9..8bce65a7b 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -4078,11 +4078,11 @@ void Interface_Update(GlobalContext* globalCtx) { D_80125A58 = func_8008F2F8(globalCtx); if (D_80125A58 == 1) { - if (CUR_EQUIP_VALUE(EQUIP_TUNIC) == 2) { + if (CUR_EQUIP_VALUE(EQUIP_TUNIC) == 2 || CVar_GetS32("gSuperTunic", 0) != 0) { D_80125A58 = 0; } } else if ((func_8008F2F8(globalCtx) >= 2) && (func_8008F2F8(globalCtx) < 5)) { - if (CUR_EQUIP_VALUE(EQUIP_TUNIC) == 3) { + if (CUR_EQUIP_VALUE(EQUIP_TUNIC) == 3 || CVar_GetS32("gSuperTunic", 0) != 0) { D_80125A58 = 0; } } diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c index e15cc81eb..82c1e42bf 100644 --- a/soh/src/code/z_player_lib.c +++ b/soh/src/code/z_player_lib.c @@ -631,9 +631,9 @@ s32 func_8008F2F8(GlobalContext* globalCtx) { if (0) {} if ((triggerEntry->flag != 0) && !(gSaveContext.textTriggerFlags & triggerEntry->flag) && - (((var == 0) && (this->currentTunic != PLAYER_TUNIC_GORON)) || + (((var == 0) && (this->currentTunic != PLAYER_TUNIC_GORON && CVar_GetS32("gSuperTunic", 0) == 0)) || (((var == 1) || (var == 3)) && (this->currentBoots == PLAYER_BOOTS_IRON) && - (this->currentTunic != PLAYER_TUNIC_ZORA)))) { + (this->currentTunic != PLAYER_TUNIC_ZORA && CVar_GetS32("gSuperTunic", 0) == 0)))) { Message_StartTextbox(globalCtx, triggerEntry->textId, NULL); gSaveContext.textTriggerFlags |= triggerEntry->flag; } diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index d02788a8e..4321ff3e0 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -3842,12 +3842,12 @@ s32 func_808382DC(Player* this, GlobalContext* globalCtx) { s32 sp48 = func_80838144(D_808535E4); if (((this->actor.wallPoly != NULL) && - SurfaceType_IsWallDamage(&globalCtx->colCtx, this->actor.wallPoly, this->actor.wallBgId)) || + SurfaceType_IsWallDamage(&globalCtx->colCtx, this->actor.wallPoly, this->actor.wallBgId)) || ((sp48 >= 0) && SurfaceType_IsWallDamage(&globalCtx->colCtx, this->actor.floorPoly, this->actor.floorBgId) && (this->unk_A79 >= D_808544F4[sp48])) || ((sp48 >= 0) && - ((this->currentTunic != PLAYER_TUNIC_GORON) || (this->unk_A79 >= D_808544F4[sp48])))) { + ((this->currentTunic != PLAYER_TUNIC_GORON && CVar_GetS32("gSuperTunic", 0) == 0) || (this->unk_A79 >= D_808544F4[sp48])))) { this->unk_A79 = 0; this->actor.colChkInfo.damage = 4; func_80837C0C(globalCtx, this, 0, 4.0f, 5.0f, this->actor.shape.rot.y, 20); @@ -4632,7 +4632,7 @@ s32 func_8083A6AC(Player* this, GlobalContext* globalCtx) { if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &sp74, &sp68, &sp84, true, false, false, true, &sp80) && - (ABS(sp84->normal.y) < 600)) { + ((ABS(sp84->normal.y) < 600) || (CVar_GetS32("gClimbEverything", 0) != 0))) { f32 nx = COLPOLY_GET_NORMAL(sp84->normal.x); f32 ny = COLPOLY_GET_NORMAL(sp84->normal.y); f32 nz = COLPOLY_GET_NORMAL(sp84->normal.z); @@ -8152,7 +8152,7 @@ static struct_80832924 D_808545F0[] = { }; void func_80843CEC(Player* this, GlobalContext* globalCtx) { - if (this->currentTunic != PLAYER_TUNIC_GORON) { + if (this->currentTunic != PLAYER_TUNIC_GORON && CVar_GetS32("gSuperTunic", 0) == 0) { if ((globalCtx->roomCtx.curRoom.unk_02 == 3) || (D_808535E4 == 9) || ((func_80838144(D_808535E4) >= 0) && !SurfaceType_IsWallDamage(&globalCtx->colCtx, this->actor.floorPoly, this->actor.floorBgId))) { @@ -9888,7 +9888,7 @@ void func_80847BA0(GlobalContext* globalCtx, Player* this) { if ((this->actor.bgCheckFlags & 0x200) && (D_80853608 < 0x3000)) { CollisionPoly* wallPoly = this->actor.wallPoly; - if (ABS(wallPoly->normal.y) < 600) { + if ((ABS(wallPoly->normal.y) < 600) || (CVar_GetS32("gClimbEverything", 0) != 0)) { f32 sp8C = COLPOLY_GET_NORMAL(wallPoly->normal.x); f32 sp88 = COLPOLY_GET_NORMAL(wallPoly->normal.y); f32 sp84 = COLPOLY_GET_NORMAL(wallPoly->normal.z); @@ -10188,7 +10188,7 @@ void func_80848C74(GlobalContext* globalCtx, Player* this) { s32 sp58; s32 sp54; - if (this->currentTunic == PLAYER_TUNIC_GORON) { + if (this->currentTunic == PLAYER_TUNIC_GORON || CVar_GetS32("gSuperTunic", 0) != 0) { sp54 = 20; } else { From f3fe43b912995cb593f18f041725d8de6dad2bf5 Mon Sep 17 00:00:00 2001 From: MaikelChan Date: Fri, 25 Mar 2022 04:00:59 +0100 Subject: [PATCH 009/146] Fixed Link's sword being cut in preview in pause menu. Apply the offset only when live Link is enabled. --- soh/src/code/z_player_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c index 82c1e42bf..d7344d7c3 100644 --- a/soh/src/code/z_player_lib.c +++ b/soh/src/code/z_player_lib.c @@ -1590,7 +1590,7 @@ void func_80091A24(GlobalContext* globalCtx, void* seg04, void* seg06, SkelAnime sp12C[0] = sword; sp12C[1] = shield; - Matrix_SetTranslateRotateYXZ(pos->x - (LINK_AGE_IN_YEARS == YEARS_ADULT ? 25 : 0), + Matrix_SetTranslateRotateYXZ(pos->x - ((CVar_GetS32("gPauseLiveLink", 0) && LINK_AGE_IN_YEARS == YEARS_ADULT) ? 25 : 0), pos->y - (CVar_GetS32("gPauseTriforce", 0) ? 16 : 0), pos->z, rot); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); From e1be01cb6d7cb5a8149fff6041e3082a5be78739 Mon Sep 17 00:00:00 2001 From: MelonSpeedruns Date: Tue, 29 Mar 2022 11:59:24 -0400 Subject: [PATCH 010/146] Fixed rupee drops from bushes during title screen --- soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c b/soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c index 1b89b7b8d..620463b04 100644 --- a/soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c +++ b/soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c @@ -300,7 +300,7 @@ void EnKusa_Main(EnKusa* this, GlobalContext* globalCtx) { if (Actor_HasParent(&this->actor, globalCtx)) { EnKusa_SetupLiftedUp(this); SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_PL_PULL_UP_PLANT); - } else if (this->collider.base.acFlags & AC_HIT) { + } else if (this->collider.base.acFlags & AC_HIT && gGlobalCtx->csCtx.state == 0) { this->collider.base.acFlags &= ~AC_HIT; EnKusa_SpawnFragments(this, globalCtx); EnKusa_DropCollectible(this, globalCtx); From 6aa88941253884213ed4638268ae3065b22f83c5 Mon Sep 17 00:00:00 2001 From: Torphedo <73564623+Torphedo@users.noreply.github.com> Date: Tue, 29 Mar 2022 22:21:53 -0400 Subject: [PATCH 011/146] Remove unnecessary warnings (#42) * Remove unnecessary warnings * Comment out error --- ZAPDTR/ZAPD/Main.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ZAPDTR/ZAPD/Main.cpp b/ZAPDTR/ZAPD/Main.cpp index 440f6d504..250704993 100644 --- a/ZAPDTR/ZAPD/Main.cpp +++ b/ZAPDTR/ZAPD/Main.cpp @@ -188,14 +188,16 @@ int main(int argc, char* argv[]) } else if (arg == "-eh") // Enable Error Handler { -#if !defined(_MSC_VER) && !defined(__CYGWIN__) + #if !defined(_MSC_VER) && !defined(__CYGWIN__) signal(SIGSEGV, ErrorHandler); signal(SIGABRT, ErrorHandler); #else - HANDLE_WARNING(WarningType::Always, - "tried to set error handler, but this ZAPD build lacks support for one", - ""); + // HANDLE_WARNING(WarningType::Always, + // "tried to set error handler, but this ZAPD build lacks support for one", + // ""); #endif + + } else if (arg == "-v") // Verbose { From 98ddacef010b40d3f7039a9767b168af9c56ec00 Mon Sep 17 00:00:00 2001 From: MelonSpeedruns Date: Tue, 29 Mar 2022 22:23:02 -0400 Subject: [PATCH 012/146] Fixed PS5 gyro & Added GUI calibration button (#78) * Fixed PS5 gyro & Added GUI calibration button * Change PS4/PS5 LED to the tunic color --- libultraship/libultraship/GameSettings.h | 4 +- libultraship/libultraship/SDLController.cpp | 48 +++++++++++---------- libultraship/libultraship/SohImGuiImpl.cpp | 8 ++++ soh/src/code/padmgr.c | 14 +++++- 4 files changed, 49 insertions(+), 25 deletions(-) diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index 8508baeae..be974fd80 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -30,7 +30,9 @@ struct SoHConfigType { float gyro_sensitivity = 1.0f; float rumble_strength = 1.0f; float input_scale = 1.0f; - bool input_enabled = false; + float gyroDriftX = 0.0f; + float gyroDriftY = 0.0f; + bool input_enabled = false; } controller; // Cheats diff --git a/libultraship/libultraship/SDLController.cpp b/libultraship/libultraship/SDLController.cpp index 3d6d6800d..d1315c3e4 100644 --- a/libultraship/libultraship/SDLController.cpp +++ b/libultraship/libultraship/SDLController.cpp @@ -7,12 +7,8 @@ #include "Window.h" extern "C" uint8_t __osMaxControllers; -float gyroDriftX; -float gyroDriftY; namespace Ship { - - SDLController::SDLController(int32_t dwControllerNumber) : Controller(dwControllerNumber), Cont(nullptr), guid(INVALID_SDL_CONTROLLER_GUID) { } @@ -186,31 +182,31 @@ namespace Ship { SDL_GameControllerGetSensorData(Cont, SDL_SENSOR_GYRO, gyroData, 3); const char* contName = SDL_GameControllerName(Cont); - const int isSpecialController = strcmp("PS5 Controller", contName); + const int isSpecialController = !strcmp("PS5 Controller", contName); const float gyroSensitivity = Game::Settings.controller.gyro_sensitivity; - if (gyroDriftX == 0) { - if (isSpecialController == 0) { - gyroDriftX = gyroData[2]; + if (Game::Settings.controller.gyroDriftX == 0) { + Game::Settings.controller.gyroDriftX = gyroData[0]; + } + + if (Game::Settings.controller.gyroDriftY == 0) { + if (isSpecialController == 1) { + Game::Settings.controller.gyroDriftY = gyroData[2]; } else { - gyroDriftX = gyroData[0]; + Game::Settings.controller.gyroDriftY = gyroData[1]; } } - if (gyroDriftY == 0) { - gyroDriftY = gyroData[1]; - } - - if (isSpecialController == 0) { - wGyroX = gyroData[2] - gyroDriftX; + if (isSpecialController == 1) { + wGyroX = gyroData[0] - Game::Settings.controller.gyroDriftX; + wGyroY = -gyroData[2] - Game::Settings.controller.gyroDriftY; } else { - wGyroX = gyroData[0] - gyroDriftX; + wGyroX = gyroData[0] - Game::Settings.controller.gyroDriftX; + wGyroY = gyroData[1] - Game::Settings.controller.gyroDriftY; } - wGyroY = gyroData[1] - gyroDriftY; - wGyroX *= gyroSensitivity; wGyroY *= gyroSensitivity; } @@ -340,11 +336,19 @@ namespace Ship { } if (SDL_GameControllerHasLED(Cont)) { - if (controller->ledColor == 1) { + switch (controller->ledColor) { + case 0: SDL_JoystickSetLED(SDL_GameControllerGetJoystick(Cont), 255, 0, 0); - } - else { - SDL_JoystickSetLED(SDL_GameControllerGetJoystick(Cont), 0, 255, 0); + break; + case 1: + SDL_JoystickSetLED(SDL_GameControllerGetJoystick(Cont), 0x1E, 0x69, 0x1B); + break; + case 2: + SDL_JoystickSetLED(SDL_GameControllerGetJoystick(Cont), 0x64, 0x14, 0x00); + break; + case 3: + SDL_JoystickSetLED(SDL_GameControllerGetJoystick(Cont), 0x00, 0x3C, 0x64); + break; } } } diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 548b298ef..abc51a535 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -306,6 +306,14 @@ namespace SohImGui { if (ImGui::SliderFloat("##GYROSCOPE", &Game::Settings.controller.gyro_sensitivity, 0.0f, 1.0f, "")) { needs_save = true; } + + if (ImGui::Button("Recalibrate Gyro")) { + Game::Settings.controller.gyroDriftX = 0; + Game::Settings.controller.gyroDriftY = 0; + } + + ImGui::Separator(); + ImGui::Text("Rumble Strength: %d %%", static_cast(100 * Game::Settings.controller.rumble_strength)); if (ImGui::SliderFloat("##RUMBLE", &Game::Settings.controller.rumble_strength, 0.0f, 1.0f, "")) { needs_save = true; diff --git a/soh/src/code/padmgr.c b/soh/src/code/padmgr.c index fb4ceb8e6..973c2b446 100644 --- a/soh/src/code/padmgr.c +++ b/soh/src/code/padmgr.c @@ -272,9 +272,19 @@ void PadMgr_ProcessInputs(PadMgr* padMgr) { controllerCallback.rumble = padMgr->rumbleEnable[0] > 0 ? 1 : 0; if (HealthMeter_IsCritical()) { - controllerCallback.ledColor = 1; - } else { controllerCallback.ledColor = 0; + } else if (gGlobalCtx) { + switch (CUR_EQUIP_VALUE(EQUIP_TUNIC) - 1) { + case PLAYER_TUNIC_KOKIRI: + controllerCallback.ledColor = 1; + break; + case PLAYER_TUNIC_GORON: + controllerCallback.ledColor = 2; + break; + case PLAYER_TUNIC_ZORA: + controllerCallback.ledColor = 3; + break; + } } OTRControllerCallback(&controllerCallback); From 5505336a8a02e2f957a6748ccf1527d38038db75 Mon Sep 17 00:00:00 2001 From: kev4cards Date: Tue, 29 Mar 2022 22:23:40 -0400 Subject: [PATCH 013/146] Replace uAxisThreshold with appropriate constant for octagon clamping (#83) --- libultraship/libultraship/SDLController.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libultraship/libultraship/SDLController.cpp b/libultraship/libultraship/SDLController.cpp index d1315c3e4..47fb57441 100644 --- a/libultraship/libultraship/SDLController.cpp +++ b/libultraship/libultraship/SDLController.cpp @@ -143,8 +143,8 @@ namespace Ship { //bound diagonals to an octagonal range {-68 ... +68} if (ax != 0.0 && ay != 0.0) { auto slope = ay / ax; - auto edgex = copysign(85.0 / (abs(slope) + wAxisThreshold / 69.0), ax); - auto edgey = copysign(std::min(abs(edgex * slope), 85.0 / (1.0 / abs(slope) + wAxisThreshold / 69.0)), ay); + auto edgex = copysign(85.0 / (abs(slope) + 16.0 / 69.0), ax); + auto edgey = copysign(std::min(abs(edgex * slope), 85.0 / (1.0 / abs(slope) + 16.0 / 69.0)), ay); edgex = edgey / slope; auto scale = sqrt(edgex * edgex + edgey * edgey) / 85.0; @@ -410,4 +410,4 @@ namespace Ship { std::string SDLController::GetBindingConfSection() { return GetControllerType() + " CONTROLLER BINDING " + guid; } -} \ No newline at end of file +} From 5d967f8e8c822565cb755ef95446cf7daf2b0b63 Mon Sep 17 00:00:00 2001 From: Emil Lenngren Date: Thu, 31 Mar 2022 02:30:48 +0200 Subject: [PATCH 014/146] Don't crash if glClipControl is not available --- libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp index 52815bc1c..16e750d14 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp @@ -673,7 +673,11 @@ static void gfx_opengl_resize_framebuffer(int fb, uint32_t width, uint32_t heigh void gfx_opengl_set_framebuffer(int fb) { - glClipControl(GL_UPPER_LEFT, GL_NEGATIVE_ONE_TO_ONE); // Set origin to upper left corner, to match N64 and DX11 + if (GLEW_ARB_clip_control || GLEW_VERSION_4_5) { + // Set origin to upper left corner, to match N64 and DX11 + // If this function is not supported, the texture will be upside down :( + glClipControl(GL_UPPER_LEFT, GL_NEGATIVE_ONE_TO_ONE); + } glBindFramebuffer(GL_FRAMEBUFFER_EXT, fb); glDepthMask(GL_TRUE); @@ -687,7 +691,9 @@ void gfx_opengl_reset_framebuffer(void) glBindFramebuffer(GL_FRAMEBUFFER, 0); glBindFramebuffer(GL_FRAMEBUFFER_EXT, framebuffer); - glClipControl(GL_LOWER_LEFT, GL_NEGATIVE_ONE_TO_ONE); + if (GLEW_ARB_clip_control || GLEW_VERSION_4_5) { + glClipControl(GL_LOWER_LEFT, GL_NEGATIVE_ONE_TO_ONE); + } } void gfx_opengl_select_texture_fb(int fbID) From 438fa8954c499fb4f65670873c37a51c7fbd7300 Mon Sep 17 00:00:00 2001 From: Kenix3 Date: Thu, 31 Mar 2022 17:39:12 -0400 Subject: [PATCH 015/146] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index aebd5b71b..ad6581078 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,7 @@ Official Discord: https://discord.com/invite/BtBmd55HVH Rrrrry123 | Speedbunner, encouragement, and community moderation Fierce deity | Encouragement and community moderation mzxrules | For his contributions to decomp + zel. | For his contributions to decomp Aloxado | Developer - General Programmer MegaMech | Developer - General Programmer Revo | Tester - GCC support and General Testing From 8bb9dd8aba29a025cd2f5f9f413ef0740247ac52 Mon Sep 17 00:00:00 2001 From: Kenix3 Date: Thu, 31 Mar 2022 17:39:47 -0400 Subject: [PATCH 016/146] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ad6581078..5aac83267 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ Official Discord: https://discord.com/invite/BtBmd55HVH Rrrrry123 | Speedbunner, encouragement, and community moderation Fierce deity | Encouragement and community moderation mzxrules | For his contributions to decomp - zel. | For his contributions to decomp + zel. | For his contributions to decomp Aloxado | Developer - General Programmer MegaMech | Developer - General Programmer Revo | Tester - GCC support and General Testing From e7e80c2c956f5ab92a80982bd8ceb5e9c7c3a327 Mon Sep 17 00:00:00 2001 From: MegaMech Date: Thu, 31 Mar 2022 15:40:25 -0600 Subject: [PATCH 017/146] Clarified compiliation step (#127) * Update README.md * Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5aac83267..a002eee8a 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Official Discord: https://discord.com/invite/BtBmd55HVH 2. Install [Visual Studio 2022 Community Edition](https://visualstudio.microsoft.com/vs/community/) 2b. In the Visual Studio Installer, install `MSVC v142 - VS 2019 C++`. 4. Clone the Ship of Harkinian repository. - 5. Put your 2020 OoT debug rom in the `soh` folder. + 5. Place `oot debug` rom (not Master Quest) in the `soh` folder named `baserom_original_non_mq`. 6. Launch `soh/fixbaserom.py`. 7. Launch `soh/extract_baserom.py`. 8. Copy the `baserom` folder from the `soh` folder into the `OTRExporter` folder. From 572e9fb9d0c6475f7bf9cf0801a50ff19c0567c5 Mon Sep 17 00:00:00 2001 From: Andrew Piper Date: Thu, 31 Mar 2022 18:32:32 -0400 Subject: [PATCH 018/146] Add an enhancement for a minimal ui. (#102) This removes the button backgrounds, hides the hearts when they are full and the magic when its not in use. It also hides the rupee / key counters. All this is still visible on the pause screen or when the minimap is visible. It also changes the minimap behavior to be hidden by default on a zone change. --- libultraship/libultraship/GameSettings.cpp | 5 +- libultraship/libultraship/GameSettings.h | 1 + libultraship/libultraship/SohImGuiImpl.cpp | 5 + soh/soh/Enhancements/bootcommands.c | 1 + soh/src/code/z_construct.c | 2 +- soh/src/code/z_parameter.c | 210 ++++++++++++--------- 6 files changed, 129 insertions(+), 95 deletions(-) diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index c638468af..1186fa27c 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -58,6 +58,9 @@ namespace Game { Settings.enhancements.animated_pause_menu = stob(Conf[EnhancementSection]["animated_pause_menu"]); CVar_SetS32(const_cast("gPauseLiveLink"), Settings.enhancements.animated_pause_menu); + Settings.enhancements.minimal_ui = stob(Conf[EnhancementSection]["minimal_ui"]); + CVar_SetS32(const_cast("gMinimalUI"), Settings.enhancements.minimal_ui); + // Audio Settings.audio.master = Ship::stof(Conf[AudioSection]["master"]); CVar_SetFloat(const_cast("gGameMasterVolume"), Settings.audio.master); @@ -139,7 +142,7 @@ namespace Game { Conf[EnhancementSection]["fast_text"] = std::to_string(Settings.enhancements.fast_text); Conf[EnhancementSection]["disable_lod"] = std::to_string(Settings.enhancements.disable_lod); Conf[EnhancementSection]["animated_pause_menu"] = std::to_string(Settings.enhancements.animated_pause_menu); - + Conf[EnhancementSection]["minimal_ui"] = std::to_string(Settings.enhancements.minimal_ui); // Controllers Conf[ControllerSection]["gyro_sensitivity"] = std::to_string(Settings.controller.gyro_sensitivity); diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index be974fd80..4f9bb4c99 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -23,6 +23,7 @@ struct SoHConfigType { bool fast_text = false; bool disable_lod = false; bool animated_pause_menu = false; + bool minimal_ui = false; } enhancements; // Controller diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index abc51a535..d95a27d08 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -341,6 +341,11 @@ namespace SohImGui { needs_save = true; } + if (ImGui::Checkbox("Minimal UI", &Game::Settings.enhancements.minimal_ui)) { + CVar_SetS32(const_cast("gMinimalUI"), Game::Settings.enhancements.minimal_ui); + needs_save = true; + } + ImGui::Text("Graphics"); ImGui::Separator(); diff --git a/soh/soh/Enhancements/bootcommands.c b/soh/soh/Enhancements/bootcommands.c index 6901c4644..685593179 100644 --- a/soh/soh/Enhancements/bootcommands.c +++ b/soh/soh/Enhancements/bootcommands.c @@ -24,6 +24,7 @@ void BootCommands_Init() CVar_RegisterS32("gDisableLOD", 0); CVar_RegisterS32("gDebugEnabled", 0); CVar_RegisterS32("gPauseLiveLink", 0); + CVar_RegisterS32("gMinimalUI", 0); } //void BootCommands_ParseBootArgs(char* str) diff --git a/soh/src/code/z_construct.c b/soh/src/code/z_construct.c index 2fd6d43ad..5149fd974 100644 --- a/soh/src/code/z_construct.c +++ b/soh/src/code/z_construct.c @@ -462,7 +462,7 @@ void func_80111070(void) { WREG(28) = 0; R_OW_MINIMAP_X = 238; R_OW_MINIMAP_Y = 164; - R_MINIMAP_DISABLED = false; + R_MINIMAP_DISABLED = CVar_GetS32("gMinimalUI", 0); WREG(32) = 122; WREG(33) = 60; WREG(35) = 0; diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index 8bce65a7b..1653cdaaf 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -3143,6 +3143,7 @@ void Interface_Draw(GlobalContext* globalCtx) { s16 svar4; s16 svar5; s16 svar6; + bool fullUi = !CVar_GetS32("gMinimalUI", 0) || !R_MINIMAP_DISABLED || globalCtx->pauseCtx.state != 0; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 3405); @@ -3158,111 +3159,123 @@ void Interface_Draw(GlobalContext* globalCtx) { if (pauseCtx->debugState == 0) { Interface_InitVertices(globalCtx); func_8008A994(interfaceCtx); - HealthMeter_Draw(globalCtx); + if (fullUi || gSaveContext.health != gSaveContext.healthCapacity) { + HealthMeter_Draw(globalCtx); + } func_80094520(globalCtx->state.gfxCtx); - // Rupee Icon - gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 200, 255, 100, interfaceCtx->magicAlpha); - gDPSetEnvColor(OVERLAY_DISP++, 0, 80, 0, 255); - OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gRupeeCounterIconTex, 16, 16, OTRGetRectDimensionFromLeftEdge(26), - 206, 16, 16, 1 << 10, 1 << 10); + if (fullUi) { + // Rupee Icon + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 200, 255, 100, interfaceCtx->magicAlpha); + gDPSetEnvColor(OVERLAY_DISP++, 0, 80, 0, 255); + OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gRupeeCounterIconTex, 16, 16, OTRGetRectDimensionFromLeftEdge(26), + 206, 16, 16, 1 << 10, 1 << 10); - switch (globalCtx->sceneNum) { - case SCENE_BMORI1: - case SCENE_HIDAN: - case SCENE_MIZUSIN: - case SCENE_JYASINZOU: - case SCENE_HAKADAN: - case SCENE_HAKADANCH: - case SCENE_ICE_DOUKUTO: - case SCENE_GANON: - case SCENE_MEN: - case SCENE_GERUDOWAY: - case SCENE_GANONTIKA: - case SCENE_GANON_SONOGO: - case SCENE_GANONTIKA_SONOGO: - case SCENE_TAKARAYA: - if (gSaveContext.inventory.dungeonKeys[gSaveContext.mapIndex] >= 0) { - // Small Key Icon - gDPPipeSync(OVERLAY_DISP++); - gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 200, 230, 255, interfaceCtx->magicAlpha); - gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 20, 255); - OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gSmallKeyCounterIconTex, 16, 16, OTRGetRectDimensionFromLeftEdge(26), 190, 16, 16, - 1 << 10, 1 << 10); + switch (globalCtx->sceneNum) { + case SCENE_BMORI1: + case SCENE_HIDAN: + case SCENE_MIZUSIN: + case SCENE_JYASINZOU: + case SCENE_HAKADAN: + case SCENE_HAKADANCH: + case SCENE_ICE_DOUKUTO: + case SCENE_GANON: + case SCENE_MEN: + case SCENE_GERUDOWAY: + case SCENE_GANONTIKA: + case SCENE_GANON_SONOGO: + case SCENE_GANONTIKA_SONOGO: + case SCENE_TAKARAYA: + if (gSaveContext.inventory.dungeonKeys[gSaveContext.mapIndex] >= 0) { + // Small Key Icon + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 200, 230, 255, interfaceCtx->magicAlpha); + gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 20, 255); + OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gSmallKeyCounterIconTex, 16, 16, OTRGetRectDimensionFromLeftEdge(26), 190, 16, 16, + 1 << 10, 1 << 10); - // Small Key Counter - gDPPipeSync(OVERLAY_DISP++); - gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->magicAlpha); - gDPSetCombineLERP(OVERLAY_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, - TEXEL0, 0, PRIMITIVE, 0); + // Small Key Counter + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->magicAlpha); + gDPSetCombineLERP(OVERLAY_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, + TEXEL0, 0, PRIMITIVE, 0); - interfaceCtx->counterDigits[2] = 0; - interfaceCtx->counterDigits[3] = gSaveContext.inventory.dungeonKeys[gSaveContext.mapIndex]; + interfaceCtx->counterDigits[2] = 0; + interfaceCtx->counterDigits[3] = gSaveContext.inventory.dungeonKeys[gSaveContext.mapIndex]; - while (interfaceCtx->counterDigits[3] >= 10) { - interfaceCtx->counterDigits[2]++; - interfaceCtx->counterDigits[3] -= 10; + while (interfaceCtx->counterDigits[3] >= 10) { + interfaceCtx->counterDigits[2]++; + interfaceCtx->counterDigits[3] -= 10; + } + + svar3 = OTRGetRectDimensionFromLeftEdge(42); + + if (interfaceCtx->counterDigits[2] != 0) { + OVERLAY_DISP = Gfx_TextureI8(OVERLAY_DISP, ((u8*)((u8*)digitTextures[interfaceCtx->counterDigits[2]])), 8, + 16, svar3, 190, 8, 16, 1 << 10, 1 << 10); + svar3 += 8; + } + + OVERLAY_DISP = Gfx_TextureI8(OVERLAY_DISP, + ((u8*)digitTextures[interfaceCtx->counterDigits[3]]), 8, 16, + svar3, 190, 8, 16, 1 << 10, 1 << 10); } + break; + default: + break; + } - svar3 = OTRGetRectDimensionFromLeftEdge(42); + // Rupee Counter + gDPPipeSync(OVERLAY_DISP++); - if (interfaceCtx->counterDigits[2] != 0) { - OVERLAY_DISP = Gfx_TextureI8(OVERLAY_DISP, ((u8*)((u8*)digitTextures[interfaceCtx->counterDigits[2]])), 8, - 16, svar3, 190, 8, 16, 1 << 10, 1 << 10); - svar3 += 8; - } + if (gSaveContext.rupees == CUR_CAPACITY(UPG_WALLET)) { + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 120, 255, 0, interfaceCtx->magicAlpha); + } else if (gSaveContext.rupees != 0) { + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->magicAlpha); + } else { + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 100, 100, 100, interfaceCtx->magicAlpha); + } - OVERLAY_DISP = Gfx_TextureI8(OVERLAY_DISP, - ((u8*)digitTextures[interfaceCtx->counterDigits[3]]), 8, 16, - svar3, 190, 8, 16, 1 << 10, 1 << 10); - } - break; - default: - break; + gDPSetCombineLERP(OVERLAY_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, + PRIMITIVE, 0); + + interfaceCtx->counterDigits[0] = interfaceCtx->counterDigits[1] = 0; + interfaceCtx->counterDigits[2] = gSaveContext.rupees; + + if ((interfaceCtx->counterDigits[2] > 9999) || (interfaceCtx->counterDigits[2] < 0)) { + interfaceCtx->counterDigits[2] &= 0xDDD; + } + + while (interfaceCtx->counterDigits[2] >= 100) { + interfaceCtx->counterDigits[0]++; + interfaceCtx->counterDigits[2] -= 100; + } + + while (interfaceCtx->counterDigits[2] >= 10) { + interfaceCtx->counterDigits[1]++; + interfaceCtx->counterDigits[2] -= 10; + } + + svar2 = rupeeDigitsFirst[CUR_UPG_VALUE(UPG_WALLET)]; + svar5 = rupeeDigitsCount[CUR_UPG_VALUE(UPG_WALLET)]; + + for (svar1 = 0, svar3 = 42; svar1 < svar5; svar1++, svar2++, svar3 += 8) { + OVERLAY_DISP = + Gfx_TextureI8(OVERLAY_DISP, ((u8*)digitTextures[interfaceCtx->counterDigits[svar2]]), 8, 16, + OTRGetRectDimensionFromLeftEdge(svar3), 206, 8, 16, 1 << 10, 1 << 10); + } + } + else { + // Make sure item counts have black backgrounds + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 0, 0, 0, interfaceCtx->magicAlpha); + gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 0); } - // Rupee Counter - gDPPipeSync(OVERLAY_DISP++); - - if (gSaveContext.rupees == CUR_CAPACITY(UPG_WALLET)) { - gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 120, 255, 0, interfaceCtx->magicAlpha); - } else if (gSaveContext.rupees != 0) { - gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->magicAlpha); - } else { - gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 100, 100, 100, interfaceCtx->magicAlpha); + if (fullUi || gSaveContext.unk_13F0 > 0) { + Interface_DrawMagicBar(globalCtx); } - gDPSetCombineLERP(OVERLAY_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, - PRIMITIVE, 0); - - interfaceCtx->counterDigits[0] = interfaceCtx->counterDigits[1] = 0; - interfaceCtx->counterDigits[2] = gSaveContext.rupees; - - if ((interfaceCtx->counterDigits[2] > 9999) || (interfaceCtx->counterDigits[2] < 0)) { - interfaceCtx->counterDigits[2] &= 0xDDD; - } - - while (interfaceCtx->counterDigits[2] >= 100) { - interfaceCtx->counterDigits[0]++; - interfaceCtx->counterDigits[2] -= 100; - } - - while (interfaceCtx->counterDigits[2] >= 10) { - interfaceCtx->counterDigits[1]++; - interfaceCtx->counterDigits[2] -= 10; - } - - svar2 = rupeeDigitsFirst[CUR_UPG_VALUE(UPG_WALLET)]; - svar5 = rupeeDigitsCount[CUR_UPG_VALUE(UPG_WALLET)]; - - for (svar1 = 0, svar3 = 42; svar1 < svar5; svar1++, svar2++, svar3 += 8) { - OVERLAY_DISP = - Gfx_TextureI8(OVERLAY_DISP, ((u8*)digitTextures[interfaceCtx->counterDigits[svar2]]), 8, 16, - OTRGetRectDimensionFromLeftEdge(svar3), 206, 8, 16, 1 << 10, 1 << 10); - } - - Interface_DrawMagicBar(globalCtx); Minimap_Draw(globalCtx); if ((R_PAUSE_MENU_MODE != 2) && (R_PAUSE_MENU_MODE != 3)) { @@ -3271,7 +3284,9 @@ void Interface_Draw(GlobalContext* globalCtx) { func_80094520(globalCtx->state.gfxCtx); - Interface_DrawItemButtons(globalCtx); + if (fullUi) { + Interface_DrawItemButtons(globalCtx); + } gDPPipeSync(OVERLAY_DISP++); gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->bAlpha); @@ -3281,10 +3296,17 @@ void Interface_Draw(GlobalContext* globalCtx) { // B Button Icon & Ammo Count if (gSaveContext.equips.buttonItems[0] != ITEM_NONE) { - Interface_DrawItemIconTexture(globalCtx, gItemIcons[gSaveContext.equips.buttonItems[0]], 0); + if (fullUi) { + Interface_DrawItemIconTexture(globalCtx, gItemIcons[gSaveContext.equips.buttonItems[0]], 0); + } if ((player->stateFlags1 & 0x00800000) || (globalCtx->shootingGalleryStatus > 1) || ((globalCtx->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(globalCtx, 0x38))) { + + if (!fullUi) { + Interface_DrawItemIconTexture(globalCtx, gItemIcons[gSaveContext.equips.buttonItems[0]], 0); + } + gDPPipeSync(OVERLAY_DISP++); gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); @@ -3357,7 +3379,9 @@ void Interface_Draw(GlobalContext* globalCtx) { gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_A_BTN_COLOR(0), R_A_BTN_COLOR(1), R_A_BTN_COLOR(2), interfaceCtx->aAlpha); - Interface_DrawActionButton(globalCtx, rABtnX, R_A_BTN_Y); + if (fullUi) { + Interface_DrawActionButton(globalCtx, rABtnX, R_A_BTN_Y); + } gDPPipeSync(OVERLAY_DISP++); const f32 rAIconX = OTRGetDimensionFromRightEdge(R_A_ICON_X); //func_8008A8B8(globalCtx, R_A_ICON_Y, R_A_ICON_Y + 45, rAIconX, rAIconX + 45); From c80f9fbd57d2ae90fa87a1e34d906a265de20e55 Mon Sep 17 00:00:00 2001 From: Nicholas Estelami Date: Thu, 31 Mar 2022 19:42:44 -0400 Subject: [PATCH 019/146] Added support for multiple game versions (#107) * WIP Multiversion support * GC PAL Non-MQ support complete * Updated OtrGui to handle different game versions * Added version file * Added new extract mode to ZAPD and optimized OTR gen time * Fixed bug causing crash * Further optimized OTRExporter, saving around ~20 seconds. * ZAPD is now multi-threaded. * Fixed merge issue * Fixed memory leak and fog issue on pause screen. * Additional fog fixes. Co-authored-by: Jack Walker <7463599+Jack-Walker@users.noreply.github.com> --- OTRExporter/.gitignore | 2 + OTRExporter/CFG/Config.xml | 2 +- OTRExporter/CFG/filelists/dbg.txt | 1532 ++++++++++++++++ OTRExporter/CFG/filelists/gamecube.txt | 1509 ++++++++++++++++ OTRExporter/CFG/filelists/gamecube_pal.txt | 1510 ++++++++++++++++ .../OTRExporter/DisplayListExporter.cpp | 128 +- OTRExporter/OTRExporter/Main.cpp | 36 +- OTRExporter/OTRExporter/Main.h | 3 +- OTRExporter/OTRExporter/OTRExporter.vcxproj | 18 + OTRExporter/OTRExporter/RoomExporter.cpp | 16 +- OTRExporter/OTRExporter/SkeletonExporter.cpp | 2 +- .../OTRExporter/SkeletonLimbExporter.cpp | 8 +- OTRExporter/extract_assets.py | 12 +- OTRExporter/extract_baserom_debug.py | 1608 +++++++++++++++++ OTRExporter/extract_baserom_gc.py | 1586 ++++++++++++++++ .../{Config.xml => Config_GC_MQ_D.xml} | 2 +- OTRGui/assets/extractor/Config_GC_NMQ_D.xml | 8 + .../assets/extractor/Config_GC_NMQ_PAL_F.xml | 8 + .../extractor/filelists/gamecube_pal.txt | 1510 ++++++++++++++++ OTRGui/src/game/game.cpp | 30 +- .../baserom_extractor/baserom_extractor.cpp | 25 +- .../baserom_extractor/baserom_extractor.h | 18 +- OTRGui/src/impl/extractor/extractor.cpp | 115 +- OTRGui/src/impl/extractor/extractor.h | 4 +- OTRGui/src/utils/mutils.cpp | 6 +- ZAPDTR/ZAPD/CRC32.h | 2 +- ZAPDTR/ZAPD/Declaration.cpp | 7 + ZAPDTR/ZAPD/Declaration.h | 6 + ZAPDTR/ZAPD/FileWorker.cpp | 0 ZAPDTR/ZAPD/FileWorker.h | 15 + ZAPDTR/ZAPD/Globals.cpp | 128 +- ZAPDTR/ZAPD/Globals.h | 24 +- ZAPDTR/ZAPD/Main.cpp | 188 +- ZAPDTR/ZAPD/OtherStructs/SkinLimbStructs.cpp | 11 +- ZAPDTR/ZAPD/OutputFormatter.cpp | 8 +- ZAPDTR/ZAPD/OutputFormatter.h | 2 +- ZAPDTR/ZAPD/Overlays/ZOverlay.cpp | 2 + ZAPDTR/ZAPD/Overlays/ZOverlay.h | 3 + ZAPDTR/ZAPD/ZAPD.vcxproj | 28 + ZAPDTR/ZAPD/ZAPD.vcxproj.filters | 30 + ZAPDTR/ZAPD/ZAnimation.cpp | 45 +- ZAPDTR/ZAPD/ZArray.cpp | 3 +- ZAPDTR/ZAPD/ZBackground.cpp | 7 +- ZAPDTR/ZAPD/ZCollision.cpp | 73 +- ZAPDTR/ZAPD/ZDisplayList.cpp | 67 +- ZAPDTR/ZAPD/ZFile.cpp | 38 +- ZAPDTR/ZAPD/ZFile.h | 7 +- ZAPDTR/ZAPD/ZLimb.cpp | 20 +- ZAPDTR/ZAPD/ZPath.cpp | 7 +- ZAPDTR/ZAPD/ZPlayerAnimationData.cpp | 4 + ZAPDTR/ZAPD/ZResource.cpp | 34 +- ZAPDTR/ZAPD/ZRom.cpp | 202 +++ ZAPDTR/ZAPD/ZRom.h | 27 + .../ZRoom/Commands/SetActorCutsceneList.cpp | 3 +- ZAPDTR/ZAPD/ZRoom/Commands/SetActorList.cpp | 3 +- .../ZRoom/Commands/SetAlternateHeaders.cpp | 6 +- .../Commands/SetAnimatedMaterialList.cpp | 3 +- .../ZRoom/Commands/SetCollisionHeader.cpp | 3 +- ZAPDTR/ZAPD/ZRoom/Commands/SetCsCamera.cpp | 5 +- ZAPDTR/ZAPD/ZRoom/Commands/SetCutscenes.cpp | 3 +- .../ZAPD/ZRoom/Commands/SetEntranceList.cpp | 3 +- ZAPDTR/ZAPD/ZRoom/Commands/SetExitList.cpp | 2 +- ZAPDTR/ZAPD/ZRoom/Commands/SetLightList.cpp | 3 +- .../ZRoom/Commands/SetLightingSettings.cpp | 3 +- ZAPDTR/ZAPD/ZRoom/Commands/SetMesh.cpp | 14 +- .../ZAPD/ZRoom/Commands/SetMinimapChests.cpp | 3 +- ZAPDTR/ZAPD/ZRoom/Commands/SetMinimapList.cpp | 6 +- ZAPDTR/ZAPD/ZRoom/Commands/SetObjectList.cpp | 2 +- ZAPDTR/ZAPD/ZRoom/Commands/SetPathways.cpp | 2 +- ZAPDTR/ZAPD/ZRoom/Commands/SetRoomList.cpp | 2 +- .../ZRoom/Commands/SetStartPositionList.cpp | 3 +- .../ZRoom/Commands/SetTransitionActorList.cpp | 3 +- ZAPDTR/ZAPD/ZSkeleton.cpp | 6 +- ZAPDTR/ZAPD/ZText.cpp | 9 +- ZAPDTR/ZAPD/ZTexture.cpp | 48 +- ZAPDTR/ZAPD/ZTextureAnimation.cpp | 20 +- ZAPDTR/ZAPD/ctpl_stl.h | 251 +++ ZAPDTR/ZAPD/yaz0/readwrite.h | 29 + ZAPDTR/ZAPD/yaz0/yaz0.cpp | 227 +++ ZAPDTR/ZAPD/yaz0/yaz0.h | 6 + ZAPDTR/ZAPDUtils/ZAPDUtils.vcxproj | 18 + ZAPDTR/ZAPDUtils/ZAPDUtils.vcxproj.filters | 16 +- ZAPDTR/lib/libgfxd/priv.h | 4 +- libultraship/libultraship/GameVersions.h | 20 + .../libultraship/Lib/Fast3D/gfx_pc.cpp | 12 +- libultraship/libultraship/Lib/Fast3D/gfx_pc.h | 2 +- libultraship/libultraship/ResourceMgr.cpp | 91 +- libultraship/libultraship/ResourceMgr.h | 3 + .../libultraship/libultraship.vcxproj | 25 + .../libultraship/libultraship.vcxproj.filters | 3 + .../xml/{ => GC_NMQ_D}/code/fbdemo_circle.xml | 0 .../{ => GC_NMQ_D}/code/fbdemo_triforce.xml | 0 .../xml/{ => GC_NMQ_D}/code/fbdemo_wipe1.xml | 0 .../{ => GC_NMQ_D}/misc/link_animetion.xml | 0 .../objects/gameplay_dangeon_keep.xml | 0 .../objects/gameplay_field_keep.xml | 0 .../{ => GC_NMQ_D}/objects/gameplay_keep.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_Bb.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_ahg.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_am.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_ane.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_ani.xml | 0 .../{ => GC_NMQ_D}/objects/object_anubice.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_aob.xml | 0 .../{ => GC_NMQ_D}/objects/object_b_heart.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_bba.xml | 0 .../objects/object_bdan_objects.xml | 0 .../{ => GC_NMQ_D}/objects/object_bdoor.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_bg.xml | 0 .../objects/object_bigokuta.xml | 0 .../{ => GC_NMQ_D}/objects/object_bird.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_bji.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_bl.xml | 0 .../{ => GC_NMQ_D}/objects/object_blkobj.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_bob.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_boj.xml | 0 .../{ => GC_NMQ_D}/objects/object_bombf.xml | 0 .../{ => GC_NMQ_D}/objects/object_bombiwa.xml | 0 .../{ => GC_NMQ_D}/objects/object_bowl.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_box.xml | 0 .../{ => GC_NMQ_D}/objects/object_brob.xml | 0 .../{ => GC_NMQ_D}/objects/object_bubble.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_bv.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_bw.xml | 0 .../{ => GC_NMQ_D}/objects/object_bwall.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_bxa.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_cne.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_cob.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_cow.xml | 0 .../{ => GC_NMQ_D}/objects/object_crow.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_cs.xml | 0 .../objects/object_d_elevator.xml | 0 .../objects/object_d_hsblock.xml | 0 .../{ => GC_NMQ_D}/objects/object_d_lift.xml | 0 .../{ => GC_NMQ_D}/objects/object_daiku.xml | 0 .../objects/object_ddan_objects.xml | 0 .../objects/object_dekubaba.xml | 0 .../{ => GC_NMQ_D}/objects/object_dekujr.xml | 0 .../objects/object_dekunuts.xml | 0 .../{ => GC_NMQ_D}/objects/object_demo_6k.xml | 0 .../objects/object_demo_kekkai.xml | 0 .../objects/object_demo_tre_lgt.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_dh.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_dnk.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_dns.xml | 0 .../{ => GC_NMQ_D}/objects/object_dodojr.xml | 0 .../{ => GC_NMQ_D}/objects/object_dodongo.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_dog.xml | 0 .../objects/object_door_gerudo.xml | 0 .../objects/object_door_killer.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_ds.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_ds2.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_du.xml | 0 .../{ => GC_NMQ_D}/objects/object_dy_obj.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_ec.xml | 0 .../objects/object_efc_crystal_light.xml | 0 .../objects/object_efc_doughnut.xml | 0 .../objects/object_efc_erupc.xml | 0 .../objects/object_efc_fire_ball.xml | 0 .../objects/object_efc_flash.xml | 0 .../objects/object_efc_lgt_shower.xml | 0 .../objects/object_efc_star_field.xml | 0 .../{ => GC_NMQ_D}/objects/object_efc_tw.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_ei.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_fa.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_fd.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_fd2.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_fhg.xml | 0 .../{ => GC_NMQ_D}/objects/object_fire.xml | 0 .../{ => GC_NMQ_D}/objects/object_firefly.xml | 0 .../{ => GC_NMQ_D}/objects/object_fish.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_fr.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_fu.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_fw.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_fz.xml | 0 .../{ => GC_NMQ_D}/objects/object_ganon.xml | 0 .../{ => GC_NMQ_D}/objects/object_ganon2.xml | 0 .../objects/object_ganon_anime1.xml | 0 .../objects/object_ganon_anime2.xml | 0 .../objects/object_ganon_anime3.xml | 0 .../objects/object_ganon_objects.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_ge1.xml | 0 .../{ => GC_NMQ_D}/objects/object_geff.xml | 0 .../{ => GC_NMQ_D}/objects/object_geldb.xml | 0 .../objects/object_gi_arrow.xml | 0 .../objects/object_gi_arrowcase.xml | 0 .../{ => GC_NMQ_D}/objects/object_gi_bean.xml | 0 .../objects/object_gi_bomb_1.xml | 0 .../objects/object_gi_bomb_2.xml | 0 .../objects/object_gi_bombpouch.xml | 0 .../objects/object_gi_boomerang.xml | 0 .../objects/object_gi_boots_2.xml | 0 .../objects/object_gi_bosskey.xml | 0 .../objects/object_gi_bottle.xml | 0 .../objects/object_gi_bottle_letter.xml | 0 .../{ => GC_NMQ_D}/objects/object_gi_bow.xml | 0 .../objects/object_gi_bracelet.xml | 0 .../objects/object_gi_brokensword.xml | 0 .../objects/object_gi_butterfly.xml | 0 .../objects/object_gi_clothes.xml | 0 .../{ => GC_NMQ_D}/objects/object_gi_coin.xml | 0 .../objects/object_gi_compass.xml | 0 .../objects/object_gi_dekupouch.xml | 0 .../{ => GC_NMQ_D}/objects/object_gi_egg.xml | 0 .../objects/object_gi_eye_lotion.xml | 0 .../{ => GC_NMQ_D}/objects/object_gi_fire.xml | 0 .../{ => GC_NMQ_D}/objects/object_gi_fish.xml | 0 .../{ => GC_NMQ_D}/objects/object_gi_frog.xml | 0 .../objects/object_gi_gerudo.xml | 0 .../objects/object_gi_gerudomask.xml | 0 .../objects/object_gi_ghost.xml | 0 .../objects/object_gi_glasses.xml | 0 .../objects/object_gi_gloves.xml | 0 .../objects/object_gi_goddess.xml | 0 .../objects/object_gi_golonmask.xml | 0 .../objects/object_gi_grass.xml | 0 .../objects/object_gi_hammer.xml | 0 .../objects/object_gi_heart.xml | 0 .../objects/object_gi_hearts.xml | 0 .../objects/object_gi_hookshot.xml | 0 .../objects/object_gi_hoverboots.xml | 0 .../objects/object_gi_insect.xml | 0 .../objects/object_gi_jewel.xml | 0 .../{ => GC_NMQ_D}/objects/object_gi_key.xml | 0 .../objects/object_gi_ki_tan_mask.xml | 0 .../objects/object_gi_letter.xml | 0 .../objects/object_gi_liquid.xml | 0 .../objects/object_gi_longsword.xml | 0 .../objects/object_gi_m_arrow.xml | 0 .../objects/object_gi_magicpot.xml | 0 .../{ => GC_NMQ_D}/objects/object_gi_map.xml | 0 .../objects/object_gi_medal.xml | 0 .../objects/object_gi_melody.xml | 0 .../{ => GC_NMQ_D}/objects/object_gi_milk.xml | 0 .../objects/object_gi_mushroom.xml | 0 .../objects/object_gi_niwatori.xml | 0 .../{ => GC_NMQ_D}/objects/object_gi_nuts.xml | 0 .../objects/object_gi_ocarina.xml | 0 .../objects/object_gi_ocarina_0.xml | 0 .../objects/object_gi_pachinko.xml | 0 .../objects/object_gi_powder.xml | 0 .../objects/object_gi_prescription.xml | 0 .../objects/object_gi_purse.xml | 0 .../objects/object_gi_rabit_mask.xml | 0 .../objects/object_gi_redead_mask.xml | 0 .../{ => GC_NMQ_D}/objects/object_gi_rupy.xml | 0 .../{ => GC_NMQ_D}/objects/object_gi_saw.xml | 0 .../objects/object_gi_scale.xml | 0 .../{ => GC_NMQ_D}/objects/object_gi_seed.xml | 0 .../objects/object_gi_shield_1.xml | 0 .../objects/object_gi_shield_2.xml | 0 .../objects/object_gi_shield_3.xml | 0 .../objects/object_gi_skj_mask.xml | 0 .../objects/object_gi_soldout.xml | 0 .../{ => GC_NMQ_D}/objects/object_gi_soul.xml | 0 .../objects/object_gi_stick.xml | 0 .../objects/object_gi_sutaru.xml | 0 .../objects/object_gi_sword_1.xml | 0 .../objects/object_gi_ticketstone.xml | 0 .../objects/object_gi_truth_mask.xml | 0 .../objects/object_gi_zoramask.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_gj.xml | 0 .../objects/object_gjyo_objects.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_gla.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_gm.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_gnd.xml | 0 .../objects/object_gnd_magic.xml | 0 .../{ => GC_NMQ_D}/objects/object_gndd.xml | 0 .../{ => GC_NMQ_D}/objects/object_god_lgt.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_gol.xml | 0 .../{ => GC_NMQ_D}/objects/object_goma.xml | 0 .../{ => GC_NMQ_D}/objects/object_goroiwa.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_gr.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_gs.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_gt.xml | 0 .../{ => GC_NMQ_D}/objects/object_haka.xml | 0 .../objects/object_haka_door.xml | 0 .../objects/object_haka_objects.xml | 0 .../objects/object_hakach_objects.xml | 0 .../{ => GC_NMQ_D}/objects/object_hata.xml | 0 .../objects/object_heavy_object.xml | 0 .../objects/object_hidan_objects.xml | 0 .../objects/object_hintnuts.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_hni.xml | 0 .../{ => GC_NMQ_D}/objects/object_horse.xml | 0 .../objects/object_horse_ganon.xml | 0 .../objects/object_horse_link_child.xml | 0 .../objects/object_horse_normal.xml | 0 .../objects/object_horse_zelda.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_hs.xml | 0 .../{ => GC_NMQ_D}/objects/object_human.xml | 0 .../objects/object_ice_objects.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_ik.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_im.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_in.xml | 0 .../{ => GC_NMQ_D}/objects/object_ingate.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_jj.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_js.xml | 0 .../objects/object_jya_door.xml | 0 .../objects/object_jya_iron.xml | 0 .../{ => GC_NMQ_D}/objects/object_jya_obj.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_ka.xml | 0 .../{ => GC_NMQ_D}/objects/object_kanban.xml | 0 .../{ => GC_NMQ_D}/objects/object_kibako2.xml | 0 .../objects/object_kingdodongo.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_km1.xml | 0 .../{ => GC_NMQ_D}/objects/object_kusa.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_kw1.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_kz.xml | 0 .../objects/object_light_ring.xml | 0 .../objects/object_lightbox.xml | 0 .../objects/object_lightswitch.xml | 0 .../objects/object_link_boy.xml | 0 .../objects/object_link_child.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_ma1.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_ma2.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_mag.xml | 0 .../objects/object_mamenoki.xml | 0 .../objects/object_mastergolon.xml | 0 .../objects/object_masterkokiri.xml | 0 .../objects/object_masterkokirihead.xml | 0 .../objects/object_masterzoora.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_mb.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_md.xml | 0 .../{ => GC_NMQ_D}/objects/object_medal.xml | 0 .../objects/object_menkuri_objects.xml | 0 .../{ => GC_NMQ_D}/objects/object_mir_ray.xml | 0 .../objects/object_mizu_objects.xml | 0 .../{ => GC_NMQ_D}/objects/object_mjin.xml | 0 .../objects/object_mjin_dark.xml | 0 .../objects/object_mjin_flame.xml | 0 .../objects/object_mjin_flash.xml | 0 .../objects/object_mjin_ice.xml | 0 .../objects/object_mjin_oka.xml | 0 .../objects/object_mjin_soul.xml | 0 .../objects/object_mjin_wind.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_mk.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_mm.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_mo.xml | 0 .../objects/object_mori_hineri1.xml | 0 .../objects/object_mori_hineri1a.xml | 0 .../objects/object_mori_hineri2.xml | 0 .../objects/object_mori_hineri2a.xml | 0 .../objects/object_mori_objects.xml | 0 .../objects/object_mori_tex.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_ms.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_mu.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_nb.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_niw.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_nwc.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_ny.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oA1.xml | 0 .../{ => GC_NMQ_D}/objects/object_oA10.xml | 0 .../{ => GC_NMQ_D}/objects/object_oA11.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oA2.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oA3.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oA4.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oA5.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oA6.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oA7.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oA8.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oA9.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oB1.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oB2.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oB3.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oB4.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oE1.xml | 0 .../{ => GC_NMQ_D}/objects/object_oE10.xml | 0 .../{ => GC_NMQ_D}/objects/object_oE11.xml | 0 .../{ => GC_NMQ_D}/objects/object_oE12.xml | 0 .../{ => GC_NMQ_D}/objects/object_oE1s.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oE2.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oE3.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oE4.xml | 0 .../{ => GC_NMQ_D}/objects/object_oE4s.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oE5.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oE6.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oE7.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oE8.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_oE9.xml | 0 .../objects/object_oE_anime.xml | 0 .../objects/object_oF1d_map.xml | 0 .../{ => GC_NMQ_D}/objects/object_oF1s.xml | 0 .../{ => GC_NMQ_D}/objects/object_o_anime.xml | 0 .../{ => GC_NMQ_D}/objects/object_okuta.xml | 0 .../objects/object_opening_demo1.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_os.xml | 0 .../objects/object_os_anime.xml | 0 .../{ => GC_NMQ_D}/objects/object_ossan.xml | 0 .../objects/object_ouke_haka.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_owl.xml | 0 .../{ => GC_NMQ_D}/objects/object_peehat.xml | 0 .../objects/object_po_composer.xml | 0 .../objects/object_po_field.xml | 0 .../objects/object_po_sisters.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_poh.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_ps.xml | 0 .../{ => GC_NMQ_D}/objects/object_pu_box.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_rd.xml | 0 .../{ => GC_NMQ_D}/objects/object_reeba.xml | 0 .../objects/object_relay_objects.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_rl.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_rr.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_rs.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_ru1.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_ru2.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_sa.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_sb.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_sd.xml | 0 .../objects/object_shop_dungen.xml | 0 .../objects/object_shopnuts.xml | 0 .../{ => GC_NMQ_D}/objects/object_siofuki.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_sk2.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_skb.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_skj.xml | 0 .../objects/object_spot00_break.xml | 0 .../objects/object_spot00_objects.xml | 0 .../objects/object_spot01_matoya.xml | 0 .../objects/object_spot01_matoyab.xml | 0 .../objects/object_spot01_objects.xml | 0 .../objects/object_spot01_objects2.xml | 0 .../objects/object_spot02_objects.xml | 0 .../objects/object_spot03_object.xml | 0 .../objects/object_spot04_objects.xml | 0 .../objects/object_spot05_objects.xml | 0 .../objects/object_spot06_objects.xml | 0 .../objects/object_spot07_object.xml | 0 .../objects/object_spot08_obj.xml | 0 .../objects/object_spot09_obj.xml | 0 .../objects/object_spot11_obj.xml | 0 .../objects/object_spot12_obj.xml | 0 .../objects/object_spot15_obj.xml | 0 .../objects/object_spot16_obj.xml | 0 .../objects/object_spot17_obj.xml | 0 .../objects/object_spot18_obj.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_ssh.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_sst.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_st.xml | 0 .../{ => GC_NMQ_D}/objects/object_stream.xml | 0 .../objects/object_syokudai.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_ta.xml | 0 .../objects/object_timeblock.xml | 0 .../{ => GC_NMQ_D}/objects/object_tite.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_tk.xml | 0 .../objects/object_toki_objects.xml | 0 .../{ => GC_NMQ_D}/objects/object_torch2.xml | 0 .../{ => GC_NMQ_D}/objects/object_toryo.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_tp.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_tr.xml | 0 .../{ => GC_NMQ_D}/objects/object_trap.xml | 0 .../objects/object_triforce_spot.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_ts.xml | 0 .../{ => GC_NMQ_D}/objects/object_tsubo.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_tw.xml | 0 .../{ => GC_NMQ_D}/objects/object_umajump.xml | 0 .../{ => GC_NMQ_D}/objects/object_vali.xml | 0 .../{ => GC_NMQ_D}/objects/object_vase.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_vm.xml | 0 .../objects/object_wallmaster.xml | 0 .../{ => GC_NMQ_D}/objects/object_warp1.xml | 0 .../{ => GC_NMQ_D}/objects/object_warp2.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_wf.xml | 0 .../{ => GC_NMQ_D}/objects/object_wood02.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_xc.xml | 0 .../objects/object_yabusame_point.xml | 0 .../objects/object_ydan_objects.xml | 0 .../objects/object_yukabyun.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_zf.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_zg.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_zl1.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_zl2.xml | 0 .../objects/object_zl2_anime1.xml | 0 .../objects/object_zl2_anime2.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_zl4.xml | 0 .../xml/{ => GC_NMQ_D}/objects/object_zo.xml | 0 .../overlays/ovl_Arrow_Fire.xml | 0 .../{ => GC_NMQ_D}/overlays/ovl_Arrow_Ice.xml | 0 .../overlays/ovl_Arrow_Light.xml | 0 .../overlays/ovl_Bg_Ganon_Otyuka.xml | 0 .../overlays/ovl_Bg_Jya_Cobra.xml | 0 .../overlays/ovl_Boss_Dodongo.xml | 0 .../overlays/ovl_Boss_Ganon.xml | 0 .../overlays/ovl_Boss_Ganon2.xml | 0 .../{ => GC_NMQ_D}/overlays/ovl_Boss_Sst.xml | 0 .../{ => GC_NMQ_D}/overlays/ovl_Demo_Shd.xml | 0 .../{ => GC_NMQ_D}/overlays/ovl_Elf_Msg.xml | 0 .../{ => GC_NMQ_D}/overlays/ovl_Elf_Msg2.xml | 0 .../{ => GC_NMQ_D}/overlays/ovl_En_Bili.xml | 0 .../overlays/ovl_En_Clear_Tag.xml | 0 .../overlays/ovl_En_Ganon_Mant.xml | 0 .../overlays/ovl_En_Ganon_Organ.xml | 0 .../{ => GC_NMQ_D}/overlays/ovl_En_Holl.xml | 0 .../overlays/ovl_En_Jsjutan.xml | 0 .../{ => GC_NMQ_D}/overlays/ovl_En_Kanban.xml | 0 .../{ => GC_NMQ_D}/overlays/ovl_En_Sda.xml | 0 .../{ => GC_NMQ_D}/overlays/ovl_En_Ssh.xml | 0 .../xml/{ => GC_NMQ_D}/overlays/ovl_En_St.xml | 0 .../{ => GC_NMQ_D}/overlays/ovl_En_Sth.xml | 0 .../{ => GC_NMQ_D}/overlays/ovl_End_Title.xml | 0 .../overlays/ovl_File_Choose.xml | 0 .../overlays/ovl_Magic_Dark.xml | 0 .../overlays/ovl_Magic_Fire.xml | 0 .../overlays/ovl_Magic_Wind.xml | 0 .../overlays/ovl_Oceff_Spot.xml | 0 .../overlays/ovl_Oceff_Storm.xml | 0 .../overlays/ovl_Oceff_Wipe.xml | 0 .../overlays/ovl_Oceff_Wipe2.xml | 0 .../overlays/ovl_Oceff_Wipe3.xml | 0 .../overlays/ovl_Oceff_Wipe4.xml | 0 .../{ => GC_NMQ_D}/scenes/dungeons/Bmori1.xml | 0 .../scenes/dungeons/FIRE_bs.xml | 0 .../scenes/dungeons/HAKAdan.xml | 0 .../scenes/dungeons/HAKAdanCH.xml | 0 .../scenes/dungeons/HAKAdan_bs.xml | 0 .../{ => GC_NMQ_D}/scenes/dungeons/HIDAN.xml | 0 .../scenes/dungeons/MIZUsin.xml | 0 .../scenes/dungeons/MIZUsin_bs.xml | 0 .../{ => GC_NMQ_D}/scenes/dungeons/bdan.xml | 0 .../scenes/dungeons/bdan_boss.xml | 0 .../{ => GC_NMQ_D}/scenes/dungeons/ddan.xml | 0 .../scenes/dungeons/ddan_boss.xml | 0 .../{ => GC_NMQ_D}/scenes/dungeons/ganon.xml | 0 .../scenes/dungeons/ganon_boss.xml | 0 .../scenes/dungeons/ganon_demo.xml | 0 .../scenes/dungeons/ganon_final.xml | 0 .../scenes/dungeons/ganon_sonogo.xml | 0 .../scenes/dungeons/ganon_tou.xml | 0 .../scenes/dungeons/ganontika.xml | 0 .../scenes/dungeons/ganontikasonogo.xml | 0 .../scenes/dungeons/gerudoway.xml | 0 .../scenes/dungeons/ice_doukutu.xml | 0 .../scenes/dungeons/jyasinboss.xml | 0 .../scenes/dungeons/jyasinzou.xml | 0 .../{ => GC_NMQ_D}/scenes/dungeons/men.xml | 0 .../scenes/dungeons/moribossroom.xml | 0 .../{ => GC_NMQ_D}/scenes/dungeons/ydan.xml | 0 .../scenes/dungeons/ydan_boss.xml | 0 .../{ => GC_NMQ_D}/scenes/indoors/bowling.xml | 0 .../scenes/indoors/daiyousei_izumi.xml | 0 .../scenes/indoors/hairal_niwa.xml | 0 .../scenes/indoors/hairal_niwa2.xml | 0 .../scenes/indoors/hairal_niwa_n.xml | 0 .../scenes/indoors/hakasitarelay.xml | 0 .../xml/{ => GC_NMQ_D}/scenes/indoors/hut.xml | 0 .../scenes/indoors/hylia_labo.xml | 0 .../{ => GC_NMQ_D}/scenes/indoors/impa.xml | 0 .../scenes/indoors/kakariko.xml | 0 .../scenes/indoors/kenjyanoma.xml | 0 .../scenes/indoors/kokiri_home.xml | 0 .../scenes/indoors/kokiri_home3.xml | 0 .../scenes/indoors/kokiri_home4.xml | 0 .../scenes/indoors/kokiri_home5.xml | 0 .../{ => GC_NMQ_D}/scenes/indoors/labo.xml | 0 .../scenes/indoors/link_home.xml | 0 .../{ => GC_NMQ_D}/scenes/indoors/mahouya.xml | 0 .../scenes/indoors/malon_stable.xml | 0 .../scenes/indoors/miharigoya.xml | 0 .../scenes/indoors/nakaniwa.xml | 0 .../scenes/indoors/syatekijyou.xml | 0 .../scenes/indoors/takaraya.xml | 0 .../{ => GC_NMQ_D}/scenes/indoors/tent.xml | 0 .../scenes/indoors/tokinoma.xml | 0 .../scenes/indoors/yousei_izumi_tate.xml | 0 .../scenes/indoors/yousei_izumi_yoko.xml | 0 .../xml/{ => GC_NMQ_D}/scenes/misc/enrui.xml | 0 .../{ => GC_NMQ_D}/scenes/misc/entra_n.xml | 0 .../{ => GC_NMQ_D}/scenes/misc/hakaana.xml | 0 .../{ => GC_NMQ_D}/scenes/misc/hakaana2.xml | 0 .../scenes/misc/hakaana_ouke.xml | 0 .../{ => GC_NMQ_D}/scenes/misc/hiral_demo.xml | 0 .../{ => GC_NMQ_D}/scenes/misc/kakariko3.xml | 0 .../{ => GC_NMQ_D}/scenes/misc/kakusiana.xml | 0 .../{ => GC_NMQ_D}/scenes/misc/kinsuta.xml | 0 .../scenes/misc/market_alley.xml | 0 .../scenes/misc/market_alley_n.xml | 0 .../{ => GC_NMQ_D}/scenes/misc/market_day.xml | 0 .../scenes/misc/market_night.xml | 0 .../scenes/misc/market_ruins.xml | 0 .../xml/{ => GC_NMQ_D}/scenes/misc/shrine.xml | 0 .../{ => GC_NMQ_D}/scenes/misc/shrine_n.xml | 0 .../{ => GC_NMQ_D}/scenes/misc/shrine_r.xml | 0 .../{ => GC_NMQ_D}/scenes/misc/turibori.xml | 0 .../{ => GC_NMQ_D}/scenes/overworld/entra.xml | 0 .../{ => GC_NMQ_D}/scenes/overworld/souko.xml | 0 .../scenes/overworld/spot00.xml | 0 .../scenes/overworld/spot01.xml | 0 .../scenes/overworld/spot02.xml | 0 .../scenes/overworld/spot03.xml | 0 .../scenes/overworld/spot04.xml | 0 .../scenes/overworld/spot05.xml | 0 .../scenes/overworld/spot06.xml | 0 .../scenes/overworld/spot07.xml | 0 .../scenes/overworld/spot08.xml | 0 .../scenes/overworld/spot09.xml | 0 .../scenes/overworld/spot10.xml | 0 .../scenes/overworld/spot11.xml | 0 .../scenes/overworld/spot12.xml | 0 .../scenes/overworld/spot13.xml | 0 .../scenes/overworld/spot15.xml | 0 .../scenes/overworld/spot16.xml | 0 .../scenes/overworld/spot17.xml | 0 .../scenes/overworld/spot18.xml | 0 .../scenes/overworld/spot20.xml | 0 .../scenes/shops/alley_shop.xml | 0 .../xml/{ => GC_NMQ_D}/scenes/shops/drag.xml | 0 .../{ => GC_NMQ_D}/scenes/shops/face_shop.xml | 0 .../xml/{ => GC_NMQ_D}/scenes/shops/golon.xml | 0 .../scenes/shops/kokiri_shop.xml | 0 .../scenes/shops/night_shop.xml | 0 .../xml/{ => GC_NMQ_D}/scenes/shops/shop1.xml | 0 .../xml/{ => GC_NMQ_D}/scenes/shops/zoora.xml | 0 .../scenes/test_levels/besitu.xml | 0 .../scenes/test_levels/depth_test.xml | 0 .../scenes/test_levels/sasatest.xml | 0 .../scenes/test_levels/sutaru.xml | 0 .../scenes/test_levels/syotes.xml | 0 .../scenes/test_levels/syotes2.xml | 0 .../scenes/test_levels/test01.xml | 0 .../scenes/test_levels/testroom.xml | 0 .../{ => GC_NMQ_D}/text/elf_message_field.xml | 0 .../{ => GC_NMQ_D}/text/elf_message_ydan.xml | 0 .../text/nes_message_data_static.xml | 0 .../text/staff_message_data_static.xml | 0 .../{ => GC_NMQ_D}/textures/backgrounds.xml | 0 .../textures/do_action_static.xml | 0 .../textures/icon_item_24_static.xml | 0 .../textures/icon_item_dungeon_static.xml | 0 .../textures/icon_item_field_static.xml | 0 .../textures/icon_item_fra_static.xml | 0 .../textures/icon_item_gameover_static.xml | 0 .../textures/icon_item_ger_static.xml | 0 .../textures/icon_item_nes_static.xml | 0 .../textures/icon_item_static.xml | 0 .../textures/item_name_static.xml | 0 .../textures/map_48x85_static.xml | 0 .../textures/map_grand_static.xml | 0 .../{ => GC_NMQ_D}/textures/map_i_static.xml | 0 .../textures/map_name_static.xml | 0 .../textures/message_static.xml | 0 .../textures/message_texture_static.xml | 0 .../textures/nes_font_static.xml | 0 .../textures/nintendo_rogo_static.xml | 0 .../textures/parameter_static.xml | 0 .../textures/place_title_cards.xml | 0 .../xml/{ => GC_NMQ_D}/textures/skyboxes.xml | 0 .../{ => GC_NMQ_D}/textures/title_static.xml | 0 .../xml/GC_NMQ_PAL_F/code/fbdemo_circle.xml | 14 + .../xml/GC_NMQ_PAL_F/code/fbdemo_triforce.xml | 8 + .../xml/GC_NMQ_PAL_F/code/fbdemo_wipe1.xml | 10 + .../xml/GC_NMQ_PAL_F/misc/link_animetion.xml | 577 ++++++ .../objects/gameplay_dangeon_keep.xml | 52 + .../objects/gameplay_field_keep.xml | 62 + .../GC_NMQ_PAL_F/objects/gameplay_keep.xml | 960 ++++++++++ .../xml/GC_NMQ_PAL_F/objects/object_Bb.xml | 37 + .../xml/GC_NMQ_PAL_F/objects/object_ahg.xml | 59 + .../xml/GC_NMQ_PAL_F/objects/object_am.xml | 9 + .../xml/GC_NMQ_PAL_F/objects/object_ane.xml | 59 + .../xml/GC_NMQ_PAL_F/objects/object_ani.xml | 66 + .../GC_NMQ_PAL_F/objects/object_anubice.xml | 20 + .../xml/GC_NMQ_PAL_F/objects/object_aob.xml | 59 + .../GC_NMQ_PAL_F/objects/object_b_heart.xml | 8 + .../xml/GC_NMQ_PAL_F/objects/object_bba.xml | 45 + .../objects/object_bdan_objects.xml | 61 + .../xml/GC_NMQ_PAL_F/objects/object_bdoor.xml | 15 + .../xml/GC_NMQ_PAL_F/objects/object_bg.xml | 50 + .../GC_NMQ_PAL_F/objects/object_bigokuta.xml | 58 + .../xml/GC_NMQ_PAL_F/objects/object_bird.xml | 30 + .../xml/GC_NMQ_PAL_F/objects/object_bji.xml | 56 + .../xml/GC_NMQ_PAL_F/objects/object_bl.xml | 32 + .../GC_NMQ_PAL_F/objects/object_blkobj.xml | 15 + .../xml/GC_NMQ_PAL_F/objects/object_bob.xml | 47 + .../xml/GC_NMQ_PAL_F/objects/object_boj.xml | 62 + .../xml/GC_NMQ_PAL_F/objects/object_bombf.xml | 14 + .../GC_NMQ_PAL_F/objects/object_bombiwa.xml | 7 + .../xml/GC_NMQ_PAL_F/objects/object_bowl.xml | 18 + .../xml/GC_NMQ_PAL_F/objects/object_box.xml | 29 + .../xml/GC_NMQ_PAL_F/objects/object_brob.xml | 25 + .../GC_NMQ_PAL_F/objects/object_bubble.xml | 6 + .../xml/GC_NMQ_PAL_F/objects/object_bv.xml | 79 + .../xml/GC_NMQ_PAL_F/objects/object_bw.xml | 29 + .../xml/GC_NMQ_PAL_F/objects/object_bwall.xml | 7 + .../xml/GC_NMQ_PAL_F/objects/object_bxa.xml | 13 + .../xml/GC_NMQ_PAL_F/objects/object_cne.xml | 51 + .../xml/GC_NMQ_PAL_F/objects/object_cob.xml | 41 + .../xml/GC_NMQ_PAL_F/objects/object_cow.xml | 55 + .../xml/GC_NMQ_PAL_F/objects/object_crow.xml | 11 + .../xml/GC_NMQ_PAL_F/objects/object_cs.xml | 60 + .../objects/object_d_elevator.xml | 7 + .../GC_NMQ_PAL_F/objects/object_d_hsblock.xml | 10 + .../GC_NMQ_PAL_F/objects/object_d_lift.xml | 8 + .../xml/GC_NMQ_PAL_F/objects/object_daiku.xml | 60 + .../objects/object_ddan_objects.xml | 32 + .../GC_NMQ_PAL_F/objects/object_dekubaba.xml | 38 + .../GC_NMQ_PAL_F/objects/object_dekujr.xml | 13 + .../GC_NMQ_PAL_F/objects/object_dekunuts.xml | 32 + .../GC_NMQ_PAL_F/objects/object_demo_6k.xml | 13 + .../objects/object_demo_kekkai.xml | 41 + .../objects/object_demo_tre_lgt.xml | 6 + .../xml/GC_NMQ_PAL_F/objects/object_dh.xml | 59 + .../xml/GC_NMQ_PAL_F/objects/object_dnk.xml | 30 + .../xml/GC_NMQ_PAL_F/objects/object_dns.xml | 35 + .../GC_NMQ_PAL_F/objects/object_dodojr.xml | 33 + .../GC_NMQ_PAL_F/objects/object_dodongo.xml | 41 + .../xml/GC_NMQ_PAL_F/objects/object_dog.xml | 41 + .../objects/object_door_gerudo.xml | 7 + .../objects/object_door_killer.xml | 17 + .../xml/GC_NMQ_PAL_F/objects/object_ds.xml | 38 + .../xml/GC_NMQ_PAL_F/objects/object_ds2.xml | 34 + .../xml/GC_NMQ_PAL_F/objects/object_du.xml | 81 + .../GC_NMQ_PAL_F/objects/object_dy_obj.xml | 121 ++ .../xml/GC_NMQ_PAL_F/objects/object_ec.xml | 26 + .../objects/object_efc_crystal_light.xml | 6 + .../objects/object_efc_doughnut.xml | 8 + .../GC_NMQ_PAL_F/objects/object_efc_erupc.xml | 12 + .../objects/object_efc_fire_ball.xml | 7 + .../GC_NMQ_PAL_F/objects/object_efc_flash.xml | 6 + .../objects/object_efc_lgt_shower.xml | 6 + .../objects/object_efc_star_field.xml | 8 + .../GC_NMQ_PAL_F/objects/object_efc_tw.xml | 13 + .../xml/GC_NMQ_PAL_F/objects/object_ei.xml | 56 + .../xml/GC_NMQ_PAL_F/objects/object_fa.xml | 15 + .../xml/GC_NMQ_PAL_F/objects/object_fd.xml | 76 + .../xml/GC_NMQ_PAL_F/objects/object_fd2.xml | 41 + .../xml/GC_NMQ_PAL_F/objects/object_fhg.xml | 34 + .../xml/GC_NMQ_PAL_F/objects/object_fire.xml | 14 + .../GC_NMQ_PAL_F/objects/object_firefly.xml | 21 + .../xml/GC_NMQ_PAL_F/objects/object_fish.xml | 180 ++ .../xml/GC_NMQ_PAL_F/objects/object_fr.xml | 65 + .../xml/GC_NMQ_PAL_F/objects/object_fu.xml | 55 + .../xml/GC_NMQ_PAL_F/objects/object_fw.xml | 105 ++ .../xml/GC_NMQ_PAL_F/objects/object_fz.xml | 12 + .../xml/GC_NMQ_PAL_F/objects/object_ganon.xml | 96 + .../GC_NMQ_PAL_F/objects/object_ganon2.xml | 158 ++ .../objects/object_ganon_anime1.xml | 29 + .../objects/object_ganon_anime2.xml | 21 + .../objects/object_ganon_anime3.xml | 13 + .../objects/object_ganon_objects.xml | 6 + .../xml/GC_NMQ_PAL_F/objects/object_ge1.xml | 78 + .../xml/GC_NMQ_PAL_F/objects/object_geff.xml | 7 + .../xml/GC_NMQ_PAL_F/objects/object_geldb.xml | 28 + .../GC_NMQ_PAL_F/objects/object_gi_arrow.xml | 7 + .../objects/object_gi_arrowcase.xml | 12 + .../GC_NMQ_PAL_F/objects/object_gi_bean.xml | 5 + .../GC_NMQ_PAL_F/objects/object_gi_bomb_1.xml | 5 + .../GC_NMQ_PAL_F/objects/object_gi_bomb_2.xml | 5 + .../objects/object_gi_bombpouch.xml | 12 + .../objects/object_gi_boomerang.xml | 5 + .../objects/object_gi_boots_2.xml | 6 + .../objects/object_gi_bosskey.xml | 6 + .../GC_NMQ_PAL_F/objects/object_gi_bottle.xml | 6 + .../objects/object_gi_bottle_letter.xml | 6 + .../GC_NMQ_PAL_F/objects/object_gi_bow.xml | 5 + .../objects/object_gi_bracelet.xml | 5 + .../objects/object_gi_brokensword.xml | 5 + .../objects/object_gi_butterfly.xml | 6 + .../objects/object_gi_clothes.xml | 10 + .../GC_NMQ_PAL_F/objects/object_gi_coin.xml | 10 + .../objects/object_gi_compass.xml | 6 + .../objects/object_gi_dekupouch.xml | 11 + .../GC_NMQ_PAL_F/objects/object_gi_egg.xml | 6 + .../objects/object_gi_eye_lotion.xml | 6 + .../GC_NMQ_PAL_F/objects/object_gi_fire.xml | 6 + .../GC_NMQ_PAL_F/objects/object_gi_fish.xml | 5 + .../GC_NMQ_PAL_F/objects/object_gi_frog.xml | 6 + .../GC_NMQ_PAL_F/objects/object_gi_gerudo.xml | 5 + .../objects/object_gi_gerudomask.xml | 5 + .../GC_NMQ_PAL_F/objects/object_gi_ghost.xml | 9 + .../objects/object_gi_glasses.xml | 6 + .../GC_NMQ_PAL_F/objects/object_gi_gloves.xml | 10 + .../objects/object_gi_goddess.xml | 9 + .../objects/object_gi_golonmask.xml | 5 + .../GC_NMQ_PAL_F/objects/object_gi_grass.xml | 5 + .../GC_NMQ_PAL_F/objects/object_gi_hammer.xml | 5 + .../GC_NMQ_PAL_F/objects/object_gi_heart.xml | 5 + .../GC_NMQ_PAL_F/objects/object_gi_hearts.xml | 7 + .../objects/object_gi_hookshot.xml | 6 + .../objects/object_gi_hoverboots.xml | 5 + .../GC_NMQ_PAL_F/objects/object_gi_insect.xml | 6 + .../GC_NMQ_PAL_F/objects/object_gi_jewel.xml | 15 + .../GC_NMQ_PAL_F/objects/object_gi_key.xml | 5 + .../objects/object_gi_ki_tan_mask.xml | 6 + .../GC_NMQ_PAL_F/objects/object_gi_letter.xml | 6 + .../GC_NMQ_PAL_F/objects/object_gi_liquid.xml | 16 + .../objects/object_gi_longsword.xml | 5 + .../objects/object_gi_m_arrow.xml | 9 + .../objects/object_gi_magicpot.xml | 6 + .../GC_NMQ_PAL_F/objects/object_gi_map.xml | 6 + .../GC_NMQ_PAL_F/objects/object_gi_medal.xml | 11 + .../GC_NMQ_PAL_F/objects/object_gi_melody.xml | 11 + .../GC_NMQ_PAL_F/objects/object_gi_milk.xml | 6 + .../objects/object_gi_mushroom.xml | 5 + .../objects/object_gi_niwatori.xml | 8 + .../GC_NMQ_PAL_F/objects/object_gi_nuts.xml | 5 + .../objects/object_gi_ocarina.xml | 6 + .../objects/object_gi_ocarina_0.xml | 6 + .../objects/object_gi_pachinko.xml | 5 + .../GC_NMQ_PAL_F/objects/object_gi_powder.xml | 5 + .../objects/object_gi_prescription.xml | 6 + .../GC_NMQ_PAL_F/objects/object_gi_purse.xml | 16 + .../objects/object_gi_rabit_mask.xml | 6 + .../objects/object_gi_redead_mask.xml | 5 + .../GC_NMQ_PAL_F/objects/object_gi_rupy.xml | 16 + .../GC_NMQ_PAL_F/objects/object_gi_saw.xml | 5 + .../GC_NMQ_PAL_F/objects/object_gi_scale.xml | 10 + .../GC_NMQ_PAL_F/objects/object_gi_seed.xml | 5 + .../objects/object_gi_shield_1.xml | 5 + .../objects/object_gi_shield_2.xml | 5 + .../objects/object_gi_shield_3.xml | 6 + .../objects/object_gi_skj_mask.xml | 5 + .../objects/object_gi_soldout.xml | 5 + .../GC_NMQ_PAL_F/objects/object_gi_soul.xml | 7 + .../GC_NMQ_PAL_F/objects/object_gi_stick.xml | 5 + .../GC_NMQ_PAL_F/objects/object_gi_sutaru.xml | 6 + .../objects/object_gi_sword_1.xml | 5 + .../objects/object_gi_ticketstone.xml | 6 + .../objects/object_gi_truth_mask.xml | 6 + .../objects/object_gi_zoramask.xml | 5 + .../xml/GC_NMQ_PAL_F/objects/object_gj.xml | 35 + .../objects/object_gjyo_objects.xml | 7 + .../xml/GC_NMQ_PAL_F/objects/object_gla.xml | 85 + .../xml/GC_NMQ_PAL_F/objects/object_gm.xml | 5 + .../xml/GC_NMQ_PAL_F/objects/object_gnd.xml | 86 + .../GC_NMQ_PAL_F/objects/object_gnd_magic.xml | 7 + .../xml/GC_NMQ_PAL_F/objects/object_gndd.xml | 96 + .../GC_NMQ_PAL_F/objects/object_god_lgt.xml | 9 + .../xml/GC_NMQ_PAL_F/objects/object_gol.xml | 59 + .../xml/GC_NMQ_PAL_F/objects/object_goma.xml | 169 ++ .../GC_NMQ_PAL_F/objects/object_goroiwa.xml | 6 + .../xml/GC_NMQ_PAL_F/objects/object_gr.xml | 16 + .../xml/GC_NMQ_PAL_F/objects/object_gs.xml | 8 + .../xml/GC_NMQ_PAL_F/objects/object_gt.xml | 38 + .../xml/GC_NMQ_PAL_F/objects/object_haka.xml | 10 + .../GC_NMQ_PAL_F/objects/object_haka_door.xml | 12 + .../objects/object_haka_objects.xml | 85 + .../objects/object_hakach_objects.xml | 28 + .../xml/GC_NMQ_PAL_F/objects/object_hata.xml | 50 + .../objects/object_heavy_object.xml | 9 + .../objects/object_hidan_objects.xml | 89 + .../GC_NMQ_PAL_F/objects/object_hintnuts.xml | 23 + .../xml/GC_NMQ_PAL_F/objects/object_hni.xml | 51 + .../xml/GC_NMQ_PAL_F/objects/object_horse.xml | 67 + .../objects/object_horse_ganon.xml | 22 + .../objects/object_horse_link_child.xml | 21 + .../objects/object_horse_normal.xml | 26 + .../objects/object_horse_zelda.xml | 14 + .../xml/GC_NMQ_PAL_F/objects/object_hs.xml | 47 + .../xml/GC_NMQ_PAL_F/objects/object_human.xml | 213 +++ .../objects/object_ice_objects.xml | 26 + .../xml/GC_NMQ_PAL_F/objects/object_ik.xml | 104 ++ .../xml/GC_NMQ_PAL_F/objects/object_im.xml | 79 + .../xml/GC_NMQ_PAL_F/objects/object_in.xml | 142 ++ .../GC_NMQ_PAL_F/objects/object_ingate.xml | 7 + .../xml/GC_NMQ_PAL_F/objects/object_jj.xml | 77 + .../xml/GC_NMQ_PAL_F/objects/object_js.xml | 55 + .../GC_NMQ_PAL_F/objects/object_jya_door.xml | 8 + .../GC_NMQ_PAL_F/objects/object_jya_iron.xml | 13 + .../GC_NMQ_PAL_F/objects/object_jya_obj.xml | 80 + .../xml/GC_NMQ_PAL_F/objects/object_ka.xml | 64 + .../GC_NMQ_PAL_F/objects/object_kanban.xml | 18 + .../GC_NMQ_PAL_F/objects/object_kibako2.xml | 19 + .../objects/object_kingdodongo.xml | 130 ++ .../xml/GC_NMQ_PAL_F/objects/object_km1.xml | 39 + .../xml/GC_NMQ_PAL_F/objects/object_kusa.xml | 6 + .../xml/GC_NMQ_PAL_F/objects/object_kw1.xml | 63 + .../xml/GC_NMQ_PAL_F/objects/object_kz.xml | 45 + .../objects/object_light_ring.xml | 6 + .../GC_NMQ_PAL_F/objects/object_lightbox.xml | 15 + .../objects/object_lightswitch.xml | 14 + .../GC_NMQ_PAL_F/objects/object_link_boy.xml | 271 +++ .../objects/object_link_child.xml | 225 +++ .../xml/GC_NMQ_PAL_F/objects/object_ma1.xml | 67 + .../xml/GC_NMQ_PAL_F/objects/object_ma2.xml | 75 + .../xml/GC_NMQ_PAL_F/objects/object_mag.xml | 21 + .../GC_NMQ_PAL_F/objects/object_mamenoki.xml | 15 + .../objects/object_mastergolon.xml | 5 + .../objects/object_masterkokiri.xml | 5 + .../objects/object_masterkokirihead.xml | 14 + .../objects/object_masterzoora.xml | 5 + .../xml/GC_NMQ_PAL_F/objects/object_mb.xml | 59 + .../xml/GC_NMQ_PAL_F/objects/object_md.xml | 87 + .../xml/GC_NMQ_PAL_F/objects/object_medal.xml | 17 + .../objects/object_menkuri_objects.xml | 18 + .../GC_NMQ_PAL_F/objects/object_mir_ray.xml | 13 + .../objects/object_mizu_objects.xml | 41 + .../xml/GC_NMQ_PAL_F/objects/object_mjin.xml | 8 + .../GC_NMQ_PAL_F/objects/object_mjin_dark.xml | 5 + .../objects/object_mjin_flame.xml | 5 + .../objects/object_mjin_flash.xml | 5 + .../GC_NMQ_PAL_F/objects/object_mjin_ice.xml | 5 + .../GC_NMQ_PAL_F/objects/object_mjin_oka.xml | 8 + .../GC_NMQ_PAL_F/objects/object_mjin_soul.xml | 5 + .../GC_NMQ_PAL_F/objects/object_mjin_wind.xml | 5 + .../xml/GC_NMQ_PAL_F/objects/object_mk.xml | 44 + .../xml/GC_NMQ_PAL_F/objects/object_mm.xml | 16 + .../xml/GC_NMQ_PAL_F/objects/object_mo.xml | 82 + .../objects/object_mori_hineri1.xml | 7 + .../objects/object_mori_hineri1a.xml | 7 + .../objects/object_mori_hineri2.xml | 7 + .../objects/object_mori_hineri2a.xml | 7 + .../objects/object_mori_objects.xml | 25 + .../GC_NMQ_PAL_F/objects/object_mori_tex.xml | 30 + .../xml/GC_NMQ_PAL_F/objects/object_ms.xml | 43 + .../xml/GC_NMQ_PAL_F/objects/object_mu.xml | 96 + .../xml/GC_NMQ_PAL_F/objects/object_nb.xml | 118 ++ .../xml/GC_NMQ_PAL_F/objects/object_niw.xml | 49 + .../xml/GC_NMQ_PAL_F/objects/object_nwc.xml | 15 + .../xml/GC_NMQ_PAL_F/objects/object_ny.xml | 10 + .../xml/GC_NMQ_PAL_F/objects/object_oA1.xml | 69 + .../xml/GC_NMQ_PAL_F/objects/object_oA10.xml | 66 + .../xml/GC_NMQ_PAL_F/objects/object_oA11.xml | 66 + .../xml/GC_NMQ_PAL_F/objects/object_oA2.xml | 58 + .../xml/GC_NMQ_PAL_F/objects/object_oA3.xml | 11 + .../xml/GC_NMQ_PAL_F/objects/object_oA4.xml | 64 + .../xml/GC_NMQ_PAL_F/objects/object_oA5.xml | 64 + .../xml/GC_NMQ_PAL_F/objects/object_oA6.xml | 64 + .../xml/GC_NMQ_PAL_F/objects/object_oA7.xml | 62 + .../xml/GC_NMQ_PAL_F/objects/object_oA8.xml | 61 + .../xml/GC_NMQ_PAL_F/objects/object_oA9.xml | 7 + .../xml/GC_NMQ_PAL_F/objects/object_oB1.xml | 69 + .../xml/GC_NMQ_PAL_F/objects/object_oB2.xml | 76 + .../xml/GC_NMQ_PAL_F/objects/object_oB3.xml | 70 + .../xml/GC_NMQ_PAL_F/objects/object_oB4.xml | 64 + .../xml/GC_NMQ_PAL_F/objects/object_oE1.xml | 70 + .../xml/GC_NMQ_PAL_F/objects/object_oE10.xml | 15 + .../xml/GC_NMQ_PAL_F/objects/object_oE11.xml | 15 + .../xml/GC_NMQ_PAL_F/objects/object_oE12.xml | 15 + .../xml/GC_NMQ_PAL_F/objects/object_oE1s.xml | 50 + .../xml/GC_NMQ_PAL_F/objects/object_oE2.xml | 71 + .../xml/GC_NMQ_PAL_F/objects/object_oE3.xml | 73 + .../xml/GC_NMQ_PAL_F/objects/object_oE4.xml | 69 + .../xml/GC_NMQ_PAL_F/objects/object_oE4s.xml | 46 + .../xml/GC_NMQ_PAL_F/objects/object_oE5.xml | 64 + .../xml/GC_NMQ_PAL_F/objects/object_oE6.xml | 15 + .../xml/GC_NMQ_PAL_F/objects/object_oE7.xml | 14 + .../xml/GC_NMQ_PAL_F/objects/object_oE8.xml | 15 + .../xml/GC_NMQ_PAL_F/objects/object_oE9.xml | 15 + .../GC_NMQ_PAL_F/objects/object_oE_anime.xml | 10 + .../GC_NMQ_PAL_F/objects/object_oF1d_map.xml | 35 + .../xml/GC_NMQ_PAL_F/objects/object_oF1s.xml | 69 + .../GC_NMQ_PAL_F/objects/object_o_anime.xml | 11 + .../xml/GC_NMQ_PAL_F/objects/object_okuta.xml | 29 + .../objects/object_opening_demo1.xml | 11 + .../xml/GC_NMQ_PAL_F/objects/object_os.xml | 36 + .../GC_NMQ_PAL_F/objects/object_os_anime.xml | 69 + .../xml/GC_NMQ_PAL_F/objects/object_ossan.xml | 13 + .../GC_NMQ_PAL_F/objects/object_ouke_haka.xml | 6 + .../xml/GC_NMQ_PAL_F/objects/object_owl.xml | 65 + .../GC_NMQ_PAL_F/objects/object_peehat.xml | 53 + .../objects/object_po_composer.xml | 17 + .../GC_NMQ_PAL_F/objects/object_po_field.xml | 20 + .../objects/object_po_sisters.xml | 28 + .../xml/GC_NMQ_PAL_F/objects/object_poh.xml | 14 + .../xml/GC_NMQ_PAL_F/objects/object_ps.xml | 19 + .../GC_NMQ_PAL_F/objects/object_pu_box.xml | 13 + .../xml/GC_NMQ_PAL_F/objects/object_rd.xml | 106 ++ .../xml/GC_NMQ_PAL_F/objects/object_reeba.xml | 27 + .../objects/object_relay_objects.xml | 19 + .../xml/GC_NMQ_PAL_F/objects/object_rl.xml | 50 + .../xml/GC_NMQ_PAL_F/objects/object_rr.xml | 8 + .../xml/GC_NMQ_PAL_F/objects/object_rs.xml | 32 + .../xml/GC_NMQ_PAL_F/objects/object_ru1.xml | 83 + .../xml/GC_NMQ_PAL_F/objects/object_ru2.xml | 90 + .../xml/GC_NMQ_PAL_F/objects/object_sa.xml | 99 + .../xml/GC_NMQ_PAL_F/objects/object_sb.xml | 30 + .../xml/GC_NMQ_PAL_F/objects/object_sd.xml | 70 + .../objects/object_shop_dungen.xml | 10 + .../GC_NMQ_PAL_F/objects/object_shopnuts.xml | 67 + .../GC_NMQ_PAL_F/objects/object_siofuki.xml | 7 + .../xml/GC_NMQ_PAL_F/objects/object_sk2.xml | 130 ++ .../xml/GC_NMQ_PAL_F/objects/object_skb.xml | 64 + .../xml/GC_NMQ_PAL_F/objects/object_skj.xml | 69 + .../objects/object_spot00_break.xml | 13 + .../objects/object_spot00_objects.xml | 14 + .../objects/object_spot01_matoya.xml | 30 + .../objects/object_spot01_matoyab.xml | 18 + .../objects/object_spot01_objects.xml | 16 + .../objects/object_spot01_objects2.xml | 6 + .../objects/object_spot02_objects.xml | 44 + .../objects/object_spot03_object.xml | 16 + .../objects/object_spot04_objects.xml | 10 + .../objects/object_spot05_objects.xml | 10 + .../objects/object_spot06_objects.xml | 24 + .../objects/object_spot07_object.xml | 23 + .../objects/object_spot08_obj.xml | 27 + .../objects/object_spot09_obj.xml | 14 + .../objects/object_spot11_obj.xml | 9 + .../objects/object_spot12_obj.xml | 13 + .../objects/object_spot15_obj.xml | 13 + .../objects/object_spot16_obj.xml | 11 + .../objects/object_spot17_obj.xml | 12 + .../objects/object_spot18_obj.xml | 36 + .../xml/GC_NMQ_PAL_F/objects/object_ssh.xml | 61 + .../xml/GC_NMQ_PAL_F/objects/object_sst.xml | 55 + .../xml/GC_NMQ_PAL_F/objects/object_st.xml | 71 + .../GC_NMQ_PAL_F/objects/object_stream.xml | 6 + .../GC_NMQ_PAL_F/objects/object_syokudai.xml | 13 + .../xml/GC_NMQ_PAL_F/objects/object_ta.xml | 72 + .../GC_NMQ_PAL_F/objects/object_timeblock.xml | 7 + .../xml/GC_NMQ_PAL_F/objects/object_tite.xml | 55 + .../xml/GC_NMQ_PAL_F/objects/object_tk.xml | 18 + .../objects/object_toki_objects.xml | 25 + .../GC_NMQ_PAL_F/objects/object_torch2.xml | 11 + .../xml/GC_NMQ_PAL_F/objects/object_toryo.xml | 53 + .../xml/GC_NMQ_PAL_F/objects/object_tp.xml | 17 + .../xml/GC_NMQ_PAL_F/objects/object_tr.xml | 149 ++ .../xml/GC_NMQ_PAL_F/objects/object_trap.xml | 11 + .../objects/object_triforce_spot.xml | 14 + .../xml/GC_NMQ_PAL_F/objects/object_ts.xml | 34 + .../xml/GC_NMQ_PAL_F/objects/object_tsubo.xml | 9 + .../xml/GC_NMQ_PAL_F/objects/object_tw.xml | 332 ++++ .../GC_NMQ_PAL_F/objects/object_umajump.xml | 8 + .../xml/GC_NMQ_PAL_F/objects/object_vali.xml | 63 + .../xml/GC_NMQ_PAL_F/objects/object_vase.xml | 7 + .../xml/GC_NMQ_PAL_F/objects/object_vm.xml | 41 + .../objects/object_wallmaster.xml | 35 + .../xml/GC_NMQ_PAL_F/objects/object_warp1.xml | 39 + .../xml/GC_NMQ_PAL_F/objects/object_warp2.xml | 6 + .../xml/GC_NMQ_PAL_F/objects/object_wf.xml | 128 ++ .../GC_NMQ_PAL_F/objects/object_wood02.xml | 35 + .../xml/GC_NMQ_PAL_F/objects/object_xc.xml | 32 + .../objects/object_yabusame_point.xml | 8 + .../objects/object_ydan_objects.xml | 34 + .../GC_NMQ_PAL_F/objects/object_yukabyun.xml | 9 + .../xml/GC_NMQ_PAL_F/objects/object_zf.xml | 182 ++ .../xml/GC_NMQ_PAL_F/objects/object_zg.xml | 8 + .../xml/GC_NMQ_PAL_F/objects/object_zl1.xml | 114 ++ .../xml/GC_NMQ_PAL_F/objects/object_zl2.xml | 42 + .../objects/object_zl2_anime1.xml | 30 + .../objects/object_zl2_anime2.xml | 40 + .../xml/GC_NMQ_PAL_F/objects/object_zl4.xml | 60 + .../xml/GC_NMQ_PAL_F/objects/object_zo.xml | 88 + .../GC_NMQ_PAL_F/overlays/ovl_Arrow_Fire.xml | 11 + .../GC_NMQ_PAL_F/overlays/ovl_Arrow_Ice.xml | 11 + .../GC_NMQ_PAL_F/overlays/ovl_Arrow_Light.xml | 11 + .../overlays/ovl_Bg_Ganon_Otyuka.xml | 29 + .../overlays/ovl_Bg_Jya_Cobra.xml | 10 + .../overlays/ovl_Boss_Dodongo.xml | 6 + .../GC_NMQ_PAL_F/overlays/ovl_Boss_Ganon.xml | 52 + .../GC_NMQ_PAL_F/overlays/ovl_Boss_Ganon2.xml | 76 + .../GC_NMQ_PAL_F/overlays/ovl_Boss_Sst.xml | 8 + .../GC_NMQ_PAL_F/overlays/ovl_Demo_Shd.xml | 8 + .../xml/GC_NMQ_PAL_F/overlays/ovl_En_Bili.xml | 7 + .../overlays/ovl_En_Clear_Tag.xml | 14 + .../overlays/ovl_En_Ganon_Mant.xml | 22 + .../overlays/ovl_En_Ganon_Organ.xml | 19 + .../xml/GC_NMQ_PAL_F/overlays/ovl_En_Holl.xml | 8 + .../GC_NMQ_PAL_F/overlays/ovl_En_Jsjutan.xml | 38 + .../GC_NMQ_PAL_F/overlays/ovl_En_Kanban.xml | 8 + .../xml/GC_NMQ_PAL_F/overlays/ovl_En_Sda.xml | 9 + .../xml/GC_NMQ_PAL_F/overlays/ovl_En_Ssh.xml | 8 + .../xml/GC_NMQ_PAL_F/overlays/ovl_En_St.xml | 8 + .../xml/GC_NMQ_PAL_F/overlays/ovl_En_Sth.xml | 15 + .../GC_NMQ_PAL_F/overlays/ovl_End_Title.xml | 17 + .../GC_NMQ_PAL_F/overlays/ovl_File_Choose.xml | 28 + .../GC_NMQ_PAL_F/overlays/ovl_Magic_Dark.xml | 12 + .../GC_NMQ_PAL_F/overlays/ovl_Magic_Fire.xml | 10 + .../GC_NMQ_PAL_F/overlays/ovl_Magic_Wind.xml | 15 + .../GC_NMQ_PAL_F/overlays/ovl_Oceff_Spot.xml | 10 + .../GC_NMQ_PAL_F/overlays/ovl_Oceff_Storm.xml | 11 + .../GC_NMQ_PAL_F/overlays/ovl_Oceff_Wipe.xml | 10 + .../GC_NMQ_PAL_F/overlays/ovl_Oceff_Wipe2.xml | 11 + .../GC_NMQ_PAL_F/overlays/ovl_Oceff_Wipe3.xml | 10 + .../GC_NMQ_PAL_F/overlays/ovl_Oceff_Wipe4.xml | 11 + .../GC_NMQ_PAL_F/scenes/dungeons/Bmori1.xml | 76 + .../GC_NMQ_PAL_F/scenes/dungeons/FIRE_bs.xml | 11 + .../GC_NMQ_PAL_F/scenes/dungeons/HAKAdan.xml | 74 + .../scenes/dungeons/HAKAdanCH.xml | 26 + .../scenes/dungeons/HAKAdan_bs.xml | 11 + .../GC_NMQ_PAL_F/scenes/dungeons/HIDAN.xml | 87 + .../GC_NMQ_PAL_F/scenes/dungeons/MIZUsin.xml | 77 + .../scenes/dungeons/MIZUsin_bs.xml | 11 + .../xml/GC_NMQ_PAL_F/scenes/dungeons/bdan.xml | 54 + .../scenes/dungeons/bdan_boss.xml | 11 + .../xml/GC_NMQ_PAL_F/scenes/dungeons/ddan.xml | 70 + .../scenes/dungeons/ddan_boss.xml | 12 + .../GC_NMQ_PAL_F/scenes/dungeons/ganon.xml | 35 + .../scenes/dungeons/ganon_boss.xml | 8 + .../scenes/dungeons/ganon_demo.xml | 8 + .../scenes/dungeons/ganon_final.xml | 9 + .../scenes/dungeons/ganon_sonogo.xml | 21 + .../scenes/dungeons/ganon_tou.xml | 10 + .../scenes/dungeons/ganontika.xml | 82 + .../scenes/dungeons/ganontikasonogo.xml | 12 + .../scenes/dungeons/gerudoway.xml | 26 + .../scenes/dungeons/ice_doukutu.xml | 44 + .../scenes/dungeons/jyasinboss.xml | 19 + .../scenes/dungeons/jyasinzou.xml | 95 + .../xml/GC_NMQ_PAL_F/scenes/dungeons/men.xml | 43 + .../scenes/dungeons/moribossroom.xml | 11 + .../xml/GC_NMQ_PAL_F/scenes/dungeons/ydan.xml | 45 + .../scenes/dungeons/ydan_boss.xml | 11 + .../GC_NMQ_PAL_F/scenes/indoors/bowling.xml | 8 + .../scenes/indoors/daiyousei_izumi.xml | 11 + .../scenes/indoors/hairal_niwa.xml | 10 + .../scenes/indoors/hairal_niwa_n.xml | 8 + .../scenes/indoors/hakasitarelay.xml | 27 + .../xml/GC_NMQ_PAL_F/scenes/indoors/hut.xml | 8 + .../scenes/indoors/hylia_labo.xml | 8 + .../xml/GC_NMQ_PAL_F/scenes/indoors/impa.xml | 8 + .../GC_NMQ_PAL_F/scenes/indoors/kakariko.xml | 8 + .../scenes/indoors/kenjyanoma.xml | 8 + .../scenes/indoors/kokiri_home.xml | 8 + .../scenes/indoors/kokiri_home3.xml | 8 + .../scenes/indoors/kokiri_home4.xml | 8 + .../scenes/indoors/kokiri_home5.xml | 8 + .../xml/GC_NMQ_PAL_F/scenes/indoors/labo.xml | 8 + .../GC_NMQ_PAL_F/scenes/indoors/link_home.xml | 8 + .../GC_NMQ_PAL_F/scenes/indoors/mahouya.xml | 8 + .../scenes/indoors/malon_stable.xml | 8 + .../scenes/indoors/miharigoya.xml | 14 + .../GC_NMQ_PAL_F/scenes/indoors/nakaniwa.xml | 13 + .../scenes/indoors/syatekijyou.xml | 8 + .../GC_NMQ_PAL_F/scenes/indoors/takaraya.xml | 26 + .../xml/GC_NMQ_PAL_F/scenes/indoors/tent.xml | 8 + .../GC_NMQ_PAL_F/scenes/indoors/tokinoma.xml | 14 + .../scenes/indoors/yousei_izumi_tate.xml | 8 + .../scenes/indoors/yousei_izumi_yoko.xml | 11 + .../xml/GC_NMQ_PAL_F/scenes/misc/enrui.xml | 8 + .../xml/GC_NMQ_PAL_F/scenes/misc/entra_n.xml | 8 + .../xml/GC_NMQ_PAL_F/scenes/misc/hakaana.xml | 8 + .../xml/GC_NMQ_PAL_F/scenes/misc/hakaana2.xml | 8 + .../GC_NMQ_PAL_F/scenes/misc/hakaana_ouke.xml | 16 + .../GC_NMQ_PAL_F/scenes/misc/hiral_demo.xml | 8 + .../GC_NMQ_PAL_F/scenes/misc/kakariko3.xml | 8 + .../GC_NMQ_PAL_F/scenes/misc/kakusiana.xml | 47 + .../xml/GC_NMQ_PAL_F/scenes/misc/kinsuta.xml | 10 + .../GC_NMQ_PAL_F/scenes/misc/market_alley.xml | 8 + .../scenes/misc/market_alley_n.xml | 9 + .../GC_NMQ_PAL_F/scenes/misc/market_day.xml | 9 + .../GC_NMQ_PAL_F/scenes/misc/market_night.xml | 9 + .../GC_NMQ_PAL_F/scenes/misc/market_ruins.xml | 8 + .../xml/GC_NMQ_PAL_F/scenes/misc/shrine.xml | 8 + .../xml/GC_NMQ_PAL_F/scenes/misc/shrine_n.xml | 9 + .../xml/GC_NMQ_PAL_F/scenes/misc/shrine_r.xml | 8 + .../xml/GC_NMQ_PAL_F/scenes/misc/turibori.xml | 8 + .../GC_NMQ_PAL_F/scenes/overworld/entra.xml | 8 + .../GC_NMQ_PAL_F/scenes/overworld/souko.xml | 16 + .../GC_NMQ_PAL_F/scenes/overworld/spot00.xml | 18 + .../GC_NMQ_PAL_F/scenes/overworld/spot01.xml | 13 + .../GC_NMQ_PAL_F/scenes/overworld/spot02.xml | 17 + .../GC_NMQ_PAL_F/scenes/overworld/spot03.xml | 15 + .../GC_NMQ_PAL_F/scenes/overworld/spot04.xml | 21 + .../GC_NMQ_PAL_F/scenes/overworld/spot05.xml | 16 + .../GC_NMQ_PAL_F/scenes/overworld/spot06.xml | 15 + .../GC_NMQ_PAL_F/scenes/overworld/spot07.xml | 15 + .../GC_NMQ_PAL_F/scenes/overworld/spot08.xml | 9 + .../GC_NMQ_PAL_F/scenes/overworld/spot09.xml | 16 + .../GC_NMQ_PAL_F/scenes/overworld/spot10.xml | 36 + .../GC_NMQ_PAL_F/scenes/overworld/spot11.xml | 9 + .../GC_NMQ_PAL_F/scenes/overworld/spot12.xml | 15 + .../GC_NMQ_PAL_F/scenes/overworld/spot13.xml | 11 + .../GC_NMQ_PAL_F/scenes/overworld/spot15.xml | 9 + .../GC_NMQ_PAL_F/scenes/overworld/spot16.xml | 14 + .../GC_NMQ_PAL_F/scenes/overworld/spot17.xml | 13 + .../GC_NMQ_PAL_F/scenes/overworld/spot18.xml | 23 + .../GC_NMQ_PAL_F/scenes/overworld/spot20.xml | 14 + .../GC_NMQ_PAL_F/scenes/shops/alley_shop.xml | 8 + .../xml/GC_NMQ_PAL_F/scenes/shops/drag.xml | 8 + .../GC_NMQ_PAL_F/scenes/shops/face_shop.xml | 8 + .../xml/GC_NMQ_PAL_F/scenes/shops/golon.xml | 8 + .../GC_NMQ_PAL_F/scenes/shops/kokiri_shop.xml | 8 + .../GC_NMQ_PAL_F/scenes/shops/night_shop.xml | 8 + .../xml/GC_NMQ_PAL_F/scenes/shops/shop1.xml | 8 + .../xml/GC_NMQ_PAL_F/scenes/shops/zoora.xml | 8 + .../GC_NMQ_PAL_F/text/elf_message_field.xml | 5 + .../GC_NMQ_PAL_F/text/elf_message_ydan.xml | 5 + .../text/nes_message_data_static.xml | 5 + .../text/staff_message_data_static.xml | 5 + .../xml/GC_NMQ_PAL_F/textures/backgrounds.xml | 246 +++ .../textures/do_action_static.xml | 91 + .../textures/icon_item_24_static.xml | 24 + .../textures/icon_item_dungeon_static.xml | 23 + .../textures/icon_item_field_static.xml | 32 + .../textures/icon_item_fra_static.xml | 37 + .../textures/icon_item_gameover_static.xml | 11 + .../textures/icon_item_ger_static.xml | 36 + .../textures/icon_item_nes_static.xml | 35 + .../textures/icon_item_static.xml | 190 ++ .../textures/item_name_static.xml | 373 ++++ .../textures/map_48x85_static.xml | 72 + .../textures/map_grand_static.xml | 28 + .../GC_NMQ_PAL_F/textures/map_i_static.xml | 243 +++ .../GC_NMQ_PAL_F/textures/map_name_static.xml | 106 ++ .../GC_NMQ_PAL_F/textures/message_static.xml | 11 + .../textures/message_texture_static.xml | 6 + .../GC_NMQ_PAL_F/textures/nes_font_static.xml | 145 ++ .../textures/nintendo_rogo_static.xml | 8 + .../textures/parameter_static.xml | 60 + .../textures/place_title_cards.xml | 287 +++ .../xml/GC_NMQ_PAL_F/textures/skyboxes.xml | 113 ++ .../GC_NMQ_PAL_F/textures/title_static.xml | 194 ++ soh/build.c | 4 +- soh/soh.vcxproj | 2 +- soh/soh/OTRGlobals.cpp | 15 + soh/soh/OTRGlobals.h | 1 + soh/soh/z_play_otr.cpp | 10 + soh/src/code/z_play.c | 20 - soh/src/code/z_player_lib.c | 2 + soh/src/code/z_vr_box.c | 5 +- .../overlays/actors/ovl_Elf_Msg/z_elf_msg.c | 11 +- .../overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c | 4 + .../overlays/gamestates/ovl_title/z_title.c | 38 + .../ovl_kaleido_scope/z_kaleido_scope_PAL.c | 31 - 1203 files changed, 30620 insertions(+), 501 deletions(-) create mode 100644 OTRExporter/CFG/filelists/dbg.txt create mode 100644 OTRExporter/CFG/filelists/gamecube.txt create mode 100644 OTRExporter/CFG/filelists/gamecube_pal.txt create mode 100644 OTRExporter/extract_baserom_debug.py create mode 100644 OTRExporter/extract_baserom_gc.py rename OTRGui/assets/extractor/{Config.xml => Config_GC_MQ_D.xml} (83%) create mode 100644 OTRGui/assets/extractor/Config_GC_NMQ_D.xml create mode 100644 OTRGui/assets/extractor/Config_GC_NMQ_PAL_F.xml create mode 100644 OTRGui/assets/extractor/filelists/gamecube_pal.txt create mode 100644 ZAPDTR/ZAPD/FileWorker.cpp create mode 100644 ZAPDTR/ZAPD/FileWorker.h create mode 100644 ZAPDTR/ZAPD/ZRom.cpp create mode 100644 ZAPDTR/ZAPD/ZRom.h create mode 100644 ZAPDTR/ZAPD/ctpl_stl.h create mode 100644 ZAPDTR/ZAPD/yaz0/readwrite.h create mode 100644 ZAPDTR/ZAPD/yaz0/yaz0.cpp create mode 100644 ZAPDTR/ZAPD/yaz0/yaz0.h create mode 100644 libultraship/libultraship/GameVersions.h rename soh/assets/xml/{ => GC_NMQ_D}/code/fbdemo_circle.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/code/fbdemo_triforce.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/code/fbdemo_wipe1.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/misc/link_animetion.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/gameplay_dangeon_keep.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/gameplay_field_keep.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/gameplay_keep.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_Bb.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ahg.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_am.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ane.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ani.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_anubice.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_aob.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_b_heart.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_bba.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_bdan_objects.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_bdoor.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_bg.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_bigokuta.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_bird.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_bji.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_bl.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_blkobj.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_bob.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_boj.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_bombf.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_bombiwa.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_bowl.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_box.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_brob.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_bubble.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_bv.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_bw.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_bwall.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_bxa.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_cne.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_cob.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_cow.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_crow.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_cs.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_d_elevator.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_d_hsblock.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_d_lift.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_daiku.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ddan_objects.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_dekubaba.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_dekujr.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_dekunuts.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_demo_6k.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_demo_kekkai.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_demo_tre_lgt.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_dh.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_dnk.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_dns.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_dodojr.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_dodongo.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_dog.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_door_gerudo.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_door_killer.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ds.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ds2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_du.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_dy_obj.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ec.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_efc_crystal_light.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_efc_doughnut.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_efc_erupc.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_efc_fire_ball.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_efc_flash.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_efc_lgt_shower.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_efc_star_field.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_efc_tw.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ei.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_fa.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_fd.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_fd2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_fhg.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_fire.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_firefly.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_fish.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_fr.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_fu.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_fw.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_fz.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ganon.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ganon2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ganon_anime1.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ganon_anime2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ganon_anime3.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ganon_objects.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ge1.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_geff.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_geldb.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_arrow.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_arrowcase.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_bean.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_bomb_1.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_bomb_2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_bombpouch.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_boomerang.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_boots_2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_bosskey.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_bottle.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_bottle_letter.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_bow.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_bracelet.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_brokensword.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_butterfly.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_clothes.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_coin.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_compass.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_dekupouch.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_egg.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_eye_lotion.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_fire.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_fish.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_frog.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_gerudo.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_gerudomask.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_ghost.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_glasses.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_gloves.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_goddess.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_golonmask.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_grass.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_hammer.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_heart.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_hearts.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_hookshot.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_hoverboots.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_insect.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_jewel.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_key.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_ki_tan_mask.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_letter.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_liquid.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_longsword.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_m_arrow.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_magicpot.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_map.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_medal.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_melody.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_milk.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_mushroom.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_niwatori.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_nuts.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_ocarina.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_ocarina_0.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_pachinko.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_powder.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_prescription.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_purse.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_rabit_mask.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_redead_mask.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_rupy.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_saw.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_scale.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_seed.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_shield_1.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_shield_2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_shield_3.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_skj_mask.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_soldout.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_soul.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_stick.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_sutaru.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_sword_1.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_ticketstone.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_truth_mask.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gi_zoramask.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gj.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gjyo_objects.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gla.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gm.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gnd.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gnd_magic.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gndd.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_god_lgt.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gol.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_goma.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_goroiwa.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gr.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gs.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_gt.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_haka.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_haka_door.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_haka_objects.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_hakach_objects.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_hata.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_heavy_object.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_hidan_objects.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_hintnuts.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_hni.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_horse.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_horse_ganon.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_horse_link_child.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_horse_normal.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_horse_zelda.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_hs.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_human.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ice_objects.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ik.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_im.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_in.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ingate.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_jj.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_js.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_jya_door.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_jya_iron.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_jya_obj.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ka.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_kanban.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_kibako2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_kingdodongo.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_km1.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_kusa.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_kw1.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_kz.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_light_ring.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_lightbox.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_lightswitch.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_link_boy.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_link_child.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ma1.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ma2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mag.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mamenoki.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mastergolon.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_masterkokiri.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_masterkokirihead.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_masterzoora.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mb.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_md.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_medal.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_menkuri_objects.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mir_ray.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mizu_objects.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mjin.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mjin_dark.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mjin_flame.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mjin_flash.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mjin_ice.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mjin_oka.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mjin_soul.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mjin_wind.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mk.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mm.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mo.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mori_hineri1.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mori_hineri1a.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mori_hineri2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mori_hineri2a.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mori_objects.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mori_tex.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ms.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_mu.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_nb.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_niw.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_nwc.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ny.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oA1.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oA10.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oA11.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oA2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oA3.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oA4.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oA5.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oA6.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oA7.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oA8.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oA9.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oB1.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oB2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oB3.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oB4.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oE1.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oE10.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oE11.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oE12.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oE1s.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oE2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oE3.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oE4.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oE4s.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oE5.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oE6.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oE7.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oE8.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oE9.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oE_anime.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oF1d_map.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_oF1s.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_o_anime.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_okuta.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_opening_demo1.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_os.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_os_anime.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ossan.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ouke_haka.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_owl.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_peehat.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_po_composer.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_po_field.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_po_sisters.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_poh.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ps.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_pu_box.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_rd.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_reeba.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_relay_objects.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_rl.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_rr.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_rs.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ru1.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ru2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_sa.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_sb.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_sd.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_shop_dungen.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_shopnuts.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_siofuki.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_sk2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_skb.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_skj.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_spot00_break.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_spot00_objects.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_spot01_matoya.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_spot01_matoyab.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_spot01_objects.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_spot01_objects2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_spot02_objects.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_spot03_object.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_spot04_objects.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_spot05_objects.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_spot06_objects.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_spot07_object.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_spot08_obj.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_spot09_obj.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_spot11_obj.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_spot12_obj.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_spot15_obj.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_spot16_obj.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_spot17_obj.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_spot18_obj.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ssh.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_sst.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_st.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_stream.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_syokudai.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ta.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_timeblock.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_tite.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_tk.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_toki_objects.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_torch2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_toryo.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_tp.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_tr.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_trap.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_triforce_spot.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ts.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_tsubo.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_tw.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_umajump.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_vali.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_vase.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_vm.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_wallmaster.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_warp1.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_warp2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_wf.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_wood02.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_xc.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_yabusame_point.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_ydan_objects.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_yukabyun.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_zf.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_zg.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_zl1.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_zl2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_zl2_anime1.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_zl2_anime2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_zl4.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/objects/object_zo.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Arrow_Fire.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Arrow_Ice.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Arrow_Light.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Bg_Ganon_Otyuka.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Bg_Jya_Cobra.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Boss_Dodongo.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Boss_Ganon.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Boss_Ganon2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Boss_Sst.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Demo_Shd.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Elf_Msg.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Elf_Msg2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_En_Bili.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_En_Clear_Tag.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_En_Ganon_Mant.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_En_Ganon_Organ.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_En_Holl.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_En_Jsjutan.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_En_Kanban.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_En_Sda.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_En_Ssh.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_En_St.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_En_Sth.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_End_Title.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_File_Choose.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Magic_Dark.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Magic_Fire.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Magic_Wind.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Oceff_Spot.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Oceff_Storm.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Oceff_Wipe.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Oceff_Wipe2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Oceff_Wipe3.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/overlays/ovl_Oceff_Wipe4.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/Bmori1.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/FIRE_bs.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/HAKAdan.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/HAKAdanCH.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/HAKAdan_bs.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/HIDAN.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/MIZUsin.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/MIZUsin_bs.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/bdan.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/bdan_boss.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/ddan.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/ddan_boss.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/ganon.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/ganon_boss.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/ganon_demo.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/ganon_final.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/ganon_sonogo.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/ganon_tou.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/ganontika.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/ganontikasonogo.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/gerudoway.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/ice_doukutu.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/jyasinboss.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/jyasinzou.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/men.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/moribossroom.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/ydan.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/dungeons/ydan_boss.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/bowling.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/daiyousei_izumi.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/hairal_niwa.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/hairal_niwa2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/hairal_niwa_n.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/hakasitarelay.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/hut.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/hylia_labo.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/impa.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/kakariko.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/kenjyanoma.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/kokiri_home.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/kokiri_home3.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/kokiri_home4.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/kokiri_home5.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/labo.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/link_home.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/mahouya.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/malon_stable.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/miharigoya.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/nakaniwa.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/syatekijyou.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/takaraya.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/tent.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/tokinoma.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/yousei_izumi_tate.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/indoors/yousei_izumi_yoko.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/misc/enrui.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/misc/entra_n.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/misc/hakaana.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/misc/hakaana2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/misc/hakaana_ouke.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/misc/hiral_demo.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/misc/kakariko3.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/misc/kakusiana.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/misc/kinsuta.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/misc/market_alley.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/misc/market_alley_n.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/misc/market_day.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/misc/market_night.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/misc/market_ruins.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/misc/shrine.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/misc/shrine_n.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/misc/shrine_r.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/misc/turibori.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/entra.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/souko.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/spot00.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/spot01.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/spot02.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/spot03.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/spot04.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/spot05.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/spot06.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/spot07.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/spot08.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/spot09.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/spot10.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/spot11.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/spot12.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/spot13.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/spot15.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/spot16.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/spot17.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/spot18.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/overworld/spot20.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/shops/alley_shop.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/shops/drag.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/shops/face_shop.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/shops/golon.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/shops/kokiri_shop.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/shops/night_shop.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/shops/shop1.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/shops/zoora.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/test_levels/besitu.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/test_levels/depth_test.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/test_levels/sasatest.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/test_levels/sutaru.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/test_levels/syotes.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/test_levels/syotes2.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/test_levels/test01.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/scenes/test_levels/testroom.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/text/elf_message_field.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/text/elf_message_ydan.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/text/nes_message_data_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/text/staff_message_data_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/backgrounds.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/do_action_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/icon_item_24_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/icon_item_dungeon_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/icon_item_field_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/icon_item_fra_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/icon_item_gameover_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/icon_item_ger_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/icon_item_nes_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/icon_item_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/item_name_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/map_48x85_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/map_grand_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/map_i_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/map_name_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/message_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/message_texture_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/nes_font_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/nintendo_rogo_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/parameter_static.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/place_title_cards.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/skyboxes.xml (100%) rename soh/assets/xml/{ => GC_NMQ_D}/textures/title_static.xml (100%) create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/code/fbdemo_circle.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/code/fbdemo_triforce.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/code/fbdemo_wipe1.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/misc/link_animetion.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/gameplay_dangeon_keep.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/gameplay_field_keep.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/gameplay_keep.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_Bb.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ahg.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_am.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ane.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ani.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_anubice.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_aob.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_b_heart.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_bba.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_bdan_objects.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_bdoor.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_bg.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_bigokuta.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_bird.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_bji.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_bl.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_blkobj.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_bob.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_boj.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_bombf.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_bombiwa.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_bowl.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_box.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_brob.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_bubble.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_bv.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_bw.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_bwall.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_bxa.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_cne.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_cob.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_cow.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_crow.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_cs.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_d_elevator.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_d_hsblock.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_d_lift.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_daiku.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ddan_objects.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_dekubaba.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_dekujr.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_dekunuts.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_demo_6k.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_demo_kekkai.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_demo_tre_lgt.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_dh.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_dnk.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_dns.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_dodojr.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_dodongo.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_dog.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_door_gerudo.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_door_killer.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ds.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ds2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_du.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_dy_obj.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ec.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_crystal_light.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_doughnut.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_erupc.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_fire_ball.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_flash.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_lgt_shower.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_star_field.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_tw.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ei.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_fa.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_fd.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_fd2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_fhg.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_fire.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_firefly.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_fish.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_fr.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_fu.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_fw.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_fz.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon_anime1.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon_anime2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon_anime3.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon_objects.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ge1.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_geff.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_geldb.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_arrow.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_arrowcase.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bean.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bomb_1.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bomb_2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bombpouch.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_boomerang.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_boots_2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bosskey.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bottle.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bottle_letter.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bow.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bracelet.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_brokensword.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_butterfly.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_clothes.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_coin.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_compass.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_dekupouch.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_egg.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_eye_lotion.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_fire.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_fish.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_frog.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_gerudo.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_gerudomask.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_ghost.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_glasses.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_gloves.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_goddess.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_golonmask.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_grass.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_hammer.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_heart.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_hearts.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_hookshot.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_hoverboots.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_insect.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_jewel.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_key.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_ki_tan_mask.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_letter.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_liquid.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_longsword.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_m_arrow.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_magicpot.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_map.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_medal.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_melody.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_milk.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_mushroom.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_niwatori.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_nuts.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_ocarina.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_ocarina_0.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_pachinko.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_powder.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_prescription.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_purse.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_rabit_mask.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_redead_mask.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_rupy.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_saw.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_scale.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_seed.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_shield_1.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_shield_2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_shield_3.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_skj_mask.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_soldout.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_soul.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_stick.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_sutaru.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_sword_1.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_ticketstone.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_truth_mask.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_zoramask.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gj.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gjyo_objects.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gla.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gm.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gnd.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gnd_magic.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gndd.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_god_lgt.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gol.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_goma.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_goroiwa.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gr.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gs.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_gt.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_haka.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_haka_door.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_haka_objects.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_hakach_objects.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_hata.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_heavy_object.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_hidan_objects.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_hintnuts.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_hni.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_horse.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_horse_ganon.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_horse_link_child.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_horse_normal.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_horse_zelda.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_hs.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_human.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ice_objects.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ik.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_im.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_in.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ingate.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_jj.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_js.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_jya_door.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_jya_iron.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_jya_obj.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ka.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_kanban.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_kibako2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_kingdodongo.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_km1.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_kusa.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_kw1.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_kz.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_light_ring.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_lightbox.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_lightswitch.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_link_boy.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_link_child.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ma1.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ma2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mag.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mamenoki.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mastergolon.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_masterkokiri.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_masterkokirihead.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_masterzoora.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mb.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_md.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_medal.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_menkuri_objects.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mir_ray.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mizu_objects.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_dark.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_flame.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_flash.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_ice.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_oka.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_soul.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_wind.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mk.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mm.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mo.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_hineri1.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_hineri1a.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_hineri2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_hineri2a.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_objects.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_tex.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ms.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_mu.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_nb.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_niw.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_nwc.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ny.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA1.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA10.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA11.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA3.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA4.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA5.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA6.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA7.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA8.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA9.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oB1.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oB2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oB3.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oB4.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE1.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE10.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE11.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE12.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE1s.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE3.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE4.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE4s.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE5.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE6.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE7.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE8.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE9.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE_anime.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oF1d_map.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_oF1s.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_o_anime.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_okuta.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_opening_demo1.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_os.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_os_anime.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ossan.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ouke_haka.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_owl.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_peehat.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_po_composer.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_po_field.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_po_sisters.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_poh.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ps.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_pu_box.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_rd.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_reeba.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_relay_objects.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_rl.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_rr.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_rs.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ru1.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ru2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_sa.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_sb.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_sd.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_shop_dungen.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_shopnuts.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_siofuki.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_sk2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_skb.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_skj.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot00_break.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot00_objects.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot01_matoya.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot01_matoyab.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot01_objects.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot01_objects2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot02_objects.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot03_object.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot04_objects.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot05_objects.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot06_objects.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot07_object.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot08_obj.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot09_obj.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot11_obj.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot12_obj.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot15_obj.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot16_obj.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot17_obj.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot18_obj.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ssh.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_sst.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_st.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_stream.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_syokudai.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ta.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_timeblock.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_tite.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_tk.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_toki_objects.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_torch2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_toryo.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_tp.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_tr.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_trap.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_triforce_spot.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ts.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_tsubo.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_tw.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_umajump.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_vali.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_vase.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_vm.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_wallmaster.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_warp1.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_warp2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_wf.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_wood02.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_xc.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_yabusame_point.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_ydan_objects.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_yukabyun.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_zf.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_zg.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_zl1.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_zl2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_zl2_anime1.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_zl2_anime2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_zl4.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/objects/object_zo.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Arrow_Fire.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Arrow_Ice.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Arrow_Light.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Bg_Ganon_Otyuka.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Bg_Jya_Cobra.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Boss_Dodongo.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Boss_Ganon.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Boss_Ganon2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Boss_Sst.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Demo_Shd.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Bili.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Clear_Tag.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Ganon_Mant.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Ganon_Organ.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Holl.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Jsjutan.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Kanban.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Sda.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Ssh.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_St.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Sth.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_End_Title.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_File_Choose.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Magic_Dark.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Magic_Fire.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Magic_Wind.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Spot.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Storm.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Wipe.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Wipe2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Wipe3.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Wipe4.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/Bmori1.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/FIRE_bs.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/HAKAdan.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/HAKAdanCH.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/HAKAdan_bs.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/HIDAN.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/MIZUsin.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/MIZUsin_bs.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/bdan.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/bdan_boss.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ddan.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ddan_boss.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon_boss.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon_demo.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon_final.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon_sonogo.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon_tou.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganontika.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganontikasonogo.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/gerudoway.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ice_doukutu.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/jyasinboss.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/jyasinzou.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/men.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/moribossroom.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ydan.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ydan_boss.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/bowling.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/daiyousei_izumi.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/hairal_niwa.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/hairal_niwa_n.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/hakasitarelay.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/hut.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/hylia_labo.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/impa.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kakariko.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kenjyanoma.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kokiri_home.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kokiri_home3.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kokiri_home4.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kokiri_home5.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/labo.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/link_home.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/mahouya.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/malon_stable.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/miharigoya.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/nakaniwa.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/syatekijyou.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/takaraya.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/tent.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/tokinoma.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/yousei_izumi_tate.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/yousei_izumi_yoko.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/enrui.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/entra_n.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/hakaana.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/hakaana2.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/hakaana_ouke.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/hiral_demo.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/kakariko3.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/kakusiana.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/kinsuta.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/market_alley.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/market_alley_n.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/market_day.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/market_night.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/market_ruins.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/shrine.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/shrine_n.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/shrine_r.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/turibori.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/entra.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/souko.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot00.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot01.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot02.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot03.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot04.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot05.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot06.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot07.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot08.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot09.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot10.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot11.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot12.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot13.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot15.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot16.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot17.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot18.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot20.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/alley_shop.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/drag.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/face_shop.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/golon.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/kokiri_shop.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/night_shop.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/shop1.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/zoora.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/text/elf_message_field.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/text/elf_message_ydan.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/text/nes_message_data_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/text/staff_message_data_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/backgrounds.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/do_action_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_24_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_dungeon_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_field_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_fra_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_gameover_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_ger_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_nes_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/item_name_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/map_48x85_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/map_grand_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/map_i_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/map_name_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/message_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/message_texture_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/nes_font_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/nintendo_rogo_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/parameter_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/place_title_cards.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/skyboxes.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/textures/title_static.xml diff --git a/OTRExporter/.gitignore b/OTRExporter/.gitignore index 2372a0cba..005fe6b8c 100644 --- a/OTRExporter/.gitignore +++ b/OTRExporter/.gitignore @@ -345,6 +345,8 @@ baserom/ *.otr *.swp *.a +*.z64 +*.n64 Extract/ tmp.txt diff --git a/OTRExporter/CFG/Config.xml b/OTRExporter/CFG/Config.xml index d9c3782e1..adec174ca 100644 --- a/OTRExporter/CFG/Config.xml +++ b/OTRExporter/CFG/Config.xml @@ -2,7 +2,7 @@ - + diff --git a/OTRExporter/CFG/filelists/dbg.txt b/OTRExporter/CFG/filelists/dbg.txt new file mode 100644 index 000000000..68af5e557 --- /dev/null +++ b/OTRExporter/CFG/filelists/dbg.txt @@ -0,0 +1,1532 @@ +makerom +boot +dmadata +Audiobank +Audioseq +Audiotable +link_animetion +icon_item_static +icon_item_24_static +icon_item_field_static +icon_item_dungeon_static +icon_item_gameover_static +icon_item_nes_static +icon_item_ger_static +icon_item_fra_static +item_name_static +map_name_static +do_action_static +message_static +message_texture_static +nes_font_static +nes_message_data_static +ger_message_data_static +fra_message_data_static +staff_message_data_static +map_grand_static +map_i_static +map_48x85_static +code +ovl_title +ovl_select +ovl_opening +ovl_file_choose +ovl_kaleido_scope +ovl_player_actor +ovl_map_mark_data +ovl_En_Test +ovl_Arms_Hook +ovl_Arrow_Fire +ovl_Arrow_Ice +ovl_Arrow_Light +ovl_Bg_Bdan_Objects +ovl_Bg_Bdan_Switch +ovl_Bg_Bom_Guard +ovl_Bg_Bombwall +ovl_Bg_Bowl_Wall +ovl_Bg_Breakwall +ovl_Bg_Ddan_Jd +ovl_Bg_Ddan_Kd +ovl_Bg_Dodoago +ovl_Bg_Dy_Yoseizo +ovl_Bg_Ganon_Otyuka +ovl_Bg_Gate_Shutter +ovl_Bg_Gjyo_Bridge +ovl_Bg_Gnd_Darkmeiro +ovl_Bg_Gnd_Firemeiro +ovl_Bg_Gnd_Iceblock +ovl_Bg_Gnd_Nisekabe +ovl_Bg_Gnd_Soulmeiro +ovl_Bg_Haka +ovl_Bg_Haka_Gate +ovl_Bg_Haka_Huta +ovl_Bg_Haka_Megane +ovl_Bg_Haka_MeganeBG +ovl_Bg_Haka_Sgami +ovl_Bg_Haka_Ship +ovl_Bg_Haka_Trap +ovl_Bg_Haka_Tubo +ovl_Bg_Haka_Water +ovl_Bg_Haka_Zou +ovl_Bg_Heavy_Block +ovl_Bg_Hidan_Curtain +ovl_Bg_Hidan_Dalm +ovl_Bg_Hidan_Firewall +ovl_Bg_Hidan_Fslift +ovl_Bg_Hidan_Fwbig +ovl_Bg_Hidan_Hamstep +ovl_Bg_Hidan_Hrock +ovl_Bg_Hidan_Kousi +ovl_Bg_Hidan_Kowarerukabe +ovl_Bg_Hidan_Rock +ovl_Bg_Hidan_Rsekizou +ovl_Bg_Hidan_Sekizou +ovl_Bg_Hidan_Sima +ovl_Bg_Hidan_Syoku +ovl_Bg_Ice_Objects +ovl_Bg_Ice_Shelter +ovl_Bg_Ice_Shutter +ovl_Bg_Ice_Turara +ovl_Bg_Ingate +ovl_Bg_Jya_1flift +ovl_Bg_Jya_Amishutter +ovl_Bg_Jya_Bigmirror +ovl_Bg_Jya_Block +ovl_Bg_Jya_Bombchuiwa +ovl_Bg_Jya_Bombiwa +ovl_Bg_Jya_Cobra +ovl_Bg_Jya_Goroiwa +ovl_Bg_Jya_Haheniron +ovl_Bg_Jya_Ironobj +ovl_Bg_Jya_Kanaami +ovl_Bg_Jya_Lift +ovl_Bg_Jya_Megami +ovl_Bg_Jya_Zurerukabe +ovl_Bg_Menkuri_Eye +ovl_Bg_Menkuri_Kaiten +ovl_Bg_Menkuri_Nisekabe +ovl_Bg_Mizu_Bwall +ovl_Bg_Mizu_Movebg +ovl_Bg_Mizu_Shutter +ovl_Bg_Mizu_Uzu +ovl_Bg_Mizu_Water +ovl_Bg_Mjin +ovl_Bg_Mori_Bigst +ovl_Bg_Mori_Elevator +ovl_Bg_Mori_Hashigo +ovl_Bg_Mori_Hashira4 +ovl_Bg_Mori_Hineri +ovl_Bg_Mori_Idomizu +ovl_Bg_Mori_Kaitenkabe +ovl_Bg_Mori_Rakkatenjo +ovl_Bg_Po_Event +ovl_Bg_Po_Syokudai +ovl_Bg_Pushbox +ovl_Bg_Relay_Objects +ovl_Bg_Spot00_Break +ovl_Bg_Spot00_Hanebasi +ovl_Bg_Spot01_Fusya +ovl_Bg_Spot01_Idohashira +ovl_Bg_Spot01_Idomizu +ovl_Bg_Spot01_Idosoko +ovl_Bg_Spot01_Objects2 +ovl_Bg_Spot02_Objects +ovl_Bg_Spot03_Taki +ovl_Bg_Spot05_Soko +ovl_Bg_Spot06_Objects +ovl_Bg_Spot07_Taki +ovl_Bg_Spot08_Bakudankabe +ovl_Bg_Spot08_Iceblock +ovl_Bg_Spot09_Obj +ovl_Bg_Spot11_Bakudankabe +ovl_Bg_Spot11_Oasis +ovl_Bg_Spot12_Gate +ovl_Bg_Spot12_Saku +ovl_Bg_Spot15_Rrbox +ovl_Bg_Spot15_Saku +ovl_Bg_Spot16_Bombstone +ovl_Bg_Spot16_Doughnut +ovl_Bg_Spot17_Bakudankabe +ovl_Bg_Spot17_Funen +ovl_Bg_Spot18_Basket +ovl_Bg_Spot18_Futa +ovl_Bg_Spot18_Obj +ovl_Bg_Spot18_Shutter +ovl_Bg_Sst_Floor +ovl_Bg_Toki_Hikari +ovl_Bg_Toki_Swd +ovl_Bg_Treemouth +ovl_Bg_Umajump +ovl_Bg_Vb_Sima +ovl_Bg_Ydan_Hasi +ovl_Bg_Ydan_Maruta +ovl_Bg_Ydan_Sp +ovl_Bg_Zg +ovl_Boss_Dodongo +ovl_Boss_Fd +ovl_Boss_Fd2 +ovl_Boss_Ganon +ovl_Boss_Ganon2 +ovl_Boss_Ganondrof +ovl_Boss_Goma +ovl_Boss_Mo +ovl_Boss_Sst +ovl_Boss_Tw +ovl_Boss_Va +ovl_Demo_6K +ovl_Demo_Du +ovl_Demo_Ec +ovl_Demo_Effect +ovl_Demo_Ext +ovl_Demo_Geff +ovl_Demo_Gj +ovl_Demo_Go +ovl_Demo_Gt +ovl_Demo_Ik +ovl_Demo_Im +ovl_Demo_Kankyo +ovl_Demo_Kekkai +ovl_Demo_Sa +ovl_Demo_Shd +ovl_Demo_Tre_Lgt +ovl_Door_Ana +ovl_Door_Gerudo +ovl_Door_Killer +ovl_Door_Shutter +ovl_Door_Toki +ovl_Door_Warp1 +ovl_Efc_Erupc +ovl_Eff_Dust +ovl_Effect_Ss_Blast +ovl_Effect_Ss_Bomb +ovl_Effect_Ss_Bomb2 +ovl_Effect_Ss_Bubble +ovl_Effect_Ss_D_Fire +ovl_Effect_Ss_Dead_Db +ovl_Effect_Ss_Dead_Dd +ovl_Effect_Ss_Dead_Ds +ovl_Effect_Ss_Dead_Sound +ovl_Effect_Ss_Dt_Bubble +ovl_Effect_Ss_Dust +ovl_Effect_Ss_En_Fire +ovl_Effect_Ss_En_Ice +ovl_Effect_Ss_Extra +ovl_Effect_Ss_Fcircle +ovl_Effect_Ss_Fhg_Flash +ovl_Effect_Ss_Fire_Tail +ovl_Effect_Ss_G_Fire +ovl_Effect_Ss_G_Magma +ovl_Effect_Ss_G_Magma2 +ovl_Effect_Ss_G_Ripple +ovl_Effect_Ss_G_Spk +ovl_Effect_Ss_G_Splash +ovl_Effect_Ss_Hahen +ovl_Effect_Ss_HitMark +ovl_Effect_Ss_Ice_Piece +ovl_Effect_Ss_Ice_Smoke +ovl_Effect_Ss_K_Fire +ovl_Effect_Ss_Kakera +ovl_Effect_Ss_KiraKira +ovl_Effect_Ss_Lightning +ovl_Effect_Ss_Sibuki +ovl_Effect_Ss_Sibuki2 +ovl_Effect_Ss_Solder_Srch_Ball +ovl_Effect_Ss_Stick +ovl_Effect_Ss_Stone1 +ovl_Elf_Msg +ovl_Elf_Msg2 +ovl_En_Am +ovl_En_Ani +ovl_En_Anubice +ovl_En_Anubice_Fire +ovl_En_Anubice_Tag +ovl_En_Arow_Trap +ovl_En_Arrow +ovl_En_Attack_Niw +ovl_En_Ba +ovl_En_Bb +ovl_En_Bdfire +ovl_En_Bigokuta +ovl_En_Bili +ovl_En_Bird +ovl_En_Blkobj +ovl_En_Bom +ovl_En_Bom_Bowl_Man +ovl_En_Bom_Bowl_Pit +ovl_En_Bom_Chu +ovl_En_Bombf +ovl_En_Boom +ovl_En_Box +ovl_En_Brob +ovl_En_Bubble +ovl_En_Butte +ovl_En_Bw +ovl_En_Bx +ovl_En_Changer +ovl_En_Clear_Tag +ovl_En_Cow +ovl_En_Crow +ovl_En_Cs +ovl_En_Daiku +ovl_En_Daiku_Kakariko +ovl_En_Dekubaba +ovl_En_Dekunuts +ovl_En_Dh +ovl_En_Dha +ovl_En_Diving_Game +ovl_En_Dns +ovl_En_Dnt_Demo +ovl_En_Dnt_Jiji +ovl_En_Dnt_Nomal +ovl_En_Dodojr +ovl_En_Dodongo +ovl_En_Dog +ovl_En_Door +ovl_En_Ds +ovl_En_Du +ovl_En_Dy_Extra +ovl_En_Eg +ovl_En_Eiyer +ovl_En_Elf +ovl_En_Encount1 +ovl_En_Encount2 +ovl_En_Ex_Item +ovl_En_Ex_Ruppy +ovl_En_Fd +ovl_En_Fd_Fire +ovl_En_Fhg_Fire +ovl_En_Fire_Rock +ovl_En_Firefly +ovl_En_Fish +ovl_En_Floormas +ovl_En_Fr +ovl_En_Fu +ovl_En_Fw +ovl_En_Fz +ovl_En_G_Switch +ovl_En_Ganon_Mant +ovl_En_Ganon_Organ +ovl_En_Gb +ovl_En_Ge1 +ovl_En_Ge2 +ovl_En_Ge3 +ovl_En_GeldB +ovl_En_GirlA +ovl_En_Gm +ovl_En_Go +ovl_En_Go2 +ovl_En_Goma +ovl_En_Goroiwa +ovl_En_Gs +ovl_En_Guest +ovl_En_Hata +ovl_En_Heishi1 +ovl_En_Heishi2 +ovl_En_Heishi3 +ovl_En_Heishi4 +ovl_En_Hintnuts +ovl_En_Holl +ovl_En_Honotrap +ovl_En_Horse +ovl_En_Horse_Game_Check +ovl_En_Horse_Ganon +ovl_En_Horse_Link_Child +ovl_En_Horse_Normal +ovl_En_Horse_Zelda +ovl_En_Hs +ovl_En_Hs2 +ovl_En_Hy +ovl_En_Ice_Hono +ovl_En_Ik +ovl_En_In +ovl_En_Insect +ovl_En_Ishi +ovl_En_It +ovl_En_Jj +ovl_En_Js +ovl_En_Jsjutan +ovl_En_Kakasi +ovl_En_Kakasi2 +ovl_En_Kakasi3 +ovl_En_Kanban +ovl_En_Karebaba +ovl_En_Ko +ovl_En_Kusa +ovl_En_Kz +ovl_En_Light +ovl_En_Lightbox +ovl_En_M_Fire1 +ovl_En_M_Thunder +ovl_En_Ma1 +ovl_En_Ma2 +ovl_En_Ma3 +ovl_En_Mag +ovl_En_Mb +ovl_En_Md +ovl_En_Mk +ovl_En_Mm +ovl_En_Mm2 +ovl_En_Ms +ovl_En_Mu +ovl_En_Nb +ovl_En_Niw +ovl_En_Niw_Girl +ovl_En_Niw_Lady +ovl_En_Nutsball +ovl_En_Nwc +ovl_En_Ny +ovl_En_OE2 +ovl_En_Okarina_Effect +ovl_En_Okarina_Tag +ovl_En_Okuta +ovl_En_Ossan +ovl_En_Owl +ovl_En_Part +ovl_En_Peehat +ovl_En_Po_Desert +ovl_En_Po_Field +ovl_En_Po_Relay +ovl_En_Po_Sisters +ovl_En_Poh +ovl_En_Pu_box +ovl_En_Rd +ovl_En_Reeba +ovl_En_River_Sound +ovl_En_Rl +ovl_En_Rr +ovl_En_Ru1 +ovl_En_Ru2 +ovl_En_Sa +ovl_En_Sb +ovl_En_Scene_Change +ovl_En_Sda +ovl_En_Shopnuts +ovl_En_Si +ovl_En_Siofuki +ovl_En_Skb +ovl_En_Skj +ovl_En_Skjneedle +ovl_En_Ssh +ovl_En_St +ovl_En_Sth +ovl_En_Stream +ovl_En_Sw +ovl_En_Syateki_Itm +ovl_En_Syateki_Man +ovl_En_Syateki_Niw +ovl_En_Ta +ovl_En_Takara_Man +ovl_En_Tana +ovl_En_Tg +ovl_En_Tite +ovl_En_Tk +ovl_En_Torch +ovl_En_Torch2 +ovl_En_Toryo +ovl_En_Tp +ovl_En_Tr +ovl_En_Trap +ovl_En_Tubo_Trap +ovl_En_Vali +ovl_En_Vase +ovl_En_Vb_Ball +ovl_En_Viewer +ovl_En_Vm +ovl_En_Wall_Tubo +ovl_En_Wallmas +ovl_En_Weather_Tag +ovl_En_Weiyer +ovl_En_Wf +ovl_En_Wonder_Item +ovl_En_Wonder_Talk +ovl_En_Wonder_Talk2 +ovl_En_Wood02 +ovl_En_Xc +ovl_En_Yabusame_Mark +ovl_En_Yukabyun +ovl_En_Zf +ovl_En_Zl1 +ovl_En_Zl2 +ovl_En_Zl3 +ovl_En_Zl4 +ovl_En_Zo +ovl_En_fHG +ovl_End_Title +ovl_Fishing +ovl_Item_B_Heart +ovl_Item_Etcetera +ovl_Item_Inbox +ovl_Item_Ocarina +ovl_Item_Shield +ovl_Magic_Dark +ovl_Magic_Fire +ovl_Magic_Wind +ovl_Mir_Ray +ovl_Obj_Bean +ovl_Obj_Blockstop +ovl_Obj_Bombiwa +ovl_Obj_Comb +ovl_Obj_Dekujr +ovl_Obj_Elevator +ovl_Obj_Hamishi +ovl_Obj_Hana +ovl_Obj_Hsblock +ovl_Obj_Ice_Poly +ovl_Obj_Kibako +ovl_Obj_Kibako2 +ovl_Obj_Lift +ovl_Obj_Lightswitch +ovl_Obj_Makekinsuta +ovl_Obj_Makeoshihiki +ovl_Obj_Mure +ovl_Obj_Mure2 +ovl_Obj_Mure3 +ovl_Obj_Oshihiki +ovl_Obj_Roomtimer +ovl_Obj_Switch +ovl_Obj_Syokudai +ovl_Obj_Timeblock +ovl_Obj_Tsubo +ovl_Obj_Warp2block +ovl_Object_Kankyo +ovl_Oceff_Spot +ovl_Oceff_Storm +ovl_Oceff_Wipe +ovl_Oceff_Wipe2 +ovl_Oceff_Wipe3 +ovl_Oceff_Wipe4 +ovl_Shot_Sun +gameplay_keep +gameplay_field_keep +gameplay_dangeon_keep +gameplay_object_exchange_static +object_link_boy +object_link_child +object_box +object_human +object_okuta +object_poh +object_wallmaster +object_dy_obj +object_firefly +object_dodongo +object_fire +object_niw +object_tite +object_reeba +object_peehat +object_kingdodongo +object_horse +object_zf +object_goma +object_zl1 +object_gol +object_bubble +object_dodojr +object_torch2 +object_bl +object_tp +object_oA1 +object_st +object_bw +object_ei +object_horse_normal +object_oB1 +object_o_anime +object_spot04_objects +object_ddan_objects +object_hidan_objects +object_horse_ganon +object_oA2 +object_spot00_objects +object_mb +object_bombf +object_sk2 +object_oE1 +object_oE_anime +object_oE2 +object_ydan_objects +object_gnd +object_am +object_dekubaba +object_oA3 +object_oA4 +object_oA5 +object_oA6 +object_oA7 +object_jj +object_oA8 +object_oA9 +object_oB2 +object_oB3 +object_oB4 +object_horse_zelda +object_opening_demo1 +object_warp1 +object_b_heart +object_dekunuts +object_oE3 +object_oE4 +object_menkuri_objects +object_oE5 +object_oE6 +object_oE7 +object_oE8 +object_oE9 +object_oE10 +object_oE11 +object_oE12 +object_vali +object_oA10 +object_oA11 +object_mizu_objects +object_fhg +object_ossan +object_mori_hineri1 +object_Bb +object_toki_objects +object_yukabyun +object_zl2 +object_mjin +object_mjin_flash +object_mjin_dark +object_mjin_flame +object_mjin_ice +object_mjin_soul +object_mjin_wind +object_mjin_oka +object_haka_objects +object_spot06_objects +object_ice_objects +object_relay_objects +object_mori_hineri1a +object_mori_hineri2 +object_mori_hineri2a +object_mori_objects +object_mori_tex +object_spot08_obj +object_warp2 +object_hata +object_bird +object_wood02 +object_lightbox +object_pu_box +object_trap +object_vase +object_im +object_ta +object_tk +object_xc +object_vm +object_bv +object_hakach_objects +object_efc_crystal_light +object_efc_fire_ball +object_efc_flash +object_efc_lgt_shower +object_efc_star_field +object_god_lgt +object_light_ring +object_triforce_spot +object_medal +object_bdan_objects +object_sd +object_rd +object_po_sisters +object_heavy_object +object_gndd +object_fd +object_du +object_fw +object_horse_link_child +object_spot02_objects +object_haka +object_ru1 +object_syokudai +object_fd2 +object_dh +object_rl +object_efc_tw +object_demo_tre_lgt +object_gi_key +object_mir_ray +object_brob +object_gi_jewel +object_spot09_obj +object_spot18_obj +object_bdoor +object_spot17_obj +object_shop_dungen +object_nb +object_mo +object_sb +object_gi_melody +object_gi_heart +object_gi_compass +object_gi_bosskey +object_gi_medal +object_gi_nuts +object_sa +object_gi_hearts +object_gi_arrowcase +object_gi_bombpouch +object_in +object_tr +object_spot16_obj +object_oE1s +object_oE4s +object_os_anime +object_gi_bottle +object_gi_stick +object_gi_map +object_oF1d_map +object_ru2 +object_gi_shield_1 +object_dekujr +object_gi_magicpot +object_gi_bomb_1 +object_oF1s +object_ma2 +object_gi_purse +object_hni +object_tw +object_rr +object_bxa +object_anubice +object_gi_gerudo +object_gi_arrow +object_gi_bomb_2 +object_gi_egg +object_gi_scale +object_gi_shield_2 +object_gi_hookshot +object_gi_ocarina +object_gi_milk +object_ma1 +object_ganon +object_sst +object_ny +object_fr +object_gi_pachinko +object_gi_boomerang +object_gi_bow +object_gi_glasses +object_gi_liquid +object_ani +object_demo_6k +object_gi_shield_3 +object_gi_letter +object_spot15_obj +object_jya_obj +object_gi_clothes +object_gi_bean +object_gi_fish +object_gi_saw +object_gi_hammer +object_gi_grass +object_gi_longsword +object_spot01_objects +object_md +object_km1 +object_kw1 +object_zo +object_kz +object_umajump +object_masterkokiri +object_masterkokirihead +object_mastergolon +object_masterzoora +object_aob +object_ik +object_ahg +object_cne +object_gi_niwatori +object_skj +object_gi_bottle_letter +object_bji +object_bba +object_gi_ocarina_0 +object_ds +object_ane +object_boj +object_spot03_object +object_spot07_object +object_fz +object_bob +object_ge1 +object_yabusame_point +object_gi_boots_2 +object_gi_seed +object_gnd_magic +object_d_elevator +object_d_hsblock +object_d_lift +object_mamenoki +object_goroiwa +object_toryo +object_daiku +object_nwc +object_blkobj +object_gm +object_ms +object_hs +object_ingate +object_lightswitch +object_kusa +object_tsubo +object_gi_gloves +object_gi_coin +object_kanban +object_gjyo_objects +object_owl +object_mk +object_fu +object_gi_ki_tan_mask +object_gi_redead_mask +object_gi_skj_mask +object_gi_rabit_mask +object_gi_truth_mask +object_ganon_objects +object_siofuki +object_stream +object_mm +object_fa +object_os +object_gi_eye_lotion +object_gi_powder +object_gi_mushroom +object_gi_ticketstone +object_gi_brokensword +object_js +object_cs +object_gi_prescription +object_gi_bracelet +object_gi_soldout +object_gi_frog +object_mag +object_door_gerudo +object_gt +object_efc_erupc +object_zl2_anime1 +object_zl2_anime2 +object_gi_golonmask +object_gi_zoramask +object_gi_gerudomask +object_ganon2 +object_ka +object_ts +object_zg +object_gi_hoverboots +object_gi_m_arrow +object_ds2 +object_ec +object_fish +object_gi_sutaru +object_gi_goddess +object_ssh +object_bigokuta +object_bg +object_spot05_objects +object_spot12_obj +object_bombiwa +object_hintnuts +object_rs +object_spot00_break +object_gla +object_shopnuts +object_geldb +object_gr +object_dog +object_jya_iron +object_jya_door +object_spot01_objects2 +object_spot11_obj +object_kibako2 +object_dns +object_dnk +object_gi_fire +object_gi_insect +object_gi_butterfly +object_gi_ghost +object_gi_soul +object_bowl +object_po_field +object_demo_kekkai +object_efc_doughnut +object_gi_dekupouch +object_ganon_anime1 +object_ganon_anime2 +object_ganon_anime3 +object_gi_rupy +object_spot01_matoya +object_spot01_matoyab +object_po_composer +object_mu +object_wf +object_skb +object_gj +object_geff +object_haka_door +object_gs +object_ps +object_bwall +object_crow +object_cow +object_cob +object_gi_sword_1 +object_door_killer +object_ouke_haka +object_timeblock +object_zl4 +g_pn_01 +g_pn_02 +g_pn_03 +g_pn_04 +g_pn_05 +g_pn_06 +g_pn_07 +g_pn_08 +g_pn_09 +g_pn_10 +g_pn_11 +g_pn_12 +g_pn_13 +g_pn_14 +g_pn_15 +g_pn_16 +g_pn_17 +g_pn_18 +g_pn_19 +g_pn_20 +g_pn_21 +g_pn_22 +g_pn_23 +g_pn_24 +g_pn_25 +g_pn_26 +g_pn_27 +g_pn_28 +g_pn_29 +g_pn_30 +g_pn_31 +g_pn_32 +g_pn_33 +g_pn_34 +g_pn_35 +g_pn_36 +g_pn_37 +g_pn_38 +g_pn_39 +g_pn_40 +g_pn_41 +g_pn_42 +g_pn_43 +g_pn_44 +g_pn_45 +g_pn_46 +g_pn_47 +g_pn_48 +g_pn_49 +g_pn_50 +g_pn_51 +g_pn_52 +g_pn_53 +g_pn_54 +g_pn_55 +g_pn_56 +g_pn_57 +z_select_static +nintendo_rogo_static +title_static +parameter_static +vr_fine0_static +vr_fine0_pal_static +vr_fine1_static +vr_fine1_pal_static +vr_fine2_static +vr_fine2_pal_static +vr_fine3_static +vr_fine3_pal_static +vr_cloud0_static +vr_cloud0_pal_static +vr_cloud1_static +vr_cloud1_pal_static +vr_cloud2_static +vr_cloud2_pal_static +vr_cloud3_static +vr_cloud3_pal_static +vr_holy0_static +vr_holy0_pal_static +vr_holy1_static +vr_holy1_pal_static +vr_MDVR_static +vr_MDVR_pal_static +vr_MNVR_static +vr_MNVR_pal_static +vr_RUVR_static +vr_RUVR_pal_static +vr_LHVR_static +vr_LHVR_pal_static +vr_KHVR_static +vr_KHVR_pal_static +vr_K3VR_static +vr_K3VR_pal_static +vr_K4VR_static +vr_K4VR_pal_static +vr_K5VR_static +vr_K5VR_pal_static +vr_SP1a_static +vr_SP1a_pal_static +vr_MLVR_static +vr_MLVR_pal_static +vr_KKRVR_static +vr_KKRVR_pal_static +vr_KR3VR_static +vr_KR3VR_pal_static +vr_IPVR_static +vr_IPVR_pal_static +vr_KSVR_static +vr_KSVR_pal_static +vr_GLVR_static +vr_GLVR_pal_static +vr_ZRVR_static +vr_ZRVR_pal_static +vr_DGVR_static +vr_DGVR_pal_static +vr_ALVR_static +vr_ALVR_pal_static +vr_NSVR_static +vr_NSVR_pal_static +vr_LBVR_static +vr_LBVR_pal_static +vr_TTVR_static +vr_TTVR_pal_static +vr_FCVR_static +vr_FCVR_pal_static +elf_message_field +elf_message_ydan +syotes_scene +syotes_room_0 +syotes2_scene +syotes2_room_0 +depth_test_scene +depth_test_room_0 +spot00_scene +spot00_room_0 +spot01_scene +spot01_room_0 +spot02_scene +spot02_room_0 +spot02_room_1 +spot03_scene +spot03_room_0 +spot03_room_1 +spot04_scene +spot04_room_0 +spot04_room_1 +spot04_room_2 +spot05_scene +spot05_room_0 +spot06_scene +spot06_room_0 +spot07_scene +spot07_room_0 +spot07_room_1 +spot08_scene +spot08_room_0 +spot09_scene +spot09_room_0 +spot10_scene +spot10_room_0 +spot10_room_1 +spot10_room_2 +spot10_room_3 +spot10_room_4 +spot10_room_5 +spot10_room_6 +spot10_room_7 +spot10_room_8 +spot10_room_9 +spot11_scene +spot11_room_0 +spot12_scene +spot12_room_0 +spot12_room_1 +spot13_scene +spot13_room_0 +spot13_room_1 +spot15_scene +spot15_room_0 +spot16_scene +spot16_room_0 +spot17_scene +spot17_room_0 +spot17_room_1 +spot18_scene +spot18_room_0 +spot18_room_1 +spot18_room_2 +spot18_room_3 +ydan_scene +ydan_room_0 +ydan_room_1 +ydan_room_2 +ydan_room_3 +ydan_room_4 +ydan_room_5 +ydan_room_6 +ydan_room_7 +ydan_room_8 +ydan_room_9 +ydan_room_10 +ydan_room_11 +ddan_scene +ddan_room_0 +ddan_room_1 +ddan_room_2 +ddan_room_3 +ddan_room_4 +ddan_room_5 +ddan_room_6 +ddan_room_7 +ddan_room_8 +ddan_room_9 +ddan_room_10 +ddan_room_11 +ddan_room_12 +ddan_room_13 +ddan_room_14 +ddan_room_15 +ddan_room_16 +bdan_scene +bdan_room_0 +bdan_room_1 +bdan_room_2 +bdan_room_3 +bdan_room_4 +bdan_room_5 +bdan_room_6 +bdan_room_7 +bdan_room_8 +bdan_room_9 +bdan_room_10 +bdan_room_11 +bdan_room_12 +bdan_room_13 +bdan_room_14 +bdan_room_15 +Bmori1_scene +Bmori1_room_0 +Bmori1_room_1 +Bmori1_room_2 +Bmori1_room_3 +Bmori1_room_4 +Bmori1_room_5 +Bmori1_room_6 +Bmori1_room_7 +Bmori1_room_8 +Bmori1_room_9 +Bmori1_room_10 +Bmori1_room_11 +Bmori1_room_12 +Bmori1_room_13 +Bmori1_room_14 +Bmori1_room_15 +Bmori1_room_16 +Bmori1_room_17 +Bmori1_room_18 +Bmori1_room_19 +Bmori1_room_20 +Bmori1_room_21 +Bmori1_room_22 +HIDAN_scene +HIDAN_room_0 +HIDAN_room_1 +HIDAN_room_2 +HIDAN_room_3 +HIDAN_room_4 +HIDAN_room_5 +HIDAN_room_6 +HIDAN_room_7 +HIDAN_room_8 +HIDAN_room_9 +HIDAN_room_10 +HIDAN_room_11 +HIDAN_room_12 +HIDAN_room_13 +HIDAN_room_14 +HIDAN_room_15 +HIDAN_room_16 +HIDAN_room_17 +HIDAN_room_18 +HIDAN_room_19 +HIDAN_room_20 +HIDAN_room_21 +HIDAN_room_22 +HIDAN_room_23 +HIDAN_room_24 +HIDAN_room_25 +HIDAN_room_26 +MIZUsin_scene +MIZUsin_room_0 +MIZUsin_room_1 +MIZUsin_room_2 +MIZUsin_room_3 +MIZUsin_room_4 +MIZUsin_room_5 +MIZUsin_room_6 +MIZUsin_room_7 +MIZUsin_room_8 +MIZUsin_room_9 +MIZUsin_room_10 +MIZUsin_room_11 +MIZUsin_room_12 +MIZUsin_room_13 +MIZUsin_room_14 +MIZUsin_room_15 +MIZUsin_room_16 +MIZUsin_room_17 +MIZUsin_room_18 +MIZUsin_room_19 +MIZUsin_room_20 +MIZUsin_room_21 +MIZUsin_room_22 +jyasinzou_scene +jyasinzou_room_0 +jyasinzou_room_1 +jyasinzou_room_2 +jyasinzou_room_3 +jyasinzou_room_4 +jyasinzou_room_5 +jyasinzou_room_6 +jyasinzou_room_7 +jyasinzou_room_8 +jyasinzou_room_9 +jyasinzou_room_10 +jyasinzou_room_11 +jyasinzou_room_12 +jyasinzou_room_13 +jyasinzou_room_14 +jyasinzou_room_15 +jyasinzou_room_16 +jyasinzou_room_17 +jyasinzou_room_18 +jyasinzou_room_19 +jyasinzou_room_20 +jyasinzou_room_21 +jyasinzou_room_22 +jyasinzou_room_23 +jyasinzou_room_24 +jyasinzou_room_25 +jyasinzou_room_26 +jyasinzou_room_27 +jyasinzou_room_28 +HAKAdan_scene +HAKAdan_room_0 +HAKAdan_room_1 +HAKAdan_room_2 +HAKAdan_room_3 +HAKAdan_room_4 +HAKAdan_room_5 +HAKAdan_room_6 +HAKAdan_room_7 +HAKAdan_room_8 +HAKAdan_room_9 +HAKAdan_room_10 +HAKAdan_room_11 +HAKAdan_room_12 +HAKAdan_room_13 +HAKAdan_room_14 +HAKAdan_room_15 +HAKAdan_room_16 +HAKAdan_room_17 +HAKAdan_room_18 +HAKAdan_room_19 +HAKAdan_room_20 +HAKAdan_room_21 +HAKAdan_room_22 +HAKAdanCH_scene +HAKAdanCH_room_0 +HAKAdanCH_room_1 +HAKAdanCH_room_2 +HAKAdanCH_room_3 +HAKAdanCH_room_4 +HAKAdanCH_room_5 +HAKAdanCH_room_6 +ice_doukutu_scene +ice_doukutu_room_0 +ice_doukutu_room_1 +ice_doukutu_room_2 +ice_doukutu_room_3 +ice_doukutu_room_4 +ice_doukutu_room_5 +ice_doukutu_room_6 +ice_doukutu_room_7 +ice_doukutu_room_8 +ice_doukutu_room_9 +ice_doukutu_room_10 +ice_doukutu_room_11 +men_scene +men_room_0 +men_room_1 +men_room_2 +men_room_3 +men_room_4 +men_room_5 +men_room_6 +men_room_7 +men_room_8 +men_room_9 +men_room_10 +ganontika_scene +ganontika_room_0 +ganontika_room_1 +ganontika_room_2 +ganontika_room_3 +ganontika_room_4 +ganontika_room_5 +ganontika_room_6 +ganontika_room_7 +ganontika_room_8 +ganontika_room_9 +ganontika_room_10 +ganontika_room_11 +ganontika_room_12 +ganontika_room_13 +ganontika_room_14 +ganontika_room_15 +ganontika_room_16 +ganontika_room_17 +ganontika_room_18 +ganontika_room_19 +market_day_scene +market_day_room_0 +market_night_scene +market_night_room_0 +testroom_scene +testroom_room_0 +testroom_room_1 +testroom_room_2 +testroom_room_3 +testroom_room_4 +kenjyanoma_scene +kenjyanoma_room_0 +tokinoma_scene +tokinoma_room_0 +tokinoma_room_1 +sutaru_scene +sutaru_room_0 +link_home_scene +link_home_room_0 +kokiri_shop_scene +kokiri_shop_room_0 +kokiri_home_scene +kokiri_home_room_0 +kakusiana_scene +kakusiana_room_0 +kakusiana_room_1 +kakusiana_room_2 +kakusiana_room_3 +kakusiana_room_4 +kakusiana_room_5 +kakusiana_room_6 +kakusiana_room_7 +kakusiana_room_8 +kakusiana_room_9 +kakusiana_room_10 +kakusiana_room_11 +kakusiana_room_12 +kakusiana_room_13 +entra_scene +entra_room_0 +moribossroom_scene +moribossroom_room_0 +moribossroom_room_1 +syatekijyou_scene +syatekijyou_room_0 +shop1_scene +shop1_room_0 +hairal_niwa_scene +hairal_niwa_room_0 +ganon_tou_scene +ganon_tou_room_0 +sasatest_scene +sasatest_room_0 +market_alley_scene +market_alley_room_0 +spot20_scene +spot20_room_0 +market_ruins_scene +market_ruins_room_0 +entra_n_scene +entra_n_room_0 +enrui_scene +enrui_room_0 +market_alley_n_scene +market_alley_n_room_0 +hiral_demo_scene +hiral_demo_room_0 +kokiri_home3_scene +kokiri_home3_room_0 +malon_stable_scene +malon_stable_room_0 +kakariko_scene +kakariko_room_0 +bdan_boss_scene +bdan_boss_room_0 +bdan_boss_room_1 +FIRE_bs_scene +FIRE_bs_room_0 +FIRE_bs_room_1 +hut_scene +hut_room_0 +daiyousei_izumi_scene +daiyousei_izumi_room_0 +hakaana_scene +hakaana_room_0 +yousei_izumi_tate_scene +yousei_izumi_tate_room_0 +yousei_izumi_yoko_scene +yousei_izumi_yoko_room_0 +golon_scene +golon_room_0 +zoora_scene +zoora_room_0 +drag_scene +drag_room_0 +alley_shop_scene +alley_shop_room_0 +night_shop_scene +night_shop_room_0 +impa_scene +impa_room_0 +labo_scene +labo_room_0 +tent_scene +tent_room_0 +nakaniwa_scene +nakaniwa_room_0 +ddan_boss_scene +ddan_boss_room_0 +ddan_boss_room_1 +ydan_boss_scene +ydan_boss_room_0 +ydan_boss_room_1 +HAKAdan_bs_scene +HAKAdan_bs_room_0 +HAKAdan_bs_room_1 +MIZUsin_bs_scene +MIZUsin_bs_room_0 +MIZUsin_bs_room_1 +ganon_scene +ganon_room_0 +ganon_room_1 +ganon_room_2 +ganon_room_3 +ganon_room_4 +ganon_room_5 +ganon_room_6 +ganon_room_7 +ganon_room_8 +ganon_room_9 +ganon_boss_scene +ganon_boss_room_0 +jyasinboss_scene +jyasinboss_room_0 +jyasinboss_room_1 +jyasinboss_room_2 +jyasinboss_room_3 +kokiri_home4_scene +kokiri_home4_room_0 +kokiri_home5_scene +kokiri_home5_room_0 +ganon_final_scene +ganon_final_room_0 +kakariko3_scene +kakariko3_room_0 +hairal_niwa2_scene +hairal_niwa2_room_0 +hakasitarelay_scene +hakasitarelay_room_0 +hakasitarelay_room_1 +hakasitarelay_room_2 +hakasitarelay_room_3 +hakasitarelay_room_4 +hakasitarelay_room_5 +hakasitarelay_room_6 +shrine_scene +shrine_room_0 +turibori_scene +turibori_room_0 +shrine_n_scene +shrine_n_room_0 +shrine_r_scene +shrine_r_room_0 +hakaana2_scene +hakaana2_room_0 +gerudoway_scene +gerudoway_room_0 +gerudoway_room_1 +gerudoway_room_2 +gerudoway_room_3 +gerudoway_room_4 +gerudoway_room_5 +hairal_niwa_n_scene +hairal_niwa_n_room_0 +bowling_scene +bowling_room_0 +hakaana_ouke_scene +hakaana_ouke_room_0 +hakaana_ouke_room_1 +hakaana_ouke_room_2 +hylia_labo_scene +hylia_labo_room_0 +souko_scene +souko_room_0 +souko_room_1 +souko_room_2 +miharigoya_scene +miharigoya_room_0 +mahouya_scene +mahouya_room_0 +takaraya_scene +takaraya_room_0 +takaraya_room_1 +takaraya_room_2 +takaraya_room_3 +takaraya_room_4 +takaraya_room_5 +takaraya_room_6 +ganon_sonogo_scene +ganon_sonogo_room_0 +ganon_sonogo_room_1 +ganon_sonogo_room_2 +ganon_sonogo_room_3 +ganon_sonogo_room_4 +ganon_demo_scene +ganon_demo_room_0 +besitu_scene +besitu_room_0 +face_shop_scene +face_shop_room_0 +kinsuta_scene +kinsuta_room_0 +ganontikasonogo_scene +ganontikasonogo_room_0 +ganontikasonogo_room_1 +test01_scene +test01_room_0 +bump_texture_static +anime_model_1_static +anime_model_2_static +anime_model_3_static +anime_model_4_static +anime_model_5_static +anime_model_6_static +anime_texture_1_static +anime_texture_2_static +anime_texture_3_static +anime_texture_4_static +anime_texture_5_static +anime_texture_6_static +softsprite_matrix_static \ No newline at end of file diff --git a/OTRExporter/CFG/filelists/gamecube.txt b/OTRExporter/CFG/filelists/gamecube.txt new file mode 100644 index 000000000..23794e1f6 --- /dev/null +++ b/OTRExporter/CFG/filelists/gamecube.txt @@ -0,0 +1,1509 @@ +makerom +boot +dmadata +Audiobank +Audioseq +Audiotable +kanji +link_animetion +icon_item_static +icon_item_24_static +icon_item_field_static +icon_item_dungeon_static +icon_item_gameover_static +icon_item_jpn_static +icon_item_nes_static +item_name_static +map_name_static +do_action_static +message_static +message_texture_static +nes_font_static +jpn_message_data_static +nes_message_data_static +staff_message_data_static +map_grand_static +map_48x85_static +map_i_static +code +ovl_title +ovl_select +ovl_opening +ovl_file_choose +ovl_kaleido_scope +ovl_player_actor +ovl_map_mark_data +ovl_En_Test +ovl_Arms_Hook +ovl_Arrow_Fire +ovl_Arrow_Ice +ovl_Arrow_Light +ovl_Bg_Bdan_Objects +ovl_Bg_Bdan_Switch +ovl_Bg_Bom_Guard +ovl_Bg_Bombwall +ovl_Bg_Bowl_Wall +ovl_Bg_Breakwall +ovl_Bg_Ddan_Jd +ovl_Bg_Ddan_Kd +ovl_Bg_Dodoago +ovl_Bg_Dy_Yoseizo +ovl_Bg_Ganon_Otyuka +ovl_Bg_Gate_Shutter +ovl_Bg_Gjyo_Bridge +ovl_Bg_Gnd_Darkmeiro +ovl_Bg_Gnd_Firemeiro +ovl_Bg_Gnd_Iceblock +ovl_Bg_Gnd_Nisekabe +ovl_Bg_Gnd_Soulmeiro +ovl_Bg_Haka +ovl_Bg_Haka_Gate +ovl_Bg_Haka_Huta +ovl_Bg_Haka_Megane +ovl_Bg_Haka_MeganeBG +ovl_Bg_Haka_Sgami +ovl_Bg_Haka_Ship +ovl_Bg_Haka_Trap +ovl_Bg_Haka_Tubo +ovl_Bg_Haka_Water +ovl_Bg_Haka_Zou +ovl_Bg_Heavy_Block +ovl_Bg_Hidan_Curtain +ovl_Bg_Hidan_Dalm +ovl_Bg_Hidan_Firewall +ovl_Bg_Hidan_Fslift +ovl_Bg_Hidan_Fwbig +ovl_Bg_Hidan_Hamstep +ovl_Bg_Hidan_Hrock +ovl_Bg_Hidan_Kousi +ovl_Bg_Hidan_Kowarerukabe +ovl_Bg_Hidan_Rock +ovl_Bg_Hidan_Rsekizou +ovl_Bg_Hidan_Sekizou +ovl_Bg_Hidan_Sima +ovl_Bg_Hidan_Syoku +ovl_Bg_Ice_Objects +ovl_Bg_Ice_Shelter +ovl_Bg_Ice_Shutter +ovl_Bg_Ice_Turara +ovl_Bg_Ingate +ovl_Bg_Jya_1flift +ovl_Bg_Jya_Amishutter +ovl_Bg_Jya_Bigmirror +ovl_Bg_Jya_Block +ovl_Bg_Jya_Bombchuiwa +ovl_Bg_Jya_Bombiwa +ovl_Bg_Jya_Cobra +ovl_Bg_Jya_Goroiwa +ovl_Bg_Jya_Haheniron +ovl_Bg_Jya_Ironobj +ovl_Bg_Jya_Kanaami +ovl_Bg_Jya_Lift +ovl_Bg_Jya_Megami +ovl_Bg_Jya_Zurerukabe +ovl_Bg_Menkuri_Eye +ovl_Bg_Menkuri_Kaiten +ovl_Bg_Menkuri_Nisekabe +ovl_Bg_Mizu_Bwall +ovl_Bg_Mizu_Movebg +ovl_Bg_Mizu_Shutter +ovl_Bg_Mizu_Uzu +ovl_Bg_Mizu_Water +ovl_Bg_Mjin +ovl_Bg_Mori_Bigst +ovl_Bg_Mori_Elevator +ovl_Bg_Mori_Hashigo +ovl_Bg_Mori_Hashira4 +ovl_Bg_Mori_Hineri +ovl_Bg_Mori_Idomizu +ovl_Bg_Mori_Kaitenkabe +ovl_Bg_Mori_Rakkatenjo +ovl_Bg_Po_Event +ovl_Bg_Po_Syokudai +ovl_Bg_Pushbox +ovl_Bg_Relay_Objects +ovl_Bg_Spot00_Break +ovl_Bg_Spot00_Hanebasi +ovl_Bg_Spot01_Fusya +ovl_Bg_Spot01_Idohashira +ovl_Bg_Spot01_Idomizu +ovl_Bg_Spot01_Idosoko +ovl_Bg_Spot01_Objects2 +ovl_Bg_Spot02_Objects +ovl_Bg_Spot03_Taki +ovl_Bg_Spot05_Soko +ovl_Bg_Spot06_Objects +ovl_Bg_Spot07_Taki +ovl_Bg_Spot08_Bakudankabe +ovl_Bg_Spot08_Iceblock +ovl_Bg_Spot09_Obj +ovl_Bg_Spot11_Bakudankabe +ovl_Bg_Spot11_Oasis +ovl_Bg_Spot12_Gate +ovl_Bg_Spot12_Saku +ovl_Bg_Spot15_Rrbox +ovl_Bg_Spot15_Saku +ovl_Bg_Spot16_Bombstone +ovl_Bg_Spot16_Doughnut +ovl_Bg_Spot17_Bakudankabe +ovl_Bg_Spot17_Funen +ovl_Bg_Spot18_Basket +ovl_Bg_Spot18_Futa +ovl_Bg_Spot18_Obj +ovl_Bg_Spot18_Shutter +ovl_Bg_Sst_Floor +ovl_Bg_Toki_Hikari +ovl_Bg_Toki_Swd +ovl_Bg_Treemouth +ovl_Bg_Umajump +ovl_Bg_Vb_Sima +ovl_Bg_Ydan_Hasi +ovl_Bg_Ydan_Maruta +ovl_Bg_Ydan_Sp +ovl_Bg_Zg +ovl_Boss_Dodongo +ovl_Boss_Fd +ovl_Boss_Fd2 +ovl_Boss_Ganon +ovl_Boss_Ganon2 +ovl_Boss_Ganondrof +ovl_Boss_Goma +ovl_Boss_Mo +ovl_Boss_Sst +ovl_Boss_Tw +ovl_Boss_Va +ovl_Demo_6K +ovl_Demo_Du +ovl_Demo_Ec +ovl_Demo_Effect +ovl_Demo_Ext +ovl_Demo_Geff +ovl_Demo_Gj +ovl_Demo_Go +ovl_Demo_Gt +ovl_Demo_Ik +ovl_Demo_Im +ovl_Demo_Kankyo +ovl_Demo_Kekkai +ovl_Demo_Sa +ovl_Demo_Shd +ovl_Demo_Tre_Lgt +ovl_Door_Ana +ovl_Door_Gerudo +ovl_Door_Killer +ovl_Door_Shutter +ovl_Door_Toki +ovl_Door_Warp1 +ovl_Efc_Erupc +ovl_Eff_Dust +ovl_Effect_Ss_Blast +ovl_Effect_Ss_Bomb +ovl_Effect_Ss_Bomb2 +ovl_Effect_Ss_Bubble +ovl_Effect_Ss_D_Fire +ovl_Effect_Ss_Dead_Db +ovl_Effect_Ss_Dead_Dd +ovl_Effect_Ss_Dead_Ds +ovl_Effect_Ss_Dead_Sound +ovl_Effect_Ss_Dt_Bubble +ovl_Effect_Ss_Dust +ovl_Effect_Ss_En_Fire +ovl_Effect_Ss_En_Ice +ovl_Effect_Ss_Extra +ovl_Effect_Ss_Fcircle +ovl_Effect_Ss_Fhg_Flash +ovl_Effect_Ss_Fire_Tail +ovl_Effect_Ss_G_Fire +ovl_Effect_Ss_G_Magma +ovl_Effect_Ss_G_Magma2 +ovl_Effect_Ss_G_Ripple +ovl_Effect_Ss_G_Spk +ovl_Effect_Ss_G_Splash +ovl_Effect_Ss_Hahen +ovl_Effect_Ss_HitMark +ovl_Effect_Ss_Ice_Piece +ovl_Effect_Ss_Ice_Smoke +ovl_Effect_Ss_K_Fire +ovl_Effect_Ss_Kakera +ovl_Effect_Ss_KiraKira +ovl_Effect_Ss_Lightning +ovl_Effect_Ss_Sibuki +ovl_Effect_Ss_Sibuki2 +ovl_Effect_Ss_Solder_Srch_Ball +ovl_Effect_Ss_Stick +ovl_Effect_Ss_Stone1 +ovl_Elf_Msg +ovl_Elf_Msg2 +ovl_En_Am +ovl_En_Ani +ovl_En_Anubice +ovl_En_Anubice_Fire +ovl_En_Anubice_Tag +ovl_En_Arow_Trap +ovl_En_Arrow +ovl_En_Attack_Niw +ovl_En_Ba +ovl_En_Bb +ovl_En_Bdfire +ovl_En_Bigokuta +ovl_En_Bili +ovl_En_Bird +ovl_En_Blkobj +ovl_En_Bom +ovl_En_Bom_Bowl_Man +ovl_En_Bom_Bowl_Pit +ovl_En_Bom_Chu +ovl_En_Bombf +ovl_En_Boom +ovl_En_Box +ovl_En_Brob +ovl_En_Bubble +ovl_En_Butte +ovl_En_Bw +ovl_En_Bx +ovl_En_Changer +ovl_En_Clear_Tag +ovl_En_Cow +ovl_En_Crow +ovl_En_Cs +ovl_En_Daiku +ovl_En_Daiku_Kakariko +ovl_En_Dekubaba +ovl_En_Dekunuts +ovl_En_Dh +ovl_En_Dha +ovl_En_Diving_Game +ovl_En_Dns +ovl_En_Dnt_Demo +ovl_En_Dnt_Jiji +ovl_En_Dnt_Nomal +ovl_En_Dodojr +ovl_En_Dodongo +ovl_En_Dog +ovl_En_Door +ovl_En_Ds +ovl_En_Du +ovl_En_Dy_Extra +ovl_En_Eg +ovl_En_Eiyer +ovl_En_Elf +ovl_En_Encount1 +ovl_En_Encount2 +ovl_En_Ex_Item +ovl_En_Ex_Ruppy +ovl_En_Fd +ovl_En_Fd_Fire +ovl_En_Fhg_Fire +ovl_En_Fire_Rock +ovl_En_Firefly +ovl_En_Fish +ovl_En_Floormas +ovl_En_Fr +ovl_En_Fu +ovl_En_Fw +ovl_En_Fz +ovl_En_G_Switch +ovl_En_Ganon_Mant +ovl_En_Ganon_Organ +ovl_En_Gb +ovl_En_Ge1 +ovl_En_Ge2 +ovl_En_Ge3 +ovl_En_GeldB +ovl_En_GirlA +ovl_En_Gm +ovl_En_Go +ovl_En_Go2 +ovl_En_Goma +ovl_En_Goroiwa +ovl_En_Gs +ovl_En_Guest +ovl_En_Hata +ovl_En_Heishi1 +ovl_En_Heishi2 +ovl_En_Heishi3 +ovl_En_Heishi4 +ovl_En_Hintnuts +ovl_En_Holl +ovl_En_Honotrap +ovl_En_Horse +ovl_En_Horse_Game_Check +ovl_En_Horse_Ganon +ovl_En_Horse_Link_Child +ovl_En_Horse_Normal +ovl_En_Horse_Zelda +ovl_En_Hs +ovl_En_Hs2 +ovl_En_Hy +ovl_En_Ice_Hono +ovl_En_Ik +ovl_En_In +ovl_En_Insect +ovl_En_Ishi +ovl_En_It +ovl_En_Jj +ovl_En_Js +ovl_En_Jsjutan +ovl_En_Kakasi +ovl_En_Kakasi2 +ovl_En_Kakasi3 +ovl_En_Kanban +ovl_En_Karebaba +ovl_En_Ko +ovl_En_Kusa +ovl_En_Kz +ovl_En_Light +ovl_En_Lightbox +ovl_En_M_Fire1 +ovl_En_M_Thunder +ovl_En_Ma1 +ovl_En_Ma2 +ovl_En_Ma3 +ovl_En_Mag +ovl_En_Mb +ovl_En_Md +ovl_En_Mk +ovl_En_Mm +ovl_En_Mm2 +ovl_En_Ms +ovl_En_Mu +ovl_En_Nb +ovl_En_Niw +ovl_En_Niw_Girl +ovl_En_Niw_Lady +ovl_En_Nutsball +ovl_En_Nwc +ovl_En_Ny +ovl_En_OE2 +ovl_En_Okarina_Effect +ovl_En_Okarina_Tag +ovl_En_Okuta +ovl_En_Ossan +ovl_En_Owl +ovl_En_Part +ovl_En_Peehat +ovl_En_Po_Desert +ovl_En_Po_Field +ovl_En_Po_Relay +ovl_En_Po_Sisters +ovl_En_Poh +ovl_En_Pu_box +ovl_En_Rd +ovl_En_Reeba +ovl_En_River_Sound +ovl_En_Rl +ovl_En_Rr +ovl_En_Ru1 +ovl_En_Ru2 +ovl_En_Sa +ovl_En_Sb +ovl_En_Scene_Change +ovl_En_Sda +ovl_En_Shopnuts +ovl_En_Si +ovl_En_Siofuki +ovl_En_Skb +ovl_En_Skj +ovl_En_Skjneedle +ovl_En_Ssh +ovl_En_St +ovl_En_Sth +ovl_En_Stream +ovl_En_Sw +ovl_En_Syateki_Itm +ovl_En_Syateki_Man +ovl_En_Syateki_Niw +ovl_En_Ta +ovl_En_Takara_Man +ovl_En_Tana +ovl_En_Tg +ovl_En_Tite +ovl_En_Tk +ovl_En_Torch +ovl_En_Torch2 +ovl_En_Toryo +ovl_En_Tp +ovl_En_Tr +ovl_En_Trap +ovl_En_Tubo_Trap +ovl_En_Vali +ovl_En_Vase +ovl_En_Vb_Ball +ovl_En_Viewer +ovl_En_Vm +ovl_En_Wall_Tubo +ovl_En_Wallmas +ovl_En_Weather_Tag +ovl_En_Weiyer +ovl_En_Wf +ovl_En_Wonder_Item +ovl_En_Wonder_Talk +ovl_En_Wonder_Talk2 +ovl_En_Wood02 +ovl_En_Xc +ovl_En_Yabusame_Mark +ovl_En_Yukabyun +ovl_En_Zf +ovl_En_Zl1 +ovl_En_Zl2 +ovl_En_Zl3 +ovl_En_Zl4 +ovl_En_Zo +ovl_En_fHG +ovl_End_Title +ovl_Fishing +ovl_Item_B_Heart +ovl_Item_Etcetera +ovl_Item_Inbox +ovl_Item_Ocarina +ovl_Item_Shield +ovl_Magic_Dark +ovl_Magic_Fire +ovl_Magic_Wind +ovl_Mir_Ray +ovl_Obj_Bean +ovl_Obj_Blockstop +ovl_Obj_Bombiwa +ovl_Obj_Comb +ovl_Obj_Dekujr +ovl_Obj_Elevator +ovl_Obj_Hamishi +ovl_Obj_Hana +ovl_Obj_Hsblock +ovl_Obj_Ice_Poly +ovl_Obj_Kibako +ovl_Obj_Kibako2 +ovl_Obj_Lift +ovl_Obj_Lightswitch +ovl_Obj_Makekinsuta +ovl_Obj_Makeoshihiki +ovl_Obj_Mure +ovl_Obj_Mure2 +ovl_Obj_Mure3 +ovl_Obj_Oshihiki +ovl_Obj_Roomtimer +ovl_Obj_Switch +ovl_Obj_Syokudai +ovl_Obj_Timeblock +ovl_Obj_Tsubo +ovl_Obj_Warp2block +ovl_Object_Kankyo +ovl_Oceff_Spot +ovl_Oceff_Storm +ovl_Oceff_Wipe +ovl_Oceff_Wipe2 +ovl_Oceff_Wipe3 +ovl_Oceff_Wipe4 +ovl_Shot_Sun +gameplay_keep +gameplay_field_keep +gameplay_dangeon_keep +gameplay_object_exchange_static +object_link_boy +object_link_child +object_box +object_human +object_okuta +object_poh +object_wallmaster +object_dy_obj +object_firefly +object_dodongo +object_fire +object_niw +object_tite +object_reeba +object_peehat +object_kingdodongo +object_horse +object_zf +object_goma +object_zl1 +object_gol +object_bubble +object_dodojr +object_torch2 +object_bl +object_tp +object_oA1 +object_st +object_bw +object_ei +object_horse_normal +object_oB1 +object_o_anime +object_spot04_objects +object_ddan_objects +object_hidan_objects +object_horse_ganon +object_oA2 +object_spot00_objects +object_mb +object_bombf +object_sk2 +object_oE1 +object_oE_anime +object_oE2 +object_ydan_objects +object_gnd +object_am +object_dekubaba +object_oA3 +object_oA4 +object_oA5 +object_oA6 +object_oA7 +object_jj +object_oA8 +object_oA9 +object_oB2 +object_oB3 +object_oB4 +object_horse_zelda +object_opening_demo1 +object_warp1 +object_b_heart +object_dekunuts +object_oE3 +object_oE4 +object_menkuri_objects +object_oE5 +object_oE6 +object_oE7 +object_oE8 +object_oE9 +object_oE10 +object_oE11 +object_oE12 +object_vali +object_oA10 +object_oA11 +object_mizu_objects +object_fhg +object_ossan +object_mori_hineri1 +object_Bb +object_toki_objects +object_yukabyun +object_zl2 +object_mjin +object_mjin_flash +object_mjin_dark +object_mjin_flame +object_mjin_ice +object_mjin_soul +object_mjin_wind +object_mjin_oka +object_haka_objects +object_spot06_objects +object_ice_objects +object_relay_objects +object_mori_hineri1a +object_mori_hineri2 +object_mori_hineri2a +object_mori_objects +object_mori_tex +object_spot08_obj +object_warp2 +object_hata +object_bird +object_wood02 +object_lightbox +object_pu_box +object_trap +object_vase +object_im +object_ta +object_tk +object_xc +object_vm +object_bv +object_hakach_objects +object_efc_crystal_light +object_efc_fire_ball +object_efc_flash +object_efc_lgt_shower +object_efc_star_field +object_god_lgt +object_light_ring +object_triforce_spot +object_medal +object_bdan_objects +object_sd +object_rd +object_po_sisters +object_heavy_object +object_gndd +object_fd +object_du +object_fw +object_horse_link_child +object_spot02_objects +object_haka +object_ru1 +object_syokudai +object_fd2 +object_dh +object_rl +object_efc_tw +object_demo_tre_lgt +object_gi_key +object_mir_ray +object_brob +object_gi_jewel +object_spot09_obj +object_spot18_obj +object_bdoor +object_spot17_obj +object_shop_dungen +object_nb +object_mo +object_sb +object_gi_melody +object_gi_heart +object_gi_compass +object_gi_bosskey +object_gi_medal +object_gi_nuts +object_sa +object_gi_hearts +object_gi_arrowcase +object_gi_bombpouch +object_in +object_tr +object_spot16_obj +object_oE1s +object_oE4s +object_os_anime +object_gi_bottle +object_gi_stick +object_gi_map +object_oF1d_map +object_ru2 +object_gi_shield_1 +object_dekujr +object_gi_magicpot +object_gi_bomb_1 +object_oF1s +object_ma2 +object_gi_purse +object_hni +object_tw +object_rr +object_bxa +object_anubice +object_gi_gerudo +object_gi_arrow +object_gi_bomb_2 +object_gi_egg +object_gi_scale +object_gi_shield_2 +object_gi_hookshot +object_gi_ocarina +object_gi_milk +object_ma1 +object_ganon +object_sst +object_ny +object_fr +object_gi_pachinko +object_gi_boomerang +object_gi_bow +object_gi_glasses +object_gi_liquid +object_ani +object_demo_6k +object_gi_shield_3 +object_gi_letter +object_spot15_obj +object_jya_obj +object_gi_clothes +object_gi_bean +object_gi_fish +object_gi_saw +object_gi_hammer +object_gi_grass +object_gi_longsword +object_spot01_objects +object_md +object_km1 +object_kw1 +object_zo +object_kz +object_umajump +object_masterkokiri +object_masterkokirihead +object_mastergolon +object_masterzoora +object_aob +object_ik +object_ahg +object_cne +object_gi_niwatori +object_skj +object_gi_bottle_letter +object_bji +object_bba +object_gi_ocarina_0 +object_ds +object_ane +object_boj +object_spot03_object +object_spot07_object +object_fz +object_bob +object_ge1 +object_yabusame_point +object_gi_boots_2 +object_gi_seed +object_gnd_magic +object_d_elevator +object_d_hsblock +object_d_lift +object_mamenoki +object_goroiwa +object_toryo +object_daiku +object_nwc +object_blkobj +object_gm +object_ms +object_hs +object_ingate +object_lightswitch +object_kusa +object_tsubo +object_gi_gloves +object_gi_coin +object_kanban +object_gjyo_objects +object_owl +object_mk +object_fu +object_gi_ki_tan_mask +object_gi_redead_mask +object_gi_skj_mask +object_gi_rabit_mask +object_gi_truth_mask +object_ganon_objects +object_siofuki +object_stream +object_mm +object_fa +object_os +object_gi_eye_lotion +object_gi_powder +object_gi_mushroom +object_gi_ticketstone +object_gi_brokensword +object_js +object_cs +object_gi_prescription +object_gi_bracelet +object_gi_soldout +object_gi_frog +object_mag +object_door_gerudo +object_gt +object_efc_erupc +object_zl2_anime1 +object_zl2_anime2 +object_gi_golonmask +object_gi_zoramask +object_gi_gerudomask +object_ganon2 +object_ka +object_ts +object_zg +object_gi_hoverboots +object_gi_m_arrow +object_ds2 +object_ec +object_fish +object_gi_sutaru +object_gi_goddess +object_ssh +object_bigokuta +object_bg +object_spot05_objects +object_spot12_obj +object_bombiwa +object_hintnuts +object_rs +object_spot00_break +object_gla +object_shopnuts +object_geldb +object_gr +object_dog +object_jya_iron +object_jya_door +object_spot01_objects2 +object_spot11_obj +object_kibako2 +object_dns +object_dnk +object_gi_fire +object_gi_insect +object_gi_butterfly +object_gi_ghost +object_gi_soul +object_bowl +object_po_field +object_demo_kekkai +object_efc_doughnut +object_gi_dekupouch +object_ganon_anime1 +object_ganon_anime2 +object_ganon_anime3 +object_gi_rupy +object_spot01_matoya +object_spot01_matoyab +object_po_composer +object_mu +object_wf +object_skb +object_gj +object_geff +object_haka_door +object_gs +object_ps +object_bwall +object_crow +object_cow +object_cob +object_gi_sword_1 +object_door_killer +object_ouke_haka +object_timeblock +object_zl4 +g_pn_01 +g_pn_02 +g_pn_03 +g_pn_04 +g_pn_05 +g_pn_06 +g_pn_07 +g_pn_08 +g_pn_09 +g_pn_10 +g_pn_11 +g_pn_12 +g_pn_13 +g_pn_14 +g_pn_15 +g_pn_16 +g_pn_17 +g_pn_18 +g_pn_19 +g_pn_20 +g_pn_21 +g_pn_22 +g_pn_23 +g_pn_24 +g_pn_25 +g_pn_26 +g_pn_27 +g_pn_28 +g_pn_29 +g_pn_30 +g_pn_31 +g_pn_32 +g_pn_33 +g_pn_34 +g_pn_35 +g_pn_36 +g_pn_37 +g_pn_38 +g_pn_39 +g_pn_40 +g_pn_41 +g_pn_42 +g_pn_43 +g_pn_44 +g_pn_45 +g_pn_46 +g_pn_47 +g_pn_48 +g_pn_49 +g_pn_50 +g_pn_51 +g_pn_52 +g_pn_53 +g_pn_54 +g_pn_55 +g_pn_56 +g_pn_57 +z_select_static +nintendo_rogo_static +title_static +parameter_static +vr_fine0_static +vr_fine0_pal_static +vr_fine1_static +vr_fine1_pal_static +vr_fine2_static +vr_fine2_pal_static +vr_fine3_static +vr_fine3_pal_static +vr_cloud0_static +vr_cloud0_pal_static +vr_cloud1_static +vr_cloud1_pal_static +vr_cloud2_static +vr_cloud2_pal_static +vr_cloud3_static +vr_cloud3_pal_static +vr_holy0_static +vr_holy0_pal_static +vr_holy1_static +vr_holy1_pal_static +vr_MDVR_static +vr_MDVR_pal_static +vr_MNVR_static +vr_MNVR_pal_static +vr_RUVR_static +vr_RUVR_pal_static +vr_LHVR_static +vr_LHVR_pal_static +vr_KHVR_static +vr_KHVR_pal_static +vr_K3VR_static +vr_K3VR_pal_static +vr_K4VR_static +vr_K4VR_pal_static +vr_K5VR_static +vr_K5VR_pal_static +vr_SP1a_static +vr_SP1a_pal_static +vr_MLVR_static +vr_MLVR_pal_static +vr_KKRVR_static +vr_KKRVR_pal_static +vr_KR3VR_static +vr_KR3VR_pal_static +vr_IPVR_static +vr_IPVR_pal_static +vr_KSVR_static +vr_KSVR_pal_static +vr_GLVR_static +vr_GLVR_pal_static +vr_ZRVR_static +vr_ZRVR_pal_static +vr_DGVR_static +vr_DGVR_pal_static +vr_ALVR_static +vr_ALVR_pal_static +vr_NSVR_static +vr_NSVR_pal_static +vr_LBVR_static +vr_LBVR_pal_static +vr_TTVR_static +vr_TTVR_pal_static +vr_FCVR_static +vr_FCVR_pal_static +elf_message_field +elf_message_ydan +ydan_scene +ydan_room_0 +ydan_room_1 +ydan_room_2 +ydan_room_3 +ydan_room_4 +ydan_room_5 +ydan_room_6 +ydan_room_7 +ydan_room_8 +ydan_room_9 +ydan_room_10 +ydan_room_11 +ddan_scene +ddan_room_0 +ddan_room_1 +ddan_room_2 +ddan_room_3 +ddan_room_4 +ddan_room_5 +ddan_room_6 +ddan_room_7 +ddan_room_8 +ddan_room_9 +ddan_room_10 +ddan_room_11 +ddan_room_12 +ddan_room_13 +ddan_room_14 +ddan_room_15 +ddan_room_16 +bdan_scene +bdan_room_0 +bdan_room_1 +bdan_room_2 +bdan_room_3 +bdan_room_4 +bdan_room_5 +bdan_room_6 +bdan_room_7 +bdan_room_8 +bdan_room_9 +bdan_room_10 +bdan_room_11 +bdan_room_12 +bdan_room_13 +bdan_room_14 +bdan_room_15 +Bmori1_scene +Bmori1_room_0 +Bmori1_room_1 +Bmori1_room_2 +Bmori1_room_3 +Bmori1_room_4 +Bmori1_room_5 +Bmori1_room_6 +Bmori1_room_7 +Bmori1_room_8 +Bmori1_room_9 +Bmori1_room_10 +Bmori1_room_11 +Bmori1_room_12 +Bmori1_room_13 +Bmori1_room_14 +Bmori1_room_15 +Bmori1_room_16 +Bmori1_room_17 +Bmori1_room_18 +Bmori1_room_19 +Bmori1_room_20 +Bmori1_room_21 +Bmori1_room_22 +HIDAN_scene +HIDAN_room_0 +HIDAN_room_1 +HIDAN_room_2 +HIDAN_room_3 +HIDAN_room_4 +HIDAN_room_5 +HIDAN_room_6 +HIDAN_room_7 +HIDAN_room_8 +HIDAN_room_9 +HIDAN_room_10 +HIDAN_room_11 +HIDAN_room_12 +HIDAN_room_13 +HIDAN_room_14 +HIDAN_room_15 +HIDAN_room_16 +HIDAN_room_17 +HIDAN_room_18 +HIDAN_room_19 +HIDAN_room_20 +HIDAN_room_21 +HIDAN_room_22 +HIDAN_room_23 +HIDAN_room_24 +HIDAN_room_25 +HIDAN_room_26 +MIZUsin_scene +MIZUsin_room_0 +MIZUsin_room_1 +MIZUsin_room_2 +MIZUsin_room_3 +MIZUsin_room_4 +MIZUsin_room_5 +MIZUsin_room_6 +MIZUsin_room_7 +MIZUsin_room_8 +MIZUsin_room_9 +MIZUsin_room_10 +MIZUsin_room_11 +MIZUsin_room_12 +MIZUsin_room_13 +MIZUsin_room_14 +MIZUsin_room_15 +MIZUsin_room_16 +MIZUsin_room_17 +MIZUsin_room_18 +MIZUsin_room_19 +MIZUsin_room_20 +MIZUsin_room_21 +MIZUsin_room_22 +jyasinzou_scene +jyasinzou_room_0 +jyasinzou_room_1 +jyasinzou_room_2 +jyasinzou_room_3 +jyasinzou_room_4 +jyasinzou_room_5 +jyasinzou_room_6 +jyasinzou_room_7 +jyasinzou_room_8 +jyasinzou_room_9 +jyasinzou_room_10 +jyasinzou_room_11 +jyasinzou_room_12 +jyasinzou_room_13 +jyasinzou_room_14 +jyasinzou_room_15 +jyasinzou_room_16 +jyasinzou_room_17 +jyasinzou_room_18 +jyasinzou_room_19 +jyasinzou_room_20 +jyasinzou_room_21 +jyasinzou_room_22 +jyasinzou_room_23 +jyasinzou_room_24 +jyasinzou_room_25 +jyasinzou_room_26 +jyasinzou_room_27 +jyasinzou_room_28 +HAKAdan_scene +HAKAdan_room_0 +HAKAdan_room_1 +HAKAdan_room_2 +HAKAdan_room_3 +HAKAdan_room_4 +HAKAdan_room_5 +HAKAdan_room_6 +HAKAdan_room_7 +HAKAdan_room_8 +HAKAdan_room_9 +HAKAdan_room_10 +HAKAdan_room_11 +HAKAdan_room_12 +HAKAdan_room_13 +HAKAdan_room_14 +HAKAdan_room_15 +HAKAdan_room_16 +HAKAdan_room_17 +HAKAdan_room_18 +HAKAdan_room_19 +HAKAdan_room_20 +HAKAdan_room_21 +HAKAdan_room_22 +HAKAdanCH_scene +HAKAdanCH_room_0 +HAKAdanCH_room_1 +HAKAdanCH_room_2 +HAKAdanCH_room_3 +HAKAdanCH_room_4 +HAKAdanCH_room_5 +HAKAdanCH_room_6 +ice_doukutu_scene +ice_doukutu_room_0 +ice_doukutu_room_1 +ice_doukutu_room_2 +ice_doukutu_room_3 +ice_doukutu_room_4 +ice_doukutu_room_5 +ice_doukutu_room_6 +ice_doukutu_room_7 +ice_doukutu_room_8 +ice_doukutu_room_9 +ice_doukutu_room_10 +ice_doukutu_room_11 +men_scene +men_room_0 +men_room_1 +men_room_2 +men_room_3 +men_room_4 +men_room_5 +men_room_6 +men_room_7 +men_room_8 +men_room_9 +men_room_10 +ganontika_scene +ganontika_room_0 +ganontika_room_1 +ganontika_room_2 +ganontika_room_3 +ganontika_room_4 +ganontika_room_5 +ganontika_room_6 +ganontika_room_7 +ganontika_room_8 +ganontika_room_9 +ganontika_room_10 +ganontika_room_11 +ganontika_room_12 +ganontika_room_13 +ganontika_room_14 +ganontika_room_15 +ganontika_room_16 +ganontika_room_17 +ganontika_room_18 +ganontika_room_19 +spot00_scene +spot00_room_0 +spot01_scene +spot01_room_0 +spot02_scene +spot02_room_0 +spot02_room_1 +spot03_scene +spot03_room_0 +spot03_room_1 +spot04_scene +spot04_room_0 +spot04_room_1 +spot04_room_2 +spot05_scene +spot05_room_0 +spot06_scene +spot06_room_0 +spot07_scene +spot07_room_0 +spot07_room_1 +spot08_scene +spot08_room_0 +spot09_scene +spot09_room_0 +spot10_scene +spot10_room_0 +spot10_room_1 +spot10_room_2 +spot10_room_3 +spot10_room_4 +spot10_room_5 +spot10_room_6 +spot10_room_7 +spot10_room_8 +spot10_room_9 +spot11_scene +spot11_room_0 +spot12_scene +spot12_room_0 +spot12_room_1 +spot13_scene +spot13_room_0 +spot13_room_1 +spot15_scene +spot15_room_0 +spot16_scene +spot16_room_0 +spot17_scene +spot17_room_0 +spot17_room_1 +spot18_scene +spot18_room_0 +spot18_room_1 +spot18_room_2 +spot18_room_3 +market_day_scene +market_day_room_0 +market_night_scene +market_night_room_0 +kenjyanoma_scene +kenjyanoma_room_0 +tokinoma_scene +tokinoma_room_0 +tokinoma_room_1 +link_home_scene +link_home_room_0 +kokiri_shop_scene +kokiri_shop_room_0 +kokiri_home_scene +kokiri_home_room_0 +kakusiana_scene +kakusiana_room_0 +kakusiana_room_1 +kakusiana_room_2 +kakusiana_room_3 +kakusiana_room_4 +kakusiana_room_5 +kakusiana_room_6 +kakusiana_room_7 +kakusiana_room_8 +kakusiana_room_9 +kakusiana_room_10 +kakusiana_room_11 +kakusiana_room_12 +kakusiana_room_13 +entra_scene +entra_room_0 +moribossroom_scene +moribossroom_room_0 +moribossroom_room_1 +syatekijyou_scene +syatekijyou_room_0 +shop1_scene +shop1_room_0 +hairal_niwa_scene +hairal_niwa_room_0 +ganon_tou_scene +ganon_tou_room_0 +market_alley_scene +market_alley_room_0 +spot20_scene +spot20_room_0 +market_ruins_scene +market_ruins_room_0 +entra_n_scene +entra_n_room_0 +enrui_scene +enrui_room_0 +market_alley_n_scene +market_alley_n_room_0 +hiral_demo_scene +hiral_demo_room_0 +kokiri_home3_scene +kokiri_home3_room_0 +malon_stable_scene +malon_stable_room_0 +kakariko_scene +kakariko_room_0 +bdan_boss_scene +bdan_boss_room_0 +bdan_boss_room_1 +FIRE_bs_scene +FIRE_bs_room_0 +FIRE_bs_room_1 +hut_scene +hut_room_0 +daiyousei_izumi_scene +daiyousei_izumi_room_0 +hakaana_scene +hakaana_room_0 +yousei_izumi_tate_scene +yousei_izumi_tate_room_0 +yousei_izumi_yoko_scene +yousei_izumi_yoko_room_0 +golon_scene +golon_room_0 +zoora_scene +zoora_room_0 +drag_scene +drag_room_0 +alley_shop_scene +alley_shop_room_0 +night_shop_scene +night_shop_room_0 +impa_scene +impa_room_0 +labo_scene +labo_room_0 +tent_scene +tent_room_0 +nakaniwa_scene +nakaniwa_room_0 +ddan_boss_scene +ddan_boss_room_0 +ddan_boss_room_1 +ydan_boss_scene +ydan_boss_room_0 +ydan_boss_room_1 +HAKAdan_bs_scene +HAKAdan_bs_room_0 +HAKAdan_bs_room_1 +MIZUsin_bs_scene +MIZUsin_bs_room_0 +MIZUsin_bs_room_1 +ganon_scene +ganon_room_0 +ganon_room_1 +ganon_room_2 +ganon_room_3 +ganon_room_4 +ganon_room_5 +ganon_room_6 +ganon_room_7 +ganon_room_8 +ganon_room_9 +ganon_boss_scene +ganon_boss_room_0 +jyasinboss_scene +jyasinboss_room_0 +jyasinboss_room_1 +jyasinboss_room_2 +jyasinboss_room_3 +kokiri_home4_scene +kokiri_home4_room_0 +kokiri_home5_scene +kokiri_home5_room_0 +ganon_final_scene +ganon_final_room_0 +kakariko3_scene +kakariko3_room_0 +hakasitarelay_scene +hakasitarelay_room_0 +hakasitarelay_room_1 +hakasitarelay_room_2 +hakasitarelay_room_3 +hakasitarelay_room_4 +hakasitarelay_room_5 +hakasitarelay_room_6 +shrine_scene +shrine_room_0 +turibori_scene +turibori_room_0 +shrine_n_scene +shrine_n_room_0 +shrine_r_scene +shrine_r_room_0 +hakaana2_scene +hakaana2_room_0 +gerudoway_scene +gerudoway_room_0 +gerudoway_room_1 +gerudoway_room_2 +gerudoway_room_3 +gerudoway_room_4 +gerudoway_room_5 +hairal_niwa_n_scene +hairal_niwa_n_room_0 +bowling_scene +bowling_room_0 +hakaana_ouke_scene +hakaana_ouke_room_0 +hakaana_ouke_room_1 +hakaana_ouke_room_2 +hylia_labo_scene +hylia_labo_room_0 +souko_scene +souko_room_0 +souko_room_1 +souko_room_2 +miharigoya_scene +miharigoya_room_0 +mahouya_scene +mahouya_room_0 +takaraya_scene +takaraya_room_0 +takaraya_room_1 +takaraya_room_2 +takaraya_room_3 +takaraya_room_4 +takaraya_room_5 +takaraya_room_6 +ganon_sonogo_scene +ganon_sonogo_room_0 +ganon_sonogo_room_1 +ganon_sonogo_room_2 +ganon_sonogo_room_3 +ganon_sonogo_room_4 +ganon_demo_scene +ganon_demo_room_0 +face_shop_scene +face_shop_room_0 +kinsuta_scene +kinsuta_room_0 +ganontikasonogo_scene +ganontikasonogo_room_0 +ganontikasonogo_room_1 +bump_texture_static +anime_model_1_static +anime_model_2_static +anime_model_3_static +anime_model_4_static +anime_model_5_static +anime_model_6_static +anime_texture_1_static +anime_texture_2_static +anime_texture_3_static +anime_texture_4_static +anime_texture_5_static +anime_texture_6_static +softsprite_matrix_static \ No newline at end of file diff --git a/OTRExporter/CFG/filelists/gamecube_pal.txt b/OTRExporter/CFG/filelists/gamecube_pal.txt new file mode 100644 index 000000000..c9746c1da --- /dev/null +++ b/OTRExporter/CFG/filelists/gamecube_pal.txt @@ -0,0 +1,1510 @@ +makerom +boot +dmadata +Audiobank +Audioseq +Audiotable +link_animetion +icon_item_static +icon_item_24_static +icon_item_field_static +icon_item_dungeon_static +icon_item_gameover_static +icon_item_nes_static +icon_item_ger_static +icon_item_fra_static +item_name_static +map_name_static +do_action_static +message_static +message_texture_static +nes_font_static +nes_message_data_static +ger_message_data_static +fra_message_data_static +staff_message_data_static +map_grand_static +map_48x85_static +map_i_static +code +ovl_title +ovl_select +ovl_opening +ovl_file_choose +ovl_kaleido_scope +ovl_player_actor +ovl_map_mark_data +ovl_En_Test +ovl_Arms_Hook +ovl_Arrow_Fire +ovl_Arrow_Ice +ovl_Arrow_Light +ovl_Bg_Bdan_Objects +ovl_Bg_Bdan_Switch +ovl_Bg_Bom_Guard +ovl_Bg_Bombwall +ovl_Bg_Bowl_Wall +ovl_Bg_Breakwall +ovl_Bg_Ddan_Jd +ovl_Bg_Ddan_Kd +ovl_Bg_Dodoago +ovl_Bg_Dy_Yoseizo +ovl_Bg_Ganon_Otyuka +ovl_Bg_Gate_Shutter +ovl_Bg_Gjyo_Bridge +ovl_Bg_Gnd_Darkmeiro +ovl_Bg_Gnd_Firemeiro +ovl_Bg_Gnd_Iceblock +ovl_Bg_Gnd_Nisekabe +ovl_Bg_Gnd_Soulmeiro +ovl_Bg_Haka +ovl_Bg_Haka_Gate +ovl_Bg_Haka_Huta +ovl_Bg_Haka_Megane +ovl_Bg_Haka_MeganeBG +ovl_Bg_Haka_Sgami +ovl_Bg_Haka_Ship +ovl_Bg_Haka_Trap +ovl_Bg_Haka_Tubo +ovl_Bg_Haka_Water +ovl_Bg_Haka_Zou +ovl_Bg_Heavy_Block +ovl_Bg_Hidan_Curtain +ovl_Bg_Hidan_Dalm +ovl_Bg_Hidan_Firewall +ovl_Bg_Hidan_Fslift +ovl_Bg_Hidan_Fwbig +ovl_Bg_Hidan_Hamstep +ovl_Bg_Hidan_Hrock +ovl_Bg_Hidan_Kousi +ovl_Bg_Hidan_Kowarerukabe +ovl_Bg_Hidan_Rock +ovl_Bg_Hidan_Rsekizou +ovl_Bg_Hidan_Sekizou +ovl_Bg_Hidan_Sima +ovl_Bg_Hidan_Syoku +ovl_Bg_Ice_Objects +ovl_Bg_Ice_Shelter +ovl_Bg_Ice_Shutter +ovl_Bg_Ice_Turara +ovl_Bg_Ingate +ovl_Bg_Jya_1flift +ovl_Bg_Jya_Amishutter +ovl_Bg_Jya_Bigmirror +ovl_Bg_Jya_Block +ovl_Bg_Jya_Bombchuiwa +ovl_Bg_Jya_Bombiwa +ovl_Bg_Jya_Cobra +ovl_Bg_Jya_Goroiwa +ovl_Bg_Jya_Haheniron +ovl_Bg_Jya_Ironobj +ovl_Bg_Jya_Kanaami +ovl_Bg_Jya_Lift +ovl_Bg_Jya_Megami +ovl_Bg_Jya_Zurerukabe +ovl_Bg_Menkuri_Eye +ovl_Bg_Menkuri_Kaiten +ovl_Bg_Menkuri_Nisekabe +ovl_Bg_Mizu_Bwall +ovl_Bg_Mizu_Movebg +ovl_Bg_Mizu_Shutter +ovl_Bg_Mizu_Uzu +ovl_Bg_Mizu_Water +ovl_Bg_Mjin +ovl_Bg_Mori_Bigst +ovl_Bg_Mori_Elevator +ovl_Bg_Mori_Hashigo +ovl_Bg_Mori_Hashira4 +ovl_Bg_Mori_Hineri +ovl_Bg_Mori_Idomizu +ovl_Bg_Mori_Kaitenkabe +ovl_Bg_Mori_Rakkatenjo +ovl_Bg_Po_Event +ovl_Bg_Po_Syokudai +ovl_Bg_Pushbox +ovl_Bg_Relay_Objects +ovl_Bg_Spot00_Break +ovl_Bg_Spot00_Hanebasi +ovl_Bg_Spot01_Fusya +ovl_Bg_Spot01_Idohashira +ovl_Bg_Spot01_Idomizu +ovl_Bg_Spot01_Idosoko +ovl_Bg_Spot01_Objects2 +ovl_Bg_Spot02_Objects +ovl_Bg_Spot03_Taki +ovl_Bg_Spot05_Soko +ovl_Bg_Spot06_Objects +ovl_Bg_Spot07_Taki +ovl_Bg_Spot08_Bakudankabe +ovl_Bg_Spot08_Iceblock +ovl_Bg_Spot09_Obj +ovl_Bg_Spot11_Bakudankabe +ovl_Bg_Spot11_Oasis +ovl_Bg_Spot12_Gate +ovl_Bg_Spot12_Saku +ovl_Bg_Spot15_Rrbox +ovl_Bg_Spot15_Saku +ovl_Bg_Spot16_Bombstone +ovl_Bg_Spot16_Doughnut +ovl_Bg_Spot17_Bakudankabe +ovl_Bg_Spot17_Funen +ovl_Bg_Spot18_Basket +ovl_Bg_Spot18_Futa +ovl_Bg_Spot18_Obj +ovl_Bg_Spot18_Shutter +ovl_Bg_Sst_Floor +ovl_Bg_Toki_Hikari +ovl_Bg_Toki_Swd +ovl_Bg_Treemouth +ovl_Bg_Umajump +ovl_Bg_Vb_Sima +ovl_Bg_Ydan_Hasi +ovl_Bg_Ydan_Maruta +ovl_Bg_Ydan_Sp +ovl_Bg_Zg +ovl_Boss_Dodongo +ovl_Boss_Fd +ovl_Boss_Fd2 +ovl_Boss_Ganon +ovl_Boss_Ganon2 +ovl_Boss_Ganondrof +ovl_Boss_Goma +ovl_Boss_Mo +ovl_Boss_Sst +ovl_Boss_Tw +ovl_Boss_Va +ovl_Demo_6K +ovl_Demo_Du +ovl_Demo_Ec +ovl_Demo_Effect +ovl_Demo_Ext +ovl_Demo_Geff +ovl_Demo_Gj +ovl_Demo_Go +ovl_Demo_Gt +ovl_Demo_Ik +ovl_Demo_Im +ovl_Demo_Kankyo +ovl_Demo_Kekkai +ovl_Demo_Sa +ovl_Demo_Shd +ovl_Demo_Tre_Lgt +ovl_Door_Ana +ovl_Door_Gerudo +ovl_Door_Killer +ovl_Door_Shutter +ovl_Door_Toki +ovl_Door_Warp1 +ovl_Efc_Erupc +ovl_Eff_Dust +ovl_Effect_Ss_Blast +ovl_Effect_Ss_Bomb +ovl_Effect_Ss_Bomb2 +ovl_Effect_Ss_Bubble +ovl_Effect_Ss_D_Fire +ovl_Effect_Ss_Dead_Db +ovl_Effect_Ss_Dead_Dd +ovl_Effect_Ss_Dead_Ds +ovl_Effect_Ss_Dead_Sound +ovl_Effect_Ss_Dt_Bubble +ovl_Effect_Ss_Dust +ovl_Effect_Ss_En_Fire +ovl_Effect_Ss_En_Ice +ovl_Effect_Ss_Extra +ovl_Effect_Ss_Fcircle +ovl_Effect_Ss_Fhg_Flash +ovl_Effect_Ss_Fire_Tail +ovl_Effect_Ss_G_Fire +ovl_Effect_Ss_G_Magma +ovl_Effect_Ss_G_Magma2 +ovl_Effect_Ss_G_Ripple +ovl_Effect_Ss_G_Spk +ovl_Effect_Ss_G_Splash +ovl_Effect_Ss_Hahen +ovl_Effect_Ss_HitMark +ovl_Effect_Ss_Ice_Piece +ovl_Effect_Ss_Ice_Smoke +ovl_Effect_Ss_K_Fire +ovl_Effect_Ss_Kakera +ovl_Effect_Ss_KiraKira +ovl_Effect_Ss_Lightning +ovl_Effect_Ss_Sibuki +ovl_Effect_Ss_Sibuki2 +ovl_Effect_Ss_Solder_Srch_Ball +ovl_Effect_Ss_Stick +ovl_Effect_Ss_Stone1 +ovl_Elf_Msg +ovl_Elf_Msg2 +ovl_En_Am +ovl_En_Ani +ovl_En_Anubice +ovl_En_Anubice_Fire +ovl_En_Anubice_Tag +ovl_En_Arow_Trap +ovl_En_Arrow +ovl_En_Attack_Niw +ovl_En_Ba +ovl_En_Bb +ovl_En_Bdfire +ovl_En_Bigokuta +ovl_En_Bili +ovl_En_Bird +ovl_En_Blkobj +ovl_En_Bom +ovl_En_Bom_Bowl_Man +ovl_En_Bom_Bowl_Pit +ovl_En_Bom_Chu +ovl_En_Bombf +ovl_En_Boom +ovl_En_Box +ovl_En_Brob +ovl_En_Bubble +ovl_En_Butte +ovl_En_Bw +ovl_En_Bx +ovl_En_Changer +ovl_En_Clear_Tag +ovl_En_Cow +ovl_En_Crow +ovl_En_Cs +ovl_En_Daiku +ovl_En_Daiku_Kakariko +ovl_En_Dekubaba +ovl_En_Dekunuts +ovl_En_Dh +ovl_En_Dha +ovl_En_Diving_Game +ovl_En_Dns +ovl_En_Dnt_Demo +ovl_En_Dnt_Jiji +ovl_En_Dnt_Nomal +ovl_En_Dodojr +ovl_En_Dodongo +ovl_En_Dog +ovl_En_Door +ovl_En_Ds +ovl_En_Du +ovl_En_Dy_Extra +ovl_En_Eg +ovl_En_Eiyer +ovl_En_Elf +ovl_En_Encount1 +ovl_En_Encount2 +ovl_En_Ex_Item +ovl_En_Ex_Ruppy +ovl_En_Fd +ovl_En_Fd_Fire +ovl_En_Fhg_Fire +ovl_En_Fire_Rock +ovl_En_Firefly +ovl_En_Fish +ovl_En_Floormas +ovl_En_Fr +ovl_En_Fu +ovl_En_Fw +ovl_En_Fz +ovl_En_G_Switch +ovl_En_Ganon_Mant +ovl_En_Ganon_Organ +ovl_En_Gb +ovl_En_Ge1 +ovl_En_Ge2 +ovl_En_Ge3 +ovl_En_GeldB +ovl_En_GirlA +ovl_En_Gm +ovl_En_Go +ovl_En_Go2 +ovl_En_Goma +ovl_En_Goroiwa +ovl_En_Gs +ovl_En_Guest +ovl_En_Hata +ovl_En_Heishi1 +ovl_En_Heishi2 +ovl_En_Heishi3 +ovl_En_Heishi4 +ovl_En_Hintnuts +ovl_En_Holl +ovl_En_Honotrap +ovl_En_Horse +ovl_En_Horse_Game_Check +ovl_En_Horse_Ganon +ovl_En_Horse_Link_Child +ovl_En_Horse_Normal +ovl_En_Horse_Zelda +ovl_En_Hs +ovl_En_Hs2 +ovl_En_Hy +ovl_En_Ice_Hono +ovl_En_Ik +ovl_En_In +ovl_En_Insect +ovl_En_Ishi +ovl_En_It +ovl_En_Jj +ovl_En_Js +ovl_En_Jsjutan +ovl_En_Kakasi +ovl_En_Kakasi2 +ovl_En_Kakasi3 +ovl_En_Kanban +ovl_En_Karebaba +ovl_En_Ko +ovl_En_Kusa +ovl_En_Kz +ovl_En_Light +ovl_En_Lightbox +ovl_En_M_Fire1 +ovl_En_M_Thunder +ovl_En_Ma1 +ovl_En_Ma2 +ovl_En_Ma3 +ovl_En_Mag +ovl_En_Mb +ovl_En_Md +ovl_En_Mk +ovl_En_Mm +ovl_En_Mm2 +ovl_En_Ms +ovl_En_Mu +ovl_En_Nb +ovl_En_Niw +ovl_En_Niw_Girl +ovl_En_Niw_Lady +ovl_En_Nutsball +ovl_En_Nwc +ovl_En_Ny +ovl_En_OE2 +ovl_En_Okarina_Effect +ovl_En_Okarina_Tag +ovl_En_Okuta +ovl_En_Ossan +ovl_En_Owl +ovl_En_Part +ovl_En_Peehat +ovl_En_Po_Desert +ovl_En_Po_Field +ovl_En_Po_Relay +ovl_En_Po_Sisters +ovl_En_Poh +ovl_En_Pu_box +ovl_En_Rd +ovl_En_Reeba +ovl_En_River_Sound +ovl_En_Rl +ovl_En_Rr +ovl_En_Ru1 +ovl_En_Ru2 +ovl_En_Sa +ovl_En_Sb +ovl_En_Scene_Change +ovl_En_Sda +ovl_En_Shopnuts +ovl_En_Si +ovl_En_Siofuki +ovl_En_Skb +ovl_En_Skj +ovl_En_Skjneedle +ovl_En_Ssh +ovl_En_St +ovl_En_Sth +ovl_En_Stream +ovl_En_Sw +ovl_En_Syateki_Itm +ovl_En_Syateki_Man +ovl_En_Syateki_Niw +ovl_En_Ta +ovl_En_Takara_Man +ovl_En_Tana +ovl_En_Tg +ovl_En_Tite +ovl_En_Tk +ovl_En_Torch +ovl_En_Torch2 +ovl_En_Toryo +ovl_En_Tp +ovl_En_Tr +ovl_En_Trap +ovl_En_Tubo_Trap +ovl_En_Vali +ovl_En_Vase +ovl_En_Vb_Ball +ovl_En_Viewer +ovl_En_Vm +ovl_En_Wall_Tubo +ovl_En_Wallmas +ovl_En_Weather_Tag +ovl_En_Weiyer +ovl_En_Wf +ovl_En_Wonder_Item +ovl_En_Wonder_Talk +ovl_En_Wonder_Talk2 +ovl_En_Wood02 +ovl_En_Xc +ovl_En_Yabusame_Mark +ovl_En_Yukabyun +ovl_En_Zf +ovl_En_Zl1 +ovl_En_Zl2 +ovl_En_Zl3 +ovl_En_Zl4 +ovl_En_Zo +ovl_En_fHG +ovl_End_Title +ovl_Fishing +ovl_Item_B_Heart +ovl_Item_Etcetera +ovl_Item_Inbox +ovl_Item_Ocarina +ovl_Item_Shield +ovl_Magic_Dark +ovl_Magic_Fire +ovl_Magic_Wind +ovl_Mir_Ray +ovl_Obj_Bean +ovl_Obj_Blockstop +ovl_Obj_Bombiwa +ovl_Obj_Comb +ovl_Obj_Dekujr +ovl_Obj_Elevator +ovl_Obj_Hamishi +ovl_Obj_Hana +ovl_Obj_Hsblock +ovl_Obj_Ice_Poly +ovl_Obj_Kibako +ovl_Obj_Kibako2 +ovl_Obj_Lift +ovl_Obj_Lightswitch +ovl_Obj_Makekinsuta +ovl_Obj_Makeoshihiki +ovl_Obj_Mure +ovl_Obj_Mure2 +ovl_Obj_Mure3 +ovl_Obj_Oshihiki +ovl_Obj_Roomtimer +ovl_Obj_Switch +ovl_Obj_Syokudai +ovl_Obj_Timeblock +ovl_Obj_Tsubo +ovl_Obj_Warp2block +ovl_Object_Kankyo +ovl_Oceff_Spot +ovl_Oceff_Storm +ovl_Oceff_Wipe +ovl_Oceff_Wipe2 +ovl_Oceff_Wipe3 +ovl_Oceff_Wipe4 +ovl_Shot_Sun +gameplay_keep +gameplay_field_keep +gameplay_dangeon_keep +gameplay_object_exchange_static +object_link_boy +object_link_child +object_box +object_human +object_okuta +object_poh +object_wallmaster +object_dy_obj +object_firefly +object_dodongo +object_fire +object_niw +object_tite +object_reeba +object_peehat +object_kingdodongo +object_horse +object_zf +object_goma +object_zl1 +object_gol +object_bubble +object_dodojr +object_torch2 +object_bl +object_tp +object_oA1 +object_st +object_bw +object_ei +object_horse_normal +object_oB1 +object_o_anime +object_spot04_objects +object_ddan_objects +object_hidan_objects +object_horse_ganon +object_oA2 +object_spot00_objects +object_mb +object_bombf +object_sk2 +object_oE1 +object_oE_anime +object_oE2 +object_ydan_objects +object_gnd +object_am +object_dekubaba +object_oA3 +object_oA4 +object_oA5 +object_oA6 +object_oA7 +object_jj +object_oA8 +object_oA9 +object_oB2 +object_oB3 +object_oB4 +object_horse_zelda +object_opening_demo1 +object_warp1 +object_b_heart +object_dekunuts +object_oE3 +object_oE4 +object_menkuri_objects +object_oE5 +object_oE6 +object_oE7 +object_oE8 +object_oE9 +object_oE10 +object_oE11 +object_oE12 +object_vali +object_oA10 +object_oA11 +object_mizu_objects +object_fhg +object_ossan +object_mori_hineri1 +object_Bb +object_toki_objects +object_yukabyun +object_zl2 +object_mjin +object_mjin_flash +object_mjin_dark +object_mjin_flame +object_mjin_ice +object_mjin_soul +object_mjin_wind +object_mjin_oka +object_haka_objects +object_spot06_objects +object_ice_objects +object_relay_objects +object_mori_hineri1a +object_mori_hineri2 +object_mori_hineri2a +object_mori_objects +object_mori_tex +object_spot08_obj +object_warp2 +object_hata +object_bird +object_wood02 +object_lightbox +object_pu_box +object_trap +object_vase +object_im +object_ta +object_tk +object_xc +object_vm +object_bv +object_hakach_objects +object_efc_crystal_light +object_efc_fire_ball +object_efc_flash +object_efc_lgt_shower +object_efc_star_field +object_god_lgt +object_light_ring +object_triforce_spot +object_medal +object_bdan_objects +object_sd +object_rd +object_po_sisters +object_heavy_object +object_gndd +object_fd +object_du +object_fw +object_horse_link_child +object_spot02_objects +object_haka +object_ru1 +object_syokudai +object_fd2 +object_dh +object_rl +object_efc_tw +object_demo_tre_lgt +object_gi_key +object_mir_ray +object_brob +object_gi_jewel +object_spot09_obj +object_spot18_obj +object_bdoor +object_spot17_obj +object_shop_dungen +object_nb +object_mo +object_sb +object_gi_melody +object_gi_heart +object_gi_compass +object_gi_bosskey +object_gi_medal +object_gi_nuts +object_sa +object_gi_hearts +object_gi_arrowcase +object_gi_bombpouch +object_in +object_tr +object_spot16_obj +object_oE1s +object_oE4s +object_os_anime +object_gi_bottle +object_gi_stick +object_gi_map +object_oF1d_map +object_ru2 +object_gi_shield_1 +object_dekujr +object_gi_magicpot +object_gi_bomb_1 +object_oF1s +object_ma2 +object_gi_purse +object_hni +object_tw +object_rr +object_bxa +object_anubice +object_gi_gerudo +object_gi_arrow +object_gi_bomb_2 +object_gi_egg +object_gi_scale +object_gi_shield_2 +object_gi_hookshot +object_gi_ocarina +object_gi_milk +object_ma1 +object_ganon +object_sst +object_ny +object_fr +object_gi_pachinko +object_gi_boomerang +object_gi_bow +object_gi_glasses +object_gi_liquid +object_ani +object_demo_6k +object_gi_shield_3 +object_gi_letter +object_spot15_obj +object_jya_obj +object_gi_clothes +object_gi_bean +object_gi_fish +object_gi_saw +object_gi_hammer +object_gi_grass +object_gi_longsword +object_spot01_objects +object_md +object_km1 +object_kw1 +object_zo +object_kz +object_umajump +object_masterkokiri +object_masterkokirihead +object_mastergolon +object_masterzoora +object_aob +object_ik +object_ahg +object_cne +object_gi_niwatori +object_skj +object_gi_bottle_letter +object_bji +object_bba +object_gi_ocarina_0 +object_ds +object_ane +object_boj +object_spot03_object +object_spot07_object +object_fz +object_bob +object_ge1 +object_yabusame_point +object_gi_boots_2 +object_gi_seed +object_gnd_magic +object_d_elevator +object_d_hsblock +object_d_lift +object_mamenoki +object_goroiwa +object_toryo +object_daiku +object_nwc +object_blkobj +object_gm +object_ms +object_hs +object_ingate +object_lightswitch +object_kusa +object_tsubo +object_gi_gloves +object_gi_coin +object_kanban +object_gjyo_objects +object_owl +object_mk +object_fu +object_gi_ki_tan_mask +object_gi_redead_mask +object_gi_skj_mask +object_gi_rabit_mask +object_gi_truth_mask +object_ganon_objects +object_siofuki +object_stream +object_mm +object_fa +object_os +object_gi_eye_lotion +object_gi_powder +object_gi_mushroom +object_gi_ticketstone +object_gi_brokensword +object_js +object_cs +object_gi_prescription +object_gi_bracelet +object_gi_soldout +object_gi_frog +object_mag +object_door_gerudo +object_gt +object_efc_erupc +object_zl2_anime1 +object_zl2_anime2 +object_gi_golonmask +object_gi_zoramask +object_gi_gerudomask +object_ganon2 +object_ka +object_ts +object_zg +object_gi_hoverboots +object_gi_m_arrow +object_ds2 +object_ec +object_fish +object_gi_sutaru +object_gi_goddess +object_ssh +object_bigokuta +object_bg +object_spot05_objects +object_spot12_obj +object_bombiwa +object_hintnuts +object_rs +object_spot00_break +object_gla +object_shopnuts +object_geldb +object_gr +object_dog +object_jya_iron +object_jya_door +object_spot01_objects2 +object_spot11_obj +object_kibako2 +object_dns +object_dnk +object_gi_fire +object_gi_insect +object_gi_butterfly +object_gi_ghost +object_gi_soul +object_bowl +object_po_field +object_demo_kekkai +object_efc_doughnut +object_gi_dekupouch +object_ganon_anime1 +object_ganon_anime2 +object_ganon_anime3 +object_gi_rupy +object_spot01_matoya +object_spot01_matoyab +object_po_composer +object_mu +object_wf +object_skb +object_gj +object_geff +object_haka_door +object_gs +object_ps +object_bwall +object_crow +object_cow +object_cob +object_gi_sword_1 +object_door_killer +object_ouke_haka +object_timeblock +object_zl4 +g_pn_01 +g_pn_02 +g_pn_03 +g_pn_04 +g_pn_05 +g_pn_06 +g_pn_07 +g_pn_08 +g_pn_09 +g_pn_10 +g_pn_11 +g_pn_12 +g_pn_13 +g_pn_14 +g_pn_15 +g_pn_16 +g_pn_17 +g_pn_18 +g_pn_19 +g_pn_20 +g_pn_21 +g_pn_22 +g_pn_23 +g_pn_24 +g_pn_25 +g_pn_26 +g_pn_27 +g_pn_28 +g_pn_29 +g_pn_30 +g_pn_31 +g_pn_32 +g_pn_33 +g_pn_34 +g_pn_35 +g_pn_36 +g_pn_37 +g_pn_38 +g_pn_39 +g_pn_40 +g_pn_41 +g_pn_42 +g_pn_43 +g_pn_44 +g_pn_45 +g_pn_46 +g_pn_47 +g_pn_48 +g_pn_49 +g_pn_50 +g_pn_51 +g_pn_52 +g_pn_53 +g_pn_54 +g_pn_55 +g_pn_56 +g_pn_57 +z_select_static +nintendo_rogo_static +title_static +parameter_static +vr_fine0_static +vr_fine0_pal_static +vr_fine1_static +vr_fine1_pal_static +vr_fine2_static +vr_fine2_pal_static +vr_fine3_static +vr_fine3_pal_static +vr_cloud0_static +vr_cloud0_pal_static +vr_cloud1_static +vr_cloud1_pal_static +vr_cloud2_static +vr_cloud2_pal_static +vr_cloud3_static +vr_cloud3_pal_static +vr_holy0_static +vr_holy0_pal_static +vr_holy1_static +vr_holy1_pal_static +vr_MDVR_static +vr_MDVR_pal_static +vr_MNVR_static +vr_MNVR_pal_static +vr_RUVR_static +vr_RUVR_pal_static +vr_LHVR_static +vr_LHVR_pal_static +vr_KHVR_static +vr_KHVR_pal_static +vr_K3VR_static +vr_K3VR_pal_static +vr_K4VR_static +vr_K4VR_pal_static +vr_K5VR_static +vr_K5VR_pal_static +vr_SP1a_static +vr_SP1a_pal_static +vr_MLVR_static +vr_MLVR_pal_static +vr_KKRVR_static +vr_KKRVR_pal_static +vr_KR3VR_static +vr_KR3VR_pal_static +vr_IPVR_static +vr_IPVR_pal_static +vr_KSVR_static +vr_KSVR_pal_static +vr_GLVR_static +vr_GLVR_pal_static +vr_ZRVR_static +vr_ZRVR_pal_static +vr_DGVR_static +vr_DGVR_pal_static +vr_ALVR_static +vr_ALVR_pal_static +vr_NSVR_static +vr_NSVR_pal_static +vr_LBVR_static +vr_LBVR_pal_static +vr_TTVR_static +vr_TTVR_pal_static +vr_FCVR_static +vr_FCVR_pal_static +elf_message_field +elf_message_ydan +ydan_scene +ydan_room_0 +ydan_room_1 +ydan_room_2 +ydan_room_3 +ydan_room_4 +ydan_room_5 +ydan_room_6 +ydan_room_7 +ydan_room_8 +ydan_room_9 +ydan_room_10 +ydan_room_11 +ddan_scene +ddan_room_0 +ddan_room_1 +ddan_room_2 +ddan_room_3 +ddan_room_4 +ddan_room_5 +ddan_room_6 +ddan_room_7 +ddan_room_8 +ddan_room_9 +ddan_room_10 +ddan_room_11 +ddan_room_12 +ddan_room_13 +ddan_room_14 +ddan_room_15 +ddan_room_16 +bdan_scene +bdan_room_0 +bdan_room_1 +bdan_room_2 +bdan_room_3 +bdan_room_4 +bdan_room_5 +bdan_room_6 +bdan_room_7 +bdan_room_8 +bdan_room_9 +bdan_room_10 +bdan_room_11 +bdan_room_12 +bdan_room_13 +bdan_room_14 +bdan_room_15 +Bmori1_scene +Bmori1_room_0 +Bmori1_room_1 +Bmori1_room_2 +Bmori1_room_3 +Bmori1_room_4 +Bmori1_room_5 +Bmori1_room_6 +Bmori1_room_7 +Bmori1_room_8 +Bmori1_room_9 +Bmori1_room_10 +Bmori1_room_11 +Bmori1_room_12 +Bmori1_room_13 +Bmori1_room_14 +Bmori1_room_15 +Bmori1_room_16 +Bmori1_room_17 +Bmori1_room_18 +Bmori1_room_19 +Bmori1_room_20 +Bmori1_room_21 +Bmori1_room_22 +HIDAN_scene +HIDAN_room_0 +HIDAN_room_1 +HIDAN_room_2 +HIDAN_room_3 +HIDAN_room_4 +HIDAN_room_5 +HIDAN_room_6 +HIDAN_room_7 +HIDAN_room_8 +HIDAN_room_9 +HIDAN_room_10 +HIDAN_room_11 +HIDAN_room_12 +HIDAN_room_13 +HIDAN_room_14 +HIDAN_room_15 +HIDAN_room_16 +HIDAN_room_17 +HIDAN_room_18 +HIDAN_room_19 +HIDAN_room_20 +HIDAN_room_21 +HIDAN_room_22 +HIDAN_room_23 +HIDAN_room_24 +HIDAN_room_25 +HIDAN_room_26 +MIZUsin_scene +MIZUsin_room_0 +MIZUsin_room_1 +MIZUsin_room_2 +MIZUsin_room_3 +MIZUsin_room_4 +MIZUsin_room_5 +MIZUsin_room_6 +MIZUsin_room_7 +MIZUsin_room_8 +MIZUsin_room_9 +MIZUsin_room_10 +MIZUsin_room_11 +MIZUsin_room_12 +MIZUsin_room_13 +MIZUsin_room_14 +MIZUsin_room_15 +MIZUsin_room_16 +MIZUsin_room_17 +MIZUsin_room_18 +MIZUsin_room_19 +MIZUsin_room_20 +MIZUsin_room_21 +MIZUsin_room_22 +jyasinzou_scene +jyasinzou_room_0 +jyasinzou_room_1 +jyasinzou_room_2 +jyasinzou_room_3 +jyasinzou_room_4 +jyasinzou_room_5 +jyasinzou_room_6 +jyasinzou_room_7 +jyasinzou_room_8 +jyasinzou_room_9 +jyasinzou_room_10 +jyasinzou_room_11 +jyasinzou_room_12 +jyasinzou_room_13 +jyasinzou_room_14 +jyasinzou_room_15 +jyasinzou_room_16 +jyasinzou_room_17 +jyasinzou_room_18 +jyasinzou_room_19 +jyasinzou_room_20 +jyasinzou_room_21 +jyasinzou_room_22 +jyasinzou_room_23 +jyasinzou_room_24 +jyasinzou_room_25 +jyasinzou_room_26 +jyasinzou_room_27 +jyasinzou_room_28 +HAKAdan_scene +HAKAdan_room_0 +HAKAdan_room_1 +HAKAdan_room_2 +HAKAdan_room_3 +HAKAdan_room_4 +HAKAdan_room_5 +HAKAdan_room_6 +HAKAdan_room_7 +HAKAdan_room_8 +HAKAdan_room_9 +HAKAdan_room_10 +HAKAdan_room_11 +HAKAdan_room_12 +HAKAdan_room_13 +HAKAdan_room_14 +HAKAdan_room_15 +HAKAdan_room_16 +HAKAdan_room_17 +HAKAdan_room_18 +HAKAdan_room_19 +HAKAdan_room_20 +HAKAdan_room_21 +HAKAdan_room_22 +HAKAdanCH_scene +HAKAdanCH_room_0 +HAKAdanCH_room_1 +HAKAdanCH_room_2 +HAKAdanCH_room_3 +HAKAdanCH_room_4 +HAKAdanCH_room_5 +HAKAdanCH_room_6 +ice_doukutu_scene +ice_doukutu_room_0 +ice_doukutu_room_1 +ice_doukutu_room_2 +ice_doukutu_room_3 +ice_doukutu_room_4 +ice_doukutu_room_5 +ice_doukutu_room_6 +ice_doukutu_room_7 +ice_doukutu_room_8 +ice_doukutu_room_9 +ice_doukutu_room_10 +ice_doukutu_room_11 +men_scene +men_room_0 +men_room_1 +men_room_2 +men_room_3 +men_room_4 +men_room_5 +men_room_6 +men_room_7 +men_room_8 +men_room_9 +men_room_10 +ganontika_scene +ganontika_room_0 +ganontika_room_1 +ganontika_room_2 +ganontika_room_3 +ganontika_room_4 +ganontika_room_5 +ganontika_room_6 +ganontika_room_7 +ganontika_room_8 +ganontika_room_9 +ganontika_room_10 +ganontika_room_11 +ganontika_room_12 +ganontika_room_13 +ganontika_room_14 +ganontika_room_15 +ganontika_room_16 +ganontika_room_17 +ganontika_room_18 +ganontika_room_19 +spot00_scene +spot00_room_0 +spot01_scene +spot01_room_0 +spot02_scene +spot02_room_0 +spot02_room_1 +spot03_scene +spot03_room_0 +spot03_room_1 +spot04_scene +spot04_room_0 +spot04_room_1 +spot04_room_2 +spot05_scene +spot05_room_0 +spot06_scene +spot06_room_0 +spot07_scene +spot07_room_0 +spot07_room_1 +spot08_scene +spot08_room_0 +spot09_scene +spot09_room_0 +spot10_scene +spot10_room_0 +spot10_room_1 +spot10_room_2 +spot10_room_3 +spot10_room_4 +spot10_room_5 +spot10_room_6 +spot10_room_7 +spot10_room_8 +spot10_room_9 +spot11_scene +spot11_room_0 +spot12_scene +spot12_room_0 +spot12_room_1 +spot13_scene +spot13_room_0 +spot13_room_1 +spot15_scene +spot15_room_0 +spot16_scene +spot16_room_0 +spot17_scene +spot17_room_0 +spot17_room_1 +spot18_scene +spot18_room_0 +spot18_room_1 +spot18_room_2 +spot18_room_3 +market_day_scene +market_day_room_0 +market_night_scene +market_night_room_0 +kenjyanoma_scene +kenjyanoma_room_0 +tokinoma_scene +tokinoma_room_0 +tokinoma_room_1 +link_home_scene +link_home_room_0 +kokiri_shop_scene +kokiri_shop_room_0 +kokiri_home_scene +kokiri_home_room_0 +kakusiana_scene +kakusiana_room_0 +kakusiana_room_1 +kakusiana_room_2 +kakusiana_room_3 +kakusiana_room_4 +kakusiana_room_5 +kakusiana_room_6 +kakusiana_room_7 +kakusiana_room_8 +kakusiana_room_9 +kakusiana_room_10 +kakusiana_room_11 +kakusiana_room_12 +kakusiana_room_13 +entra_scene +entra_room_0 +moribossroom_scene +moribossroom_room_0 +moribossroom_room_1 +syatekijyou_scene +syatekijyou_room_0 +shop1_scene +shop1_room_0 +hairal_niwa_scene +hairal_niwa_room_0 +ganon_tou_scene +ganon_tou_room_0 +market_alley_scene +market_alley_room_0 +spot20_scene +spot20_room_0 +market_ruins_scene +market_ruins_room_0 +entra_n_scene +entra_n_room_0 +enrui_scene +enrui_room_0 +market_alley_n_scene +market_alley_n_room_0 +hiral_demo_scene +hiral_demo_room_0 +kokiri_home3_scene +kokiri_home3_room_0 +malon_stable_scene +malon_stable_room_0 +kakariko_scene +kakariko_room_0 +bdan_boss_scene +bdan_boss_room_0 +bdan_boss_room_1 +FIRE_bs_scene +FIRE_bs_room_0 +FIRE_bs_room_1 +hut_scene +hut_room_0 +daiyousei_izumi_scene +daiyousei_izumi_room_0 +hakaana_scene +hakaana_room_0 +yousei_izumi_tate_scene +yousei_izumi_tate_room_0 +yousei_izumi_yoko_scene +yousei_izumi_yoko_room_0 +golon_scene +golon_room_0 +zoora_scene +zoora_room_0 +drag_scene +drag_room_0 +alley_shop_scene +alley_shop_room_0 +night_shop_scene +night_shop_room_0 +impa_scene +impa_room_0 +labo_scene +labo_room_0 +tent_scene +tent_room_0 +nakaniwa_scene +nakaniwa_room_0 +ddan_boss_scene +ddan_boss_room_0 +ddan_boss_room_1 +ydan_boss_scene +ydan_boss_room_0 +ydan_boss_room_1 +HAKAdan_bs_scene +HAKAdan_bs_room_0 +HAKAdan_bs_room_1 +MIZUsin_bs_scene +MIZUsin_bs_room_0 +MIZUsin_bs_room_1 +ganon_scene +ganon_room_0 +ganon_room_1 +ganon_room_2 +ganon_room_3 +ganon_room_4 +ganon_room_5 +ganon_room_6 +ganon_room_7 +ganon_room_8 +ganon_room_9 +ganon_boss_scene +ganon_boss_room_0 +jyasinboss_scene +jyasinboss_room_0 +jyasinboss_room_1 +jyasinboss_room_2 +jyasinboss_room_3 +kokiri_home4_scene +kokiri_home4_room_0 +kokiri_home5_scene +kokiri_home5_room_0 +ganon_final_scene +ganon_final_room_0 +kakariko3_scene +kakariko3_room_0 +hakasitarelay_scene +hakasitarelay_room_0 +hakasitarelay_room_1 +hakasitarelay_room_2 +hakasitarelay_room_3 +hakasitarelay_room_4 +hakasitarelay_room_5 +hakasitarelay_room_6 +shrine_scene +shrine_room_0 +turibori_scene +turibori_room_0 +shrine_n_scene +shrine_n_room_0 +shrine_r_scene +shrine_r_room_0 +hakaana2_scene +hakaana2_room_0 +gerudoway_scene +gerudoway_room_0 +gerudoway_room_1 +gerudoway_room_2 +gerudoway_room_3 +gerudoway_room_4 +gerudoway_room_5 +hairal_niwa_n_scene +hairal_niwa_n_room_0 +bowling_scene +bowling_room_0 +hakaana_ouke_scene +hakaana_ouke_room_0 +hakaana_ouke_room_1 +hakaana_ouke_room_2 +hylia_labo_scene +hylia_labo_room_0 +souko_scene +souko_room_0 +souko_room_1 +souko_room_2 +miharigoya_scene +miharigoya_room_0 +mahouya_scene +mahouya_room_0 +takaraya_scene +takaraya_room_0 +takaraya_room_1 +takaraya_room_2 +takaraya_room_3 +takaraya_room_4 +takaraya_room_5 +takaraya_room_6 +ganon_sonogo_scene +ganon_sonogo_room_0 +ganon_sonogo_room_1 +ganon_sonogo_room_2 +ganon_sonogo_room_3 +ganon_sonogo_room_4 +ganon_demo_scene +ganon_demo_room_0 +face_shop_scene +face_shop_room_0 +kinsuta_scene +kinsuta_room_0 +ganontikasonogo_scene +ganontikasonogo_room_0 +ganontikasonogo_room_1 +bump_texture_static +anime_model_1_static +anime_model_2_static +anime_model_3_static +anime_model_4_static +anime_model_5_static +anime_model_6_static +anime_texture_1_static +anime_texture_2_static +anime_texture_3_static +anime_texture_4_static +anime_texture_5_static +anime_texture_6_static +softsprite_matrix_static \ No newline at end of file diff --git a/OTRExporter/OTRExporter/DisplayListExporter.cpp b/OTRExporter/OTRExporter/DisplayListExporter.cpp index 4d4f067b1..dafa8eb72 100644 --- a/OTRExporter/OTRExporter/DisplayListExporter.cpp +++ b/OTRExporter/OTRExporter/DisplayListExporter.cpp @@ -209,7 +209,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina break; case G_MTX: { - if ((!Globals::Instance->HasSegment(GETSEGNUM(data))) || ((data & 0xFFFFFFFF) == 0x07000000)) // En_Zf and En_Ny place a DL in segment 7 + if ((!Globals::Instance->HasSegment(GETSEGNUM(data), res->parent->workerID)) || ((data & 0xFFFFFFFF) == 0x07000000)) // En_Zf and En_Ny place a DL in segment 7 { uint32_t pp = (data & 0x000000FF00000000) >> 32; uint32_t mm = (data & 0x00000000FFFFFFFF); @@ -370,7 +370,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina //std::string fName = StringHelper::Sprintf("%s\\%s", GetParentFolderName(res).c_str(), dListDecl2->varName.c_str()); std::string fName = OTRExporter_DisplayList::GetPathToRes(res, dListDecl2->varName.c_str()); - if (!File::Exists("Extract\\" + fName)) + if (files.find(fName) == files.end() && !File::Exists("Extract\\" + fName)) { MemoryStream* dlStream = new MemoryStream(); BinaryWriter dlWriter = BinaryWriter(dlStream); @@ -382,7 +382,10 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina //otrArchive->RemoveFile(fName); #endif - File::WriteAllBytes("Extract\\" + fName, dlStream->ToVector()); + if (Globals::Instance->fileMode != ZFileMode::ExtractDirectory) + File::WriteAllBytes("Extract\\" + fName, dlStream->ToVector()); + else + files[fName] = dlStream->ToVector(); //otrArchive->AddFile(fName, (uintptr_t)dlStream->ToVector().data(), dlWriter.GetBaseAddress()); } @@ -401,7 +404,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina //case G_BRANCH_Z: case G_DL: { - if ((!Globals::Instance->HasSegment(GETSEGNUM(data)) && (int)opF3D != G_BRANCH_Z) + if ((!Globals::Instance->HasSegment(GETSEGNUM(data), res->parent->workerID) && (int)opF3D != G_BRANCH_Z) || ((data & 0xFFFFFFFF) == 0x07000000)) // En_Zf and En_Ny place a DL in segment 7 { int32_t pp = (data & 0x00FF000000000000) >> 56; @@ -464,14 +467,17 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina //std::string fName = StringHelper::Sprintf("%s\\%s", GetParentFolderName(res).c_str(), dListDecl2->varName.c_str()); std::string fName = OTRExporter_DisplayList::GetPathToRes(res, dListDecl2->varName.c_str()); - if (!File::Exists("Extract\\" + fName)) + if (files.find(fName) == files.end() && !File::Exists("Extract\\" + fName)) { MemoryStream* dlStream = new MemoryStream(); BinaryWriter dlWriter = BinaryWriter(dlStream); Save(dList->otherDLists[i], outPath, &dlWriter); - File::WriteAllBytes("Extract\\" + fName, dlStream->ToVector()); + if (Globals::Instance->fileMode != ZFileMode::ExtractDirectory) + File::WriteAllBytes("Extract\\" + fName, dlStream->ToVector()); + else + files[fName] = dlStream->ToVector(); } } else @@ -675,7 +681,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina uint32_t seg = data & 0xFFFFFFFF; int32_t texAddress = Seg2Filespace(data, dList->parent->baseAddress); - if (!Globals::Instance->HasSegment(GETSEGNUM(seg))) + if (!Globals::Instance->HasSegment(GETSEGNUM(seg), res->parent->workerID)) { int32_t __ = (data & 0x00FF000000000000) >> 48; int32_t www = (data & 0x00000FFF00000000) >> 32; @@ -693,7 +699,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina else { std::string texName = ""; - bool foundDecl = Globals::Instance->GetSegmentedPtrName(seg, dList->parent, "", texName); + bool foundDecl = Globals::Instance->GetSegmentedPtrName(seg, dList->parent, "", texName, res->parent->workerID); int32_t __ = (data & 0x00FF000000000000) >> 48; int32_t www = (data & 0x00000FFF00000000) >> 32; @@ -712,7 +718,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina if (foundDecl) { - ZFile* assocFile = Globals::Instance->GetSegment(GETSEGNUM(seg)); + ZFile* assocFile = Globals::Instance->GetSegment(GETSEGNUM(seg), res->parent->workerID); std::string assocFileName = assocFile->GetName(); std::string fName = ""; @@ -750,42 +756,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina word1 = value.words.w1 | 0xF0000000; } else - //if (dList->vertices.size() > 0) { - // Connect neighboring vertex arrays - std::vector>> vertsKeys(dList->vertices.begin(), - dList->vertices.end()); - - if (vertsKeys.size() > 0) - { - auto lastItem = vertsKeys[0]; - - for (size_t i = 1; i < vertsKeys.size(); i++) - { - auto curItem = vertsKeys[i]; - - int32_t sizeDiff = curItem.first - (lastItem.first + (lastItem.second.size() * 16)); - - // Make sure there isn't an unaccounted inbetween these two - if (sizeDiff == 0) - { - for (auto v : curItem.second) - { - dList->vertices[lastItem.first].push_back(v); - lastItem.second.push_back(v); - } - - dList->vertices.erase(curItem.first); - vertsKeys.erase(vertsKeys.begin() + i); - - i--; - continue; - } - - lastItem = curItem; - } - } - // Write CRC64 of vtx file name uint32_t addr = data & 0xFFFFFFFF; @@ -793,10 +764,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina addr -= dList->parent->baseAddress; auto segOffset = GETSEGOFFSET(addr); - //uint32_t seg = data & 0xFFFFFFFF; Declaration* vtxDecl = dList->parent->GetDeclarationRanged(segOffset); - //std::string vtxName = ""; - //bool foundDecl = Globals::Instance->GetSegmentedPtrName(seg, dList->parent, "", vtxName); int32_t aa = (data & 0x000000FF00000000ULL) >> 32; int32_t nn = (data & 0x000FF00000000000ULL) >> 44; @@ -822,9 +790,8 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina word0 = hash >> 32; word1 = hash & 0xFFFFFFFF; - if (!File::Exists("Extract\\" + fName)) + if (files.find(fName) == files.end() && !File::Exists("Extract\\" + fName)) { - //printf("Exporting VTX Data %s\n", fName.c_str()); // Write vertices to file MemoryStream* vtxStream = new MemoryStream(); BinaryWriter vtxWriter = BinaryWriter(vtxStream); @@ -847,44 +814,40 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina vtxWriter.Write((uint32_t)ZResourceType::Vertex); vtxWriter.Write((uint32_t)arrCnt); - size_t sz = dList->vertices[vtxDecl->address].size(); + auto start = std::chrono::steady_clock::now(); - //if (sz > 0) + // God dammit this is so dumb + for (size_t i = 0; i < split.size(); i++) { - auto start = std::chrono::steady_clock::now(); + std::string line = split[i]; - // God dammit this is so dumb - for (size_t i = 0; i < split.size(); i++) + if (StringHelper::Contains(line, "VTX(")) { - std::string line = split[i]; + auto split2 = StringHelper::Split(StringHelper::Split(StringHelper::Split(line, "VTX(")[1], ")")[0], ","); - if (StringHelper::Contains(line, "VTX(")) - { - auto split2 = StringHelper::Split(StringHelper::Split(StringHelper::Split(line, "VTX(")[1], ")")[0], ","); + vtxWriter.Write((int16_t)std::stoi(split2[0], nullptr, 10)); // v.x + vtxWriter.Write((int16_t)std::stoi(split2[1], nullptr, 10)); // v.y + vtxWriter.Write((int16_t)std::stoi(split2[2], nullptr, 10)); // v.z - vtxWriter.Write((int16_t)std::stoi(split2[0], nullptr, 10)); // v.x - vtxWriter.Write((int16_t)std::stoi(split2[1], nullptr, 10)); // v.y - vtxWriter.Write((int16_t)std::stoi(split2[2], nullptr, 10)); // v.z + vtxWriter.Write((int16_t)0); // v.flag - vtxWriter.Write((int16_t)0); // v.flag - - vtxWriter.Write((int16_t)std::stoi(split2[3], nullptr, 10)); // v.s - vtxWriter.Write((int16_t)std::stoi(split2[4], nullptr, 10)); // v.t - - vtxWriter.Write((uint8_t)std::stoi(split2[5], nullptr, 10)); // v.r - vtxWriter.Write((uint8_t)std::stoi(split2[6], nullptr, 10)); // v.g - vtxWriter.Write((uint8_t)std::stoi(split2[7], nullptr, 10)); // v.b - vtxWriter.Write((uint8_t)std::stoi(split2[8], nullptr, 10)); // v.a - } + vtxWriter.Write((int16_t)std::stoi(split2[3], nullptr, 10)); // v.s + vtxWriter.Write((int16_t)std::stoi(split2[4], nullptr, 10)); // v.t + + vtxWriter.Write((uint8_t)std::stoi(split2[5], nullptr, 10)); // v.r + vtxWriter.Write((uint8_t)std::stoi(split2[6], nullptr, 10)); // v.g + vtxWriter.Write((uint8_t)std::stoi(split2[7], nullptr, 10)); // v.b + vtxWriter.Write((uint8_t)std::stoi(split2[8], nullptr, 10)); // v.a } - - File::WriteAllBytes("Extract\\" + fName, vtxStream->ToVector()); - - auto end = std::chrono::steady_clock::now(); - size_t diff = std::chrono::duration_cast(end - start).count(); - - //printf("Exported VTX Array %s in %zums\n", fName.c_str(), diff); } + + if (Globals::Instance->fileMode != ZFileMode::ExtractDirectory) + File::WriteAllBytes("Extract\\" + fName, vtxStream->ToVector()); + else + files[fName] = vtxStream->ToVector(); + + auto end = std::chrono::steady_clock::now(); + size_t diff = std::chrono::duration_cast(end - start).count(); } } else @@ -892,15 +855,6 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina spdlog::error("vtxDecl == nullptr!"); } } - /*else - { - writer->Write(word0); - writer->Write(word1); - word0 = 0; - word1 = 0; - - spdlog::error("dList->vertices.size() <= 0!"); - }*/ } break; } diff --git a/OTRExporter/OTRExporter/Main.cpp b/OTRExporter/OTRExporter/Main.cpp index 24a156fe9..e62ed5ef4 100644 --- a/OTRExporter/OTRExporter/Main.cpp +++ b/OTRExporter/OTRExporter/Main.cpp @@ -25,6 +25,7 @@ std::string otrFileName = "oot.otr"; std::shared_ptr otrArchive; BinaryWriter* fileWriter; std::chrono::steady_clock::time_point fileStart, resStart; +std::map> files; void InitVersionInfo(); @@ -39,6 +40,8 @@ static void ExporterParseFileMode(const std::string& buildMode, ZFileMode& fileM { fileMode = (ZFileMode)ExporterFileMode::BuildOTR; + printf("BOTR: Generating OTR Archive...\n"); + if (File::Exists(otrFileName)) otrArchive = std::shared_ptr(new Ship::Archive(otrFileName, true)); else @@ -54,6 +57,31 @@ static void ExporterParseFileMode(const std::string& buildMode, ZFileMode& fileM } } +static void ExporterProgramEnd() +{ + if (Globals::Instance->fileMode == ZFileMode::ExtractDirectory) + { + printf("Generating OTR Archive...\n"); + otrArchive = Ship::Archive::CreateArchive(otrFileName, 65536 / 2); + + for (auto item : files) + { + auto fileData = item.second; + otrArchive->AddFile(item.first, (uintptr_t)fileData.data(), fileData.size()); + } + + // Add any additional files that need to be manually copied... + auto lst = Directory::ListFiles("Extract"); + + for (auto item : lst) + { + auto fileData = File::ReadAllBytes(item); + otrArchive->AddFile(StringHelper::Split(item, "Extract\\")[1], (uintptr_t)fileData.data(), fileData.size()); + } + } +} + + static void ExporterParseArgs(int argc, char* argv[], int& i) { std::string arg = argv[i]; @@ -85,6 +113,7 @@ static void ExporterFileBegin(ZFile* file) static void ExporterFileEnd(ZFile* file) { + int bp = 0; } static void ExporterResourceEnd(ZResource* res, BinaryWriter& writer) @@ -124,7 +153,10 @@ static void ExporterResourceEnd(ZResource* res, BinaryWriter& writer) else fName = StringHelper::Sprintf("%s\\%s", oName.c_str(), rName.c_str()); - File::WriteAllBytes("Extract\\" + fName, strem->ToVector()); + if (Globals::Instance->fileMode == ZFileMode::ExtractDirectory) + files[fName] = strem->ToVector(); + else + File::WriteAllBytes("Extract\\" + fName, strem->ToVector()); } auto end = std::chrono::steady_clock::now(); @@ -155,6 +187,8 @@ static void ImportExporters() exporterSet->beginXMLFunc = ExporterXMLBegin; exporterSet->endXMLFunc = ExporterXMLEnd; exporterSet->resSaveFunc = ExporterResourceEnd; + exporterSet->endProgramFunc = ExporterProgramEnd; + exporterSet->exporters[ZResourceType::Background] = new OTRExporter_Background(); exporterSet->exporters[ZResourceType::Texture] = new OTRExporter_Texture(); exporterSet->exporters[ZResourceType::Room] = new OTRExporter_Room(); diff --git a/OTRExporter/OTRExporter/Main.h b/OTRExporter/OTRExporter/Main.h index a29e21859..af4ada763 100644 --- a/OTRExporter/OTRExporter/Main.h +++ b/OTRExporter/OTRExporter/Main.h @@ -2,4 +2,5 @@ #include -extern std::shared_ptr otrArchive; \ No newline at end of file +extern std::shared_ptr otrArchive; +extern std::map> files; \ No newline at end of file diff --git a/OTRExporter/OTRExporter/OTRExporter.vcxproj b/OTRExporter/OTRExporter/OTRExporter.vcxproj index 96531304b..4ed7d72e1 100644 --- a/OTRExporter/OTRExporter/OTRExporter.vcxproj +++ b/OTRExporter/OTRExporter/OTRExporter.vcxproj @@ -63,6 +63,12 @@ + + + {02d10590-9542-3f55-aaf8-6055677e2a2a} + false + + 16.0 Win32Proj @@ -118,19 +124,31 @@ true $(SolutionDir)otrlib;$(SolutionDir)\ZAPD\ZAPD\;$(SolutionDir)\ZAPD\lib\tinyxml2;$(SolutionDir)\ZAPD\lib\libgfxd;$(SolutionDir)\ZAPD\lib\elfio;$(SolutionDir)\ZAPD\lib\assimp\include;$(SolutionDir)\ZAPD\lib\stb;$(ProjectDir);$(IncludePath) + MinimumRecommendedRules.ruleset + + false + MinimumRecommendedRules.ruleset + + true $(ProjectDir)..\..\ZAPDTR\ZAPD;$(ProjectDir)..\..\ZAPDTR\lib\tinyxml2;$(ProjectDir)..\..\ZAPDTR\lib\libgfxd;$(ProjectDir)..\..\ZAPDTR\ZAPDUtils;$(ProjectDir)..\..\libultraship\libultraship;$(ProjectDir)..\..\libultraship\libultraship\lib\spdlog\include;$(ProjectDir)..\..\libultraship\libultraship\Lib\Fast3D\U64;$(IncludePath) $(ProjectDir)..\..\libultraship\libultraship;$(LibraryPath) + MinimumRecommendedRules.ruleset + + false $(ProjectDir)..\..\ZAPDTR\ZAPD;$(ProjectDir)..\..\ZAPDTR\lib\tinyxml2;$(ProjectDir)..\..\ZAPDTR\lib\libgfxd;$(ProjectDir)..\..\ZAPDTR\ZAPDUtils;$(ProjectDir)..\..\libultraship\libultraship;$(ProjectDir)..\..\libultraship\libultraship\lib\spdlog\include;$(ProjectDir)..\..\libultraship\libultraship\Lib\Fast3D\U64;$(IncludePath) $(ProjectDir)..\..\libultraship\libultraship;$(LibraryPath) + MinimumRecommendedRules.ruleset + + diff --git a/OTRExporter/OTRExporter/RoomExporter.cpp b/OTRExporter/OTRExporter/RoomExporter.cpp index 622901aff..5b7ce4323 100644 --- a/OTRExporter/OTRExporter/RoomExporter.cpp +++ b/OTRExporter/OTRExporter/RoomExporter.cpp @@ -407,7 +407,7 @@ void OTRExporter_Room::Save(ZResource* res, const fs::path& outPath, BinaryWrite { uint32_t seg = cmdHeaders->headers[i] & 0xFFFFFFFF; std::string headerName = ""; - bool foundDecl = Globals::Instance->GetSegmentedPtrName(seg, room->parent, "", headerName); + bool foundDecl = Globals::Instance->GetSegmentedPtrName(seg, room->parent, "", headerName, res->parent->workerID); if (headerName == "NULL") writer->Write(""); else @@ -443,7 +443,7 @@ void OTRExporter_Room::Save(ZResource* res, const fs::path& outPath, BinaryWrite SetCutscenes* cmdSetCutscenes = (SetCutscenes*)cmd; std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdSetCutscenes->cmdArg2, room->parent, "CutsceneData", listName); + Globals::Instance->GetSegmentedPtrName(cmdSetCutscenes->cmdArg2, room->parent, "CutsceneData", listName, res->parent->workerID); std::string fName = OTRExporter_DisplayList::GetPathToRes(room, listName); //std::string fName = StringHelper::Sprintf("%s\\%s", OTRExporter_DisplayList::GetParentFolderName(room).c_str(), listName.c_str()); writer->Write(fName); @@ -452,8 +452,11 @@ void OTRExporter_Room::Save(ZResource* res, const fs::path& outPath, BinaryWrite BinaryWriter csWriter = BinaryWriter(csStream); OTRExporter_Cutscene cs; cs.Save(cmdSetCutscenes->cutscenes[0], "", &csWriter); - - File::WriteAllBytes("Extract\\" + fName, csStream->ToVector()); + + if (Globals::Instance->fileMode != ZFileMode::ExtractDirectory) + File::WriteAllBytes("Extract\\" + fName, csStream->ToVector()); + else + files[fName] = csStream->ToVector(); //std::string fName = OTRExporter_DisplayList::GetPathToRes(res, vtxDecl->varName); //otrArchive->AddFile(fName, (uintptr_t)csStream->ToVector().data(), csWriter.GetBaseAddress()); @@ -477,7 +480,10 @@ void OTRExporter_Room::Save(ZResource* res, const fs::path& outPath, BinaryWrite OTRExporter_Path pathExp; pathExp.Save(&cmdSetPathways->pathwayList, outPath, &pathWriter); - File::WriteAllBytes("Extract\\" + path, pathStream->ToVector()); + if (Globals::Instance->fileMode != ZFileMode::ExtractDirectory) + File::WriteAllBytes("Extract\\" + path, pathStream->ToVector()); + else + files[path] = pathStream->ToVector(); //otrArchive->AddFile(path, (uintptr_t)pathStream->ToVector().data(), pathWriter.GetBaseAddress()); diff --git a/OTRExporter/OTRExporter/SkeletonExporter.cpp b/OTRExporter/OTRExporter/SkeletonExporter.cpp index cd9f7a8fd..3e0c58d06 100644 --- a/OTRExporter/OTRExporter/SkeletonExporter.cpp +++ b/OTRExporter/OTRExporter/SkeletonExporter.cpp @@ -23,7 +23,7 @@ void OTRExporter_Skeleton::Save(ZResource* res, const fs::path& outPath, BinaryW Declaration* skelDecl = skel->parent->GetDeclarationRanged(GETSEGOFFSET(skel->limbsTable.limbsAddresses[i])); std::string name; - bool foundDecl = Globals::Instance->GetSegmentedPtrName(skel->limbsTable.limbsAddresses[i], skel->parent, "", name); + bool foundDecl = Globals::Instance->GetSegmentedPtrName(skel->limbsTable.limbsAddresses[i], skel->parent, "", name, res->parent->workerID); if (foundDecl) { if (name.at(0) == '&') diff --git a/OTRExporter/OTRExporter/SkeletonLimbExporter.cpp b/OTRExporter/OTRExporter/SkeletonLimbExporter.cpp index d22c3d000..e29c9a425 100644 --- a/OTRExporter/OTRExporter/SkeletonLimbExporter.cpp +++ b/OTRExporter/OTRExporter/SkeletonLimbExporter.cpp @@ -86,7 +86,7 @@ void OTRExporter_SkeletonLimb::Save(ZResource* res, const fs::path& outPath, Bin if (limb->childPtr != 0) { std::string name; - bool foundDecl = Globals::Instance->GetSegmentedPtrName(limb->childPtr, limb->parent, "", name); + bool foundDecl = Globals::Instance->GetSegmentedPtrName(limb->childPtr, limb->parent, "", name, res->parent->workerID); if (foundDecl) { if (name.at(0) == '&') @@ -107,7 +107,7 @@ void OTRExporter_SkeletonLimb::Save(ZResource* res, const fs::path& outPath, Bin if (limb->siblingPtr != 0) { std::string name; - bool foundDecl = Globals::Instance->GetSegmentedPtrName(limb->siblingPtr, limb->parent, "", name); + bool foundDecl = Globals::Instance->GetSegmentedPtrName(limb->siblingPtr, limb->parent, "", name, res->parent->workerID); if (foundDecl) { if (name.at(0) == '&') @@ -128,7 +128,7 @@ void OTRExporter_SkeletonLimb::Save(ZResource* res, const fs::path& outPath, Bin if (limb->dListPtr != 0) { std::string name; - bool foundDecl = Globals::Instance->GetSegmentedPtrName(limb->dListPtr, limb->parent, "", name); + bool foundDecl = Globals::Instance->GetSegmentedPtrName(limb->dListPtr, limb->parent, "", name, res->parent->workerID); if (foundDecl) { if (name.at(0) == '&') @@ -149,7 +149,7 @@ void OTRExporter_SkeletonLimb::Save(ZResource* res, const fs::path& outPath, Bin if (limb->dList2Ptr != 0) { std::string name; - bool foundDecl = Globals::Instance->GetSegmentedPtrName(limb->dList2Ptr, limb->parent, "", name); + bool foundDecl = Globals::Instance->GetSegmentedPtrName(limb->dList2Ptr, limb->parent, "", name, res->parent->workerID); if (foundDecl) { if (name.at(0) == '&') diff --git a/OTRExporter/extract_assets.py b/OTRExporter/extract_assets.py index 404b49ced..2922bbf06 100755 --- a/OTRExporter/extract_assets.py +++ b/OTRExporter/extract_assets.py @@ -48,7 +48,7 @@ def ExtractFunc(fullPath): *pathList, xmlName = fullPath.split(os.sep) objectName = os.path.splitext(xmlName)[0] - outPath = os.path.join("..\\soh\\assets\\", *pathList[4:], objectName) + outPath = os.path.join("..\\soh\\assets\\", *pathList[5:], objectName) os.makedirs(outPath, exist_ok=True) outSourcePath = outPath @@ -64,6 +64,7 @@ def main(): parser.add_argument("-s", "--single", help="asset path relative to assets/, e.g. objects/gameplay_keep") parser.add_argument("-f", "--force", help="Force the extraction of every xml instead of checking the touched ones.", action="store_true") parser.add_argument("-u", "--unaccounted", help="Enables ZAPD unaccounted detector warning system.", action="store_true") + parser.add_argument("-v", "--version", help="Sets game version.") args = parser.parse_args() global mainAbort @@ -73,6 +74,13 @@ def main(): extractedAssetsTracker = manager.dict() + xmlVer = "GC_NMQ_D" + + if (args.version == "gc_pal_nmpq"): + xmlVer = "GC_NMQ_PAL_F" + elif (args.version == "dbg_mq"): + xmlVer = "GC_MQ_D" + asset_path = args.single if asset_path is not None: fullPath = os.path.join("..\\soh\\assets", "xml", asset_path + ".xml") @@ -90,7 +98,7 @@ def main(): extract_staff_text_path = None xmlFiles = [] - for currentPath, _, files in os.walk(os.path.join("..\\soh\\assets", "xml")): + for currentPath, _, files in os.walk(os.path.join("..\\soh\\assets\\xml\\", xmlVer)): for file in files: fullPath = os.path.join(currentPath, file) if file.endswith(".xml"): diff --git a/OTRExporter/extract_baserom_debug.py b/OTRExporter/extract_baserom_debug.py new file mode 100644 index 000000000..a3eb83a8f --- /dev/null +++ b/OTRExporter/extract_baserom_debug.py @@ -0,0 +1,1608 @@ +#!/usr/bin/python3 + +import os +import sys +import struct +from multiprocessing import Pool, cpu_count + + +ROM_FILE_NAME = 'baserom_non_mq.z64' +FILE_TABLE_OFFSET = 0x12F70 + +FILE_NAMES = [ + 'makerom', + 'boot', + 'dmadata', + 'Audiobank', + 'Audioseq', + 'Audiotable', + 'link_animetion', + 'icon_item_static', + 'icon_item_24_static', + 'icon_item_field_static', + 'icon_item_dungeon_static', + 'icon_item_gameover_static', + 'icon_item_nes_static', + 'icon_item_ger_static', + 'icon_item_fra_static', + 'item_name_static', + 'map_name_static', + 'do_action_static', + 'message_static', + 'message_texture_static', + 'nes_font_static', + 'nes_message_data_static', + 'ger_message_data_static', + 'fra_message_data_static', + 'staff_message_data_static', + 'map_grand_static', + 'map_i_static', + 'map_48x85_static', + 'code', + 'ovl_title', + 'ovl_select', + 'ovl_opening', + 'ovl_file_choose', + 'ovl_kaleido_scope', + 'ovl_player_actor', + 'ovl_map_mark_data', + 'ovl_En_Test', + 'ovl_Arms_Hook', + 'ovl_Arrow_Fire', + 'ovl_Arrow_Ice', + 'ovl_Arrow_Light', + 'ovl_Bg_Bdan_Objects', + 'ovl_Bg_Bdan_Switch', + 'ovl_Bg_Bom_Guard', + 'ovl_Bg_Bombwall', + 'ovl_Bg_Bowl_Wall', + 'ovl_Bg_Breakwall', + 'ovl_Bg_Ddan_Jd', + 'ovl_Bg_Ddan_Kd', + 'ovl_Bg_Dodoago', + 'ovl_Bg_Dy_Yoseizo', + 'ovl_Bg_Ganon_Otyuka', + 'ovl_Bg_Gate_Shutter', + 'ovl_Bg_Gjyo_Bridge', + 'ovl_Bg_Gnd_Darkmeiro', + 'ovl_Bg_Gnd_Firemeiro', + 'ovl_Bg_Gnd_Iceblock', + 'ovl_Bg_Gnd_Nisekabe', + 'ovl_Bg_Gnd_Soulmeiro', + 'ovl_Bg_Haka', + 'ovl_Bg_Haka_Gate', + 'ovl_Bg_Haka_Huta', + 'ovl_Bg_Haka_Megane', + 'ovl_Bg_Haka_MeganeBG', + 'ovl_Bg_Haka_Sgami', + 'ovl_Bg_Haka_Ship', + 'ovl_Bg_Haka_Trap', + 'ovl_Bg_Haka_Tubo', + 'ovl_Bg_Haka_Water', + 'ovl_Bg_Haka_Zou', + 'ovl_Bg_Heavy_Block', + 'ovl_Bg_Hidan_Curtain', + 'ovl_Bg_Hidan_Dalm', + 'ovl_Bg_Hidan_Firewall', + 'ovl_Bg_Hidan_Fslift', + 'ovl_Bg_Hidan_Fwbig', + 'ovl_Bg_Hidan_Hamstep', + 'ovl_Bg_Hidan_Hrock', + 'ovl_Bg_Hidan_Kousi', + 'ovl_Bg_Hidan_Kowarerukabe', + 'ovl_Bg_Hidan_Rock', + 'ovl_Bg_Hidan_Rsekizou', + 'ovl_Bg_Hidan_Sekizou', + 'ovl_Bg_Hidan_Sima', + 'ovl_Bg_Hidan_Syoku', + 'ovl_Bg_Ice_Objects', + 'ovl_Bg_Ice_Shelter', + 'ovl_Bg_Ice_Shutter', + 'ovl_Bg_Ice_Turara', + 'ovl_Bg_Ingate', + 'ovl_Bg_Jya_1flift', + 'ovl_Bg_Jya_Amishutter', + 'ovl_Bg_Jya_Bigmirror', + 'ovl_Bg_Jya_Block', + 'ovl_Bg_Jya_Bombchuiwa', + 'ovl_Bg_Jya_Bombiwa', + 'ovl_Bg_Jya_Cobra', + 'ovl_Bg_Jya_Goroiwa', + 'ovl_Bg_Jya_Haheniron', + 'ovl_Bg_Jya_Ironobj', + 'ovl_Bg_Jya_Kanaami', + 'ovl_Bg_Jya_Lift', + 'ovl_Bg_Jya_Megami', + 'ovl_Bg_Jya_Zurerukabe', + 'ovl_Bg_Menkuri_Eye', + 'ovl_Bg_Menkuri_Kaiten', + 'ovl_Bg_Menkuri_Nisekabe', + 'ovl_Bg_Mizu_Bwall', + 'ovl_Bg_Mizu_Movebg', + 'ovl_Bg_Mizu_Shutter', + 'ovl_Bg_Mizu_Uzu', + 'ovl_Bg_Mizu_Water', + 'ovl_Bg_Mjin', + 'ovl_Bg_Mori_Bigst', + 'ovl_Bg_Mori_Elevator', + 'ovl_Bg_Mori_Hashigo', + 'ovl_Bg_Mori_Hashira4', + 'ovl_Bg_Mori_Hineri', + 'ovl_Bg_Mori_Idomizu', + 'ovl_Bg_Mori_Kaitenkabe', + 'ovl_Bg_Mori_Rakkatenjo', + 'ovl_Bg_Po_Event', + 'ovl_Bg_Po_Syokudai', + 'ovl_Bg_Pushbox', + 'ovl_Bg_Relay_Objects', + 'ovl_Bg_Spot00_Break', + 'ovl_Bg_Spot00_Hanebasi', + 'ovl_Bg_Spot01_Fusya', + 'ovl_Bg_Spot01_Idohashira', + 'ovl_Bg_Spot01_Idomizu', + 'ovl_Bg_Spot01_Idosoko', + 'ovl_Bg_Spot01_Objects2', + 'ovl_Bg_Spot02_Objects', + 'ovl_Bg_Spot03_Taki', + 'ovl_Bg_Spot05_Soko', + 'ovl_Bg_Spot06_Objects', + 'ovl_Bg_Spot07_Taki', + 'ovl_Bg_Spot08_Bakudankabe', + 'ovl_Bg_Spot08_Iceblock', + 'ovl_Bg_Spot09_Obj', + 'ovl_Bg_Spot11_Bakudankabe', + 'ovl_Bg_Spot11_Oasis', + 'ovl_Bg_Spot12_Gate', + 'ovl_Bg_Spot12_Saku', + 'ovl_Bg_Spot15_Rrbox', + 'ovl_Bg_Spot15_Saku', + 'ovl_Bg_Spot16_Bombstone', + 'ovl_Bg_Spot16_Doughnut', + 'ovl_Bg_Spot17_Bakudankabe', + 'ovl_Bg_Spot17_Funen', + 'ovl_Bg_Spot18_Basket', + 'ovl_Bg_Spot18_Futa', + 'ovl_Bg_Spot18_Obj', + 'ovl_Bg_Spot18_Shutter', + 'ovl_Bg_Sst_Floor', + 'ovl_Bg_Toki_Hikari', + 'ovl_Bg_Toki_Swd', + 'ovl_Bg_Treemouth', + 'ovl_Bg_Umajump', + 'ovl_Bg_Vb_Sima', + 'ovl_Bg_Ydan_Hasi', + 'ovl_Bg_Ydan_Maruta', + 'ovl_Bg_Ydan_Sp', + 'ovl_Bg_Zg', + 'ovl_Boss_Dodongo', + 'ovl_Boss_Fd', + 'ovl_Boss_Fd2', + 'ovl_Boss_Ganon', + 'ovl_Boss_Ganon2', + 'ovl_Boss_Ganondrof', + 'ovl_Boss_Goma', + 'ovl_Boss_Mo', + 'ovl_Boss_Sst', + 'ovl_Boss_Tw', + 'ovl_Boss_Va', + 'ovl_Demo_6K', + 'ovl_Demo_Du', + 'ovl_Demo_Ec', + 'ovl_Demo_Effect', + 'ovl_Demo_Ext', + 'ovl_Demo_Geff', + 'ovl_Demo_Gj', + 'ovl_Demo_Go', + 'ovl_Demo_Gt', + 'ovl_Demo_Ik', + 'ovl_Demo_Im', + 'ovl_Demo_Kankyo', + 'ovl_Demo_Kekkai', + 'ovl_Demo_Sa', + 'ovl_Demo_Shd', + 'ovl_Demo_Tre_Lgt', + 'ovl_Door_Ana', + 'ovl_Door_Gerudo', + 'ovl_Door_Killer', + 'ovl_Door_Shutter', + 'ovl_Door_Toki', + 'ovl_Door_Warp1', + 'ovl_Efc_Erupc', + 'ovl_Eff_Dust', + 'ovl_Effect_Ss_Blast', + 'ovl_Effect_Ss_Bomb', + 'ovl_Effect_Ss_Bomb2', + 'ovl_Effect_Ss_Bubble', + 'ovl_Effect_Ss_D_Fire', + 'ovl_Effect_Ss_Dead_Db', + 'ovl_Effect_Ss_Dead_Dd', + 'ovl_Effect_Ss_Dead_Ds', + 'ovl_Effect_Ss_Dead_Sound', + 'ovl_Effect_Ss_Dt_Bubble', + 'ovl_Effect_Ss_Dust', + 'ovl_Effect_Ss_En_Fire', + 'ovl_Effect_Ss_En_Ice', + 'ovl_Effect_Ss_Extra', + 'ovl_Effect_Ss_Fcircle', + 'ovl_Effect_Ss_Fhg_Flash', + 'ovl_Effect_Ss_Fire_Tail', + 'ovl_Effect_Ss_G_Fire', + 'ovl_Effect_Ss_G_Magma', + 'ovl_Effect_Ss_G_Magma2', + 'ovl_Effect_Ss_G_Ripple', + 'ovl_Effect_Ss_G_Spk', + 'ovl_Effect_Ss_G_Splash', + 'ovl_Effect_Ss_Hahen', + 'ovl_Effect_Ss_HitMark', + 'ovl_Effect_Ss_Ice_Piece', + 'ovl_Effect_Ss_Ice_Smoke', + 'ovl_Effect_Ss_K_Fire', + 'ovl_Effect_Ss_Kakera', + 'ovl_Effect_Ss_KiraKira', + 'ovl_Effect_Ss_Lightning', + 'ovl_Effect_Ss_Sibuki', + 'ovl_Effect_Ss_Sibuki2', + 'ovl_Effect_Ss_Solder_Srch_Ball', + 'ovl_Effect_Ss_Stick', + 'ovl_Effect_Ss_Stone1', + 'ovl_Elf_Msg', + 'ovl_Elf_Msg2', + 'ovl_En_Am', + 'ovl_En_Ani', + 'ovl_En_Anubice', + 'ovl_En_Anubice_Fire', + 'ovl_En_Anubice_Tag', + 'ovl_En_Arow_Trap', + 'ovl_En_Arrow', + 'ovl_En_Attack_Niw', + 'ovl_En_Ba', + 'ovl_En_Bb', + 'ovl_En_Bdfire', + 'ovl_En_Bigokuta', + 'ovl_En_Bili', + 'ovl_En_Bird', + 'ovl_En_Blkobj', + 'ovl_En_Bom', + 'ovl_En_Bom_Bowl_Man', + 'ovl_En_Bom_Bowl_Pit', + 'ovl_En_Bom_Chu', + 'ovl_En_Bombf', + 'ovl_En_Boom', + 'ovl_En_Box', + 'ovl_En_Brob', + 'ovl_En_Bubble', + 'ovl_En_Butte', + 'ovl_En_Bw', + 'ovl_En_Bx', + 'ovl_En_Changer', + 'ovl_En_Clear_Tag', + 'ovl_En_Cow', + 'ovl_En_Crow', + 'ovl_En_Cs', + 'ovl_En_Daiku', + 'ovl_En_Daiku_Kakariko', + 'ovl_En_Dekubaba', + 'ovl_En_Dekunuts', + 'ovl_En_Dh', + 'ovl_En_Dha', + 'ovl_En_Diving_Game', + 'ovl_En_Dns', + 'ovl_En_Dnt_Demo', + 'ovl_En_Dnt_Jiji', + 'ovl_En_Dnt_Nomal', + 'ovl_En_Dodojr', + 'ovl_En_Dodongo', + 'ovl_En_Dog', + 'ovl_En_Door', + 'ovl_En_Ds', + 'ovl_En_Du', + 'ovl_En_Dy_Extra', + 'ovl_En_Eg', + 'ovl_En_Eiyer', + 'ovl_En_Elf', + 'ovl_En_Encount1', + 'ovl_En_Encount2', + 'ovl_En_Ex_Item', + 'ovl_En_Ex_Ruppy', + 'ovl_En_Fd', + 'ovl_En_Fd_Fire', + 'ovl_En_Fhg_Fire', + 'ovl_En_Fire_Rock', + 'ovl_En_Firefly', + 'ovl_En_Fish', + 'ovl_En_Floormas', + 'ovl_En_Fr', + 'ovl_En_Fu', + 'ovl_En_Fw', + 'ovl_En_Fz', + 'ovl_En_G_Switch', + 'ovl_En_Ganon_Mant', + 'ovl_En_Ganon_Organ', + 'ovl_En_Gb', + 'ovl_En_Ge1', + 'ovl_En_Ge2', + 'ovl_En_Ge3', + 'ovl_En_GeldB', + 'ovl_En_GirlA', + 'ovl_En_Gm', + 'ovl_En_Go', + 'ovl_En_Go2', + 'ovl_En_Goma', + 'ovl_En_Goroiwa', + 'ovl_En_Gs', + 'ovl_En_Guest', + 'ovl_En_Hata', + 'ovl_En_Heishi1', + 'ovl_En_Heishi2', + 'ovl_En_Heishi3', + 'ovl_En_Heishi4', + 'ovl_En_Hintnuts', + 'ovl_En_Holl', + 'ovl_En_Honotrap', + 'ovl_En_Horse', + 'ovl_En_Horse_Game_Check', + 'ovl_En_Horse_Ganon', + 'ovl_En_Horse_Link_Child', + 'ovl_En_Horse_Normal', + 'ovl_En_Horse_Zelda', + 'ovl_En_Hs', + 'ovl_En_Hs2', + 'ovl_En_Hy', + 'ovl_En_Ice_Hono', + 'ovl_En_Ik', + 'ovl_En_In', + 'ovl_En_Insect', + 'ovl_En_Ishi', + 'ovl_En_It', + 'ovl_En_Jj', + 'ovl_En_Js', + 'ovl_En_Jsjutan', + 'ovl_En_Kakasi', + 'ovl_En_Kakasi2', + 'ovl_En_Kakasi3', + 'ovl_En_Kanban', + 'ovl_En_Karebaba', + 'ovl_En_Ko', + 'ovl_En_Kusa', + 'ovl_En_Kz', + 'ovl_En_Light', + 'ovl_En_Lightbox', + 'ovl_En_M_Fire1', + 'ovl_En_M_Thunder', + 'ovl_En_Ma1', + 'ovl_En_Ma2', + 'ovl_En_Ma3', + 'ovl_En_Mag', + 'ovl_En_Mb', + 'ovl_En_Md', + 'ovl_En_Mk', + 'ovl_En_Mm', + 'ovl_En_Mm2', + 'ovl_En_Ms', + 'ovl_En_Mu', + 'ovl_En_Nb', + 'ovl_En_Niw', + 'ovl_En_Niw_Girl', + 'ovl_En_Niw_Lady', + 'ovl_En_Nutsball', + 'ovl_En_Nwc', + 'ovl_En_Ny', + 'ovl_En_OE2', + 'ovl_En_Okarina_Effect', + 'ovl_En_Okarina_Tag', + 'ovl_En_Okuta', + 'ovl_En_Ossan', + 'ovl_En_Owl', + 'ovl_En_Part', + 'ovl_En_Peehat', + 'ovl_En_Po_Desert', + 'ovl_En_Po_Field', + 'ovl_En_Po_Relay', + 'ovl_En_Po_Sisters', + 'ovl_En_Poh', + 'ovl_En_Pu_box', + 'ovl_En_Rd', + 'ovl_En_Reeba', + 'ovl_En_River_Sound', + 'ovl_En_Rl', + 'ovl_En_Rr', + 'ovl_En_Ru1', + 'ovl_En_Ru2', + 'ovl_En_Sa', + 'ovl_En_Sb', + 'ovl_En_Scene_Change', + 'ovl_En_Sda', + 'ovl_En_Shopnuts', + 'ovl_En_Si', + 'ovl_En_Siofuki', + 'ovl_En_Skb', + 'ovl_En_Skj', + 'ovl_En_Skjneedle', + 'ovl_En_Ssh', + 'ovl_En_St', + 'ovl_En_Sth', + 'ovl_En_Stream', + 'ovl_En_Sw', + 'ovl_En_Syateki_Itm', + 'ovl_En_Syateki_Man', + 'ovl_En_Syateki_Niw', + 'ovl_En_Ta', + 'ovl_En_Takara_Man', + 'ovl_En_Tana', + 'ovl_En_Tg', + 'ovl_En_Tite', + 'ovl_En_Tk', + 'ovl_En_Torch', + 'ovl_En_Torch2', + 'ovl_En_Toryo', + 'ovl_En_Tp', + 'ovl_En_Tr', + 'ovl_En_Trap', + 'ovl_En_Tubo_Trap', + 'ovl_En_Vali', + 'ovl_En_Vase', + 'ovl_En_Vb_Ball', + 'ovl_En_Viewer', + 'ovl_En_Vm', + 'ovl_En_Wall_Tubo', + 'ovl_En_Wallmas', + 'ovl_En_Weather_Tag', + 'ovl_En_Weiyer', + 'ovl_En_Wf', + 'ovl_En_Wonder_Item', + 'ovl_En_Wonder_Talk', + 'ovl_En_Wonder_Talk2', + 'ovl_En_Wood02', + 'ovl_En_Xc', + 'ovl_En_Yabusame_Mark', + 'ovl_En_Yukabyun', + 'ovl_En_Zf', + 'ovl_En_Zl1', + 'ovl_En_Zl2', + 'ovl_En_Zl3', + 'ovl_En_Zl4', + 'ovl_En_Zo', + 'ovl_En_fHG', + 'ovl_End_Title', + 'ovl_Fishing', + 'ovl_Item_B_Heart', + 'ovl_Item_Etcetera', + 'ovl_Item_Inbox', + 'ovl_Item_Ocarina', + 'ovl_Item_Shield', + 'ovl_Magic_Dark', + 'ovl_Magic_Fire', + 'ovl_Magic_Wind', + 'ovl_Mir_Ray', + 'ovl_Obj_Bean', + 'ovl_Obj_Blockstop', + 'ovl_Obj_Bombiwa', + 'ovl_Obj_Comb', + 'ovl_Obj_Dekujr', + 'ovl_Obj_Elevator', + 'ovl_Obj_Hamishi', + 'ovl_Obj_Hana', + 'ovl_Obj_Hsblock', + 'ovl_Obj_Ice_Poly', + 'ovl_Obj_Kibako', + 'ovl_Obj_Kibako2', + 'ovl_Obj_Lift', + 'ovl_Obj_Lightswitch', + 'ovl_Obj_Makekinsuta', + 'ovl_Obj_Makeoshihiki', + 'ovl_Obj_Mure', + 'ovl_Obj_Mure2', + 'ovl_Obj_Mure3', + 'ovl_Obj_Oshihiki', + 'ovl_Obj_Roomtimer', + 'ovl_Obj_Switch', + 'ovl_Obj_Syokudai', + 'ovl_Obj_Timeblock', + 'ovl_Obj_Tsubo', + 'ovl_Obj_Warp2block', + 'ovl_Object_Kankyo', + 'ovl_Oceff_Spot', + 'ovl_Oceff_Storm', + 'ovl_Oceff_Wipe', + 'ovl_Oceff_Wipe2', + 'ovl_Oceff_Wipe3', + 'ovl_Oceff_Wipe4', + 'ovl_Shot_Sun', + 'gameplay_keep', + 'gameplay_field_keep', + 'gameplay_dangeon_keep', + 'gameplay_object_exchange_static', + 'object_link_boy', + 'object_link_child', + 'object_box', + 'object_human', + 'object_okuta', + 'object_poh', + 'object_wallmaster', + 'object_dy_obj', + 'object_firefly', + 'object_dodongo', + 'object_fire', + 'object_niw', + 'object_tite', + 'object_reeba', + 'object_peehat', + 'object_kingdodongo', + 'object_horse', + 'object_zf', + 'object_goma', + 'object_zl1', + 'object_gol', + 'object_bubble', + 'object_dodojr', + 'object_torch2', + 'object_bl', + 'object_tp', + 'object_oA1', + 'object_st', + 'object_bw', + 'object_ei', + 'object_horse_normal', + 'object_oB1', + 'object_o_anime', + 'object_spot04_objects', + 'object_ddan_objects', + 'object_hidan_objects', + 'object_horse_ganon', + 'object_oA2', + 'object_spot00_objects', + 'object_mb', + 'object_bombf', + 'object_sk2', + 'object_oE1', + 'object_oE_anime', + 'object_oE2', + 'object_ydan_objects', + 'object_gnd', + 'object_am', + 'object_dekubaba', + 'object_oA3', + 'object_oA4', + 'object_oA5', + 'object_oA6', + 'object_oA7', + 'object_jj', + 'object_oA8', + 'object_oA9', + 'object_oB2', + 'object_oB3', + 'object_oB4', + 'object_horse_zelda', + 'object_opening_demo1', + 'object_warp1', + 'object_b_heart', + 'object_dekunuts', + 'object_oE3', + 'object_oE4', + 'object_menkuri_objects', + 'object_oE5', + 'object_oE6', + 'object_oE7', + 'object_oE8', + 'object_oE9', + 'object_oE10', + 'object_oE11', + 'object_oE12', + 'object_vali', + 'object_oA10', + 'object_oA11', + 'object_mizu_objects', + 'object_fhg', + 'object_ossan', + 'object_mori_hineri1', + 'object_Bb', + 'object_toki_objects', + 'object_yukabyun', + 'object_zl2', + 'object_mjin', + 'object_mjin_flash', + 'object_mjin_dark', + 'object_mjin_flame', + 'object_mjin_ice', + 'object_mjin_soul', + 'object_mjin_wind', + 'object_mjin_oka', + 'object_haka_objects', + 'object_spot06_objects', + 'object_ice_objects', + 'object_relay_objects', + 'object_mori_hineri1a', + 'object_mori_hineri2', + 'object_mori_hineri2a', + 'object_mori_objects', + 'object_mori_tex', + 'object_spot08_obj', + 'object_warp2', + 'object_hata', + 'object_bird', + 'object_wood02', + 'object_lightbox', + 'object_pu_box', + 'object_trap', + 'object_vase', + 'object_im', + 'object_ta', + 'object_tk', + 'object_xc', + 'object_vm', + 'object_bv', + 'object_hakach_objects', + 'object_efc_crystal_light', + 'object_efc_fire_ball', + 'object_efc_flash', + 'object_efc_lgt_shower', + 'object_efc_star_field', + 'object_god_lgt', + 'object_light_ring', + 'object_triforce_spot', + 'object_medal', + 'object_bdan_objects', + 'object_sd', + 'object_rd', + 'object_po_sisters', + 'object_heavy_object', + 'object_gndd', + 'object_fd', + 'object_du', + 'object_fw', + 'object_horse_link_child', + 'object_spot02_objects', + 'object_haka', + 'object_ru1', + 'object_syokudai', + 'object_fd2', + 'object_dh', + 'object_rl', + 'object_efc_tw', + 'object_demo_tre_lgt', + 'object_gi_key', + 'object_mir_ray', + 'object_brob', + 'object_gi_jewel', + 'object_spot09_obj', + 'object_spot18_obj', + 'object_bdoor', + 'object_spot17_obj', + 'object_shop_dungen', + 'object_nb', + 'object_mo', + 'object_sb', + 'object_gi_melody', + 'object_gi_heart', + 'object_gi_compass', + 'object_gi_bosskey', + 'object_gi_medal', + 'object_gi_nuts', + 'object_sa', + 'object_gi_hearts', + 'object_gi_arrowcase', + 'object_gi_bombpouch', + 'object_in', + 'object_tr', + 'object_spot16_obj', + 'object_oE1s', + 'object_oE4s', + 'object_os_anime', + 'object_gi_bottle', + 'object_gi_stick', + 'object_gi_map', + 'object_oF1d_map', + 'object_ru2', + 'object_gi_shield_1', + 'object_dekujr', + 'object_gi_magicpot', + 'object_gi_bomb_1', + 'object_oF1s', + 'object_ma2', + 'object_gi_purse', + 'object_hni', + 'object_tw', + 'object_rr', + 'object_bxa', + 'object_anubice', + 'object_gi_gerudo', + 'object_gi_arrow', + 'object_gi_bomb_2', + 'object_gi_egg', + 'object_gi_scale', + 'object_gi_shield_2', + 'object_gi_hookshot', + 'object_gi_ocarina', + 'object_gi_milk', + 'object_ma1', + 'object_ganon', + 'object_sst', + 'object_ny', + 'object_fr', + 'object_gi_pachinko', + 'object_gi_boomerang', + 'object_gi_bow', + 'object_gi_glasses', + 'object_gi_liquid', + 'object_ani', + 'object_demo_6k', + 'object_gi_shield_3', + 'object_gi_letter', + 'object_spot15_obj', + 'object_jya_obj', + 'object_gi_clothes', + 'object_gi_bean', + 'object_gi_fish', + 'object_gi_saw', + 'object_gi_hammer', + 'object_gi_grass', + 'object_gi_longsword', + 'object_spot01_objects', + 'object_md', + 'object_km1', + 'object_kw1', + 'object_zo', + 'object_kz', + 'object_umajump', + 'object_masterkokiri', + 'object_masterkokirihead', + 'object_mastergolon', + 'object_masterzoora', + 'object_aob', + 'object_ik', + 'object_ahg', + 'object_cne', + 'object_gi_niwatori', + 'object_skj', + 'object_gi_bottle_letter', + 'object_bji', + 'object_bba', + 'object_gi_ocarina_0', + 'object_ds', + 'object_ane', + 'object_boj', + 'object_spot03_object', + 'object_spot07_object', + 'object_fz', + 'object_bob', + 'object_ge1', + 'object_yabusame_point', + 'object_gi_boots_2', + 'object_gi_seed', + 'object_gnd_magic', + 'object_d_elevator', + 'object_d_hsblock', + 'object_d_lift', + 'object_mamenoki', + 'object_goroiwa', + 'object_toryo', + 'object_daiku', + 'object_nwc', + 'object_blkobj', + 'object_gm', + 'object_ms', + 'object_hs', + 'object_ingate', + 'object_lightswitch', + 'object_kusa', + 'object_tsubo', + 'object_gi_gloves', + 'object_gi_coin', + 'object_kanban', + 'object_gjyo_objects', + 'object_owl', + 'object_mk', + 'object_fu', + 'object_gi_ki_tan_mask', + 'object_gi_redead_mask', + 'object_gi_skj_mask', + 'object_gi_rabit_mask', + 'object_gi_truth_mask', + 'object_ganon_objects', + 'object_siofuki', + 'object_stream', + 'object_mm', + 'object_fa', + 'object_os', + 'object_gi_eye_lotion', + 'object_gi_powder', + 'object_gi_mushroom', + 'object_gi_ticketstone', + 'object_gi_brokensword', + 'object_js', + 'object_cs', + 'object_gi_prescription', + 'object_gi_bracelet', + 'object_gi_soldout', + 'object_gi_frog', + 'object_mag', + 'object_door_gerudo', + 'object_gt', + 'object_efc_erupc', + 'object_zl2_anime1', + 'object_zl2_anime2', + 'object_gi_golonmask', + 'object_gi_zoramask', + 'object_gi_gerudomask', + 'object_ganon2', + 'object_ka', + 'object_ts', + 'object_zg', + 'object_gi_hoverboots', + 'object_gi_m_arrow', + 'object_ds2', + 'object_ec', + 'object_fish', + 'object_gi_sutaru', + 'object_gi_goddess', + 'object_ssh', + 'object_bigokuta', + 'object_bg', + 'object_spot05_objects', + 'object_spot12_obj', + 'object_bombiwa', + 'object_hintnuts', + 'object_rs', + 'object_spot00_break', + 'object_gla', + 'object_shopnuts', + 'object_geldb', + 'object_gr', + 'object_dog', + 'object_jya_iron', + 'object_jya_door', + 'object_spot01_objects2', + 'object_spot11_obj', + 'object_kibako2', + 'object_dns', + 'object_dnk', + 'object_gi_fire', + 'object_gi_insect', + 'object_gi_butterfly', + 'object_gi_ghost', + 'object_gi_soul', + 'object_bowl', + 'object_po_field', + 'object_demo_kekkai', + 'object_efc_doughnut', + 'object_gi_dekupouch', + 'object_ganon_anime1', + 'object_ganon_anime2', + 'object_ganon_anime3', + 'object_gi_rupy', + 'object_spot01_matoya', + 'object_spot01_matoyab', + 'object_po_composer', + 'object_mu', + 'object_wf', + 'object_skb', + 'object_gj', + 'object_geff', + 'object_haka_door', + 'object_gs', + 'object_ps', + 'object_bwall', + 'object_crow', + 'object_cow', + 'object_cob', + 'object_gi_sword_1', + 'object_door_killer', + 'object_ouke_haka', + 'object_timeblock', + 'object_zl4', + 'g_pn_01', + 'g_pn_02', + 'g_pn_03', + 'g_pn_04', + 'g_pn_05', + 'g_pn_06', + 'g_pn_07', + 'g_pn_08', + 'g_pn_09', + 'g_pn_10', + 'g_pn_11', + 'g_pn_12', + 'g_pn_13', + 'g_pn_14', + 'g_pn_15', + 'g_pn_16', + 'g_pn_17', + 'g_pn_18', + 'g_pn_19', + 'g_pn_20', + 'g_pn_21', + 'g_pn_22', + 'g_pn_23', + 'g_pn_24', + 'g_pn_25', + 'g_pn_26', + 'g_pn_27', + 'g_pn_28', + 'g_pn_29', + 'g_pn_30', + 'g_pn_31', + 'g_pn_32', + 'g_pn_33', + 'g_pn_34', + 'g_pn_35', + 'g_pn_36', + 'g_pn_37', + 'g_pn_38', + 'g_pn_39', + 'g_pn_40', + 'g_pn_41', + 'g_pn_42', + 'g_pn_43', + 'g_pn_44', + 'g_pn_45', + 'g_pn_46', + 'g_pn_47', + 'g_pn_48', + 'g_pn_49', + 'g_pn_50', + 'g_pn_51', + 'g_pn_52', + 'g_pn_53', + 'g_pn_54', + 'g_pn_55', + 'g_pn_56', + 'g_pn_57', + 'z_select_static', + 'nintendo_rogo_static', + 'title_static', + 'parameter_static', + 'vr_fine0_static', + 'vr_fine0_pal_static', + 'vr_fine1_static', + 'vr_fine1_pal_static', + 'vr_fine2_static', + 'vr_fine2_pal_static', + 'vr_fine3_static', + 'vr_fine3_pal_static', + 'vr_cloud0_static', + 'vr_cloud0_pal_static', + 'vr_cloud1_static', + 'vr_cloud1_pal_static', + 'vr_cloud2_static', + 'vr_cloud2_pal_static', + 'vr_cloud3_static', + 'vr_cloud3_pal_static', + 'vr_holy0_static', + 'vr_holy0_pal_static', + 'vr_holy1_static', + 'vr_holy1_pal_static', + 'vr_MDVR_static', + 'vr_MDVR_pal_static', + 'vr_MNVR_static', + 'vr_MNVR_pal_static', + 'vr_RUVR_static', + 'vr_RUVR_pal_static', + 'vr_LHVR_static', + 'vr_LHVR_pal_static', + 'vr_KHVR_static', + 'vr_KHVR_pal_static', + 'vr_K3VR_static', + 'vr_K3VR_pal_static', + 'vr_K4VR_static', + 'vr_K4VR_pal_static', + 'vr_K5VR_static', + 'vr_K5VR_pal_static', + 'vr_SP1a_static', + 'vr_SP1a_pal_static', + 'vr_MLVR_static', + 'vr_MLVR_pal_static', + 'vr_KKRVR_static', + 'vr_KKRVR_pal_static', + 'vr_KR3VR_static', + 'vr_KR3VR_pal_static', + 'vr_IPVR_static', + 'vr_IPVR_pal_static', + 'vr_KSVR_static', + 'vr_KSVR_pal_static', + 'vr_GLVR_static', + 'vr_GLVR_pal_static', + 'vr_ZRVR_static', + 'vr_ZRVR_pal_static', + 'vr_DGVR_static', + 'vr_DGVR_pal_static', + 'vr_ALVR_static', + 'vr_ALVR_pal_static', + 'vr_NSVR_static', + 'vr_NSVR_pal_static', + 'vr_LBVR_static', + 'vr_LBVR_pal_static', + 'vr_TTVR_static', + 'vr_TTVR_pal_static', + 'vr_FCVR_static', + 'vr_FCVR_pal_static', + 'elf_message_field', + 'elf_message_ydan', + 'syotes_scene', + 'syotes_room_0', + 'syotes2_scene', + 'syotes2_room_0', + 'depth_test_scene', + 'depth_test_room_0', + 'spot00_scene', + 'spot00_room_0', + 'spot01_scene', + 'spot01_room_0', + 'spot02_scene', + 'spot02_room_0', + 'spot02_room_1', + 'spot03_scene', + 'spot03_room_0', + 'spot03_room_1', + 'spot04_scene', + 'spot04_room_0', + 'spot04_room_1', + 'spot04_room_2', + 'spot05_scene', + 'spot05_room_0', + 'spot06_scene', + 'spot06_room_0', + 'spot07_scene', + 'spot07_room_0', + 'spot07_room_1', + 'spot08_scene', + 'spot08_room_0', + 'spot09_scene', + 'spot09_room_0', + 'spot10_scene', + 'spot10_room_0', + 'spot10_room_1', + 'spot10_room_2', + 'spot10_room_3', + 'spot10_room_4', + 'spot10_room_5', + 'spot10_room_6', + 'spot10_room_7', + 'spot10_room_8', + 'spot10_room_9', + 'spot11_scene', + 'spot11_room_0', + 'spot12_scene', + 'spot12_room_0', + 'spot12_room_1', + 'spot13_scene', + 'spot13_room_0', + 'spot13_room_1', + 'spot15_scene', + 'spot15_room_0', + 'spot16_scene', + 'spot16_room_0', + 'spot17_scene', + 'spot17_room_0', + 'spot17_room_1', + 'spot18_scene', + 'spot18_room_0', + 'spot18_room_1', + 'spot18_room_2', + 'spot18_room_3', + 'ydan_scene', + 'ydan_room_0', + 'ydan_room_1', + 'ydan_room_2', + 'ydan_room_3', + 'ydan_room_4', + 'ydan_room_5', + 'ydan_room_6', + 'ydan_room_7', + 'ydan_room_8', + 'ydan_room_9', + 'ydan_room_10', + 'ydan_room_11', + 'ddan_scene', + 'ddan_room_0', + 'ddan_room_1', + 'ddan_room_2', + 'ddan_room_3', + 'ddan_room_4', + 'ddan_room_5', + 'ddan_room_6', + 'ddan_room_7', + 'ddan_room_8', + 'ddan_room_9', + 'ddan_room_10', + 'ddan_room_11', + 'ddan_room_12', + 'ddan_room_13', + 'ddan_room_14', + 'ddan_room_15', + 'ddan_room_16', + 'bdan_scene', + 'bdan_room_0', + 'bdan_room_1', + 'bdan_room_2', + 'bdan_room_3', + 'bdan_room_4', + 'bdan_room_5', + 'bdan_room_6', + 'bdan_room_7', + 'bdan_room_8', + 'bdan_room_9', + 'bdan_room_10', + 'bdan_room_11', + 'bdan_room_12', + 'bdan_room_13', + 'bdan_room_14', + 'bdan_room_15', + 'Bmori1_scene', + 'Bmori1_room_0', + 'Bmori1_room_1', + 'Bmori1_room_2', + 'Bmori1_room_3', + 'Bmori1_room_4', + 'Bmori1_room_5', + 'Bmori1_room_6', + 'Bmori1_room_7', + 'Bmori1_room_8', + 'Bmori1_room_9', + 'Bmori1_room_10', + 'Bmori1_room_11', + 'Bmori1_room_12', + 'Bmori1_room_13', + 'Bmori1_room_14', + 'Bmori1_room_15', + 'Bmori1_room_16', + 'Bmori1_room_17', + 'Bmori1_room_18', + 'Bmori1_room_19', + 'Bmori1_room_20', + 'Bmori1_room_21', + 'Bmori1_room_22', + 'HIDAN_scene', + 'HIDAN_room_0', + 'HIDAN_room_1', + 'HIDAN_room_2', + 'HIDAN_room_3', + 'HIDAN_room_4', + 'HIDAN_room_5', + 'HIDAN_room_6', + 'HIDAN_room_7', + 'HIDAN_room_8', + 'HIDAN_room_9', + 'HIDAN_room_10', + 'HIDAN_room_11', + 'HIDAN_room_12', + 'HIDAN_room_13', + 'HIDAN_room_14', + 'HIDAN_room_15', + 'HIDAN_room_16', + 'HIDAN_room_17', + 'HIDAN_room_18', + 'HIDAN_room_19', + 'HIDAN_room_20', + 'HIDAN_room_21', + 'HIDAN_room_22', + 'HIDAN_room_23', + 'HIDAN_room_24', + 'HIDAN_room_25', + 'HIDAN_room_26', + 'MIZUsin_scene', + 'MIZUsin_room_0', + 'MIZUsin_room_1', + 'MIZUsin_room_2', + 'MIZUsin_room_3', + 'MIZUsin_room_4', + 'MIZUsin_room_5', + 'MIZUsin_room_6', + 'MIZUsin_room_7', + 'MIZUsin_room_8', + 'MIZUsin_room_9', + 'MIZUsin_room_10', + 'MIZUsin_room_11', + 'MIZUsin_room_12', + 'MIZUsin_room_13', + 'MIZUsin_room_14', + 'MIZUsin_room_15', + 'MIZUsin_room_16', + 'MIZUsin_room_17', + 'MIZUsin_room_18', + 'MIZUsin_room_19', + 'MIZUsin_room_20', + 'MIZUsin_room_21', + 'MIZUsin_room_22', + 'jyasinzou_scene', + 'jyasinzou_room_0', + 'jyasinzou_room_1', + 'jyasinzou_room_2', + 'jyasinzou_room_3', + 'jyasinzou_room_4', + 'jyasinzou_room_5', + 'jyasinzou_room_6', + 'jyasinzou_room_7', + 'jyasinzou_room_8', + 'jyasinzou_room_9', + 'jyasinzou_room_10', + 'jyasinzou_room_11', + 'jyasinzou_room_12', + 'jyasinzou_room_13', + 'jyasinzou_room_14', + 'jyasinzou_room_15', + 'jyasinzou_room_16', + 'jyasinzou_room_17', + 'jyasinzou_room_18', + 'jyasinzou_room_19', + 'jyasinzou_room_20', + 'jyasinzou_room_21', + 'jyasinzou_room_22', + 'jyasinzou_room_23', + 'jyasinzou_room_24', + 'jyasinzou_room_25', + 'jyasinzou_room_26', + 'jyasinzou_room_27', + 'jyasinzou_room_28', + 'HAKAdan_scene', + 'HAKAdan_room_0', + 'HAKAdan_room_1', + 'HAKAdan_room_2', + 'HAKAdan_room_3', + 'HAKAdan_room_4', + 'HAKAdan_room_5', + 'HAKAdan_room_6', + 'HAKAdan_room_7', + 'HAKAdan_room_8', + 'HAKAdan_room_9', + 'HAKAdan_room_10', + 'HAKAdan_room_11', + 'HAKAdan_room_12', + 'HAKAdan_room_13', + 'HAKAdan_room_14', + 'HAKAdan_room_15', + 'HAKAdan_room_16', + 'HAKAdan_room_17', + 'HAKAdan_room_18', + 'HAKAdan_room_19', + 'HAKAdan_room_20', + 'HAKAdan_room_21', + 'HAKAdan_room_22', + 'HAKAdanCH_scene', + 'HAKAdanCH_room_0', + 'HAKAdanCH_room_1', + 'HAKAdanCH_room_2', + 'HAKAdanCH_room_3', + 'HAKAdanCH_room_4', + 'HAKAdanCH_room_5', + 'HAKAdanCH_room_6', + 'ice_doukutu_scene', + 'ice_doukutu_room_0', + 'ice_doukutu_room_1', + 'ice_doukutu_room_2', + 'ice_doukutu_room_3', + 'ice_doukutu_room_4', + 'ice_doukutu_room_5', + 'ice_doukutu_room_6', + 'ice_doukutu_room_7', + 'ice_doukutu_room_8', + 'ice_doukutu_room_9', + 'ice_doukutu_room_10', + 'ice_doukutu_room_11', + 'men_scene', + 'men_room_0', + 'men_room_1', + 'men_room_2', + 'men_room_3', + 'men_room_4', + 'men_room_5', + 'men_room_6', + 'men_room_7', + 'men_room_8', + 'men_room_9', + 'men_room_10', + 'ganontika_scene', + 'ganontika_room_0', + 'ganontika_room_1', + 'ganontika_room_2', + 'ganontika_room_3', + 'ganontika_room_4', + 'ganontika_room_5', + 'ganontika_room_6', + 'ganontika_room_7', + 'ganontika_room_8', + 'ganontika_room_9', + 'ganontika_room_10', + 'ganontika_room_11', + 'ganontika_room_12', + 'ganontika_room_13', + 'ganontika_room_14', + 'ganontika_room_15', + 'ganontika_room_16', + 'ganontika_room_17', + 'ganontika_room_18', + 'ganontika_room_19', + 'market_day_scene', + 'market_day_room_0', + 'market_night_scene', + 'market_night_room_0', + 'testroom_scene', + 'testroom_room_0', + 'testroom_room_1', + 'testroom_room_2', + 'testroom_room_3', + 'testroom_room_4', + 'kenjyanoma_scene', + 'kenjyanoma_room_0', + 'tokinoma_scene', + 'tokinoma_room_0', + 'tokinoma_room_1', + 'sutaru_scene', + 'sutaru_room_0', + 'link_home_scene', + 'link_home_room_0', + 'kokiri_shop_scene', + 'kokiri_shop_room_0', + 'kokiri_home_scene', + 'kokiri_home_room_0', + 'kakusiana_scene', + 'kakusiana_room_0', + 'kakusiana_room_1', + 'kakusiana_room_2', + 'kakusiana_room_3', + 'kakusiana_room_4', + 'kakusiana_room_5', + 'kakusiana_room_6', + 'kakusiana_room_7', + 'kakusiana_room_8', + 'kakusiana_room_9', + 'kakusiana_room_10', + 'kakusiana_room_11', + 'kakusiana_room_12', + 'kakusiana_room_13', + 'entra_scene', + 'entra_room_0', + 'moribossroom_scene', + 'moribossroom_room_0', + 'moribossroom_room_1', + 'syatekijyou_scene', + 'syatekijyou_room_0', + 'shop1_scene', + 'shop1_room_0', + 'hairal_niwa_scene', + 'hairal_niwa_room_0', + 'ganon_tou_scene', + 'ganon_tou_room_0', + 'sasatest_scene', + 'sasatest_room_0', + 'market_alley_scene', + 'market_alley_room_0', + 'spot20_scene', + 'spot20_room_0', + 'market_ruins_scene', + 'market_ruins_room_0', + 'entra_n_scene', + 'entra_n_room_0', + 'enrui_scene', + 'enrui_room_0', + 'market_alley_n_scene', + 'market_alley_n_room_0', + 'hiral_demo_scene', + 'hiral_demo_room_0', + 'kokiri_home3_scene', + 'kokiri_home3_room_0', + 'malon_stable_scene', + 'malon_stable_room_0', + 'kakariko_scene', + 'kakariko_room_0', + 'bdan_boss_scene', + 'bdan_boss_room_0', + 'bdan_boss_room_1', + 'FIRE_bs_scene', + 'FIRE_bs_room_0', + 'FIRE_bs_room_1', + 'hut_scene', + 'hut_room_0', + 'daiyousei_izumi_scene', + 'daiyousei_izumi_room_0', + 'hakaana_scene', + 'hakaana_room_0', + 'yousei_izumi_tate_scene', + 'yousei_izumi_tate_room_0', + 'yousei_izumi_yoko_scene', + 'yousei_izumi_yoko_room_0', + 'golon_scene', + 'golon_room_0', + 'zoora_scene', + 'zoora_room_0', + 'drag_scene', + 'drag_room_0', + 'alley_shop_scene', + 'alley_shop_room_0', + 'night_shop_scene', + 'night_shop_room_0', + 'impa_scene', + 'impa_room_0', + 'labo_scene', + 'labo_room_0', + 'tent_scene', + 'tent_room_0', + 'nakaniwa_scene', + 'nakaniwa_room_0', + 'ddan_boss_scene', + 'ddan_boss_room_0', + 'ddan_boss_room_1', + 'ydan_boss_scene', + 'ydan_boss_room_0', + 'ydan_boss_room_1', + 'HAKAdan_bs_scene', + 'HAKAdan_bs_room_0', + 'HAKAdan_bs_room_1', + 'MIZUsin_bs_scene', + 'MIZUsin_bs_room_0', + 'MIZUsin_bs_room_1', + 'ganon_scene', + 'ganon_room_0', + 'ganon_room_1', + 'ganon_room_2', + 'ganon_room_3', + 'ganon_room_4', + 'ganon_room_5', + 'ganon_room_6', + 'ganon_room_7', + 'ganon_room_8', + 'ganon_room_9', + 'ganon_boss_scene', + 'ganon_boss_room_0', + 'jyasinboss_scene', + 'jyasinboss_room_0', + 'jyasinboss_room_1', + 'jyasinboss_room_2', + 'jyasinboss_room_3', + 'kokiri_home4_scene', + 'kokiri_home4_room_0', + 'kokiri_home5_scene', + 'kokiri_home5_room_0', + 'ganon_final_scene', + 'ganon_final_room_0', + 'kakariko3_scene', + 'kakariko3_room_0', + 'hairal_niwa2_scene', + 'hairal_niwa2_room_0', + 'hakasitarelay_scene', + 'hakasitarelay_room_0', + 'hakasitarelay_room_1', + 'hakasitarelay_room_2', + 'hakasitarelay_room_3', + 'hakasitarelay_room_4', + 'hakasitarelay_room_5', + 'hakasitarelay_room_6', + 'shrine_scene', + 'shrine_room_0', + 'turibori_scene', + 'turibori_room_0', + 'shrine_n_scene', + 'shrine_n_room_0', + 'shrine_r_scene', + 'shrine_r_room_0', + 'hakaana2_scene', + 'hakaana2_room_0', + 'gerudoway_scene', + 'gerudoway_room_0', + 'gerudoway_room_1', + 'gerudoway_room_2', + 'gerudoway_room_3', + 'gerudoway_room_4', + 'gerudoway_room_5', + 'hairal_niwa_n_scene', + 'hairal_niwa_n_room_0', + 'bowling_scene', + 'bowling_room_0', + 'hakaana_ouke_scene', + 'hakaana_ouke_room_0', + 'hakaana_ouke_room_1', + 'hakaana_ouke_room_2', + 'hylia_labo_scene', + 'hylia_labo_room_0', + 'souko_scene', + 'souko_room_0', + 'souko_room_1', + 'souko_room_2', + 'miharigoya_scene', + 'miharigoya_room_0', + 'mahouya_scene', + 'mahouya_room_0', + 'takaraya_scene', + 'takaraya_room_0', + 'takaraya_room_1', + 'takaraya_room_2', + 'takaraya_room_3', + 'takaraya_room_4', + 'takaraya_room_5', + 'takaraya_room_6', + 'ganon_sonogo_scene', + 'ganon_sonogo_room_0', + 'ganon_sonogo_room_1', + 'ganon_sonogo_room_2', + 'ganon_sonogo_room_3', + 'ganon_sonogo_room_4', + 'ganon_demo_scene', + 'ganon_demo_room_0', + 'besitu_scene', + 'besitu_room_0', + 'face_shop_scene', + 'face_shop_room_0', + 'kinsuta_scene', + 'kinsuta_room_0', + 'ganontikasonogo_scene', + 'ganontikasonogo_room_0', + 'ganontikasonogo_room_1', + 'test01_scene', + 'test01_room_0', + 'bump_texture_static', + 'anime_model_1_static', + 'anime_model_2_static', + 'anime_model_3_static', + 'anime_model_4_static', + 'anime_model_5_static', + 'anime_model_6_static', + 'anime_texture_1_static', + 'anime_texture_2_static', + 'anime_texture_3_static', + 'anime_texture_4_static', + 'anime_texture_5_static', + 'anime_texture_6_static', + 'softsprite_matrix_static', +] + +romData = None + + +def initialize_worker(rom_data): + global romData + romData = rom_data + +def read_uint32_be(offset): + return struct.unpack('>I', romData[offset:offset+4])[0] + +def write_output_file(name, offset, size): + try: + with open(name, 'wb') as f: + f.write(romData[offset:offset+size]) + except IOError: + print('failed to write file ' + name) + +def ExtractFunc(i): + filename = 'baserom/' + FILE_NAMES[i] + entryOffset = FILE_TABLE_OFFSET + 16 * i + + virtStart = read_uint32_be(entryOffset + 0) + virtEnd = read_uint32_be(entryOffset + 4) + physStart = read_uint32_be(entryOffset + 8) + physEnd = read_uint32_be(entryOffset + 12) + + if physEnd == 0: # uncompressed + compressed = False + size = virtEnd - virtStart + else: # compressed + compressed = True + size = physEnd - physStart + + print('extracting ' + filename + " (0x%08X, 0x%08X)" % (virtStart, virtEnd)) + write_output_file(filename, physStart, size) + if compressed: + os.system('tools/yaz0 -d ' + filename + ' ' + filename) + +##################################################################### + +def main(): + try: + os.mkdir('baserom') + except: + pass + + # read baserom data + try: + with open(ROM_FILE_NAME, 'rb') as f: + rom_data = f.read() + except IOError: + print('failed to read ' + ROM_FILE_NAME) + sys.exit(1) + + # extract files + num_cores = cpu_count() + print("Extracting baserom with " + str(num_cores) + " CPU cores.") + with Pool(num_cores, initialize_worker, (rom_data,)) as p: + p.map(ExtractFunc, range(len(FILE_NAMES))) + +if __name__ == "__main__": + main() diff --git a/OTRExporter/extract_baserom_gc.py b/OTRExporter/extract_baserom_gc.py new file mode 100644 index 000000000..0bc324f81 --- /dev/null +++ b/OTRExporter/extract_baserom_gc.py @@ -0,0 +1,1586 @@ +#!/usr/bin/python3 + +import os +import sys +import struct +from multiprocessing import Pool, cpu_count + + +ROM_FILE_NAME = 'zlp_f.n64' +FILE_TABLE_OFFSET = 0x7170 + +FILE_NAMES = [ + 'makerom', + 'boot', + 'dmadata', + 'Audiobank', + 'Audioseq', + 'Audiotable', + 'link_animetion', + 'icon_item_static', + 'icon_item_24_static', + 'icon_item_field_static', + 'icon_item_dungeon_static', + 'icon_item_gameover_static', + 'icon_item_nes_static', + 'icon_item_ger_static', + 'icon_item_fra_static', + 'item_name_static', + 'map_name_static', + 'do_action_static', + 'message_static', + 'message_texture_static', + 'nes_font_static', + 'nes_message_data_static', + 'ger_message_data_static', + 'fra_message_data_static', + 'staff_message_data_static', + 'map_grand_static', + 'map_48x85_static', + 'map_i_static', + 'code', + 'ovl_title', + 'ovl_select', + 'ovl_opening', + 'ovl_file_choose', + 'ovl_kaleido_scope', + 'ovl_player_actor', + 'ovl_map_mark_data', + 'ovl_En_Test', + 'ovl_Arms_Hook', + 'ovl_Arrow_Fire', + 'ovl_Arrow_Ice', + 'ovl_Arrow_Light', + 'ovl_Bg_Bdan_Objects', + 'ovl_Bg_Bdan_Switch', + 'ovl_Bg_Bom_Guard', + 'ovl_Bg_Bombwall', + 'ovl_Bg_Bowl_Wall', + 'ovl_Bg_Breakwall', + 'ovl_Bg_Ddan_Jd', + 'ovl_Bg_Ddan_Kd', + 'ovl_Bg_Dodoago', + 'ovl_Bg_Dy_Yoseizo', + 'ovl_Bg_Ganon_Otyuka', + 'ovl_Bg_Gate_Shutter', + 'ovl_Bg_Gjyo_Bridge', + 'ovl_Bg_Gnd_Darkmeiro', + 'ovl_Bg_Gnd_Firemeiro', + 'ovl_Bg_Gnd_Iceblock', + 'ovl_Bg_Gnd_Nisekabe', + 'ovl_Bg_Gnd_Soulmeiro', + 'ovl_Bg_Haka', + 'ovl_Bg_Haka_Gate', + 'ovl_Bg_Haka_Huta', + 'ovl_Bg_Haka_Megane', + 'ovl_Bg_Haka_MeganeBG', + 'ovl_Bg_Haka_Sgami', + 'ovl_Bg_Haka_Ship', + 'ovl_Bg_Haka_Trap', + 'ovl_Bg_Haka_Tubo', + 'ovl_Bg_Haka_Water', + 'ovl_Bg_Haka_Zou', + 'ovl_Bg_Heavy_Block', + 'ovl_Bg_Hidan_Curtain', + 'ovl_Bg_Hidan_Dalm', + 'ovl_Bg_Hidan_Firewall', + 'ovl_Bg_Hidan_Fslift', + 'ovl_Bg_Hidan_Fwbig', + 'ovl_Bg_Hidan_Hamstep', + 'ovl_Bg_Hidan_Hrock', + 'ovl_Bg_Hidan_Kousi', + 'ovl_Bg_Hidan_Kowarerukabe', + 'ovl_Bg_Hidan_Rock', + 'ovl_Bg_Hidan_Rsekizou', + 'ovl_Bg_Hidan_Sekizou', + 'ovl_Bg_Hidan_Sima', + 'ovl_Bg_Hidan_Syoku', + 'ovl_Bg_Ice_Objects', + 'ovl_Bg_Ice_Shelter', + 'ovl_Bg_Ice_Shutter', + 'ovl_Bg_Ice_Turara', + 'ovl_Bg_Ingate', + 'ovl_Bg_Jya_1flift', + 'ovl_Bg_Jya_Amishutter', + 'ovl_Bg_Jya_Bigmirror', + 'ovl_Bg_Jya_Block', + 'ovl_Bg_Jya_Bombchuiwa', + 'ovl_Bg_Jya_Bombiwa', + 'ovl_Bg_Jya_Cobra', + 'ovl_Bg_Jya_Goroiwa', + 'ovl_Bg_Jya_Haheniron', + 'ovl_Bg_Jya_Ironobj', + 'ovl_Bg_Jya_Kanaami', + 'ovl_Bg_Jya_Lift', + 'ovl_Bg_Jya_Megami', + 'ovl_Bg_Jya_Zurerukabe', + 'ovl_Bg_Menkuri_Eye', + 'ovl_Bg_Menkuri_Kaiten', + 'ovl_Bg_Menkuri_Nisekabe', + 'ovl_Bg_Mizu_Bwall', + 'ovl_Bg_Mizu_Movebg', + 'ovl_Bg_Mizu_Shutter', + 'ovl_Bg_Mizu_Uzu', + 'ovl_Bg_Mizu_Water', + 'ovl_Bg_Mjin', + 'ovl_Bg_Mori_Bigst', + 'ovl_Bg_Mori_Elevator', + 'ovl_Bg_Mori_Hashigo', + 'ovl_Bg_Mori_Hashira4', + 'ovl_Bg_Mori_Hineri', + 'ovl_Bg_Mori_Idomizu', + 'ovl_Bg_Mori_Kaitenkabe', + 'ovl_Bg_Mori_Rakkatenjo', + 'ovl_Bg_Po_Event', + 'ovl_Bg_Po_Syokudai', + 'ovl_Bg_Pushbox', + 'ovl_Bg_Relay_Objects', + 'ovl_Bg_Spot00_Break', + 'ovl_Bg_Spot00_Hanebasi', + 'ovl_Bg_Spot01_Fusya', + 'ovl_Bg_Spot01_Idohashira', + 'ovl_Bg_Spot01_Idomizu', + 'ovl_Bg_Spot01_Idosoko', + 'ovl_Bg_Spot01_Objects2', + 'ovl_Bg_Spot02_Objects', + 'ovl_Bg_Spot03_Taki', + 'ovl_Bg_Spot05_Soko', + 'ovl_Bg_Spot06_Objects', + 'ovl_Bg_Spot07_Taki', + 'ovl_Bg_Spot08_Bakudankabe', + 'ovl_Bg_Spot08_Iceblock', + 'ovl_Bg_Spot09_Obj', + 'ovl_Bg_Spot11_Bakudankabe', + 'ovl_Bg_Spot11_Oasis', + 'ovl_Bg_Spot12_Gate', + 'ovl_Bg_Spot12_Saku', + 'ovl_Bg_Spot15_Rrbox', + 'ovl_Bg_Spot15_Saku', + 'ovl_Bg_Spot16_Bombstone', + 'ovl_Bg_Spot16_Doughnut', + 'ovl_Bg_Spot17_Bakudankabe', + 'ovl_Bg_Spot17_Funen', + 'ovl_Bg_Spot18_Basket', + 'ovl_Bg_Spot18_Futa', + 'ovl_Bg_Spot18_Obj', + 'ovl_Bg_Spot18_Shutter', + 'ovl_Bg_Sst_Floor', + 'ovl_Bg_Toki_Hikari', + 'ovl_Bg_Toki_Swd', + 'ovl_Bg_Treemouth', + 'ovl_Bg_Umajump', + 'ovl_Bg_Vb_Sima', + 'ovl_Bg_Ydan_Hasi', + 'ovl_Bg_Ydan_Maruta', + 'ovl_Bg_Ydan_Sp', + 'ovl_Bg_Zg', + 'ovl_Boss_Dodongo', + 'ovl_Boss_Fd', + 'ovl_Boss_Fd2', + 'ovl_Boss_Ganon', + 'ovl_Boss_Ganon2', + 'ovl_Boss_Ganondrof', + 'ovl_Boss_Goma', + 'ovl_Boss_Mo', + 'ovl_Boss_Sst', + 'ovl_Boss_Tw', + 'ovl_Boss_Va', + 'ovl_Demo_6K', + 'ovl_Demo_Du', + 'ovl_Demo_Ec', + 'ovl_Demo_Effect', + 'ovl_Demo_Ext', + 'ovl_Demo_Geff', + 'ovl_Demo_Gj', + 'ovl_Demo_Go', + 'ovl_Demo_Gt', + 'ovl_Demo_Ik', + 'ovl_Demo_Im', + 'ovl_Demo_Kankyo', + 'ovl_Demo_Kekkai', + 'ovl_Demo_Sa', + 'ovl_Demo_Shd', + 'ovl_Demo_Tre_Lgt', + 'ovl_Door_Ana', + 'ovl_Door_Gerudo', + 'ovl_Door_Killer', + 'ovl_Door_Shutter', + 'ovl_Door_Toki', + 'ovl_Door_Warp1', + 'ovl_Efc_Erupc', + 'ovl_Eff_Dust', + 'ovl_Effect_Ss_Blast', + 'ovl_Effect_Ss_Bomb', + 'ovl_Effect_Ss_Bomb2', + 'ovl_Effect_Ss_Bubble', + 'ovl_Effect_Ss_D_Fire', + 'ovl_Effect_Ss_Dead_Db', + 'ovl_Effect_Ss_Dead_Dd', + 'ovl_Effect_Ss_Dead_Ds', + 'ovl_Effect_Ss_Dead_Sound', + 'ovl_Effect_Ss_Dt_Bubble', + 'ovl_Effect_Ss_Dust', + 'ovl_Effect_Ss_En_Fire', + 'ovl_Effect_Ss_En_Ice', + 'ovl_Effect_Ss_Extra', + 'ovl_Effect_Ss_Fcircle', + 'ovl_Effect_Ss_Fhg_Flash', + 'ovl_Effect_Ss_Fire_Tail', + 'ovl_Effect_Ss_G_Fire', + 'ovl_Effect_Ss_G_Magma', + 'ovl_Effect_Ss_G_Magma2', + 'ovl_Effect_Ss_G_Ripple', + 'ovl_Effect_Ss_G_Spk', + 'ovl_Effect_Ss_G_Splash', + 'ovl_Effect_Ss_Hahen', + 'ovl_Effect_Ss_HitMark', + 'ovl_Effect_Ss_Ice_Piece', + 'ovl_Effect_Ss_Ice_Smoke', + 'ovl_Effect_Ss_K_Fire', + 'ovl_Effect_Ss_Kakera', + 'ovl_Effect_Ss_KiraKira', + 'ovl_Effect_Ss_Lightning', + 'ovl_Effect_Ss_Sibuki', + 'ovl_Effect_Ss_Sibuki2', + 'ovl_Effect_Ss_Solder_Srch_Ball', + 'ovl_Effect_Ss_Stick', + 'ovl_Effect_Ss_Stone1', + 'ovl_Elf_Msg', + 'ovl_Elf_Msg2', + 'ovl_En_Am', + 'ovl_En_Ani', + 'ovl_En_Anubice', + 'ovl_En_Anubice_Fire', + 'ovl_En_Anubice_Tag', + 'ovl_En_Arow_Trap', + 'ovl_En_Arrow', + 'ovl_En_Attack_Niw', + 'ovl_En_Ba', + 'ovl_En_Bb', + 'ovl_En_Bdfire', + 'ovl_En_Bigokuta', + 'ovl_En_Bili', + 'ovl_En_Bird', + 'ovl_En_Blkobj', + 'ovl_En_Bom', + 'ovl_En_Bom_Bowl_Man', + 'ovl_En_Bom_Bowl_Pit', + 'ovl_En_Bom_Chu', + 'ovl_En_Bombf', + 'ovl_En_Boom', + 'ovl_En_Box', + 'ovl_En_Brob', + 'ovl_En_Bubble', + 'ovl_En_Butte', + 'ovl_En_Bw', + 'ovl_En_Bx', + 'ovl_En_Changer', + 'ovl_En_Clear_Tag', + 'ovl_En_Cow', + 'ovl_En_Crow', + 'ovl_En_Cs', + 'ovl_En_Daiku', + 'ovl_En_Daiku_Kakariko', + 'ovl_En_Dekubaba', + 'ovl_En_Dekunuts', + 'ovl_En_Dh', + 'ovl_En_Dha', + 'ovl_En_Diving_Game', + 'ovl_En_Dns', + 'ovl_En_Dnt_Demo', + 'ovl_En_Dnt_Jiji', + 'ovl_En_Dnt_Nomal', + 'ovl_En_Dodojr', + 'ovl_En_Dodongo', + 'ovl_En_Dog', + 'ovl_En_Door', + 'ovl_En_Ds', + 'ovl_En_Du', + 'ovl_En_Dy_Extra', + 'ovl_En_Eg', + 'ovl_En_Eiyer', + 'ovl_En_Elf', + 'ovl_En_Encount1', + 'ovl_En_Encount2', + 'ovl_En_Ex_Item', + 'ovl_En_Ex_Ruppy', + 'ovl_En_Fd', + 'ovl_En_Fd_Fire', + 'ovl_En_Fhg_Fire', + 'ovl_En_Fire_Rock', + 'ovl_En_Firefly', + 'ovl_En_Fish', + 'ovl_En_Floormas', + 'ovl_En_Fr', + 'ovl_En_Fu', + 'ovl_En_Fw', + 'ovl_En_Fz', + 'ovl_En_G_Switch', + 'ovl_En_Ganon_Mant', + 'ovl_En_Ganon_Organ', + 'ovl_En_Gb', + 'ovl_En_Ge1', + 'ovl_En_Ge2', + 'ovl_En_Ge3', + 'ovl_En_GeldB', + 'ovl_En_GirlA', + 'ovl_En_Gm', + 'ovl_En_Go', + 'ovl_En_Go2', + 'ovl_En_Goma', + 'ovl_En_Goroiwa', + 'ovl_En_Gs', + 'ovl_En_Guest', + 'ovl_En_Hata', + 'ovl_En_Heishi1', + 'ovl_En_Heishi2', + 'ovl_En_Heishi3', + 'ovl_En_Heishi4', + 'ovl_En_Hintnuts', + 'ovl_En_Holl', + 'ovl_En_Honotrap', + 'ovl_En_Horse', + 'ovl_En_Horse_Game_Check', + 'ovl_En_Horse_Ganon', + 'ovl_En_Horse_Link_Child', + 'ovl_En_Horse_Normal', + 'ovl_En_Horse_Zelda', + 'ovl_En_Hs', + 'ovl_En_Hs2', + 'ovl_En_Hy', + 'ovl_En_Ice_Hono', + 'ovl_En_Ik', + 'ovl_En_In', + 'ovl_En_Insect', + 'ovl_En_Ishi', + 'ovl_En_It', + 'ovl_En_Jj', + 'ovl_En_Js', + 'ovl_En_Jsjutan', + 'ovl_En_Kakasi', + 'ovl_En_Kakasi2', + 'ovl_En_Kakasi3', + 'ovl_En_Kanban', + 'ovl_En_Karebaba', + 'ovl_En_Ko', + 'ovl_En_Kusa', + 'ovl_En_Kz', + 'ovl_En_Light', + 'ovl_En_Lightbox', + 'ovl_En_M_Fire1', + 'ovl_En_M_Thunder', + 'ovl_En_Ma1', + 'ovl_En_Ma2', + 'ovl_En_Ma3', + 'ovl_En_Mag', + 'ovl_En_Mb', + 'ovl_En_Md', + 'ovl_En_Mk', + 'ovl_En_Mm', + 'ovl_En_Mm2', + 'ovl_En_Ms', + 'ovl_En_Mu', + 'ovl_En_Nb', + 'ovl_En_Niw', + 'ovl_En_Niw_Girl', + 'ovl_En_Niw_Lady', + 'ovl_En_Nutsball', + 'ovl_En_Nwc', + 'ovl_En_Ny', + 'ovl_En_OE2', + 'ovl_En_Okarina_Effect', + 'ovl_En_Okarina_Tag', + 'ovl_En_Okuta', + 'ovl_En_Ossan', + 'ovl_En_Owl', + 'ovl_En_Part', + 'ovl_En_Peehat', + 'ovl_En_Po_Desert', + 'ovl_En_Po_Field', + 'ovl_En_Po_Relay', + 'ovl_En_Po_Sisters', + 'ovl_En_Poh', + 'ovl_En_Pu_box', + 'ovl_En_Rd', + 'ovl_En_Reeba', + 'ovl_En_River_Sound', + 'ovl_En_Rl', + 'ovl_En_Rr', + 'ovl_En_Ru1', + 'ovl_En_Ru2', + 'ovl_En_Sa', + 'ovl_En_Sb', + 'ovl_En_Scene_Change', + 'ovl_En_Sda', + 'ovl_En_Shopnuts', + 'ovl_En_Si', + 'ovl_En_Siofuki', + 'ovl_En_Skb', + 'ovl_En_Skj', + 'ovl_En_Skjneedle', + 'ovl_En_Ssh', + 'ovl_En_St', + 'ovl_En_Sth', + 'ovl_En_Stream', + 'ovl_En_Sw', + 'ovl_En_Syateki_Itm', + 'ovl_En_Syateki_Man', + 'ovl_En_Syateki_Niw', + 'ovl_En_Ta', + 'ovl_En_Takara_Man', + 'ovl_En_Tana', + 'ovl_En_Tg', + 'ovl_En_Tite', + 'ovl_En_Tk', + 'ovl_En_Torch', + 'ovl_En_Torch2', + 'ovl_En_Toryo', + 'ovl_En_Tp', + 'ovl_En_Tr', + 'ovl_En_Trap', + 'ovl_En_Tubo_Trap', + 'ovl_En_Vali', + 'ovl_En_Vase', + 'ovl_En_Vb_Ball', + 'ovl_En_Viewer', + 'ovl_En_Vm', + 'ovl_En_Wall_Tubo', + 'ovl_En_Wallmas', + 'ovl_En_Weather_Tag', + 'ovl_En_Weiyer', + 'ovl_En_Wf', + 'ovl_En_Wonder_Item', + 'ovl_En_Wonder_Talk', + 'ovl_En_Wonder_Talk2', + 'ovl_En_Wood02', + 'ovl_En_Xc', + 'ovl_En_Yabusame_Mark', + 'ovl_En_Yukabyun', + 'ovl_En_Zf', + 'ovl_En_Zl1', + 'ovl_En_Zl2', + 'ovl_En_Zl3', + 'ovl_En_Zl4', + 'ovl_En_Zo', + 'ovl_En_fHG', + 'ovl_End_Title', + 'ovl_Fishing', + 'ovl_Item_B_Heart', + 'ovl_Item_Etcetera', + 'ovl_Item_Inbox', + 'ovl_Item_Ocarina', + 'ovl_Item_Shield', + 'ovl_Magic_Dark', + 'ovl_Magic_Fire', + 'ovl_Magic_Wind', + 'ovl_Mir_Ray', + 'ovl_Obj_Bean', + 'ovl_Obj_Blockstop', + 'ovl_Obj_Bombiwa', + 'ovl_Obj_Comb', + 'ovl_Obj_Dekujr', + 'ovl_Obj_Elevator', + 'ovl_Obj_Hamishi', + 'ovl_Obj_Hana', + 'ovl_Obj_Hsblock', + 'ovl_Obj_Ice_Poly', + 'ovl_Obj_Kibako', + 'ovl_Obj_Kibako2', + 'ovl_Obj_Lift', + 'ovl_Obj_Lightswitch', + 'ovl_Obj_Makekinsuta', + 'ovl_Obj_Makeoshihiki', + 'ovl_Obj_Mure', + 'ovl_Obj_Mure2', + 'ovl_Obj_Mure3', + 'ovl_Obj_Oshihiki', + 'ovl_Obj_Roomtimer', + 'ovl_Obj_Switch', + 'ovl_Obj_Syokudai', + 'ovl_Obj_Timeblock', + 'ovl_Obj_Tsubo', + 'ovl_Obj_Warp2block', + 'ovl_Object_Kankyo', + 'ovl_Oceff_Spot', + 'ovl_Oceff_Storm', + 'ovl_Oceff_Wipe', + 'ovl_Oceff_Wipe2', + 'ovl_Oceff_Wipe3', + 'ovl_Oceff_Wipe4', + 'ovl_Shot_Sun', + 'gameplay_keep', + 'gameplay_field_keep', + 'gameplay_dangeon_keep', + 'gameplay_object_exchange_static', + 'object_link_boy', + 'object_link_child', + 'object_box', + 'object_human', + 'object_okuta', + 'object_poh', + 'object_wallmaster', + 'object_dy_obj', + 'object_firefly', + 'object_dodongo', + 'object_fire', + 'object_niw', + 'object_tite', + 'object_reeba', + 'object_peehat', + 'object_kingdodongo', + 'object_horse', + 'object_zf', + 'object_goma', + 'object_zl1', + 'object_gol', + 'object_bubble', + 'object_dodojr', + 'object_torch2', + 'object_bl', + 'object_tp', + 'object_oA1', + 'object_st', + 'object_bw', + 'object_ei', + 'object_horse_normal', + 'object_oB1', + 'object_o_anime', + 'object_spot04_objects', + 'object_ddan_objects', + 'object_hidan_objects', + 'object_horse_ganon', + 'object_oA2', + 'object_spot00_objects', + 'object_mb', + 'object_bombf', + 'object_sk2', + 'object_oE1', + 'object_oE_anime', + 'object_oE2', + 'object_ydan_objects', + 'object_gnd', + 'object_am', + 'object_dekubaba', + 'object_oA3', + 'object_oA4', + 'object_oA5', + 'object_oA6', + 'object_oA7', + 'object_jj', + 'object_oA8', + 'object_oA9', + 'object_oB2', + 'object_oB3', + 'object_oB4', + 'object_horse_zelda', + 'object_opening_demo1', + 'object_warp1', + 'object_b_heart', + 'object_dekunuts', + 'object_oE3', + 'object_oE4', + 'object_menkuri_objects', + 'object_oE5', + 'object_oE6', + 'object_oE7', + 'object_oE8', + 'object_oE9', + 'object_oE10', + 'object_oE11', + 'object_oE12', + 'object_vali', + 'object_oA10', + 'object_oA11', + 'object_mizu_objects', + 'object_fhg', + 'object_ossan', + 'object_mori_hineri1', + 'object_Bb', + 'object_toki_objects', + 'object_yukabyun', + 'object_zl2', + 'object_mjin', + 'object_mjin_flash', + 'object_mjin_dark', + 'object_mjin_flame', + 'object_mjin_ice', + 'object_mjin_soul', + 'object_mjin_wind', + 'object_mjin_oka', + 'object_haka_objects', + 'object_spot06_objects', + 'object_ice_objects', + 'object_relay_objects', + 'object_mori_hineri1a', + 'object_mori_hineri2', + 'object_mori_hineri2a', + 'object_mori_objects', + 'object_mori_tex', + 'object_spot08_obj', + 'object_warp2', + 'object_hata', + 'object_bird', + 'object_wood02', + 'object_lightbox', + 'object_pu_box', + 'object_trap', + 'object_vase', + 'object_im', + 'object_ta', + 'object_tk', + 'object_xc', + 'object_vm', + 'object_bv', + 'object_hakach_objects', + 'object_efc_crystal_light', + 'object_efc_fire_ball', + 'object_efc_flash', + 'object_efc_lgt_shower', + 'object_efc_star_field', + 'object_god_lgt', + 'object_light_ring', + 'object_triforce_spot', + 'object_medal', + 'object_bdan_objects', + 'object_sd', + 'object_rd', + 'object_po_sisters', + 'object_heavy_object', + 'object_gndd', + 'object_fd', + 'object_du', + 'object_fw', + 'object_horse_link_child', + 'object_spot02_objects', + 'object_haka', + 'object_ru1', + 'object_syokudai', + 'object_fd2', + 'object_dh', + 'object_rl', + 'object_efc_tw', + 'object_demo_tre_lgt', + 'object_gi_key', + 'object_mir_ray', + 'object_brob', + 'object_gi_jewel', + 'object_spot09_obj', + 'object_spot18_obj', + 'object_bdoor', + 'object_spot17_obj', + 'object_shop_dungen', + 'object_nb', + 'object_mo', + 'object_sb', + 'object_gi_melody', + 'object_gi_heart', + 'object_gi_compass', + 'object_gi_bosskey', + 'object_gi_medal', + 'object_gi_nuts', + 'object_sa', + 'object_gi_hearts', + 'object_gi_arrowcase', + 'object_gi_bombpouch', + 'object_in', + 'object_tr', + 'object_spot16_obj', + 'object_oE1s', + 'object_oE4s', + 'object_os_anime', + 'object_gi_bottle', + 'object_gi_stick', + 'object_gi_map', + 'object_oF1d_map', + 'object_ru2', + 'object_gi_shield_1', + 'object_dekujr', + 'object_gi_magicpot', + 'object_gi_bomb_1', + 'object_oF1s', + 'object_ma2', + 'object_gi_purse', + 'object_hni', + 'object_tw', + 'object_rr', + 'object_bxa', + 'object_anubice', + 'object_gi_gerudo', + 'object_gi_arrow', + 'object_gi_bomb_2', + 'object_gi_egg', + 'object_gi_scale', + 'object_gi_shield_2', + 'object_gi_hookshot', + 'object_gi_ocarina', + 'object_gi_milk', + 'object_ma1', + 'object_ganon', + 'object_sst', + 'object_ny', + 'object_fr', + 'object_gi_pachinko', + 'object_gi_boomerang', + 'object_gi_bow', + 'object_gi_glasses', + 'object_gi_liquid', + 'object_ani', + 'object_demo_6k', + 'object_gi_shield_3', + 'object_gi_letter', + 'object_spot15_obj', + 'object_jya_obj', + 'object_gi_clothes', + 'object_gi_bean', + 'object_gi_fish', + 'object_gi_saw', + 'object_gi_hammer', + 'object_gi_grass', + 'object_gi_longsword', + 'object_spot01_objects', + 'object_md', + 'object_km1', + 'object_kw1', + 'object_zo', + 'object_kz', + 'object_umajump', + 'object_masterkokiri', + 'object_masterkokirihead', + 'object_mastergolon', + 'object_masterzoora', + 'object_aob', + 'object_ik', + 'object_ahg', + 'object_cne', + 'object_gi_niwatori', + 'object_skj', + 'object_gi_bottle_letter', + 'object_bji', + 'object_bba', + 'object_gi_ocarina_0', + 'object_ds', + 'object_ane', + 'object_boj', + 'object_spot03_object', + 'object_spot07_object', + 'object_fz', + 'object_bob', + 'object_ge1', + 'object_yabusame_point', + 'object_gi_boots_2', + 'object_gi_seed', + 'object_gnd_magic', + 'object_d_elevator', + 'object_d_hsblock', + 'object_d_lift', + 'object_mamenoki', + 'object_goroiwa', + 'object_toryo', + 'object_daiku', + 'object_nwc', + 'object_blkobj', + 'object_gm', + 'object_ms', + 'object_hs', + 'object_ingate', + 'object_lightswitch', + 'object_kusa', + 'object_tsubo', + 'object_gi_gloves', + 'object_gi_coin', + 'object_kanban', + 'object_gjyo_objects', + 'object_owl', + 'object_mk', + 'object_fu', + 'object_gi_ki_tan_mask', + 'object_gi_redead_mask', + 'object_gi_skj_mask', + 'object_gi_rabit_mask', + 'object_gi_truth_mask', + 'object_ganon_objects', + 'object_siofuki', + 'object_stream', + 'object_mm', + 'object_fa', + 'object_os', + 'object_gi_eye_lotion', + 'object_gi_powder', + 'object_gi_mushroom', + 'object_gi_ticketstone', + 'object_gi_brokensword', + 'object_js', + 'object_cs', + 'object_gi_prescription', + 'object_gi_bracelet', + 'object_gi_soldout', + 'object_gi_frog', + 'object_mag', + 'object_door_gerudo', + 'object_gt', + 'object_efc_erupc', + 'object_zl2_anime1', + 'object_zl2_anime2', + 'object_gi_golonmask', + 'object_gi_zoramask', + 'object_gi_gerudomask', + 'object_ganon2', + 'object_ka', + 'object_ts', + 'object_zg', + 'object_gi_hoverboots', + 'object_gi_m_arrow', + 'object_ds2', + 'object_ec', + 'object_fish', + 'object_gi_sutaru', + 'object_gi_goddess', + 'object_ssh', + 'object_bigokuta', + 'object_bg', + 'object_spot05_objects', + 'object_spot12_obj', + 'object_bombiwa', + 'object_hintnuts', + 'object_rs', + 'object_spot00_break', + 'object_gla', + 'object_shopnuts', + 'object_geldb', + 'object_gr', + 'object_dog', + 'object_jya_iron', + 'object_jya_door', + 'object_spot01_objects2', + 'object_spot11_obj', + 'object_kibako2', + 'object_dns', + 'object_dnk', + 'object_gi_fire', + 'object_gi_insect', + 'object_gi_butterfly', + 'object_gi_ghost', + 'object_gi_soul', + 'object_bowl', + 'object_po_field', + 'object_demo_kekkai', + 'object_efc_doughnut', + 'object_gi_dekupouch', + 'object_ganon_anime1', + 'object_ganon_anime2', + 'object_ganon_anime3', + 'object_gi_rupy', + 'object_spot01_matoya', + 'object_spot01_matoyab', + 'object_po_composer', + 'object_mu', + 'object_wf', + 'object_skb', + 'object_gj', + 'object_geff', + 'object_haka_door', + 'object_gs', + 'object_ps', + 'object_bwall', + 'object_crow', + 'object_cow', + 'object_cob', + 'object_gi_sword_1', + 'object_door_killer', + 'object_ouke_haka', + 'object_timeblock', + 'object_zl4', + 'g_pn_01', + 'g_pn_02', + 'g_pn_03', + 'g_pn_04', + 'g_pn_05', + 'g_pn_06', + 'g_pn_07', + 'g_pn_08', + 'g_pn_09', + 'g_pn_10', + 'g_pn_11', + 'g_pn_12', + 'g_pn_13', + 'g_pn_14', + 'g_pn_15', + 'g_pn_16', + 'g_pn_17', + 'g_pn_18', + 'g_pn_19', + 'g_pn_20', + 'g_pn_21', + 'g_pn_22', + 'g_pn_23', + 'g_pn_24', + 'g_pn_25', + 'g_pn_26', + 'g_pn_27', + 'g_pn_28', + 'g_pn_29', + 'g_pn_30', + 'g_pn_31', + 'g_pn_32', + 'g_pn_33', + 'g_pn_34', + 'g_pn_35', + 'g_pn_36', + 'g_pn_37', + 'g_pn_38', + 'g_pn_39', + 'g_pn_40', + 'g_pn_41', + 'g_pn_42', + 'g_pn_43', + 'g_pn_44', + 'g_pn_45', + 'g_pn_46', + 'g_pn_47', + 'g_pn_48', + 'g_pn_49', + 'g_pn_50', + 'g_pn_51', + 'g_pn_52', + 'g_pn_53', + 'g_pn_54', + 'g_pn_55', + 'g_pn_56', + 'g_pn_57', + 'z_select_static', + 'nintendo_rogo_static', + 'title_static', + 'parameter_static', + 'vr_fine0_static', + 'vr_fine0_pal_static', + 'vr_fine1_static', + 'vr_fine1_pal_static', + 'vr_fine2_static', + 'vr_fine2_pal_static', + 'vr_fine3_static', + 'vr_fine3_pal_static', + 'vr_cloud0_static', + 'vr_cloud0_pal_static', + 'vr_cloud1_static', + 'vr_cloud1_pal_static', + 'vr_cloud2_static', + 'vr_cloud2_pal_static', + 'vr_cloud3_static', + 'vr_cloud3_pal_static', + 'vr_holy0_static', + 'vr_holy0_pal_static', + 'vr_holy1_static', + 'vr_holy1_pal_static', + 'vr_MDVR_static', + 'vr_MDVR_pal_static', + 'vr_MNVR_static', + 'vr_MNVR_pal_static', + 'vr_RUVR_static', + 'vr_RUVR_pal_static', + 'vr_LHVR_static', + 'vr_LHVR_pal_static', + 'vr_KHVR_static', + 'vr_KHVR_pal_static', + 'vr_K3VR_static', + 'vr_K3VR_pal_static', + 'vr_K4VR_static', + 'vr_K4VR_pal_static', + 'vr_K5VR_static', + 'vr_K5VR_pal_static', + 'vr_SP1a_static', + 'vr_SP1a_pal_static', + 'vr_MLVR_static', + 'vr_MLVR_pal_static', + 'vr_KKRVR_static', + 'vr_KKRVR_pal_static', + 'vr_KR3VR_static', + 'vr_KR3VR_pal_static', + 'vr_IPVR_static', + 'vr_IPVR_pal_static', + 'vr_KSVR_static', + 'vr_KSVR_pal_static', + 'vr_GLVR_static', + 'vr_GLVR_pal_static', + 'vr_ZRVR_static', + 'vr_ZRVR_pal_static', + 'vr_DGVR_static', + 'vr_DGVR_pal_static', + 'vr_ALVR_static', + 'vr_ALVR_pal_static', + 'vr_NSVR_static', + 'vr_NSVR_pal_static', + 'vr_LBVR_static', + 'vr_LBVR_pal_static', + 'vr_TTVR_static', + 'vr_TTVR_pal_static', + 'vr_FCVR_static', + 'vr_FCVR_pal_static', + 'elf_message_field', + 'elf_message_ydan', + 'ydan_scene', +'ydan_room_0', +'ydan_room_1', +'ydan_room_2', +'ydan_room_3', +'ydan_room_4', +'ydan_room_5', +'ydan_room_6', +'ydan_room_7', +'ydan_room_8', +'ydan_room_9', +'ydan_room_10', +'ydan_room_11', +'ddan_scene', +'ddan_room_0', +'ddan_room_1', +'ddan_room_2', +'ddan_room_3', +'ddan_room_4', +'ddan_room_5', +'ddan_room_6', +'ddan_room_7', +'ddan_room_8', +'ddan_room_9', +'ddan_room_10', +'ddan_room_11', +'ddan_room_12', +'ddan_room_13', +'ddan_room_14', +'ddan_room_15', +'ddan_room_16', +'bdan_scene', +'bdan_room_0', +'bdan_room_1', +'bdan_room_2', +'bdan_room_3', +'bdan_room_4', +'bdan_room_5', +'bdan_room_6', +'bdan_room_7', +'bdan_room_8', +'bdan_room_9', +'bdan_room_10', +'bdan_room_11', +'bdan_room_12', +'bdan_room_13', +'bdan_room_14', +'bdan_room_15', +'Bmori1_scene', +'Bmori1_room_0', +'Bmori1_room_1', +'Bmori1_room_2', +'Bmori1_room_3', +'Bmori1_room_4', +'Bmori1_room_5', +'Bmori1_room_6', +'Bmori1_room_7', +'Bmori1_room_8', +'Bmori1_room_9', +'Bmori1_room_10', +'Bmori1_room_11', +'Bmori1_room_12', +'Bmori1_room_13', +'Bmori1_room_14', +'Bmori1_room_15', +'Bmori1_room_16', +'Bmori1_room_17', +'Bmori1_room_18', +'Bmori1_room_19', +'Bmori1_room_20', +'Bmori1_room_21', +'Bmori1_room_22', +'HIDAN_scene', +'HIDAN_room_0', +'HIDAN_room_1', +'HIDAN_room_2', +'HIDAN_room_3', +'HIDAN_room_4', +'HIDAN_room_5', +'HIDAN_room_6', +'HIDAN_room_7', +'HIDAN_room_8', +'HIDAN_room_9', +'HIDAN_room_10', +'HIDAN_room_11', +'HIDAN_room_12', +'HIDAN_room_13', +'HIDAN_room_14', +'HIDAN_room_15', +'HIDAN_room_16', +'HIDAN_room_17', +'HIDAN_room_18', +'HIDAN_room_19', +'HIDAN_room_20', +'HIDAN_room_21', +'HIDAN_room_22', +'HIDAN_room_23', +'HIDAN_room_24', +'HIDAN_room_25', +'HIDAN_room_26', +'MIZUsin_scene', +'MIZUsin_room_0', +'MIZUsin_room_1', +'MIZUsin_room_2', +'MIZUsin_room_3', +'MIZUsin_room_4', +'MIZUsin_room_5', +'MIZUsin_room_6', +'MIZUsin_room_7', +'MIZUsin_room_8', +'MIZUsin_room_9', +'MIZUsin_room_10', +'MIZUsin_room_11', +'MIZUsin_room_12', +'MIZUsin_room_13', +'MIZUsin_room_14', +'MIZUsin_room_15', +'MIZUsin_room_16', +'MIZUsin_room_17', +'MIZUsin_room_18', +'MIZUsin_room_19', +'MIZUsin_room_20', +'MIZUsin_room_21', +'MIZUsin_room_22', +'jyasinzou_scene', +'jyasinzou_room_0', +'jyasinzou_room_1', +'jyasinzou_room_2', +'jyasinzou_room_3', +'jyasinzou_room_4', +'jyasinzou_room_5', +'jyasinzou_room_6', +'jyasinzou_room_7', +'jyasinzou_room_8', +'jyasinzou_room_9', +'jyasinzou_room_10', +'jyasinzou_room_11', +'jyasinzou_room_12', +'jyasinzou_room_13', +'jyasinzou_room_14', +'jyasinzou_room_15', +'jyasinzou_room_16', +'jyasinzou_room_17', +'jyasinzou_room_18', +'jyasinzou_room_19', +'jyasinzou_room_20', +'jyasinzou_room_21', +'jyasinzou_room_22', +'jyasinzou_room_23', +'jyasinzou_room_24', +'jyasinzou_room_25', +'jyasinzou_room_26', +'jyasinzou_room_27', +'jyasinzou_room_28', +'HAKAdan_scene', +'HAKAdan_room_0', +'HAKAdan_room_1', +'HAKAdan_room_2', +'HAKAdan_room_3', +'HAKAdan_room_4', +'HAKAdan_room_5', +'HAKAdan_room_6', +'HAKAdan_room_7', +'HAKAdan_room_8', +'HAKAdan_room_9', +'HAKAdan_room_10', +'HAKAdan_room_11', +'HAKAdan_room_12', +'HAKAdan_room_13', +'HAKAdan_room_14', +'HAKAdan_room_15', +'HAKAdan_room_16', +'HAKAdan_room_17', +'HAKAdan_room_18', +'HAKAdan_room_19', +'HAKAdan_room_20', +'HAKAdan_room_21', +'HAKAdan_room_22', +'HAKAdanCH_scene', +'HAKAdanCH_room_0', +'HAKAdanCH_room_1', +'HAKAdanCH_room_2', +'HAKAdanCH_room_3', +'HAKAdanCH_room_4', +'HAKAdanCH_room_5', +'HAKAdanCH_room_6', +'ice_doukutu_scene', +'ice_doukutu_room_0', +'ice_doukutu_room_1', +'ice_doukutu_room_2', +'ice_doukutu_room_3', +'ice_doukutu_room_4', +'ice_doukutu_room_5', +'ice_doukutu_room_6', +'ice_doukutu_room_7', +'ice_doukutu_room_8', +'ice_doukutu_room_9', +'ice_doukutu_room_10', +'ice_doukutu_room_11', +'men_scene', +'men_room_0', +'men_room_1', +'men_room_2', +'men_room_3', +'men_room_4', +'men_room_5', +'men_room_6', +'men_room_7', +'men_room_8', +'men_room_9', +'men_room_10', +'ganontika_scene', +'ganontika_room_0', +'ganontika_room_1', +'ganontika_room_2', +'ganontika_room_3', +'ganontika_room_4', +'ganontika_room_5', +'ganontika_room_6', +'ganontika_room_7', +'ganontika_room_8', +'ganontika_room_9', +'ganontika_room_10', +'ganontika_room_11', +'ganontika_room_12', +'ganontika_room_13', +'ganontika_room_14', +'ganontika_room_15', +'ganontika_room_16', +'ganontika_room_17', +'ganontika_room_18', +'ganontika_room_19', +'spot00_scene', +'spot00_room_0', +'spot01_scene', +'spot01_room_0', +'spot02_scene', +'spot02_room_0', +'spot02_room_1', +'spot03_scene', +'spot03_room_0', +'spot03_room_1', +'spot04_scene', +'spot04_room_0', +'spot04_room_1', +'spot04_room_2', +'spot05_scene', +'spot05_room_0', +'spot06_scene', +'spot06_room_0', +'spot07_scene', +'spot07_room_0', +'spot07_room_1', +'spot08_scene', +'spot08_room_0', +'spot09_scene', +'spot09_room_0', +'spot10_scene', +'spot10_room_0', +'spot10_room_1', +'spot10_room_2', +'spot10_room_3', +'spot10_room_4', +'spot10_room_5', +'spot10_room_6', +'spot10_room_7', +'spot10_room_8', +'spot10_room_9', +'spot11_scene', +'spot11_room_0', +'spot12_scene', +'spot12_room_0', +'spot12_room_1', +'spot13_scene', +'spot13_room_0', +'spot13_room_1', +'spot15_scene', +'spot15_room_0', +'spot16_scene', +'spot16_room_0', +'spot17_scene', +'spot17_room_0', +'spot17_room_1', +'spot18_scene', +'spot18_room_0', +'spot18_room_1', +'spot18_room_2', +'spot18_room_3', +'market_day_scene', +'market_day_room_0', +'market_night_scene', +'market_night_room_0', +'kenjyanoma_scene', +'kenjyanoma_room_0', +'tokinoma_scene', +'tokinoma_room_0', +'tokinoma_room_1', +'link_home_scene', +'link_home_room_0', +'kokiri_shop_scene', +'kokiri_shop_room_0', +'kokiri_home_scene', +'kokiri_home_room_0', +'kakusiana_scene', +'kakusiana_room_0', +'kakusiana_room_1', +'kakusiana_room_2', +'kakusiana_room_3', +'kakusiana_room_4', +'kakusiana_room_5', +'kakusiana_room_6', +'kakusiana_room_7', +'kakusiana_room_8', +'kakusiana_room_9', +'kakusiana_room_10', +'kakusiana_room_11', +'kakusiana_room_12', +'kakusiana_room_13', +'entra_scene', +'entra_room_0', +'moribossroom_scene', +'moribossroom_room_0', +'moribossroom_room_1', +'syatekijyou_scene', +'syatekijyou_room_0', +'shop1_scene', +'shop1_room_0', +'hairal_niwa_scene', +'hairal_niwa_room_0', +'ganon_tou_scene', +'ganon_tou_room_0', +'market_alley_scene', +'market_alley_room_0', +'spot20_scene', +'spot20_room_0', +'market_ruins_scene', +'market_ruins_room_0', +'entra_n_scene', +'entra_n_room_0', +'enrui_scene', +'enrui_room_0', +'market_alley_n_scene', +'market_alley_n_room_0', +'hiral_demo_scene', +'hiral_demo_room_0', +'kokiri_home3_scene', +'kokiri_home3_room_0', +'malon_stable_scene', +'malon_stable_room_0', +'kakariko_scene', +'kakariko_room_0', +'bdan_boss_scene', +'bdan_boss_room_0', +'bdan_boss_room_1', +'FIRE_bs_scene', +'FIRE_bs_room_0', +'FIRE_bs_room_1', +'hut_scene', +'hut_room_0', +'daiyousei_izumi_scene', +'daiyousei_izumi_room_0', +'hakaana_scene', +'hakaana_room_0', +'yousei_izumi_tate_scene', +'yousei_izumi_tate_room_0', +'yousei_izumi_yoko_scene', +'yousei_izumi_yoko_room_0', +'golon_scene', +'golon_room_0', +'zoora_scene', +'zoora_room_0', +'drag_scene', +'drag_room_0', +'alley_shop_scene', +'alley_shop_room_0', +'night_shop_scene', +'night_shop_room_0', +'impa_scene', +'impa_room_0', +'labo_scene', +'labo_room_0', +'tent_scene', +'tent_room_0', +'nakaniwa_scene', +'nakaniwa_room_0', +'ddan_boss_scene', +'ddan_boss_room_0', +'ddan_boss_room_1', +'ydan_boss_scene', +'ydan_boss_room_0', +'ydan_boss_room_1', +'HAKAdan_bs_scene', +'HAKAdan_bs_room_0', +'HAKAdan_bs_room_1', +'MIZUsin_bs_scene', +'MIZUsin_bs_room_0', +'MIZUsin_bs_room_1', +'ganon_scene', +'ganon_room_0', +'ganon_room_1', +'ganon_room_2', +'ganon_room_3', +'ganon_room_4', +'ganon_room_5', +'ganon_room_6', +'ganon_room_7', +'ganon_room_8', +'ganon_room_9', +'ganon_boss_scene', +'ganon_boss_room_0', +'jyasinboss_scene', +'jyasinboss_room_0', +'jyasinboss_room_1', +'jyasinboss_room_2', +'jyasinboss_room_3', +'kokiri_home4_scene', +'kokiri_home4_room_0', +'kokiri_home5_scene', +'kokiri_home5_room_0', +'ganon_final_scene', +'ganon_final_room_0', +'kakariko3_scene', +'kakariko3_room_0', +'hakasitarelay_scene', +'hakasitarelay_room_0', +'hakasitarelay_room_1', +'hakasitarelay_room_2', +'hakasitarelay_room_3', +'hakasitarelay_room_4', +'hakasitarelay_room_5', +'hakasitarelay_room_6', +'shrine_scene', +'shrine_room_0', +'turibori_scene', +'turibori_room_0', +'shrine_n_scene', +'shrine_n_room_0', +'shrine_r_scene', +'shrine_r_room_0', +'hakaana2_scene', +'hakaana2_room_0', +'gerudoway_scene', +'gerudoway_room_0', +'gerudoway_room_1', +'gerudoway_room_2', +'gerudoway_room_3', +'gerudoway_room_4', +'gerudoway_room_5', +'hairal_niwa_n_scene', +'hairal_niwa_n_room_0', +'bowling_scene', +'bowling_room_0', +'hakaana_ouke_scene', +'hakaana_ouke_room_0', +'hakaana_ouke_room_1', +'hakaana_ouke_room_2', +'hylia_labo_scene', +'hylia_labo_room_0', +'souko_scene', +'souko_room_0', +'souko_room_1', +'souko_room_2', +'miharigoya_scene', +'miharigoya_room_0', +'mahouya_scene', +'mahouya_room_0', +'takaraya_scene', +'takaraya_room_0', +'takaraya_room_1', +'takaraya_room_2', +'takaraya_room_3', +'takaraya_room_4', +'takaraya_room_5', +'takaraya_room_6', +'ganon_sonogo_scene', +'ganon_sonogo_room_0', +'ganon_sonogo_room_1', +'ganon_sonogo_room_2', +'ganon_sonogo_room_3', +'ganon_sonogo_room_4', +'ganon_demo_scene', +'ganon_demo_room_0', +'face_shop_scene', +'face_shop_room_0', +'kinsuta_scene', +'kinsuta_room_0', +'ganontikasonogo_scene', +'ganontikasonogo_room_0', +'ganontikasonogo_room_1', + 'bump_texture_static', + 'anime_model_1_static', + 'anime_model_2_static', + 'anime_model_3_static', + 'anime_model_4_static', + 'anime_model_5_static', + 'anime_model_6_static', + 'anime_texture_1_static', + 'anime_texture_2_static', + 'anime_texture_3_static', + 'anime_texture_4_static', + 'anime_texture_5_static', + 'anime_texture_6_static', + 'softsprite_matrix_static', +] + +romData = None + + +def initialize_worker(rom_data): + global romData + romData = rom_data + +def read_uint32_be(offset): + return struct.unpack('>I', romData[offset:offset+4])[0] + +def write_output_file(name, offset, size): + try: + with open(name, 'wb') as f: + f.write(romData[offset:offset+size]) + except IOError: + print('failed to write file ' + name) + +def ExtractFunc(i): + filename = 'baserom/' + FILE_NAMES[i] + entryOffset = FILE_TABLE_OFFSET + 16 * i + + virtStart = read_uint32_be(entryOffset + 0) + virtEnd = read_uint32_be(entryOffset + 4) + physStart = read_uint32_be(entryOffset + 8) + physEnd = read_uint32_be(entryOffset + 12) + + if physEnd == 0: # uncompressed + compressed = False + size = virtEnd - virtStart + else: # compressed + compressed = True + size = physEnd - physStart + + print('extracting ' + filename + " (0x%08X, 0x%08X)" % (virtStart, virtEnd)) + write_output_file(filename, physStart, size) + if compressed: + os.system('tools/yaz0 -d ' + filename + ' ' + filename) + +##################################################################### + +def main(): + try: + os.mkdir('baserom') + except: + pass + + # read baserom data + try: + with open(ROM_FILE_NAME, 'rb') as f: + rom_data = f.read() + except IOError: + print('failed to read ' + ROM_FILE_NAME) + sys.exit(1) + + # extract files + num_cores = cpu_count() + print("Extracting baserom with " + str(num_cores) + " CPU cores.") + with Pool(num_cores, initialize_worker, (rom_data,)) as p: + p.map(ExtractFunc, range(len(FILE_NAMES))) + +if __name__ == "__main__": + main() diff --git a/OTRGui/assets/extractor/Config.xml b/OTRGui/assets/extractor/Config_GC_MQ_D.xml similarity index 83% rename from OTRGui/assets/extractor/Config.xml rename to OTRGui/assets/extractor/Config_GC_MQ_D.xml index 6e86fa8d8..51e536292 100644 --- a/OTRGui/assets/extractor/Config.xml +++ b/OTRGui/assets/extractor/Config_GC_MQ_D.xml @@ -2,7 +2,7 @@ - + diff --git a/OTRGui/assets/extractor/Config_GC_NMQ_D.xml b/OTRGui/assets/extractor/Config_GC_NMQ_D.xml new file mode 100644 index 000000000..7cc11ac18 --- /dev/null +++ b/OTRGui/assets/extractor/Config_GC_NMQ_D.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/OTRGui/assets/extractor/Config_GC_NMQ_PAL_F.xml b/OTRGui/assets/extractor/Config_GC_NMQ_PAL_F.xml new file mode 100644 index 000000000..b98acfb00 --- /dev/null +++ b/OTRGui/assets/extractor/Config_GC_NMQ_PAL_F.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/OTRGui/assets/extractor/filelists/gamecube_pal.txt b/OTRGui/assets/extractor/filelists/gamecube_pal.txt new file mode 100644 index 000000000..c9746c1da --- /dev/null +++ b/OTRGui/assets/extractor/filelists/gamecube_pal.txt @@ -0,0 +1,1510 @@ +makerom +boot +dmadata +Audiobank +Audioseq +Audiotable +link_animetion +icon_item_static +icon_item_24_static +icon_item_field_static +icon_item_dungeon_static +icon_item_gameover_static +icon_item_nes_static +icon_item_ger_static +icon_item_fra_static +item_name_static +map_name_static +do_action_static +message_static +message_texture_static +nes_font_static +nes_message_data_static +ger_message_data_static +fra_message_data_static +staff_message_data_static +map_grand_static +map_48x85_static +map_i_static +code +ovl_title +ovl_select +ovl_opening +ovl_file_choose +ovl_kaleido_scope +ovl_player_actor +ovl_map_mark_data +ovl_En_Test +ovl_Arms_Hook +ovl_Arrow_Fire +ovl_Arrow_Ice +ovl_Arrow_Light +ovl_Bg_Bdan_Objects +ovl_Bg_Bdan_Switch +ovl_Bg_Bom_Guard +ovl_Bg_Bombwall +ovl_Bg_Bowl_Wall +ovl_Bg_Breakwall +ovl_Bg_Ddan_Jd +ovl_Bg_Ddan_Kd +ovl_Bg_Dodoago +ovl_Bg_Dy_Yoseizo +ovl_Bg_Ganon_Otyuka +ovl_Bg_Gate_Shutter +ovl_Bg_Gjyo_Bridge +ovl_Bg_Gnd_Darkmeiro +ovl_Bg_Gnd_Firemeiro +ovl_Bg_Gnd_Iceblock +ovl_Bg_Gnd_Nisekabe +ovl_Bg_Gnd_Soulmeiro +ovl_Bg_Haka +ovl_Bg_Haka_Gate +ovl_Bg_Haka_Huta +ovl_Bg_Haka_Megane +ovl_Bg_Haka_MeganeBG +ovl_Bg_Haka_Sgami +ovl_Bg_Haka_Ship +ovl_Bg_Haka_Trap +ovl_Bg_Haka_Tubo +ovl_Bg_Haka_Water +ovl_Bg_Haka_Zou +ovl_Bg_Heavy_Block +ovl_Bg_Hidan_Curtain +ovl_Bg_Hidan_Dalm +ovl_Bg_Hidan_Firewall +ovl_Bg_Hidan_Fslift +ovl_Bg_Hidan_Fwbig +ovl_Bg_Hidan_Hamstep +ovl_Bg_Hidan_Hrock +ovl_Bg_Hidan_Kousi +ovl_Bg_Hidan_Kowarerukabe +ovl_Bg_Hidan_Rock +ovl_Bg_Hidan_Rsekizou +ovl_Bg_Hidan_Sekizou +ovl_Bg_Hidan_Sima +ovl_Bg_Hidan_Syoku +ovl_Bg_Ice_Objects +ovl_Bg_Ice_Shelter +ovl_Bg_Ice_Shutter +ovl_Bg_Ice_Turara +ovl_Bg_Ingate +ovl_Bg_Jya_1flift +ovl_Bg_Jya_Amishutter +ovl_Bg_Jya_Bigmirror +ovl_Bg_Jya_Block +ovl_Bg_Jya_Bombchuiwa +ovl_Bg_Jya_Bombiwa +ovl_Bg_Jya_Cobra +ovl_Bg_Jya_Goroiwa +ovl_Bg_Jya_Haheniron +ovl_Bg_Jya_Ironobj +ovl_Bg_Jya_Kanaami +ovl_Bg_Jya_Lift +ovl_Bg_Jya_Megami +ovl_Bg_Jya_Zurerukabe +ovl_Bg_Menkuri_Eye +ovl_Bg_Menkuri_Kaiten +ovl_Bg_Menkuri_Nisekabe +ovl_Bg_Mizu_Bwall +ovl_Bg_Mizu_Movebg +ovl_Bg_Mizu_Shutter +ovl_Bg_Mizu_Uzu +ovl_Bg_Mizu_Water +ovl_Bg_Mjin +ovl_Bg_Mori_Bigst +ovl_Bg_Mori_Elevator +ovl_Bg_Mori_Hashigo +ovl_Bg_Mori_Hashira4 +ovl_Bg_Mori_Hineri +ovl_Bg_Mori_Idomizu +ovl_Bg_Mori_Kaitenkabe +ovl_Bg_Mori_Rakkatenjo +ovl_Bg_Po_Event +ovl_Bg_Po_Syokudai +ovl_Bg_Pushbox +ovl_Bg_Relay_Objects +ovl_Bg_Spot00_Break +ovl_Bg_Spot00_Hanebasi +ovl_Bg_Spot01_Fusya +ovl_Bg_Spot01_Idohashira +ovl_Bg_Spot01_Idomizu +ovl_Bg_Spot01_Idosoko +ovl_Bg_Spot01_Objects2 +ovl_Bg_Spot02_Objects +ovl_Bg_Spot03_Taki +ovl_Bg_Spot05_Soko +ovl_Bg_Spot06_Objects +ovl_Bg_Spot07_Taki +ovl_Bg_Spot08_Bakudankabe +ovl_Bg_Spot08_Iceblock +ovl_Bg_Spot09_Obj +ovl_Bg_Spot11_Bakudankabe +ovl_Bg_Spot11_Oasis +ovl_Bg_Spot12_Gate +ovl_Bg_Spot12_Saku +ovl_Bg_Spot15_Rrbox +ovl_Bg_Spot15_Saku +ovl_Bg_Spot16_Bombstone +ovl_Bg_Spot16_Doughnut +ovl_Bg_Spot17_Bakudankabe +ovl_Bg_Spot17_Funen +ovl_Bg_Spot18_Basket +ovl_Bg_Spot18_Futa +ovl_Bg_Spot18_Obj +ovl_Bg_Spot18_Shutter +ovl_Bg_Sst_Floor +ovl_Bg_Toki_Hikari +ovl_Bg_Toki_Swd +ovl_Bg_Treemouth +ovl_Bg_Umajump +ovl_Bg_Vb_Sima +ovl_Bg_Ydan_Hasi +ovl_Bg_Ydan_Maruta +ovl_Bg_Ydan_Sp +ovl_Bg_Zg +ovl_Boss_Dodongo +ovl_Boss_Fd +ovl_Boss_Fd2 +ovl_Boss_Ganon +ovl_Boss_Ganon2 +ovl_Boss_Ganondrof +ovl_Boss_Goma +ovl_Boss_Mo +ovl_Boss_Sst +ovl_Boss_Tw +ovl_Boss_Va +ovl_Demo_6K +ovl_Demo_Du +ovl_Demo_Ec +ovl_Demo_Effect +ovl_Demo_Ext +ovl_Demo_Geff +ovl_Demo_Gj +ovl_Demo_Go +ovl_Demo_Gt +ovl_Demo_Ik +ovl_Demo_Im +ovl_Demo_Kankyo +ovl_Demo_Kekkai +ovl_Demo_Sa +ovl_Demo_Shd +ovl_Demo_Tre_Lgt +ovl_Door_Ana +ovl_Door_Gerudo +ovl_Door_Killer +ovl_Door_Shutter +ovl_Door_Toki +ovl_Door_Warp1 +ovl_Efc_Erupc +ovl_Eff_Dust +ovl_Effect_Ss_Blast +ovl_Effect_Ss_Bomb +ovl_Effect_Ss_Bomb2 +ovl_Effect_Ss_Bubble +ovl_Effect_Ss_D_Fire +ovl_Effect_Ss_Dead_Db +ovl_Effect_Ss_Dead_Dd +ovl_Effect_Ss_Dead_Ds +ovl_Effect_Ss_Dead_Sound +ovl_Effect_Ss_Dt_Bubble +ovl_Effect_Ss_Dust +ovl_Effect_Ss_En_Fire +ovl_Effect_Ss_En_Ice +ovl_Effect_Ss_Extra +ovl_Effect_Ss_Fcircle +ovl_Effect_Ss_Fhg_Flash +ovl_Effect_Ss_Fire_Tail +ovl_Effect_Ss_G_Fire +ovl_Effect_Ss_G_Magma +ovl_Effect_Ss_G_Magma2 +ovl_Effect_Ss_G_Ripple +ovl_Effect_Ss_G_Spk +ovl_Effect_Ss_G_Splash +ovl_Effect_Ss_Hahen +ovl_Effect_Ss_HitMark +ovl_Effect_Ss_Ice_Piece +ovl_Effect_Ss_Ice_Smoke +ovl_Effect_Ss_K_Fire +ovl_Effect_Ss_Kakera +ovl_Effect_Ss_KiraKira +ovl_Effect_Ss_Lightning +ovl_Effect_Ss_Sibuki +ovl_Effect_Ss_Sibuki2 +ovl_Effect_Ss_Solder_Srch_Ball +ovl_Effect_Ss_Stick +ovl_Effect_Ss_Stone1 +ovl_Elf_Msg +ovl_Elf_Msg2 +ovl_En_Am +ovl_En_Ani +ovl_En_Anubice +ovl_En_Anubice_Fire +ovl_En_Anubice_Tag +ovl_En_Arow_Trap +ovl_En_Arrow +ovl_En_Attack_Niw +ovl_En_Ba +ovl_En_Bb +ovl_En_Bdfire +ovl_En_Bigokuta +ovl_En_Bili +ovl_En_Bird +ovl_En_Blkobj +ovl_En_Bom +ovl_En_Bom_Bowl_Man +ovl_En_Bom_Bowl_Pit +ovl_En_Bom_Chu +ovl_En_Bombf +ovl_En_Boom +ovl_En_Box +ovl_En_Brob +ovl_En_Bubble +ovl_En_Butte +ovl_En_Bw +ovl_En_Bx +ovl_En_Changer +ovl_En_Clear_Tag +ovl_En_Cow +ovl_En_Crow +ovl_En_Cs +ovl_En_Daiku +ovl_En_Daiku_Kakariko +ovl_En_Dekubaba +ovl_En_Dekunuts +ovl_En_Dh +ovl_En_Dha +ovl_En_Diving_Game +ovl_En_Dns +ovl_En_Dnt_Demo +ovl_En_Dnt_Jiji +ovl_En_Dnt_Nomal +ovl_En_Dodojr +ovl_En_Dodongo +ovl_En_Dog +ovl_En_Door +ovl_En_Ds +ovl_En_Du +ovl_En_Dy_Extra +ovl_En_Eg +ovl_En_Eiyer +ovl_En_Elf +ovl_En_Encount1 +ovl_En_Encount2 +ovl_En_Ex_Item +ovl_En_Ex_Ruppy +ovl_En_Fd +ovl_En_Fd_Fire +ovl_En_Fhg_Fire +ovl_En_Fire_Rock +ovl_En_Firefly +ovl_En_Fish +ovl_En_Floormas +ovl_En_Fr +ovl_En_Fu +ovl_En_Fw +ovl_En_Fz +ovl_En_G_Switch +ovl_En_Ganon_Mant +ovl_En_Ganon_Organ +ovl_En_Gb +ovl_En_Ge1 +ovl_En_Ge2 +ovl_En_Ge3 +ovl_En_GeldB +ovl_En_GirlA +ovl_En_Gm +ovl_En_Go +ovl_En_Go2 +ovl_En_Goma +ovl_En_Goroiwa +ovl_En_Gs +ovl_En_Guest +ovl_En_Hata +ovl_En_Heishi1 +ovl_En_Heishi2 +ovl_En_Heishi3 +ovl_En_Heishi4 +ovl_En_Hintnuts +ovl_En_Holl +ovl_En_Honotrap +ovl_En_Horse +ovl_En_Horse_Game_Check +ovl_En_Horse_Ganon +ovl_En_Horse_Link_Child +ovl_En_Horse_Normal +ovl_En_Horse_Zelda +ovl_En_Hs +ovl_En_Hs2 +ovl_En_Hy +ovl_En_Ice_Hono +ovl_En_Ik +ovl_En_In +ovl_En_Insect +ovl_En_Ishi +ovl_En_It +ovl_En_Jj +ovl_En_Js +ovl_En_Jsjutan +ovl_En_Kakasi +ovl_En_Kakasi2 +ovl_En_Kakasi3 +ovl_En_Kanban +ovl_En_Karebaba +ovl_En_Ko +ovl_En_Kusa +ovl_En_Kz +ovl_En_Light +ovl_En_Lightbox +ovl_En_M_Fire1 +ovl_En_M_Thunder +ovl_En_Ma1 +ovl_En_Ma2 +ovl_En_Ma3 +ovl_En_Mag +ovl_En_Mb +ovl_En_Md +ovl_En_Mk +ovl_En_Mm +ovl_En_Mm2 +ovl_En_Ms +ovl_En_Mu +ovl_En_Nb +ovl_En_Niw +ovl_En_Niw_Girl +ovl_En_Niw_Lady +ovl_En_Nutsball +ovl_En_Nwc +ovl_En_Ny +ovl_En_OE2 +ovl_En_Okarina_Effect +ovl_En_Okarina_Tag +ovl_En_Okuta +ovl_En_Ossan +ovl_En_Owl +ovl_En_Part +ovl_En_Peehat +ovl_En_Po_Desert +ovl_En_Po_Field +ovl_En_Po_Relay +ovl_En_Po_Sisters +ovl_En_Poh +ovl_En_Pu_box +ovl_En_Rd +ovl_En_Reeba +ovl_En_River_Sound +ovl_En_Rl +ovl_En_Rr +ovl_En_Ru1 +ovl_En_Ru2 +ovl_En_Sa +ovl_En_Sb +ovl_En_Scene_Change +ovl_En_Sda +ovl_En_Shopnuts +ovl_En_Si +ovl_En_Siofuki +ovl_En_Skb +ovl_En_Skj +ovl_En_Skjneedle +ovl_En_Ssh +ovl_En_St +ovl_En_Sth +ovl_En_Stream +ovl_En_Sw +ovl_En_Syateki_Itm +ovl_En_Syateki_Man +ovl_En_Syateki_Niw +ovl_En_Ta +ovl_En_Takara_Man +ovl_En_Tana +ovl_En_Tg +ovl_En_Tite +ovl_En_Tk +ovl_En_Torch +ovl_En_Torch2 +ovl_En_Toryo +ovl_En_Tp +ovl_En_Tr +ovl_En_Trap +ovl_En_Tubo_Trap +ovl_En_Vali +ovl_En_Vase +ovl_En_Vb_Ball +ovl_En_Viewer +ovl_En_Vm +ovl_En_Wall_Tubo +ovl_En_Wallmas +ovl_En_Weather_Tag +ovl_En_Weiyer +ovl_En_Wf +ovl_En_Wonder_Item +ovl_En_Wonder_Talk +ovl_En_Wonder_Talk2 +ovl_En_Wood02 +ovl_En_Xc +ovl_En_Yabusame_Mark +ovl_En_Yukabyun +ovl_En_Zf +ovl_En_Zl1 +ovl_En_Zl2 +ovl_En_Zl3 +ovl_En_Zl4 +ovl_En_Zo +ovl_En_fHG +ovl_End_Title +ovl_Fishing +ovl_Item_B_Heart +ovl_Item_Etcetera +ovl_Item_Inbox +ovl_Item_Ocarina +ovl_Item_Shield +ovl_Magic_Dark +ovl_Magic_Fire +ovl_Magic_Wind +ovl_Mir_Ray +ovl_Obj_Bean +ovl_Obj_Blockstop +ovl_Obj_Bombiwa +ovl_Obj_Comb +ovl_Obj_Dekujr +ovl_Obj_Elevator +ovl_Obj_Hamishi +ovl_Obj_Hana +ovl_Obj_Hsblock +ovl_Obj_Ice_Poly +ovl_Obj_Kibako +ovl_Obj_Kibako2 +ovl_Obj_Lift +ovl_Obj_Lightswitch +ovl_Obj_Makekinsuta +ovl_Obj_Makeoshihiki +ovl_Obj_Mure +ovl_Obj_Mure2 +ovl_Obj_Mure3 +ovl_Obj_Oshihiki +ovl_Obj_Roomtimer +ovl_Obj_Switch +ovl_Obj_Syokudai +ovl_Obj_Timeblock +ovl_Obj_Tsubo +ovl_Obj_Warp2block +ovl_Object_Kankyo +ovl_Oceff_Spot +ovl_Oceff_Storm +ovl_Oceff_Wipe +ovl_Oceff_Wipe2 +ovl_Oceff_Wipe3 +ovl_Oceff_Wipe4 +ovl_Shot_Sun +gameplay_keep +gameplay_field_keep +gameplay_dangeon_keep +gameplay_object_exchange_static +object_link_boy +object_link_child +object_box +object_human +object_okuta +object_poh +object_wallmaster +object_dy_obj +object_firefly +object_dodongo +object_fire +object_niw +object_tite +object_reeba +object_peehat +object_kingdodongo +object_horse +object_zf +object_goma +object_zl1 +object_gol +object_bubble +object_dodojr +object_torch2 +object_bl +object_tp +object_oA1 +object_st +object_bw +object_ei +object_horse_normal +object_oB1 +object_o_anime +object_spot04_objects +object_ddan_objects +object_hidan_objects +object_horse_ganon +object_oA2 +object_spot00_objects +object_mb +object_bombf +object_sk2 +object_oE1 +object_oE_anime +object_oE2 +object_ydan_objects +object_gnd +object_am +object_dekubaba +object_oA3 +object_oA4 +object_oA5 +object_oA6 +object_oA7 +object_jj +object_oA8 +object_oA9 +object_oB2 +object_oB3 +object_oB4 +object_horse_zelda +object_opening_demo1 +object_warp1 +object_b_heart +object_dekunuts +object_oE3 +object_oE4 +object_menkuri_objects +object_oE5 +object_oE6 +object_oE7 +object_oE8 +object_oE9 +object_oE10 +object_oE11 +object_oE12 +object_vali +object_oA10 +object_oA11 +object_mizu_objects +object_fhg +object_ossan +object_mori_hineri1 +object_Bb +object_toki_objects +object_yukabyun +object_zl2 +object_mjin +object_mjin_flash +object_mjin_dark +object_mjin_flame +object_mjin_ice +object_mjin_soul +object_mjin_wind +object_mjin_oka +object_haka_objects +object_spot06_objects +object_ice_objects +object_relay_objects +object_mori_hineri1a +object_mori_hineri2 +object_mori_hineri2a +object_mori_objects +object_mori_tex +object_spot08_obj +object_warp2 +object_hata +object_bird +object_wood02 +object_lightbox +object_pu_box +object_trap +object_vase +object_im +object_ta +object_tk +object_xc +object_vm +object_bv +object_hakach_objects +object_efc_crystal_light +object_efc_fire_ball +object_efc_flash +object_efc_lgt_shower +object_efc_star_field +object_god_lgt +object_light_ring +object_triforce_spot +object_medal +object_bdan_objects +object_sd +object_rd +object_po_sisters +object_heavy_object +object_gndd +object_fd +object_du +object_fw +object_horse_link_child +object_spot02_objects +object_haka +object_ru1 +object_syokudai +object_fd2 +object_dh +object_rl +object_efc_tw +object_demo_tre_lgt +object_gi_key +object_mir_ray +object_brob +object_gi_jewel +object_spot09_obj +object_spot18_obj +object_bdoor +object_spot17_obj +object_shop_dungen +object_nb +object_mo +object_sb +object_gi_melody +object_gi_heart +object_gi_compass +object_gi_bosskey +object_gi_medal +object_gi_nuts +object_sa +object_gi_hearts +object_gi_arrowcase +object_gi_bombpouch +object_in +object_tr +object_spot16_obj +object_oE1s +object_oE4s +object_os_anime +object_gi_bottle +object_gi_stick +object_gi_map +object_oF1d_map +object_ru2 +object_gi_shield_1 +object_dekujr +object_gi_magicpot +object_gi_bomb_1 +object_oF1s +object_ma2 +object_gi_purse +object_hni +object_tw +object_rr +object_bxa +object_anubice +object_gi_gerudo +object_gi_arrow +object_gi_bomb_2 +object_gi_egg +object_gi_scale +object_gi_shield_2 +object_gi_hookshot +object_gi_ocarina +object_gi_milk +object_ma1 +object_ganon +object_sst +object_ny +object_fr +object_gi_pachinko +object_gi_boomerang +object_gi_bow +object_gi_glasses +object_gi_liquid +object_ani +object_demo_6k +object_gi_shield_3 +object_gi_letter +object_spot15_obj +object_jya_obj +object_gi_clothes +object_gi_bean +object_gi_fish +object_gi_saw +object_gi_hammer +object_gi_grass +object_gi_longsword +object_spot01_objects +object_md +object_km1 +object_kw1 +object_zo +object_kz +object_umajump +object_masterkokiri +object_masterkokirihead +object_mastergolon +object_masterzoora +object_aob +object_ik +object_ahg +object_cne +object_gi_niwatori +object_skj +object_gi_bottle_letter +object_bji +object_bba +object_gi_ocarina_0 +object_ds +object_ane +object_boj +object_spot03_object +object_spot07_object +object_fz +object_bob +object_ge1 +object_yabusame_point +object_gi_boots_2 +object_gi_seed +object_gnd_magic +object_d_elevator +object_d_hsblock +object_d_lift +object_mamenoki +object_goroiwa +object_toryo +object_daiku +object_nwc +object_blkobj +object_gm +object_ms +object_hs +object_ingate +object_lightswitch +object_kusa +object_tsubo +object_gi_gloves +object_gi_coin +object_kanban +object_gjyo_objects +object_owl +object_mk +object_fu +object_gi_ki_tan_mask +object_gi_redead_mask +object_gi_skj_mask +object_gi_rabit_mask +object_gi_truth_mask +object_ganon_objects +object_siofuki +object_stream +object_mm +object_fa +object_os +object_gi_eye_lotion +object_gi_powder +object_gi_mushroom +object_gi_ticketstone +object_gi_brokensword +object_js +object_cs +object_gi_prescription +object_gi_bracelet +object_gi_soldout +object_gi_frog +object_mag +object_door_gerudo +object_gt +object_efc_erupc +object_zl2_anime1 +object_zl2_anime2 +object_gi_golonmask +object_gi_zoramask +object_gi_gerudomask +object_ganon2 +object_ka +object_ts +object_zg +object_gi_hoverboots +object_gi_m_arrow +object_ds2 +object_ec +object_fish +object_gi_sutaru +object_gi_goddess +object_ssh +object_bigokuta +object_bg +object_spot05_objects +object_spot12_obj +object_bombiwa +object_hintnuts +object_rs +object_spot00_break +object_gla +object_shopnuts +object_geldb +object_gr +object_dog +object_jya_iron +object_jya_door +object_spot01_objects2 +object_spot11_obj +object_kibako2 +object_dns +object_dnk +object_gi_fire +object_gi_insect +object_gi_butterfly +object_gi_ghost +object_gi_soul +object_bowl +object_po_field +object_demo_kekkai +object_efc_doughnut +object_gi_dekupouch +object_ganon_anime1 +object_ganon_anime2 +object_ganon_anime3 +object_gi_rupy +object_spot01_matoya +object_spot01_matoyab +object_po_composer +object_mu +object_wf +object_skb +object_gj +object_geff +object_haka_door +object_gs +object_ps +object_bwall +object_crow +object_cow +object_cob +object_gi_sword_1 +object_door_killer +object_ouke_haka +object_timeblock +object_zl4 +g_pn_01 +g_pn_02 +g_pn_03 +g_pn_04 +g_pn_05 +g_pn_06 +g_pn_07 +g_pn_08 +g_pn_09 +g_pn_10 +g_pn_11 +g_pn_12 +g_pn_13 +g_pn_14 +g_pn_15 +g_pn_16 +g_pn_17 +g_pn_18 +g_pn_19 +g_pn_20 +g_pn_21 +g_pn_22 +g_pn_23 +g_pn_24 +g_pn_25 +g_pn_26 +g_pn_27 +g_pn_28 +g_pn_29 +g_pn_30 +g_pn_31 +g_pn_32 +g_pn_33 +g_pn_34 +g_pn_35 +g_pn_36 +g_pn_37 +g_pn_38 +g_pn_39 +g_pn_40 +g_pn_41 +g_pn_42 +g_pn_43 +g_pn_44 +g_pn_45 +g_pn_46 +g_pn_47 +g_pn_48 +g_pn_49 +g_pn_50 +g_pn_51 +g_pn_52 +g_pn_53 +g_pn_54 +g_pn_55 +g_pn_56 +g_pn_57 +z_select_static +nintendo_rogo_static +title_static +parameter_static +vr_fine0_static +vr_fine0_pal_static +vr_fine1_static +vr_fine1_pal_static +vr_fine2_static +vr_fine2_pal_static +vr_fine3_static +vr_fine3_pal_static +vr_cloud0_static +vr_cloud0_pal_static +vr_cloud1_static +vr_cloud1_pal_static +vr_cloud2_static +vr_cloud2_pal_static +vr_cloud3_static +vr_cloud3_pal_static +vr_holy0_static +vr_holy0_pal_static +vr_holy1_static +vr_holy1_pal_static +vr_MDVR_static +vr_MDVR_pal_static +vr_MNVR_static +vr_MNVR_pal_static +vr_RUVR_static +vr_RUVR_pal_static +vr_LHVR_static +vr_LHVR_pal_static +vr_KHVR_static +vr_KHVR_pal_static +vr_K3VR_static +vr_K3VR_pal_static +vr_K4VR_static +vr_K4VR_pal_static +vr_K5VR_static +vr_K5VR_pal_static +vr_SP1a_static +vr_SP1a_pal_static +vr_MLVR_static +vr_MLVR_pal_static +vr_KKRVR_static +vr_KKRVR_pal_static +vr_KR3VR_static +vr_KR3VR_pal_static +vr_IPVR_static +vr_IPVR_pal_static +vr_KSVR_static +vr_KSVR_pal_static +vr_GLVR_static +vr_GLVR_pal_static +vr_ZRVR_static +vr_ZRVR_pal_static +vr_DGVR_static +vr_DGVR_pal_static +vr_ALVR_static +vr_ALVR_pal_static +vr_NSVR_static +vr_NSVR_pal_static +vr_LBVR_static +vr_LBVR_pal_static +vr_TTVR_static +vr_TTVR_pal_static +vr_FCVR_static +vr_FCVR_pal_static +elf_message_field +elf_message_ydan +ydan_scene +ydan_room_0 +ydan_room_1 +ydan_room_2 +ydan_room_3 +ydan_room_4 +ydan_room_5 +ydan_room_6 +ydan_room_7 +ydan_room_8 +ydan_room_9 +ydan_room_10 +ydan_room_11 +ddan_scene +ddan_room_0 +ddan_room_1 +ddan_room_2 +ddan_room_3 +ddan_room_4 +ddan_room_5 +ddan_room_6 +ddan_room_7 +ddan_room_8 +ddan_room_9 +ddan_room_10 +ddan_room_11 +ddan_room_12 +ddan_room_13 +ddan_room_14 +ddan_room_15 +ddan_room_16 +bdan_scene +bdan_room_0 +bdan_room_1 +bdan_room_2 +bdan_room_3 +bdan_room_4 +bdan_room_5 +bdan_room_6 +bdan_room_7 +bdan_room_8 +bdan_room_9 +bdan_room_10 +bdan_room_11 +bdan_room_12 +bdan_room_13 +bdan_room_14 +bdan_room_15 +Bmori1_scene +Bmori1_room_0 +Bmori1_room_1 +Bmori1_room_2 +Bmori1_room_3 +Bmori1_room_4 +Bmori1_room_5 +Bmori1_room_6 +Bmori1_room_7 +Bmori1_room_8 +Bmori1_room_9 +Bmori1_room_10 +Bmori1_room_11 +Bmori1_room_12 +Bmori1_room_13 +Bmori1_room_14 +Bmori1_room_15 +Bmori1_room_16 +Bmori1_room_17 +Bmori1_room_18 +Bmori1_room_19 +Bmori1_room_20 +Bmori1_room_21 +Bmori1_room_22 +HIDAN_scene +HIDAN_room_0 +HIDAN_room_1 +HIDAN_room_2 +HIDAN_room_3 +HIDAN_room_4 +HIDAN_room_5 +HIDAN_room_6 +HIDAN_room_7 +HIDAN_room_8 +HIDAN_room_9 +HIDAN_room_10 +HIDAN_room_11 +HIDAN_room_12 +HIDAN_room_13 +HIDAN_room_14 +HIDAN_room_15 +HIDAN_room_16 +HIDAN_room_17 +HIDAN_room_18 +HIDAN_room_19 +HIDAN_room_20 +HIDAN_room_21 +HIDAN_room_22 +HIDAN_room_23 +HIDAN_room_24 +HIDAN_room_25 +HIDAN_room_26 +MIZUsin_scene +MIZUsin_room_0 +MIZUsin_room_1 +MIZUsin_room_2 +MIZUsin_room_3 +MIZUsin_room_4 +MIZUsin_room_5 +MIZUsin_room_6 +MIZUsin_room_7 +MIZUsin_room_8 +MIZUsin_room_9 +MIZUsin_room_10 +MIZUsin_room_11 +MIZUsin_room_12 +MIZUsin_room_13 +MIZUsin_room_14 +MIZUsin_room_15 +MIZUsin_room_16 +MIZUsin_room_17 +MIZUsin_room_18 +MIZUsin_room_19 +MIZUsin_room_20 +MIZUsin_room_21 +MIZUsin_room_22 +jyasinzou_scene +jyasinzou_room_0 +jyasinzou_room_1 +jyasinzou_room_2 +jyasinzou_room_3 +jyasinzou_room_4 +jyasinzou_room_5 +jyasinzou_room_6 +jyasinzou_room_7 +jyasinzou_room_8 +jyasinzou_room_9 +jyasinzou_room_10 +jyasinzou_room_11 +jyasinzou_room_12 +jyasinzou_room_13 +jyasinzou_room_14 +jyasinzou_room_15 +jyasinzou_room_16 +jyasinzou_room_17 +jyasinzou_room_18 +jyasinzou_room_19 +jyasinzou_room_20 +jyasinzou_room_21 +jyasinzou_room_22 +jyasinzou_room_23 +jyasinzou_room_24 +jyasinzou_room_25 +jyasinzou_room_26 +jyasinzou_room_27 +jyasinzou_room_28 +HAKAdan_scene +HAKAdan_room_0 +HAKAdan_room_1 +HAKAdan_room_2 +HAKAdan_room_3 +HAKAdan_room_4 +HAKAdan_room_5 +HAKAdan_room_6 +HAKAdan_room_7 +HAKAdan_room_8 +HAKAdan_room_9 +HAKAdan_room_10 +HAKAdan_room_11 +HAKAdan_room_12 +HAKAdan_room_13 +HAKAdan_room_14 +HAKAdan_room_15 +HAKAdan_room_16 +HAKAdan_room_17 +HAKAdan_room_18 +HAKAdan_room_19 +HAKAdan_room_20 +HAKAdan_room_21 +HAKAdan_room_22 +HAKAdanCH_scene +HAKAdanCH_room_0 +HAKAdanCH_room_1 +HAKAdanCH_room_2 +HAKAdanCH_room_3 +HAKAdanCH_room_4 +HAKAdanCH_room_5 +HAKAdanCH_room_6 +ice_doukutu_scene +ice_doukutu_room_0 +ice_doukutu_room_1 +ice_doukutu_room_2 +ice_doukutu_room_3 +ice_doukutu_room_4 +ice_doukutu_room_5 +ice_doukutu_room_6 +ice_doukutu_room_7 +ice_doukutu_room_8 +ice_doukutu_room_9 +ice_doukutu_room_10 +ice_doukutu_room_11 +men_scene +men_room_0 +men_room_1 +men_room_2 +men_room_3 +men_room_4 +men_room_5 +men_room_6 +men_room_7 +men_room_8 +men_room_9 +men_room_10 +ganontika_scene +ganontika_room_0 +ganontika_room_1 +ganontika_room_2 +ganontika_room_3 +ganontika_room_4 +ganontika_room_5 +ganontika_room_6 +ganontika_room_7 +ganontika_room_8 +ganontika_room_9 +ganontika_room_10 +ganontika_room_11 +ganontika_room_12 +ganontika_room_13 +ganontika_room_14 +ganontika_room_15 +ganontika_room_16 +ganontika_room_17 +ganontika_room_18 +ganontika_room_19 +spot00_scene +spot00_room_0 +spot01_scene +spot01_room_0 +spot02_scene +spot02_room_0 +spot02_room_1 +spot03_scene +spot03_room_0 +spot03_room_1 +spot04_scene +spot04_room_0 +spot04_room_1 +spot04_room_2 +spot05_scene +spot05_room_0 +spot06_scene +spot06_room_0 +spot07_scene +spot07_room_0 +spot07_room_1 +spot08_scene +spot08_room_0 +spot09_scene +spot09_room_0 +spot10_scene +spot10_room_0 +spot10_room_1 +spot10_room_2 +spot10_room_3 +spot10_room_4 +spot10_room_5 +spot10_room_6 +spot10_room_7 +spot10_room_8 +spot10_room_9 +spot11_scene +spot11_room_0 +spot12_scene +spot12_room_0 +spot12_room_1 +spot13_scene +spot13_room_0 +spot13_room_1 +spot15_scene +spot15_room_0 +spot16_scene +spot16_room_0 +spot17_scene +spot17_room_0 +spot17_room_1 +spot18_scene +spot18_room_0 +spot18_room_1 +spot18_room_2 +spot18_room_3 +market_day_scene +market_day_room_0 +market_night_scene +market_night_room_0 +kenjyanoma_scene +kenjyanoma_room_0 +tokinoma_scene +tokinoma_room_0 +tokinoma_room_1 +link_home_scene +link_home_room_0 +kokiri_shop_scene +kokiri_shop_room_0 +kokiri_home_scene +kokiri_home_room_0 +kakusiana_scene +kakusiana_room_0 +kakusiana_room_1 +kakusiana_room_2 +kakusiana_room_3 +kakusiana_room_4 +kakusiana_room_5 +kakusiana_room_6 +kakusiana_room_7 +kakusiana_room_8 +kakusiana_room_9 +kakusiana_room_10 +kakusiana_room_11 +kakusiana_room_12 +kakusiana_room_13 +entra_scene +entra_room_0 +moribossroom_scene +moribossroom_room_0 +moribossroom_room_1 +syatekijyou_scene +syatekijyou_room_0 +shop1_scene +shop1_room_0 +hairal_niwa_scene +hairal_niwa_room_0 +ganon_tou_scene +ganon_tou_room_0 +market_alley_scene +market_alley_room_0 +spot20_scene +spot20_room_0 +market_ruins_scene +market_ruins_room_0 +entra_n_scene +entra_n_room_0 +enrui_scene +enrui_room_0 +market_alley_n_scene +market_alley_n_room_0 +hiral_demo_scene +hiral_demo_room_0 +kokiri_home3_scene +kokiri_home3_room_0 +malon_stable_scene +malon_stable_room_0 +kakariko_scene +kakariko_room_0 +bdan_boss_scene +bdan_boss_room_0 +bdan_boss_room_1 +FIRE_bs_scene +FIRE_bs_room_0 +FIRE_bs_room_1 +hut_scene +hut_room_0 +daiyousei_izumi_scene +daiyousei_izumi_room_0 +hakaana_scene +hakaana_room_0 +yousei_izumi_tate_scene +yousei_izumi_tate_room_0 +yousei_izumi_yoko_scene +yousei_izumi_yoko_room_0 +golon_scene +golon_room_0 +zoora_scene +zoora_room_0 +drag_scene +drag_room_0 +alley_shop_scene +alley_shop_room_0 +night_shop_scene +night_shop_room_0 +impa_scene +impa_room_0 +labo_scene +labo_room_0 +tent_scene +tent_room_0 +nakaniwa_scene +nakaniwa_room_0 +ddan_boss_scene +ddan_boss_room_0 +ddan_boss_room_1 +ydan_boss_scene +ydan_boss_room_0 +ydan_boss_room_1 +HAKAdan_bs_scene +HAKAdan_bs_room_0 +HAKAdan_bs_room_1 +MIZUsin_bs_scene +MIZUsin_bs_room_0 +MIZUsin_bs_room_1 +ganon_scene +ganon_room_0 +ganon_room_1 +ganon_room_2 +ganon_room_3 +ganon_room_4 +ganon_room_5 +ganon_room_6 +ganon_room_7 +ganon_room_8 +ganon_room_9 +ganon_boss_scene +ganon_boss_room_0 +jyasinboss_scene +jyasinboss_room_0 +jyasinboss_room_1 +jyasinboss_room_2 +jyasinboss_room_3 +kokiri_home4_scene +kokiri_home4_room_0 +kokiri_home5_scene +kokiri_home5_room_0 +ganon_final_scene +ganon_final_room_0 +kakariko3_scene +kakariko3_room_0 +hakasitarelay_scene +hakasitarelay_room_0 +hakasitarelay_room_1 +hakasitarelay_room_2 +hakasitarelay_room_3 +hakasitarelay_room_4 +hakasitarelay_room_5 +hakasitarelay_room_6 +shrine_scene +shrine_room_0 +turibori_scene +turibori_room_0 +shrine_n_scene +shrine_n_room_0 +shrine_r_scene +shrine_r_room_0 +hakaana2_scene +hakaana2_room_0 +gerudoway_scene +gerudoway_room_0 +gerudoway_room_1 +gerudoway_room_2 +gerudoway_room_3 +gerudoway_room_4 +gerudoway_room_5 +hairal_niwa_n_scene +hairal_niwa_n_room_0 +bowling_scene +bowling_room_0 +hakaana_ouke_scene +hakaana_ouke_room_0 +hakaana_ouke_room_1 +hakaana_ouke_room_2 +hylia_labo_scene +hylia_labo_room_0 +souko_scene +souko_room_0 +souko_room_1 +souko_room_2 +miharigoya_scene +miharigoya_room_0 +mahouya_scene +mahouya_room_0 +takaraya_scene +takaraya_room_0 +takaraya_room_1 +takaraya_room_2 +takaraya_room_3 +takaraya_room_4 +takaraya_room_5 +takaraya_room_6 +ganon_sonogo_scene +ganon_sonogo_room_0 +ganon_sonogo_room_1 +ganon_sonogo_room_2 +ganon_sonogo_room_3 +ganon_sonogo_room_4 +ganon_demo_scene +ganon_demo_room_0 +face_shop_scene +face_shop_room_0 +kinsuta_scene +kinsuta_room_0 +ganontikasonogo_scene +ganontikasonogo_room_0 +ganontikasonogo_room_1 +bump_texture_static +anime_model_1_static +anime_model_2_static +anime_model_3_static +anime_model_4_static +anime_model_5_static +anime_model_6_static +anime_texture_1_static +anime_texture_2_static +anime_texture_3_static +anime_texture_4_static +anime_texture_5_static +anime_texture_6_static +softsprite_matrix_static \ No newline at end of file diff --git a/OTRGui/src/game/game.cpp b/OTRGui/src/game/game.cpp index ff7e7a22b..2f5512385 100644 --- a/OTRGui/src/game/game.cpp +++ b/OTRGui/src/game/game.cpp @@ -26,6 +26,7 @@ bool single_thread = false; bool hide_second_btn = false; RomVersion version; const char* patched_rom = "tmp/rom.z64"; +extern bool oldExtractMode; static std::string currentStep = "None"; @@ -72,11 +73,28 @@ void OTRGame::init(){ } } -void ExtractRom() { - const WriteResult result = ExtractBaserom(patched_rom); +void ExtractRom() +{ + WriteResult result; + + if (oldExtractMode) + ExtractBaserom(patched_rom); + else + result.error = NULLSTR; + if (result.error == NULLSTR) { if (MoonUtils::exists("oot.otr")) MoonUtils::rm("oot.otr"); - startWorker(); + if (MoonUtils::exists("Extract")) MoonUtils::rm("Extract"); + + MoonUtils::mkdir("Extract"); + MoonUtils::copy("tmp/baserom/Audiobank", "Extract/Audiobank"); + MoonUtils::copy("tmp/baserom/Audioseq", "Extract/Audioseq"); + MoonUtils::copy("tmp/baserom/Audiotable", "Extract/Audiotable"); + MoonUtils::copy("tmp/baserom/version", "Extract/version"); + + MoonUtils::copy("assets/game/", "Extract/assets/"); + + startWorker(version); extracting = true; } } @@ -131,7 +149,7 @@ void OTRGame::draw() { } // Clamp the window to the borders of the monitors - + if (wndPos.x < vsX1) wndPos.x = vsX1; if (wndPos.x < vsX1) wndPos.x = vsX1; if (wndPos.y < vsY1) wndPos.y = vsY1; if (wndPos.x + windowSize.x > vsX2) wndPos.x = vsX2 - windowSize.x; @@ -160,7 +178,9 @@ void OTRGame::draw() { UIUtils::GuiShadowText(("Rom Type: " + version.version).c_str(), 32, text_y, 10, WHITE, BLACK); UIUtils::GuiShadowText("Tool Version: 1.0", 32, text_y + 15, 10, WHITE, BLACK); UIUtils::GuiShadowText("OTR Version: 1.0", 32, text_y + 30, 10, WHITE, BLACK); - UIUtils::GuiToggle(&single_thread, "Single Thread", 32, text_y + 40, currentStep != NULLSTR); + + if (oldExtractMode) + UIUtils::GuiToggle(&single_thread, "Single Thread", 32, text_y + 40, currentStep != NULLSTR); if (!hide_second_btn && UIUtils::GuiIconButton("Folder", "Open\nShip Folder", 109, 50, currentStep != NULLSTR, "Select your Ship of Harkinian Folder\n\nYou could use another folder\nfor development purposes")) { const std::string path = NativeFS->LaunchFileExplorer(LaunchType::FOLDER); diff --git a/OTRGui/src/impl/baserom_extractor/baserom_extractor.cpp b/OTRGui/src/impl/baserom_extractor/baserom_extractor.cpp index 86be26f6c..bd2fc42ea 100644 --- a/OTRGui/src/impl/baserom_extractor/baserom_extractor.cpp +++ b/OTRGui/src/impl/baserom_extractor/baserom_extractor.cpp @@ -83,37 +83,37 @@ RomVersion GetVersion(FILE* rom) { break; case OOT_NTSC_JP_GC: version.version = "JP GameCube (MQ Disk)"; - version.listPath = "gamecube_mq.txt"; + version.listPath = "gamecube.txt"; version.offset = OOT_OFF_JP_GC; break; case OOT_NTSC_JP_GC_CE: version.version = "GameCube (Collectors Edition Disk)"; - version.listPath = "gamecube_mq.txt"; + version.listPath = "gamecube.txt"; version.offset = OOT_OFF_JP_GC_CE; break; case OOT_NTSC_JP_MQ: version.version = "JP Master Quest"; - version.listPath = "gamecube_mq.txt"; + version.listPath = "gamecube.txt"; version.offset = OOT_OFF_JP_MQ; break; case OOT_NTSC_US_MQ: version.version = "NTSC Master Quest"; - version.listPath = "gamecube_mq.txt"; + version.listPath = "gamecube.txt"; version.offset = OOT_OFF_JP_MQ; break; case OOT_NTSC_US_GC: version.version = "NTSC GameCube"; - version.listPath = "gamecube_mq.txt"; + version.listPath = "gamecube.txt"; version.offset = OOT_OFF_US_MQ; break; case OOT_PAL_GC: version.version = "PAL GameCube"; - version.listPath = "gamecube_mq.txt"; + version.listPath = "gamecube_pal.txt"; version.offset = OOT_OFF_PAL_GC; break; case OOT_PAL_MQ: version.version = "PAL Master Quest"; - version.listPath = "pal_mq.txt"; + version.listPath = "gamecube_pal.txt"; version.offset = OOT_OFF_PAL_MQ; break; case OOT_PAL_GC_DBG1: @@ -179,6 +179,8 @@ WriteResult ExtractBaserom(const char* romPath) { const std::vector lines = MoonUtils::split(read(MoonUtils::join("assets/extractor/filelists", version.listPath)), '\n'); + std::vector decompressedData(1); + for (int i = 0; i < lines.size(); i++) { FILE* outFile = fopen(MoonUtils::join("tmp/baserom", lines[i]).c_str(), "wb"); const int romOffset = version.offset + (DMA_ENTRY_SIZE * i); @@ -196,10 +198,13 @@ WriteResult ExtractBaserom(const char* romPath) { auto outData = new uint8_t[size]; memcpy(outData, romData + physStart, size); + if (compressed) { - std::vector compressedData = yaz0_encode(outData, size); - outData = compressedData.data(); - size = compressedData.size(); + int decSize = virtEnd - virtStart; + decompressedData = std::vector(decSize); + yaz0_decode(outData, decompressedData.data(), decSize); + outData = decompressedData.data(); + size = decSize; } fwrite(outData, sizeof(char), size, outFile); diff --git a/OTRGui/src/impl/baserom_extractor/baserom_extractor.h b/OTRGui/src/impl/baserom_extractor/baserom_extractor.h index 8548f4eca..9538c87f6 100644 --- a/OTRGui/src/impl/baserom_extractor/baserom_extractor.h +++ b/OTRGui/src/impl/baserom_extractor/baserom_extractor.h @@ -1,23 +1,7 @@ #ifndef EXTRACT_BASEROM_H_ #define EXTRACT_BASEROM_H_ -#define OOT_NTSC_10 0xEC7011B7 -#define OOT_NTSC_11 0xD43DA81F -#define OOT_NTSC_12 0x693BA2AE -#define OOT_PAL_10 0xB044B569 -#define OOT_PAL_11 0xB2055FBD -#define OOT_NTSC_JP_GC_CE 0xF7F52DB8 -#define OOT_NTSC_JP_GC 0xF611F4BA -#define OOT_NTSC_US_GC 0xF3DD35BA -#define OOT_PAL_GC 0x09465AC3 -#define OOT_NTSC_JP_MQ 0xF43B45BA -#define OOT_NTSC_US_MQ 0xF034001A -#define OOT_PAL_MQ 0x1D4136F3 -#define OOT_PAL_GC_DBG1 0x871E1C92 // 03-21-2002 build -#define OOT_PAL_GC_DBG2 0x87121EFE // 03-13-2002 build -#define OOT_PAL_GC_MQ_DBG 0x917D18F6 -#define OOT_IQUE_TW 0x3D81FB3E -#define OOT_IQUE_CN 0xB1E1E07B +#include "../../libultraship/libultraship/GameVersions.h" #include #include diff --git a/OTRGui/src/impl/extractor/extractor.cpp b/OTRGui/src/impl/extractor/extractor.cpp index ec435a9e4..e28fa5513 100644 --- a/OTRGui/src/impl/extractor/extractor.cpp +++ b/OTRGui/src/impl/extractor/extractor.cpp @@ -5,6 +5,7 @@ #include "utils/mutils.h" #include "ctpl/ctpl_stl.h" #include +#include #ifdef _WIN32 #define PLATFORM Platforms::WINDOWS @@ -13,6 +14,7 @@ #endif namespace Util = MoonUtils; +bool oldExtractMode = false; static int maxResources = 0; static int extractedResources = 0; bool buildingOtr = false; @@ -22,19 +24,29 @@ bool isWindows() { return (PLATFORM == Platforms::WINDOWS); } -void BuildOTR(const std::string output) { - Util::copy("tmp/baserom/Audiobank", "Extract/Audiobank"); - Util::copy("tmp/baserom/Audioseq", "Extract/Audioseq"); - Util::copy("tmp/baserom/Audiotable", "Extract/Audiotable"); - - Util::copy("assets/game/", "Extract/assets/"); - - std::string execStr = Util::format("assets/extractor/%s", isWindows() ? "ZAPD.exe" : "ZAPD.out") + " botr -se OTR"; - ProcessResult result = NativeFS->LaunchProcess(execStr); - if(result.exitCode != 0) { - std::cout << "\nError when building the OTR file with error code: " << result.exitCode << " !" << std::endl; - std::cout << "Aborting...\n" << std::endl; +std::string GetXMLVersion(RomVersion version) +{ + switch (version.crc) + { + case OOT_PAL_GC_DBG1: return "GC_NMQ_D"; + case OOT_PAL_GC_DBG2: return "GC_MQ_D"; + case OOT_PAL_GC: return "GC_NMQ_PAL_F"; } + + return "ERROR"; +} + +void BuildOTR(const std::string output) { + if (oldExtractMode) + { + std::string execStr = Util::format("assets/extractor/%s", isWindows() ? "ZAPD.exe" : "ZAPD.out") + " botr -se OTR"; + ProcessResult result = NativeFS->LaunchProcess(execStr); + if (result.exitCode != 0) { + std::cout << "\nError when building the OTR file with error code: " << result.exitCode << " !" << std::endl; + std::cout << "Aborting...\n" << std::endl; + } + } + setCurrentStep("Done!"); if (output == ".") return; @@ -44,9 +56,9 @@ void BuildOTR(const std::string output) { MoonUtils::copy("oot.otr", outputPath); } -void ExtractFile(std::string xmlPath, std::string outPath, std::string outSrcPath) { +void ExtractFile(std::string xmlPath, std::string outPath, std::string outSrcPath, RomVersion version) { std::string execStr = Util::format("assets/extractor/%s", isWindows() ? "ZAPD.exe" : "ZAPD.out"); - std::string args = Util::format(" e -eh -i %s -b tmp/baserom/ -o %s -osf %s -gsf 1 -rconf assets/extractor/Config.xml -se OTR %s", xmlPath.c_str(), outPath.c_str(), outSrcPath.c_str(), xmlPath.find("overlays") != std::string::npos ? "--static" : ""); + std::string args = Util::format(" e -eh -i %s -b tmp/baserom/ -o %s -osf %s -gsf 1 -rconf assets/extractor/Config_%s.xml -se OTR %s", xmlPath.c_str(), outPath.c_str(), outSrcPath.c_str(), GetXMLVersion(version).c_str(), xmlPath.find("overlays") != std::string::npos ? "--static" : ""); ProcessResult result = NativeFS->LaunchProcess(execStr + args); if (result.exitCode != 0) { @@ -55,49 +67,78 @@ void ExtractFile(std::string xmlPath, std::string outPath, std::string outSrcPat } } -void ExtractFunc(std::string fullPath) { +void ExtractFunc(std::string fullPath, RomVersion version) { std::vector path = Util::split(fullPath, Util::pathSeparator()); std::string outPath = Util::join(Util::join("assets/extractor/xmls/output", path[4]), Util::basename(fullPath)); Util::mkdir(outPath); - ExtractFile(fullPath, outPath, outPath); + ExtractFile(fullPath, outPath, outPath, version); setCurrentStep("Extracting: " + Util::basename(fullPath)); extractedResources++; } -void startWorker() { - std::string path = "assets/extractor/xmls"; - std::vector files; - Util::dirscan(path, files); - std::vector xmlFiles; +void startWorker(RomVersion version) { + std::string path = "assets/extractor/xmls/"; - const int num_threads = std::thread::hardware_concurrency(); - ctpl::thread_pool pool(num_threads / 2); - for(auto &file : files) { - if (file.find(".xml") != std::string::npos) xmlFiles.push_back(file); - } + path += GetXMLVersion(version); - for (auto& file : xmlFiles) { - if(single_thread) { - ExtractFunc(file); - } else { - pool.push([file](int) { - ExtractFunc(file); - }); + Util::write("tmp/baserom/version", (char*)&version.crc, sizeof(version.crc)); + + + if (oldExtractMode) + { + std::vector files; + Util::dirscan(path, files); + std::vector xmlFiles; + + const int num_threads = std::thread::hardware_concurrency(); + ctpl::thread_pool pool(num_threads / 2); + for (auto& file : files) { + if (file.find(".xml") != std::string::npos) xmlFiles.push_back(file); } - } - maxResources = xmlFiles.size(); + for (auto& file : xmlFiles) { + if (single_thread) { + ExtractFunc(file, version); + } + else { + pool.push([file, version](int) { + ExtractFunc(file, version); + }); + } + } + + maxResources = xmlFiles.size(); + } + else + { + std::string execStr = Util::format("assets/extractor/%s", isWindows() ? "ZAPD.exe" : "ZAPD.out"); + std::string args = Util::format(" ed -eh -i %s -b tmp/rom.z64 -fl assets/extractor/filelists -o %s -osf %s -gsf 1 -rconf assets/extractor/Config_%s.xml -se OTR %s", path.c_str(), path + "../", path + "../", GetXMLVersion(version).c_str(), ""); + ProcessResult result = NativeFS->LaunchProcess(execStr + args); + + if (result.exitCode != 0) { + std::cout << "\nError when extracting the ROM with error code: " << result.exitCode << " !" << std::endl; + std::cout << "Aborting...\n" << std::endl; + } + else + { + printf("All done?\n"); + } + + maxResources = 1; + } } void updateWorker(const std::string& output) { - if (maxResources > 0 && !buildingOtr && extractedResources >= maxResources) { + if (maxResources > 0 && !buildingOtr && (extractedResources >= maxResources || !oldExtractMode)) + { setCurrentStep("Building OTR..."); if (skipFrames < 3) { skipFrames++; return; } buildingOtr = true; - if (single_thread){ + + if (single_thread || !oldExtractMode){ BuildOTR(output); return; } diff --git a/OTRGui/src/impl/extractor/extractor.h b/OTRGui/src/impl/extractor/extractor.h index 98dea147a..de48d7574 100644 --- a/OTRGui/src/impl/extractor/extractor.h +++ b/OTRGui/src/impl/extractor/extractor.h @@ -5,5 +5,7 @@ enum Platforms { WINDOWS, LINUX }; -void startWorker(); +struct RomVersion; + +void startWorker(RomVersion version); void updateWorker(const std::string& output); \ No newline at end of file diff --git a/OTRGui/src/utils/mutils.cpp b/OTRGui/src/utils/mutils.cpp index 770df8423..2a649452e 100644 --- a/OTRGui/src/utils/mutils.cpp +++ b/OTRGui/src/utils/mutils.cpp @@ -72,7 +72,11 @@ namespace MoonUtils { vector result; stringstream ss (s); string item; - while (getline(ss, item, delim)) { + while (getline(ss, item, delim)) + { + if (item.at(item.size() - 1) == '\r') + item = item.substr(0, item.size() - 1); + result.push_back (item); } return result; diff --git a/ZAPDTR/ZAPD/CRC32.h b/ZAPDTR/ZAPD/CRC32.h index 4158a5528..1f82c75c5 100644 --- a/ZAPDTR/ZAPD/CRC32.h +++ b/ZAPDTR/ZAPD/CRC32.h @@ -1,6 +1,6 @@ #pragma once -static uint32_t CRC32B(unsigned char* message, int32_t size) +static uint32_t CRC32B(const unsigned char* message, int32_t size) { int32_t byte, crc; int32_t mask; diff --git a/ZAPDTR/ZAPD/Declaration.cpp b/ZAPDTR/ZAPD/Declaration.cpp index eeb988db7..27494b866 100644 --- a/ZAPDTR/ZAPD/Declaration.cpp +++ b/ZAPDTR/ZAPD/Declaration.cpp @@ -1,6 +1,7 @@ #include "Declaration.h" #include "Globals.h" +#include "ZVtx.h" #include "Utils/StringHelper.h" Declaration::Declaration(offset_t nAddress, DeclarationAlignment nAlignment, size_t nSize, @@ -61,6 +62,12 @@ Declaration::Declaration(offset_t nAddress, const std::string& nIncludePath, siz varName = nVarName; } +Declaration::~Declaration() +{ + //for (auto item : vertexHack) + //delete item; +} + bool Declaration::IsStatic() const { switch (staticConf) diff --git a/ZAPDTR/ZAPD/Declaration.h b/ZAPDTR/ZAPD/Declaration.h index 4a743b50f..45d36f49e 100644 --- a/ZAPDTR/ZAPD/Declaration.h +++ b/ZAPDTR/ZAPD/Declaration.h @@ -22,6 +22,8 @@ enum class StaticConfig On }; +class ZVtx; + class Declaration { public: @@ -38,6 +40,8 @@ public: std::string varName; std::string includePath; + std::vector vertexHack; + bool isExternal = false; bool isArray = false; bool forceArrayCnt = false; @@ -65,6 +69,8 @@ public: Declaration(offset_t nAddress, const std::string& nIncludePath, size_t nSize, const std::string& nVarType, const std::string& nVarName); + ~Declaration(); + bool IsStatic() const; std::string GetNormalDeclarationStr() const; diff --git a/ZAPDTR/ZAPD/FileWorker.cpp b/ZAPDTR/ZAPD/FileWorker.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/ZAPDTR/ZAPD/FileWorker.h b/ZAPDTR/ZAPD/FileWorker.h new file mode 100644 index 000000000..6ceae8076 --- /dev/null +++ b/ZAPDTR/ZAPD/FileWorker.h @@ -0,0 +1,15 @@ +#pragma once + +#include +#include +#include +#include "ZFile.h" + +class FileWorker +{ +public: + std::vector files; + std::vector externalFiles; + std::vector segments; + std::map> segmentRefFiles; +}; \ No newline at end of file diff --git a/ZAPDTR/ZAPD/Globals.cpp b/ZAPDTR/ZAPD/Globals.cpp index 0902b2c9e..f0df0e547 100644 --- a/ZAPDTR/ZAPD/Globals.cpp +++ b/ZAPDTR/ZAPD/Globals.cpp @@ -34,30 +34,88 @@ Globals::~Globals() } } -void Globals::AddSegment(int32_t segment, ZFile* file) +void Globals::AddSegment(int32_t segment, ZFile* file, int workerID) { - if (std::find(segments.begin(), segments.end(), segment) == segments.end()) - segments.push_back(segment); - if (cfg.segmentRefFiles.find(segment) == cfg.segmentRefFiles.end()) - cfg.segmentRefFiles[segment] = std::vector(); - - cfg.segmentRefFiles[segment].push_back(file); -} - -bool Globals::HasSegment(int32_t segment) -{ - return std::find(segments.begin(), segments.end(), segment) != segments.end(); -} - -ZFile* Globals::GetSegment(int32_t segment) -{ - if (HasSegment(segment)) + if (!Globals::Instance->singleThreaded) { - int idx = std::find(segments.begin(), segments.end(), segment) - segments.begin(); - return files[idx]; + auto worker = workerData[workerID]; + + if (std::find(worker->segments.begin(), worker->segments.end(), segment) == + worker->segments.end()) + worker->segments.push_back(segment); + if (worker->segmentRefFiles.find(segment) == worker->segmentRefFiles.end()) + worker->segmentRefFiles[segment] = std::vector(); + + worker->segmentRefFiles[segment].push_back(file); } else - return nullptr; + { + if (std::find(segments.begin(), segments.end(), segment) == segments.end()) + segments.push_back(segment); + if (cfg.segmentRefFiles.find(segment) == cfg.segmentRefFiles.end()) + cfg.segmentRefFiles[segment] = std::vector(); + + cfg.segmentRefFiles[segment].push_back(file); + } +} + +bool Globals::HasSegment(int32_t segment, int workerID) +{ + if (!Globals::Instance->singleThreaded) + return std::find(workerData[workerID]->segments.begin(), + workerData[workerID]->segments.end(), segment) != workerData[workerID]->segments.end(); + else + return std::find(segments.begin(), segments.end(), segment) != segments.end(); +} + +ZFile* Globals::GetSegment(int32_t segment, int workerID) +{ + if (!Globals::Instance->singleThreaded) + { + if (HasSegment(segment, workerID)) + { + int idx = std::find(workerData[workerID]->segments.begin(), + workerData[workerID]->segments.end(), segment) - + workerData[workerID]->segments.begin(); + return workerData[workerID]->files[idx]; + } + else + return nullptr; + } + else + { + if (HasSegment(segment, workerID)) + { + int idx = std::find(segments.begin(), segments.end(), segment) - segments.begin(); + return files[idx]; + } + else + return nullptr; + } +} + +std::map> Globals::GetSegmentRefFiles(int workerID) +{ + if (!Globals::Instance->singleThreaded) + return workerData[workerID]->segmentRefFiles; + else + return cfg.segmentRefFiles; +} + +void Globals::AddFile(ZFile* file, int workerID) +{ + if (singleThreaded) + files.push_back(file); + else + workerData[workerID]->files.push_back(file); +} + +void Globals::AddExternalFile(ZFile* file, int workerID) +{ + if (singleThreaded) + externalFiles.push_back(file); + else + workerData[workerID]->externalFiles.push_back(file); } std::map& Globals::GetExporterMap() @@ -93,8 +151,22 @@ ExporterSet* Globals::GetExporterSet() return nullptr; } +std::vector Globals::GetBaseromFile(std::string fileName) +{ + if (fileMode == ZFileMode::ExtractDirectory) + { + if (StringHelper::Contains(fileName, "baserom/")) + fileName = StringHelper::Split(fileName, "baserom/")[1]; + + return rom->GetFile(fileName); + + } + else + return File::ReadAllBytes(fileName); +} + bool Globals::GetSegmentedPtrName(segptr_t segAddress, ZFile* currentFile, - const std::string& expectedType, std::string& declName) + const std::string& expectedType, std::string& declName, int workerID) { if (segAddress == 0) { @@ -130,9 +202,11 @@ bool Globals::GetSegmentedPtrName(segptr_t segAddress, ZFile* currentFile, if (currentFile->GetDeclarationPtrName(segAddress, expectedType, declName)) return true; } - else if (HasSegment(segment)) + else if (HasSegment(segment, workerID)) { - for (auto file : cfg.segmentRefFiles[segment]) + // OTRTODO: Multithreading + auto segs = GetSegmentRefFiles(workerID); + for (auto file : segs[segment]) { offset = Seg2Filespace(segAddress, file->baseAddress); @@ -176,7 +250,7 @@ bool Globals::GetSegmentedPtrName(segptr_t segAddress, ZFile* currentFile, bool Globals::GetSegmentedArrayIndexedName(segptr_t segAddress, size_t elementSize, ZFile* currentFile, const std::string& expectedType, - std::string& declName) + std::string& declName, int workerID) { if (segAddress == 0) { @@ -193,9 +267,11 @@ bool Globals::GetSegmentedArrayIndexedName(segptr_t segAddress, size_t elementSi if (addressFound) return true; } - else if (HasSegment(segment)) + else if (HasSegment(segment, workerID)) { - for (auto file : cfg.segmentRefFiles[segment]) + // OTRTODO: Multithreading + auto segs = GetSegmentRefFiles(workerID); + for (auto file : segs[segment]) { if (file->IsSegmentedInFilespaceRange(segAddress)) { diff --git a/ZAPDTR/ZAPD/Globals.h b/ZAPDTR/ZAPD/Globals.h index 140de1f24..683fd6fcd 100644 --- a/ZAPDTR/ZAPD/Globals.h +++ b/ZAPDTR/ZAPD/Globals.h @@ -5,6 +5,8 @@ #include #include "GameConfig.h" #include "ZFile.h" +#include +#include class ZRoom; @@ -36,6 +38,7 @@ public: ExporterSetFuncVoid3 beginXMLFunc = nullptr; ExporterSetFuncVoid3 endXMLFunc = nullptr; ExporterSetResSave resSaveFunc = nullptr; + ExporterSetFuncVoid3 endProgramFunc = nullptr; }; class Globals @@ -49,9 +52,10 @@ public: bool outputCrc = false; bool profile; // Measure performance of certain operations bool useLegacyZDList; + bool singleThreaded; VerbosityLevel verbosity; // ZAPD outputs additional information ZFileMode fileMode; - fs::path baseRomPath, inputPath, outputPath, sourceOutputPath, cfgPath; + fs::path baseRomPath, inputPath, outputPath, sourceOutputPath, cfgPath, fileListPath; TextureType texType; ZGame game; GameConfig cfg; @@ -61,10 +65,13 @@ public: bool forceUnaccountedStatic = false; bool otrMode = true; + ZRom* rom; std::vector files; std::vector externalFiles; std::vector segments; + std::map workerData; + std::string currentExporter; static std::map& GetExporterMap(); static void AddExporter(std::string exporterName, ExporterSet* exporterSet); @@ -72,13 +79,18 @@ public: Globals(); ~Globals(); - void AddSegment(int32_t segment, ZFile* file); - bool HasSegment(int32_t segment); - ZFile* GetSegment(int32_t segment); + void AddSegment(int32_t segment, ZFile* file, int workerID); + bool HasSegment(int32_t segment, int workerID); + ZFile* GetSegment(int32_t segment, int workerID); + std::map> GetSegmentRefFiles(int workerID); + void AddFile(ZFile* file, int workerID); + void AddExternalFile(ZFile* file, int workerID); ZResourceExporter* GetExporter(ZResourceType resType); ExporterSet* GetExporterSet(); + std::vector GetBaseromFile(std::string fileName); + /** * Search in every file (and the symbol map) for the `segAddress` passed as parameter. * If the segment of `currentFile` is the same segment of `segAddress`, then that file will be @@ -88,8 +100,8 @@ public: * in which case `declName` will be set to the address formatted as a pointer. */ bool GetSegmentedPtrName(segptr_t segAddress, ZFile* currentFile, - const std::string& expectedType, std::string& declName); + const std::string& expectedType, std::string& declName, int workerID); bool GetSegmentedArrayIndexedName(segptr_t segAddress, size_t elementSize, ZFile* currentFile, - const std::string& expectedType, std::string& declName); + const std::string& expectedType, std::string& declName, int workerID); }; diff --git a/ZAPDTR/ZAPD/Main.cpp b/ZAPDTR/ZAPD/Main.cpp index 250704993..1a99d346a 100644 --- a/ZAPDTR/ZAPD/Main.cpp +++ b/ZAPDTR/ZAPD/Main.cpp @@ -23,16 +23,20 @@ #include #include #include "tinyxml2.h" +#include //extern const char gBuildHash[]; const char gBuildHash[] = ""; bool Parse(const fs::path& xmlFilePath, const fs::path& basePath, const fs::path& outPath, - ZFileMode fileMode); + ZFileMode fileMode, int workerID); void BuildAssetTexture(const fs::path& pngFilePath, TextureType texType, const fs::path& outPath); void BuildAssetBackground(const fs::path& imageFilePath, const fs::path& outPath); void BuildAssetBlob(const fs::path& blobFilePath, const fs::path& outPath); +int ExtractFunc(int workerID, int fileListSize, std::string fileListItem, ZFileMode fileMode); + +volatile int numWorkersLeft = 0; #if !defined(_MSC_VER) && !defined(__CYGWIN__) #define ARRAY_COUNT(arr) (sizeof(arr) / sizeof(arr[0])) @@ -182,6 +186,10 @@ int main(int argc, char* argv[]) { Globals::Instance->cfgPath = argv[++i]; } + else if (arg == "-fl") // Set baserom filelist path + { + Globals::Instance->fileListPath = argv[++i]; + } else if (arg == "-rconf") // Read Config File { Globals::Instance->cfg.ReadConfigFile(argv[++i]); @@ -242,6 +250,8 @@ int main(int argc, char* argv[]) fileMode = ZFileMode::BuildBlob; else if (buildMode == "e") fileMode = ZFileMode::Extract; + else if (buildMode == "ed") + fileMode = ZFileMode::ExtractDirectory; else if (exporterSet != nullptr && exporterSet->parseFileModeFunc != nullptr) exporterSet->parseFileModeFunc(buildMode, fileMode); @@ -251,6 +261,11 @@ int main(int argc, char* argv[]) return 1; } + Globals::Instance->fileMode = fileMode; + + if (fileMode == ZFileMode::ExtractDirectory) + Globals::Instance->rom = new ZRom(Globals::Instance->baseRomPath.string()); + // We've parsed through our commands once. If an exporter exists, it's been set by now. // Now we'll parse through them again but pass them on to our exporter if one is available. @@ -269,7 +284,7 @@ int main(int argc, char* argv[]) } // TODO: switch - if (fileMode == ZFileMode::Extract || fileMode == ZFileMode::BuildSourceFile) + if (fileMode == ZFileMode::Extract || fileMode == ZFileMode::BuildSourceFile || fileMode == ZFileMode::ExtractDirectory) { bool procFileModeSuccess = false; @@ -278,30 +293,85 @@ int main(int argc, char* argv[]) if (!procFileModeSuccess) { - bool parseSuccessful; - - for (auto& extFile : Globals::Instance->cfg.externalFiles) + if (fileMode == ZFileMode::ExtractDirectory) { - fs::path externalXmlFilePath = - Globals::Instance->cfg.externalXmlFolder / extFile.xmlPath; + std::vector fileList = + Directory::ListFiles(Globals::Instance->inputPath.string()); - if (Globals::Instance->verbosity >= VerbosityLevel::VERBOSITY_INFO) + const int num_threads = std::thread::hardware_concurrency(); + ctpl::thread_pool pool(num_threads / 2); + + bool parseSuccessful; + + auto start = std::chrono::steady_clock::now(); + int fileListSize = fileList.size(); + Globals::Instance->singleThreaded = false; + + for (int i = 0; i < fileListSize; i++) + Globals::Instance->workerData[i] = new FileWorker(); + + numWorkersLeft = fileListSize; + + for (int i = 0; i < fileListSize; i++) { - printf("Parsing external file from config: '%s'\n", - externalXmlFilePath.c_str()); + if (Globals::Instance->singleThreaded) + { + ExtractFunc(i, fileList.size(), fileList[i], fileMode); + } + else + { + std::string fileListItem = fileList[i]; + pool.push([i, fileListSize, fileListItem, fileMode](int) { + ExtractFunc(i, fileListSize, fileListItem, fileMode); + }); + } } - parseSuccessful = Parse(externalXmlFilePath, Globals::Instance->baseRomPath, - extFile.outPath, ZFileMode::ExternalFile); + if (!Globals::Instance->singleThreaded) + { + while (true) + { + if (numWorkersLeft <= 0) + break; + std::this_thread::sleep_for(std::chrono::milliseconds(250)); + } + } + + auto end = std::chrono::steady_clock::now(); + auto diff = + std::chrono::duration_cast(end - start).count(); + + printf("Generated OTR File Data in %i seconds\n", diff); + } + else + { + bool parseSuccessful; + + for (auto& extFile : Globals::Instance->cfg.externalFiles) + { + fs::path externalXmlFilePath = + Globals::Instance->cfg.externalXmlFolder / extFile.xmlPath; + + if (Globals::Instance->verbosity >= VerbosityLevel::VERBOSITY_INFO) + { + printf("Parsing external file from config: '%s'\n", + externalXmlFilePath.c_str()); + } + + parseSuccessful = Parse(externalXmlFilePath, Globals::Instance->baseRomPath, + extFile.outPath, ZFileMode::ExternalFile, 0); + + if (!parseSuccessful) + return 1; + } + + parseSuccessful = + Parse(Globals::Instance->inputPath, Globals::Instance->baseRomPath, + Globals::Instance->outputPath, fileMode, 0); if (!parseSuccessful) return 1; } - - parseSuccessful = Parse(Globals::Instance->inputPath, Globals::Instance->baseRomPath, - Globals::Instance->outputPath, fileMode); - if (!parseSuccessful) - return 1; } } else if (fileMode == ZFileMode::BuildTexture) @@ -317,6 +387,7 @@ int main(int argc, char* argv[]) { BuildAssetBlob(Globals::Instance->inputPath, Globals::Instance->outputPath); } + /* else if (fileMode == ZFileMode::BuildOverlay) { ZOverlay* overlay = @@ -327,13 +398,77 @@ int main(int argc, char* argv[]) File::WriteAllText(Globals::Instance->outputPath.string(), overlay->GetSourceOutputCode("")); } + */ + + if (exporterSet != nullptr && exporterSet->endProgramFunc != nullptr) + exporterSet->endProgramFunc(); delete g; return 0; } +int ExtractFunc(int workerID, int fileListSize, std::string fileListItem, ZFileMode fileMode) +{ + bool parseSuccessful; + + printf("(%i / %i): %s\n", (workerID + 1), fileListSize, fileListItem.c_str()); + + for (auto& extFile : Globals::Instance->cfg.externalFiles) + { + fs::path externalXmlFilePath = Globals::Instance->cfg.externalXmlFolder / extFile.xmlPath; + + if (Globals::Instance->verbosity >= VerbosityLevel::VERBOSITY_INFO) + { + printf("Parsing external file from config: '%s'\n", externalXmlFilePath.c_str()); + } + + parseSuccessful = Parse(externalXmlFilePath, Globals::Instance->baseRomPath, + extFile.outPath, ZFileMode::ExternalFile, workerID); + + if (!parseSuccessful) + return 1; + } + + parseSuccessful = Parse(fileListItem, Globals::Instance->baseRomPath, + Globals::Instance->outputPath, fileMode, workerID); + + if (!parseSuccessful) + return 1; + + if (Globals::Instance->singleThreaded) + { + for (int i = 0; i < Globals::Instance->files.size(); i++) + { + delete Globals::Instance->files[i]; + Globals::Instance->files.erase(Globals::Instance->files.begin() + i); + i--; + } + + Globals::Instance->externalFiles.clear(); + Globals::Instance->segments.clear(); + Globals::Instance->cfg.segmentRefFiles.clear(); + } + else + { + for (int i = 0; i < Globals::Instance->workerData[workerID]->files.size(); i++) + { + delete Globals::Instance->workerData[workerID]->files[i]; + Globals::Instance->workerData[workerID]->files.erase( + Globals::Instance->workerData[workerID]->files.begin() + + i); + i--; + } + + Globals::Instance->workerData[workerID]->externalFiles.clear(); + Globals::Instance->workerData[workerID]->segments.clear(); + Globals::Instance->workerData[workerID]->segmentRefFiles.clear(); + + numWorkersLeft--; + } +} + bool Parse(const fs::path& xmlFilePath, const fs::path& basePath, const fs::path& outPath, - ZFileMode fileMode) + ZFileMode fileMode, int workerID) { tinyxml2::XMLDocument doc; tinyxml2::XMLError eResult = doc.LoadFile(xmlFilePath.string().c_str()); @@ -361,11 +496,11 @@ bool Parse(const fs::path& xmlFilePath, const fs::path& basePath, const fs::path { if (std::string_view(child->Name()) == "File") { - ZFile* file = new ZFile(fileMode, child, basePath, outPath, "", xmlFilePath); - Globals::Instance->files.push_back(file); + ZFile* file = new ZFile(fileMode, child, basePath, outPath, "", xmlFilePath, workerID); + Globals::Instance->AddFile(file, workerID); if (fileMode == ZFileMode::ExternalFile) { - Globals::Instance->externalFiles.push_back(file); + Globals::Instance->AddExternalFile(file, workerID); file->isExternalFile = true; } } @@ -398,7 +533,7 @@ bool Parse(const fs::path& xmlFilePath, const fs::path& basePath, const fs::path } // Recursion. What can go wrong? - Parse(externalXmlFilePath, basePath, externalOutFilePath, ZFileMode::ExternalFile); + Parse(externalXmlFilePath, basePath, externalOutFilePath, ZFileMode::ExternalFile, workerID); } else { @@ -417,7 +552,14 @@ bool Parse(const fs::path& xmlFilePath, const fs::path& basePath, const fs::path if (exporterSet != nullptr && exporterSet->beginXMLFunc != nullptr) exporterSet->beginXMLFunc(); - for (ZFile* file : Globals::Instance->files) + std::vector files; + + if (Globals::Instance->singleThreaded) + files = Globals::Instance->files; + else + files = Globals::Instance->workerData[workerID]->files; + + for (ZFile* file : files) { if (fileMode == ZFileMode::BuildSourceFile) file->BuildSourceFile(); diff --git a/ZAPDTR/ZAPD/OtherStructs/SkinLimbStructs.cpp b/ZAPDTR/ZAPD/OtherStructs/SkinLimbStructs.cpp index 8ce215c97..c9a537ced 100644 --- a/ZAPDTR/ZAPD/OtherStructs/SkinLimbStructs.cpp +++ b/ZAPDTR/ZAPD/OtherStructs/SkinLimbStructs.cpp @@ -199,8 +199,10 @@ std::string Struct_800A598C::GetBodySourceCode() const { std::string unk_8_Str; std::string unk_C_Str; - Globals::Instance->GetSegmentedPtrName(unk_8, parent, "Struct_800A57C0", unk_8_Str); - Globals::Instance->GetSegmentedPtrName(unk_C, parent, "Struct_800A598C_2", unk_C_Str); + Globals::Instance->GetSegmentedPtrName(unk_8, parent, "Struct_800A57C0", unk_8_Str, + parent->workerID); + Globals::Instance->GetSegmentedPtrName(unk_C, parent, "Struct_800A598C_2", unk_C_Str, + parent->workerID); std::string entryStr = StringHelper::Sprintf("\n\t\tARRAY_COUNTU(%s), ARRAY_COUNTU(%s),\n", unk_8_Str.c_str(), unk_C_Str.c_str()); @@ -316,8 +318,9 @@ std::string Struct_800A5E28::GetBodySourceCode() const { std::string unk_4_Str; std::string unk_8_Str; - Globals::Instance->GetSegmentedPtrName(unk_4, parent, "Struct_800A598C", unk_4_Str); - Globals::Instance->GetSegmentedPtrName(unk_8, parent, "Gfx", unk_8_Str); + Globals::Instance->GetSegmentedPtrName(unk_4, parent, "Struct_800A598C", unk_4_Str, + parent->workerID); + Globals::Instance->GetSegmentedPtrName(unk_8, parent, "Gfx", unk_8_Str, parent->workerID); std::string entryStr = "\n"; entryStr += StringHelper::Sprintf("\t%i, ARRAY_COUNTU(%s),\n", unk_0, unk_4_Str.c_str()); diff --git a/ZAPDTR/ZAPD/OutputFormatter.cpp b/ZAPDTR/ZAPD/OutputFormatter.cpp index dbb8692c0..7fac434b2 100644 --- a/ZAPDTR/ZAPD/OutputFormatter.cpp +++ b/ZAPDTR/ZAPD/OutputFormatter.cpp @@ -3,7 +3,7 @@ void OutputFormatter::Flush() { - //if (!Globals::Instance->otrMode) + //if (!Globals::Instance->otrMode) // OTRTODO: MULTITHREADING { if (col > lineLimit && !Globals::Instance->otrMode) { @@ -31,6 +31,10 @@ void OutputFormatter::Flush() int OutputFormatter::Write(const char* buf, int count) { + // OTRTODO + //if (!Globals::Instance->singleThreaded) + //return 0; + for (int i = 0; i < count; i++) { char c = buf[i]; @@ -92,7 +96,7 @@ int OutputFormatter::Write(const std::string& buf) return Write(buf.data(), buf.size()); } -OutputFormatter* OutputFormatter::Instance; +__declspec(thread) OutputFormatter* OutputFormatter::Instance; int OutputFormatter::WriteStatic(const char* buf, int count) { diff --git a/ZAPDTR/ZAPD/OutputFormatter.h b/ZAPDTR/ZAPD/OutputFormatter.h index 28955b1cd..f008df2cb 100644 --- a/ZAPDTR/ZAPD/OutputFormatter.h +++ b/ZAPDTR/ZAPD/OutputFormatter.h @@ -25,7 +25,7 @@ private: void Flush(); - static OutputFormatter* Instance; + static __declspec(thread) OutputFormatter* Instance; static int WriteStatic(const char* buf, int count); public: diff --git a/ZAPDTR/ZAPD/Overlays/ZOverlay.cpp b/ZAPDTR/ZAPD/Overlays/ZOverlay.cpp index 113c4ef33..c3e7c68c7 100644 --- a/ZAPDTR/ZAPD/Overlays/ZOverlay.cpp +++ b/ZAPDTR/ZAPD/Overlays/ZOverlay.cpp @@ -1,3 +1,4 @@ +#if 0 #include "ZOverlay.h" #include @@ -350,3 +351,4 @@ ELFIO::Elf_Half ZOverlay::FindSymbolInSection(const std::string& curSymName, } return SHN_UNDEF; } +#endif \ No newline at end of file diff --git a/ZAPDTR/ZAPD/Overlays/ZOverlay.h b/ZAPDTR/ZAPD/Overlays/ZOverlay.h index 98ead9013..c1fadddca 100644 --- a/ZAPDTR/ZAPD/Overlays/ZOverlay.h +++ b/ZAPDTR/ZAPD/Overlays/ZOverlay.h @@ -1,5 +1,7 @@ #pragma once +#if 0 + #include "Utils/Directory.h" #include "ZResource.h" #include "elfio/elfio.hpp" @@ -73,3 +75,4 @@ private: ELFIO::Elf_Half FindSymbolInSection(const std::string& curSymName, ELFIO::section* sectionData, ELFIO::elfio& reader, size_t readerId); }; +#endif \ No newline at end of file diff --git a/ZAPDTR/ZAPD/ZAPD.vcxproj b/ZAPDTR/ZAPD/ZAPD.vcxproj index 95e89d8ff..91ff515a2 100644 --- a/ZAPDTR/ZAPD/ZAPD.vcxproj +++ b/ZAPDTR/ZAPD/ZAPD.vcxproj @@ -74,15 +74,29 @@ $(OutDir);$(ProjectDir)..\lib\libgfxd;$(ProjectDir)..\..\OTRExporter\packages\libpng-v142.1.6.37.2\build\native\lib\x64\v142\Debug\;$(ProjectDir)..\..\libultraship\libultraship\;$(LibraryPath) $(ProjectDir)..\ZAPDUtils;$(ProjectDir)..\lib\tinyxml2;$(ProjectDir)..\lib\libgfxd;$(ProjectDir)..\lib\elfio;$(ProjectDir)..\lib\stb;$(ProjectDir);$(IncludePath) + MinimumRecommendedRules.ruleset + + $(ProjectDir)..\ZAPDUtils;$(ProjectDir)..\lib\tinyxml2;$(ProjectDir)..\lib\libgfxd;$(ProjectDir)..\lib\elfio;$(ProjectDir)..\lib\stb;$(ProjectDir);$(IncludePath) $(OutDir);$(ProjectDir)..\lib\libgfxd;$(ProjectDir)..\..\OTRExporter\packages\libpng-v142.1.6.37.2\build\native\lib\x64\v142\Debug\;$(ProjectDir)..\..\libultraship\libultraship\;$(LibraryPath) false + MinimumRecommendedRules.ruleset + + $(SolutionDir)ZAPD\lib\tinyxml2;$(SolutionDir)ZAPD\lib\libgfxd;$(SolutionDir)ZAPD\lib\elfio;$(SolutionDir)ZAPD\lib\stb;$(ProjectDir);$(IncludePath) $(SolutionDir)ZAPD\lib\libgfxd;$(SolutionDir)x64\Debug;$(SolutionDir)packages\libpng.1.6.28.1\build\native\lib\x64\v140\dynamic\Debug;$(LibraryPath) + MinimumRecommendedRules.ruleset + + + + + MinimumRecommendedRules.ruleset + + @@ -170,6 +184,7 @@ + @@ -178,6 +193,7 @@ + @@ -185,6 +201,7 @@ + @@ -257,7 +274,9 @@ + + @@ -265,6 +284,8 @@ + + @@ -278,6 +299,7 @@ + @@ -334,6 +356,12 @@ + + + {02d10590-9542-3f55-aaf8-6055677e2a2a} + false + + diff --git a/ZAPDTR/ZAPD/ZAPD.vcxproj.filters b/ZAPDTR/ZAPD/ZAPD.vcxproj.filters index 2a004bf9d..c122b7e56 100644 --- a/ZAPDTR/ZAPD/ZAPD.vcxproj.filters +++ b/ZAPDTR/ZAPD/ZAPD.vcxproj.filters @@ -58,6 +58,12 @@ {730beb67-6d59-4849-9d9b-702c4a565fc0} + + {b26457d2-cdb8-4c92-9ed7-a55bf6d3619e} + + + {9651a041-1019-4486-9e90-1dccfa9471e9} + @@ -282,6 +288,15 @@ Source Files\Z64 + + Source Files\Z64 + + + Source Files\Yaz0 + + + Source Files + @@ -539,6 +554,21 @@ Header Files\Z64 + + Header Files\Z64 + + + Header Files\Yaz0 + + + Header Files\Yaz0 + + + Header Files + + + Header Files\Libraries + diff --git a/ZAPDTR/ZAPD/ZAnimation.cpp b/ZAPDTR/ZAPD/ZAnimation.cpp index dced31aff..ef4735e09 100644 --- a/ZAPDTR/ZAPD/ZAnimation.cpp +++ b/ZAPDTR/ZAPD/ZAnimation.cpp @@ -112,12 +112,15 @@ void ZNormalAnimation::DeclareReferences(const std::string& prefix) const uint8_t lineLength = 14; const uint8_t offset = 0; - for (size_t i = 0; i < rotationValues.size(); i++) + if (!Globals::Instance->otrMode) { - valuesStr += StringHelper::Sprintf("0x%04X, ", rotationValues[i]); + for (size_t i = 0; i < rotationValues.size(); i++) + { + valuesStr += StringHelper::Sprintf("0x%04X, ", rotationValues[i]); - if ((i - offset + 1) % lineLength == 0) - valuesStr += "\n "; + if ((i - offset + 1) % lineLength == 0) + valuesStr += "\n "; + } } parent->AddDeclarationArray(rotationValuesOffset, DeclarationAlignment::Align4, @@ -125,13 +128,17 @@ void ZNormalAnimation::DeclareReferences(const std::string& prefix) StringHelper::Sprintf("%sFrameData", defaultPrefix.c_str()), rotationValues.size(), valuesStr); - for (size_t i = 0; i < rotationIndices.size(); i++) + if (!Globals::Instance->otrMode) { - indicesStr += StringHelper::Sprintf(" { 0x%04X, 0x%04X, 0x%04X },", rotationIndices[i].x, - rotationIndices[i].y, rotationIndices[i].z); + for (size_t i = 0; i < rotationIndices.size(); i++) + { + indicesStr += + StringHelper::Sprintf(" { 0x%04X, 0x%04X, 0x%04X },", rotationIndices[i].x, + rotationIndices[i].y, rotationIndices[i].z); - if (i != (rotationIndices.size() - 1)) - indicesStr += "\n"; + if (i != (rotationIndices.size() - 1)) + indicesStr += "\n"; + } } parent->AddDeclarationArray(rotationIndicesOffset, DeclarationAlignment::Align4, @@ -143,10 +150,11 @@ void ZNormalAnimation::DeclareReferences(const std::string& prefix) std::string ZNormalAnimation::GetBodySourceCode() const { std::string frameDataName; - Globals::Instance->GetSegmentedPtrName(rotationValuesSeg, parent, "s16", frameDataName); + Globals::Instance->GetSegmentedPtrName(rotationValuesSeg, parent, "s16", frameDataName, + parent->workerID); std::string jointIndicesName; Globals::Instance->GetSegmentedPtrName(rotationIndicesSeg, parent, "JointIndex", - jointIndicesName); + jointIndicesName, parent->workerID); std::string headerStr = StringHelper::Sprintf("\n\t{ %i }, %s,\n", frameCount, frameDataName.c_str()); @@ -183,7 +191,7 @@ void ZLinkAnimation::ParseRawData() std::string ZLinkAnimation::GetBodySourceCode() const { std::string segSymbol; - Globals::Instance->GetSegmentedPtrName(segmentAddress, parent, "", segSymbol); + Globals::Instance->GetSegmentedPtrName(segmentAddress, parent, "", segSymbol, parent->workerID); return StringHelper::Sprintf("\n\t{ %i }, %s\n", frameCount, segSymbol.c_str()); } @@ -383,12 +391,13 @@ void ZCurveAnimation::DeclareReferences(const std::string& prefix) std::string ZCurveAnimation::GetBodySourceCode() const { std::string refIndexStr; - Globals::Instance->GetSegmentedPtrName(refIndex, parent, "u8", refIndexStr); + Globals::Instance->GetSegmentedPtrName(refIndex, parent, "u8", refIndexStr, parent->workerID); std::string transformDataStr; Globals::Instance->GetSegmentedPtrName(transformData, parent, "TransformData", - transformDataStr); + transformDataStr, parent->workerID); std::string copyValuesStr; - Globals::Instance->GetSegmentedPtrName(copyValues, parent, "s16", copyValuesStr); + Globals::Instance->GetSegmentedPtrName(copyValues, parent, "s16", copyValuesStr, + parent->workerID); return StringHelper::Sprintf("\n\t%s,\n\t%s,\n\t%s,\n\t%i, %i\n", refIndexStr.c_str(), transformDataStr.c_str(), copyValuesStr.c_str(), unk_0C, unk_10); @@ -510,8 +519,10 @@ std::string ZLegacyAnimation::GetBodySourceCode() const std::string frameDataName; std::string jointKeyName; - Globals::Instance->GetSegmentedPtrName(frameData, parent, "s16", frameDataName); - Globals::Instance->GetSegmentedPtrName(jointKey, parent, "JointKey", jointKeyName); + Globals::Instance->GetSegmentedPtrName(frameData, parent, "s16", frameDataName, + parent->workerID); + Globals::Instance->GetSegmentedPtrName(jointKey, parent, "JointKey", jointKeyName, + parent->workerID); body += StringHelper::Sprintf("\t%i, %i,\n", frameCount, limbCount); body += StringHelper::Sprintf("\t%s,\n", frameDataName.c_str()); diff --git a/ZAPDTR/ZAPD/ZArray.cpp b/ZAPDTR/ZAPD/ZArray.cpp index 341ade1cf..86d73e1e6 100644 --- a/ZAPDTR/ZAPD/ZArray.cpp +++ b/ZAPDTR/ZAPD/ZArray.cpp @@ -102,8 +102,7 @@ std::string ZArray::GetBodySourceCode() const const auto& res = resList[i]; output += "\t"; - if (res->GetResourceType() == ZResourceType::Scalar || - res->GetResourceType() == ZResourceType::Vertex) + if (res->GetResourceType() == ZResourceType::Scalar || res->GetResourceType() == ZResourceType::Vertex) output += resList.at(i)->GetBodySourceCode(); else output += StringHelper::Sprintf("{ %s }", resList.at(i)->GetBodySourceCode().c_str()); diff --git a/ZAPDTR/ZAPD/ZBackground.cpp b/ZAPDTR/ZAPD/ZBackground.cpp index 0ed1eb747..94efe06e9 100644 --- a/ZAPDTR/ZAPD/ZBackground.cpp +++ b/ZAPDTR/ZAPD/ZBackground.cpp @@ -150,8 +150,11 @@ std::string ZBackground::GetExternalExtension() const void ZBackground::Save(const fs::path& outFolder) { - fs::path filepath = outFolder / (outName + "." + GetExternalExtension()); - File::WriteAllBytes(filepath.string(), data); + if (!Globals::Instance->otrMode) + { + fs::path filepath = outFolder / (outName + "." + GetExternalExtension()); + File::WriteAllBytes(filepath.string(), data); + } } std::string ZBackground::GetBodySourceCode() const diff --git a/ZAPDTR/ZAPD/ZCollision.cpp b/ZAPDTR/ZAPD/ZCollision.cpp index 11efd47e8..2a282cf2f 100644 --- a/ZAPDTR/ZAPD/ZCollision.cpp +++ b/ZAPDTR/ZAPD/ZCollision.cpp @@ -97,12 +97,15 @@ void ZCollisionHeader::DeclareReferences(const std::string& prefix) if (waterBoxes.size() > 0) { - for (size_t i = 0; i < waterBoxes.size(); i++) + if (!Globals::Instance->otrMode) { - declaration += - StringHelper::Sprintf("\t{ %s },", waterBoxes[i].GetBodySourceCode().c_str()); - if (i + 1 < waterBoxes.size()) - declaration += "\n"; + for (size_t i = 0; i < waterBoxes.size(); i++) + { + declaration += + StringHelper::Sprintf("\t{ %s },", waterBoxes[i].GetBodySourceCode().c_str()); + if (i + 1 < waterBoxes.size()) + declaration += "\n"; + } } parent->AddDeclarationArray( @@ -115,14 +118,17 @@ void ZCollisionHeader::DeclareReferences(const std::string& prefix) { declaration.clear(); - for (size_t i = 0; i < polygons.size(); i++) + if (!Globals::Instance->otrMode) { - declaration += StringHelper::Sprintf( - "\t{ 0x%04X, 0x%04X, 0x%04X, 0x%04X, 0x%04X, 0x%04X, 0x%04X, 0x%04X },", - polygons[i].type, polygons[i].vtxA, polygons[i].vtxB, polygons[i].vtxC, - polygons[i].a, polygons[i].b, polygons[i].c, polygons[i].d); - if (i + 1 < polygons.size()) - declaration += "\n"; + for (size_t i = 0; i < polygons.size(); i++) + { + declaration += StringHelper::Sprintf( + "\t{ 0x%04X, 0x%04X, 0x%04X, 0x%04X, 0x%04X, 0x%04X, 0x%04X, 0x%04X },", + polygons[i].type, polygons[i].vtxA, polygons[i].vtxB, polygons[i].vtxC, + polygons[i].a, polygons[i].b, polygons[i].c, polygons[i].d); + if (i + 1 < polygons.size()) + declaration += "\n"; + } } parent->AddDeclarationArray( @@ -132,13 +138,16 @@ void ZCollisionHeader::DeclareReferences(const std::string& prefix) } declaration.clear(); - for (size_t i = 0; i < polygonTypes.size(); i++) + if (!Globals::Instance->otrMode) { - declaration += StringHelper::Sprintf("\t{ 0x%08lX, 0x%08lX },", polygonTypes[i] >> 32, - polygonTypes[i] & 0xFFFFFFFF); + for (size_t i = 0; i < polygonTypes.size(); i++) + { + declaration += StringHelper::Sprintf("\t{ 0x%08lX, 0x%08lX },", polygonTypes[i] >> 32, + polygonTypes[i] & 0xFFFFFFFF); - if (i < polygonTypes.size() - 1) - declaration += "\n"; + if (i < polygonTypes.size() - 1) + declaration += "\n"; + } } if (polyTypeDefAddress != 0) @@ -154,13 +163,16 @@ void ZCollisionHeader::DeclareReferences(const std::string& prefix) { declaration.clear(); - for (size_t i = 0; i < vertices.size(); i++) + if (!Globals::Instance->otrMode) { - declaration += - StringHelper::Sprintf("\t{ %s },", vertices[i].GetBodySourceCode().c_str()); + for (size_t i = 0; i < vertices.size(); i++) + { + declaration += + StringHelper::Sprintf("\t{ %s },", vertices[i].GetBodySourceCode().c_str()); - if (i < vertices.size() - 1) - declaration += "\n"; + if (i < vertices.size() - 1) + declaration += "\n"; + } } const auto& first = vertices.front(); @@ -177,29 +189,36 @@ std::string ZCollisionHeader::GetBodySourceCode() const { std::string declaration = ""; + if (Globals::Instance->otrMode) + return declaration; + declaration += "\n"; declaration += StringHelper::Sprintf("\t{ %i, %i, %i },\n", absMinX, absMinY, absMinZ); declaration += StringHelper::Sprintf("\t{ %i, %i, %i },\n", absMaxX, absMaxY, absMaxZ); std::string vtxName; - Globals::Instance->GetSegmentedPtrName(vtxAddress, parent, "Vec3s", vtxName); + Globals::Instance->GetSegmentedPtrName(vtxAddress, parent, "Vec3s", vtxName, parent->workerID); declaration += StringHelper::Sprintf("\t%i,\n\t%s,\n", numVerts, vtxName.c_str()); std::string polyName; - Globals::Instance->GetSegmentedPtrName(polyAddress, parent, "CollisionPoly", polyName); + Globals::Instance->GetSegmentedPtrName(polyAddress, parent, "CollisionPoly", polyName, + parent->workerID); declaration += StringHelper::Sprintf("\t%i,\n\t%s,\n", numPolygons, polyName.c_str()); std::string surfaceName; - Globals::Instance->GetSegmentedPtrName(polyTypeDefAddress, parent, "SurfaceType", surfaceName); + Globals::Instance->GetSegmentedPtrName(polyTypeDefAddress, parent, "SurfaceType", surfaceName, + parent->workerID); declaration += StringHelper::Sprintf("\t%s,\n", surfaceName.c_str()); std::string camName; - Globals::Instance->GetSegmentedPtrName(camDataAddress, parent, "CamData", camName); + Globals::Instance->GetSegmentedPtrName(camDataAddress, parent, "CamData", camName, + parent->workerID); declaration += StringHelper::Sprintf("\t%s,\n", camName.c_str()); std::string waterBoxName; - Globals::Instance->GetSegmentedPtrName(waterBoxAddress, parent, "WaterBox", waterBoxName); + Globals::Instance->GetSegmentedPtrName(waterBoxAddress, parent, "WaterBox", waterBoxName, + parent->workerID); declaration += StringHelper::Sprintf("\t%i,\n\t%s\n", numWaterBoxes, waterBoxName.c_str()); return declaration; diff --git a/ZAPDTR/ZAPD/ZDisplayList.cpp b/ZAPDTR/ZAPD/ZDisplayList.cpp index 4c7dd7c17..93269b65e 100644 --- a/ZAPDTR/ZAPD/ZDisplayList.cpp +++ b/ZAPDTR/ZAPD/ZDisplayList.cpp @@ -553,7 +553,8 @@ int32_t ZDisplayList::OptimizationCheck_LoadTextureBlock(int32_t startIndex, std lastTexSeg = segmentNumber; - Globals::Instance->GetSegmentedPtrName(data & 0xFFFFFFFF, parent, "", texStr); + Globals::Instance->GetSegmentedPtrName(data & 0xFFFFFFFF, parent, "", texStr, + parent->workerID); } // gsDPSetTile @@ -705,7 +706,7 @@ void ZDisplayList::Opcode_G_DL(uint64_t data, const std::string& prefix, char* l if (pp != 0) { - if (!Globals::Instance->HasSegment(segNum)) + if (!Globals::Instance->HasSegment(segNum, parent->workerID)) sprintf(line, "gsSPBranchList(0x%08" PRIX64 "),", data & 0xFFFFFFFF); else if (dListDecl != nullptr) sprintf(line, "gsSPBranchList(%s),", dListDecl->varName.c_str()); @@ -715,7 +716,7 @@ void ZDisplayList::Opcode_G_DL(uint64_t data, const std::string& prefix, char* l } else { - if (!Globals::Instance->HasSegment(segNum)) + if (!Globals::Instance->HasSegment(segNum, parent->workerID)) sprintf(line, "gsSPDisplayList(0x%08" PRIX64 "),", data & 0xFFFFFFFF); else if (dListDecl != nullptr) sprintf(line, "gsSPDisplayList(%s),", dListDecl->varName.c_str()); @@ -726,7 +727,7 @@ void ZDisplayList::Opcode_G_DL(uint64_t data, const std::string& prefix, char* l // if (segNum == 8 || segNum == 9 || segNum == 10 || segNum == 11 || segNum == 12 || segNum == // 13) // Used for runtime-generated display lists - if (!Globals::Instance->HasSegment(segNum)) + if (!Globals::Instance->HasSegment(segNum, parent->workerID)) { if (pp != 0) sprintf(line, "gsSPBranchList(0x%08" PRIX64 "),", data & 0xFFFFFFFF); @@ -847,7 +848,7 @@ void ZDisplayList::Opcode_G_VTX(uint64_t data, char* line) } // Hack: Don't extract vertices from a unknown segment. - if (!Globals::Instance->HasSegment(GETSEGNUM(data))) + if (!Globals::Instance->HasSegment(GETSEGNUM(data), parent->workerID)) { segptr_t segmented = data & 0xFFFFFFFF; references.push_back(segmented); @@ -951,7 +952,7 @@ void ZDisplayList::Opcode_G_SETTIMG(uint64_t data, const std::string& prefix, ch if (parent != nullptr) { - if (Globals::Instance->HasSegment(segmentNumber)) + if (Globals::Instance->HasSegment(segmentNumber, parent->workerID)) texDecl = parent->GetDeclaration(texAddress); else texDecl = parent->GetDeclaration(data); @@ -959,7 +960,7 @@ void ZDisplayList::Opcode_G_SETTIMG(uint64_t data, const std::string& prefix, ch if (texDecl != nullptr) sprintf(texStr, "%s", texDecl->varName.c_str()); - else if (data != 0 && Globals::Instance->HasSegment(segmentNumber)) + else if (data != 0 && Globals::Instance->HasSegment(segmentNumber, parent->workerID)) sprintf(texStr, "%sTex_%06X", prefix.c_str(), texAddress); else { @@ -972,7 +973,7 @@ void ZDisplayList::Opcode_G_SETTIMG(uint64_t data, const std::string& prefix, ch else { std::string texName; - Globals::Instance->GetSegmentedPtrName(data, parent, "", texName); + Globals::Instance->GetSegmentedPtrName(data, parent, "", texName, parent->workerID); sprintf(line, "gsDPSetTextureImage(%s, %s, %i, %s),", fmtTbl[fmt], sizTbl[siz], www + 1, texName.c_str()); } @@ -1647,7 +1648,9 @@ static int32_t GfxdCallback_Vtx(uint32_t seg, int32_t count) } self->references.push_back(seg); - gfxd_puts("@r"); + + if (!Globals::Instance->otrMode) + gfxd_puts("@r"); return 1; } @@ -1670,7 +1673,7 @@ static int32_t GfxdCallback_Texture(segptr_t seg, int32_t fmt, int32_t siz, int3 self->TextureGenCheck(); std::string texName; - Globals::Instance->GetSegmentedPtrName(seg, self->parent, "", texName); + Globals::Instance->GetSegmentedPtrName(seg, self->parent, "", texName, self->parent->workerID); gfxd_puts(texName.c_str()); @@ -1694,7 +1697,7 @@ static int32_t GfxdCallback_Palette(uint32_t seg, [[maybe_unused]] int32_t idx, self->TextureGenCheck(); std::string palName; - Globals::Instance->GetSegmentedPtrName(seg, self->parent, "", palName); + Globals::Instance->GetSegmentedPtrName(seg, self->parent, "", palName, self->parent->workerID); gfxd_puts(palName.c_str()); @@ -1708,7 +1711,8 @@ static int32_t GfxdCallback_DisplayList(uint32_t seg) uint32_t dListSegNum = GETSEGNUM(seg); std::string dListName = ""; - bool addressFound = Globals::Instance->GetSegmentedPtrName(seg, self->parent, "Gfx", dListName); + bool addressFound = Globals::Instance->GetSegmentedPtrName(seg, self->parent, "Gfx", dListName, + self->parent->workerID); if (!addressFound && self->parent->segment == dListSegNum) { @@ -1731,7 +1735,8 @@ static int32_t GfxdCallback_Matrix(uint32_t seg) std::string mtxName; ZDisplayList* self = static_cast(gfxd_udata_get()); - bool addressFound = Globals::Instance->GetSegmentedPtrName(seg, self->parent, "Mtx", mtxName); + bool addressFound = Globals::Instance->GetSegmentedPtrName(seg, self->parent, "Mtx", mtxName, + self->parent->workerID); if (!addressFound && GETSEGNUM(seg) == self->parent->segment) { Declaration* decl = @@ -1805,6 +1810,23 @@ void ZDisplayList::DeclareReferences(const std::string& prefix) curAddr, firstVtx.GetDeclarationAlignment(), item.second.size() * firstVtx.GetRawDataSize(), firstVtx.GetSourceTypeName(), firstVtx.GetDefaultName(name), item.second.size(), declaration); + + /*for (auto vtx : item.second) + { + ZVtx* nVtx = new ZVtx(vtx.parent); + nVtx->x = vtx.x; + nVtx->y = vtx.y; + nVtx->z = vtx.z; + nVtx->flag = vtx.flag; + nVtx->s = vtx.s; + nVtx->t = vtx.t; + nVtx->r = vtx.r; + nVtx->g = vtx.g; + nVtx->b = vtx.b; + nVtx->a = vtx.a; + decl->vertexHack.push_back(nVtx); + }*/ + decl->isExternal = true; } } @@ -1850,15 +1872,15 @@ void ZDisplayList::DeclareReferences(const std::string& prefix) { auto& item = vertices[vtxKeys[i]]; - std::string declaration; + //std::string declaration; - for (auto& vtx : item) - declaration += StringHelper::Sprintf("\t%s,\n", vtx.GetBodySourceCode().c_str()); + //for (auto& vtx : item) + //declaration += StringHelper::Sprintf("\t%s,\n", vtx.GetBodySourceCode().c_str()); // Ensure there's always a trailing line feed to prevent dumb warnings. // Please don't remove this line, unless you somehow made a way to prevent // that warning when building the OoT repo. - declaration += "\n"; + //declaration += "\n"; if (parent != nullptr) { @@ -1870,12 +1892,6 @@ void ZDisplayList::DeclareReferences(const std::string& prefix) else vtxName = StringHelper::Sprintf("%sVtx_%06X", prefix.c_str(), vtxKeys[i]); - - if (StringHelper::Contains(vtxName, "4B18")) - { - int bp = 0; - } - auto filepath = Globals::Instance->outputPath / vtxName; std::string incStr = StringHelper::Sprintf("%s.%s.inc", filepath.string().c_str(), "vtx"); @@ -1991,7 +2007,7 @@ bool ZDisplayList::TextureGenCheck(int32_t texWidth, int32_t texHeight, uint32_t texWidth, texHeight, texIsPalette, texAddr); if ((texSeg != 0 || texAddr != 0) && texWidth > 0 && texHeight > 0 && texLoaded && - Globals::Instance->HasSegment(segmentNumber)) + Globals::Instance->HasSegment(segmentNumber, self->parent->workerID)) { ZFile* auxParent = nullptr; if (segmentNumber == self->parent->segment) @@ -2002,7 +2018,8 @@ bool ZDisplayList::TextureGenCheck(int32_t texWidth, int32_t texHeight, uint32_t { // Try to find a non-external file (i.e., one we are actually extracting) // which has the same segment number we are looking for. - for (auto& otherFile : Globals::Instance->cfg.segmentRefFiles[segmentNumber]) + auto segs = Globals::Instance->GetSegmentRefFiles(self->parent->workerID); + for (auto& otherFile : segs[segmentNumber]) { if (!otherFile->isExternalFile) { diff --git a/ZAPDTR/ZAPD/ZFile.cpp b/ZAPDTR/ZAPD/ZFile.cpp index 13ab961f8..b706c1914 100644 --- a/ZAPDTR/ZAPD/ZFile.cpp +++ b/ZAPDTR/ZAPD/ZFile.cpp @@ -41,6 +41,7 @@ ZFile::ZFile() baseAddress = 0; rangeStart = 0x000000000; rangeEnd = 0xFFFFFFFF; + workerID = 0; } ZFile::ZFile(const fs::path& nOutPath, const std::string& nName) : ZFile() @@ -51,7 +52,7 @@ ZFile::ZFile(const fs::path& nOutPath, const std::string& nName) : ZFile() } ZFile::ZFile(ZFileMode nMode, tinyxml2::XMLElement* reader, const fs::path& nBasePath, - const fs::path& nOutPath, const std::string& filename, const fs::path& nXmlFilePath) + const fs::path& nOutPath, const std::string& filename, const fs::path& nXmlFilePath, int nWorkerID) : ZFile() { xmlFilePath = nXmlFilePath; @@ -66,6 +67,7 @@ ZFile::ZFile(ZFileMode nMode, tinyxml2::XMLElement* reader, const fs::path& nBas outputPath = nOutPath; mode = nMode; + workerID = nWorkerID; ParseXML(reader, filename); if (mode != ZFileMode::ExternalFile) @@ -167,7 +169,7 @@ void ZFile::ParseXML(tinyxml2::XMLElement* reader, const std::string& filename) } } } - Globals::Instance->AddSegment(segment, this); + Globals::Instance->AddSegment(segment, this, workerID); if (Globals::Instance->verbosity >= VerbosityLevel::VERBOSITY_INFO) { @@ -181,16 +183,22 @@ void ZFile::ParseXML(tinyxml2::XMLElement* reader, const std::string& filename) } } - if (mode == ZFileMode::Extract || mode == ZFileMode::ExternalFile) + if (mode == ZFileMode::Extract || mode == ZFileMode::ExternalFile || mode == ZFileMode::ExtractDirectory) { - if (!File::Exists((basePath / name).string())) + if (Globals::Instance->fileMode != ZFileMode::ExtractDirectory) { - std::string errorHeader = StringHelper::Sprintf("binary file '%s' does not exist.", - (basePath / name).c_str()); - HANDLE_ERROR_PROCESS(WarningType::Always, errorHeader, ""); + if (!File::Exists((basePath / name).string())) + { + std::string errorHeader = StringHelper::Sprintf("binary file '%s' does not exist.", + (basePath / name).c_str()); + HANDLE_ERROR_PROCESS(WarningType::Always, errorHeader, ""); + } } - rawData = File::ReadAllBytes((basePath / name).string()); + if (Globals::Instance->fileMode == ZFileMode::ExtractDirectory) + rawData = Globals::Instance->GetBaseromFile(name); + else + rawData = Globals::Instance->GetBaseromFile((basePath / name).string()); if (reader->Attribute("RangeEnd") == nullptr) rangeEnd = rawData.size(); @@ -260,7 +268,7 @@ void ZFile::ParseXML(tinyxml2::XMLElement* reader, const std::string& filename) { ZResource* nRes = nodeMap[nodeName](this); - if (mode == ZFileMode::Extract || mode == ZFileMode::ExternalFile) + if (mode == ZFileMode::Extract || mode == ZFileMode::ExternalFile || mode == ZFileMode::ExtractDirectory) nRes->ExtractFromXML(child, rawDataIndex); switch (nRes->GetResourceType()) @@ -813,7 +821,8 @@ void ZFile::GenerateSourceHeaderFiles() if (Globals::Instance->verbosity >= VerbosityLevel::VERBOSITY_INFO) printf("Writing H file: %s\n", headerFilename.c_str()); - File::WriteAllText(headerFilename, formatter.GetOutput()); + if (Globals::Instance->fileMode != ZFileMode::ExtractDirectory) + File::WriteAllText(headerFilename, formatter.GetOutput()); } std::string ZFile::GetHeaderInclude() const @@ -999,6 +1008,10 @@ std::string ZFile::ProcessDeclarations() lastItem.second->size += curItem.second->size; lastItem.second->arrayItemCnt += curItem.second->arrayItemCnt; lastItem.second->text += "\n" + curItem.second->text; + + for (auto vtx : curItem.second->vertexHack) + lastItem.second->vertexHack.push_back(vtx); + declarations.erase(curItem.first); declarationKeys.erase(declarationKeys.begin() + i); delete curItem.second; @@ -1087,7 +1100,7 @@ void ZFile::ProcessDeclarationText(Declaration* decl) { std::string vtxName; Globals::Instance->GetSegmentedArrayIndexedName(decl->references[refIndex], 0x10, this, - "Vtx", vtxName); + "Vtx", vtxName, workerID); decl->text.replace(i, 2, vtxName); refIndex++; @@ -1190,6 +1203,9 @@ void ZFile::HandleUnaccountedData() uint32_t lastSize = 0; std::vector declsAddresses; + if (Globals::Instance->otrMode) + return; + for (const auto& item : declarations) { declsAddresses.push_back(item.first); diff --git a/ZAPDTR/ZAPD/ZFile.h b/ZAPDTR/ZAPD/ZFile.h index ac4062d5b..7860aa4d3 100644 --- a/ZAPDTR/ZAPD/ZFile.h +++ b/ZAPDTR/ZAPD/ZFile.h @@ -16,6 +16,7 @@ enum class ZFileMode BuildBackground, Extract, ExternalFile, + ExtractDirectory, Invalid, Custom = 1000, // Used for exporter file modes }; @@ -34,6 +35,8 @@ public: std::string defines; std::vector resources; + int workerID; + // Default to using virtual addresses uint32_t segment = 0x80; uint32_t baseAddress, rangeStart, rangeEnd; @@ -41,7 +44,7 @@ public: ZFile(const fs::path& nOutPath, const std::string& nName); ZFile(ZFileMode nMode, tinyxml2::XMLElement* reader, const fs::path& nBasePath, - const fs::path& nOutPath, const std::string& filename, const fs::path& nXmlFilePath); + const fs::path& nOutPath, const std::string& filename, const fs::path& nXmlFilePath, int nWorkerID); ~ZFile(); std::string GetName() const; @@ -107,12 +110,12 @@ public: static void RegisterNode(std::string nodeName, ZResourceFactoryFunc* nodeFunc); protected: - std::vector rawData; std::string name; fs::path outName = ""; fs::path basePath; fs::path outputPath; fs::path xmlFilePath; + std::vector rawData; // Keep track of every texture of this ZFile. // The pointers declared here are "borrowed" (somebody else is the owner), diff --git a/ZAPDTR/ZAPD/ZLimb.cpp b/ZAPDTR/ZAPD/ZLimb.cpp index 330fbaf7c..9eb7eac8d 100644 --- a/ZAPDTR/ZAPD/ZLimb.cpp +++ b/ZAPDTR/ZAPD/ZLimb.cpp @@ -218,18 +218,25 @@ size_t ZLimb::GetRawDataSize() const std::string ZLimb::GetBodySourceCode() const { + if (Globals::Instance->otrMode) + return ""; + std::string dListStr; std::string dListStr2; - Globals::Instance->GetSegmentedArrayIndexedName(dListPtr, 8, parent, "Gfx", dListStr); - Globals::Instance->GetSegmentedArrayIndexedName(dList2Ptr, 8, parent, "Gfx", dListStr2); + Globals::Instance->GetSegmentedArrayIndexedName(dListPtr, 8, parent, "Gfx", dListStr, + parent->workerID); + Globals::Instance->GetSegmentedArrayIndexedName(dList2Ptr, 8, parent, "Gfx", dListStr2, + parent->workerID); std::string entryStr = "\n\t"; if (type == ZLimbType::Legacy) { std::string childName; std::string siblingName; - Globals::Instance->GetSegmentedPtrName(childPtr, parent, "LegacyLimb", childName); - Globals::Instance->GetSegmentedPtrName(siblingPtr, parent, "LegacyLimb", siblingName); + Globals::Instance->GetSegmentedPtrName(childPtr, parent, "LegacyLimb", childName, + parent->workerID); + Globals::Instance->GetSegmentedPtrName(siblingPtr, parent, "LegacyLimb", siblingName, + parent->workerID); entryStr += StringHelper::Sprintf("%s,\n", dListStr.c_str()); entryStr += @@ -261,7 +268,8 @@ std::string ZLimb::GetBodySourceCode() const case ZLimbType::Skin: { std::string skinSegmentStr; - Globals::Instance->GetSegmentedPtrName(skinSegment, parent, "", skinSegmentStr); + Globals::Instance->GetSegmentedPtrName(skinSegment, parent, "", skinSegmentStr, + parent->workerID); entryStr += StringHelper::Sprintf("\t0x%02X, %s\n", skinSegmentType, skinSegmentStr.c_str()); } @@ -367,7 +375,7 @@ void ZLimb::DeclareDList(segptr_t dListSegmentedPtr, const std::string& prefix, std::string dlistName; bool declFound = Globals::Instance->GetSegmentedArrayIndexedName(dListSegmentedPtr, 8, parent, - "Gfx", dlistName); + "Gfx", dlistName, parent->workerID); if (declFound) return; diff --git a/ZAPDTR/ZAPD/ZPath.cpp b/ZAPDTR/ZAPD/ZPath.cpp index e19513db3..660821ce8 100644 --- a/ZAPDTR/ZAPD/ZPath.cpp +++ b/ZAPDTR/ZAPD/ZPath.cpp @@ -142,8 +142,8 @@ void PathwayEntry::DeclareReferences(const std::string& prefix) return; std::string pointsName; - bool addressFound = - Globals::Instance->GetSegmentedPtrName(listSegmentAddress, parent, "Vec3s", pointsName); + bool addressFound = Globals::Instance->GetSegmentedPtrName(listSegmentAddress, parent, "Vec3s", + pointsName, parent->workerID); if (addressFound) return; @@ -177,7 +177,8 @@ std::string PathwayEntry::GetBodySourceCode() const { std::string declaration; std::string listName; - Globals::Instance->GetSegmentedPtrName(listSegmentAddress, parent, "Vec3s", listName); + Globals::Instance->GetSegmentedPtrName(listSegmentAddress, parent, "Vec3s", listName, + parent->workerID); if (Globals::Instance->game == ZGame::MM_RETAIL) declaration += diff --git a/ZAPDTR/ZAPD/ZPlayerAnimationData.cpp b/ZAPDTR/ZAPD/ZPlayerAnimationData.cpp index a96604fda..ab633c129 100644 --- a/ZAPDTR/ZAPD/ZPlayerAnimationData.cpp +++ b/ZAPDTR/ZAPD/ZPlayerAnimationData.cpp @@ -3,6 +3,7 @@ #include "Utils/BitConverter.h" #include "Utils/StringHelper.h" #include "ZFile.h" +#include REGISTER_ZFILENODE(PlayerAnimationData, ZPlayerAnimationData); @@ -54,6 +55,9 @@ std::string ZPlayerAnimationData::GetBodySourceCode() const { std::string declaration = ""; + if (Globals::Instance->otrMode) + return ""; + size_t index = 0; for (const auto& entry : limbRotData) { diff --git a/ZAPDTR/ZAPD/ZResource.cpp b/ZAPDTR/ZAPD/ZResource.cpp index a5ad4cf21..c6efef073 100644 --- a/ZAPDTR/ZAPD/ZResource.cpp +++ b/ZAPDTR/ZAPD/ZResource.cpp @@ -8,6 +8,7 @@ #include "ZFile.h" #include #include +#include ZResource::ZResource(ZFile* nParent) { @@ -18,6 +19,7 @@ ZResource::ZResource(ZFile* nParent) sourceOutput = ""; rawDataIndex = 0; outputDeclaration = true; + hash = 0; RegisterRequiredAttribute("Name"); RegisterOptionalAttribute("OutName"); @@ -119,14 +121,21 @@ void ZResource::ParseXML(tinyxml2::XMLElement* reader) name = registeredAttributes.at("Name").value; - static std::regex r("[a-zA-Z_]+[a-zA-Z0-9_]*", std::regex::icase | std::regex::optimize); - if (!isInner || (isInner && name != "")) + // Disable this check for OTR file generation for now since it takes up a considerable amount of CPU time + if (!Globals::Instance->otrMode) { - if (!std::regex_match(name, r)) + static std::regex r("[a-zA-Z_]+[a-zA-Z0-9_]*", + std::regex::icase | std::regex::optimize); + + if (!isInner || (isInner && name != "")) { - HANDLE_ERROR_RESOURCE(WarningType::InvalidAttributeValue, parent, this, - rawDataIndex, "invalid value found for 'Name' attribute", ""); + if (!std::regex_match(name, r)) + { + HANDLE_ERROR_RESOURCE(WarningType::InvalidAttributeValue, parent, this, + rawDataIndex, "invalid value found for 'Name' attribute", + ""); + } } } @@ -273,6 +282,21 @@ void ZResource::GetSourceOutputCode([[maybe_unused]] const std::string& prefix) else decl->text = bodyStr; + // OTRTODO: This is a hack and we need something more elegant in the future... + if (GetResourceType() == ZResourceType::Array) + { + ZArray* arr = (ZArray*)this; + if (arr->resList[0]->GetResourceType() == ZResourceType::Vertex) + { + for (int i = 0; i < arr->resList.size(); i++) + { + ZVtx* vtx = (ZVtx*)arr->resList[i]; + decl->vertexHack.push_back(vtx); + + } + } + } + if (decl != nullptr) decl->staticConf = staticConf; } diff --git a/ZAPDTR/ZAPD/ZRom.cpp b/ZAPDTR/ZAPD/ZRom.cpp new file mode 100644 index 000000000..2a1d3c8a1 --- /dev/null +++ b/ZAPDTR/ZAPD/ZRom.cpp @@ -0,0 +1,202 @@ +#include "ZRom.h" +#include "Utils/BitConverter.h" +#include "Utils/File.h" +#include "Utils/Directory.h" +#include "yaz0/yaz0.h" + +#ifndef _MSC_VER +#include +#endif +#include + +namespace fs = std::filesystem; + +#define DMA_ENTRY_SIZE 16 + +#if defined(_MSC_VER) +#define __bswap_32 _byteswap_ulong +#define bswap_32 _byteswap_ulong +#endif + +// ROM DMA Table Start +#define OOT_OFF_NTSC_10_RC 0x7430 +#define OOT_OFF_NTSC_10 0x7430 +#define OOT_OFF_NTSC_11 0x7430 +#define OOT_OFF_PAL_10 0x7950 +#define OOT_OFF_NTSC_12 0x7960 +#define OOT_OFF_PAL_11 0x7950 +#define OOT_OFF_JP_GC 0x7170 +#define OOT_OFF_JP_MQ 0x7170 +#define OOT_OFF_US_GC 0x7170 +#define OOT_OFF_US_MQ 0x7170 +#define OOT_OFF_PAL_GC_DBG1 0x12F70 +#define OOT_OFF_PAL_MQ_DBG 0x12F70 +#define OOT_OFF_PAL_GC_DBG2 0x12F70 +#define OOT_OFF_PAL_GC 0x7170 +#define OOT_OFF_PAL_MQ 0x7170 +#define OOT_OFF_JP_GC_CE 007170 +#define OOT_OFF_CN_IQUE 0xB7A0 +#define OOT_OFF_TW_IQUE 0xB240 + +#define MM_OFF_US_10 0x1A500 +#define MM_OFF_JP_10 0x1C110 +#define MM_OFF_JP_11 0x1C050 +#define MM_OFF_DBG 0x24F60 + +#define OOT_NTSC_10 0xEC7011B7 +#define OOT_NTSC_11 0xD43DA81F +#define OOT_NTSC_12 0x693BA2AE +#define OOT_PAL_10 0xB044B569 +#define OOT_PAL_11 0xB2055FBD +#define OOT_NTSC_JP_GC_CE 0xF7F52DB8 +#define OOT_NTSC_JP_GC 0xF611F4BA +#define OOT_NTSC_US_GC 0xF3DD35BA +#define OOT_PAL_GC 0x09465AC3 +#define OOT_NTSC_JP_MQ 0xF43B45BA +#define OOT_NTSC_US_MQ 0xF034001A +#define OOT_PAL_MQ 0x1D4136F3 +#define OOT_PAL_GC_DBG1 0x871E1C92 // 03-21-2002 build +#define OOT_PAL_GC_DBG2 0x87121EFE // 03-13-2002 build +#define OOT_PAL_GC_MQ_DBG 0x917D18F6 +#define OOT_IQUE_TW 0x3D81FB3E +#define OOT_IQUE_CN 0xB1E1E07B +#define OOT_UNKNOWN 0xFFFFFFFF + +ZRom::ZRom(std::string romPath) +{ + RomVersion version; + romData = File::ReadAllBytes(romPath); + + version.crc = BitConverter::ToInt32BE(romData, 0x10); + + switch (version.crc) + { + case OOT_NTSC_10: + version.version = "N64 NTSC 1.0"; + version.listPath = "ntsc_oot.txt"; + version.offset = OOT_OFF_NTSC_10; + break; + case OOT_NTSC_11: + version.version = "N64 NTSC 1.1"; + version.listPath = "ntsc_oot.txt"; + version.offset = OOT_OFF_NTSC_11; + break; + case OOT_NTSC_12: + version.version = "N64 NTSC 1.2"; + version.listPath = "ntsc_oot.txt"; + version.offset = OOT_OFF_NTSC_12; + break; + case OOT_PAL_10: + version.version = "N64 PAL 1.0"; + version.listPath = "pal_oot.txt"; + version.offset = OOT_OFF_PAL_10; + break; + case OOT_PAL_11: + version.version = "N64 PAL 1.1"; + version.listPath = "pal_oot.txt"; + version.offset = OOT_OFF_PAL_11; + break; + case OOT_NTSC_JP_GC: + version.version = "JP GameCube (MQ Disk)"; + version.listPath = "gamecube.txt"; + version.offset = OOT_OFF_JP_GC; + break; + case OOT_NTSC_JP_GC_CE: + version.version = "GameCube (Collectors Edition Disk)"; + version.listPath = "gamecube.txt"; + version.offset = OOT_OFF_JP_GC_CE; + break; + case OOT_NTSC_JP_MQ: + version.version = "JP Master Quest"; + version.listPath = "gamecube.txt"; + version.offset = OOT_OFF_JP_MQ; + break; + case OOT_NTSC_US_MQ: + version.version = "NTSC Master Quest"; + version.listPath = "gamecube.txt"; + version.offset = OOT_OFF_JP_MQ; + break; + case OOT_NTSC_US_GC: + version.version = "NTSC GameCube"; + version.listPath = "gamecube.txt"; + version.offset = OOT_OFF_US_MQ; + break; + case OOT_PAL_GC: + version.version = "PAL GameCube"; + version.listPath = "gamecube_pal.txt"; + version.offset = OOT_OFF_PAL_GC; + break; + case OOT_PAL_MQ: + version.version = "PAL Master Quest"; + version.listPath = "gamecube_pal.txt"; + version.offset = OOT_OFF_PAL_MQ; + break; + case OOT_PAL_GC_DBG1: + version.version = "GameCube Debug 1.0"; + version.listPath = "dbg.txt"; + version.offset = OOT_OFF_PAL_GC_DBG1; + break; + case OOT_PAL_GC_DBG2: + version.version = "GameCube Debug 2.0"; + version.listPath = "dbg.txt"; + version.offset = OOT_OFF_PAL_GC_DBG2; + break; + case OOT_PAL_GC_MQ_DBG: + version.version = "GameCube MQ-Debug"; + version.listPath = "dbg.txt"; + version.offset = OOT_OFF_PAL_MQ_DBG; + break; + case OOT_IQUE_CN: + version.version = "OoT IQue"; + version.listPath = "ique.txt"; + version.offset = OOT_OFF_CN_IQUE; + break; + case OOT_IQUE_TW: + version.version = "TW IQue"; + version.listPath = "ique.txt"; + version.offset = OOT_OFF_TW_IQUE; + break; + } + + auto path = StringHelper::Sprintf("%s/%s", Globals::Instance->fileListPath.string().c_str(), version.listPath.c_str()); + auto txt = File::ReadAllText(path); + std::vector lines = StringHelper::Split(txt, "\n"); + + std::vector decompressedData(1); + + for (int i = 0; i < lines.size(); i++) + { + lines[i] = StringHelper::Strip(lines[i], "\r"); + const int romOffset = version.offset + (DMA_ENTRY_SIZE * i); + + const int virtStart = BitConverter::ToInt32BE(romData, romOffset + 0); + const int virtEnd = BitConverter::ToInt32BE(romData, romOffset + 4); + const int physStart = BitConverter::ToInt32BE(romData, romOffset + 8); + const int physEnd = BitConverter::ToInt32BE(romData, romOffset + 12); + + const bool compressed = physEnd != 0; + int size = compressed ? physEnd - physStart : virtEnd - virtStart; + + auto outData = std::vector(); + outData.resize(size); + memcpy(outData.data(), romData.data() + physStart, size); + + if (compressed) + { + int decSize = virtEnd - virtStart; + decompressedData = std::vector(); + decompressedData.resize(decSize); + yaz0_decode(outData.data(), decompressedData.data(), decSize); + files[lines[i]] = decompressedData; + } + else + files[lines[i]] = outData; + } + + int bp = 0; +} + +std::vector ZRom::GetFile(std::string fileName) +{ + return files[fileName]; +} diff --git a/ZAPDTR/ZAPD/ZRom.h b/ZAPDTR/ZAPD/ZRom.h new file mode 100644 index 000000000..ae3cac156 --- /dev/null +++ b/ZAPDTR/ZAPD/ZRom.h @@ -0,0 +1,27 @@ +#pragma once + +#include +#include +#include +#include + +class ZRom +{ +public: + ZRom(std::string romPath); + + std::vector GetFile(std::string fileName); + +protected: + std::vector romData; + std::map> files; +}; + +struct RomVersion +{ + std::string version = "None"; + std::string error = "None"; + std::string listPath = "None"; + int offset; + uint32_t crc; +}; \ No newline at end of file diff --git a/ZAPDTR/ZAPD/ZRoom/Commands/SetActorCutsceneList.cpp b/ZAPDTR/ZAPD/ZRoom/Commands/SetActorCutsceneList.cpp index 60391a9d1..4c9e8fb5f 100644 --- a/ZAPDTR/ZAPD/ZRoom/Commands/SetActorCutsceneList.cpp +++ b/ZAPDTR/ZAPD/ZRoom/Commands/SetActorCutsceneList.cpp @@ -54,7 +54,8 @@ void SetActorCutsceneList::DeclareReferences(const std::string& prefix) std::string SetActorCutsceneList::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "ActorCutscene", listName); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "ActorCutscene", listName, + parent->workerID); return StringHelper::Sprintf("SCENE_CMD_ACTOR_CUTSCENE_LIST(%i, %s)", cutscenes.size(), listName.c_str()); } diff --git a/ZAPDTR/ZAPD/ZRoom/Commands/SetActorList.cpp b/ZAPDTR/ZAPD/ZRoom/Commands/SetActorList.cpp index 919d86f57..1cda3c2c6 100644 --- a/ZAPDTR/ZAPD/ZRoom/Commands/SetActorList.cpp +++ b/ZAPDTR/ZAPD/ZRoom/Commands/SetActorList.cpp @@ -81,7 +81,8 @@ void SetActorList::DeclareReferencesLate(const std::string& prefix) std::string SetActorList::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "ActorEntry", listName); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "ActorEntry", listName, + parent->workerID); if (numActors != actors.size()) { printf("%s: numActors(%i) ~ actors(%li)\n", parent->GetName().c_str(), numActors, diff --git a/ZAPDTR/ZAPD/ZRoom/Commands/SetAlternateHeaders.cpp b/ZAPDTR/ZAPD/ZRoom/Commands/SetAlternateHeaders.cpp index 629d4a0b0..a89c2b74d 100644 --- a/ZAPDTR/ZAPD/ZRoom/Commands/SetAlternateHeaders.cpp +++ b/ZAPDTR/ZAPD/ZRoom/Commands/SetAlternateHeaders.cpp @@ -48,7 +48,8 @@ void SetAlternateHeaders::DeclareReferencesLate(const std::string& prefix) for (size_t i = 0; i < headers.size(); i++) { std::string altHeaderName; - Globals::Instance->GetSegmentedPtrName(headers.at(i), parent, "", altHeaderName); + Globals::Instance->GetSegmentedPtrName(headers.at(i), parent, "", altHeaderName, + parent->workerID); declaration += StringHelper::Sprintf("\t%s,", altHeaderName.c_str()); @@ -66,7 +67,8 @@ void SetAlternateHeaders::DeclareReferencesLate(const std::string& prefix) std::string SetAlternateHeaders::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "SceneCmd*", listName); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "SceneCmd*", listName, + parent->workerID); return StringHelper::Sprintf("SCENE_CMD_ALTERNATE_HEADER_LIST(%s)", listName.c_str()); } diff --git a/ZAPDTR/ZAPD/ZRoom/Commands/SetAnimatedMaterialList.cpp b/ZAPDTR/ZAPD/ZRoom/Commands/SetAnimatedMaterialList.cpp index 0b9a67e0e..73f72136c 100644 --- a/ZAPDTR/ZAPD/ZRoom/Commands/SetAnimatedMaterialList.cpp +++ b/ZAPDTR/ZAPD/ZRoom/Commands/SetAnimatedMaterialList.cpp @@ -33,7 +33,8 @@ void SetAnimatedMaterialList::DeclareReferences(const std::string& prefix) std::string SetAnimatedMaterialList::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "AnimatedMaterial", listName); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "AnimatedMaterial", listName, + parent->workerID); return StringHelper::Sprintf("SCENE_CMD_ANIMATED_MATERIAL_LIST(%s)", listName.c_str()); } diff --git a/ZAPDTR/ZAPD/ZRoom/Commands/SetCollisionHeader.cpp b/ZAPDTR/ZAPD/ZRoom/Commands/SetCollisionHeader.cpp index 03aaa4bbb..4aafb7c70 100644 --- a/ZAPDTR/ZAPD/ZRoom/Commands/SetCollisionHeader.cpp +++ b/ZAPDTR/ZAPD/ZRoom/Commands/SetCollisionHeader.cpp @@ -29,7 +29,8 @@ void SetCollisionHeader::DeclareReferences(const std::string& prefix) std::string SetCollisionHeader::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "CollisionHeader", listName); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "CollisionHeader", listName, + parent->workerID); return StringHelper::Sprintf("SCENE_CMD_COL_HEADER(%s)", listName.c_str()); } diff --git a/ZAPDTR/ZAPD/ZRoom/Commands/SetCsCamera.cpp b/ZAPDTR/ZAPD/ZRoom/Commands/SetCsCamera.cpp index 5cf0a3d03..577a89cd1 100644 --- a/ZAPDTR/ZAPD/ZRoom/Commands/SetCsCamera.cpp +++ b/ZAPDTR/ZAPD/ZRoom/Commands/SetCsCamera.cpp @@ -71,7 +71,7 @@ void SetCsCamera::DeclareReferences(const std::string& prefix) { std::string camPointsName; Globals::Instance->GetSegmentedPtrName(cameras.at(0).GetCamAddress(), parent, "Vec3s", - camPointsName); + camPointsName, parent->workerID); std::string declaration; size_t index = 0; @@ -103,7 +103,8 @@ void SetCsCamera::DeclareReferences(const std::string& prefix) std::string SetCsCamera::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "CsCameraEntry", listName); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "CsCameraEntry", listName, + parent->workerID); return StringHelper::Sprintf("SCENE_CMD_ACTOR_CUTSCENE_CAM_LIST(%i, %s)", cameras.size(), listName.c_str()); } diff --git a/ZAPDTR/ZAPD/ZRoom/Commands/SetCutscenes.cpp b/ZAPDTR/ZAPD/ZRoom/Commands/SetCutscenes.cpp index e51e550b0..106f6f680 100644 --- a/ZAPDTR/ZAPD/ZRoom/Commands/SetCutscenes.cpp +++ b/ZAPDTR/ZAPD/ZRoom/Commands/SetCutscenes.cpp @@ -86,7 +86,8 @@ void SetCutscenes::ParseRawData() std::string SetCutscenes::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "CutsceneData", listName); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "CutsceneData", listName, + parent->workerID); if (Globals::Instance->game == ZGame::MM_RETAIL) return StringHelper::Sprintf("SCENE_CMD_CUTSCENE_LIST(%i, %s)", numCutscenes, diff --git a/ZAPDTR/ZAPD/ZRoom/Commands/SetEntranceList.cpp b/ZAPDTR/ZAPD/ZRoom/Commands/SetEntranceList.cpp index 8099bacf1..aa20102ff 100644 --- a/ZAPDTR/ZAPD/ZRoom/Commands/SetEntranceList.cpp +++ b/ZAPDTR/ZAPD/ZRoom/Commands/SetEntranceList.cpp @@ -63,7 +63,8 @@ void SetEntranceList::DeclareReferencesLate([[maybe_unused]] const std::string& std::string SetEntranceList::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "EntranceEntry", listName); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "EntranceEntry", listName, + parent->workerID); return StringHelper::Sprintf("SCENE_CMD_ENTRANCE_LIST(%s)", listName.c_str()); } diff --git a/ZAPDTR/ZAPD/ZRoom/Commands/SetExitList.cpp b/ZAPDTR/ZAPD/ZRoom/Commands/SetExitList.cpp index ddc4c5d43..34d2a6e56 100644 --- a/ZAPDTR/ZAPD/ZRoom/Commands/SetExitList.cpp +++ b/ZAPDTR/ZAPD/ZRoom/Commands/SetExitList.cpp @@ -58,7 +58,7 @@ void SetExitList::DeclareReferencesLate([[maybe_unused]] const std::string& pref std::string SetExitList::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "u16", listName); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "u16", listName, parent->workerID); return StringHelper::Sprintf("SCENE_CMD_EXIT_LIST(%s)", listName.c_str()); } diff --git a/ZAPDTR/ZAPD/ZRoom/Commands/SetLightList.cpp b/ZAPDTR/ZAPD/ZRoom/Commands/SetLightList.cpp index 2e023ff20..060fce0a2 100644 --- a/ZAPDTR/ZAPD/ZRoom/Commands/SetLightList.cpp +++ b/ZAPDTR/ZAPD/ZRoom/Commands/SetLightList.cpp @@ -52,7 +52,8 @@ void SetLightList::DeclareReferences(const std::string& prefix) std::string SetLightList::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "LightInfo", listName); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "LightInfo", listName, + parent->workerID); return StringHelper::Sprintf("SCENE_CMD_LIGHT_LIST(%i, %s)", numLights, listName.c_str()); } diff --git a/ZAPDTR/ZAPD/ZRoom/Commands/SetLightingSettings.cpp b/ZAPDTR/ZAPD/ZRoom/Commands/SetLightingSettings.cpp index 08cd83d14..4824f3f61 100644 --- a/ZAPDTR/ZAPD/ZRoom/Commands/SetLightingSettings.cpp +++ b/ZAPDTR/ZAPD/ZRoom/Commands/SetLightingSettings.cpp @@ -44,7 +44,8 @@ void SetLightingSettings::DeclareReferences(const std::string& prefix) std::string SetLightingSettings::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "LightSettings", listName); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "LightSettings", listName, + parent->workerID); return StringHelper::Sprintf("SCENE_CMD_ENV_LIGHT_SETTINGS(%i, %s)", settings.size(), listName.c_str()); } diff --git a/ZAPDTR/ZAPD/ZRoom/Commands/SetMesh.cpp b/ZAPDTR/ZAPD/ZRoom/Commands/SetMesh.cpp index ba0bbe2c2..0723fcf14 100644 --- a/ZAPDTR/ZAPD/ZRoom/Commands/SetMesh.cpp +++ b/ZAPDTR/ZAPD/ZRoom/Commands/SetMesh.cpp @@ -78,7 +78,7 @@ std::string SetMesh::GenDListExterns(ZDisplayList* dList) std::string SetMesh::GetBodySourceCode() const { std::string list; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "", list); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "", list, parent->workerID); return StringHelper::Sprintf("SCENE_CMD_MESH(%s)", list.c_str()); } @@ -129,8 +129,8 @@ std::string PolygonDlist::GetBodySourceCode() const std::string bodyStr; std::string opaStr; std::string xluStr; - Globals::Instance->GetSegmentedPtrName(opa, parent, "Gfx", opaStr); - Globals::Instance->GetSegmentedPtrName(xlu, parent, "Gfx", xluStr); + Globals::Instance->GetSegmentedPtrName(opa, parent, "Gfx", opaStr, parent->workerID); + Globals::Instance->GetSegmentedPtrName(xlu, parent, "Gfx", xluStr, parent->workerID); if (polyType == 2) { @@ -294,7 +294,7 @@ std::string BgImage::GetBodySourceCode() const } std::string backgroundName; - Globals::Instance->GetSegmentedPtrName(source, parent, "", backgroundName); + Globals::Instance->GetSegmentedPtrName(source, parent, "", backgroundName, parent->workerID); bodyStr += StringHelper::Sprintf("%s, ", backgroundName.c_str()); bodyStr += "\n "; if (!isSubStruct) @@ -493,7 +493,7 @@ std::string PolygonType1::GetBodySourceCode() const bodyStr += StringHelper::Sprintf("%i, %i, ", type, format); std::string dlistStr; - Globals::Instance->GetSegmentedPtrName(dlist, parent, "", dlistStr); + Globals::Instance->GetSegmentedPtrName(dlist, parent, "", dlistStr, parent->workerID); bodyStr += StringHelper::Sprintf("%s, ", dlistStr.c_str()); bodyStr += "}, \n"; @@ -505,7 +505,7 @@ std::string PolygonType1::GetBodySourceCode() const bodyStr += single.GetBodySourceCode(); break; case 2: - Globals::Instance->GetSegmentedPtrName(list, parent, "BgImage", listStr); + Globals::Instance->GetSegmentedPtrName(list, parent, "BgImage", listStr, parent->workerID); bodyStr += StringHelper::Sprintf(" %i, %s, \n", count, listStr.c_str()); break; @@ -592,7 +592,7 @@ void PolygonType2::DeclareReferences(const std::string& prefix) std::string PolygonType2::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(start, parent, "", listName); + Globals::Instance->GetSegmentedPtrName(start, parent, "", listName, parent->workerID); std::string body = StringHelper::Sprintf("\n %i, %i,\n", type, polyDLists.size()); body += StringHelper::Sprintf(" %s,\n", listName.c_str()); diff --git a/ZAPDTR/ZAPD/ZRoom/Commands/SetMinimapChests.cpp b/ZAPDTR/ZAPD/ZRoom/Commands/SetMinimapChests.cpp index ec432b7d9..3e6c72a11 100644 --- a/ZAPDTR/ZAPD/ZRoom/Commands/SetMinimapChests.cpp +++ b/ZAPDTR/ZAPD/ZRoom/Commands/SetMinimapChests.cpp @@ -50,7 +50,8 @@ void SetMinimapChests::DeclareReferences(const std::string& prefix) std::string SetMinimapChests::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "MinimapChest", listName); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "MinimapChest", listName, + parent->workerID); return StringHelper::Sprintf("SCENE_CMD_MINIMAP_COMPASS_ICON_INFO(0x%02X, %s)", chests.size(), listName.c_str()); } diff --git a/ZAPDTR/ZAPD/ZRoom/Commands/SetMinimapList.cpp b/ZAPDTR/ZAPD/ZRoom/Commands/SetMinimapList.cpp index be5d8f15d..255bd4e3a 100644 --- a/ZAPDTR/ZAPD/ZRoom/Commands/SetMinimapList.cpp +++ b/ZAPDTR/ZAPD/ZRoom/Commands/SetMinimapList.cpp @@ -52,7 +52,8 @@ void SetMinimapList::DeclareReferences(const std::string& prefix) { std::string listName; - Globals::Instance->GetSegmentedPtrName(listSegmentAddr, parent, "MinimapEntry", listName); + Globals::Instance->GetSegmentedPtrName(listSegmentAddr, parent, "MinimapEntry", listName, + parent->workerID); std::string declaration = StringHelper::Sprintf("\n\t%s, 0x%08X\n", listName.c_str(), unk4); parent->AddDeclaration( @@ -65,7 +66,8 @@ void SetMinimapList::DeclareReferences(const std::string& prefix) std::string SetMinimapList::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "MinimapList", listName); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "MinimapList", listName, + parent->workerID); return StringHelper::Sprintf("SCENE_CMD_MINIMAP_INFO(%s)", listName.c_str()); } diff --git a/ZAPDTR/ZAPD/ZRoom/Commands/SetObjectList.cpp b/ZAPDTR/ZAPD/ZRoom/Commands/SetObjectList.cpp index fdd41e6cb..29519d3ce 100644 --- a/ZAPDTR/ZAPD/ZRoom/Commands/SetObjectList.cpp +++ b/ZAPDTR/ZAPD/ZRoom/Commands/SetObjectList.cpp @@ -51,7 +51,7 @@ void SetObjectList::DeclareReferences(const std::string& prefix) std::string SetObjectList::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "s16", listName); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "s16", listName, parent->workerID); return StringHelper::Sprintf("SCENE_CMD_OBJECT_LIST(%i, %s)", objects.size(), listName.c_str()); } diff --git a/ZAPDTR/ZAPD/ZRoom/Commands/SetPathways.cpp b/ZAPDTR/ZAPD/ZRoom/Commands/SetPathways.cpp index 468aad822..f3bdb0872 100644 --- a/ZAPDTR/ZAPD/ZRoom/Commands/SetPathways.cpp +++ b/ZAPDTR/ZAPD/ZRoom/Commands/SetPathways.cpp @@ -50,7 +50,7 @@ void SetPathways::DeclareReferencesLate(const std::string& prefix) std::string SetPathways::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "Path", listName); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "Path", listName, parent->workerID); return StringHelper::Sprintf("SCENE_CMD_PATH_LIST(%s)", listName.c_str()); } diff --git a/ZAPDTR/ZAPD/ZRoom/Commands/SetRoomList.cpp b/ZAPDTR/ZAPD/ZRoom/Commands/SetRoomList.cpp index 7027fa1f9..a63dd8772 100644 --- a/ZAPDTR/ZAPD/ZRoom/Commands/SetRoomList.cpp +++ b/ZAPDTR/ZAPD/ZRoom/Commands/SetRoomList.cpp @@ -34,7 +34,7 @@ void SetRoomList::DeclareReferences(const std::string& prefix) std::string SetRoomList::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "RomFile", listName); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "RomFile", listName, parent->workerID); return StringHelper::Sprintf("SCENE_CMD_ROOM_LIST(%i, %s)", romfile->rooms.size(), listName.c_str()); } diff --git a/ZAPDTR/ZAPD/ZRoom/Commands/SetStartPositionList.cpp b/ZAPDTR/ZAPD/ZRoom/Commands/SetStartPositionList.cpp index f75b5e0d5..32a2b7000 100644 --- a/ZAPDTR/ZAPD/ZRoom/Commands/SetStartPositionList.cpp +++ b/ZAPDTR/ZAPD/ZRoom/Commands/SetStartPositionList.cpp @@ -51,7 +51,8 @@ void SetStartPositionList::DeclareReferences(const std::string& prefix) std::string SetStartPositionList::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "ActorEntry", listName); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "ActorEntry", listName, + parent->workerID); return StringHelper::Sprintf("SCENE_CMD_SPAWN_LIST(%i, %s)", actors.size(), listName.c_str()); } diff --git a/ZAPDTR/ZAPD/ZRoom/Commands/SetTransitionActorList.cpp b/ZAPDTR/ZAPD/ZRoom/Commands/SetTransitionActorList.cpp index a33d1c6e1..2414f0d2f 100644 --- a/ZAPDTR/ZAPD/ZRoom/Commands/SetTransitionActorList.cpp +++ b/ZAPDTR/ZAPD/ZRoom/Commands/SetTransitionActorList.cpp @@ -52,7 +52,8 @@ void SetTransitionActorList::DeclareReferences(const std::string& prefix) std::string SetTransitionActorList::GetBodySourceCode() const { std::string listName; - Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "TransitionActorEntry", listName); + Globals::Instance->GetSegmentedPtrName(cmdArg2, parent, "TransitionActorEntry", listName, + parent->workerID); return StringHelper::Sprintf("SCENE_CMD_TRANSITION_ACTOR_LIST(%i, %s)", transitionActors.size(), listName.c_str()); } diff --git a/ZAPDTR/ZAPD/ZSkeleton.cpp b/ZAPDTR/ZAPD/ZSkeleton.cpp index bab1f9111..bff4b8263 100644 --- a/ZAPDTR/ZAPD/ZSkeleton.cpp +++ b/ZAPDTR/ZAPD/ZSkeleton.cpp @@ -89,7 +89,8 @@ void ZSkeleton::DeclareReferences(const std::string& prefix) std::string ZSkeleton::GetBodySourceCode() const { std::string limbArrayName; - Globals::Instance->GetSegmentedPtrName(limbsArrayAddress, parent, "", limbArrayName); + Globals::Instance->GetSegmentedPtrName(limbsArrayAddress, parent, "", limbArrayName, + parent->workerID); switch (type) { @@ -245,7 +246,8 @@ std::string ZLimbTable::GetBodySourceCode() const for (size_t i = 0; i < count; i++) { std::string limbName; - Globals::Instance->GetSegmentedPtrName(limbsAddresses[i], parent, "", limbName); + Globals::Instance->GetSegmentedPtrName(limbsAddresses[i], parent, "", limbName, + parent->workerID); body += StringHelper::Sprintf("\t%s,", limbName.c_str()); if (i + 1 < count) diff --git a/ZAPDTR/ZAPD/ZText.cpp b/ZAPDTR/ZAPD/ZText.cpp index 926761784..58af61bc9 100644 --- a/ZAPDTR/ZAPD/ZText.cpp +++ b/ZAPDTR/ZAPD/ZText.cpp @@ -21,11 +21,12 @@ void ZText::ParseRawData() const auto& rawData = parent->GetRawData(); uint32_t currentPtr = StringHelper::StrToL(registeredAttributes.at("CodeOffset").value, 16); - std::vector codeData = File::ReadAllBytes(Globals::Instance->baseRomPath.string() + "\\code"); + std::vector codeData; - // In some cases with the multi-process extractor it seems that it fails to read the code file if something else is reading from it at the same time. - while (codeData.size() == 0) - codeData = File::ReadAllBytes(Globals::Instance->baseRomPath.string() + "\\code"); + if (Globals::Instance->fileMode == ZFileMode::ExtractDirectory) + codeData = Globals::Instance->GetBaseromFile("code"); + else + codeData = Globals::Instance->GetBaseromFile(Globals::Instance->baseRomPath.string() + "code"); while (true) { diff --git a/ZAPDTR/ZAPD/ZTexture.cpp b/ZAPDTR/ZAPD/ZTexture.cpp index 46d7ce334..24f12702b 100644 --- a/ZAPDTR/ZAPD/ZTexture.cpp +++ b/ZAPDTR/ZAPD/ZTexture.cpp @@ -807,25 +807,30 @@ Declaration* ZTexture::DeclareVar(const std::string& prefix, std::string ZTexture::GetBodySourceCode() const { std::string sourceOutput; - size_t texSizeInc = (dWordAligned) ? 8 : 4; - for (size_t i = 0; i < textureDataRaw.size(); i += texSizeInc) - { - if (i % 32 == 0) - sourceOutput += " "; - if (dWordAligned) - sourceOutput += - StringHelper::Sprintf("0x%016llX, ", BitConverter::ToUInt64BE(textureDataRaw, i)); - else - sourceOutput += - StringHelper::Sprintf("0x%08llX, ", BitConverter::ToUInt32BE(textureDataRaw, i)); - if (i % 32 == 24) - sourceOutput += StringHelper::Sprintf(" // 0x%06X \n", rawDataIndex + ((i / 32) * 32)); - } - // Ensure there's always a trailing line feed to prevent dumb warnings. - // Please don't remove this line, unless you somehow made a way to prevent - // that warning when building the OoT repo. - sourceOutput += "\n"; + if (!Globals::Instance->otrMode) + { + size_t texSizeInc = (dWordAligned) ? 8 : 4; + for (size_t i = 0; i < textureDataRaw.size(); i += texSizeInc) + { + if (i % 32 == 0) + sourceOutput += " "; + if (dWordAligned) + sourceOutput += StringHelper::Sprintf("0x%016llX, ", + BitConverter::ToUInt64BE(textureDataRaw, i)); + else + sourceOutput += StringHelper::Sprintf("0x%08llX, ", + BitConverter::ToUInt32BE(textureDataRaw, i)); + if (i % 32 == 24) + sourceOutput += + StringHelper::Sprintf(" // 0x%06X \n", rawDataIndex + ((i / 32) * 32)); + } + + // Ensure there's always a trailing line feed to prevent dumb warnings. + // Please don't remove this line, unless you somehow made a way to prevent + // that warning when building the OoT repo. + sourceOutput += "\n"; + } return sourceOutput; } @@ -847,8 +852,11 @@ std::string ZTexture::GetSourceTypeName() const void ZTexture::CalcHash() { - auto parentRawData = parent->GetRawData(); - hash = CRC32B(parentRawData.data() + rawDataIndex, GetRawDataSize()); + //if (hash == 0) + { + const auto& parentRawData = parent->GetRawData(); + hash = CRC32B(parentRawData.data() + rawDataIndex, GetRawDataSize()); + } } std::string ZTexture::GetExternalExtension() const diff --git a/ZAPDTR/ZAPD/ZTextureAnimation.cpp b/ZAPDTR/ZAPD/ZTextureAnimation.cpp index 698054fa8..233a54dbb 100644 --- a/ZAPDTR/ZAPD/ZTextureAnimation.cpp +++ b/ZAPDTR/ZAPD/ZTextureAnimation.cpp @@ -349,9 +349,12 @@ std::string TextureColorChangingParams::GetBodySourceCode() const std::string envColorListName; std::string frameDataListName; - Globals::Instance->GetSegmentedPtrName(primColorListAddress, parent, "", primColorListName); - Globals::Instance->GetSegmentedPtrName(envColorListAddress, parent, "", envColorListName); - Globals::Instance->GetSegmentedPtrName(frameDataListAddress, parent, "", frameDataListName); + Globals::Instance->GetSegmentedPtrName(primColorListAddress, parent, "", primColorListName, + parent->workerID); + Globals::Instance->GetSegmentedPtrName(envColorListAddress, parent, "", envColorListName, + parent->workerID); + Globals::Instance->GetSegmentedPtrName(frameDataListAddress, parent, "", frameDataListName, + parent->workerID); std::string bodyStr = StringHelper::Sprintf( "\n %d, %d, %s, %s, %s,\n", animLength, colorListCount, primColorListName.c_str(), @@ -423,7 +426,8 @@ void TextureCyclingParams::DeclareReferences([[maybe_unused]] const std::string& for (const auto& tex : textureList) { - bool texFound = Globals::Instance->GetSegmentedPtrName(tex, parent, "", texName); + bool texFound = + Globals::Instance->GetSegmentedPtrName(tex, parent, "", texName, parent->workerID); // texName is a raw segmented pointer. This occurs if the texture is not declared // separately since we cannot read the format. In theory we could scan DLists for the @@ -477,9 +481,10 @@ std::string TextureCyclingParams::GetBodySourceCode() const std::string textureListName; std::string textureIndexListName; - Globals::Instance->GetSegmentedPtrName(textureListAddress, parent, "", textureListName); + Globals::Instance->GetSegmentedPtrName(textureListAddress, parent, "", textureListName, + parent->workerID); Globals::Instance->GetSegmentedPtrName(textureIndexListAddress, parent, "", - textureIndexListName); + textureIndexListName, parent->workerID); std::string bodyStr = StringHelper::Sprintf( "\n %d, %s, %s,\n", cycleLength, textureListName.c_str(), textureIndexListName.c_str()); @@ -652,7 +657,8 @@ std::string ZTextureAnimation::GetBodySourceCode() const for (const auto& entry : entries) { std::string paramName; - Globals::Instance->GetSegmentedPtrName(entry.paramsPtr, parent, "", paramName); + Globals::Instance->GetSegmentedPtrName(entry.paramsPtr, parent, "", paramName, + parent->workerID); bodyStr += StringHelper::Sprintf("\t{ %d, %d, %s },\n", entry.segment, entry.type, paramName.c_str()); diff --git a/ZAPDTR/ZAPD/ctpl_stl.h b/ZAPDTR/ZAPD/ctpl_stl.h new file mode 100644 index 000000000..8e2d9c908 --- /dev/null +++ b/ZAPDTR/ZAPD/ctpl_stl.h @@ -0,0 +1,251 @@ +/********************************************************* +* +* Copyright (C) 2014 by Vitaliy Vitsentiy +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*********************************************************/ + + +#ifndef __ctpl_stl_thread_pool_H__ +#define __ctpl_stl_thread_pool_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + + +// thread pool to run user's functors with signature +// ret func(int id, other_params) +// where id is the index of the thread that runs the functor +// ret is some return type + + +namespace ctpl { + + namespace detail { + template + class Queue { + public: + bool push(T const & value) { + std::unique_lock lock(this->mutex); + this->q.push(value); + return true; + } + // deletes the retrieved element, do not use for non integral types + bool pop(T & v) { + std::unique_lock lock(this->mutex); + if (this->q.empty()) + return false; + v = this->q.front(); + this->q.pop(); + return true; + } + bool empty() { + std::unique_lock lock(this->mutex); + return this->q.empty(); + } + private: + std::queue q; + std::mutex mutex; + }; + } + + class thread_pool { + + public: + + thread_pool() { this->init(); } + thread_pool(int nThreads) { this->init(); this->resize(nThreads); } + + // the destructor waits for all the functions in the queue to be finished + ~thread_pool() { + this->stop(true); + } + + // get the number of running threads in the pool + int size() { return static_cast(this->threads.size()); } + + // number of idle threads + int n_idle() { return this->nWaiting; } + std::thread & get_thread(int i) { return *this->threads[i]; } + + // change the number of threads in the pool + // should be called from one thread, otherwise be careful to not interleave, also with this->stop() + // nThreads must be >= 0 + void resize(int nThreads) { + if (!this->isStop && !this->isDone) { + int oldNThreads = static_cast(this->threads.size()); + if (oldNThreads <= nThreads) { // if the number of threads is increased + this->threads.resize(nThreads); + this->flags.resize(nThreads); + + for (int i = oldNThreads; i < nThreads; ++i) { + this->flags[i] = std::make_shared>(false); + this->set_thread(i); + } + } + else { // the number of threads is decreased + for (int i = oldNThreads - 1; i >= nThreads; --i) { + *this->flags[i] = true; // this thread will finish + this->threads[i]->detach(); + } + { + // stop the detached threads that were waiting + std::unique_lock lock(this->mutex); + this->cv.notify_all(); + } + this->threads.resize(nThreads); // safe to delete because the threads are detached + this->flags.resize(nThreads); // safe to delete because the threads have copies of shared_ptr of the flags, not originals + } + } + } + + // empty the queue + void clear_queue() { + std::function * _f; + while (this->q.pop(_f)) + delete _f; // empty the queue + } + + // pops a functional wrapper to the original function + std::function pop() { + std::function * _f = nullptr; + this->q.pop(_f); + std::unique_ptr> func(_f); // at return, delete the function even if an exception occurred + std::function f; + if (_f) + f = *_f; + return f; + } + + // wait for all computing threads to finish and stop all threads + // may be called asynchronously to not pause the calling thread while waiting + // if isWait == true, all the functions in the queue are run, otherwise the queue is cleared without running the functions + void stop(bool isWait = false) { + if (!isWait) { + if (this->isStop) + return; + this->isStop = true; + for (int i = 0, n = this->size(); i < n; ++i) { + *this->flags[i] = true; // command the threads to stop + } + this->clear_queue(); // empty the queue + } + else { + if (this->isDone || this->isStop) + return; + this->isDone = true; // give the waiting threads a command to finish + } + { + std::unique_lock lock(this->mutex); + this->cv.notify_all(); // stop all waiting threads + } + for (int i = 0; i < static_cast(this->threads.size()); ++i) { // wait for the computing threads to finish + if (this->threads[i]->joinable()) + this->threads[i]->join(); + } + // if there were no threads in the pool but some functors in the queue, the functors are not deleted by the threads + // therefore delete them here + this->clear_queue(); + this->threads.clear(); + this->flags.clear(); + } + + template + auto push(F && f, Rest&&... rest) ->std::future { + auto pck = std::make_shared>( + std::bind(std::forward(f), std::placeholders::_1, std::forward(rest)...) + ); + auto _f = new std::function([pck](int id) { + (*pck)(id); + }); + this->q.push(_f); + std::unique_lock lock(this->mutex); + this->cv.notify_one(); + return pck->get_future(); + } + + // run the user's function that excepts argument int - id of the running thread. returned value is templatized + // operator returns std::future, where the user can get the result and rethrow the catched exceptins + template + auto push(F && f) ->std::future { + auto pck = std::make_shared>(std::forward(f)); + auto _f = new std::function([pck](int id) { + (*pck)(id); + }); + this->q.push(_f); + std::unique_lock lock(this->mutex); + this->cv.notify_one(); + return pck->get_future(); + } + + + private: + + // deleted + thread_pool(const thread_pool &);// = delete; + thread_pool(thread_pool &&);// = delete; + thread_pool & operator=(const thread_pool &);// = delete; + thread_pool & operator=(thread_pool &&);// = delete; + + void set_thread(int i) { + std::shared_ptr> flag(this->flags[i]); // a copy of the shared ptr to the flag + auto f = [this, i, flag/* a copy of the shared ptr to the flag */]() { + std::atomic & _flag = *flag; + std::function * _f; + bool isPop = this->q.pop(_f); + while (true) { + while (isPop) { // if there is anything in the queue + std::unique_ptr> func(_f); // at return, delete the function even if an exception occurred + (*_f)(i); + if (_flag) + return; // the thread is wanted to stop, return even if the queue is not empty yet + else + isPop = this->q.pop(_f); + } + // the queue is empty here, wait for the next command + std::unique_lock lock(this->mutex); + ++this->nWaiting; + this->cv.wait(lock, [this, &_f, &isPop, &_flag](){ isPop = this->q.pop(_f); return isPop || this->isDone || _flag; }); + --this->nWaiting; + if (!isPop) + return; // if the queue is empty and this->isDone == true or *flag then return + } + }; + this->threads[i].reset(new std::thread(f)); // compiler may not support std::make_unique() + } + + void init() { this->nWaiting = 0; this->isStop = false; this->isDone = false; } + + std::vector> threads; + std::vector>> flags; + detail::Queue *> q; + std::atomic isDone; + std::atomic isStop; + std::atomic nWaiting; // how many threads are waiting + + std::mutex mutex; + std::condition_variable cv; + }; + +} + +#endif // __ctpl_stl_thread_pool_H__ \ No newline at end of file diff --git a/ZAPDTR/ZAPD/yaz0/readwrite.h b/ZAPDTR/ZAPD/yaz0/readwrite.h new file mode 100644 index 000000000..af3471590 --- /dev/null +++ b/ZAPDTR/ZAPD/yaz0/readwrite.h @@ -0,0 +1,29 @@ +#ifndef __READWRITE_H__ +#define __READWRITE_H__ + +#include + +/* variables */ +union { + uint32_t u; + float f; +} __u32_f32_union__; + +#define U32(x) \ + ((uint32_t)((((uint8_t*)(x))[0] << 24) | (((uint8_t*)(x))[1] << 16) | \ + (((uint8_t*)(x))[2] << 8) | ((uint8_t*)(x))[3])) +#define U16(x) ((uint16_t)(((*((uint8_t*)(x))) << 8) | ((uint8_t*)(x))[1])) +#define U8(x) ((uint8_t)((uint8_t*)(x))[0]) +#define S32(x) ((int32_t)(U32(x))) +#define S16(x) ((int16_t)(U16(x))) +#define F32(x) (((__u32_f32_union__.u = U32(x)) & 0) + __u32_f32_union__.f) + +#define W32(x, v) \ + { \ + *((uint8_t*)x + 3) = ((v)&0xFF); \ + *((uint8_t*)x + 2) = (((v) >> 8) & 0xFF); \ + *((uint8_t*)x + 1) = (((v) >> 16) & 0xFF); \ + *((uint8_t*)x + 0) = (((v) >> 24) & 0xFF); \ + } + +#endif \ No newline at end of file diff --git a/ZAPDTR/ZAPD/yaz0/yaz0.cpp b/ZAPDTR/ZAPD/yaz0/yaz0.cpp new file mode 100644 index 000000000..885f41d1d --- /dev/null +++ b/ZAPDTR/ZAPD/yaz0/yaz0.cpp @@ -0,0 +1,227 @@ +#include +#include +#include +#include +#include +#include "readwrite.h" + +#include "yaz0.h" + +typedef uint8_t u8; +typedef uint16_t u16; +typedef uint32_t u32; + +/* internal declarations */ +int yaz0_encode_internal(const u8* src, int srcSize, u8* Data); + +int yaz0_get_size(u8* src) { return U32(src + 0x4); } + +u32 toDWORD(u32 d) { + u8 w1 = d & 0xFF; + u8 w2 = (d >> 8) & 0xFF; + u8 w3 = (d >> 16) & 0xFF; + u8 w4 = d >> 24; + return (w1 << 24) | (w2 << 16) | (w3 << 8) | w4; +} + +// simple and straight encoding scheme for Yaz0 +u32 longest_match_brute(const u8* src, int size, int pos, u32* pMatchPos) { + int startPos = pos - 0x1000; + int max_match_size = size - pos; + u32 best_match_size = 0; + u32 best_match_pos = 0; + + if (max_match_size < 3) return 0; + + if (startPos < 0) startPos = 0; + + if (max_match_size > 0x111) max_match_size = 0x111; + + for (int i = startPos; i < pos; i++) { + int current_size; + for (current_size = 0; current_size < max_match_size; current_size++) { + if (src[i + current_size] != src[pos + current_size]) { + break; + } + } + if (current_size > best_match_size) { + best_match_size = current_size; + best_match_pos = i; + if (best_match_size == 0x111) break; + } + } + *pMatchPos = best_match_pos; + return best_match_size; +} + +u32 longest_match_rabinkarp(const u8* src, int size, int pos, u32* match_pos) { + int startPos = pos - 0x1000; + int max_match_size = size - pos; + u32 best_match_size = 0; + u32 best_match_pos = 0; + + if (max_match_size < 3) return 0; + + if (startPos < 0) startPos = 0; + + if (max_match_size > 0x111) max_match_size = 0x111; + + int find_hash = src[pos] << 16 | src[pos + 1] << 8 | src[pos + 2]; + int current_hash = src[startPos] << 16 | src[startPos + 1] << 8 | src[startPos + 2]; + + for (int i = startPos; i < pos; i++) { + if(current_hash == find_hash) { + int current_size; + for (current_size = 3; current_size < max_match_size; current_size++) { + if (src[i + current_size] != src[pos + current_size]) { + break; + } + } + if (current_size > best_match_size) { + best_match_size = current_size; + best_match_pos = i; + if (best_match_size == 0x111) break; + } + } + current_hash = (current_hash << 8 | src[i + 3]) & 0xFFFFFF; + } + *match_pos = best_match_pos; + + return best_match_size; +} + +int yaz0_encode_internal(const u8* src, int srcSize, u8* Data) { + int srcPos = 0; + + int bitmask = 0x80; + u8 currCodeByte = 0; + int currCodeBytePos = 0; + int pos = currCodeBytePos + 1; + + while (srcPos < srcSize) { + u32 numBytes; + u32 matchPos; + + numBytes = longest_match_rabinkarp(src, srcSize, srcPos, &matchPos); + //fprintf(stderr, "pos %x len %x pos %x\n", srcPos, (int)numBytes, (int)matchPos); + if (numBytes < 3) { + //fprintf(stderr, "single byte %02x\n", src[srcPos]); + Data[pos++] = src[srcPos++]; + currCodeByte |= bitmask; + } else { + // RLE part + u32 dist = srcPos - matchPos - 1; + + if (numBytes >= 0x12) // 3 byte encoding + { + Data[pos++] = dist >> 8; // 0R + Data[pos++] = dist & 0xFF; // FF + if (numBytes > 0xFF + 0x12) numBytes = 0xFF + 0x12; + Data[pos++] = numBytes - 0x12; + } else // 2 byte encoding + { + Data[pos++] = ((numBytes - 2) << 4) | (dist >> 8); + Data[pos++] = dist & 0xFF; + } + srcPos += numBytes; + } + bitmask >>= 1; + // write eight codes + if (!bitmask) { + Data[currCodeBytePos] = currCodeByte; + currCodeBytePos = pos++; + + currCodeByte = 0; + bitmask = 0x80; + } + } + if (bitmask) { + Data[currCodeBytePos] = currCodeByte; + } + + return pos; +} + +std::vector yaz0_encode_fast(const u8* src, int src_size) { + std::vector buffer; + std::vector> lut; + lut.resize(0x1000000); + + for (int i = 0; i < src_size - 3; ++i) { + lut[src[i + 0] << 16 | src[i + 1] << 8 | src[i + 2]].push_back(i); + } + + return buffer; +} + +std::vector yaz0_encode(const u8* src, int src_size) { + std::vector buffer(src_size * 10 / 8 + 16); + u8* dst = buffer.data(); + + // write 4 bytes yaz0 header + memcpy(dst, "Yaz0", 4); + + // write 4 bytes uncompressed size + W32(dst + 4, src_size); + + // encode + int dst_size = yaz0_encode_internal(src, src_size, dst + 16); + int aligned_size = (dst_size + 31) & -16; + buffer.resize(aligned_size); + +#if 0 + std::vector decompressed(src_size); + yaz0_decode(buffer.data(), decompressed.data(), src_size); + if(memcmp(src, decompressed.data(), src_size)) { + fprintf(stderr, "Decompressed buffer is different from original\n"); + } +#endif + + return buffer; +} + +void yaz0_decode(const uint8_t* source, uint8_t* decomp, int32_t decompSize) { + uint32_t srcPlace = 0, dstPlace = 0; + uint32_t i, dist, copyPlace, numBytes; + uint8_t codeByte, byte1, byte2; + uint8_t bitCount = 0; + + source += 0x10; + while (dstPlace < decompSize) { + /* If there are no more bits to test, get a new byte */ + if (!bitCount) { + codeByte = source[srcPlace++]; + bitCount = 8; + } + + /* If bit 7 is a 1, just copy 1 byte from source to destination */ + /* Else do some decoding */ + if (codeByte & 0x80) { + decomp[dstPlace++] = source[srcPlace++]; + } else { + /* Get 2 bytes from source */ + byte1 = source[srcPlace++]; + byte2 = source[srcPlace++]; + + /* Calculate distance to move in destination */ + /* And the number of bytes to copy */ + dist = ((byte1 & 0xF) << 8) | byte2; + copyPlace = dstPlace - (dist + 1); + numBytes = byte1 >> 4; + + /* Do more calculations on the number of bytes to copy */ + if (!numBytes) + numBytes = source[srcPlace++] + 0x12; + else + numBytes += 2; + + /* Copy data from a previous point in destination */ + /* to current point in destination */ + for (i = 0; i < numBytes; i++) decomp[dstPlace++] = decomp[copyPlace++]; + } + + /* Set up for the next read cycle */ + codeByte = codeByte << 1; + bitCount--; + } +} \ No newline at end of file diff --git a/ZAPDTR/ZAPD/yaz0/yaz0.h b/ZAPDTR/ZAPD/yaz0/yaz0.h new file mode 100644 index 000000000..0d5cc3cfd --- /dev/null +++ b/ZAPDTR/ZAPD/yaz0/yaz0.h @@ -0,0 +1,6 @@ +#pragma once + +#include + +void yaz0_decode(const uint8_t* src, uint8_t* dest, int32_t destsize); +std::vector yaz0_encode(const uint8_t* src, int src_size); \ No newline at end of file diff --git a/ZAPDTR/ZAPDUtils/ZAPDUtils.vcxproj b/ZAPDTR/ZAPDUtils/ZAPDUtils.vcxproj index dd49779dc..b74fe75f9 100644 --- a/ZAPDTR/ZAPDUtils/ZAPDUtils.vcxproj +++ b/ZAPDTR/ZAPDUtils/ZAPDUtils.vcxproj @@ -72,15 +72,27 @@ true + MinimumRecommendedRules.ruleset + + false + MinimumRecommendedRules.ruleset + + true + MinimumRecommendedRules.ruleset + + false + MinimumRecommendedRules.ruleset + + @@ -174,6 +186,12 @@ + + + {02d10590-9542-3f55-aaf8-6055677e2a2a} + false + + diff --git a/ZAPDTR/ZAPDUtils/ZAPDUtils.vcxproj.filters b/ZAPDTR/ZAPDUtils/ZAPDUtils.vcxproj.filters index 218084e6d..3c46d19fe 100644 --- a/ZAPDTR/ZAPDUtils/ZAPDUtils.vcxproj.filters +++ b/ZAPDTR/ZAPDUtils/ZAPDUtils.vcxproj.filters @@ -12,14 +12,14 @@ {d8c2c1e7-b065-4b0f-86a2-46ab46eedc0b} - + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx - + {e047919d-7186-49ca-b115-e48fbb5c8743} - + {3de9dd46-0dfd-4d48-9f20-9f24e5b80fe0} @@ -69,19 +69,19 @@ - Header Files\Source Files\Utils + Source Files\Utils - Header Files\Source Files\Utils + Source Files\Utils - Header Files\Source Files\Utils + Source Files\Utils - Header Files\Source Files\Libraries + Source Files\Libraries - Header Files\Source Files\Utils + Source Files\Utils \ No newline at end of file diff --git a/ZAPDTR/lib/libgfxd/priv.h b/ZAPDTR/lib/libgfxd/priv.h index 37cb66b68..34d96f675 100644 --- a/ZAPDTR/lib/libgfxd/priv.h +++ b/ZAPDTR/lib/libgfxd/priv.h @@ -2,6 +2,8 @@ #define GFXD_PRIV_H #include "gfxd.h" +#define CONFIG_MT + #ifdef CONFIG_MT # ifdef _MSC_VER # define TLOCAL __declspec(thread) @@ -9,7 +11,7 @@ # define TLOCAL _Thread_local # endif #else -# define TLOCAL +#define TLOCAL #endif #define UCFUNC static inline diff --git a/libultraship/libultraship/GameVersions.h b/libultraship/libultraship/GameVersions.h new file mode 100644 index 000000000..a25463bf4 --- /dev/null +++ b/libultraship/libultraship/GameVersions.h @@ -0,0 +1,20 @@ +#pragma once + +#define OOT_NTSC_10 0xEC7011B7 +#define OOT_NTSC_11 0xD43DA81F +#define OOT_NTSC_12 0x693BA2AE +#define OOT_PAL_10 0xB044B569 +#define OOT_PAL_11 0xB2055FBD +#define OOT_NTSC_JP_GC_CE 0xF7F52DB8 +#define OOT_NTSC_JP_GC 0xF611F4BA +#define OOT_NTSC_US_GC 0xF3DD35BA +#define OOT_PAL_GC 0x09465AC3 +#define OOT_NTSC_JP_MQ 0xF43B45BA +#define OOT_NTSC_US_MQ 0xF034001A +#define OOT_PAL_MQ 0x1D4136F3 +#define OOT_PAL_GC_DBG1 0x871E1C92 // 03-21-2002 build +#define OOT_PAL_GC_DBG2 0x87121EFE // 03-13-2002 build +#define OOT_PAL_GC_MQ_DBG 0x917D18F6 +#define OOT_IQUE_TW 0x3D81FB3E +#define OOT_IQUE_CN 0xB1E1E07B +#define OOT_UNKNOWN 0xFFFFFFFF \ No newline at end of file diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp index 3f7bd7f9b..5739774ee 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp @@ -2381,12 +2381,14 @@ static void gfx_run_dl(Gfx* cmd) { cmd++; uint64_t hash = ((uint64_t)cmd->words.w0 << 32) + (uint64_t)cmd->words.w1; ResourceMgr_GetNameByCRC(hash, fileName); + + +#if _DEBUG && 0 char* tex = ResourceMgr_LoadTexByCRC(hash); - - -#if _DEBUG - //ResourceMgr_GetNameByCRC(hash, fileName); - //printf("G_SETTIMG_OTR: %s, %08X\n", fileName, hash); + ResourceMgr_GetNameByCRC(hash, fileName); + printf("G_SETTIMG_OTR: %s, %08X\n", fileName, hash); +#else + char* tex = NULL; #endif if (addr != NULL) diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_pc.h b/libultraship/libultraship/Lib/Fast3D/gfx_pc.h index 2e6a5a2a0..b3b8d9082 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_pc.h +++ b/libultraship/libultraship/Lib/Fast3D/gfx_pc.h @@ -21,7 +21,7 @@ struct TextureCacheKey { uint8_t palette_index; bool operator==(const TextureCacheKey&) const noexcept = default; - + struct Hasher { size_t operator()(const TextureCacheKey& key) const noexcept { uintptr_t addr = (uintptr_t)key.texture_addr; diff --git a/libultraship/libultraship/ResourceMgr.cpp b/libultraship/libultraship/ResourceMgr.cpp index 6c8b1a10c..e6f3c8a0a 100644 --- a/libultraship/libultraship/ResourceMgr.cpp +++ b/libultraship/libultraship/ResourceMgr.cpp @@ -3,6 +3,7 @@ #include "spdlog/spdlog.h" #include "File.h" #include "Archive.h" +#include "GameVersions.h" #include #include "Lib/StormLib/StormLib.h" @@ -11,6 +12,8 @@ namespace Ship { ResourceMgr::ResourceMgr(std::shared_ptr Context, std::string MainPath, std::string PatchesPath) : Context(Context), bIsRunning(false), FileLoadThread(nullptr) { OTR = std::make_shared(MainPath, PatchesPath, false); + gameVersion = OOT_UNKNOWN; + if (OTR->IsMainMPQValid()) Start(); } @@ -86,7 +89,10 @@ namespace Ship { OTR->LoadFile(ToLoad->path, true, ToLoad); //Lock.lock(); - FileCache[ToLoad->path] = ToLoad->bIsLoaded && !ToLoad->bHasLoadError ? ToLoad : nullptr; + + if (!ToLoad->bHasLoadError) + FileCache[ToLoad->path] = ToLoad->bIsLoaded && !ToLoad->bHasLoadError ? ToLoad : nullptr; + //Lock.unlock(); SPDLOG_DEBUG("Loaded File {} on ResourceMgr thread", ToLoad->path); @@ -124,44 +130,62 @@ namespace Ship { } } - auto UnmanagedRes = ResourceLoader::LoadResource(ToLoad->File); - - if (UnmanagedRes != nullptr) + if (!ToLoad->File->bHasLoadError) { - UnmanagedRes->resMgr = this; - auto Res = std::shared_ptr(UnmanagedRes); + auto UnmanagedRes = ResourceLoader::LoadResource(ToLoad->File); - if (Res != nullptr) { - std::unique_lock Lock(ToLoad->ResourceLoadMutex); + if (UnmanagedRes != nullptr) + { + UnmanagedRes->resMgr = this; + auto Res = std::shared_ptr(UnmanagedRes); - ToLoad->bHasResourceLoaded = true; - ToLoad->Resource = Res; - ResourceCache[Res->file->path] = Res; + if (Res != nullptr) { + std::unique_lock Lock(ToLoad->ResourceLoadMutex); - SPDLOG_DEBUG("Loaded Resource {} on ResourceMgr thread", ToLoad->File->path); + ToLoad->bHasResourceLoaded = true; + ToLoad->Resource = Res; + ResourceCache[Res->file->path] = Res; - // Disabled for now because it can cause random crashes - //FileCache[Res->File->path] = nullptr; - //FileCache.erase(FileCache.find(Res->File->path)); - Res->file = nullptr; + SPDLOG_DEBUG("Loaded Resource {} on ResourceMgr thread", ToLoad->File->path); + + // Disabled for now because it can cause random crashes + //FileCache[Res->File->path] = nullptr; + //FileCache.erase(FileCache.find(Res->File->path)); + Res->file = nullptr; + } + else { + ToLoad->bHasResourceLoaded = false; + ToLoad->Resource = nullptr; + + SPDLOG_ERROR("Resource load FAILED {} on ResourceMgr thread", ToLoad->File->path); + } + + //ResLock.lock(); + //ResLock.unlock(); } - else { - ToLoad->bHasResourceLoaded = false; - ToLoad->Resource = nullptr; - - SPDLOG_ERROR("Resource load FAILED {} on ResourceMgr thread", ToLoad->File->path); - } - - //ResLock.lock(); - //ResLock.unlock(); - - ToLoad->ResourceLoadNotifier.notify_all(); } + else + { + ToLoad->bHasResourceLoaded = false; + ToLoad->Resource = nullptr; + } + + ToLoad->ResourceLoadNotifier.notify_all(); } SPDLOG_INFO("Resource Manager LoadResourceThread ended"); } + uint32_t ResourceMgr::GetGameVersion() + { + return gameVersion; + } + + void ResourceMgr::SetGameVersion(uint32_t newGameVersion) + { + gameVersion = newGameVersion; + } + std::shared_ptr ResourceMgr::LoadFileAsync(std::string FilePath) { const std::lock_guard Lock(FileLoadMutex); // File NOT already loaded...? @@ -232,9 +256,16 @@ namespace Ship { std::shared_ptr FileData = LoadFile(FilePath); Promise->File = FileData; - Promise->bHasResourceLoaded = false; - ResourceLoadQueue.push(Promise); - ResourceLoadNotifier.notify_all(); + if (Promise->File->bHasLoadError) + { + Promise->bHasResourceLoaded = true; + } + else + { + Promise->bHasResourceLoaded = false; + ResourceLoadQueue.push(Promise); + ResourceLoadNotifier.notify_all(); + } } else { Promise->bHasResourceLoaded = true; Promise->Resource = resCacheFind->second; diff --git a/libultraship/libultraship/ResourceMgr.h b/libultraship/libultraship/ResourceMgr.h index 86e0cc268..5eae61abe 100644 --- a/libultraship/libultraship/ResourceMgr.h +++ b/libultraship/libultraship/ResourceMgr.h @@ -29,6 +29,8 @@ namespace Ship void InvalidateResourceCache(); + uint32_t GetGameVersion(); + void SetGameVersion(uint32_t newGameVersion); std::shared_ptr LoadFileAsync(std::string FilePath); std::shared_ptr LoadFile(std::string FilePath); std::shared_ptr GetCachedFile(std::string FilePath); @@ -58,5 +60,6 @@ namespace Ship std::condition_variable FileLoadNotifier; std::condition_variable ResourceLoadNotifier; volatile bool bIsRunning; + uint32_t gameVersion; }; } \ No newline at end of file diff --git a/libultraship/libultraship/libultraship.vcxproj b/libultraship/libultraship/libultraship.vcxproj index 8443b6b11..3bf81a67d 100644 --- a/libultraship/libultraship/libultraship.vcxproj +++ b/libultraship/libultraship/libultraship.vcxproj @@ -101,31 +101,49 @@ true $(ProjectDir)..\..\ZAPDTR\ZAPDUtils;$(ProjectDir)Lib\Fast3D\U64;$(ProjectDir)Lib\libjpeg\include;$(ProjectDir)Lib\spdlog\include;$(ProjectDir)Lib\SDL;$(ProjectDir)Lib\GLEW;$(IncludePath) $(ProjectDir)Lib\SDL\lib\x86;$(LibraryPath) + MinimumRecommendedRules.ruleset + + true $(ProjectDir)..\..\ZAPDTR\ZAPDUtils;$(ProjectDir)Lib\Fast3D\U64;$(ProjectDir)Lib\libjpeg\include;$(ProjectDir)Lib\spdlog\include;$(ProjectDir)Lib\SDL;$(ProjectDir)Lib\GLEW;$(IncludePath) $(ProjectDir)Lib\SDL\lib\x86;$(LibraryPath) + MinimumRecommendedRules.ruleset + + false $(ProjectDir)..\..\ZAPDTR\ZAPDUtils;$(ProjectDir)Lib\Fast3D\U64;$(ProjectDir)Lib\spdlog\include;$(ProjectDir)Lib\SDL;$(ProjectDir)Lib\GLEW;$(IncludePath) $(ProjectDir)Lib\SDL\lib\x86;$(LibraryPath) + MinimumRecommendedRules.ruleset + + true $(ProjectDir)..\..\ZAPDTR\ZAPDUtils;$(ProjectDir)Lib\Fast3D\U64;$(ProjectDir)Lib\spdlog\include;$(ProjectDir)Lib\SDL;$(ProjectDir)Lib\GLEW;$(IncludePath) $(ProjectDir)Lib\SDL\lib\x64;$(LibraryPath) + MinimumRecommendedRules.ruleset + + true $(ProjectDir)..\..\ZAPDTR\ZAPDUtils;$(ProjectDir)Lib\Fast3D\U64;$(ProjectDir)Lib\spdlog\include;$(ProjectDir)Lib\SDL;$(ProjectDir)Lib\GLEW;$(IncludePath) $(ProjectDir)Lib\SDL\lib\x64;$(LibraryPath) + MinimumRecommendedRules.ruleset + + false $(ProjectDir)..\..\ZAPDTR\ZAPDUtils;$(ProjectDir)Lib\Fast3D\U64;$(ProjectDir)Lib\spdlog\include;$(ProjectDir)Lib\SDL;$(ProjectDir)Lib\GLEW;$(IncludePath) $(ProjectDir)Lib\SDL\lib\x64;$(LibraryPath) + MinimumRecommendedRules.ruleset + + @@ -326,6 +344,7 @@ + @@ -416,6 +435,12 @@ + + + {02d10590-9542-3f55-aaf8-6055677e2a2a} + false + + diff --git a/libultraship/libultraship/libultraship.vcxproj.filters b/libultraship/libultraship/libultraship.vcxproj.filters index deed867c8..5079d826e 100644 --- a/libultraship/libultraship/libultraship.vcxproj.filters +++ b/libultraship/libultraship/libultraship.vcxproj.filters @@ -626,5 +626,8 @@ Source Files\CustomImpl + + Source Files\Resources + \ No newline at end of file diff --git a/soh/assets/xml/code/fbdemo_circle.xml b/soh/assets/xml/GC_NMQ_D/code/fbdemo_circle.xml similarity index 100% rename from soh/assets/xml/code/fbdemo_circle.xml rename to soh/assets/xml/GC_NMQ_D/code/fbdemo_circle.xml diff --git a/soh/assets/xml/code/fbdemo_triforce.xml b/soh/assets/xml/GC_NMQ_D/code/fbdemo_triforce.xml similarity index 100% rename from soh/assets/xml/code/fbdemo_triforce.xml rename to soh/assets/xml/GC_NMQ_D/code/fbdemo_triforce.xml diff --git a/soh/assets/xml/code/fbdemo_wipe1.xml b/soh/assets/xml/GC_NMQ_D/code/fbdemo_wipe1.xml similarity index 100% rename from soh/assets/xml/code/fbdemo_wipe1.xml rename to soh/assets/xml/GC_NMQ_D/code/fbdemo_wipe1.xml diff --git a/soh/assets/xml/misc/link_animetion.xml b/soh/assets/xml/GC_NMQ_D/misc/link_animetion.xml similarity index 100% rename from soh/assets/xml/misc/link_animetion.xml rename to soh/assets/xml/GC_NMQ_D/misc/link_animetion.xml diff --git a/soh/assets/xml/objects/gameplay_dangeon_keep.xml b/soh/assets/xml/GC_NMQ_D/objects/gameplay_dangeon_keep.xml similarity index 100% rename from soh/assets/xml/objects/gameplay_dangeon_keep.xml rename to soh/assets/xml/GC_NMQ_D/objects/gameplay_dangeon_keep.xml diff --git a/soh/assets/xml/objects/gameplay_field_keep.xml b/soh/assets/xml/GC_NMQ_D/objects/gameplay_field_keep.xml similarity index 100% rename from soh/assets/xml/objects/gameplay_field_keep.xml rename to soh/assets/xml/GC_NMQ_D/objects/gameplay_field_keep.xml diff --git a/soh/assets/xml/objects/gameplay_keep.xml b/soh/assets/xml/GC_NMQ_D/objects/gameplay_keep.xml similarity index 100% rename from soh/assets/xml/objects/gameplay_keep.xml rename to soh/assets/xml/GC_NMQ_D/objects/gameplay_keep.xml diff --git a/soh/assets/xml/objects/object_Bb.xml b/soh/assets/xml/GC_NMQ_D/objects/object_Bb.xml similarity index 100% rename from soh/assets/xml/objects/object_Bb.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_Bb.xml diff --git a/soh/assets/xml/objects/object_ahg.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ahg.xml similarity index 100% rename from soh/assets/xml/objects/object_ahg.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ahg.xml diff --git a/soh/assets/xml/objects/object_am.xml b/soh/assets/xml/GC_NMQ_D/objects/object_am.xml similarity index 100% rename from soh/assets/xml/objects/object_am.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_am.xml diff --git a/soh/assets/xml/objects/object_ane.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ane.xml similarity index 100% rename from soh/assets/xml/objects/object_ane.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ane.xml diff --git a/soh/assets/xml/objects/object_ani.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ani.xml similarity index 100% rename from soh/assets/xml/objects/object_ani.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ani.xml diff --git a/soh/assets/xml/objects/object_anubice.xml b/soh/assets/xml/GC_NMQ_D/objects/object_anubice.xml similarity index 100% rename from soh/assets/xml/objects/object_anubice.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_anubice.xml diff --git a/soh/assets/xml/objects/object_aob.xml b/soh/assets/xml/GC_NMQ_D/objects/object_aob.xml similarity index 100% rename from soh/assets/xml/objects/object_aob.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_aob.xml diff --git a/soh/assets/xml/objects/object_b_heart.xml b/soh/assets/xml/GC_NMQ_D/objects/object_b_heart.xml similarity index 100% rename from soh/assets/xml/objects/object_b_heart.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_b_heart.xml diff --git a/soh/assets/xml/objects/object_bba.xml b/soh/assets/xml/GC_NMQ_D/objects/object_bba.xml similarity index 100% rename from soh/assets/xml/objects/object_bba.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_bba.xml diff --git a/soh/assets/xml/objects/object_bdan_objects.xml b/soh/assets/xml/GC_NMQ_D/objects/object_bdan_objects.xml similarity index 100% rename from soh/assets/xml/objects/object_bdan_objects.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_bdan_objects.xml diff --git a/soh/assets/xml/objects/object_bdoor.xml b/soh/assets/xml/GC_NMQ_D/objects/object_bdoor.xml similarity index 100% rename from soh/assets/xml/objects/object_bdoor.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_bdoor.xml diff --git a/soh/assets/xml/objects/object_bg.xml b/soh/assets/xml/GC_NMQ_D/objects/object_bg.xml similarity index 100% rename from soh/assets/xml/objects/object_bg.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_bg.xml diff --git a/soh/assets/xml/objects/object_bigokuta.xml b/soh/assets/xml/GC_NMQ_D/objects/object_bigokuta.xml similarity index 100% rename from soh/assets/xml/objects/object_bigokuta.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_bigokuta.xml diff --git a/soh/assets/xml/objects/object_bird.xml b/soh/assets/xml/GC_NMQ_D/objects/object_bird.xml similarity index 100% rename from soh/assets/xml/objects/object_bird.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_bird.xml diff --git a/soh/assets/xml/objects/object_bji.xml b/soh/assets/xml/GC_NMQ_D/objects/object_bji.xml similarity index 100% rename from soh/assets/xml/objects/object_bji.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_bji.xml diff --git a/soh/assets/xml/objects/object_bl.xml b/soh/assets/xml/GC_NMQ_D/objects/object_bl.xml similarity index 100% rename from soh/assets/xml/objects/object_bl.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_bl.xml diff --git a/soh/assets/xml/objects/object_blkobj.xml b/soh/assets/xml/GC_NMQ_D/objects/object_blkobj.xml similarity index 100% rename from soh/assets/xml/objects/object_blkobj.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_blkobj.xml diff --git a/soh/assets/xml/objects/object_bob.xml b/soh/assets/xml/GC_NMQ_D/objects/object_bob.xml similarity index 100% rename from soh/assets/xml/objects/object_bob.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_bob.xml diff --git a/soh/assets/xml/objects/object_boj.xml b/soh/assets/xml/GC_NMQ_D/objects/object_boj.xml similarity index 100% rename from soh/assets/xml/objects/object_boj.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_boj.xml diff --git a/soh/assets/xml/objects/object_bombf.xml b/soh/assets/xml/GC_NMQ_D/objects/object_bombf.xml similarity index 100% rename from soh/assets/xml/objects/object_bombf.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_bombf.xml diff --git a/soh/assets/xml/objects/object_bombiwa.xml b/soh/assets/xml/GC_NMQ_D/objects/object_bombiwa.xml similarity index 100% rename from soh/assets/xml/objects/object_bombiwa.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_bombiwa.xml diff --git a/soh/assets/xml/objects/object_bowl.xml b/soh/assets/xml/GC_NMQ_D/objects/object_bowl.xml similarity index 100% rename from soh/assets/xml/objects/object_bowl.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_bowl.xml diff --git a/soh/assets/xml/objects/object_box.xml b/soh/assets/xml/GC_NMQ_D/objects/object_box.xml similarity index 100% rename from soh/assets/xml/objects/object_box.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_box.xml diff --git a/soh/assets/xml/objects/object_brob.xml b/soh/assets/xml/GC_NMQ_D/objects/object_brob.xml similarity index 100% rename from soh/assets/xml/objects/object_brob.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_brob.xml diff --git a/soh/assets/xml/objects/object_bubble.xml b/soh/assets/xml/GC_NMQ_D/objects/object_bubble.xml similarity index 100% rename from soh/assets/xml/objects/object_bubble.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_bubble.xml diff --git a/soh/assets/xml/objects/object_bv.xml b/soh/assets/xml/GC_NMQ_D/objects/object_bv.xml similarity index 100% rename from soh/assets/xml/objects/object_bv.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_bv.xml diff --git a/soh/assets/xml/objects/object_bw.xml b/soh/assets/xml/GC_NMQ_D/objects/object_bw.xml similarity index 100% rename from soh/assets/xml/objects/object_bw.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_bw.xml diff --git a/soh/assets/xml/objects/object_bwall.xml b/soh/assets/xml/GC_NMQ_D/objects/object_bwall.xml similarity index 100% rename from soh/assets/xml/objects/object_bwall.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_bwall.xml diff --git a/soh/assets/xml/objects/object_bxa.xml b/soh/assets/xml/GC_NMQ_D/objects/object_bxa.xml similarity index 100% rename from soh/assets/xml/objects/object_bxa.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_bxa.xml diff --git a/soh/assets/xml/objects/object_cne.xml b/soh/assets/xml/GC_NMQ_D/objects/object_cne.xml similarity index 100% rename from soh/assets/xml/objects/object_cne.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_cne.xml diff --git a/soh/assets/xml/objects/object_cob.xml b/soh/assets/xml/GC_NMQ_D/objects/object_cob.xml similarity index 100% rename from soh/assets/xml/objects/object_cob.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_cob.xml diff --git a/soh/assets/xml/objects/object_cow.xml b/soh/assets/xml/GC_NMQ_D/objects/object_cow.xml similarity index 100% rename from soh/assets/xml/objects/object_cow.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_cow.xml diff --git a/soh/assets/xml/objects/object_crow.xml b/soh/assets/xml/GC_NMQ_D/objects/object_crow.xml similarity index 100% rename from soh/assets/xml/objects/object_crow.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_crow.xml diff --git a/soh/assets/xml/objects/object_cs.xml b/soh/assets/xml/GC_NMQ_D/objects/object_cs.xml similarity index 100% rename from soh/assets/xml/objects/object_cs.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_cs.xml diff --git a/soh/assets/xml/objects/object_d_elevator.xml b/soh/assets/xml/GC_NMQ_D/objects/object_d_elevator.xml similarity index 100% rename from soh/assets/xml/objects/object_d_elevator.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_d_elevator.xml diff --git a/soh/assets/xml/objects/object_d_hsblock.xml b/soh/assets/xml/GC_NMQ_D/objects/object_d_hsblock.xml similarity index 100% rename from soh/assets/xml/objects/object_d_hsblock.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_d_hsblock.xml diff --git a/soh/assets/xml/objects/object_d_lift.xml b/soh/assets/xml/GC_NMQ_D/objects/object_d_lift.xml similarity index 100% rename from soh/assets/xml/objects/object_d_lift.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_d_lift.xml diff --git a/soh/assets/xml/objects/object_daiku.xml b/soh/assets/xml/GC_NMQ_D/objects/object_daiku.xml similarity index 100% rename from soh/assets/xml/objects/object_daiku.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_daiku.xml diff --git a/soh/assets/xml/objects/object_ddan_objects.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ddan_objects.xml similarity index 100% rename from soh/assets/xml/objects/object_ddan_objects.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ddan_objects.xml diff --git a/soh/assets/xml/objects/object_dekubaba.xml b/soh/assets/xml/GC_NMQ_D/objects/object_dekubaba.xml similarity index 100% rename from soh/assets/xml/objects/object_dekubaba.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_dekubaba.xml diff --git a/soh/assets/xml/objects/object_dekujr.xml b/soh/assets/xml/GC_NMQ_D/objects/object_dekujr.xml similarity index 100% rename from soh/assets/xml/objects/object_dekujr.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_dekujr.xml diff --git a/soh/assets/xml/objects/object_dekunuts.xml b/soh/assets/xml/GC_NMQ_D/objects/object_dekunuts.xml similarity index 100% rename from soh/assets/xml/objects/object_dekunuts.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_dekunuts.xml diff --git a/soh/assets/xml/objects/object_demo_6k.xml b/soh/assets/xml/GC_NMQ_D/objects/object_demo_6k.xml similarity index 100% rename from soh/assets/xml/objects/object_demo_6k.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_demo_6k.xml diff --git a/soh/assets/xml/objects/object_demo_kekkai.xml b/soh/assets/xml/GC_NMQ_D/objects/object_demo_kekkai.xml similarity index 100% rename from soh/assets/xml/objects/object_demo_kekkai.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_demo_kekkai.xml diff --git a/soh/assets/xml/objects/object_demo_tre_lgt.xml b/soh/assets/xml/GC_NMQ_D/objects/object_demo_tre_lgt.xml similarity index 100% rename from soh/assets/xml/objects/object_demo_tre_lgt.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_demo_tre_lgt.xml diff --git a/soh/assets/xml/objects/object_dh.xml b/soh/assets/xml/GC_NMQ_D/objects/object_dh.xml similarity index 100% rename from soh/assets/xml/objects/object_dh.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_dh.xml diff --git a/soh/assets/xml/objects/object_dnk.xml b/soh/assets/xml/GC_NMQ_D/objects/object_dnk.xml similarity index 100% rename from soh/assets/xml/objects/object_dnk.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_dnk.xml diff --git a/soh/assets/xml/objects/object_dns.xml b/soh/assets/xml/GC_NMQ_D/objects/object_dns.xml similarity index 100% rename from soh/assets/xml/objects/object_dns.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_dns.xml diff --git a/soh/assets/xml/objects/object_dodojr.xml b/soh/assets/xml/GC_NMQ_D/objects/object_dodojr.xml similarity index 100% rename from soh/assets/xml/objects/object_dodojr.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_dodojr.xml diff --git a/soh/assets/xml/objects/object_dodongo.xml b/soh/assets/xml/GC_NMQ_D/objects/object_dodongo.xml similarity index 100% rename from soh/assets/xml/objects/object_dodongo.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_dodongo.xml diff --git a/soh/assets/xml/objects/object_dog.xml b/soh/assets/xml/GC_NMQ_D/objects/object_dog.xml similarity index 100% rename from soh/assets/xml/objects/object_dog.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_dog.xml diff --git a/soh/assets/xml/objects/object_door_gerudo.xml b/soh/assets/xml/GC_NMQ_D/objects/object_door_gerudo.xml similarity index 100% rename from soh/assets/xml/objects/object_door_gerudo.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_door_gerudo.xml diff --git a/soh/assets/xml/objects/object_door_killer.xml b/soh/assets/xml/GC_NMQ_D/objects/object_door_killer.xml similarity index 100% rename from soh/assets/xml/objects/object_door_killer.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_door_killer.xml diff --git a/soh/assets/xml/objects/object_ds.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ds.xml similarity index 100% rename from soh/assets/xml/objects/object_ds.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ds.xml diff --git a/soh/assets/xml/objects/object_ds2.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ds2.xml similarity index 100% rename from soh/assets/xml/objects/object_ds2.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ds2.xml diff --git a/soh/assets/xml/objects/object_du.xml b/soh/assets/xml/GC_NMQ_D/objects/object_du.xml similarity index 100% rename from soh/assets/xml/objects/object_du.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_du.xml diff --git a/soh/assets/xml/objects/object_dy_obj.xml b/soh/assets/xml/GC_NMQ_D/objects/object_dy_obj.xml similarity index 100% rename from soh/assets/xml/objects/object_dy_obj.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_dy_obj.xml diff --git a/soh/assets/xml/objects/object_ec.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ec.xml similarity index 100% rename from soh/assets/xml/objects/object_ec.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ec.xml diff --git a/soh/assets/xml/objects/object_efc_crystal_light.xml b/soh/assets/xml/GC_NMQ_D/objects/object_efc_crystal_light.xml similarity index 100% rename from soh/assets/xml/objects/object_efc_crystal_light.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_efc_crystal_light.xml diff --git a/soh/assets/xml/objects/object_efc_doughnut.xml b/soh/assets/xml/GC_NMQ_D/objects/object_efc_doughnut.xml similarity index 100% rename from soh/assets/xml/objects/object_efc_doughnut.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_efc_doughnut.xml diff --git a/soh/assets/xml/objects/object_efc_erupc.xml b/soh/assets/xml/GC_NMQ_D/objects/object_efc_erupc.xml similarity index 100% rename from soh/assets/xml/objects/object_efc_erupc.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_efc_erupc.xml diff --git a/soh/assets/xml/objects/object_efc_fire_ball.xml b/soh/assets/xml/GC_NMQ_D/objects/object_efc_fire_ball.xml similarity index 100% rename from soh/assets/xml/objects/object_efc_fire_ball.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_efc_fire_ball.xml diff --git a/soh/assets/xml/objects/object_efc_flash.xml b/soh/assets/xml/GC_NMQ_D/objects/object_efc_flash.xml similarity index 100% rename from soh/assets/xml/objects/object_efc_flash.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_efc_flash.xml diff --git a/soh/assets/xml/objects/object_efc_lgt_shower.xml b/soh/assets/xml/GC_NMQ_D/objects/object_efc_lgt_shower.xml similarity index 100% rename from soh/assets/xml/objects/object_efc_lgt_shower.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_efc_lgt_shower.xml diff --git a/soh/assets/xml/objects/object_efc_star_field.xml b/soh/assets/xml/GC_NMQ_D/objects/object_efc_star_field.xml similarity index 100% rename from soh/assets/xml/objects/object_efc_star_field.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_efc_star_field.xml diff --git a/soh/assets/xml/objects/object_efc_tw.xml b/soh/assets/xml/GC_NMQ_D/objects/object_efc_tw.xml similarity index 100% rename from soh/assets/xml/objects/object_efc_tw.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_efc_tw.xml diff --git a/soh/assets/xml/objects/object_ei.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ei.xml similarity index 100% rename from soh/assets/xml/objects/object_ei.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ei.xml diff --git a/soh/assets/xml/objects/object_fa.xml b/soh/assets/xml/GC_NMQ_D/objects/object_fa.xml similarity index 100% rename from soh/assets/xml/objects/object_fa.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_fa.xml diff --git a/soh/assets/xml/objects/object_fd.xml b/soh/assets/xml/GC_NMQ_D/objects/object_fd.xml similarity index 100% rename from soh/assets/xml/objects/object_fd.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_fd.xml diff --git a/soh/assets/xml/objects/object_fd2.xml b/soh/assets/xml/GC_NMQ_D/objects/object_fd2.xml similarity index 100% rename from soh/assets/xml/objects/object_fd2.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_fd2.xml diff --git a/soh/assets/xml/objects/object_fhg.xml b/soh/assets/xml/GC_NMQ_D/objects/object_fhg.xml similarity index 100% rename from soh/assets/xml/objects/object_fhg.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_fhg.xml diff --git a/soh/assets/xml/objects/object_fire.xml b/soh/assets/xml/GC_NMQ_D/objects/object_fire.xml similarity index 100% rename from soh/assets/xml/objects/object_fire.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_fire.xml diff --git a/soh/assets/xml/objects/object_firefly.xml b/soh/assets/xml/GC_NMQ_D/objects/object_firefly.xml similarity index 100% rename from soh/assets/xml/objects/object_firefly.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_firefly.xml diff --git a/soh/assets/xml/objects/object_fish.xml b/soh/assets/xml/GC_NMQ_D/objects/object_fish.xml similarity index 100% rename from soh/assets/xml/objects/object_fish.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_fish.xml diff --git a/soh/assets/xml/objects/object_fr.xml b/soh/assets/xml/GC_NMQ_D/objects/object_fr.xml similarity index 100% rename from soh/assets/xml/objects/object_fr.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_fr.xml diff --git a/soh/assets/xml/objects/object_fu.xml b/soh/assets/xml/GC_NMQ_D/objects/object_fu.xml similarity index 100% rename from soh/assets/xml/objects/object_fu.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_fu.xml diff --git a/soh/assets/xml/objects/object_fw.xml b/soh/assets/xml/GC_NMQ_D/objects/object_fw.xml similarity index 100% rename from soh/assets/xml/objects/object_fw.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_fw.xml diff --git a/soh/assets/xml/objects/object_fz.xml b/soh/assets/xml/GC_NMQ_D/objects/object_fz.xml similarity index 100% rename from soh/assets/xml/objects/object_fz.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_fz.xml diff --git a/soh/assets/xml/objects/object_ganon.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ganon.xml similarity index 100% rename from soh/assets/xml/objects/object_ganon.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ganon.xml diff --git a/soh/assets/xml/objects/object_ganon2.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ganon2.xml similarity index 100% rename from soh/assets/xml/objects/object_ganon2.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ganon2.xml diff --git a/soh/assets/xml/objects/object_ganon_anime1.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ganon_anime1.xml similarity index 100% rename from soh/assets/xml/objects/object_ganon_anime1.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ganon_anime1.xml diff --git a/soh/assets/xml/objects/object_ganon_anime2.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ganon_anime2.xml similarity index 100% rename from soh/assets/xml/objects/object_ganon_anime2.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ganon_anime2.xml diff --git a/soh/assets/xml/objects/object_ganon_anime3.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ganon_anime3.xml similarity index 100% rename from soh/assets/xml/objects/object_ganon_anime3.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ganon_anime3.xml diff --git a/soh/assets/xml/objects/object_ganon_objects.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ganon_objects.xml similarity index 100% rename from soh/assets/xml/objects/object_ganon_objects.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ganon_objects.xml diff --git a/soh/assets/xml/objects/object_ge1.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ge1.xml similarity index 100% rename from soh/assets/xml/objects/object_ge1.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ge1.xml diff --git a/soh/assets/xml/objects/object_geff.xml b/soh/assets/xml/GC_NMQ_D/objects/object_geff.xml similarity index 100% rename from soh/assets/xml/objects/object_geff.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_geff.xml diff --git a/soh/assets/xml/objects/object_geldb.xml b/soh/assets/xml/GC_NMQ_D/objects/object_geldb.xml similarity index 100% rename from soh/assets/xml/objects/object_geldb.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_geldb.xml diff --git a/soh/assets/xml/objects/object_gi_arrow.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_arrow.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_arrow.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_arrow.xml diff --git a/soh/assets/xml/objects/object_gi_arrowcase.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_arrowcase.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_arrowcase.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_arrowcase.xml diff --git a/soh/assets/xml/objects/object_gi_bean.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_bean.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_bean.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_bean.xml diff --git a/soh/assets/xml/objects/object_gi_bomb_1.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_bomb_1.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_bomb_1.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_bomb_1.xml diff --git a/soh/assets/xml/objects/object_gi_bomb_2.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_bomb_2.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_bomb_2.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_bomb_2.xml diff --git a/soh/assets/xml/objects/object_gi_bombpouch.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_bombpouch.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_bombpouch.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_bombpouch.xml diff --git a/soh/assets/xml/objects/object_gi_boomerang.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_boomerang.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_boomerang.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_boomerang.xml diff --git a/soh/assets/xml/objects/object_gi_boots_2.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_boots_2.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_boots_2.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_boots_2.xml diff --git a/soh/assets/xml/objects/object_gi_bosskey.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_bosskey.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_bosskey.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_bosskey.xml diff --git a/soh/assets/xml/objects/object_gi_bottle.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_bottle.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_bottle.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_bottle.xml diff --git a/soh/assets/xml/objects/object_gi_bottle_letter.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_bottle_letter.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_bottle_letter.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_bottle_letter.xml diff --git a/soh/assets/xml/objects/object_gi_bow.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_bow.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_bow.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_bow.xml diff --git a/soh/assets/xml/objects/object_gi_bracelet.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_bracelet.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_bracelet.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_bracelet.xml diff --git a/soh/assets/xml/objects/object_gi_brokensword.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_brokensword.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_brokensword.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_brokensword.xml diff --git a/soh/assets/xml/objects/object_gi_butterfly.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_butterfly.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_butterfly.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_butterfly.xml diff --git a/soh/assets/xml/objects/object_gi_clothes.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_clothes.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_clothes.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_clothes.xml diff --git a/soh/assets/xml/objects/object_gi_coin.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_coin.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_coin.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_coin.xml diff --git a/soh/assets/xml/objects/object_gi_compass.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_compass.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_compass.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_compass.xml diff --git a/soh/assets/xml/objects/object_gi_dekupouch.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_dekupouch.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_dekupouch.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_dekupouch.xml diff --git a/soh/assets/xml/objects/object_gi_egg.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_egg.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_egg.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_egg.xml diff --git a/soh/assets/xml/objects/object_gi_eye_lotion.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_eye_lotion.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_eye_lotion.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_eye_lotion.xml diff --git a/soh/assets/xml/objects/object_gi_fire.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_fire.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_fire.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_fire.xml diff --git a/soh/assets/xml/objects/object_gi_fish.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_fish.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_fish.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_fish.xml diff --git a/soh/assets/xml/objects/object_gi_frog.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_frog.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_frog.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_frog.xml diff --git a/soh/assets/xml/objects/object_gi_gerudo.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_gerudo.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_gerudo.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_gerudo.xml diff --git a/soh/assets/xml/objects/object_gi_gerudomask.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_gerudomask.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_gerudomask.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_gerudomask.xml diff --git a/soh/assets/xml/objects/object_gi_ghost.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_ghost.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_ghost.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_ghost.xml diff --git a/soh/assets/xml/objects/object_gi_glasses.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_glasses.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_glasses.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_glasses.xml diff --git a/soh/assets/xml/objects/object_gi_gloves.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_gloves.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_gloves.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_gloves.xml diff --git a/soh/assets/xml/objects/object_gi_goddess.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_goddess.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_goddess.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_goddess.xml diff --git a/soh/assets/xml/objects/object_gi_golonmask.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_golonmask.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_golonmask.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_golonmask.xml diff --git a/soh/assets/xml/objects/object_gi_grass.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_grass.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_grass.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_grass.xml diff --git a/soh/assets/xml/objects/object_gi_hammer.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_hammer.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_hammer.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_hammer.xml diff --git a/soh/assets/xml/objects/object_gi_heart.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_heart.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_heart.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_heart.xml diff --git a/soh/assets/xml/objects/object_gi_hearts.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_hearts.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_hearts.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_hearts.xml diff --git a/soh/assets/xml/objects/object_gi_hookshot.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_hookshot.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_hookshot.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_hookshot.xml diff --git a/soh/assets/xml/objects/object_gi_hoverboots.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_hoverboots.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_hoverboots.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_hoverboots.xml diff --git a/soh/assets/xml/objects/object_gi_insect.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_insect.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_insect.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_insect.xml diff --git a/soh/assets/xml/objects/object_gi_jewel.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_jewel.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_jewel.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_jewel.xml diff --git a/soh/assets/xml/objects/object_gi_key.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_key.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_key.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_key.xml diff --git a/soh/assets/xml/objects/object_gi_ki_tan_mask.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_ki_tan_mask.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_ki_tan_mask.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_ki_tan_mask.xml diff --git a/soh/assets/xml/objects/object_gi_letter.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_letter.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_letter.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_letter.xml diff --git a/soh/assets/xml/objects/object_gi_liquid.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_liquid.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_liquid.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_liquid.xml diff --git a/soh/assets/xml/objects/object_gi_longsword.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_longsword.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_longsword.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_longsword.xml diff --git a/soh/assets/xml/objects/object_gi_m_arrow.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_m_arrow.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_m_arrow.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_m_arrow.xml diff --git a/soh/assets/xml/objects/object_gi_magicpot.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_magicpot.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_magicpot.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_magicpot.xml diff --git a/soh/assets/xml/objects/object_gi_map.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_map.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_map.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_map.xml diff --git a/soh/assets/xml/objects/object_gi_medal.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_medal.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_medal.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_medal.xml diff --git a/soh/assets/xml/objects/object_gi_melody.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_melody.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_melody.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_melody.xml diff --git a/soh/assets/xml/objects/object_gi_milk.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_milk.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_milk.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_milk.xml diff --git a/soh/assets/xml/objects/object_gi_mushroom.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_mushroom.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_mushroom.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_mushroom.xml diff --git a/soh/assets/xml/objects/object_gi_niwatori.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_niwatori.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_niwatori.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_niwatori.xml diff --git a/soh/assets/xml/objects/object_gi_nuts.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_nuts.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_nuts.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_nuts.xml diff --git a/soh/assets/xml/objects/object_gi_ocarina.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_ocarina.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_ocarina.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_ocarina.xml diff --git a/soh/assets/xml/objects/object_gi_ocarina_0.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_ocarina_0.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_ocarina_0.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_ocarina_0.xml diff --git a/soh/assets/xml/objects/object_gi_pachinko.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_pachinko.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_pachinko.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_pachinko.xml diff --git a/soh/assets/xml/objects/object_gi_powder.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_powder.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_powder.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_powder.xml diff --git a/soh/assets/xml/objects/object_gi_prescription.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_prescription.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_prescription.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_prescription.xml diff --git a/soh/assets/xml/objects/object_gi_purse.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_purse.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_purse.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_purse.xml diff --git a/soh/assets/xml/objects/object_gi_rabit_mask.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_rabit_mask.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_rabit_mask.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_rabit_mask.xml diff --git a/soh/assets/xml/objects/object_gi_redead_mask.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_redead_mask.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_redead_mask.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_redead_mask.xml diff --git a/soh/assets/xml/objects/object_gi_rupy.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_rupy.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_rupy.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_rupy.xml diff --git a/soh/assets/xml/objects/object_gi_saw.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_saw.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_saw.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_saw.xml diff --git a/soh/assets/xml/objects/object_gi_scale.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_scale.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_scale.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_scale.xml diff --git a/soh/assets/xml/objects/object_gi_seed.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_seed.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_seed.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_seed.xml diff --git a/soh/assets/xml/objects/object_gi_shield_1.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_shield_1.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_shield_1.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_shield_1.xml diff --git a/soh/assets/xml/objects/object_gi_shield_2.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_shield_2.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_shield_2.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_shield_2.xml diff --git a/soh/assets/xml/objects/object_gi_shield_3.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_shield_3.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_shield_3.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_shield_3.xml diff --git a/soh/assets/xml/objects/object_gi_skj_mask.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_skj_mask.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_skj_mask.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_skj_mask.xml diff --git a/soh/assets/xml/objects/object_gi_soldout.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_soldout.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_soldout.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_soldout.xml diff --git a/soh/assets/xml/objects/object_gi_soul.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_soul.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_soul.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_soul.xml diff --git a/soh/assets/xml/objects/object_gi_stick.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_stick.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_stick.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_stick.xml diff --git a/soh/assets/xml/objects/object_gi_sutaru.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_sutaru.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_sutaru.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_sutaru.xml diff --git a/soh/assets/xml/objects/object_gi_sword_1.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_sword_1.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_sword_1.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_sword_1.xml diff --git a/soh/assets/xml/objects/object_gi_ticketstone.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_ticketstone.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_ticketstone.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_ticketstone.xml diff --git a/soh/assets/xml/objects/object_gi_truth_mask.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_truth_mask.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_truth_mask.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_truth_mask.xml diff --git a/soh/assets/xml/objects/object_gi_zoramask.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gi_zoramask.xml similarity index 100% rename from soh/assets/xml/objects/object_gi_zoramask.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gi_zoramask.xml diff --git a/soh/assets/xml/objects/object_gj.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gj.xml similarity index 100% rename from soh/assets/xml/objects/object_gj.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gj.xml diff --git a/soh/assets/xml/objects/object_gjyo_objects.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gjyo_objects.xml similarity index 100% rename from soh/assets/xml/objects/object_gjyo_objects.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gjyo_objects.xml diff --git a/soh/assets/xml/objects/object_gla.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gla.xml similarity index 100% rename from soh/assets/xml/objects/object_gla.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gla.xml diff --git a/soh/assets/xml/objects/object_gm.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gm.xml similarity index 100% rename from soh/assets/xml/objects/object_gm.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gm.xml diff --git a/soh/assets/xml/objects/object_gnd.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gnd.xml similarity index 100% rename from soh/assets/xml/objects/object_gnd.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gnd.xml diff --git a/soh/assets/xml/objects/object_gnd_magic.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gnd_magic.xml similarity index 100% rename from soh/assets/xml/objects/object_gnd_magic.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gnd_magic.xml diff --git a/soh/assets/xml/objects/object_gndd.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gndd.xml similarity index 100% rename from soh/assets/xml/objects/object_gndd.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gndd.xml diff --git a/soh/assets/xml/objects/object_god_lgt.xml b/soh/assets/xml/GC_NMQ_D/objects/object_god_lgt.xml similarity index 100% rename from soh/assets/xml/objects/object_god_lgt.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_god_lgt.xml diff --git a/soh/assets/xml/objects/object_gol.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gol.xml similarity index 100% rename from soh/assets/xml/objects/object_gol.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gol.xml diff --git a/soh/assets/xml/objects/object_goma.xml b/soh/assets/xml/GC_NMQ_D/objects/object_goma.xml similarity index 100% rename from soh/assets/xml/objects/object_goma.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_goma.xml diff --git a/soh/assets/xml/objects/object_goroiwa.xml b/soh/assets/xml/GC_NMQ_D/objects/object_goroiwa.xml similarity index 100% rename from soh/assets/xml/objects/object_goroiwa.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_goroiwa.xml diff --git a/soh/assets/xml/objects/object_gr.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gr.xml similarity index 100% rename from soh/assets/xml/objects/object_gr.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gr.xml diff --git a/soh/assets/xml/objects/object_gs.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gs.xml similarity index 100% rename from soh/assets/xml/objects/object_gs.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gs.xml diff --git a/soh/assets/xml/objects/object_gt.xml b/soh/assets/xml/GC_NMQ_D/objects/object_gt.xml similarity index 100% rename from soh/assets/xml/objects/object_gt.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_gt.xml diff --git a/soh/assets/xml/objects/object_haka.xml b/soh/assets/xml/GC_NMQ_D/objects/object_haka.xml similarity index 100% rename from soh/assets/xml/objects/object_haka.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_haka.xml diff --git a/soh/assets/xml/objects/object_haka_door.xml b/soh/assets/xml/GC_NMQ_D/objects/object_haka_door.xml similarity index 100% rename from soh/assets/xml/objects/object_haka_door.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_haka_door.xml diff --git a/soh/assets/xml/objects/object_haka_objects.xml b/soh/assets/xml/GC_NMQ_D/objects/object_haka_objects.xml similarity index 100% rename from soh/assets/xml/objects/object_haka_objects.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_haka_objects.xml diff --git a/soh/assets/xml/objects/object_hakach_objects.xml b/soh/assets/xml/GC_NMQ_D/objects/object_hakach_objects.xml similarity index 100% rename from soh/assets/xml/objects/object_hakach_objects.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_hakach_objects.xml diff --git a/soh/assets/xml/objects/object_hata.xml b/soh/assets/xml/GC_NMQ_D/objects/object_hata.xml similarity index 100% rename from soh/assets/xml/objects/object_hata.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_hata.xml diff --git a/soh/assets/xml/objects/object_heavy_object.xml b/soh/assets/xml/GC_NMQ_D/objects/object_heavy_object.xml similarity index 100% rename from soh/assets/xml/objects/object_heavy_object.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_heavy_object.xml diff --git a/soh/assets/xml/objects/object_hidan_objects.xml b/soh/assets/xml/GC_NMQ_D/objects/object_hidan_objects.xml similarity index 100% rename from soh/assets/xml/objects/object_hidan_objects.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_hidan_objects.xml diff --git a/soh/assets/xml/objects/object_hintnuts.xml b/soh/assets/xml/GC_NMQ_D/objects/object_hintnuts.xml similarity index 100% rename from soh/assets/xml/objects/object_hintnuts.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_hintnuts.xml diff --git a/soh/assets/xml/objects/object_hni.xml b/soh/assets/xml/GC_NMQ_D/objects/object_hni.xml similarity index 100% rename from soh/assets/xml/objects/object_hni.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_hni.xml diff --git a/soh/assets/xml/objects/object_horse.xml b/soh/assets/xml/GC_NMQ_D/objects/object_horse.xml similarity index 100% rename from soh/assets/xml/objects/object_horse.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_horse.xml diff --git a/soh/assets/xml/objects/object_horse_ganon.xml b/soh/assets/xml/GC_NMQ_D/objects/object_horse_ganon.xml similarity index 100% rename from soh/assets/xml/objects/object_horse_ganon.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_horse_ganon.xml diff --git a/soh/assets/xml/objects/object_horse_link_child.xml b/soh/assets/xml/GC_NMQ_D/objects/object_horse_link_child.xml similarity index 100% rename from soh/assets/xml/objects/object_horse_link_child.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_horse_link_child.xml diff --git a/soh/assets/xml/objects/object_horse_normal.xml b/soh/assets/xml/GC_NMQ_D/objects/object_horse_normal.xml similarity index 100% rename from soh/assets/xml/objects/object_horse_normal.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_horse_normal.xml diff --git a/soh/assets/xml/objects/object_horse_zelda.xml b/soh/assets/xml/GC_NMQ_D/objects/object_horse_zelda.xml similarity index 100% rename from soh/assets/xml/objects/object_horse_zelda.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_horse_zelda.xml diff --git a/soh/assets/xml/objects/object_hs.xml b/soh/assets/xml/GC_NMQ_D/objects/object_hs.xml similarity index 100% rename from soh/assets/xml/objects/object_hs.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_hs.xml diff --git a/soh/assets/xml/objects/object_human.xml b/soh/assets/xml/GC_NMQ_D/objects/object_human.xml similarity index 100% rename from soh/assets/xml/objects/object_human.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_human.xml diff --git a/soh/assets/xml/objects/object_ice_objects.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ice_objects.xml similarity index 100% rename from soh/assets/xml/objects/object_ice_objects.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ice_objects.xml diff --git a/soh/assets/xml/objects/object_ik.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ik.xml similarity index 100% rename from soh/assets/xml/objects/object_ik.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ik.xml diff --git a/soh/assets/xml/objects/object_im.xml b/soh/assets/xml/GC_NMQ_D/objects/object_im.xml similarity index 100% rename from soh/assets/xml/objects/object_im.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_im.xml diff --git a/soh/assets/xml/objects/object_in.xml b/soh/assets/xml/GC_NMQ_D/objects/object_in.xml similarity index 100% rename from soh/assets/xml/objects/object_in.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_in.xml diff --git a/soh/assets/xml/objects/object_ingate.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ingate.xml similarity index 100% rename from soh/assets/xml/objects/object_ingate.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ingate.xml diff --git a/soh/assets/xml/objects/object_jj.xml b/soh/assets/xml/GC_NMQ_D/objects/object_jj.xml similarity index 100% rename from soh/assets/xml/objects/object_jj.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_jj.xml diff --git a/soh/assets/xml/objects/object_js.xml b/soh/assets/xml/GC_NMQ_D/objects/object_js.xml similarity index 100% rename from soh/assets/xml/objects/object_js.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_js.xml diff --git a/soh/assets/xml/objects/object_jya_door.xml b/soh/assets/xml/GC_NMQ_D/objects/object_jya_door.xml similarity index 100% rename from soh/assets/xml/objects/object_jya_door.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_jya_door.xml diff --git a/soh/assets/xml/objects/object_jya_iron.xml b/soh/assets/xml/GC_NMQ_D/objects/object_jya_iron.xml similarity index 100% rename from soh/assets/xml/objects/object_jya_iron.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_jya_iron.xml diff --git a/soh/assets/xml/objects/object_jya_obj.xml b/soh/assets/xml/GC_NMQ_D/objects/object_jya_obj.xml similarity index 100% rename from soh/assets/xml/objects/object_jya_obj.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_jya_obj.xml diff --git a/soh/assets/xml/objects/object_ka.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ka.xml similarity index 100% rename from soh/assets/xml/objects/object_ka.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ka.xml diff --git a/soh/assets/xml/objects/object_kanban.xml b/soh/assets/xml/GC_NMQ_D/objects/object_kanban.xml similarity index 100% rename from soh/assets/xml/objects/object_kanban.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_kanban.xml diff --git a/soh/assets/xml/objects/object_kibako2.xml b/soh/assets/xml/GC_NMQ_D/objects/object_kibako2.xml similarity index 100% rename from soh/assets/xml/objects/object_kibako2.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_kibako2.xml diff --git a/soh/assets/xml/objects/object_kingdodongo.xml b/soh/assets/xml/GC_NMQ_D/objects/object_kingdodongo.xml similarity index 100% rename from soh/assets/xml/objects/object_kingdodongo.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_kingdodongo.xml diff --git a/soh/assets/xml/objects/object_km1.xml b/soh/assets/xml/GC_NMQ_D/objects/object_km1.xml similarity index 100% rename from soh/assets/xml/objects/object_km1.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_km1.xml diff --git a/soh/assets/xml/objects/object_kusa.xml b/soh/assets/xml/GC_NMQ_D/objects/object_kusa.xml similarity index 100% rename from soh/assets/xml/objects/object_kusa.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_kusa.xml diff --git a/soh/assets/xml/objects/object_kw1.xml b/soh/assets/xml/GC_NMQ_D/objects/object_kw1.xml similarity index 100% rename from soh/assets/xml/objects/object_kw1.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_kw1.xml diff --git a/soh/assets/xml/objects/object_kz.xml b/soh/assets/xml/GC_NMQ_D/objects/object_kz.xml similarity index 100% rename from soh/assets/xml/objects/object_kz.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_kz.xml diff --git a/soh/assets/xml/objects/object_light_ring.xml b/soh/assets/xml/GC_NMQ_D/objects/object_light_ring.xml similarity index 100% rename from soh/assets/xml/objects/object_light_ring.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_light_ring.xml diff --git a/soh/assets/xml/objects/object_lightbox.xml b/soh/assets/xml/GC_NMQ_D/objects/object_lightbox.xml similarity index 100% rename from soh/assets/xml/objects/object_lightbox.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_lightbox.xml diff --git a/soh/assets/xml/objects/object_lightswitch.xml b/soh/assets/xml/GC_NMQ_D/objects/object_lightswitch.xml similarity index 100% rename from soh/assets/xml/objects/object_lightswitch.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_lightswitch.xml diff --git a/soh/assets/xml/objects/object_link_boy.xml b/soh/assets/xml/GC_NMQ_D/objects/object_link_boy.xml similarity index 100% rename from soh/assets/xml/objects/object_link_boy.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_link_boy.xml diff --git a/soh/assets/xml/objects/object_link_child.xml b/soh/assets/xml/GC_NMQ_D/objects/object_link_child.xml similarity index 100% rename from soh/assets/xml/objects/object_link_child.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_link_child.xml diff --git a/soh/assets/xml/objects/object_ma1.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ma1.xml similarity index 100% rename from soh/assets/xml/objects/object_ma1.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ma1.xml diff --git a/soh/assets/xml/objects/object_ma2.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ma2.xml similarity index 100% rename from soh/assets/xml/objects/object_ma2.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ma2.xml diff --git a/soh/assets/xml/objects/object_mag.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mag.xml similarity index 100% rename from soh/assets/xml/objects/object_mag.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mag.xml diff --git a/soh/assets/xml/objects/object_mamenoki.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mamenoki.xml similarity index 100% rename from soh/assets/xml/objects/object_mamenoki.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mamenoki.xml diff --git a/soh/assets/xml/objects/object_mastergolon.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mastergolon.xml similarity index 100% rename from soh/assets/xml/objects/object_mastergolon.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mastergolon.xml diff --git a/soh/assets/xml/objects/object_masterkokiri.xml b/soh/assets/xml/GC_NMQ_D/objects/object_masterkokiri.xml similarity index 100% rename from soh/assets/xml/objects/object_masterkokiri.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_masterkokiri.xml diff --git a/soh/assets/xml/objects/object_masterkokirihead.xml b/soh/assets/xml/GC_NMQ_D/objects/object_masterkokirihead.xml similarity index 100% rename from soh/assets/xml/objects/object_masterkokirihead.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_masterkokirihead.xml diff --git a/soh/assets/xml/objects/object_masterzoora.xml b/soh/assets/xml/GC_NMQ_D/objects/object_masterzoora.xml similarity index 100% rename from soh/assets/xml/objects/object_masterzoora.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_masterzoora.xml diff --git a/soh/assets/xml/objects/object_mb.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mb.xml similarity index 100% rename from soh/assets/xml/objects/object_mb.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mb.xml diff --git a/soh/assets/xml/objects/object_md.xml b/soh/assets/xml/GC_NMQ_D/objects/object_md.xml similarity index 100% rename from soh/assets/xml/objects/object_md.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_md.xml diff --git a/soh/assets/xml/objects/object_medal.xml b/soh/assets/xml/GC_NMQ_D/objects/object_medal.xml similarity index 100% rename from soh/assets/xml/objects/object_medal.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_medal.xml diff --git a/soh/assets/xml/objects/object_menkuri_objects.xml b/soh/assets/xml/GC_NMQ_D/objects/object_menkuri_objects.xml similarity index 100% rename from soh/assets/xml/objects/object_menkuri_objects.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_menkuri_objects.xml diff --git a/soh/assets/xml/objects/object_mir_ray.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mir_ray.xml similarity index 100% rename from soh/assets/xml/objects/object_mir_ray.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mir_ray.xml diff --git a/soh/assets/xml/objects/object_mizu_objects.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mizu_objects.xml similarity index 100% rename from soh/assets/xml/objects/object_mizu_objects.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mizu_objects.xml diff --git a/soh/assets/xml/objects/object_mjin.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mjin.xml similarity index 100% rename from soh/assets/xml/objects/object_mjin.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mjin.xml diff --git a/soh/assets/xml/objects/object_mjin_dark.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mjin_dark.xml similarity index 100% rename from soh/assets/xml/objects/object_mjin_dark.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mjin_dark.xml diff --git a/soh/assets/xml/objects/object_mjin_flame.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mjin_flame.xml similarity index 100% rename from soh/assets/xml/objects/object_mjin_flame.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mjin_flame.xml diff --git a/soh/assets/xml/objects/object_mjin_flash.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mjin_flash.xml similarity index 100% rename from soh/assets/xml/objects/object_mjin_flash.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mjin_flash.xml diff --git a/soh/assets/xml/objects/object_mjin_ice.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mjin_ice.xml similarity index 100% rename from soh/assets/xml/objects/object_mjin_ice.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mjin_ice.xml diff --git a/soh/assets/xml/objects/object_mjin_oka.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mjin_oka.xml similarity index 100% rename from soh/assets/xml/objects/object_mjin_oka.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mjin_oka.xml diff --git a/soh/assets/xml/objects/object_mjin_soul.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mjin_soul.xml similarity index 100% rename from soh/assets/xml/objects/object_mjin_soul.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mjin_soul.xml diff --git a/soh/assets/xml/objects/object_mjin_wind.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mjin_wind.xml similarity index 100% rename from soh/assets/xml/objects/object_mjin_wind.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mjin_wind.xml diff --git a/soh/assets/xml/objects/object_mk.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mk.xml similarity index 100% rename from soh/assets/xml/objects/object_mk.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mk.xml diff --git a/soh/assets/xml/objects/object_mm.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mm.xml similarity index 100% rename from soh/assets/xml/objects/object_mm.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mm.xml diff --git a/soh/assets/xml/objects/object_mo.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mo.xml similarity index 100% rename from soh/assets/xml/objects/object_mo.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mo.xml diff --git a/soh/assets/xml/objects/object_mori_hineri1.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mori_hineri1.xml similarity index 100% rename from soh/assets/xml/objects/object_mori_hineri1.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mori_hineri1.xml diff --git a/soh/assets/xml/objects/object_mori_hineri1a.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mori_hineri1a.xml similarity index 100% rename from soh/assets/xml/objects/object_mori_hineri1a.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mori_hineri1a.xml diff --git a/soh/assets/xml/objects/object_mori_hineri2.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mori_hineri2.xml similarity index 100% rename from soh/assets/xml/objects/object_mori_hineri2.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mori_hineri2.xml diff --git a/soh/assets/xml/objects/object_mori_hineri2a.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mori_hineri2a.xml similarity index 100% rename from soh/assets/xml/objects/object_mori_hineri2a.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mori_hineri2a.xml diff --git a/soh/assets/xml/objects/object_mori_objects.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mori_objects.xml similarity index 100% rename from soh/assets/xml/objects/object_mori_objects.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mori_objects.xml diff --git a/soh/assets/xml/objects/object_mori_tex.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mori_tex.xml similarity index 100% rename from soh/assets/xml/objects/object_mori_tex.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mori_tex.xml diff --git a/soh/assets/xml/objects/object_ms.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ms.xml similarity index 100% rename from soh/assets/xml/objects/object_ms.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ms.xml diff --git a/soh/assets/xml/objects/object_mu.xml b/soh/assets/xml/GC_NMQ_D/objects/object_mu.xml similarity index 100% rename from soh/assets/xml/objects/object_mu.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_mu.xml diff --git a/soh/assets/xml/objects/object_nb.xml b/soh/assets/xml/GC_NMQ_D/objects/object_nb.xml similarity index 100% rename from soh/assets/xml/objects/object_nb.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_nb.xml diff --git a/soh/assets/xml/objects/object_niw.xml b/soh/assets/xml/GC_NMQ_D/objects/object_niw.xml similarity index 100% rename from soh/assets/xml/objects/object_niw.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_niw.xml diff --git a/soh/assets/xml/objects/object_nwc.xml b/soh/assets/xml/GC_NMQ_D/objects/object_nwc.xml similarity index 100% rename from soh/assets/xml/objects/object_nwc.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_nwc.xml diff --git a/soh/assets/xml/objects/object_ny.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ny.xml similarity index 100% rename from soh/assets/xml/objects/object_ny.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ny.xml diff --git a/soh/assets/xml/objects/object_oA1.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oA1.xml similarity index 100% rename from soh/assets/xml/objects/object_oA1.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oA1.xml diff --git a/soh/assets/xml/objects/object_oA10.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oA10.xml similarity index 100% rename from soh/assets/xml/objects/object_oA10.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oA10.xml diff --git a/soh/assets/xml/objects/object_oA11.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oA11.xml similarity index 100% rename from soh/assets/xml/objects/object_oA11.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oA11.xml diff --git a/soh/assets/xml/objects/object_oA2.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oA2.xml similarity index 100% rename from soh/assets/xml/objects/object_oA2.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oA2.xml diff --git a/soh/assets/xml/objects/object_oA3.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oA3.xml similarity index 100% rename from soh/assets/xml/objects/object_oA3.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oA3.xml diff --git a/soh/assets/xml/objects/object_oA4.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oA4.xml similarity index 100% rename from soh/assets/xml/objects/object_oA4.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oA4.xml diff --git a/soh/assets/xml/objects/object_oA5.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oA5.xml similarity index 100% rename from soh/assets/xml/objects/object_oA5.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oA5.xml diff --git a/soh/assets/xml/objects/object_oA6.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oA6.xml similarity index 100% rename from soh/assets/xml/objects/object_oA6.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oA6.xml diff --git a/soh/assets/xml/objects/object_oA7.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oA7.xml similarity index 100% rename from soh/assets/xml/objects/object_oA7.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oA7.xml diff --git a/soh/assets/xml/objects/object_oA8.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oA8.xml similarity index 100% rename from soh/assets/xml/objects/object_oA8.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oA8.xml diff --git a/soh/assets/xml/objects/object_oA9.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oA9.xml similarity index 100% rename from soh/assets/xml/objects/object_oA9.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oA9.xml diff --git a/soh/assets/xml/objects/object_oB1.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oB1.xml similarity index 100% rename from soh/assets/xml/objects/object_oB1.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oB1.xml diff --git a/soh/assets/xml/objects/object_oB2.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oB2.xml similarity index 100% rename from soh/assets/xml/objects/object_oB2.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oB2.xml diff --git a/soh/assets/xml/objects/object_oB3.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oB3.xml similarity index 100% rename from soh/assets/xml/objects/object_oB3.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oB3.xml diff --git a/soh/assets/xml/objects/object_oB4.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oB4.xml similarity index 100% rename from soh/assets/xml/objects/object_oB4.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oB4.xml diff --git a/soh/assets/xml/objects/object_oE1.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oE1.xml similarity index 100% rename from soh/assets/xml/objects/object_oE1.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oE1.xml diff --git a/soh/assets/xml/objects/object_oE10.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oE10.xml similarity index 100% rename from soh/assets/xml/objects/object_oE10.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oE10.xml diff --git a/soh/assets/xml/objects/object_oE11.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oE11.xml similarity index 100% rename from soh/assets/xml/objects/object_oE11.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oE11.xml diff --git a/soh/assets/xml/objects/object_oE12.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oE12.xml similarity index 100% rename from soh/assets/xml/objects/object_oE12.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oE12.xml diff --git a/soh/assets/xml/objects/object_oE1s.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oE1s.xml similarity index 100% rename from soh/assets/xml/objects/object_oE1s.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oE1s.xml diff --git a/soh/assets/xml/objects/object_oE2.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oE2.xml similarity index 100% rename from soh/assets/xml/objects/object_oE2.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oE2.xml diff --git a/soh/assets/xml/objects/object_oE3.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oE3.xml similarity index 100% rename from soh/assets/xml/objects/object_oE3.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oE3.xml diff --git a/soh/assets/xml/objects/object_oE4.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oE4.xml similarity index 100% rename from soh/assets/xml/objects/object_oE4.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oE4.xml diff --git a/soh/assets/xml/objects/object_oE4s.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oE4s.xml similarity index 100% rename from soh/assets/xml/objects/object_oE4s.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oE4s.xml diff --git a/soh/assets/xml/objects/object_oE5.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oE5.xml similarity index 100% rename from soh/assets/xml/objects/object_oE5.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oE5.xml diff --git a/soh/assets/xml/objects/object_oE6.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oE6.xml similarity index 100% rename from soh/assets/xml/objects/object_oE6.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oE6.xml diff --git a/soh/assets/xml/objects/object_oE7.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oE7.xml similarity index 100% rename from soh/assets/xml/objects/object_oE7.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oE7.xml diff --git a/soh/assets/xml/objects/object_oE8.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oE8.xml similarity index 100% rename from soh/assets/xml/objects/object_oE8.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oE8.xml diff --git a/soh/assets/xml/objects/object_oE9.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oE9.xml similarity index 100% rename from soh/assets/xml/objects/object_oE9.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oE9.xml diff --git a/soh/assets/xml/objects/object_oE_anime.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oE_anime.xml similarity index 100% rename from soh/assets/xml/objects/object_oE_anime.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oE_anime.xml diff --git a/soh/assets/xml/objects/object_oF1d_map.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oF1d_map.xml similarity index 100% rename from soh/assets/xml/objects/object_oF1d_map.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oF1d_map.xml diff --git a/soh/assets/xml/objects/object_oF1s.xml b/soh/assets/xml/GC_NMQ_D/objects/object_oF1s.xml similarity index 100% rename from soh/assets/xml/objects/object_oF1s.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_oF1s.xml diff --git a/soh/assets/xml/objects/object_o_anime.xml b/soh/assets/xml/GC_NMQ_D/objects/object_o_anime.xml similarity index 100% rename from soh/assets/xml/objects/object_o_anime.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_o_anime.xml diff --git a/soh/assets/xml/objects/object_okuta.xml b/soh/assets/xml/GC_NMQ_D/objects/object_okuta.xml similarity index 100% rename from soh/assets/xml/objects/object_okuta.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_okuta.xml diff --git a/soh/assets/xml/objects/object_opening_demo1.xml b/soh/assets/xml/GC_NMQ_D/objects/object_opening_demo1.xml similarity index 100% rename from soh/assets/xml/objects/object_opening_demo1.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_opening_demo1.xml diff --git a/soh/assets/xml/objects/object_os.xml b/soh/assets/xml/GC_NMQ_D/objects/object_os.xml similarity index 100% rename from soh/assets/xml/objects/object_os.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_os.xml diff --git a/soh/assets/xml/objects/object_os_anime.xml b/soh/assets/xml/GC_NMQ_D/objects/object_os_anime.xml similarity index 100% rename from soh/assets/xml/objects/object_os_anime.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_os_anime.xml diff --git a/soh/assets/xml/objects/object_ossan.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ossan.xml similarity index 100% rename from soh/assets/xml/objects/object_ossan.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ossan.xml diff --git a/soh/assets/xml/objects/object_ouke_haka.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ouke_haka.xml similarity index 100% rename from soh/assets/xml/objects/object_ouke_haka.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ouke_haka.xml diff --git a/soh/assets/xml/objects/object_owl.xml b/soh/assets/xml/GC_NMQ_D/objects/object_owl.xml similarity index 100% rename from soh/assets/xml/objects/object_owl.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_owl.xml diff --git a/soh/assets/xml/objects/object_peehat.xml b/soh/assets/xml/GC_NMQ_D/objects/object_peehat.xml similarity index 100% rename from soh/assets/xml/objects/object_peehat.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_peehat.xml diff --git a/soh/assets/xml/objects/object_po_composer.xml b/soh/assets/xml/GC_NMQ_D/objects/object_po_composer.xml similarity index 100% rename from soh/assets/xml/objects/object_po_composer.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_po_composer.xml diff --git a/soh/assets/xml/objects/object_po_field.xml b/soh/assets/xml/GC_NMQ_D/objects/object_po_field.xml similarity index 100% rename from soh/assets/xml/objects/object_po_field.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_po_field.xml diff --git a/soh/assets/xml/objects/object_po_sisters.xml b/soh/assets/xml/GC_NMQ_D/objects/object_po_sisters.xml similarity index 100% rename from soh/assets/xml/objects/object_po_sisters.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_po_sisters.xml diff --git a/soh/assets/xml/objects/object_poh.xml b/soh/assets/xml/GC_NMQ_D/objects/object_poh.xml similarity index 100% rename from soh/assets/xml/objects/object_poh.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_poh.xml diff --git a/soh/assets/xml/objects/object_ps.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ps.xml similarity index 100% rename from soh/assets/xml/objects/object_ps.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ps.xml diff --git a/soh/assets/xml/objects/object_pu_box.xml b/soh/assets/xml/GC_NMQ_D/objects/object_pu_box.xml similarity index 100% rename from soh/assets/xml/objects/object_pu_box.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_pu_box.xml diff --git a/soh/assets/xml/objects/object_rd.xml b/soh/assets/xml/GC_NMQ_D/objects/object_rd.xml similarity index 100% rename from soh/assets/xml/objects/object_rd.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_rd.xml diff --git a/soh/assets/xml/objects/object_reeba.xml b/soh/assets/xml/GC_NMQ_D/objects/object_reeba.xml similarity index 100% rename from soh/assets/xml/objects/object_reeba.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_reeba.xml diff --git a/soh/assets/xml/objects/object_relay_objects.xml b/soh/assets/xml/GC_NMQ_D/objects/object_relay_objects.xml similarity index 100% rename from soh/assets/xml/objects/object_relay_objects.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_relay_objects.xml diff --git a/soh/assets/xml/objects/object_rl.xml b/soh/assets/xml/GC_NMQ_D/objects/object_rl.xml similarity index 100% rename from soh/assets/xml/objects/object_rl.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_rl.xml diff --git a/soh/assets/xml/objects/object_rr.xml b/soh/assets/xml/GC_NMQ_D/objects/object_rr.xml similarity index 100% rename from soh/assets/xml/objects/object_rr.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_rr.xml diff --git a/soh/assets/xml/objects/object_rs.xml b/soh/assets/xml/GC_NMQ_D/objects/object_rs.xml similarity index 100% rename from soh/assets/xml/objects/object_rs.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_rs.xml diff --git a/soh/assets/xml/objects/object_ru1.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ru1.xml similarity index 100% rename from soh/assets/xml/objects/object_ru1.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ru1.xml diff --git a/soh/assets/xml/objects/object_ru2.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ru2.xml similarity index 100% rename from soh/assets/xml/objects/object_ru2.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ru2.xml diff --git a/soh/assets/xml/objects/object_sa.xml b/soh/assets/xml/GC_NMQ_D/objects/object_sa.xml similarity index 100% rename from soh/assets/xml/objects/object_sa.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_sa.xml diff --git a/soh/assets/xml/objects/object_sb.xml b/soh/assets/xml/GC_NMQ_D/objects/object_sb.xml similarity index 100% rename from soh/assets/xml/objects/object_sb.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_sb.xml diff --git a/soh/assets/xml/objects/object_sd.xml b/soh/assets/xml/GC_NMQ_D/objects/object_sd.xml similarity index 100% rename from soh/assets/xml/objects/object_sd.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_sd.xml diff --git a/soh/assets/xml/objects/object_shop_dungen.xml b/soh/assets/xml/GC_NMQ_D/objects/object_shop_dungen.xml similarity index 100% rename from soh/assets/xml/objects/object_shop_dungen.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_shop_dungen.xml diff --git a/soh/assets/xml/objects/object_shopnuts.xml b/soh/assets/xml/GC_NMQ_D/objects/object_shopnuts.xml similarity index 100% rename from soh/assets/xml/objects/object_shopnuts.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_shopnuts.xml diff --git a/soh/assets/xml/objects/object_siofuki.xml b/soh/assets/xml/GC_NMQ_D/objects/object_siofuki.xml similarity index 100% rename from soh/assets/xml/objects/object_siofuki.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_siofuki.xml diff --git a/soh/assets/xml/objects/object_sk2.xml b/soh/assets/xml/GC_NMQ_D/objects/object_sk2.xml similarity index 100% rename from soh/assets/xml/objects/object_sk2.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_sk2.xml diff --git a/soh/assets/xml/objects/object_skb.xml b/soh/assets/xml/GC_NMQ_D/objects/object_skb.xml similarity index 100% rename from soh/assets/xml/objects/object_skb.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_skb.xml diff --git a/soh/assets/xml/objects/object_skj.xml b/soh/assets/xml/GC_NMQ_D/objects/object_skj.xml similarity index 100% rename from soh/assets/xml/objects/object_skj.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_skj.xml diff --git a/soh/assets/xml/objects/object_spot00_break.xml b/soh/assets/xml/GC_NMQ_D/objects/object_spot00_break.xml similarity index 100% rename from soh/assets/xml/objects/object_spot00_break.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_spot00_break.xml diff --git a/soh/assets/xml/objects/object_spot00_objects.xml b/soh/assets/xml/GC_NMQ_D/objects/object_spot00_objects.xml similarity index 100% rename from soh/assets/xml/objects/object_spot00_objects.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_spot00_objects.xml diff --git a/soh/assets/xml/objects/object_spot01_matoya.xml b/soh/assets/xml/GC_NMQ_D/objects/object_spot01_matoya.xml similarity index 100% rename from soh/assets/xml/objects/object_spot01_matoya.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_spot01_matoya.xml diff --git a/soh/assets/xml/objects/object_spot01_matoyab.xml b/soh/assets/xml/GC_NMQ_D/objects/object_spot01_matoyab.xml similarity index 100% rename from soh/assets/xml/objects/object_spot01_matoyab.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_spot01_matoyab.xml diff --git a/soh/assets/xml/objects/object_spot01_objects.xml b/soh/assets/xml/GC_NMQ_D/objects/object_spot01_objects.xml similarity index 100% rename from soh/assets/xml/objects/object_spot01_objects.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_spot01_objects.xml diff --git a/soh/assets/xml/objects/object_spot01_objects2.xml b/soh/assets/xml/GC_NMQ_D/objects/object_spot01_objects2.xml similarity index 100% rename from soh/assets/xml/objects/object_spot01_objects2.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_spot01_objects2.xml diff --git a/soh/assets/xml/objects/object_spot02_objects.xml b/soh/assets/xml/GC_NMQ_D/objects/object_spot02_objects.xml similarity index 100% rename from soh/assets/xml/objects/object_spot02_objects.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_spot02_objects.xml diff --git a/soh/assets/xml/objects/object_spot03_object.xml b/soh/assets/xml/GC_NMQ_D/objects/object_spot03_object.xml similarity index 100% rename from soh/assets/xml/objects/object_spot03_object.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_spot03_object.xml diff --git a/soh/assets/xml/objects/object_spot04_objects.xml b/soh/assets/xml/GC_NMQ_D/objects/object_spot04_objects.xml similarity index 100% rename from soh/assets/xml/objects/object_spot04_objects.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_spot04_objects.xml diff --git a/soh/assets/xml/objects/object_spot05_objects.xml b/soh/assets/xml/GC_NMQ_D/objects/object_spot05_objects.xml similarity index 100% rename from soh/assets/xml/objects/object_spot05_objects.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_spot05_objects.xml diff --git a/soh/assets/xml/objects/object_spot06_objects.xml b/soh/assets/xml/GC_NMQ_D/objects/object_spot06_objects.xml similarity index 100% rename from soh/assets/xml/objects/object_spot06_objects.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_spot06_objects.xml diff --git a/soh/assets/xml/objects/object_spot07_object.xml b/soh/assets/xml/GC_NMQ_D/objects/object_spot07_object.xml similarity index 100% rename from soh/assets/xml/objects/object_spot07_object.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_spot07_object.xml diff --git a/soh/assets/xml/objects/object_spot08_obj.xml b/soh/assets/xml/GC_NMQ_D/objects/object_spot08_obj.xml similarity index 100% rename from soh/assets/xml/objects/object_spot08_obj.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_spot08_obj.xml diff --git a/soh/assets/xml/objects/object_spot09_obj.xml b/soh/assets/xml/GC_NMQ_D/objects/object_spot09_obj.xml similarity index 100% rename from soh/assets/xml/objects/object_spot09_obj.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_spot09_obj.xml diff --git a/soh/assets/xml/objects/object_spot11_obj.xml b/soh/assets/xml/GC_NMQ_D/objects/object_spot11_obj.xml similarity index 100% rename from soh/assets/xml/objects/object_spot11_obj.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_spot11_obj.xml diff --git a/soh/assets/xml/objects/object_spot12_obj.xml b/soh/assets/xml/GC_NMQ_D/objects/object_spot12_obj.xml similarity index 100% rename from soh/assets/xml/objects/object_spot12_obj.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_spot12_obj.xml diff --git a/soh/assets/xml/objects/object_spot15_obj.xml b/soh/assets/xml/GC_NMQ_D/objects/object_spot15_obj.xml similarity index 100% rename from soh/assets/xml/objects/object_spot15_obj.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_spot15_obj.xml diff --git a/soh/assets/xml/objects/object_spot16_obj.xml b/soh/assets/xml/GC_NMQ_D/objects/object_spot16_obj.xml similarity index 100% rename from soh/assets/xml/objects/object_spot16_obj.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_spot16_obj.xml diff --git a/soh/assets/xml/objects/object_spot17_obj.xml b/soh/assets/xml/GC_NMQ_D/objects/object_spot17_obj.xml similarity index 100% rename from soh/assets/xml/objects/object_spot17_obj.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_spot17_obj.xml diff --git a/soh/assets/xml/objects/object_spot18_obj.xml b/soh/assets/xml/GC_NMQ_D/objects/object_spot18_obj.xml similarity index 100% rename from soh/assets/xml/objects/object_spot18_obj.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_spot18_obj.xml diff --git a/soh/assets/xml/objects/object_ssh.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ssh.xml similarity index 100% rename from soh/assets/xml/objects/object_ssh.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ssh.xml diff --git a/soh/assets/xml/objects/object_sst.xml b/soh/assets/xml/GC_NMQ_D/objects/object_sst.xml similarity index 100% rename from soh/assets/xml/objects/object_sst.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_sst.xml diff --git a/soh/assets/xml/objects/object_st.xml b/soh/assets/xml/GC_NMQ_D/objects/object_st.xml similarity index 100% rename from soh/assets/xml/objects/object_st.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_st.xml diff --git a/soh/assets/xml/objects/object_stream.xml b/soh/assets/xml/GC_NMQ_D/objects/object_stream.xml similarity index 100% rename from soh/assets/xml/objects/object_stream.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_stream.xml diff --git a/soh/assets/xml/objects/object_syokudai.xml b/soh/assets/xml/GC_NMQ_D/objects/object_syokudai.xml similarity index 100% rename from soh/assets/xml/objects/object_syokudai.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_syokudai.xml diff --git a/soh/assets/xml/objects/object_ta.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ta.xml similarity index 100% rename from soh/assets/xml/objects/object_ta.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ta.xml diff --git a/soh/assets/xml/objects/object_timeblock.xml b/soh/assets/xml/GC_NMQ_D/objects/object_timeblock.xml similarity index 100% rename from soh/assets/xml/objects/object_timeblock.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_timeblock.xml diff --git a/soh/assets/xml/objects/object_tite.xml b/soh/assets/xml/GC_NMQ_D/objects/object_tite.xml similarity index 100% rename from soh/assets/xml/objects/object_tite.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_tite.xml diff --git a/soh/assets/xml/objects/object_tk.xml b/soh/assets/xml/GC_NMQ_D/objects/object_tk.xml similarity index 100% rename from soh/assets/xml/objects/object_tk.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_tk.xml diff --git a/soh/assets/xml/objects/object_toki_objects.xml b/soh/assets/xml/GC_NMQ_D/objects/object_toki_objects.xml similarity index 100% rename from soh/assets/xml/objects/object_toki_objects.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_toki_objects.xml diff --git a/soh/assets/xml/objects/object_torch2.xml b/soh/assets/xml/GC_NMQ_D/objects/object_torch2.xml similarity index 100% rename from soh/assets/xml/objects/object_torch2.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_torch2.xml diff --git a/soh/assets/xml/objects/object_toryo.xml b/soh/assets/xml/GC_NMQ_D/objects/object_toryo.xml similarity index 100% rename from soh/assets/xml/objects/object_toryo.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_toryo.xml diff --git a/soh/assets/xml/objects/object_tp.xml b/soh/assets/xml/GC_NMQ_D/objects/object_tp.xml similarity index 100% rename from soh/assets/xml/objects/object_tp.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_tp.xml diff --git a/soh/assets/xml/objects/object_tr.xml b/soh/assets/xml/GC_NMQ_D/objects/object_tr.xml similarity index 100% rename from soh/assets/xml/objects/object_tr.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_tr.xml diff --git a/soh/assets/xml/objects/object_trap.xml b/soh/assets/xml/GC_NMQ_D/objects/object_trap.xml similarity index 100% rename from soh/assets/xml/objects/object_trap.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_trap.xml diff --git a/soh/assets/xml/objects/object_triforce_spot.xml b/soh/assets/xml/GC_NMQ_D/objects/object_triforce_spot.xml similarity index 100% rename from soh/assets/xml/objects/object_triforce_spot.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_triforce_spot.xml diff --git a/soh/assets/xml/objects/object_ts.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ts.xml similarity index 100% rename from soh/assets/xml/objects/object_ts.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ts.xml diff --git a/soh/assets/xml/objects/object_tsubo.xml b/soh/assets/xml/GC_NMQ_D/objects/object_tsubo.xml similarity index 100% rename from soh/assets/xml/objects/object_tsubo.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_tsubo.xml diff --git a/soh/assets/xml/objects/object_tw.xml b/soh/assets/xml/GC_NMQ_D/objects/object_tw.xml similarity index 100% rename from soh/assets/xml/objects/object_tw.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_tw.xml diff --git a/soh/assets/xml/objects/object_umajump.xml b/soh/assets/xml/GC_NMQ_D/objects/object_umajump.xml similarity index 100% rename from soh/assets/xml/objects/object_umajump.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_umajump.xml diff --git a/soh/assets/xml/objects/object_vali.xml b/soh/assets/xml/GC_NMQ_D/objects/object_vali.xml similarity index 100% rename from soh/assets/xml/objects/object_vali.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_vali.xml diff --git a/soh/assets/xml/objects/object_vase.xml b/soh/assets/xml/GC_NMQ_D/objects/object_vase.xml similarity index 100% rename from soh/assets/xml/objects/object_vase.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_vase.xml diff --git a/soh/assets/xml/objects/object_vm.xml b/soh/assets/xml/GC_NMQ_D/objects/object_vm.xml similarity index 100% rename from soh/assets/xml/objects/object_vm.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_vm.xml diff --git a/soh/assets/xml/objects/object_wallmaster.xml b/soh/assets/xml/GC_NMQ_D/objects/object_wallmaster.xml similarity index 100% rename from soh/assets/xml/objects/object_wallmaster.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_wallmaster.xml diff --git a/soh/assets/xml/objects/object_warp1.xml b/soh/assets/xml/GC_NMQ_D/objects/object_warp1.xml similarity index 100% rename from soh/assets/xml/objects/object_warp1.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_warp1.xml diff --git a/soh/assets/xml/objects/object_warp2.xml b/soh/assets/xml/GC_NMQ_D/objects/object_warp2.xml similarity index 100% rename from soh/assets/xml/objects/object_warp2.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_warp2.xml diff --git a/soh/assets/xml/objects/object_wf.xml b/soh/assets/xml/GC_NMQ_D/objects/object_wf.xml similarity index 100% rename from soh/assets/xml/objects/object_wf.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_wf.xml diff --git a/soh/assets/xml/objects/object_wood02.xml b/soh/assets/xml/GC_NMQ_D/objects/object_wood02.xml similarity index 100% rename from soh/assets/xml/objects/object_wood02.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_wood02.xml diff --git a/soh/assets/xml/objects/object_xc.xml b/soh/assets/xml/GC_NMQ_D/objects/object_xc.xml similarity index 100% rename from soh/assets/xml/objects/object_xc.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_xc.xml diff --git a/soh/assets/xml/objects/object_yabusame_point.xml b/soh/assets/xml/GC_NMQ_D/objects/object_yabusame_point.xml similarity index 100% rename from soh/assets/xml/objects/object_yabusame_point.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_yabusame_point.xml diff --git a/soh/assets/xml/objects/object_ydan_objects.xml b/soh/assets/xml/GC_NMQ_D/objects/object_ydan_objects.xml similarity index 100% rename from soh/assets/xml/objects/object_ydan_objects.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_ydan_objects.xml diff --git a/soh/assets/xml/objects/object_yukabyun.xml b/soh/assets/xml/GC_NMQ_D/objects/object_yukabyun.xml similarity index 100% rename from soh/assets/xml/objects/object_yukabyun.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_yukabyun.xml diff --git a/soh/assets/xml/objects/object_zf.xml b/soh/assets/xml/GC_NMQ_D/objects/object_zf.xml similarity index 100% rename from soh/assets/xml/objects/object_zf.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_zf.xml diff --git a/soh/assets/xml/objects/object_zg.xml b/soh/assets/xml/GC_NMQ_D/objects/object_zg.xml similarity index 100% rename from soh/assets/xml/objects/object_zg.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_zg.xml diff --git a/soh/assets/xml/objects/object_zl1.xml b/soh/assets/xml/GC_NMQ_D/objects/object_zl1.xml similarity index 100% rename from soh/assets/xml/objects/object_zl1.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_zl1.xml diff --git a/soh/assets/xml/objects/object_zl2.xml b/soh/assets/xml/GC_NMQ_D/objects/object_zl2.xml similarity index 100% rename from soh/assets/xml/objects/object_zl2.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_zl2.xml diff --git a/soh/assets/xml/objects/object_zl2_anime1.xml b/soh/assets/xml/GC_NMQ_D/objects/object_zl2_anime1.xml similarity index 100% rename from soh/assets/xml/objects/object_zl2_anime1.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_zl2_anime1.xml diff --git a/soh/assets/xml/objects/object_zl2_anime2.xml b/soh/assets/xml/GC_NMQ_D/objects/object_zl2_anime2.xml similarity index 100% rename from soh/assets/xml/objects/object_zl2_anime2.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_zl2_anime2.xml diff --git a/soh/assets/xml/objects/object_zl4.xml b/soh/assets/xml/GC_NMQ_D/objects/object_zl4.xml similarity index 100% rename from soh/assets/xml/objects/object_zl4.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_zl4.xml diff --git a/soh/assets/xml/objects/object_zo.xml b/soh/assets/xml/GC_NMQ_D/objects/object_zo.xml similarity index 100% rename from soh/assets/xml/objects/object_zo.xml rename to soh/assets/xml/GC_NMQ_D/objects/object_zo.xml diff --git a/soh/assets/xml/overlays/ovl_Arrow_Fire.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Arrow_Fire.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Arrow_Fire.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Arrow_Fire.xml diff --git a/soh/assets/xml/overlays/ovl_Arrow_Ice.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Arrow_Ice.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Arrow_Ice.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Arrow_Ice.xml diff --git a/soh/assets/xml/overlays/ovl_Arrow_Light.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Arrow_Light.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Arrow_Light.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Arrow_Light.xml diff --git a/soh/assets/xml/overlays/ovl_Bg_Ganon_Otyuka.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Bg_Ganon_Otyuka.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Bg_Ganon_Otyuka.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Bg_Ganon_Otyuka.xml diff --git a/soh/assets/xml/overlays/ovl_Bg_Jya_Cobra.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Bg_Jya_Cobra.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Bg_Jya_Cobra.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Bg_Jya_Cobra.xml diff --git a/soh/assets/xml/overlays/ovl_Boss_Dodongo.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Boss_Dodongo.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Boss_Dodongo.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Boss_Dodongo.xml diff --git a/soh/assets/xml/overlays/ovl_Boss_Ganon.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Boss_Ganon.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Boss_Ganon.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Boss_Ganon.xml diff --git a/soh/assets/xml/overlays/ovl_Boss_Ganon2.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Boss_Ganon2.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Boss_Ganon2.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Boss_Ganon2.xml diff --git a/soh/assets/xml/overlays/ovl_Boss_Sst.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Boss_Sst.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Boss_Sst.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Boss_Sst.xml diff --git a/soh/assets/xml/overlays/ovl_Demo_Shd.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Demo_Shd.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Demo_Shd.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Demo_Shd.xml diff --git a/soh/assets/xml/overlays/ovl_Elf_Msg.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Elf_Msg.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Elf_Msg.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Elf_Msg.xml diff --git a/soh/assets/xml/overlays/ovl_Elf_Msg2.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Elf_Msg2.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Elf_Msg2.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Elf_Msg2.xml diff --git a/soh/assets/xml/overlays/ovl_En_Bili.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_En_Bili.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_En_Bili.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_En_Bili.xml diff --git a/soh/assets/xml/overlays/ovl_En_Clear_Tag.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_En_Clear_Tag.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_En_Clear_Tag.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_En_Clear_Tag.xml diff --git a/soh/assets/xml/overlays/ovl_En_Ganon_Mant.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_En_Ganon_Mant.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_En_Ganon_Mant.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_En_Ganon_Mant.xml diff --git a/soh/assets/xml/overlays/ovl_En_Ganon_Organ.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_En_Ganon_Organ.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_En_Ganon_Organ.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_En_Ganon_Organ.xml diff --git a/soh/assets/xml/overlays/ovl_En_Holl.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_En_Holl.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_En_Holl.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_En_Holl.xml diff --git a/soh/assets/xml/overlays/ovl_En_Jsjutan.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_En_Jsjutan.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_En_Jsjutan.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_En_Jsjutan.xml diff --git a/soh/assets/xml/overlays/ovl_En_Kanban.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_En_Kanban.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_En_Kanban.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_En_Kanban.xml diff --git a/soh/assets/xml/overlays/ovl_En_Sda.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_En_Sda.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_En_Sda.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_En_Sda.xml diff --git a/soh/assets/xml/overlays/ovl_En_Ssh.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_En_Ssh.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_En_Ssh.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_En_Ssh.xml diff --git a/soh/assets/xml/overlays/ovl_En_St.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_En_St.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_En_St.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_En_St.xml diff --git a/soh/assets/xml/overlays/ovl_En_Sth.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_En_Sth.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_En_Sth.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_En_Sth.xml diff --git a/soh/assets/xml/overlays/ovl_End_Title.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_End_Title.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_End_Title.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_End_Title.xml diff --git a/soh/assets/xml/overlays/ovl_File_Choose.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_File_Choose.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_File_Choose.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_File_Choose.xml diff --git a/soh/assets/xml/overlays/ovl_Magic_Dark.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Magic_Dark.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Magic_Dark.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Magic_Dark.xml diff --git a/soh/assets/xml/overlays/ovl_Magic_Fire.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Magic_Fire.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Magic_Fire.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Magic_Fire.xml diff --git a/soh/assets/xml/overlays/ovl_Magic_Wind.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Magic_Wind.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Magic_Wind.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Magic_Wind.xml diff --git a/soh/assets/xml/overlays/ovl_Oceff_Spot.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Oceff_Spot.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Oceff_Spot.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Oceff_Spot.xml diff --git a/soh/assets/xml/overlays/ovl_Oceff_Storm.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Oceff_Storm.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Oceff_Storm.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Oceff_Storm.xml diff --git a/soh/assets/xml/overlays/ovl_Oceff_Wipe.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Oceff_Wipe.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Oceff_Wipe.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Oceff_Wipe.xml diff --git a/soh/assets/xml/overlays/ovl_Oceff_Wipe2.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Oceff_Wipe2.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Oceff_Wipe2.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Oceff_Wipe2.xml diff --git a/soh/assets/xml/overlays/ovl_Oceff_Wipe3.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Oceff_Wipe3.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Oceff_Wipe3.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Oceff_Wipe3.xml diff --git a/soh/assets/xml/overlays/ovl_Oceff_Wipe4.xml b/soh/assets/xml/GC_NMQ_D/overlays/ovl_Oceff_Wipe4.xml similarity index 100% rename from soh/assets/xml/overlays/ovl_Oceff_Wipe4.xml rename to soh/assets/xml/GC_NMQ_D/overlays/ovl_Oceff_Wipe4.xml diff --git a/soh/assets/xml/scenes/dungeons/Bmori1.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/Bmori1.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/Bmori1.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/Bmori1.xml diff --git a/soh/assets/xml/scenes/dungeons/FIRE_bs.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/FIRE_bs.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/FIRE_bs.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/FIRE_bs.xml diff --git a/soh/assets/xml/scenes/dungeons/HAKAdan.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/HAKAdan.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/HAKAdan.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/HAKAdan.xml diff --git a/soh/assets/xml/scenes/dungeons/HAKAdanCH.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/HAKAdanCH.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/HAKAdanCH.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/HAKAdanCH.xml diff --git a/soh/assets/xml/scenes/dungeons/HAKAdan_bs.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/HAKAdan_bs.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/HAKAdan_bs.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/HAKAdan_bs.xml diff --git a/soh/assets/xml/scenes/dungeons/HIDAN.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/HIDAN.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/HIDAN.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/HIDAN.xml diff --git a/soh/assets/xml/scenes/dungeons/MIZUsin.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/MIZUsin.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/MIZUsin.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/MIZUsin.xml diff --git a/soh/assets/xml/scenes/dungeons/MIZUsin_bs.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/MIZUsin_bs.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/MIZUsin_bs.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/MIZUsin_bs.xml diff --git a/soh/assets/xml/scenes/dungeons/bdan.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/bdan.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/bdan.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/bdan.xml diff --git a/soh/assets/xml/scenes/dungeons/bdan_boss.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/bdan_boss.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/bdan_boss.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/bdan_boss.xml diff --git a/soh/assets/xml/scenes/dungeons/ddan.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/ddan.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/ddan.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/ddan.xml diff --git a/soh/assets/xml/scenes/dungeons/ddan_boss.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/ddan_boss.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/ddan_boss.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/ddan_boss.xml diff --git a/soh/assets/xml/scenes/dungeons/ganon.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/ganon.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/ganon.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/ganon.xml diff --git a/soh/assets/xml/scenes/dungeons/ganon_boss.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/ganon_boss.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/ganon_boss.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/ganon_boss.xml diff --git a/soh/assets/xml/scenes/dungeons/ganon_demo.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/ganon_demo.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/ganon_demo.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/ganon_demo.xml diff --git a/soh/assets/xml/scenes/dungeons/ganon_final.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/ganon_final.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/ganon_final.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/ganon_final.xml diff --git a/soh/assets/xml/scenes/dungeons/ganon_sonogo.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/ganon_sonogo.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/ganon_sonogo.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/ganon_sonogo.xml diff --git a/soh/assets/xml/scenes/dungeons/ganon_tou.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/ganon_tou.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/ganon_tou.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/ganon_tou.xml diff --git a/soh/assets/xml/scenes/dungeons/ganontika.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/ganontika.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/ganontika.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/ganontika.xml diff --git a/soh/assets/xml/scenes/dungeons/ganontikasonogo.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/ganontikasonogo.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/ganontikasonogo.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/ganontikasonogo.xml diff --git a/soh/assets/xml/scenes/dungeons/gerudoway.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/gerudoway.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/gerudoway.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/gerudoway.xml diff --git a/soh/assets/xml/scenes/dungeons/ice_doukutu.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/ice_doukutu.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/ice_doukutu.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/ice_doukutu.xml diff --git a/soh/assets/xml/scenes/dungeons/jyasinboss.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/jyasinboss.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/jyasinboss.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/jyasinboss.xml diff --git a/soh/assets/xml/scenes/dungeons/jyasinzou.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/jyasinzou.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/jyasinzou.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/jyasinzou.xml diff --git a/soh/assets/xml/scenes/dungeons/men.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/men.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/men.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/men.xml diff --git a/soh/assets/xml/scenes/dungeons/moribossroom.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/moribossroom.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/moribossroom.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/moribossroom.xml diff --git a/soh/assets/xml/scenes/dungeons/ydan.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/ydan.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/ydan.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/ydan.xml diff --git a/soh/assets/xml/scenes/dungeons/ydan_boss.xml b/soh/assets/xml/GC_NMQ_D/scenes/dungeons/ydan_boss.xml similarity index 100% rename from soh/assets/xml/scenes/dungeons/ydan_boss.xml rename to soh/assets/xml/GC_NMQ_D/scenes/dungeons/ydan_boss.xml diff --git a/soh/assets/xml/scenes/indoors/bowling.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/bowling.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/bowling.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/bowling.xml diff --git a/soh/assets/xml/scenes/indoors/daiyousei_izumi.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/daiyousei_izumi.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/daiyousei_izumi.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/daiyousei_izumi.xml diff --git a/soh/assets/xml/scenes/indoors/hairal_niwa.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/hairal_niwa.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/hairal_niwa.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/hairal_niwa.xml diff --git a/soh/assets/xml/scenes/indoors/hairal_niwa2.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/hairal_niwa2.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/hairal_niwa2.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/hairal_niwa2.xml diff --git a/soh/assets/xml/scenes/indoors/hairal_niwa_n.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/hairal_niwa_n.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/hairal_niwa_n.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/hairal_niwa_n.xml diff --git a/soh/assets/xml/scenes/indoors/hakasitarelay.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/hakasitarelay.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/hakasitarelay.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/hakasitarelay.xml diff --git a/soh/assets/xml/scenes/indoors/hut.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/hut.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/hut.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/hut.xml diff --git a/soh/assets/xml/scenes/indoors/hylia_labo.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/hylia_labo.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/hylia_labo.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/hylia_labo.xml diff --git a/soh/assets/xml/scenes/indoors/impa.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/impa.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/impa.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/impa.xml diff --git a/soh/assets/xml/scenes/indoors/kakariko.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/kakariko.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/kakariko.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/kakariko.xml diff --git a/soh/assets/xml/scenes/indoors/kenjyanoma.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/kenjyanoma.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/kenjyanoma.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/kenjyanoma.xml diff --git a/soh/assets/xml/scenes/indoors/kokiri_home.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/kokiri_home.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/kokiri_home.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/kokiri_home.xml diff --git a/soh/assets/xml/scenes/indoors/kokiri_home3.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/kokiri_home3.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/kokiri_home3.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/kokiri_home3.xml diff --git a/soh/assets/xml/scenes/indoors/kokiri_home4.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/kokiri_home4.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/kokiri_home4.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/kokiri_home4.xml diff --git a/soh/assets/xml/scenes/indoors/kokiri_home5.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/kokiri_home5.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/kokiri_home5.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/kokiri_home5.xml diff --git a/soh/assets/xml/scenes/indoors/labo.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/labo.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/labo.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/labo.xml diff --git a/soh/assets/xml/scenes/indoors/link_home.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/link_home.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/link_home.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/link_home.xml diff --git a/soh/assets/xml/scenes/indoors/mahouya.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/mahouya.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/mahouya.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/mahouya.xml diff --git a/soh/assets/xml/scenes/indoors/malon_stable.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/malon_stable.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/malon_stable.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/malon_stable.xml diff --git a/soh/assets/xml/scenes/indoors/miharigoya.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/miharigoya.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/miharigoya.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/miharigoya.xml diff --git a/soh/assets/xml/scenes/indoors/nakaniwa.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/nakaniwa.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/nakaniwa.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/nakaniwa.xml diff --git a/soh/assets/xml/scenes/indoors/syatekijyou.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/syatekijyou.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/syatekijyou.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/syatekijyou.xml diff --git a/soh/assets/xml/scenes/indoors/takaraya.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/takaraya.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/takaraya.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/takaraya.xml diff --git a/soh/assets/xml/scenes/indoors/tent.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/tent.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/tent.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/tent.xml diff --git a/soh/assets/xml/scenes/indoors/tokinoma.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/tokinoma.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/tokinoma.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/tokinoma.xml diff --git a/soh/assets/xml/scenes/indoors/yousei_izumi_tate.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/yousei_izumi_tate.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/yousei_izumi_tate.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/yousei_izumi_tate.xml diff --git a/soh/assets/xml/scenes/indoors/yousei_izumi_yoko.xml b/soh/assets/xml/GC_NMQ_D/scenes/indoors/yousei_izumi_yoko.xml similarity index 100% rename from soh/assets/xml/scenes/indoors/yousei_izumi_yoko.xml rename to soh/assets/xml/GC_NMQ_D/scenes/indoors/yousei_izumi_yoko.xml diff --git a/soh/assets/xml/scenes/misc/enrui.xml b/soh/assets/xml/GC_NMQ_D/scenes/misc/enrui.xml similarity index 100% rename from soh/assets/xml/scenes/misc/enrui.xml rename to soh/assets/xml/GC_NMQ_D/scenes/misc/enrui.xml diff --git a/soh/assets/xml/scenes/misc/entra_n.xml b/soh/assets/xml/GC_NMQ_D/scenes/misc/entra_n.xml similarity index 100% rename from soh/assets/xml/scenes/misc/entra_n.xml rename to soh/assets/xml/GC_NMQ_D/scenes/misc/entra_n.xml diff --git a/soh/assets/xml/scenes/misc/hakaana.xml b/soh/assets/xml/GC_NMQ_D/scenes/misc/hakaana.xml similarity index 100% rename from soh/assets/xml/scenes/misc/hakaana.xml rename to soh/assets/xml/GC_NMQ_D/scenes/misc/hakaana.xml diff --git a/soh/assets/xml/scenes/misc/hakaana2.xml b/soh/assets/xml/GC_NMQ_D/scenes/misc/hakaana2.xml similarity index 100% rename from soh/assets/xml/scenes/misc/hakaana2.xml rename to soh/assets/xml/GC_NMQ_D/scenes/misc/hakaana2.xml diff --git a/soh/assets/xml/scenes/misc/hakaana_ouke.xml b/soh/assets/xml/GC_NMQ_D/scenes/misc/hakaana_ouke.xml similarity index 100% rename from soh/assets/xml/scenes/misc/hakaana_ouke.xml rename to soh/assets/xml/GC_NMQ_D/scenes/misc/hakaana_ouke.xml diff --git a/soh/assets/xml/scenes/misc/hiral_demo.xml b/soh/assets/xml/GC_NMQ_D/scenes/misc/hiral_demo.xml similarity index 100% rename from soh/assets/xml/scenes/misc/hiral_demo.xml rename to soh/assets/xml/GC_NMQ_D/scenes/misc/hiral_demo.xml diff --git a/soh/assets/xml/scenes/misc/kakariko3.xml b/soh/assets/xml/GC_NMQ_D/scenes/misc/kakariko3.xml similarity index 100% rename from soh/assets/xml/scenes/misc/kakariko3.xml rename to soh/assets/xml/GC_NMQ_D/scenes/misc/kakariko3.xml diff --git a/soh/assets/xml/scenes/misc/kakusiana.xml b/soh/assets/xml/GC_NMQ_D/scenes/misc/kakusiana.xml similarity index 100% rename from soh/assets/xml/scenes/misc/kakusiana.xml rename to soh/assets/xml/GC_NMQ_D/scenes/misc/kakusiana.xml diff --git a/soh/assets/xml/scenes/misc/kinsuta.xml b/soh/assets/xml/GC_NMQ_D/scenes/misc/kinsuta.xml similarity index 100% rename from soh/assets/xml/scenes/misc/kinsuta.xml rename to soh/assets/xml/GC_NMQ_D/scenes/misc/kinsuta.xml diff --git a/soh/assets/xml/scenes/misc/market_alley.xml b/soh/assets/xml/GC_NMQ_D/scenes/misc/market_alley.xml similarity index 100% rename from soh/assets/xml/scenes/misc/market_alley.xml rename to soh/assets/xml/GC_NMQ_D/scenes/misc/market_alley.xml diff --git a/soh/assets/xml/scenes/misc/market_alley_n.xml b/soh/assets/xml/GC_NMQ_D/scenes/misc/market_alley_n.xml similarity index 100% rename from soh/assets/xml/scenes/misc/market_alley_n.xml rename to soh/assets/xml/GC_NMQ_D/scenes/misc/market_alley_n.xml diff --git a/soh/assets/xml/scenes/misc/market_day.xml b/soh/assets/xml/GC_NMQ_D/scenes/misc/market_day.xml similarity index 100% rename from soh/assets/xml/scenes/misc/market_day.xml rename to soh/assets/xml/GC_NMQ_D/scenes/misc/market_day.xml diff --git a/soh/assets/xml/scenes/misc/market_night.xml b/soh/assets/xml/GC_NMQ_D/scenes/misc/market_night.xml similarity index 100% rename from soh/assets/xml/scenes/misc/market_night.xml rename to soh/assets/xml/GC_NMQ_D/scenes/misc/market_night.xml diff --git a/soh/assets/xml/scenes/misc/market_ruins.xml b/soh/assets/xml/GC_NMQ_D/scenes/misc/market_ruins.xml similarity index 100% rename from soh/assets/xml/scenes/misc/market_ruins.xml rename to soh/assets/xml/GC_NMQ_D/scenes/misc/market_ruins.xml diff --git a/soh/assets/xml/scenes/misc/shrine.xml b/soh/assets/xml/GC_NMQ_D/scenes/misc/shrine.xml similarity index 100% rename from soh/assets/xml/scenes/misc/shrine.xml rename to soh/assets/xml/GC_NMQ_D/scenes/misc/shrine.xml diff --git a/soh/assets/xml/scenes/misc/shrine_n.xml b/soh/assets/xml/GC_NMQ_D/scenes/misc/shrine_n.xml similarity index 100% rename from soh/assets/xml/scenes/misc/shrine_n.xml rename to soh/assets/xml/GC_NMQ_D/scenes/misc/shrine_n.xml diff --git a/soh/assets/xml/scenes/misc/shrine_r.xml b/soh/assets/xml/GC_NMQ_D/scenes/misc/shrine_r.xml similarity index 100% rename from soh/assets/xml/scenes/misc/shrine_r.xml rename to soh/assets/xml/GC_NMQ_D/scenes/misc/shrine_r.xml diff --git a/soh/assets/xml/scenes/misc/turibori.xml b/soh/assets/xml/GC_NMQ_D/scenes/misc/turibori.xml similarity index 100% rename from soh/assets/xml/scenes/misc/turibori.xml rename to soh/assets/xml/GC_NMQ_D/scenes/misc/turibori.xml diff --git a/soh/assets/xml/scenes/overworld/entra.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/entra.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/entra.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/entra.xml diff --git a/soh/assets/xml/scenes/overworld/souko.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/souko.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/souko.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/souko.xml diff --git a/soh/assets/xml/scenes/overworld/spot00.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/spot00.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/spot00.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/spot00.xml diff --git a/soh/assets/xml/scenes/overworld/spot01.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/spot01.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/spot01.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/spot01.xml diff --git a/soh/assets/xml/scenes/overworld/spot02.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/spot02.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/spot02.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/spot02.xml diff --git a/soh/assets/xml/scenes/overworld/spot03.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/spot03.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/spot03.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/spot03.xml diff --git a/soh/assets/xml/scenes/overworld/spot04.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/spot04.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/spot04.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/spot04.xml diff --git a/soh/assets/xml/scenes/overworld/spot05.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/spot05.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/spot05.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/spot05.xml diff --git a/soh/assets/xml/scenes/overworld/spot06.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/spot06.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/spot06.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/spot06.xml diff --git a/soh/assets/xml/scenes/overworld/spot07.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/spot07.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/spot07.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/spot07.xml diff --git a/soh/assets/xml/scenes/overworld/spot08.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/spot08.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/spot08.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/spot08.xml diff --git a/soh/assets/xml/scenes/overworld/spot09.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/spot09.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/spot09.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/spot09.xml diff --git a/soh/assets/xml/scenes/overworld/spot10.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/spot10.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/spot10.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/spot10.xml diff --git a/soh/assets/xml/scenes/overworld/spot11.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/spot11.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/spot11.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/spot11.xml diff --git a/soh/assets/xml/scenes/overworld/spot12.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/spot12.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/spot12.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/spot12.xml diff --git a/soh/assets/xml/scenes/overworld/spot13.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/spot13.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/spot13.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/spot13.xml diff --git a/soh/assets/xml/scenes/overworld/spot15.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/spot15.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/spot15.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/spot15.xml diff --git a/soh/assets/xml/scenes/overworld/spot16.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/spot16.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/spot16.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/spot16.xml diff --git a/soh/assets/xml/scenes/overworld/spot17.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/spot17.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/spot17.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/spot17.xml diff --git a/soh/assets/xml/scenes/overworld/spot18.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/spot18.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/spot18.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/spot18.xml diff --git a/soh/assets/xml/scenes/overworld/spot20.xml b/soh/assets/xml/GC_NMQ_D/scenes/overworld/spot20.xml similarity index 100% rename from soh/assets/xml/scenes/overworld/spot20.xml rename to soh/assets/xml/GC_NMQ_D/scenes/overworld/spot20.xml diff --git a/soh/assets/xml/scenes/shops/alley_shop.xml b/soh/assets/xml/GC_NMQ_D/scenes/shops/alley_shop.xml similarity index 100% rename from soh/assets/xml/scenes/shops/alley_shop.xml rename to soh/assets/xml/GC_NMQ_D/scenes/shops/alley_shop.xml diff --git a/soh/assets/xml/scenes/shops/drag.xml b/soh/assets/xml/GC_NMQ_D/scenes/shops/drag.xml similarity index 100% rename from soh/assets/xml/scenes/shops/drag.xml rename to soh/assets/xml/GC_NMQ_D/scenes/shops/drag.xml diff --git a/soh/assets/xml/scenes/shops/face_shop.xml b/soh/assets/xml/GC_NMQ_D/scenes/shops/face_shop.xml similarity index 100% rename from soh/assets/xml/scenes/shops/face_shop.xml rename to soh/assets/xml/GC_NMQ_D/scenes/shops/face_shop.xml diff --git a/soh/assets/xml/scenes/shops/golon.xml b/soh/assets/xml/GC_NMQ_D/scenes/shops/golon.xml similarity index 100% rename from soh/assets/xml/scenes/shops/golon.xml rename to soh/assets/xml/GC_NMQ_D/scenes/shops/golon.xml diff --git a/soh/assets/xml/scenes/shops/kokiri_shop.xml b/soh/assets/xml/GC_NMQ_D/scenes/shops/kokiri_shop.xml similarity index 100% rename from soh/assets/xml/scenes/shops/kokiri_shop.xml rename to soh/assets/xml/GC_NMQ_D/scenes/shops/kokiri_shop.xml diff --git a/soh/assets/xml/scenes/shops/night_shop.xml b/soh/assets/xml/GC_NMQ_D/scenes/shops/night_shop.xml similarity index 100% rename from soh/assets/xml/scenes/shops/night_shop.xml rename to soh/assets/xml/GC_NMQ_D/scenes/shops/night_shop.xml diff --git a/soh/assets/xml/scenes/shops/shop1.xml b/soh/assets/xml/GC_NMQ_D/scenes/shops/shop1.xml similarity index 100% rename from soh/assets/xml/scenes/shops/shop1.xml rename to soh/assets/xml/GC_NMQ_D/scenes/shops/shop1.xml diff --git a/soh/assets/xml/scenes/shops/zoora.xml b/soh/assets/xml/GC_NMQ_D/scenes/shops/zoora.xml similarity index 100% rename from soh/assets/xml/scenes/shops/zoora.xml rename to soh/assets/xml/GC_NMQ_D/scenes/shops/zoora.xml diff --git a/soh/assets/xml/scenes/test_levels/besitu.xml b/soh/assets/xml/GC_NMQ_D/scenes/test_levels/besitu.xml similarity index 100% rename from soh/assets/xml/scenes/test_levels/besitu.xml rename to soh/assets/xml/GC_NMQ_D/scenes/test_levels/besitu.xml diff --git a/soh/assets/xml/scenes/test_levels/depth_test.xml b/soh/assets/xml/GC_NMQ_D/scenes/test_levels/depth_test.xml similarity index 100% rename from soh/assets/xml/scenes/test_levels/depth_test.xml rename to soh/assets/xml/GC_NMQ_D/scenes/test_levels/depth_test.xml diff --git a/soh/assets/xml/scenes/test_levels/sasatest.xml b/soh/assets/xml/GC_NMQ_D/scenes/test_levels/sasatest.xml similarity index 100% rename from soh/assets/xml/scenes/test_levels/sasatest.xml rename to soh/assets/xml/GC_NMQ_D/scenes/test_levels/sasatest.xml diff --git a/soh/assets/xml/scenes/test_levels/sutaru.xml b/soh/assets/xml/GC_NMQ_D/scenes/test_levels/sutaru.xml similarity index 100% rename from soh/assets/xml/scenes/test_levels/sutaru.xml rename to soh/assets/xml/GC_NMQ_D/scenes/test_levels/sutaru.xml diff --git a/soh/assets/xml/scenes/test_levels/syotes.xml b/soh/assets/xml/GC_NMQ_D/scenes/test_levels/syotes.xml similarity index 100% rename from soh/assets/xml/scenes/test_levels/syotes.xml rename to soh/assets/xml/GC_NMQ_D/scenes/test_levels/syotes.xml diff --git a/soh/assets/xml/scenes/test_levels/syotes2.xml b/soh/assets/xml/GC_NMQ_D/scenes/test_levels/syotes2.xml similarity index 100% rename from soh/assets/xml/scenes/test_levels/syotes2.xml rename to soh/assets/xml/GC_NMQ_D/scenes/test_levels/syotes2.xml diff --git a/soh/assets/xml/scenes/test_levels/test01.xml b/soh/assets/xml/GC_NMQ_D/scenes/test_levels/test01.xml similarity index 100% rename from soh/assets/xml/scenes/test_levels/test01.xml rename to soh/assets/xml/GC_NMQ_D/scenes/test_levels/test01.xml diff --git a/soh/assets/xml/scenes/test_levels/testroom.xml b/soh/assets/xml/GC_NMQ_D/scenes/test_levels/testroom.xml similarity index 100% rename from soh/assets/xml/scenes/test_levels/testroom.xml rename to soh/assets/xml/GC_NMQ_D/scenes/test_levels/testroom.xml diff --git a/soh/assets/xml/text/elf_message_field.xml b/soh/assets/xml/GC_NMQ_D/text/elf_message_field.xml similarity index 100% rename from soh/assets/xml/text/elf_message_field.xml rename to soh/assets/xml/GC_NMQ_D/text/elf_message_field.xml diff --git a/soh/assets/xml/text/elf_message_ydan.xml b/soh/assets/xml/GC_NMQ_D/text/elf_message_ydan.xml similarity index 100% rename from soh/assets/xml/text/elf_message_ydan.xml rename to soh/assets/xml/GC_NMQ_D/text/elf_message_ydan.xml diff --git a/soh/assets/xml/text/nes_message_data_static.xml b/soh/assets/xml/GC_NMQ_D/text/nes_message_data_static.xml similarity index 100% rename from soh/assets/xml/text/nes_message_data_static.xml rename to soh/assets/xml/GC_NMQ_D/text/nes_message_data_static.xml diff --git a/soh/assets/xml/text/staff_message_data_static.xml b/soh/assets/xml/GC_NMQ_D/text/staff_message_data_static.xml similarity index 100% rename from soh/assets/xml/text/staff_message_data_static.xml rename to soh/assets/xml/GC_NMQ_D/text/staff_message_data_static.xml diff --git a/soh/assets/xml/textures/backgrounds.xml b/soh/assets/xml/GC_NMQ_D/textures/backgrounds.xml similarity index 100% rename from soh/assets/xml/textures/backgrounds.xml rename to soh/assets/xml/GC_NMQ_D/textures/backgrounds.xml diff --git a/soh/assets/xml/textures/do_action_static.xml b/soh/assets/xml/GC_NMQ_D/textures/do_action_static.xml similarity index 100% rename from soh/assets/xml/textures/do_action_static.xml rename to soh/assets/xml/GC_NMQ_D/textures/do_action_static.xml diff --git a/soh/assets/xml/textures/icon_item_24_static.xml b/soh/assets/xml/GC_NMQ_D/textures/icon_item_24_static.xml similarity index 100% rename from soh/assets/xml/textures/icon_item_24_static.xml rename to soh/assets/xml/GC_NMQ_D/textures/icon_item_24_static.xml diff --git a/soh/assets/xml/textures/icon_item_dungeon_static.xml b/soh/assets/xml/GC_NMQ_D/textures/icon_item_dungeon_static.xml similarity index 100% rename from soh/assets/xml/textures/icon_item_dungeon_static.xml rename to soh/assets/xml/GC_NMQ_D/textures/icon_item_dungeon_static.xml diff --git a/soh/assets/xml/textures/icon_item_field_static.xml b/soh/assets/xml/GC_NMQ_D/textures/icon_item_field_static.xml similarity index 100% rename from soh/assets/xml/textures/icon_item_field_static.xml rename to soh/assets/xml/GC_NMQ_D/textures/icon_item_field_static.xml diff --git a/soh/assets/xml/textures/icon_item_fra_static.xml b/soh/assets/xml/GC_NMQ_D/textures/icon_item_fra_static.xml similarity index 100% rename from soh/assets/xml/textures/icon_item_fra_static.xml rename to soh/assets/xml/GC_NMQ_D/textures/icon_item_fra_static.xml diff --git a/soh/assets/xml/textures/icon_item_gameover_static.xml b/soh/assets/xml/GC_NMQ_D/textures/icon_item_gameover_static.xml similarity index 100% rename from soh/assets/xml/textures/icon_item_gameover_static.xml rename to soh/assets/xml/GC_NMQ_D/textures/icon_item_gameover_static.xml diff --git a/soh/assets/xml/textures/icon_item_ger_static.xml b/soh/assets/xml/GC_NMQ_D/textures/icon_item_ger_static.xml similarity index 100% rename from soh/assets/xml/textures/icon_item_ger_static.xml rename to soh/assets/xml/GC_NMQ_D/textures/icon_item_ger_static.xml diff --git a/soh/assets/xml/textures/icon_item_nes_static.xml b/soh/assets/xml/GC_NMQ_D/textures/icon_item_nes_static.xml similarity index 100% rename from soh/assets/xml/textures/icon_item_nes_static.xml rename to soh/assets/xml/GC_NMQ_D/textures/icon_item_nes_static.xml diff --git a/soh/assets/xml/textures/icon_item_static.xml b/soh/assets/xml/GC_NMQ_D/textures/icon_item_static.xml similarity index 100% rename from soh/assets/xml/textures/icon_item_static.xml rename to soh/assets/xml/GC_NMQ_D/textures/icon_item_static.xml diff --git a/soh/assets/xml/textures/item_name_static.xml b/soh/assets/xml/GC_NMQ_D/textures/item_name_static.xml similarity index 100% rename from soh/assets/xml/textures/item_name_static.xml rename to soh/assets/xml/GC_NMQ_D/textures/item_name_static.xml diff --git a/soh/assets/xml/textures/map_48x85_static.xml b/soh/assets/xml/GC_NMQ_D/textures/map_48x85_static.xml similarity index 100% rename from soh/assets/xml/textures/map_48x85_static.xml rename to soh/assets/xml/GC_NMQ_D/textures/map_48x85_static.xml diff --git a/soh/assets/xml/textures/map_grand_static.xml b/soh/assets/xml/GC_NMQ_D/textures/map_grand_static.xml similarity index 100% rename from soh/assets/xml/textures/map_grand_static.xml rename to soh/assets/xml/GC_NMQ_D/textures/map_grand_static.xml diff --git a/soh/assets/xml/textures/map_i_static.xml b/soh/assets/xml/GC_NMQ_D/textures/map_i_static.xml similarity index 100% rename from soh/assets/xml/textures/map_i_static.xml rename to soh/assets/xml/GC_NMQ_D/textures/map_i_static.xml diff --git a/soh/assets/xml/textures/map_name_static.xml b/soh/assets/xml/GC_NMQ_D/textures/map_name_static.xml similarity index 100% rename from soh/assets/xml/textures/map_name_static.xml rename to soh/assets/xml/GC_NMQ_D/textures/map_name_static.xml diff --git a/soh/assets/xml/textures/message_static.xml b/soh/assets/xml/GC_NMQ_D/textures/message_static.xml similarity index 100% rename from soh/assets/xml/textures/message_static.xml rename to soh/assets/xml/GC_NMQ_D/textures/message_static.xml diff --git a/soh/assets/xml/textures/message_texture_static.xml b/soh/assets/xml/GC_NMQ_D/textures/message_texture_static.xml similarity index 100% rename from soh/assets/xml/textures/message_texture_static.xml rename to soh/assets/xml/GC_NMQ_D/textures/message_texture_static.xml diff --git a/soh/assets/xml/textures/nes_font_static.xml b/soh/assets/xml/GC_NMQ_D/textures/nes_font_static.xml similarity index 100% rename from soh/assets/xml/textures/nes_font_static.xml rename to soh/assets/xml/GC_NMQ_D/textures/nes_font_static.xml diff --git a/soh/assets/xml/textures/nintendo_rogo_static.xml b/soh/assets/xml/GC_NMQ_D/textures/nintendo_rogo_static.xml similarity index 100% rename from soh/assets/xml/textures/nintendo_rogo_static.xml rename to soh/assets/xml/GC_NMQ_D/textures/nintendo_rogo_static.xml diff --git a/soh/assets/xml/textures/parameter_static.xml b/soh/assets/xml/GC_NMQ_D/textures/parameter_static.xml similarity index 100% rename from soh/assets/xml/textures/parameter_static.xml rename to soh/assets/xml/GC_NMQ_D/textures/parameter_static.xml diff --git a/soh/assets/xml/textures/place_title_cards.xml b/soh/assets/xml/GC_NMQ_D/textures/place_title_cards.xml similarity index 100% rename from soh/assets/xml/textures/place_title_cards.xml rename to soh/assets/xml/GC_NMQ_D/textures/place_title_cards.xml diff --git a/soh/assets/xml/textures/skyboxes.xml b/soh/assets/xml/GC_NMQ_D/textures/skyboxes.xml similarity index 100% rename from soh/assets/xml/textures/skyboxes.xml rename to soh/assets/xml/GC_NMQ_D/textures/skyboxes.xml diff --git a/soh/assets/xml/textures/title_static.xml b/soh/assets/xml/GC_NMQ_D/textures/title_static.xml similarity index 100% rename from soh/assets/xml/textures/title_static.xml rename to soh/assets/xml/GC_NMQ_D/textures/title_static.xml diff --git a/soh/assets/xml/GC_NMQ_PAL_F/code/fbdemo_circle.xml b/soh/assets/xml/GC_NMQ_PAL_F/code/fbdemo_circle.xml new file mode 100644 index 000000000..a3add03bc --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/code/fbdemo_circle.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/code/fbdemo_triforce.xml b/soh/assets/xml/GC_NMQ_PAL_F/code/fbdemo_triforce.xml new file mode 100644 index 000000000..f4eff13ae --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/code/fbdemo_triforce.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/code/fbdemo_wipe1.xml b/soh/assets/xml/GC_NMQ_PAL_F/code/fbdemo_wipe1.xml new file mode 100644 index 000000000..537706cd1 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/code/fbdemo_wipe1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/misc/link_animetion.xml b/soh/assets/xml/GC_NMQ_PAL_F/misc/link_animetion.xml new file mode 100644 index 000000000..9de1e92d3 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/misc/link_animetion.xml @@ -0,0 +1,577 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/gameplay_dangeon_keep.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/gameplay_dangeon_keep.xml new file mode 100644 index 000000000..d16eb4c41 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/gameplay_dangeon_keep.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/gameplay_field_keep.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/gameplay_field_keep.xml new file mode 100644 index 000000000..28fa975d7 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/gameplay_field_keep.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/gameplay_keep.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/gameplay_keep.xml new file mode 100644 index 000000000..45c669307 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/gameplay_keep.xml @@ -0,0 +1,960 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_Bb.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_Bb.xml new file mode 100644 index 000000000..5d04bde45 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_Bb.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ahg.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ahg.xml new file mode 100644 index 000000000..a32c00914 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ahg.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_am.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_am.xml new file mode 100644 index 000000000..0a4b88ddf --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_am.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ane.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ane.xml new file mode 100644 index 000000000..1e29b351e --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ane.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ani.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ani.xml new file mode 100644 index 000000000..c69656043 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ani.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_anubice.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_anubice.xml new file mode 100644 index 000000000..2140187e4 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_anubice.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_aob.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_aob.xml new file mode 100644 index 000000000..e6202d0cf --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_aob.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_b_heart.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_b_heart.xml new file mode 100644 index 000000000..00f7cd677 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_b_heart.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bba.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bba.xml new file mode 100644 index 000000000..ccc5c2136 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bba.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bdan_objects.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bdan_objects.xml new file mode 100644 index 000000000..dcd56d385 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bdan_objects.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bdoor.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bdoor.xml new file mode 100644 index 000000000..644c06ea8 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bdoor.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bg.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bg.xml new file mode 100644 index 000000000..791226b71 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bg.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bigokuta.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bigokuta.xml new file mode 100644 index 000000000..1c7d39e31 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bigokuta.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bird.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bird.xml new file mode 100644 index 000000000..167a5022d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bird.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bji.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bji.xml new file mode 100644 index 000000000..e6b6c4221 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bji.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bl.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bl.xml new file mode 100644 index 000000000..1c2ef4ec6 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bl.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_blkobj.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_blkobj.xml new file mode 100644 index 000000000..a073077b8 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_blkobj.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bob.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bob.xml new file mode 100644 index 000000000..289e994e4 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bob.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_boj.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_boj.xml new file mode 100644 index 000000000..4cc39906e --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_boj.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bombf.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bombf.xml new file mode 100644 index 000000000..83e60248d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bombf.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bombiwa.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bombiwa.xml new file mode 100644 index 000000000..26ab6b4f3 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bombiwa.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bowl.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bowl.xml new file mode 100644 index 000000000..ffe6d43db --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bowl.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_box.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_box.xml new file mode 100644 index 000000000..efcec619b --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_box.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_brob.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_brob.xml new file mode 100644 index 000000000..718dcd561 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_brob.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bubble.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bubble.xml new file mode 100644 index 000000000..f5de18692 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bubble.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bv.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bv.xml new file mode 100644 index 000000000..83ff039f5 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bv.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bw.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bw.xml new file mode 100644 index 000000000..f7d5ecead --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bw.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bwall.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bwall.xml new file mode 100644 index 000000000..d4f43ddc1 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bwall.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bxa.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bxa.xml new file mode 100644 index 000000000..fb78c117e --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_bxa.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_cne.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_cne.xml new file mode 100644 index 000000000..ce9c16082 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_cne.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_cob.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_cob.xml new file mode 100644 index 000000000..ba051cfa7 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_cob.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_cow.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_cow.xml new file mode 100644 index 000000000..5d067c329 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_cow.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_crow.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_crow.xml new file mode 100644 index 000000000..77337c644 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_crow.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_cs.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_cs.xml new file mode 100644 index 000000000..83804ccaf --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_cs.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_d_elevator.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_d_elevator.xml new file mode 100644 index 000000000..6be59c154 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_d_elevator.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_d_hsblock.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_d_hsblock.xml new file mode 100644 index 000000000..b9111b38b --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_d_hsblock.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_d_lift.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_d_lift.xml new file mode 100644 index 000000000..291238519 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_d_lift.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_daiku.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_daiku.xml new file mode 100644 index 000000000..1524c7a26 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_daiku.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ddan_objects.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ddan_objects.xml new file mode 100644 index 000000000..3fc563b96 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ddan_objects.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dekubaba.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dekubaba.xml new file mode 100644 index 000000000..7202a833f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dekubaba.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dekujr.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dekujr.xml new file mode 100644 index 000000000..e906bf61c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dekujr.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dekunuts.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dekunuts.xml new file mode 100644 index 000000000..5fceef416 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dekunuts.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_demo_6k.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_demo_6k.xml new file mode 100644 index 000000000..73058d5e4 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_demo_6k.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_demo_kekkai.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_demo_kekkai.xml new file mode 100644 index 000000000..1b9c9b402 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_demo_kekkai.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_demo_tre_lgt.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_demo_tre_lgt.xml new file mode 100644 index 000000000..9ea19012b --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_demo_tre_lgt.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dh.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dh.xml new file mode 100644 index 000000000..7a52d7dbe --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dh.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dnk.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dnk.xml new file mode 100644 index 000000000..b1e79464b --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dnk.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dns.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dns.xml new file mode 100644 index 000000000..086c4bd11 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dns.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dodojr.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dodojr.xml new file mode 100644 index 000000000..4dfd7d6e4 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dodojr.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dodongo.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dodongo.xml new file mode 100644 index 000000000..779e20e9d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dodongo.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dog.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dog.xml new file mode 100644 index 000000000..ef00442b6 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dog.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_door_gerudo.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_door_gerudo.xml new file mode 100644 index 000000000..2f1726204 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_door_gerudo.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_door_killer.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_door_killer.xml new file mode 100644 index 000000000..a37f590d6 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_door_killer.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ds.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ds.xml new file mode 100644 index 000000000..0413a9e2e --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ds.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ds2.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ds2.xml new file mode 100644 index 000000000..683bcc68d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ds2.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_du.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_du.xml new file mode 100644 index 000000000..44bbd1aa0 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_du.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dy_obj.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dy_obj.xml new file mode 100644 index 000000000..4d141d546 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_dy_obj.xml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ec.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ec.xml new file mode 100644 index 000000000..7ec83e284 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ec.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_crystal_light.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_crystal_light.xml new file mode 100644 index 000000000..9215b6a39 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_crystal_light.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_doughnut.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_doughnut.xml new file mode 100644 index 000000000..7f12c56f5 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_doughnut.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_erupc.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_erupc.xml new file mode 100644 index 000000000..800d9535f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_erupc.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_fire_ball.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_fire_ball.xml new file mode 100644 index 000000000..2fc65b16f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_fire_ball.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_flash.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_flash.xml new file mode 100644 index 000000000..5f962f162 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_flash.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_lgt_shower.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_lgt_shower.xml new file mode 100644 index 000000000..67ef5ce7e --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_lgt_shower.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_star_field.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_star_field.xml new file mode 100644 index 000000000..00b47c460 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_star_field.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_tw.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_tw.xml new file mode 100644 index 000000000..de5376569 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_efc_tw.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ei.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ei.xml new file mode 100644 index 000000000..e4132491f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ei.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fa.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fa.xml new file mode 100644 index 000000000..2f1bf9a5e --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fa.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fd.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fd.xml new file mode 100644 index 000000000..1b96e9f22 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fd.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fd2.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fd2.xml new file mode 100644 index 000000000..8689098b9 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fd2.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fhg.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fhg.xml new file mode 100644 index 000000000..f3a4a55ca --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fhg.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fire.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fire.xml new file mode 100644 index 000000000..49bf620cb --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fire.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_firefly.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_firefly.xml new file mode 100644 index 000000000..8c26a4341 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_firefly.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fish.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fish.xml new file mode 100644 index 000000000..f5ad4f6da --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fish.xml @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fr.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fr.xml new file mode 100644 index 000000000..25ee2ad42 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fr.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fu.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fu.xml new file mode 100644 index 000000000..82c449e3d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fu.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fw.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fw.xml new file mode 100644 index 000000000..e71f83092 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fw.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fz.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fz.xml new file mode 100644 index 000000000..dad6fec5c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_fz.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon.xml new file mode 100644 index 000000000..96adabb2b --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon2.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon2.xml new file mode 100644 index 000000000..8b66cfcc2 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon2.xml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon_anime1.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon_anime1.xml new file mode 100644 index 000000000..6021fdd9b --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon_anime1.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon_anime2.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon_anime2.xml new file mode 100644 index 000000000..96121689e --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon_anime2.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon_anime3.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon_anime3.xml new file mode 100644 index 000000000..2af1e94f9 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon_anime3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon_objects.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon_objects.xml new file mode 100644 index 000000000..5e32610ff --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ganon_objects.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ge1.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ge1.xml new file mode 100644 index 000000000..79e0768b8 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ge1.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_geff.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_geff.xml new file mode 100644 index 000000000..f0667743b --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_geff.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_geldb.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_geldb.xml new file mode 100644 index 000000000..a1dbd18f4 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_geldb.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_arrow.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_arrow.xml new file mode 100644 index 000000000..4b58787a9 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_arrow.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_arrowcase.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_arrowcase.xml new file mode 100644 index 000000000..267b0a734 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_arrowcase.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bean.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bean.xml new file mode 100644 index 000000000..e74247816 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bean.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bomb_1.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bomb_1.xml new file mode 100644 index 000000000..bae86c11d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bomb_1.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bomb_2.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bomb_2.xml new file mode 100644 index 000000000..1400c4a4d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bomb_2.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bombpouch.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bombpouch.xml new file mode 100644 index 000000000..07134748c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bombpouch.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_boomerang.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_boomerang.xml new file mode 100644 index 000000000..3c1a0fe7f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_boomerang.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_boots_2.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_boots_2.xml new file mode 100644 index 000000000..8e9cd1028 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_boots_2.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bosskey.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bosskey.xml new file mode 100644 index 000000000..e5e4bc86c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bosskey.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bottle.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bottle.xml new file mode 100644 index 000000000..3b0884a03 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bottle.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bottle_letter.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bottle_letter.xml new file mode 100644 index 000000000..443219caf --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bottle_letter.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bow.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bow.xml new file mode 100644 index 000000000..946e9c496 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bow.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bracelet.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bracelet.xml new file mode 100644 index 000000000..5a0b62a60 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_bracelet.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_brokensword.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_brokensword.xml new file mode 100644 index 000000000..408741ac5 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_brokensword.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_butterfly.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_butterfly.xml new file mode 100644 index 000000000..76ac70609 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_butterfly.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_clothes.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_clothes.xml new file mode 100644 index 000000000..2a10dce11 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_clothes.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_coin.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_coin.xml new file mode 100644 index 000000000..22e29f255 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_coin.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_compass.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_compass.xml new file mode 100644 index 000000000..076229b11 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_compass.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_dekupouch.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_dekupouch.xml new file mode 100644 index 000000000..3d6d95d98 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_dekupouch.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_egg.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_egg.xml new file mode 100644 index 000000000..2b2e2847d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_egg.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_eye_lotion.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_eye_lotion.xml new file mode 100644 index 000000000..5128c5f6f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_eye_lotion.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_fire.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_fire.xml new file mode 100644 index 000000000..a57fba6e8 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_fire.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_fish.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_fish.xml new file mode 100644 index 000000000..edb39dc29 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_fish.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_frog.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_frog.xml new file mode 100644 index 000000000..f180fd267 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_frog.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_gerudo.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_gerudo.xml new file mode 100644 index 000000000..3be8d3462 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_gerudo.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_gerudomask.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_gerudomask.xml new file mode 100644 index 000000000..b53bf24af --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_gerudomask.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_ghost.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_ghost.xml new file mode 100644 index 000000000..186f4c74b --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_ghost.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_glasses.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_glasses.xml new file mode 100644 index 000000000..63d32ab5a --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_glasses.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_gloves.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_gloves.xml new file mode 100644 index 000000000..1b4282dca --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_gloves.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_goddess.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_goddess.xml new file mode 100644 index 000000000..50cbdd891 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_goddess.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_golonmask.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_golonmask.xml new file mode 100644 index 000000000..98f53f1c2 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_golonmask.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_grass.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_grass.xml new file mode 100644 index 000000000..ae7834201 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_grass.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_hammer.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_hammer.xml new file mode 100644 index 000000000..feb5c8659 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_hammer.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_heart.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_heart.xml new file mode 100644 index 000000000..48e78b1b5 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_heart.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_hearts.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_hearts.xml new file mode 100644 index 000000000..d2e763e63 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_hearts.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_hookshot.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_hookshot.xml new file mode 100644 index 000000000..a6b3b0fda --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_hookshot.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_hoverboots.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_hoverboots.xml new file mode 100644 index 000000000..c4a67877b --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_hoverboots.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_insect.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_insect.xml new file mode 100644 index 000000000..7af5b5b3b --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_insect.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_jewel.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_jewel.xml new file mode 100644 index 000000000..e83c65116 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_jewel.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_key.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_key.xml new file mode 100644 index 000000000..a37d45a71 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_key.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_ki_tan_mask.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_ki_tan_mask.xml new file mode 100644 index 000000000..f66535af3 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_ki_tan_mask.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_letter.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_letter.xml new file mode 100644 index 000000000..167a7ff5d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_letter.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_liquid.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_liquid.xml new file mode 100644 index 000000000..5eeeca0fd --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_liquid.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_longsword.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_longsword.xml new file mode 100644 index 000000000..7161e42e3 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_longsword.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_m_arrow.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_m_arrow.xml new file mode 100644 index 000000000..0fd659ae9 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_m_arrow.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_magicpot.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_magicpot.xml new file mode 100644 index 000000000..7623e6353 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_magicpot.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_map.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_map.xml new file mode 100644 index 000000000..8887dd22c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_map.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_medal.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_medal.xml new file mode 100644 index 000000000..28e5b1e68 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_medal.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_melody.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_melody.xml new file mode 100644 index 000000000..b01fca953 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_melody.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_milk.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_milk.xml new file mode 100644 index 000000000..00b9530d9 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_milk.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_mushroom.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_mushroom.xml new file mode 100644 index 000000000..5b19bca74 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_mushroom.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_niwatori.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_niwatori.xml new file mode 100644 index 000000000..713cc1ce5 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_niwatori.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_nuts.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_nuts.xml new file mode 100644 index 000000000..5508fe856 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_nuts.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_ocarina.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_ocarina.xml new file mode 100644 index 000000000..7693cc122 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_ocarina.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_ocarina_0.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_ocarina_0.xml new file mode 100644 index 000000000..336d33894 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_ocarina_0.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_pachinko.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_pachinko.xml new file mode 100644 index 000000000..5f808baf9 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_pachinko.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_powder.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_powder.xml new file mode 100644 index 000000000..fb7dc0155 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_powder.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_prescription.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_prescription.xml new file mode 100644 index 000000000..081de301c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_prescription.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_purse.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_purse.xml new file mode 100644 index 000000000..3034942ff --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_purse.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_rabit_mask.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_rabit_mask.xml new file mode 100644 index 000000000..75f855550 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_rabit_mask.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_redead_mask.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_redead_mask.xml new file mode 100644 index 000000000..7de08487f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_redead_mask.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_rupy.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_rupy.xml new file mode 100644 index 000000000..0a1af96d0 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_rupy.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_saw.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_saw.xml new file mode 100644 index 000000000..dcc038b7c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_saw.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_scale.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_scale.xml new file mode 100644 index 000000000..1cf5de5b9 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_scale.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_seed.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_seed.xml new file mode 100644 index 000000000..82c15c82d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_seed.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_shield_1.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_shield_1.xml new file mode 100644 index 000000000..2e9369569 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_shield_1.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_shield_2.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_shield_2.xml new file mode 100644 index 000000000..176ae025f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_shield_2.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_shield_3.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_shield_3.xml new file mode 100644 index 000000000..250bf7fea --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_shield_3.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_skj_mask.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_skj_mask.xml new file mode 100644 index 000000000..e6c90f76f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_skj_mask.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_soldout.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_soldout.xml new file mode 100644 index 000000000..ae3f4685f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_soldout.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_soul.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_soul.xml new file mode 100644 index 000000000..76ffc5685 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_soul.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_stick.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_stick.xml new file mode 100644 index 000000000..fed89f465 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_stick.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_sutaru.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_sutaru.xml new file mode 100644 index 000000000..a2606afbe --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_sutaru.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_sword_1.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_sword_1.xml new file mode 100644 index 000000000..e1119abca --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_sword_1.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_ticketstone.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_ticketstone.xml new file mode 100644 index 000000000..0fa37fe11 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_ticketstone.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_truth_mask.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_truth_mask.xml new file mode 100644 index 000000000..f28c7cbca --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_truth_mask.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_zoramask.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_zoramask.xml new file mode 100644 index 000000000..096fdeedf --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gi_zoramask.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gj.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gj.xml new file mode 100644 index 000000000..50d6337b4 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gj.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gjyo_objects.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gjyo_objects.xml new file mode 100644 index 000000000..ea4f8444f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gjyo_objects.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gla.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gla.xml new file mode 100644 index 000000000..499a3720d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gla.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gm.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gm.xml new file mode 100644 index 000000000..91b10cc42 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gm.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gnd.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gnd.xml new file mode 100644 index 000000000..dfbe02315 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gnd.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gnd_magic.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gnd_magic.xml new file mode 100644 index 000000000..a88d419d7 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gnd_magic.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gndd.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gndd.xml new file mode 100644 index 000000000..96e264c34 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gndd.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_god_lgt.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_god_lgt.xml new file mode 100644 index 000000000..60df9e469 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_god_lgt.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gol.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gol.xml new file mode 100644 index 000000000..7e04508cb --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gol.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_goma.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_goma.xml new file mode 100644 index 000000000..e7a6d0a54 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_goma.xml @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_goroiwa.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_goroiwa.xml new file mode 100644 index 000000000..5d406e957 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_goroiwa.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gr.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gr.xml new file mode 100644 index 000000000..103d4412e --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gr.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gs.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gs.xml new file mode 100644 index 000000000..145be1665 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gs.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gt.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gt.xml new file mode 100644 index 000000000..1d79d4e39 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_gt.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_haka.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_haka.xml new file mode 100644 index 000000000..f6b263c37 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_haka.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_haka_door.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_haka_door.xml new file mode 100644 index 000000000..753492445 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_haka_door.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_haka_objects.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_haka_objects.xml new file mode 100644 index 000000000..3ca6d27c0 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_haka_objects.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_hakach_objects.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_hakach_objects.xml new file mode 100644 index 000000000..b978e77a3 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_hakach_objects.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_hata.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_hata.xml new file mode 100644 index 000000000..b0324c3be --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_hata.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_heavy_object.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_heavy_object.xml new file mode 100644 index 000000000..ecc795321 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_heavy_object.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_hidan_objects.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_hidan_objects.xml new file mode 100644 index 000000000..5c54244bb --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_hidan_objects.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_hintnuts.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_hintnuts.xml new file mode 100644 index 000000000..f419f7546 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_hintnuts.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_hni.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_hni.xml new file mode 100644 index 000000000..6b317eb7a --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_hni.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_horse.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_horse.xml new file mode 100644 index 000000000..74619e597 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_horse.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_horse_ganon.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_horse_ganon.xml new file mode 100644 index 000000000..98babb080 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_horse_ganon.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_horse_link_child.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_horse_link_child.xml new file mode 100644 index 000000000..1491189a1 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_horse_link_child.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_horse_normal.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_horse_normal.xml new file mode 100644 index 000000000..2bc2cb0c6 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_horse_normal.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_horse_zelda.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_horse_zelda.xml new file mode 100644 index 000000000..9595c3245 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_horse_zelda.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_hs.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_hs.xml new file mode 100644 index 000000000..cf5d06e1a --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_hs.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_human.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_human.xml new file mode 100644 index 000000000..c52398446 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_human.xml @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ice_objects.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ice_objects.xml new file mode 100644 index 000000000..a4e2e9b12 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ice_objects.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ik.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ik.xml new file mode 100644 index 000000000..95606e6df --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ik.xml @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_im.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_im.xml new file mode 100644 index 000000000..a628a113a --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_im.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_in.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_in.xml new file mode 100644 index 000000000..84c114047 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_in.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ingate.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ingate.xml new file mode 100644 index 000000000..e6be42beb --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ingate.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_jj.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_jj.xml new file mode 100644 index 000000000..62bae8cb9 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_jj.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_js.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_js.xml new file mode 100644 index 000000000..ff7bd3efa --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_js.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_jya_door.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_jya_door.xml new file mode 100644 index 000000000..60a7b3788 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_jya_door.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_jya_iron.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_jya_iron.xml new file mode 100644 index 000000000..c6f6773c6 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_jya_iron.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_jya_obj.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_jya_obj.xml new file mode 100644 index 000000000..4a203b0b9 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_jya_obj.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ka.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ka.xml new file mode 100644 index 000000000..eb952732b --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ka.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_kanban.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_kanban.xml new file mode 100644 index 000000000..9ffc7a2ce --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_kanban.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_kibako2.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_kibako2.xml new file mode 100644 index 000000000..a701b294d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_kibako2.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_kingdodongo.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_kingdodongo.xml new file mode 100644 index 000000000..9b104b3ea --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_kingdodongo.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_km1.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_km1.xml new file mode 100644 index 000000000..0a918a798 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_km1.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_kusa.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_kusa.xml new file mode 100644 index 000000000..67291a554 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_kusa.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_kw1.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_kw1.xml new file mode 100644 index 000000000..eab561b1f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_kw1.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_kz.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_kz.xml new file mode 100644 index 000000000..20aeec4d9 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_kz.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_light_ring.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_light_ring.xml new file mode 100644 index 000000000..babe7d2aa --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_light_ring.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_lightbox.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_lightbox.xml new file mode 100644 index 000000000..552a79d7c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_lightbox.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_lightswitch.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_lightswitch.xml new file mode 100644 index 000000000..cfd5dcfb4 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_lightswitch.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_link_boy.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_link_boy.xml new file mode 100644 index 000000000..2f3cd943c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_link_boy.xml @@ -0,0 +1,271 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_link_child.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_link_child.xml new file mode 100644 index 000000000..0de400373 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_link_child.xml @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ma1.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ma1.xml new file mode 100644 index 000000000..63eeb3895 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ma1.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ma2.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ma2.xml new file mode 100644 index 000000000..ce5910fb8 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ma2.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mag.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mag.xml new file mode 100644 index 000000000..e691fbeb3 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mag.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mamenoki.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mamenoki.xml new file mode 100644 index 000000000..819d89022 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mamenoki.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mastergolon.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mastergolon.xml new file mode 100644 index 000000000..6dd9d1659 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mastergolon.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_masterkokiri.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_masterkokiri.xml new file mode 100644 index 000000000..af5a9ec15 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_masterkokiri.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_masterkokirihead.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_masterkokirihead.xml new file mode 100644 index 000000000..1e489323c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_masterkokirihead.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_masterzoora.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_masterzoora.xml new file mode 100644 index 000000000..2c703274e --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_masterzoora.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mb.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mb.xml new file mode 100644 index 000000000..a8471429d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mb.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_md.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_md.xml new file mode 100644 index 000000000..0c80fb780 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_md.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_medal.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_medal.xml new file mode 100644 index 000000000..533872a55 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_medal.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_menkuri_objects.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_menkuri_objects.xml new file mode 100644 index 000000000..4c2b51df5 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_menkuri_objects.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mir_ray.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mir_ray.xml new file mode 100644 index 000000000..2acc9391a --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mir_ray.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mizu_objects.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mizu_objects.xml new file mode 100644 index 000000000..1abd73bc0 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mizu_objects.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin.xml new file mode 100644 index 000000000..daf9b0541 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_dark.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_dark.xml new file mode 100644 index 000000000..2fa0bdbe4 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_dark.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_flame.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_flame.xml new file mode 100644 index 000000000..6274feaee --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_flame.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_flash.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_flash.xml new file mode 100644 index 000000000..c1040ea11 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_flash.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_ice.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_ice.xml new file mode 100644 index 000000000..1aaeea193 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_ice.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_oka.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_oka.xml new file mode 100644 index 000000000..0f823b923 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_oka.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_soul.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_soul.xml new file mode 100644 index 000000000..6386f7f9e --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_soul.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_wind.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_wind.xml new file mode 100644 index 000000000..8bba7eb91 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mjin_wind.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mk.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mk.xml new file mode 100644 index 000000000..0b4aaae8a --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mk.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mm.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mm.xml new file mode 100644 index 000000000..834afe5ef --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mm.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mo.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mo.xml new file mode 100644 index 000000000..526fa94dd --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mo.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_hineri1.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_hineri1.xml new file mode 100644 index 000000000..bb1b31e2f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_hineri1.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_hineri1a.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_hineri1a.xml new file mode 100644 index 000000000..c750ce20d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_hineri1a.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_hineri2.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_hineri2.xml new file mode 100644 index 000000000..785b85857 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_hineri2.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_hineri2a.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_hineri2a.xml new file mode 100644 index 000000000..ad1bb4d5f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_hineri2a.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_objects.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_objects.xml new file mode 100644 index 000000000..58ea8c085 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_objects.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_tex.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_tex.xml new file mode 100644 index 000000000..b1a4b803c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mori_tex.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ms.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ms.xml new file mode 100644 index 000000000..a87d0e6b3 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ms.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mu.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mu.xml new file mode 100644 index 000000000..7251ff721 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_mu.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_nb.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_nb.xml new file mode 100644 index 000000000..74de9e285 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_nb.xml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_niw.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_niw.xml new file mode 100644 index 000000000..a74cbe7da --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_niw.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_nwc.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_nwc.xml new file mode 100644 index 000000000..96ffa3238 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_nwc.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ny.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ny.xml new file mode 100644 index 000000000..e2e8187ff --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ny.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA1.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA1.xml new file mode 100644 index 000000000..1d665f101 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA1.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA10.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA10.xml new file mode 100644 index 000000000..65d080834 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA10.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA11.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA11.xml new file mode 100644 index 000000000..92ae474b6 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA11.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA2.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA2.xml new file mode 100644 index 000000000..ffdcd7989 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA2.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA3.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA3.xml new file mode 100644 index 000000000..a492bd875 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA3.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA4.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA4.xml new file mode 100644 index 000000000..dcdbbfff9 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA4.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA5.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA5.xml new file mode 100644 index 000000000..55072176d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA5.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA6.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA6.xml new file mode 100644 index 000000000..c17a51088 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA6.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA7.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA7.xml new file mode 100644 index 000000000..52c68f639 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA7.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA8.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA8.xml new file mode 100644 index 000000000..8ed2d3df5 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA8.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA9.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA9.xml new file mode 100644 index 000000000..d5c16abfc --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oA9.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oB1.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oB1.xml new file mode 100644 index 000000000..2f50c967b --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oB1.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oB2.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oB2.xml new file mode 100644 index 000000000..230783cea --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oB2.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oB3.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oB3.xml new file mode 100644 index 000000000..1c42ddacc --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oB3.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oB4.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oB4.xml new file mode 100644 index 000000000..2924c9e75 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oB4.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE1.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE1.xml new file mode 100644 index 000000000..4d5b1663f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE1.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE10.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE10.xml new file mode 100644 index 000000000..04ce91437 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE10.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE11.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE11.xml new file mode 100644 index 000000000..04f6f186d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE11.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE12.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE12.xml new file mode 100644 index 000000000..a5fa39fd2 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE12.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE1s.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE1s.xml new file mode 100644 index 000000000..faf6ab734 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE1s.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE2.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE2.xml new file mode 100644 index 000000000..af62ad6d1 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE2.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE3.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE3.xml new file mode 100644 index 000000000..95227da38 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE3.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE4.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE4.xml new file mode 100644 index 000000000..ae48d2ade --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE4.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE4s.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE4s.xml new file mode 100644 index 000000000..584019568 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE4s.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE5.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE5.xml new file mode 100644 index 000000000..f5edf745a --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE5.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE6.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE6.xml new file mode 100644 index 000000000..95bb602b6 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE6.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE7.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE7.xml new file mode 100644 index 000000000..b3e588d4c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE7.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE8.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE8.xml new file mode 100644 index 000000000..be5de2494 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE8.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE9.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE9.xml new file mode 100644 index 000000000..8ea7ee18c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE9.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE_anime.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE_anime.xml new file mode 100644 index 000000000..f6b4659e2 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oE_anime.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oF1d_map.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oF1d_map.xml new file mode 100644 index 000000000..c4f3a41f8 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oF1d_map.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oF1s.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oF1s.xml new file mode 100644 index 000000000..11359eff5 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_oF1s.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_o_anime.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_o_anime.xml new file mode 100644 index 000000000..4ef4ac44c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_o_anime.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_okuta.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_okuta.xml new file mode 100644 index 000000000..b4fccea6f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_okuta.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_opening_demo1.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_opening_demo1.xml new file mode 100644 index 000000000..fd0323027 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_opening_demo1.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_os.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_os.xml new file mode 100644 index 000000000..7c3029443 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_os.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_os_anime.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_os_anime.xml new file mode 100644 index 000000000..c90e37b37 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_os_anime.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ossan.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ossan.xml new file mode 100644 index 000000000..963053f3f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ossan.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ouke_haka.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ouke_haka.xml new file mode 100644 index 000000000..11da9b26e --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ouke_haka.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_owl.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_owl.xml new file mode 100644 index 000000000..fdc64b3aa --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_owl.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_peehat.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_peehat.xml new file mode 100644 index 000000000..42ee66cde --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_peehat.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_po_composer.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_po_composer.xml new file mode 100644 index 000000000..2ab8d64d8 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_po_composer.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_po_field.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_po_field.xml new file mode 100644 index 000000000..10b402e2c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_po_field.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_po_sisters.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_po_sisters.xml new file mode 100644 index 000000000..e0c9f0834 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_po_sisters.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_poh.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_poh.xml new file mode 100644 index 000000000..009d0fca3 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_poh.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ps.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ps.xml new file mode 100644 index 000000000..043e232d6 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ps.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_pu_box.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_pu_box.xml new file mode 100644 index 000000000..e1d686e97 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_pu_box.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_rd.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_rd.xml new file mode 100644 index 000000000..05fa416d7 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_rd.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_reeba.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_reeba.xml new file mode 100644 index 000000000..32c697bd9 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_reeba.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_relay_objects.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_relay_objects.xml new file mode 100644 index 000000000..47b92fcd2 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_relay_objects.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_rl.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_rl.xml new file mode 100644 index 000000000..625ab83a1 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_rl.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_rr.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_rr.xml new file mode 100644 index 000000000..98726b14b --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_rr.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_rs.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_rs.xml new file mode 100644 index 000000000..1da1488af --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_rs.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ru1.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ru1.xml new file mode 100644 index 000000000..3d413619f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ru1.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ru2.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ru2.xml new file mode 100644 index 000000000..2a8d70af3 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ru2.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_sa.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_sa.xml new file mode 100644 index 000000000..a19446453 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_sa.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_sb.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_sb.xml new file mode 100644 index 000000000..64d3bb005 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_sb.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_sd.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_sd.xml new file mode 100644 index 000000000..c72efeae1 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_sd.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_shop_dungen.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_shop_dungen.xml new file mode 100644 index 000000000..594c43d39 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_shop_dungen.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_shopnuts.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_shopnuts.xml new file mode 100644 index 000000000..a4e12e38a --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_shopnuts.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_siofuki.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_siofuki.xml new file mode 100644 index 000000000..a23240a72 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_siofuki.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_sk2.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_sk2.xml new file mode 100644 index 000000000..f2e7ef6d8 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_sk2.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_skb.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_skb.xml new file mode 100644 index 000000000..5b5efb484 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_skb.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_skj.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_skj.xml new file mode 100644 index 000000000..3abdd610f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_skj.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot00_break.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot00_break.xml new file mode 100644 index 000000000..d3be88315 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot00_break.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot00_objects.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot00_objects.xml new file mode 100644 index 000000000..10fb13aea --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot00_objects.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot01_matoya.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot01_matoya.xml new file mode 100644 index 000000000..d44b944e0 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot01_matoya.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot01_matoyab.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot01_matoyab.xml new file mode 100644 index 000000000..720f50cd3 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot01_matoyab.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot01_objects.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot01_objects.xml new file mode 100644 index 000000000..413e032a9 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot01_objects.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot01_objects2.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot01_objects2.xml new file mode 100644 index 000000000..36741a949 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot01_objects2.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot02_objects.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot02_objects.xml new file mode 100644 index 000000000..65f45ff51 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot02_objects.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot03_object.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot03_object.xml new file mode 100644 index 000000000..f182e7d99 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot03_object.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot04_objects.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot04_objects.xml new file mode 100644 index 000000000..66293d752 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot04_objects.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot05_objects.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot05_objects.xml new file mode 100644 index 000000000..6e7079149 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot05_objects.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot06_objects.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot06_objects.xml new file mode 100644 index 000000000..e3da63b0f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot06_objects.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot07_object.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot07_object.xml new file mode 100644 index 000000000..5bc2bfb6b --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot07_object.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot08_obj.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot08_obj.xml new file mode 100644 index 000000000..4d71f3473 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot08_obj.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot09_obj.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot09_obj.xml new file mode 100644 index 000000000..b4d9ae42a --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot09_obj.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot11_obj.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot11_obj.xml new file mode 100644 index 000000000..257298f7c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot11_obj.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot12_obj.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot12_obj.xml new file mode 100644 index 000000000..d619c781e --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot12_obj.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot15_obj.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot15_obj.xml new file mode 100644 index 000000000..bd59b8cd1 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot15_obj.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot16_obj.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot16_obj.xml new file mode 100644 index 000000000..d39de812a --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot16_obj.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot17_obj.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot17_obj.xml new file mode 100644 index 000000000..d4239d8d2 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot17_obj.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot18_obj.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot18_obj.xml new file mode 100644 index 000000000..cc12b7894 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_spot18_obj.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ssh.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ssh.xml new file mode 100644 index 000000000..6283f8e9f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ssh.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_sst.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_sst.xml new file mode 100644 index 000000000..a80780741 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_sst.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_st.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_st.xml new file mode 100644 index 000000000..fe617cf14 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_st.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_stream.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_stream.xml new file mode 100644 index 000000000..59b0838e4 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_stream.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_syokudai.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_syokudai.xml new file mode 100644 index 000000000..c1670edec --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_syokudai.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ta.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ta.xml new file mode 100644 index 000000000..5e446bf5c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ta.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_timeblock.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_timeblock.xml new file mode 100644 index 000000000..1d6b9e698 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_timeblock.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_tite.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_tite.xml new file mode 100644 index 000000000..1be65c495 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_tite.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_tk.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_tk.xml new file mode 100644 index 000000000..6869280e6 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_tk.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_toki_objects.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_toki_objects.xml new file mode 100644 index 000000000..cd07e60d2 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_toki_objects.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_torch2.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_torch2.xml new file mode 100644 index 000000000..ec55bbe26 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_torch2.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_toryo.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_toryo.xml new file mode 100644 index 000000000..73f3dcb1e --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_toryo.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_tp.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_tp.xml new file mode 100644 index 000000000..8ea908825 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_tp.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_tr.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_tr.xml new file mode 100644 index 000000000..e84d0896d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_tr.xml @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_trap.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_trap.xml new file mode 100644 index 000000000..56195cf41 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_trap.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_triforce_spot.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_triforce_spot.xml new file mode 100644 index 000000000..a9d52dd96 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_triforce_spot.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ts.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ts.xml new file mode 100644 index 000000000..567277bc3 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ts.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_tsubo.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_tsubo.xml new file mode 100644 index 000000000..ee2c5e184 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_tsubo.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_tw.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_tw.xml new file mode 100644 index 000000000..66cd3a7c2 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_tw.xml @@ -0,0 +1,332 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_umajump.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_umajump.xml new file mode 100644 index 000000000..2ee4ade46 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_umajump.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_vali.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_vali.xml new file mode 100644 index 000000000..2bab5efaa --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_vali.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_vase.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_vase.xml new file mode 100644 index 000000000..091d4c51e --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_vase.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_vm.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_vm.xml new file mode 100644 index 000000000..c5b949b36 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_vm.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_wallmaster.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_wallmaster.xml new file mode 100644 index 000000000..fbbc4f4af --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_wallmaster.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_warp1.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_warp1.xml new file mode 100644 index 000000000..1497d7a10 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_warp1.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_warp2.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_warp2.xml new file mode 100644 index 000000000..b6d1b3624 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_warp2.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_wf.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_wf.xml new file mode 100644 index 000000000..ebfb708d2 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_wf.xml @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_wood02.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_wood02.xml new file mode 100644 index 000000000..47ec342ca --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_wood02.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_xc.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_xc.xml new file mode 100644 index 000000000..030ae9394 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_xc.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_yabusame_point.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_yabusame_point.xml new file mode 100644 index 000000000..bed9e8a60 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_yabusame_point.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ydan_objects.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ydan_objects.xml new file mode 100644 index 000000000..e2adf307f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_ydan_objects.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_yukabyun.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_yukabyun.xml new file mode 100644 index 000000000..d594ebbb8 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_yukabyun.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zf.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zf.xml new file mode 100644 index 000000000..7f20eb786 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zf.xml @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zg.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zg.xml new file mode 100644 index 000000000..79005516c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zg.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zl1.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zl1.xml new file mode 100644 index 000000000..c7082a3db --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zl1.xml @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zl2.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zl2.xml new file mode 100644 index 000000000..9af0a6527 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zl2.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zl2_anime1.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zl2_anime1.xml new file mode 100644 index 000000000..cada50486 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zl2_anime1.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zl2_anime2.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zl2_anime2.xml new file mode 100644 index 000000000..47016e2e0 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zl2_anime2.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zl4.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zl4.xml new file mode 100644 index 000000000..b43e5ba34 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zl4.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zo.xml b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zo.xml new file mode 100644 index 000000000..77465760e --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/objects/object_zo.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Arrow_Fire.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Arrow_Fire.xml new file mode 100644 index 000000000..0f91c80be --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Arrow_Fire.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Arrow_Ice.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Arrow_Ice.xml new file mode 100644 index 000000000..001ac51d5 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Arrow_Ice.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Arrow_Light.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Arrow_Light.xml new file mode 100644 index 000000000..e6e5c9776 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Arrow_Light.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Bg_Ganon_Otyuka.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Bg_Ganon_Otyuka.xml new file mode 100644 index 000000000..e1ea84996 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Bg_Ganon_Otyuka.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Bg_Jya_Cobra.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Bg_Jya_Cobra.xml new file mode 100644 index 000000000..857a14922 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Bg_Jya_Cobra.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Boss_Dodongo.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Boss_Dodongo.xml new file mode 100644 index 000000000..f2ee5b7b8 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Boss_Dodongo.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Boss_Ganon.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Boss_Ganon.xml new file mode 100644 index 000000000..9f0e6e1f4 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Boss_Ganon.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Boss_Ganon2.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Boss_Ganon2.xml new file mode 100644 index 000000000..dfb01ba07 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Boss_Ganon2.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Boss_Sst.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Boss_Sst.xml new file mode 100644 index 000000000..4e08c34f1 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Boss_Sst.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Demo_Shd.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Demo_Shd.xml new file mode 100644 index 000000000..1682fd16a --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Demo_Shd.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Bili.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Bili.xml new file mode 100644 index 000000000..8a77b7bd3 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Bili.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Clear_Tag.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Clear_Tag.xml new file mode 100644 index 000000000..fee5c6302 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Clear_Tag.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Ganon_Mant.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Ganon_Mant.xml new file mode 100644 index 000000000..900ec46ac --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Ganon_Mant.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Ganon_Organ.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Ganon_Organ.xml new file mode 100644 index 000000000..91a5e31ac --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Ganon_Organ.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Holl.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Holl.xml new file mode 100644 index 000000000..65673c5ea --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Holl.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Jsjutan.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Jsjutan.xml new file mode 100644 index 000000000..d7f2859cb --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Jsjutan.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Kanban.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Kanban.xml new file mode 100644 index 000000000..c2f8f7c23 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Kanban.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Sda.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Sda.xml new file mode 100644 index 000000000..91321c648 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Sda.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Ssh.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Ssh.xml new file mode 100644 index 000000000..f12c4ee19 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Ssh.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_St.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_St.xml new file mode 100644 index 000000000..d7b6b20cf --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_St.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Sth.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Sth.xml new file mode 100644 index 000000000..13daffa63 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_En_Sth.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_End_Title.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_End_Title.xml new file mode 100644 index 000000000..77c39c63a --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_End_Title.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_File_Choose.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_File_Choose.xml new file mode 100644 index 000000000..f9aad776d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_File_Choose.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Magic_Dark.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Magic_Dark.xml new file mode 100644 index 000000000..e6315effd --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Magic_Dark.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Magic_Fire.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Magic_Fire.xml new file mode 100644 index 000000000..0ddfe4cfc --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Magic_Fire.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Magic_Wind.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Magic_Wind.xml new file mode 100644 index 000000000..3736e985e --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Magic_Wind.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Spot.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Spot.xml new file mode 100644 index 000000000..9a53952f0 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Spot.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Storm.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Storm.xml new file mode 100644 index 000000000..cb043eeb8 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Storm.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Wipe.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Wipe.xml new file mode 100644 index 000000000..4ca01b04c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Wipe.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Wipe2.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Wipe2.xml new file mode 100644 index 000000000..051f2177e --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Wipe2.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Wipe3.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Wipe3.xml new file mode 100644 index 000000000..11f278866 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Wipe3.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Wipe4.xml b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Wipe4.xml new file mode 100644 index 000000000..a4e410eba --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/overlays/ovl_Oceff_Wipe4.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/Bmori1.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/Bmori1.xml new file mode 100644 index 000000000..70aac3464 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/Bmori1.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/FIRE_bs.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/FIRE_bs.xml new file mode 100644 index 000000000..9e65ba617 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/FIRE_bs.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/HAKAdan.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/HAKAdan.xml new file mode 100644 index 000000000..cc2935a1c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/HAKAdan.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/HAKAdanCH.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/HAKAdanCH.xml new file mode 100644 index 000000000..eb55a19f5 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/HAKAdanCH.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/HAKAdan_bs.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/HAKAdan_bs.xml new file mode 100644 index 000000000..d3280ffe6 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/HAKAdan_bs.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/HIDAN.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/HIDAN.xml new file mode 100644 index 000000000..dc4d56849 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/HIDAN.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/MIZUsin.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/MIZUsin.xml new file mode 100644 index 000000000..beb765c85 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/MIZUsin.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/MIZUsin_bs.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/MIZUsin_bs.xml new file mode 100644 index 000000000..b64089530 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/MIZUsin_bs.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/bdan.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/bdan.xml new file mode 100644 index 000000000..c4edc9bea --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/bdan.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/bdan_boss.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/bdan_boss.xml new file mode 100644 index 000000000..12d8d3e12 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/bdan_boss.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ddan.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ddan.xml new file mode 100644 index 000000000..f6572b9f8 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ddan.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ddan_boss.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ddan_boss.xml new file mode 100644 index 000000000..03eb73ea3 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ddan_boss.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon.xml new file mode 100644 index 000000000..0582da79f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon_boss.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon_boss.xml new file mode 100644 index 000000000..c75914c29 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon_boss.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon_demo.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon_demo.xml new file mode 100644 index 000000000..779cb9335 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon_demo.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon_final.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon_final.xml new file mode 100644 index 000000000..afe1cffdf --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon_final.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon_sonogo.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon_sonogo.xml new file mode 100644 index 000000000..70313c8cf --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon_sonogo.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon_tou.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon_tou.xml new file mode 100644 index 000000000..6642a8902 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganon_tou.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganontika.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganontika.xml new file mode 100644 index 000000000..de24b26ff --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganontika.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganontikasonogo.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganontikasonogo.xml new file mode 100644 index 000000000..60020188f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ganontikasonogo.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/gerudoway.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/gerudoway.xml new file mode 100644 index 000000000..531724ead --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/gerudoway.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ice_doukutu.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ice_doukutu.xml new file mode 100644 index 000000000..4d25aa74f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ice_doukutu.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/jyasinboss.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/jyasinboss.xml new file mode 100644 index 000000000..0f81c26fb --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/jyasinboss.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/jyasinzou.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/jyasinzou.xml new file mode 100644 index 000000000..ca5d0024a --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/jyasinzou.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/men.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/men.xml new file mode 100644 index 000000000..acba3e7cb --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/men.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/moribossroom.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/moribossroom.xml new file mode 100644 index 000000000..9c4552e9e --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/moribossroom.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ydan.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ydan.xml new file mode 100644 index 000000000..465c5f0ca --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ydan.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ydan_boss.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ydan_boss.xml new file mode 100644 index 000000000..f4971e7fe --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/ydan_boss.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/bowling.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/bowling.xml new file mode 100644 index 000000000..e12fd269a --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/bowling.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/daiyousei_izumi.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/daiyousei_izumi.xml new file mode 100644 index 000000000..3c1fafb8d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/daiyousei_izumi.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/hairal_niwa.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/hairal_niwa.xml new file mode 100644 index 000000000..04547ab21 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/hairal_niwa.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/hairal_niwa_n.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/hairal_niwa_n.xml new file mode 100644 index 000000000..a33d77b07 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/hairal_niwa_n.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/hakasitarelay.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/hakasitarelay.xml new file mode 100644 index 000000000..bc1e2b966 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/hakasitarelay.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/hut.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/hut.xml new file mode 100644 index 000000000..a4ef5715f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/hut.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/hylia_labo.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/hylia_labo.xml new file mode 100644 index 000000000..829708604 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/hylia_labo.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/impa.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/impa.xml new file mode 100644 index 000000000..db757e3d3 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/impa.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kakariko.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kakariko.xml new file mode 100644 index 000000000..e4e9b102c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kakariko.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kenjyanoma.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kenjyanoma.xml new file mode 100644 index 000000000..e6bcef90a --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kenjyanoma.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kokiri_home.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kokiri_home.xml new file mode 100644 index 000000000..8c0305493 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kokiri_home.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kokiri_home3.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kokiri_home3.xml new file mode 100644 index 000000000..9f36eb41c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kokiri_home3.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kokiri_home4.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kokiri_home4.xml new file mode 100644 index 000000000..eb861aedb --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kokiri_home4.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kokiri_home5.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kokiri_home5.xml new file mode 100644 index 000000000..974987fed --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/kokiri_home5.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/labo.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/labo.xml new file mode 100644 index 000000000..c0a9d2eb8 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/labo.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/link_home.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/link_home.xml new file mode 100644 index 000000000..2fb88ae34 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/link_home.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/mahouya.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/mahouya.xml new file mode 100644 index 000000000..653cffc3b --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/mahouya.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/malon_stable.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/malon_stable.xml new file mode 100644 index 000000000..aff97eeb8 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/malon_stable.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/miharigoya.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/miharigoya.xml new file mode 100644 index 000000000..41ff2db9f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/miharigoya.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/nakaniwa.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/nakaniwa.xml new file mode 100644 index 000000000..49ff4a29c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/nakaniwa.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/syatekijyou.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/syatekijyou.xml new file mode 100644 index 000000000..5490e84f1 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/syatekijyou.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/takaraya.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/takaraya.xml new file mode 100644 index 000000000..ddee91543 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/takaraya.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/tent.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/tent.xml new file mode 100644 index 000000000..de72cc5f4 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/tent.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/tokinoma.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/tokinoma.xml new file mode 100644 index 000000000..e43f0a933 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/tokinoma.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/yousei_izumi_tate.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/yousei_izumi_tate.xml new file mode 100644 index 000000000..990e1763b --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/yousei_izumi_tate.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/yousei_izumi_yoko.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/yousei_izumi_yoko.xml new file mode 100644 index 000000000..98923c569 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/indoors/yousei_izumi_yoko.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/enrui.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/enrui.xml new file mode 100644 index 000000000..d8c06e545 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/enrui.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/entra_n.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/entra_n.xml new file mode 100644 index 000000000..5b408ac3a --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/entra_n.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/hakaana.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/hakaana.xml new file mode 100644 index 000000000..b13273bed --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/hakaana.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/hakaana2.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/hakaana2.xml new file mode 100644 index 000000000..146d0ce45 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/hakaana2.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/hakaana_ouke.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/hakaana_ouke.xml new file mode 100644 index 000000000..1d31d66a4 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/hakaana_ouke.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/hiral_demo.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/hiral_demo.xml new file mode 100644 index 000000000..1331fdd4c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/hiral_demo.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/kakariko3.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/kakariko3.xml new file mode 100644 index 000000000..07b62c44d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/kakariko3.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/kakusiana.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/kakusiana.xml new file mode 100644 index 000000000..e4254b750 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/kakusiana.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/kinsuta.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/kinsuta.xml new file mode 100644 index 000000000..d5dbacdb7 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/kinsuta.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/market_alley.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/market_alley.xml new file mode 100644 index 000000000..c30467303 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/market_alley.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/market_alley_n.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/market_alley_n.xml new file mode 100644 index 000000000..65db60411 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/market_alley_n.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/market_day.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/market_day.xml new file mode 100644 index 000000000..00887e69c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/market_day.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/market_night.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/market_night.xml new file mode 100644 index 000000000..c58e38744 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/market_night.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/market_ruins.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/market_ruins.xml new file mode 100644 index 000000000..f0ec75e75 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/market_ruins.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/shrine.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/shrine.xml new file mode 100644 index 000000000..b9ddf2cf7 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/shrine.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/shrine_n.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/shrine_n.xml new file mode 100644 index 000000000..4878338aa --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/shrine_n.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/shrine_r.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/shrine_r.xml new file mode 100644 index 000000000..122036791 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/shrine_r.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/turibori.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/turibori.xml new file mode 100644 index 000000000..ef6848edf --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/misc/turibori.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/entra.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/entra.xml new file mode 100644 index 000000000..92ee57f59 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/entra.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/souko.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/souko.xml new file mode 100644 index 000000000..508beb85d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/souko.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot00.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot00.xml new file mode 100644 index 000000000..4e933910c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot00.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot01.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot01.xml new file mode 100644 index 000000000..e2da37e2d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot01.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot02.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot02.xml new file mode 100644 index 000000000..334d0e599 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot02.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot03.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot03.xml new file mode 100644 index 000000000..bf4039249 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot03.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot04.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot04.xml new file mode 100644 index 000000000..c5824727f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot04.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot05.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot05.xml new file mode 100644 index 000000000..7c2c012bf --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot05.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot06.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot06.xml new file mode 100644 index 000000000..c369533bb --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot06.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot07.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot07.xml new file mode 100644 index 000000000..e083e336d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot07.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot08.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot08.xml new file mode 100644 index 000000000..136727c6d --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot08.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot09.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot09.xml new file mode 100644 index 000000000..175fac890 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot09.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot10.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot10.xml new file mode 100644 index 000000000..06349cf1e --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot10.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot11.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot11.xml new file mode 100644 index 000000000..99bf24c82 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot11.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot12.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot12.xml new file mode 100644 index 000000000..77b0cfb07 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot12.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot13.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot13.xml new file mode 100644 index 000000000..5686bbde5 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot13.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot15.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot15.xml new file mode 100644 index 000000000..f17e76d55 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot15.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot16.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot16.xml new file mode 100644 index 000000000..026da9fd2 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot16.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot17.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot17.xml new file mode 100644 index 000000000..3aecc15a6 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot17.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot18.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot18.xml new file mode 100644 index 000000000..513e67cbc --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot18.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot20.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot20.xml new file mode 100644 index 000000000..b75f3f5c0 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/overworld/spot20.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/alley_shop.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/alley_shop.xml new file mode 100644 index 000000000..95548de1b --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/alley_shop.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/drag.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/drag.xml new file mode 100644 index 000000000..acb6515fb --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/drag.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/face_shop.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/face_shop.xml new file mode 100644 index 000000000..16a974608 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/face_shop.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/golon.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/golon.xml new file mode 100644 index 000000000..c58672798 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/golon.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/kokiri_shop.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/kokiri_shop.xml new file mode 100644 index 000000000..50cd633e5 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/kokiri_shop.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/night_shop.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/night_shop.xml new file mode 100644 index 000000000..5954d9c83 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/night_shop.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/shop1.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/shop1.xml new file mode 100644 index 000000000..525a06d63 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/shop1.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/zoora.xml b/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/zoora.xml new file mode 100644 index 000000000..0e4ac18f8 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/scenes/shops/zoora.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/text/elf_message_field.xml b/soh/assets/xml/GC_NMQ_PAL_F/text/elf_message_field.xml new file mode 100644 index 000000000..789a554ce --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/text/elf_message_field.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/soh/assets/xml/GC_NMQ_PAL_F/text/elf_message_ydan.xml b/soh/assets/xml/GC_NMQ_PAL_F/text/elf_message_ydan.xml new file mode 100644 index 000000000..f784afcf4 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/text/elf_message_ydan.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/soh/assets/xml/GC_NMQ_PAL_F/text/nes_message_data_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/text/nes_message_data_static.xml new file mode 100644 index 000000000..d77bf0ff8 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/text/nes_message_data_static.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/soh/assets/xml/GC_NMQ_PAL_F/text/staff_message_data_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/text/staff_message_data_static.xml new file mode 100644 index 000000000..395a6b7bd --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/text/staff_message_data_static.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/backgrounds.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/backgrounds.xml new file mode 100644 index 000000000..474734e71 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/backgrounds.xml @@ -0,0 +1,246 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/do_action_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/do_action_static.xml new file mode 100644 index 000000000..9ae8d9815 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/do_action_static.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_24_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_24_static.xml new file mode 100644 index 000000000..0c5f7621e --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_24_static.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_dungeon_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_dungeon_static.xml new file mode 100644 index 000000000..873c490fc --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_dungeon_static.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_field_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_field_static.xml new file mode 100644 index 000000000..ed991406b --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_field_static.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_fra_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_fra_static.xml new file mode 100644 index 000000000..2c8ccad5b --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_fra_static.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_gameover_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_gameover_static.xml new file mode 100644 index 000000000..fc2a50642 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_gameover_static.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_ger_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_ger_static.xml new file mode 100644 index 000000000..ea71dda35 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_ger_static.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_nes_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_nes_static.xml new file mode 100644 index 000000000..6cd92acfc --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_nes_static.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_static.xml new file mode 100644 index 000000000..7b61cf35c --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/icon_item_static.xml @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/item_name_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/item_name_static.xml new file mode 100644 index 000000000..00c497490 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/item_name_static.xml @@ -0,0 +1,373 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/map_48x85_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/map_48x85_static.xml new file mode 100644 index 000000000..b5b1d1a85 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/map_48x85_static.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/map_grand_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/map_grand_static.xml new file mode 100644 index 000000000..201955bfc --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/map_grand_static.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/map_i_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/map_i_static.xml new file mode 100644 index 000000000..1721f6d84 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/map_i_static.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/map_name_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/map_name_static.xml new file mode 100644 index 000000000..7f9d31589 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/map_name_static.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/message_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/message_static.xml new file mode 100644 index 000000000..afdde60de --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/message_static.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/message_texture_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/message_texture_static.xml new file mode 100644 index 000000000..bbf7e1259 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/message_texture_static.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/nes_font_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/nes_font_static.xml new file mode 100644 index 000000000..b01646cb5 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/nes_font_static.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/nintendo_rogo_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/nintendo_rogo_static.xml new file mode 100644 index 000000000..7a60524b2 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/nintendo_rogo_static.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/parameter_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/parameter_static.xml new file mode 100644 index 000000000..bd4173431 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/parameter_static.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/place_title_cards.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/place_title_cards.xml new file mode 100644 index 000000000..c1771d4c8 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/place_title_cards.xml @@ -0,0 +1,287 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/skyboxes.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/skyboxes.xml new file mode 100644 index 000000000..9ff554c94 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/skyboxes.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/title_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/title_static.xml new file mode 100644 index 000000000..422b60cdc --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/title_static.xml @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/build.c b/soh/build.c index acb8d151d..f3f9bdae6 100644 --- a/soh/build.c +++ b/soh/build.c @@ -1,8 +1,8 @@ -const char gBuildVersion[] = "DECKARD"; +const char gBuildVersion[] = "DECKARD ALFA (1.0.0)"; const char gBuildTeam[] = "github.com/harbourmasters"; #ifdef __TIMESTAMP__ const char gBuildDate[] = __TIMESTAMP__; #else const char gBuildDate[] = __DATE__ " " __TIME__; #endif -const char gBuildMakeOption[] = ""; \ No newline at end of file +const char gBuildMakeOption[] = ""; diff --git a/soh/soh.vcxproj b/soh/soh.vcxproj index 9d5b509f2..aa6dee304 100644 --- a/soh/soh.vcxproj +++ b/soh/soh.vcxproj @@ -144,7 +144,7 @@ false INCLUDE_GAME_PRINTF;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;ENABLE_DX11;%(PreprocessorDefinitions)GLEW_STATIC true - stdcpp17 + stdcpp20 MultiThreadedDebug true diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 0732a80e1..c000ce8e1 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -22,6 +22,7 @@ #include "Lib/stb/stb_image.h" #include "AudioPlayer.h" #include "../soh/Enhancements/debugconsole.h" +#include "Utils/BitConverter.h" OTRGlobals* OTRGlobals::Instance; @@ -41,6 +42,15 @@ extern "C" void OTRMessage_Init(); // C->C++ Bridge extern "C" void InitOTR() { OTRGlobals::Instance = new OTRGlobals(); + auto t = OTRGlobals::Instance->context->GetResourceManager()->LoadFile("version"); + + if (!t->bHasLoadError) + { + //uint32_t gameVersion = BitConverter::ToUInt32BE((uint8_t*)t->buffer.get(), 0); + uint32_t gameVersion = *((uint32_t*)t->buffer.get()); + OTRGlobals::Instance->context->GetResourceManager()->SetGameVersion(gameVersion); + } + clearMtx = (uintptr_t)&gMtxClear; OTRMessage_Init(); DebugConsole_Init(); @@ -96,6 +106,11 @@ extern "C" void OTRResetScancode() OTRGlobals::Instance->context->GetWindow()->lastScancode = -1; } +extern "C" uint32_t ResourceMgr_GetGameVersion() +{ + return OTRGlobals::Instance->context->GetResourceManager()->GetGameVersion(); +} + extern "C" void ResourceMgr_CacheDirectory(const char* resName) { OTRGlobals::Instance->context->GetResourceManager()->CacheDirectory(resName); } diff --git a/soh/soh/OTRGlobals.h b/soh/soh/OTRGlobals.h index f7e525834..4a439fc6d 100644 --- a/soh/soh/OTRGlobals.h +++ b/soh/soh/OTRGlobals.h @@ -27,6 +27,7 @@ void OTRGfxPrint(const char* str, void* printer, void (*printImpl)(void*, char)) void OTRSetFrameDivisor(int divisor); uint16_t OTRGetPixelDepth(float x, float y); int32_t OTRGetLastScancode(); +uint32_t ResourceMgr_GetGameVersion(); void ResourceMgr_CacheDirectory(const char* resName); void ResourceMgr_LoadFile(const char* resName); char* ResourceMgr_LoadFileFromDisk(const char* filePath); diff --git a/soh/soh/z_play_otr.cpp b/soh/soh/z_play_otr.cpp index 6d6c4bb30..c84e37482 100644 --- a/soh/soh/z_play_otr.cpp +++ b/soh/soh/z_play_otr.cpp @@ -31,6 +31,16 @@ extern "C" void OTRGameplay_SpawnScene(GlobalContext* globalCtx, s32 sceneNum, s std::string scenePath = StringHelper::Sprintf("scenes\\%s\\%s", scene->sceneFile.fileName, scene->sceneFile.fileName); globalCtx->sceneSegment = (Ship::Scene*)OTRGameplay_LoadFile(globalCtx, scenePath.c_str()); + + // Failed to load scene... default to doodongs cavern + if (globalCtx->sceneSegment == nullptr) + { + lusprintf(__FILE__, __LINE__, 2, "Unable to load scene %s... Defaulting to Doodong's Cavern!\n", + scenePath.c_str()); + OTRGameplay_SpawnScene(globalCtx, 0x01, 0); + return; + } + scene->unk_13 = 0; //ASSERT(globalCtx->sceneSegment != NULL, "this->sceneSegment != NULL", "../z_play.c", 4960); diff --git a/soh/src/code/z_play.c b/soh/src/code/z_play.c index f0880b3da..193b14164 100644 --- a/soh/src/code/z_play.c +++ b/soh/src/code/z_play.c @@ -1495,26 +1495,6 @@ void Gameplay_InitScene(GlobalContext* globalCtx, s32 spawn) void Gameplay_SpawnScene(GlobalContext* globalCtx, s32 sceneNum, s32 spawn) { OTRGameplay_SpawnScene(globalCtx, sceneNum, spawn); - return; - - SceneTableEntry* scene = &gSceneTable[sceneNum]; - - scene->unk_13 = 0; - globalCtx->loadedScene = scene; - globalCtx->sceneNum = sceneNum; - globalCtx->sceneConfig = scene->config; - - osSyncPrintf("\nSCENE SIZE %fK\n", (scene->sceneFile.vromEnd - scene->sceneFile.vromStart) / 1024.0f); - - globalCtx->sceneSegment = Gameplay_LoadFile(globalCtx, &scene->sceneFile); - scene->unk_13 = 0; - ASSERT(globalCtx->sceneSegment != NULL, "this->sceneSegment != NULL", "../z_play.c", 4960); - - gSegments[2] = VIRTUAL_TO_PHYSICAL(globalCtx->sceneSegment); - - Gameplay_InitScene(globalCtx, spawn); - - osSyncPrintf("ROOM SIZE=%fK\n", func_80096FE8(globalCtx, &globalCtx->roomCtx) / 1024.0f); } void func_800C016C(GlobalContext* globalCtx, Vec3f* src, Vec3f* dest) { diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c index d7344d7c3..87a7009ec 100644 --- a/soh/src/code/z_player_lib.c +++ b/soh/src/code/z_player_lib.c @@ -1625,6 +1625,8 @@ void func_80091A24(GlobalContext* globalCtx, void* seg04, void* seg06, SkelAnime POLY_XLU_DISP = ohNo; } + POLY_OPA_DISP = Gameplay_SetFog(globalCtx, POLY_OPA_DISP++); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 3288); } diff --git a/soh/src/code/z_vr_box.c b/soh/src/code/z_vr_box.c index 7925e5cb9..e532edf31 100644 --- a/soh/src/code/z_vr_box.c +++ b/soh/src/code/z_vr_box.c @@ -1001,9 +1001,8 @@ void Skybox_Setup(GlobalContext* globalCtx, SkyboxContext* skyboxCtx, s16 skybox LoadSkyboxPalette(globalCtx, skyboxCtx, 2, gBackAlleyHouseBg3Tlut, 16, 16); break; default: - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 8, "../z_vr_box.c", 1226); - //skyboxCtx->staticSegments[1] = GameState_Alloc(&globalCtx->state, 0x10000 * 8, "../z_vr_box.c", 1226); - skyboxCtx->staticSegments[1] = malloc(0x10000 * 8); // OTRTODO + skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 4, "../z_vr_box.c", 1226); + skyboxCtx->staticSegments[1] = GameState_Alloc(&globalCtx->state, 0x10000 * 4, "../z_vr_box.c", 1226); skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x1000, "../z_vr_box.c", 1226); break; } diff --git a/soh/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c b/soh/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c index 2e8858a94..5e0a780fd 100644 --- a/soh/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c +++ b/soh/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c @@ -138,6 +138,10 @@ void ElfMsg_CallNaviCylinder(ElfMsg* this, GlobalContext* globalCtx) { Player* player = GET_PLAYER(globalCtx); EnElf* navi = (EnElf*)player->naviActor; + // This fixes a crash when using a grotto exit when you never properly entered + if (navi == NULL) + return; + if (ElfMsg_WithinXZDistance(&player->actor.world.pos, &this->actor.world.pos, this->actor.scale.x * 100.0f) && (this->actor.world.pos.y <= player->actor.world.pos.y) && ((player->actor.world.pos.y - this->actor.world.pos.y) < (100.0f * this->actor.scale.y))) { @@ -164,9 +168,13 @@ void ElfMsg_Update(Actor* thisx, GlobalContext* globalCtx) { } } +#ifdef ZELDA_DEBUG #include "overlays/ovl_Elf_Msg/ovl_Elf_Msg.h" +#endif -void ElfMsg_Draw(Actor* thisx, GlobalContext* globalCtx) { +void ElfMsg_Draw(Actor* thisx, GlobalContext* globalCtx) +{ +#ifdef ZELDA_DEBUG OPEN_DISPS(globalCtx->state.gfxCtx, "../z_elf_msg.c", 436); if (R_NAVI_MSG_REGION_ALPHA == 0) { @@ -191,4 +199,5 @@ void ElfMsg_Draw(Actor* thisx, GlobalContext* globalCtx) { } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_elf_msg.c", 457); + #endif } diff --git a/soh/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c b/soh/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c index f23f49e10..73b6785c8 100644 --- a/soh/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c +++ b/soh/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c @@ -148,9 +148,12 @@ void ElfMsg2_Update(Actor* thisx, GlobalContext* globalCtx) { } } +#if ZELDA_DEBUG #include "overlays/ovl_Elf_Msg2/ovl_Elf_Msg2.h" +#endif void ElfMsg2_Draw(Actor* thisx, GlobalContext* globalCtx) { +#if ZELDA_DEBUG OPEN_DISPS(globalCtx->state.gfxCtx, "../z_elf_msg2.c", 355); if (R_NAVI_MSG_REGION_ALPHA == 0) { @@ -165,4 +168,5 @@ void ElfMsg2_Draw(Actor* thisx, GlobalContext* globalCtx) { gSPDisplayList(POLY_XLU_DISP++, sCubeDL); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_elf_msg2.c", 367); + #endif } diff --git a/soh/src/overlays/gamestates/ovl_title/z_title.c b/soh/src/overlays/gamestates/ovl_title/z_title.c index e45cdf27b..942962f2e 100644 --- a/soh/src/overlays/gamestates/ovl_title/z_title.c +++ b/soh/src/overlays/gamestates/ovl_title/z_title.c @@ -10,6 +10,9 @@ #include "alloca.h" #include "textures/nintendo_rogo_static/nintendo_rogo_static.h" #include +#include "GameVersions.h" + +const char* GetGameVersionString(); char* quote; @@ -18,6 +21,8 @@ void Title_PrintBuildInfo(Gfx** gfxp) { //GfxPrint* printer; GfxPrint printer; + const char* gameVersionStr = GetGameVersionString(); + g = *gfxp; g = func_8009411C(g); //printer = alloca(sizeof(GfxPrint)); @@ -32,6 +37,9 @@ void Title_PrintBuildInfo(Gfx** gfxp) { GfxPrint_Printf(printer, "GCC SHIP"); #endif + GfxPrint_SetPos(&printer, 5, 4); + GfxPrint_Printf(&printer, "Game Version: %s", gameVersionStr); + GfxPrint_SetColor(&printer, 255, 255, 255, 255); GfxPrint_SetPos(&printer, 2, 22); GfxPrint_Printf(&printer, quote); @@ -66,6 +74,36 @@ char* SetQuote() { return quotes[randomQuote]; } +const char* GetGameVersionString() { + uint32_t gameVersion = ResourceMgr_GetGameVersion(); + switch (gameVersion) { + case OOT_NTSC_10: + return "N64 NTSC 1.0"; + case OOT_NTSC_11: + return "N64 NTSC 1.1"; + case OOT_NTSC_12: + return "N64 NTSC 1.2"; + case OOT_PAL_10: + return "N64 PAL 1.0"; + case OOT_PAL_11: + return "N64 PAL 1.1"; + case OOT_PAL_GC: + return "GC PAL"; + case OOT_PAL_MQ: + return "GC PAL MQ"; + case OOT_PAL_GC_DBG1: + return "GC PAL DEBUG"; + case OOT_PAL_GC_DBG2: + return "GC PAL DEBUG MQ"; + case OOT_IQUE_CN: + return "IQUE CN"; + case OOT_IQUE_TW: + return "IQUE TW"; + default: + return "UNKNOWN"; + } +} + // Note: In other rom versions this function also updates unk_1D4, coverAlpha, addAlpha, visibleDuration to calculate // the fade-in/fade-out + the duration of the n64 logo animation void Title_Calc(TitleContext* this) { diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c index a5c160700..140aa7734 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c @@ -789,40 +789,10 @@ static PreRender sPlayerPreRender; static void* sPreRenderCvg; extern int fbTest; -// OTRTODO: This function is no longer used. We could probably remove it. -void KaleidoScope_SetupPlayerPreRender(GlobalContext* globalCtx) { - Gfx* gfx; - Gfx* gfxRef; - void* fbuf; - static Gfx testBuffer[2048]; - - //return; - - fbuf = globalCtx->state.gfxCtx->curFrameBuffer; - - OPEN_DISPS(globalCtx->state.gfxCtx, "../z_kaleido_scope_PAL.c", 496); - - gfx = &testBuffer[0]; - - PreRender_SetValues(&sPlayerPreRender, 64, 112, fbuf, NULL); - func_800C1F20(&sPlayerPreRender, &gfx); - func_800C20B4(&sPlayerPreRender, &gfx); - - gSPEndDisplayList(gfx++); - gSPDisplayList(POLY_KAL_DISP++, &testBuffer[0]); - - SREG(33) |= 1; - - CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_kaleido_scope_PAL.c", 509); -} -//OTRTODO - Player on pause -#if 1 void KaleidoScope_ProcessPlayerPreRender(void) { - //Sleep_Msec(50); PreRender_Calc(&sPlayerPreRender); PreRender_Destroy(&sPlayerPreRender); } -#endif Gfx* KaleidoScope_QuadTextureIA4(Gfx* gfx, void* texture, s16 width, s16 height, u16 point) { gDPLoadTextureBlock_4b(gfx++, texture, G_IM_FMT_IA, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, @@ -4026,7 +3996,6 @@ void KaleidoScope_Update(GlobalContext* globalCtx) ResourceMgr_DirtyDirectory("textures/icon_item_24_static*"); ResourceMgr_DirtyDirectory("textures/icon_item_static*"); CVar_SetS32("gPauseTriforce", 0); - //ResourceMgr_InvalidateCache(); func_800981B8(&globalCtx->objectCtx); func_800418D0(&globalCtx->colCtx, globalCtx); From 529c5f642d803d74feb4070b66aab85fc02a6bef Mon Sep 17 00:00:00 2001 From: Emill Date: Sat, 2 Apr 2022 19:57:20 +0200 Subject: [PATCH 020/146] Don't copy skybox textures (#129) * Don't copy skybox textures * Remove unnecessary parameter in skybox functions * Make palette address part of texture cache key * Support loading TLUT from two different memory locations --- .../Lib/Fast3D/U64/PR/ultra64/gbi.h | 11 + .../libultraship/Lib/Fast3D/gfx_pc.cpp | 44 +- libultraship/libultraship/Lib/Fast3D/gfx_pc.h | 1 + libultraship/libultraship/TextureMod.cpp | 2 +- soh/include/z64.h | 22 +- soh/src/code/z_kankyo.c | 20 +- soh/src/code/z_vr_box.c | 431 ++++++++---------- soh/src/code/z_vr_box_draw.c | 23 +- 8 files changed, 274 insertions(+), 280 deletions(-) diff --git a/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h b/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h index 843cb3cd6..83cc9a55c 100644 --- a/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h +++ b/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h @@ -4223,6 +4223,17 @@ _DW({ \ gDPPipeSync(pkt); \ }) +#define gDPLoadTLUT_pal128(pkt, pal, dram) \ +_DW({ \ + gDPSetTextureImage(pkt, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, dram); \ + gDPTileSync(pkt); \ + gDPSetTile(pkt, 0, 0, 0, 256 + ((pal)&1)*128, \ + G_TX_LOADTILE, 0 , 0, 0, 0, 0, 0, 0); \ + gDPLoadSync(pkt); \ + gDPLoadTLUTCmd(pkt, G_TX_LOADTILE, 127); \ + gDPPipeSync(pkt); \ +}) + #else /* **** WORKAROUND hardware 1 load_tlut bug ****** */ #define gDPLoadTLUT_pal256(pkt, dram) \ diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp index 5739774ee..28debd120 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp @@ -125,7 +125,7 @@ static struct RSP { } rsp; static struct RDP { - const uint8_t *palette; + const uint8_t *palettes[2]; struct { const uint8_t *addr; uint8_t siz; @@ -145,6 +145,7 @@ static struct RDP { uint8_t cms, cmt; uint8_t shifts, shiftt; uint16_t uls, ult, lrs, lrt; // U10.2 + uint16_t tmem; // 0-511, in 64-bit word units uint32_t line_size_bytes; uint8_t palette; uint8_t tmem_index; // 0 or 1 for offset 0 kB or offset 2 kB, respectively @@ -490,8 +491,22 @@ void gfx_texture_cache_clear() gfx_texture_cache.lru.clear(); } -static bool gfx_texture_cache_lookup(int i, TextureCacheNode **n, const uint8_t *orig_addr, uint32_t fmt, uint32_t siz, uint32_t palette_index) { - TextureCacheKey key = { orig_addr, fmt, siz, palette_index }; +static bool gfx_texture_cache_lookup(int i, int tile) { + uint8_t fmt = rdp.texture_tile[tile].fmt; + uint8_t siz = rdp.texture_tile[tile].siz; + uint32_t tmem_index = rdp.texture_tile[tile].tmem_index; + + TextureCacheNode** n = &rendering_state.textures[i]; + const uint8_t* orig_addr = rdp.loaded_texture[tmem_index].addr; + uint8_t palette_index = rdp.texture_tile[tile].palette; + + TextureCacheKey key; + if (fmt == G_IM_FMT_CI) { + key = { orig_addr, { rdp.palettes[0], rdp.palettes[1] }, fmt, siz, palette_index }; + } else { + key = { orig_addr, { }, fmt, siz, palette_index }; + } + auto it = gfx_texture_cache.map.find(key); if (it != gfx_texture_cache.map.end()) { @@ -735,7 +750,8 @@ static void import_texture_ci4(int tile) { uint32_t size_bytes = rdp.loaded_texture[rdp.texture_tile[tile].tmem_index].size_bytes; uint32_t full_image_line_size_bytes = rdp.loaded_texture[rdp.texture_tile[tile].tmem_index].full_image_line_size_bytes; uint32_t line_size_bytes = rdp.loaded_texture[rdp.texture_tile[tile].tmem_index].line_size_bytes; - const uint8_t *palette = rdp.palette + rdp.texture_tile[tile].palette * 16 * 2; // 16 pixel entries, 16 bits each + uint32_t pal_idx = rdp.texture_tile[tile].palette; // 0-15 + const uint8_t *palette = rdp.palettes[pal_idx / 8] + (pal_idx % 8) * 16 * 2; // 16 pixel entries, 16 bits each SUPPORT_CHECK(full_image_line_size_bytes == line_size_bytes); for (uint32_t i = 0; i < size_bytes * 2; i++) { @@ -770,7 +786,7 @@ static void import_texture_ci8(int tile) { { for (uint32_t k = 0; k < line_size_bytes; i++, k++, j++) { uint8_t idx = addr[j]; - uint16_t col16 = (rdp.palette[idx * 2] << 8) | rdp.palette[idx * 2 + 1]; // Big endian load + uint16_t col16 = (rdp.palettes[idx / 128][(idx % 128) * 2] << 8) | rdp.palettes[idx / 128][(idx % 128) * 2 + 1]; // Big endian load uint8_t a = col16 & 1; uint8_t r = col16 >> 11; uint8_t g = (col16 >> 6) & 0x1f; @@ -815,7 +831,7 @@ static void import_texture(int i, int tile) { // if (ModInternal::callBindHook(0)) // return; - if (gfx_texture_cache_lookup(i, &rendering_state.textures[i], rdp.loaded_texture[tmem_index].addr, fmt, siz, rdp.texture_tile[tile].palette)) + if (gfx_texture_cache_lookup(i, tile)) { return; } @@ -1638,6 +1654,7 @@ static void gfx_dp_set_tile(uint8_t fmt, uint32_t siz, uint32_t line, uint32_t t int bp = 0; } + rdp.texture_tile[tile].tmem = tmem; //rdp.texture_tile[tile].tmem_index = tmem / 256; // tmem is the 64-bit word offset, so 256 words means 2 kB rdp.texture_tile[tile].tmem_index = tmem != 0; // assume one texture is loaded at address 0 and another texture at any other address rdp.textures_changed[0] = true; @@ -1654,10 +1671,19 @@ static void gfx_dp_set_tile_size(uint8_t tile, uint16_t uls, uint16_t ult, uint1 } static void gfx_dp_load_tlut(uint8_t tile, uint32_t high_index) { - //SUPPORT_CHECK(tile == G_TX_LOADTILE); - //SUPPORT_CHECK(rdp.texture_to_load.siz == G_IM_SIZ_16b); + SUPPORT_CHECK(tile == G_TX_LOADTILE); + SUPPORT_CHECK(rdp.texture_to_load.siz == G_IM_SIZ_16b); - rdp.palette = rdp.texture_to_load.addr; + SUPPORT_CHECK((rdp.texture_tile[tile].tmem == 256 && (high_index <= 127 || high_index == 255)) || (rdp.texture_tile[tile].tmem == 384 && high_index == 127)); + + if (rdp.texture_tile[tile].tmem == 256) { + rdp.palettes[0] = rdp.texture_to_load.addr; + if (high_index == 255) { + rdp.palettes[1] = rdp.texture_to_load.addr + 2 * 128; + } + } else { + rdp.palettes[1] = rdp.texture_to_load.addr; + } } static void gfx_dp_load_block(uint8_t tile, uint32_t uls, uint32_t ult, uint32_t lrs, uint32_t dxt) { diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_pc.h b/libultraship/libultraship/Lib/Fast3D/gfx_pc.h index b3b8d9082..446c0b6a4 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_pc.h +++ b/libultraship/libultraship/Lib/Fast3D/gfx_pc.h @@ -17,6 +17,7 @@ struct GfxDimensions struct TextureCacheKey { const uint8_t* texture_addr; + const uint8_t* palette_addrs[2]; uint8_t fmt, siz; uint8_t palette_index; diff --git a/libultraship/libultraship/TextureMod.cpp b/libultraship/libultraship/TextureMod.cpp index dd2d6fc3a..2a7e39511 100644 --- a/libultraship/libultraship/TextureMod.cpp +++ b/libultraship/libultraship/TextureMod.cpp @@ -80,7 +80,7 @@ namespace Ship { if (!this->TextureCache.contains(path)) this->TextureCache[path].resize(10); - TextureCacheKey key = { orig_addr, static_cast(fmt), static_cast(siz), static_cast(palette) }; + TextureCacheKey key = { orig_addr, { }, static_cast(fmt), static_cast(siz), static_cast(palette) }; TextureCacheValue value = { api->new_texture(), 0, 0, false }; const auto entry = new TextureCacheNode(key, value); api->select_texture(tile, entry->second.texture_id); diff --git a/soh/include/z64.h b/soh/include/z64.h index 6e783eeb9..24ec79946 100644 --- a/soh/include/z64.h +++ b/soh/include/z64.h @@ -336,16 +336,18 @@ typedef enum { } SkyboxId; typedef struct { - /* 0x000 */ char unk_00[0x128]; - /* 0x128 */ void* staticSegments[2]; - /* 0x130 */ u16 (*palettes)[256]; - /* 0x134 */ Gfx (*dListBuf)[150]; - /* 0x138 */ Gfx* unk_138; - /* 0x13C */ Vtx* roomVtx; - /* 0x140 */ s16 unk_140; - /* 0x144 */ Vec3f rot; - /* 0x150 */ char unk_150[0x10]; -} SkyboxContext; // size = 0x160 + char unk_00[0x128]; + s16 skyboxId; + void* textures[2][6]; + void* palettes[6]; + u16 palette_size; + Gfx (*dListBuf)[150]; + Gfx* unk_138; + Vtx* roomVtx; + s16 unk_140; + Vec3f rot; + char unk_150[0x10]; +} SkyboxContext; typedef enum { /* 0 */ OCARINA_SONG_MINUET, diff --git a/soh/src/code/z_kankyo.c b/soh/src/code/z_kankyo.c index 90194835e..afcd0f4fa 100644 --- a/soh/src/code/z_kankyo.c +++ b/soh/src/code/z_kankyo.c @@ -677,7 +677,9 @@ void Environment_UpdateSkybox(GlobalContext* globalCtx, u8 skyboxId, Environment SkyboxTableEntry entryA = sSkyboxTable[newSkybox1Index]; for (int i = 0; i < 5; i++) - LoadSkyboxTex(globalCtx, skyboxCtx, 0, i, entryA.textures[i], 128, i == 4 ? 128 : 64, 128, 64); + LoadSkyboxTex(skyboxCtx, 0, i, entryA.textures[i], 128, i == 4 ? 128 : 64, 128, 64); + + Skybox_Update(skyboxCtx); envCtx->skybox1Index = newSkybox1Index; @@ -695,7 +697,9 @@ void Environment_UpdateSkybox(GlobalContext* globalCtx, u8 skyboxId, Environment SkyboxTableEntry entryA = sSkyboxTable[newSkybox2Index]; for (int i = 0; i < 5; i++) - LoadSkyboxTex(globalCtx, skyboxCtx, 1, i, entryA.textures[i], 128, i == 4 ? 128 : 64, 128, 64); + LoadSkyboxTex(skyboxCtx, 1, i, entryA.textures[i], 128, i == 4 ? 128 : 64, 128, 64); + + Skybox_Update(skyboxCtx); envCtx->skybox2Index = newSkybox2Index; @@ -712,7 +716,7 @@ void Environment_UpdateSkybox(GlobalContext* globalCtx, u8 skyboxId, Environment if ((newSkybox1Index & 1) ^ ((newSkybox1Index & 4) >> 2)) { SkyboxTableEntry entryA = sSkyboxTable[newSkybox1Index]; - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, entryA.palettes[0], 16, 8); + LoadSkyboxPalette(skyboxCtx, 0, entryA.palettes[0], 16, 8); //size = gSkyboxFiles[newSkybox1Index].palette.vromEnd - gSkyboxFiles[newSkybox1Index].palette.vromStart; //osCreateMesgQueue(&envCtx->loadQueue, &envCtx->loadMsg, 1); @@ -721,7 +725,7 @@ void Environment_UpdateSkybox(GlobalContext* globalCtx, u8 skyboxId, Environment //"../z_kankyo.c", 1307); } else { SkyboxTableEntry entryA = sSkyboxTable[newSkybox1Index]; - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, entryA.palettes[0], 16, 8); + LoadSkyboxPalette(skyboxCtx, 1, entryA.palettes[0], 16, 8); //size = gSkyboxFiles[newSkybox1Index].palette.vromEnd - gSkyboxFiles[newSkybox1Index].palette.vromStart; //osCreateMesgQueue(&envCtx->loadQueue, &envCtx->loadMsg, 1); @@ -729,6 +733,8 @@ void Environment_UpdateSkybox(GlobalContext* globalCtx, u8 skyboxId, Environment //gSkyboxFiles[newSkybox1Index].palette.vromStart, size, 0, &envCtx->loadQueue, NULL, //"../z_kankyo.c", 1320); } + + Skybox_Update(skyboxCtx); } if (envCtx->skyboxDmaState == SKYBOX_DMA_FILE2_DONE) { @@ -737,7 +743,7 @@ void Environment_UpdateSkybox(GlobalContext* globalCtx, u8 skyboxId, Environment if ((newSkybox2Index & 1) ^ ((newSkybox2Index & 4) >> 2)) { SkyboxTableEntry entryA = sSkyboxTable[newSkybox2Index]; - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, entryA.palettes[0], 16, 8); + LoadSkyboxPalette(skyboxCtx, 0, entryA.palettes[0], 16, 8); /*size = gSkyboxFiles[newSkybox2Index].palette.vromEnd - gSkyboxFiles[newSkybox2Index].palette.vromStart; osCreateMesgQueue(&envCtx->loadQueue, &envCtx->loadMsg, 1); @@ -747,7 +753,7 @@ void Environment_UpdateSkybox(GlobalContext* globalCtx, u8 skyboxId, Environment } else { SkyboxTableEntry entryA = sSkyboxTable[newSkybox2Index]; - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, entryA.palettes[0], 16, 8); + LoadSkyboxPalette(skyboxCtx, 1, entryA.palettes[0], 16, 8); /*size = gSkyboxFiles[newSkybox2Index].palette.vromEnd - gSkyboxFiles[newSkybox2Index].palette.vromStart; osCreateMesgQueue(&envCtx->loadQueue, &envCtx->loadMsg, 1); @@ -755,6 +761,8 @@ void Environment_UpdateSkybox(GlobalContext* globalCtx, u8 skyboxId, Environment gSkyboxFiles[newSkybox2Index].palette.vromStart, size, 0, &envCtx->loadQueue, NULL, "../z_kankyo.c", 1355);*/ } + + Skybox_Update(skyboxCtx); } if ((envCtx->skyboxDmaState == SKYBOX_DMA_FILE1_START) || (envCtx->skyboxDmaState == SKYBOX_DMA_FILE2_START)) { diff --git a/soh/src/code/z_vr_box.c b/soh/src/code/z_vr_box.c index e532edf31..76753e096 100644 --- a/soh/src/code/z_vr_box.c +++ b/soh/src/code/z_vr_box.c @@ -248,7 +248,7 @@ s32 func_800ADBB0(SkyboxContext* skyboxCtx, Vtx* roomVtx, s32 arg2, s32 arg3, s3 for (phi_t2_4 = 0, phi_ra = 0; phi_ra < 4; phi_ra++, phi_a2_4 += 0x1F) { for (phi_a0_4 = 0, phi_t1 = 0; phi_t1 < 4; phi_t1++, phi_a0_4 += 0x3F, phi_t2_4 += 4) { - gDPLoadTextureTile(skyboxCtx->unk_138++, (uintptr_t)skyboxCtx->staticSegments[0] + D_8012AC90[arg8], + gDPLoadTextureTile(skyboxCtx->unk_138++, skyboxCtx->textures[0][arg8], G_IM_FMT_CI, G_IM_SIZ_8b, 256, 0, phi_a0_4, phi_a2_4, phi_a0_4 + 0x3F, phi_a2_4 + 0x1F, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); @@ -360,11 +360,11 @@ s32 func_800AE2C0(SkyboxContext* skyboxCtx, Vtx* roomVtx, s32 arg2, s32 arg3, s3 phi_a2_4 = 0; for (phi_t2_4 = 0, phi_ra = 0; phi_ra < 4; phi_ra++, phi_a2_4 += 0x1F) { for (phi_a0_4 = 0, phi_t1 = 0; phi_t1 < 4; phi_t1++, phi_a0_4 += 0x1F, phi_t2_4 += 4) { - gDPLoadMultiTile(skyboxCtx->unk_138++, (uintptr_t)skyboxCtx->staticSegments[0] + D_8012ADC0[arg8], 0, + gDPLoadMultiTile(skyboxCtx->unk_138++, skyboxCtx->textures[0][arg8], 0, G_TX_RENDERTILE, G_IM_FMT_CI, G_IM_SIZ_8b, 128, 0, phi_a0_4, phi_a2_4, phi_a0_4 + 0x1F, phi_a2_4 + 0x1F, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadMultiTile(skyboxCtx->unk_138++, (uintptr_t)skyboxCtx->staticSegments[1] + D_8012ADC0[arg8], 0x80, 1, + gDPLoadMultiTile(skyboxCtx->unk_138++, skyboxCtx->textures[1][arg8], 0x80, 1, G_IM_FMT_CI, G_IM_SIZ_8b, 128, 0, phi_a0_4, phi_a2_4, phi_a0_4 + 0x1F, phi_a2_4 + 0x1F, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); @@ -379,11 +379,11 @@ s32 func_800AE2C0(SkyboxContext* skyboxCtx, Vtx* roomVtx, s32 arg2, s32 arg3, s3 phi_a2_4 = 0; for (phi_t2_4 = 0, phi_ra = 0; phi_ra < 2; phi_ra++, phi_a2_4 += 0x1F) { for (phi_a0_4 = 0, phi_t1 = 0; phi_t1 < 4; phi_t1++, phi_a0_4 += 0x1F, phi_t2_4 += 4) { - gDPLoadMultiTile(skyboxCtx->unk_138++, (uintptr_t)skyboxCtx->staticSegments[0] + D_8012ADC0[arg8], 0, + gDPLoadMultiTile(skyboxCtx->unk_138++, skyboxCtx->textures[0][arg8], 0, G_TX_RENDERTILE, G_IM_FMT_CI, G_IM_SIZ_8b, 128, 0, phi_a0_4, phi_a2_4, phi_a0_4 + 0x1F, phi_a2_4 + 0x1F, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadMultiTile(skyboxCtx->unk_138++, (uintptr_t)skyboxCtx->staticSegments[1] + D_8012ADC0[arg8], 0x80, 1, + gDPLoadMultiTile(skyboxCtx->unk_138++, skyboxCtx->textures[1][arg8], 0x80, 1, G_IM_FMT_CI, G_IM_SIZ_8b, 128, 0, phi_a0_4, phi_a2_4, phi_a0_4 + 0x1F, phi_a2_4 + 0x1F, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); @@ -394,11 +394,11 @@ s32 func_800AE2C0(SkyboxContext* skyboxCtx, Vtx* roomVtx, s32 arg2, s32 arg3, s3 phi_a2_4 -= 0x1F; for (phi_ra = 0; phi_ra < 2; phi_ra++, phi_a2_4 -= 0x1F) { for (phi_a0_4 = 0, phi_t1 = 0; phi_t1 < 4; phi_t1++, phi_a0_4 += 0x1F, phi_t2_4 += 4) { - gDPLoadMultiTile(skyboxCtx->unk_138++, (uintptr_t)skyboxCtx->staticSegments[0] + D_8012ADC0[arg8], 0, + gDPLoadMultiTile(skyboxCtx->unk_138++, skyboxCtx->textures[0][arg8], 0, G_TX_RENDERTILE, G_IM_FMT_CI, G_IM_SIZ_8b, 128, 0, phi_a0_4, phi_a2_4, phi_a0_4 + 0x1F, phi_a2_4 + 0x1F, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadMultiTile(skyboxCtx->unk_138++, (uintptr_t)skyboxCtx->staticSegments[1] + D_8012ADC0[arg8], 0x80, 1, + gDPLoadMultiTile(skyboxCtx->unk_138++, skyboxCtx->textures[1][arg8], 0x80, 1, G_IM_FMT_CI, G_IM_SIZ_8b, 128, 0, phi_a0_4, phi_a2_4, phi_a0_4 + 0x1F, phi_a2_4 + 0x1F, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); @@ -444,25 +444,20 @@ void func_800AF178(SkyboxContext* skyboxCtx, s32 arg1) { } } -void LoadSkyboxTex(GlobalContext* globalCtx, SkyboxContext* skyboxCtx, int segmentIndex, int imageIndex, char* tex, int width, int height, int offsetW, int offsetH) +void LoadSkyboxTex(SkyboxContext* skyboxCtx, int segmentIndex, int imageIndex, char* tex, int width, int height, int offsetW, int offsetH) { - if (globalCtx != NULL && globalCtx->state.gfxCtx != NULL && globalCtx->state.gfxCtx != 0xABABABAB) - gSPInvalidateTexCache(globalCtx->state.gfxCtx->polyOpa.p++, ((uintptr_t)skyboxCtx->staticSegments[segmentIndex] + (imageIndex * (offsetW * offsetH)))); - - memcpy((uintptr_t)skyboxCtx->staticSegments[segmentIndex] + (imageIndex * (offsetW * offsetH)), ResourceMgr_LoadTexByName(tex), width * height); + skyboxCtx->textures[segmentIndex][imageIndex] = tex; } -void LoadSkyboxTexAtOffset(SkyboxContext* skyboxCtx, int segmentIndex, char* tex, int width, int height, int offset) +void LoadSkyboxTexAtOffset(SkyboxContext* skyboxCtx, int segmentIndex, int imageIndex, char* tex, int width, int height, int offset) { - memcpy((uintptr_t)skyboxCtx->staticSegments[segmentIndex] + offset, ResourceMgr_LoadTexByName(tex), width * height); + skyboxCtx->textures[segmentIndex][imageIndex] = tex; } -void LoadSkyboxPalette(GlobalContext* globalCtx, SkyboxContext* skyboxCtx, int paletteIndex, char* palTex, int width, +void LoadSkyboxPalette(SkyboxContext* skyboxCtx, int paletteIndex, char* palTex, int width, int height) { - if (globalCtx != NULL && globalCtx->state.gfxCtx != NULL && globalCtx->state.gfxCtx != 0xABABABAB) - gSPInvalidateTexCache(globalCtx->state.gfxCtx->polyOpa.p++, (uintptr_t)skyboxCtx->palettes + (paletteIndex * (width * height * 2))); - - memcpy((uintptr_t)skyboxCtx->palettes + (paletteIndex * (width * height * 2)), ResourceMgr_LoadTexByName(palTex), width * height * 2); + skyboxCtx->palettes[paletteIndex] = palTex; + skyboxCtx->palette_size = width * height; } static const char* sSBVRFine0Tex[] = @@ -634,376 +629,316 @@ void Skybox_Setup(GlobalContext* globalCtx, SkyboxContext* skyboxCtx, s16 skybox } - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, (128 * 64 * 4) + (128 * 128), "../z_vr_box.c", 1054); - SkyboxTableEntry entryA = sSkyboxTable[sp41]; for (int i = 0; i < 5; i++) - LoadSkyboxTex(globalCtx, skyboxCtx, 0, i, entryA.textures[i], 128, i == 4 ? 128 : 64, 128, 64); + LoadSkyboxTex(skyboxCtx, 0, i, entryA.textures[i], 128, i == 4 ? 128 : 64, 128, 64); SkyboxTableEntry entryB = sSkyboxTable[sp40]; - skyboxCtx->staticSegments[1] = GameState_Alloc(&globalCtx->state, (128 * 64 * 4) + (128 * 128), "../z_vr_box.c", 1060); - for (int i = 0; i < 5; i++) - LoadSkyboxTex(globalCtx, skyboxCtx, 1, i, entryB.textures[i], 128, i == 4 ? 128 : 64, 128, 64); + LoadSkyboxTex(skyboxCtx, 1, i, entryB.textures[i], 128, i == 4 ? 128 : 64, 128, 64); if ((sp41 & 1) ^ ((sp41 & 4) >> 2)) { - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 256 * 2, "../z_vr_box.c", 1072); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, entryA.palettes[0], 16, 8); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, entryB.palettes[0], 16, 8); + LoadSkyboxPalette(skyboxCtx, 0, entryA.palettes[0], 16, 8); + LoadSkyboxPalette(skyboxCtx, 1, entryB.palettes[0], 16, 8); } else { - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 256 * 2, "../z_vr_box.c", 1085); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, entryB.palettes[0], 16, 8); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, entryA.palettes[0], 16, 8); + LoadSkyboxPalette(skyboxCtx, 0, entryB.palettes[0], 16, 8); + LoadSkyboxPalette(skyboxCtx, 1, entryA.palettes[0], 16, 8); } break; case SKYBOX_BAZAAR: skyboxCtx->unk_140 = 1; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 2, "../z_vr_box.c", 1226); + LoadSkyboxTex(skyboxCtx, 0, 0, gBazaarBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gBazaar2BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gBazaarBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gBazaar2BgTex, 256, 256, 256, 256); - - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 2, "../z_vr_box.c", 1231); - - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gBazaarBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gBazaarBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gBazaarBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gBazaarBg2Tlut, 16, 16); skyboxCtx->rot.y = 0.8f; break; case SKYBOX_HOUSE_LINK: skyboxCtx->unk_140 = 1; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 4, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gLinksHouseBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gLinksHouse2BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 2, gLinksHouse3BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 3, gLinksHouse4BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gLinksHouseBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gLinksHouse2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 2, gLinksHouse3BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 3, gLinksHouse4BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 4, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gLinksHouseBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gLinksHouseBg2Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 2, gLinksHouseBg3Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 3, gLinksHouseBg4Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gLinksHouseBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gLinksHouseBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 2, gLinksHouseBg3Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 3, gLinksHouseBg4Tlut, 16, 16); break; case SKYBOX_OVERCAST_SUNSET: - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0xC000, "../z_vr_box.c", 1226); - LoadSkyboxTexAtOffset(skyboxCtx, 0, gSunsetOvercastSkybox1Tex, 128, 64, 0x0); - LoadSkyboxTexAtOffset(skyboxCtx, 0, gSunsetOvercastSkybox2Tex, 128, 64, 0x2000); - LoadSkyboxTexAtOffset(skyboxCtx, 0, gSunsetOvercastSkybox3Tex, 128, 64, 0x4000); - LoadSkyboxTexAtOffset(skyboxCtx, 0, gSunsetOvercastSkybox4Tex, 128, 64, 0x6000); - LoadSkyboxTexAtOffset(skyboxCtx, 0, gSunsetOvercastSkybox5Tex, 128, 128, 0x8000); + LoadSkyboxTexAtOffset(skyboxCtx, 0, 0, gSunsetOvercastSkybox1Tex, 128, 64, 0x0); + LoadSkyboxTexAtOffset(skyboxCtx, 0, 1, gSunsetOvercastSkybox2Tex, 128, 64, 0x2000); + LoadSkyboxTexAtOffset(skyboxCtx, 0, 2, gSunsetOvercastSkybox3Tex, 128, 64, 0x4000); + LoadSkyboxTexAtOffset(skyboxCtx, 0, 3, gSunsetOvercastSkybox4Tex, 128, 64, 0x6000); + LoadSkyboxTexAtOffset(skyboxCtx, 0, 4, gSunsetOvercastSkybox5Tex, 128, 128, 0x8000); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x100, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gSunsetOvercastSkyboxTlut, 16, 8); + LoadSkyboxPalette(skyboxCtx, 0, gSunsetOvercastSkyboxTlut, 16, 8); break; case SKYBOX_MARKET_ADULT: skyboxCtx->unk_140 = 1; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 4, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gMarketRuinsBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gMarketRuins2BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 2, gMarketRuins3BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 3, gMarketRuins4BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gMarketRuinsBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gMarketRuins2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 2, gMarketRuins3BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 3, gMarketRuins4BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 4, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gMarketRuinsBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gMarketRuinsBg2Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 2, gMarketRuinsBg3Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 3, gMarketRuinsBg4Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gMarketRuinsBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gMarketRuinsBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 2, gMarketRuinsBg3Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 3, gMarketRuinsBg4Tlut, 16, 16); break; case SKYBOX_CUTSCENE_MAP: - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000, "../z_vr_box.c", 1226); - LoadSkyboxTexAtOffset(skyboxCtx, 0, gHoly0Skybox1Tex, 128, 64, 0x0); - LoadSkyboxTexAtOffset(skyboxCtx, 0, gHoly0Skybox2Tex, 128, 64, 0x2000); - LoadSkyboxTexAtOffset(skyboxCtx, 0, gHoly0Skybox3Tex, 128, 64, 0x4000); - LoadSkyboxTexAtOffset(skyboxCtx, 0, gHoly0Skybox4Tex, 128, 64, 0x6000); - LoadSkyboxTexAtOffset(skyboxCtx, 0, gHoly0Skybox5Tex, 128, 128, 0x8000); - LoadSkyboxTexAtOffset(skyboxCtx, 0, gHoly0Skybox6Tex, 128, 128, 0xC000); + LoadSkyboxTexAtOffset(skyboxCtx, 0, 0, gHoly0Skybox1Tex, 128, 64, 0x0); + LoadSkyboxTexAtOffset(skyboxCtx, 0, 1, gHoly0Skybox2Tex, 128, 64, 0x2000); + LoadSkyboxTexAtOffset(skyboxCtx, 0, 2, gHoly0Skybox3Tex, 128, 64, 0x4000); + LoadSkyboxTexAtOffset(skyboxCtx, 0, 3, gHoly0Skybox4Tex, 128, 64, 0x6000); + LoadSkyboxTexAtOffset(skyboxCtx, 0, 4, gHoly0Skybox5Tex, 128, 128, 0x8000); + LoadSkyboxTexAtOffset(skyboxCtx, 0, 5, gHoly0Skybox6Tex, 128, 128, 0xC000); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x100 * 2, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gHoly0SkyboxTlut, 16, 8); + LoadSkyboxPalette(skyboxCtx, 0, gHoly0SkyboxTlut, 16, 8); - skyboxCtx->staticSegments[1] = GameState_Alloc(&globalCtx->state, 0x10000, "../z_vr_box.c", 1226); - LoadSkyboxTexAtOffset(skyboxCtx, 1, gHoly1Skybox1Tex, 128, 64, 0x0); - LoadSkyboxTexAtOffset(skyboxCtx, 1, gHoly1Skybox2Tex, 128, 64, 0x2000); - LoadSkyboxTexAtOffset(skyboxCtx, 1, gHoly1Skybox3Tex, 128, 64, 0x4000); - LoadSkyboxTexAtOffset(skyboxCtx, 1, gHoly1Skybox4Tex, 128, 64, 0x6000); - LoadSkyboxTexAtOffset(skyboxCtx, 1, gHoly1Skybox5Tex, 128, 128, 0x8000); - LoadSkyboxTexAtOffset(skyboxCtx, 1, gHoly1Skybox6Tex, 128, 128, 0xC000); + LoadSkyboxTexAtOffset(skyboxCtx, 1, 0, gHoly1Skybox1Tex, 128, 64, 0x0); + LoadSkyboxTexAtOffset(skyboxCtx, 1, 1, gHoly1Skybox2Tex, 128, 64, 0x2000); + LoadSkyboxTexAtOffset(skyboxCtx, 1, 2, gHoly1Skybox3Tex, 128, 64, 0x4000); + LoadSkyboxTexAtOffset(skyboxCtx, 1, 3, gHoly1Skybox4Tex, 128, 64, 0x6000); + LoadSkyboxTexAtOffset(skyboxCtx, 1, 4, gHoly1Skybox5Tex, 128, 128, 0x8000); + LoadSkyboxTexAtOffset(skyboxCtx, 1, 5, gHoly1Skybox6Tex, 128, 128, 0xC000); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gHoly1SkyboxTlut, 16, 8); + LoadSkyboxPalette(skyboxCtx, 1, gHoly1SkyboxTlut, 16, 8); break; case SKYBOX_MARKET_CHILD_DAY: skyboxCtx->unk_140 = 1; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 4, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gMarketDayBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gMarketDay2BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 2, gMarketDay3BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 3, gMarketDay4BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gMarketDayBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gMarketDay2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 2, gMarketDay3BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 3, gMarketDay4BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 4, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gMarketDayBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gMarketDayBg2Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 2, gMarketDayBg3Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 3, gMarketDayBg4Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gMarketDayBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gMarketDayBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 2, gMarketDayBg3Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 3, gMarketDayBg4Tlut, 16, 16); break; case SKYBOX_MARKET_CHILD_NIGHT: skyboxCtx->unk_140 = 1; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 4, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gMarketNightBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gMarketNight2BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 2, gMarketNight3BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 3, gMarketNight4BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gMarketNightBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gMarketNight2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 2, gMarketNight3BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 3, gMarketNight4BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 4, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gMarketNightBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gMarketNightBg2Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 2, gMarketNightBg3Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 3, gMarketNightBg4Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gMarketNightBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gMarketNightBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 2, gMarketNightBg3Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 3, gMarketNightBg4Tlut, 16, 16); break; case SKYBOX_HAPPY_MASK_SHOP: skyboxCtx->unk_140 = 1; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 2, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gMaskShopBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gMaskShop2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gMaskShopBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gMaskShop2BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 2, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gMaskShopBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gMaskShopBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gMaskShopBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gMaskShopBg2Tlut, 16, 16); skyboxCtx->rot.y = 0.8f; break; case SKYBOX_HOUSE_KNOW_IT_ALL_BROTHERS: skyboxCtx->unk_140 = 1; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 4, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gKnowItAllBrosHouseBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gKnowItAllBrosHouse2BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 2, gKnowItAllBrosHouse3BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 3, gKnowItAllBrosHouse4BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gKnowItAllBrosHouseBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gKnowItAllBrosHouse2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 2, gKnowItAllBrosHouse3BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 3, gKnowItAllBrosHouse4BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 4, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gKnowItAllBrosHouseBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gKnowItAllBrosHouseBg2Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 2, gKnowItAllBrosHouseBg3Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 3, gKnowItAllBrosHouseBg4Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gKnowItAllBrosHouseBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gKnowItAllBrosHouseBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 2, gKnowItAllBrosHouseBg3Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 3, gKnowItAllBrosHouseBg4Tlut, 16, 16); break; case SKYBOX_HOUSE_OF_TWINS: skyboxCtx->unk_140 = 2; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 3, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gHouseOfTwinsBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gHouseOfTwins2BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 2, gHouseOfTwins3BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gHouseOfTwinsBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gHouseOfTwins2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 2, gHouseOfTwins3BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 3, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gHouseOfTwinsBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gHouseOfTwinsBg2Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 2, gHouseOfTwinsBg3Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gHouseOfTwinsBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gHouseOfTwinsBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 2, gHouseOfTwinsBg3Tlut, 16, 16); break; case SKYBOX_STABLES: skyboxCtx->unk_140 = 1; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 4, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gStableBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gStable2BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 2, gStable3BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 3, gStable4BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gStableBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gStable2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 2, gStable3BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 3, gStable4BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 4, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gStableBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gStableBg2Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 2, gStableBg3Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 3, gStableBg4Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gStableBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gStableBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 2, gStableBg3Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 3, gStableBg4Tlut, 16, 16); break; case SKYBOX_HOUSE_KAKARIKO: skyboxCtx->unk_140 = 1; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 4, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gCarpentersHouseBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gCarpentersHouse2BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 2, gCarpentersHouse3BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 3, gCarpentersHouse4BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gCarpentersHouseBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gCarpentersHouse2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 2, gCarpentersHouse3BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 3, gCarpentersHouse4BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 4, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gCarpentersHouseBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gCarpentersHouseBg2Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 2, gCarpentersHouseBg3Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 3, gCarpentersHouseBg4Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gCarpentersHouseBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gCarpentersHouseBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 2, gCarpentersHouseBg3Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 3, gCarpentersHouseBg4Tlut, 16, 16); break; case SKYBOX_KOKIRI_SHOP: skyboxCtx->unk_140 = 1; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 2, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gKokiriShopBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gKokiriShop2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gKokiriShopBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gKokiriShop2BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 2, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gKokiriShopBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gKokiriShopBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gKokiriShopBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gKokiriShopBg2Tlut, 16, 16); skyboxCtx->rot.y = 0.8f; break; case SKYBOX_GORON_SHOP: skyboxCtx->unk_140 = 1; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 2, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gGoronShopBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gGoronShop2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gGoronShopBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gGoronShop2BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 2, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gGoronShopBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gGoronShopBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gGoronShopBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gGoronShopBg2Tlut, 16, 16); skyboxCtx->rot.y = 0.8f; break; case SKYBOX_ZORA_SHOP: skyboxCtx->unk_140 = 1; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 2, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gZoraShopBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gZoraShop2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gZoraShopBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gZoraShop2BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 2, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gZoraShopBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gZoraShopBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gZoraShopBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gZoraShopBg2Tlut, 16, 16); skyboxCtx->rot.y = 0.8f; break; case SKYBOX_POTION_SHOP_KAKARIKO: skyboxCtx->unk_140 = 1; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 2, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gKakPotionShopBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gKakPotionShop2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gKakPotionShopBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gKakPotionShop2BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 2, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gKakPotionShopBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gKakPotionShopBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gKakPotionShopBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gKakPotionShopBg2Tlut, 16, 16); skyboxCtx->rot.y = 0.8f; break; case SKYBOX_POTION_SHOP_MARKET: skyboxCtx->unk_140 = 1; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 2, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gMarketPotionShopBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gMarketPotionShop2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gMarketPotionShopBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gMarketPotionShop2BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 2, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gMarketPotionShopBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gMarketPotionShopBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gMarketPotionShopBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gMarketPotionShopBg2Tlut, 16, 16); skyboxCtx->rot.y = 0.8f; break; case SKYBOX_BOMBCHU_SHOP: skyboxCtx->unk_140 = 1; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 2, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gBombchuShopBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gBombchuShop2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gBombchuShopBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gBombchuShop2BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 2, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gBombchuShopBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gBombchuShopBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gBombchuShopBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gBombchuShopBg2Tlut, 16, 16); skyboxCtx->rot.y = 0.8f; break; case SKYBOX_HOUSE_RICHARD: skyboxCtx->unk_140 = 1; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 4, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gRichardsHouseBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gRichardsHouse2BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 2, gRichardsHouse3BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 3, gRichardsHouse4BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gRichardsHouseBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gRichardsHouse2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 2, gRichardsHouse3BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 3, gRichardsHouse4BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 4, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gRichardsHouseBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gRichardsHouseBg2Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 2, gRichardsHouseBg3Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 3, gRichardsHouseBg4Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gRichardsHouseBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gRichardsHouseBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 2, gRichardsHouseBg3Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 3, gRichardsHouseBg4Tlut, 16, 16); break; case SKYBOX_HOUSE_IMPA: skyboxCtx->unk_140 = 1; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 4, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gCowHouseBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gCowHouse2BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 2, gCowHouse3BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 3, gCowHouse4BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gCowHouseBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gCowHouse2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 2, gCowHouse3BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 3, gCowHouse4BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 4, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gCowHouseBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gCowHouseBg2Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 2, gCowHouseBg3Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 3, gCowHouseBg4Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gCowHouseBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gCowHouseBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 2, gCowHouseBg3Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 3, gCowHouseBg4Tlut, 16, 16); break; case SKYBOX_TENT: skyboxCtx->unk_140 = 2; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 3, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gCarpentersTentBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gCarpentersTent2BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 2, gCarpentersTent3BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gCarpentersTentBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gCarpentersTent2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 2, gCarpentersTent3BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 3, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gCarpentersTentBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gCarpentersTentBg2Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 2, gCarpentersTentBg3Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gCarpentersTentBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gCarpentersTentBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 2, gCarpentersTentBg3Tlut, 16, 16); break; case SKYBOX_HOUSE_MIDO: skyboxCtx->unk_140 = 2; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 3, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gMidosHouseBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gMidosHouse2BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 2, gMidosHouse3BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gMidosHouseBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gMidosHouse2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 2, gMidosHouse3BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 3, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gMidosHouseBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gMidosHouseBg2Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 2, gMidosHouseBg3Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gMidosHouseBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gMidosHouseBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 2, gMidosHouseBg3Tlut, 16, 16); break; case SKYBOX_HOUSE_SARIA: skyboxCtx->unk_140 = 2; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 3, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gSariasHouseBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gSariasHouse2BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 2, gSariasHouse3BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gSariasHouseBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gSariasHouse2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 2, gSariasHouse3BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 3, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gSariasHouseBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gSariasHouseBg2Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 2, gSariasHouseBg3Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gSariasHouseBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gSariasHouseBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 2, gSariasHouseBg3Tlut, 16, 16); break; case SKYBOX_HOUSE_ALLEY: skyboxCtx->unk_140 = 2; - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 3, "../z_vr_box.c", 1226); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 0, gBackAlleyHouseBgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 1, gBackAlleyHouse2BgTex, 256, 256, 256, 256); - LoadSkyboxTex(globalCtx, skyboxCtx, 0, 2, gBackAlleyHouse3BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 0, gBackAlleyHouseBgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 1, gBackAlleyHouse2BgTex, 256, 256, 256, 256); + LoadSkyboxTex(skyboxCtx, 0, 2, gBackAlleyHouse3BgTex, 256, 256, 256, 256); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x200 * 3, "../z_vr_box.c", 1231); - LoadSkyboxPalette(globalCtx, skyboxCtx, 0, gBackAlleyHouseBgTlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 1, gBackAlleyHouseBg2Tlut, 16, 16); - LoadSkyboxPalette(globalCtx, skyboxCtx, 2, gBackAlleyHouseBg3Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 0, gBackAlleyHouseBgTlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 1, gBackAlleyHouseBg2Tlut, 16, 16); + LoadSkyboxPalette(skyboxCtx, 2, gBackAlleyHouseBg3Tlut, 16, 16); break; default: - skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 4, "../z_vr_box.c", 1226); - skyboxCtx->staticSegments[1] = GameState_Alloc(&globalCtx->state, 0x10000 * 4, "../z_vr_box.c", 1226); - skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x1000, "../z_vr_box.c", 1226); break; } } @@ -1011,6 +946,7 @@ void Skybox_Setup(GlobalContext* globalCtx, SkyboxContext* skyboxCtx, s16 skybox void Skybox_Init(GameState* state, SkyboxContext* skyboxCtx, s16 skyboxId) { GlobalContext* globalCtx = (GlobalContext*)state; + skyboxCtx->skyboxId = skyboxId; skyboxCtx->unk_140 = 0; skyboxCtx->rot.x = skyboxCtx->rot.y = skyboxCtx->rot.z = 0.0f; @@ -1050,3 +986,20 @@ void Skybox_Init(GameState* state, SkyboxContext* skyboxCtx, s16 skyboxId) { osSyncPrintf(VT_RST); } } + +void Skybox_Update(SkyboxContext* skyboxCtx) { + if (skyboxCtx->skyboxId != SKYBOX_NONE) { + osSyncPrintf(VT_FGCOL(GREEN)); + + if (skyboxCtx->unk_140 != 0) { + func_800AEFC8(skyboxCtx, skyboxCtx->skyboxId); + } else { + if (skyboxCtx->skyboxId == SKYBOX_CUTSCENE_MAP) { + func_800AF178(skyboxCtx, 6); + } else { + func_800AF178(skyboxCtx, 5); + } + } + osSyncPrintf(VT_RST); + } +} diff --git a/soh/src/code/z_vr_box_draw.c b/soh/src/code/z_vr_box_draw.c index a5c0610f7..292789333 100644 --- a/soh/src/code/z_vr_box_draw.c +++ b/soh/src/code/z_vr_box_draw.c @@ -17,22 +17,10 @@ void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyb func_800945A0(gfxCtx); //gsSPShaderTest(POLY_OPA_DISP++); - gSPInvalidateTexCache(POLY_OPA_DISP++, 0); - - // OTRTODO: Not working... - /*for (int i = 0; i < 8; i++) - { - if (skyboxCtx->staticSegments[0] != NULL) - gSPInvalidateTexCache(POLY_OPA_DISP++, (uintptr_t)skyboxCtx->staticSegments[0] + (0x10000 * i)); - - if (skyboxCtx->staticSegments[1] != NULL) - gSPInvalidateTexCache(POLY_OPA_DISP++, (uintptr_t)skyboxCtx->staticSegments[1] + (0x10000 * i)); - }*/ - - gSPSegment(POLY_OPA_DISP++, 0x7, skyboxCtx->staticSegments[0]); + /*gSPSegment(POLY_OPA_DISP++, 0x7, skyboxCtx->staticSegments[0]); gSPSegment(POLY_OPA_DISP++, 0x8, skyboxCtx->staticSegments[1]); - gSPSegment(POLY_OPA_DISP++, 0x9, skyboxCtx->palettes); + gSPSegment(POLY_OPA_DISP++, 0x9, skyboxCtx->palettes);*/ gDPSetPrimColor(POLY_OPA_DISP++, 0x00, 0x00, 0, 0, 0, blend); gSPTexture(POLY_OPA_DISP++, 0x8000, 0x8000, 0, G_TX_RENDERTILE, G_ON); @@ -50,7 +38,12 @@ void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyb gDPSetColorDither(POLY_OPA_DISP++, G_CD_MAGICSQ); gDPSetTextureFilter(POLY_OPA_DISP++, G_TF_BILERP); - gDPLoadTLUT_pal256(POLY_OPA_DISP++, skyboxCtx->palettes[0]); + if (skyboxCtx->palette_size == 256) { + gDPLoadTLUT_pal256(POLY_OPA_DISP++, skyboxCtx->palettes[0]); + } else { + gDPLoadTLUT_pal128(POLY_OPA_DISP++, 0, skyboxCtx->palettes[0]); + gDPLoadTLUT_pal128(POLY_OPA_DISP++, 1, skyboxCtx->palettes[1]); + } gDPSetTextureLUT(POLY_OPA_DISP++, G_TT_RGBA16); gDPSetTextureConvert(POLY_OPA_DISP++, G_TC_FILT); From 6f49bc9a56f8cd4c4659fa26b01b9601f83b806f Mon Sep 17 00:00:00 2001 From: MegaMech Date: Fri, 1 Apr 2022 22:44:03 -0700 Subject: [PATCH 021/146] Update Globals.cpp --- ZAPDTR/ZAPD/Globals.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ZAPDTR/ZAPD/Globals.cpp b/ZAPDTR/ZAPD/Globals.cpp index f0df0e547..455205b2a 100644 --- a/ZAPDTR/ZAPD/Globals.cpp +++ b/ZAPDTR/ZAPD/Globals.cpp @@ -20,6 +20,7 @@ Globals::Globals() profile = false; useLegacyZDList = false; useExternalResources = true; + singleThreaded = true; verbosity = VerbosityLevel::VERBOSITY_SILENT; outputPath = Directory::GetCurrentDirectory(); } From ea91d36351fc62ba0196180de7aa82d8b51f7b65 Mon Sep 17 00:00:00 2001 From: MegaMech Date: Fri, 1 Apr 2022 22:46:08 -0700 Subject: [PATCH 022/146] Update nes_message_data_static.xml --- soh/assets/xml/GC_NMQ_D/text/nes_message_data_static.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soh/assets/xml/GC_NMQ_D/text/nes_message_data_static.xml b/soh/assets/xml/GC_NMQ_D/text/nes_message_data_static.xml index d7c0559c5..e2d39a916 100644 --- a/soh/assets/xml/GC_NMQ_D/text/nes_message_data_static.xml +++ b/soh/assets/xml/GC_NMQ_D/text/nes_message_data_static.xml @@ -1,5 +1,5 @@ - + - \ No newline at end of file + From 6acb8d20b40a654e8c4494654161d82e09c90813 Mon Sep 17 00:00:00 2001 From: MegaMech Date: Fri, 1 Apr 2022 22:46:28 -0700 Subject: [PATCH 023/146] Update staff_message_data_static.xml --- soh/assets/xml/GC_NMQ_D/text/staff_message_data_static.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soh/assets/xml/GC_NMQ_D/text/staff_message_data_static.xml b/soh/assets/xml/GC_NMQ_D/text/staff_message_data_static.xml index 447b91ccd..f675929e1 100644 --- a/soh/assets/xml/GC_NMQ_D/text/staff_message_data_static.xml +++ b/soh/assets/xml/GC_NMQ_D/text/staff_message_data_static.xml @@ -1,5 +1,5 @@ - + - \ No newline at end of file + From 1e938866ac2d52845c55bf6fd42cf9e68a8b7e84 Mon Sep 17 00:00:00 2001 From: MegaMech Date: Fri, 1 Apr 2022 22:48:52 -0700 Subject: [PATCH 024/146] Update nes_message_data_static.xml --- soh/assets/xml/GC_NMQ_PAL_F/text/nes_message_data_static.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soh/assets/xml/GC_NMQ_PAL_F/text/nes_message_data_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/text/nes_message_data_static.xml index d77bf0ff8..e1e6dd148 100644 --- a/soh/assets/xml/GC_NMQ_PAL_F/text/nes_message_data_static.xml +++ b/soh/assets/xml/GC_NMQ_PAL_F/text/nes_message_data_static.xml @@ -1,5 +1,5 @@ - + - \ No newline at end of file + From a02982794418af1b2aefe1e0bf98630b3763be35 Mon Sep 17 00:00:00 2001 From: MegaMech Date: Fri, 1 Apr 2022 22:49:14 -0700 Subject: [PATCH 025/146] Update staff_message_data_static.xml --- .../xml/GC_NMQ_PAL_F/text/staff_message_data_static.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soh/assets/xml/GC_NMQ_PAL_F/text/staff_message_data_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/text/staff_message_data_static.xml index 395a6b7bd..55d935fb3 100644 --- a/soh/assets/xml/GC_NMQ_PAL_F/text/staff_message_data_static.xml +++ b/soh/assets/xml/GC_NMQ_PAL_F/text/staff_message_data_static.xml @@ -1,5 +1,5 @@ - + - \ No newline at end of file + From 2b4b44f698b14f472aec13d48c70b10a053fb2f9 Mon Sep 17 00:00:00 2001 From: MegaMech Date: Sat, 2 Apr 2022 15:00:16 -0700 Subject: [PATCH 026/146] Update staff_message_data_static.xml --- soh/assets/xml/GC_NMQ_PAL_F/text/staff_message_data_static.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/assets/xml/GC_NMQ_PAL_F/text/staff_message_data_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/text/staff_message_data_static.xml index 55d935fb3..0a7efda81 100644 --- a/soh/assets/xml/GC_NMQ_PAL_F/text/staff_message_data_static.xml +++ b/soh/assets/xml/GC_NMQ_PAL_F/text/staff_message_data_static.xml @@ -1,5 +1,5 @@ - + From 407a9c5371e60f8972b7a364bc54a86cdbbcb85e Mon Sep 17 00:00:00 2001 From: MegaMech Date: Sat, 2 Apr 2022 15:00:47 -0700 Subject: [PATCH 027/146] Update nes_message_data_static.xml --- soh/assets/xml/GC_NMQ_PAL_F/text/nes_message_data_static.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/assets/xml/GC_NMQ_PAL_F/text/nes_message_data_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/text/nes_message_data_static.xml index e1e6dd148..4cf46d252 100644 --- a/soh/assets/xml/GC_NMQ_PAL_F/text/nes_message_data_static.xml +++ b/soh/assets/xml/GC_NMQ_PAL_F/text/nes_message_data_static.xml @@ -1,5 +1,5 @@ - + From e8837cf2475e5ffb3e136b629c904e4bd050c7f4 Mon Sep 17 00:00:00 2001 From: Sirius902 <3645979-Sirius902@users.noreply.gitlab.com> Date: Sun, 3 Apr 2022 16:06:31 -0700 Subject: [PATCH 028/146] Fix title card --- soh/src/overlays/actors/ovl_player_actor/z_player.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index 37ab3ed74..a2a810175 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -9434,7 +9434,7 @@ void Player_Init(Actor* thisx, GlobalContext* globalCtx2) { if ((sp50 == 0) || (sp50 < -1)) { titleFileSize = scene->titleFile.vromEnd - scene->titleFile.vromStart; - if ((titleFileSize != 0) && gSaveContext.showTitleCard) { + if (gSaveContext.showTitleCard) { if ((gSaveContext.sceneSetupIndex < 4) && (gEntranceTable[((void)0, gSaveContext.entranceIndex) + ((void)0, gSaveContext.sceneSetupIndex)].field & 0x4000) && From a59317627fe78b4dfe9e0482187ea5b497e3c5bc Mon Sep 17 00:00:00 2001 From: Sirius902 <3645979-Sirius902@users.noreply.gitlab.com> Date: Sun, 3 Apr 2022 16:45:02 -0700 Subject: [PATCH 029/146] Fix Shadow Temple title card --- soh/src/code/z_actor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index 92702f866..fee697055 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -766,9 +766,9 @@ void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCt break; case SCENE_JYASINZOU: texture = gSpiritTempleTitleCardENGTex; - break; + break; case SCENE_HAKADAN: - texture = gSpiritTempleTitleCardENGTex; + texture = gShadowTempleTitleCardENGTex; break; case SCENE_HAKADANCH: texture = gBottomOfTheWellTitleCardENGTex; From c1eb71fa3342ab44f7bf91648afc1e3a126c4485 Mon Sep 17 00:00:00 2001 From: Nicholas Estelami Date: Sun, 3 Apr 2022 15:48:44 -0400 Subject: [PATCH 030/146] Updated python script to use new "extract directory" mode. Additionally fixed oversight with audio files and bug in OTRGui. --- OTRExporter/OTRExporter/Main.cpp | 4 + OTRExporter/extract_assets.py | 99 ++----------------- OTRExporter/extract_assets_old.py | 125 ++++++++++++++++++++++++ OTRGui/src/game/game.cpp | 9 +- OTRGui/src/impl/extractor/extractor.cpp | 1 - ZAPDTR/ZAPD/Main.cpp | 12 --- ZAPDTR/ZAPD/ZFile.cpp | 26 +++++ 7 files changed, 167 insertions(+), 109 deletions(-) create mode 100644 OTRExporter/extract_assets_old.py diff --git a/OTRExporter/OTRExporter/Main.cpp b/OTRExporter/OTRExporter/Main.cpp index e62ed5ef4..a58f94ae3 100644 --- a/OTRExporter/OTRExporter/Main.cpp +++ b/OTRExporter/OTRExporter/Main.cpp @@ -78,6 +78,10 @@ static void ExporterProgramEnd() auto fileData = File::ReadAllBytes(item); otrArchive->AddFile(StringHelper::Split(item, "Extract\\")[1], (uintptr_t)fileData.data(), fileData.size()); } + + otrArchive->AddFile("Audiobank", (uintptr_t)Globals::Instance->GetBaseromFile("Audiobank").data(), Globals::Instance->GetBaseromFile("Audiobank").size()); + otrArchive->AddFile("Audioseq", (uintptr_t)Globals::Instance->GetBaseromFile("Audioseq").data(), Globals::Instance->GetBaseromFile("Audioseq").size()); + otrArchive->AddFile("Audiotable", (uintptr_t)Globals::Instance->GetBaseromFile("Audiotable").data(), Globals::Instance->GetBaseromFile("Audiotable").size()); } } diff --git a/OTRExporter/extract_assets.py b/OTRExporter/extract_assets.py index 2922bbf06..bb9ed177c 100755 --- a/OTRExporter/extract_assets.py +++ b/OTRExporter/extract_assets.py @@ -4,21 +4,11 @@ import argparse, json, os, signal, time, sys, shutil from multiprocessing import Pool, cpu_count, Event, Manager, ProcessError import shutil -def SignalHandler(sig, frame): - print(f'Signal {sig} received. Aborting...') - mainAbort.set() - # Don't exit immediately to update the extracted assets file. - -def BuildOTR(): - shutil.copyfile("baserom/Audiobank", "Extract/Audiobank") - shutil.copyfile("baserom/Audioseq", "Extract/Audioseq") - shutil.copyfile("baserom/Audiotable", "Extract/Audiotable") - +def BuildOTR(xmlPath): shutil.copytree("assets", "Extract/assets") execStr = "x64\\Release\\ZAPD.exe" if sys.platform == "win32" else "../ZAPD/ZAPD.out" - - execStr += " botr -se OTR" + execStr += " ed -i %s -b baserom.z64 -fl CFG\\filelists -o placeholder -osf placeholder -gsf 1 -rconf CFG/Config.xml -se OTR" % (xmlPath) print(execStr) exitValue = os.system(execStr) @@ -28,52 +18,12 @@ def BuildOTR(): print("Aborting...", file=os.sys.stderr) print("\n") -def ExtractFile(xmlPath, outputPath, outputSourcePath): - execStr = "x64\\Release\\ZAPD.exe" if sys.platform == "win32" else "../ZAPD/ZAPD.out" - execStr += " e -eh -i %s -b baserom/ -o %s -osf %s -gsf 1 -rconf CFG/Config.xml -se OTR" % (xmlPath, outputPath, outputSourcePath) - - if "overlays" in xmlPath: - execStr += " --static" - - print(execStr) - exitValue = os.system(execStr) - #exitValue = 0 - if exitValue != 0: - print("\n") - print("Error when extracting from file " + xmlPath, file=os.sys.stderr) - print("Aborting...", file=os.sys.stderr) - print("\n") - -def ExtractFunc(fullPath): - *pathList, xmlName = fullPath.split(os.sep) - objectName = os.path.splitext(xmlName)[0] - - outPath = os.path.join("..\\soh\\assets\\", *pathList[5:], objectName) - os.makedirs(outPath, exist_ok=True) - outSourcePath = outPath - - ExtractFile(fullPath, outPath, outSourcePath) - -def initializeWorker(abort, test): - global globalAbort - globalAbort = abort - - def main(): parser = argparse.ArgumentParser(description="baserom asset extractor") - parser.add_argument("-s", "--single", help="asset path relative to assets/, e.g. objects/gameplay_keep") - parser.add_argument("-f", "--force", help="Force the extraction of every xml instead of checking the touched ones.", action="store_true") - parser.add_argument("-u", "--unaccounted", help="Enables ZAPD unaccounted detector warning system.", action="store_true") parser.add_argument("-v", "--version", help="Sets game version.") args = parser.parse_args() - - global mainAbort - mainAbort = Event() - manager = Manager() - signal.signal(signal.SIGINT, SignalHandler) - - extractedAssetsTracker = manager.dict() - + + # TODO: Read from makerom file to automatically determine game version xmlVer = "GC_NMQ_D" if (args.version == "gc_pal_nmpq"): @@ -81,45 +31,10 @@ def main(): elif (args.version == "dbg_mq"): xmlVer = "GC_MQ_D" - asset_path = args.single - if asset_path is not None: - fullPath = os.path.join("..\\soh\\assets", "xml", asset_path + ".xml") - if not os.path.exists(fullPath): - print(f"Error. File {fullPath} doesn't exists.", file=os.sys.stderr) - exit(1) - - ExtractFunc(fullPath) - else: - extract_text_path = "assets/text/message_data.h" - if os.path.isfile(extract_text_path): - extract_text_path = None - extract_staff_text_path = "assets/text/message_data_staff.h" - if os.path.isfile(extract_staff_text_path): - extract_staff_text_path = None - - xmlFiles = [] - for currentPath, _, files in os.walk(os.path.join("..\\soh\\assets\\xml\\", xmlVer)): - for file in files: - fullPath = os.path.join(currentPath, file) - if file.endswith(".xml"): - xmlFiles.append(fullPath) - - try: - numCores = 2 - print("Extracting assets with " + str(numCores) + " CPU cores.") - with Pool(numCores, initializer=initializeWorker, initargs=(mainAbort, 0)) as p: - p.map(ExtractFunc, xmlFiles) - except Exception as e: - print("Warning: Multiprocessing exception ocurred.", file=os.sys.stderr) - print("Disabling mutliprocessing.", file=os.sys.stderr) - - initializeWorker(mainAbort, 0) - for singlePath in xmlFiles: - ExtractFunc(singlePath) - - - BuildOTR() + if (os.path.exists("Extract")): shutil.rmtree("Extract") + + BuildOTR("..\\soh\\assets\\xml\\" + xmlVer + "\\") if __name__ == "__main__": main() \ No newline at end of file diff --git a/OTRExporter/extract_assets_old.py b/OTRExporter/extract_assets_old.py new file mode 100644 index 000000000..2922bbf06 --- /dev/null +++ b/OTRExporter/extract_assets_old.py @@ -0,0 +1,125 @@ +#!/usr/bin/env python3 + +import argparse, json, os, signal, time, sys, shutil +from multiprocessing import Pool, cpu_count, Event, Manager, ProcessError +import shutil + +def SignalHandler(sig, frame): + print(f'Signal {sig} received. Aborting...') + mainAbort.set() + # Don't exit immediately to update the extracted assets file. + +def BuildOTR(): + shutil.copyfile("baserom/Audiobank", "Extract/Audiobank") + shutil.copyfile("baserom/Audioseq", "Extract/Audioseq") + shutil.copyfile("baserom/Audiotable", "Extract/Audiotable") + + shutil.copytree("assets", "Extract/assets") + + execStr = "x64\\Release\\ZAPD.exe" if sys.platform == "win32" else "../ZAPD/ZAPD.out" + + execStr += " botr -se OTR" + + print(execStr) + exitValue = os.system(execStr) + if exitValue != 0: + print("\n") + print("Error when building the OTR file...", file=os.sys.stderr) + print("Aborting...", file=os.sys.stderr) + print("\n") + +def ExtractFile(xmlPath, outputPath, outputSourcePath): + execStr = "x64\\Release\\ZAPD.exe" if sys.platform == "win32" else "../ZAPD/ZAPD.out" + execStr += " e -eh -i %s -b baserom/ -o %s -osf %s -gsf 1 -rconf CFG/Config.xml -se OTR" % (xmlPath, outputPath, outputSourcePath) + + if "overlays" in xmlPath: + execStr += " --static" + + print(execStr) + exitValue = os.system(execStr) + #exitValue = 0 + if exitValue != 0: + print("\n") + print("Error when extracting from file " + xmlPath, file=os.sys.stderr) + print("Aborting...", file=os.sys.stderr) + print("\n") + +def ExtractFunc(fullPath): + *pathList, xmlName = fullPath.split(os.sep) + objectName = os.path.splitext(xmlName)[0] + + outPath = os.path.join("..\\soh\\assets\\", *pathList[5:], objectName) + os.makedirs(outPath, exist_ok=True) + outSourcePath = outPath + + ExtractFile(fullPath, outPath, outSourcePath) + +def initializeWorker(abort, test): + global globalAbort + globalAbort = abort + + +def main(): + parser = argparse.ArgumentParser(description="baserom asset extractor") + parser.add_argument("-s", "--single", help="asset path relative to assets/, e.g. objects/gameplay_keep") + parser.add_argument("-f", "--force", help="Force the extraction of every xml instead of checking the touched ones.", action="store_true") + parser.add_argument("-u", "--unaccounted", help="Enables ZAPD unaccounted detector warning system.", action="store_true") + parser.add_argument("-v", "--version", help="Sets game version.") + args = parser.parse_args() + + global mainAbort + mainAbort = Event() + manager = Manager() + signal.signal(signal.SIGINT, SignalHandler) + + extractedAssetsTracker = manager.dict() + + xmlVer = "GC_NMQ_D" + + if (args.version == "gc_pal_nmpq"): + xmlVer = "GC_NMQ_PAL_F" + elif (args.version == "dbg_mq"): + xmlVer = "GC_MQ_D" + + asset_path = args.single + if asset_path is not None: + fullPath = os.path.join("..\\soh\\assets", "xml", asset_path + ".xml") + if not os.path.exists(fullPath): + print(f"Error. File {fullPath} doesn't exists.", file=os.sys.stderr) + exit(1) + + ExtractFunc(fullPath) + else: + extract_text_path = "assets/text/message_data.h" + if os.path.isfile(extract_text_path): + extract_text_path = None + extract_staff_text_path = "assets/text/message_data_staff.h" + if os.path.isfile(extract_staff_text_path): + extract_staff_text_path = None + + xmlFiles = [] + for currentPath, _, files in os.walk(os.path.join("..\\soh\\assets\\xml\\", xmlVer)): + for file in files: + fullPath = os.path.join(currentPath, file) + if file.endswith(".xml"): + xmlFiles.append(fullPath) + + try: + numCores = 2 + print("Extracting assets with " + str(numCores) + " CPU cores.") + with Pool(numCores, initializer=initializeWorker, initargs=(mainAbort, 0)) as p: + p.map(ExtractFunc, xmlFiles) + except Exception as e: + print("Warning: Multiprocessing exception ocurred.", file=os.sys.stderr) + print("Disabling mutliprocessing.", file=os.sys.stderr) + + initializeWorker(mainAbort, 0) + for singlePath in xmlFiles: + ExtractFunc(singlePath) + + + BuildOTR() + shutil.rmtree("Extract") + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/OTRGui/src/game/game.cpp b/OTRGui/src/game/game.cpp index 2f5512385..88bd7201f 100644 --- a/OTRGui/src/game/game.cpp +++ b/OTRGui/src/game/game.cpp @@ -87,10 +87,11 @@ void ExtractRom() if (MoonUtils::exists("Extract")) MoonUtils::rm("Extract"); MoonUtils::mkdir("Extract"); - MoonUtils::copy("tmp/baserom/Audiobank", "Extract/Audiobank"); - MoonUtils::copy("tmp/baserom/Audioseq", "Extract/Audioseq"); - MoonUtils::copy("tmp/baserom/Audiotable", "Extract/Audiotable"); - MoonUtils::copy("tmp/baserom/version", "Extract/version"); + //MoonUtils::copy("tmp/baserom/Audiobank", "Extract/Audiobank"); + //MoonUtils::copy("tmp/baserom/Audioseq", "Extract/Audioseq"); + //MoonUtils::copy("tmp/baserom/Audiotable", "Extract/Audiotable"); + //MoonUtils::copy("tmp/baserom/version", "Extract/version"); + MoonUtils::write("Extract/version", (char*)&version.crc, sizeof(version.crc)); MoonUtils::copy("assets/game/", "Extract/assets/"); diff --git a/OTRGui/src/impl/extractor/extractor.cpp b/OTRGui/src/impl/extractor/extractor.cpp index e28fa5513..a2eab1bb6 100644 --- a/OTRGui/src/impl/extractor/extractor.cpp +++ b/OTRGui/src/impl/extractor/extractor.cpp @@ -83,7 +83,6 @@ void startWorker(RomVersion version) { Util::write("tmp/baserom/version", (char*)&version.crc, sizeof(version.crc)); - if (oldExtractMode) { std::vector files; diff --git a/ZAPDTR/ZAPD/Main.cpp b/ZAPDTR/ZAPD/Main.cpp index 1a99d346a..dd53b9c67 100644 --- a/ZAPDTR/ZAPD/Main.cpp +++ b/ZAPDTR/ZAPD/Main.cpp @@ -387,18 +387,6 @@ int main(int argc, char* argv[]) { BuildAssetBlob(Globals::Instance->inputPath, Globals::Instance->outputPath); } - /* - else if (fileMode == ZFileMode::BuildOverlay) - { - ZOverlay* overlay = - ZOverlay::FromBuild(Path::GetDirectoryName(Globals::Instance->inputPath), - Path::GetDirectoryName(Globals::Instance->cfgPath)); - - if (overlay != nullptr) - File::WriteAllText(Globals::Instance->outputPath.string(), - overlay->GetSourceOutputCode("")); - } - */ if (exporterSet != nullptr && exporterSet->endProgramFunc != nullptr) exporterSet->endProgramFunc(); diff --git a/ZAPDTR/ZAPD/ZFile.cpp b/ZAPDTR/ZAPD/ZFile.cpp index b706c1914..9ff7a6823 100644 --- a/ZAPDTR/ZAPD/ZFile.cpp +++ b/ZAPDTR/ZAPD/ZFile.cpp @@ -823,6 +823,32 @@ void ZFile::GenerateSourceHeaderFiles() if (Globals::Instance->fileMode != ZFileMode::ExtractDirectory) File::WriteAllText(headerFilename, formatter.GetOutput()); + else if (Globals::Instance->sourceOutputPath != "") + { + std::string xmlPath = xmlFilePath.string(); + xmlPath = StringHelper::Replace(xmlPath, "\\", "/"); + auto pathList = StringHelper::Split(xmlPath, "/"); + std::string outPath = ""; + + for (int i = 0; i < 3; i++) + outPath += pathList[i] + "/"; + + for (int i = 5; i < pathList.size(); i++) + { + if (i == pathList.size() - 1) + { + outPath += Path::GetFileNameWithoutExtension(pathList[i]) + "/"; + outPath += outName.string() + ".h"; + } + else + outPath += pathList[i]; + + if (i < pathList.size() - 1) + outPath += "/"; + } + + File::WriteAllText(outPath, formatter.GetOutput()); + } } std::string ZFile::GetHeaderInclude() const From 64327fafb1a71c897006f4980d5231178641432a Mon Sep 17 00:00:00 2001 From: Sirius902 <10891979+Sirius902@users.noreply.github.com> Date: Wed, 6 Apr 2022 17:42:23 -0700 Subject: [PATCH 031/146] Make ResourceMgr and CVar more const correct, remove unnecessary const_cast (#118) --- libultraship/libultraship/Cvar.cpp | 24 ++++++------ libultraship/libultraship/Cvar.h | 24 ++++++------ libultraship/libultraship/GameSettings.cpp | 44 +++++++++++----------- libultraship/libultraship/SohConsole.cpp | 2 +- libultraship/libultraship/SohImGuiImpl.cpp | 30 +++++++-------- soh/soh/OTRGlobals.cpp | 36 +++++++++--------- soh/soh/OTRGlobals.h | 14 +++---- 7 files changed, 87 insertions(+), 87 deletions(-) diff --git a/libultraship/libultraship/Cvar.cpp b/libultraship/libultraship/Cvar.cpp index 306a18e83..91788fd48 100644 --- a/libultraship/libultraship/Cvar.cpp +++ b/libultraship/libultraship/Cvar.cpp @@ -5,16 +5,16 @@ std::map cvars; -CVar* CVar_GetVar(char* name) { +CVar* CVar_GetVar(const char* name) { std::string key(name); return cvars.contains(key) ? cvars[key] : nullptr; } -extern "C" CVar* CVar_Get(char* name) { +extern "C" CVar* CVar_Get(const char* name) { return CVar_GetVar(name); } -extern "C" s32 CVar_GetS32(char* name, s32 defaultValue) { +extern "C" s32 CVar_GetS32(const char* name, s32 defaultValue) { CVar* cvar = CVar_Get(name); if (cvar != nullptr) { @@ -25,7 +25,7 @@ extern "C" s32 CVar_GetS32(char* name, s32 defaultValue) { return defaultValue; } -extern "C" float CVar_GetFloat(char* name, float defaultValue) { +extern "C" float CVar_GetFloat(const char* name, float defaultValue) { CVar* cvar = CVar_Get(name); if (cvar != nullptr) { @@ -36,7 +36,7 @@ extern "C" float CVar_GetFloat(char* name, float defaultValue) { return defaultValue; } -extern "C" char* CVar_GetString(char* name, char* defaultValue) { +extern "C" char* CVar_GetString(const char* name, char* defaultValue) { CVar* cvar = CVar_Get(name); if (cvar != nullptr) { @@ -47,7 +47,7 @@ extern "C" char* CVar_GetString(char* name, char* defaultValue) { return defaultValue; } -extern "C" void CVar_SetS32(char* name, s32 value) { +extern "C" void CVar_SetS32(const char* name, s32 value) { CVar* cvar = CVar_Get(name); if (!cvar) { cvar = new CVar; @@ -57,7 +57,7 @@ extern "C" void CVar_SetS32(char* name, s32 value) { cvar->value.valueS32 = value; } -void CVar_SetFloat(char* name, float value) { +void CVar_SetFloat(const char* name, float value) { CVar* cvar = CVar_Get(name); if (!cvar) { cvar = new CVar; @@ -67,7 +67,7 @@ void CVar_SetFloat(char* name, float value) { cvar->value.valueFloat = value; } -void CVar_SetString(char* name, char* value) { +void CVar_SetString(const char* name, char* value) { CVar* cvar = CVar_Get(name); if (!cvar) { cvar = new CVar; @@ -78,23 +78,23 @@ void CVar_SetString(char* name, char* value) { } -extern "C" void CVar_RegisterS32(char* name, s32 defaultValue) { +extern "C" void CVar_RegisterS32(const char* name, s32 defaultValue) { CVar* cvar = CVar_Get(name); if (cvar == nullptr) CVar_SetS32(name, defaultValue); } -extern "C" void CVar_RegisterFloat(char* name, float defaultValue) { +extern "C" void CVar_RegisterFloat(const char* name, float defaultValue) { CVar* cvar = CVar_Get(name); if (cvar == nullptr) CVar_SetFloat(name, defaultValue); } -extern "C" void CVar_RegisterString(char* name, char* defaultValue) { +extern "C" void CVar_RegisterString(const char* name, char* defaultValue) { CVar* cvar = CVar_Get(name); if (cvar == nullptr) CVar_SetString(name, defaultValue); -} \ No newline at end of file +} diff --git a/libultraship/libultraship/Cvar.h b/libultraship/libultraship/Cvar.h index 7bac8f20b..a85bb8fd3 100644 --- a/libultraship/libultraship/Cvar.h +++ b/libultraship/libultraship/Cvar.h @@ -23,15 +23,15 @@ extern "C" //#include -CVar* CVar_Get(char* name); -s32 CVar_GetS32(char* name, s32 defaultValue); -float CVar_GetFloat(char* name, float defaultValue); -char* CVar_GetString(char* name, char* defaultValue); -void CVar_SetS32(char* name, s32 value); +CVar* CVar_Get(const char* name); +s32 CVar_GetS32(const char* name, s32 defaultValue); +float CVar_GetFloat(const char* name, float defaultValue); +char* CVar_GetString(const char* name, char* defaultValue); +void CVar_SetS32(const char* name, s32 value); -void CVar_RegisterS32(char* name, s32 defaultValue); -void CVar_RegisterFloat(char* name, float defaultValue); -void CVar_RegisterString(char* name, char* defaultValue); +void CVar_RegisterS32(const char* name, s32 defaultValue); +void CVar_RegisterFloat(const char* name, float defaultValue); +void CVar_RegisterString(const char* name, char* defaultValue); #ifdef __cplusplus }; @@ -42,8 +42,8 @@ void CVar_RegisterString(char* name, char* defaultValue); #include extern std::map cvars; -CVar* CVar_GetVar(char* name); -void CVar_SetFloat(char* name, float value); -void CVar_SetString(char* name, char* value); +CVar* CVar_GetVar(const char* name); +void CVar_SetFloat(const char* name, float value); +void CVar_SetString(const char* name, char* value); +#endif #endif -#endif \ No newline at end of file diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index 1186fa27c..f12042bc0 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -50,73 +50,73 @@ namespace Game { // Enhancements Settings.enhancements.fast_text = stob(Conf[EnhancementSection]["fast_text"]); - CVar_SetS32(const_cast("gFastText"), Settings.enhancements.fast_text); + CVar_SetS32("gFastText", Settings.enhancements.fast_text); Settings.enhancements.disable_lod = stob(Conf[EnhancementSection]["disable_lod"]); - CVar_SetS32(const_cast("gDisableLOD"), Settings.enhancements.disable_lod); + CVar_SetS32("gDisableLOD", Settings.enhancements.disable_lod); Settings.enhancements.animated_pause_menu = stob(Conf[EnhancementSection]["animated_pause_menu"]); - CVar_SetS32(const_cast("gPauseLiveLink"), Settings.enhancements.animated_pause_menu); + CVar_SetS32("gPauseLiveLink", Settings.enhancements.animated_pause_menu); Settings.enhancements.minimal_ui = stob(Conf[EnhancementSection]["minimal_ui"]); CVar_SetS32(const_cast("gMinimalUI"), Settings.enhancements.minimal_ui); // Audio Settings.audio.master = Ship::stof(Conf[AudioSection]["master"]); - CVar_SetFloat(const_cast("gGameMasterVolume"), Settings.audio.master); + CVar_SetFloat("gGameMasterVolume", Settings.audio.master); Settings.audio.music_main = Ship::stof(Conf[AudioSection]["music_main"]); - CVar_SetFloat(const_cast("gMainMusicVolume"), Settings.audio.music_main); + CVar_SetFloat("gMainMusicVolume", Settings.audio.music_main); Settings.audio.music_sub = Ship::stof(Conf[AudioSection]["music_sub"]); - CVar_SetFloat(const_cast("gSubMusicVolume"), Settings.audio.music_sub); + CVar_SetFloat("gSubMusicVolume", Settings.audio.music_sub); Settings.audio.sfx = Ship::stof(Conf[AudioSection]["sfx"]); - CVar_SetFloat(const_cast("gSFXMusicVolume"), Settings.audio.sfx); + CVar_SetFloat("gSFXMusicVolume", Settings.audio.sfx); Settings.audio.fanfare = Ship::stof(Conf[AudioSection]["fanfare"]); - CVar_SetFloat(const_cast("gFanfareVolume"), Settings.audio.fanfare); + CVar_SetFloat("gFanfareVolume", Settings.audio.fanfare); // Controllers Settings.controller.gyro_sensitivity = Ship::stof(Conf[ControllerSection]["gyro_sensitivity"]); - CVar_SetFloat(const_cast("gGyroSensitivity"), Settings.controller.gyro_sensitivity); + CVar_SetFloat("gGyroSensitivity", Settings.controller.gyro_sensitivity); Settings.controller.rumble_strength = Ship::stof(Conf[ControllerSection]["rumble_strength"]); - CVar_SetFloat(const_cast("gRumbleStrength"), Settings.controller.rumble_strength); + CVar_SetFloat("gRumbleStrength", Settings.controller.rumble_strength); Settings.controller.input_scale = Ship::stof(Conf[ControllerSection]["input_scale"]); - CVar_SetFloat(const_cast("gInputScale"), Settings.controller.input_scale); + CVar_SetFloat("gInputScale", Settings.controller.input_scale); Settings.controller.input_enabled = stob(Conf[ControllerSection]["input_enabled"]); - CVar_SetS32(const_cast("gInputEnabled"), Settings.controller.input_enabled); + CVar_SetS32("gInputEnabled", Settings.controller.input_enabled); // Cheats Settings.cheats.debug_mode = stob(Conf[CheatSection]["debug_mode"]); - CVar_SetS32(const_cast("gDebugEnabled"), Settings.cheats.debug_mode); + CVar_SetS32("gDebugEnabled", Settings.cheats.debug_mode); Settings.cheats.infinite_money = stob(Conf[CheatSection]["infinite_money"]); - CVar_SetS32(const_cast("gInfiniteMoney"), Settings.cheats.infinite_money); + CVar_SetS32("gInfiniteMoney", Settings.cheats.infinite_money); Settings.cheats.infinite_health = stob(Conf[CheatSection]["infinite_health"]); - CVar_SetS32(const_cast("gInfiniteHealth"), Settings.cheats.infinite_health); + CVar_SetS32("gInfiniteHealth", Settings.cheats.infinite_health); Settings.cheats.infinite_ammo = stob(Conf[CheatSection]["infinite_ammo"]); - CVar_SetS32(const_cast("gInfiniteAmmo"), Settings.cheats.infinite_ammo); + CVar_SetS32("gInfiniteAmmo", Settings.cheats.infinite_ammo); Settings.cheats.infinite_magic = stob(Conf[CheatSection]["infinite_magic"]); - CVar_SetS32(const_cast("gInfiniteMagic"), Settings.cheats.infinite_magic); + CVar_SetS32("gInfiniteMagic", Settings.cheats.infinite_magic); Settings.cheats.no_clip = stob(Conf[CheatSection]["no_clip"]); - CVar_SetS32(const_cast("gNoClip"), Settings.cheats.no_clip); + CVar_SetS32("gNoClip", Settings.cheats.no_clip); Settings.cheats.climb_everything = stob(Conf[CheatSection]["climb_everything"]); - CVar_SetS32(const_cast("gClimbEverything"), Settings.cheats.climb_everything); + CVar_SetS32("gClimbEverything", Settings.cheats.climb_everything); Settings.cheats.moon_jump_on_l = stob(Conf[CheatSection]["moon_jump_on_l"]); - CVar_SetS32(const_cast("gMoonJumpOnL"), Settings.cheats.moon_jump_on_l); + CVar_SetS32("gMoonJumpOnL", Settings.cheats.moon_jump_on_l); Settings.cheats.super_tunic = stob(Conf[CheatSection]["super_tunic"]); - CVar_SetS32(const_cast("gSuperTunic"), Settings.cheats.super_tunic); + CVar_SetS32("gSuperTunic", Settings.cheats.super_tunic); UpdateAudio(); } @@ -173,4 +173,4 @@ namespace Game { void SetSeqPlayerVolume(SeqPlayers playerId, float volume) { Audio_SetGameVolume(playerId, volume); } -} \ No newline at end of file +} diff --git a/libultraship/libultraship/SohConsole.cpp b/libultraship/libultraship/SohConsole.cpp index 71a067196..618cd1e1d 100644 --- a/libultraship/libultraship/SohConsole.cpp +++ b/libultraship/libultraship/SohConsole.cpp @@ -92,7 +92,7 @@ void Console::Update() { } for (auto [key, var] : BindingToggle) { if (ImGui::IsKeyPressed(key)) { - CVar* cvar = CVar_GetVar(const_cast(var.c_str())); + CVar* cvar = CVar_GetVar(var.c_str()); Dispatch("set " + var + " " + std::to_string(cvar == nullptr ? 0 : !static_cast(cvar->value.valueS32))); } } diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index d95a27d08..bdf9c267b 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -225,7 +225,7 @@ namespace SohImGui { ImGui::Text(name, static_cast(100 * *(value))); if (ImGui::SliderFloat((std::string("##") + key).c_str(), value, 0.0f, 1.0f, "")) { const float volume = floorf(*(value) * 100) / 100; - CVar_SetFloat(const_cast(key), volume); + CVar_SetFloat(key, volume); needs_save = true; Game::SetSeqPlayerVolume(playerId, volume); } @@ -289,7 +289,7 @@ namespace SohImGui { const float volume = Game::Settings.audio.master; ImGui::Text("Master Volume: %d %%", static_cast(100 * volume)); if (ImGui::SliderFloat("##Master_Vol", &Game::Settings.audio.master, 0.0f, 1.0f, "")) { - CVar_SetFloat(const_cast("gGameMasterVolume"), volume); + CVar_SetFloat("gGameMasterVolume", volume); needs_save = true; } @@ -337,7 +337,7 @@ namespace SohImGui { ImGui::Separator(); if (ImGui::Checkbox("Fast Text", &Game::Settings.enhancements.fast_text)) { - CVar_SetS32(const_cast("gFastText"), Game::Settings.enhancements.fast_text); + CVar_SetS32("gFastText", Game::Settings.enhancements.fast_text); needs_save = true; } @@ -354,12 +354,12 @@ namespace SohImGui { } if (ImGui::Checkbox("Animated Link in Pause Menu", &Game::Settings.enhancements.animated_pause_menu)) { - CVar_SetS32(const_cast("gPauseLiveLink"), Game::Settings.enhancements.animated_pause_menu); + CVar_SetS32("gPauseLiveLink", Game::Settings.enhancements.animated_pause_menu); needs_save = true; } if (ImGui::Checkbox("Disable LOD", &Game::Settings.enhancements.disable_lod)) { - CVar_SetS32(const_cast("gDisableLOD"), Game::Settings.enhancements.disable_lod); + CVar_SetS32("gDisableLOD", Game::Settings.enhancements.disable_lod); needs_save = true; } @@ -374,7 +374,7 @@ namespace SohImGui { ImGui::Separator(); if (ImGui::Checkbox("Debug Mode", &Game::Settings.cheats.debug_mode)) { - CVar_SetS32(const_cast("gDebugEnabled"), Game::Settings.cheats.debug_mode); + CVar_SetS32("gDebugEnabled", Game::Settings.cheats.debug_mode); needs_save = true; } @@ -383,42 +383,42 @@ namespace SohImGui { if (ImGui::BeginMenu("Cheats")) { if (ImGui::Checkbox("Infinite Money", &Game::Settings.cheats.infinite_money)) { - CVar_SetS32(const_cast("gInfiniteMoney"), Game::Settings.cheats.infinite_money); + CVar_SetS32("gInfiniteMoney", Game::Settings.cheats.infinite_money); needs_save = true; } if (ImGui::Checkbox("Infinite Health", &Game::Settings.cheats.infinite_health)) { - CVar_SetS32(const_cast("gInfiniteHealth"), Game::Settings.cheats.infinite_health); + CVar_SetS32("gInfiniteHealth", Game::Settings.cheats.infinite_health); needs_save = true; } if (ImGui::Checkbox("Infinite Ammo", &Game::Settings.cheats.infinite_ammo)) { - CVar_SetS32(const_cast("gInfiniteAmmo"), Game::Settings.cheats.infinite_ammo); + CVar_SetS32("gInfiniteAmmo", Game::Settings.cheats.infinite_ammo); needs_save = true; } if (ImGui::Checkbox("Infinite Magic", &Game::Settings.cheats.infinite_magic)) { - CVar_SetS32(const_cast("gInfiniteMagic"), Game::Settings.cheats.infinite_magic); + CVar_SetS32("gInfiniteMagic", Game::Settings.cheats.infinite_magic); needs_save = true; } if (ImGui::Checkbox("No Clip", &Game::Settings.cheats.no_clip)) { - CVar_SetS32(const_cast("gNoClip"), Game::Settings.cheats.no_clip); + CVar_SetS32("gNoClip", Game::Settings.cheats.no_clip); needs_save = true; } if (ImGui::Checkbox("Climb Everything", &Game::Settings.cheats.climb_everything)) { - CVar_SetS32(const_cast("gClimbEverything"), Game::Settings.cheats.climb_everything); + CVar_SetS32("gClimbEverything", Game::Settings.cheats.climb_everything); needs_save = true; } if (ImGui::Checkbox("Moon Jump on L", &Game::Settings.cheats.moon_jump_on_l)) { - CVar_SetS32(const_cast("gMoonJumpOnL"), Game::Settings.cheats.moon_jump_on_l); + CVar_SetS32("gMoonJumpOnL", Game::Settings.cheats.moon_jump_on_l); needs_save = true; } if (ImGui::Checkbox("Super Tunic", &Game::Settings.cheats.super_tunic)) { - CVar_SetS32(const_cast("gSuperTunic"), Game::Settings.cheats.super_tunic); + CVar_SetS32("gSuperTunic", Game::Settings.cheats.super_tunic); needs_save = true; } @@ -538,4 +538,4 @@ namespace SohImGui { void BindCmd(const std::string& cmd, CommandEntry entry) { console->Commands[cmd] = std::move(entry); } -} \ No newline at end of file +} diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index c000ce8e1..d10600bce 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -183,9 +183,9 @@ extern "C" char* ResourceMgr_LoadJPEG(char* data, int dataSize) return (char*)finalBuffer; } -extern "C" char* ResourceMgr_LoadTexByName(char* texPath); +extern "C" char* ResourceMgr_LoadTexByName(const char* texPath); -extern "C" char* ResourceMgr_LoadTexOrDListByName(char* filePath) { +extern "C" char* ResourceMgr_LoadTexOrDListByName(const char* filePath) { auto res = OTRGlobals::Instance->context->GetResourceManager()->LoadResource(filePath); if (res->resType == Ship::ResourceType::DisplayList) @@ -196,28 +196,28 @@ extern "C" char* ResourceMgr_LoadTexOrDListByName(char* filePath) { return ResourceMgr_LoadTexByName(filePath); } -extern "C" char* ResourceMgr_LoadPlayerAnimByName(char* animPath) { +extern "C" char* ResourceMgr_LoadPlayerAnimByName(const char* animPath) { auto anim = std::static_pointer_cast( OTRGlobals::Instance->context->GetResourceManager()->LoadResource(animPath)); return (char*)&anim->limbRotData[0]; } -extern "C" Gfx* ResourceMgr_LoadGfxByName(char* path) +extern "C" Gfx* ResourceMgr_LoadGfxByName(const char* path) { auto res = std::static_pointer_cast( OTRGlobals::Instance->context->GetResourceManager()->LoadResource(path)); return (Gfx*)&res->instructions[0]; } -extern "C" char* ResourceMgr_LoadArrayByName(char* path) +extern "C" char* ResourceMgr_LoadArrayByName(const char* path) { auto res = std::static_pointer_cast(OTRGlobals::Instance->context->GetResourceManager()->LoadResource(path)); return (char*)res->scalars.data(); } -extern "C" char* ResourceMgr_LoadArrayByNameAsVec3s(char* path) { +extern "C" char* ResourceMgr_LoadArrayByNameAsVec3s(const char* path) { auto res = std::static_pointer_cast(OTRGlobals::Instance->context->GetResourceManager()->LoadResource(path)); @@ -239,7 +239,7 @@ extern "C" char* ResourceMgr_LoadArrayByNameAsVec3s(char* path) { } } -extern "C" CollisionHeader* ResourceMgr_LoadColByName(char* path) +extern "C" CollisionHeader* ResourceMgr_LoadColByName(const char* path) { auto colRes = std::static_pointer_cast(OTRGlobals::Instance->context->GetResourceManager()->LoadResource(path)); @@ -333,7 +333,7 @@ extern "C" CollisionHeader* ResourceMgr_LoadColByName(char* path) return (CollisionHeader*)colHeader; } -extern "C" Vtx * ResourceMgr_LoadVtxByName(char* path) +extern "C" Vtx * ResourceMgr_LoadVtxByName(const char* path) { auto res = std::static_pointer_cast(OTRGlobals::Instance->context->GetResourceManager()->LoadResource(path)); return (Vtx*)res->vertices.data(); @@ -355,7 +355,7 @@ extern "C" int ResourceMgr_OTRSigCheck(char* imgData) return 0; } -extern "C" AnimationHeaderCommon* ResourceMgr_LoadAnimByName(char* path) { +extern "C" AnimationHeaderCommon* ResourceMgr_LoadAnimByName(const char* path) { auto res = std::static_pointer_cast( OTRGlobals::Instance->context->GetResourceManager()->LoadResource(path)); @@ -424,7 +424,7 @@ extern "C" AnimationHeaderCommon* ResourceMgr_LoadAnimByName(char* path) { return anim; } -extern "C" SkeletonHeader* ResourceMgr_LoadSkeletonByName(char* path) { +extern "C" SkeletonHeader* ResourceMgr_LoadSkeletonByName(const char* path) { auto res = std::static_pointer_cast(OTRGlobals::Instance->context->GetResourceManager()->LoadResource(path)); if (res->cachedGameAsset != nullptr) @@ -470,14 +470,14 @@ extern "C" SkeletonHeader* ResourceMgr_LoadSkeletonByName(char* path) { limbC->sibling = limb->siblingIndex; if (limb->dListPtr != "") { - auto dList = ResourceMgr_LoadGfxByName((char*)limb->dListPtr.c_str()); + auto dList = ResourceMgr_LoadGfxByName(limb->dListPtr.c_str()); limbC->dLists[0] = dList; } else { limbC->dLists[0] = nullptr; } if (limb->dList2Ptr != "") { - auto dList = ResourceMgr_LoadGfxByName((char*)limb->dList2Ptr.c_str()); + auto dList = ResourceMgr_LoadGfxByName(limb->dList2Ptr.c_str()); limbC->dLists[1] = dList; } else { limbC->dLists[1] = nullptr; @@ -496,7 +496,7 @@ extern "C" SkeletonHeader* ResourceMgr_LoadSkeletonByName(char* path) { limbC->dList = nullptr; if (!limb->dListPtr.empty()) { - const auto dList = ResourceMgr_LoadGfxByName(const_cast(limb->dListPtr.c_str())); + const auto dList = ResourceMgr_LoadGfxByName(limb->dListPtr.c_str()); limbC->dList = dList; } @@ -512,12 +512,12 @@ extern "C" SkeletonHeader* ResourceMgr_LoadSkeletonByName(char* path) { limbC->dList[1] = nullptr; if (!limb->dListPtr.empty()) { - const auto dList = ResourceMgr_LoadGfxByName(const_cast(limb->dListPtr.c_str())); + const auto dList = ResourceMgr_LoadGfxByName(limb->dListPtr.c_str()); limbC->dList[0] = dList; } if (!limb->dList2Ptr.empty()) { - const auto dList = ResourceMgr_LoadGfxByName(const_cast(limb->dList2Ptr.c_str())); + const auto dList = ResourceMgr_LoadGfxByName(limb->dList2Ptr.c_str()); limbC->dList[1] = dList; } @@ -543,7 +543,7 @@ extern "C" SkeletonHeader* ResourceMgr_LoadSkeletonByName(char* path) { limbC->segmentType = 0; if (limb->skinSegmentType == Ship::ZLimbSkinType::SkinType_DList) - limbC->segment = ResourceMgr_LoadGfxByName(const_cast(limb->skinDList.c_str())); + limbC->segment = ResourceMgr_LoadGfxByName(limb->skinDList.c_str()); else if (limb->skinSegmentType == Ship::ZLimbSkinType::SkinType_4) { const auto animData = new SkinAnimatedLimbData; const int skinDataSize = limb->skinData.size(); @@ -551,7 +551,7 @@ extern "C" SkeletonHeader* ResourceMgr_LoadSkeletonByName(char* path) { animData->totalVtxCount = limb->skinVtxCnt; animData->limbModifCount = skinDataSize; animData->limbModifications = new SkinLimbModif[animData->limbModifCount]; - animData->dlist = ResourceMgr_LoadGfxByName(const_cast(limb->skinDList2.c_str())); + animData->dlist = ResourceMgr_LoadGfxByName(limb->skinDList2.c_str()); for (int i = 0; i < skinDataSize; i++) { @@ -611,7 +611,7 @@ extern "C" SkeletonHeader* ResourceMgr_LoadSkeletonByName(char* path) { return baseHeader; } -extern "C" s32* ResourceMgr_LoadCSByName(char* path) +extern "C" s32* ResourceMgr_LoadCSByName(const char* path) { auto res = std::static_pointer_cast(OTRGlobals::Instance->context->GetResourceManager()->LoadResource(path)); return (s32*)res->commands.data(); diff --git a/soh/soh/OTRGlobals.h b/soh/soh/OTRGlobals.h index 4a439fc6d..4f62f0694 100644 --- a/soh/soh/OTRGlobals.h +++ b/soh/soh/OTRGlobals.h @@ -31,17 +31,17 @@ uint32_t ResourceMgr_GetGameVersion(); void ResourceMgr_CacheDirectory(const char* resName); void ResourceMgr_LoadFile(const char* resName); char* ResourceMgr_LoadFileFromDisk(const char* filePath); -char* ResourceMgr_LoadTexByName(char* texPath); -char* ResourceMgr_LoadTexOrDListByName(char* filePath); -char* ResourceMgr_LoadPlayerAnimByName(char* animPath); +char* ResourceMgr_LoadTexByName(const char* texPath); +char* ResourceMgr_LoadTexOrDListByName(const char* filePath); +char* ResourceMgr_LoadPlayerAnimByName(const char* animPath); char* ResourceMgr_GetNameByCRC(uint64_t crc, char* alloc); Gfx* ResourceMgr_LoadGfxByCRC(uint64_t crc); -Gfx* ResourceMgr_LoadGfxByName(char* path); +Gfx* ResourceMgr_LoadGfxByName(const char* path); Vtx* ResourceMgr_LoadVtxByCRC(uint64_t crc); -Vtx* ResourceMgr_LoadVtxByName(char* path); -CollisionHeader* ResourceMgr_LoadColByName(char* path); +Vtx* ResourceMgr_LoadVtxByName(const char* path); +CollisionHeader* ResourceMgr_LoadColByName(const char* path); uint64_t GetPerfCounter(); -struct SkeletonHeader* ResourceMgr_LoadSkeletonByName(char* path); +struct SkeletonHeader* ResourceMgr_LoadSkeletonByName(const char* path); int ResourceMgr_OTRSigCheck(char* imgData); uint64_t osGetTime(void); uint32_t osGetCount(void); From f20ab2c2600d9e07b342a226f07fc98721dbc8fc Mon Sep 17 00:00:00 2001 From: MaikelChan Date: Fri, 8 Apr 2022 23:23:24 +0200 Subject: [PATCH 032/146] Fixed transparent texture making framebuffers also transparent in D3D11. (#84) This happened with the Mirror Shield in the inventory screen preview. --- libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp index c989290c6..3481a4db2 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp @@ -531,8 +531,8 @@ static struct ShaderProgram *gfx_d3d11_create_and_load_new_shader(uint64_t shade blend_desc.RenderTarget[0].SrcBlend = D3D11_BLEND_SRC_ALPHA; blend_desc.RenderTarget[0].DestBlend = D3D11_BLEND_INV_SRC_ALPHA; blend_desc.RenderTarget[0].BlendOp = D3D11_BLEND_OP_ADD; - blend_desc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_ONE; - blend_desc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_ZERO; + blend_desc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_SRC_ALPHA; + blend_desc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_INV_SRC_ALPHA; blend_desc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD; blend_desc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL; } else { From 3e8c48c1162b004f160e727ea8704885dc0d1dd5 Mon Sep 17 00:00:00 2001 From: rozlette Date: Sun, 3 Apr 2022 14:47:24 -0500 Subject: [PATCH 033/146] Add save editor --- .../Lib/Fast3D/gfx_direct3d11.cpp | 4 +- libultraship/libultraship/SohImGuiImpl.cpp | 67 ++- libultraship/libultraship/SohImGuiImpl.h | 14 +- soh/soh.vcxproj | 4 + soh/soh.vcxproj.filters | 18 + .../Enhancements/debugger/debugSaveEditor.cpp | 527 ++++++++++++++++++ .../Enhancements/debugger/debugSaveEditor.h | 3 + soh/soh/Enhancements/debugger/debugger.cpp | 6 + soh/soh/Enhancements/debugger/debugger.h | 3 + soh/soh/OTRGlobals.cpp | 2 + 10 files changed, 641 insertions(+), 7 deletions(-) create mode 100644 soh/soh/Enhancements/debugger/debugSaveEditor.cpp create mode 100644 soh/soh/Enhancements/debugger/debugSaveEditor.h create mode 100644 soh/soh/Enhancements/debugger/debugger.cpp create mode 100644 soh/soh/Enhancements/debugger/debugger.h diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp index 3481a4db2..9c2f46422 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp @@ -977,8 +977,8 @@ uint16_t gfx_d3d11_get_pixel_depth_old(float x, float y) { } // namespace -void* SohImGui::GetTextureByID(int id) { - return d3d.textures[id].resource_view.Get(); +ImTextureID SohImGui::GetTextureByID(int id) { + return impl.backend == Backend::DX11 ? d3d.textures[id].resource_view.Get() : reinterpret_cast(id); } struct GfxRenderingAPI gfx_direct3d11_api = { diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index bdf9c267b..7489d14a2 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -1,6 +1,7 @@ #include "SohImGuiImpl.h" #include +#include #include #include "Archive.h" @@ -14,9 +15,11 @@ #include "TextureMod.h" #include "Window.h" #include "Cvar.h" +#include "Texture.h" #include "../Fast3D/gfx_pc.h" #include "Lib/stb/stb_image.h" #include "Lib/Fast3D/gfx_rendering_api.h" +#include "Lib/spdlog/include/spdlog/common.h" #include "Utils/StringHelper.h" #ifdef ENABLE_OPENGL @@ -51,6 +54,9 @@ namespace SohImGui { bool p_open = false; bool needs_save = false; + std::map> windowCategories; + std::map customWindows; + void ImGuiWMInit() { switch (impl.backend) { case Backend::SDL: @@ -153,7 +159,7 @@ namespace SohImGui { } } - void LoadTexture(std::string name, std::string path) { + void LoadTexture(const std::string& name, const std::string& path) { GfxRenderingAPI* api = gfx_get_current_rendering_api(); const auto res = GlobalCtx2::GetInstance()->GetResourceManager()->LoadFile(normalize(path)); @@ -173,6 +179,25 @@ namespace SohImGui { stbi_image_free(img_data); } + void LoadResource(const std::string& name, const std::string& path) { + GfxRenderingAPI* api = gfx_get_current_rendering_api(); + const auto res = static_cast(GlobalCtx2::GetInstance()->GetResourceManager()->LoadResource(normalize(path)).get()); + + if (res->texType != Ship::TextureType::RGBA32bpp) { + // TODO convert other image types + SPDLOG_WARN("SohImGui::LoadResource: Attempting to load unsupporting image type %s", path.c_str()); + return; + } + + const auto asset = new GameAsset{ api->new_texture() }; + + api->select_texture(0, asset->textureId); + api->set_sampler_parameters(0, false, 0, 0); + api->upload_texture(res->imageData, res->width, res->height); + + DefaultAssets[name] = asset; + } + void Init(WindowImpl window_impl) { impl = window_impl; Game::LoadSettings(); @@ -219,7 +244,7 @@ namespace SohImGui { ImGuiProcessEvent(event); } -#define BindButton(btn, status) ImGui::Image(impl.backend == Backend::DX11 ? GetTextureByID(DefaultAssets[btn]->textureId) : (ImTextureID)(DefaultAssets[btn]->textureId), ImVec2(16.0f * scale, 16.0f * scale), ImVec2(0, 0), ImVec2(1.0f, 1.0f), ImVec4(255, 255, 255, (status) ? 255 : 0)); +#define BindButton(btn, status) ImGui::Image(GetTextureByID(DefaultAssets[btn]->textureId), ImVec2(16.0f * scale, 16.0f * scale), ImVec2(0, 0), ImVec2(1.0f, 1.0f), ImVec4(255, 255, 255, (status) ? 255 : 0)); void BindAudioSlider(const char* name, const char* key, float* value, SeqPlayers playerId) { ImGui::Text(name, static_cast(100 * *(value))); @@ -278,7 +303,7 @@ namespace SohImGui { if (ImGui::BeginMenuBar()) { if (DefaultAssets.contains("Game_Icon")) { ImGui::SetCursorPos(ImVec2(5, 2.5f)); - ImGui::Image(impl.backend == Backend::DX11 ? GetTextureByID(DefaultAssets["Game_Icon"]->textureId) : reinterpret_cast(DefaultAssets["Game_Icon"]->textureId), ImVec2(16.0f, 16.0f)); + ImGui::Image(GetTextureByID(DefaultAssets["Game_Icon"]->textureId), ImVec2(16.0f, 16.0f)); ImGui::SameLine(); ImGui::SetCursorPos(ImVec2(25, 0)); } @@ -425,6 +450,15 @@ namespace SohImGui { ImGui::EndMenu(); } + for (const auto& category : windowCategories) { + if (ImGui::BeginMenu(category.first.c_str())) { + for (const std::string& name : category.second) { + HOOK(ImGui::MenuItem(name.c_str(), nullptr, &customWindows[name].enabled)); + } + ImGui::EndMenu(); + } + } + ImGui::EndMenuBar(); } @@ -527,6 +561,13 @@ namespace SohImGui { console->Draw(); + for (auto& windowIter : customWindows) { + CustomWindow& window = windowIter.second; + if (window.drawFunc != nullptr) { + window.drawFunc(window.enabled); + } + } + ImGui::Render(); ImGuiRenderDrawData(ImGui::GetDrawData()); if (UseViewports()) { @@ -538,4 +579,22 @@ namespace SohImGui { void BindCmd(const std::string& cmd, CommandEntry entry) { console->Commands[cmd] = std::move(entry); } -} + + void AddWindow(const std::string& category, const std::string& name, WindowDrawFunc drawFunc) { + if (customWindows.contains(name)) { + SPDLOG_ERROR("SohImGui::AddWindow: Attempting to add duplicate window name %s", name.c_str()); + return; + } + + customWindows[name] = { + .enabled = false, + .drawFunc = drawFunc + }; + + windowCategories[category].emplace_back(name); + } + + ImTextureID GetTextureByName(const std::string& name) { + return GetTextureByID(DefaultAssets[name]->textureId); + } +} \ No newline at end of file diff --git a/libultraship/libultraship/SohImGuiImpl.h b/libultraship/libultraship/SohImGuiImpl.h index b7c946eff..8275e4735 100644 --- a/libultraship/libultraship/SohImGuiImpl.h +++ b/libultraship/libultraship/SohImGuiImpl.h @@ -47,11 +47,23 @@ namespace SohImGui { } sdl; } EventImpl; + extern WindowImpl impl; + + using WindowDrawFunc = void(*)(bool& enabled); + + typedef struct { + bool enabled; + WindowDrawFunc drawFunc; + } CustomWindow; + extern Console* console; void Init(WindowImpl window_impl); void Update(EventImpl event); void Draw(void); void ShowCursor(bool hide, Dialogues w); void BindCmd(const std::string& cmd, CommandEntry entry); - void* GetTextureByID(int id); + void AddWindow(const std::string& category, const std::string& name, WindowDrawFunc drawFunc); + void LoadResource(const std::string& name, const std::string& path); + ImTextureID GetTextureByID(int id); + ImTextureID GetTextureByName(const std::string& name); } diff --git a/soh/soh.vcxproj b/soh/soh.vcxproj index aa6dee304..5560bde76 100644 --- a/soh/soh.vcxproj +++ b/soh/soh.vcxproj @@ -178,6 +178,8 @@ + + @@ -922,6 +924,8 @@ + + diff --git a/soh/soh.vcxproj.filters b/soh/soh.vcxproj.filters index 30ca9d4ed..de9ad6f96 100644 --- a/soh/soh.vcxproj.filters +++ b/soh/soh.vcxproj.filters @@ -76,6 +76,12 @@ {18b9727f-30de-4ab8-a317-916090d4a110} + + {9a4378ec-e30f-47b6-9ad6-5ce738b4cf99} + + + {04fc1c52-49ff-48e2-ae23-2c00867374f8} + @@ -2169,6 +2175,12 @@ Source Files\src\overlays\actors + + Source Files\soh\Enhancements\debugger + + + Source Files\soh\Enhancements\debugger + @@ -3710,6 +3722,12 @@ Header Files + + Header Files\soh\Enhancements\debugger + + + Header Files\soh\Enhancements\debugger + diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp new file mode 100644 index 000000000..95e2f912c --- /dev/null +++ b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp @@ -0,0 +1,527 @@ +#include "debugSaveEditor.h" +#include "../libultraship/SohImGuiImpl.h" + +#include +#include +#include + +extern "C" { +#include +#include "variables.h" +#include "functions.h" +#include "macros.h" +extern GlobalContext* gGlobalCtx; + +#include "textures/icon_item_static/icon_item_static.h" +} + +typedef struct { + uint32_t id; + std::string name; + std::string texturePath; +} ItemMapEntry; + +#define ITEM_MAP_ENTRY(id) \ + { \ + id, { \ + id, #id, static_cast(gItemIcons[id]) \ + } \ + } + +// Maps items ids to info for use in ImGui +std::map itemMapping = { + ITEM_MAP_ENTRY(ITEM_STICK), + ITEM_MAP_ENTRY(ITEM_NUT), + ITEM_MAP_ENTRY(ITEM_BOMB), + ITEM_MAP_ENTRY(ITEM_BOW), + ITEM_MAP_ENTRY(ITEM_ARROW_FIRE), + ITEM_MAP_ENTRY(ITEM_DINS_FIRE), + ITEM_MAP_ENTRY(ITEM_SLINGSHOT), + ITEM_MAP_ENTRY(ITEM_OCARINA_FAIRY), + ITEM_MAP_ENTRY(ITEM_OCARINA_TIME), + ITEM_MAP_ENTRY(ITEM_BOMBCHU), + ITEM_MAP_ENTRY(ITEM_HOOKSHOT), + ITEM_MAP_ENTRY(ITEM_LONGSHOT), + ITEM_MAP_ENTRY(ITEM_ARROW_ICE), + ITEM_MAP_ENTRY(ITEM_FARORES_WIND), + ITEM_MAP_ENTRY(ITEM_BOOMERANG), + ITEM_MAP_ENTRY(ITEM_LENS), + ITEM_MAP_ENTRY(ITEM_BEAN), + ITEM_MAP_ENTRY(ITEM_HAMMER), + ITEM_MAP_ENTRY(ITEM_ARROW_LIGHT), + ITEM_MAP_ENTRY(ITEM_NAYRUS_LOVE), + ITEM_MAP_ENTRY(ITEM_BOTTLE), + ITEM_MAP_ENTRY(ITEM_POTION_RED), + ITEM_MAP_ENTRY(ITEM_POTION_GREEN), + ITEM_MAP_ENTRY(ITEM_POTION_BLUE), + ITEM_MAP_ENTRY(ITEM_FAIRY), + ITEM_MAP_ENTRY(ITEM_FISH), + ITEM_MAP_ENTRY(ITEM_MILK_BOTTLE), + ITEM_MAP_ENTRY(ITEM_LETTER_RUTO), + ITEM_MAP_ENTRY(ITEM_BLUE_FIRE), + ITEM_MAP_ENTRY(ITEM_BUG), + ITEM_MAP_ENTRY(ITEM_BIG_POE), + ITEM_MAP_ENTRY(ITEM_MILK_HALF), + ITEM_MAP_ENTRY(ITEM_POE), + ITEM_MAP_ENTRY(ITEM_WEIRD_EGG), + ITEM_MAP_ENTRY(ITEM_CHICKEN), + ITEM_MAP_ENTRY(ITEM_LETTER_ZELDA), + ITEM_MAP_ENTRY(ITEM_MASK_KEATON), + ITEM_MAP_ENTRY(ITEM_MASK_SKULL), + ITEM_MAP_ENTRY(ITEM_MASK_SPOOKY), + ITEM_MAP_ENTRY(ITEM_MASK_BUNNY), + ITEM_MAP_ENTRY(ITEM_MASK_GORON), + ITEM_MAP_ENTRY(ITEM_MASK_ZORA), + ITEM_MAP_ENTRY(ITEM_MASK_GERUDO), + ITEM_MAP_ENTRY(ITEM_MASK_TRUTH), + ITEM_MAP_ENTRY(ITEM_SOLD_OUT), + ITEM_MAP_ENTRY(ITEM_POCKET_EGG), + ITEM_MAP_ENTRY(ITEM_POCKET_CUCCO), + ITEM_MAP_ENTRY(ITEM_COJIRO), + ITEM_MAP_ENTRY(ITEM_ODD_MUSHROOM), + ITEM_MAP_ENTRY(ITEM_ODD_POTION), + ITEM_MAP_ENTRY(ITEM_SAW), + ITEM_MAP_ENTRY(ITEM_SWORD_BROKEN), + ITEM_MAP_ENTRY(ITEM_PRESCRIPTION), + ITEM_MAP_ENTRY(ITEM_FROG), + ITEM_MAP_ENTRY(ITEM_EYEDROPS), + ITEM_MAP_ENTRY(ITEM_CLAIM_CHECK), + ITEM_MAP_ENTRY(ITEM_BOW_ARROW_FIRE), + ITEM_MAP_ENTRY(ITEM_BOW_ARROW_ICE), + ITEM_MAP_ENTRY(ITEM_BOW_ARROW_LIGHT), + ITEM_MAP_ENTRY(ITEM_SWORD_KOKIRI), + ITEM_MAP_ENTRY(ITEM_SWORD_MASTER), + ITEM_MAP_ENTRY(ITEM_SWORD_BGS), + ITEM_MAP_ENTRY(ITEM_SHIELD_DEKU), + ITEM_MAP_ENTRY(ITEM_SHIELD_HYLIAN), + ITEM_MAP_ENTRY(ITEM_SHIELD_MIRROR), + ITEM_MAP_ENTRY(ITEM_TUNIC_KOKIRI), + ITEM_MAP_ENTRY(ITEM_TUNIC_GORON), + ITEM_MAP_ENTRY(ITEM_TUNIC_ZORA), + ITEM_MAP_ENTRY(ITEM_BOOTS_KOKIRI), + ITEM_MAP_ENTRY(ITEM_BOOTS_IRON), + ITEM_MAP_ENTRY(ITEM_BOOTS_HOVER), + ITEM_MAP_ENTRY(ITEM_BULLET_BAG_30), + ITEM_MAP_ENTRY(ITEM_BULLET_BAG_40), + ITEM_MAP_ENTRY(ITEM_BULLET_BAG_50), + ITEM_MAP_ENTRY(ITEM_QUIVER_30), + ITEM_MAP_ENTRY(ITEM_QUIVER_40), + ITEM_MAP_ENTRY(ITEM_QUIVER_50), + ITEM_MAP_ENTRY(ITEM_BOMB_BAG_20), + ITEM_MAP_ENTRY(ITEM_BOMB_BAG_30), + ITEM_MAP_ENTRY(ITEM_BOMB_BAG_40), + ITEM_MAP_ENTRY(ITEM_BRACELET), + ITEM_MAP_ENTRY(ITEM_GAUNTLETS_SILVER), + ITEM_MAP_ENTRY(ITEM_GAUNTLETS_GOLD), + ITEM_MAP_ENTRY(ITEM_SCALE_SILVER), + ITEM_MAP_ENTRY(ITEM_SCALE_GOLDEN), + ITEM_MAP_ENTRY(ITEM_SWORD_KNIFE), + ITEM_MAP_ENTRY(ITEM_WALLET_ADULT), + ITEM_MAP_ENTRY(ITEM_WALLET_GIANT), + ITEM_MAP_ENTRY(ITEM_SEEDS), + ITEM_MAP_ENTRY(ITEM_FISHING_POLE), +}; + +// Maps entries in the GS flag array to the area name it represents +std::vector gsMapping = { + "Deku Tree", + "Dodongo's Cavern", + "Inside Jabu-Jabu's Belly", + "Forest Temple", + "Fire Temple", + "Water Temple", + "Spirit Temple", + "Shadow Temple", + "Bottom of the Well", + "Ice Cavern", + "Hyrule Field", + "Lon Lon Ranch", + "Kokiri Forest", + "Lost Woods, Sacred Forest Meadow", + "Castle Town and Ganon's Castle", + "Death Mountain Trail, Goron City", + "Kakariko Village", + "Zora Fountain, River", + "Lake Hylia", + "Gerudo Valley", + "Gerudo Fortress", + "Desert Colossus, Haunted Wasteland", +}; +extern "C" u8 gAreaGsFlags[]; + +extern "C" u8 gAmmoItems[]; + +// Modification of gAmmoItems that replaces ITEM_NONE with the item in inventory slot it represents +u8 gAllAmmoItems[] = { + ITEM_STICK, ITEM_NUT, ITEM_BOMB, ITEM_BOW, ITEM_ARROW_FIRE, ITEM_DINS_FIRE, + ITEM_SLINGSHOT, ITEM_OCARINA_TIME, ITEM_BOMBCHU, ITEM_LONGSHOT, ITEM_ARROW_ICE, ITEM_FARORES_WIND, + ITEM_BOOMERANG, ITEM_LENS, ITEM_BEAN, ITEM_HAMMER, +}; + +// Adds a text tooltip for the previous ImGui item +void SetLastItemHoverText(const std::string& text) { + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::Text(text.c_str()); + ImGui::EndTooltip(); + } +} + +// Adds a "?" next to the previous ImGui item with a custom tooltip +void InsertHelpHoverText(const std::string& text) { + ImGui::SameLine(); + ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f), "?"); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::Text(text.c_str()); + ImGui::EndTooltip(); + } +} + +void DrawSaveEditor(bool& open) { + if (!open) { + return; + } + + ImGui::SetNextWindowSize(ImVec2(520, 600), ImGuiCond_FirstUseEver); + if (!ImGui::Begin("Save Editor", &open)) { + ImGui::End(); + return; + } + + // TODO This is the bare minimum to get the player name showing + // There will need to be more effort to get it robust and editable + std::string name; + for (int i = 0; i < 8; i++) { + char letter = gSaveContext.playerName[i] + 0x3D; + if (letter == '{') { + letter = '\0'; + } + name += letter; + } + name += '\0'; + + if (ImGui::BeginTabBar("SaveContextTabBar", ImGuiTabBarFlags_NoCloseWithMiddleMouseButton)) { + if (ImGui::BeginTabItem("Info")) { + ImGui::PushItemWidth(ImGui::GetFontSize() * 6); + + ImGui::Text("Name: %s", name.c_str()); + InsertHelpHoverText("Player Name"); + + // Use an intermediary to keep the health from updating (and potentially killing the player) + // until it is done being edited + int16_t healthIntermediary = gSaveContext.healthCapacity; + ImGui::InputScalar("Max Health", ImGuiDataType_S16, &healthIntermediary); + if (ImGui::IsItemDeactivated()) { + gSaveContext.healthCapacity = healthIntermediary; + } + InsertHelpHoverText("Maximum health. 16 units per full heart"); + if (gSaveContext.health > gSaveContext.healthCapacity) { + gSaveContext.health = gSaveContext.healthCapacity; // Clamp health to new max + } + + const uint16_t healthMin = 0; + const uint16_t healthMax = gSaveContext.healthCapacity; + ImGui::SetNextItemWidth(ImGui::GetFontSize() * 15); + ImGui::SliderScalar("Health", ImGuiDataType_S16, &gSaveContext.health, &healthMin, &healthMax); + InsertHelpHoverText("Current health. 16 units per full heart"); + + bool doubleDefense = gSaveContext.doubleDefense != 0; + if (ImGui::Checkbox("Double Defense", &doubleDefense)) { + gSaveContext.doubleDefense = doubleDefense; + gSaveContext.inventory.defenseHearts = + gSaveContext.doubleDefense ? 20 : 0; // Set to get the border drawn in the UI + } + InsertHelpHoverText("Is double defense unlocked?"); + + std::string magicName; + if (gSaveContext.magicLevel == 2) { + magicName = "Double"; + } else if (gSaveContext.magicLevel == 1) { + magicName = "Single"; + } else { + magicName = "None"; + } + ImGui::SetNextItemWidth(ImGui::GetFontSize() * 6); + if (ImGui::BeginCombo("Magic Level", magicName.c_str())) { + if (ImGui::Selectable("Double")) { + gSaveContext.magicLevel = 2; + gSaveContext.magicAcquired = true; + gSaveContext.doubleMagic = true; + } + if (ImGui::Selectable("Single")) { + gSaveContext.magicLevel = 1; + gSaveContext.magicAcquired = true; + gSaveContext.doubleMagic = false; + } + if (ImGui::Selectable("None")) { + gSaveContext.magicLevel = 0; + gSaveContext.magicAcquired = false; + gSaveContext.doubleMagic = false; + } + + ImGui::EndCombo(); + } + InsertHelpHoverText("Current magic level"); + gSaveContext.unk_13F4 = gSaveContext.magicLevel * 0x30; // Set to get the bar drawn in the UI + if (gSaveContext.magic > gSaveContext.unk_13F4) { + gSaveContext.magic = gSaveContext.unk_13F4; // Clamp magic to new max + } + + const uint8_t magicMin = 0; + const uint8_t magicMax = gSaveContext.unk_13F4; + ImGui::SetNextItemWidth(ImGui::GetFontSize() * 15); + ImGui::SliderScalar("Magic", ImGuiDataType_S8, &gSaveContext.magic, &magicMin, &magicMax); + InsertHelpHoverText("Current magic. 48 units per magic level"); + + ImGui::InputScalar("Rupees", ImGuiDataType_S16, &gSaveContext.rupees); + InsertHelpHoverText("Current rupees"); + + const uint16_t dayTimeMin = 0; + const uint16_t dayTimeMax = 0xFFFF; + ImGui::SetNextItemWidth(ImGui::GetFontSize() * 15); + ImGui::SliderScalar("Time", ImGuiDataType_U16, &gSaveContext.dayTime, &dayTimeMin, &dayTimeMax); + InsertHelpHoverText("Time of day"); + if (ImGui::Button("Dawn")) { + gSaveContext.dayTime = 0x4000; + } + ImGui::SameLine(); + if (ImGui::Button("Noon")) { + gSaveContext.dayTime = 0x8000; + } + ImGui::SameLine(); + if (ImGui::Button("Sunset")) { + gSaveContext.dayTime = 0xC000; + } + ImGui::SameLine(); + if (ImGui::Button("Midnight")) { + gSaveContext.dayTime = 0; + } + + ImGui::InputScalar("Total Days", ImGuiDataType_S32, &gSaveContext.totalDays); + InsertHelpHoverText("Total number of days elapsed since the start of the game"); + + ImGui::InputScalar("Deaths", ImGuiDataType_U16, &gSaveContext.deaths); + InsertHelpHoverText("Total number of deaths"); + + // TODO Move to quest status screen once the page is created + ImGui::InputScalar("GS Count", ImGuiDataType_S16, &gSaveContext.inventory.gsTokens); + InsertHelpHoverText("Number of gold skulltula tokens aquired"); + + bool bgsFlag = gSaveContext.bgsFlag != 0; + if (ImGui::Checkbox("Has BGS", &bgsFlag)) { + gSaveContext.bgsFlag = bgsFlag; + } + InsertHelpHoverText("Is Biggoron sword unlocked? Replaces Giant's knife"); + + ImGui::InputScalar("Sword Health", ImGuiDataType_U16, &gSaveContext.swordHealth); + InsertHelpHoverText("Giant's knife health. Default is 8. Must be >0 for Biggoron sword to work"); + + ImGui::InputScalar("Bgs Day Count", ImGuiDataType_S32, &gSaveContext.bgsDayCount); + InsertHelpHoverText("Total number of days elapsed since giving Biggoron the claim check"); + + // TODO Changing Link's age is more involved than just setting gSaveContext.linkAge + // It might not fit here and instead should be only changable when changing scenes + /* + if (ImGui::BeginCombo("Link Age", LINK_IS_ADULT ? "Adult" : "Child")) { + if (ImGui::Selectable("Adult")) { + gSaveContext.linkAge = 0; + } + if (ImGui::Selectable("Child")) { + gSaveContext.linkAge = 1; + } + + ImGui::EndCombo(); + } + */ + + ImGui::PopItemWidth(); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem("Inventory")) { + static bool restrictToValid = true; + + ImGui::Checkbox("Restrict to valid items", &restrictToValid); + InsertHelpHoverText("Restricts items and ammo to only what is possible to legally acquire in-game"); + + for (int32_t y = 0; y < 4; y++) { + for (int32_t x = 0; x < 6; x++) { + int32_t index = x + y * 6; + static int32_t selectedIndex = -1; + static const char* itemPopupPicker = "itemPopupPicker"; + + ImGui::PushID(index); + + if (x != 0) { + ImGui::SameLine(); + } + + ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(1, 1, 1, 0)); + ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f); + uint8_t item = gSaveContext.inventory.items[index]; + if (item != ITEM_NONE) { + const ItemMapEntry& slotEntry = itemMapping.find(item)->second; + if (ImGui::ImageButton(SohImGui::GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), + ImVec2(0, 0), ImVec2(1, 1), 0)) { + selectedIndex = index; + ImGui::OpenPopup(itemPopupPicker); + } + } else { + if (ImGui::Button("##itemNone", ImVec2(32.0f, 32.0f))) { + selectedIndex = index; + ImGui::OpenPopup(itemPopupPicker); + } + } + ImGui::PopStyleVar(); + ImGui::PopStyleColor(); + + ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0)); + if (ImGui::BeginPopup(itemPopupPicker)) { + if (ImGui::Button("##itemNonePicker", ImVec2(32.0f, 32.0f))) { + gSaveContext.inventory.items[selectedIndex] = ITEM_NONE; + ImGui::CloseCurrentPopup(); + } + SetLastItemHoverText("ITEM_NONE"); + + std::vector possibleItems; + if (restrictToValid) { + // Scan gItemSlots to find legal items for this slot. Bottles are a special case + for (int slotIndex = 0; slotIndex < 56; slotIndex++) { + int testIndex = (selectedIndex == SLOT_BOTTLE_1 || selectedIndex == SLOT_BOTTLE_2 || + selectedIndex == SLOT_BOTTLE_3 || selectedIndex == SLOT_BOTTLE_4) + ? SLOT_BOTTLE_1 + : selectedIndex; + if (gItemSlots[slotIndex] == testIndex) { + possibleItems.push_back(itemMapping[slotIndex]); + } + } + } else { + for (const auto& entry : itemMapping) { + possibleItems.push_back(entry.second); + } + } + + for (int32_t pickerIndex = 0; pickerIndex < possibleItems.size(); pickerIndex++) { + if (((pickerIndex + 1) % 8) != 0) { + ImGui::SameLine(); + } + const ItemMapEntry& slotEntry = possibleItems[pickerIndex]; + if (ImGui::ImageButton(SohImGui::GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), + ImVec2(0, 0), ImVec2(1, 1), 0)) { + gSaveContext.inventory.items[selectedIndex] = slotEntry.id; + ImGui::CloseCurrentPopup(); + } + SetLastItemHoverText(slotEntry.name); + } + + ImGui::EndPopup(); + } + ImGui::PopStyleVar(); + + ImGui::PopID(); + } + } + + ImGui::Text("Ammo"); + for (uint32_t ammoIndex = 0, drawnAmmoItems = 0; ammoIndex < 16; ammoIndex++) { + uint8_t item = (restrictToValid) ? gAmmoItems[ammoIndex] : gAllAmmoItems[ammoIndex]; + if (item != ITEM_NONE) { + // For legal items, display as 1 row of 7. For unrestricted items, display rows of 6 to match + // inventory + if ((restrictToValid && (drawnAmmoItems != 0)) || ((drawnAmmoItems % 6) != 0)) { + ImGui::SameLine(); + } + drawnAmmoItems++; + + ImGui::PushID(ammoIndex); + ImGui::PushItemWidth(32.0f); + ImGui::BeginGroup(); + + ImGui::Image(SohImGui::GetTextureByName(itemMapping[item].name), ImVec2(32.0f, 32.0f)); + ImGui::InputScalar("##ammoInput", ImGuiDataType_S8, &AMMO(item)); + + ImGui::EndGroup(); + ImGui::PopItemWidth(); + ImGui::PopID(); + } + } + + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem("Flags")) { + static uint32_t selectedGsMap = 0; + ImGui::Text("Gold Skulltulas"); + ImGui::Text("Map"); + ImGui::SameLine(); + if (ImGui::BeginCombo("##Gold Skulltula Map", gsMapping[selectedGsMap].c_str())) { + for (int32_t gsIndex = 0; gsIndex < gsMapping.size(); gsIndex++) { + if (ImGui::Selectable(gsMapping[gsIndex].c_str())) { + selectedGsMap = gsIndex; + } + } + + ImGui::EndCombo(); + } + + // TODO We should write out descriptions for each one... ugh + ImGui::Text("Flags"); + uint32_t currentFlags = GET_GS_FLAGS(selectedGsMap); + uint32_t allFlags = gAreaGsFlags[selectedGsMap]; + uint32_t setMask = 1; + // Iterate over bitfield and create a checkbox for each skulltula + while (allFlags != 0) { + bool isThisSet = (currentFlags & 0x1) == 0x1; + + ImGui::SameLine(); + ImGui::PushID(allFlags); + if (ImGui::Checkbox("##gs", &isThisSet)) { + if (isThisSet) { + SET_GS_FLAGS(selectedGsMap, setMask); + } else { + // Have to do this roundabout method as the macro does not support clearing flags + uint32_t currentFlagsBase = GET_GS_FLAGS(selectedGsMap); + gSaveContext.gsFlags[selectedGsMap >> 2] &= ~gGsFlagsMasks[selectedGsMap & 3]; + SET_GS_FLAGS(selectedGsMap, currentFlagsBase & ~setMask); + } + } + + ImGui::PopID(); + + allFlags >>= 1; + currentFlags >>= 1; + setMask <<= 1; + } + + static bool keepGsCountUpdated = true; + ImGui::Checkbox("Keep GS Count Updated", &keepGsCountUpdated); + InsertHelpHoverText("Automatically adjust the number of gold skulltula tokens acquired based on set flags"); + int32_t gsCount = 0; + if (keepGsCountUpdated) { + for (int32_t gsFlagIndex = 0; gsFlagIndex < 6; gsFlagIndex++) { + gsCount += std::popcount(static_cast(gSaveContext.gsFlags[gsFlagIndex])); + } + gSaveContext.inventory.gsTokens = gsCount; + } + + // TODO other flag types, like switch, clear, etc. + // These flags interact with the actor context, so it's a bit more complicated + + ImGui::EndTabItem(); + } + + ImGui::EndTabBar(); + } + + ImGui::End(); +} + +void InitSaveEditor() { + SohImGui::AddWindow("Debug", "Save Editor", DrawSaveEditor); + + // Load item icons into ImGui + for (const auto& entry : itemMapping) { + SohImGui::LoadResource(entry.second.name, entry.second.texturePath); + } +} diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.h b/soh/soh/Enhancements/debugger/debugSaveEditor.h new file mode 100644 index 000000000..084f7cadc --- /dev/null +++ b/soh/soh/Enhancements/debugger/debugSaveEditor.h @@ -0,0 +1,3 @@ +#pragma once + +void InitSaveEditor(); diff --git a/soh/soh/Enhancements/debugger/debugger.cpp b/soh/soh/Enhancements/debugger/debugger.cpp new file mode 100644 index 000000000..e493375cd --- /dev/null +++ b/soh/soh/Enhancements/debugger/debugger.cpp @@ -0,0 +1,6 @@ +#include "debugger.h" +#include "debugSaveEditor.h" + +void Debug_Init(void) { + InitSaveEditor(); +} diff --git a/soh/soh/Enhancements/debugger/debugger.h b/soh/soh/Enhancements/debugger/debugger.h new file mode 100644 index 000000000..4bc0f985b --- /dev/null +++ b/soh/soh/Enhancements/debugger/debugger.h @@ -0,0 +1,3 @@ +#pragma once + +void Debug_Init(void); diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index d10600bce..007afd702 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -22,6 +22,7 @@ #include "Lib/stb/stb_image.h" #include "AudioPlayer.h" #include "../soh/Enhancements/debugconsole.h" +#include "../soh/Enhancements/debugger/debugger.h" #include "Utils/BitConverter.h" OTRGlobals* OTRGlobals::Instance; @@ -54,6 +55,7 @@ extern "C" void InitOTR() { clearMtx = (uintptr_t)&gMtxClear; OTRMessage_Init(); DebugConsole_Init(); + Debug_Init(); } extern "C" uint64_t GetFrequency() { From 06fd7f662af4358e9a6111270ce0cd311a9af9ea Mon Sep 17 00:00:00 2001 From: Josh Bodner <30329717+jbodner09@users.noreply.github.com> Date: Sun, 10 Apr 2022 15:19:26 -0700 Subject: [PATCH 034/146] Added DPad support to file selection and pause screens (#124) * Added DPad support to file selection and pause screens * Wrap changes behind CVar * Fix merge conflict for real * Remove unnecessary const_cast * Fixed transparent texture making framebuffers also transparent in D3D11. (#84) This happened with the Mirror Shield in the inventory screen preview. * Add save editor * Added DPad support to file selection and pause screens * Fixing rebase conflict * Remove unnecessary const_cast Co-authored-by: MaikelChan Co-authored-by: rozlette --- libultraship/libultraship/GameSettings.cpp | 6 +- libultraship/libultraship/GameSettings.h | 1 + libultraship/libultraship/SohImGuiImpl.cpp | 9 +- .../ovl_file_choose/z_file_choose.c | 8 +- .../ovl_file_choose/z_file_copy_erase.c | 21 ++- .../ovl_file_choose/z_file_nameset_PAL.c | 21 ++- .../ovl_kaleido_scope/z_kaleido_collect.c | 163 +++++++++--------- .../ovl_kaleido_scope/z_kaleido_equipment.c | 13 +- .../misc/ovl_kaleido_scope/z_kaleido_item.c | 17 +- .../ovl_kaleido_scope/z_kaleido_map_PAL.c | 30 ++-- .../misc/ovl_kaleido_scope/z_kaleido_prompt.c | 5 +- .../ovl_kaleido_scope/z_kaleido_scope_PAL.c | 5 +- 12 files changed, 163 insertions(+), 136 deletions(-) diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index f12042bc0..28f4b23cb 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -59,7 +59,7 @@ namespace Game { CVar_SetS32("gPauseLiveLink", Settings.enhancements.animated_pause_menu); Settings.enhancements.minimal_ui = stob(Conf[EnhancementSection]["minimal_ui"]); - CVar_SetS32(const_cast("gMinimalUI"), Settings.enhancements.minimal_ui); + CVar_SetS32("gMinimalUI", Settings.enhancements.minimal_ui); // Audio Settings.audio.master = Ship::stof(Conf[AudioSection]["master"]); @@ -89,6 +89,9 @@ namespace Game { Settings.controller.input_enabled = stob(Conf[ControllerSection]["input_enabled"]); CVar_SetS32("gInputEnabled", Settings.controller.input_enabled); + + Settings.controller.dpad_pause_name = stob(Conf[ControllerSection]["dpad_pause_name"]); + CVar_SetS32("gDpadPauseName", Settings.controller.dpad_pause_name); // Cheats Settings.cheats.debug_mode = stob(Conf[CheatSection]["debug_mode"]); @@ -149,6 +152,7 @@ namespace Game { Conf[ControllerSection]["rumble_strength"] = std::to_string(Settings.controller.rumble_strength); Conf[ControllerSection]["input_scale"] = std::to_string(Settings.controller.input_scale); Conf[ControllerSection]["input_enabled"] = std::to_string(Settings.controller.input_enabled); + Conf[ControllerSection]["dpad_pause_name"] = std::to_string(Settings.controller.dpad_pause_name); // Cheats Conf[CheatSection]["debug_mode"] = std::to_string(Settings.cheats.debug_mode); diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index 4f9bb4c99..15ebdad16 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -34,6 +34,7 @@ struct SoHConfigType { float gyroDriftX = 0.0f; float gyroDriftY = 0.0f; bool input_enabled = false; + bool dpad_pause_name = false; } controller; // Cheats diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 7489d14a2..cef156246 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -353,6 +353,13 @@ namespace SohImGui { needs_save = true; } + ImGui::Separator(); + + if (ImGui::Checkbox("Dpad Support on Pause and File Select", &Game::Settings.controller.dpad_pause_name)) { + CVar_SetS32("gDpadPauseName", Game::Settings.controller.dpad_pause_name); + needs_save = true; + } + ImGui::EndMenu(); } @@ -367,7 +374,7 @@ namespace SohImGui { } if (ImGui::Checkbox("Minimal UI", &Game::Settings.enhancements.minimal_ui)) { - CVar_SetS32(const_cast("gMinimalUI"), Game::Settings.enhancements.minimal_ui); + CVar_SetS32("gMinimalUI", Game::Settings.enhancements.minimal_ui); needs_save = true; } diff --git a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c index ca5154567..84543fa26 100644 --- a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c +++ b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c @@ -179,6 +179,7 @@ void FileChoose_UpdateMainMenu(GameState* thisx) { FileChooseContext* this = (FileChooseContext*)thisx; SramContext* sramCtx = &this->sramCtx; Input* input = &this->state.input[0]; + bool dpad = CVar_GetS32("gDpadPauseName", 0); if (CHECK_BTN_ALL(input->press.button, BTN_START) || CHECK_BTN_ALL(input->press.button, BTN_A)) { if (this->buttonIndex <= FS_BTN_MAIN_FILE_3) { @@ -237,10 +238,10 @@ void FileChoose_UpdateMainMenu(GameState* thisx) { } } } else { - if (ABS(this->stickRelY) > 30) { + if ((ABS(this->stickRelY) > 30) || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP))) { Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); - if (this->stickRelY > 30) { + if ((this->stickRelY > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) { this->buttonIndex--; if (this->buttonIndex < FS_BTN_MAIN_FILE_1) { this->buttonIndex = FS_BTN_MAIN_OPTIONS; @@ -1318,6 +1319,7 @@ void FileChoose_FadeInFileInfo(GameState* thisx) { void FileChoose_ConfirmFile(GameState* thisx) { FileChooseContext* this = (FileChooseContext*)thisx; Input* input = &this->state.input[0]; + bool dpad = CVar_GetS32("gDpadPauseName", 0); if (CHECK_BTN_ALL(input->press.button, BTN_START) || (CHECK_BTN_ALL(input->press.button, BTN_A))) { if (this->confirmButtonIndex == FS_BTN_CONFIRM_YES) { @@ -1332,7 +1334,7 @@ void FileChoose_ConfirmFile(GameState* thisx) { } else if (CHECK_BTN_ALL(input->press.button, BTN_B)) { Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CLOSE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); this->selectMode++; - } else if (ABS(this->stickRelY) >= 30) { + } else if ((ABS(this->stickRelY) >= 30) || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP))) { Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); this->confirmButtonIndex ^= 1; } diff --git a/soh/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c b/soh/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c index 5d13c408d..1f44abe95 100644 --- a/soh/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c +++ b/soh/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c @@ -62,6 +62,7 @@ void FileChoose_SelectCopySource(GameState* thisx) { FileChooseContext* this = (FileChooseContext*)thisx; SramContext* sramCtx = &this->sramCtx; Input* input = &this->state.input[0]; + bool dpad = CVar_GetS32("gDpadPauseName", 0); if (((this->buttonIndex == FS_BTN_COPY_QUIT) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) || CHECK_BTN_ALL(input->press.button, BTN_B)) { @@ -82,10 +83,10 @@ void FileChoose_SelectCopySource(GameState* thisx) { Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); } } else { - if (ABS(this->stickRelY) >= 30) { + if ((ABS(this->stickRelY) >= 30) || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP))) { Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); - if (this->stickRelY >= 30) { + if ((this->stickRelY >= 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) { this->buttonIndex--; if (this->buttonIndex < FS_BTN_COPY_FILE_1) { @@ -174,6 +175,7 @@ void FileChoose_SelectCopyDest(GameState* thisx) { FileChooseContext* this = (FileChooseContext*)thisx; SramContext* sramCtx = &this->sramCtx; Input* input = &this->state.input[0]; + bool dpad = CVar_GetS32("gDpadPauseName", 0); if (((this->buttonIndex == FS_BTN_COPY_QUIT) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) || CHECK_BTN_ALL(input->press.button, BTN_B)) { @@ -194,10 +196,10 @@ void FileChoose_SelectCopyDest(GameState* thisx) { } } else { - if (ABS(this->stickRelY) >= 30) { + if ((ABS(this->stickRelY) >= 30) || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP))) { Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); - if (this->stickRelY >= 30) { + if ((this->stickRelY >= 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) { this->buttonIndex--; if ((this->buttonIndex == this->selectedFileIndex)) { @@ -360,6 +362,7 @@ void FileChoose_CopyConfirm(GameState* thisx) { SramContext* sramCtx = &this->sramCtx; Input* input = &this->state.input[0]; u16 dayTime; + bool dpad = CVar_GetS32("gDpadPauseName", 0); if (((this->buttonIndex != FS_BTN_CONFIRM_YES) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) || CHECK_BTN_ALL(input->press.button, BTN_B)) { @@ -377,7 +380,7 @@ void FileChoose_CopyConfirm(GameState* thisx) { this->configMode = CM_COPY_ANIM_1; func_800AA000(300.0f, 0xB4, 0x14, 0x64); Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); - } else if (ABS(this->stickRelY) >= 30) { + } else if ((ABS(this->stickRelY) >= 30) || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP))) { Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); this->buttonIndex ^= 1; } @@ -680,6 +683,7 @@ void FileChoose_EraseSelect(GameState* thisx) { FileChooseContext* this = (FileChooseContext*)thisx; SramContext* sramCtx = &this->sramCtx; Input* input = &this->state.input[0]; + bool dpad = CVar_GetS32("gDpadPauseName", 0); if (((this->buttonIndex == FS_BTN_COPY_QUIT) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) || CHECK_BTN_ALL(input->press.button, BTN_B)) { @@ -700,10 +704,10 @@ void FileChoose_EraseSelect(GameState* thisx) { Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); } } else { - if (ABS(this->stickRelY) >= 30) { + if ((ABS(this->stickRelY) >= 30) || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP))) { Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); - if (this->stickRelY >= 30) { + if ((this->stickRelY >= 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) { this->buttonIndex--; if (this->buttonIndex < FS_BTN_ERASE_FILE_1) { this->buttonIndex = FS_BTN_ERASE_QUIT; @@ -817,6 +821,7 @@ void FileChoose_SetupEraseConfirm2(GameState* thisx) { void FileChoose_EraseConfirm(GameState* thisx) { FileChooseContext* this = (FileChooseContext*)thisx; Input* input = &this->state.input[0]; + bool dpad = CVar_GetS32("gDpadPauseName", 0); if (((this->buttonIndex != FS_BTN_CONFIRM_YES) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) || CHECK_BTN_ALL(input->press.button, BTN_B)) { @@ -833,7 +838,7 @@ void FileChoose_EraseConfirm(GameState* thisx) { this->nextTitleLabel = FS_TITLE_ERASE_COMPLETE; func_800AA000(200.0f, 0xFF, 0x14, 0x96); sEraseDelayTimer = 15; - } else if (ABS(this->stickRelY) >= 30) { + } else if ((ABS(this->stickRelY) >= 30) || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP))) { Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); this->buttonIndex ^= 1; } diff --git a/soh/src/overlays/gamestates/ovl_file_choose/z_file_nameset_PAL.c b/soh/src/overlays/gamestates/ovl_file_choose/z_file_nameset_PAL.c index 73aa5e6d1..501986d2b 100644 --- a/soh/src/overlays/gamestates/ovl_file_choose/z_file_nameset_PAL.c +++ b/soh/src/overlays/gamestates/ovl_file_choose/z_file_nameset_PAL.c @@ -509,12 +509,14 @@ void FileChoose_StartNameEntry(GameState* thisx) { */ void FileChoose_UpdateKeyboardCursor(GameState* thisx) { FileChooseContext* this = (FileChooseContext*)thisx; + Input* input = &this->state.input[0]; s16 prevKbdX; + bool dpad = CVar_GetS32("gDpadPauseName", 0); this->kbdButton = 99; if (this->kbdY != 5) { - if (this->stickRelX < -30) { + if ((this->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); this->charIndex--; this->kbdX--; @@ -522,7 +524,7 @@ void FileChoose_UpdateKeyboardCursor(GameState* thisx) { this->kbdX = 12; this->charIndex = (this->kbdY * 13) + this->kbdX; } - } else if (this->stickRelX > 30) { + } else if ((this->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); this->charIndex++; this->kbdX++; @@ -532,13 +534,13 @@ void FileChoose_UpdateKeyboardCursor(GameState* thisx) { } } } else { - if (this->stickRelX < -30) { + if ((this->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); this->kbdX--; if (this->kbdX < 3) { this->kbdX = 4; } - } else if (this->stickRelX > 30) { + } else if ((this->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); this->kbdX++; if (this->kbdX > 4) { @@ -547,7 +549,7 @@ void FileChoose_UpdateKeyboardCursor(GameState* thisx) { } } - if (this->stickRelY > 30) { + if ((this->stickRelY > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) { Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); this->kbdY--; @@ -578,7 +580,7 @@ void FileChoose_UpdateKeyboardCursor(GameState* thisx) { this->charIndex += this->kbdX; } } - } else if (this->stickRelY < -30) { + } else if ((this->stickRelY < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DDOWN))) { Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); this->kbdY++; @@ -655,6 +657,7 @@ void FileChoose_UpdateOptionsMenu(GameState* thisx) { FileChooseContext* this = (FileChooseContext*)thisx; SramContext* sramCtx = &this->sramCtx; Input* input = &this->state.input[0]; + bool dpad = CVar_GetS32("gDpadPauseName", 0); if (CHECK_BTN_ALL(input->press.button, BTN_B)) { Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); @@ -675,7 +678,7 @@ void FileChoose_UpdateOptionsMenu(GameState* thisx) { return; } - if (this->stickRelX < -30) { + if ((this->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); if (sSelectedSetting == FS_SETTING_AUDIO) { @@ -688,7 +691,7 @@ void FileChoose_UpdateOptionsMenu(GameState* thisx) { } else { gSaveContext.zTargetSetting ^= 1; } - } else if (this->stickRelX > 30) { + } else if ((this->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); if (sSelectedSetting == FS_SETTING_AUDIO) { @@ -702,7 +705,7 @@ void FileChoose_UpdateOptionsMenu(GameState* thisx) { } } - if ((this->stickRelY < -30) || (this->stickRelY > 30)) { + if ((ABS(this->stickRelY) > 30) || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP))) { Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); sSelectedSetting ^= 1; } else if (CHECK_BTN_ALL(input->press.button, BTN_A)) { diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c index 46be1154f..80ffe8d4a 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c @@ -74,6 +74,7 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx s16 pad2; s16 phi_s0_2; s16 sp208[3]; + bool dpad = CVar_GetS32("gDpadPauseName", 0); OPEN_DISPS(gfxCtx, "../z_kaleido_collect.c", 248); @@ -83,96 +84,92 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx if (pauseCtx->cursorSpecialPos == 0) { pauseCtx->nameColorSet = 0; + sp216 = pauseCtx->cursorSlot[PAUSE_QUEST]; + phi_s3 = pauseCtx->cursorPoint[PAUSE_QUEST]; - if ((pauseCtx->state != 6) || ((pauseCtx->stickRelX == 0) && (pauseCtx->stickRelY == 0))) { - sp216 = pauseCtx->cursorSlot[PAUSE_QUEST]; - } else { - phi_s3 = pauseCtx->cursorPoint[PAUSE_QUEST]; - - if (pauseCtx->stickRelX < -30) { - phi_s0 = D_8082A1AC[phi_s3][2]; - if (phi_s0 == -3) { - KaleidoScope_MoveCursorToSpecialPos(globalCtx, PAUSE_CURSOR_PAGE_LEFT); - pauseCtx->unk_1E4 = 0; - } else { - while (phi_s0 >= 0) { - if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) { - break; - } - phi_s0 = D_8082A1AC[phi_s0][2]; - } - } - } else if (pauseCtx->stickRelX > 30) { - phi_s0 = D_8082A1AC[phi_s3][3]; - if (phi_s0 == -2) { - KaleidoScope_MoveCursorToSpecialPos(globalCtx, PAUSE_CURSOR_PAGE_RIGHT); - pauseCtx->unk_1E4 = 0; - } else { - while (phi_s0 >= 0) { - if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) { - break; - } - phi_s0 = D_8082A1AC[phi_s0][3]; - } - } - } - - if (pauseCtx->stickRelY < -30) { - phi_s0 = D_8082A1AC[phi_s3][1]; - while (phi_s0 >= 0) { - if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) { - break; - } - phi_s0 = D_8082A1AC[phi_s0][1]; - } - } else if (pauseCtx->stickRelY > 30) { - phi_s0 = D_8082A1AC[phi_s3][0]; - while (phi_s0 >= 0) { - if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) { - break; - } - phi_s0 = D_8082A1AC[phi_s0][0]; - } - } - - if (phi_s3 != pauseCtx->cursorPoint[PAUSE_QUEST]) { + if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { + phi_s0 = D_8082A1AC[phi_s3][2]; + if (phi_s0 == -3) { + KaleidoScope_MoveCursorToSpecialPos(globalCtx, PAUSE_CURSOR_PAGE_LEFT); pauseCtx->unk_1E4 = 0; - Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); - } - - if (pauseCtx->cursorPoint[PAUSE_QUEST] != 0x18) { - if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) { - if (pauseCtx->cursorPoint[PAUSE_QUEST] < 6) { - phi_s0_2 = pauseCtx->cursorPoint[PAUSE_QUEST] + 0x66; - osSyncPrintf("000 ccc=%d\n", phi_s0_2); - } else if (pauseCtx->cursorPoint[PAUSE_QUEST] < 0x12) { - phi_s0_2 = pauseCtx->cursorPoint[PAUSE_QUEST] + 0x54; - osSyncPrintf("111 ccc=%d\n", phi_s0_2); - } else { - phi_s0_2 = pauseCtx->cursorPoint[PAUSE_QUEST] + 0x5A; - osSyncPrintf("222 ccc=%d (%d, %d, %d)\n", phi_s0_2, pauseCtx->cursorPoint[PAUSE_QUEST], - 0x12, 0x6C); + } else { + while (phi_s0 >= 0) { + if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) { + break; } + phi_s0 = D_8082A1AC[phi_s0][2]; + } + } + } else if ((pauseCtx->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { + phi_s0 = D_8082A1AC[phi_s3][3]; + if (phi_s0 == -2) { + KaleidoScope_MoveCursorToSpecialPos(globalCtx, PAUSE_CURSOR_PAGE_RIGHT); + pauseCtx->unk_1E4 = 0; + } else { + while (phi_s0 >= 0) { + if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) { + break; + } + phi_s0 = D_8082A1AC[phi_s0][3]; + } + } + } + + if ((pauseCtx->stickRelY < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DDOWN))) { + phi_s0 = D_8082A1AC[phi_s3][1]; + while (phi_s0 >= 0) { + if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) { + break; + } + phi_s0 = D_8082A1AC[phi_s0][1]; + } + } else if ((pauseCtx->stickRelY > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) { + phi_s0 = D_8082A1AC[phi_s3][0]; + while (phi_s0 >= 0) { + if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) { + break; + } + phi_s0 = D_8082A1AC[phi_s0][0]; + } + } + + if (phi_s3 != pauseCtx->cursorPoint[PAUSE_QUEST]) { + pauseCtx->unk_1E4 = 0; + Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + } + + if (pauseCtx->cursorPoint[PAUSE_QUEST] != 0x18) { + if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) { + if (pauseCtx->cursorPoint[PAUSE_QUEST] < 6) { + phi_s0_2 = pauseCtx->cursorPoint[PAUSE_QUEST] + 0x66; + osSyncPrintf("000 ccc=%d\n", phi_s0_2); + } else if (pauseCtx->cursorPoint[PAUSE_QUEST] < 0x12) { + phi_s0_2 = pauseCtx->cursorPoint[PAUSE_QUEST] + 0x54; + osSyncPrintf("111 ccc=%d\n", phi_s0_2); } else { - phi_s0_2 = PAUSE_ITEM_NONE; - osSyncPrintf("999 ccc=%d (%d, %d)\n", PAUSE_ITEM_NONE, pauseCtx->cursorPoint[PAUSE_QUEST], - 0x18); + phi_s0_2 = pauseCtx->cursorPoint[PAUSE_QUEST] + 0x5A; + osSyncPrintf("222 ccc=%d (%d, %d, %d)\n", phi_s0_2, pauseCtx->cursorPoint[PAUSE_QUEST], + 0x12, 0x6C); } } else { - if ((gSaveContext.inventory.questItems & 0xF0000000) != 0) { - phi_s0_2 = 0x72; - } else { - phi_s0_2 = PAUSE_ITEM_NONE; - } - osSyncPrintf("888 ccc=%d (%d, %d, %x)\n", phi_s0_2, pauseCtx->cursorPoint[PAUSE_QUEST], 0x72, - gSaveContext.inventory.questItems & 0xF0000000); + phi_s0_2 = PAUSE_ITEM_NONE; + osSyncPrintf("999 ccc=%d (%d, %d)\n", PAUSE_ITEM_NONE, pauseCtx->cursorPoint[PAUSE_QUEST], + 0x18); } - - sp216 = pauseCtx->cursorPoint[PAUSE_QUEST]; - pauseCtx->cursorItem[pauseCtx->pageIndex] = phi_s0_2; - pauseCtx->cursorSlot[pauseCtx->pageIndex] = sp216; + } else { + if ((gSaveContext.inventory.questItems & 0xF0000000) != 0) { + phi_s0_2 = 0x72; + } else { + phi_s0_2 = PAUSE_ITEM_NONE; + } + osSyncPrintf("888 ccc=%d (%d, %d, %x)\n", phi_s0_2, pauseCtx->cursorPoint[PAUSE_QUEST], 0x72, + gSaveContext.inventory.questItems & 0xF0000000); } + sp216 = pauseCtx->cursorPoint[PAUSE_QUEST]; + pauseCtx->cursorItem[pauseCtx->pageIndex] = phi_s0_2; + pauseCtx->cursorSlot[pauseCtx->pageIndex] = sp216; + KaleidoScope_SetCursorVtx(pauseCtx, sp216 * 4, pauseCtx->questVtx); if ((pauseCtx->state == 6) && (pauseCtx->unk_1E4 == 0) && (pauseCtx->cursorSpecialPos == 0)) { @@ -215,7 +212,7 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx } } } else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) { - if (pauseCtx->stickRelX > 30) { + if ((pauseCtx->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { pauseCtx->cursorPoint[PAUSE_QUEST] = 0x15; pauseCtx->nameDisplayTimer = 0; pauseCtx->cursorSpecialPos = 0; @@ -232,7 +229,7 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx pauseCtx->cursorSlot[pauseCtx->pageIndex] = sp216; } } else { - if (pauseCtx->stickRelX < -30) { + if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { pauseCtx->cursorPoint[PAUSE_QUEST] = 0; pauseCtx->nameDisplayTimer = 0; pauseCtx->cursorSpecialPos = 0; diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c index 3c236637b..52019dcb2 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c @@ -140,6 +140,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) { s16 cursorX; s16 cursorY; volatile s16 oldCursorPoint; + bool dpad = CVar_GetS32("gDpadPauseName", 0); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_kaleido_equipment.c", 219); @@ -174,7 +175,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) { cursorMoveResult = 0; while (cursorMoveResult == 0) { - if (pauseCtx->stickRelX < -30) { + if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { if (pauseCtx->cursorX[PAUSE_EQUIP] != 0) { pauseCtx->cursorX[PAUSE_EQUIP] -= 1; pauseCtx->cursorPoint[PAUSE_EQUIP] -= 1; @@ -216,7 +217,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) { cursorMoveResult = 3; } } - } else if (pauseCtx->stickRelX > 30) { + } else if ((pauseCtx->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { if (pauseCtx->cursorX[PAUSE_EQUIP] < 3) { pauseCtx->cursorX[PAUSE_EQUIP] += 1; pauseCtx->cursorPoint[PAUSE_EQUIP] += 1; @@ -264,7 +265,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) { cursorMoveResult = 0; while (cursorMoveResult == 0) { - if (pauseCtx->stickRelY > 30) { + if ((pauseCtx->stickRelY > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) { if (pauseCtx->cursorY[PAUSE_EQUIP] != 0) { pauseCtx->cursorY[PAUSE_EQUIP] -= 1; pauseCtx->cursorPoint[PAUSE_EQUIP] -= 4; @@ -286,7 +287,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) { pauseCtx->cursorPoint[PAUSE_EQUIP] = cursorPoint; cursorMoveResult = 3; } - } else if (pauseCtx->stickRelY < -30) { + } else if ((pauseCtx->stickRelY < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DDOWN))) { if (pauseCtx->cursorY[PAUSE_EQUIP] < 3) { pauseCtx->cursorY[PAUSE_EQUIP] += 1; pauseCtx->cursorPoint[PAUSE_EQUIP] += 4; @@ -309,7 +310,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) { } } } else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) { - if (pauseCtx->stickRelX > 30) { + if ((pauseCtx->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { pauseCtx->nameDisplayTimer = 0; pauseCtx->cursorSpecialPos = 0; @@ -356,7 +357,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) { } } } else { - if (pauseCtx->stickRelX < -30) { + if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { pauseCtx->nameDisplayTimer = 0; pauseCtx->cursorSpecialPos = 0; Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c index bb42ff711..d39a90e16 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c @@ -96,6 +96,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) { s16 cursorY; s16 oldCursorPoint; s16 moveCursorResult; + bool dpad = CVar_GetS32("gDpadPauseName", 0); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_kaleido_item.c", 234); @@ -120,7 +121,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) { pauseCtx->stickRelX = 40; } - if (ABS(pauseCtx->stickRelX) > 30) { + if ((ABS(pauseCtx->stickRelX) > 30) || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DLEFT | BTN_DRIGHT))) { cursorPoint = pauseCtx->cursorPoint[PAUSE_ITEM]; cursorX = pauseCtx->cursorX[PAUSE_ITEM]; cursorY = pauseCtx->cursorY[PAUSE_ITEM]; @@ -132,7 +133,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) { if (gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]]) {} while (moveCursorResult == 0) { - if (pauseCtx->stickRelX < -30) { + if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { if (pauseCtx->cursorX[PAUSE_ITEM] != 0) { pauseCtx->cursorX[PAUSE_ITEM] -= 1; pauseCtx->cursorPoint[PAUSE_ITEM] -= 1; @@ -164,7 +165,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) { moveCursorResult = 2; } } - } else if (pauseCtx->stickRelX > 30) { + } else if ((pauseCtx->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { if (pauseCtx->cursorX[PAUSE_ITEM] < 5) { pauseCtx->cursorX[PAUSE_ITEM] += 1; pauseCtx->cursorPoint[PAUSE_ITEM] += 1; @@ -208,7 +209,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) { cursorItem, pauseCtx->cursorSpecialPos); } } else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) { - if (pauseCtx->stickRelX > 30) { + if ((pauseCtx->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { pauseCtx->nameDisplayTimer = 0; pauseCtx->cursorSpecialPos = 0; @@ -242,7 +243,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) { } } } else { - if (pauseCtx->stickRelX < -30) { + if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { pauseCtx->nameDisplayTimer = 0; pauseCtx->cursorSpecialPos = 0; @@ -280,13 +281,13 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) { if (pauseCtx->cursorSpecialPos == 0) { if (cursorItem != PAUSE_ITEM_NONE) { - if (ABS(pauseCtx->stickRelY) > 30) { + if ((ABS(pauseCtx->stickRelY) > 30) || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP))) { moveCursorResult = 0; cursorPoint = pauseCtx->cursorPoint[PAUSE_ITEM]; cursorY = pauseCtx->cursorY[PAUSE_ITEM]; while (moveCursorResult == 0) { - if (pauseCtx->stickRelY > 30) { + if ((pauseCtx->stickRelY > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) { if (pauseCtx->cursorY[PAUSE_ITEM] != 0) { pauseCtx->cursorY[PAUSE_ITEM] -= 1; pauseCtx->cursorPoint[PAUSE_ITEM] -= 6; @@ -300,7 +301,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) { moveCursorResult = 2; } - } else if (pauseCtx->stickRelY < -30) { + } else if ((pauseCtx->stickRelY < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DDOWN))) { if (pauseCtx->cursorY[PAUSE_ITEM] < 3) { pauseCtx->cursorY[PAUSE_ITEM] += 1; pauseCtx->cursorPoint[PAUSE_ITEM] += 6; diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c index af5c2b424..022fdd41d 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c @@ -36,6 +36,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC static u16 mapBgPulseStage = 0; InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx; PauseContext* pauseCtx = &globalCtx->pauseCtx; + Input* input = &globalCtx->state.input[0]; s16 i; s16 j; s16 oldCursorPoint; @@ -43,6 +44,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC s16 stepG; s16 stepB; u16 rgba16; + bool dpad = CVar_GetS32("gDpadPauseName", 0); OPEN_DISPS(gfxCtx, "../z_kaleido_map_PAL.c", 123); @@ -51,7 +53,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC oldCursorPoint = pauseCtx->cursorPoint[PAUSE_MAP]; if (pauseCtx->cursorSpecialPos == 0) { - if (pauseCtx->stickRelX > 30) { + if ((pauseCtx->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { if (pauseCtx->cursorX[PAUSE_MAP] != 0) { KaleidoScope_MoveCursorToSpecialPos(globalCtx, PAUSE_CURSOR_PAGE_RIGHT); } else { @@ -67,7 +69,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC } } } - } else if (pauseCtx->stickRelX < -30) { + } else if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { if (pauseCtx->cursorX[PAUSE_MAP] == 0) { KaleidoScope_MoveCursorToSpecialPos(globalCtx, PAUSE_CURSOR_PAGE_LEFT); } else { @@ -82,7 +84,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC } if (pauseCtx->cursorPoint[PAUSE_MAP] < 3) { - if (pauseCtx->stickRelY > 30) { + if ((pauseCtx->stickRelY > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) { if (pauseCtx->cursorPoint[PAUSE_MAP] != 0) { for (i = pauseCtx->cursorPoint[PAUSE_MAP] - 1; i >= 0; i--) { if (CHECK_DUNGEON_ITEM(i, gSaveContext.mapIndex)) { @@ -92,7 +94,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC } } } else { - if (pauseCtx->stickRelY < -30) { + if ((pauseCtx->stickRelY < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DDOWN))) { if (pauseCtx->cursorPoint[PAUSE_MAP] != 2) { for (i = pauseCtx->cursorPoint[PAUSE_MAP] + 1; i < 3; i++) { if (CHECK_DUNGEON_ITEM(i, gSaveContext.mapIndex)) { @@ -104,7 +106,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC } } } else { - if (pauseCtx->stickRelY > 30) { + if ((pauseCtx->stickRelY > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) { if (pauseCtx->cursorPoint[PAUSE_MAP] >= 4) { for (i = pauseCtx->cursorPoint[PAUSE_MAP] - 3 - 1; i >= 0; i--) { if ((gSaveContext.sceneFlags[gSaveContext.mapIndex].floors & gBitFlags[i]) || @@ -115,7 +117,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC } } } - } else if (pauseCtx->stickRelY < -30) { + } else if ((pauseCtx->stickRelY < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DDOWN))) { if (pauseCtx->cursorPoint[PAUSE_MAP] != 10) { for (i = pauseCtx->cursorPoint[PAUSE_MAP] - 3 + 1; i < 11; i++) { if ((gSaveContext.sceneFlags[gSaveContext.mapIndex].floors & gBitFlags[i]) || @@ -138,7 +140,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC } } } else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) { - if (pauseCtx->stickRelX > 30) { + if ((pauseCtx->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { pauseCtx->nameDisplayTimer = 0; pauseCtx->cursorSpecialPos = 0; pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->dungeonMapSlot; @@ -148,7 +150,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); } } else { - if (pauseCtx->stickRelX < -30) { + if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { pauseCtx->nameDisplayTimer = 0; pauseCtx->cursorSpecialPos = 0; pauseCtx->cursorX[PAUSE_MAP] = 1; @@ -396,6 +398,7 @@ void KaleidoScope_DrawWorldMap(GlobalContext* globalCtx, GraphicsContext* gfxCtx }; static u16 D_8082A6D4 = 0; PauseContext* pauseCtx = &globalCtx->pauseCtx; + Input* input = &globalCtx->state.input[0]; s16 i; s16 j; s16 t; @@ -404,6 +407,7 @@ void KaleidoScope_DrawWorldMap(GlobalContext* globalCtx, GraphicsContext* gfxCtx s16 stepR; s16 stepG; s16 stepB; + bool dpad = CVar_GetS32("gDpadPauseName", 0); OPEN_DISPS(gfxCtx, "../z_kaleido_map_PAL.c", 556); @@ -412,7 +416,7 @@ void KaleidoScope_DrawWorldMap(GlobalContext* globalCtx, GraphicsContext* gfxCtx oldCursorPoint = pauseCtx->cursorPoint[PAUSE_WORLD_MAP]; if (pauseCtx->cursorSpecialPos == 0) { - if (pauseCtx->stickRelX > 30) { + if ((pauseCtx->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { D_8082A6D4 = 0; do { @@ -423,7 +427,7 @@ void KaleidoScope_DrawWorldMap(GlobalContext* globalCtx, GraphicsContext* gfxCtx break; } } while (pauseCtx->worldMapPoints[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]] == 0); - } else if (pauseCtx->stickRelX < -30) { + } else if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { D_8082A6D4 = 0; do { @@ -444,7 +448,7 @@ void KaleidoScope_DrawWorldMap(GlobalContext* globalCtx, GraphicsContext* gfxCtx } else { pauseCtx->cursorItem[PAUSE_MAP] = gSaveContext.worldMapArea + 0x18; if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) { - if (pauseCtx->stickRelX > 30) { + if ((pauseCtx->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 0; pauseCtx->cursorSpecialPos = 0; @@ -459,7 +463,7 @@ void KaleidoScope_DrawWorldMap(GlobalContext* globalCtx, GraphicsContext* gfxCtx D_8082A6D4 = 0; } } else { - if (pauseCtx->stickRelX < -30) { + if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 11; pauseCtx->cursorSpecialPos = 0; @@ -663,7 +667,7 @@ void KaleidoScope_DrawWorldMap(GlobalContext* globalCtx, GraphicsContext* gfxCtx gDPLoadTextureBlock(POLY_KAL_DISP++, gWorldMapDotTex, G_IM_FMT_IA, G_IM_SIZ_8b, 8, 8, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - for (j = i = 0; i < 12; i++, t++, j += 4) { + for (j = t = i = 0; i < 12; i++, t++, j += 4) { if (pauseCtx->worldMapPoints[i] != 0) { gDPPipeSync(POLY_KAL_DISP++); diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_prompt.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_prompt.c index c16404fb2..bfb4897d8 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_prompt.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_prompt.c @@ -7,12 +7,13 @@ void KaleidoScope_UpdatePrompt(GlobalContext* globalCtx) { Input* input = &globalCtx->state.input[0]; s8 relStickX = input->rel.stick_x; s16 step; + bool dpad = CVar_GetS32("gDpadPauseName", 0); if (((pauseCtx->state == 7) && (pauseCtx->unk_1EC == 1)) || (pauseCtx->state == 0xE) || (pauseCtx->state == 0x10)) { - if ((pauseCtx->promptChoice == 0) && (relStickX >= 30)) { + if ((pauseCtx->promptChoice == 0) && ((relStickX >= 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)))) { Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); pauseCtx->promptChoice = 4; - } else if ((pauseCtx->promptChoice != 0) && (relStickX <= -30)) { + } else if ((pauseCtx->promptChoice != 0) && ((relStickX <= -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT)))) { Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); pauseCtx->promptChoice = 0; } diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c index 140aa7734..9db5399a4 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c @@ -936,8 +936,9 @@ void KaleidoScope_HandlePageToggles(PauseContext* pauseCtx, Input* input) { return; } + bool dpad = CVar_GetS32("gDpadPauseName", 0); if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) { - if (pauseCtx->stickRelX < -30) { + if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { pauseCtx->pageSwitchTimer++; if ((pauseCtx->pageSwitchTimer >= 10) || (pauseCtx->pageSwitchTimer == 0)) { KaleidoScope_SwitchPage(pauseCtx, 0); @@ -946,7 +947,7 @@ void KaleidoScope_HandlePageToggles(PauseContext* pauseCtx, Input* input) { pauseCtx->pageSwitchTimer = -1; } } else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_RIGHT) { - if (pauseCtx->stickRelX > 30) { + if ((pauseCtx->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { pauseCtx->pageSwitchTimer++; if ((pauseCtx->pageSwitchTimer >= 10) || (pauseCtx->pageSwitchTimer == 0)) { KaleidoScope_SwitchPage(pauseCtx, 2); From 9a7c63c46cfcb3531c8ae1c0a555b4978556537f Mon Sep 17 00:00:00 2001 From: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> Date: Sat, 2 Apr 2022 13:47:22 +0200 Subject: [PATCH 035/146] Allocate aligned heaps --- soh/include/functions.h | 3 +++ soh/include/variables.h | 4 ++-- soh/src/buffers/heaps.c | 45 +++++++++++++++++++++++++++++++++++++---- soh/src/code/main.c | 3 +++ 4 files changed, 49 insertions(+), 6 deletions(-) diff --git a/soh/include/functions.h b/soh/include/functions.h index 060022ac9..a4b1a9a99 100644 --- a/soh/include/functions.h +++ b/soh/include/functions.h @@ -2397,6 +2397,9 @@ void FileChoose_Destroy(GameState* thisx); char* SetQuote(); +void Heaps_Alloc(void); +void Heaps_Free(void); + #ifdef __cplusplus }; #endif diff --git a/soh/include/variables.h b/soh/include/variables.h index 80e3b792d..b58166b60 100644 --- a/soh/include/variables.h +++ b/soh/include/variables.h @@ -237,8 +237,8 @@ extern void(*D_801755D0)(void); extern u8 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE]; // 0xC00 bytes extern u8 gGfxSPTaskStack[0x400]; // 0x400 bytes extern GfxPool gGfxPools[2]; // 0x24820 bytes - extern u8 gAudioHeap[0x38000]; // 0x38000 bytes - extern u8 gSystemHeap[]; + extern u8* gAudioHeap; + extern u8* gSystemHeap; #ifdef __cplusplus }; diff --git a/soh/src/buffers/heaps.c b/soh/src/buffers/heaps.c index 4309acd18..6d162bc9e 100644 --- a/soh/src/buffers/heaps.c +++ b/soh/src/buffers/heaps.c @@ -1,7 +1,44 @@ #include "z64.h" +#include +#include -// 0x38000 bytes -u8 gAudioHeap[0x38000]; +#ifndef _MSC_VER +#include +#endif -//u8 gSystemHeap[UNK_SIZE]; -u8 gSystemHeap[1024 * 1024 * 128]; +#define AUDIO_HEAP_SIZE 0x38000 +#define SYSTEM_HEAP_SIZE (1024 * 1024 * 128) + +u8* gAudioHeap; + +u8* gSystemHeap; + +void Heaps_Alloc(void) +{ +#ifdef _MSC_VER + gAudioHeap = (u8*)_aligned_malloc(AUDIO_HEAP_SIZE, 16); + gSystemHeap = (u8*)_aligned_malloc(SYSTEM_HEAP_SIZE, 16); +#elif defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200112L) + if (posix_memalign((void**)&gAudioHeap, 16, AUDIO_HEAP_SIZE) != 0) + gAudioHeap = NULL; + if (posix_memalign((void**)&gSystemHeap, 16, SYSTEM_HEAP_SIZE) != 0) + gSystemHeap = NULL; +#else + gAudioHeap = (u8*)memalign(16, AUDIO_HEAP_SIZE); + gSystemHeap = (u8*)memalign(16, SYSTEM_HEAP_SIZE); +#endif + + assert(gAudioHeap != NULL); + assert(gSystemHeap != NULL); +} + +void Heaps_Free(void) +{ +#ifdef _MSC_VER + _aligned_free(gAudioHeap); + _aligned_free(gSystemHeap); +#else + free(gAudioHeap); + free(gSystemHeap); +#endif +} diff --git a/soh/src/code/main.c b/soh/src/code/main.c index eaaa7b388..0680aad3e 100644 --- a/soh/src/code/main.c +++ b/soh/src/code/main.c @@ -63,6 +63,7 @@ void Main(void* arg) { PreNmiBuff_Init(gAppNmiBufferPtr); Fault_Init(); SysCfb_Init(0); + Heaps_Alloc(); sysHeap = gSystemHeap; fb = SysCfb_GetFbPtr(0); gSystemHeapSize = 1024 * 1024 * 4; @@ -131,4 +132,6 @@ void Main(void* arg) { osDestroyThread(&sGraphThread); func_800FBFD8(); osSyncPrintf("mainproc 実行終了\n"); // "End of execution" + + Heaps_Free(); } From beb454d0002c9e6ef5c7f708ae7f088c15aa59eb Mon Sep 17 00:00:00 2001 From: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> Date: Mon, 11 Apr 2022 19:46:42 +0200 Subject: [PATCH 036/146] Formatting fixes --- soh/src/buffers/heaps.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/soh/src/buffers/heaps.c b/soh/src/buffers/heaps.c index 6d162bc9e..d09f86e72 100644 --- a/soh/src/buffers/heaps.c +++ b/soh/src/buffers/heaps.c @@ -10,22 +10,21 @@ #define SYSTEM_HEAP_SIZE (1024 * 1024 * 128) u8* gAudioHeap; - u8* gSystemHeap; void Heaps_Alloc(void) { #ifdef _MSC_VER - gAudioHeap = (u8*)_aligned_malloc(AUDIO_HEAP_SIZE, 16); - gSystemHeap = (u8*)_aligned_malloc(SYSTEM_HEAP_SIZE, 16); + gAudioHeap = (u8*)_aligned_malloc(AUDIO_HEAP_SIZE, 0x10); + gSystemHeap = (u8*)_aligned_malloc(SYSTEM_HEAP_SIZE, 0x10); #elif defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200112L) - if (posix_memalign((void**)&gAudioHeap, 16, AUDIO_HEAP_SIZE) != 0) + if (posix_memalign((void**)&gAudioHeap, 0x10, AUDIO_HEAP_SIZE) != 0) gAudioHeap = NULL; - if (posix_memalign((void**)&gSystemHeap, 16, SYSTEM_HEAP_SIZE) != 0) + if (posix_memalign((void**)&gSystemHeap, 0x10, SYSTEM_HEAP_SIZE) != 0) gSystemHeap = NULL; #else - gAudioHeap = (u8*)memalign(16, AUDIO_HEAP_SIZE); - gSystemHeap = (u8*)memalign(16, SYSTEM_HEAP_SIZE); + gAudioHeap = (u8*)memalign(0x10, AUDIO_HEAP_SIZE); + gSystemHeap = (u8*)memalign(0x10, SYSTEM_HEAP_SIZE); #endif assert(gAudioHeap != NULL); From 03a5c7ed29db889344a8275c4c0a8c7ae1480779 Mon Sep 17 00:00:00 2001 From: Josh Bodner <30329717+jbodner09@users.noreply.github.com> Date: Mon, 11 Apr 2022 14:06:55 -0700 Subject: [PATCH 037/146] Added DPad support to ocarina and text prompts (#137) * Added DPad support to ocarina playing and text choice selection. * Wrap changes in CVar * Fix mapping not updating if CVar is changed in-game * Remove unnecessary const_cast * Fixed transparent texture making framebuffers also transparent in D3D11. (#84) This happened with the Mirror Shield in the inventory screen preview. * Add save editor * Added DPad support to ocarina playing and text choice selection. * Fixing rebase conflict * Fix mapping not updating if CVar is changed in-game * Remove unnecessary const_cast * Added DPad support to file selection and pause screens (#124) * Added DPad support to file selection and pause screens * Wrap changes behind CVar * Fix merge conflict for real * Remove unnecessary const_cast * Fixed transparent texture making framebuffers also transparent in D3D11. (#84) This happened with the Mirror Shield in the inventory screen preview. * Add save editor * Added DPad support to file selection and pause screens * Fixing rebase conflict * Remove unnecessary const_cast Co-authored-by: MaikelChan Co-authored-by: rozlette * Added DPad support to ocarina playing and text choice selection. * Fixing rebase conflict again * Fix mapping not updating if CVar is changed in-game Co-authored-by: MaikelChan Co-authored-by: rozlette --- libultraship/libultraship/GameSettings.cpp | 4 ++ libultraship/libultraship/GameSettings.h | 1 + libultraship/libultraship/SohImGuiImpl.cpp | 5 +++ soh/src/code/code_800EC960.c | 46 +++++++++++++--------- soh/src/code/z_message_PAL.c | 7 ++-- 5 files changed, 41 insertions(+), 22 deletions(-) diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index 28f4b23cb..c3294d9e3 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -92,6 +92,9 @@ namespace Game { Settings.controller.dpad_pause_name = stob(Conf[ControllerSection]["dpad_pause_name"]); CVar_SetS32("gDpadPauseName", Settings.controller.dpad_pause_name); + + Settings.controller.dpad_ocarina_text = stob(Conf[ControllerSection]["dpad_ocarina_text"]); + CVar_SetS32("gDpadOcarinaText", Settings.controller.dpad_ocarina_text); // Cheats Settings.cheats.debug_mode = stob(Conf[CheatSection]["debug_mode"]); @@ -153,6 +156,7 @@ namespace Game { Conf[ControllerSection]["input_scale"] = std::to_string(Settings.controller.input_scale); Conf[ControllerSection]["input_enabled"] = std::to_string(Settings.controller.input_enabled); Conf[ControllerSection]["dpad_pause_name"] = std::to_string(Settings.controller.dpad_pause_name); + Conf[ControllerSection]["dpad_ocarina_text"] = std::to_string(Settings.controller.dpad_ocarina_text); // Cheats Conf[CheatSection]["debug_mode"] = std::to_string(Settings.cheats.debug_mode); diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index 15ebdad16..8e1293c65 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -35,6 +35,7 @@ struct SoHConfigType { float gyroDriftY = 0.0f; bool input_enabled = false; bool dpad_pause_name = false; + bool dpad_ocarina_text = false; } controller; // Cheats diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index cef156246..7bdf4859a 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -360,6 +360,11 @@ namespace SohImGui { needs_save = true; } + if (ImGui::Checkbox("DPad Support in Ocarina and Text Choice", &Game::Settings.controller.dpad_ocarina_text)) { + CVar_SetS32("gDpadOcarinaText", Game::Settings.controller.dpad_ocarina_text); + needs_save = true; + } + ImGui::EndMenu(); } diff --git a/soh/src/code/code_800EC960.c b/soh/src/code/code_800EC960.c index 5efa93167..23d1ba375 100644 --- a/soh/src/code/code_800EC960.c +++ b/soh/src/code/code_800EC960.c @@ -824,10 +824,12 @@ NatureAmbienceDataIO sNatureAmbienceDataIO[20] = { }, }; -u32 sOcarinaAllowedBtnMask = 0x800F; -s32 sOcarinaABtnMap = 0x8000; -s32 sOcarinaCUPBtnMap = 8; -s32 sOcarinaCDownBtnMap = 4; +u32 sOcarinaAllowedBtnMask = (BTN_A | BTN_CUP | BTN_CDOWN | BTN_CLEFT | BTN_CRIGHT); +s32 sOcarinaABtnMap = BTN_A; +s32 sOcarinaCUPBtnMap = BTN_CUP; +s32 sOcarinaCDownBtnMap = BTN_CDOWN; +s32 sOcarinaCLeftBtnMap = BTN_CLEFT; +s32 sOcarinaCRightBtnMap = BTN_CRIGHT; u8 sOcarinaInpEnabled = 0; s8 D_80130F10 = 0; // "OCA", ocarina active? u8 sCurOcarinaBtnVal = 0xFF; @@ -1245,19 +1247,23 @@ void func_800F56A8(void); void Audio_PlayNatureAmbienceSequence(u8 natureAmbienceId); s32 Audio_SetGanonDistVol(u8 targetVol); -void func_800EC960(u8 custom) { - if (!custom) { - osSyncPrintf("AUDIO : Ocarina Control Assign Normal\n"); +// Function originally not called, so repurposing for DPad input +void func_800EC960(u8 dpad) { + if (dpad) { + sOcarinaAllowedBtnMask = + (BTN_A | BTN_CUP | BTN_CDOWN | BTN_CLEFT | BTN_CRIGHT | BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT); + sOcarinaABtnMap = BTN_A; + sOcarinaCUPBtnMap = BTN_CUP | BTN_DUP; + sOcarinaCDownBtnMap = BTN_CDOWN | BTN_DDOWN; + sOcarinaCLeftBtnMap = BTN_CLEFT | BTN_DLEFT; + sOcarinaCRightBtnMap = BTN_CRIGHT | BTN_DRIGHT; + } else { sOcarinaAllowedBtnMask = (BTN_A | BTN_CUP | BTN_CDOWN | BTN_CLEFT | BTN_CRIGHT); sOcarinaABtnMap = BTN_A; sOcarinaCUPBtnMap = BTN_CUP; sOcarinaCDownBtnMap = BTN_CDOWN; - } else { - osSyncPrintf("AUDIO : Ocarina Control Assign Custom\n"); - sOcarinaAllowedBtnMask = (BTN_A | BTN_B | BTN_CDOWN | BTN_CLEFT | BTN_CRIGHT); - sOcarinaABtnMap = BTN_B; - sOcarinaCUPBtnMap = BTN_CDOWN; - sOcarinaCDownBtnMap = BTN_A; + sOcarinaCLeftBtnMap = BTN_CLEFT; + sOcarinaCRightBtnMap = BTN_CRIGHT; } } @@ -1542,6 +1548,7 @@ void func_800ED200(void) { void func_800ED458(s32 arg0) { u32 phi_v1_2; + bool dpad = CVar_GetS32("gDpadOcarinaText", 0); if (D_80130F3C != 0 && D_80131880 != 0) { D_80131880--; @@ -1561,6 +1568,7 @@ void func_800ED458(s32 arg0) { D_8016BA18 &= phi_v1_2; } + func_800EC960(dpad); if (D_8016BA18 & sOcarinaABtnMap) { osSyncPrintf("Presss NA_KEY_D4 %08x\n", sOcarinaABtnMap); sCurOcarinaBtnVal = 2; @@ -1569,12 +1577,12 @@ void func_800ED458(s32 arg0) { osSyncPrintf("Presss NA_KEY_F4 %08x\n", sOcarinaCDownBtnMap); sCurOcarinaBtnVal = 5; sCurOcarinaBtnIdx = 1; - } else if (D_8016BA18 & 1) { - osSyncPrintf("Presss NA_KEY_A4 %08x\n", 1); + } else if (D_8016BA18 & sOcarinaCRightBtnMap) { + osSyncPrintf("Presss NA_KEY_A4 %08x\n", sOcarinaCRightBtnMap); sCurOcarinaBtnVal = 9; sCurOcarinaBtnIdx = 2; - } else if (D_8016BA18 & 2) { - osSyncPrintf("Presss NA_KEY_B4 %08x\n", 2); + } else if (D_8016BA18 & sOcarinaCLeftBtnMap) { + osSyncPrintf("Presss NA_KEY_B4 %08x\n", sOcarinaCRightBtnMap); sCurOcarinaBtnVal = 0xB; sCurOcarinaBtnIdx = 3; } else if (D_8016BA18 & sOcarinaCUPBtnMap) { @@ -1671,7 +1679,7 @@ void Audio_OcaSetSongPlayback(s8 songIdxPlusOne, s8 playbackState) { void Audio_OcaPlayback(void) { u32 noteTimerStep; - u32 nextNoteTimerStep; + u32 nextNoteTimerStep = 0; if (sPlaybackState != 0) { if (sStaffPlaybackPos == 0) { @@ -4772,7 +4780,7 @@ void Audio_SetCodeReverb(s8 reverb) { } void func_800F6700(s8 arg0) { - s8 sp1F; + s8 sp1F = 0; switch (arg0) { case 0: diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c index 4979f047c..43b0fcc12 100644 --- a/soh/src/code/z_message_PAL.c +++ b/soh/src/code/z_message_PAL.c @@ -203,8 +203,9 @@ void Message_HandleChoiceSelection(GlobalContext* globalCtx, u8 numChoices) { static s16 sAnalogStickHeld = false; MessageContext* msgCtx = &globalCtx->msgCtx; Input* input = &globalCtx->state.input[0]; + bool dpad = CVar_GetS32("gDpadOcarinaText", 0); - if (input->rel.stick_y >= 30 && !sAnalogStickHeld) { + if ((input->rel.stick_y >= 30 && !sAnalogStickHeld) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) { sAnalogStickHeld = true; msgCtx->choiceIndex--; if (msgCtx->choiceIndex > 128) { @@ -212,7 +213,7 @@ void Message_HandleChoiceSelection(GlobalContext* globalCtx, u8 numChoices) { } else { Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); } - } else if (input->rel.stick_y <= -30 && !sAnalogStickHeld) { + } else if ((input->rel.stick_y <= -30 && !sAnalogStickHeld) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DDOWN))) { sAnalogStickHeld = true; msgCtx->choiceIndex++; if (msgCtx->choiceIndex > numChoices) { @@ -3032,7 +3033,7 @@ void Message_Update(GlobalContext* globalCtx) { Input* input = &globalCtx->state.input[0]; s16 var; s16 focusScreenPosX; - s16 averageY; + s16 averageY = 0; s16 playerFocusScreenPosY; s16 actorFocusScreenPosY; From e16481933965a46dd2f2a9394394193cab27a5bf Mon Sep 17 00:00:00 2001 From: Josh Bodner <30329717+jbodner09@users.noreply.github.com> Date: Tue, 12 Apr 2022 18:38:08 -0700 Subject: [PATCH 038/146] Added DPad support to shops (#139) * Added DPad support to shops * Wrap changes in CVar * Remove unnesseccary const_cast * Fixed transparent texture making framebuffers also transparent in D3D11. (#84) This happened with the Mirror Shield in the inventory screen preview. * Add save editor * Added DPad support to shops * Fixing rebase conflict * Remove unnesseccary const_cast * Added DPad support to file selection and pause screens (#124) * Added DPad support to file selection and pause screens * Wrap changes behind CVar * Fix merge conflict for real * Remove unnecessary const_cast * Fixed transparent texture making framebuffers also transparent in D3D11. (#84) This happened with the Mirror Shield in the inventory screen preview. * Add save editor * Added DPad support to file selection and pause screens * Fixing rebase conflict * Remove unnecessary const_cast Co-authored-by: MaikelChan Co-authored-by: rozlette * Added DPad support to shops * Fixing rebase conflict again * Allocate aligned heaps * Formatting fixes * Added DPad support to ocarina and text prompts (#137) * Added DPad support to ocarina playing and text choice selection. * Wrap changes in CVar * Fix mapping not updating if CVar is changed in-game * Remove unnecessary const_cast * Fixed transparent texture making framebuffers also transparent in D3D11. (#84) This happened with the Mirror Shield in the inventory screen preview. * Add save editor * Added DPad support to ocarina playing and text choice selection. * Fixing rebase conflict * Fix mapping not updating if CVar is changed in-game * Remove unnecessary const_cast * Added DPad support to file selection and pause screens (#124) * Added DPad support to file selection and pause screens * Wrap changes behind CVar * Fix merge conflict for real * Remove unnecessary const_cast * Fixed transparent texture making framebuffers also transparent in D3D11. (#84) This happened with the Mirror Shield in the inventory screen preview. * Add save editor * Added DPad support to file selection and pause screens * Fixing rebase conflict * Remove unnecessary const_cast Co-authored-by: MaikelChan Co-authored-by: rozlette * Added DPad support to ocarina playing and text choice selection. * Fixing rebase conflict again * Fix mapping not updating if CVar is changed in-game Co-authored-by: MaikelChan Co-authored-by: rozlette * Added DPad support to shops * Fixing rebase conflict for the last time * Totally Fixing rebase conflict again I promise * This has to be the last time I fix this rebase conflict Co-authored-by: MaikelChan Co-authored-by: rozlette Co-authored-by: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> --- libultraship/libultraship/GameSettings.cpp | 4 ++ libultraship/libultraship/GameSettings.h | 1 + libultraship/libultraship/SohImGuiImpl.cpp | 5 +++ .../overlays/actors/ovl_En_Ossan/z_en_ossan.c | 38 +++++++++++-------- 4 files changed, 33 insertions(+), 15 deletions(-) diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index c3294d9e3..678555c7d 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -95,6 +95,9 @@ namespace Game { Settings.controller.dpad_ocarina_text = stob(Conf[ControllerSection]["dpad_ocarina_text"]); CVar_SetS32("gDpadOcarinaText", Settings.controller.dpad_ocarina_text); + + Settings.controller.dpad_shop = stob(Conf[ControllerSection]["dpad_shop"]); + CVar_SetS32("gDpadShop", Settings.controller.dpad_shop); // Cheats Settings.cheats.debug_mode = stob(Conf[CheatSection]["debug_mode"]); @@ -157,6 +160,7 @@ namespace Game { Conf[ControllerSection]["input_enabled"] = std::to_string(Settings.controller.input_enabled); Conf[ControllerSection]["dpad_pause_name"] = std::to_string(Settings.controller.dpad_pause_name); Conf[ControllerSection]["dpad_ocarina_text"] = std::to_string(Settings.controller.dpad_ocarina_text); + Conf[ControllerSection]["dpad_shop"] = std::to_string(Settings.controller.dpad_shop); // Cheats Conf[CheatSection]["debug_mode"] = std::to_string(Settings.cheats.debug_mode); diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index 8e1293c65..17079c9bf 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -36,6 +36,7 @@ struct SoHConfigType { bool input_enabled = false; bool dpad_pause_name = false; bool dpad_ocarina_text = false; + bool dpad_shop = false; } controller; // Cheats diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 7bdf4859a..9ba3184d8 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -365,6 +365,11 @@ namespace SohImGui { needs_save = true; } + if (ImGui::Checkbox("DPad Support for Browsing Shop Items", &Game::Settings.controller.dpad_shop)) { + CVar_SetS32("gDpadShop", Game::Settings.controller.dpad_shop); + needs_save = true; + } + ImGui::EndMenu(); } diff --git a/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c b/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c index 04975d910..4d5fefec6 100644 --- a/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c +++ b/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c @@ -948,7 +948,9 @@ s32 EnOssan_FacingShopkeeperDialogResult(EnOssan* this, GlobalContext* globalCtx } void EnOssan_State_FacingShopkeeper(EnOssan* this, GlobalContext* globalCtx, Player* player) { + Input* input = &globalCtx->state.input[0]; u8 nextIndex; + bool dpad = CVar_GetS32("gDpadShop", 0); if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) && !EnOssan_TestEndInteraction(this, globalCtx, &globalCtx->state.input[0])) { @@ -957,7 +959,7 @@ void EnOssan_State_FacingShopkeeper(EnOssan* this, GlobalContext* globalCtx, Pla return; } // Stick Left - if (this->stickAccumX < 0) { + if ((this->stickAccumX < 0) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { nextIndex = EnOssan_SetCursorIndexFromNeutral(this, 4); if (nextIndex != CURSOR_INVALID) { this->cursorIndex = nextIndex; @@ -966,7 +968,7 @@ void EnOssan_State_FacingShopkeeper(EnOssan* this, GlobalContext* globalCtx, Pla this->stickLeftPrompt.isEnabled = false; func_80078884(NA_SE_SY_CURSOR); } - } else if (this->stickAccumX > 0) { + } else if ((this->stickAccumX > 0) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { nextIndex = EnOssan_SetCursorIndexFromNeutral(this, 0); if (nextIndex != CURSOR_INVALID) { this->cursorIndex = nextIndex; @@ -1023,11 +1025,13 @@ void EnOssan_State_LookToRightShelf(EnOssan* this, GlobalContext* globalCtx, Pla } } -void EnOssan_CursorUpDown(EnOssan* this) { +void EnOssan_CursorUpDown(EnOssan* this, GlobalContext* globalCtx) { + Input* input = &globalCtx->state.input[0]; u8 curTemp = this->cursorIndex; u8 curScanTemp; + bool dpad = CVar_GetS32("gDpadShop", 0); - if (this->stickAccumY < 0) { + if ((this->stickAccumY < 0) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DDOWN))) { curTemp &= 0xFE; if (this->shelfSlots[curTemp] != NULL) { this->cursorIndex = curTemp; @@ -1066,7 +1070,7 @@ void EnOssan_CursorUpDown(EnOssan* this) { } } } - } else if (this->stickAccumY > 0) { + } else if ((this->stickAccumY > 0) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) { curTemp |= 1; if (this->shelfSlots[curTemp] != NULL) { this->cursorIndex = curTemp; @@ -1172,11 +1176,13 @@ s32 EnOssan_HasPlayerSelectedItem(GlobalContext* globalCtx, EnOssan* this, Input } void EnOssan_State_BrowseLeftShelf(EnOssan* this, GlobalContext* globalCtx, Player* player) { + Input* input = &globalCtx->state.input[0]; s32 a; s32 b; u8 prevIndex = this->cursorIndex; s32 c; s32 d; + bool dpad = CVar_GetS32("gDpadShop", 0); if (!EnOssan_ReturnItemToShelf(this)) { osSyncPrintf("%s[%d]:" VT_FGCOL(GREEN) "ズーム中ï¼ï¼" VT_RST "\n", "../z_en_oB1.c", 2152); @@ -1193,7 +1199,7 @@ void EnOssan_State_BrowseLeftShelf(EnOssan* this, GlobalContext* globalCtx, Play if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && !EnOssan_HasPlayerSelectedItem(globalCtx, this, &globalCtx->state.input[0])) { if (this->moveHorizontal) { - if (this->stickAccumX > 0) { + if ((this->stickAccumX > 0) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { a = EnOssan_CursorRight(this, this->cursorIndex, 4); if (a != CURSOR_INVALID) { this->cursorIndex = a; @@ -1201,14 +1207,14 @@ void EnOssan_State_BrowseLeftShelf(EnOssan* this, GlobalContext* globalCtx, Play EnOssan_SetLookToShopkeeperFromShelf(globalCtx, this); return; } - } else if (this->stickAccumX < 0) { + } else if ((this->stickAccumX < 0) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { b = EnOssan_CursorLeft(this, this->cursorIndex, 8); if (b != CURSOR_INVALID) { this->cursorIndex = b; } } } else { - if (this->stickAccumX > 0 && this->stickAccumX > 500) { + if ((this->stickAccumX > 0 && this->stickAccumX > 500) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { c = EnOssan_CursorRight(this, this->cursorIndex, 4); if (c != CURSOR_INVALID) { this->cursorIndex = c; @@ -1216,14 +1222,14 @@ void EnOssan_State_BrowseLeftShelf(EnOssan* this, GlobalContext* globalCtx, Play EnOssan_SetLookToShopkeeperFromShelf(globalCtx, this); return; } - } else if (this->stickAccumX < 0 && this->stickAccumX < -500) { + } else if ((this->stickAccumX < 0 && this->stickAccumX < -500) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { d = EnOssan_CursorLeft(this, this->cursorIndex, 8); if (d != CURSOR_INVALID) { this->cursorIndex = d; } } } - EnOssan_CursorUpDown(this); + EnOssan_CursorUpDown(this, globalCtx); if (this->cursorIndex != prevIndex) { Message_ContinueTextbox(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId); func_80078884(NA_SE_SY_CURSOR); @@ -1232,9 +1238,11 @@ void EnOssan_State_BrowseLeftShelf(EnOssan* this, GlobalContext* globalCtx, Play } void EnOssan_State_BrowseRightShelf(EnOssan* this, GlobalContext* globalCtx, Player* player) { + Input* input = &globalCtx->state.input[0]; s32 pad[2]; u8 prevIndex; u8 nextIndex; + bool dpad = CVar_GetS32("gDpadShop", 0); prevIndex = this->cursorIndex; if (!EnOssan_ReturnItemToShelf(this)) { @@ -1252,7 +1260,7 @@ void EnOssan_State_BrowseRightShelf(EnOssan* this, GlobalContext* globalCtx, Pla if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && !EnOssan_HasPlayerSelectedItem(globalCtx, this, &globalCtx->state.input[0])) { if (this->moveHorizontal) { - if (this->stickAccumX < 0) { + if ((this->stickAccumX < 0) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { nextIndex = EnOssan_CursorRight(this, this->cursorIndex, 0); if (nextIndex != CURSOR_INVALID) { this->cursorIndex = nextIndex; @@ -1260,14 +1268,14 @@ void EnOssan_State_BrowseRightShelf(EnOssan* this, GlobalContext* globalCtx, Pla EnOssan_SetLookToShopkeeperFromShelf(globalCtx, this); return; } - } else if (this->stickAccumX > 0) { + } else if ((this->stickAccumX > 0) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { nextIndex = EnOssan_CursorLeft(this, this->cursorIndex, 4); if (nextIndex != CURSOR_INVALID) { this->cursorIndex = nextIndex; } } } else { - if (this->stickAccumX < 0 && this->stickAccumX < -500) { + if ((this->stickAccumX < 0 && this->stickAccumX < -500) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { nextIndex = EnOssan_CursorRight(this, this->cursorIndex, 0); if (nextIndex != CURSOR_INVALID) { this->cursorIndex = nextIndex; @@ -1275,14 +1283,14 @@ void EnOssan_State_BrowseRightShelf(EnOssan* this, GlobalContext* globalCtx, Pla EnOssan_SetLookToShopkeeperFromShelf(globalCtx, this); return; } - } else if (this->stickAccumX > 0 && this->stickAccumX > 500) { + } else if ((this->stickAccumX > 0 && this->stickAccumX > 500) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { nextIndex = EnOssan_CursorLeft(this, this->cursorIndex, 4); if (nextIndex != CURSOR_INVALID) { this->cursorIndex = nextIndex; } } } - EnOssan_CursorUpDown(this); + EnOssan_CursorUpDown(this, globalCtx); if (this->cursorIndex != prevIndex) { Message_ContinueTextbox(globalCtx, this->shelfSlots[this->cursorIndex]->actor.textId); func_80078884(NA_SE_SY_CURSOR); From 0ef2d0c750fec74716d9113a68a4c0181640028d Mon Sep 17 00:00:00 2001 From: rozlette Date: Wed, 13 Apr 2022 23:53:04 -0500 Subject: [PATCH 039/146] Remove leftover debug code (fixes #60) --- soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c index 6f0c3dc30..94ea16422 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c @@ -1274,7 +1274,7 @@ void BossGanondrof_CollisionCheck(BossGanondrof* this, GlobalContext* globalCtx) this->actor.colChkInfo.health -= dmg; } - if ((s8)this->actor.colChkInfo.health <= 0 || 1) { + if ((s8)this->actor.colChkInfo.health <= 0) { BossGanondrof_SetupDeath(this, globalCtx); Enemy_StartFinishingBlow(globalCtx, &this->actor); return; From 1aa08caade5bcb8a840eced6a71a74abddbc81cf Mon Sep 17 00:00:00 2001 From: Sparkling Shampoo Date: Wed, 6 Apr 2022 23:33:32 -0400 Subject: [PATCH 040/146] Prevent cached resource from being acquired while it is being destroyed Fixes #158 --- libultraship/libultraship/ResourceMgr.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libultraship/libultraship/ResourceMgr.cpp b/libultraship/libultraship/ResourceMgr.cpp index e6f3c8a0a..b4d7b76a8 100644 --- a/libultraship/libultraship/ResourceMgr.cpp +++ b/libultraship/libultraship/ResourceMgr.cpp @@ -217,9 +217,12 @@ namespace Ship { std::shared_ptr ResourceMgr::GetCachedFile(std::string FilePath) { auto resCacheFind = ResourceCache.find(FilePath); - - if (resCacheFind != ResourceCache.end()) + + if (resCacheFind != ResourceCache.end() && + resCacheFind->second.use_count() > 0) + { return resCacheFind->second; + } else return nullptr; } From 1dcd24e7e2aad2b22d2bfdb398e3a05e8a808eef Mon Sep 17 00:00:00 2001 From: "Sparkling.Shampoo" <102923452+sparklingshampoo@users.noreply.github.com> Date: Sun, 17 Apr 2022 11:19:45 -0400 Subject: [PATCH 041/146] Fix cylinder-tri intersection for GCC due to FLT_EVAL_METHOD (#157) --- soh/src/code/sys_math3d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/src/code/sys_math3d.c b/soh/src/code/sys_math3d.c index d442b7c4a..39ffea881 100644 --- a/soh/src/code/sys_math3d.c +++ b/soh/src/code/sys_math3d.c @@ -1857,7 +1857,7 @@ s32 Math3D_CylTriVsIntersect(Cylinder16* cyl, TriNorm* tri, Vec3f* intersect) { } } - if (minDistSq != 1.e38f) { + if (minDistSq != (f32)1.e38f) { return true; } From a11038f51555aa57e82ae241fc52e3164e937512 Mon Sep 17 00:00:00 2001 From: Rozelette Date: Sun, 17 Apr 2022 10:24:43 -0500 Subject: [PATCH 042/146] Add flag, equipment, and quest status editors (#164) --- libultraship/libultraship/SohImGuiImpl.cpp | 31 +- libultraship/libultraship/SohImGuiImpl.h | 3 +- soh/soh.vcxproj | 2 + soh/soh.vcxproj.filters | 6 + .../Enhancements/debugger/debugSaveEditor.cpp | 1223 +++++++++++++---- soh/soh/util.cpp | 314 +++++ soh/soh/util.h | 11 + 7 files changed, 1281 insertions(+), 309 deletions(-) create mode 100644 soh/soh/util.cpp create mode 100644 soh/soh/util.h diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 9ba3184d8..b7e6e01ab 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -179,21 +179,46 @@ namespace SohImGui { stbi_image_free(img_data); } - void LoadResource(const std::string& name, const std::string& path) { + void LoadResource(const std::string& name, const std::string& path, const ImVec4& tint) { GfxRenderingAPI* api = gfx_get_current_rendering_api(); const auto res = static_cast(GlobalCtx2::GetInstance()->GetResourceManager()->LoadResource(normalize(path)).get()); - if (res->texType != Ship::TextureType::RGBA32bpp) { + std::vector texBuffer; + texBuffer.reserve(res->width * res->height * 4); + + switch (res->texType) { + case Ship::TextureType::RGBA32bpp: + texBuffer.assign(res->imageData, res->imageData + (res->width * res->height * 4)); + break; + case Ship::TextureType::GrayscaleAlpha8bpp: + for (int32_t i = 0; i < res->width * res->height; i++) { + uint8_t ia = res->imageData[i]; + uint8_t color = ((ia >> 4) & 0xF) * 255 / 15; + uint8_t alpha = (ia & 0xF) * 255 / 15; + texBuffer.push_back(color); + texBuffer.push_back(color); + texBuffer.push_back(color); + texBuffer.push_back(alpha); + } + break; + default: // TODO convert other image types SPDLOG_WARN("SohImGui::LoadResource: Attempting to load unsupporting image type %s", path.c_str()); return; } + for (size_t pixel = 0; pixel < texBuffer.size() / 4; pixel++) { + texBuffer[pixel * 4 + 0] *= tint.x; + texBuffer[pixel * 4 + 1] *= tint.y; + texBuffer[pixel * 4 + 2] *= tint.z; + texBuffer[pixel * 4 + 3] *= tint.w; + } + const auto asset = new GameAsset{ api->new_texture() }; api->select_texture(0, asset->textureId); api->set_sampler_parameters(0, false, 0, 0); - api->upload_texture(res->imageData, res->width, res->height); + api->upload_texture(texBuffer.data(), res->width, res->height); DefaultAssets[name] = asset; } diff --git a/libultraship/libultraship/SohImGuiImpl.h b/libultraship/libultraship/SohImGuiImpl.h index 8275e4735..58dac7a1b 100644 --- a/libultraship/libultraship/SohImGuiImpl.h +++ b/libultraship/libultraship/SohImGuiImpl.h @@ -1,5 +1,6 @@ #pragma once +#include "Lib/ImGui/imgui.h" #include "SohConsole.h" struct GameAsset { @@ -63,7 +64,7 @@ namespace SohImGui { void ShowCursor(bool hide, Dialogues w); void BindCmd(const std::string& cmd, CommandEntry entry); void AddWindow(const std::string& category, const std::string& name, WindowDrawFunc drawFunc); - void LoadResource(const std::string& name, const std::string& path); + void LoadResource(const std::string& name, const std::string& path, const ImVec4& tint = ImVec4(1, 1, 1, 1)); ImTextureID GetTextureByID(int id); ImTextureID GetTextureByName(const std::string& name); } diff --git a/soh/soh.vcxproj b/soh/soh.vcxproj index 5560bde76..adf205f14 100644 --- a/soh/soh.vcxproj +++ b/soh/soh.vcxproj @@ -185,6 +185,7 @@ + @@ -928,6 +929,7 @@ + diff --git a/soh/soh.vcxproj.filters b/soh/soh.vcxproj.filters index de9ad6f96..c31a78b19 100644 --- a/soh/soh.vcxproj.filters +++ b/soh/soh.vcxproj.filters @@ -2181,6 +2181,9 @@ Source Files\soh\Enhancements\debugger + + Source Files\soh + @@ -3728,6 +3731,9 @@ Header Files\soh\Enhancements\debugger + + Header Files\soh + diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp index 95e2f912c..2aaac5a1b 100644 --- a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp +++ b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp @@ -1,6 +1,8 @@ #include "debugSaveEditor.h" +#include "../../util.h" #include "../libultraship/SohImGuiImpl.h" +#include #include #include #include @@ -13,18 +15,20 @@ extern "C" { extern GlobalContext* gGlobalCtx; #include "textures/icon_item_static/icon_item_static.h" +#include "textures/icon_item_24_static/icon_item_24_static.h" } typedef struct { uint32_t id; std::string name; + std::string nameFaded; std::string texturePath; } ItemMapEntry; #define ITEM_MAP_ENTRY(id) \ { \ id, { \ - id, #id, static_cast(gItemIcons[id]) \ + id, #id, #id "_Faded", static_cast(gItemIcons[id]) \ } \ } @@ -120,6 +124,10 @@ std::map itemMapping = { ITEM_MAP_ENTRY(ITEM_WALLET_GIANT), ITEM_MAP_ENTRY(ITEM_SEEDS), ITEM_MAP_ENTRY(ITEM_FISHING_POLE), + ITEM_MAP_ENTRY(ITEM_KEY_BOSS), + ITEM_MAP_ENTRY(ITEM_COMPASS), + ITEM_MAP_ENTRY(ITEM_DUNGEON_MAP), + ITEM_MAP_ENTRY(ITEM_KEY_SMALL), }; // Maps entries in the GS flag array to the area name it represents @@ -147,6 +155,7 @@ std::vector gsMapping = { "Gerudo Fortress", "Desert Colossus, Haunted Wasteland", }; + extern "C" u8 gAreaGsFlags[]; extern "C" u8 gAmmoItems[]; @@ -158,6 +167,63 @@ u8 gAllAmmoItems[] = { ITEM_BOOMERANG, ITEM_LENS, ITEM_BEAN, ITEM_HAMMER, }; +typedef struct { + uint32_t id; + std::string name; + std::string nameFaded; + std::string texturePath; +} QuestMapEntry; + +#define QUEST_MAP_ENTRY(id, tex) \ + { \ + id, { \ + id, #id, #id "_Faded", tex \ + } \ + } + +// Maps quest items ids to info for use in ImGui +std::map questMapping = { + QUEST_MAP_ENTRY(QUEST_MEDALLION_FOREST, gForestMedallionIconTex), + QUEST_MAP_ENTRY(QUEST_MEDALLION_FIRE, gFireMedallionIconTex), + QUEST_MAP_ENTRY(QUEST_MEDALLION_WATER, gWaterMedallionIconTex), + QUEST_MAP_ENTRY(QUEST_MEDALLION_SPIRIT, gSpiritMedallionIconTex), + QUEST_MAP_ENTRY(QUEST_MEDALLION_SHADOW, gShadowMedallionIconTex), + QUEST_MAP_ENTRY(QUEST_MEDALLION_LIGHT, gLightMedallionIconTex), + QUEST_MAP_ENTRY(QUEST_KOKIRI_EMERALD, gKokiriEmeraldIconTex), + QUEST_MAP_ENTRY(QUEST_GORON_RUBY, gGoronRubyIconTex), + QUEST_MAP_ENTRY(QUEST_ZORA_SAPPHIRE, gZoraSapphireIconTex), + QUEST_MAP_ENTRY(QUEST_STONE_OF_AGONY, gStoneOfAgonyIconTex), + QUEST_MAP_ENTRY(QUEST_GERUDO_CARD, gGerudosCardIconTex), +}; + +typedef struct { + uint32_t id; + std::string name; + std::string nameFaded; + ImVec4 color; +} SongMapEntry; + +#define SONG_MAP_ENTRY(id, r, g, b) \ + { \ + id, #id, #id "_Faded", ImVec4(r / 255.0f, g / 255.0f, b / 255.0f, 1.0f) \ + } + +// Maps song ids to info for use in ImGui +std::array songMapping = { { + SONG_MAP_ENTRY(QUEST_SONG_LULLABY, 255, 255, 255), + SONG_MAP_ENTRY(QUEST_SONG_EPONA, 255, 255, 255), + SONG_MAP_ENTRY(QUEST_SONG_SARIA, 255, 255, 255), + SONG_MAP_ENTRY(QUEST_SONG_SUN, 255, 255, 255), + SONG_MAP_ENTRY(QUEST_SONG_TIME, 255, 255, 255), + SONG_MAP_ENTRY(QUEST_SONG_STORMS, 255, 255, 255), + SONG_MAP_ENTRY(QUEST_SONG_MINUET, 150, 255, 100), + SONG_MAP_ENTRY(QUEST_SONG_BOLERO, 255, 80, 40), + SONG_MAP_ENTRY(QUEST_SONG_SERENADE, 100, 150, 255), + SONG_MAP_ENTRY(QUEST_SONG_REQUIEM, 255, 160, 0), + SONG_MAP_ENTRY(QUEST_SONG_NOCTURNE, 255, 100, 255), + SONG_MAP_ENTRY(QUEST_SONG_PRELUDE, 255, 240, 100), +} }; + // Adds a text tooltip for the previous ImGui item void SetLastItemHoverText(const std::string& text) { if (ImGui::IsItemHovered()) { @@ -178,17 +244,33 @@ void InsertHelpHoverText(const std::string& text) { } } -void DrawSaveEditor(bool& open) { - if (!open) { - return; - } +// Encapsulates what is drawn by the passed-in function within a border +template +void DrawGroupWithBorder(T&& drawFunc) { + // First group encapsulates the inner portion and border + ImGui::BeginGroup(); - ImGui::SetNextWindowSize(ImVec2(520, 600), ImGuiCond_FirstUseEver); - if (!ImGui::Begin("Save Editor", &open)) { - ImGui::End(); - return; - } + ImVec2 padding = ImGui::GetStyle().FramePadding; + ImVec2 p0 = ImGui::GetCursorScreenPos(); + ImGui::SetCursorScreenPos(ImVec2(p0.x + padding.x, p0.y + padding.y)); + // Second group encapsulates just the inner portion + ImGui::BeginGroup(); + + drawFunc(); + + ImGui::Dummy(padding); + ImGui::EndGroup(); + + ImVec2 p1 = ImGui::GetItemRectMax(); + p1.x += padding.x; + ImVec4 borderCol = ImGui::GetStyle().Colors[ImGuiCol_Border]; + ImGui::GetWindowDrawList()->AddRect(p0, p1, IM_COL32(borderCol.x * 255, borderCol.y * 255, borderCol.z * 255, borderCol.w * 255)); + + ImGui::EndGroup(); +} + +void DrawInfoTab() { // TODO This is the bare minimum to get the player name showing // There will need to be more effort to get it robust and editable std::string name; @@ -201,313 +283,833 @@ void DrawSaveEditor(bool& open) { } name += '\0'; + ImGui::PushItemWidth(ImGui::GetFontSize() * 6); + + ImGui::Text("Name: %s", name.c_str()); + InsertHelpHoverText("Player Name"); + + // Use an intermediary to keep the health from updating (and potentially killing the player) + // until it is done being edited + int16_t healthIntermediary = gSaveContext.healthCapacity; + ImGui::InputScalar("Max Health", ImGuiDataType_S16, &healthIntermediary); + if (ImGui::IsItemDeactivated()) { + gSaveContext.healthCapacity = healthIntermediary; + } + InsertHelpHoverText("Maximum health. 16 units per full heart"); + if (gSaveContext.health > gSaveContext.healthCapacity) { + gSaveContext.health = gSaveContext.healthCapacity; // Clamp health to new max + } + + const uint16_t healthMin = 0; + const uint16_t healthMax = gSaveContext.healthCapacity; + ImGui::SetNextItemWidth(ImGui::GetFontSize() * 15); + ImGui::SliderScalar("Health", ImGuiDataType_S16, &gSaveContext.health, &healthMin, &healthMax); + InsertHelpHoverText("Current health. 16 units per full heart"); + + bool doubleDefense = gSaveContext.doubleDefense != 0; + if (ImGui::Checkbox("Double Defense", &doubleDefense)) { + gSaveContext.doubleDefense = doubleDefense; + gSaveContext.inventory.defenseHearts = + gSaveContext.doubleDefense ? 20 : 0; // Set to get the border drawn in the UI + } + InsertHelpHoverText("Is double defense unlocked?"); + + std::string magicName; + if (gSaveContext.magicLevel == 2) { + magicName = "Double"; + } else if (gSaveContext.magicLevel == 1) { + magicName = "Single"; + } else { + magicName = "None"; + } + ImGui::SetNextItemWidth(ImGui::GetFontSize() * 6); + if (ImGui::BeginCombo("Magic Level", magicName.c_str())) { + if (ImGui::Selectable("Double")) { + gSaveContext.magicLevel = 2; + gSaveContext.magicAcquired = true; + gSaveContext.doubleMagic = true; + } + if (ImGui::Selectable("Single")) { + gSaveContext.magicLevel = 1; + gSaveContext.magicAcquired = true; + gSaveContext.doubleMagic = false; + } + if (ImGui::Selectable("None")) { + gSaveContext.magicLevel = 0; + gSaveContext.magicAcquired = false; + gSaveContext.doubleMagic = false; + } + + ImGui::EndCombo(); + } + InsertHelpHoverText("Current magic level"); + gSaveContext.unk_13F4 = gSaveContext.magicLevel * 0x30; // Set to get the bar drawn in the UI + if (gSaveContext.magic > gSaveContext.unk_13F4) { + gSaveContext.magic = gSaveContext.unk_13F4; // Clamp magic to new max + } + + const uint8_t magicMin = 0; + const uint8_t magicMax = gSaveContext.unk_13F4; + ImGui::SetNextItemWidth(ImGui::GetFontSize() * 15); + ImGui::SliderScalar("Magic", ImGuiDataType_S8, &gSaveContext.magic, &magicMin, &magicMax); + InsertHelpHoverText("Current magic. 48 units per magic level"); + + ImGui::InputScalar("Rupees", ImGuiDataType_S16, &gSaveContext.rupees); + InsertHelpHoverText("Current rupees"); + + const uint16_t dayTimeMin = 0; + const uint16_t dayTimeMax = 0xFFFF; + ImGui::SetNextItemWidth(ImGui::GetFontSize() * 15); + ImGui::SliderScalar("Time", ImGuiDataType_U16, &gSaveContext.dayTime, &dayTimeMin, &dayTimeMax); + InsertHelpHoverText("Time of day"); + if (ImGui::Button("Dawn")) { + gSaveContext.dayTime = 0x4000; + } + ImGui::SameLine(); + if (ImGui::Button("Noon")) { + gSaveContext.dayTime = 0x8000; + } + ImGui::SameLine(); + if (ImGui::Button("Sunset")) { + gSaveContext.dayTime = 0xC000; + } + ImGui::SameLine(); + if (ImGui::Button("Midnight")) { + gSaveContext.dayTime = 0; + } + + ImGui::InputScalar("Total Days", ImGuiDataType_S32, &gSaveContext.totalDays); + InsertHelpHoverText("Total number of days elapsed since the start of the game"); + + ImGui::InputScalar("Deaths", ImGuiDataType_U16, &gSaveContext.deaths); + InsertHelpHoverText("Total number of deaths"); + + bool bgsFlag = gSaveContext.bgsFlag != 0; + if (ImGui::Checkbox("Has BGS", &bgsFlag)) { + gSaveContext.bgsFlag = bgsFlag; + } + InsertHelpHoverText("Is Biggoron sword unlocked? Replaces Giant's knife"); + + ImGui::InputScalar("Sword Health", ImGuiDataType_U16, &gSaveContext.swordHealth); + InsertHelpHoverText("Giant's knife health. Default is 8. Must be >0 for Biggoron sword to work"); + + ImGui::InputScalar("Bgs Day Count", ImGuiDataType_S32, &gSaveContext.bgsDayCount); + InsertHelpHoverText("Total number of days elapsed since giving Biggoron the claim check"); + + // TODO Changing Link's age is more involved than just setting gSaveContext.linkAge + // It might not fit here and instead should be only changable when changing scenes + /* + if (ImGui::BeginCombo("Link Age", LINK_IS_ADULT ? "Adult" : "Child")) { + if (ImGui::Selectable("Adult")) { + gSaveContext.linkAge = 0; + } + if (ImGui::Selectable("Child")) { + gSaveContext.linkAge = 1; + } + + ImGui::EndCombo(); + } + */ + + ImGui::PopItemWidth(); +} + +void DrawInventoryTab() { + static bool restrictToValid = true; + + ImGui::Checkbox("Restrict to valid items", &restrictToValid); + InsertHelpHoverText("Restricts items and ammo to only what is possible to legally acquire in-game"); + + for (int32_t y = 0; y < 4; y++) { + for (int32_t x = 0; x < 6; x++) { + int32_t index = x + y * 6; + static int32_t selectedIndex = -1; + static const char* itemPopupPicker = "itemPopupPicker"; + + ImGui::PushID(index); + + if (x != 0) { + ImGui::SameLine(); + } + + ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(1, 1, 1, 0)); + ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f); + uint8_t item = gSaveContext.inventory.items[index]; + if (item != ITEM_NONE) { + const ItemMapEntry& slotEntry = itemMapping.find(item)->second; + if (ImGui::ImageButton(SohImGui::GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0), + ImVec2(1, 1), 0)) { + selectedIndex = index; + ImGui::OpenPopup(itemPopupPicker); + } + } else { + if (ImGui::Button("##itemNone", ImVec2(32.0f, 32.0f))) { + selectedIndex = index; + ImGui::OpenPopup(itemPopupPicker); + } + } + ImGui::PopStyleVar(); + ImGui::PopStyleColor(); + + ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0)); + if (ImGui::BeginPopup(itemPopupPicker)) { + if (ImGui::Button("##itemNonePicker", ImVec2(32.0f, 32.0f))) { + gSaveContext.inventory.items[selectedIndex] = ITEM_NONE; + ImGui::CloseCurrentPopup(); + } + SetLastItemHoverText("None"); + + std::vector possibleItems; + if (restrictToValid) { + // Scan gItemSlots to find legal items for this slot. Bottles are a special case + for (int slotIndex = 0; slotIndex < 56; slotIndex++) { + int testIndex = (selectedIndex == SLOT_BOTTLE_1 || selectedIndex == SLOT_BOTTLE_2 || + selectedIndex == SLOT_BOTTLE_3 || selectedIndex == SLOT_BOTTLE_4) + ? SLOT_BOTTLE_1 + : selectedIndex; + if (gItemSlots[slotIndex] == testIndex) { + possibleItems.push_back(itemMapping[slotIndex]); + } + } + } else { + for (const auto& entry : itemMapping) { + possibleItems.push_back(entry.second); + } + } + + for (int32_t pickerIndex = 0; pickerIndex < possibleItems.size(); pickerIndex++) { + if (((pickerIndex + 1) % 8) != 0) { + ImGui::SameLine(); + } + const ItemMapEntry& slotEntry = possibleItems[pickerIndex]; + if (ImGui::ImageButton(SohImGui::GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), + ImVec2(0, 0), ImVec2(1, 1), 0)) { + gSaveContext.inventory.items[selectedIndex] = slotEntry.id; + ImGui::CloseCurrentPopup(); + } + SetLastItemHoverText(SohUtils::GetItemName(slotEntry.id)); + } + + ImGui::EndPopup(); + } + ImGui::PopStyleVar(); + + ImGui::PopID(); + } + } + + ImGui::Text("Ammo"); + for (uint32_t ammoIndex = 0, drawnAmmoItems = 0; ammoIndex < 16; ammoIndex++) { + uint8_t item = (restrictToValid) ? gAmmoItems[ammoIndex] : gAllAmmoItems[ammoIndex]; + if (item != ITEM_NONE) { + // For legal items, display as 1 row of 7. For unrestricted items, display rows of 6 to match + // inventory + if ((restrictToValid && (drawnAmmoItems != 0)) || ((drawnAmmoItems % 6) != 0)) { + ImGui::SameLine(); + } + drawnAmmoItems++; + + ImGui::PushID(ammoIndex); + ImGui::PushItemWidth(32.0f); + ImGui::BeginGroup(); + + ImGui::Image(SohImGui::GetTextureByName(itemMapping[item].name), ImVec2(32.0f, 32.0f)); + ImGui::InputScalar("##ammoInput", ImGuiDataType_S8, &AMMO(item)); + + ImGui::EndGroup(); + ImGui::PopItemWidth(); + ImGui::PopID(); + } + } +} + +// Draw a flag bitfield as an grid of checkboxes +void DrawFlagArray(const std::string& name, uint32_t& flags) { + ImGui::PushID(name.c_str()); + for (int32_t flagIndex = 0; flagIndex < 32; flagIndex++) { + if ((flagIndex % 8) != 0) { + ImGui::SameLine(); + } + ImGui::PushID(flagIndex); + uint32_t bitMask = 1 << flagIndex; + bool flag = (flags & bitMask) != 0; + if (ImGui::Checkbox("##check", &flag)) { + if (flag) { + flags |= bitMask; + } else { + flags &= ~bitMask; + } + } + ImGui::PopID(); + } + ImGui::PopID(); +} + +void DrawFlagsTab() { + if (ImGui::TreeNode("Current Scene")) { + if (gGlobalCtx != nullptr) { + ActorContext* act = &gGlobalCtx->actorCtx; + + DrawGroupWithBorder([&]() { + ImGui::Text("Switch"); + InsertHelpHoverText("Permanently-saved switch flags"); + DrawFlagArray("Switch", act->flags.swch); + }); + + ImGui::SameLine(); + + DrawGroupWithBorder([&]() { + ImGui::Text("Temp Switch"); + InsertHelpHoverText("Temporary switch flags. Unset on scene transitions"); + DrawFlagArray("Temp Switch", act->flags.tempSwch); + }); + + DrawGroupWithBorder([&]() { + ImGui::Text("Clear"); + InsertHelpHoverText("Permanently-saved room-clear flags"); + DrawFlagArray("Clear", act->flags.clear); + }); + + ImGui::SameLine(); + + DrawGroupWithBorder([&]() { + ImGui::Text("Temp Clear"); + InsertHelpHoverText("Temporary room-clear flags. Unset on scene transitions"); + DrawFlagArray("Temp Clear", act->flags.tempClear); + }); + + DrawGroupWithBorder([&]() { + ImGui::Text("Collect"); + InsertHelpHoverText("Permanently-saved collect flags"); + DrawFlagArray("Collect", act->flags.collect); + }); + + ImGui::SameLine(); + + DrawGroupWithBorder([&]() { + ImGui::Text("Temp Collect"); + InsertHelpHoverText("Temporary collect flags. Unset on scene transitions"); + DrawFlagArray("Temp Collect", act->flags.tempCollect); + }); + + DrawGroupWithBorder([&]() { + ImGui::Text("Chest"); + InsertHelpHoverText("Permanently-saved chest flags"); + DrawFlagArray("Chest", act->flags.chest); + }); + + ImGui::SameLine(); + + ImGui::BeginGroup(); + + if (ImGui::Button("Reload Flags")) { + act->flags.swch = gSaveContext.sceneFlags[gGlobalCtx->sceneNum].swch; + act->flags.clear = gSaveContext.sceneFlags[gGlobalCtx->sceneNum].clear; + act->flags.collect = gSaveContext.sceneFlags[gGlobalCtx->sceneNum].collect; + act->flags.chest = gSaveContext.sceneFlags[gGlobalCtx->sceneNum].chest; + } + SetLastItemHoverText("Load flags from saved scene flags. Normally happens on scene load"); + + if (ImGui::Button("Save Flags")) { + gSaveContext.sceneFlags[gGlobalCtx->sceneNum].swch = act->flags.swch; + gSaveContext.sceneFlags[gGlobalCtx->sceneNum].clear = act->flags.clear; + gSaveContext.sceneFlags[gGlobalCtx->sceneNum].collect = act->flags.collect; + gSaveContext.sceneFlags[gGlobalCtx->sceneNum].chest = act->flags.chest; + } + SetLastItemHoverText("Save current scene flags. Normally happens on scene exit"); + + ImGui::EndGroup(); + } else { + ImGui::Text("Current game state does not have an active scene"); + } + + ImGui::TreePop(); + } + + if (ImGui::TreeNode("Saved Scene Flags")) { + static uint32_t selectedSceneFlagMap = 0; + ImGui::Text("Map"); + ImGui::SameLine(); + if (ImGui::BeginCombo("##Map", SohUtils::GetSceneName(selectedSceneFlagMap).c_str())) { + for (int32_t sceneIndex = 0; sceneIndex < SCENE_ID_MAX; sceneIndex++) { + if (ImGui::Selectable(SohUtils::GetSceneName(sceneIndex).c_str())) { + selectedSceneFlagMap = sceneIndex; + } + } + + ImGui::EndCombo(); + } + + // Don't show current scene button if there is no current scene + if (gGlobalCtx != nullptr) { + ImGui::SameLine(); + if (ImGui::Button("Current")) { + selectedSceneFlagMap = gGlobalCtx->sceneNum; + } + SetLastItemHoverText("Open flags for current scene"); + } + + DrawGroupWithBorder([&]() { + ImGui::Text("Switch"); + InsertHelpHoverText("Switch flags"); + DrawFlagArray("Switch", gSaveContext.sceneFlags[selectedSceneFlagMap].swch); + }); + + ImGui::SameLine(); + + DrawGroupWithBorder([&]() { + ImGui::Text("Clear"); + InsertHelpHoverText("Room-clear flags"); + DrawFlagArray("Clear", gSaveContext.sceneFlags[selectedSceneFlagMap].clear); + }); + + DrawGroupWithBorder([&]() { + ImGui::Text("Collect"); + InsertHelpHoverText("Collect flags"); + DrawFlagArray("Collect", gSaveContext.sceneFlags[selectedSceneFlagMap].collect); + }); + + ImGui::SameLine(); + + DrawGroupWithBorder([&]() { + ImGui::Text("Chest"); + InsertHelpHoverText("Chest flags"); + DrawFlagArray("Chest", gSaveContext.sceneFlags[selectedSceneFlagMap].chest); + }); + + DrawGroupWithBorder([&]() { + ImGui::Text("Rooms"); + InsertHelpHoverText("Flags for visted rooms"); + DrawFlagArray("Rooms", gSaveContext.sceneFlags[selectedSceneFlagMap].rooms); + }); + + ImGui::SameLine(); + + DrawGroupWithBorder([&]() { + ImGui::Text("Floors"); + InsertHelpHoverText("Flags for visted floors"); + DrawFlagArray("Floors", gSaveContext.sceneFlags[selectedSceneFlagMap].floors); + }); + + ImGui::TreePop(); + } + + DrawGroupWithBorder([&]() { + static uint32_t selectedGsMap = 0; + ImGui::Text("Gold Skulltulas"); + ImGui::Text("Map"); + ImGui::SameLine(); + if (ImGui::BeginCombo("##Gold Skulltula Map", gsMapping[selectedGsMap].c_str())) { + for (int32_t gsIndex = 0; gsIndex < gsMapping.size(); gsIndex++) { + if (ImGui::Selectable(gsMapping[gsIndex].c_str())) { + selectedGsMap = gsIndex; + } + } + + ImGui::EndCombo(); + } + + // TODO We should write out descriptions for each one... ugh + ImGui::Text("Flags"); + uint32_t currentFlags = GET_GS_FLAGS(selectedGsMap); + uint32_t allFlags = gAreaGsFlags[selectedGsMap]; + uint32_t setMask = 1; + // Iterate over bitfield and create a checkbox for each skulltula + while (allFlags != 0) { + bool isThisSet = (currentFlags & 0x1) == 0x1; + + ImGui::SameLine(); + ImGui::PushID(allFlags); + if (ImGui::Checkbox("##gs", &isThisSet)) { + if (isThisSet) { + SET_GS_FLAGS(selectedGsMap, setMask); + } else { + // Have to do this roundabout method as the macro does not support clearing flags + uint32_t currentFlagsBase = GET_GS_FLAGS(selectedGsMap); + gSaveContext.gsFlags[selectedGsMap >> 2] &= ~gGsFlagsMasks[selectedGsMap & 3]; + SET_GS_FLAGS(selectedGsMap, currentFlagsBase & ~setMask); + } + } + + ImGui::PopID(); + + allFlags >>= 1; + currentFlags >>= 1; + setMask <<= 1; + } + + static bool keepGsCountUpdated = true; + ImGui::Checkbox("Keep GS Count Updated", &keepGsCountUpdated); + InsertHelpHoverText("Automatically adjust the number of gold skulltula tokens acquired based on set flags"); + int32_t gsCount = 0; + if (keepGsCountUpdated) { + for (int32_t gsFlagIndex = 0; gsFlagIndex < 6; gsFlagIndex++) { + gsCount += std::popcount(static_cast(gSaveContext.gsFlags[gsFlagIndex])); + } + gSaveContext.inventory.gsTokens = gsCount; + } + }); +} + +// Draws a combo that lets you choose and upgrade value from a drop-down of text values +void DrawUpgrade(const std::string& categoryName, int32_t categoryId, const std::vector& names) { + ImGui::Text(categoryName.c_str()); + ImGui::SameLine(); + ImGui::PushID(categoryName.c_str()); + if (ImGui::BeginCombo("##upgrade", names[CUR_UPG_VALUE(categoryId)].c_str())) { + for (int32_t i = 0; i < names.size(); i++) { + if (ImGui::Selectable(names[i].c_str())) { + Inventory_ChangeUpgrade(categoryId, i); + } + } + + ImGui::EndCombo(); + } + ImGui::PopID(); + SetLastItemHoverText(categoryName.c_str()); +} + +// Draws a combo that lets you choose and upgrade value from a popup grid of icons +void DrawUpgradeIcon(const std::string& categoryName, int32_t categoryId, const std::vector& items) { + static const char* upgradePopupPicker = "upgradePopupPicker"; + + ImGui::PushID(categoryName.c_str()); + + ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(1, 1, 1, 0)); + ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f); + uint8_t item = items[CUR_UPG_VALUE(categoryId)]; + if (item != ITEM_NONE) { + const ItemMapEntry& slotEntry = itemMapping[item]; + if (ImGui::ImageButton(SohImGui::GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0), + ImVec2(1, 1), 0)) { + ImGui::OpenPopup(upgradePopupPicker); + } + } else { + if (ImGui::Button("##itemNone", ImVec2(32.0f, 32.0f))) { + ImGui::OpenPopup(upgradePopupPicker); + } + } + ImGui::PopStyleVar(); + ImGui::PopStyleColor(); + SetLastItemHoverText(categoryName.c_str()); + + ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0)); + if (ImGui::BeginPopup(upgradePopupPicker)) { + for (int32_t pickerIndex = 0; pickerIndex < items.size(); pickerIndex++) { + if ((pickerIndex % 8) != 0) { + ImGui::SameLine(); + } + + if (items[pickerIndex] == ITEM_NONE) { + if (ImGui::Button("##upgradePopupPicker", ImVec2(32.0f, 32.0f))) { + Inventory_ChangeUpgrade(categoryId, pickerIndex); + ImGui::CloseCurrentPopup(); + } + SetLastItemHoverText("None"); + } else { + const ItemMapEntry& slotEntry = itemMapping[items[pickerIndex]]; + if (ImGui::ImageButton(SohImGui::GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0), + ImVec2(1, 1), 0)) { + Inventory_ChangeUpgrade(categoryId, pickerIndex); + ImGui::CloseCurrentPopup(); + } + SetLastItemHoverText(SohUtils::GetItemName(slotEntry.id)); + } + } + + ImGui::EndPopup(); + } + ImGui::PopStyleVar(); + + ImGui::PopID(); +} + +void DrawEquipmentTab() { + const std::vector equipmentValues = { + ITEM_SWORD_KOKIRI, ITEM_SWORD_MASTER, ITEM_SWORD_BGS, ITEM_SWORD_BROKEN, + ITEM_SHIELD_DEKU, ITEM_SHIELD_HYLIAN, ITEM_SHIELD_MIRROR, ITEM_NONE, + ITEM_TUNIC_KOKIRI, ITEM_TUNIC_GORON, ITEM_TUNIC_ZORA, ITEM_NONE, + ITEM_BOOTS_KOKIRI, ITEM_BOOTS_IRON, ITEM_BOOTS_HOVER, ITEM_NONE, + }; + for (int32_t i = 0; i < equipmentValues.size(); i++) { + // Skip over unused 4th slots for shields, boots, and tunics + if (equipmentValues[i] == ITEM_NONE) { + continue; + } + if ((i % 4) != 0) { + ImGui::SameLine(); + } + + ImGui::PushID(i); + uint32_t bitMask = 1 << i; + bool hasEquip = (bitMask & gSaveContext.inventory.equipment) != 0; + const ItemMapEntry& entry = itemMapping[equipmentValues[i]]; + ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0)); + if (ImGui::ImageButton(SohImGui::GetTextureByName(hasEquip ? entry.name : entry.nameFaded), + ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1), 0)) { + if (hasEquip) { + gSaveContext.inventory.equipment &= ~bitMask; + } else { + gSaveContext.inventory.equipment |= bitMask; + } + } + ImGui::PopStyleColor(); + ImGui::PopID(); + SetLastItemHoverText(SohUtils::GetItemName(entry.id)); + } + + const std::vector bulletBagValues = { + ITEM_NONE, + ITEM_BULLET_BAG_30, + ITEM_BULLET_BAG_40, + ITEM_BULLET_BAG_50, + }; + DrawUpgradeIcon("Bullet Bag", UPG_BULLET_BAG, bulletBagValues); + + ImGui::SameLine(); + + const std::vector quiverValues = { + ITEM_NONE, + ITEM_QUIVER_30, + ITEM_QUIVER_40, + ITEM_QUIVER_50, + }; + DrawUpgradeIcon("Quiver", UPG_QUIVER, quiverValues); + + ImGui::SameLine(); + + const std::vector bombBagValues = { + ITEM_NONE, + ITEM_BOMB_BAG_20, + ITEM_BOMB_BAG_30, + ITEM_BOMB_BAG_40, + }; + DrawUpgradeIcon("Bomb Bag", UPG_BOMB_BAG, bombBagValues); + + ImGui::SameLine(); + + const std::vector scaleValues = { + ITEM_NONE, + ITEM_SCALE_SILVER, + ITEM_SCALE_GOLDEN, + }; + DrawUpgradeIcon("Scale", UPG_SCALE, scaleValues); + + ImGui::SameLine(); + + const std::vector strengthValues = { + ITEM_NONE, + ITEM_BRACELET, + ITEM_GAUNTLETS_SILVER, + ITEM_GAUNTLETS_GOLD, + }; + DrawUpgradeIcon("Strength", UPG_STRENGTH, strengthValues); + + // There is no icon for child wallet, so default to a text list + const std::vector walletNames = { + "Child (99)", + "Adult (200)", + "Giant (500)", + }; + DrawUpgrade("Wallet", UPG_WALLET, walletNames); + + const std::vector stickNames = { + "None", + "10", + "20", + "30", + }; + DrawUpgrade("Sticks", UPG_STICKS, stickNames); + + const std::vector nutNames = { + "None", + "20", + "30", + "40", + }; + DrawUpgrade("Deku Nuts", UPG_NUTS, nutNames); +} + +// Draws a toggleable icon for a quest item that is faded when disabled +void DrawQuestItemButton(uint32_t item) { + const QuestMapEntry& entry = questMapping[item]; + uint32_t bitMask = 1 << entry.id; + bool hasQuestItem = (bitMask & gSaveContext.inventory.questItems) != 0; + ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0)); + if (ImGui::ImageButton(SohImGui::GetTextureByName(hasQuestItem ? entry.name : entry.nameFaded), + ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1), 0)) { + if (hasQuestItem) { + gSaveContext.inventory.questItems &= ~bitMask; + } else { + gSaveContext.inventory.questItems |= bitMask; + } + } + ImGui::PopStyleColor(); + SetLastItemHoverText(SohUtils::GetQuestItemName(entry.id)); +} + +// Draws a toggleable icon for a dungeon item that is faded when disabled +void DrawDungeonItemButton(uint32_t item, uint32_t scene) { + const ItemMapEntry& entry = itemMapping[item]; + uint32_t bitMask = 1 << (entry.id - ITEM_KEY_BOSS); // Bitset starts at ITEM_KEY_BOSS == 0. the rest are sequential + bool hasItem = (bitMask & gSaveContext.inventory.dungeonItems[scene]) != 0; + ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0)); + if (ImGui::ImageButton(SohImGui::GetTextureByName(hasItem ? entry.name : entry.nameFaded), + ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1), 0)) { + if (hasItem) { + gSaveContext.inventory.dungeonItems[scene] &= ~bitMask; + } else { + gSaveContext.inventory.dungeonItems[scene] |= bitMask; + } + } + ImGui::PopStyleColor(); + SetLastItemHoverText(SohUtils::GetItemName(entry.id)); +} + +void DrawQuestStatusTab() { + ImGui::PushItemWidth(ImGui::GetFontSize() * 6); + + for (int32_t i = QUEST_MEDALLION_FOREST; i < QUEST_MEDALLION_LIGHT + 1; i++) { + if (i != QUEST_MEDALLION_FOREST) { + ImGui::SameLine(); + } + DrawQuestItemButton(i); + } + + for (int32_t i = QUEST_KOKIRI_EMERALD; i < QUEST_ZORA_SAPPHIRE + 1; i++) { + if (i != QUEST_KOKIRI_EMERALD) { + ImGui::SameLine(); + } + DrawQuestItemButton(i); + } + + // Put Stone of Agony and Gerudo Card on the same line with a little space between them + ImGui::SameLine(); + ImGui::Dummy(ImVec2(20, 0)); + + ImGui::SameLine(); + DrawQuestItemButton(QUEST_STONE_OF_AGONY); + + ImGui::SameLine(); + DrawQuestItemButton(QUEST_GERUDO_CARD); + + for (const SongMapEntry& entry : songMapping) { + if ((entry.id != QUEST_SONG_MINUET) && (entry.id != QUEST_SONG_LULLABY)) { + ImGui::SameLine(); + } + + uint32_t bitMask = 1 << entry.id; + bool hasQuestItem = (bitMask & gSaveContext.inventory.questItems) != 0; + ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0)); + if (ImGui::ImageButton(SohImGui::GetTextureByName(hasQuestItem ? entry.name : entry.nameFaded), + ImVec2(16.0f, 24.0f), ImVec2(0, 0), ImVec2(1, 1), 0)) { + if (hasQuestItem) { + gSaveContext.inventory.questItems &= ~bitMask; + } else { + gSaveContext.inventory.questItems |= bitMask; + } + } + ImGui::PopStyleColor(); + SetLastItemHoverText(SohUtils::GetQuestItemName(entry.id)); + } + + ImGui::InputScalar("GS Count", ImGuiDataType_S16, &gSaveContext.inventory.gsTokens); + InsertHelpHoverText("Number of gold skulltula tokens aquired"); + + uint32_t bitMask = 1 << QUEST_SKULL_TOKEN; + bool gsUnlocked = (bitMask & gSaveContext.inventory.questItems) != 0; + if (ImGui::Checkbox("GS unlocked", &gsUnlocked)) { + if (gsUnlocked) { + gSaveContext.inventory.questItems |= bitMask; + } else { + gSaveContext.inventory.questItems &= ~bitMask; + } + } + InsertHelpHoverText("If unlocked, enables showing the gold skulltula count in the quest status menu"); + + int32_t pohCount = (gSaveContext.inventory.questItems & 0xF0000000) >> 28; + if (ImGui::BeginCombo("PoH count", std::to_string(pohCount).c_str())) { + for (int32_t i = 0; i < 4; i++) { + if (ImGui::Selectable(std::to_string(i).c_str(), pohCount == i)) { + gSaveContext.inventory.questItems &= ~0xF0000000; + gSaveContext.inventory.questItems |= (i << 28); + } + } + ImGui::EndCombo(); + } + InsertHelpHoverText("The number of pieces of heart acquired towards the next heart container"); + + DrawGroupWithBorder([&]() { + ImGui::Text("Dungeon Items"); + + static int32_t dungeonItemsScene = SCENE_YDAN; + ImGui::PushItemWidth(-ImGui::GetWindowWidth() * 0.35f); + if (ImGui::BeginCombo("##DungeonSelect", SohUtils::GetSceneName(dungeonItemsScene).c_str())) { + for (int32_t dungeonIndex = SCENE_YDAN; dungeonIndex < SCENE_BDAN_BOSS + 1; dungeonIndex++) { + if (ImGui::Selectable(SohUtils::GetSceneName(dungeonIndex).c_str(), + dungeonIndex == dungeonItemsScene)) { + dungeonItemsScene = dungeonIndex; + } + } + + ImGui::EndCombo(); + } + ImGui::PopItemWidth(); + + DrawDungeonItemButton(ITEM_KEY_BOSS, dungeonItemsScene); + ImGui::SameLine(); + DrawDungeonItemButton(ITEM_COMPASS, dungeonItemsScene); + ImGui::SameLine(); + DrawDungeonItemButton(ITEM_DUNGEON_MAP, dungeonItemsScene); + + if (dungeonItemsScene != SCENE_BDAN_BOSS) { + float lineHeight = ImGui::GetTextLineHeightWithSpacing(); + ImGui::Image(SohImGui::GetTextureByName(itemMapping[ITEM_KEY_SMALL].name), ImVec2(lineHeight, lineHeight)); + ImGui::SameLine(); + ImGui::InputScalar("##Keys", ImGuiDataType_S8, gSaveContext.inventory.dungeonKeys + dungeonItemsScene); + } else { + // dungeonItems is size 20 but dungeonKeys is size 19, so there are no keys for the last scene (Barinade's Lair) + ImGui::Text("Barinade's Lair does not have small keys"); + } + }); + + ImGui::PopItemWidth(); +} + +void DrawSaveEditor(bool& open) { + if (!open) { + return; + } + + ImGui::SetNextWindowSize(ImVec2(520, 600), ImGuiCond_FirstUseEver); + if (!ImGui::Begin("Save Editor", &open)) { + ImGui::End(); + return; + } + if (ImGui::BeginTabBar("SaveContextTabBar", ImGuiTabBarFlags_NoCloseWithMiddleMouseButton)) { if (ImGui::BeginTabItem("Info")) { - ImGui::PushItemWidth(ImGui::GetFontSize() * 6); - - ImGui::Text("Name: %s", name.c_str()); - InsertHelpHoverText("Player Name"); - - // Use an intermediary to keep the health from updating (and potentially killing the player) - // until it is done being edited - int16_t healthIntermediary = gSaveContext.healthCapacity; - ImGui::InputScalar("Max Health", ImGuiDataType_S16, &healthIntermediary); - if (ImGui::IsItemDeactivated()) { - gSaveContext.healthCapacity = healthIntermediary; - } - InsertHelpHoverText("Maximum health. 16 units per full heart"); - if (gSaveContext.health > gSaveContext.healthCapacity) { - gSaveContext.health = gSaveContext.healthCapacity; // Clamp health to new max - } - - const uint16_t healthMin = 0; - const uint16_t healthMax = gSaveContext.healthCapacity; - ImGui::SetNextItemWidth(ImGui::GetFontSize() * 15); - ImGui::SliderScalar("Health", ImGuiDataType_S16, &gSaveContext.health, &healthMin, &healthMax); - InsertHelpHoverText("Current health. 16 units per full heart"); - - bool doubleDefense = gSaveContext.doubleDefense != 0; - if (ImGui::Checkbox("Double Defense", &doubleDefense)) { - gSaveContext.doubleDefense = doubleDefense; - gSaveContext.inventory.defenseHearts = - gSaveContext.doubleDefense ? 20 : 0; // Set to get the border drawn in the UI - } - InsertHelpHoverText("Is double defense unlocked?"); - - std::string magicName; - if (gSaveContext.magicLevel == 2) { - magicName = "Double"; - } else if (gSaveContext.magicLevel == 1) { - magicName = "Single"; - } else { - magicName = "None"; - } - ImGui::SetNextItemWidth(ImGui::GetFontSize() * 6); - if (ImGui::BeginCombo("Magic Level", magicName.c_str())) { - if (ImGui::Selectable("Double")) { - gSaveContext.magicLevel = 2; - gSaveContext.magicAcquired = true; - gSaveContext.doubleMagic = true; - } - if (ImGui::Selectable("Single")) { - gSaveContext.magicLevel = 1; - gSaveContext.magicAcquired = true; - gSaveContext.doubleMagic = false; - } - if (ImGui::Selectable("None")) { - gSaveContext.magicLevel = 0; - gSaveContext.magicAcquired = false; - gSaveContext.doubleMagic = false; - } - - ImGui::EndCombo(); - } - InsertHelpHoverText("Current magic level"); - gSaveContext.unk_13F4 = gSaveContext.magicLevel * 0x30; // Set to get the bar drawn in the UI - if (gSaveContext.magic > gSaveContext.unk_13F4) { - gSaveContext.magic = gSaveContext.unk_13F4; // Clamp magic to new max - } - - const uint8_t magicMin = 0; - const uint8_t magicMax = gSaveContext.unk_13F4; - ImGui::SetNextItemWidth(ImGui::GetFontSize() * 15); - ImGui::SliderScalar("Magic", ImGuiDataType_S8, &gSaveContext.magic, &magicMin, &magicMax); - InsertHelpHoverText("Current magic. 48 units per magic level"); - - ImGui::InputScalar("Rupees", ImGuiDataType_S16, &gSaveContext.rupees); - InsertHelpHoverText("Current rupees"); - - const uint16_t dayTimeMin = 0; - const uint16_t dayTimeMax = 0xFFFF; - ImGui::SetNextItemWidth(ImGui::GetFontSize() * 15); - ImGui::SliderScalar("Time", ImGuiDataType_U16, &gSaveContext.dayTime, &dayTimeMin, &dayTimeMax); - InsertHelpHoverText("Time of day"); - if (ImGui::Button("Dawn")) { - gSaveContext.dayTime = 0x4000; - } - ImGui::SameLine(); - if (ImGui::Button("Noon")) { - gSaveContext.dayTime = 0x8000; - } - ImGui::SameLine(); - if (ImGui::Button("Sunset")) { - gSaveContext.dayTime = 0xC000; - } - ImGui::SameLine(); - if (ImGui::Button("Midnight")) { - gSaveContext.dayTime = 0; - } - - ImGui::InputScalar("Total Days", ImGuiDataType_S32, &gSaveContext.totalDays); - InsertHelpHoverText("Total number of days elapsed since the start of the game"); - - ImGui::InputScalar("Deaths", ImGuiDataType_U16, &gSaveContext.deaths); - InsertHelpHoverText("Total number of deaths"); - - // TODO Move to quest status screen once the page is created - ImGui::InputScalar("GS Count", ImGuiDataType_S16, &gSaveContext.inventory.gsTokens); - InsertHelpHoverText("Number of gold skulltula tokens aquired"); - - bool bgsFlag = gSaveContext.bgsFlag != 0; - if (ImGui::Checkbox("Has BGS", &bgsFlag)) { - gSaveContext.bgsFlag = bgsFlag; - } - InsertHelpHoverText("Is Biggoron sword unlocked? Replaces Giant's knife"); - - ImGui::InputScalar("Sword Health", ImGuiDataType_U16, &gSaveContext.swordHealth); - InsertHelpHoverText("Giant's knife health. Default is 8. Must be >0 for Biggoron sword to work"); - - ImGui::InputScalar("Bgs Day Count", ImGuiDataType_S32, &gSaveContext.bgsDayCount); - InsertHelpHoverText("Total number of days elapsed since giving Biggoron the claim check"); - - // TODO Changing Link's age is more involved than just setting gSaveContext.linkAge - // It might not fit here and instead should be only changable when changing scenes - /* - if (ImGui::BeginCombo("Link Age", LINK_IS_ADULT ? "Adult" : "Child")) { - if (ImGui::Selectable("Adult")) { - gSaveContext.linkAge = 0; - } - if (ImGui::Selectable("Child")) { - gSaveContext.linkAge = 1; - } - - ImGui::EndCombo(); - } - */ - - ImGui::PopItemWidth(); + DrawInfoTab(); ImGui::EndTabItem(); } if (ImGui::BeginTabItem("Inventory")) { - static bool restrictToValid = true; - - ImGui::Checkbox("Restrict to valid items", &restrictToValid); - InsertHelpHoverText("Restricts items and ammo to only what is possible to legally acquire in-game"); - - for (int32_t y = 0; y < 4; y++) { - for (int32_t x = 0; x < 6; x++) { - int32_t index = x + y * 6; - static int32_t selectedIndex = -1; - static const char* itemPopupPicker = "itemPopupPicker"; - - ImGui::PushID(index); - - if (x != 0) { - ImGui::SameLine(); - } - - ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(1, 1, 1, 0)); - ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f); - uint8_t item = gSaveContext.inventory.items[index]; - if (item != ITEM_NONE) { - const ItemMapEntry& slotEntry = itemMapping.find(item)->second; - if (ImGui::ImageButton(SohImGui::GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), - ImVec2(0, 0), ImVec2(1, 1), 0)) { - selectedIndex = index; - ImGui::OpenPopup(itemPopupPicker); - } - } else { - if (ImGui::Button("##itemNone", ImVec2(32.0f, 32.0f))) { - selectedIndex = index; - ImGui::OpenPopup(itemPopupPicker); - } - } - ImGui::PopStyleVar(); - ImGui::PopStyleColor(); - - ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0)); - if (ImGui::BeginPopup(itemPopupPicker)) { - if (ImGui::Button("##itemNonePicker", ImVec2(32.0f, 32.0f))) { - gSaveContext.inventory.items[selectedIndex] = ITEM_NONE; - ImGui::CloseCurrentPopup(); - } - SetLastItemHoverText("ITEM_NONE"); - - std::vector possibleItems; - if (restrictToValid) { - // Scan gItemSlots to find legal items for this slot. Bottles are a special case - for (int slotIndex = 0; slotIndex < 56; slotIndex++) { - int testIndex = (selectedIndex == SLOT_BOTTLE_1 || selectedIndex == SLOT_BOTTLE_2 || - selectedIndex == SLOT_BOTTLE_3 || selectedIndex == SLOT_BOTTLE_4) - ? SLOT_BOTTLE_1 - : selectedIndex; - if (gItemSlots[slotIndex] == testIndex) { - possibleItems.push_back(itemMapping[slotIndex]); - } - } - } else { - for (const auto& entry : itemMapping) { - possibleItems.push_back(entry.second); - } - } - - for (int32_t pickerIndex = 0; pickerIndex < possibleItems.size(); pickerIndex++) { - if (((pickerIndex + 1) % 8) != 0) { - ImGui::SameLine(); - } - const ItemMapEntry& slotEntry = possibleItems[pickerIndex]; - if (ImGui::ImageButton(SohImGui::GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), - ImVec2(0, 0), ImVec2(1, 1), 0)) { - gSaveContext.inventory.items[selectedIndex] = slotEntry.id; - ImGui::CloseCurrentPopup(); - } - SetLastItemHoverText(slotEntry.name); - } - - ImGui::EndPopup(); - } - ImGui::PopStyleVar(); - - ImGui::PopID(); - } - } - - ImGui::Text("Ammo"); - for (uint32_t ammoIndex = 0, drawnAmmoItems = 0; ammoIndex < 16; ammoIndex++) { - uint8_t item = (restrictToValid) ? gAmmoItems[ammoIndex] : gAllAmmoItems[ammoIndex]; - if (item != ITEM_NONE) { - // For legal items, display as 1 row of 7. For unrestricted items, display rows of 6 to match - // inventory - if ((restrictToValid && (drawnAmmoItems != 0)) || ((drawnAmmoItems % 6) != 0)) { - ImGui::SameLine(); - } - drawnAmmoItems++; - - ImGui::PushID(ammoIndex); - ImGui::PushItemWidth(32.0f); - ImGui::BeginGroup(); - - ImGui::Image(SohImGui::GetTextureByName(itemMapping[item].name), ImVec2(32.0f, 32.0f)); - ImGui::InputScalar("##ammoInput", ImGuiDataType_S8, &AMMO(item)); - - ImGui::EndGroup(); - ImGui::PopItemWidth(); - ImGui::PopID(); - } - } - + DrawInventoryTab(); ImGui::EndTabItem(); } if (ImGui::BeginTabItem("Flags")) { - static uint32_t selectedGsMap = 0; - ImGui::Text("Gold Skulltulas"); - ImGui::Text("Map"); - ImGui::SameLine(); - if (ImGui::BeginCombo("##Gold Skulltula Map", gsMapping[selectedGsMap].c_str())) { - for (int32_t gsIndex = 0; gsIndex < gsMapping.size(); gsIndex++) { - if (ImGui::Selectable(gsMapping[gsIndex].c_str())) { - selectedGsMap = gsIndex; - } - } + DrawFlagsTab(); + ImGui::EndTabItem(); + } - ImGui::EndCombo(); - } - - // TODO We should write out descriptions for each one... ugh - ImGui::Text("Flags"); - uint32_t currentFlags = GET_GS_FLAGS(selectedGsMap); - uint32_t allFlags = gAreaGsFlags[selectedGsMap]; - uint32_t setMask = 1; - // Iterate over bitfield and create a checkbox for each skulltula - while (allFlags != 0) { - bool isThisSet = (currentFlags & 0x1) == 0x1; - - ImGui::SameLine(); - ImGui::PushID(allFlags); - if (ImGui::Checkbox("##gs", &isThisSet)) { - if (isThisSet) { - SET_GS_FLAGS(selectedGsMap, setMask); - } else { - // Have to do this roundabout method as the macro does not support clearing flags - uint32_t currentFlagsBase = GET_GS_FLAGS(selectedGsMap); - gSaveContext.gsFlags[selectedGsMap >> 2] &= ~gGsFlagsMasks[selectedGsMap & 3]; - SET_GS_FLAGS(selectedGsMap, currentFlagsBase & ~setMask); - } - } - - ImGui::PopID(); - - allFlags >>= 1; - currentFlags >>= 1; - setMask <<= 1; - } - - static bool keepGsCountUpdated = true; - ImGui::Checkbox("Keep GS Count Updated", &keepGsCountUpdated); - InsertHelpHoverText("Automatically adjust the number of gold skulltula tokens acquired based on set flags"); - int32_t gsCount = 0; - if (keepGsCountUpdated) { - for (int32_t gsFlagIndex = 0; gsFlagIndex < 6; gsFlagIndex++) { - gsCount += std::popcount(static_cast(gSaveContext.gsFlags[gsFlagIndex])); - } - gSaveContext.inventory.gsTokens = gsCount; - } - - // TODO other flag types, like switch, clear, etc. - // These flags interact with the actor context, so it's a bit more complicated + if (ImGui::BeginTabItem("Equipment")) { + DrawEquipmentTab(); + ImGui::EndTabItem(); + } + if (ImGui::BeginTabItem("Quest Status")) { + DrawQuestStatusTab(); ImGui::EndTabItem(); } @@ -523,5 +1125,16 @@ void InitSaveEditor() { // Load item icons into ImGui for (const auto& entry : itemMapping) { SohImGui::LoadResource(entry.second.name, entry.second.texturePath); + SohImGui::LoadResource(entry.second.nameFaded, entry.second.texturePath, ImVec4(1, 1, 1, 0.3f)); + } + for (const auto& entry : questMapping) { + SohImGui::LoadResource(entry.second.name, entry.second.texturePath); + SohImGui::LoadResource(entry.second.nameFaded, entry.second.texturePath, ImVec4(1, 1, 1, 0.3f)); + } + for (const auto& entry : songMapping) { + SohImGui::LoadResource(entry.name, gSongNoteTex, entry.color); + ImVec4 fadedCol = entry.color; + fadedCol.w = 0.3f; + SohImGui::LoadResource(entry.nameFaded, gSongNoteTex, fadedCol); } } diff --git a/soh/soh/util.cpp b/soh/soh/util.cpp new file mode 100644 index 000000000..7a5d0205d --- /dev/null +++ b/soh/soh/util.cpp @@ -0,0 +1,314 @@ +#include "util.h" + +#include + +std::vector sceneNames = { + "Inside the Deku Tree", + "Dodongo's Cavern", + "Inside Jabu-Jabu's Belly", + "Forest Temple", + "Fire Temple", + "Water Temple", + "Spirit Temple", + "Shadow Temple", + "Bottom of the Well", + "Ice Cavern", + "Ganon's Tower", + "Gerudo Training Ground", + "Thieves' Hideout", + "Inside Ganon's Castle", + "Ganon's Tower (Collapsing)", + "Inside Ganon's Castle (Collapsing)", + "Treasure Box Shop", + "Gohma's Lair", + "King Dodongo's Lair", + "Barinade's Lair", + "Phantom Ganon's Lair", + "Volvagia's Lair", + "Morpha's Lair", + "Twinrova's Lair & Nabooru's Mini-Boss Room", + "Bongo Bongo's Lair", + "Ganondorf's Lair", + "Tower Collapse Exterior", + "Market Entrance (Child - Day)", + "Market Entrance (Child - Night)", + "Market Entrance (Ruins)", + "Back Alley (Child - Day)", + "Back Alley (Child - Night)", + "Market (Child - Day)", + "Market (Child - Night)", + "Market (Ruins)", + "Temple of Time Exterior (Child - Day)", + "Temple of Time Exterior (Child - Night)", + "Temple of Time Exterior (Ruins)", + "Know-It-All Brothers' House", + "House of Twins", + "Mido's House", + "Saria's House", + "Carpenter Boss's House", + "Back Alley House (Man in Green)", + "Bazaar", + "Kokiri Shop", + "Goron Shop", + "Zora Shop", + "Kakariko Potion Shop", + "Market Potion Shop", + "Bombchu Shop", + "Happy Mask Shop", + "Link's House", + "Back Alley House (Dog Lady)", + "Stable", + "Impa's House", + "Lakeside Laboratory", + "Carpenters' Tent", + "Gravekeeper's Hut", + "Great Fairy's Fountain (Upgrades)", + "Fairy's Fountain", + "Great Fairy's Fountain (Spells)", + "Grottos", + "Grave (Redead)", + "Grave (Fairy's Fountain)", + "Royal Family's Tomb", + "Shooting Gallery", + "Temple of Time", + "Chamber of the Sages", + "Castle Hedge Maze (Day)", + "Castle Hedge Maze (Night)", + "Cutscene Map", + "Dampé's Grave & Windmill", + "Fishing Pond", + "Castle Courtyard", + "Bombchu Bowling Alley", + "Ranch House & Silo", + "Guard House", + "Granny's Potion Shop", + "Ganon's Tower Collapse & Battle Arena", + "House of Skulltula", + "Spot 00 - Hyrule Field", + "Spot 01 - Kakariko Village", + "Spot 02 - Graveyard", + "Spot 03 - Zora's River", + "Spot 04 - Kokiri Forest", + "Spot 05 - Sacred Forest Meadow", + "Spot 06 - Lake Hylia", + "Spot 07 - Zora's Domain", + "Spot 08 - Zora's Fountain", + "Spot 09 - Gerudo Valley", + "Spot 10 - Lost Woods", + "Spot 11 - Desert Colossus", + "Spot 12 - Gerudo's Fortress", + "Spot 13 - Haunted Wasteland", + "Spot 15 - Hyrule Castle", + "Spot 16 - Death Mountain Trail", + "Spot 17 - Death Mountain Crater", + "Spot 18 - Goron City", + "Spot 20 - Lon Lon Ranch", + "Ganon's Castle Exterior", + "Jungle Gym", + "Ganondorf Test Room", + "Depth Test", + "Stalfos Mini-Boss Room", + "Stalfos Boss Room", + "Sutaru", + "Castle Hedge Maze (Early)", + "Sasa Test", + "Treasure Chest Room", +}; + +std::vector itemNames = { + "Deku Stick", + "Deku Nut", + "Bomb", + "Fairy Bow", + "Fire Arrow", + "Din's Fire", + "Fairy Slingshot", + "Fairy Ocarina", + "Ocarina of Time", + "Bombchu", + "Hookshot", + "Longshot", + "Ice Arrow", + "Farore's Wind", + "Boomerang", + "Lens of Truth", + "Magic Bean", + "Megaton Hammer", + "Light Arrow", + "Nayru's Love", + "Empty Bottle", + "Red Potion", + "Green Potion", + "Blue Potion", + "Bottled Fairy", + "Fish", + "Lon Lon Milk & Bottle", + "Ruto's Letter", + "Blue Fire", + "Bug", + "Big Poe", + "Lon Lon Milk (Half)", + "Poe", + "Weird Egg", + "Chicken", + "Zelda's Letter", + "Keaton Mask", + "Skull Mask", + "Spooky Mask", + "Bunny Hood", + "Goron Mask", + "Zora Mask", + "Gerudo Mask", + "Mask of Truth", + "SOLD OUT", + "Pocket Egg", + "Pocket Cucco", + "Cojiro", + "Odd Mushroom", + "Odd Potion", + "Poacher's Saw", + "Goron's Sword (Broken)", + "Prescription", + "Eyeball Frog", + "Eye Drops", + "Claim Check", + "Fairy Bow & Fire Arrow", + "Fairy Bow & Ice Arrow", + "Fairy Bow & Light Arrow", + "Kokiri Sword", + "Master Sword", + "Giant's Knife & Biggoron's Sword", + "Deku Shield", + "Hylian Shield", + "Mirror Shield", + "Kokiri Tunic", + "Goron Tunic", + "Zora Tunic", + "Kokiri Boots", + "Iron Boots", + "Hover Boots", + "Bullet Bag (30)", + "Bullet Bag (40)", + "Bullet Bag (50)", + "Quiver (30)", + "Big Quiver (40)", + "Biggest Quiver (50)", + "Bomb Bag (20)", + "Big Bomb Bag (30)", + "Biggest Bomb Bag (40)", + "Goron's Bracelet", + "Silver Gauntlets", + "Golden Gauntlets", + "Silver Scale", + "Golden Scale", + "Giant's Knife (Broken)", + "Adult's Wallet", + "Giant's Wallet", + "Deku Seeds (5)", + "Fishing Pole", + "Minuet of Forest", + "Bolero of Fire", + "Serenade of Water", + "Requiem of Spirit", + "Nocturne of Shadow", + "Prelude of Light", + "Zelda's Lullaby", + "Epona's Song", + "Saria's Song", + "Sun's Song", + "Song of Time", + "Song of Storms", + "Forest Medallion", + "Fire Medallion", + "Water Medallion", + "Spirit Medallion", + "Shadow Medallion", + "Light Medallion", + "Kokiri's Emerald", + "Goron's Ruby", + "Zora's Sapphire", + "Stone of Agony", + "Gerudo's Card", + "Gold Skulltula Token", + "Heart Container", + "Piece of Heart [?]", + "Big Key", + "Compass", + "Dungeon Map", + "Small Key", + "Small Magic Jar", + "Large Magic Jar", + "Piece of Heart", + "[Removed]", + "[Removed]", + "[Removed]", + "[Removed]", + "[Removed]", + "[Removed]", + "[Removed]", + "Lon Lon Milk", + "Recovery Heart", + "Green Rupee", + "Blue Rupee", + "Red Rupee", + "Purple Rupee", + "Huge Rupee", + "[Removed]", + "Deku Sticks (5)", + "Deku Sticks (10)", + "Deku Nuts (5)", + "Deku Nuts (10)", + "Bombs (5)", + "Bombs (10)", + "Bombs (20)", + "Bombs (30)", + "Arrows (Small)", + "Arrows (Medium)", + "Arrows (Large)", + "Deku Seeds (30)", + "Bombchu (5)", + "Bombchu (20)", + "Deku Stick Upgrade (20)", + "Deku Stick Upgrade (30)", + "Deku Nut Upgrade (30)", + "Deku Nut Upgrade (40)", +}; + +std::vector questItemNames = { + "Forest Medallion", + "Fire Medallion", + "Water Medallion", + "Spirit Medallion", + "Shadow Medallion", + "Light Medallion", + "Minuet of Forest", + "Bolero of Fire", + "Serenade of Water", + "Requiem of Spirit", + "Nocturne of Shadow", + "Prelude of Light", + "Zelda's Lullaby", + "Epona's Song", + "Saria's Song", + "Sun's Song", + "Song of Time", + "Song of Storms", + "Kokiri's Emerald", + "Goron's Ruby", + "Zora's Sapphire", + "Stone of Agony", + "Gerudo's Card", + "Gold Skulltula Token", +}; + +const std::string& SohUtils::GetSceneName(int32_t scene) { + return sceneNames[scene]; +} + +const std::string& SohUtils::GetItemName(int32_t item) { + return itemNames[item]; +} + +const std::string& SohUtils::GetQuestItemName(int32_t item) { + return questItemNames[item]; +} diff --git a/soh/soh/util.h b/soh/soh/util.h new file mode 100644 index 000000000..9fd806f18 --- /dev/null +++ b/soh/soh/util.h @@ -0,0 +1,11 @@ +#pragma once +#include +#include + +namespace SohUtils { + const std::string& GetSceneName(int32_t scene); + + const std::string& GetItemName(int32_t item); + + const std::string& GetQuestItemName(int32_t item); +} // namespace SohUtils From fe6dbd2a5b38e63db5fde84091a68803892cc0f1 Mon Sep 17 00:00:00 2001 From: Sirius902 <10891979+Sirius902@users.noreply.github.com> Date: Sun, 17 Apr 2022 08:26:49 -0700 Subject: [PATCH 043/146] MM Bunny Hood enhancement (#181) Allow bunny hood in boss rooms Use math instead of array Allow other masks with enhancement because why not --- libultraship/libultraship/GameSettings.cpp | 4 +++ libultraship/libultraship/GameSettings.h | 1 + libultraship/libultraship/SohImGuiImpl.cpp | 7 ++++- soh/src/code/z_parameter.c | 6 ++++- .../actors/ovl_player_actor/z_player.c | 27 +++++++++++++++---- 5 files changed, 38 insertions(+), 7 deletions(-) diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index 678555c7d..1b8d473b2 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -61,6 +61,9 @@ namespace Game { Settings.enhancements.minimal_ui = stob(Conf[EnhancementSection]["minimal_ui"]); CVar_SetS32("gMinimalUI", Settings.enhancements.minimal_ui); + Settings.enhancements.mm_bunny_hood = stob(Conf[EnhancementSection]["mm_bunny_hood"]); + CVar_SetS32("gMMBunnyHood", Settings.enhancements.mm_bunny_hood); + // Audio Settings.audio.master = Ship::stof(Conf[AudioSection]["master"]); CVar_SetFloat("gGameMasterVolume", Settings.audio.master); @@ -152,6 +155,7 @@ namespace Game { Conf[EnhancementSection]["disable_lod"] = std::to_string(Settings.enhancements.disable_lod); Conf[EnhancementSection]["animated_pause_menu"] = std::to_string(Settings.enhancements.animated_pause_menu); Conf[EnhancementSection]["minimal_ui"] = std::to_string(Settings.enhancements.minimal_ui); + Conf[EnhancementSection]["mm_bunny_hood"] = std::to_string(Settings.enhancements.mm_bunny_hood); // Controllers Conf[ControllerSection]["gyro_sensitivity"] = std::to_string(Settings.controller.gyro_sensitivity); diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index 17079c9bf..340e93d26 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -24,6 +24,7 @@ struct SoHConfigType { bool disable_lod = false; bool animated_pause_menu = false; bool minimal_ui = false; + bool mm_bunny_hood = false; } enhancements; // Controller diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index b7e6e01ab..93dcd2492 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -413,6 +413,11 @@ namespace SohImGui { needs_save = true; } + if (ImGui::Checkbox("MM Bunny Hood", &Game::Settings.enhancements.mm_bunny_hood)) { + CVar_SetS32("gMMBunnyHood", Game::Settings.enhancements.mm_bunny_hood); + needs_save = true; + } + ImGui::Text("Graphics"); ImGui::Separator(); @@ -639,4 +644,4 @@ namespace SohImGui { ImTextureID GetTextureByName(const std::string& name) { return GetTextureByID(DefaultAssets[name]->textureId); } -} \ No newline at end of file +} diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index 1653cdaaf..dc96ba133 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -919,7 +919,11 @@ void func_80083108(GlobalContext* globalCtx) { if (interfaceCtx->restrictions.tradeItems != 0) { for (i = 1; i < 4; i++) { - if ((gSaveContext.equips.buttonItems[i] >= ITEM_WEIRD_EGG) && + if ((CVar_GetS32("gMMBunnyHood", 0) != 0) + && (gSaveContext.equips.buttonItems[i] >= ITEM_MASK_KEATON) + && (gSaveContext.equips.buttonItems[i] <= ITEM_MASK_TRUTH)) { + gSaveContext.buttonStatus[i] = BTN_ENABLED; + } else if ((gSaveContext.equips.buttonItems[i] >= ITEM_WEIRD_EGG) && (gSaveContext.equips.buttonItems[i] <= ITEM_CLAIM_CHECK)) { if (gSaveContext.buttonStatus[i] == BTN_ENABLED) { sp28 = 1; diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index a2a810175..734ba015e 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -1875,10 +1875,20 @@ void func_80833DF8(Player* this, GlobalContext* globalCtx) { s32 i; if (this->currentMask != PLAYER_MASK_NONE) { - maskActionParam = this->currentMask - 1 + PLAYER_AP_MASK_KEATON; - if (!func_80833C98(C_BTN_ITEM(0), maskActionParam) && !func_80833C98(C_BTN_ITEM(1), maskActionParam) && - !func_80833C98(C_BTN_ITEM(2), maskActionParam)) { - this->currentMask = PLAYER_MASK_NONE; + if (CVar_GetS32("gMMBunnyHood", 0) != 0) { + s32 maskItem = this->currentMask - PLAYER_MASK_KEATON + ITEM_MASK_KEATON; + + if (gSaveContext.equips.buttonItems[0] != maskItem && gSaveContext.equips.buttonItems[1] != maskItem && + gSaveContext.equips.buttonItems[2] != maskItem && gSaveContext.equips.buttonItems[3] != maskItem) { + this->currentMask = PLAYER_MASK_NONE; + func_808328EC(this, NA_SE_PL_CHANGE_ARMS); + } + } else { + maskActionParam = this->currentMask - 1 + PLAYER_AP_MASK_KEATON; + if (!func_80833C98(C_BTN_ITEM(0), maskActionParam) && !func_80833C98(C_BTN_ITEM(1), maskActionParam) && + !func_80833C98(C_BTN_ITEM(2), maskActionParam)) { + this->currentMask = PLAYER_MASK_NONE; + } } } @@ -5942,7 +5952,11 @@ void func_8083DFE0(Player* this, f32* arg1, s16* arg2) { s16 yawDiff = this->currentYaw - *arg2; if (this->swordState == 0) { - this->linearVelocity = CLAMP(this->linearVelocity, -(R_RUN_SPEED_LIMIT / 100.0f), (R_RUN_SPEED_LIMIT / 100.0f)); + float maxSpeed = R_RUN_SPEED_LIMIT / 100.0f; + if (CVar_GetS32("gMMBunnyHood", 0) != 0 && this->currentMask == PLAYER_MASK_BUNNY) { + maxSpeed *= 1.5f; + } + this->linearVelocity = CLAMP(this->linearVelocity, -maxSpeed, maxSpeed); } if (ABS(yawDiff) > 0x6000) { @@ -7523,6 +7537,9 @@ void func_80842180(Player* this, GlobalContext* globalCtx) { func_80837268(this, &sp2C, &sp2A, 0.018f, globalCtx); if (!func_8083C484(this, &sp2C, &sp2A)) { + if (CVar_GetS32("gMMBunnyHood", 0) != 0 && this->currentMask == PLAYER_MASK_BUNNY) { + sp2C *= 1.5f; + } func_8083DF68(this, sp2C, sp2A); func_8083DDC8(this, globalCtx); From ceef4a94537a9b6fd14b5ff1b58f4605fd4c64fd Mon Sep 17 00:00:00 2001 From: Emill Date: Mon, 18 Apr 2022 11:37:47 +0200 Subject: [PATCH 044/146] Graphics backend enhancements etc. (#163) --- libultraship/libultraship/GameSettings.h | 5 + .../Lib/Fast3D/gfx_direct3d11.cpp | 541 +++++++++--------- .../Lib/Fast3D/gfx_direct3d_common.cpp | 16 +- .../libultraship/Lib/Fast3D/gfx_dxgi.cpp | 27 +- .../libultraship/Lib/Fast3D/gfx_opengl.cpp | 292 ++++++---- .../libultraship/Lib/Fast3D/gfx_pc.cpp | 186 ++++-- libultraship/libultraship/Lib/Fast3D/gfx_pc.h | 13 +- .../Lib/Fast3D/gfx_rendering_api.h | 24 +- libultraship/libultraship/Lib/ImGui/imgui.h | 1 - .../libultraship/Lib/ImGui/imgui_widgets.cpp | 27 - libultraship/libultraship/SohImGuiImpl.cpp | 169 +++--- libultraship/libultraship/SohImGuiImpl.h | 5 +- libultraship/libultraship/Window.cpp | 4 + libultraship/libultraship/Window.h | 1 + soh/include/functions.h | 1 + soh/soh/GbiWrap.cpp | 1 + soh/soh/OTRGlobals.cpp | 75 ++- soh/soh/OTRGlobals.h | 2 +- soh/src/code/graph.c | 29 - soh/src/code/z_kankyo.c | 3 + soh/src/code/z_lights.c | 38 ++ 21 files changed, 872 insertions(+), 588 deletions(-) diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index 340e93d26..fe6087494 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -52,6 +52,11 @@ struct SoHConfigType { bool moon_jump_on_l = false; bool super_tunic = false; } cheats; + + // Graphics + struct { + bool show = false; + } graphics; }; enum SeqPlayers { diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp index 9c2f46422..04d777e7e 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp @@ -37,9 +37,8 @@ namespace { struct PerFrameCB { uint32_t noise_frame; - float noise_scale_x; - float noise_scale_y; - uint32_t padding; + float noise_scale; + uint32_t padding[2]; // constant buffers must be multiples of 16 bytes in size }; struct PerDrawCB { @@ -51,12 +50,12 @@ struct PerDrawCB { } textures[2]; }; -struct CoordCB { - float x, y; - float padding[2]; // structure size must be multiple of 16 +struct Coord { + int x, y; }; struct TextureData { + ComPtr texture; ComPtr resource_view; ComPtr sampler_state; uint32_t width; @@ -64,10 +63,13 @@ struct TextureData { bool linear_filtering; }; -struct FramebufferData { +struct Framebuffer { ComPtr render_target_view; ComPtr depth_stencil_view; + ComPtr depth_stencil_srv; uint32_t texture_id; + bool has_depth_buffer; + uint32_t msaa_level; }; struct ShaderProgramD3D11 { @@ -91,34 +93,30 @@ static struct { pD3DCompile D3DCompile; D3D_FEATURE_LEVEL feature_level; + uint32_t msaa_num_quality_levels[D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT]; ComPtr device; ComPtr swap_chain; ComPtr context; - ComPtr backbuffer_view; - ComPtr depth_stencil_view; - ComPtr depth_stencil_srv; ComPtr rasterizer_state; ComPtr depth_stencil_state; ComPtr vertex_buffer; ComPtr per_frame_cb; ComPtr per_draw_cb; - ComPtr depth_stencil_texture; - ComPtr depth_stencil_copy_texture; ComPtr coord_buffer; + ComPtr coord_buffer_srv; ComPtr depth_value_output_buffer; ComPtr depth_value_output_buffer_copy; ComPtr depth_value_output_uav; - ComPtr depth_value_sampler; ComPtr compute_shader; - bool copied_depth_buffer; + ComPtr compute_shader_msaa; + ComPtr compute_shader_msaa_blob; + size_t coord_buffer_size; #if DEBUG_D3D ComPtr debug; #endif - DXGI_SAMPLE_DESC sample_description; - PerFrameCB per_frame_cb_data; PerDrawCB per_draw_cb_data; @@ -128,14 +126,15 @@ static struct { int current_tile; uint32_t current_texture_ids[2]; - std::vector framebuffers; + std::vector framebuffers; // Current state struct ShaderProgramD3D11 *shader_program; - uint32_t current_width, current_height; + //uint32_t current_width, current_height; uint32_t render_target_height; + int current_framebuffer; int8_t depth_test; int8_t depth_mask; @@ -156,7 +155,9 @@ static struct { static LARGE_INTEGER last_time, accumulated_time, frequency; -void create_depth_stencil_objects(uint32_t width, uint32_t height, ID3D11Texture2D **texture, ID3D11DepthStencilView **view, ID3D11ShaderResourceView **srv) { +int gfx_d3d11_create_framebuffer(void); + +void create_depth_stencil_objects(uint32_t width, uint32_t height, uint32_t msaa_count, ID3D11DepthStencilView **view, ID3D11ShaderResourceView **srv) { D3D11_TEXTURE2D_DESC texture_desc; texture_desc.Width = width; texture_desc.Height = height; @@ -164,93 +165,42 @@ void create_depth_stencil_objects(uint32_t width, uint32_t height, ID3D11Texture texture_desc.ArraySize = 1; texture_desc.Format = d3d.feature_level >= D3D_FEATURE_LEVEL_10_0 ? DXGI_FORMAT_R32_TYPELESS : DXGI_FORMAT_R24G8_TYPELESS; - texture_desc.SampleDesc.Count = 1; + texture_desc.SampleDesc.Count = msaa_count; texture_desc.SampleDesc.Quality = 0; texture_desc.Usage = D3D11_USAGE_DEFAULT; texture_desc.BindFlags = D3D11_BIND_DEPTH_STENCIL | (srv != nullptr ? D3D11_BIND_SHADER_RESOURCE : 0); texture_desc.CPUAccessFlags = 0; texture_desc.MiscFlags = 0; - ThrowIfFailed(d3d.device->CreateTexture2D(&texture_desc, nullptr, texture)); + ComPtr texture; + ThrowIfFailed(d3d.device->CreateTexture2D(&texture_desc, nullptr, texture.GetAddressOf())); D3D11_DEPTH_STENCIL_VIEW_DESC view_desc; view_desc.Format = d3d.feature_level >= D3D_FEATURE_LEVEL_10_0 ? DXGI_FORMAT_D32_FLOAT : DXGI_FORMAT_D24_UNORM_S8_UINT; - view_desc.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2D; view_desc.Flags = 0; - view_desc.Texture2D.MipSlice = 0; + if (msaa_count > 1) { + view_desc.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2DMS; + view_desc.Texture2DMS.UnusedField_NothingToDefine = 0; + } else { + view_desc.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2D; + view_desc.Texture2D.MipSlice = 0; + } - ThrowIfFailed(d3d.device->CreateDepthStencilView(*texture, &view_desc, view)); + ThrowIfFailed(d3d.device->CreateDepthStencilView(texture.Get(), &view_desc, view)); if (srv != nullptr) { D3D11_SHADER_RESOURCE_VIEW_DESC srv_desc; srv_desc.Format = d3d.feature_level >= D3D_FEATURE_LEVEL_10_0 ? DXGI_FORMAT_R32_FLOAT : DXGI_FORMAT_R24_UNORM_X8_TYPELESS; - srv_desc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D; + srv_desc.ViewDimension = msaa_count > 1 ? D3D11_SRV_DIMENSION_TEXTURE2DMS : D3D11_SRV_DIMENSION_TEXTURE2D; srv_desc.Texture2D.MostDetailedMip = 0; srv_desc.Texture2D.MipLevels = -1; - ThrowIfFailed(d3d.device->CreateShaderResourceView(*texture, &srv_desc, srv)); + ThrowIfFailed(d3d.device->CreateShaderResourceView(texture.Get(), &srv_desc, srv)); } } -static void create_render_target_views(bool is_resize) { - DXGI_SWAP_CHAIN_DESC1 desc1; - - if (is_resize) { - // Release previous stuff (if any) - - d3d.backbuffer_view.Reset(); - d3d.depth_stencil_texture.Reset(); - d3d.depth_stencil_view.Reset(); - d3d.depth_stencil_srv.Reset(); - d3d.depth_stencil_copy_texture.Reset(); - - // Resize swap chain buffers - - ThrowIfFailed(d3d.swap_chain->GetDesc1(&desc1)); - ThrowIfFailed(d3d.swap_chain->ResizeBuffers(0, 0, 0, DXGI_FORMAT_UNKNOWN, desc1.Flags), - gfx_dxgi_get_h_wnd(), "Failed to resize IDXGISwapChain buffers."); - } - - // Get new size - - ThrowIfFailed(d3d.swap_chain->GetDesc1(&desc1)); - - // Create back buffer - - ComPtr backbuffer_texture; - ThrowIfFailed(d3d.swap_chain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID *) backbuffer_texture.GetAddressOf()), - gfx_dxgi_get_h_wnd(), "Failed to get backbuffer from IDXGISwapChain."); - - ThrowIfFailed(d3d.device->CreateRenderTargetView(backbuffer_texture.Get(), nullptr, d3d.backbuffer_view.GetAddressOf()), - gfx_dxgi_get_h_wnd(), "Failed to create render target view."); - - // Create depth buffer - create_depth_stencil_objects(desc1.Width, desc1.Height, d3d.depth_stencil_texture.GetAddressOf(), d3d.depth_stencil_view.GetAddressOf(), d3d.depth_stencil_srv.GetAddressOf()); - - // Create texture that can be used to retrieve depth value - - D3D11_TEXTURE2D_DESC depth_texture = {}; - depth_texture.Width = desc1.Width; - depth_texture.Height = desc1.Height; - depth_texture.MipLevels = 1; - depth_texture.ArraySize = 1; - depth_texture.Format = DXGI_FORMAT_D32_FLOAT; - depth_texture.SampleDesc.Count = 1; - depth_texture.SampleDesc.Quality = 0; - depth_texture.Usage = D3D11_USAGE_STAGING; - depth_texture.BindFlags = 0; - depth_texture.CPUAccessFlags = D3D11_CPU_ACCESS_READ; - depth_texture.MiscFlags = 0; - ThrowIfFailed(d3d.device->CreateTexture2D(&depth_texture, nullptr, d3d.depth_stencil_copy_texture.GetAddressOf())); - - // Save resolution - - d3d.current_width = desc1.Width; - d3d.current_height = desc1.Height; -} - static void gfx_d3d11_init(void) { // Load d3d11.dll d3d.d3d11_module = LoadLibraryW(L"d3d11.dll"); @@ -300,11 +250,6 @@ static void gfx_d3d11_init(void) { } }); - // Sample description to be used in back buffer and depth buffer - - d3d.sample_description.Count = 1; - d3d.sample_description.Quality = 0; - // Create the swap chain d3d.swap_chain = gfx_dxgi_create_swap_chain(d3d.device.Get()); @@ -315,9 +260,19 @@ static void gfx_d3d11_init(void) { gfx_dxgi_get_h_wnd(), "Failed to get ID3D11Debug device."); #endif - // Create views + // Create the default framebuffer which represents the window + Framebuffer& fb = d3d.framebuffers[gfx_d3d11_create_framebuffer()]; - create_render_target_views(false); + // Check the size of the window + DXGI_SWAP_CHAIN_DESC1 swap_chain_desc; + ThrowIfFailed(d3d.swap_chain->GetDesc1(&swap_chain_desc)); + d3d.textures[fb.texture_id].width = swap_chain_desc.Width; + d3d.textures[fb.texture_id].height = swap_chain_desc.Height; + fb.msaa_level = 1; + + for (uint32_t sample_count = 1; sample_count <= D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT; sample_count++) { + ThrowIfFailed(d3d.device->CheckMultisampleQualityLevels(DXGI_FORMAT_R8G8B8A8_UNORM, sample_count, &d3d.msaa_num_quality_levels[sample_count - 1])); + } // Create main vertex buffer @@ -364,61 +319,30 @@ static void gfx_d3d11_init(void) { // Create compute shader that can be used to retrieve depth buffer values - D3D11_BUFFER_DESC coord_cb_desc; - coord_cb_desc.Usage = D3D11_USAGE_DYNAMIC; - coord_cb_desc.ByteWidth = sizeof(CoordCB); - coord_cb_desc.BindFlags = D3D11_BIND_CONSTANT_BUFFER; - coord_cb_desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; - coord_cb_desc.MiscFlags = 0; - coord_cb_desc.StructureByteStride = 0; - - ThrowIfFailed(d3d.device->CreateBuffer(&coord_cb_desc, nullptr, d3d.coord_buffer.GetAddressOf())); - - D3D11_SAMPLER_DESC sampler_desc = {}; - sampler_desc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT; - sampler_desc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP; - sampler_desc.AddressV = D3D11_TEXTURE_ADDRESS_CLAMP; - sampler_desc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP; - sampler_desc.MinLOD = 0; - sampler_desc.MaxLOD = D3D11_FLOAT32_MAX; - ThrowIfFailed(d3d.device->CreateSamplerState(&sampler_desc, d3d.depth_value_sampler.GetAddressOf())); - - D3D11_BUFFER_DESC output_buffer_desc; - output_buffer_desc.Usage = D3D11_USAGE_DEFAULT; - output_buffer_desc.ByteWidth = sizeof(float); - output_buffer_desc.BindFlags = D3D11_BIND_UNORDERED_ACCESS; - output_buffer_desc.CPUAccessFlags = 0; - output_buffer_desc.MiscFlags = D3D11_RESOURCE_MISC_BUFFER_STRUCTURED; - output_buffer_desc.StructureByteStride = sizeof(float); - ThrowIfFailed(d3d.device->CreateBuffer(&output_buffer_desc, nullptr, d3d.depth_value_output_buffer.GetAddressOf())); - - D3D11_UNORDERED_ACCESS_VIEW_DESC output_buffer_uav_desc; - output_buffer_uav_desc.Format = DXGI_FORMAT_UNKNOWN; - output_buffer_uav_desc.ViewDimension = D3D11_UAV_DIMENSION_BUFFER; - output_buffer_uav_desc.Buffer.FirstElement = 0; - output_buffer_uav_desc.Buffer.NumElements = 1; - output_buffer_uav_desc.Buffer.Flags = 0; - ThrowIfFailed(d3d.device->CreateUnorderedAccessView(d3d.depth_value_output_buffer.Get(), &output_buffer_uav_desc, d3d.depth_value_output_uav.GetAddressOf())); - - output_buffer_desc.Usage = D3D11_USAGE_STAGING; - output_buffer_desc.BindFlags = 0; - output_buffer_desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ; - ThrowIfFailed(d3d.device->CreateBuffer(&output_buffer_desc, nullptr, d3d.depth_value_output_buffer_copy.GetAddressOf())); - const char* shader_source = R"( sampler my_sampler : register(s0); Texture2D tex : register(t0); -cbuffer coordCB : register(b0) { - float2 coord; -} - +StructuredBuffer coord : register(t1); RWStructuredBuffer output : register(u0); [numthreads(1, 1, 1)] void CSMain(uint3 DTid : SV_DispatchThreadID) { - output[0] = tex.SampleLevel(my_sampler, coord, 0); + output[DTid.x] = tex.Load(int3(coord[DTid.x], 0)); } )"; + + const char* shader_source_msaa = R"( +sampler my_sampler : register(s0); +Texture2DMS tex : register(t0); +StructuredBuffer coord : register(t1); +RWStructuredBuffer output : register(u0); + +[numthreads(1, 1, 1)] +void CSMain(uint3 DTid : SV_DispatchThreadID) { + output[DTid.x] = tex.Load(coord[DTid.x], 0); +} +)"; + #if DEBUG_D3D UINT compile_flags = D3DCOMPILE_DEBUG; #else @@ -426,7 +350,9 @@ void CSMain(uint3 DTid : SV_DispatchThreadID) { #endif ComPtr cs, error_blob; - HRESULT hr = d3d.D3DCompile(shader_source, strlen(shader_source), nullptr, nullptr, nullptr, "CSMain", "cs_4_0", compile_flags, 0, cs.GetAddressOf(), error_blob.GetAddressOf()); + HRESULT hr; + + hr = d3d.D3DCompile(shader_source, strlen(shader_source), nullptr, nullptr, nullptr, "CSMain", "cs_4_0", compile_flags, 0, cs.GetAddressOf(), error_blob.GetAddressOf()); if (FAILED(hr)) { char* err = (char*)error_blob->GetBufferPointer(); @@ -436,6 +362,14 @@ void CSMain(uint3 DTid : SV_DispatchThreadID) { ThrowIfFailed(d3d.device->CreateComputeShader(cs->GetBufferPointer(), cs->GetBufferSize(), nullptr, d3d.compute_shader.GetAddressOf())); + hr = d3d.D3DCompile(shader_source_msaa, strlen(shader_source_msaa), nullptr, nullptr, nullptr, "CSMain", "cs_4_1", compile_flags, 0, d3d.compute_shader_msaa_blob.GetAddressOf(), error_blob.ReleaseAndGetAddressOf()); + + if (FAILED(hr)) { + char* err = (char*)error_blob->GetBufferPointer(); + MessageBoxA(gfx_dxgi_get_h_wnd(), err, "Error", MB_OK | MB_ICONERROR); + throw hr; + } + // Create ImGui SohImGui::WindowImpl window_impl; @@ -445,8 +379,8 @@ void CSMain(uint3 DTid : SV_DispatchThreadID) { } -static bool gfx_d3d11_z_is_from_0_to_1(void) { - return true; +static struct GfxClipParameters gfx_d3d11_get_clip_parameters(void) { + return { true, false }; } static void gfx_d3d11_unload_shader(struct ShaderProgram *old_prg) { @@ -531,8 +465,8 @@ static struct ShaderProgram *gfx_d3d11_create_and_load_new_shader(uint64_t shade blend_desc.RenderTarget[0].SrcBlend = D3D11_BLEND_SRC_ALPHA; blend_desc.RenderTarget[0].DestBlend = D3D11_BLEND_INV_SRC_ALPHA; blend_desc.RenderTarget[0].BlendOp = D3D11_BLEND_OP_ADD; - blend_desc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_SRC_ALPHA; - blend_desc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_INV_SRC_ALPHA; + blend_desc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_ZERO; + blend_desc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_ONE; // We initially clear alpha to 1.0f and want to keep it at 1.0f blend_desc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD; blend_desc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL; } else { @@ -592,6 +526,10 @@ static D3D11_TEXTURE_ADDRESS_MODE gfx_cm_to_d3d11(uint32_t val) { static void gfx_d3d11_upload_texture(const uint8_t *rgba32_buf, uint32_t width, uint32_t height) { // Create texture + TextureData *texture_data = &d3d.textures[d3d.current_texture_ids[d3d.current_tile]]; + texture_data->width = width; + texture_data->height = height; + D3D11_TEXTURE2D_DESC texture_desc; ZeroMemory(&texture_desc, sizeof(D3D11_TEXTURE2D_DESC)); @@ -612,21 +550,11 @@ static void gfx_d3d11_upload_texture(const uint8_t *rgba32_buf, uint32_t width, resource_data.SysMemPitch = width * 4; resource_data.SysMemSlicePitch = resource_data.SysMemPitch * height; - ComPtr texture; - ThrowIfFailed(d3d.device->CreateTexture2D(&texture_desc, &resource_data, texture.GetAddressOf())); - - TextureData *texture_data = &d3d.textures[d3d.current_texture_ids[d3d.current_tile]]; - texture_data->width = width; - texture_data->height = height; + ThrowIfFailed(d3d.device->CreateTexture2D(&texture_desc, &resource_data, texture_data->texture.ReleaseAndGetAddressOf())); // Create shader resource view from texture - if (texture_data->resource_view.Get() != nullptr) { - // Free the previous texture in this slot - texture_data->resource_view.Reset(); - } - - ThrowIfFailed(d3d.device->CreateShaderResourceView(texture.Get(), nullptr, texture_data->resource_view.GetAddressOf())); + ThrowIfFailed(d3d.device->CreateShaderResourceView(texture_data->texture.Get(), nullptr, texture_data->resource_view.ReleaseAndGetAddressOf())); } static void gfx_d3d11_set_sampler_parameters(int tile, bool linear_filter, uint32_t cms, uint32_t cmt) { @@ -803,20 +731,10 @@ static void gfx_d3d11_draw_triangles(float buf_vbo[], size_t buf_vbo_len, size_t } static void gfx_d3d11_on_resize(void) { - create_render_target_views(true); + //create_render_target_views(true); } static void gfx_d3d11_start_frame(void) { - // Set render targets - - d3d.context->OMSetRenderTargets(1, d3d.backbuffer_view.GetAddressOf(), d3d.depth_stencil_view.Get()); - - // Clear render targets - - const float clearColor[] = { 0.0f, 0.0f, 0.0f, 1.0f }; - d3d.context->ClearRenderTargetView(d3d.backbuffer_view.Get(), clearColor); - d3d.context->ClearDepthStencilView(d3d.depth_stencil_view.Get(), D3D11_CLEAR_DEPTH, 1.0f, 0); - // Set per-frame constant buffer d3d.per_frame_cb_data.noise_frame++; @@ -824,22 +742,9 @@ static void gfx_d3d11_start_frame(void) { // No high values, as noise starts to look ugly d3d.per_frame_cb_data.noise_frame = 0; } - float aspect_ratio = (float) d3d.current_width / (float) d3d.current_height; - d3d.render_target_height = d3d.current_height; - d3d.per_frame_cb_data.noise_scale_x = 120 * aspect_ratio; // 120 = N64 height resolution (240) / 2 - d3d.per_frame_cb_data.noise_scale_y = 120; - - D3D11_MAPPED_SUBRESOURCE ms; - ZeroMemory(&ms, sizeof(D3D11_MAPPED_SUBRESOURCE)); - d3d.context->Map(d3d.per_frame_cb.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &ms); - memcpy(ms.pData, &d3d.per_frame_cb_data, sizeof(PerFrameCB)); - d3d.context->Unmap(d3d.per_frame_cb.Get(), 0); - - d3d.copied_depth_buffer = false; } static void gfx_d3d11_end_frame(void) { - SohImGui::Draw(); d3d.context->Flush(); } @@ -847,43 +752,13 @@ static void gfx_d3d11_finish_render(void) { d3d.context->Flush(); } -void gfx_d3d11_resize_framebuffer(int fb, uint32_t width, uint32_t height) { - FramebufferData& fd = d3d.framebuffers[fb]; - TextureData& td = d3d.textures[fd.texture_id]; - - ComPtr texture, depth_stencil_texture; - - D3D11_TEXTURE2D_DESC texture_desc; - texture_desc.Width = width; - texture_desc.Height = height; - texture_desc.Usage = D3D11_USAGE_DEFAULT; - texture_desc.BindFlags = D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET; - texture_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; - texture_desc.CPUAccessFlags = 0; - texture_desc.MiscFlags = 0; - texture_desc.ArraySize = 1; - texture_desc.MipLevels = 1; - texture_desc.SampleDesc.Count = 1; - texture_desc.SampleDesc.Quality = 0; - - ThrowIfFailed(d3d.device->CreateTexture2D(&texture_desc, nullptr, texture.GetAddressOf())); - create_depth_stencil_objects(width, height, depth_stencil_texture.GetAddressOf(), fd.depth_stencil_view.ReleaseAndGetAddressOf(), nullptr); - ThrowIfFailed(d3d.device->CreateRenderTargetView(texture.Get(), nullptr, fd.render_target_view.ReleaseAndGetAddressOf())); - ThrowIfFailed(d3d.device->CreateShaderResourceView(texture.Get(), nullptr, td.resource_view.ReleaseAndGetAddressOf())); - - td.width = width; - td.height = height; -} - -int gfx_d3d11_create_framebuffer(uint32_t width, uint32_t height) { +int gfx_d3d11_create_framebuffer(void) { uint32_t texture_id = gfx_d3d11_new_texture(); TextureData& t = d3d.textures[texture_id]; - t.width = width; - t.height = height; size_t index = d3d.framebuffers.size(); d3d.framebuffers.resize(d3d.framebuffers.size() + 1); - FramebufferData& data = d3d.framebuffers.back(); + Framebuffer& data = d3d.framebuffers.back(); data.texture_id = texture_id; uint32_t tile = 0; @@ -892,24 +767,109 @@ int gfx_d3d11_create_framebuffer(uint32_t width, uint32_t height) { gfx_d3d11_set_sampler_parameters(0, true, G_TX_WRAP, G_TX_WRAP); d3d.current_texture_ids[tile] = saved; - gfx_d3d11_resize_framebuffer(index, width, height); - return (int)index; } -void gfx_d3d11_set_framebuffer(int fb) { - d3d.render_target_height = d3d.textures[d3d.framebuffers[fb].texture_id].height; +static void gfx_d3d11_update_framebuffer_parameters(int fb_id, uint32_t width, uint32_t height, uint32_t msaa_level, bool opengl_invert_y, bool render_target, bool has_depth_buffer, bool can_extract_depth) { + Framebuffer& fb = d3d.framebuffers[fb_id]; + TextureData& tex = d3d.textures[fb.texture_id]; - d3d.context->OMSetRenderTargets(1, d3d.framebuffers[fb].render_target_view.GetAddressOf(), d3d.framebuffers[fb].depth_stencil_view.Get()); + width = max(width, 1U); + height = max(height, 1U); + while (msaa_level > 1 && d3d.msaa_num_quality_levels[msaa_level - 1] == 0) { + --msaa_level; + } - const float clearColor[] = { 0.0f, 0.0f, 0.0f, 1.0f }; - d3d.context->ClearRenderTargetView(d3d.framebuffers[fb].render_target_view.Get(), clearColor); - d3d.context->ClearDepthStencilView(d3d.framebuffers[fb].depth_stencil_view.Get(), D3D11_CLEAR_DEPTH, 1.0f, 0); + bool diff = tex.width != width || tex.height != height || fb.msaa_level != msaa_level; + + if (diff || (fb.render_target_view.Get() != nullptr) != render_target) { + if (fb_id != 0) { + D3D11_TEXTURE2D_DESC texture_desc; + texture_desc.Width = width; + texture_desc.Height = height; + texture_desc.Usage = D3D11_USAGE_DEFAULT; + texture_desc.BindFlags = (msaa_level <= 1 ? D3D11_BIND_SHADER_RESOURCE : 0) | (render_target ? D3D11_BIND_RENDER_TARGET : 0); + texture_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; + texture_desc.CPUAccessFlags = 0; + texture_desc.MiscFlags = 0; + texture_desc.ArraySize = 1; + texture_desc.MipLevels = 1; + texture_desc.SampleDesc.Count = msaa_level; + texture_desc.SampleDesc.Quality = 0; + + ThrowIfFailed(d3d.device->CreateTexture2D(&texture_desc, nullptr, tex.texture.ReleaseAndGetAddressOf())); + + if (msaa_level <= 1) { + ThrowIfFailed(d3d.device->CreateShaderResourceView(tex.texture.Get(), nullptr, tex.resource_view.ReleaseAndGetAddressOf())); + } + } else if (diff) { + DXGI_SWAP_CHAIN_DESC1 desc1; + ThrowIfFailed(d3d.swap_chain->GetDesc1(&desc1)); + if (desc1.Width != width || desc1.Height != height) { + fb.render_target_view.Reset(); + tex.texture.Reset(); + ThrowIfFailed(d3d.swap_chain->ResizeBuffers(0, 0, 0, DXGI_FORMAT_UNKNOWN, desc1.Flags)); + } + ThrowIfFailed(d3d.swap_chain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID *)tex.texture.ReleaseAndGetAddressOf())); + } + if (render_target) { + ThrowIfFailed(d3d.device->CreateRenderTargetView(tex.texture.Get(), nullptr, fb.render_target_view.ReleaseAndGetAddressOf())); + } + + tex.width = width; + tex.height = height; + } + + if (has_depth_buffer && (diff || !fb.has_depth_buffer || (fb.depth_stencil_srv.Get() != nullptr) != can_extract_depth)) { + fb.depth_stencil_srv.Reset(); + create_depth_stencil_objects(width, height, msaa_level, fb.depth_stencil_view.ReleaseAndGetAddressOf(), can_extract_depth ? fb.depth_stencil_srv.GetAddressOf() : nullptr); + } + if (!has_depth_buffer) { + fb.depth_stencil_view.Reset(); + fb.depth_stencil_srv.Reset(); + } + + fb.has_depth_buffer = has_depth_buffer; + fb.msaa_level = msaa_level; } -void gfx_d3d11_reset_framebuffer(void) { - d3d.render_target_height = d3d.current_height; - d3d.context->OMSetRenderTargets(1, d3d.backbuffer_view.GetAddressOf(), d3d.depth_stencil_view.Get()); +void gfx_d3d11_start_draw_to_framebuffer(int fb_id, float noise_scale) { + Framebuffer& fb = d3d.framebuffers[fb_id]; + d3d.render_target_height = d3d.textures[fb.texture_id].height; + + d3d.context->OMSetRenderTargets(1, fb.render_target_view.GetAddressOf(), fb.has_depth_buffer ? fb.depth_stencil_view.Get() : nullptr); + + d3d.current_framebuffer = fb_id; + + if (noise_scale != 0.0f) { + d3d.per_frame_cb_data.noise_scale = 1.0f / noise_scale; + } + + D3D11_MAPPED_SUBRESOURCE ms; + ZeroMemory(&ms, sizeof(D3D11_MAPPED_SUBRESOURCE)); + d3d.context->Map(d3d.per_frame_cb.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &ms); + memcpy(ms.pData, &d3d.per_frame_cb_data, sizeof(PerFrameCB)); + d3d.context->Unmap(d3d.per_frame_cb.Get(), 0); +} + +void gfx_d3d11_clear_framebuffer(void) { + Framebuffer& fb = d3d.framebuffers[d3d.current_framebuffer]; + const float clearColor[] = { 0.0f, 0.0f, 0.0f, 1.0f }; + d3d.context->ClearRenderTargetView(fb.render_target_view.Get(), clearColor); + if (fb.has_depth_buffer) { + d3d.context->ClearDepthStencilView(fb.depth_stencil_view.Get(), D3D11_CLEAR_DEPTH, 1.0f, 0); + } +} + +void gfx_d3d11_resolve_msaa_color_buffer(int fb_id_target, int fb_id_source) { + Framebuffer& fb_dst = d3d.framebuffers[fb_id_target]; + Framebuffer& fb_src = d3d.framebuffers[fb_id_source]; + + d3d.context->ResolveSubresource(d3d.textures[fb_dst.texture_id].texture.Get(), 0, d3d.textures[fb_src.texture_id].texture.Get(), 0, DXGI_FORMAT_R8G8B8A8_UNORM); +} + +void *gfx_d3d11_get_framebuffer_texture_id(int fb_id) { + return (void *)d3d.textures[d3d.framebuffers[fb_id].texture_id].resource_view.Get(); } void gfx_d3d11_select_texture_fb(int fbID) { @@ -917,62 +877,107 @@ void gfx_d3d11_select_texture_fb(int fbID) { gfx_d3d11_select_texture(tile, d3d.framebuffers[fbID].texture_id); } -uint16_t gfx_d3d11_get_pixel_depth(float x, float y) { +std::map, uint16_t> gfx_d3d11_get_pixel_depth(int fb_id, const std::set>& coordinates) { + Framebuffer& fb = d3d.framebuffers[fb_id]; + TextureData& td = d3d.textures[fb.texture_id]; + + if (coordinates.size() > d3d.coord_buffer_size) { + d3d.coord_buffer.Reset(); + d3d.coord_buffer_srv.Reset(); + d3d.depth_value_output_buffer.Reset(); + d3d.depth_value_output_uav.Reset(); + d3d.depth_value_output_buffer_copy.Reset(); + + D3D11_BUFFER_DESC coord_buf_desc; + coord_buf_desc.Usage = D3D11_USAGE_DYNAMIC; + coord_buf_desc.ByteWidth = sizeof(Coord) * coordinates.size(); + coord_buf_desc.BindFlags = D3D11_BIND_SHADER_RESOURCE; + coord_buf_desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; + coord_buf_desc.MiscFlags = D3D11_RESOURCE_MISC_BUFFER_STRUCTURED; + coord_buf_desc.StructureByteStride = sizeof(Coord); + + ThrowIfFailed(d3d.device->CreateBuffer(&coord_buf_desc, nullptr, d3d.coord_buffer.GetAddressOf())); + + D3D11_SHADER_RESOURCE_VIEW_DESC coord_buf_srv_desc; + coord_buf_srv_desc.Format = DXGI_FORMAT_UNKNOWN; + coord_buf_srv_desc.ViewDimension = D3D11_SRV_DIMENSION_BUFFER; + coord_buf_srv_desc.Buffer.FirstElement = 0; + coord_buf_srv_desc.Buffer.NumElements = coordinates.size(); + + ThrowIfFailed(d3d.device->CreateShaderResourceView(d3d.coord_buffer.Get(), &coord_buf_srv_desc, d3d.coord_buffer_srv.GetAddressOf())); + + D3D11_BUFFER_DESC output_buffer_desc; + output_buffer_desc.Usage = D3D11_USAGE_DEFAULT; + output_buffer_desc.ByteWidth = sizeof(float) * coordinates.size(); + output_buffer_desc.BindFlags = D3D11_BIND_UNORDERED_ACCESS; + output_buffer_desc.CPUAccessFlags = 0; + output_buffer_desc.MiscFlags = D3D11_RESOURCE_MISC_BUFFER_STRUCTURED; + output_buffer_desc.StructureByteStride = sizeof(float); + ThrowIfFailed(d3d.device->CreateBuffer(&output_buffer_desc, nullptr, d3d.depth_value_output_buffer.GetAddressOf())); + + D3D11_UNORDERED_ACCESS_VIEW_DESC output_buffer_uav_desc; + output_buffer_uav_desc.Format = DXGI_FORMAT_UNKNOWN; + output_buffer_uav_desc.ViewDimension = D3D11_UAV_DIMENSION_BUFFER; + output_buffer_uav_desc.Buffer.FirstElement = 0; + output_buffer_uav_desc.Buffer.NumElements = coordinates.size(); + output_buffer_uav_desc.Buffer.Flags = 0; + ThrowIfFailed(d3d.device->CreateUnorderedAccessView(d3d.depth_value_output_buffer.Get(), &output_buffer_uav_desc, d3d.depth_value_output_uav.GetAddressOf())); + + output_buffer_desc.Usage = D3D11_USAGE_STAGING; + output_buffer_desc.BindFlags = 0; + output_buffer_desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ; + ThrowIfFailed(d3d.device->CreateBuffer(&output_buffer_desc, nullptr, d3d.depth_value_output_buffer_copy.GetAddressOf())); + + d3d.coord_buffer_size = coordinates.size(); + } + D3D11_MAPPED_SUBRESOURCE ms; + if (fb.msaa_level > 1 && d3d.compute_shader_msaa.Get() == nullptr) { + ThrowIfFailed(d3d.device->CreateComputeShader(d3d.compute_shader_msaa_blob->GetBufferPointer(), d3d.compute_shader_msaa_blob->GetBufferSize(), nullptr, d3d.compute_shader_msaa.GetAddressOf())); + } + // ImGui overwrites these values, so we cannot set them once at init - d3d.context->CSSetShader(d3d.compute_shader.Get(), nullptr, 0); - d3d.context->CSSetConstantBuffers(0, 1, d3d.coord_buffer.GetAddressOf()); - d3d.context->CSSetSamplers(0, 1, d3d.depth_value_sampler.GetAddressOf()); + d3d.context->CSSetShader(fb.msaa_level > 1 ? d3d.compute_shader_msaa.Get() : d3d.compute_shader.Get(), nullptr, 0); d3d.context->CSSetUnorderedAccessViews(0, 1, d3d.depth_value_output_uav.GetAddressOf(), nullptr); ThrowIfFailed(d3d.context->Map(d3d.coord_buffer.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &ms)); - CoordCB* coord_cb = (CoordCB*)ms.pData; - coord_cb->x = x / d3d.current_width; - // We invert y because the game assumes OpenGL coordinates (bottom-left corner is origin), while DX's origin is top-left corner - coord_cb->y = 1 - y / d3d.current_height; + Coord *coord_cb = (Coord *)ms.pData; + { + size_t i = 0; + for (const auto& coord : coordinates) { + coord_cb[i].x = coord.first; + // We invert y because the gfx_pc assumes OpenGL coordinates (bottom-left corner is origin), while DX's origin is top-left corner + coord_cb[i].y = td.height - 1 - coord.second; + ++i; + } + } d3d.context->Unmap(d3d.coord_buffer.Get(), 0); - // The depth stencil texture can only have one mapping at a time, so temporarily unbind from the OM - d3d.context->OMSetRenderTargets(1, d3d.backbuffer_view.GetAddressOf(), nullptr); - d3d.context->CSSetShaderResources(0, 1, d3d.depth_stencil_srv.GetAddressOf()); + // The depth stencil texture can only have one mapping at a time, so unbind from the OM + ID3D11RenderTargetView* null_arr1[1] = { nullptr }; + d3d.context->OMSetRenderTargets(1, null_arr1, nullptr); - d3d.context->Dispatch(1, 1, 1); + ID3D11ShaderResourceView *srvs[] = { fb.depth_stencil_srv.Get(), d3d.coord_buffer_srv.Get() }; + d3d.context->CSSetShaderResources(0, 2, srvs); + + d3d.context->Dispatch(coordinates.size(), 1, 1); d3d.context->CopyResource(d3d.depth_value_output_buffer_copy.Get(), d3d.depth_value_output_buffer.Get()); ThrowIfFailed(d3d.context->Map(d3d.depth_value_output_buffer_copy.Get(), 0, D3D11_MAP_READ, 0, &ms)); - float res = *(float *)ms.pData; - d3d.context->Unmap(d3d.depth_value_output_buffer_copy.Get(), 0); - - ID3D11ShaderResourceView *null_arr[1] = { nullptr }; - d3d.context->CSSetShaderResources(0, 1, null_arr); - d3d.context->OMSetRenderTargets(1, d3d.backbuffer_view.GetAddressOf(), d3d.depth_stencil_view.Get()); - - return res * 65532.0f; -} - -uint16_t gfx_d3d11_get_pixel_depth_old(float x, float y) { - // This approach, compared to using a compute shader, might have better performance on nvidia cards - - if (!d3d.copied_depth_buffer) { - d3d.context->CopyResource(d3d.depth_stencil_copy_texture.Get(), d3d.depth_stencil_texture.Get()); - d3d.copied_depth_buffer = true; - } - - D3D11_MAPPED_SUBRESOURCE mapping_desc; - d3d.context->Map(d3d.depth_stencil_copy_texture.Get(), 0, D3D11_MAP_READ, 0, &mapping_desc); - float res = 0; - if (mapping_desc.pData != nullptr) { - float *addr = (float *)mapping_desc.pData; - uint32_t num_pixels = mapping_desc.DepthPitch / sizeof(float); - uint32_t width = mapping_desc.RowPitch / sizeof(float); - uint32_t height = width == 0 ? 0 : num_pixels / width; - if (x >= 0 && x < width && y >= 0 && y < height) { - res = addr[width * (height - 1 - (int)y) + (int)x]; + std::map, uint16_t> res; + { + size_t i = 0; + for (const auto& coord : coordinates) { + res.emplace(coord, ((float *)ms.pData)[i++] * 65532.0f); } } - d3d.context->Unmap(d3d.depth_stencil_copy_texture.Get(), 0); - return res * 65532.0f; + d3d.context->Unmap(d3d.depth_value_output_buffer_copy.Get(), 0); + + ID3D11ShaderResourceView *null_arr[2] = { nullptr, nullptr }; + d3d.context->CSSetShaderResources(0, 2, null_arr); + + return res; } } // namespace @@ -982,7 +987,7 @@ ImTextureID SohImGui::GetTextureByID(int id) { } struct GfxRenderingAPI gfx_direct3d11_api = { - gfx_d3d11_z_is_from_0_to_1, + gfx_d3d11_get_clip_parameters, gfx_d3d11_unload_shader, gfx_d3d11_load_shader, gfx_d3d11_create_and_load_new_shader, @@ -993,7 +998,6 @@ struct GfxRenderingAPI gfx_direct3d11_api = { gfx_d3d11_upload_texture, gfx_d3d11_set_sampler_parameters, gfx_d3d11_set_depth_test_and_mask, - gfx_d3d11_get_pixel_depth, gfx_d3d11_set_zmode_decal, gfx_d3d11_set_viewport, gfx_d3d11_set_scissor, @@ -1005,9 +1009,12 @@ struct GfxRenderingAPI gfx_direct3d11_api = { gfx_d3d11_end_frame, gfx_d3d11_finish_render, gfx_d3d11_create_framebuffer, - gfx_d3d11_resize_framebuffer, - gfx_d3d11_set_framebuffer, - gfx_d3d11_reset_framebuffer, + gfx_d3d11_update_framebuffer_parameters, + gfx_d3d11_start_draw_to_framebuffer, + gfx_d3d11_clear_framebuffer, + gfx_d3d11_resolve_msaa_color_buffer, + gfx_d3d11_get_pixel_depth, + gfx_d3d11_get_framebuffer_texture_id, gfx_d3d11_select_texture_fb, gfx_d3d11_delete_texture }; diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp index ca60aef8b..f778812d1 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp @@ -134,9 +134,6 @@ void gfx_direct3d_common_build_shader(char buf[4096], size_t& len, size_t& num_f } } } - if (cc_features.opt_alpha && cc_features.opt_noise) { - append_line(buf, &len, " float4 screenPos : TEXCOORD2;"); - } if (cc_features.opt_fog) { append_line(buf, &len, " float4 fog : FOG;"); num_floats += 4; @@ -163,7 +160,7 @@ void gfx_direct3d_common_build_shader(char buf[4096], size_t& len, size_t& num_f if (cc_features.opt_alpha && cc_features.opt_noise) { append_line(buf, &len, "cbuffer PerFrameCB : register(b0) {"); append_line(buf, &len, " uint noise_frame;"); - append_line(buf, &len, " float2 noise_scale;"); + append_line(buf, &len, " float noise_scale;"); append_line(buf, &len, "}"); append_line(buf, &len, "float random(in float3 value) {"); @@ -217,9 +214,6 @@ void gfx_direct3d_common_build_shader(char buf[4096], size_t& len, size_t& num_f append_line(buf, &len, ") {"); append_line(buf, &len, " PSInput result;"); append_line(buf, &len, " result.position = position;"); - if (cc_features.opt_alpha && cc_features.opt_noise) { - append_line(buf, &len, " result.screenPos = position;"); - } for (int i = 0; i < 2; i++) { if (cc_features.used_textures[i]) { len += sprintf(buf + len, " result.uv%d = uv%d;\r\n", i, i); @@ -244,7 +238,11 @@ void gfx_direct3d_common_build_shader(char buf[4096], size_t& len, size_t& num_f if (include_root_signature) { append_line(buf, &len, "[RootSignature(RS)]"); } - append_line(buf, &len, "float4 PSMain(PSInput input) : SV_TARGET {"); + if (cc_features.opt_alpha && cc_features.opt_noise) { + append_line(buf, &len, "float4 PSMain(PSInput input, float4 screenSpace : SV_Position) : SV_TARGET {"); + } else { + append_line(buf, &len, "float4 PSMain(PSInput input) : SV_TARGET {"); + } for (int i = 0; i < 2; i++) { if (cc_features.used_textures[i]) { len += sprintf(buf + len, " float2 tc%d = input.uv%d;\r\n", i, i); @@ -301,7 +299,7 @@ void gfx_direct3d_common_build_shader(char buf[4096], size_t& len, size_t& num_f } if (cc_features.opt_alpha && cc_features.opt_noise) { - append_line(buf, &len, " float2 coords = (input.screenPos.xy / input.screenPos.w) * noise_scale;"); + append_line(buf, &len, " float2 coords = screenSpace.xy * noise_scale;"); append_line(buf, &len, " texel.a *= round(saturate(random(float3(floor(coords), noise_frame)) + texel.a - 0.5));"); } diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_dxgi.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_dxgi.cpp index 6cfc3cf32..49abe0b28 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_dxgi.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_dxgi.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -61,6 +62,7 @@ static struct { RECT last_window_rect; bool is_full_screen, last_maximized_state; + bool dxgi1_4; ComPtr factory; ComPtr swap_chain; HANDLE waitable_object; @@ -197,17 +199,6 @@ static void toggle_borderless_window_full_screen(bool enable, bool call_callback } } -static void gfx_dxgi_on_resize(void) { - if (dxgi.swap_chain.Get() != nullptr) { - gfx_get_current_rendering_api()->on_resize(); - - DXGI_SWAP_CHAIN_DESC1 desc1; - ThrowIfFailed(dxgi.swap_chain->GetDesc1(&desc1)); - dxgi.current_width = desc1.Width; - dxgi.current_height = desc1.Height; - } -} - static void onkeydown(WPARAM w_param, LPARAM l_param) { int key = ((l_param >> 16) & 0x1ff); if (dxgi.on_key_down != nullptr) { @@ -227,7 +218,8 @@ static LRESULT CALLBACK gfx_dxgi_wnd_proc(HWND h_wnd, UINT message, WPARAM w_par SohImGui::Update(event_impl); switch (message) { case WM_SIZE: - gfx_dxgi_on_resize(); + dxgi.current_width = (uint32_t)(l_param & 0xffff); + dxgi.current_height = (uint32_t)(l_param >> 16); break; case WM_DESTROY: exit(0); @@ -573,6 +565,13 @@ void gfx_dxgi_create_factory_and_device(bool debug, int d3d_version, bool (*crea ThrowIfFailed(dxgi.CreateDXGIFactory1(__uuidof(IDXGIFactory2), &dxgi.factory)); } + { + ComPtr factory4; + if (dxgi.factory->QueryInterface(__uuidof(IDXGIFactory4), &factory4) == S_OK) { + dxgi.dxgi1_4 = true; + } + } + ComPtr adapter; for (UINT i = 0; dxgi.factory->EnumAdapters1(i, &adapter) != DXGI_ERROR_NOT_FOUND; i++) { DXGI_ADAPTER_DESC1 desc; @@ -604,7 +603,9 @@ ComPtr gfx_dxgi_create_swap_chain(IUnknown *device) { swap_chain_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; swap_chain_desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; swap_chain_desc.Scaling = win8 ? DXGI_SCALING_NONE : DXGI_SCALING_STRETCH; - swap_chain_desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; // Apparently this was backported to Win 7 Platform Update + swap_chain_desc.SwapEffect = dxgi.dxgi1_4 ? + DXGI_SWAP_EFFECT_FLIP_DISCARD : // Introduced in DXGI 1.4 and Windows 10 + DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; // Apparently flip sequential was also backported to Win 7 Platform Update swap_chain_desc.Flags = dxgi_13 ? DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT : 0; swap_chain_desc.SampleDesc.Count = 1; diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp index 16e750d14..5373f8799 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp @@ -52,19 +52,33 @@ struct ShaderProgram { uint8_t num_attribs; bool used_noise; GLint frame_count_location; - GLint window_height_location; + GLint noise_scale_location; +}; + +struct Framebuffer { + uint32_t width, height; + bool has_depth_buffer; + uint32_t msaa_level; + bool invert_y; + + GLuint fbo, clrbuf, clrbuf_msaa, rbo; }; static map, struct ShaderProgram> shader_program_pool; static GLuint opengl_vbo; - -static uint32_t frame_count; -static uint32_t current_height; -static map> fb2tex; static bool current_depth_mask; -static bool gfx_opengl_z_is_from_0_to_1(void) { - return false; +static uint32_t frame_count; + +static vector framebuffers; +static size_t current_framebuffer; +static float current_noise_scale; + +GLuint pixel_depth_rb, pixel_depth_fb; +size_t pixel_depth_rb_size; + +static struct GfxClipParameters gfx_opengl_get_clip_parameters(void) { + return { false, framebuffers[current_framebuffer].invert_y }; } static void gfx_opengl_vertex_array_set_attribs(struct ShaderProgram *prg) { @@ -81,7 +95,7 @@ static void gfx_opengl_vertex_array_set_attribs(struct ShaderProgram *prg) { static void gfx_opengl_set_uniforms(struct ShaderProgram *prg) { if (prg->used_noise) { glUniform1i(prg->frame_count_location, frame_count); - glUniform1i(prg->window_height_location, current_height); + glUniform1f(prg->noise_scale_location, current_noise_scale); } } @@ -277,7 +291,7 @@ static struct ShaderProgram* gfx_opengl_create_and_load_new_shader(uint64_t shad if (cc_features.opt_alpha && cc_features.opt_noise) { append_line(fs_buf, &fs_len, "uniform int frame_count;"); - append_line(fs_buf, &fs_len, "uniform int window_height;"); + append_line(fs_buf, &fs_len, "uniform float noise_scale;"); append_line(fs_buf, &fs_len, "float random(in vec3 value) {"); append_line(fs_buf, &fs_len, " float random = dot(sin(value), vec3(12.9898, 78.233, 37.719));"); @@ -338,7 +352,7 @@ static struct ShaderProgram* gfx_opengl_create_and_load_new_shader(uint64_t shad } if (cc_features.opt_alpha && cc_features.opt_noise) { - append_line(fs_buf, &fs_len, "texel.a *= floor(clamp(random(vec3(floor(gl_FragCoord.xy * (240.0 / float(window_height))), float(frame_count))) + texel.a, 0.0, 1.0));"); + append_line(fs_buf, &fs_len, "texel.a *= floor(clamp(random(vec3(floor(gl_FragCoord.xy * noise_scale), float(frame_count))) + texel.a, 0.0, 1.0));"); } if (cc_features.opt_alpha) { @@ -460,7 +474,7 @@ static struct ShaderProgram* gfx_opengl_create_and_load_new_shader(uint64_t shad if (cc_features.opt_alpha && cc_features.opt_noise) { prg->frame_count_location = glGetUniformLocation(shader_program, "frame_count"); - prg->window_height_location = glGetUniformLocation(shader_program, "window_height"); + prg->noise_scale_location = glGetUniformLocation(shader_program, "noise_scale"); prg->used_noise = true; } else { prg->used_noise = false; @@ -496,7 +510,7 @@ static void gfx_opengl_select_texture(int tile, GLuint texture_id) { } static void gfx_opengl_upload_texture(const uint8_t *rgba32_buf, uint32_t width, uint32_t height) { - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, rgba32_buf); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, rgba32_buf); } static uint32_t gfx_cm_to_opengl(uint32_t val) { @@ -543,7 +557,6 @@ static void gfx_opengl_set_zmode_decal(bool zmode_decal) { static void gfx_opengl_set_viewport(int x, int y, int width, int height) { glViewport(x, y, width, height); - current_height = height; } static void gfx_opengl_set_scissor(int x, int y, int width, int height) { @@ -564,10 +577,6 @@ static void gfx_opengl_draw_triangles(float buf_vbo[], size_t buf_vbo_len, size_ glDrawArrays(GL_TRIANGLES, 0, 3 * buf_vbo_num_tris); } -static unsigned int framebuffer; -static unsigned int textureColorbuffer; -static unsigned int rbo; - static void gfx_opengl_init(void) { //#if FOR_WINDOWS glewInit(); @@ -576,143 +585,214 @@ static void gfx_opengl_init(void) { glGenBuffers(1, &opengl_vbo); glBindBuffer(GL_ARRAY_BUFFER, opengl_vbo); - glGenFramebuffers(1, &framebuffer); - glGenTextures(1, &textureColorbuffer); - glGenRenderbuffers(1, &rbo); - - SohUtils::saveEnvironmentVar("framebuffer", std::to_string(textureColorbuffer)); glDepthFunc(GL_LEQUAL); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + framebuffers.resize(1); // for the default screen buffer + + glGenRenderbuffers(1, &pixel_depth_rb); + glBindRenderbuffer(GL_RENDERBUFFER, pixel_depth_rb); + glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, 1, 1); + glBindRenderbuffer(GL_RENDERBUFFER, 0); + + glGenFramebuffers(1, &pixel_depth_fb); + glBindFramebuffer(GL_FRAMEBUFFER, pixel_depth_fb); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_RENDERBUFFER, pixel_depth_rb); + glBindFramebuffer(GL_FRAMEBUFFER, 0); + + pixel_depth_rb_size = 1; } static void gfx_opengl_on_resize(void) { } static void gfx_opengl_start_frame(void) { - GLsizei framebuffer_width = gfx_current_dimensions.width; - GLsizei framebuffer_height = gfx_current_dimensions.height; - glBindFramebuffer(GL_FRAMEBUFFER, framebuffer); - std::shared_ptr wnd = Ship::GlobalCtx2::GetInstance()->GetWindow(); - glBindTexture(GL_TEXTURE_2D, textureColorbuffer); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, framebuffer_width, framebuffer_height, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textureColorbuffer, 0); - glBindRenderbuffer(GL_RENDERBUFFER, rbo); - glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, framebuffer_width, framebuffer_height); // use a single renderbuffer object for both a depth AND stencil buffer. - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_RENDERBUFFER, rbo); // now actually attach it - glBindFramebuffer(GL_FRAMEBUFFER, framebuffer); - frame_count++; - - glDisable(GL_SCISSOR_TEST); - glDepthMask(GL_TRUE); - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glEnable(GL_SCISSOR_TEST); - glEnable(GL_DEPTH_CLAMP); - current_depth_mask = true; } static void gfx_opengl_end_frame(void) { - - glBindFramebuffer(GL_FRAMEBUFFER, 0); - glClearColor(1.0f, 1.0f, 1.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - - GLint last_program; - glGetIntegerv(GL_CURRENT_PROGRAM, &last_program); - glUseProgram(0); - SohImGui::Draw(); - glUseProgram(last_program); + glFlush(); } static void gfx_opengl_finish_render(void) { } -static int gfx_opengl_create_framebuffer(uint32_t width, uint32_t height) { - GLuint textureColorbuffer; - - glGenTextures(1, &textureColorbuffer); - glBindTexture(GL_TEXTURE_2D, textureColorbuffer); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); +static int gfx_opengl_create_framebuffer() { + GLuint clrbuf; + glGenTextures(1, &clrbuf); + glBindTexture(GL_TEXTURE_2D, clrbuf); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, 1, 1, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glBindTexture(GL_TEXTURE_2D, 0); + GLuint clrbuf_msaa; + glGenRenderbuffers(1, &clrbuf_msaa); + GLuint rbo; glGenRenderbuffers(1, &rbo); glBindRenderbuffer(GL_RENDERBUFFER, rbo); - glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, width, height); + glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, 1, 1); glBindRenderbuffer(GL_RENDERBUFFER, 0); GLuint fbo; glGenFramebuffers(1, &fbo); - glBindFramebuffer(GL_FRAMEBUFFER, fbo); - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textureColorbuffer, 0); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_RENDERBUFFER, rbo); - glBindFramebuffer(GL_FRAMEBUFFER, fbo); + size_t i = framebuffers.size(); + framebuffers.resize(i + 1); - fb2tex[fbo] = make_pair(textureColorbuffer, rbo); - - //glBindFramebuffer(GL_FRAMEBUFFER, 0); + framebuffers[i].fbo = fbo; + framebuffers[i].clrbuf = clrbuf; + framebuffers[i].clrbuf_msaa = clrbuf_msaa; + framebuffers[i].rbo = rbo; return fbo; } -static void gfx_opengl_resize_framebuffer(int fb, uint32_t width, uint32_t height) { - glBindTexture(GL_TEXTURE_2D, fb2tex[fb].first); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); - glBindTexture(GL_TEXTURE_2D, 0); +static void gfx_opengl_update_framebuffer_parameters(int fb_id, uint32_t width, uint32_t height, uint32_t msaa_level, bool opengl_invert_y, bool render_target, bool has_depth_buffer, bool can_extract_depth) { + Framebuffer& fb = framebuffers[fb_id]; - glBindRenderbuffer(GL_RENDERBUFFER, fb2tex[fb].second); - glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, width, height); - glBindRenderbuffer(GL_RENDERBUFFER, 0); + width = max(width, 1U); + height = max(height, 1U); + + glBindFramebuffer(GL_FRAMEBUFFER, fb.fbo); + + if (fb_id != 0) { + if (fb.width != width || fb.height != height || fb.msaa_level != msaa_level) { + if (msaa_level <= 1) { + glBindTexture(GL_TEXTURE_2D, fb.clrbuf); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); + glBindTexture(GL_TEXTURE_2D, 0); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, fb.clrbuf, 0); + } else { + glBindRenderbuffer(GL_RENDERBUFFER, fb.clrbuf_msaa); + glRenderbufferStorageMultisample(GL_RENDERBUFFER, msaa_level, GL_RGB8, width, height); + glBindRenderbuffer(GL_RENDERBUFFER, 0); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, fb.clrbuf_msaa); + } + } + + if (has_depth_buffer && (fb.width != width || fb.height != height || fb.msaa_level != msaa_level || !fb.has_depth_buffer)) { + glBindRenderbuffer(GL_RENDERBUFFER, fb.rbo); + if (msaa_level <= 1) { + glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, width, height); + } else { + glRenderbufferStorageMultisample(GL_RENDERBUFFER, msaa_level, GL_DEPTH24_STENCIL8, width, height); + } + glBindRenderbuffer(GL_RENDERBUFFER, 0); + } + + if (!fb.has_depth_buffer && has_depth_buffer) { + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_RENDERBUFFER, fb.rbo); + } else if (fb.has_depth_buffer && !has_depth_buffer) { + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_RENDERBUFFER, 0); + } + } + + fb.width = width; + fb.height = height; + fb.has_depth_buffer = has_depth_buffer; + fb.msaa_level = msaa_level; + fb.invert_y = opengl_invert_y; } -void gfx_opengl_set_framebuffer(int fb) -{ - if (GLEW_ARB_clip_control || GLEW_VERSION_4_5) { - // Set origin to upper left corner, to match N64 and DX11 - // If this function is not supported, the texture will be upside down :( - glClipControl(GL_UPPER_LEFT, GL_NEGATIVE_ONE_TO_ONE); - } - glBindFramebuffer(GL_FRAMEBUFFER_EXT, fb); +void gfx_opengl_start_draw_to_framebuffer(int fb_id, float noise_scale) { + Framebuffer& fb = framebuffers[fb_id]; + if (noise_scale != 0.0f) { + current_noise_scale = 1.0f / noise_scale; + } + + glBindFramebuffer(GL_FRAMEBUFFER, fb.fbo); + + current_framebuffer = fb_id; +} + +void gfx_opengl_clear_framebuffer() { + glDisable(GL_SCISSOR_TEST); glDepthMask(GL_TRUE); glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glDepthMask(current_depth_mask ? GL_TRUE : GL_FALSE); + glEnable(GL_SCISSOR_TEST); } -void gfx_opengl_reset_framebuffer(void) -{ - glBindFramebuffer(GL_FRAMEBUFFER, 0); - - glBindFramebuffer(GL_FRAMEBUFFER_EXT, framebuffer); - if (GLEW_ARB_clip_control || GLEW_VERSION_4_5) { - glClipControl(GL_LOWER_LEFT, GL_NEGATIVE_ONE_TO_ONE); - } +void gfx_opengl_resolve_msaa_color_buffer(int fb_id_target, int fb_id_source) { + Framebuffer& fb_dst = framebuffers[fb_id_target]; + Framebuffer& fb_src = framebuffers[fb_id_source]; + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fb_dst.fbo); + glBindFramebuffer(GL_READ_FRAMEBUFFER, fb_src.fbo); + glBlitFramebuffer(0, 0, fb_src.width, fb_src.height, 0, 0, fb_dst.width, fb_dst.height, GL_COLOR_BUFFER_BIT, GL_NEAREST); + glBindFramebuffer(GL_FRAMEBUFFER, current_framebuffer); } -void gfx_opengl_select_texture_fb(int fbID) -{ +void *gfx_opengl_get_framebuffer_texture_id(int fb_id) { + return (void *)(uintptr_t)framebuffers[fb_id].clrbuf; +} + +void gfx_opengl_select_texture_fb(int fb_id) { //glDisable(GL_DEPTH_TEST); glActiveTexture(GL_TEXTURE0 + 0); - glBindTexture(GL_TEXTURE_2D, fb2tex[fbID].first); + glBindTexture(GL_TEXTURE_2D, framebuffers[fb_id].clrbuf); } -static uint16_t gfx_opengl_get_pixel_depth(float x, float y) { - float depth; - glBindFramebuffer(GL_FRAMEBUFFER, framebuffer); - glReadPixels(x, y, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &depth); - glBindFramebuffer(GL_FRAMEBUFFER, 0); - return depth * 65532.0f; +static std::map, uint16_t> gfx_opengl_get_pixel_depth(int fb_id, const std::set>& coordinates) { + std::map, uint16_t> res; + + Framebuffer& fb = framebuffers[fb_id]; + + if (coordinates.size() == 1) { + uint32_t depth_stencil_value; + glBindFramebuffer(GL_FRAMEBUFFER, fb.fbo); + int x = coordinates.begin()->first; + int y = coordinates.begin()->second; + glReadPixels(x, fb.invert_y ? fb.height - y : y, 1, 1, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, &depth_stencil_value); + res.emplace(*coordinates.begin(), (depth_stencil_value >> 18) << 2); + } else { + if (pixel_depth_rb_size < coordinates.size()) { + glBindRenderbuffer(GL_RENDERBUFFER, pixel_depth_rb); + glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, coordinates.size(), 1); + glBindRenderbuffer(GL_RENDERBUFFER, 0); + + pixel_depth_rb_size = coordinates.size(); + } + + glBindFramebuffer(GL_READ_FRAMEBUFFER, fb.fbo); + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, pixel_depth_fb); + + glDisable(GL_SCISSOR_TEST); // needed for the blit operation + + { + size_t i = 0; + for (const auto& coord : coordinates) { + int x = coord.first; + int y = coord.second; + if (fb.invert_y) { + y = fb.height - y; + } + glBlitFramebuffer(x, y, x + 1, y + 1, i, 0, i + 1, 1, GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, GL_NEAREST); + ++i; + } + } + + glBindFramebuffer(GL_READ_FRAMEBUFFER, pixel_depth_fb); + vector depth_stencil_values(coordinates.size()); + glReadPixels(0, 0, coordinates.size(), 1, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, depth_stencil_values.data()); + + { + size_t i = 0; + for (const auto& coord : coordinates) { + res.emplace(coord, (depth_stencil_values[i++] >> 18) << 2); + } + } + } + + glBindFramebuffer(GL_FRAMEBUFFER, current_framebuffer); + return res; } struct GfxRenderingAPI gfx_opengl_api = { - gfx_opengl_z_is_from_0_to_1, + gfx_opengl_get_clip_parameters, gfx_opengl_unload_shader, gfx_opengl_load_shader, gfx_opengl_create_and_load_new_shader, @@ -723,7 +803,6 @@ struct GfxRenderingAPI gfx_opengl_api = { gfx_opengl_upload_texture, gfx_opengl_set_sampler_parameters, gfx_opengl_set_depth_test_and_mask, - gfx_opengl_get_pixel_depth, gfx_opengl_set_zmode_decal, gfx_opengl_set_viewport, gfx_opengl_set_scissor, @@ -735,9 +814,12 @@ struct GfxRenderingAPI gfx_opengl_api = { gfx_opengl_end_frame, gfx_opengl_finish_render, gfx_opengl_create_framebuffer, - gfx_opengl_resize_framebuffer, - gfx_opengl_set_framebuffer, - gfx_opengl_reset_framebuffer, + gfx_opengl_update_framebuffer_parameters, + gfx_opengl_start_draw_to_framebuffer, + gfx_opengl_clear_framebuffer, + gfx_opengl_resolve_msaa_color_buffer, + gfx_opengl_get_pixel_depth, + gfx_opengl_get_framebuffer_texture_id, gfx_opengl_select_texture_fb, gfx_opengl_delete_texture }; diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp index 28debd120..5918ccaf7 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include @@ -27,6 +28,8 @@ #include "../../luslog.h" #include "../StrHash64.h" +#include "../../SohImGuiImpl.h" +#include "../../Environment.h" // OTRTODO: fix header files for these extern "C" { @@ -71,10 +74,6 @@ struct RGBA { uint8_t r, g, b, a; }; -struct XYWidthHeight { - uint16_t x, y, width, height; -}; - struct LoadedVertex { float x, y, z, w; float u, v; @@ -174,8 +173,16 @@ static struct RenderingState { TextureCacheNode *textures[2]; } rendering_state; +struct GfxDimensions gfx_current_window_dimensions; struct GfxDimensions gfx_current_dimensions; static struct GfxDimensions gfx_prev_dimensions; +struct XYWidthHeight gfx_current_game_window_viewport; + +static bool game_renders_to_framebuffer; +static int game_framebuffer; +static int game_framebuffer_msaa_resolved; + +uint32_t gfx_msaa_level = 1; static bool dropped_frame; @@ -198,6 +205,9 @@ static bool fbActive = 0; static map::iterator active_fb; static map framebuffers; +static set> get_pixel_depth_pending; +static map, uint16_t> get_pixel_depth_cached; + #ifdef _MSC_VER // TODO: Properly implement for MSVC static unsigned long get_time(void) @@ -1326,11 +1336,11 @@ static void gfx_sp_tri1(uint8_t vtx1_idx, uint8_t vtx2_idx, uint8_t vtx3_idx, bo gfx_rapi->shader_get_info(prg, &num_inputs, used_textures); - bool z_is_from_0_to_1 = gfx_rapi->z_is_from_0_to_1(); + struct GfxClipParameters clip_parameters = gfx_rapi->get_clip_parameters(); for (int i = 0; i < 3; i++) { float z = v_arr[i]->z, w = v_arr[i]->w; - if (z_is_from_0_to_1) { + if (clip_parameters.z_is_from_0_to_1) { z = (z + w) / 2.0f; } @@ -1340,7 +1350,7 @@ static void gfx_sp_tri1(uint8_t vtx1_idx, uint8_t vtx2_idx, uint8_t vtx3_idx, bo } buf_vbo[buf_vbo_len++] = v_arr[i]->x; - buf_vbo[buf_vbo_len++] = v_arr[i]->y; + buf_vbo[buf_vbo_len++] = clip_parameters.invert_y ? -v_arr[i]->y : v_arr[i]->y; buf_vbo[buf_vbo_len++] = z; buf_vbo[buf_vbo_len++] = w; @@ -1491,6 +1501,27 @@ static void gfx_sp_geometry_mode(uint32_t clear, uint32_t set) { rsp.geometry_mode |= set; } +static void gfx_adjust_viewport_or_scissor(XYWidthHeight *area) { + if (!fbActive) { + area->width *= RATIO_X; + area->height *= RATIO_Y; + area->x *= RATIO_X; + area->y = SCREEN_HEIGHT - area->y; + area->y *= RATIO_Y; + + if (!game_renders_to_framebuffer || (gfx_msaa_level > 1 && gfx_current_dimensions.width == gfx_current_game_window_viewport.width && gfx_current_dimensions.height == gfx_current_game_window_viewport.height)) { + area->x += gfx_current_game_window_viewport.x; + area->y += gfx_current_window_dimensions.height - (gfx_current_game_window_viewport.y + gfx_current_game_window_viewport.height); + } + } else { + area->width *= RATIO_Y; + area->height *= RATIO_Y; + area->x *= RATIO_Y; + area->y = active_fb->second.orig_height - area->y; + area->y *= RATIO_Y; + } +} + static void gfx_calc_and_set_viewport(const Vp_t *viewport) { // 2 bits fraction float width = 2.0f * viewport->vscale[0] / 4.0f; @@ -1498,25 +1529,13 @@ static void gfx_calc_and_set_viewport(const Vp_t *viewport) { float x = (viewport->vtrans[0] / 4.0f) - width / 2.0f; float y = ((viewport->vtrans[1] / 4.0f) + height / 2.0f); - if (!fbActive) { - width *= RATIO_X; - height *= RATIO_Y; - x *= RATIO_X; - y = SCREEN_HEIGHT - y; - y *= RATIO_Y; - } else { - width *= RATIO_Y; - height *= RATIO_Y; - x *= RATIO_Y; - y = active_fb->second.orig_height - y; - y *= RATIO_Y; - } - rdp.viewport.x = x; rdp.viewport.y = y; rdp.viewport.width = width; rdp.viewport.height = height; + gfx_adjust_viewport_or_scissor(&rdp.viewport); + rdp.viewport_or_scissor_changed = true; } @@ -1585,11 +1604,6 @@ static void gfx_sp_texture(uint16_t sc, uint16_t tc, uint8_t level, uint8_t tile rdp.textures_changed[1] = true; } - if (tile > 8) - { - int bp = 0; - } - rdp.first_tile_index = tile; } @@ -1599,25 +1613,13 @@ static void gfx_dp_set_scissor(uint32_t mode, uint32_t ulx, uint32_t uly, uint32 float width = (lrx - ulx) / 4.0f; float height = (lry - uly) / 4.0f; - if (!fbActive) { - x *= RATIO_X; - y = SCREEN_HEIGHT - y; - y *= RATIO_Y; - width *= RATIO_X; - height *= RATIO_Y; - } else { - width *= RATIO_Y; - height *= RATIO_Y; - x *= RATIO_Y; - y = active_fb->second.orig_height - y; - y *= RATIO_Y; - } - rdp.scissor.x = x; rdp.scissor.y = y; rdp.scissor.width = width; rdp.scissor.height = height; + gfx_adjust_viewport_or_scissor(&rdp.scissor); + rdp.viewport_or_scissor_changed = true; } @@ -1887,10 +1889,12 @@ static void gfx_draw_rectangle(int32_t ulx, int32_t uly, int32_t lrx, int32_t lr ur->w = 1.0f; // The coordinates for texture rectangle shall bypass the viewport setting - struct XYWidthHeight default_viewport = { 0, 0, gfx_current_dimensions.width, gfx_current_dimensions.height }; + struct XYWidthHeight default_viewport = { 0, SCREEN_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT }; struct XYWidthHeight viewport_saved = rdp.viewport; uint32_t geometry_mode_saved = rsp.geometry_mode; + gfx_adjust_viewport_or_scissor(&default_viewport); + rdp.viewport = default_viewport; rdp.viewport_or_scissor_changed = true; rsp.geometry_mode = 0; @@ -2456,14 +2460,15 @@ static void gfx_run_dl(Gfx* cmd) { gfx_flush(); fbActive = 1; active_fb = framebuffers.find(cmd->words.w1); - gfx_rapi->set_framebuffer(active_fb->first); + gfx_rapi->start_draw_to_framebuffer(active_fb->first, (float)active_fb->second.applied_height / active_fb->second.orig_height); + gfx_rapi->clear_framebuffer(); } break; case G_RESETFB: { gfx_flush(); fbActive = 0; - gfx_rapi->reset_framebuffer(); + gfx_rapi->start_draw_to_framebuffer(game_renders_to_framebuffer ? game_framebuffer : 0, (float)gfx_current_dimensions.height / SCREEN_HEIGHT); break; } break; @@ -2547,7 +2552,7 @@ static void gfx_run_dl(Gfx* cmd) { gfx_dp_texture_rectangle(ulx, uly, lrx, lry, tile, uls, ult, dsdx, dtdy, opcode == G_TEXRECTFLIP); break; } - case G_TEXRECT_WIDE: + case G_TEXRECT_WIDE: { int32_t lrx, lry, tile, ulx, uly; uint32_t uls, ult, dsdx, dtdy; @@ -2630,9 +2635,12 @@ void gfx_init(struct GfxWindowManagerAPI *wapi, struct GfxRenderingAPI *rapi, co gfx_rapi = rapi; gfx_wapi->init(game_name, start_in_fullscreen); gfx_rapi->init(); + gfx_rapi->update_framebuffer_parameters(0, SCREEN_WIDTH, SCREEN_HEIGHT, 1, false, true, true, true); gfx_current_dimensions.internal_mul = 1; gfx_current_dimensions.width = SCREEN_WIDTH; gfx_current_dimensions.height = SCREEN_HEIGHT; + game_framebuffer = gfx_rapi->create_framebuffer(); + game_framebuffer_msaa_resolved = gfx_rapi->create_framebuffer(); for (int i = 0; i < 16; i++) segmentPointers[i] = NULL; @@ -2681,7 +2689,8 @@ struct GfxRenderingAPI *gfx_get_current_rendering_api(void) { void gfx_start_frame(void) { gfx_wapi->handle_events(); - // gfx_wapi->get_dimensions(&gfx_current_dimensions.width, &gfx_current_dimensions.height); + gfx_wapi->get_dimensions(&gfx_current_window_dimensions.width, &gfx_current_window_dimensions.height); + SohImGui::DrawMainMenuAndCalculateGameSize(); if (gfx_current_dimensions.height == 0) { // Avoid division by zero gfx_current_dimensions.height = 1; @@ -2693,7 +2702,7 @@ void gfx_start_frame(void) { uint32_t width = fb.second.orig_width, height = fb.second.orig_height; gfx_adjust_width_height_for_scale(width, height); if (width != fb.second.applied_width || height != fb.second.applied_height) { - gfx_rapi->resize_framebuffer(fb.first, width, height); + gfx_rapi->update_framebuffer_parameters(fb.first, width, height, 1, true, true, true, true); fb.second.applied_width = width; fb.second.applied_height = height; } @@ -2701,6 +2710,22 @@ void gfx_start_frame(void) { } gfx_prev_dimensions = gfx_current_dimensions; + bool different_size = gfx_current_dimensions.width != gfx_current_game_window_viewport.width || gfx_current_dimensions.height != gfx_current_game_window_viewport.height; + if (different_size || gfx_msaa_level > 1) { + game_renders_to_framebuffer = true; + if (different_size) { + gfx_rapi->update_framebuffer_parameters(game_framebuffer, gfx_current_dimensions.width, gfx_current_dimensions.height, gfx_msaa_level, true, true, true, true); + } else { + // MSAA framebuffer needs to be resolved to an equally sized target when complete, which must therefore match the window size + gfx_rapi->update_framebuffer_parameters(game_framebuffer, gfx_current_window_dimensions.width, gfx_current_window_dimensions.height, gfx_msaa_level, false, true, true, true); + } + if (gfx_msaa_level > 1 && different_size) { + gfx_rapi->update_framebuffer_parameters(game_framebuffer_msaa_resolved, gfx_current_dimensions.width, gfx_current_dimensions.height, 1, false, false, false, false); + } + } else { + game_renders_to_framebuffer = false; + } + fbActive = 0; } @@ -2708,17 +2733,44 @@ void gfx_run(Gfx *commands) { gfx_sp_reset(); //puts("New frame"); + get_pixel_depth_pending.clear(); + get_pixel_depth_cached.clear(); if (!gfx_wapi->start_frame()) { dropped_frame = true; + SohImGui::DrawFramebufferAndGameInput(); + SohImGui::CancelFrame(); return; } dropped_frame = false; double t0 = gfx_wapi->get_time(); + gfx_rapi->update_framebuffer_parameters(0, gfx_current_window_dimensions.width, gfx_current_window_dimensions.height, 1, false, true, true, !game_renders_to_framebuffer); gfx_rapi->start_frame(); + gfx_rapi->start_draw_to_framebuffer(game_renders_to_framebuffer ? game_framebuffer : 0, (float)gfx_current_dimensions.height / SCREEN_HEIGHT); + gfx_rapi->clear_framebuffer(); gfx_run_dl(commands); gfx_flush(); + SohUtils::saveEnvironmentVar("framebuffer", string()); + if (game_renders_to_framebuffer) { + gfx_rapi->start_draw_to_framebuffer(0, 1); + gfx_rapi->clear_framebuffer(); + + if (gfx_msaa_level > 1) { + bool different_size = gfx_current_dimensions.width != gfx_current_game_window_viewport.width || gfx_current_dimensions.height != gfx_current_game_window_viewport.height; + + if (different_size) { + gfx_rapi->resolve_msaa_color_buffer(game_framebuffer_msaa_resolved, game_framebuffer); + SohUtils::saveEnvironmentVar("framebuffer", std::to_string((uintptr_t)gfx_rapi->get_framebuffer_texture_id(game_framebuffer_msaa_resolved))); + } else { + gfx_rapi->resolve_msaa_color_buffer(0, game_framebuffer); + } + } else { + SohUtils::saveEnvironmentVar("framebuffer", std::to_string((uintptr_t)gfx_rapi->get_framebuffer_texture_id(game_framebuffer))); + } + } + SohImGui::DrawFramebufferAndGameInput(); + SohImGui::Render(); double t1 = gfx_wapi->get_time(); //printf("Process %f %f\n", t1, t1 - t0); gfx_rapi->end_frame(); @@ -2739,21 +2791,47 @@ void gfx_set_framedivisor(int divisor) { int gfx_create_framebuffer(uint32_t width, uint32_t height) { uint32_t orig_width = width, orig_height = height; gfx_adjust_width_height_for_scale(width, height); - int fb = gfx_rapi->create_framebuffer(width, height); + int fb = gfx_rapi->create_framebuffer(); + gfx_rapi->update_framebuffer_parameters(fb, width, height, 1, true, true, true, true); framebuffers[fb] = { orig_width, orig_height, width, height }; return fb; } -void gfx_set_framebuffer(int fb) -{ - gfx_rapi->set_framebuffer(fb); +void gfx_set_framebuffer(int fb, float noise_scale) { + gfx_rapi->start_draw_to_framebuffer(fb, noise_scale); + gfx_rapi->clear_framebuffer(); } -void gfx_reset_framebuffer() -{ - gfx_rapi->reset_framebuffer(); +void gfx_reset_framebuffer() { + gfx_rapi->start_draw_to_framebuffer(0, (float)gfx_current_dimensions.height / SCREEN_HEIGHT); +} + +static void adjust_pixel_depth_coordinates(float& x, float& y) { + x = x * RATIO_Y - (SCREEN_WIDTH * RATIO_Y - gfx_current_dimensions.width) / 2; + y *= RATIO_Y; + if (!game_renders_to_framebuffer || (gfx_msaa_level > 1 && gfx_current_dimensions.width == gfx_current_game_window_viewport.width && gfx_current_dimensions.height == gfx_current_game_window_viewport.height)) { + x += gfx_current_game_window_viewport.x; + y += gfx_current_window_dimensions.height - (gfx_current_game_window_viewport.y + gfx_current_game_window_viewport.height); + } +} + +void gfx_get_pixel_depth_prepare(float x, float y) { + adjust_pixel_depth_coordinates(x, y); + get_pixel_depth_pending.emplace(x, y); } uint16_t gfx_get_pixel_depth(float x, float y) { - return gfx_rapi->get_pixel_depth(x * RATIO_Y - (SCREEN_WIDTH * RATIO_Y - gfx_current_dimensions.width) / 2, y * RATIO_Y); + adjust_pixel_depth_coordinates(x, y); + + if (auto it = get_pixel_depth_cached.find(make_pair(x, y)); it != get_pixel_depth_cached.end()) { + return it->second; + } + + get_pixel_depth_pending.emplace(x, y); + + map, uint16_t> res = gfx_rapi->get_pixel_depth(game_renders_to_framebuffer ? game_framebuffer : 0, get_pixel_depth_pending); + get_pixel_depth_cached.merge(res); + get_pixel_depth_pending.clear(); + + return get_pixel_depth_cached.find(make_pair(x, y))->second; } \ No newline at end of file diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_pc.h b/libultraship/libultraship/Lib/Fast3D/gfx_pc.h index 446c0b6a4..d682991d9 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_pc.h +++ b/libultraship/libultraship/Lib/Fast3D/gfx_pc.h @@ -8,8 +8,11 @@ struct GfxRenderingAPI; struct GfxWindowManagerAPI; -struct GfxDimensions -{ +struct XYWidthHeight { + int16_t x, y, width, height; +}; + +struct GfxDimensions { uint32_t internal_mul; uint32_t width, height; float aspect_ratio; @@ -50,7 +53,10 @@ struct TextureCacheValue { #ifdef __cplusplus extern "C" { #endif -extern struct GfxDimensions gfx_current_dimensions; +extern struct GfxDimensions gfx_current_window_dimensions; // The dimensions of the window +extern struct GfxDimensions gfx_current_dimensions; // The dimensions of the draw area the game draws to, before scaling (if applicable) +extern struct XYWidthHeight gfx_current_game_window_viewport; // The area of the window the game is drawn to, (0, 0) is top-left corner +extern uint32_t gfx_msaa_level; void gfx_init(struct GfxWindowManagerAPI* wapi, struct GfxRenderingAPI* rapi, const char* game_name, bool start_in_fullscreen); struct GfxRenderingAPI* gfx_get_current_rendering_api(void); @@ -60,6 +66,7 @@ void gfx_end_frame(void); void gfx_set_framedivisor(int); void gfx_texture_cache_clear(); int gfx_create_framebuffer(uint32_t width, uint32_t height); +void gfx_get_pixel_depth_prepare(float x, float y); uint16_t gfx_get_pixel_depth(float x, float y); #ifdef __cplusplus diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_rendering_api.h b/libultraship/libultraship/Lib/Fast3D/gfx_rendering_api.h index 9283ee236..84247fe60 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_rendering_api.h +++ b/libultraship/libultraship/Lib/Fast3D/gfx_rendering_api.h @@ -5,10 +5,18 @@ #include #include +#include +#include + struct ShaderProgram; +struct GfxClipParameters { + bool z_is_from_0_to_1; + bool invert_y; +}; + struct GfxRenderingAPI { - bool (*z_is_from_0_to_1)(void); + struct GfxClipParameters (*get_clip_parameters)(void); void (*unload_shader)(struct ShaderProgram *old_prg); void (*load_shader)(struct ShaderProgram *new_prg); struct ShaderProgram *(*create_and_load_new_shader)(uint64_t shader_id0, uint32_t shader_id1); @@ -19,7 +27,6 @@ struct GfxRenderingAPI { void (*upload_texture)(const uint8_t *rgba32_buf, uint32_t width, uint32_t height); void (*set_sampler_parameters)(int sampler, bool linear_filter, uint32_t cms, uint32_t cmt); void (*set_depth_test_and_mask)(bool depth_test, bool z_upd); - uint16_t (*get_pixel_depth)(float x, float y); void (*set_zmode_decal)(bool zmode_decal); void (*set_viewport)(int x, int y, int width, int height); void (*set_scissor)(int x, int y, int width, int height); @@ -30,11 +37,14 @@ struct GfxRenderingAPI { void (*start_frame)(void); void (*end_frame)(void); void (*finish_render)(void); - int (*create_framebuffer)(uint32_t width, uint32_t height); - void (*resize_framebuffer)(int fb, uint32_t width, uint32_t height); - void (*set_framebuffer)(int fb); - void (*reset_framebuffer)(); - void (*select_texture_fb)(int fbID); + int (*create_framebuffer)(); + void (*update_framebuffer_parameters)(int fb_id, uint32_t width, uint32_t height, uint32_t msaa_level, bool opengl_invert_y, bool render_target, bool has_depth_buffer, bool can_extract_depth); + void (*start_draw_to_framebuffer)(int fb_id, float noise_scale); + void (*clear_framebuffer)(void); + void (*resolve_msaa_color_buffer)(int fb_id_target, int fb_id_source); + std::map, uint16_t> (*get_pixel_depth)(int fb_id, const std::set>& coordinates); + void *(*get_framebuffer_texture_id)(int fb_id); + void (*select_texture_fb)(int fb_id); void (*delete_texture)(uint32_t texID); }; diff --git a/libultraship/libultraship/Lib/ImGui/imgui.h b/libultraship/libultraship/Lib/ImGui/imgui.h index fa2dadcda..323832071 100644 --- a/libultraship/libultraship/Lib/ImGui/imgui.h +++ b/libultraship/libultraship/Lib/ImGui/imgui.h @@ -502,7 +502,6 @@ namespace ImGui IMGUI_API bool SmallButton(const char* label); // button with FramePadding=(0,0) to easily embed within text IMGUI_API bool InvisibleButton(const char* str_id, const ImVec2& size, ImGuiButtonFlags flags = 0); // flexible button behavior without the visuals, frequently useful to build custom behaviors using the public api (along with IsItemActive, IsItemHovered, etc.) IMGUI_API bool ArrowButton(const char* str_id, ImGuiDir dir); // square button with an arrow shape - IMGUI_API void ImageRotated(ImTextureID tex_id, ImVec2 center, ImVec2 size, float angle); IMGUI_API void Image(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1,1), const ImVec4& tint_col = ImVec4(1,1,1,1), const ImVec4& border_col = ImVec4(0,0,0,0)); IMGUI_API bool ImageButton(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1,1), int frame_padding = -1, const ImVec4& bg_col = ImVec4(0,0,0,0), const ImVec4& tint_col = ImVec4(1,1,1,1)); // <0 frame_padding uses default frame padding settings. 0 for no padding IMGUI_API bool Checkbox(const char* label, bool* v); diff --git a/libultraship/libultraship/Lib/ImGui/imgui_widgets.cpp b/libultraship/libultraship/Lib/ImGui/imgui_widgets.cpp index 3d165580b..8e4210002 100644 --- a/libultraship/libultraship/Lib/ImGui/imgui_widgets.cpp +++ b/libultraship/libultraship/Lib/ImGui/imgui_widgets.cpp @@ -1007,33 +1007,6 @@ bool ImGui::ScrollbarEx(const ImRect& bb_frame, ImGuiID id, ImGuiAxis axis, ImS6 return held; } -void ImGui::ImageRotated(ImTextureID tex_id, ImVec2 center, ImVec2 size, float angle) { - - ImGuiWindow* window = GetCurrentWindow(); - if (window->SkipItems) - return; - - ImDrawList* draw_list = ImGui::GetWindowDrawList(); - ImRect bb(window->DC.CursorPos + ImVec2(size.x / 2, size.y / 2), window->DC.CursorPos + size); - - ImVec2 pos[4] = - { - center + bb.Min + ImVec2(-size.x * 0.5f, -size.y * 0.5f), - center + bb.Min + ImVec2(+size.x * 0.5f, -size.y * 0.5f), - center + bb.Min + ImVec2(+size.x * 0.5f, +size.y * 0.5f), - center + bb.Min + ImVec2(-size.x * 0.5f, +size.y * 0.5f) - }; - ImVec2 uvs[4] = - { - ImVec2(0.0f, 1.0f), - ImVec2(1.0f, 1.0f), - ImVec2(1.0f, 0.0f), - ImVec2(0.0f, 0.0f) - }; - - draw_list->AddImageQuad(tex_id, pos[0], pos[1], pos[2], pos[3], uvs[0], uvs[1], uvs[2], uvs[3], IM_COL32_WHITE); -} - void ImGui::Image(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& tint_col, const ImVec4& border_col) { ImGuiWindow* window = GetCurrentWindow(); diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 93dcd2492..860720433 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -123,14 +123,6 @@ namespace SohImGui { } } - bool UseInternalRes() { - switch (impl.backend) { - case Backend::SDL: - return true; - } - return false; - } - bool UseViewports() { switch (impl.backend) { case Backend::DX11: @@ -281,20 +273,16 @@ namespace SohImGui { } } - void Draw() { - + void DrawMainMenuAndCalculateGameSize() { console->Update(); ImGuiBackendNewFrame(); ImGuiWMNewFrame(); ImGui::NewFrame(); const std::shared_ptr wnd = GlobalCtx2::GetInstance()->GetWindow(); - ImGuiWindowFlags window_flags = ImGuiWindowFlags_NoDocking | + ImGuiWindowFlags window_flags = ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoNavFocus | ImGuiWindowFlags_NoResize; - if (UseViewports()) { - window_flags |= ImGuiWindowFlags_NoBackground; - } if (Game::Settings.debug.menu_bar) window_flags |= ImGuiWindowFlags_MenuBar; const ImGuiViewport* viewport = ImGui::GetMainViewport(); @@ -302,8 +290,12 @@ namespace SohImGui { ImGui::SetNextWindowSize(ImVec2(wnd->GetCurrentWidth(), wnd->GetCurrentHeight())); ImGui::SetNextWindowViewport(viewport->ID); ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f)); + ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f); + ImGui::PushStyleVar(ImGuiStyleVar_ChildBorderSize, 0.0f); ImGui::Begin("Main - Deck", nullptr, window_flags); - ImGui::PopStyleVar(); + ImGui::PopStyleVar(3); + + ImVec2 top_left_pos = ImGui::GetWindowPos(); const ImGuiID dockId = ImGui::GetID("main_dock"); @@ -421,9 +413,7 @@ namespace SohImGui { ImGui::Text("Graphics"); ImGui::Separator(); - if (UseInternalRes()) { - HOOK(ImGui::Checkbox("N64 Mode", &Game::Settings.debug.n64mode)); - } + HOOK(ImGui::Checkbox("N64 Mode", &Game::Settings.debug.n64mode)); if (ImGui::Checkbox("Animated Link in Pause Menu", &Game::Settings.enhancements.animated_pause_menu)) { CVar_SetS32("gPauseLiveLink", Game::Settings.enhancements.animated_pause_menu); @@ -441,10 +431,10 @@ namespace SohImGui { if (ImGui::BeginMenu("Developer Tools")) { HOOK(ImGui::MenuItem("Stats", nullptr, &Game::Settings.debug.soh)); HOOK(ImGui::MenuItem("Console", nullptr, &console->opened)); - + ImGui::Text("Debug"); ImGui::Separator(); - + if (ImGui::Checkbox("Debug Mode", &Game::Settings.cheats.debug_mode)) { CVar_SetS32("gDebugEnabled", Game::Settings.cheats.debug_mode); needs_save = true; @@ -452,7 +442,12 @@ namespace SohImGui { ImGui::EndMenu(); } - + + if (ImGui::BeginMenu("Graphics")) { + HOOK(ImGui::MenuItem("Anti-aliasing", nullptr, &Game::Settings.graphics.show)); + ImGui::EndMenu(); + } + if (ImGui::BeginMenu("Cheats")) { if (ImGui::Checkbox("Infinite Money", &Game::Settings.cheats.infinite_money)) { CVar_SetS32("gInfiniteMoney", Game::Settings.cheats.infinite_money); @@ -473,22 +468,22 @@ namespace SohImGui { CVar_SetS32("gInfiniteMagic", Game::Settings.cheats.infinite_magic); needs_save = true; } - + if (ImGui::Checkbox("No Clip", &Game::Settings.cheats.no_clip)) { CVar_SetS32("gNoClip", Game::Settings.cheats.no_clip); needs_save = true; } - + if (ImGui::Checkbox("Climb Everything", &Game::Settings.cheats.climb_everything)) { CVar_SetS32("gClimbEverything", Game::Settings.cheats.climb_everything); needs_save = true; } - + if (ImGui::Checkbox("Moon Jump on L", &Game::Settings.cheats.moon_jump_on_l)) { CVar_SetS32("gMoonJumpOnL", Game::Settings.cheats.moon_jump_on_l); needs_save = true; } - + if (ImGui::Checkbox("Super Tunic", &Game::Settings.cheats.super_tunic)) { CVar_SetS32("gSuperTunic", Game::Settings.cheats.super_tunic); needs_save = true; @@ -509,36 +504,6 @@ namespace SohImGui { ImGui::EndMenuBar(); } - ImGui::End(); - ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0, 0)); - ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.0f, 0.0f, 0.0f, 0.0f)); - ImGuiWindowFlags flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove; - if (UseViewports()) { - flags |= ImGuiWindowFlags_NoBackground; - } - ImGui::Begin("OoT Master Quest", nullptr, flags); - ImGui::PopStyleVar(); - ImGui::PopStyleColor(); - - ImVec2 main_pos = ImGui::GetWindowPos(); - ImVec2 size = ImGui::GetContentRegionAvail(); - ImVec2 pos = ImVec2(0, 0); - gfx_current_dimensions.width = size.x * gfx_current_dimensions.internal_mul; - gfx_current_dimensions.height = size.y * gfx_current_dimensions.internal_mul; - if (UseInternalRes()) { - if (Game::Settings.debug.n64mode) { - gfx_current_dimensions.width = 320; - gfx_current_dimensions.height = 240; - const int sw = size.y * 320 / 240; - pos = ImVec2(size.x / 2 - sw / 2, 0); - size = ImVec2(sw, size.y); - } - } - - if (UseInternalRes()) { - int fbuf = std::stoi(SohUtils::getEnvironmentVar("framebuffer")); - ImGui::ImageRotated(reinterpret_cast(fbuf), pos, size, 0.0f); - } ImGui::End(); if (Game::Settings.debug.soh) { @@ -548,18 +513,84 @@ namespace SohImGui { ImGui::Text("Platform: Windows"); ImGui::Text("Status: %.3f ms/frame (%.1f FPS)", 1000.0f / framerate, framerate); - if (UseInternalRes()) { - ImGui::Text("Internal Resolution:"); - ImGui::SliderInt("Mul", reinterpret_cast(&gfx_current_dimensions.internal_mul), 1, 8); - } ImGui::End(); ImGui::PopStyleColor(); } + if (Game::Settings.graphics.show) { + ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0, 0, 0, 0)); + ImGui::Begin("Anti-aliasing settings", nullptr, ImGuiWindowFlags_None); + ImGui::Text("Internal Resolution:"); + ImGui::SliderInt("Mul", reinterpret_cast(&gfx_current_dimensions.internal_mul), 1, 8); + ImGui::Text("MSAA:"); + ImGui::SliderInt("MSAA", reinterpret_cast(&gfx_msaa_level), 1, 8); + ImGui::End(); + ImGui::PopStyleColor(); + } + + console->Draw(); + + for (auto& windowIter : customWindows) { + CustomWindow& window = windowIter.second; + if (window.drawFunc != nullptr) { + window.drawFunc(window.enabled); + } + } + + ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0, 0)); + ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f); + ImGui::PushStyleVar(ImGuiStyleVar_ChildBorderSize, 0.0f); + ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.0f, 0.0f, 0.0f, 0.0f)); + ImGuiWindowFlags flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoBackground; + ImGui::Begin("OoT Master Quest", nullptr, flags); + ImGui::PopStyleVar(3); + ImGui::PopStyleColor(); + + ImVec2 main_pos = ImGui::GetWindowPos(); + main_pos.x -= top_left_pos.x; + main_pos.y -= top_left_pos.y; + ImVec2 size = ImGui::GetContentRegionAvail(); + ImVec2 pos = ImVec2(0, 0); + gfx_current_dimensions.width = size.x * gfx_current_dimensions.internal_mul; + gfx_current_dimensions.height = size.y * gfx_current_dimensions.internal_mul; + gfx_current_game_window_viewport.x = main_pos.x; + gfx_current_game_window_viewport.y = main_pos.y; + gfx_current_game_window_viewport.width = size.x; + gfx_current_game_window_viewport.height = size.y; + if (Game::Settings.debug.n64mode) { + gfx_current_dimensions.width = 320; + gfx_current_dimensions.height = 240; + const int sw = size.y * 320 / 240; + gfx_current_game_window_viewport.x += (size.x - sw) / 2; + gfx_current_game_window_viewport.width = sw; + pos = ImVec2(size.x / 2 - sw / 2, 0); + size = ImVec2(sw, size.y); + } + } + + void DrawFramebufferAndGameInput() { + ImVec2 main_pos = ImGui::GetWindowPos(); + ImVec2 size = ImGui::GetContentRegionAvail(); + ImVec2 pos = ImVec2(0, 0); + if (Game::Settings.debug.n64mode) { + const int sw = size.y * 320 / 240; + pos = ImVec2(size.x / 2 - sw / 2, 0); + size = ImVec2(sw, size.y); + } + std::string fb_str = SohUtils::getEnvironmentVar("framebuffer"); + if (!fb_str.empty()) { + uintptr_t fbuf = (uintptr_t)std::stoull(fb_str); + //ImGui::ImageSimple(reinterpret_cast(fbuf), pos, size); + ImGui::SetCursorPos(pos); + ImGui::Image(reinterpret_cast(fbuf), size); + } + + ImGui::End(); + const float scale = Game::Settings.controller.input_scale; ImVec2 BtnPos = ImVec2(160 * scale, 85 * scale); - if(Game::Settings.controller.input_enabled) { + if (Game::Settings.controller.input_enabled) { ImGui::SetNextWindowSize(BtnPos); ImGui::SetNextWindowPos(ImVec2(main_pos.x + size.x - BtnPos.x - 20, main_pos.y + size.y - BtnPos.y - 20)); @@ -605,16 +636,9 @@ namespace SohImGui { ImGui::End(); } } + } - console->Draw(); - - for (auto& windowIter : customWindows) { - CustomWindow& window = windowIter.second; - if (window.drawFunc != nullptr) { - window.drawFunc(window.enabled); - } - } - + void Render() { ImGui::Render(); ImGuiRenderDrawData(ImGui::GetDrawData()); if (UseViewports()) { @@ -623,6 +647,13 @@ namespace SohImGui { } } + void CancelFrame() { + ImGui::EndFrame(); + if (UseViewports()) { + ImGui::UpdatePlatformWindows(); + } + } + void BindCmd(const std::string& cmd, CommandEntry entry) { console->Commands[cmd] = std::move(entry); } diff --git a/libultraship/libultraship/SohImGuiImpl.h b/libultraship/libultraship/SohImGuiImpl.h index 58dac7a1b..dc6e24ee1 100644 --- a/libultraship/libultraship/SohImGuiImpl.h +++ b/libultraship/libultraship/SohImGuiImpl.h @@ -60,7 +60,10 @@ namespace SohImGui { extern Console* console; void Init(WindowImpl window_impl); void Update(EventImpl event); - void Draw(void); + void DrawMainMenuAndCalculateGameSize(void); + void DrawFramebufferAndGameInput(void); + void Render(void); + void CancelFrame(void); void ShowCursor(bool hide, Dialogues w); void BindCmd(const std::string& cmd, CommandEntry entry); void AddWindow(const std::string& category, const std::string& name, WindowDrawFunc drawFunc); diff --git a/libultraship/libultraship/Window.cpp b/libultraship/libultraship/Window.cpp index 665483b35..2b57c547e 100644 --- a/libultraship/libultraship/Window.cpp +++ b/libultraship/libultraship/Window.cpp @@ -286,6 +286,10 @@ namespace Ship { //gfx_set_framedivisor(0); } + void Window::GetPixelDepthPrepare(float x, float y) { + gfx_get_pixel_depth_prepare(x, y); + } + uint16_t Window::GetPixelDepth(float x, float y) { return gfx_get_pixel_depth(x, y); } diff --git a/libultraship/libultraship/Window.h b/libultraship/libultraship/Window.h index 6046ca4ae..0d12211b0 100644 --- a/libultraship/libultraship/Window.h +++ b/libultraship/libultraship/Window.h @@ -20,6 +20,7 @@ namespace Ship { void Init(); void RunCommands(Gfx* Commands); void SetFrameDivisor(int divisor); + void GetPixelDepthPrepare(float x, float y); uint16_t GetPixelDepth(float x, float y); void ToggleFullscreen(); void SetFullscreen(bool bIsFullscreen); diff --git a/soh/include/functions.h b/soh/include/functions.h index a4b1a9a99..13e3a7055 100644 --- a/soh/include/functions.h +++ b/soh/include/functions.h @@ -977,6 +977,7 @@ void LightContext_RemoveLight(GlobalContext* globalCtx, LightContext* lightCtx, Lights* Lights_NewAndDraw(GraphicsContext* gfxCtx, u8 ambientR, u8 ambientG, u8 ambientB, u8 numLights, u8 r, u8 g, u8 b, s8 x, s8 y, s8 z); Lights* Lights_New(GraphicsContext* gfxCtx, u8 ambientR, u8 ambientG, u8 ambientB); +void Lights_GlowCheckPrepare(GlobalContext* globalCtx); void Lights_GlowCheck(GlobalContext* globalCtx); void Lights_DrawGlow(GlobalContext* globalCtx); void ZeldaArena_CheckPointer(void* ptr, size_t size, const char* name, const char* action); diff --git a/soh/soh/GbiWrap.cpp b/soh/soh/GbiWrap.cpp index 1f6a8003c..c7f69f1a9 100644 --- a/soh/soh/GbiWrap.cpp +++ b/soh/soh/GbiWrap.cpp @@ -9,6 +9,7 @@ void Graph_ProcessGfxCommands(Gfx* commands); void OTRLogString(const char* src); void OTRGfxPrint(const char* str, void* printer, void (*printImpl)(void*, char)); void OTRSetFrameDivisor(int divisor); +void OTRGetPixelDepthPrepare(float x, float y); uint16_t OTRGetPixelDepth(float x, float y); int32_t OTRGetLastScancode(); void ResourceMgr_CacheDirectory(const char* resName); diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 007afd702..fca6d6b7d 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -24,9 +24,17 @@ #include "../soh/Enhancements/debugconsole.h" #include "../soh/Enhancements/debugger/debugger.h" #include "Utils/BitConverter.h" +#include "variables.h" OTRGlobals* OTRGlobals::Instance; +static struct { + std::condition_variable cv_to_thread, cv_from_thread; + std::mutex mutex; + bool initialized; + bool processing; +} audio; + OTRGlobals::OTRGlobals() { context = Ship::GlobalCtx2::CreateInstance("Ship of Harkinian"); context->GetWindow()->Init(); @@ -39,6 +47,10 @@ extern uintptr_t clearMtx; extern "C" Mtx gMtxClear; extern "C" MtxF gMtxFClear; extern "C" void OTRMessage_Init(); +extern "C" void AudioMgr_CreateNextAudioBuffer(s16* samples, u32 num_samples); +extern "C" void AudioPlayer_Play(const uint8_t* buf, uint32_t len); +extern "C" int AudioPlayer_Buffered(void); +extern "C" int AudioPlayer_GetDesiredBuffered(void); // C->C++ Bridge extern "C" void InitOTR() { @@ -80,8 +92,67 @@ extern "C" void Graph_ProcessFrame(void (*run_one_game_iter)(void)) { // C->C++ Bridge extern "C" void Graph_ProcessGfxCommands(Gfx* commands) { + OTRGlobals::Instance->context->GetWindow()->SetFrameDivisor(R_UPDATE_RATE); + + if (!audio.initialized) { + audio.initialized = true; + std::thread([]() { + for (;;) { + { + std::unique_lock Lock(audio.mutex); + while (!audio.processing) { + audio.cv_to_thread.wait(Lock); + } + } + //AudioMgr_ThreadEntry(&gAudioMgr); + // 528 and 544 relate to 60 fps at 32 kHz 32000/60 = 533.333.. + // in an ideal world, one third of the calls should use num_samples=544 and two thirds num_samples=528 + #define SAMPLES_HIGH 560 + #define SAMPLES_LOW 528 + // PAL values + //#define SAMPLES_HIGH 656 + //#define SAMPLES_LOW 624 + #define AUDIO_FRAMES_PER_UPDATE (R_UPDATE_RATE > 0 ? R_UPDATE_RATE : 1 ) + #define NUM_AUDIO_CHANNELS 2 + int samples_left = AudioPlayer_Buffered(); + u32 num_audio_samples = samples_left < AudioPlayer_GetDesiredBuffered() ? SAMPLES_HIGH : SAMPLES_LOW; + // printf("Audio samples: %d %u\n", samples_left, num_audio_samples); + + // 3 is the maximum authentic frame divisor. + s16 audio_buffer[SAMPLES_HIGH * NUM_AUDIO_CHANNELS * 3]; + for (int i = 0; i < AUDIO_FRAMES_PER_UPDATE; i++) { + AudioMgr_CreateNextAudioBuffer(audio_buffer + i * (num_audio_samples * NUM_AUDIO_CHANNELS), num_audio_samples); + } + //for (uint32_t i = 0; i < 2 * num_audio_samples; i++) { + // audio_buffer[i] = Rand_Next() & 0xFF; + //} + // printf("Audio samples before submitting: %d\n", audio_api->buffered()); + AudioPlayer_Play((u8*)audio_buffer, num_audio_samples * (sizeof(int16_t) * NUM_AUDIO_CHANNELS * AUDIO_FRAMES_PER_UPDATE)); + + { + std::unique_lock Lock(audio.mutex); + audio.processing = false; + } + audio.cv_from_thread.notify_one(); + } + }).detach(); + } + + { + std::unique_lock Lock(audio.mutex); + audio.processing = true; + } + audio.cv_to_thread.notify_one(); + OTRGlobals::Instance->context->GetWindow()->RunCommands(commands); + { + std::unique_lock Lock(audio.mutex); + while (audio.processing) { + audio.cv_from_thread.wait(Lock); + } + } + // OTRTODO: FIGURE OUT END FRAME POINT /* if (OTRGlobals::Instance->context->GetWindow()->lastScancode != -1) OTRGlobals::Instance->context->GetWindow()->lastScancode = -1;*/ @@ -90,8 +161,8 @@ extern "C" void Graph_ProcessGfxCommands(Gfx* commands) { float divisor_num = 0.0f; -extern "C" void OTRSetFrameDivisor(int divisor) { - OTRGlobals::Instance->context->GetWindow()->SetFrameDivisor(divisor); +extern "C" void OTRGetPixelDepthPrepare(float x, float y) { + OTRGlobals::Instance->context->GetWindow()->GetPixelDepthPrepare(x, y); } extern "C" uint16_t OTRGetPixelDepth(float x, float y) { diff --git a/soh/soh/OTRGlobals.h b/soh/soh/OTRGlobals.h index 4f62f0694..20080fcb1 100644 --- a/soh/soh/OTRGlobals.h +++ b/soh/soh/OTRGlobals.h @@ -24,7 +24,7 @@ void Graph_ProcessFrame(void (*run_one_game_iter)(void)); void Graph_ProcessGfxCommands(Gfx* commands); void OTRLogString(const char* src); void OTRGfxPrint(const char* str, void* printer, void (*printImpl)(void*, char)); -void OTRSetFrameDivisor(int divisor); +void OTRGetPixelDepthPrepare(float x, float y); uint16_t OTRGetPixelDepth(float x, float y); int32_t OTRGetLastScancode(); uint32_t ResourceMgr_GetGameVersion(); diff --git a/soh/src/code/graph.c b/soh/src/code/graph.c index 9d2886ef1..34283f342 100644 --- a/soh/src/code/graph.c +++ b/soh/src/code/graph.c @@ -468,35 +468,6 @@ static void RunFrame() { uint64_t ticksA, ticksB; ticksA = GetPerfCounter(); - - OTRSetFrameDivisor(R_UPDATE_RATE); - //OTRSetFrameDivisor(0); - - - //AudioMgr_ThreadEntry(&gAudioMgr); - // 528 and 544 relate to 60 fps at 32 kHz 32000/60 = 533.333.. - // in an ideal world, one third of the calls should use num_samples=544 and two thirds num_samples=528 - #define SAMPLES_HIGH 560 - #define SAMPLES_LOW 528 - // PAL values - //#define SAMPLES_HIGH 656 - //#define SAMPLES_LOW 624 - #define AUDIO_FRAMES_PER_UPDATE (R_UPDATE_RATE > 0 ? R_UPDATE_RATE : 1 ) - #define NUM_AUDIO_CHANNELS 2 - int samples_left = AudioPlayer_Buffered(); - u32 num_audio_samples = samples_left < AudioPlayer_GetDesiredBuffered() ? SAMPLES_HIGH : SAMPLES_LOW; - // printf("Audio samples: %d %u\n", samples_left, num_audio_samples); - - // 3 is the maximum authentic frame divisor. - s16 audio_buffer[SAMPLES_HIGH * NUM_AUDIO_CHANNELS * 3]; - for (int i = 0; i < AUDIO_FRAMES_PER_UPDATE; i++) { - AudioMgr_CreateNextAudioBuffer(audio_buffer + i * (num_audio_samples * NUM_AUDIO_CHANNELS), num_audio_samples); - } - //for (uint32_t i = 0; i < 2 * num_audio_samples; i++) { - // audio_buffer[i] = Rand_Next() & 0xFF; - //} - // printf("Audio samples before submitting: %d\n", audio_api->buffered()); - AudioPlayer_Play((u8*)audio_buffer, num_audio_samples * (sizeof(int16_t) * NUM_AUDIO_CHANNELS * AUDIO_FRAMES_PER_UPDATE)); PadMgr_ThreadEntry(&gPadMgr); diff --git a/soh/src/code/z_kankyo.c b/soh/src/code/z_kankyo.c index afcd0f4fa..f3ac083ab 100644 --- a/soh/src/code/z_kankyo.c +++ b/soh/src/code/z_kankyo.c @@ -226,6 +226,9 @@ u16 Environment_GetPixelDepth(s32 x, s32 y) { void Environment_GraphCallback(GraphicsContext* gfxCtx, void* param) { GlobalContext* globalCtx = (GlobalContext*)param; + OTRGetPixelDepthPrepare(D_8015FD7E, D_8015FD80); + Lights_GlowCheckPrepare(globalCtx); + D_8011FB44 = Environment_GetPixelDepth(D_8015FD7E, D_8015FD80); Lights_GlowCheck(globalCtx); } diff --git a/soh/src/code/z_lights.c b/soh/src/code/z_lights.c index 2c7140c73..c9b60ceca 100644 --- a/soh/src/code/z_lights.c +++ b/soh/src/code/z_lights.c @@ -323,6 +323,44 @@ Lights* Lights_New(GraphicsContext* gfxCtx, u8 ambientR, u8 ambientG, u8 ambient return lights; } +void Lights_GlowCheckPrepare(GlobalContext* globalCtx) { + LightNode* node; + LightPoint* params; + Vec3f pos; + Vec3f multDest; + f32 wDest; + f32 wX; + f32 wY; + + node = globalCtx->lightCtx.listHead; + + while (node != NULL) { + params = &node->info->params.point; + + if (node->info->type == LIGHT_POINT_GLOW) { + f32 x, y; + u32 shrink; + uint32_t height; + + pos.x = params->x; + pos.y = params->y; + pos.z = params->z; + func_8002BE04(globalCtx, &pos, &multDest, &wDest); + wX = multDest.x * wDest; + wY = multDest.y * wDest; + + x = wX * 160 + 160; + y = wY * 120 + 120; + shrink = ShrinkWindow_GetCurrentVal(); + + if ((multDest.z > 1.0f) && y >= shrink && y <= SCREEN_HEIGHT - shrink) { + OTRGetPixelDepthPrepare(x, y); + } + } + node = node->next; + } +} + void Lights_GlowCheck(GlobalContext* globalCtx) { LightNode* node; LightPoint* params; From a01392c40e59991d02f7e058bc4d9c7838386e3d Mon Sep 17 00:00:00 2001 From: MegaMech Date: Tue, 19 Apr 2022 11:16:06 -0600 Subject: [PATCH 045/146] Implement todo in extract_assets.py (#154) * Update extract_assets.py * Update extract_assets.py * Update extract_assets.py * Update extract_assets.py * Update extract_assets.py * Update README.md * Update extract_assets.py --- OTRExporter/extract_assets.py | 141 ++++++++++++++++++++++++++++++---- README.md | 28 +++---- 2 files changed, 140 insertions(+), 29 deletions(-) diff --git a/OTRExporter/extract_assets.py b/OTRExporter/extract_assets.py index bb9ed177c..f15cb1beb 100755 --- a/OTRExporter/extract_assets.py +++ b/OTRExporter/extract_assets.py @@ -1,14 +1,51 @@ #!/usr/bin/env python3 -import argparse, json, os, signal, time, sys, shutil +# How to use: +# Place a rom in this directory then run the script. +# If you are using multiple roms, the script will let you choose one. +# To choose with a commandline argument: +# Python3 extract_assets.py +# Invalid input results in the first rom being selected + +import json, os, signal, time, sys, shutil, glob from multiprocessing import Pool, cpu_count, Event, Manager, ProcessError +from enum import Enum import shutil -def BuildOTR(xmlPath): +romVer = "..\\soh\\baserom_non_mq.z64" +roms = []; +checksums = ["", "", ""]; + +class Checksums(Enum): + OOT_NTSC_10 = "EC7011B7" + OOT_NTSC_11 = "D43DA81F" + OOT_NTSC_12 = "693BA2AE" + OOT_PAL_10 = "B044B569" + OOT_PAL_11 = "B2055FBD" + OOT_NTSC_JP_GC_CE = "F7F52DB8" + OOT_NTSC_JP_GC = "F611F4BA" + OOT_NTSC_US_GC = "F3DD35BA" + OOT_PAL_GC = "09465AC3" + OOT_NTSC_JP_MQ = "F43B45BA" + OOT_NTSC_US_MQ = "F034001A" + OOT_PAL_MQ = "1D4136F3" + OOT_PAL_GC_DBG1 = "871E1C92" + OOT_PAL_GC_DBG2 = "87121EFE" + OOT_PAL_GC_MQ_DBG = "917D18F6" + OOT_IQUE_TW = "3D81FB3E" + OOT_IQUE_CN = "B1E1E07B" + OOT_UNKNOWN = "FFFFFFFF" + +CompatibleChecksums = [ + Checksums.OOT_PAL_GC, + Checksums.OOT_PAL_GC_DBG1 +] + +def BuildOTR(xmlPath, rom): shutil.copytree("assets", "Extract/assets") - execStr = "x64\\Release\\ZAPD.exe" if sys.platform == "win32" else "../ZAPD/ZAPD.out" - execStr += " ed -i %s -b baserom.z64 -fl CFG\\filelists -o placeholder -osf placeholder -gsf 1 -rconf CFG/Config.xml -se OTR" % (xmlPath) + execStr = "x64\\Release\\ZAPD.exe" if sys.platform == "win32" else "../ZAPD/ZAPD.out" + execStr += " ed -i %s -b %s -fl CFG\\filelists -o placeholder -osf placeholder -gsf 1 -rconf CFG/Config.xml -se OTR" % (xmlPath, rom) print(execStr) exitValue = os.system(execStr) @@ -18,23 +55,95 @@ def BuildOTR(xmlPath): print("Aborting...", file=os.sys.stderr) print("\n") -def main(): - parser = argparse.ArgumentParser(description="baserom asset extractor") - parser.add_argument("-v", "--version", help="Sets game version.") - args = parser.parse_args() +def checkChecksum(rom): + r = open(rom, "rb") + r.seek(16) + bytes = r.read(4).hex().upper() + r.close() - # TODO: Read from makerom file to automatically determine game version - xmlVer = "GC_NMQ_D" + for checksum in Checksums: + if (checksum.value == bytes): + + for compat in CompatibleChecksums: + if (checksum.name == compat.name): + print("Compatible rom found!") + return checksum + print("Valid oot rom found. However, not compatible with SoH.") + print("Compatible roms:") + for compat in CompatibleChecksums: + print(compat.name+" | 0x"+compat.value) + sys.exit(1) + + print("Wrong rom! No valid checksum found") + sys.exit(1) - if (args.version == "gc_pal_nmpq"): - xmlVer = "GC_NMQ_PAL_F" - elif (args.version == "dbg_mq"): - xmlVer = "GC_MQ_D" +def main(): + + romToUse = ""; + + for file in glob.glob("*.z64"): + roms.append(file) + + if not (roms): + print("Error: No roms located, place one in the OTRExporter directory", file=os.sys.stderr) + sys.exit(1) + + if (len(roms) > 1): + + # If commandline args exist + if (len(sys.argv) > 1): + try: + if ((int(sys.argv[1]) - 1) < 1): + romToUse = roms[0] + + elif ((int(sys.argv[1]) - 1) > len(roms)): + romToUse = roms[len(roms) - 1] + + else: + romToUse = roms[int(sys.argv[1]) - 1] + except: + romToUse = roms[0] + + # No commandline args, select rom using user input + else: + + print(str(len(roms))+" roms found, please select one by pressing 1-"+str(len(roms))) + + count = 1 + for list in range(len(roms)): + print(str(count)+". "+roms[list]) + count += 1 + + while(1): + try: + selection = int(input()) + except: + print("Bad input. Try again with the number keys.") + continue + + if (selection < 1 or selection > len(roms)): + print("Bad input. Try again.") + continue + + else: break + + romToUse = roms[selection - 1] + + else: + romToUse = roms[0] + + match checkChecksum(romToUse).name: + case Checksums.OOT_PAL_GC: + xmlVer = "GC_NMQ_PAL_F" + case Checksums.OOT_PAL_GC_DBG1: + xmlVer = "GC_MQ_D" + case _: # default case + xmlVer = "GC_NMQ_D" if (os.path.exists("Extract")): shutil.rmtree("Extract") - BuildOTR("..\\soh\\assets\\xml\\" + xmlVer + "\\") + BuildOTR("..\\soh\\assets\\xml\\" + xmlVer + "\\", romToUse) if __name__ == "__main__": - main() \ No newline at end of file + main() diff --git a/README.md b/README.md index a002eee8a..e9e7b9070 100644 --- a/README.md +++ b/README.md @@ -55,20 +55,22 @@ Official Discord: https://discord.com/invite/BtBmd55HVH 2. Install [Visual Studio 2022 Community Edition](https://visualstudio.microsoft.com/vs/community/) 2b. In the Visual Studio Installer, install `MSVC v142 - VS 2019 C++`. 4. Clone the Ship of Harkinian repository. - 5. Place `oot debug` rom (not Master Quest) in the `soh` folder named `baserom_original_non_mq`. - 6. Launch `soh/fixbaserom.py`. - 7. Launch `soh/extract_baserom.py`. - 8. Copy the `baserom` folder from the `soh` folder into the `OTRExporter` folder. - 9. Run `OTRExporter/OTRExporter.sln`. - 10. Switch the solution to `Release x64`. - 11. Build the solution. - 12. Launching `OTRExporter/extract_assets.py` will generate an `oot.otr` archive file in `OTRExporter/oot.otr`. - 13. Run `soh/soh.sln` - 14. Switch the solution to `Release x86`. - 15. Build the solution. - 16. Copy the `OTRExporter/oot.otr` archive file to `soh/Release`. - 17. Launch `soh.exe`. + 5. Place one or more [compatible](#compatible-roms) roms in the `OTRExporter` directory with namings of your choice. + 6. Run `OTRExporter/OTRExporter.sln`. + 7. Switch the solution to `Release x64`. + 8. Build the solution. + 9. Launching `OTRExporter/extract_assets.py` will generate an `oot.otr` archive file in `OTRExporter/oot.otr`. + 10. Run `soh/soh.sln` + 11. Switch the solution to `Release x86`. + 12. Build the solution. + 13. Copy the `OTRExporter/oot.otr` archive file to `soh/Release`. + 14. Launch `soh.exe`. +## Compatible Roms +``` +OOT_PAL_GC checksum 0x09465AC3 +OOT_PAL_GC_DBG1 checksum 0x871E1C92 (debug non-master quest) +``` ## Troubleshooting The Exporter - Affirm that you have an `/assets` folder filled with XMLs in the same directory as OTRGui.exe - Affirm that `zapd.exe` exists in the `/assets/extractor` folder From a36243f95ff990279848c29dc243ff31c8707c2d Mon Sep 17 00:00:00 2001 From: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> Date: Mon, 18 Apr 2022 21:03:20 +0200 Subject: [PATCH 046/146] Fix shift for G_LOADTILE --- OTRExporter/OTRExporter/DisplayListExporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OTRExporter/OTRExporter/DisplayListExporter.cpp b/OTRExporter/OTRExporter/DisplayListExporter.cpp index dafa8eb72..4e68d8f13 100644 --- a/OTRExporter/OTRExporter/DisplayListExporter.cpp +++ b/OTRExporter/OTRExporter/DisplayListExporter.cpp @@ -667,7 +667,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina { int sss = (data & 0x00FFF00000000000) >> 44; int ttt = (data & 0x00000FFF00000000) >> 32; - int i = (data & 0x000000000F000000) >> 16; + int i = (data & 0x000000000F000000) >> 24; int uuu = (data & 0x0000000000FFF000) >> 12; int vvv= (data & 0x0000000000000FFF); From 0ec9fc2ecf46a1337ebac519b0a33f07d502d7c5 Mon Sep 17 00:00:00 2001 From: Sirius902 <10891979+Sirius902@users.noreply.github.com> Date: Wed, 20 Apr 2022 02:13:51 -0700 Subject: [PATCH 047/146] Fix OpenGL framebuffer index (#195) --- libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp index 5373f8799..e19e9538c 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp @@ -646,7 +646,7 @@ static int gfx_opengl_create_framebuffer() { framebuffers[i].clrbuf_msaa = clrbuf_msaa; framebuffers[i].rbo = rbo; - return fbo; + return i; } static void gfx_opengl_update_framebuffer_parameters(int fb_id, uint32_t width, uint32_t height, uint32_t msaa_level, bool opengl_invert_y, bool render_target, bool has_depth_buffer, bool can_extract_depth) { From f66178772dae4a296ae38fae54fdff97cd9c5869 Mon Sep 17 00:00:00 2001 From: Thomas Achatz <30968528+shadeRed@users.noreply.github.com> Date: Thu, 21 Apr 2022 17:33:05 -0500 Subject: [PATCH 048/146] Dynamic Wallet Rupee Icon Color (#123) * dynamic rupee rgb * dynamic_wallet_icon cvar * update blue rgb * update blue rgb to match rando * refactor * Update z_parameter.c * update rupeeWalletColors dimensions --- libultraship/libultraship/GameSettings.cpp | 4 ++++ libultraship/libultraship/GameSettings.h | 1 + libultraship/libultraship/SohImGuiImpl.cpp | 5 +++++ soh/src/code/z_parameter.c | 20 ++++++++++++++++++-- 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index 1b8d473b2..1d510c7cd 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -58,6 +58,9 @@ namespace Game { Settings.enhancements.animated_pause_menu = stob(Conf[EnhancementSection]["animated_pause_menu"]); CVar_SetS32("gPauseLiveLink", Settings.enhancements.animated_pause_menu); + Settings.enhancements.dynamic_wallet_icon = stob(Conf[EnhancementSection]["dynamic_wallet_icon"]); + CVar_SetS32(const_cast("gDynamicWalletIcon"), Settings.enhancements.dynamic_wallet_icon); + Settings.enhancements.minimal_ui = stob(Conf[EnhancementSection]["minimal_ui"]); CVar_SetS32("gMinimalUI", Settings.enhancements.minimal_ui); @@ -154,6 +157,7 @@ namespace Game { Conf[EnhancementSection]["fast_text"] = std::to_string(Settings.enhancements.fast_text); Conf[EnhancementSection]["disable_lod"] = std::to_string(Settings.enhancements.disable_lod); Conf[EnhancementSection]["animated_pause_menu"] = std::to_string(Settings.enhancements.animated_pause_menu); + Conf[EnhancementSection]["dynamic_wallet_icon"] = std::to_string(Settings.enhancements.dynamic_wallet_icon); Conf[EnhancementSection]["minimal_ui"] = std::to_string(Settings.enhancements.minimal_ui); Conf[EnhancementSection]["mm_bunny_hood"] = std::to_string(Settings.enhancements.mm_bunny_hood); diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index fe6087494..18f978386 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -23,6 +23,7 @@ struct SoHConfigType { bool fast_text = false; bool disable_lod = false; bool animated_pause_menu = false; + bool dynamic_wallet_icon = false; bool minimal_ui = false; bool mm_bunny_hood = false; } enhancements; diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 860720433..93343b8dd 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -425,6 +425,11 @@ namespace SohImGui { needs_save = true; } + if (ImGui::Checkbox("Dynamic Wallet Icon", &Game::Settings.enhancements.dynamic_wallet_icon)) { + CVar_SetS32(const_cast("gDynamicWalletIcon"), Game::Settings.enhancements.dynamic_wallet_icon); + needs_save = true; + } + ImGui::EndMenu(); } diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index dc96ba133..edc4348b9 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -3129,6 +3129,14 @@ void Interface_Draw(GlobalContext* globalCtx) { }; static s16 rupeeDigitsFirst[] = { 1, 0, 0 }; static s16 rupeeDigitsCount[] = { 2, 3, 3 }; + + // courtesy of https://github.com/TestRunnerSRL/OoT-Randomizer/blob/Dev/ASM/c/hud_colors.c + static s16 rupeeWalletColors[3][3] = { + { 0xC8, 0xFF, 0x64 }, // Base Wallet (Green) + { 0x82, 0x82, 0xFF }, // Adult's Wallet (Blue) + { 0xFF, 0x64, 0x64 }, // Giant's Wallet (Red) + }; + static s16 spoilingItemEntrances[] = { 0x01AD, 0x0153, 0x0153 }; static f32 D_80125B54[] = { -40.0f, -35.0f }; // unused static s16 D_80125B5C[] = { 91, 91 }; // unused @@ -3171,7 +3179,15 @@ void Interface_Draw(GlobalContext* globalCtx) { if (fullUi) { // Rupee Icon - gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 200, 255, 100, interfaceCtx->magicAlpha); + s16* rColor; + + if (CVar_GetS32("gDynamicWalletIcon", 0)) { + rColor = &rupeeWalletColors[CUR_UPG_VALUE(UPG_WALLET)]; + } else { + rColor = &rupeeWalletColors[0]; + } + + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, rColor[0], rColor[1], rColor[2], interfaceCtx->magicAlpha); gDPSetEnvColor(OVERLAY_DISP++, 0, 80, 0, 255); OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gRupeeCounterIconTex, 16, 16, OTRGetRectDimensionFromLeftEdge(26), 206, 16, 16, 1 << 10, 1 << 10); @@ -3269,7 +3285,7 @@ void Interface_Draw(GlobalContext* globalCtx) { Gfx_TextureI8(OVERLAY_DISP, ((u8*)digitTextures[interfaceCtx->counterDigits[svar2]]), 8, 16, OTRGetRectDimensionFromLeftEdge(svar3), 206, 8, 16, 1 << 10, 1 << 10); } - } + } else { // Make sure item counts have black backgrounds gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 0, 0, 0, interfaceCtx->magicAlpha); From f5a3d3c4bf2523ddf46a9895aab49b225a2b0784 Mon Sep 17 00:00:00 2001 From: Rozelette Date: Thu, 21 Apr 2022 17:36:21 -0500 Subject: [PATCH 049/146] Invalidate texture cache when loading dungeon maps (fixes #21) (#168) * Invalidate texture cache when loading dungeon maps (fixes #21) * Adjust point of dungeon map invalidation to account for constant updates each frame --- soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c | 1 - soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c index 52019dcb2..2003a8b14 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c @@ -595,7 +595,6 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) { gSPInvalidateTexCache(POLY_KAL_DISP++, pauseCtx->iconItemSegment); //gSPInvalidateTexCache(POLY_KAL_DISP++, pauseCtx->iconItem24Segment); gSPInvalidateTexCache(POLY_KAL_DISP++, pauseCtx->nameSegment); - gSPInvalidateTexCache(POLY_KAL_DISP++, globalCtx->interfaceCtx.mapSegment); //gSPSegment(POLY_KAL_DISP++, 0x07, pauseCtx->playerSegment); gSPSegment(POLY_KAL_DISP++, 0x08, pauseCtx->iconItemSegment); diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c index 022fdd41d..bd5277286 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c @@ -332,6 +332,10 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC gSPVertex(POLY_KAL_DISP++, &pauseCtx->mapPageVtx[60], 8, 0); + // The dungeon map textures are recreated each frame, so always invalidate them + gSPInvalidateTexCache(POLY_KAL_DISP++, interfaceCtx->mapSegment); + gSPInvalidateTexCache(POLY_KAL_DISP++, interfaceCtx->mapSegment + 0x800); + gDPLoadTextureBlock_4b(POLY_KAL_DISP++, interfaceCtx->mapSegment, G_IM_FMT_CI, 48, 85, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); From ffeb2afcb758ecb024dc4af2ebcb6ac528ae3bdb Mon Sep 17 00:00:00 2001 From: Ada <60364512+GreatArgorath@users.noreply.github.com> Date: Thu, 21 Apr 2022 23:38:56 +0100 Subject: [PATCH 050/146] Changes fast text option to skip text, and makes text speed adjustable via a slider (#173) * Adds fast text option Changes previous "fast text" option to "skip text", and adds a new "fast text" option, which makes text appear 5 times faster. * Fixes magic numbers * Changes text speed to a slider (unfinished) Got most of the code working, but only works upon reloading the game, unsure of how to fix this. * Makes text speed adjustable via a slider * Cleans up changes to z_message_PAL.c --- libultraship/libultraship/GameSettings.cpp | 10 +++++++--- libultraship/libultraship/GameSettings.h | 3 ++- libultraship/libultraship/SohImGuiImpl.cpp | 10 ++++++++-- soh/src/code/z_message_PAL.c | 14 +++++++------- 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index 1d510c7cd..f396b8f36 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -49,8 +49,11 @@ namespace Game { Settings.debug.n64mode = stob(Conf[ConfSection]["n64_mode"]); // Enhancements - Settings.enhancements.fast_text = stob(Conf[EnhancementSection]["fast_text"]); - CVar_SetS32("gFastText", Settings.enhancements.fast_text); + Settings.enhancements.skip_text = stob(Conf[EnhancementSection]["skip_text"]); + CVar_SetS32("gSkipText", Settings.enhancements.skip_text); + + Settings.enhancements.text_speed = Ship::stoi(Conf[EnhancementSection]["text_speed"]); + CVar_SetS32("gTextSpeed", Settings.enhancements.text_speed); Settings.enhancements.disable_lod = stob(Conf[EnhancementSection]["disable_lod"]); CVar_SetS32("gDisableLOD", Settings.enhancements.disable_lod); @@ -154,7 +157,8 @@ namespace Game { Conf[AudioSection]["fanfare"] = std::to_string(Settings.audio.fanfare); // Enhancements - Conf[EnhancementSection]["fast_text"] = std::to_string(Settings.enhancements.fast_text); + Conf[EnhancementSection]["skip_text"] = std::to_string(Settings.enhancements.skip_text); + Conf[EnhancementSection]["text_speed"] = std::to_string(Settings.enhancements.text_speed); Conf[EnhancementSection]["disable_lod"] = std::to_string(Settings.enhancements.disable_lod); Conf[EnhancementSection]["animated_pause_menu"] = std::to_string(Settings.enhancements.animated_pause_menu); Conf[EnhancementSection]["dynamic_wallet_icon"] = std::to_string(Settings.enhancements.dynamic_wallet_icon); diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index 18f978386..1b371fa7e 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -20,7 +20,8 @@ struct SoHConfigType { // Enhancements struct { - bool fast_text = false; + int text_speed = 1; + bool skip_text = false; bool disable_lod = false; bool animated_pause_menu = false; bool dynamic_wallet_icon = false; diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 93343b8dd..7eca28ede 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -395,8 +395,14 @@ namespace SohImGui { ImGui::Text("Gameplay"); ImGui::Separator(); - if (ImGui::Checkbox("Fast Text", &Game::Settings.enhancements.fast_text)) { - CVar_SetS32("gFastText", Game::Settings.enhancements.fast_text); + ImGui::Text("Text Speed", Game::Settings.enhancements.text_speed); + if (ImGui::SliderInt("##TEXTSPEED", &Game::Settings.enhancements.text_speed, 1, 5)) { + CVar_SetS32("gTextSpeed", Game::Settings.enhancements.text_speed); + needs_save = true; + } + + if (ImGui::Checkbox("Skip Text", &Game::Settings.enhancements.skip_text)) { + CVar_SetS32("gSkipText", Game::Settings.enhancements.skip_text); needs_save = true; } diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c index 43b0fcc12..a767ede79 100644 --- a/soh/src/code/z_message_PAL.c +++ b/soh/src/code/z_message_PAL.c @@ -166,7 +166,7 @@ void Message_UpdateOcarinaGame(GlobalContext* globalCtx) { u8 Message_ShouldAdvance(GlobalContext* globalCtx) { Input* input = &globalCtx->state.input[0]; - bool isB_Held = CVar_GetS32("gFastText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B) + bool isB_Held = CVar_GetS32("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B) : CHECK_BTN_ALL(input->press.button, BTN_B); if (CHECK_BTN_ALL(input->press.button, BTN_A) || isB_Held || CHECK_BTN_ALL(input->press.button, BTN_CUP)) { @@ -178,7 +178,7 @@ u8 Message_ShouldAdvance(GlobalContext* globalCtx) { u8 Message_ShouldAdvanceSilent(GlobalContext* globalCtx) { Input* input = &globalCtx->state.input[0]; - bool isB_Held = CVar_GetS32("gFastText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B) + bool isB_Held = CVar_GetS32("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B) : CHECK_BTN_ALL(input->press.button, BTN_B); return CHECK_BTN_ALL(input->press.button, BTN_A) || isB_Held || CHECK_BTN_ALL(input->press.button, BTN_CUP); @@ -951,7 +951,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) { } } i = j - 1; - msgCtx->textDrawPos = i + 1; + msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1); if (character) {} } @@ -1061,7 +1061,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) { msgCtx->textDelay = msgCtx->msgBufDecoded[++i]; break; case MESSAGE_UNSKIPPABLE: - msgCtx->textUnskippable = CVar_GetS32("gFastText", 0) != 1; + msgCtx->textUnskippable = CVar_GetS32("gSkipText", 0) != 1; break; case MESSAGE_TWO_CHOICE: msgCtx->textboxEndType = TEXTBOX_ENDTYPE_2_CHOICE; @@ -1144,7 +1144,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) { } } if (msgCtx->textDelayTimer == 0) { - msgCtx->textDrawPos = i + 1; + msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1); msgCtx->textDelayTimer = msgCtx->textDelay; } else { msgCtx->textDelayTimer--; @@ -2026,7 +2026,7 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) { gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); - bool isB_Held = CVar_GetS32("gFastText", 0) != 0 ? CHECK_BTN_ALL(globalCtx->state.input[0].cur.button, BTN_B) + bool isB_Held = CVar_GetS32("gSkipText", 0) != 0 ? CHECK_BTN_ALL(globalCtx->state.input[0].cur.button, BTN_B) : CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_B); switch (msgCtx->msgMode) { @@ -3067,7 +3067,7 @@ void Message_Update(GlobalContext* globalCtx) { return; } - bool isB_Held = CVar_GetS32("gFastText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B) && !sTextboxSkipped + bool isB_Held = CVar_GetS32("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B) && !sTextboxSkipped : CHECK_BTN_ALL(input->press.button, BTN_B); switch (msgCtx->msgMode) { From f65486d82dfece3b305697e0fd258cdfaa9c6252 Mon Sep 17 00:00:00 2001 From: Ralphie Morell Date: Thu, 21 Apr 2022 18:39:39 -0400 Subject: [PATCH 051/146] Cheats Menu expansion (#176) * Added extra cheats; compacted cheats menu * fixed flag oversight --- .gitignore | 402 +++++++++++++++++++++ libultraship/libultraship/GameSettings.cpp | 12 + libultraship/libultraship/GameSettings.h | 4 + libultraship/libultraship/SohImGuiImpl.cpp | 54 ++- soh/src/code/game.c | 31 ++ 5 files changed, 488 insertions(+), 15 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..fafae443d --- /dev/null +++ b/.gitignore @@ -0,0 +1,402 @@ +# Cache files +__pycache__/ +.pyc +.DS_Store + +# Text editor remnants +.vscode/ +.vs/ +.idea/ +CMakeLists.txt +cmake-build-debug +venv/ + +# Project-specific ignores +build/ +expected/ +notes/ +baserom/ +docs/doxygen/ +*.elf +*.sra +*.z64 +*.n64 +*.v64 +*.map +*.dump +out.txt + +# Tool artifacts +tools/mipspro7.2_compiler/ +tools/overlayhelpers/batchdisasm/output/* +tools/overlayhelpers/batchdisasm/output2/* +tools/overlayhelpers/batchdisasm/mipsdisasm/* +tools/disasm/output/* +tools/asmsplitter/asm/* +tools/asmsplitter/c/* +ctx.c +tools/*dSYM/ +graphs/ + +# Assets +*.png +*.jpg +*.mdli +*.anmi +*.obj +*.mtl +*.fbx +!*_custom* +.extracted-assets.json + +# Docs +!docs/tutorial/ + +# Per-user configuration +.python-version + + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ +**/Properties/launchSettings.json + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +*.out +*.o +*.d +lib/libgfxd/libgfxd.a +ExporterTest/ExporterTest.a +ZAPDUtils/ZAPDUtils.a +.vscode/ +build/ +ZAPDUtils/build/ +ZAPD/BuildInfo.h + +DebugObj/* +ReleaseObj/* \ No newline at end of file diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index f396b8f36..5f19d3c4d 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -124,6 +124,9 @@ namespace Game { Settings.cheats.infinite_magic = stob(Conf[CheatSection]["infinite_magic"]); CVar_SetS32("gInfiniteMagic", Settings.cheats.infinite_magic); + Settings.cheats.infinite_nayru = stob(Conf[CheatSection]["infinite_nayru"]); + CVar_SetS32("gInfiniteNayru", Settings.cheats.infinite_nayru); + Settings.cheats.no_clip = stob(Conf[CheatSection]["no_clip"]); CVar_SetS32("gNoClip", Settings.cheats.no_clip); @@ -136,6 +139,15 @@ namespace Game { Settings.cheats.super_tunic = stob(Conf[CheatSection]["super_tunic"]); CVar_SetS32("gSuperTunic", Settings.cheats.super_tunic); + Settings.cheats.ez_isg = stob(Conf[CheatSection]["ez_isg"]); + CVar_SetS32("gEzISG", Settings.cheats.ez_isg); + + Settings.cheats.no_restrict_item = stob(Conf[CheatSection]["no_restrict_item"]); + CVar_SetS32("gNoRestrictItems", Settings.cheats.no_restrict_item); + + Settings.cheats.freeze_time = stob(Conf[CheatSection]["freeze_time"]); + CVar_SetS32("gFreezeTime", Settings.cheats.freeze_time); + UpdateAudio(); } diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index 1b371fa7e..33e0c8b3d 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -49,10 +49,14 @@ struct SoHConfigType { bool infinite_health = false; bool infinite_ammo = false; bool infinite_magic = false; + bool infinite_nayru = false; bool no_clip = false; bool climb_everything = false; bool moon_jump_on_l = false; bool super_tunic = false; + bool ez_isg = false; + bool no_restrict_item = false; + bool freeze_time = false; } cheats; // Graphics diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 7eca28ede..7355d16a2 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -460,24 +460,33 @@ namespace SohImGui { } if (ImGui::BeginMenu("Cheats")) { - if (ImGui::Checkbox("Infinite Money", &Game::Settings.cheats.infinite_money)) { - CVar_SetS32("gInfiniteMoney", Game::Settings.cheats.infinite_money); - needs_save = true; - } + if (ImGui::BeginMenu("Infinite...")) { + if (ImGui::Checkbox("Money", &Game::Settings.cheats.infinite_money)) { + CVar_SetS32("gInfiniteMoney", Game::Settings.cheats.infinite_money); + needs_save = true; + } - if (ImGui::Checkbox("Infinite Health", &Game::Settings.cheats.infinite_health)) { - CVar_SetS32("gInfiniteHealth", Game::Settings.cheats.infinite_health); - needs_save = true; - } + if (ImGui::Checkbox("Health", &Game::Settings.cheats.infinite_health)) { + CVar_SetS32("gInfiniteHealth", Game::Settings.cheats.infinite_health); + needs_save = true; + } - if (ImGui::Checkbox("Infinite Ammo", &Game::Settings.cheats.infinite_ammo)) { - CVar_SetS32("gInfiniteAmmo", Game::Settings.cheats.infinite_ammo); - needs_save = true; - } + if (ImGui::Checkbox("Ammo", &Game::Settings.cheats.infinite_ammo)) { + CVar_SetS32("gInfiniteAmmo", Game::Settings.cheats.infinite_ammo); + needs_save = true; + } - if (ImGui::Checkbox("Infinite Magic", &Game::Settings.cheats.infinite_magic)) { - CVar_SetS32("gInfiniteMagic", Game::Settings.cheats.infinite_magic); - needs_save = true; + if (ImGui::Checkbox("Magic", &Game::Settings.cheats.infinite_magic)) { + CVar_SetS32("gInfiniteMagic", Game::Settings.cheats.infinite_magic); + needs_save = true; + } + + if (ImGui::Checkbox("Nayru's Love", &Game::Settings.cheats.infinite_nayru)) { + CVar_SetS32("gInfiniteNayru", Game::Settings.cheats.infinite_nayru); + needs_save = true; + } + + ImGui::EndMenu(); } if (ImGui::Checkbox("No Clip", &Game::Settings.cheats.no_clip)) { @@ -500,6 +509,21 @@ namespace SohImGui { needs_save = true; } + if (ImGui::Checkbox("Easy ISG", &Game::Settings.cheats.ez_isg)) { + CVar_SetS32("gEzISG", Game::Settings.cheats.ez_isg); + needs_save = true; + } + + if (ImGui::Checkbox("Unrestricted Items", &Game::Settings.cheats.no_restrict_item)) { + CVar_SetS32("gNoRestrictItems", Game::Settings.cheats.no_restrict_item); + needs_save = true; + } + + if (ImGui::Checkbox("Freeze Time", &Game::Settings.cheats.freeze_time)) { + CVar_SetS32("gFreezeTime", Game::Settings.cheats.freeze_time); + needs_save = true; + } + ImGui::EndMenu(); } diff --git a/soh/src/code/game.c b/soh/src/code/game.c index 9392cbc25..b69537fd8 100644 --- a/soh/src/code/game.c +++ b/soh/src/code/game.c @@ -381,6 +381,11 @@ void GameState_Update(GameState* gameState) { gSaveContext.magic = (gSaveContext.doubleMagic + 1) * 0x30; } } + + // Inf Nayru's Love Timer + if (CVar_GetS32("gInfiniteNayru", 0) != 0) { + gSaveContext.nayrusLoveTimer = 0x44B; + } // Moon Jump On L if (CVar_GetS32("gMoonJumpOnL", 0) != 0) { @@ -393,6 +398,32 @@ void GameState_Update(GameState* gameState) { } } + // Permanent infinite sword glitch (ISG) + if (CVar_GetS32("gEzISG", 0) != 0) { + if (gGlobalCtx) { + Player* player = GET_PLAYER(gGlobalCtx); + player->swordState = 1; + } + } + + // Unrestricted Items + if (CVar_GetS32("gNoRestrictItems", 0) != 0) { + if (gGlobalCtx) { + memset(&gGlobalCtx->interfaceCtx.restrictions, 0, sizeof(gGlobalCtx->interfaceCtx.restrictions)); + } + } + + // Freeze Time + if (CVar_GetS32("gFreezeTime", 0) != 0) { + if (CVar_GetS32("gPrevTime", -1) == -1) { + CVar_SetS32("gPrevTime", gSaveContext.dayTime); + } + + int32_t prevTime = CVar_GetS32("gPrevTime", gSaveContext.dayTime); + gSaveContext.dayTime = prevTime; + } + + gameState->frames++; } From f05d006479217efab7ff37d184b0e71fc971d58a Mon Sep 17 00:00:00 2001 From: Baoulettes Date: Fri, 22 Apr 2022 00:40:22 +0200 Subject: [PATCH 052/146] [MOD]Visual & audio Stone of agony (#177) * Visual / Audio Stone of Agony This add Sound and blinking icon for the item Stone of Agony. Useful for peoples that have issues with rumble anything other person that is also blind or deaf. This is made with these second person in mind, home they will like it :) * Adding bool there Yes I do fiels one by one to be sure * Adding the Cvar register 1 file left :D * Adding the main change in func_80848EF8 And that the last file :) --- libultraship/libultraship/GameSettings.cpp | 5 +++ libultraship/libultraship/GameSettings.h | 2 + soh/soh/Enhancements/bootcommands.c | 1 + .../actors/ovl_player_actor/z_player.c | 37 +++++++++++++++++++ 4 files changed, 45 insertions(+) diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index 5f19d3c4d..2ce22d6f9 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -67,6 +67,9 @@ namespace Game { Settings.enhancements.minimal_ui = stob(Conf[EnhancementSection]["minimal_ui"]); CVar_SetS32("gMinimalUI", Settings.enhancements.minimal_ui); + Settings.enhancements.visualagony = stob(Conf[EnhancementSection]["visualagony"]); + CVar_SetS32("gVisualAgony", Settings.enhancements.visualagony); + Settings.enhancements.mm_bunny_hood = stob(Conf[EnhancementSection]["mm_bunny_hood"]); CVar_SetS32("gMMBunnyHood", Settings.enhancements.mm_bunny_hood); @@ -175,8 +178,10 @@ namespace Game { Conf[EnhancementSection]["animated_pause_menu"] = std::to_string(Settings.enhancements.animated_pause_menu); Conf[EnhancementSection]["dynamic_wallet_icon"] = std::to_string(Settings.enhancements.dynamic_wallet_icon); Conf[EnhancementSection]["minimal_ui"] = std::to_string(Settings.enhancements.minimal_ui); + Conf[EnhancementSection]["visualagony"] = std::to_string(Settings.enhancements.visualagony); Conf[EnhancementSection]["mm_bunny_hood"] = std::to_string(Settings.enhancements.mm_bunny_hood); + // Controllers Conf[ControllerSection]["gyro_sensitivity"] = std::to_string(Settings.controller.gyro_sensitivity); Conf[ControllerSection]["rumble_strength"] = std::to_string(Settings.controller.rumble_strength); diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index 33e0c8b3d..070bdce38 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -26,7 +26,9 @@ struct SoHConfigType { bool animated_pause_menu = false; bool dynamic_wallet_icon = false; bool minimal_ui = false; + bool visualagony = false; bool mm_bunny_hood = false; + } enhancements; // Controller diff --git a/soh/soh/Enhancements/bootcommands.c b/soh/soh/Enhancements/bootcommands.c index 685593179..c58a11b6b 100644 --- a/soh/soh/Enhancements/bootcommands.c +++ b/soh/soh/Enhancements/bootcommands.c @@ -25,6 +25,7 @@ void BootCommands_Init() CVar_RegisterS32("gDebugEnabled", 0); CVar_RegisterS32("gPauseLiveLink", 0); CVar_RegisterS32("gMinimalUI", 0); + CVar_RegisterS32("gVisualAgony", 0); } //void BootCommands_ParseBootArgs(char* str) diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index 734ba015e..5ff08df85 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -10274,8 +10274,45 @@ void func_80848EF8(Player* this) { } this->unk_6A0 += temp; + + /*Prevent it on horse, while jumping and on title screen. + If you fly around no stone of agony for you! */ + if (CVar_GetS32("gVisualAgony", 0) !=0 && !this->stateFlags1) { + int rectLeft = OTRGetRectDimensionFromLeftEdge(26); //Left X Pos + int rectTop = 60; //Top Y Pos + int rectWidth = 24; //Texture Width + int rectHeight = 24; //Texture Heigh + int DefaultIconA= 50; //Default icon alphe (55 on 255) + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_player.c", 2824); + gDPPipeSync(OVERLAY_DISP++); + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, DefaultIconA); + gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); + if (this->unk_6A0 > 4000000.0f) { + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, 255); + } else { + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, DefaultIconA); + } + if (temp == 0 || temp <= 0.1f) { + /*Fail check, it is used to draw off the icon when + link is standing out range but do not refresh unk_6A0. + Also used to make a default value in my case.*/ + gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, DefaultIconA); + } + gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 255); + gDPSetOtherMode(OVERLAY_DISP++, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_POINT | G_TT_IA16 | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_NONE | G_ZS_PRIM | G_RM_XLU_SURF | G_RM_XLU_SURF2); + gDPLoadTextureBlock(OVERLAY_DISP++, gStoneOfAgonyIconTex, G_IM_FMT_RGBA, G_IM_SIZ_32b, 24, 24, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + gDPSetOtherMode(OVERLAY_DISP++, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_IA16 | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_NONE | G_ZS_PRIM | G_RM_XLU_SURF | G_RM_XLU_SURF2); + gSPWideTextureRectangle(OVERLAY_DISP++, rectLeft << 2, rectTop << 2, (rectLeft + rectWidth) << 2, (rectTop + rectHeight) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_player.c", 3500); + } + if (this->unk_6A0 > 4000000.0f) { this->unk_6A0 = 0.0f; + if (CVar_GetS32("gVisualAgony", 0) !=0 && !this->stateFlags1) { + //This audio is placed here and not in previous CVar check to prevent ears ra.. :) + Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_WOMAN, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E0); + } func_8083264C(this, 120, 20, 10, 0); } } From 8db83099bb6b66bb731bd9850ed40b1fe311b0b2 Mon Sep 17 00:00:00 2001 From: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> Date: Fri, 22 Apr 2022 00:44:33 +0200 Subject: [PATCH 053/146] Fix hardcoded keySegment address (#185) --- soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c b/soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c index 91c059bee..54b93277c 100644 --- a/soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c +++ b/soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c @@ -496,7 +496,7 @@ void EnExItem_DrawMagic(EnExItem* this, GlobalContext* globalCtx, s16 magicIndex } void EnExItem_DrawKey(EnExItem* this, GlobalContext* globalCtx, s32 index) { - static s32 keySegments[] = { 0x0403F140 }; + static void* keySegments[] = { gDropKeySmallTex }; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ex_item.c", 880); From 0ee779f94adbe99c8ff19b04ebe93dddf4f91879 Mon Sep 17 00:00:00 2001 From: Sirius902 <3645979-Sirius902@users.noreply.gitlab.com> Date: Thu, 21 Apr 2022 16:17:27 -0700 Subject: [PATCH 054/146] Make develop compile --- soh/src/overlays/actors/ovl_player_actor/z_player.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index 5ff08df85..aa11b6d7e 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -19,6 +19,7 @@ #include "overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h" #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_link_child/object_link_child.h" +#include "textures/icon_item_24_static/icon_item_24_static.h" typedef struct { /* 0x00 */ u8 itemId; @@ -10265,7 +10266,7 @@ void func_80848C74(GlobalContext* globalCtx, Player* this) { } } -void func_80848EF8(Player* this) { +void func_80848EF8(Player* this, GlobalContext* globalCtx) { if (CHECK_QUEST_ITEM(QUEST_STONE_OF_AGONY)) { f32 temp = 200000.0f - (this->unk_6A4 * 5.0f); @@ -10584,7 +10585,7 @@ void Player_UpdateCommon(Player* this, GlobalContext* globalCtx, Input* input) { else { this->fallStartHeight = this->actor.world.pos.y; } - func_80848EF8(this); + func_80848EF8(this, globalCtx); } } From b540b7fcfcaca50ddaa42f9018232c8634cfd2fa Mon Sep 17 00:00:00 2001 From: Baoulettes Date: Sun, 24 Apr 2022 16:50:41 +0200 Subject: [PATCH 055/146] Add Enhancement 3D Dropped Items (#144) * Add Enhancement 3D Dropped Items It will change most of dropped item to there 3D models variant, Exclude Rupee from Hyrule Castle (when you are child and in quest to see Zelda.) * Fix z_kaleido_scope_PAL.c L and R button color issues This fix an issue in IF and gDPSetPrimColor for button L & R icon. making it with an else to place the on hover and normal color properly in both button so they both have exact same colour * Fix quite a big logic issue for 3D item drops In short,case logic required to be different with break; old version make it all fucked up with improper values. * Clean Const that was present nor not. * Update z_kaleido_scope_PAL.c * Update z_kaleido_scope_PAL.c --- libultraship/libultraship/GameSettings.cpp | 4 + libultraship/libultraship/GameSettings.h | 1 + libultraship/libultraship/SohImGuiImpl.cpp | 6 + soh/soh/Enhancements/bootcommands.c | 2 + soh/src/code/z_en_item00.c | 326 ++++++++++++++++++--- 5 files changed, 293 insertions(+), 46 deletions(-) diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index 2ce22d6f9..c056dec71 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -73,6 +73,9 @@ namespace Game { Settings.enhancements.mm_bunny_hood = stob(Conf[EnhancementSection]["mm_bunny_hood"]); CVar_SetS32("gMMBunnyHood", Settings.enhancements.mm_bunny_hood); + Settings.enhancements.newdrops = stob(Conf[EnhancementSection]["newdrops"]); + CVar_SetS32("gNewDrops", Settings.enhancements.newdrops); + // Audio Settings.audio.master = Ship::stof(Conf[AudioSection]["master"]); CVar_SetFloat("gGameMasterVolume", Settings.audio.master); @@ -178,6 +181,7 @@ namespace Game { Conf[EnhancementSection]["animated_pause_menu"] = std::to_string(Settings.enhancements.animated_pause_menu); Conf[EnhancementSection]["dynamic_wallet_icon"] = std::to_string(Settings.enhancements.dynamic_wallet_icon); Conf[EnhancementSection]["minimal_ui"] = std::to_string(Settings.enhancements.minimal_ui); + Conf[EnhancementSection]["newdrops"] = std::to_string(Settings.enhancements.newdrops); Conf[EnhancementSection]["visualagony"] = std::to_string(Settings.enhancements.visualagony); Conf[EnhancementSection]["mm_bunny_hood"] = std::to_string(Settings.enhancements.mm_bunny_hood); diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index 070bdce38..990132f4e 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -26,6 +26,7 @@ struct SoHConfigType { bool animated_pause_menu = false; bool dynamic_wallet_icon = false; bool minimal_ui = false; + bool newdrops = false; bool visualagony = false; bool mm_bunny_hood = false; diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 7355d16a2..72a44162e 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -431,8 +431,14 @@ namespace SohImGui { needs_save = true; } + if (ImGui::Checkbox("Enable 3D Dropped items", &Game::Settings.enhancements.newdrops)) { + CVar_SetS32("gNewDrops", Game::Settings.enhancements.newdrops); + needs_save = true; + } + if (ImGui::Checkbox("Dynamic Wallet Icon", &Game::Settings.enhancements.dynamic_wallet_icon)) { CVar_SetS32(const_cast("gDynamicWalletIcon"), Game::Settings.enhancements.dynamic_wallet_icon); + needs_save = true; } diff --git a/soh/soh/Enhancements/bootcommands.c b/soh/soh/Enhancements/bootcommands.c index c58a11b6b..f3ad9aaac 100644 --- a/soh/soh/Enhancements/bootcommands.c +++ b/soh/soh/Enhancements/bootcommands.c @@ -25,7 +25,9 @@ void BootCommands_Init() CVar_RegisterS32("gDebugEnabled", 0); CVar_RegisterS32("gPauseLiveLink", 0); CVar_RegisterS32("gMinimalUI", 0); + CVar_RegisterS32("gNewDrops", 0); CVar_RegisterS32("gVisualAgony", 0); + } //void BootCommands_ParseBootArgs(char* str) diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c index 2693c4b0f..d0179a5e1 100644 --- a/soh/src/code/z_en_item00.c +++ b/soh/src/code/z_en_item00.c @@ -5,6 +5,9 @@ #define FLAGS 0 +//Used to force variable to be used in different function, feel free to correct me if you have a better way +static s16 DroppedItemRot = 0; + void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx); void EnItem00_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx); @@ -355,11 +358,34 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { switch (this->actor.params) { case ITEM00_RUPEE_GREEN: + if (CVar_GetS32("gNewDrops", 0) !=0) { + Actor_SetScale(&this->actor, 0.3f); + this->scale = 0.3f; + yOffset = 50.0f; + shadowScale = 0.3f; + this->actor.world.rot.x = 0x4000; + break; + } case ITEM00_RUPEE_BLUE: + if (CVar_GetS32("gNewDrops", 0) !=0) { + Actor_SetScale(&this->actor, 0.3f); + this->scale = 0.3f; + yOffset = 50.0f; + shadowScale = 0.3f; + this->actor.world.rot.x = 0x4000; + } case ITEM00_RUPEE_RED: - Actor_SetScale(&this->actor, 0.015f); - this->scale = 0.015f; - yOffset = 750.0f; + if (CVar_GetS32("gNewDrops", 0) !=0) { + Actor_SetScale(&this->actor, 0.3f); + this->scale = 0.3f; + yOffset = 50.0f; + shadowScale = 0.3f; + this->actor.world.rot.x = 0x4000; + } else { + Actor_SetScale(&this->actor, 0.015f); + this->scale = 0.015f; + yOffset = 750.0f; + } break; case ITEM00_SMALL_KEY: this->unk_158 = 0; @@ -374,10 +400,18 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { this->scale = 0.02f; break; case ITEM00_HEART: - this->actor.home.rot.z = Rand_CenteredFloat(65535.0f); - yOffset = 430.0f; - Actor_SetScale(&this->actor, 0.02f); - this->scale = 0.02f; + if (CVar_GetS32("gNewDrops", 0) !=0) { + this->actor.home.rot.z = Rand_CenteredFloat(65535.0f); + yOffset = 25.0f; + Actor_SetScale(&this->actor, 0.3f); + this->scale = 0.3f; + shadowScale = 0.5f; + } else { + this->actor.home.rot.z = Rand_CenteredFloat(65535.0f); + yOffset = 430.0f; + Actor_SetScale(&this->actor, 0.02f); + this->scale = 0.02f; + } break; case ITEM00_HEART_CONTAINER: yOffset = 430.0f; @@ -386,42 +420,154 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { this->scale = 0.02f; break; case ITEM00_ARROWS_SINGLE: - yOffset = 400.0f; - Actor_SetScale(&this->actor, 0.02f); - this->scale = 0.02f; - break; + if (CVar_GetS32("gNewDrops", 0) !=0) { + Actor_SetScale(&this->actor, 0.2f); + this->scale = 0.2f; + yOffset = 50.0f; + shadowScale = 0.5f; + this->actor.world.rot.x = 0x4000; + } else { + yOffset = 400.0f; + Actor_SetScale(&this->actor, 0.02f); + this->scale = 0.02f; + } + break; case ITEM00_ARROWS_SMALL: + if (CVar_GetS32("gNewDrops", 0) !=0) { + Actor_SetScale(&this->actor, 0.2f); + this->scale = 0.2f; + yOffset = 50.0f; + shadowScale = 0.5f; + this->actor.world.rot.x = 0x4000; + break; + } case ITEM00_ARROWS_MEDIUM: + if (CVar_GetS32("gNewDrops", 0) !=0) { + Actor_SetScale(&this->actor, 0.2f); + this->scale = 0.2f; + yOffset = 50.0f; + shadowScale = 0.5f; + this->actor.world.rot.x = 0x4000; + break; + } case ITEM00_ARROWS_LARGE: - Actor_SetScale(&this->actor, 0.035f); - this->scale = 0.035f; - yOffset = 250.0f; - break; + if (CVar_GetS32("gNewDrops", 0) !=0) { + Actor_SetScale(&this->actor, 0.2f); + this->scale = 0.2f; + yOffset = 50.0f; + shadowScale = 0.5f; + this->actor.world.rot.x = 0x4000; + } else { + Actor_SetScale(&this->actor, 0.035f); + this->scale = 0.035f; + yOffset = 250.0f; + } + break; case ITEM00_BOMBS_A: + if (CVar_GetS32("gNewDrops", 0) !=0) { + Actor_SetScale(&this->actor, 0.2f); + this->scale = 0.2f; + yOffset = 50.0f; + shadowScale = 0.5f; + this->actor.world.rot.x = 0x4000; + break; + } case ITEM00_BOMBS_B: + if (CVar_GetS32("gNewDrops", 0) !=0) { + Actor_SetScale(&this->actor, 0.2f); + this->scale = 0.2f; + yOffset = 50.0f; + shadowScale = 0.5f; + this->actor.world.rot.x = 0x4000; + break; + } case ITEM00_NUTS: + if (CVar_GetS32("gNewDrops", 0) !=0) { + Actor_SetScale(&this->actor, 0.2f); + this->scale = 0.2f; + yOffset = 50.0f; + shadowScale = 0.5f; + this->actor.world.rot.x = 0x4000; + break; + } case ITEM00_STICK: + if (CVar_GetS32("gNewDrops", 0) !=0) { + Actor_SetScale(&this->actor, 0.2f); + this->scale = 0.2f; + yOffset = 50.0f; + shadowScale = 0.5f; + this->actor.world.rot.x = 0x4000; + break; + } case ITEM00_MAGIC_SMALL: + if (CVar_GetS32("gNewDrops", 0) !=0) { + Actor_SetScale(&this->actor, 0.2f); + this->scale = 0.2f; + yOffset = 50.0f; + shadowScale = 0.5f; + this->actor.world.rot.x = 0x4000; + break; + } case ITEM00_SEEDS: + if (CVar_GetS32("gNewDrops", 0) !=0) { + Actor_SetScale(&this->actor, 0.2f); + this->scale = 0.2f; + yOffset = 50.0f; + shadowScale = 0.5f; + this->actor.world.rot.x = 0x4000; + break; + } case ITEM00_BOMBS_SPECIAL: - Actor_SetScale(&this->actor, 0.03f); - this->scale = 0.03f; - yOffset = 320.0f; - break; + if (CVar_GetS32("gNewDrops", 0) !=0) { + Actor_SetScale(&this->actor, 0.2f); + this->scale = 0.2f; + yOffset = 50.0f; + shadowScale = 0.5f; + this->actor.world.rot.x = 0x4000; + } else { + Actor_SetScale(&this->actor, 0.03f); + this->scale = 0.03f; + yOffset = 320.0f; + } + break; case ITEM00_MAGIC_LARGE: - Actor_SetScale(&this->actor, 0.045 - 1e-10); - this->scale = 0.045 - 1e-10; - yOffset = 320.0f; - break; + if (CVar_GetS32("gNewDrops", 0) !=0) { + Actor_SetScale(&this->actor, 0.2f); + this->scale = 0.2f; + yOffset = 50.0f; + shadowScale = 0.5f; + this->actor.world.rot.x = 0x4000; + } else { + Actor_SetScale(&this->actor, 0.045 - 1e-10); + this->scale = 0.045 - 1e-10; + yOffset = 320.0f; + } + break; case ITEM00_RUPEE_ORANGE: - Actor_SetScale(&this->actor, 0.045 - 1e-10); - this->scale = 0.045 - 1e-10; - yOffset = 750.0f; + if (CVar_GetS32("gNewDrops", 0) !=0) { + Actor_SetScale(&this->actor, 0.45f); + this->scale = 0.45f; + yOffset = 50.0f; + shadowScale = 0.3f; + this->actor.world.rot.x = 0x4000; + } else { + Actor_SetScale(&this->actor, 0.045 - 1e-10); + this->scale = 0.045 - 1e-10; + yOffset = 750.0f; + } break; case ITEM00_RUPEE_PURPLE: - Actor_SetScale(&this->actor, 0.03f); - this->scale = 0.03f; - yOffset = 750.0f; + if (CVar_GetS32("gNewDrops", 0) !=0) { + Actor_SetScale(&this->actor, 0.4f); + this->scale = 0.4f; + yOffset = 50.0f; + shadowScale = 0.3f; + this->actor.world.rot.x = 0x4000; + } else { + Actor_SetScale(&this->actor, 0.03f); + this->scale = 0.03f; + yOffset = 750.0f; + } break; case ITEM00_FLEXIBLE: yOffset = 500.0f; @@ -558,6 +704,19 @@ void EnItem00_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void func_8001DFC8(EnItem00* this, GlobalContext* globalCtx) { + + if (CVar_GetS32("gNewDrops", 0) !=0) { //set the rotation system on selected model only :) + if ((this->actor.params == ITEM_RUPEE_GOLD) || (this->actor.params == ITEM_RUPEE_PURPLE) || + (this->actor.params == ITEM00_ARROWS_SINGLE) || (this->actor.params == ITEM00_ARROWS_SMALL) || + (this->actor.params == ITEM00_ARROWS_MEDIUM) || (this->actor.params == ITEM00_ARROWS_LARGE) || + (this->actor.params == ITEM00_BOMBS_A) || (this->actor.params == ITEM00_BOMBS_B) || + (this->actor.params == ITEM00_NUTS) || (this->actor.params == ITEM00_STICK) || + (this->actor.params == ITEM00_MAGIC_SMALL) || (this->actor.params == ITEM00_SEEDS) || + (this->actor.params == ITEM00_MAGIC_LARGE) || (this->actor.params == ITEM00_HEART) || (this->actor.params == ITEM00_BOMBS_SPECIAL)) { + this->actor.shape.rot.y = DroppedItemRot; + } + } + if ((this->actor.params <= ITEM00_RUPEE_RED) || ((this->actor.params == ITEM00_HEART) && (this->unk_15A < 0)) || (this->actor.params == ITEM00_HEART_PIECE)) { this->actor.shape.rot.y += 960; @@ -731,6 +890,10 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) { EnItem00* this = (EnItem00*)thisx; s32 pad; + if (CVar_GetS32("gNewDrops", 0) !=0) { //Update 3D Model rotation on frame update :) + DroppedItemRot += 100; + } + if (this->unk_15A > 0) { this->unk_15A--; } @@ -934,15 +1097,35 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) { void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) { EnItem00* this = (EnItem00*)thisx; f32 mtxScale; - + if (!(this->unk_156 & this->unk_158)) { switch (this->actor.params) { case ITEM00_RUPEE_GREEN: + if (CVar_GetS32("gNewDrops", 0) !=0) { + GetItem_Draw(globalCtx, GID_RUPEE_GREEN); + break; + } case ITEM00_RUPEE_BLUE: + if (CVar_GetS32("gNewDrops", 0) !=0) { + GetItem_Draw(globalCtx, GID_RUPEE_BLUE); + break; + } case ITEM00_RUPEE_RED: + if (CVar_GetS32("gNewDrops", 0) !=0) { + GetItem_Draw(globalCtx, GID_RUPEE_RED); + break; + } case ITEM00_RUPEE_ORANGE: + if (CVar_GetS32("gNewDrops", 0) !=0) { + GetItem_Draw(globalCtx, GID_RUPEE_GOLD); + break; + } case ITEM00_RUPEE_PURPLE: - EnItem00_DrawRupee(this, globalCtx); + if (CVar_GetS32("gNewDrops", 0) !=0) { + GetItem_Draw(globalCtx, GID_RUPEE_PURPLE); + } else { + EnItem00_DrawRupee(this, globalCtx); + } break; case ITEM00_HEART_PIECE: EnItem00_DrawHeartPiece(this, globalCtx); @@ -951,34 +1134,85 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) { EnItem00_DrawHeartContainer(this, globalCtx); break; case ITEM00_HEART: - if (this->unk_15A < 0) { - if (this->unk_15A == -1) { - s8 bankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_GI_HEART); - - if (Object_IsLoaded(&globalCtx->objectCtx, bankIndex)) { - this->actor.objBankIndex = bankIndex; - Actor_SetObjectDependency(globalCtx, &this->actor); - this->unk_15A = -2; - } - } else { - mtxScale = 16.0f; - Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); - GetItem_Draw(globalCtx, GID_HEART); - } - break; + if (CVar_GetS32("gNewDrops", 0) !=0) { + GetItem_Draw(globalCtx, GID_HEART); + mtxScale = 16.0f; + Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); + break; + } else { + if (this->unk_15A < 0) { + if (this->unk_15A == -1) { + s8 bankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_GI_HEART); + + if (Object_IsLoaded(&globalCtx->objectCtx, bankIndex)) { + this->actor.objBankIndex = bankIndex; + Actor_SetObjectDependency(globalCtx, &this->actor); + this->unk_15A = -2; + } + } else { + mtxScale = 16.0f; + Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); + GetItem_Draw(globalCtx, GID_HEART); + } + break; + } } case ITEM00_BOMBS_A: + if (CVar_GetS32("gNewDrops", 0) !=0) { + GetItem_Draw(globalCtx, GID_BOMB); + break; + } case ITEM00_BOMBS_B: + if (CVar_GetS32("gNewDrops", 0) !=0) { + GetItem_Draw(globalCtx, GID_BOMB); + break; + } case ITEM00_BOMBS_SPECIAL: case ITEM00_ARROWS_SINGLE: + if (CVar_GetS32("gNewDrops", 0) !=0) { + GetItem_Draw(globalCtx, GID_ARROWS_SMALL); + break; + } case ITEM00_ARROWS_SMALL: + if (CVar_GetS32("gNewDrops", 0) !=0) { + GetItem_Draw(globalCtx, GID_ARROWS_SMALL); + break; + } case ITEM00_ARROWS_MEDIUM: + if (CVar_GetS32("gNewDrops", 0) !=0) { + GetItem_Draw(globalCtx, GID_ARROWS_MEDIUM); + break; + } case ITEM00_ARROWS_LARGE: + if (CVar_GetS32("gNewDrops", 0) !=0) { + GetItem_Draw(globalCtx, GID_ARROWS_LARGE); + break; + } case ITEM00_NUTS: + if (CVar_GetS32("gNewDrops", 0) !=0) { + GetItem_Draw(globalCtx, GID_NUTS); + break; + } case ITEM00_STICK: + if (CVar_GetS32("gNewDrops", 0) !=0) { + GetItem_Draw(globalCtx, GID_STICK); + break; + } case ITEM00_MAGIC_LARGE: + if (CVar_GetS32("gNewDrops", 0) !=0) { + GetItem_Draw(globalCtx, GID_MAGIC_LARGE); + break; + } case ITEM00_MAGIC_SMALL: + if (CVar_GetS32("gNewDrops", 0) !=0) { + GetItem_Draw(globalCtx, GID_MAGIC_SMALL); + break; + } case ITEM00_SEEDS: + if (CVar_GetS32("gNewDrops", 0) !=0) { + GetItem_Draw(globalCtx, GID_SEEDS); + break; + } case ITEM00_SMALL_KEY: EnItem00_DrawCollectible(this, globalCtx); break; From 6860600648b06778b5ff57e0aab5f2fd48749a1b Mon Sep 17 00:00:00 2001 From: Baoulettes Date: Sun, 24 Apr 2022 16:51:29 +0200 Subject: [PATCH 056/146] Potential fix for Title being over Kaleido. (#162) * Potential fix for Title being over Kaleido. Changing "OVERLAY_DISP" to "POLY_XLU_DISP" seem to fix and do not bring any errors (I did tried scene one by one and walked around in game) It may be no correct but it could point to the right direction if that is not correct. * Update z_actor.c * Update graph.c * Update z64.h * Update macros.h --- soh/include/macros.h | 1 + soh/include/z64.h | 3 +++ soh/src/code/graph.c | 5 +++++ soh/src/code/z_actor.c | 13 +++++++------ 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/soh/include/macros.h b/soh/include/macros.h index 0d86c56c3..8563449b1 100644 --- a/soh/include/macros.h +++ b/soh/include/macros.h @@ -129,6 +129,7 @@ extern GraphicsContext* __gfxCtx; #define WORK_DISP __gfxCtx->work.p #define POLY_OPA_DISP __gfxCtx->polyOpa.p #define POLY_XLU_DISP __gfxCtx->polyXlu.p +#define TITLE_CARD_DISP __gfxCtx->titlecard.p #define POLY_KAL_DISP __gfxCtx->polyKal.p #define OVERLAY_DISP __gfxCtx->overlay.p diff --git a/soh/include/z64.h b/soh/include/z64.h index 24ec79946..92966f239 100644 --- a/soh/include/z64.h +++ b/soh/include/z64.h @@ -83,6 +83,7 @@ typedef struct { /* 0x00000 */ u16 headMagic; // GFXPOOL_HEAD_MAGIC /* 0x00008 */ Gfx polyOpaBuffer[0x2FC0]; /* 0x0BF08 */ Gfx polyXluBuffer[0x1000]; + /* 0xXXXXX */ Gfx titlecardBuffer[0x1000]; /* 0x0BF08 */ Gfx polyKalBuffer[0x1000]; /* 0x0FF08 */ Gfx overlayBuffer[0x800]; /* 0x11F08 */ Gfx workBuffer[0x100]; @@ -130,6 +131,7 @@ typedef struct OSScTask { typedef struct GraphicsContext { /* 0x0000 */ Gfx* polyOpaBuffer; // Pointer to "Zelda 0" /* 0x0004 */ Gfx* polyXluBuffer; // Pointer to "Zelda 1" + /* 0xXXX */ Gfx* titlecardBuffer; // Pointer to "Paris" /* 0xXXX */ Gfx* polyKalBuffer; // Pointer to "Rome" /* 0x0008 */ char unk_008[0x08]; // Unused, could this be pointers to "Zelda 2" / "Zelda 3" /* 0x0010 */ Gfx* overlayBuffer; // Pointer to "Zelda 4" @@ -149,6 +151,7 @@ typedef struct GraphicsContext { /* 0x02A8 */ TwoHeadGfxArena overlay; // "Zelda 4" /* 0x02B8 */ TwoHeadGfxArena polyOpa; // "Zelda 0" /* 0x02C8 */ TwoHeadGfxArena polyXlu; // "Zelda 1" + /* 0x0XXX */ TwoHeadGfxArena titlecard; // When in Paris... /* 0x0XXX */ TwoHeadGfxArena polyKal; // When in Rome... /* 0x02D8 */ u32 gfxPoolIdx; /* 0x02DC */ u16* curFrameBuffer; diff --git a/soh/src/code/graph.c b/soh/src/code/graph.c index 34283f342..3a1719731 100644 --- a/soh/src/code/graph.c +++ b/soh/src/code/graph.c @@ -95,12 +95,14 @@ void Graph_InitTHGA(GraphicsContext* gfxCtx) { pool->tailMagic = GFXPOOL_TAIL_MAGIC; THGA_Ct(&gfxCtx->polyOpa, pool->polyOpaBuffer, sizeof(pool->polyOpaBuffer)); THGA_Ct(&gfxCtx->polyXlu, pool->polyXluBuffer, sizeof(pool->polyXluBuffer)); + THGA_Ct(&gfxCtx->titlecard, pool->titlecardBuffer, sizeof(pool->titlecardBuffer)); THGA_Ct(&gfxCtx->polyKal, pool->polyKalBuffer, sizeof(pool->polyKalBuffer)); THGA_Ct(&gfxCtx->overlay, pool->overlayBuffer, sizeof(pool->overlayBuffer)); THGA_Ct(&gfxCtx->work, pool->workBuffer, sizeof(pool->workBuffer)); gfxCtx->polyOpaBuffer = pool->polyOpaBuffer; gfxCtx->polyXluBuffer = pool->polyXluBuffer; + gfxCtx->titlecardBuffer = pool->titlecardBuffer; gfxCtx->polyKalBuffer = pool->polyKalBuffer; gfxCtx->overlayBuffer = pool->overlayBuffer; gfxCtx->workBuffer = pool->workBuffer; @@ -274,6 +276,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { gDPNoOpString(WORK_DISP++, "WORK_DISP 開始", 0); gDPNoOpString(POLY_OPA_DISP++, "POLY_OPA_DISP 開始", 0); gDPNoOpString(POLY_XLU_DISP++, "POLY_XLU_DISP 開始", 0); + gDPNoOpString(TITLE_CARD_DISP++, "TITLE_CARD_DISP 開始", 0);//unsure if needed gDPNoOpString(OVERLAY_DISP++, "OVERLAY_DISP 開始", 0); CLOSE_DISPS(gfxCtx, "../graph.c", 975); @@ -286,6 +289,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { gDPNoOpString(WORK_DISP++, "WORK_DISP 終了", 0); gDPNoOpString(POLY_OPA_DISP++, "POLY_OPA_DISP 終了", 0); gDPNoOpString(POLY_XLU_DISP++, "POLY_XLU_DISP 終了", 0); + gDPNoOpString(TITLE_CARD_DISP++, "TITLE_CARD_DISP 終了", 0); gDPNoOpString(OVERLAY_DISP++, "OVERLAY_DISP 終了", 0); CLOSE_DISPS(gfxCtx, "../graph.c", 996); @@ -294,6 +298,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { gSPBranchList(WORK_DISP++, gfxCtx->polyOpaBuffer); gSPBranchList(POLY_OPA_DISP++, gfxCtx->polyXluBuffer); + gSPBranchList(POLY_XLU_DISP++, gfxCtx->titlecardBuffer); gSPBranchList(POLY_XLU_DISP++, gfxCtx->polyKalBuffer); gSPBranchList(POLY_KAL_DISP++, gfxCtx->overlayBuffer); gDPPipeSync(OVERLAY_DISP++); diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index fee697055..eee9d8882 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -992,29 +992,30 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) { height = (width * height > 0x1000) ? 0x1000 / width : height; titleSecondY = titleY + (height * 4); - OVERLAY_DISP = func_80093808(OVERLAY_DISP); + //TITLE_CARD_DISP Goes over POLY_XLU_DISP but under POLY_KAL_DISP + TITLE_CARD_DISP = func_80093808(TITLE_CARD_DISP); - gDPSetPrimColor(OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity, + gDPSetPrimColor(TITLE_CARD_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->alpha); - gDPLoadTextureBlock(OVERLAY_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset, G_IM_FMT_IA, + gDPLoadTextureBlock(TITLE_CARD_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(OVERLAY_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4) - 1, + gSPTextureRectangle(TITLE_CARD_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4) - 1, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); height = titleCtx->height - height; // If texture is bigger than 0x1000, display the rest if (height > 0) { - gDPLoadTextureBlock(OVERLAY_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset + 0x1000, + gDPLoadTextureBlock(TITLE_CARD_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset + 0x1000, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(OVERLAY_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4, + gSPTextureRectangle(TITLE_CARD_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4, titleSecondY + (height * 4) - 1, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); } From 7d26b322f580e29855dba20a71670cbcfbfd423f Mon Sep 17 00:00:00 2001 From: Baoulettes Date: Sun, 24 Apr 2022 16:51:54 +0200 Subject: [PATCH 057/146] Fix minimap update in dungeon (#171) Thanks to Rozelette for this method ! --- soh/src/code/z_map_exp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/soh/src/code/z_map_exp.c b/soh/src/code/z_map_exp.c index 734209770..cfef800c9 100644 --- a/soh/src/code/z_map_exp.c +++ b/soh/src/code/z_map_exp.c @@ -664,6 +664,7 @@ void Minimap_Draw(GlobalContext* globalCtx) { if (CHECK_DUNGEON_ITEM(DUNGEON_MAP, mapIndex)) { gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 100, 255, 255, interfaceCtx->minimapAlpha); + gSPInvalidateTexCache(OVERLAY_DISP++, interfaceCtx->mapSegment); gDPLoadTextureBlock_4b(OVERLAY_DISP++, interfaceCtx->mapSegment, G_IM_FMT_I, 96, 85, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); From 73ede53447c842c1c48d82a6636d9288490dbf71 Mon Sep 17 00:00:00 2001 From: sholdee <102821812+sholdee@users.noreply.github.com> Date: Sun, 24 Apr 2022 09:58:29 -0500 Subject: [PATCH 058/146] Fix build dates (#194) * Delete build.c * Update build.c * Update soh.vcxproj --- soh/build.c | 8 -------- soh/soh.vcxproj | 5 +---- soh/src/boot/build.c | 4 ---- 3 files changed, 1 insertion(+), 16 deletions(-) delete mode 100644 soh/build.c diff --git a/soh/build.c b/soh/build.c deleted file mode 100644 index f3f9bdae6..000000000 --- a/soh/build.c +++ /dev/null @@ -1,8 +0,0 @@ -const char gBuildVersion[] = "DECKARD ALFA (1.0.0)"; -const char gBuildTeam[] = "github.com/harbourmasters"; -#ifdef __TIMESTAMP__ -const char gBuildDate[] = __TIMESTAMP__; -#else -const char gBuildDate[] = __DATE__ " " __TIME__; -#endif -const char gBuildMakeOption[] = ""; diff --git a/soh/soh.vcxproj b/soh/soh.vcxproj index adf205f14..d35dd18b3 100644 --- a/soh/soh.vcxproj +++ b/soh/soh.vcxproj @@ -112,9 +112,6 @@ true true - - copy /b $(ProjectDir)src\boot\build.c +,, - @@ -1407,4 +1404,4 @@ - \ No newline at end of file + diff --git a/soh/src/boot/build.c b/soh/src/boot/build.c index f3f9bdae6..f60380467 100644 --- a/soh/src/boot/build.c +++ b/soh/src/boot/build.c @@ -1,8 +1,4 @@ const char gBuildVersion[] = "DECKARD ALFA (1.0.0)"; const char gBuildTeam[] = "github.com/harbourmasters"; -#ifdef __TIMESTAMP__ -const char gBuildDate[] = __TIMESTAMP__; -#else const char gBuildDate[] = __DATE__ " " __TIME__; -#endif const char gBuildMakeOption[] = ""; From 5a40f394944a69c1fa16d993eee3a2ae8752cd04 Mon Sep 17 00:00:00 2001 From: Ada <60364512+GreatArgorath@users.noreply.github.com> Date: Sun, 24 Apr 2022 15:59:41 +0100 Subject: [PATCH 059/146] Adds checkbox for visual stone of agony (#200) --- libultraship/libultraship/SohImGuiImpl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 72a44162e..3556177d7 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -416,6 +416,11 @@ namespace SohImGui { needs_save = true; } + if (ImGui::Checkbox("Visual Stone of Agony", &Game::Settings.enhancements.visualagony)) { + CVar_SetS32("gVisualAgony", Game::Settings.enhancements.visualagony); + needs_save = true; + } + ImGui::Text("Graphics"); ImGui::Separator(); From eb97186f73187089d6b5134f639b5942b2295cbd Mon Sep 17 00:00:00 2001 From: MegaMech Date: Sun, 24 Apr 2022 09:00:14 -0600 Subject: [PATCH 060/146] readme build instructions split (#201) * Create BUILDING.md * Update README.md * Update README.md * Update README.md --- BUILDING.md | 22 ++++++++++++++++++++++ README.md | 20 +------------------- 2 files changed, 23 insertions(+), 19 deletions(-) create mode 100644 BUILDING.md diff --git a/BUILDING.md b/BUILDING.md new file mode 100644 index 000000000..82c26bff4 --- /dev/null +++ b/BUILDING.md @@ -0,0 +1,22 @@ +# Building Ship of Harkinian + + 1. Install [Python](https://www.python.org/ftp/python/3.10.2/python-3.10.2-amd64.exe) + 2. Install [Visual Studio 2022 Community Edition](https://visualstudio.microsoft.com/vs/community/) + 2b. In the Visual Studio Installer, install `MSVC v142 - VS 2019 C++`. + 4. Clone the Ship of Harkinian repository. + 5. Place one or more [compatible](#compatible-roms) roms in the `OTRExporter` directory with namings of your choice. + 6. Run `OTRExporter/OTRExporter.sln`. + 7. Switch the solution to `Release x64`. + 8. Build the solution. + 9. Launching `OTRExporter/extract_assets.py` will generate an `oot.otr` archive file in `OTRExporter/oot.otr`. + 10. Run `soh/soh.sln` + 11. Switch the solution to `Release x86`. + 12. Build the solution. + 13. Copy the `OTRExporter/oot.otr` archive file to `soh/Release`. + 14. Launch `soh.exe`. + +## Compatible Roms +``` +OOT_PAL_GC checksum 0x09465AC3 +OOT_PAL_GC_DBG1 checksum 0x871E1C92 (debug non-master quest) +``` diff --git a/README.md b/README.md index e9e7b9070..65a6b90e0 100644 --- a/README.md +++ b/README.md @@ -51,26 +51,8 @@ Official Discord: https://discord.com/invite/BtBmd55HVH ## Building The Ship of Harkinian - 1. Install [Python](https://www.python.org/ftp/python/3.10.2/python-3.10.2-amd64.exe) - 2. Install [Visual Studio 2022 Community Edition](https://visualstudio.microsoft.com/vs/community/) - 2b. In the Visual Studio Installer, install `MSVC v142 - VS 2019 C++`. - 4. Clone the Ship of Harkinian repository. - 5. Place one or more [compatible](#compatible-roms) roms in the `OTRExporter` directory with namings of your choice. - 6. Run `OTRExporter/OTRExporter.sln`. - 7. Switch the solution to `Release x64`. - 8. Build the solution. - 9. Launching `OTRExporter/extract_assets.py` will generate an `oot.otr` archive file in `OTRExporter/oot.otr`. - 10. Run `soh/soh.sln` - 11. Switch the solution to `Release x86`. - 12. Build the solution. - 13. Copy the `OTRExporter/oot.otr` archive file to `soh/Release`. - 14. Launch `soh.exe`. +Refer to the [building instructions](https://github.com/HarbourMasters/Shipwright/BUILDING.md) to compile SoH. -## Compatible Roms -``` -OOT_PAL_GC checksum 0x09465AC3 -OOT_PAL_GC_DBG1 checksum 0x871E1C92 (debug non-master quest) -``` ## Troubleshooting The Exporter - Affirm that you have an `/assets` folder filled with XMLs in the same directory as OTRGui.exe - Affirm that `zapd.exe` exists in the `/assets/extractor` folder From 17858fb67c6aee7813e3e4310785803815b9ff08 Mon Sep 17 00:00:00 2001 From: Baoulettes Date: Sun, 24 Apr 2022 17:00:46 +0200 Subject: [PATCH 061/146] Fix languages Zone name on Kaleido (#203) This fix town/village and zone on maps in Kaleido menu. --- .../misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c index 9db5399a4..3c023105f 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c @@ -3177,15 +3177,9 @@ void KaleidoScope_Update(GlobalContext* globalCtx) if (gSaveContext.language == LANGUAGE_ENG) { memcpy(pauseCtx->nameSegment + 0x400, ResourceMgr_LoadTexByName(mapNameTextures[36 + gSaveContext.worldMapArea]), 0xA00); } else if (gSaveContext.language == LANGUAGE_GER) { - DmaMgr_SendRequest1(pauseCtx->nameSegment + 0x400, - (uintptr_t)_map_name_staticSegmentRomStart + - (((void)0, gSaveContext.worldMapArea) * 0xA00) + 0x16C00, - 0xA00, "../z_kaleido_scope_PAL.c", 3780); + memcpy(pauseCtx->nameSegment + 0x400, ResourceMgr_LoadTexByName(mapNameTextures[59 + gSaveContext.worldMapArea]), 0xA00); } else { - DmaMgr_SendRequest1(pauseCtx->nameSegment + 0x400, - (uintptr_t)_map_name_staticSegmentRomStart + - (((void)0, gSaveContext.worldMapArea) * 0xA00) + 0x24800, - 0xA00, "../z_kaleido_scope_PAL.c", 3784); + memcpy(pauseCtx->nameSegment + 0x400, ResourceMgr_LoadTexByName(mapNameTextures[81 + gSaveContext.worldMapArea]), 0xA00); } } // OTRTODO - player on pause From bb3227a7c20c0a6ddbac285a4047ccab3e29b1ea Mon Sep 17 00:00:00 2001 From: Ada <60364512+GreatArgorath@users.noreply.github.com> Date: Sun, 24 Apr 2022 16:02:15 +0100 Subject: [PATCH 062/146] Fixes default text speed (#207) * Fixes text speed * Adds text speed default to ConfigFile.cpp + removes workaround --- libultraship/libultraship/ConfigFile.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libultraship/libultraship/ConfigFile.cpp b/libultraship/libultraship/ConfigFile.cpp index 1b4952139..2e9a8cc94 100644 --- a/libultraship/libultraship/ConfigFile.cpp +++ b/libultraship/libultraship/ConfigFile.cpp @@ -2,6 +2,7 @@ #include "spdlog/spdlog.h" #include "GlobalCtx2.h" #include "Window.h" +#include "GameSettings.h" namespace Ship { ConfigFile::ConfigFile(std::shared_ptr Context, const std::string& Path) : Context(Context), Path(Path), File(Path.c_str()) { @@ -149,6 +150,8 @@ namespace Ship { (*this)["KEYBOARD CONTROLLER BINDING 4"][STR(BTN_STICKDOWN)] = std::to_string(0x01F); (*this)["KEYBOARD CONTROLLER BINDING 4"][STR(BTN_STICKUP)] = std::to_string(0x011); + (*this)["ENHANCEMENT SETTINGS"]["TEXT_SPEED"] = "1"; + (*this)["SDL CONTROLLER 1"]["GUID"] = ""; (*this)["SDL CONTROLLER 2"]["GUID"] = ""; (*this)["SDL CONTROLLER 3"]["GUID"] = ""; From 576842ac74f2e18c2ad75d345be68ea446ad2d2f Mon Sep 17 00:00:00 2001 From: Ada <60364512+GreatArgorath@users.noreply.github.com> Date: Sun, 24 Apr 2022 16:03:25 +0100 Subject: [PATCH 063/146] Makes text speed slider consistent with the rest of the UI (#208) --- libultraship/libultraship/SohImGuiImpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 3556177d7..7af532a09 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -395,8 +395,8 @@ namespace SohImGui { ImGui::Text("Gameplay"); ImGui::Separator(); - ImGui::Text("Text Speed", Game::Settings.enhancements.text_speed); - if (ImGui::SliderInt("##TEXTSPEED", &Game::Settings.enhancements.text_speed, 1, 5)) { + ImGui::Text("Text Speed: %dx", Game::Settings.enhancements.text_speed); + if (ImGui::SliderInt("##TEXTSPEED", &Game::Settings.enhancements.text_speed, 1, 5, "")) { CVar_SetS32("gTextSpeed", Game::Settings.enhancements.text_speed); needs_save = true; } From ffa4a111484cd95cb20985e8f378e59af30eb5dc Mon Sep 17 00:00:00 2001 From: Ada <60364512+GreatArgorath@users.noreply.github.com> Date: Sun, 24 Apr 2022 16:04:06 +0100 Subject: [PATCH 064/146] Fixes visual bug in shops when above 2x text speed (#211) --- soh/src/code/z_message_PAL.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c index a767ede79..4780044a6 100644 --- a/soh/src/code/z_message_PAL.c +++ b/soh/src/code/z_message_PAL.c @@ -1144,7 +1144,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) { } } if (msgCtx->textDelayTimer == 0) { - msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1); + msgCtx->textDrawPos = i + 1; msgCtx->textDelayTimer = msgCtx->textDelay; } else { msgCtx->textDelayTimer--; From 1f3a6b928f4025c12d3ec72263bb6a6bb39c45af Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Mon, 25 Apr 2022 15:19:00 -0500 Subject: [PATCH 065/146] Moved grayscale effect to the gpu and replaced some texture loads (#221) --- .../Lib/Fast3D/U64/PR/ultra64/gbi.h | 17 +++++- .../libultraship/Lib/Fast3D/gfx_cc.cpp | 1 + libultraship/libultraship/Lib/Fast3D/gfx_cc.h | 10 ++-- .../Lib/Fast3D/gfx_direct3d11.cpp | 9 ++- .../Lib/Fast3D/gfx_direct3d_common.cpp | 15 +++++ .../libultraship/Lib/Fast3D/gfx_opengl.cpp | 24 ++++++++ .../libultraship/Lib/Fast3D/gfx_pc.cpp | 55 ++++++++++--------- soh/include/variables.h | 1 + soh/src/code/z_fbdemo_circle.c | 2 - .../overlays/actors/ovl_En_Part/z_en_part.c | 12 ++-- .../ovl_file_choose/z_file_choose.c | 9 +-- .../overlays/gamestates/ovl_title/z_title.c | 2 +- .../ovl_kaleido_scope/z_kaleido_equipment.c | 11 +++- .../misc/ovl_kaleido_scope/z_kaleido_item.c | 9 ++- .../ovl_kaleido_scope/z_kaleido_scope_PAL.c | 8 --- 15 files changed, 126 insertions(+), 59 deletions(-) diff --git a/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h b/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h index 83cc9a55c..3b4b8f7d8 100644 --- a/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h +++ b/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h @@ -170,6 +170,12 @@ #define G_TEXRECT_WIDE 0x37 #define G_FILLWIDERECT 0x38 +/* GFX Effects */ + +// RDP Cmd +#define G_SETGRAYSCALE 0x39 +#define G_SETINTENSITY 0x40 + /* * The following commands are the "generated" RDP commands; the user * never sees them, the RSP microcode generates them. @@ -2821,6 +2827,14 @@ _DW({ \ _g->words.w1 = 0; \ } +#define gsSPGrayscale(pkt, state) \ +{ \ + Gfx *_g = (Gfx *)(pkt); \ + \ + _g->words.w0 = _SHIFTL(G_SETGRAYSCALE, 24, 8); \ + _g->words.w1 = state; \ +} + #ifdef F3DEX_GBI_2 /* * One gSPGeometryMode(pkt,c,s) GBI is equal to these two GBIs. @@ -3161,6 +3175,8 @@ _DW({ \ (_SHIFTL(r, 24, 8) | _SHIFTL(g, 16, 8) | \ _SHIFTL(b, 8, 8) | _SHIFTL(a, 0, 8))) +#define gsDPSetGrayscaleColor(pkt, r, g, b) \ + DPRGBColor(pkt, G_SETINTENSITY, r, g, b, 255) #define gDPSetEnvColor(pkt, r, g, b, a) \ DPRGBColor(pkt, G_SETENVCOLOR, r,g,b,a) #define gsDPSetEnvColor(r, g, b, a) \ @@ -3177,7 +3193,6 @@ _DW({ \ gDPSetColor(pkt, G_SETFILLCOLOR, (d)) #define gsDPSetFillColor(d) \ gsDPSetColor(G_SETFILLCOLOR, (d)) - #define gDPSetPrimDepth(pkt, z, dz) \ gDPSetColor(pkt, G_SETPRIMDEPTH, \ _SHIFTL(z, 16, 16) | _SHIFTL(dz, 0, 16)) diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_cc.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_cc.cpp index 25ae8b324..c92a05b8b 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_cc.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_cc.cpp @@ -16,6 +16,7 @@ void gfx_cc_get_features(uint64_t shader_id0, uint32_t shader_id1, struct CCFeat cc_features->opt_2cyc = (shader_id1 & SHADER_OPT_2CYC) != 0; cc_features->opt_alpha_threshold = (shader_id1 & SHADER_OPT_ALPHA_THRESHOLD) != 0; cc_features->opt_invisible = (shader_id1 & SHADER_OPT_INVISIBLE) != 0; + cc_features->opt_grayscale = (shader_id1 & SHADER_OPT_GRAYSCALE) != 0; cc_features->clamp[0][0] = (shader_id1 & SHADER_OPT_TEXEL0_CLAMP_S); cc_features->clamp[0][1] = (shader_id1 & SHADER_OPT_TEXEL0_CLAMP_T); diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_cc.h b/libultraship/libultraship/Lib/Fast3D/gfx_cc.h index 7bf415f84..f0a9f2eca 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_cc.h +++ b/libultraship/libultraship/Lib/Fast3D/gfx_cc.h @@ -39,10 +39,11 @@ enum { #define SHADER_OPT_2CYC (1 << 4) #define SHADER_OPT_ALPHA_THRESHOLD (1 << 5) #define SHADER_OPT_INVISIBLE (1 << 6) -#define SHADER_OPT_TEXEL0_CLAMP_S (1 << 7) -#define SHADER_OPT_TEXEL0_CLAMP_T (1 << 8) -#define SHADER_OPT_TEXEL1_CLAMP_S (1 << 9) -#define SHADER_OPT_TEXEL1_CLAMP_T (1 << 10) +#define SHADER_OPT_GRAYSCALE (1 << 7) +#define SHADER_OPT_TEXEL0_CLAMP_S (1 << 8) +#define SHADER_OPT_TEXEL0_CLAMP_T (1 << 9) +#define SHADER_OPT_TEXEL1_CLAMP_S (1 << 10) +#define SHADER_OPT_TEXEL1_CLAMP_T (1 << 11) #define CC_SHADER_OPT_POS 56 struct CCFeatures { @@ -54,6 +55,7 @@ struct CCFeatures { bool opt_2cyc; bool opt_alpha_threshold; bool opt_invisible; + bool opt_grayscale; bool used_textures[2]; bool clamp[2][2]; int num_inputs; diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp index 04d777e7e..cea82e09e 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp @@ -88,13 +88,13 @@ struct ShaderProgramD3D11 { static struct { HMODULE d3d11_module; PFN_D3D11_CREATE_DEVICE D3D11CreateDevice; - + HMODULE d3dcompiler_module; pD3DCompile D3DCompile; - + D3D_FEATURE_LEVEL feature_level; uint32_t msaa_num_quality_levels[D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT]; - + ComPtr device; ComPtr swap_chain; ComPtr context; @@ -448,6 +448,9 @@ static struct ShaderProgram *gfx_d3d11_create_and_load_new_shader(uint64_t shade if (cc_features.opt_fog) { ied[ied_index++] = { "FOG", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 }; } + if (cc_features.opt_grayscale) { + ied[ied_index++] = { "GRAYSCALE", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 }; + } for (unsigned int i = 0; i < cc_features.num_inputs; i++) { DXGI_FORMAT format = cc_features.opt_alpha ? DXGI_FORMAT_R32G32B32A32_FLOAT : DXGI_FORMAT_R32G32B32_FLOAT; ied[ied_index++] = { "INPUT", i, format, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 }; diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp index f778812d1..8df273be7 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp @@ -138,6 +138,10 @@ void gfx_direct3d_common_build_shader(char buf[4096], size_t& len, size_t& num_f append_line(buf, &len, " float4 fog : FOG;"); num_floats += 4; } + if (cc_features.opt_grayscale) { + append_line(buf, &len, " float4 grayscale : GRAYSCALE;"); + num_floats += 4; + } for (int i = 0; i < cc_features.num_inputs; i++) { len += sprintf(buf + len, " float%d input%d : INPUT%d;\r\n", cc_features.opt_alpha ? 4 : 3, i + 1, i); num_floats += cc_features.opt_alpha ? 4 : 3; @@ -208,6 +212,9 @@ void gfx_direct3d_common_build_shader(char buf[4096], size_t& len, size_t& num_f if (cc_features.opt_fog) { append_str(buf, &len, ", float4 fog : FOG"); } + if (cc_features.opt_grayscale) { + append_str(buf, &len, ", float4 grayscale : GRAYSCALE"); + } for (int i = 0; i < cc_features.num_inputs; i++) { len += sprintf(buf + len, ", float%d input%d : INPUT%d", cc_features.opt_alpha ? 4 : 3, i + 1, i); } @@ -228,6 +235,9 @@ void gfx_direct3d_common_build_shader(char buf[4096], size_t& len, size_t& num_f if (cc_features.opt_fog) { append_line(buf, &len, " result.fog = fog;"); } + if (cc_features.opt_grayscale) { + append_line(buf, &len, " result.grayscale = grayscale;"); + } for (int i = 0; i < cc_features.num_inputs; i++) { len += sprintf(buf + len, " result.input%d = input%d;\r\n", i + 1, i + 1); } @@ -298,6 +308,11 @@ void gfx_direct3d_common_build_shader(char buf[4096], size_t& len, size_t& num_f } } + if (cc_features.opt_grayscale) { + append_line(buf, &len, "float intensity = (texel.r + texel.g + texel.b) / 3.0;"); + append_line(buf, &len, "texel.rgb = input.grayscale.rgb * intensity;"); + } + if (cc_features.opt_alpha && cc_features.opt_noise) { append_line(buf, &len, " float2 coords = screenSpace.xy * noise_scale;"); append_line(buf, &len, " texel.a *= round(saturate(random(float3(floor(coords), noise_frame)) + texel.a - 0.5));"); diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp index e19e9538c..808b0a558 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp @@ -238,6 +238,13 @@ static struct ShaderProgram* gfx_opengl_create_and_load_new_shader(uint64_t shad append_line(vs_buf, &vs_len, "varying vec4 vFog;"); num_floats += 4; } + + if (cc_features.opt_grayscale) { + append_line(vs_buf, &vs_len, "attribute vec4 aGrayscaleColor;"); + append_line(vs_buf, &vs_len, "varying vec4 vGrayscaleColor;"); + num_floats += 4; + } + for (int i = 0; i < cc_features.num_inputs; i++) { vs_len += sprintf(vs_buf + vs_len, "attribute vec%d aInput%d;\n", cc_features.opt_alpha ? 4 : 3, i + 1); vs_len += sprintf(vs_buf + vs_len, "varying vec%d vInput%d;\n", cc_features.opt_alpha ? 4 : 3, i + 1); @@ -257,6 +264,9 @@ static struct ShaderProgram* gfx_opengl_create_and_load_new_shader(uint64_t shad if (cc_features.opt_fog) { append_line(vs_buf, &vs_len, "vFog = aFog;"); } + if (cc_features.opt_grayscale) { + append_line(vs_buf, &vs_len, "vGrayscaleColor = aGrayscaleColor;"); + } for (int i = 0; i < cc_features.num_inputs; i++) { vs_len += sprintf(vs_buf + vs_len, "vInput%d = aInput%d;\n", i + 1, i + 1); } @@ -279,6 +289,9 @@ static struct ShaderProgram* gfx_opengl_create_and_load_new_shader(uint64_t shad if (cc_features.opt_fog) { append_line(fs_buf, &fs_len, "varying vec4 vFog;"); } + if (cc_features.opt_grayscale) { + append_line(fs_buf, &fs_len, "varying vec4 vGrayscaleColor;"); + } for (int i = 0; i < cc_features.num_inputs; i++) { fs_len += sprintf(fs_buf + fs_len, "varying vec%d vInput%d;\n", cc_features.opt_alpha ? 4 : 3, i + 1); } @@ -355,6 +368,11 @@ static struct ShaderProgram* gfx_opengl_create_and_load_new_shader(uint64_t shad append_line(fs_buf, &fs_len, "texel.a *= floor(clamp(random(vec3(floor(gl_FragCoord.xy * noise_scale), float(frame_count))) + texel.a, 0.0, 1.0));"); } + if (cc_features.opt_grayscale) { + append_line(fs_buf, &fs_len, "float intensity = (texel.r + texel.g + texel.b) / 3.0;"); + append_line(fs_buf, &fs_len, "texel.rgb = vGrayscaleColor.rgb * intensity;"); + } + if (cc_features.opt_alpha) { if (cc_features.opt_alpha_threshold) { append_line(fs_buf, &fs_len, "if (texel.a < 8.0 / 256.0) discard;"); @@ -446,6 +464,12 @@ static struct ShaderProgram* gfx_opengl_create_and_load_new_shader(uint64_t shad ++cnt; } + if (cc_features.opt_grayscale) { + prg->attrib_locations[cnt] = glGetAttribLocation(shader_program, "aGrayscaleColor"); + prg->attrib_sizes[cnt] = 4; + ++cnt; + } + for (int i = 0; i < cc_features.num_inputs; i++) { char name[16]; sprintf(name, "aInput%d", i + 1); diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp index 5918ccaf7..130d07b73 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp @@ -155,9 +155,10 @@ static struct RDP { uint32_t other_mode_l, other_mode_h; uint64_t combine_mode; + bool grayscale; uint8_t prim_lod_fraction; - struct RGBA env_color, prim_color, fog_color, fill_color; + struct RGBA env_color, prim_color, fog_color, fill_color, grayscale_color; struct XYWidthHeight viewport, scissor; bool viewport_or_scissor_changed; void *z_buf_address; @@ -825,22 +826,6 @@ static void import_texture(int i, int tile) { uint8_t siz = rdp.texture_tile[tile].siz; uint32_t tmem_index = rdp.texture_tile[tile].tmem_index; - // OTRTODO: Move it to a function to be faster - // ModInternal::bindHook(LOOKUP_TEXTURE); - // ModInternal::initBindHook(8, - // HOOK_PARAMETER("gfx_api", gfx_get_current_rendering_api()), - // HOOK_PARAMETER("path", rdp.loaded_texture[tmem_index].otr_path), - // HOOK_PARAMETER("node", &rendering_state.textures[i]), - // HOOK_PARAMETER("fmt", &fmt), - // HOOK_PARAMETER("siz", &siz), - // HOOK_PARAMETER("tile", &i), - // HOOK_PARAMETER("palette", &rdp.texture_tile[tile].palette), - // HOOK_PARAMETER("addr", const_cast(rdp.loaded_texture[tmem_index].addr)) - // ); - // - // if (ModInternal::callBindHook(0)) - // return; - if (gfx_texture_cache_lookup(i, tile)) { return; @@ -1220,7 +1205,6 @@ static void gfx_sp_tri1(uint8_t vtx1_idx, uint8_t vtx2_idx, uint8_t vtx3_idx, bo uint64_t cc_id = rdp.combine_mode; - //bool use_alpha = (rdp.other_mode_l & (3 << 18)) == G_BL_1MA || (rdp.other_mode_l & (3 << 16)) == G_BL_1MA; bool use_alpha = (rdp.other_mode_l & (3 << 20)) == (G_BL_CLR_MEM << 20) && (rdp.other_mode_l & (3 << 16)) == (G_BL_1MA << 16); bool use_fog = (rdp.other_mode_l >> 30) == G_BL_CLR_FOG; bool texture_edge = (rdp.other_mode_l & CVG_X_ALPHA) == CVG_X_ALPHA; @@ -1228,6 +1212,7 @@ static void gfx_sp_tri1(uint8_t vtx1_idx, uint8_t vtx2_idx, uint8_t vtx3_idx, bo bool use_2cyc = (rdp.other_mode_h & (3U << G_MDSFT_CYCLETYPE)) == G_CYC_2CYCLE; bool alpha_threshold = (rdp.other_mode_l & (3U << G_MDSFT_ALPHACOMPARE)) == G_AC_THRESHOLD; bool invisible = (rdp.other_mode_l & (3 << 24)) == (G_BL_0 << 24) && (rdp.other_mode_l & (3 << 20)) == (G_BL_CLR_MEM << 20); + bool use_grayscale = rdp.grayscale; if (texture_edge) { use_alpha = true; @@ -1240,12 +1225,13 @@ static void gfx_sp_tri1(uint8_t vtx1_idx, uint8_t vtx2_idx, uint8_t vtx3_idx, bo if (use_2cyc) cc_id |= (uint64_t)SHADER_OPT_2CYC << CC_SHADER_OPT_POS; if (alpha_threshold) cc_id |= (uint64_t)SHADER_OPT_ALPHA_THRESHOLD << CC_SHADER_OPT_POS; if (invisible) cc_id |= (uint64_t)SHADER_OPT_INVISIBLE << CC_SHADER_OPT_POS; + if (use_grayscale) cc_id |= (uint64_t)SHADER_OPT_GRAYSCALE << CC_SHADER_OPT_POS; if (!use_alpha) { cc_id &= ~((0xfff << 16) | ((uint64_t)0xfff << 44)); } - struct ColorCombiner* comb = gfx_lookup_or_create_color_combiner(cc_id); + ColorCombiner* comb = gfx_lookup_or_create_color_combiner(cc_id); uint32_t tm = 0; uint32_t tex_width[2], tex_height[2], tex_width2[2], tex_height2[2]; @@ -1407,6 +1393,13 @@ static void gfx_sp_tri1(uint8_t vtx1_idx, uint8_t vtx2_idx, uint8_t vtx3_idx, bo buf_vbo[buf_vbo_len++] = v_arr[i]->color.a / 255.0f; // fog factor (not alpha) } + if (use_grayscale) { + buf_vbo[buf_vbo_len++] = rdp.grayscale_color.r / 255.0f; + buf_vbo[buf_vbo_len++] = rdp.grayscale_color.g / 255.0f; + buf_vbo[buf_vbo_len++] = rdp.grayscale_color.b / 255.0f; + buf_vbo[buf_vbo_len++] = rdp.grayscale_color.a / 255.0f; // Unused + } + for (int j = 0; j < num_inputs; j++) { struct RGBA* color = 0; struct RGBA tmp; @@ -1807,6 +1800,13 @@ static inline uint32_t alpha_comb(uint32_t a, uint32_t b, uint32_t c, uint32_t d return (a & 7) | ((b & 7) << 3) | ((c & 7) << 6) | ((d & 7) << 9); } +static void gfx_dp_set_grayscale_color(uint8_t r, uint8_t g, uint8_t b, uint8_t a) { + rdp.grayscale_color.r = r; + rdp.grayscale_color.g = g; + rdp.grayscale_color.b = b; + rdp.grayscale_color.a = a; +} + static void gfx_dp_set_env_color(uint8_t r, uint8_t g, uint8_t b, uint8_t a) { rdp.env_color.r = r; rdp.env_color.g = g; @@ -2411,8 +2411,6 @@ static void gfx_run_dl(Gfx* cmd) { cmd++; uint64_t hash = ((uint64_t)cmd->words.w0 << 32) + (uint64_t)cmd->words.w1; ResourceMgr_GetNameByCRC(hash, fileName); - - #if _DEBUG && 0 char* tex = ResourceMgr_LoadTexByCRC(hash); ResourceMgr_GetNameByCRC(hash, fileName); @@ -2453,8 +2451,8 @@ static void gfx_run_dl(Gfx* cmd) { gfx_dp_set_texture_image(fmt, size, width, tex, fileName); cmd++; - } break; + } case G_SETFB: { gfx_flush(); @@ -2462,8 +2460,8 @@ static void gfx_run_dl(Gfx* cmd) { active_fb = framebuffers.find(cmd->words.w1); gfx_rapi->start_draw_to_framebuffer(active_fb->first, (float)active_fb->second.applied_height / active_fb->second.orig_height); gfx_rapi->clear_framebuffer(); - } break; + } case G_RESETFB: { gfx_flush(); @@ -2471,7 +2469,6 @@ static void gfx_run_dl(Gfx* cmd) { gfx_rapi->start_draw_to_framebuffer(game_renders_to_framebuffer ? game_framebuffer : 0, (float)gfx_current_dimensions.height / SCREEN_HEIGHT); break; } - break; case G_SETTIMG_FB: { gfx_flush(); @@ -2481,8 +2478,13 @@ static void gfx_run_dl(Gfx* cmd) { //if (texPtr != NULL) //gfx_dp_set_texture_image(C0(21, 3), C0(19, 2), C0(0, 10), texPtr); + break; + } + case G_SETGRAYSCALE: + { + rdp.grayscale = cmd->words.w1; + break; } - break; case G_LOADBLOCK: gfx_dp_load_block(C1(24, 3), C0(12, 12), C0(0, 12), C1(12, 12), C1(0, 12)); break; @@ -2510,6 +2512,9 @@ static void gfx_run_dl(Gfx* cmd) { case G_SETFILLCOLOR: gfx_dp_set_fill_color(cmd->words.w1); break; + case G_SETINTENSITY: + gfx_dp_set_grayscale_color(C1(24, 8), C1(16, 8), C1(8, 8), C1(0, 8)); + break; case G_SETCOMBINE: gfx_dp_set_combine_mode( color_comb(C0(20, 4), C1(28, 4), C0(15, 5), C1(15, 3)), diff --git a/soh/include/variables.h b/soh/include/variables.h index b58166b60..64b8c75c7 100644 --- a/soh/include/variables.h +++ b/soh/include/variables.h @@ -99,6 +99,7 @@ extern "C" extern u32 gGsFlagsMasks[4]; extern u32 gGsFlagsShifts[4]; extern void* gItemIcons[0x82]; + extern u8 gItemAgeReqs[]; extern u8 gItemSlots[56]; extern void (*gSceneCmdHandlers[26])(GlobalContext*, SceneCmd*); extern s16 gLinkObjectIds[2]; diff --git a/soh/src/code/z_fbdemo_circle.c b/soh/src/code/z_fbdemo_circle.c index 630f198d1..b19948737 100644 --- a/soh/src/code/z_fbdemo_circle.c +++ b/soh/src/code/z_fbdemo_circle.c @@ -56,8 +56,6 @@ void TransitionCircle_Start(void* thisx) { break; } - this->texture = ResourceMgr_LoadTexByName(this->texture); - if (this->speed == 0) { this->step = 0x14; } else { diff --git a/soh/src/overlays/actors/ovl_En_Part/z_en_part.c b/soh/src/overlays/actors/ovl_En_Part/z_en_part.c index ec4079887..bdf29aa52 100644 --- a/soh/src/overlays/actors/ovl_En_Part/z_en_part.c +++ b/soh/src/overlays/actors/ovl_En_Part/z_en_part.c @@ -298,13 +298,13 @@ void EnPart_Draw(Actor* thisx, GlobalContext* globalCtx) { gSPSegment(POLY_OPA_DISP++, 0x09, func_80ACEAC0(globalCtx->state.gfxCtx, 225, 205, 115, 25, 20, 0)); gSPSegment(POLY_OPA_DISP++, 0x0A, func_80ACEAC0(globalCtx->state.gfxCtx, 225, 205, 115, 25, 20, 0)); } else if ((thisx->params == 9) && (this->displayList == ResourceMgr_LoadGfxByName(object_tite_DL_002FF0))) { - gSPSegment(POLY_OPA_DISP++, 0x08, ResourceMgr_LoadTexByName(SEGMENTED_TO_VIRTUAL(object_tite_Tex_001300))); - gSPSegment(POLY_OPA_DISP++, 0x09, ResourceMgr_LoadTexByName(SEGMENTED_TO_VIRTUAL(object_tite_Tex_001700))); - gSPSegment(POLY_OPA_DISP++, 0x0A, ResourceMgr_LoadTexByName(SEGMENTED_TO_VIRTUAL(object_tite_Tex_001900))); + gSPSegment(POLY_OPA_DISP++, 0x08, object_tite_Tex_001300); + gSPSegment(POLY_OPA_DISP++, 0x09, object_tite_Tex_001700); + gSPSegment(POLY_OPA_DISP++, 0x0A, object_tite_Tex_001900); } else if ((thisx->params == 10) && (this->displayList == ResourceMgr_LoadGfxByName(object_tite_DL_002FF0))) { - gSPSegment(POLY_OPA_DISP++, 0x08, ResourceMgr_LoadTexByName(SEGMENTED_TO_VIRTUAL(object_tite_Tex_001B00))); - gSPSegment(POLY_OPA_DISP++, 0x09, ResourceMgr_LoadTexByName(SEGMENTED_TO_VIRTUAL(object_tite_Tex_001F00))); - gSPSegment(POLY_OPA_DISP++, 0x0A, ResourceMgr_LoadTexByName(SEGMENTED_TO_VIRTUAL(object_tite_Tex_002100))); + gSPSegment(POLY_OPA_DISP++, 0x08, object_tite_Tex_001B00); + gSPSegment(POLY_OPA_DISP++, 0x09, object_tite_Tex_001F00); + gSPSegment(POLY_OPA_DISP++, 0x0A, object_tite_Tex_002100); } if (this->displayList != NULL) { diff --git a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c index 84543fa26..dc48b277d 100644 --- a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c +++ b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c @@ -45,11 +45,8 @@ void FileChoose_SetView(FileChooseContext* this, f32 eyeX, f32 eyeY, f32 eyeZ) { func_800AAA50(&this->view, 0x7F); } -Gfx* FileChoose_QuadTextureIA8(Gfx* gfx, void* texture, s16 width, s16 height, s16 point) +Gfx* FileChoose_QuadTextureIA8(Gfx* gfx, void* texture, s16 width, s16 height, s16 point) { - if (ResourceMgr_OTRSigCheck(texture)) - texture = ResourceMgr_LoadTexByName(texture); - gDPLoadTextureBlock(gfx++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -1500,13 +1497,13 @@ void FileChoose_LoadGame(GameState* thisx) { gSaveContext.naviTimer = 0; // SWORDLESS LINK IS BACK BABY - if (CVar_GetS32("gSwordlessLink", 0) != 0) + if (CVar_GetS32("gSwordlessLink", 0) != 0) { if ((gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI) && (gSaveContext.equips.buttonItems[0] != ITEM_SWORD_MASTER) && (gSaveContext.equips.buttonItems[0] != ITEM_SWORD_BGS) && (gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KNIFE)) { - + gSaveContext.equips.buttonItems[0] = ITEM_NONE; swordEquipMask = _byteswap_ushort(gEquipMasks[EQUIP_SWORD]) & gSaveContext.equips.equipment; gSaveContext.equips.equipment &= gEquipNegMasks[EQUIP_SWORD]; diff --git a/soh/src/overlays/gamestates/ovl_title/z_title.c b/soh/src/overlays/gamestates/ovl_title/z_title.c index 942962f2e..3b7cfe84c 100644 --- a/soh/src/overlays/gamestates/ovl_title/z_title.c +++ b/soh/src/overlays/gamestates/ovl_title/z_title.c @@ -199,7 +199,7 @@ void Title_Draw(TitleContext* this) { gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 170, 255, 255, 255); gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 255, 128); - gDPLoadMultiBlock(POLY_OPA_DISP++, ResourceMgr_LoadTexByName(nintendo_rogo_static_Tex_001800), 0x100, 1, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, + gDPLoadMultiBlock(POLY_OPA_DISP++, nintendo_rogo_static_Tex_001800, 0x100, 1, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, 2, 11); for (idx = 0, y = 94; idx < 16; idx++, y += 2) diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c index 2003a8b14..c21ef4ca7 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c @@ -64,7 +64,7 @@ void KaleidoScope_DrawEquipmentImage(GlobalContext* globalCtx, void* source, u32 gDPLoadSync(POLY_KAL_DISP++); gDPLoadTile(POLY_KAL_DISP++, G_TX_LOADTILE, 0, 0, (width - 1) << 2, (textureHeight - 1) << 2); - + gDPSetTextureImageFB(POLY_KAL_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, fbTest); gSP1Quadrangle(POLY_KAL_DISP++, 0, 2, 3, 1, 0); @@ -575,7 +575,14 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) { } else if ((i == 0) && (k == 2) && (gBitFlags[bit + 1] & gSaveContext.inventory.equipment)) { KaleidoScope_DrawQuadTextureRGBA32(globalCtx->state.gfxCtx, gBrokenGiantsKnifeIconTex, 32, 32, point); } else if (gBitFlags[bit] & gSaveContext.inventory.equipment) { - KaleidoScope_DrawQuadTextureRGBA32(globalCtx->state.gfxCtx, gItemIcons[ITEM_SWORD_KOKIRI + temp], 32, 32, point); + int itemId = ITEM_SWORD_KOKIRI + temp; + bool not_acquired = (gItemAgeReqs[itemId] != 9) && (gItemAgeReqs[itemId] != gSaveContext.linkAge); + if (not_acquired) { + gsDPSetGrayscaleColor(POLY_KAL_DISP++, 100, 100, 100); + gsSPGrayscale(POLY_KAL_DISP++, true); + } + KaleidoScope_DrawQuadTextureRGBA32(globalCtx->state.gfxCtx, gItemIcons[itemId], 32, 32, point); + gsSPGrayscale(POLY_KAL_DISP++, false); } } } diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c index d39a90e16..7f7d81075 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c @@ -467,8 +467,15 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) { } gSPVertex(POLY_KAL_DISP++, &pauseCtx->itemVtx[j + 0], 4, 0); - KaleidoScope_DrawQuadTextureRGBA32(globalCtx->state.gfxCtx, gItemIcons[gSaveContext.inventory.items[i]], 32, + int itemId = gSaveContext.inventory.items[i]; + bool not_acquired = (gItemAgeReqs[itemId] != 9) && (gItemAgeReqs[itemId] != gSaveContext.linkAge); + if (not_acquired) { + gsDPSetGrayscaleColor(POLY_KAL_DISP++, 100, 100, 100); + gsSPGrayscale(POLY_KAL_DISP++, true); + } + KaleidoScope_DrawQuadTextureRGBA32(globalCtx->state.gfxCtx, gItemIcons[itemId], 32, 32, 0); + gsSPGrayscale(POLY_KAL_DISP++, false); } } diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c index 3c023105f..60d3595aa 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c @@ -3081,14 +3081,6 @@ void KaleidoScope_Update(GlobalContext* globalCtx) gSegments[8] = VIRTUAL_TO_PHYSICAL(pauseCtx->iconItemSegment); - for (i = 0; i < ARRAY_COUNTU(gItemAgeReqs); i++) { - if ((gItemAgeReqs[i] != 9) && (gItemAgeReqs[i] != ((void)0, gSaveContext.linkAge))) - { - gSPInvalidateTexCache(globalCtx->state.gfxCtx->polyKal.p++, ResourceMgr_LoadTexByName(gItemIcons[i])); - KaleidoScope_GrayOutTextureRGBA32(SEGMENTED_TO_VIRTUAL(gItemIcons[i]), 0x400); - } - } - pauseCtx->iconItem24Segment = (void*)(((uintptr_t)pauseCtx->iconItemSegment + size0 + 0xF) & ~0xF); #if 1 From 3c471f2fc5ae45082682b66ed077312501c64fbd Mon Sep 17 00:00:00 2001 From: Baoulettes Date: Sun, 24 Apr 2022 18:26:49 +0200 Subject: [PATCH 066/146] Quick fix for Title cards issues Funny on linux it show properly but windows require it --- soh/src/code/graph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/src/code/graph.c b/soh/src/code/graph.c index 3a1719731..dbbbb9df1 100644 --- a/soh/src/code/graph.c +++ b/soh/src/code/graph.c @@ -299,7 +299,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { gSPBranchList(WORK_DISP++, gfxCtx->polyOpaBuffer); gSPBranchList(POLY_OPA_DISP++, gfxCtx->polyXluBuffer); gSPBranchList(POLY_XLU_DISP++, gfxCtx->titlecardBuffer); - gSPBranchList(POLY_XLU_DISP++, gfxCtx->polyKalBuffer); + gSPBranchList(TITLE_CARD_DISP++, gfxCtx->polyKalBuffer); gSPBranchList(POLY_KAL_DISP++, gfxCtx->overlayBuffer); gDPPipeSync(OVERLAY_DISP++); gDPFullSync(OVERLAY_DISP++); From 53e45e879ed1bf18748d28b2bb9d94a2c1725ba4 Mon Sep 17 00:00:00 2001 From: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> Date: Mon, 18 Apr 2022 21:04:35 +0200 Subject: [PATCH 067/146] Fix texture width for G_SETTIMG --- OTRExporter/OTRExporter/DisplayListExporter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OTRExporter/OTRExporter/DisplayListExporter.cpp b/OTRExporter/OTRExporter/DisplayListExporter.cpp index 4e68d8f13..1fe7cb44a 100644 --- a/OTRExporter/OTRExporter/DisplayListExporter.cpp +++ b/OTRExporter/OTRExporter/DisplayListExporter.cpp @@ -689,7 +689,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina uint32_t fmt = (__ & 0xE0) >> 5; uint32_t siz = (__ & 0x18) >> 3; - Gfx value = gsDPSetTextureImage(fmt, siz, www - 1, (seg & 0x0FFFFFFF) + 0xF0000000); + Gfx value = gsDPSetTextureImage(fmt, siz, www + 1, (seg & 0x0FFFFFFF) + 0xF0000000); word0 = value.words.w0; word1 = value.words.w1; @@ -707,7 +707,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina uint32_t fmt = (__ & 0xE0) >> 5; uint32_t siz = (__ & 0x18) >> 3; - Gfx value = gsDPSetTextureImage(fmt, siz, www - 1, __); + Gfx value = gsDPSetTextureImage(fmt, siz, www + 1, __); word0 = value.words.w0 & 0x00FFFFFF; word0 += (G_SETTIMG_OTR << 24); //word1 = value.words.w1; From caebcc4f9ab156acb15736225907ad47e99be1eb Mon Sep 17 00:00:00 2001 From: Nicholas Estelami Date: Sun, 24 Apr 2022 17:10:38 -0400 Subject: [PATCH 068/146] Fixed bug in extract_assets.py that caused wrong XML folder to be used Also removed duplicate python script in soh folder. --- OTRExporter/extract_assets.py | 6 +- soh/extract_baserom.py | 1608 --------------------------------- 2 files changed, 3 insertions(+), 1611 deletions(-) delete mode 100755 soh/extract_baserom.py diff --git a/OTRExporter/extract_assets.py b/OTRExporter/extract_assets.py index f15cb1beb..e33b65f0e 100755 --- a/OTRExporter/extract_assets.py +++ b/OTRExporter/extract_assets.py @@ -132,13 +132,13 @@ def main(): else: romToUse = roms[0] - match checkChecksum(romToUse).name: + match checkChecksum(romToUse): case Checksums.OOT_PAL_GC: xmlVer = "GC_NMQ_PAL_F" case Checksums.OOT_PAL_GC_DBG1: - xmlVer = "GC_MQ_D" - case _: # default case xmlVer = "GC_NMQ_D" + case _: # default case + xmlVer = "GC_MQ_D" if (os.path.exists("Extract")): shutil.rmtree("Extract") diff --git a/soh/extract_baserom.py b/soh/extract_baserom.py deleted file mode 100755 index a3eb83a8f..000000000 --- a/soh/extract_baserom.py +++ /dev/null @@ -1,1608 +0,0 @@ -#!/usr/bin/python3 - -import os -import sys -import struct -from multiprocessing import Pool, cpu_count - - -ROM_FILE_NAME = 'baserom_non_mq.z64' -FILE_TABLE_OFFSET = 0x12F70 - -FILE_NAMES = [ - 'makerom', - 'boot', - 'dmadata', - 'Audiobank', - 'Audioseq', - 'Audiotable', - 'link_animetion', - 'icon_item_static', - 'icon_item_24_static', - 'icon_item_field_static', - 'icon_item_dungeon_static', - 'icon_item_gameover_static', - 'icon_item_nes_static', - 'icon_item_ger_static', - 'icon_item_fra_static', - 'item_name_static', - 'map_name_static', - 'do_action_static', - 'message_static', - 'message_texture_static', - 'nes_font_static', - 'nes_message_data_static', - 'ger_message_data_static', - 'fra_message_data_static', - 'staff_message_data_static', - 'map_grand_static', - 'map_i_static', - 'map_48x85_static', - 'code', - 'ovl_title', - 'ovl_select', - 'ovl_opening', - 'ovl_file_choose', - 'ovl_kaleido_scope', - 'ovl_player_actor', - 'ovl_map_mark_data', - 'ovl_En_Test', - 'ovl_Arms_Hook', - 'ovl_Arrow_Fire', - 'ovl_Arrow_Ice', - 'ovl_Arrow_Light', - 'ovl_Bg_Bdan_Objects', - 'ovl_Bg_Bdan_Switch', - 'ovl_Bg_Bom_Guard', - 'ovl_Bg_Bombwall', - 'ovl_Bg_Bowl_Wall', - 'ovl_Bg_Breakwall', - 'ovl_Bg_Ddan_Jd', - 'ovl_Bg_Ddan_Kd', - 'ovl_Bg_Dodoago', - 'ovl_Bg_Dy_Yoseizo', - 'ovl_Bg_Ganon_Otyuka', - 'ovl_Bg_Gate_Shutter', - 'ovl_Bg_Gjyo_Bridge', - 'ovl_Bg_Gnd_Darkmeiro', - 'ovl_Bg_Gnd_Firemeiro', - 'ovl_Bg_Gnd_Iceblock', - 'ovl_Bg_Gnd_Nisekabe', - 'ovl_Bg_Gnd_Soulmeiro', - 'ovl_Bg_Haka', - 'ovl_Bg_Haka_Gate', - 'ovl_Bg_Haka_Huta', - 'ovl_Bg_Haka_Megane', - 'ovl_Bg_Haka_MeganeBG', - 'ovl_Bg_Haka_Sgami', - 'ovl_Bg_Haka_Ship', - 'ovl_Bg_Haka_Trap', - 'ovl_Bg_Haka_Tubo', - 'ovl_Bg_Haka_Water', - 'ovl_Bg_Haka_Zou', - 'ovl_Bg_Heavy_Block', - 'ovl_Bg_Hidan_Curtain', - 'ovl_Bg_Hidan_Dalm', - 'ovl_Bg_Hidan_Firewall', - 'ovl_Bg_Hidan_Fslift', - 'ovl_Bg_Hidan_Fwbig', - 'ovl_Bg_Hidan_Hamstep', - 'ovl_Bg_Hidan_Hrock', - 'ovl_Bg_Hidan_Kousi', - 'ovl_Bg_Hidan_Kowarerukabe', - 'ovl_Bg_Hidan_Rock', - 'ovl_Bg_Hidan_Rsekizou', - 'ovl_Bg_Hidan_Sekizou', - 'ovl_Bg_Hidan_Sima', - 'ovl_Bg_Hidan_Syoku', - 'ovl_Bg_Ice_Objects', - 'ovl_Bg_Ice_Shelter', - 'ovl_Bg_Ice_Shutter', - 'ovl_Bg_Ice_Turara', - 'ovl_Bg_Ingate', - 'ovl_Bg_Jya_1flift', - 'ovl_Bg_Jya_Amishutter', - 'ovl_Bg_Jya_Bigmirror', - 'ovl_Bg_Jya_Block', - 'ovl_Bg_Jya_Bombchuiwa', - 'ovl_Bg_Jya_Bombiwa', - 'ovl_Bg_Jya_Cobra', - 'ovl_Bg_Jya_Goroiwa', - 'ovl_Bg_Jya_Haheniron', - 'ovl_Bg_Jya_Ironobj', - 'ovl_Bg_Jya_Kanaami', - 'ovl_Bg_Jya_Lift', - 'ovl_Bg_Jya_Megami', - 'ovl_Bg_Jya_Zurerukabe', - 'ovl_Bg_Menkuri_Eye', - 'ovl_Bg_Menkuri_Kaiten', - 'ovl_Bg_Menkuri_Nisekabe', - 'ovl_Bg_Mizu_Bwall', - 'ovl_Bg_Mizu_Movebg', - 'ovl_Bg_Mizu_Shutter', - 'ovl_Bg_Mizu_Uzu', - 'ovl_Bg_Mizu_Water', - 'ovl_Bg_Mjin', - 'ovl_Bg_Mori_Bigst', - 'ovl_Bg_Mori_Elevator', - 'ovl_Bg_Mori_Hashigo', - 'ovl_Bg_Mori_Hashira4', - 'ovl_Bg_Mori_Hineri', - 'ovl_Bg_Mori_Idomizu', - 'ovl_Bg_Mori_Kaitenkabe', - 'ovl_Bg_Mori_Rakkatenjo', - 'ovl_Bg_Po_Event', - 'ovl_Bg_Po_Syokudai', - 'ovl_Bg_Pushbox', - 'ovl_Bg_Relay_Objects', - 'ovl_Bg_Spot00_Break', - 'ovl_Bg_Spot00_Hanebasi', - 'ovl_Bg_Spot01_Fusya', - 'ovl_Bg_Spot01_Idohashira', - 'ovl_Bg_Spot01_Idomizu', - 'ovl_Bg_Spot01_Idosoko', - 'ovl_Bg_Spot01_Objects2', - 'ovl_Bg_Spot02_Objects', - 'ovl_Bg_Spot03_Taki', - 'ovl_Bg_Spot05_Soko', - 'ovl_Bg_Spot06_Objects', - 'ovl_Bg_Spot07_Taki', - 'ovl_Bg_Spot08_Bakudankabe', - 'ovl_Bg_Spot08_Iceblock', - 'ovl_Bg_Spot09_Obj', - 'ovl_Bg_Spot11_Bakudankabe', - 'ovl_Bg_Spot11_Oasis', - 'ovl_Bg_Spot12_Gate', - 'ovl_Bg_Spot12_Saku', - 'ovl_Bg_Spot15_Rrbox', - 'ovl_Bg_Spot15_Saku', - 'ovl_Bg_Spot16_Bombstone', - 'ovl_Bg_Spot16_Doughnut', - 'ovl_Bg_Spot17_Bakudankabe', - 'ovl_Bg_Spot17_Funen', - 'ovl_Bg_Spot18_Basket', - 'ovl_Bg_Spot18_Futa', - 'ovl_Bg_Spot18_Obj', - 'ovl_Bg_Spot18_Shutter', - 'ovl_Bg_Sst_Floor', - 'ovl_Bg_Toki_Hikari', - 'ovl_Bg_Toki_Swd', - 'ovl_Bg_Treemouth', - 'ovl_Bg_Umajump', - 'ovl_Bg_Vb_Sima', - 'ovl_Bg_Ydan_Hasi', - 'ovl_Bg_Ydan_Maruta', - 'ovl_Bg_Ydan_Sp', - 'ovl_Bg_Zg', - 'ovl_Boss_Dodongo', - 'ovl_Boss_Fd', - 'ovl_Boss_Fd2', - 'ovl_Boss_Ganon', - 'ovl_Boss_Ganon2', - 'ovl_Boss_Ganondrof', - 'ovl_Boss_Goma', - 'ovl_Boss_Mo', - 'ovl_Boss_Sst', - 'ovl_Boss_Tw', - 'ovl_Boss_Va', - 'ovl_Demo_6K', - 'ovl_Demo_Du', - 'ovl_Demo_Ec', - 'ovl_Demo_Effect', - 'ovl_Demo_Ext', - 'ovl_Demo_Geff', - 'ovl_Demo_Gj', - 'ovl_Demo_Go', - 'ovl_Demo_Gt', - 'ovl_Demo_Ik', - 'ovl_Demo_Im', - 'ovl_Demo_Kankyo', - 'ovl_Demo_Kekkai', - 'ovl_Demo_Sa', - 'ovl_Demo_Shd', - 'ovl_Demo_Tre_Lgt', - 'ovl_Door_Ana', - 'ovl_Door_Gerudo', - 'ovl_Door_Killer', - 'ovl_Door_Shutter', - 'ovl_Door_Toki', - 'ovl_Door_Warp1', - 'ovl_Efc_Erupc', - 'ovl_Eff_Dust', - 'ovl_Effect_Ss_Blast', - 'ovl_Effect_Ss_Bomb', - 'ovl_Effect_Ss_Bomb2', - 'ovl_Effect_Ss_Bubble', - 'ovl_Effect_Ss_D_Fire', - 'ovl_Effect_Ss_Dead_Db', - 'ovl_Effect_Ss_Dead_Dd', - 'ovl_Effect_Ss_Dead_Ds', - 'ovl_Effect_Ss_Dead_Sound', - 'ovl_Effect_Ss_Dt_Bubble', - 'ovl_Effect_Ss_Dust', - 'ovl_Effect_Ss_En_Fire', - 'ovl_Effect_Ss_En_Ice', - 'ovl_Effect_Ss_Extra', - 'ovl_Effect_Ss_Fcircle', - 'ovl_Effect_Ss_Fhg_Flash', - 'ovl_Effect_Ss_Fire_Tail', - 'ovl_Effect_Ss_G_Fire', - 'ovl_Effect_Ss_G_Magma', - 'ovl_Effect_Ss_G_Magma2', - 'ovl_Effect_Ss_G_Ripple', - 'ovl_Effect_Ss_G_Spk', - 'ovl_Effect_Ss_G_Splash', - 'ovl_Effect_Ss_Hahen', - 'ovl_Effect_Ss_HitMark', - 'ovl_Effect_Ss_Ice_Piece', - 'ovl_Effect_Ss_Ice_Smoke', - 'ovl_Effect_Ss_K_Fire', - 'ovl_Effect_Ss_Kakera', - 'ovl_Effect_Ss_KiraKira', - 'ovl_Effect_Ss_Lightning', - 'ovl_Effect_Ss_Sibuki', - 'ovl_Effect_Ss_Sibuki2', - 'ovl_Effect_Ss_Solder_Srch_Ball', - 'ovl_Effect_Ss_Stick', - 'ovl_Effect_Ss_Stone1', - 'ovl_Elf_Msg', - 'ovl_Elf_Msg2', - 'ovl_En_Am', - 'ovl_En_Ani', - 'ovl_En_Anubice', - 'ovl_En_Anubice_Fire', - 'ovl_En_Anubice_Tag', - 'ovl_En_Arow_Trap', - 'ovl_En_Arrow', - 'ovl_En_Attack_Niw', - 'ovl_En_Ba', - 'ovl_En_Bb', - 'ovl_En_Bdfire', - 'ovl_En_Bigokuta', - 'ovl_En_Bili', - 'ovl_En_Bird', - 'ovl_En_Blkobj', - 'ovl_En_Bom', - 'ovl_En_Bom_Bowl_Man', - 'ovl_En_Bom_Bowl_Pit', - 'ovl_En_Bom_Chu', - 'ovl_En_Bombf', - 'ovl_En_Boom', - 'ovl_En_Box', - 'ovl_En_Brob', - 'ovl_En_Bubble', - 'ovl_En_Butte', - 'ovl_En_Bw', - 'ovl_En_Bx', - 'ovl_En_Changer', - 'ovl_En_Clear_Tag', - 'ovl_En_Cow', - 'ovl_En_Crow', - 'ovl_En_Cs', - 'ovl_En_Daiku', - 'ovl_En_Daiku_Kakariko', - 'ovl_En_Dekubaba', - 'ovl_En_Dekunuts', - 'ovl_En_Dh', - 'ovl_En_Dha', - 'ovl_En_Diving_Game', - 'ovl_En_Dns', - 'ovl_En_Dnt_Demo', - 'ovl_En_Dnt_Jiji', - 'ovl_En_Dnt_Nomal', - 'ovl_En_Dodojr', - 'ovl_En_Dodongo', - 'ovl_En_Dog', - 'ovl_En_Door', - 'ovl_En_Ds', - 'ovl_En_Du', - 'ovl_En_Dy_Extra', - 'ovl_En_Eg', - 'ovl_En_Eiyer', - 'ovl_En_Elf', - 'ovl_En_Encount1', - 'ovl_En_Encount2', - 'ovl_En_Ex_Item', - 'ovl_En_Ex_Ruppy', - 'ovl_En_Fd', - 'ovl_En_Fd_Fire', - 'ovl_En_Fhg_Fire', - 'ovl_En_Fire_Rock', - 'ovl_En_Firefly', - 'ovl_En_Fish', - 'ovl_En_Floormas', - 'ovl_En_Fr', - 'ovl_En_Fu', - 'ovl_En_Fw', - 'ovl_En_Fz', - 'ovl_En_G_Switch', - 'ovl_En_Ganon_Mant', - 'ovl_En_Ganon_Organ', - 'ovl_En_Gb', - 'ovl_En_Ge1', - 'ovl_En_Ge2', - 'ovl_En_Ge3', - 'ovl_En_GeldB', - 'ovl_En_GirlA', - 'ovl_En_Gm', - 'ovl_En_Go', - 'ovl_En_Go2', - 'ovl_En_Goma', - 'ovl_En_Goroiwa', - 'ovl_En_Gs', - 'ovl_En_Guest', - 'ovl_En_Hata', - 'ovl_En_Heishi1', - 'ovl_En_Heishi2', - 'ovl_En_Heishi3', - 'ovl_En_Heishi4', - 'ovl_En_Hintnuts', - 'ovl_En_Holl', - 'ovl_En_Honotrap', - 'ovl_En_Horse', - 'ovl_En_Horse_Game_Check', - 'ovl_En_Horse_Ganon', - 'ovl_En_Horse_Link_Child', - 'ovl_En_Horse_Normal', - 'ovl_En_Horse_Zelda', - 'ovl_En_Hs', - 'ovl_En_Hs2', - 'ovl_En_Hy', - 'ovl_En_Ice_Hono', - 'ovl_En_Ik', - 'ovl_En_In', - 'ovl_En_Insect', - 'ovl_En_Ishi', - 'ovl_En_It', - 'ovl_En_Jj', - 'ovl_En_Js', - 'ovl_En_Jsjutan', - 'ovl_En_Kakasi', - 'ovl_En_Kakasi2', - 'ovl_En_Kakasi3', - 'ovl_En_Kanban', - 'ovl_En_Karebaba', - 'ovl_En_Ko', - 'ovl_En_Kusa', - 'ovl_En_Kz', - 'ovl_En_Light', - 'ovl_En_Lightbox', - 'ovl_En_M_Fire1', - 'ovl_En_M_Thunder', - 'ovl_En_Ma1', - 'ovl_En_Ma2', - 'ovl_En_Ma3', - 'ovl_En_Mag', - 'ovl_En_Mb', - 'ovl_En_Md', - 'ovl_En_Mk', - 'ovl_En_Mm', - 'ovl_En_Mm2', - 'ovl_En_Ms', - 'ovl_En_Mu', - 'ovl_En_Nb', - 'ovl_En_Niw', - 'ovl_En_Niw_Girl', - 'ovl_En_Niw_Lady', - 'ovl_En_Nutsball', - 'ovl_En_Nwc', - 'ovl_En_Ny', - 'ovl_En_OE2', - 'ovl_En_Okarina_Effect', - 'ovl_En_Okarina_Tag', - 'ovl_En_Okuta', - 'ovl_En_Ossan', - 'ovl_En_Owl', - 'ovl_En_Part', - 'ovl_En_Peehat', - 'ovl_En_Po_Desert', - 'ovl_En_Po_Field', - 'ovl_En_Po_Relay', - 'ovl_En_Po_Sisters', - 'ovl_En_Poh', - 'ovl_En_Pu_box', - 'ovl_En_Rd', - 'ovl_En_Reeba', - 'ovl_En_River_Sound', - 'ovl_En_Rl', - 'ovl_En_Rr', - 'ovl_En_Ru1', - 'ovl_En_Ru2', - 'ovl_En_Sa', - 'ovl_En_Sb', - 'ovl_En_Scene_Change', - 'ovl_En_Sda', - 'ovl_En_Shopnuts', - 'ovl_En_Si', - 'ovl_En_Siofuki', - 'ovl_En_Skb', - 'ovl_En_Skj', - 'ovl_En_Skjneedle', - 'ovl_En_Ssh', - 'ovl_En_St', - 'ovl_En_Sth', - 'ovl_En_Stream', - 'ovl_En_Sw', - 'ovl_En_Syateki_Itm', - 'ovl_En_Syateki_Man', - 'ovl_En_Syateki_Niw', - 'ovl_En_Ta', - 'ovl_En_Takara_Man', - 'ovl_En_Tana', - 'ovl_En_Tg', - 'ovl_En_Tite', - 'ovl_En_Tk', - 'ovl_En_Torch', - 'ovl_En_Torch2', - 'ovl_En_Toryo', - 'ovl_En_Tp', - 'ovl_En_Tr', - 'ovl_En_Trap', - 'ovl_En_Tubo_Trap', - 'ovl_En_Vali', - 'ovl_En_Vase', - 'ovl_En_Vb_Ball', - 'ovl_En_Viewer', - 'ovl_En_Vm', - 'ovl_En_Wall_Tubo', - 'ovl_En_Wallmas', - 'ovl_En_Weather_Tag', - 'ovl_En_Weiyer', - 'ovl_En_Wf', - 'ovl_En_Wonder_Item', - 'ovl_En_Wonder_Talk', - 'ovl_En_Wonder_Talk2', - 'ovl_En_Wood02', - 'ovl_En_Xc', - 'ovl_En_Yabusame_Mark', - 'ovl_En_Yukabyun', - 'ovl_En_Zf', - 'ovl_En_Zl1', - 'ovl_En_Zl2', - 'ovl_En_Zl3', - 'ovl_En_Zl4', - 'ovl_En_Zo', - 'ovl_En_fHG', - 'ovl_End_Title', - 'ovl_Fishing', - 'ovl_Item_B_Heart', - 'ovl_Item_Etcetera', - 'ovl_Item_Inbox', - 'ovl_Item_Ocarina', - 'ovl_Item_Shield', - 'ovl_Magic_Dark', - 'ovl_Magic_Fire', - 'ovl_Magic_Wind', - 'ovl_Mir_Ray', - 'ovl_Obj_Bean', - 'ovl_Obj_Blockstop', - 'ovl_Obj_Bombiwa', - 'ovl_Obj_Comb', - 'ovl_Obj_Dekujr', - 'ovl_Obj_Elevator', - 'ovl_Obj_Hamishi', - 'ovl_Obj_Hana', - 'ovl_Obj_Hsblock', - 'ovl_Obj_Ice_Poly', - 'ovl_Obj_Kibako', - 'ovl_Obj_Kibako2', - 'ovl_Obj_Lift', - 'ovl_Obj_Lightswitch', - 'ovl_Obj_Makekinsuta', - 'ovl_Obj_Makeoshihiki', - 'ovl_Obj_Mure', - 'ovl_Obj_Mure2', - 'ovl_Obj_Mure3', - 'ovl_Obj_Oshihiki', - 'ovl_Obj_Roomtimer', - 'ovl_Obj_Switch', - 'ovl_Obj_Syokudai', - 'ovl_Obj_Timeblock', - 'ovl_Obj_Tsubo', - 'ovl_Obj_Warp2block', - 'ovl_Object_Kankyo', - 'ovl_Oceff_Spot', - 'ovl_Oceff_Storm', - 'ovl_Oceff_Wipe', - 'ovl_Oceff_Wipe2', - 'ovl_Oceff_Wipe3', - 'ovl_Oceff_Wipe4', - 'ovl_Shot_Sun', - 'gameplay_keep', - 'gameplay_field_keep', - 'gameplay_dangeon_keep', - 'gameplay_object_exchange_static', - 'object_link_boy', - 'object_link_child', - 'object_box', - 'object_human', - 'object_okuta', - 'object_poh', - 'object_wallmaster', - 'object_dy_obj', - 'object_firefly', - 'object_dodongo', - 'object_fire', - 'object_niw', - 'object_tite', - 'object_reeba', - 'object_peehat', - 'object_kingdodongo', - 'object_horse', - 'object_zf', - 'object_goma', - 'object_zl1', - 'object_gol', - 'object_bubble', - 'object_dodojr', - 'object_torch2', - 'object_bl', - 'object_tp', - 'object_oA1', - 'object_st', - 'object_bw', - 'object_ei', - 'object_horse_normal', - 'object_oB1', - 'object_o_anime', - 'object_spot04_objects', - 'object_ddan_objects', - 'object_hidan_objects', - 'object_horse_ganon', - 'object_oA2', - 'object_spot00_objects', - 'object_mb', - 'object_bombf', - 'object_sk2', - 'object_oE1', - 'object_oE_anime', - 'object_oE2', - 'object_ydan_objects', - 'object_gnd', - 'object_am', - 'object_dekubaba', - 'object_oA3', - 'object_oA4', - 'object_oA5', - 'object_oA6', - 'object_oA7', - 'object_jj', - 'object_oA8', - 'object_oA9', - 'object_oB2', - 'object_oB3', - 'object_oB4', - 'object_horse_zelda', - 'object_opening_demo1', - 'object_warp1', - 'object_b_heart', - 'object_dekunuts', - 'object_oE3', - 'object_oE4', - 'object_menkuri_objects', - 'object_oE5', - 'object_oE6', - 'object_oE7', - 'object_oE8', - 'object_oE9', - 'object_oE10', - 'object_oE11', - 'object_oE12', - 'object_vali', - 'object_oA10', - 'object_oA11', - 'object_mizu_objects', - 'object_fhg', - 'object_ossan', - 'object_mori_hineri1', - 'object_Bb', - 'object_toki_objects', - 'object_yukabyun', - 'object_zl2', - 'object_mjin', - 'object_mjin_flash', - 'object_mjin_dark', - 'object_mjin_flame', - 'object_mjin_ice', - 'object_mjin_soul', - 'object_mjin_wind', - 'object_mjin_oka', - 'object_haka_objects', - 'object_spot06_objects', - 'object_ice_objects', - 'object_relay_objects', - 'object_mori_hineri1a', - 'object_mori_hineri2', - 'object_mori_hineri2a', - 'object_mori_objects', - 'object_mori_tex', - 'object_spot08_obj', - 'object_warp2', - 'object_hata', - 'object_bird', - 'object_wood02', - 'object_lightbox', - 'object_pu_box', - 'object_trap', - 'object_vase', - 'object_im', - 'object_ta', - 'object_tk', - 'object_xc', - 'object_vm', - 'object_bv', - 'object_hakach_objects', - 'object_efc_crystal_light', - 'object_efc_fire_ball', - 'object_efc_flash', - 'object_efc_lgt_shower', - 'object_efc_star_field', - 'object_god_lgt', - 'object_light_ring', - 'object_triforce_spot', - 'object_medal', - 'object_bdan_objects', - 'object_sd', - 'object_rd', - 'object_po_sisters', - 'object_heavy_object', - 'object_gndd', - 'object_fd', - 'object_du', - 'object_fw', - 'object_horse_link_child', - 'object_spot02_objects', - 'object_haka', - 'object_ru1', - 'object_syokudai', - 'object_fd2', - 'object_dh', - 'object_rl', - 'object_efc_tw', - 'object_demo_tre_lgt', - 'object_gi_key', - 'object_mir_ray', - 'object_brob', - 'object_gi_jewel', - 'object_spot09_obj', - 'object_spot18_obj', - 'object_bdoor', - 'object_spot17_obj', - 'object_shop_dungen', - 'object_nb', - 'object_mo', - 'object_sb', - 'object_gi_melody', - 'object_gi_heart', - 'object_gi_compass', - 'object_gi_bosskey', - 'object_gi_medal', - 'object_gi_nuts', - 'object_sa', - 'object_gi_hearts', - 'object_gi_arrowcase', - 'object_gi_bombpouch', - 'object_in', - 'object_tr', - 'object_spot16_obj', - 'object_oE1s', - 'object_oE4s', - 'object_os_anime', - 'object_gi_bottle', - 'object_gi_stick', - 'object_gi_map', - 'object_oF1d_map', - 'object_ru2', - 'object_gi_shield_1', - 'object_dekujr', - 'object_gi_magicpot', - 'object_gi_bomb_1', - 'object_oF1s', - 'object_ma2', - 'object_gi_purse', - 'object_hni', - 'object_tw', - 'object_rr', - 'object_bxa', - 'object_anubice', - 'object_gi_gerudo', - 'object_gi_arrow', - 'object_gi_bomb_2', - 'object_gi_egg', - 'object_gi_scale', - 'object_gi_shield_2', - 'object_gi_hookshot', - 'object_gi_ocarina', - 'object_gi_milk', - 'object_ma1', - 'object_ganon', - 'object_sst', - 'object_ny', - 'object_fr', - 'object_gi_pachinko', - 'object_gi_boomerang', - 'object_gi_bow', - 'object_gi_glasses', - 'object_gi_liquid', - 'object_ani', - 'object_demo_6k', - 'object_gi_shield_3', - 'object_gi_letter', - 'object_spot15_obj', - 'object_jya_obj', - 'object_gi_clothes', - 'object_gi_bean', - 'object_gi_fish', - 'object_gi_saw', - 'object_gi_hammer', - 'object_gi_grass', - 'object_gi_longsword', - 'object_spot01_objects', - 'object_md', - 'object_km1', - 'object_kw1', - 'object_zo', - 'object_kz', - 'object_umajump', - 'object_masterkokiri', - 'object_masterkokirihead', - 'object_mastergolon', - 'object_masterzoora', - 'object_aob', - 'object_ik', - 'object_ahg', - 'object_cne', - 'object_gi_niwatori', - 'object_skj', - 'object_gi_bottle_letter', - 'object_bji', - 'object_bba', - 'object_gi_ocarina_0', - 'object_ds', - 'object_ane', - 'object_boj', - 'object_spot03_object', - 'object_spot07_object', - 'object_fz', - 'object_bob', - 'object_ge1', - 'object_yabusame_point', - 'object_gi_boots_2', - 'object_gi_seed', - 'object_gnd_magic', - 'object_d_elevator', - 'object_d_hsblock', - 'object_d_lift', - 'object_mamenoki', - 'object_goroiwa', - 'object_toryo', - 'object_daiku', - 'object_nwc', - 'object_blkobj', - 'object_gm', - 'object_ms', - 'object_hs', - 'object_ingate', - 'object_lightswitch', - 'object_kusa', - 'object_tsubo', - 'object_gi_gloves', - 'object_gi_coin', - 'object_kanban', - 'object_gjyo_objects', - 'object_owl', - 'object_mk', - 'object_fu', - 'object_gi_ki_tan_mask', - 'object_gi_redead_mask', - 'object_gi_skj_mask', - 'object_gi_rabit_mask', - 'object_gi_truth_mask', - 'object_ganon_objects', - 'object_siofuki', - 'object_stream', - 'object_mm', - 'object_fa', - 'object_os', - 'object_gi_eye_lotion', - 'object_gi_powder', - 'object_gi_mushroom', - 'object_gi_ticketstone', - 'object_gi_brokensword', - 'object_js', - 'object_cs', - 'object_gi_prescription', - 'object_gi_bracelet', - 'object_gi_soldout', - 'object_gi_frog', - 'object_mag', - 'object_door_gerudo', - 'object_gt', - 'object_efc_erupc', - 'object_zl2_anime1', - 'object_zl2_anime2', - 'object_gi_golonmask', - 'object_gi_zoramask', - 'object_gi_gerudomask', - 'object_ganon2', - 'object_ka', - 'object_ts', - 'object_zg', - 'object_gi_hoverboots', - 'object_gi_m_arrow', - 'object_ds2', - 'object_ec', - 'object_fish', - 'object_gi_sutaru', - 'object_gi_goddess', - 'object_ssh', - 'object_bigokuta', - 'object_bg', - 'object_spot05_objects', - 'object_spot12_obj', - 'object_bombiwa', - 'object_hintnuts', - 'object_rs', - 'object_spot00_break', - 'object_gla', - 'object_shopnuts', - 'object_geldb', - 'object_gr', - 'object_dog', - 'object_jya_iron', - 'object_jya_door', - 'object_spot01_objects2', - 'object_spot11_obj', - 'object_kibako2', - 'object_dns', - 'object_dnk', - 'object_gi_fire', - 'object_gi_insect', - 'object_gi_butterfly', - 'object_gi_ghost', - 'object_gi_soul', - 'object_bowl', - 'object_po_field', - 'object_demo_kekkai', - 'object_efc_doughnut', - 'object_gi_dekupouch', - 'object_ganon_anime1', - 'object_ganon_anime2', - 'object_ganon_anime3', - 'object_gi_rupy', - 'object_spot01_matoya', - 'object_spot01_matoyab', - 'object_po_composer', - 'object_mu', - 'object_wf', - 'object_skb', - 'object_gj', - 'object_geff', - 'object_haka_door', - 'object_gs', - 'object_ps', - 'object_bwall', - 'object_crow', - 'object_cow', - 'object_cob', - 'object_gi_sword_1', - 'object_door_killer', - 'object_ouke_haka', - 'object_timeblock', - 'object_zl4', - 'g_pn_01', - 'g_pn_02', - 'g_pn_03', - 'g_pn_04', - 'g_pn_05', - 'g_pn_06', - 'g_pn_07', - 'g_pn_08', - 'g_pn_09', - 'g_pn_10', - 'g_pn_11', - 'g_pn_12', - 'g_pn_13', - 'g_pn_14', - 'g_pn_15', - 'g_pn_16', - 'g_pn_17', - 'g_pn_18', - 'g_pn_19', - 'g_pn_20', - 'g_pn_21', - 'g_pn_22', - 'g_pn_23', - 'g_pn_24', - 'g_pn_25', - 'g_pn_26', - 'g_pn_27', - 'g_pn_28', - 'g_pn_29', - 'g_pn_30', - 'g_pn_31', - 'g_pn_32', - 'g_pn_33', - 'g_pn_34', - 'g_pn_35', - 'g_pn_36', - 'g_pn_37', - 'g_pn_38', - 'g_pn_39', - 'g_pn_40', - 'g_pn_41', - 'g_pn_42', - 'g_pn_43', - 'g_pn_44', - 'g_pn_45', - 'g_pn_46', - 'g_pn_47', - 'g_pn_48', - 'g_pn_49', - 'g_pn_50', - 'g_pn_51', - 'g_pn_52', - 'g_pn_53', - 'g_pn_54', - 'g_pn_55', - 'g_pn_56', - 'g_pn_57', - 'z_select_static', - 'nintendo_rogo_static', - 'title_static', - 'parameter_static', - 'vr_fine0_static', - 'vr_fine0_pal_static', - 'vr_fine1_static', - 'vr_fine1_pal_static', - 'vr_fine2_static', - 'vr_fine2_pal_static', - 'vr_fine3_static', - 'vr_fine3_pal_static', - 'vr_cloud0_static', - 'vr_cloud0_pal_static', - 'vr_cloud1_static', - 'vr_cloud1_pal_static', - 'vr_cloud2_static', - 'vr_cloud2_pal_static', - 'vr_cloud3_static', - 'vr_cloud3_pal_static', - 'vr_holy0_static', - 'vr_holy0_pal_static', - 'vr_holy1_static', - 'vr_holy1_pal_static', - 'vr_MDVR_static', - 'vr_MDVR_pal_static', - 'vr_MNVR_static', - 'vr_MNVR_pal_static', - 'vr_RUVR_static', - 'vr_RUVR_pal_static', - 'vr_LHVR_static', - 'vr_LHVR_pal_static', - 'vr_KHVR_static', - 'vr_KHVR_pal_static', - 'vr_K3VR_static', - 'vr_K3VR_pal_static', - 'vr_K4VR_static', - 'vr_K4VR_pal_static', - 'vr_K5VR_static', - 'vr_K5VR_pal_static', - 'vr_SP1a_static', - 'vr_SP1a_pal_static', - 'vr_MLVR_static', - 'vr_MLVR_pal_static', - 'vr_KKRVR_static', - 'vr_KKRVR_pal_static', - 'vr_KR3VR_static', - 'vr_KR3VR_pal_static', - 'vr_IPVR_static', - 'vr_IPVR_pal_static', - 'vr_KSVR_static', - 'vr_KSVR_pal_static', - 'vr_GLVR_static', - 'vr_GLVR_pal_static', - 'vr_ZRVR_static', - 'vr_ZRVR_pal_static', - 'vr_DGVR_static', - 'vr_DGVR_pal_static', - 'vr_ALVR_static', - 'vr_ALVR_pal_static', - 'vr_NSVR_static', - 'vr_NSVR_pal_static', - 'vr_LBVR_static', - 'vr_LBVR_pal_static', - 'vr_TTVR_static', - 'vr_TTVR_pal_static', - 'vr_FCVR_static', - 'vr_FCVR_pal_static', - 'elf_message_field', - 'elf_message_ydan', - 'syotes_scene', - 'syotes_room_0', - 'syotes2_scene', - 'syotes2_room_0', - 'depth_test_scene', - 'depth_test_room_0', - 'spot00_scene', - 'spot00_room_0', - 'spot01_scene', - 'spot01_room_0', - 'spot02_scene', - 'spot02_room_0', - 'spot02_room_1', - 'spot03_scene', - 'spot03_room_0', - 'spot03_room_1', - 'spot04_scene', - 'spot04_room_0', - 'spot04_room_1', - 'spot04_room_2', - 'spot05_scene', - 'spot05_room_0', - 'spot06_scene', - 'spot06_room_0', - 'spot07_scene', - 'spot07_room_0', - 'spot07_room_1', - 'spot08_scene', - 'spot08_room_0', - 'spot09_scene', - 'spot09_room_0', - 'spot10_scene', - 'spot10_room_0', - 'spot10_room_1', - 'spot10_room_2', - 'spot10_room_3', - 'spot10_room_4', - 'spot10_room_5', - 'spot10_room_6', - 'spot10_room_7', - 'spot10_room_8', - 'spot10_room_9', - 'spot11_scene', - 'spot11_room_0', - 'spot12_scene', - 'spot12_room_0', - 'spot12_room_1', - 'spot13_scene', - 'spot13_room_0', - 'spot13_room_1', - 'spot15_scene', - 'spot15_room_0', - 'spot16_scene', - 'spot16_room_0', - 'spot17_scene', - 'spot17_room_0', - 'spot17_room_1', - 'spot18_scene', - 'spot18_room_0', - 'spot18_room_1', - 'spot18_room_2', - 'spot18_room_3', - 'ydan_scene', - 'ydan_room_0', - 'ydan_room_1', - 'ydan_room_2', - 'ydan_room_3', - 'ydan_room_4', - 'ydan_room_5', - 'ydan_room_6', - 'ydan_room_7', - 'ydan_room_8', - 'ydan_room_9', - 'ydan_room_10', - 'ydan_room_11', - 'ddan_scene', - 'ddan_room_0', - 'ddan_room_1', - 'ddan_room_2', - 'ddan_room_3', - 'ddan_room_4', - 'ddan_room_5', - 'ddan_room_6', - 'ddan_room_7', - 'ddan_room_8', - 'ddan_room_9', - 'ddan_room_10', - 'ddan_room_11', - 'ddan_room_12', - 'ddan_room_13', - 'ddan_room_14', - 'ddan_room_15', - 'ddan_room_16', - 'bdan_scene', - 'bdan_room_0', - 'bdan_room_1', - 'bdan_room_2', - 'bdan_room_3', - 'bdan_room_4', - 'bdan_room_5', - 'bdan_room_6', - 'bdan_room_7', - 'bdan_room_8', - 'bdan_room_9', - 'bdan_room_10', - 'bdan_room_11', - 'bdan_room_12', - 'bdan_room_13', - 'bdan_room_14', - 'bdan_room_15', - 'Bmori1_scene', - 'Bmori1_room_0', - 'Bmori1_room_1', - 'Bmori1_room_2', - 'Bmori1_room_3', - 'Bmori1_room_4', - 'Bmori1_room_5', - 'Bmori1_room_6', - 'Bmori1_room_7', - 'Bmori1_room_8', - 'Bmori1_room_9', - 'Bmori1_room_10', - 'Bmori1_room_11', - 'Bmori1_room_12', - 'Bmori1_room_13', - 'Bmori1_room_14', - 'Bmori1_room_15', - 'Bmori1_room_16', - 'Bmori1_room_17', - 'Bmori1_room_18', - 'Bmori1_room_19', - 'Bmori1_room_20', - 'Bmori1_room_21', - 'Bmori1_room_22', - 'HIDAN_scene', - 'HIDAN_room_0', - 'HIDAN_room_1', - 'HIDAN_room_2', - 'HIDAN_room_3', - 'HIDAN_room_4', - 'HIDAN_room_5', - 'HIDAN_room_6', - 'HIDAN_room_7', - 'HIDAN_room_8', - 'HIDAN_room_9', - 'HIDAN_room_10', - 'HIDAN_room_11', - 'HIDAN_room_12', - 'HIDAN_room_13', - 'HIDAN_room_14', - 'HIDAN_room_15', - 'HIDAN_room_16', - 'HIDAN_room_17', - 'HIDAN_room_18', - 'HIDAN_room_19', - 'HIDAN_room_20', - 'HIDAN_room_21', - 'HIDAN_room_22', - 'HIDAN_room_23', - 'HIDAN_room_24', - 'HIDAN_room_25', - 'HIDAN_room_26', - 'MIZUsin_scene', - 'MIZUsin_room_0', - 'MIZUsin_room_1', - 'MIZUsin_room_2', - 'MIZUsin_room_3', - 'MIZUsin_room_4', - 'MIZUsin_room_5', - 'MIZUsin_room_6', - 'MIZUsin_room_7', - 'MIZUsin_room_8', - 'MIZUsin_room_9', - 'MIZUsin_room_10', - 'MIZUsin_room_11', - 'MIZUsin_room_12', - 'MIZUsin_room_13', - 'MIZUsin_room_14', - 'MIZUsin_room_15', - 'MIZUsin_room_16', - 'MIZUsin_room_17', - 'MIZUsin_room_18', - 'MIZUsin_room_19', - 'MIZUsin_room_20', - 'MIZUsin_room_21', - 'MIZUsin_room_22', - 'jyasinzou_scene', - 'jyasinzou_room_0', - 'jyasinzou_room_1', - 'jyasinzou_room_2', - 'jyasinzou_room_3', - 'jyasinzou_room_4', - 'jyasinzou_room_5', - 'jyasinzou_room_6', - 'jyasinzou_room_7', - 'jyasinzou_room_8', - 'jyasinzou_room_9', - 'jyasinzou_room_10', - 'jyasinzou_room_11', - 'jyasinzou_room_12', - 'jyasinzou_room_13', - 'jyasinzou_room_14', - 'jyasinzou_room_15', - 'jyasinzou_room_16', - 'jyasinzou_room_17', - 'jyasinzou_room_18', - 'jyasinzou_room_19', - 'jyasinzou_room_20', - 'jyasinzou_room_21', - 'jyasinzou_room_22', - 'jyasinzou_room_23', - 'jyasinzou_room_24', - 'jyasinzou_room_25', - 'jyasinzou_room_26', - 'jyasinzou_room_27', - 'jyasinzou_room_28', - 'HAKAdan_scene', - 'HAKAdan_room_0', - 'HAKAdan_room_1', - 'HAKAdan_room_2', - 'HAKAdan_room_3', - 'HAKAdan_room_4', - 'HAKAdan_room_5', - 'HAKAdan_room_6', - 'HAKAdan_room_7', - 'HAKAdan_room_8', - 'HAKAdan_room_9', - 'HAKAdan_room_10', - 'HAKAdan_room_11', - 'HAKAdan_room_12', - 'HAKAdan_room_13', - 'HAKAdan_room_14', - 'HAKAdan_room_15', - 'HAKAdan_room_16', - 'HAKAdan_room_17', - 'HAKAdan_room_18', - 'HAKAdan_room_19', - 'HAKAdan_room_20', - 'HAKAdan_room_21', - 'HAKAdan_room_22', - 'HAKAdanCH_scene', - 'HAKAdanCH_room_0', - 'HAKAdanCH_room_1', - 'HAKAdanCH_room_2', - 'HAKAdanCH_room_3', - 'HAKAdanCH_room_4', - 'HAKAdanCH_room_5', - 'HAKAdanCH_room_6', - 'ice_doukutu_scene', - 'ice_doukutu_room_0', - 'ice_doukutu_room_1', - 'ice_doukutu_room_2', - 'ice_doukutu_room_3', - 'ice_doukutu_room_4', - 'ice_doukutu_room_5', - 'ice_doukutu_room_6', - 'ice_doukutu_room_7', - 'ice_doukutu_room_8', - 'ice_doukutu_room_9', - 'ice_doukutu_room_10', - 'ice_doukutu_room_11', - 'men_scene', - 'men_room_0', - 'men_room_1', - 'men_room_2', - 'men_room_3', - 'men_room_4', - 'men_room_5', - 'men_room_6', - 'men_room_7', - 'men_room_8', - 'men_room_9', - 'men_room_10', - 'ganontika_scene', - 'ganontika_room_0', - 'ganontika_room_1', - 'ganontika_room_2', - 'ganontika_room_3', - 'ganontika_room_4', - 'ganontika_room_5', - 'ganontika_room_6', - 'ganontika_room_7', - 'ganontika_room_8', - 'ganontika_room_9', - 'ganontika_room_10', - 'ganontika_room_11', - 'ganontika_room_12', - 'ganontika_room_13', - 'ganontika_room_14', - 'ganontika_room_15', - 'ganontika_room_16', - 'ganontika_room_17', - 'ganontika_room_18', - 'ganontika_room_19', - 'market_day_scene', - 'market_day_room_0', - 'market_night_scene', - 'market_night_room_0', - 'testroom_scene', - 'testroom_room_0', - 'testroom_room_1', - 'testroom_room_2', - 'testroom_room_3', - 'testroom_room_4', - 'kenjyanoma_scene', - 'kenjyanoma_room_0', - 'tokinoma_scene', - 'tokinoma_room_0', - 'tokinoma_room_1', - 'sutaru_scene', - 'sutaru_room_0', - 'link_home_scene', - 'link_home_room_0', - 'kokiri_shop_scene', - 'kokiri_shop_room_0', - 'kokiri_home_scene', - 'kokiri_home_room_0', - 'kakusiana_scene', - 'kakusiana_room_0', - 'kakusiana_room_1', - 'kakusiana_room_2', - 'kakusiana_room_3', - 'kakusiana_room_4', - 'kakusiana_room_5', - 'kakusiana_room_6', - 'kakusiana_room_7', - 'kakusiana_room_8', - 'kakusiana_room_9', - 'kakusiana_room_10', - 'kakusiana_room_11', - 'kakusiana_room_12', - 'kakusiana_room_13', - 'entra_scene', - 'entra_room_0', - 'moribossroom_scene', - 'moribossroom_room_0', - 'moribossroom_room_1', - 'syatekijyou_scene', - 'syatekijyou_room_0', - 'shop1_scene', - 'shop1_room_0', - 'hairal_niwa_scene', - 'hairal_niwa_room_0', - 'ganon_tou_scene', - 'ganon_tou_room_0', - 'sasatest_scene', - 'sasatest_room_0', - 'market_alley_scene', - 'market_alley_room_0', - 'spot20_scene', - 'spot20_room_0', - 'market_ruins_scene', - 'market_ruins_room_0', - 'entra_n_scene', - 'entra_n_room_0', - 'enrui_scene', - 'enrui_room_0', - 'market_alley_n_scene', - 'market_alley_n_room_0', - 'hiral_demo_scene', - 'hiral_demo_room_0', - 'kokiri_home3_scene', - 'kokiri_home3_room_0', - 'malon_stable_scene', - 'malon_stable_room_0', - 'kakariko_scene', - 'kakariko_room_0', - 'bdan_boss_scene', - 'bdan_boss_room_0', - 'bdan_boss_room_1', - 'FIRE_bs_scene', - 'FIRE_bs_room_0', - 'FIRE_bs_room_1', - 'hut_scene', - 'hut_room_0', - 'daiyousei_izumi_scene', - 'daiyousei_izumi_room_0', - 'hakaana_scene', - 'hakaana_room_0', - 'yousei_izumi_tate_scene', - 'yousei_izumi_tate_room_0', - 'yousei_izumi_yoko_scene', - 'yousei_izumi_yoko_room_0', - 'golon_scene', - 'golon_room_0', - 'zoora_scene', - 'zoora_room_0', - 'drag_scene', - 'drag_room_0', - 'alley_shop_scene', - 'alley_shop_room_0', - 'night_shop_scene', - 'night_shop_room_0', - 'impa_scene', - 'impa_room_0', - 'labo_scene', - 'labo_room_0', - 'tent_scene', - 'tent_room_0', - 'nakaniwa_scene', - 'nakaniwa_room_0', - 'ddan_boss_scene', - 'ddan_boss_room_0', - 'ddan_boss_room_1', - 'ydan_boss_scene', - 'ydan_boss_room_0', - 'ydan_boss_room_1', - 'HAKAdan_bs_scene', - 'HAKAdan_bs_room_0', - 'HAKAdan_bs_room_1', - 'MIZUsin_bs_scene', - 'MIZUsin_bs_room_0', - 'MIZUsin_bs_room_1', - 'ganon_scene', - 'ganon_room_0', - 'ganon_room_1', - 'ganon_room_2', - 'ganon_room_3', - 'ganon_room_4', - 'ganon_room_5', - 'ganon_room_6', - 'ganon_room_7', - 'ganon_room_8', - 'ganon_room_9', - 'ganon_boss_scene', - 'ganon_boss_room_0', - 'jyasinboss_scene', - 'jyasinboss_room_0', - 'jyasinboss_room_1', - 'jyasinboss_room_2', - 'jyasinboss_room_3', - 'kokiri_home4_scene', - 'kokiri_home4_room_0', - 'kokiri_home5_scene', - 'kokiri_home5_room_0', - 'ganon_final_scene', - 'ganon_final_room_0', - 'kakariko3_scene', - 'kakariko3_room_0', - 'hairal_niwa2_scene', - 'hairal_niwa2_room_0', - 'hakasitarelay_scene', - 'hakasitarelay_room_0', - 'hakasitarelay_room_1', - 'hakasitarelay_room_2', - 'hakasitarelay_room_3', - 'hakasitarelay_room_4', - 'hakasitarelay_room_5', - 'hakasitarelay_room_6', - 'shrine_scene', - 'shrine_room_0', - 'turibori_scene', - 'turibori_room_0', - 'shrine_n_scene', - 'shrine_n_room_0', - 'shrine_r_scene', - 'shrine_r_room_0', - 'hakaana2_scene', - 'hakaana2_room_0', - 'gerudoway_scene', - 'gerudoway_room_0', - 'gerudoway_room_1', - 'gerudoway_room_2', - 'gerudoway_room_3', - 'gerudoway_room_4', - 'gerudoway_room_5', - 'hairal_niwa_n_scene', - 'hairal_niwa_n_room_0', - 'bowling_scene', - 'bowling_room_0', - 'hakaana_ouke_scene', - 'hakaana_ouke_room_0', - 'hakaana_ouke_room_1', - 'hakaana_ouke_room_2', - 'hylia_labo_scene', - 'hylia_labo_room_0', - 'souko_scene', - 'souko_room_0', - 'souko_room_1', - 'souko_room_2', - 'miharigoya_scene', - 'miharigoya_room_0', - 'mahouya_scene', - 'mahouya_room_0', - 'takaraya_scene', - 'takaraya_room_0', - 'takaraya_room_1', - 'takaraya_room_2', - 'takaraya_room_3', - 'takaraya_room_4', - 'takaraya_room_5', - 'takaraya_room_6', - 'ganon_sonogo_scene', - 'ganon_sonogo_room_0', - 'ganon_sonogo_room_1', - 'ganon_sonogo_room_2', - 'ganon_sonogo_room_3', - 'ganon_sonogo_room_4', - 'ganon_demo_scene', - 'ganon_demo_room_0', - 'besitu_scene', - 'besitu_room_0', - 'face_shop_scene', - 'face_shop_room_0', - 'kinsuta_scene', - 'kinsuta_room_0', - 'ganontikasonogo_scene', - 'ganontikasonogo_room_0', - 'ganontikasonogo_room_1', - 'test01_scene', - 'test01_room_0', - 'bump_texture_static', - 'anime_model_1_static', - 'anime_model_2_static', - 'anime_model_3_static', - 'anime_model_4_static', - 'anime_model_5_static', - 'anime_model_6_static', - 'anime_texture_1_static', - 'anime_texture_2_static', - 'anime_texture_3_static', - 'anime_texture_4_static', - 'anime_texture_5_static', - 'anime_texture_6_static', - 'softsprite_matrix_static', -] - -romData = None - - -def initialize_worker(rom_data): - global romData - romData = rom_data - -def read_uint32_be(offset): - return struct.unpack('>I', romData[offset:offset+4])[0] - -def write_output_file(name, offset, size): - try: - with open(name, 'wb') as f: - f.write(romData[offset:offset+size]) - except IOError: - print('failed to write file ' + name) - -def ExtractFunc(i): - filename = 'baserom/' + FILE_NAMES[i] - entryOffset = FILE_TABLE_OFFSET + 16 * i - - virtStart = read_uint32_be(entryOffset + 0) - virtEnd = read_uint32_be(entryOffset + 4) - physStart = read_uint32_be(entryOffset + 8) - physEnd = read_uint32_be(entryOffset + 12) - - if physEnd == 0: # uncompressed - compressed = False - size = virtEnd - virtStart - else: # compressed - compressed = True - size = physEnd - physStart - - print('extracting ' + filename + " (0x%08X, 0x%08X)" % (virtStart, virtEnd)) - write_output_file(filename, physStart, size) - if compressed: - os.system('tools/yaz0 -d ' + filename + ' ' + filename) - -##################################################################### - -def main(): - try: - os.mkdir('baserom') - except: - pass - - # read baserom data - try: - with open(ROM_FILE_NAME, 'rb') as f: - rom_data = f.read() - except IOError: - print('failed to read ' + ROM_FILE_NAME) - sys.exit(1) - - # extract files - num_cores = cpu_count() - print("Extracting baserom with " + str(num_cores) + " CPU cores.") - with Pool(num_cores, initialize_worker, (rom_data,)) as p: - p.map(ExtractFunc, range(len(FILE_NAMES))) - -if __name__ == "__main__": - main() From baf366c0864c154c7bc6c739ea3f3ba3099392a9 Mon Sep 17 00:00:00 2001 From: Emil Lenngren Date: Mon, 25 Apr 2022 22:53:06 +0200 Subject: [PATCH 069/146] Modify grayscale intensity for item icons to match original --- soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c | 2 +- soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c index c21ef4ca7..1e778663d 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c @@ -578,7 +578,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) { int itemId = ITEM_SWORD_KOKIRI + temp; bool not_acquired = (gItemAgeReqs[itemId] != 9) && (gItemAgeReqs[itemId] != gSaveContext.linkAge); if (not_acquired) { - gsDPSetGrayscaleColor(POLY_KAL_DISP++, 100, 100, 100); + gsDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109); gsSPGrayscale(POLY_KAL_DISP++, true); } KaleidoScope_DrawQuadTextureRGBA32(globalCtx->state.gfxCtx, gItemIcons[itemId], 32, 32, point); diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c index 7f7d81075..2ce63cf51 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c @@ -470,7 +470,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) { int itemId = gSaveContext.inventory.items[i]; bool not_acquired = (gItemAgeReqs[itemId] != 9) && (gItemAgeReqs[itemId] != gSaveContext.linkAge); if (not_acquired) { - gsDPSetGrayscaleColor(POLY_KAL_DISP++, 100, 100, 100); + gsDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109); gsSPGrayscale(POLY_KAL_DISP++, true); } KaleidoScope_DrawQuadTextureRGBA32(globalCtx->state.gfxCtx, gItemIcons[itemId], 32, From eecad3dc1513f0dd62e8022c86ae1f07c1598a76 Mon Sep 17 00:00:00 2001 From: vaguerant Date: Sat, 23 Apr 2022 16:31:02 +1000 Subject: [PATCH 070/146] Credits message order fix by rink --- soh/src/code/z_message_PAL.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c index 4780044a6..8b9410018 100644 --- a/soh/src/code/z_message_PAL.c +++ b/soh/src/code/z_message_PAL.c @@ -391,7 +391,7 @@ void Message_FindCreditsMessage(GlobalContext* globalCtx, u16 textId) { if (messageTableEntry->textId == textId) { foundSeg = messageTableEntry->segment; font->charTexBuf[0] = messageTableEntry->typePos; - messageTableEntry++; + //messageTableEntry++; nextSeg = messageTableEntry->segment; font->msgOffset = messageTableEntry->segment; font->msgLength = messageTableEntry->msgSize; From 0ea9612b7e1ea82b771b0d85a42a86f9bd530b4a Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Mon, 25 Apr 2022 17:04:15 -0500 Subject: [PATCH 071/146] Moved vismono effect to the gpu --- .../libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h | 4 ++-- .../libultraship/Lib/Fast3D/gfx_direct3d_common.cpp | 3 ++- libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp | 3 ++- soh/src/code/z_play.c | 11 +++++++---- soh/src/overlays/actors/ovl_End_Title/z_end_title.c | 5 ++++- soh/src/overlays/gamestates/ovl_title/z_title.c | 2 ++ .../misc/ovl_kaleido_scope/z_kaleido_equipment.c | 2 +- .../overlays/misc/ovl_kaleido_scope/z_kaleido_item.c | 2 +- 8 files changed, 21 insertions(+), 11 deletions(-) diff --git a/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h b/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h index 3b4b8f7d8..b91856ef6 100644 --- a/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h +++ b/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h @@ -3175,8 +3175,8 @@ _DW({ \ (_SHIFTL(r, 24, 8) | _SHIFTL(g, 16, 8) | \ _SHIFTL(b, 8, 8) | _SHIFTL(a, 0, 8))) -#define gsDPSetGrayscaleColor(pkt, r, g, b) \ - DPRGBColor(pkt, G_SETINTENSITY, r, g, b, 255) +#define gsDPSetGrayscaleColor(pkt, r, g, b, lerp) \ + DPRGBColor(pkt, G_SETINTENSITY, r, g, b, lerp) #define gDPSetEnvColor(pkt, r, g, b, a) \ DPRGBColor(pkt, G_SETENVCOLOR, r,g,b,a) #define gsDPSetEnvColor(r, g, b, a) \ diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp index 8df273be7..a8197b321 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp @@ -310,7 +310,8 @@ void gfx_direct3d_common_build_shader(char buf[4096], size_t& len, size_t& num_f if (cc_features.opt_grayscale) { append_line(buf, &len, "float intensity = (texel.r + texel.g + texel.b) / 3.0;"); - append_line(buf, &len, "texel.rgb = input.grayscale.rgb * intensity;"); + append_line(buf, &len, "float3 new_texel = input.grayscale.rgb * intensity;"); + append_line(buf, &len, "texel.rgb = input.grayscale.a > 0 ? lerp(texel.rgb, new_texel, input.grayscale.a) : new_texel;"); } if (cc_features.opt_alpha && cc_features.opt_noise) { diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp index 808b0a558..c8dc4666e 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp @@ -370,7 +370,8 @@ static struct ShaderProgram* gfx_opengl_create_and_load_new_shader(uint64_t shad if (cc_features.opt_grayscale) { append_line(fs_buf, &fs_len, "float intensity = (texel.r + texel.g + texel.b) / 3.0;"); - append_line(fs_buf, &fs_len, "texel.rgb = vGrayscaleColor.rgb * intensity;"); + append_line(fs_buf, &fs_len, "vec3 new_texel = vGrayscaleColor.rgb * intensity;"); + append_line(fs_buf, &fs_len, "texel.rgb = vGrayscaleColor.a > 0 ? mix(texel.rgb, new_texel, vGrayscaleColor.a) : new_texel;"); } if (cc_features.opt_alpha) { diff --git a/soh/src/code/z_play.c b/soh/src/code/z_play.c index 193b14164..f62e719ba 100644 --- a/soh/src/code/z_play.c +++ b/soh/src/code/z_play.c @@ -1,3 +1,5 @@ +#include + #include "global.h" #include "vt.h" @@ -1119,6 +1121,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) { gfxP = Graph_GfxPlusOne(sp1CC); gSPDisplayList(OVERLAY_DISP++, gfxP); + gsSPGrayscale(gfxP++, false); if ((globalCtx->transitionMode == 3) || (globalCtx->transitionMode == 11) || (globalCtx->transitionCtx.transitionType >= 56)) { @@ -1136,8 +1139,8 @@ void Gameplay_Draw(GlobalContext* globalCtx) { TransitionFade_Draw(&globalCtx->transitionFade, &gfxP); if (D_801614B0.a > 0) { - D_80161498.primColor.rgba = D_801614B0.rgba; - VisMono_Draw(&D_80161498, &gfxP); + gsDPSetGrayscaleColor(gfxP++, D_801614B0.r, D_801614B0.g, D_801614B0.b, D_801614B0.a); + gsSPGrayscale(gfxP++, true); } gSPEndDisplayList(gfxP++); @@ -1171,7 +1174,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) { //goto Gameplay_Draw_DrawOverlayElements; } - //else + //else { s32 sp80; @@ -1472,7 +1475,7 @@ void Gameplay_InitEnvironment(GlobalContext* globalCtx, s16 skyboxId) { Environment_Init(globalCtx, &globalCtx->envCtx, 0); } -void Gameplay_InitScene(GlobalContext* globalCtx, s32 spawn) +void Gameplay_InitScene(GlobalContext* globalCtx, s32 spawn) { globalCtx->curSpawn = spawn; globalCtx->linkActorEntry = NULL; diff --git a/soh/src/overlays/actors/ovl_End_Title/z_end_title.c b/soh/src/overlays/actors/ovl_End_Title/z_end_title.c index f76ac084d..0c903bb80 100644 --- a/soh/src/overlays/actors/ovl_End_Title/z_end_title.c +++ b/soh/src/overlays/actors/ovl_End_Title/z_end_title.c @@ -84,6 +84,8 @@ void EndTitle_DrawFull(Actor* thisx, GlobalContext* globalCtx) { } OVERLAY_DISP = func_80093F34(OVERLAY_DISP); + if (D_801614B0.a > 0) + gsSPGrayscale(OVERLAY_DISP++, false); gDPSetTextureLUT(OVERLAY_DISP++, G_TT_NONE); gDPSetEnvColor(OVERLAY_DISP++, 255, 120, 30, 0); gDPSetRenderMode(OVERLAY_DISP++, G_RM_PASS, G_RM_XLU_SURF2); @@ -108,7 +110,8 @@ void EndTitle_DrawFull(Actor* thisx, GlobalContext* globalCtx) { G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 0, 0, 0, 0); gSPTextureRectangle(OVERLAY_DISP++, 104 << 2, 177 << 2, 216 << 2, 192 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); - + if (D_801614B0.a > 0) + gsSPGrayscale(OVERLAY_DISP++, true); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_end_title.c", 515); } diff --git a/soh/src/overlays/gamestates/ovl_title/z_title.c b/soh/src/overlays/gamestates/ovl_title/z_title.c index 3b7cfe84c..380720dd1 100644 --- a/soh/src/overlays/gamestates/ovl_title/z_title.c +++ b/soh/src/overlays/gamestates/ovl_title/z_title.c @@ -271,6 +271,8 @@ void Title_Init(GameState* thisx) { //ResourceMgr_CacheDirectory("nintendo_rogo_static*"); + // Disable vismono + D_801614B0.a = 0; R_UPDATE_RATE = 1; Matrix_Init(&this->state); View_Init(&this->view, this->state.gfxCtx); diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c index 1e778663d..ba981c58f 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c @@ -578,7 +578,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) { int itemId = ITEM_SWORD_KOKIRI + temp; bool not_acquired = (gItemAgeReqs[itemId] != 9) && (gItemAgeReqs[itemId] != gSaveContext.linkAge); if (not_acquired) { - gsDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109); + gsDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 0); gsSPGrayscale(POLY_KAL_DISP++, true); } KaleidoScope_DrawQuadTextureRGBA32(globalCtx->state.gfxCtx, gItemIcons[itemId], 32, 32, point); diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c index 2ce63cf51..26f37deb9 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c @@ -470,7 +470,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) { int itemId = gSaveContext.inventory.items[i]; bool not_acquired = (gItemAgeReqs[itemId] != 9) && (gItemAgeReqs[itemId] != gSaveContext.linkAge); if (not_acquired) { - gsDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109); + gsDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 0); gsSPGrayscale(POLY_KAL_DISP++, true); } KaleidoScope_DrawQuadTextureRGBA32(globalCtx->state.gfxCtx, gItemIcons[itemId], 32, From f5f2205d0f0a1f2fcbedaa8b648d83113e7ab3d7 Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Mon, 25 Apr 2022 17:07:40 -0500 Subject: [PATCH 072/146] Removed stdio and added documentation --- libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h | 2 +- libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp | 2 +- soh/src/code/z_play.c | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h b/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h index b91856ef6..8af624e8f 100644 --- a/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h +++ b/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h @@ -3175,7 +3175,7 @@ _DW({ \ (_SHIFTL(r, 24, 8) | _SHIFTL(g, 16, 8) | \ _SHIFTL(b, 8, 8) | _SHIFTL(a, 0, 8))) -#define gsDPSetGrayscaleColor(pkt, r, g, b, lerp) \ +#define gsDPSetGrayscaleColor(pkt, r, g, b, lerp) \ DPRGBColor(pkt, G_SETINTENSITY, r, g, b, lerp) #define gDPSetEnvColor(pkt, r, g, b, a) \ DPRGBColor(pkt, G_SETENVCOLOR, r,g,b,a) diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp index 130d07b73..1d03befe6 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp @@ -1397,7 +1397,7 @@ static void gfx_sp_tri1(uint8_t vtx1_idx, uint8_t vtx2_idx, uint8_t vtx3_idx, bo buf_vbo[buf_vbo_len++] = rdp.grayscale_color.r / 255.0f; buf_vbo[buf_vbo_len++] = rdp.grayscale_color.g / 255.0f; buf_vbo[buf_vbo_len++] = rdp.grayscale_color.b / 255.0f; - buf_vbo[buf_vbo_len++] = rdp.grayscale_color.a / 255.0f; // Unused + buf_vbo[buf_vbo_len++] = rdp.grayscale_color.a / 255.0f; // lerp interpolation factor (not alpha) } for (int j = 0; j < num_inputs; j++) { diff --git a/soh/src/code/z_play.c b/soh/src/code/z_play.c index f62e719ba..6218b7d76 100644 --- a/soh/src/code/z_play.c +++ b/soh/src/code/z_play.c @@ -1,5 +1,3 @@ -#include - #include "global.h" #include "vt.h" From 6991549cde13791a094cecd383ba38baf80d3719 Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Mon, 25 Apr 2022 17:56:52 -0500 Subject: [PATCH 073/146] Removed ternary operator --- libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp | 2 +- libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp | 2 +- soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c | 2 +- soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp index a8197b321..2c10e6605 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d_common.cpp @@ -311,7 +311,7 @@ void gfx_direct3d_common_build_shader(char buf[4096], size_t& len, size_t& num_f if (cc_features.opt_grayscale) { append_line(buf, &len, "float intensity = (texel.r + texel.g + texel.b) / 3.0;"); append_line(buf, &len, "float3 new_texel = input.grayscale.rgb * intensity;"); - append_line(buf, &len, "texel.rgb = input.grayscale.a > 0 ? lerp(texel.rgb, new_texel, input.grayscale.a) : new_texel;"); + append_line(buf, &len, "texel.rgb = lerp(texel.rgb, new_texel, input.grayscale.a);"); } if (cc_features.opt_alpha && cc_features.opt_noise) { diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp index c8dc4666e..6f3017c15 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp @@ -371,7 +371,7 @@ static struct ShaderProgram* gfx_opengl_create_and_load_new_shader(uint64_t shad if (cc_features.opt_grayscale) { append_line(fs_buf, &fs_len, "float intensity = (texel.r + texel.g + texel.b) / 3.0;"); append_line(fs_buf, &fs_len, "vec3 new_texel = vGrayscaleColor.rgb * intensity;"); - append_line(fs_buf, &fs_len, "texel.rgb = vGrayscaleColor.a > 0 ? mix(texel.rgb, new_texel, vGrayscaleColor.a) : new_texel;"); + append_line(fs_buf, &fs_len, "texel.rgb = mix(texel.rgb, new_texel, vGrayscaleColor.a);"); } if (cc_features.opt_alpha) { diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c index ba981c58f..5b90725e1 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c @@ -578,7 +578,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) { int itemId = ITEM_SWORD_KOKIRI + temp; bool not_acquired = (gItemAgeReqs[itemId] != 9) && (gItemAgeReqs[itemId] != gSaveContext.linkAge); if (not_acquired) { - gsDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 0); + gsDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 255); gsSPGrayscale(POLY_KAL_DISP++, true); } KaleidoScope_DrawQuadTextureRGBA32(globalCtx->state.gfxCtx, gItemIcons[itemId], 32, 32, point); diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c index 26f37deb9..52c04908f 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c @@ -470,7 +470,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) { int itemId = gSaveContext.inventory.items[i]; bool not_acquired = (gItemAgeReqs[itemId] != 9) && (gItemAgeReqs[itemId] != gSaveContext.linkAge); if (not_acquired) { - gsDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 0); + gsDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 255); gsSPGrayscale(POLY_KAL_DISP++, true); } KaleidoScope_DrawQuadTextureRGBA32(globalCtx->state.gfxCtx, gItemIcons[itemId], 32, From 4869eea9686d3f28f79d8af67fb09efd16e34c22 Mon Sep 17 00:00:00 2001 From: Emil Lenngren Date: Tue, 26 Apr 2022 00:24:21 +0200 Subject: [PATCH 074/146] Fix random crash in z_construct --- soh/src/code/z_construct.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/soh/src/code/z_construct.c b/soh/src/code/z_construct.c index 5149fd974..c74d3c14c 100644 --- a/soh/src/code/z_construct.c +++ b/soh/src/code/z_construct.c @@ -56,7 +56,8 @@ void func_801109B0(GlobalContext* globalCtx) { doActionOffset = 0x5700; } - memcpy(interfaceCtx->doActionSegment, ResourceMgr_LoadTexByName(gAttackDoActionENGTex), 0x300); + memcpy(interfaceCtx->doActionSegment, ResourceMgr_LoadTexByName(gAttackDoActionENGTex), 0x180); + memcpy(interfaceCtx->doActionSegment + 0x180, ResourceMgr_LoadTexByName(gCheckDoActionENGTex), 0x180); //DmaMgr_SendRequest1(interfaceCtx->doActionSegment, (uintptr_t)_do_action_staticSegmentRomStart + doActionOffset, 0x300, //"../z_construct.c", 174); From b82871e62f4934787e9585116469c161816c9670 Mon Sep 17 00:00:00 2001 From: IShallRiseAgain <49771132+IShallRiseAgain@users.noreply.github.com> Date: Tue, 26 Apr 2022 18:33:18 -0400 Subject: [PATCH 075/146] Added custom color support for Tunic and Navi (#98) --- libultraship/libultraship/GameSettings.cpp | 123 ++++++++++++++ libultraship/libultraship/GameSettings.h | 42 +++++ libultraship/libultraship/SohImGuiImpl.cpp | 178 +++++++++++++++++++++ soh/src/code/z_actor.c | 32 ++++ soh/src/code/z_player_lib.c | 23 ++- 5 files changed, 396 insertions(+), 2 deletions(-) diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index c056dec71..5e02037de 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -27,8 +27,10 @@ namespace Game { const std::string AudioSection = AUDIO_SECTION; const std::string ControllerSection = CONTROLLER_SECTION; const std::string EnhancementSection = ENHANCEMENTS_SECTION; + const std::string CosmeticsSection = COSMETICS_SECTION; const std::string CheatSection = CHEATS_SECTION; + void UpdateAudio() { Audio_SetGameVolume(SEQ_BGM_MAIN, Settings.audio.music_main); Audio_SetGameVolume(SEQ_BGM_SUB, Settings.audio.music_sub); @@ -103,6 +105,84 @@ namespace Game { CVar_SetFloat("gInputScale", Settings.controller.input_scale); Settings.controller.input_enabled = stob(Conf[ControllerSection]["input_enabled"]); + + CVar_SetS32(const_cast("gInputEnabled"), Settings.controller.input_enabled); + //Tunics + Settings.cosmetic.tunic_kokiri_red = (Conf[CosmeticsSection]["tunic_kokiri_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_kokiri_red"]) : Settings.cosmetic.tunic_kokiri_red; + CVar_SetS32(const_cast("gTunic_Kokiri_Red"), Settings.cosmetic.tunic_kokiri_red); + Settings.cosmetic.tunic_kokiri_green = (Conf[CosmeticsSection]["tunic_kokiri_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_kokiri_green"]) : Settings.cosmetic.tunic_kokiri_green; + CVar_SetS32(const_cast("gTunic_Kokiri_Green"), Settings.cosmetic.tunic_kokiri_green); + Settings.cosmetic.tunic_kokiri_blue = (Conf[CosmeticsSection]["tunic_kokiri_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_kokiri_blue"]) : Settings.cosmetic.tunic_kokiri_blue; + CVar_SetS32(const_cast("gTunic_Kokiri_Blue"), Settings.cosmetic.tunic_kokiri_blue); + + Settings.cosmetic.tunic_goron_red = (Conf[CosmeticsSection]["tunic_goron_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_goron_red"]) : Settings.cosmetic.tunic_goron_red; + CVar_SetS32(const_cast("gTunic_Goron_Red"), Settings.cosmetic.tunic_goron_red); + Settings.cosmetic.tunic_goron_green = (Conf[CosmeticsSection]["tunic_goron_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_goron_green"]) : Settings.cosmetic.tunic_goron_green; + CVar_SetS32(const_cast("gTunic_Goron_Green"), Settings.cosmetic.tunic_goron_green); + Settings.cosmetic.tunic_goron_blue = (Conf[CosmeticsSection]["tunic_goron_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_goron_blue"]) : Settings.cosmetic.tunic_goron_blue; + CVar_SetS32(const_cast("gTunic_Goron_Blue"), Settings.cosmetic.tunic_goron_blue); + + Settings.cosmetic.tunic_zora_red = (Conf[CosmeticsSection]["tunic_zora_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_zora_red"]) : Settings.cosmetic.tunic_zora_red; + CVar_SetS32(const_cast("gTunic_Zora_Red"), Settings.cosmetic.tunic_zora_red); + Settings.cosmetic.tunic_zora_green = (Conf[CosmeticsSection]["tunic_zora_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_zora_green"]) : Settings.cosmetic.tunic_zora_green; + CVar_SetS32(const_cast("gTunic_Zora_Green"), Settings.cosmetic.tunic_zora_green); + Settings.cosmetic.tunic_zora_blue = (Conf[CosmeticsSection]["tunic_zora_blue"] != "" ) ? Ship::stoi(Conf[CosmeticsSection]["tunic_zora_blue"]) : Settings.cosmetic.tunic_zora_blue; + CVar_SetS32(const_cast("gTunic_Zora_Blue"), Settings.cosmetic.tunic_zora_blue); + //Navi + Settings.cosmetic.navi_idle_inner_red = (Conf[CosmeticsSection]["navi_idle_inner_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_idle_inner_red"]) : Settings.cosmetic.navi_idle_inner_red; + CVar_SetS32(const_cast("gNavi_Idle_Inner_Red"), Settings.cosmetic.navi_idle_inner_red); + Settings.cosmetic.navi_idle_inner_green = (Conf[CosmeticsSection]["navi_idle_inner_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_idle_inner_green"]) : Settings.cosmetic.navi_idle_inner_green; + CVar_SetS32(const_cast("gNavi_Idle_Inner_Green"), Settings.cosmetic.navi_idle_inner_green); + Settings.cosmetic.navi_idle_inner_blue = (Conf[CosmeticsSection]["navi_idle_inner_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_idle_inner_blue"]) : Settings.cosmetic.navi_idle_inner_blue; + CVar_SetS32(const_cast("gNavi_Idle_Inner_Blue"), Settings.cosmetic.navi_idle_inner_blue); + Settings.cosmetic.navi_idle_outer_red = (Conf[CosmeticsSection]["navi_idle_outer_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_idle_outer_red"]) : Settings.cosmetic.navi_idle_outer_red; + CVar_SetS32(const_cast("gNavi_Idle_Outer_Red"), Settings.cosmetic.navi_idle_outer_red); + Settings.cosmetic.navi_idle_outer_green = (Conf[CosmeticsSection]["navi_idle_outer_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_idle_outer_green"]) : Settings.cosmetic.navi_idle_outer_green; + CVar_SetS32(const_cast("gNavi_Idle_Outer_Green"), Settings.cosmetic.navi_idle_outer_green); + Settings.cosmetic.navi_idle_outer_blue = (Conf[CosmeticsSection]["navi_idle_outer_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_idle_outer_blue"]) : Settings.cosmetic.navi_idle_outer_blue; + CVar_SetS32(const_cast("gNavi_Idle_Outer_Blue"), Settings.cosmetic.navi_idle_outer_blue); + + Settings.cosmetic.navi_npc_inner_red = (Conf[CosmeticsSection]["navi_npc_inner_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_npc_inner_red"]) : Settings.cosmetic.navi_npc_inner_red; + CVar_SetS32(const_cast("gNavi_NPC_Inner_Red"), Settings.cosmetic.navi_npc_inner_red); + Settings.cosmetic.navi_npc_inner_green = (Conf[CosmeticsSection]["navi_npc_inner_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_npc_inner_green"]) : Settings.cosmetic.navi_npc_inner_green; + CVar_SetS32(const_cast("gNavi_NPC_Inner_Green"), Settings.cosmetic.navi_npc_inner_green); + Settings.cosmetic.navi_npc_inner_blue = (Conf[CosmeticsSection]["navi_npc_inner_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_npc_inner_blue"]) : Settings.cosmetic.navi_npc_inner_blue; + CVar_SetS32(const_cast("gNavi_NPC_Inner_Blue"), Settings.cosmetic.navi_npc_inner_blue); + Settings.cosmetic.navi_npc_outer_red = (Conf[CosmeticsSection]["navi_npc_outer_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_npc_outer_red"]) : Settings.cosmetic.navi_npc_outer_red; + CVar_SetS32(const_cast("gNavi_NPC_Outer_Red"), Settings.cosmetic.navi_npc_outer_red); + Settings.cosmetic.navi_npc_outer_green = (Conf[CosmeticsSection]["navi_npc_outer_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_npc_outer_green"]) : Settings.cosmetic.navi_npc_outer_green; + CVar_SetS32(const_cast("gNavi_NPC_Outer_Green"), Settings.cosmetic.navi_npc_outer_green); + Settings.cosmetic.navi_npc_outer_blue = (Conf[CosmeticsSection]["navi_npc_outer_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_npc_outer_blue"]) : Settings.cosmetic.navi_npc_outer_blue; + CVar_SetS32(const_cast("gNavi_NPC_Outer_Blue"), Settings.cosmetic.navi_npc_outer_blue); + + Settings.cosmetic.navi_enemy_inner_red = (Conf[CosmeticsSection]["navi_enemy_inner_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_enemy_inner_red"]) : Settings.cosmetic.navi_enemy_inner_red; + CVar_SetS32(const_cast("gNavi_Enemy_Inner_Red"), Settings.cosmetic.navi_enemy_inner_red); + Settings.cosmetic.navi_enemy_inner_green = (Conf[CosmeticsSection]["navi_enemy_inner_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_enemy_inner_green"]) : Settings.cosmetic.navi_enemy_inner_green; + CVar_SetS32(const_cast("gNavi_Enemy_Inner_Green"), Settings.cosmetic.navi_enemy_inner_green); + Settings.cosmetic.navi_enemy_inner_blue = (Conf[CosmeticsSection]["navi_enemy_inner_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_enemy_inner_blue"]) : Settings.cosmetic.navi_enemy_inner_blue; + CVar_SetS32(const_cast("gNavi_Enemy_Inner_Blue"), Settings.cosmetic.navi_enemy_inner_blue); + Settings.cosmetic.navi_enemy_outer_red = (Conf[CosmeticsSection]["navi_enemy_outer_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_enemy_outer_red"]) : Settings.cosmetic.navi_enemy_outer_red; + CVar_SetS32(const_cast("gNavi_Enemy_Outer_Red"), Settings.cosmetic.navi_enemy_outer_red); + Settings.cosmetic.navi_enemy_outer_green = (Conf[CosmeticsSection]["navi_enemy_outer_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_enemy_outer_green"]) : Settings.cosmetic.navi_enemy_outer_green; + CVar_SetS32(const_cast("gNavi_Enemy_Outer_Green"), Settings.cosmetic.navi_enemy_outer_green); + Settings.cosmetic.navi_enemy_outer_blue = (Conf[CosmeticsSection]["navi_enemy_outer_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_enemy_outer_blue"]) : Settings.cosmetic.navi_enemy_outer_blue; + CVar_SetS32(const_cast("gNavi_Enemy_Outer_Blue"), Settings.cosmetic.navi_enemy_outer_blue); + + Settings.cosmetic.navi_prop_inner_red = (Conf[CosmeticsSection]["navi_prop_inner_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_prop_inner_red"]) : Settings.cosmetic.navi_prop_inner_red; + CVar_SetS32(const_cast("gNavi_Prop_Inner_Red"), Settings.cosmetic.navi_prop_inner_red); + Settings.cosmetic.navi_prop_inner_green = (Conf[CosmeticsSection]["navi_prop_inner_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_prop_inner_green"]) : Settings.cosmetic.navi_prop_inner_green; + CVar_SetS32(const_cast("gNavi_Prop_Inner_Green"), Settings.cosmetic.navi_prop_inner_green); + Settings.cosmetic.navi_prop_inner_blue = (Conf[CosmeticsSection]["navi_prop_inner_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_prop_inner_blue"]) : Settings.cosmetic.navi_prop_inner_blue; + CVar_SetS32(const_cast("gNavi_Prop_Inner_Blue"), Settings.cosmetic.navi_prop_inner_blue); + Settings.cosmetic.navi_prop_outer_red = (Conf[CosmeticsSection]["navi_prop_outer_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_prop_outer_red"]) : Settings.cosmetic.navi_prop_outer_red; + CVar_SetS32(const_cast("gNavi_Prop_Outer_Red"), Settings.cosmetic.navi_prop_outer_red); + Settings.cosmetic.navi_prop_outer_green = (Conf[CosmeticsSection]["navi_prop_outer_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_prop_outer_green"]) : Settings.cosmetic.navi_prop_outer_green; + CVar_SetS32(const_cast("gNavi_Prop_Outer_Green"), Settings.cosmetic.navi_prop_outer_green); + Settings.cosmetic.navi_prop_outer_blue = (Conf[CosmeticsSection]["navi_prop_outer_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_prop_outer_blue"]) : Settings.cosmetic.navi_prop_outer_blue; + CVar_SetS32(const_cast("gNavi_Prop_Outer_Blue"), Settings.cosmetic.navi_prop_outer_blue); + + + CVar_SetS32("gInputEnabled", Settings.controller.input_enabled); Settings.controller.dpad_pause_name = stob(Conf[ControllerSection]["dpad_pause_name"]); @@ -195,6 +275,48 @@ namespace Game { Conf[ControllerSection]["dpad_ocarina_text"] = std::to_string(Settings.controller.dpad_ocarina_text); Conf[ControllerSection]["dpad_shop"] = std::to_string(Settings.controller.dpad_shop); + + // Cosmetics + Conf[CosmeticsSection]["tunic_kokiri_red"] = std::to_string(Settings.cosmetic.tunic_kokiri_red); + Conf[CosmeticsSection]["tunic_kokiri_green"] = std::to_string(Settings.cosmetic.tunic_kokiri_green); + Conf[CosmeticsSection]["tunic_kokiri_blue"] = std::to_string(Settings.cosmetic.tunic_kokiri_blue); + + Conf[CosmeticsSection]["tunic_goron_red"] = std::to_string(Settings.cosmetic.tunic_goron_red); + Conf[CosmeticsSection]["tunic_goron_green"] = std::to_string(Settings.cosmetic.tunic_goron_green); + Conf[CosmeticsSection]["tunic_goron_blue"] = std::to_string(Settings.cosmetic.tunic_goron_blue); + + Conf[CosmeticsSection]["tunic_zora_red"] = std::to_string(Settings.cosmetic.tunic_zora_red); + Conf[CosmeticsSection]["tunic_zora_green"] = std::to_string(Settings.cosmetic.tunic_zora_green); + Conf[CosmeticsSection]["tunic_zora_blue"] = std::to_string(Settings.cosmetic.tunic_zora_blue); + + Conf[CosmeticsSection]["navi_idle_inner_red"] = std::to_string(Settings.cosmetic.navi_idle_inner_red); + Conf[CosmeticsSection]["navi_idle_inner_green"] = std::to_string(Settings.cosmetic.navi_idle_inner_green); + Conf[CosmeticsSection]["navi_idle_inner_blue"] = std::to_string(Settings.cosmetic.navi_idle_inner_blue); + Conf[CosmeticsSection]["navi_idle_outer_red"] = std::to_string(Settings.cosmetic.navi_idle_outer_red); + Conf[CosmeticsSection]["navi_idle_outer_green"] = std::to_string(Settings.cosmetic.navi_idle_outer_green); + Conf[CosmeticsSection]["navi_idle_outer_blue"] = std::to_string(Settings.cosmetic.navi_idle_outer_blue); + + Conf[CosmeticsSection]["navi_npc_inner_red"] = std::to_string(Settings.cosmetic.navi_npc_inner_red); + Conf[CosmeticsSection]["navi_npc_inner_green"] = std::to_string(Settings.cosmetic.navi_npc_inner_green); + Conf[CosmeticsSection]["navi_npc_inner_blue"] = std::to_string(Settings.cosmetic.navi_npc_inner_blue); + Conf[CosmeticsSection]["navi_npc_outer_red"] = std::to_string(Settings.cosmetic.navi_npc_outer_red); + Conf[CosmeticsSection]["navi_npc_outer_green"] = std::to_string(Settings.cosmetic.navi_npc_outer_green); + Conf[CosmeticsSection]["navi_npc_outer_blue"] = std::to_string(Settings.cosmetic.navi_npc_outer_blue); + + Conf[CosmeticsSection]["navi_enemy_inner_red"] = std::to_string(Settings.cosmetic.navi_enemy_inner_red); + Conf[CosmeticsSection]["navi_enemy_inner_green"] = std::to_string(Settings.cosmetic.navi_enemy_inner_green); + Conf[CosmeticsSection]["navi_enemy_inner_blue"] = std::to_string(Settings.cosmetic.navi_enemy_inner_blue); + Conf[CosmeticsSection]["navi_enemy_outer_red"] = std::to_string(Settings.cosmetic.navi_enemy_outer_red); + Conf[CosmeticsSection]["navi_enemy_outer_green"] = std::to_string(Settings.cosmetic.navi_enemy_outer_green); + Conf[CosmeticsSection]["navi_enemy_outer_blue"] = std::to_string(Settings.cosmetic.navi_enemy_outer_blue); + + Conf[CosmeticsSection]["navi_prop_inner_red"] = std::to_string(Settings.cosmetic.navi_prop_inner_red); + Conf[CosmeticsSection]["navi_prop_inner_green"] = std::to_string(Settings.cosmetic.navi_prop_inner_green); + Conf[CosmeticsSection]["navi_prop_inner_blue"] = std::to_string(Settings.cosmetic.navi_prop_inner_blue); + Conf[CosmeticsSection]["navi_prop_outer_red"] = std::to_string(Settings.cosmetic.navi_prop_outer_red); + Conf[CosmeticsSection]["navi_prop_outer_green"] = std::to_string(Settings.cosmetic.navi_prop_outer_green); + Conf[CosmeticsSection]["navi_prop_outer_blue"] = std::to_string(Settings.cosmetic.navi_prop_outer_blue); + // Cheats Conf[CheatSection]["debug_mode"] = std::to_string(Settings.cheats.debug_mode); Conf[CheatSection]["infinite_money"] = std::to_string(Settings.cheats.infinite_money); @@ -206,6 +328,7 @@ namespace Game { Conf[CheatSection]["moon_jump_on_l"] = std::to_string(Settings.cheats.moon_jump_on_l); Conf[CheatSection]["super_tunic"] = std::to_string(Settings.cheats.super_tunic); + Conf.Save(); } diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index 990132f4e..c2d2107e0 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -45,6 +45,47 @@ struct SoHConfigType { bool dpad_shop = false; } controller; + struct { + int tunic_kokiri_red = 30; + int tunic_kokiri_green = 105; + int tunic_kokiri_blue = 27; + int tunic_goron_red = 100; + int tunic_goron_green = 20; + int tunic_goron_blue = 0; + int tunic_zora_red = 0; + int tunic_zora_green = 60; + int tunic_zora_blue = 100; + + int navi_idle_inner_red = 255; + int navi_idle_inner_green = 255; + int navi_idle_inner_blue = 255; + int navi_idle_outer_red = 0; + int navi_idle_outer_green = 0; + int navi_idle_outer_blue = 255; + + int navi_enemy_inner_red = 255; + int navi_enemy_inner_green = 255; + int navi_enemy_inner_blue = 0; + int navi_enemy_outer_red = 200; + int navi_enemy_outer_green = 155; + int navi_enemy_outer_blue = 0; + + int navi_npc_inner_red = 150; + int navi_npc_inner_green = 150; + int navi_npc_inner_blue = 255; + int navi_npc_outer_red = 150; + int navi_npc_outer_green = 150; + int navi_npc_outer_blue = 255; + + int navi_prop_inner_red = 0; + int navi_prop_inner_green = 250; + int navi_prop_inner_blue = 0; + int navi_prop_outer_red = 0; + int navi_prop_outer_green = 250; + int navi_prop_outer_blue = 0; + + } cosmetic; + // Cheats struct { bool debug_mode = false; @@ -80,6 +121,7 @@ enum SeqPlayers { #define AUDIO_SECTION "AUDIO SETTINGS" #define CONTROLLER_SECTION "CONTROLLER SECTION" #define ENHANCEMENTS_SECTION "ENHANCEMENT SETTINGS" +#define COSMETICS_SECTION "COSMETIC SETTINGS" #define CHEATS_SECTION "CHEATS SETTINGS" namespace Game { diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 7af532a09..a2a648bc8 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -53,6 +53,21 @@ namespace SohImGui { Console* console = new Console; bool p_open = false; bool needs_save = false; + float kokiri_col[3] = { 0.118f, 0.41f, 0.106f }; + float goron_col[3] = { 0.392f, 0.078f, 0.0f }; + float zora_col[3] = { 0.0f, 0.235f, 0.392f }; + + float navi_idle_i_col[3] = { 0.0f, 0.0f, 0.0f }; + float navi_idle_o_col[3] = { 0.0f, 0.0f, 0.0f }; + + float navi_npc_i_col[3] = { 0.0f, 0.0f, 0.0f }; + float navi_npc_o_col[3] = { 0.0f, 0.0f, 0.0f }; + + float navi_enemy_i_col[3] = { 0.0f, 0.0f, 0.0f }; + float navi_enemy_o_col[3] = { 0.0f, 0.0f, 0.0f }; + + float navi_prop_i_col[3] = { 0.0f, 0.0f, 0.0f }; + float navi_prop_o_col[3] = { 0.0f, 0.0f, 0.0f }; std::map> windowCategories; std::map customWindows; @@ -66,6 +81,49 @@ namespace SohImGui { ImGui_ImplWin32_Init(impl.dx11.window); break; } + kokiri_col[0] = std::clamp((float) CVar_GetS32((char*)"gTunic_Kokiri_Red", 30)/255, 0.0f, 1.0f); + kokiri_col[1] = std::clamp((float)CVar_GetS32((char*)"gTunic_Kokiri_Green", 105) / 255, 0.0f, 1.0f); + kokiri_col[2] = std::clamp((float)CVar_GetS32((char*)"gTunic_Kokiri_Blue", 27) / 255, 0.0f, 1.0f); + + goron_col[0] = std::clamp((float)CVar_GetS32((char*)"gTunic_Goron_Red", 100) / 255, 0.0f, 1.0f); + goron_col[1] = std::clamp((float)CVar_GetS32((char*)"gTunic_Goron_Green", 20) / 255, 0.0f, 1.0f); + goron_col[2] = std::clamp((float)CVar_GetS32((char*)"gTunic_Goron_Blue", 0) / 255, 0.0f, 1.0f); + + zora_col[0] = std::clamp((float)CVar_GetS32((char*)"gTunic_Zora_Red", 0) / 255, 0.0f, 1.0f); + zora_col[1] = std::clamp((float)CVar_GetS32((char*)"gTunic_Zora_Green", 60) / 255, 0.0f, 1.0f); + zora_col[2] = std::clamp((float)CVar_GetS32((char*)"gTunic_Zora_Blue", 100) / 255, 0.0f, 1.0f); + + navi_idle_i_col[0] = std::clamp((float)CVar_GetS32((char*)"gNavi_Idle_Inner_Red", 0) / 255, 0.0f, 1.0f); + navi_idle_i_col[1] = std::clamp((float)CVar_GetS32((char*)"gNavi_Idle_Inner_Green", 0) / 255, 0.0f, 1.0f); + navi_idle_i_col[2] = std::clamp((float)CVar_GetS32((char*)"gNavi_Idle_Inner_Blue", 0) / 255, 0.0f, 1.0f); + + navi_idle_o_col[0] = std::clamp((float)CVar_GetS32((char*)"gNavi_Idle_Outer_Red", 0) / 255, 0.0f, 1.0f); + navi_idle_o_col[1] = std::clamp((float)CVar_GetS32((char*)"gNavi_Idle_Outer_Green", 0) / 255, 0.0f, 1.0f); + navi_idle_o_col[2] = std::clamp((float)CVar_GetS32((char*)"gNavi_Idle_Outer_Blue", 0) / 255, 0.0f, 1.0f); + + navi_npc_i_col[0] = std::clamp((float)CVar_GetS32((char*)"gNavi_NPC_Inner_Red", 0) / 255, 0.0f, 1.0f); + navi_npc_i_col[1] = std::clamp((float)CVar_GetS32((char*)"gNavi_NPC_Inner_Green", 0) / 255, 0.0f, 1.0f); + navi_npc_i_col[2] = std::clamp((float)CVar_GetS32((char*)"gNavi_NPC_Inner_Blue", 0) / 255, 0.0f, 1.0f); + + navi_npc_o_col[0] = std::clamp((float)CVar_GetS32((char*)"gNavi_NPC_Outer_Red", 0) / 255, 0.0f, 1.0f); + navi_npc_o_col[1] = std::clamp((float)CVar_GetS32((char*)"gNavi_NPC_Outer_Green", 0) / 255, 0.0f, 1.0f); + navi_npc_o_col[2] = std::clamp((float)CVar_GetS32((char*)"gNavi_NPC_Outer_Blue", 0) / 255, 0.0f, 1.0f); + + navi_enemy_i_col[0] = std::clamp((float)CVar_GetS32((char*)"gNavi_Enemy_Inner_Red", 0) / 255, 0.0f, 1.0f); + navi_enemy_i_col[1] = std::clamp((float)CVar_GetS32((char*)"gNavi_Enemy_Inner_Green", 0) / 255, 0.0f, 1.0f); + navi_enemy_i_col[2] = std::clamp((float)CVar_GetS32((char*)"gNavi_Enemy_Inner_Blue", 0) / 255, 0.0f, 1.0f); + + navi_enemy_o_col[0] = std::clamp((float)CVar_GetS32((char*)"gNavi_Enemy_Outer_Red", 0) / 255, 0.0f, 1.0f); + navi_enemy_o_col[1] = std::clamp((float)CVar_GetS32((char*)"gNavi_Enemy_Outer_Green", 0) / 255, 0.0f, 1.0f); + navi_enemy_o_col[2] = std::clamp((float)CVar_GetS32((char*)"gNavi_Enemy_Outer_Blue", 0) / 255, 0.0f, 1.0f); + + navi_prop_i_col[0] = std::clamp((float)CVar_GetS32((char*)"gNavi_Prop_Inner_Red", 0) / 255, 0.0f, 1.0f); + navi_prop_i_col[1] = std::clamp((float)CVar_GetS32((char*)"gNavi_Prop_Inner_Green", 0) / 255, 0.0f, 1.0f); + navi_prop_i_col[2] = std::clamp((float)CVar_GetS32((char*)"gNavi_Prop_Inner_Blue", 0) / 255, 0.0f, 1.0f); + + navi_prop_o_col[0] = std::clamp((float)CVar_GetS32((char*)"gNavi_Prop_Outer_Red", 0) / 255, 0.0f, 1.0f); + navi_prop_o_col[1] = std::clamp((float)CVar_GetS32((char*)"gNavi_Prop_Outer_Green", 0) / 255, 0.0f, 1.0f); + navi_prop_o_col[2] = std::clamp((float)CVar_GetS32((char*)"gNavi_Prop_Outer_Blue", 0) / 255, 0.0f, 1.0f); } void ImGuiBackendInit() { @@ -520,6 +578,126 @@ namespace SohImGui { needs_save = true; } + + if (ImGui::BeginMenu("Cosmetics")) { + ImGui::Text("Tunics"); + ImGui::Separator(); + if (ImGui::ColorEdit3("Kokiri Tunic", kokiri_col)) { + Game::Settings.cosmetic.tunic_kokiri_red = (int) (kokiri_col[0] * 255); + Game::Settings.cosmetic.tunic_kokiri_green = (int) (kokiri_col[1] * 255); + Game::Settings.cosmetic.tunic_kokiri_blue = (int) (kokiri_col[2] * 255); + CVar_SetS32(const_cast("gTunic_Kokiri_Red"), Game::Settings.cosmetic.tunic_kokiri_red); + CVar_SetS32(const_cast("gTunic_Kokiri_Green"), Game::Settings.cosmetic.tunic_kokiri_green); + CVar_SetS32(const_cast("gTunic_Kokiri_Blue"), Game::Settings.cosmetic.tunic_kokiri_blue); + needs_save = true; + } + if (ImGui::ColorEdit3("Goron Tunic", goron_col)) { + Game::Settings.cosmetic.tunic_goron_red = (int)(goron_col[0] * 255); + Game::Settings.cosmetic.tunic_goron_green = (int)(goron_col[1] * 255); + Game::Settings.cosmetic.tunic_goron_blue = (int)(goron_col[2] * 255); + CVar_SetS32(const_cast("gTunic_Goron_Red"), Game::Settings.cosmetic.tunic_goron_red); + CVar_SetS32(const_cast("gTunic_Goron_Green"), Game::Settings.cosmetic.tunic_goron_green); + CVar_SetS32(const_cast("gTunic_Goron_Blue"), Game::Settings.cosmetic.tunic_goron_blue); + needs_save = true; + } + if (ImGui::ColorEdit3("Zora Tunic", zora_col)) { + Game::Settings.cosmetic.tunic_zora_red = (int)(zora_col[0] * 255); + Game::Settings.cosmetic.tunic_zora_green = (int)(zora_col[1] * 255); + Game::Settings.cosmetic.tunic_zora_blue = (int)(zora_col[2] * 255); + CVar_SetS32(const_cast("gTunic_Zora_Red"), Game::Settings.cosmetic.tunic_zora_red); + CVar_SetS32(const_cast("gTunic_Zora_Green"), Game::Settings.cosmetic.tunic_zora_green); + CVar_SetS32(const_cast("gTunic_Zora_Blue"), Game::Settings.cosmetic.tunic_zora_blue); + needs_save = true; + } + ImGui::Text("Navi"); + ImGui::Separator(); + if (ImGui::ColorEdit3("Navi Idle Inner", navi_idle_i_col)) { + Game::Settings.cosmetic.navi_idle_inner_red = (int)(navi_idle_i_col[0] * 255); + Game::Settings.cosmetic.navi_idle_inner_green = (int)(navi_idle_i_col[1] * 255); + Game::Settings.cosmetic.navi_idle_inner_blue = (int)(navi_idle_i_col[2] * 255); + CVar_SetS32(const_cast("gNavi_Idle_Inner_Red"), Game::Settings.cosmetic.navi_idle_inner_red); + CVar_SetS32(const_cast("gNavi_Idle_Inner_Green"), Game::Settings.cosmetic.navi_idle_inner_green); + CVar_SetS32(const_cast("gNavi_Idle_Inner_Blue"), Game::Settings.cosmetic.navi_idle_inner_blue); + needs_save = true; + } + + if (ImGui::ColorEdit3("Navi Idle Outer", navi_idle_o_col)) { + Game::Settings.cosmetic.navi_idle_outer_red = (int)(navi_idle_o_col[0] * 255); + Game::Settings.cosmetic.navi_idle_outer_green = (int)(navi_idle_o_col[1] * 255); + Game::Settings.cosmetic.navi_idle_outer_blue = (int)(navi_idle_o_col[2] * 255); + CVar_SetS32(const_cast("gNavi_Idle_Outer_Red"), Game::Settings.cosmetic.navi_idle_outer_red); + CVar_SetS32(const_cast("gNavi_Idle_Outer_Green"), Game::Settings.cosmetic.navi_idle_outer_green); + CVar_SetS32(const_cast("gNavi_Idle_Outer_Blue"), Game::Settings.cosmetic.navi_idle_outer_blue); + needs_save = true; + } + + if (ImGui::ColorEdit3("Navi NPC Inner", navi_npc_i_col)) { + Game::Settings.cosmetic.navi_npc_inner_red = (int)(navi_npc_i_col[0] * 255); + Game::Settings.cosmetic.navi_npc_inner_green = (int)(navi_npc_i_col[1] * 255); + Game::Settings.cosmetic.navi_npc_inner_blue = (int)(navi_npc_i_col[2] * 255); + CVar_SetS32(const_cast("gNavi_NPC_Inner_Red"), Game::Settings.cosmetic.navi_npc_inner_red); + CVar_SetS32(const_cast("gNavi_NPC_Inner_Green"), Game::Settings.cosmetic.navi_npc_inner_green); + CVar_SetS32(const_cast("gNavi_NPC_Inner_Blue"), Game::Settings.cosmetic.navi_npc_inner_blue); + needs_save = true; + } + + if (ImGui::ColorEdit3("Navi NPC Outer", navi_npc_o_col)) { + Game::Settings.cosmetic.navi_npc_outer_red = (int)(navi_npc_o_col[0] * 255); + Game::Settings.cosmetic.navi_npc_outer_green = (int)(navi_npc_o_col[1] * 255); + Game::Settings.cosmetic.navi_npc_outer_blue = (int)(navi_npc_o_col[2] * 255); + CVar_SetS32(const_cast("gNavi_NPC_Outer_Red"), Game::Settings.cosmetic.navi_npc_outer_red); + CVar_SetS32(const_cast("gNavi_NPC_Outer_Green"), Game::Settings.cosmetic.navi_npc_outer_green); + CVar_SetS32(const_cast("gNavi_NPC_Outer_Blue"), Game::Settings.cosmetic.navi_npc_outer_blue); + needs_save = true; + } + + if (ImGui::ColorEdit3("Navi Enemy Inner", navi_enemy_i_col)) { + Game::Settings.cosmetic.navi_enemy_inner_red = (int)(navi_enemy_i_col[0] * 255); + Game::Settings.cosmetic.navi_enemy_inner_green = (int)(navi_enemy_i_col[1] * 255); + Game::Settings.cosmetic.navi_enemy_inner_blue = (int)(navi_enemy_i_col[2] * 255); + CVar_SetS32(const_cast("gNavi_Enemy_Inner_Red"), Game::Settings.cosmetic.navi_enemy_inner_red); + CVar_SetS32(const_cast("gNavi_Enemy_Inner_Green"), Game::Settings.cosmetic.navi_enemy_inner_green); + CVar_SetS32(const_cast("gNavi_Enemy_Inner_Blue"), Game::Settings.cosmetic.navi_enemy_inner_blue); + needs_save = true; + } + + if (ImGui::ColorEdit3("Navi Enemy Outer", navi_enemy_o_col)) { + Game::Settings.cosmetic.navi_enemy_outer_red = (int)(navi_enemy_o_col[0] * 255); + Game::Settings.cosmetic.navi_enemy_outer_green = (int)(navi_enemy_o_col[1] * 255); + Game::Settings.cosmetic.navi_enemy_outer_blue = (int)(navi_enemy_o_col[2] * 255); + CVar_SetS32(const_cast("gNavi_Enemy_Outer_Red"), Game::Settings.cosmetic.navi_enemy_outer_red); + CVar_SetS32(const_cast("gNavi_Enemy_Outer_Green"), Game::Settings.cosmetic.navi_enemy_outer_green); + CVar_SetS32(const_cast("gNavi_Enemy_Outer_Blue"), Game::Settings.cosmetic.navi_enemy_outer_blue); + needs_save = true; + } + + if (ImGui::ColorEdit3("Navi Prop Inner", navi_prop_i_col)) { + Game::Settings.cosmetic.navi_prop_inner_red = (int)(navi_prop_i_col[0] * 255); + Game::Settings.cosmetic.navi_prop_inner_green = (int)(navi_prop_i_col[1] * 255); + Game::Settings.cosmetic.navi_prop_inner_blue = (int)(navi_prop_i_col[2] * 255); + CVar_SetS32(const_cast("gNavi_Prop_Inner_Red"), Game::Settings.cosmetic.navi_prop_inner_red); + CVar_SetS32(const_cast("gNavi_Prop_Inner_Green"), Game::Settings.cosmetic.navi_prop_inner_green); + CVar_SetS32(const_cast("gNavi_Prop_Inner_Blue"), Game::Settings.cosmetic.navi_prop_inner_blue); + needs_save = true; + } + + if (ImGui::ColorEdit3("Navi Prop Outer", navi_prop_o_col)) { + Game::Settings.cosmetic.navi_prop_outer_red = (int)(navi_prop_o_col[0] * 255); + Game::Settings.cosmetic.navi_prop_outer_green = (int)(navi_prop_o_col[1] * 255); + Game::Settings.cosmetic.navi_prop_outer_blue = (int)(navi_prop_o_col[2] * 255); + CVar_SetS32(const_cast("gNavi_Prop_Outer_Red"), Game::Settings.cosmetic.navi_prop_outer_red); + CVar_SetS32(const_cast("gNavi_Prop_Outer_Green"), Game::Settings.cosmetic.navi_prop_outer_green); + CVar_SetS32(const_cast("gNavi_Prop_Outer_Blue"), Game::Settings.cosmetic.navi_prop_outer_blue); + needs_save = true; + } + + ImGui::EndMenu(); + } + + + if (ImGui::BeginMenu("Developer Tools")) { + HOOK(ImGui::MenuItem("Stats", nullptr, &Game::Settings.debug.soh)); + HOOK(ImGui::MenuItem("Console", nullptr, &console->opened)); if (ImGui::Checkbox("Easy ISG", &Game::Settings.cheats.ez_isg)) { CVar_SetS32("gEzISG", Game::Settings.cheats.ez_isg); needs_save = true; diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index eee9d8882..640429515 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -334,6 +334,38 @@ void func_8002BE98(TargetContext* targetCtx, s32 actorCategory, GlobalContext* g void func_8002BF60(TargetContext* targetCtx, Actor* actor, s32 actorCategory, GlobalContext* globalCtx) { NaviColor* naviColor = &sNaviColorList[actorCategory]; + if (actorCategory == ACTORCAT_PLAYER) { + naviColor->inner.r = CVar_GetS32("gNavi_Idle_Inner_Red", naviColor->inner.r); + naviColor->inner.g = CVar_GetS32("gNavi_Idle_Inner_Green", naviColor->inner.g); + naviColor->inner.b = CVar_GetS32("gNavi_Idle_Inner_Blue", naviColor->inner.b); + naviColor->outer.r = CVar_GetS32("gNavi_Idle_Outer_Red", naviColor->outer.r); + naviColor->outer.g = CVar_GetS32("gNavi_Idle_Outer_Green", naviColor->outer.g); + naviColor->outer.b = CVar_GetS32("gNavi_Idle_Outer_Blue", naviColor->outer.b); + } + if (actorCategory == ACTORCAT_NPC) { + naviColor->inner.r = CVar_GetS32("gNavi_NPC_Inner_Red", naviColor->inner.r); + naviColor->inner.g = CVar_GetS32("gNavi_NPC_Inner_Green", naviColor->inner.g); + naviColor->inner.b = CVar_GetS32("gNavi_NPC_Inner_Blue", naviColor->inner.b); + naviColor->outer.r = CVar_GetS32("gNavi_NPC_Outer_Red", naviColor->outer.r); + naviColor->outer.g = CVar_GetS32("gNavi_NPC_Outer_Green", naviColor->outer.g); + naviColor->outer.b = CVar_GetS32("gNavi_NPC_Outer_Blue", naviColor->outer.b); + } + if (actorCategory == ACTORCAT_BOSS || actorCategory == ACTORCAT_ENEMY) { + naviColor->inner.r = CVar_GetS32("gNavi_Enemy_Inner_Red", naviColor->inner.r); + naviColor->inner.g = CVar_GetS32("gNavi_Enemy_Inner_Green", naviColor->inner.g); + naviColor->inner.b = CVar_GetS32("gNavi_Enemy_Inner_Blue", naviColor->inner.b); + naviColor->outer.r = CVar_GetS32("gNavi_Enemy_Outer_Red", naviColor->outer.r); + naviColor->outer.g = CVar_GetS32("gNavi_Enemy_Outer_Green", naviColor->outer.g); + naviColor->outer.b = CVar_GetS32("gNavi_Enemy_Outer_Blue", naviColor->outer.b); + } + if (actorCategory == ACTORCAT_PROP) { + naviColor->inner.r = CVar_GetS32("gNavi_Prop_Inner_Red", naviColor->inner.r); + naviColor->inner.g = CVar_GetS32("gNavi_Prop_Inner_Green", naviColor->inner.g); + naviColor->inner.b = CVar_GetS32("gNavi_Prop_Inner_Blue", naviColor->inner.b); + naviColor->outer.r = CVar_GetS32("gNavi_Prop_Outer_Red", naviColor->outer.r); + naviColor->outer.g = CVar_GetS32("gNavi_Prop_Outer_Green", naviColor->outer.g); + naviColor->outer.b = CVar_GetS32("gNavi_Prop_Outer_Blue", naviColor->outer.b); + } targetCtx->naviRefPos.x = actor->focus.pos.x; targetCtx->naviRefPos.y = actor->focus.pos.y + (actor->targetArrowOffset * actor->scale.y); targetCtx->naviRefPos.z = actor->focus.pos.z; diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c index 87a7009ec..4adbb75ce 100644 --- a/soh/src/code/z_player_lib.c +++ b/soh/src/code/z_player_lib.c @@ -743,8 +743,27 @@ void func_8008F470(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, #else gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthTextures[eyeIndex])); #endif - - color = &sTunicColors[tunic]; + if (tunic == PLAYER_TUNIC_KOKIRI) { + Color_RGB8 sTemp = { CVar_GetS32("gTunic_Kokiri_Red", &sTunicColors[PLAYER_TUNIC_KOKIRI].r), + CVar_GetS32("gTunic_Kokiri_Green", &sTunicColors[PLAYER_TUNIC_KOKIRI].g), + CVar_GetS32("gTunic_Kokiri_Blue", &sTunicColors[PLAYER_TUNIC_KOKIRI].b) }; + color = &sTemp; + } else if (tunic == PLAYER_TUNIC_GORON) { + Color_RGB8 sTemp = { CVar_GetS32("gTunic_Goron_Red", &sTunicColors[PLAYER_TUNIC_GORON].r), + CVar_GetS32("gTunic_Goron_Green", &sTunicColors[PLAYER_TUNIC_GORON].g), + CVar_GetS32("gTunic_Goron_Blue", &sTunicColors[PLAYER_TUNIC_GORON].b) }; + color = &sTemp; + } else if (tunic == PLAYER_TUNIC_ZORA) { + Color_RGB8 sTemp = { CVar_GetS32("gTunic_Zora_Red", &sTunicColors[PLAYER_TUNIC_ZORA].r), + CVar_GetS32("gTunic_Zora_Green", &sTunicColors[PLAYER_TUNIC_ZORA].g), + CVar_GetS32("gTunic_Zora_Blue", &sTunicColors[PLAYER_TUNIC_ZORA].b) }; + color = &sTemp; + } else { + Color_RGB8 sTemp = { CVar_GetS32("gTunic_Kokiri_Red", &sTunicColors[PLAYER_TUNIC_KOKIRI].r), + CVar_GetS32("gTunic_Kokiri_Green", &sTunicColors[PLAYER_TUNIC_KOKIRI].g), + CVar_GetS32("gTunic_Kokiri_Blue", &sTunicColors[PLAYER_TUNIC_KOKIRI].b) }; + color = &sTemp; + } gDPSetEnvColor(POLY_OPA_DISP++, color->r, color->g, color->b, 0); sDListsLodOffset = lod * 2; From 0e6ca5361e03c4945a7a8a1a3f858dc764cb0a97 Mon Sep 17 00:00:00 2001 From: Baoulettes Date: Wed, 27 Apr 2022 00:36:28 +0200 Subject: [PATCH 076/146] Fix L/R buttons color in Kaleido menu (#172) * Fix L/R buttons color in Kaleido menu. I know this is a bug even official game but that definitely a logic bug. That could be considered are a mods. This make both button L and R have the same color on Hover and normal. * Update z_kaleido_scope_PAL.c * Condition to be on Added condition to be on only if toggled on * Cvar registers * bool addition * Added the item in menu * Added bool in bootcommands By default it is on. * Hide and make it forced on by default * Hide menu entry for that fix --- libultraship/libultraship/GameSettings.cpp | 5 +++++ libultraship/libultraship/GameSettings.h | 2 +- libultraship/libultraship/SohImGuiImpl.cpp | 5 +++++ soh/soh/Enhancements/bootcommands.c | 2 +- .../misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c | 16 +++++++++++++--- 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index 5e02037de..029e2a1a2 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -74,6 +74,10 @@ namespace Game { Settings.enhancements.mm_bunny_hood = stob(Conf[EnhancementSection]["mm_bunny_hood"]); CVar_SetS32("gMMBunnyHood", Settings.enhancements.mm_bunny_hood); + + Settings.enhancements.uniform_lr = stob(Conf[EnhancementSection]["uniform_lr"]); + //CVar_SetS32("gUniformLR", Settings.enhancements.uniform_lr); + CVar_SetS32("gUniformLR", 1); Settings.enhancements.newdrops = stob(Conf[EnhancementSection]["newdrops"]); CVar_SetS32("gNewDrops", Settings.enhancements.newdrops); @@ -264,6 +268,7 @@ namespace Game { Conf[EnhancementSection]["newdrops"] = std::to_string(Settings.enhancements.newdrops); Conf[EnhancementSection]["visualagony"] = std::to_string(Settings.enhancements.visualagony); Conf[EnhancementSection]["mm_bunny_hood"] = std::to_string(Settings.enhancements.mm_bunny_hood); + Conf[EnhancementSection]["uniform_lr"] = std::to_string(Settings.enhancements.uniform_lr); // Controllers diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index c2d2107e0..4f4eecb97 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -29,7 +29,7 @@ struct SoHConfigType { bool newdrops = false; bool visualagony = false; bool mm_bunny_hood = false; - + bool uniform_lr = true; } enhancements; // Controller diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index a2a648bc8..478f51590 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -473,6 +473,11 @@ namespace SohImGui { CVar_SetS32("gMMBunnyHood", Game::Settings.enhancements.mm_bunny_hood); needs_save = true; } + + /*if (ImGui::Checkbox("Fix L&R Pause menu", &Game::Settings.enhancements.uniform_lr)) { + CVar_SetS32("gUniformLR", Game::Settings.enhancements.uniform_lr); + needs_save = true; + }*/ if (ImGui::Checkbox("Visual Stone of Agony", &Game::Settings.enhancements.visualagony)) { CVar_SetS32("gVisualAgony", Game::Settings.enhancements.visualagony); diff --git a/soh/soh/Enhancements/bootcommands.c b/soh/soh/Enhancements/bootcommands.c index f3ad9aaac..60143e295 100644 --- a/soh/soh/Enhancements/bootcommands.c +++ b/soh/soh/Enhancements/bootcommands.c @@ -25,9 +25,9 @@ void BootCommands_Init() CVar_RegisterS32("gDebugEnabled", 0); CVar_RegisterS32("gPauseLiveLink", 0); CVar_RegisterS32("gMinimalUI", 0); + CVar_RegisterS32("gUniformLR", 1); CVar_RegisterS32("gNewDrops", 0); CVar_RegisterS32("gVisualAgony", 0); - } //void BootCommands_ParseBootArgs(char* str) diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c index 60d3595aa..ac1864412 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c @@ -1614,14 +1614,24 @@ void KaleidoScope_DrawInfoPanel(GlobalContext* globalCtx) { if ((pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) && (pauseCtx->unk_1E4 == 0)) { gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, D_808321A0, D_808321A2, D_808321A4, D_808321A6); + } else { + if (CVar_GetS32("gUniformLR", 0) != 0) { + gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 180, 210, 255, 255); + } } - + gSPDisplayList(POLY_KAL_DISP++, gLButtonIconDL); - - gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 180, 210, 255, 220); + + if (CVar_GetS32("gUniformLR", 0) == 0) { //Restore the misplace gDPSetPrimColor + gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 180, 210, 255, 255); + } if ((pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_RIGHT) && (pauseCtx->unk_1E4 == 0)) { gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, D_808321A0, D_808321A2, D_808321A4, D_808321A6); + } else { + if (CVar_GetS32("gUniformLR", 0) != 0) { + gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 180, 210, 255, 255); + } } gSPDisplayList(POLY_KAL_DISP++, gRButtonIconDL); From 9c2c443a6abb9a4b0baf0d5059111af7d2cac411 Mon Sep 17 00:00:00 2001 From: Baoulettes Date: Wed, 27 Apr 2022 00:41:24 +0200 Subject: [PATCH 077/146] Fix Title card name for FRA and GER (#204) --- soh/src/code/z_actor.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index 640429515..0c46a8fc5 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -1009,7 +1009,6 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) { s32 doubleWidth; s32 titleY; s32 titleSecondY; - s32 textureLanguageOffset; if (titleCtx->alpha != 0) { width = titleCtx->width; @@ -1020,7 +1019,6 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 2824); - textureLanguageOffset = width * height * gSaveContext.language; height = (width * height > 0x1000) ? 0x1000 / width : height; titleSecondY = titleY + (height * 4); @@ -1030,7 +1028,8 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) { gDPSetPrimColor(TITLE_CARD_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->alpha); - gDPLoadTextureBlock(TITLE_CARD_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset, G_IM_FMT_IA, + gDPLoadTextureBlock(TITLE_CARD_DISP++, (uintptr_t)titleCtx->texture, G_IM_FMT_IA, + G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -1042,7 +1041,7 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) { // If texture is bigger than 0x1000, display the rest if (height > 0) { - gDPLoadTextureBlock(TITLE_CARD_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset + 0x1000, + gDPLoadTextureBlock(TITLE_CARD_DISP++, (uintptr_t)titleCtx->texture + 0x1000, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); From 1f663dda7bec991eaa4ede0635b147b7869a5f5d Mon Sep 17 00:00:00 2001 From: Ada <60364512+GreatArgorath@users.noreply.github.com> Date: Tue, 26 Apr 2022 20:58:21 +0100 Subject: [PATCH 078/146] Adds exception for text speed in the case of ocarina playing --- soh/src/code/z_message_PAL.c | 1 + 1 file changed, 1 insertion(+) diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c index 8b9410018..6a29a6564 100644 --- a/soh/src/code/z_message_PAL.c +++ b/soh/src/code/z_message_PAL.c @@ -1096,6 +1096,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) { *gfxP = gfx; return; case MESSAGE_OCARINA: + msgCtx->textDrawPos = i + 1; if (i + 1 == msgCtx->textDrawPos) { Message_HandleOcarina(globalCtx); *gfxP = gfx; From 486f673df53fa63a96d6173991189084027ebd72 Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Tue, 26 Apr 2022 18:04:47 -0500 Subject: [PATCH 079/146] Fixed develop --- libultraship/libultraship/SohImGuiImpl.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 478f51590..96211fe20 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -559,8 +559,7 @@ namespace SohImGui { CVar_SetS32("gInfiniteNayru", Game::Settings.cheats.infinite_nayru); needs_save = true; } - - ImGui::EndMenu(); + ImGui::EndMenu(); } if (ImGui::Checkbox("No Clip", &Game::Settings.cheats.no_clip)) { @@ -582,7 +581,7 @@ namespace SohImGui { CVar_SetS32("gSuperTunic", Game::Settings.cheats.super_tunic); needs_save = true; } - + } if (ImGui::BeginMenu("Cosmetics")) { ImGui::Text("Tunics"); From eea5135d629fc4589c4a51680d42841ff189e542 Mon Sep 17 00:00:00 2001 From: Sirius902 <10891979+Sirius902@users.noreply.github.com> Date: Tue, 26 Apr 2022 16:50:24 -0700 Subject: [PATCH 080/146] Rumble cvar and fixes (#184) * Rumble indefinitely until turned off * Add rumble cvar * Register CVar * Check if controller can rumble to insert rumble pak * Reduce verbosity of checks * Remove extraneous const_cast * Once again remove extraneous const_cast * Add per-controller settings * Add nice spacing * Only display controller entry if pad connected * Const some stuff --- libultraship/libultraship/Controller.h | 6 + libultraship/libultraship/GameSettings.cpp | 112 +++++++---- libultraship/libultraship/GameSettings.h | 12 +- .../libultraship/KeyboardController.cpp | 2 +- .../libultraship/KeyboardController.h | 5 + libultraship/libultraship/SDLController.cpp | 65 +++++-- libultraship/libultraship/SDLController.h | 6 + libultraship/libultraship/SohImGuiImpl.cpp | 182 ++++++++++-------- soh/soh/Enhancements/bootcommands.c | 1 + soh/soh/Enhancements/debugconsole.cpp | 10 +- soh/soh/OTRGlobals.cpp | 11 ++ soh/soh/OTRGlobals.h | 1 + soh/soh/stubs.c | 4 +- soh/src/code/padmgr.c | 7 +- 14 files changed, 274 insertions(+), 150 deletions(-) diff --git a/libultraship/libultraship/Controller.h b/libultraship/libultraship/Controller.h index c78142af4..256b31fee 100644 --- a/libultraship/libultraship/Controller.h +++ b/libultraship/libultraship/Controller.h @@ -3,6 +3,7 @@ #include #include #include +#include #include "stdint.h" #include "UltraController.h" #include "ControllerAttachment.h" @@ -19,12 +20,17 @@ namespace Ship { void Read(OSContPad* pad); virtual void ReadFromSource() = 0; virtual void WriteToSource(ControllerCallback* controller) = 0; + virtual bool Connected() const = 0; + virtual bool CanRumble() const = 0; bool isRumbling; void SetButtonMapping(const std::string& szButtonName, int32_t dwScancode); std::shared_ptr GetAttachment() { return Attachment; } int32_t GetControllerNumber() { return dwControllerNumber; } + virtual bool HasPadConf() const = 0; + virtual std::optional GetPadConfSection() = 0; + protected: int32_t dwPressedButtons; std::map ButtonMapping; diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index 029e2a1a2..244e1a394 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -15,6 +15,8 @@ #include #include "SohHooks.h" +#include "Window.h" + #define ABS(var) var < 0 ? -(var) : var using namespace Ship; @@ -64,7 +66,7 @@ namespace Game { CVar_SetS32("gPauseLiveLink", Settings.enhancements.animated_pause_menu); Settings.enhancements.dynamic_wallet_icon = stob(Conf[EnhancementSection]["dynamic_wallet_icon"]); - CVar_SetS32(const_cast("gDynamicWalletIcon"), Settings.enhancements.dynamic_wallet_icon); + CVar_SetS32("gDynamicWalletIcon", Settings.enhancements.dynamic_wallet_icon); Settings.enhancements.minimal_ui = stob(Conf[EnhancementSection]["minimal_ui"]); CVar_SetS32("gMinimalUI", Settings.enhancements.minimal_ui); @@ -99,91 +101,88 @@ namespace Game { CVar_SetFloat("gFanfareVolume", Settings.audio.fanfare); // Controllers - Settings.controller.gyro_sensitivity = Ship::stof(Conf[ControllerSection]["gyro_sensitivity"]); - CVar_SetFloat("gGyroSensitivity", Settings.controller.gyro_sensitivity); - - Settings.controller.rumble_strength = Ship::stof(Conf[ControllerSection]["rumble_strength"]); - CVar_SetFloat("gRumbleStrength", Settings.controller.rumble_strength); + Settings.controller.rumble_enabled = Ship::stof(Conf[ControllerSection]["rumble_enabled"]); + CVar_SetS32("gRumbleEnabled", Settings.controller.rumble_enabled); Settings.controller.input_scale = Ship::stof(Conf[ControllerSection]["input_scale"]); CVar_SetFloat("gInputScale", Settings.controller.input_scale); Settings.controller.input_enabled = stob(Conf[ControllerSection]["input_enabled"]); - CVar_SetS32(const_cast("gInputEnabled"), Settings.controller.input_enabled); + CVar_SetS32("gInputEnabled", Settings.controller.input_enabled); //Tunics Settings.cosmetic.tunic_kokiri_red = (Conf[CosmeticsSection]["tunic_kokiri_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_kokiri_red"]) : Settings.cosmetic.tunic_kokiri_red; - CVar_SetS32(const_cast("gTunic_Kokiri_Red"), Settings.cosmetic.tunic_kokiri_red); + CVar_SetS32("gTunic_Kokiri_Red", Settings.cosmetic.tunic_kokiri_red); Settings.cosmetic.tunic_kokiri_green = (Conf[CosmeticsSection]["tunic_kokiri_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_kokiri_green"]) : Settings.cosmetic.tunic_kokiri_green; - CVar_SetS32(const_cast("gTunic_Kokiri_Green"), Settings.cosmetic.tunic_kokiri_green); + CVar_SetS32("gTunic_Kokiri_Green", Settings.cosmetic.tunic_kokiri_green); Settings.cosmetic.tunic_kokiri_blue = (Conf[CosmeticsSection]["tunic_kokiri_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_kokiri_blue"]) : Settings.cosmetic.tunic_kokiri_blue; - CVar_SetS32(const_cast("gTunic_Kokiri_Blue"), Settings.cosmetic.tunic_kokiri_blue); + CVar_SetS32("gTunic_Kokiri_Blue", Settings.cosmetic.tunic_kokiri_blue); Settings.cosmetic.tunic_goron_red = (Conf[CosmeticsSection]["tunic_goron_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_goron_red"]) : Settings.cosmetic.tunic_goron_red; - CVar_SetS32(const_cast("gTunic_Goron_Red"), Settings.cosmetic.tunic_goron_red); + CVar_SetS32("gTunic_Goron_Red", Settings.cosmetic.tunic_goron_red); Settings.cosmetic.tunic_goron_green = (Conf[CosmeticsSection]["tunic_goron_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_goron_green"]) : Settings.cosmetic.tunic_goron_green; - CVar_SetS32(const_cast("gTunic_Goron_Green"), Settings.cosmetic.tunic_goron_green); + CVar_SetS32("gTunic_Goron_Green", Settings.cosmetic.tunic_goron_green); Settings.cosmetic.tunic_goron_blue = (Conf[CosmeticsSection]["tunic_goron_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_goron_blue"]) : Settings.cosmetic.tunic_goron_blue; - CVar_SetS32(const_cast("gTunic_Goron_Blue"), Settings.cosmetic.tunic_goron_blue); + CVar_SetS32("gTunic_Goron_Blue", Settings.cosmetic.tunic_goron_blue); Settings.cosmetic.tunic_zora_red = (Conf[CosmeticsSection]["tunic_zora_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_zora_red"]) : Settings.cosmetic.tunic_zora_red; - CVar_SetS32(const_cast("gTunic_Zora_Red"), Settings.cosmetic.tunic_zora_red); + CVar_SetS32("gTunic_Zora_Red", Settings.cosmetic.tunic_zora_red); Settings.cosmetic.tunic_zora_green = (Conf[CosmeticsSection]["tunic_zora_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_zora_green"]) : Settings.cosmetic.tunic_zora_green; - CVar_SetS32(const_cast("gTunic_Zora_Green"), Settings.cosmetic.tunic_zora_green); + CVar_SetS32("gTunic_Zora_Green", Settings.cosmetic.tunic_zora_green); Settings.cosmetic.tunic_zora_blue = (Conf[CosmeticsSection]["tunic_zora_blue"] != "" ) ? Ship::stoi(Conf[CosmeticsSection]["tunic_zora_blue"]) : Settings.cosmetic.tunic_zora_blue; - CVar_SetS32(const_cast("gTunic_Zora_Blue"), Settings.cosmetic.tunic_zora_blue); + CVar_SetS32("gTunic_Zora_Blue", Settings.cosmetic.tunic_zora_blue); //Navi Settings.cosmetic.navi_idle_inner_red = (Conf[CosmeticsSection]["navi_idle_inner_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_idle_inner_red"]) : Settings.cosmetic.navi_idle_inner_red; - CVar_SetS32(const_cast("gNavi_Idle_Inner_Red"), Settings.cosmetic.navi_idle_inner_red); + CVar_SetS32("gNavi_Idle_Inner_Red", Settings.cosmetic.navi_idle_inner_red); Settings.cosmetic.navi_idle_inner_green = (Conf[CosmeticsSection]["navi_idle_inner_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_idle_inner_green"]) : Settings.cosmetic.navi_idle_inner_green; - CVar_SetS32(const_cast("gNavi_Idle_Inner_Green"), Settings.cosmetic.navi_idle_inner_green); + CVar_SetS32("gNavi_Idle_Inner_Green", Settings.cosmetic.navi_idle_inner_green); Settings.cosmetic.navi_idle_inner_blue = (Conf[CosmeticsSection]["navi_idle_inner_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_idle_inner_blue"]) : Settings.cosmetic.navi_idle_inner_blue; - CVar_SetS32(const_cast("gNavi_Idle_Inner_Blue"), Settings.cosmetic.navi_idle_inner_blue); + CVar_SetS32("gNavi_Idle_Inner_Blue", Settings.cosmetic.navi_idle_inner_blue); Settings.cosmetic.navi_idle_outer_red = (Conf[CosmeticsSection]["navi_idle_outer_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_idle_outer_red"]) : Settings.cosmetic.navi_idle_outer_red; - CVar_SetS32(const_cast("gNavi_Idle_Outer_Red"), Settings.cosmetic.navi_idle_outer_red); + CVar_SetS32("gNavi_Idle_Outer_Red", Settings.cosmetic.navi_idle_outer_red); Settings.cosmetic.navi_idle_outer_green = (Conf[CosmeticsSection]["navi_idle_outer_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_idle_outer_green"]) : Settings.cosmetic.navi_idle_outer_green; - CVar_SetS32(const_cast("gNavi_Idle_Outer_Green"), Settings.cosmetic.navi_idle_outer_green); + CVar_SetS32("gNavi_Idle_Outer_Green", Settings.cosmetic.navi_idle_outer_green); Settings.cosmetic.navi_idle_outer_blue = (Conf[CosmeticsSection]["navi_idle_outer_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_idle_outer_blue"]) : Settings.cosmetic.navi_idle_outer_blue; - CVar_SetS32(const_cast("gNavi_Idle_Outer_Blue"), Settings.cosmetic.navi_idle_outer_blue); + CVar_SetS32("gNavi_Idle_Outer_Blue", Settings.cosmetic.navi_idle_outer_blue); Settings.cosmetic.navi_npc_inner_red = (Conf[CosmeticsSection]["navi_npc_inner_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_npc_inner_red"]) : Settings.cosmetic.navi_npc_inner_red; - CVar_SetS32(const_cast("gNavi_NPC_Inner_Red"), Settings.cosmetic.navi_npc_inner_red); + CVar_SetS32("gNavi_NPC_Inner_Red", Settings.cosmetic.navi_npc_inner_red); Settings.cosmetic.navi_npc_inner_green = (Conf[CosmeticsSection]["navi_npc_inner_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_npc_inner_green"]) : Settings.cosmetic.navi_npc_inner_green; - CVar_SetS32(const_cast("gNavi_NPC_Inner_Green"), Settings.cosmetic.navi_npc_inner_green); + CVar_SetS32("gNavi_NPC_Inner_Green", Settings.cosmetic.navi_npc_inner_green); Settings.cosmetic.navi_npc_inner_blue = (Conf[CosmeticsSection]["navi_npc_inner_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_npc_inner_blue"]) : Settings.cosmetic.navi_npc_inner_blue; - CVar_SetS32(const_cast("gNavi_NPC_Inner_Blue"), Settings.cosmetic.navi_npc_inner_blue); + CVar_SetS32("gNavi_NPC_Inner_Blue", Settings.cosmetic.navi_npc_inner_blue); Settings.cosmetic.navi_npc_outer_red = (Conf[CosmeticsSection]["navi_npc_outer_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_npc_outer_red"]) : Settings.cosmetic.navi_npc_outer_red; - CVar_SetS32(const_cast("gNavi_NPC_Outer_Red"), Settings.cosmetic.navi_npc_outer_red); + CVar_SetS32("gNavi_NPC_Outer_Red", Settings.cosmetic.navi_npc_outer_red); Settings.cosmetic.navi_npc_outer_green = (Conf[CosmeticsSection]["navi_npc_outer_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_npc_outer_green"]) : Settings.cosmetic.navi_npc_outer_green; - CVar_SetS32(const_cast("gNavi_NPC_Outer_Green"), Settings.cosmetic.navi_npc_outer_green); + CVar_SetS32("gNavi_NPC_Outer_Green", Settings.cosmetic.navi_npc_outer_green); Settings.cosmetic.navi_npc_outer_blue = (Conf[CosmeticsSection]["navi_npc_outer_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_npc_outer_blue"]) : Settings.cosmetic.navi_npc_outer_blue; - CVar_SetS32(const_cast("gNavi_NPC_Outer_Blue"), Settings.cosmetic.navi_npc_outer_blue); + CVar_SetS32("gNavi_NPC_Outer_Blue", Settings.cosmetic.navi_npc_outer_blue); Settings.cosmetic.navi_enemy_inner_red = (Conf[CosmeticsSection]["navi_enemy_inner_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_enemy_inner_red"]) : Settings.cosmetic.navi_enemy_inner_red; - CVar_SetS32(const_cast("gNavi_Enemy_Inner_Red"), Settings.cosmetic.navi_enemy_inner_red); + CVar_SetS32("gNavi_Enemy_Inner_Red", Settings.cosmetic.navi_enemy_inner_red); Settings.cosmetic.navi_enemy_inner_green = (Conf[CosmeticsSection]["navi_enemy_inner_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_enemy_inner_green"]) : Settings.cosmetic.navi_enemy_inner_green; - CVar_SetS32(const_cast("gNavi_Enemy_Inner_Green"), Settings.cosmetic.navi_enemy_inner_green); + CVar_SetS32("gNavi_Enemy_Inner_Green", Settings.cosmetic.navi_enemy_inner_green); Settings.cosmetic.navi_enemy_inner_blue = (Conf[CosmeticsSection]["navi_enemy_inner_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_enemy_inner_blue"]) : Settings.cosmetic.navi_enemy_inner_blue; - CVar_SetS32(const_cast("gNavi_Enemy_Inner_Blue"), Settings.cosmetic.navi_enemy_inner_blue); + CVar_SetS32("gNavi_Enemy_Inner_Blue", Settings.cosmetic.navi_enemy_inner_blue); Settings.cosmetic.navi_enemy_outer_red = (Conf[CosmeticsSection]["navi_enemy_outer_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_enemy_outer_red"]) : Settings.cosmetic.navi_enemy_outer_red; - CVar_SetS32(const_cast("gNavi_Enemy_Outer_Red"), Settings.cosmetic.navi_enemy_outer_red); + CVar_SetS32("gNavi_Enemy_Outer_Red", Settings.cosmetic.navi_enemy_outer_red); Settings.cosmetic.navi_enemy_outer_green = (Conf[CosmeticsSection]["navi_enemy_outer_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_enemy_outer_green"]) : Settings.cosmetic.navi_enemy_outer_green; - CVar_SetS32(const_cast("gNavi_Enemy_Outer_Green"), Settings.cosmetic.navi_enemy_outer_green); + CVar_SetS32("gNavi_Enemy_Outer_Green", Settings.cosmetic.navi_enemy_outer_green); Settings.cosmetic.navi_enemy_outer_blue = (Conf[CosmeticsSection]["navi_enemy_outer_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_enemy_outer_blue"]) : Settings.cosmetic.navi_enemy_outer_blue; - CVar_SetS32(const_cast("gNavi_Enemy_Outer_Blue"), Settings.cosmetic.navi_enemy_outer_blue); + CVar_SetS32("gNavi_Enemy_Outer_Blue", Settings.cosmetic.navi_enemy_outer_blue); Settings.cosmetic.navi_prop_inner_red = (Conf[CosmeticsSection]["navi_prop_inner_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_prop_inner_red"]) : Settings.cosmetic.navi_prop_inner_red; - CVar_SetS32(const_cast("gNavi_Prop_Inner_Red"), Settings.cosmetic.navi_prop_inner_red); + CVar_SetS32("gNavi_Prop_Inner_Red", Settings.cosmetic.navi_prop_inner_red); Settings.cosmetic.navi_prop_inner_green = (Conf[CosmeticsSection]["navi_prop_inner_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_prop_inner_green"]) : Settings.cosmetic.navi_prop_inner_green; - CVar_SetS32(const_cast("gNavi_Prop_Inner_Green"), Settings.cosmetic.navi_prop_inner_green); + CVar_SetS32("gNavi_Prop_Inner_Green", Settings.cosmetic.navi_prop_inner_green); Settings.cosmetic.navi_prop_inner_blue = (Conf[CosmeticsSection]["navi_prop_inner_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_prop_inner_blue"]) : Settings.cosmetic.navi_prop_inner_blue; - CVar_SetS32(const_cast("gNavi_Prop_Inner_Blue"), Settings.cosmetic.navi_prop_inner_blue); + CVar_SetS32("gNavi_Prop_Inner_Blue", Settings.cosmetic.navi_prop_inner_blue); Settings.cosmetic.navi_prop_outer_red = (Conf[CosmeticsSection]["navi_prop_outer_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_prop_outer_red"]) : Settings.cosmetic.navi_prop_outer_red; - CVar_SetS32(const_cast("gNavi_Prop_Outer_Red"), Settings.cosmetic.navi_prop_outer_red); + CVar_SetS32("gNavi_Prop_Outer_Red", Settings.cosmetic.navi_prop_outer_red); Settings.cosmetic.navi_prop_outer_green = (Conf[CosmeticsSection]["navi_prop_outer_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_prop_outer_green"]) : Settings.cosmetic.navi_prop_outer_green; - CVar_SetS32(const_cast("gNavi_Prop_Outer_Green"), Settings.cosmetic.navi_prop_outer_green); + CVar_SetS32("gNavi_Prop_Outer_Green", Settings.cosmetic.navi_prop_outer_green); Settings.cosmetic.navi_prop_outer_blue = (Conf[CosmeticsSection]["navi_prop_outer_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_prop_outer_blue"]) : Settings.cosmetic.navi_prop_outer_blue; - CVar_SetS32(const_cast("gNavi_Prop_Outer_Blue"), Settings.cosmetic.navi_prop_outer_blue); + CVar_SetS32("gNavi_Prop_Outer_Blue", Settings.cosmetic.navi_prop_outer_blue); @@ -238,9 +237,28 @@ namespace Game { Settings.cheats.freeze_time = stob(Conf[CheatSection]["freeze_time"]); CVar_SetS32("gFreezeTime", Settings.cheats.freeze_time); + // Per-Controller + LoadPadSettings(); + UpdateAudio(); } + void LoadPadSettings() { + const std::shared_ptr pConf = GlobalCtx2::GetInstance()->GetConfig(); + ConfigFile& Conf = *pConf; + + for (const auto& [i, controllers] : Ship::Window::Controllers) { + for (const auto& controller : controllers) { + if (auto padConfSection = controller->GetPadConfSection()) { + Settings.controller.extra[i].gyro_sensitivity = Ship::stof(Conf[*padConfSection]["gyro_sensitivity"]); + Settings.controller.extra[i].rumble_strength = Ship::stof(Conf[*padConfSection]["rumble_strength"]); + Settings.controller.extra[i].gyro_drift_x = Ship::stof(Conf[*padConfSection]["gyro_drift_x"], 0.0f); + Settings.controller.extra[i].gyro_drift_y = Ship::stof(Conf[*padConfSection]["gyro_drift_y"], 0.0f); + } + } + } + } + void SaveSettings() { const std::shared_ptr pConf = GlobalCtx2::GetInstance()->GetConfig(); ConfigFile& Conf = *pConf; @@ -272,8 +290,7 @@ namespace Game { // Controllers - Conf[ControllerSection]["gyro_sensitivity"] = std::to_string(Settings.controller.gyro_sensitivity); - Conf[ControllerSection]["rumble_strength"] = std::to_string(Settings.controller.rumble_strength); + Conf[ControllerSection]["rumble_enabled"] = std::to_string(Settings.controller.rumble_enabled); Conf[ControllerSection]["input_scale"] = std::to_string(Settings.controller.input_scale); Conf[ControllerSection]["input_enabled"] = std::to_string(Settings.controller.input_enabled); Conf[ControllerSection]["dpad_pause_name"] = std::to_string(Settings.controller.dpad_pause_name); @@ -333,6 +350,17 @@ namespace Game { Conf[CheatSection]["moon_jump_on_l"] = std::to_string(Settings.cheats.moon_jump_on_l); Conf[CheatSection]["super_tunic"] = std::to_string(Settings.cheats.super_tunic); + // Per-Controller + for (const auto& [i, controllers] : Ship::Window::Controllers) { + for (const auto& controller : controllers) { + if (auto padConfSection = controller->GetPadConfSection()) { + Conf[*padConfSection]["gyro_sensitivity"] = std::to_string(Settings.controller.extra[i].gyro_sensitivity); + Conf[*padConfSection]["rumble_strength"] = std::to_string(Settings.controller.extra[i].rumble_strength); + Conf[*padConfSection]["gyro_drift_x"] = std::to_string(Settings.controller.extra[i].gyro_drift_x); + Conf[*padConfSection]["gyro_drift_y"] = std::to_string(Settings.controller.extra[i].gyro_drift_y); + } + } + } Conf.Save(); } diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index 4f4eecb97..2feea8dcb 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -34,11 +34,14 @@ struct SoHConfigType { // Controller struct { - float gyro_sensitivity = 1.0f; - float rumble_strength = 1.0f; + struct { + float gyro_sensitivity = 1.0f; + float rumble_strength = 1.0f; + float gyro_drift_x = 0.0f; + float gyro_drift_y = 0.0f; + } extra[4]; + bool rumble_enabled = true; float input_scale = 1.0f; - float gyroDriftX = 0.0f; - float gyroDriftY = 0.0f; bool input_enabled = false; bool dpad_pause_name = false; bool dpad_ocarina_text = false; @@ -128,6 +131,7 @@ namespace Game { extern SoHConfigType Settings; void InitSettings(); void LoadSettings(); + void LoadPadSettings(); void SaveSettings(); void SetSeqPlayerVolume(SeqPlayers playerId, float volume); } diff --git a/libultraship/libultraship/KeyboardController.cpp b/libultraship/libultraship/KeyboardController.cpp index 6f78a1678..13014c6a7 100644 --- a/libultraship/libultraship/KeyboardController.cpp +++ b/libultraship/libultraship/KeyboardController.cpp @@ -53,4 +53,4 @@ namespace Ship { std::string KeyboardController::GetBindingConfSection() { return GetControllerType() + " CONTROLLER BINDING " + std::to_string(GetControllerNumber() + 1); } -} \ No newline at end of file +} diff --git a/libultraship/libultraship/KeyboardController.h b/libultraship/libultraship/KeyboardController.h index ab0f98e64..f6c109ca7 100644 --- a/libultraship/libultraship/KeyboardController.h +++ b/libultraship/libultraship/KeyboardController.h @@ -10,11 +10,16 @@ namespace Ship { void ReadFromSource(); void WriteToSource(ControllerCallback* controller); + bool Connected() const { return true; } + bool CanRumble() const { return false; } bool PressButton(int32_t dwScancode); bool ReleaseButton(int32_t dwScancode); void ReleaseAllButtons(); + bool HasPadConf() const { return false; } + std::optional GetPadConfSection() { return {}; } + protected: std::string GetControllerType(); std::string GetConfSection(); diff --git a/libultraship/libultraship/SDLController.cpp b/libultraship/libultraship/SDLController.cpp index 47fb57441..267607048 100644 --- a/libultraship/libultraship/SDLController.cpp +++ b/libultraship/libultraship/SDLController.cpp @@ -74,15 +74,21 @@ namespace Ship { Cont = NewCont; std::string BindingConfSection = GetBindingConfSection(); - std::shared_ptr pBindingConf = GlobalCtx2::GetInstance()->GetConfig(); - ConfigFile& BindingConf = *pBindingConf.get(); + std::string PadConfSection = *GetPadConfSection(); + std::shared_ptr config = GlobalCtx2::GetInstance()->GetConfig(); - if (!BindingConf.has(BindingConfSection)) { + if (!config->has(BindingConfSection)) { CreateDefaultBinding(); } + if (!config->has(PadConfSection)) { + CreateDefaultPadConf(); + } + LoadBinding(); LoadAxisThresholds(); + // Update per-controller settings in ImGui menu after opening controller. + Game::LoadPadSettings(); break; } @@ -93,6 +99,9 @@ namespace Ship { } bool SDLController::Close() { + if (SDL_GameControllerHasRumble(Cont)) { + SDL_GameControllerRumble(Cont, 0, 0, 0); + } if (Cont != nullptr) { SDL_GameControllerClose(Cont); } @@ -178,37 +187,41 @@ namespace Ship { if (SDL_GameControllerHasSensor(Cont, SDL_SENSOR_GYRO)) { + size_t contNumber = GetControllerNumber(); + float& gyro_drift_x = Game::Settings.controller.extra[contNumber].gyro_drift_x; + float& gyro_drift_y = Game::Settings.controller.extra[contNumber].gyro_drift_y; + const float gyro_sensitivity = Game::Settings.controller.extra[contNumber].gyro_sensitivity; + float gyroData[3]; SDL_GameControllerGetSensorData(Cont, SDL_SENSOR_GYRO, gyroData, 3); const char* contName = SDL_GameControllerName(Cont); const int isSpecialController = !strcmp("PS5 Controller", contName); - const float gyroSensitivity = Game::Settings.controller.gyro_sensitivity; - if (Game::Settings.controller.gyroDriftX == 0) { - Game::Settings.controller.gyroDriftX = gyroData[0]; + if (gyro_drift_x == 0) { + gyro_drift_x = gyroData[0]; } - if (Game::Settings.controller.gyroDriftY == 0) { + if (gyro_drift_y == 0) { if (isSpecialController == 1) { - Game::Settings.controller.gyroDriftY = gyroData[2]; + gyro_drift_y = gyroData[2]; } else { - Game::Settings.controller.gyroDriftY = gyroData[1]; + gyro_drift_y = gyroData[1]; } } if (isSpecialController == 1) { - wGyroX = gyroData[0] - Game::Settings.controller.gyroDriftX; - wGyroY = -gyroData[2] - Game::Settings.controller.gyroDriftY; + wGyroX = gyroData[0] - gyro_drift_x; + wGyroY = -gyroData[2] - gyro_drift_y; } else { - wGyroX = gyroData[0] - Game::Settings.controller.gyroDriftX; - wGyroY = gyroData[1] - Game::Settings.controller.gyroDriftY; + wGyroX = gyroData[0] - gyro_drift_x; + wGyroY = gyroData[1] - gyro_drift_y; } - wGyroX *= gyroSensitivity; - wGyroY *= gyroSensitivity; + wGyroX *= gyro_sensitivity; + wGyroY *= gyro_sensitivity; } for (int32_t i = SDL_CONTROLLER_BUTTON_A; i < SDL_CONTROLLER_BUTTON_MAX; i++) { @@ -331,7 +344,10 @@ namespace Ship { { if (SDL_GameControllerHasRumble(Cont)) { if (controller->rumble > 0) { - SDL_GameControllerRumble(Cont, 0xFFFF * Game::Settings.controller.rumble_strength, 0xFFFF * Game::Settings.controller.rumble_strength, 1); + float rumble_strength = Game::Settings.controller.extra[GetControllerNumber()].rumble_strength; + SDL_GameControllerRumble(Cont, 0xFFFF * rumble_strength, 0xFFFF * rumble_strength, 0); + } else { + SDL_GameControllerRumble(Cont, 0, 0, 0); } } @@ -391,6 +407,19 @@ namespace Ship { Conf.Save(); } + void SDLController::CreateDefaultPadConf() { + std::string ConfSection = *GetPadConfSection(); + std::shared_ptr pConf = GlobalCtx2::GetInstance()->GetConfig(); + ConfigFile& Conf = *pConf.get(); + + Conf[ConfSection]["gyro_sensitivity"] = std::to_string(1.0f); + Conf[ConfSection]["rumble_strength"] = std::to_string(1.0f); + Conf[ConfSection]["gyro_drift_x"] = std::to_string(0.0f); + Conf[ConfSection]["gyro_drift_y"] = std::to_string(0.0f); + + Conf.Save(); + } + void SDLController::SetButtonMapping(const std::string& szButtonName, int32_t dwScancode) { if (guid.compare(INVALID_SDL_CONTROLLER_GUID)) { return; @@ -410,4 +439,8 @@ namespace Ship { std::string SDLController::GetBindingConfSection() { return GetControllerType() + " CONTROLLER BINDING " + guid; } + + std::optional SDLController::GetPadConfSection() { + return GetControllerType() + " CONTROLLER PAD " + guid; + } } diff --git a/libultraship/libultraship/SDLController.h b/libultraship/libultraship/SDLController.h index 5c71c50a9..138466a89 100644 --- a/libultraship/libultraship/SDLController.h +++ b/libultraship/libultraship/SDLController.h @@ -12,15 +12,21 @@ namespace Ship { void ReadFromSource(); void WriteToSource(ControllerCallback* controller); + bool Connected() const { return Cont != nullptr; } + bool CanRumble() const { return SDL_GameControllerHasRumble(Cont); } std::string GetGuid() { return guid; }; + bool HasPadConf() const { return true; } + std::optional GetPadConfSection(); + protected: std::string GetControllerType(); void SetButtonMapping(const std::string& szButtonName, int32_t dwScancode); std::string GetConfSection(); std::string GetBindingConfSection(); void CreateDefaultBinding(); + void CreateDefaultPadConf(); static bool IsGuidInUse(const std::string& guid); private: diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 96211fe20..5111a0d6d 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -3,6 +3,9 @@ #include #include #include +#include +#include +#include #include "Archive.h" #include "Environment.h" @@ -81,49 +84,49 @@ namespace SohImGui { ImGui_ImplWin32_Init(impl.dx11.window); break; } - kokiri_col[0] = std::clamp((float) CVar_GetS32((char*)"gTunic_Kokiri_Red", 30)/255, 0.0f, 1.0f); - kokiri_col[1] = std::clamp((float)CVar_GetS32((char*)"gTunic_Kokiri_Green", 105) / 255, 0.0f, 1.0f); - kokiri_col[2] = std::clamp((float)CVar_GetS32((char*)"gTunic_Kokiri_Blue", 27) / 255, 0.0f, 1.0f); + kokiri_col[0] = std::clamp((float) CVar_GetS32("gTunic_Kokiri_Red", 30)/255, 0.0f, 1.0f); + kokiri_col[1] = std::clamp((float)CVar_GetS32("gTunic_Kokiri_Green", 105) / 255, 0.0f, 1.0f); + kokiri_col[2] = std::clamp((float)CVar_GetS32("gTunic_Kokiri_Blue", 27) / 255, 0.0f, 1.0f); - goron_col[0] = std::clamp((float)CVar_GetS32((char*)"gTunic_Goron_Red", 100) / 255, 0.0f, 1.0f); - goron_col[1] = std::clamp((float)CVar_GetS32((char*)"gTunic_Goron_Green", 20) / 255, 0.0f, 1.0f); - goron_col[2] = std::clamp((float)CVar_GetS32((char*)"gTunic_Goron_Blue", 0) / 255, 0.0f, 1.0f); + goron_col[0] = std::clamp((float)CVar_GetS32("gTunic_Goron_Red", 100) / 255, 0.0f, 1.0f); + goron_col[1] = std::clamp((float)CVar_GetS32("gTunic_Goron_Green", 20) / 255, 0.0f, 1.0f); + goron_col[2] = std::clamp((float)CVar_GetS32("gTunic_Goron_Blue", 0) / 255, 0.0f, 1.0f); - zora_col[0] = std::clamp((float)CVar_GetS32((char*)"gTunic_Zora_Red", 0) / 255, 0.0f, 1.0f); - zora_col[1] = std::clamp((float)CVar_GetS32((char*)"gTunic_Zora_Green", 60) / 255, 0.0f, 1.0f); - zora_col[2] = std::clamp((float)CVar_GetS32((char*)"gTunic_Zora_Blue", 100) / 255, 0.0f, 1.0f); + zora_col[0] = std::clamp((float)CVar_GetS32("gTunic_Zora_Red", 0) / 255, 0.0f, 1.0f); + zora_col[1] = std::clamp((float)CVar_GetS32("gTunic_Zora_Green", 60) / 255, 0.0f, 1.0f); + zora_col[2] = std::clamp((float)CVar_GetS32("gTunic_Zora_Blue", 100) / 255, 0.0f, 1.0f); - navi_idle_i_col[0] = std::clamp((float)CVar_GetS32((char*)"gNavi_Idle_Inner_Red", 0) / 255, 0.0f, 1.0f); - navi_idle_i_col[1] = std::clamp((float)CVar_GetS32((char*)"gNavi_Idle_Inner_Green", 0) / 255, 0.0f, 1.0f); - navi_idle_i_col[2] = std::clamp((float)CVar_GetS32((char*)"gNavi_Idle_Inner_Blue", 0) / 255, 0.0f, 1.0f); + navi_idle_i_col[0] = std::clamp((float)CVar_GetS32("gNavi_Idle_Inner_Red", 0) / 255, 0.0f, 1.0f); + navi_idle_i_col[1] = std::clamp((float)CVar_GetS32("gNavi_Idle_Inner_Green", 0) / 255, 0.0f, 1.0f); + navi_idle_i_col[2] = std::clamp((float)CVar_GetS32("gNavi_Idle_Inner_Blue", 0) / 255, 0.0f, 1.0f); - navi_idle_o_col[0] = std::clamp((float)CVar_GetS32((char*)"gNavi_Idle_Outer_Red", 0) / 255, 0.0f, 1.0f); - navi_idle_o_col[1] = std::clamp((float)CVar_GetS32((char*)"gNavi_Idle_Outer_Green", 0) / 255, 0.0f, 1.0f); - navi_idle_o_col[2] = std::clamp((float)CVar_GetS32((char*)"gNavi_Idle_Outer_Blue", 0) / 255, 0.0f, 1.0f); + navi_idle_o_col[0] = std::clamp((float)CVar_GetS32("gNavi_Idle_Outer_Red", 0) / 255, 0.0f, 1.0f); + navi_idle_o_col[1] = std::clamp((float)CVar_GetS32("gNavi_Idle_Outer_Green", 0) / 255, 0.0f, 1.0f); + navi_idle_o_col[2] = std::clamp((float)CVar_GetS32("gNavi_Idle_Outer_Blue", 0) / 255, 0.0f, 1.0f); - navi_npc_i_col[0] = std::clamp((float)CVar_GetS32((char*)"gNavi_NPC_Inner_Red", 0) / 255, 0.0f, 1.0f); - navi_npc_i_col[1] = std::clamp((float)CVar_GetS32((char*)"gNavi_NPC_Inner_Green", 0) / 255, 0.0f, 1.0f); - navi_npc_i_col[2] = std::clamp((float)CVar_GetS32((char*)"gNavi_NPC_Inner_Blue", 0) / 255, 0.0f, 1.0f); + navi_npc_i_col[0] = std::clamp((float)CVar_GetS32("gNavi_NPC_Inner_Red", 0) / 255, 0.0f, 1.0f); + navi_npc_i_col[1] = std::clamp((float)CVar_GetS32("gNavi_NPC_Inner_Green", 0) / 255, 0.0f, 1.0f); + navi_npc_i_col[2] = std::clamp((float)CVar_GetS32("gNavi_NPC_Inner_Blue", 0) / 255, 0.0f, 1.0f); - navi_npc_o_col[0] = std::clamp((float)CVar_GetS32((char*)"gNavi_NPC_Outer_Red", 0) / 255, 0.0f, 1.0f); - navi_npc_o_col[1] = std::clamp((float)CVar_GetS32((char*)"gNavi_NPC_Outer_Green", 0) / 255, 0.0f, 1.0f); - navi_npc_o_col[2] = std::clamp((float)CVar_GetS32((char*)"gNavi_NPC_Outer_Blue", 0) / 255, 0.0f, 1.0f); + navi_npc_o_col[0] = std::clamp((float)CVar_GetS32("gNavi_NPC_Outer_Red", 0) / 255, 0.0f, 1.0f); + navi_npc_o_col[1] = std::clamp((float)CVar_GetS32("gNavi_NPC_Outer_Green", 0) / 255, 0.0f, 1.0f); + navi_npc_o_col[2] = std::clamp((float)CVar_GetS32("gNavi_NPC_Outer_Blue", 0) / 255, 0.0f, 1.0f); - navi_enemy_i_col[0] = std::clamp((float)CVar_GetS32((char*)"gNavi_Enemy_Inner_Red", 0) / 255, 0.0f, 1.0f); - navi_enemy_i_col[1] = std::clamp((float)CVar_GetS32((char*)"gNavi_Enemy_Inner_Green", 0) / 255, 0.0f, 1.0f); - navi_enemy_i_col[2] = std::clamp((float)CVar_GetS32((char*)"gNavi_Enemy_Inner_Blue", 0) / 255, 0.0f, 1.0f); + navi_enemy_i_col[0] = std::clamp((float)CVar_GetS32("gNavi_Enemy_Inner_Red", 0) / 255, 0.0f, 1.0f); + navi_enemy_i_col[1] = std::clamp((float)CVar_GetS32("gNavi_Enemy_Inner_Green", 0) / 255, 0.0f, 1.0f); + navi_enemy_i_col[2] = std::clamp((float)CVar_GetS32("gNavi_Enemy_Inner_Blue", 0) / 255, 0.0f, 1.0f); - navi_enemy_o_col[0] = std::clamp((float)CVar_GetS32((char*)"gNavi_Enemy_Outer_Red", 0) / 255, 0.0f, 1.0f); - navi_enemy_o_col[1] = std::clamp((float)CVar_GetS32((char*)"gNavi_Enemy_Outer_Green", 0) / 255, 0.0f, 1.0f); - navi_enemy_o_col[2] = std::clamp((float)CVar_GetS32((char*)"gNavi_Enemy_Outer_Blue", 0) / 255, 0.0f, 1.0f); + navi_enemy_o_col[0] = std::clamp((float)CVar_GetS32("gNavi_Enemy_Outer_Red", 0) / 255, 0.0f, 1.0f); + navi_enemy_o_col[1] = std::clamp((float)CVar_GetS32("gNavi_Enemy_Outer_Green", 0) / 255, 0.0f, 1.0f); + navi_enemy_o_col[2] = std::clamp((float)CVar_GetS32("gNavi_Enemy_Outer_Blue", 0) / 255, 0.0f, 1.0f); - navi_prop_i_col[0] = std::clamp((float)CVar_GetS32((char*)"gNavi_Prop_Inner_Red", 0) / 255, 0.0f, 1.0f); - navi_prop_i_col[1] = std::clamp((float)CVar_GetS32((char*)"gNavi_Prop_Inner_Green", 0) / 255, 0.0f, 1.0f); - navi_prop_i_col[2] = std::clamp((float)CVar_GetS32((char*)"gNavi_Prop_Inner_Blue", 0) / 255, 0.0f, 1.0f); + navi_prop_i_col[0] = std::clamp((float)CVar_GetS32("gNavi_Prop_Inner_Red", 0) / 255, 0.0f, 1.0f); + navi_prop_i_col[1] = std::clamp((float)CVar_GetS32("gNavi_Prop_Inner_Green", 0) / 255, 0.0f, 1.0f); + navi_prop_i_col[2] = std::clamp((float)CVar_GetS32("gNavi_Prop_Inner_Blue", 0) / 255, 0.0f, 1.0f); - navi_prop_o_col[0] = std::clamp((float)CVar_GetS32((char*)"gNavi_Prop_Outer_Red", 0) / 255, 0.0f, 1.0f); - navi_prop_o_col[1] = std::clamp((float)CVar_GetS32((char*)"gNavi_Prop_Outer_Green", 0) / 255, 0.0f, 1.0f); - navi_prop_o_col[2] = std::clamp((float)CVar_GetS32((char*)"gNavi_Prop_Outer_Blue", 0) / 255, 0.0f, 1.0f); + navi_prop_o_col[0] = std::clamp((float)CVar_GetS32("gNavi_Prop_Outer_Red", 0) / 255, 0.0f, 1.0f); + navi_prop_o_col[1] = std::clamp((float)CVar_GetS32("gNavi_Prop_Outer_Green", 0) / 255, 0.0f, 1.0f); + navi_prop_o_col[2] = std::clamp((float)CVar_GetS32("gNavi_Prop_Outer_Blue", 0) / 255, 0.0f, 1.0f); } void ImGuiBackendInit() { @@ -402,20 +405,41 @@ namespace SohImGui { } if (ImGui::BeginMenu("Controller")) { - ImGui::Text("Gyro Sensitivity: %d %%", static_cast(100 * Game::Settings.controller.gyro_sensitivity)); - if (ImGui::SliderFloat("##GYROSCOPE", &Game::Settings.controller.gyro_sensitivity, 0.0f, 1.0f, "")) { - needs_save = true; - } + for (const auto& [i, controllers] : Ship::Window::Controllers) { + bool hasPad = std::find_if(controllers.begin(), controllers.end(), [](const auto& c) { + return c->HasPadConf() && c->Connected(); + }) != controllers.end(); - if (ImGui::Button("Recalibrate Gyro")) { - Game::Settings.controller.gyroDriftX = 0; - Game::Settings.controller.gyroDriftY = 0; + if (!hasPad) continue; + + auto menuLabel = "Controller " + std::to_string(i + 1); + if (ImGui::BeginMenu(menuLabel.c_str())) { + ImGui::Text("Gyro Sensitivity: %d %%", static_cast(100 * Game::Settings.controller.extra[i].gyro_sensitivity)); + if (ImGui::SliderFloat("##GYROSCOPE", &Game::Settings.controller.extra[i].gyro_sensitivity, 0.0f, 1.0f, "")) { + needs_save = true; + } + + if (ImGui::Button("Recalibrate Gyro")) { + Game::Settings.controller.extra[i].gyro_drift_x = 0; + Game::Settings.controller.extra[i].gyro_drift_y = 0; + needs_save = true; + } + + ImGui::Separator(); + + ImGui::Text("Rumble Strength: %d %%", static_cast(100 * Game::Settings.controller.extra[i].rumble_strength)); + if (ImGui::SliderFloat("##RUMBLE", &Game::Settings.controller.extra[i].rumble_strength, 0.0f, 1.0f, "")) { + needs_save = true; + } + + ImGui::EndMenu(); + } } ImGui::Separator(); - ImGui::Text("Rumble Strength: %d %%", static_cast(100 * Game::Settings.controller.rumble_strength)); - if (ImGui::SliderFloat("##RUMBLE", &Game::Settings.controller.rumble_strength, 0.0f, 1.0f, "")) { + if (ImGui::Checkbox("Rumble Enabled", &Game::Settings.controller.rumble_enabled)) { + CVar_SetS32("gRumbleEnabled", Game::Settings.controller.rumble_enabled); needs_save = true; } @@ -505,7 +529,7 @@ namespace SohImGui { } if (ImGui::Checkbox("Dynamic Wallet Icon", &Game::Settings.enhancements.dynamic_wallet_icon)) { - CVar_SetS32(const_cast("gDynamicWalletIcon"), Game::Settings.enhancements.dynamic_wallet_icon); + CVar_SetS32("gDynamicWalletIcon", Game::Settings.enhancements.dynamic_wallet_icon); needs_save = true; } @@ -587,30 +611,30 @@ namespace SohImGui { ImGui::Text("Tunics"); ImGui::Separator(); if (ImGui::ColorEdit3("Kokiri Tunic", kokiri_col)) { - Game::Settings.cosmetic.tunic_kokiri_red = (int) (kokiri_col[0] * 255); - Game::Settings.cosmetic.tunic_kokiri_green = (int) (kokiri_col[1] * 255); - Game::Settings.cosmetic.tunic_kokiri_blue = (int) (kokiri_col[2] * 255); - CVar_SetS32(const_cast("gTunic_Kokiri_Red"), Game::Settings.cosmetic.tunic_kokiri_red); - CVar_SetS32(const_cast("gTunic_Kokiri_Green"), Game::Settings.cosmetic.tunic_kokiri_green); - CVar_SetS32(const_cast("gTunic_Kokiri_Blue"), Game::Settings.cosmetic.tunic_kokiri_blue); + Game::Settings.cosmetic.tunic_kokiri_red = (int)(kokiri_col[0] * 255); + Game::Settings.cosmetic.tunic_kokiri_green = (int)(kokiri_col[1] * 255); + Game::Settings.cosmetic.tunic_kokiri_blue = (int)(kokiri_col[2] * 255); + CVar_SetS32("gTunic_Kokiri_Red", Game::Settings.cosmetic.tunic_kokiri_red); + CVar_SetS32("gTunic_Kokiri_Green", Game::Settings.cosmetic.tunic_kokiri_green); + CVar_SetS32("gTunic_Kokiri_Blue", Game::Settings.cosmetic.tunic_kokiri_blue); needs_save = true; } if (ImGui::ColorEdit3("Goron Tunic", goron_col)) { Game::Settings.cosmetic.tunic_goron_red = (int)(goron_col[0] * 255); Game::Settings.cosmetic.tunic_goron_green = (int)(goron_col[1] * 255); Game::Settings.cosmetic.tunic_goron_blue = (int)(goron_col[2] * 255); - CVar_SetS32(const_cast("gTunic_Goron_Red"), Game::Settings.cosmetic.tunic_goron_red); - CVar_SetS32(const_cast("gTunic_Goron_Green"), Game::Settings.cosmetic.tunic_goron_green); - CVar_SetS32(const_cast("gTunic_Goron_Blue"), Game::Settings.cosmetic.tunic_goron_blue); + CVar_SetS32("gTunic_Goron_Red", Game::Settings.cosmetic.tunic_goron_red); + CVar_SetS32("gTunic_Goron_Green", Game::Settings.cosmetic.tunic_goron_green); + CVar_SetS32("gTunic_Goron_Blue", Game::Settings.cosmetic.tunic_goron_blue); needs_save = true; } if (ImGui::ColorEdit3("Zora Tunic", zora_col)) { Game::Settings.cosmetic.tunic_zora_red = (int)(zora_col[0] * 255); Game::Settings.cosmetic.tunic_zora_green = (int)(zora_col[1] * 255); Game::Settings.cosmetic.tunic_zora_blue = (int)(zora_col[2] * 255); - CVar_SetS32(const_cast("gTunic_Zora_Red"), Game::Settings.cosmetic.tunic_zora_red); - CVar_SetS32(const_cast("gTunic_Zora_Green"), Game::Settings.cosmetic.tunic_zora_green); - CVar_SetS32(const_cast("gTunic_Zora_Blue"), Game::Settings.cosmetic.tunic_zora_blue); + CVar_SetS32("gTunic_Zora_Red", Game::Settings.cosmetic.tunic_zora_red); + CVar_SetS32("gTunic_Zora_Green", Game::Settings.cosmetic.tunic_zora_green); + CVar_SetS32("gTunic_Zora_Blue", Game::Settings.cosmetic.tunic_zora_blue); needs_save = true; } ImGui::Text("Navi"); @@ -619,9 +643,9 @@ namespace SohImGui { Game::Settings.cosmetic.navi_idle_inner_red = (int)(navi_idle_i_col[0] * 255); Game::Settings.cosmetic.navi_idle_inner_green = (int)(navi_idle_i_col[1] * 255); Game::Settings.cosmetic.navi_idle_inner_blue = (int)(navi_idle_i_col[2] * 255); - CVar_SetS32(const_cast("gNavi_Idle_Inner_Red"), Game::Settings.cosmetic.navi_idle_inner_red); - CVar_SetS32(const_cast("gNavi_Idle_Inner_Green"), Game::Settings.cosmetic.navi_idle_inner_green); - CVar_SetS32(const_cast("gNavi_Idle_Inner_Blue"), Game::Settings.cosmetic.navi_idle_inner_blue); + CVar_SetS32("gNavi_Idle_Inner_Red", Game::Settings.cosmetic.navi_idle_inner_red); + CVar_SetS32("gNavi_Idle_Inner_Green", Game::Settings.cosmetic.navi_idle_inner_green); + CVar_SetS32("gNavi_Idle_Inner_Blue", Game::Settings.cosmetic.navi_idle_inner_blue); needs_save = true; } @@ -629,9 +653,9 @@ namespace SohImGui { Game::Settings.cosmetic.navi_idle_outer_red = (int)(navi_idle_o_col[0] * 255); Game::Settings.cosmetic.navi_idle_outer_green = (int)(navi_idle_o_col[1] * 255); Game::Settings.cosmetic.navi_idle_outer_blue = (int)(navi_idle_o_col[2] * 255); - CVar_SetS32(const_cast("gNavi_Idle_Outer_Red"), Game::Settings.cosmetic.navi_idle_outer_red); - CVar_SetS32(const_cast("gNavi_Idle_Outer_Green"), Game::Settings.cosmetic.navi_idle_outer_green); - CVar_SetS32(const_cast("gNavi_Idle_Outer_Blue"), Game::Settings.cosmetic.navi_idle_outer_blue); + CVar_SetS32("gNavi_Idle_Outer_Red", Game::Settings.cosmetic.navi_idle_outer_red); + CVar_SetS32("gNavi_Idle_Outer_Green", Game::Settings.cosmetic.navi_idle_outer_green); + CVar_SetS32("gNavi_Idle_Outer_Blue", Game::Settings.cosmetic.navi_idle_outer_blue); needs_save = true; } @@ -639,9 +663,9 @@ namespace SohImGui { Game::Settings.cosmetic.navi_npc_inner_red = (int)(navi_npc_i_col[0] * 255); Game::Settings.cosmetic.navi_npc_inner_green = (int)(navi_npc_i_col[1] * 255); Game::Settings.cosmetic.navi_npc_inner_blue = (int)(navi_npc_i_col[2] * 255); - CVar_SetS32(const_cast("gNavi_NPC_Inner_Red"), Game::Settings.cosmetic.navi_npc_inner_red); - CVar_SetS32(const_cast("gNavi_NPC_Inner_Green"), Game::Settings.cosmetic.navi_npc_inner_green); - CVar_SetS32(const_cast("gNavi_NPC_Inner_Blue"), Game::Settings.cosmetic.navi_npc_inner_blue); + CVar_SetS32("gNavi_NPC_Inner_Red", Game::Settings.cosmetic.navi_npc_inner_red); + CVar_SetS32("gNavi_NPC_Inner_Green", Game::Settings.cosmetic.navi_npc_inner_green); + CVar_SetS32("gNavi_NPC_Inner_Blue", Game::Settings.cosmetic.navi_npc_inner_blue); needs_save = true; } @@ -649,9 +673,9 @@ namespace SohImGui { Game::Settings.cosmetic.navi_npc_outer_red = (int)(navi_npc_o_col[0] * 255); Game::Settings.cosmetic.navi_npc_outer_green = (int)(navi_npc_o_col[1] * 255); Game::Settings.cosmetic.navi_npc_outer_blue = (int)(navi_npc_o_col[2] * 255); - CVar_SetS32(const_cast("gNavi_NPC_Outer_Red"), Game::Settings.cosmetic.navi_npc_outer_red); - CVar_SetS32(const_cast("gNavi_NPC_Outer_Green"), Game::Settings.cosmetic.navi_npc_outer_green); - CVar_SetS32(const_cast("gNavi_NPC_Outer_Blue"), Game::Settings.cosmetic.navi_npc_outer_blue); + CVar_SetS32("gNavi_NPC_Outer_Red", Game::Settings.cosmetic.navi_npc_outer_red); + CVar_SetS32("gNavi_NPC_Outer_Green", Game::Settings.cosmetic.navi_npc_outer_green); + CVar_SetS32("gNavi_NPC_Outer_Blue", Game::Settings.cosmetic.navi_npc_outer_blue); needs_save = true; } @@ -659,9 +683,9 @@ namespace SohImGui { Game::Settings.cosmetic.navi_enemy_inner_red = (int)(navi_enemy_i_col[0] * 255); Game::Settings.cosmetic.navi_enemy_inner_green = (int)(navi_enemy_i_col[1] * 255); Game::Settings.cosmetic.navi_enemy_inner_blue = (int)(navi_enemy_i_col[2] * 255); - CVar_SetS32(const_cast("gNavi_Enemy_Inner_Red"), Game::Settings.cosmetic.navi_enemy_inner_red); - CVar_SetS32(const_cast("gNavi_Enemy_Inner_Green"), Game::Settings.cosmetic.navi_enemy_inner_green); - CVar_SetS32(const_cast("gNavi_Enemy_Inner_Blue"), Game::Settings.cosmetic.navi_enemy_inner_blue); + CVar_SetS32("gNavi_Enemy_Inner_Red", Game::Settings.cosmetic.navi_enemy_inner_red); + CVar_SetS32("gNavi_Enemy_Inner_Green", Game::Settings.cosmetic.navi_enemy_inner_green); + CVar_SetS32("gNavi_Enemy_Inner_Blue", Game::Settings.cosmetic.navi_enemy_inner_blue); needs_save = true; } @@ -669,9 +693,9 @@ namespace SohImGui { Game::Settings.cosmetic.navi_enemy_outer_red = (int)(navi_enemy_o_col[0] * 255); Game::Settings.cosmetic.navi_enemy_outer_green = (int)(navi_enemy_o_col[1] * 255); Game::Settings.cosmetic.navi_enemy_outer_blue = (int)(navi_enemy_o_col[2] * 255); - CVar_SetS32(const_cast("gNavi_Enemy_Outer_Red"), Game::Settings.cosmetic.navi_enemy_outer_red); - CVar_SetS32(const_cast("gNavi_Enemy_Outer_Green"), Game::Settings.cosmetic.navi_enemy_outer_green); - CVar_SetS32(const_cast("gNavi_Enemy_Outer_Blue"), Game::Settings.cosmetic.navi_enemy_outer_blue); + CVar_SetS32("gNavi_Enemy_Outer_Red", Game::Settings.cosmetic.navi_enemy_outer_red); + CVar_SetS32("gNavi_Enemy_Outer_Green", Game::Settings.cosmetic.navi_enemy_outer_green); + CVar_SetS32("gNavi_Enemy_Outer_Blue", Game::Settings.cosmetic.navi_enemy_outer_blue); needs_save = true; } @@ -679,9 +703,9 @@ namespace SohImGui { Game::Settings.cosmetic.navi_prop_inner_red = (int)(navi_prop_i_col[0] * 255); Game::Settings.cosmetic.navi_prop_inner_green = (int)(navi_prop_i_col[1] * 255); Game::Settings.cosmetic.navi_prop_inner_blue = (int)(navi_prop_i_col[2] * 255); - CVar_SetS32(const_cast("gNavi_Prop_Inner_Red"), Game::Settings.cosmetic.navi_prop_inner_red); - CVar_SetS32(const_cast("gNavi_Prop_Inner_Green"), Game::Settings.cosmetic.navi_prop_inner_green); - CVar_SetS32(const_cast("gNavi_Prop_Inner_Blue"), Game::Settings.cosmetic.navi_prop_inner_blue); + CVar_SetS32("gNavi_Prop_Inner_Red", Game::Settings.cosmetic.navi_prop_inner_red); + CVar_SetS32("gNavi_Prop_Inner_Green", Game::Settings.cosmetic.navi_prop_inner_green); + CVar_SetS32("gNavi_Prop_Inner_Blue", Game::Settings.cosmetic.navi_prop_inner_blue); needs_save = true; } @@ -689,9 +713,9 @@ namespace SohImGui { Game::Settings.cosmetic.navi_prop_outer_red = (int)(navi_prop_o_col[0] * 255); Game::Settings.cosmetic.navi_prop_outer_green = (int)(navi_prop_o_col[1] * 255); Game::Settings.cosmetic.navi_prop_outer_blue = (int)(navi_prop_o_col[2] * 255); - CVar_SetS32(const_cast("gNavi_Prop_Outer_Red"), Game::Settings.cosmetic.navi_prop_outer_red); - CVar_SetS32(const_cast("gNavi_Prop_Outer_Green"), Game::Settings.cosmetic.navi_prop_outer_green); - CVar_SetS32(const_cast("gNavi_Prop_Outer_Blue"), Game::Settings.cosmetic.navi_prop_outer_blue); + CVar_SetS32("gNavi_Prop_Outer_Red", Game::Settings.cosmetic.navi_prop_outer_red); + CVar_SetS32("gNavi_Prop_Outer_Green", Game::Settings.cosmetic.navi_prop_outer_green); + CVar_SetS32("gNavi_Prop_Outer_Blue", Game::Settings.cosmetic.navi_prop_outer_blue); needs_save = true; } diff --git a/soh/soh/Enhancements/bootcommands.c b/soh/soh/Enhancements/bootcommands.c index 60143e295..da4276f77 100644 --- a/soh/soh/Enhancements/bootcommands.c +++ b/soh/soh/Enhancements/bootcommands.c @@ -25,6 +25,7 @@ void BootCommands_Init() CVar_RegisterS32("gDebugEnabled", 0); CVar_RegisterS32("gPauseLiveLink", 0); CVar_RegisterS32("gMinimalUI", 0); + CVar_RegisterS32("gRumbleEnabled", 0); CVar_RegisterS32("gUniformLR", 1); CVar_RegisterS32("gNewDrops", 0); CVar_RegisterS32("gVisualAgony", 0); diff --git a/soh/soh/Enhancements/debugconsole.cpp b/soh/soh/Enhancements/debugconsole.cpp index 06126281f..de8cab260 100644 --- a/soh/soh/Enhancements/debugconsole.cpp +++ b/soh/soh/Enhancements/debugconsole.cpp @@ -337,11 +337,11 @@ static bool SetCVarHandler(const std::vector& args) { int vType = CheckVarType(args[2]); if (vType == VARTYPE_STRING) - CVar_SetString((char*)args[1].c_str(), (char*)args[2].c_str()); + CVar_SetString(args[1].c_str(), (char*)args[2].c_str()); else if (vType == VARTYPE_FLOAT) - CVar_SetFloat((char*)args[1].c_str(), std::stof(args[2])); + CVar_SetFloat(args[1].c_str(), std::stof(args[2])); else - CVar_SetS32((char*)args[1].c_str(), std::stoi(args[2])); + CVar_SetS32(args[1].c_str(), std::stoi(args[2])); DebugConsole_SaveCVars(); @@ -354,7 +354,7 @@ static bool GetCVarHandler(const std::vector& args) { if (args.size() < 2) return CMD_FAILED; - CVar* cvar = CVar_GetVar((char*) args[1].c_str()); + CVar* cvar = CVar_GetVar(args[1].c_str()); if (cvar != nullptr) { @@ -446,4 +446,4 @@ void DebugConsole_SaveCVars() } File::WriteAllText("cvars.cfg", output); -} \ No newline at end of file +} diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index fca6d6b7d..f125437ab 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -3,6 +3,7 @@ #include #include #include "GlobalCtx2.h" +#include "GameSettings.h" #include "ResourceMgr.h" #include "DisplayList.h" #include "PlayerAnimation.h" @@ -885,3 +886,13 @@ extern "C" void AudioPlayer_Play(const uint8_t* buf, uint32_t len) { OTRGlobals::Instance->context->GetWindow()->GetAudioPlayer()->Play(buf, len); } } + +extern "C" int Controller_ShouldRumble(size_t i) { + for (const auto& controller : Ship::Window::Controllers.at(i)) { + if (controller->CanRumble() && Game::Settings.controller.extra[i].rumble_strength > 0.001f) { + return 1; + } + } + + return 0; +} diff --git a/soh/soh/OTRGlobals.h b/soh/soh/OTRGlobals.h index 20080fcb1..dfb235712 100644 --- a/soh/soh/OTRGlobals.h +++ b/soh/soh/OTRGlobals.h @@ -64,4 +64,5 @@ int AudioPlayer_Buffered(void); int AudioPlayer_GetDesiredBuffered(void); void AudioPlayer_Play(const uint8_t* buf, uint32_t len); void AudioMgr_CreateNextAudioBuffer(s16* samples, u32 num_samples); +int Controller_ShouldRumble(size_t i); #endif diff --git a/soh/soh/stubs.c b/soh/soh/stubs.c index 871d5ca22..c47c1fa5d 100644 --- a/soh/soh/stubs.c +++ b/soh/soh/stubs.c @@ -102,7 +102,7 @@ void osCreateViManager(OSPri pri) s32 osMotorInit(OSMesgQueue* ctrlrqueue, OSPfs* pfs, s32 channel) { - + return 0; } u32 osAiGetLength(void) @@ -2099,4 +2099,4 @@ u8 gSequenceFontTable[0x1C0] = { 0x01, 0x12, 0x01, 0x24, 0x01, 0x18, 0x01, 0x19, 0x01, 0x13, 0x01, 0x20, 0x01, 0x1B, 0x01, 0x1C, 0x01, 0x1D, 0x01, 0x03, 0x01, 0x1F, 0x01, 0x20, 0x01, 0x20, 0x01, 0x09, 0x01, 0x21, 0x01, 0x22, 0x01, 0x21, 0x01, 0x09, 0x01, 0x20, 0x01, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; \ No newline at end of file +}; diff --git a/soh/src/code/padmgr.c b/soh/src/code/padmgr.c index 973c2b446..08c89869f 100644 --- a/soh/src/code/padmgr.c +++ b/soh/src/code/padmgr.c @@ -269,7 +269,7 @@ void PadMgr_ProcessInputs(PadMgr* padMgr) { input->press.stick_y += (s8)(input->cur.stick_y - input->prev.stick_y); } - controllerCallback.rumble = padMgr->rumbleEnable[0] > 0 ? 1 : 0; + controllerCallback.rumble = CVar_GetS32("gRumbleEnabled", 0) && (padMgr->rumbleEnable[0] > 0); if (HealthMeter_IsCritical()) { controllerCallback.ledColor = 0; @@ -303,6 +303,11 @@ void PadMgr_HandleRetraceMsg(PadMgr* padMgr) { } osRecvMesg(queue, NULL, OS_MESG_BLOCK); osContGetReadData(padMgr->pads); + + for (i = 0; i < __osMaxControllers; i++) { + padMgr->padStatus[i].status = CVar_GetS32("gRumbleEnabled", 0) && Controller_ShouldRumble(i); + } + if (padMgr->preNMIShutdown) { memset(padMgr->pads, 0, sizeof(padMgr->pads)); } From 02930be9ee876d998c5ca7a09c934ef69a8b8083 Mon Sep 17 00:00:00 2001 From: Zion <62904587+ZionHelios@users.noreply.github.com> Date: Wed, 27 Apr 2022 21:16:26 -0400 Subject: [PATCH 081/146] Update SohImGuiImpl.cpp Added back EndMenu into the Cheats section. Preventing the dropdown from expanding across the screen. Co-Authored-By: IShallRiseAgain <49771132+IShallRiseAgain@users.noreply.github.com> --- libultraship/libultraship/SohImGuiImpl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 5111a0d6d..3ac73ef82 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -605,6 +605,7 @@ namespace SohImGui { CVar_SetS32("gSuperTunic", Game::Settings.cheats.super_tunic); needs_save = true; } + ImGui::EndMenu(); } if (ImGui::BeginMenu("Cosmetics")) { From 60cbfd67beacf2b2f38947ff350cfb80aca9b32d Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Wed, 27 Apr 2022 22:14:38 -0500 Subject: [PATCH 082/146] Fixed master volume slider --- libultraship/libultraship/SohImGuiImpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 3ac73ef82..83ff7ef0e 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -391,8 +391,8 @@ namespace SohImGui { if (ImGui::BeginMenu("Audio")) { const float volume = Game::Settings.audio.master; ImGui::Text("Master Volume: %d %%", static_cast(100 * volume)); - if (ImGui::SliderFloat("##Master_Vol", &Game::Settings.audio.master, 0.0f, 1.0f, "")) { - CVar_SetFloat("gGameMasterVolume", volume); + if (ImGui::SliderFloat("##Master_Vol", &Game::Settings.audio.master, 0.0f, 1.0f, "", ImGuiSliderFlags_AlwaysClamp)) { + CVar_SetFloat("gGameMasterVolume", Game::Settings.audio.master); needs_save = true; } From 73194eee14a5b107ccc43c686404f953e008debc Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Wed, 27 Apr 2022 22:27:54 -0500 Subject: [PATCH 083/146] Removed DirtyDirectory on kaleido --- .../overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c index ac1864412..8732093ca 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c @@ -1619,9 +1619,9 @@ void KaleidoScope_DrawInfoPanel(GlobalContext* globalCtx) { gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 180, 210, 255, 255); } } - + gSPDisplayList(POLY_KAL_DISP++, gLButtonIconDL); - + if (CVar_GetS32("gUniformLR", 0) == 0) { //Restore the misplace gDPSetPrimColor gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 180, 210, 255, 255); } @@ -3990,8 +3990,6 @@ void KaleidoScope_Update(GlobalContext* globalCtx) R_UPDATE_RATE = 3; R_PAUSE_MENU_MODE = 0; - ResourceMgr_DirtyDirectory("textures/icon_item_24_static*"); - ResourceMgr_DirtyDirectory("textures/icon_item_static*"); CVar_SetS32("gPauseTriforce", 0); func_800981B8(&globalCtx->objectCtx); From f5d983d06b01f789934aaf7413d6b2f1e42bfc22 Mon Sep 17 00:00:00 2001 From: Sirius902 <3645979-Sirius902@users.noreply.gitlab.com> Date: Sun, 24 Apr 2022 18:33:19 -0700 Subject: [PATCH 084/146] Put hookshot reticle on TITLE_CARD_DISP --- soh/src/code/z_player_lib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c index 4adbb75ce..4bf581fc3 100644 --- a/soh/src/code/z_player_lib.c +++ b/soh/src/code/z_player_lib.c @@ -1215,7 +1215,7 @@ void Player_DrawHookshotReticle(GlobalContext* globalCtx, Player* this, f32 arg2 if (BgCheck_AnyLineTest3(&globalCtx->colCtx, &sp8C, &sp80, &sp74, &sp9C, 1, 1, 1, 1, &bgId)) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 2572); - OVERLAY_DISP = Gfx_CallSetupDL(OVERLAY_DISP, 0x07); + TITLE_CARD_DISP = Gfx_CallSetupDL(TITLE_CARD_DISP, 0x07); SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &sp74, &sp68, &sp64); @@ -1224,10 +1224,10 @@ void Player_DrawHookshotReticle(GlobalContext* globalCtx, Player* this, f32 arg2 Matrix_Translate(sp74.x, sp74.y, sp74.z, MTXMODE_NEW); Matrix_Scale(sp60, sp60, sp60, MTXMODE_APPLY); - gSPMatrix(OVERLAY_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_player_lib.c", 2587), + gSPMatrix(TITLE_CARD_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_player_lib.c", 2587), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(OVERLAY_DISP++, 0x06, globalCtx->objectCtx.status[this->actor.objBankIndex].segment); - gSPDisplayList(OVERLAY_DISP++, gLinkAdultHookshotReticleDL); + gSPSegment(TITLE_CARD_DISP++, 0x06, globalCtx->objectCtx.status[this->actor.objBankIndex].segment); + gSPDisplayList(TITLE_CARD_DISP++, gLinkAdultHookshotReticleDL); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 2592); } From 2425ffe27b2b2b4ceec76b220bf35bc8880c0eb3 Mon Sep 17 00:00:00 2001 From: Sirius902 <3645979-Sirius902@users.noreply.gitlab.com> Date: Fri, 29 Apr 2022 13:21:47 -0700 Subject: [PATCH 085/146] Put hookshot reticle on TITLE_CARD_DISP Rename to WORLD_OVERLAY_DISP Remove no-ops --- soh/include/macros.h | 12 ++++++------ soh/include/z64.h | 6 +++--- soh/src/code/graph.c | 10 ++++------ soh/src/code/z_actor.c | 15 +++++++-------- soh/src/code/z_player_lib.c | 8 ++++---- 5 files changed, 24 insertions(+), 27 deletions(-) diff --git a/soh/include/macros.h b/soh/include/macros.h index 8563449b1..c57effe02 100644 --- a/soh/include/macros.h +++ b/soh/include/macros.h @@ -126,12 +126,12 @@ extern GraphicsContext* __gfxCtx; -#define WORK_DISP __gfxCtx->work.p -#define POLY_OPA_DISP __gfxCtx->polyOpa.p -#define POLY_XLU_DISP __gfxCtx->polyXlu.p -#define TITLE_CARD_DISP __gfxCtx->titlecard.p -#define POLY_KAL_DISP __gfxCtx->polyKal.p -#define OVERLAY_DISP __gfxCtx->overlay.p +#define WORK_DISP __gfxCtx->work.p +#define POLY_OPA_DISP __gfxCtx->polyOpa.p +#define POLY_XLU_DISP __gfxCtx->polyXlu.p +#define WORLD_OVERLAY_DISP __gfxCtx->worldOverlay.p +#define POLY_KAL_DISP __gfxCtx->polyKal.p +#define OVERLAY_DISP __gfxCtx->overlay.p // __gfxCtx shouldn't be used directly. // Use the DISP macros defined above when writing to display buffers. diff --git a/soh/include/z64.h b/soh/include/z64.h index 92966f239..f0dfba52d 100644 --- a/soh/include/z64.h +++ b/soh/include/z64.h @@ -83,7 +83,7 @@ typedef struct { /* 0x00000 */ u16 headMagic; // GFXPOOL_HEAD_MAGIC /* 0x00008 */ Gfx polyOpaBuffer[0x2FC0]; /* 0x0BF08 */ Gfx polyXluBuffer[0x1000]; - /* 0xXXXXX */ Gfx titlecardBuffer[0x1000]; + /* 0xXXXXX */ Gfx worldOverlayBuffer[0x1000]; /* 0x0BF08 */ Gfx polyKalBuffer[0x1000]; /* 0x0FF08 */ Gfx overlayBuffer[0x800]; /* 0x11F08 */ Gfx workBuffer[0x100]; @@ -131,7 +131,7 @@ typedef struct OSScTask { typedef struct GraphicsContext { /* 0x0000 */ Gfx* polyOpaBuffer; // Pointer to "Zelda 0" /* 0x0004 */ Gfx* polyXluBuffer; // Pointer to "Zelda 1" - /* 0xXXX */ Gfx* titlecardBuffer; // Pointer to "Paris" + /* 0xXXX */ Gfx* worldOverlayBuffer; // Pointer to "Paris" /* 0xXXX */ Gfx* polyKalBuffer; // Pointer to "Rome" /* 0x0008 */ char unk_008[0x08]; // Unused, could this be pointers to "Zelda 2" / "Zelda 3" /* 0x0010 */ Gfx* overlayBuffer; // Pointer to "Zelda 4" @@ -151,7 +151,7 @@ typedef struct GraphicsContext { /* 0x02A8 */ TwoHeadGfxArena overlay; // "Zelda 4" /* 0x02B8 */ TwoHeadGfxArena polyOpa; // "Zelda 0" /* 0x02C8 */ TwoHeadGfxArena polyXlu; // "Zelda 1" - /* 0x0XXX */ TwoHeadGfxArena titlecard; // When in Paris... + /* 0x0XXX */ TwoHeadGfxArena worldOverlay; // When in Paris... /* 0x0XXX */ TwoHeadGfxArena polyKal; // When in Rome... /* 0x02D8 */ u32 gfxPoolIdx; /* 0x02DC */ u16* curFrameBuffer; diff --git a/soh/src/code/graph.c b/soh/src/code/graph.c index dbbbb9df1..10293fa5f 100644 --- a/soh/src/code/graph.c +++ b/soh/src/code/graph.c @@ -95,14 +95,14 @@ void Graph_InitTHGA(GraphicsContext* gfxCtx) { pool->tailMagic = GFXPOOL_TAIL_MAGIC; THGA_Ct(&gfxCtx->polyOpa, pool->polyOpaBuffer, sizeof(pool->polyOpaBuffer)); THGA_Ct(&gfxCtx->polyXlu, pool->polyXluBuffer, sizeof(pool->polyXluBuffer)); - THGA_Ct(&gfxCtx->titlecard, pool->titlecardBuffer, sizeof(pool->titlecardBuffer)); + THGA_Ct(&gfxCtx->worldOverlay, pool->worldOverlayBuffer, sizeof(pool->worldOverlayBuffer)); THGA_Ct(&gfxCtx->polyKal, pool->polyKalBuffer, sizeof(pool->polyKalBuffer)); THGA_Ct(&gfxCtx->overlay, pool->overlayBuffer, sizeof(pool->overlayBuffer)); THGA_Ct(&gfxCtx->work, pool->workBuffer, sizeof(pool->workBuffer)); gfxCtx->polyOpaBuffer = pool->polyOpaBuffer; gfxCtx->polyXluBuffer = pool->polyXluBuffer; - gfxCtx->titlecardBuffer = pool->titlecardBuffer; + gfxCtx->worldOverlayBuffer = pool->worldOverlayBuffer; gfxCtx->polyKalBuffer = pool->polyKalBuffer; gfxCtx->overlayBuffer = pool->overlayBuffer; gfxCtx->workBuffer = pool->workBuffer; @@ -276,7 +276,6 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { gDPNoOpString(WORK_DISP++, "WORK_DISP 開始", 0); gDPNoOpString(POLY_OPA_DISP++, "POLY_OPA_DISP 開始", 0); gDPNoOpString(POLY_XLU_DISP++, "POLY_XLU_DISP 開始", 0); - gDPNoOpString(TITLE_CARD_DISP++, "TITLE_CARD_DISP 開始", 0);//unsure if needed gDPNoOpString(OVERLAY_DISP++, "OVERLAY_DISP 開始", 0); CLOSE_DISPS(gfxCtx, "../graph.c", 975); @@ -289,7 +288,6 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { gDPNoOpString(WORK_DISP++, "WORK_DISP 終了", 0); gDPNoOpString(POLY_OPA_DISP++, "POLY_OPA_DISP 終了", 0); gDPNoOpString(POLY_XLU_DISP++, "POLY_XLU_DISP 終了", 0); - gDPNoOpString(TITLE_CARD_DISP++, "TITLE_CARD_DISP 終了", 0); gDPNoOpString(OVERLAY_DISP++, "OVERLAY_DISP 終了", 0); CLOSE_DISPS(gfxCtx, "../graph.c", 996); @@ -298,8 +296,8 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { gSPBranchList(WORK_DISP++, gfxCtx->polyOpaBuffer); gSPBranchList(POLY_OPA_DISP++, gfxCtx->polyXluBuffer); - gSPBranchList(POLY_XLU_DISP++, gfxCtx->titlecardBuffer); - gSPBranchList(TITLE_CARD_DISP++, gfxCtx->polyKalBuffer); + gSPBranchList(POLY_XLU_DISP++, gfxCtx->worldOverlayBuffer); + gSPBranchList(WORLD_OVERLAY_DISP++, gfxCtx->polyKalBuffer); gSPBranchList(POLY_KAL_DISP++, gfxCtx->overlayBuffer); gDPPipeSync(OVERLAY_DISP++); gDPFullSync(OVERLAY_DISP++); diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index 0c46a8fc5..bb55009bb 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -1022,31 +1022,30 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) { height = (width * height > 0x1000) ? 0x1000 / width : height; titleSecondY = titleY + (height * 4); - //TITLE_CARD_DISP Goes over POLY_XLU_DISP but under POLY_KAL_DISP - TITLE_CARD_DISP = func_80093808(TITLE_CARD_DISP); + // WORLD_OVERLAY_DISP Goes over POLY_XLU_DISP but under POLY_KAL_DISP + WORLD_OVERLAY_DISP = func_80093808(WORLD_OVERLAY_DISP); - gDPSetPrimColor(TITLE_CARD_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity, + gDPSetPrimColor(WORLD_OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->alpha); - gDPLoadTextureBlock(TITLE_CARD_DISP++, (uintptr_t)titleCtx->texture, G_IM_FMT_IA, - + gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(TITLE_CARD_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4) - 1, + gSPTextureRectangle(WORLD_OVERLAY_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4) - 1, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); height = titleCtx->height - height; // If texture is bigger than 0x1000, display the rest if (height > 0) { - gDPLoadTextureBlock(TITLE_CARD_DISP++, (uintptr_t)titleCtx->texture + 0x1000, + gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture + 0x1000, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(TITLE_CARD_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4, + gSPTextureRectangle(WORLD_OVERLAY_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4, titleSecondY + (height * 4) - 1, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); } diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c index 4bf581fc3..0251ee498 100644 --- a/soh/src/code/z_player_lib.c +++ b/soh/src/code/z_player_lib.c @@ -1215,7 +1215,7 @@ void Player_DrawHookshotReticle(GlobalContext* globalCtx, Player* this, f32 arg2 if (BgCheck_AnyLineTest3(&globalCtx->colCtx, &sp8C, &sp80, &sp74, &sp9C, 1, 1, 1, 1, &bgId)) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 2572); - TITLE_CARD_DISP = Gfx_CallSetupDL(TITLE_CARD_DISP, 0x07); + WORLD_OVERLAY_DISP = Gfx_CallSetupDL(WORLD_OVERLAY_DISP, 0x07); SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &sp74, &sp68, &sp64); @@ -1224,10 +1224,10 @@ void Player_DrawHookshotReticle(GlobalContext* globalCtx, Player* this, f32 arg2 Matrix_Translate(sp74.x, sp74.y, sp74.z, MTXMODE_NEW); Matrix_Scale(sp60, sp60, sp60, MTXMODE_APPLY); - gSPMatrix(TITLE_CARD_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_player_lib.c", 2587), + gSPMatrix(WORLD_OVERLAY_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_player_lib.c", 2587), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(TITLE_CARD_DISP++, 0x06, globalCtx->objectCtx.status[this->actor.objBankIndex].segment); - gSPDisplayList(TITLE_CARD_DISP++, gLinkAdultHookshotReticleDL); + gSPSegment(WORLD_OVERLAY_DISP++, 0x06, globalCtx->objectCtx.status[this->actor.objBankIndex].segment); + gSPDisplayList(WORLD_OVERLAY_DISP++, gLinkAdultHookshotReticleDL); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 2592); } From 700bce684d8d33bc1c4fbf200a7d7b69250aad1b Mon Sep 17 00:00:00 2001 From: Nicholas Estelami Date: Mon, 25 Apr 2022 02:27:24 -0400 Subject: [PATCH 086/146] Removed redundant parameters in GameSettings --- libultraship/libultraship/GameSettings.cpp | 295 +------------------- libultraship/libultraship/GameSettings.h | 96 +------ libultraship/libultraship/SDLController.cpp | 2 + libultraship/libultraship/SohImGuiImpl.cpp | 283 ++++++++----------- libultraship/libultraship/SohImGuiImpl.h | 6 + soh/soh/Enhancements/debugconsole.cpp | 3 - soh/soh/Enhancements/debugconsole.h | 4 +- 7 files changed, 137 insertions(+), 552 deletions(-) diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index 244e1a394..799681d59 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -14,6 +14,7 @@ #include "../../soh/include/z64audio.h" #include #include "SohHooks.h" +#include "../../soh/soh/Enhancements/debugconsole.h" #include "Window.h" @@ -34,14 +35,13 @@ namespace Game { void UpdateAudio() { - Audio_SetGameVolume(SEQ_BGM_MAIN, Settings.audio.music_main); - Audio_SetGameVolume(SEQ_BGM_SUB, Settings.audio.music_sub); - Audio_SetGameVolume(SEQ_FANFARE, Settings.audio.fanfare); - Audio_SetGameVolume(SEQ_SFX, Settings.audio.sfx); + Audio_SetGameVolume(SEQ_BGM_MAIN, CVar_GetFloat("gMainMusicVolume", 1)); + Audio_SetGameVolume(SEQ_BGM_SUB, CVar_GetFloat("gSubMusicVolume", 1)); + Audio_SetGameVolume(SEQ_FANFARE, CVar_GetFloat("gSFXMusicVolume", 1)); + Audio_SetGameVolume(SEQ_SFX, CVar_GetFloat("gFanfareVolume", 1)); } void LoadSettings() { - const std::shared_ptr pConf = GlobalCtx2::GetInstance()->GetConfig(); ConfigFile& Conf = *pConf; @@ -50,196 +50,6 @@ namespace Game { Settings.debug.menu_bar = stob(Conf[ConfSection]["menu_bar"]); Settings.debug.soh = stob(Conf[ConfSection]["soh_debug"]); - Settings.debug.n64mode = stob(Conf[ConfSection]["n64_mode"]); - - // Enhancements - Settings.enhancements.skip_text = stob(Conf[EnhancementSection]["skip_text"]); - CVar_SetS32("gSkipText", Settings.enhancements.skip_text); - - Settings.enhancements.text_speed = Ship::stoi(Conf[EnhancementSection]["text_speed"]); - CVar_SetS32("gTextSpeed", Settings.enhancements.text_speed); - - Settings.enhancements.disable_lod = stob(Conf[EnhancementSection]["disable_lod"]); - CVar_SetS32("gDisableLOD", Settings.enhancements.disable_lod); - - Settings.enhancements.animated_pause_menu = stob(Conf[EnhancementSection]["animated_pause_menu"]); - CVar_SetS32("gPauseLiveLink", Settings.enhancements.animated_pause_menu); - - Settings.enhancements.dynamic_wallet_icon = stob(Conf[EnhancementSection]["dynamic_wallet_icon"]); - CVar_SetS32("gDynamicWalletIcon", Settings.enhancements.dynamic_wallet_icon); - - Settings.enhancements.minimal_ui = stob(Conf[EnhancementSection]["minimal_ui"]); - CVar_SetS32("gMinimalUI", Settings.enhancements.minimal_ui); - - Settings.enhancements.visualagony = stob(Conf[EnhancementSection]["visualagony"]); - CVar_SetS32("gVisualAgony", Settings.enhancements.visualagony); - - Settings.enhancements.mm_bunny_hood = stob(Conf[EnhancementSection]["mm_bunny_hood"]); - CVar_SetS32("gMMBunnyHood", Settings.enhancements.mm_bunny_hood); - - Settings.enhancements.uniform_lr = stob(Conf[EnhancementSection]["uniform_lr"]); - //CVar_SetS32("gUniformLR", Settings.enhancements.uniform_lr); - CVar_SetS32("gUniformLR", 1); - - Settings.enhancements.newdrops = stob(Conf[EnhancementSection]["newdrops"]); - CVar_SetS32("gNewDrops", Settings.enhancements.newdrops); - - // Audio - Settings.audio.master = Ship::stof(Conf[AudioSection]["master"]); - CVar_SetFloat("gGameMasterVolume", Settings.audio.master); - - Settings.audio.music_main = Ship::stof(Conf[AudioSection]["music_main"]); - CVar_SetFloat("gMainMusicVolume", Settings.audio.music_main); - - Settings.audio.music_sub = Ship::stof(Conf[AudioSection]["music_sub"]); - CVar_SetFloat("gSubMusicVolume", Settings.audio.music_sub); - - Settings.audio.sfx = Ship::stof(Conf[AudioSection]["sfx"]); - CVar_SetFloat("gSFXMusicVolume", Settings.audio.sfx); - - Settings.audio.fanfare = Ship::stof(Conf[AudioSection]["fanfare"]); - CVar_SetFloat("gFanfareVolume", Settings.audio.fanfare); - - // Controllers - Settings.controller.rumble_enabled = Ship::stof(Conf[ControllerSection]["rumble_enabled"]); - CVar_SetS32("gRumbleEnabled", Settings.controller.rumble_enabled); - - Settings.controller.input_scale = Ship::stof(Conf[ControllerSection]["input_scale"]); - CVar_SetFloat("gInputScale", Settings.controller.input_scale); - - Settings.controller.input_enabled = stob(Conf[ControllerSection]["input_enabled"]); - - CVar_SetS32("gInputEnabled", Settings.controller.input_enabled); - //Tunics - Settings.cosmetic.tunic_kokiri_red = (Conf[CosmeticsSection]["tunic_kokiri_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_kokiri_red"]) : Settings.cosmetic.tunic_kokiri_red; - CVar_SetS32("gTunic_Kokiri_Red", Settings.cosmetic.tunic_kokiri_red); - Settings.cosmetic.tunic_kokiri_green = (Conf[CosmeticsSection]["tunic_kokiri_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_kokiri_green"]) : Settings.cosmetic.tunic_kokiri_green; - CVar_SetS32("gTunic_Kokiri_Green", Settings.cosmetic.tunic_kokiri_green); - Settings.cosmetic.tunic_kokiri_blue = (Conf[CosmeticsSection]["tunic_kokiri_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_kokiri_blue"]) : Settings.cosmetic.tunic_kokiri_blue; - CVar_SetS32("gTunic_Kokiri_Blue", Settings.cosmetic.tunic_kokiri_blue); - - Settings.cosmetic.tunic_goron_red = (Conf[CosmeticsSection]["tunic_goron_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_goron_red"]) : Settings.cosmetic.tunic_goron_red; - CVar_SetS32("gTunic_Goron_Red", Settings.cosmetic.tunic_goron_red); - Settings.cosmetic.tunic_goron_green = (Conf[CosmeticsSection]["tunic_goron_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_goron_green"]) : Settings.cosmetic.tunic_goron_green; - CVar_SetS32("gTunic_Goron_Green", Settings.cosmetic.tunic_goron_green); - Settings.cosmetic.tunic_goron_blue = (Conf[CosmeticsSection]["tunic_goron_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_goron_blue"]) : Settings.cosmetic.tunic_goron_blue; - CVar_SetS32("gTunic_Goron_Blue", Settings.cosmetic.tunic_goron_blue); - - Settings.cosmetic.tunic_zora_red = (Conf[CosmeticsSection]["tunic_zora_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_zora_red"]) : Settings.cosmetic.tunic_zora_red; - CVar_SetS32("gTunic_Zora_Red", Settings.cosmetic.tunic_zora_red); - Settings.cosmetic.tunic_zora_green = (Conf[CosmeticsSection]["tunic_zora_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["tunic_zora_green"]) : Settings.cosmetic.tunic_zora_green; - CVar_SetS32("gTunic_Zora_Green", Settings.cosmetic.tunic_zora_green); - Settings.cosmetic.tunic_zora_blue = (Conf[CosmeticsSection]["tunic_zora_blue"] != "" ) ? Ship::stoi(Conf[CosmeticsSection]["tunic_zora_blue"]) : Settings.cosmetic.tunic_zora_blue; - CVar_SetS32("gTunic_Zora_Blue", Settings.cosmetic.tunic_zora_blue); - //Navi - Settings.cosmetic.navi_idle_inner_red = (Conf[CosmeticsSection]["navi_idle_inner_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_idle_inner_red"]) : Settings.cosmetic.navi_idle_inner_red; - CVar_SetS32("gNavi_Idle_Inner_Red", Settings.cosmetic.navi_idle_inner_red); - Settings.cosmetic.navi_idle_inner_green = (Conf[CosmeticsSection]["navi_idle_inner_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_idle_inner_green"]) : Settings.cosmetic.navi_idle_inner_green; - CVar_SetS32("gNavi_Idle_Inner_Green", Settings.cosmetic.navi_idle_inner_green); - Settings.cosmetic.navi_idle_inner_blue = (Conf[CosmeticsSection]["navi_idle_inner_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_idle_inner_blue"]) : Settings.cosmetic.navi_idle_inner_blue; - CVar_SetS32("gNavi_Idle_Inner_Blue", Settings.cosmetic.navi_idle_inner_blue); - Settings.cosmetic.navi_idle_outer_red = (Conf[CosmeticsSection]["navi_idle_outer_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_idle_outer_red"]) : Settings.cosmetic.navi_idle_outer_red; - CVar_SetS32("gNavi_Idle_Outer_Red", Settings.cosmetic.navi_idle_outer_red); - Settings.cosmetic.navi_idle_outer_green = (Conf[CosmeticsSection]["navi_idle_outer_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_idle_outer_green"]) : Settings.cosmetic.navi_idle_outer_green; - CVar_SetS32("gNavi_Idle_Outer_Green", Settings.cosmetic.navi_idle_outer_green); - Settings.cosmetic.navi_idle_outer_blue = (Conf[CosmeticsSection]["navi_idle_outer_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_idle_outer_blue"]) : Settings.cosmetic.navi_idle_outer_blue; - CVar_SetS32("gNavi_Idle_Outer_Blue", Settings.cosmetic.navi_idle_outer_blue); - - Settings.cosmetic.navi_npc_inner_red = (Conf[CosmeticsSection]["navi_npc_inner_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_npc_inner_red"]) : Settings.cosmetic.navi_npc_inner_red; - CVar_SetS32("gNavi_NPC_Inner_Red", Settings.cosmetic.navi_npc_inner_red); - Settings.cosmetic.navi_npc_inner_green = (Conf[CosmeticsSection]["navi_npc_inner_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_npc_inner_green"]) : Settings.cosmetic.navi_npc_inner_green; - CVar_SetS32("gNavi_NPC_Inner_Green", Settings.cosmetic.navi_npc_inner_green); - Settings.cosmetic.navi_npc_inner_blue = (Conf[CosmeticsSection]["navi_npc_inner_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_npc_inner_blue"]) : Settings.cosmetic.navi_npc_inner_blue; - CVar_SetS32("gNavi_NPC_Inner_Blue", Settings.cosmetic.navi_npc_inner_blue); - Settings.cosmetic.navi_npc_outer_red = (Conf[CosmeticsSection]["navi_npc_outer_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_npc_outer_red"]) : Settings.cosmetic.navi_npc_outer_red; - CVar_SetS32("gNavi_NPC_Outer_Red", Settings.cosmetic.navi_npc_outer_red); - Settings.cosmetic.navi_npc_outer_green = (Conf[CosmeticsSection]["navi_npc_outer_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_npc_outer_green"]) : Settings.cosmetic.navi_npc_outer_green; - CVar_SetS32("gNavi_NPC_Outer_Green", Settings.cosmetic.navi_npc_outer_green); - Settings.cosmetic.navi_npc_outer_blue = (Conf[CosmeticsSection]["navi_npc_outer_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_npc_outer_blue"]) : Settings.cosmetic.navi_npc_outer_blue; - CVar_SetS32("gNavi_NPC_Outer_Blue", Settings.cosmetic.navi_npc_outer_blue); - - Settings.cosmetic.navi_enemy_inner_red = (Conf[CosmeticsSection]["navi_enemy_inner_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_enemy_inner_red"]) : Settings.cosmetic.navi_enemy_inner_red; - CVar_SetS32("gNavi_Enemy_Inner_Red", Settings.cosmetic.navi_enemy_inner_red); - Settings.cosmetic.navi_enemy_inner_green = (Conf[CosmeticsSection]["navi_enemy_inner_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_enemy_inner_green"]) : Settings.cosmetic.navi_enemy_inner_green; - CVar_SetS32("gNavi_Enemy_Inner_Green", Settings.cosmetic.navi_enemy_inner_green); - Settings.cosmetic.navi_enemy_inner_blue = (Conf[CosmeticsSection]["navi_enemy_inner_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_enemy_inner_blue"]) : Settings.cosmetic.navi_enemy_inner_blue; - CVar_SetS32("gNavi_Enemy_Inner_Blue", Settings.cosmetic.navi_enemy_inner_blue); - Settings.cosmetic.navi_enemy_outer_red = (Conf[CosmeticsSection]["navi_enemy_outer_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_enemy_outer_red"]) : Settings.cosmetic.navi_enemy_outer_red; - CVar_SetS32("gNavi_Enemy_Outer_Red", Settings.cosmetic.navi_enemy_outer_red); - Settings.cosmetic.navi_enemy_outer_green = (Conf[CosmeticsSection]["navi_enemy_outer_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_enemy_outer_green"]) : Settings.cosmetic.navi_enemy_outer_green; - CVar_SetS32("gNavi_Enemy_Outer_Green", Settings.cosmetic.navi_enemy_outer_green); - Settings.cosmetic.navi_enemy_outer_blue = (Conf[CosmeticsSection]["navi_enemy_outer_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_enemy_outer_blue"]) : Settings.cosmetic.navi_enemy_outer_blue; - CVar_SetS32("gNavi_Enemy_Outer_Blue", Settings.cosmetic.navi_enemy_outer_blue); - - Settings.cosmetic.navi_prop_inner_red = (Conf[CosmeticsSection]["navi_prop_inner_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_prop_inner_red"]) : Settings.cosmetic.navi_prop_inner_red; - CVar_SetS32("gNavi_Prop_Inner_Red", Settings.cosmetic.navi_prop_inner_red); - Settings.cosmetic.navi_prop_inner_green = (Conf[CosmeticsSection]["navi_prop_inner_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_prop_inner_green"]) : Settings.cosmetic.navi_prop_inner_green; - CVar_SetS32("gNavi_Prop_Inner_Green", Settings.cosmetic.navi_prop_inner_green); - Settings.cosmetic.navi_prop_inner_blue = (Conf[CosmeticsSection]["navi_prop_inner_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_prop_inner_blue"]) : Settings.cosmetic.navi_prop_inner_blue; - CVar_SetS32("gNavi_Prop_Inner_Blue", Settings.cosmetic.navi_prop_inner_blue); - Settings.cosmetic.navi_prop_outer_red = (Conf[CosmeticsSection]["navi_prop_outer_red"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_prop_outer_red"]) : Settings.cosmetic.navi_prop_outer_red; - CVar_SetS32("gNavi_Prop_Outer_Red", Settings.cosmetic.navi_prop_outer_red); - Settings.cosmetic.navi_prop_outer_green = (Conf[CosmeticsSection]["navi_prop_outer_green"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_prop_outer_green"]) : Settings.cosmetic.navi_prop_outer_green; - CVar_SetS32("gNavi_Prop_Outer_Green", Settings.cosmetic.navi_prop_outer_green); - Settings.cosmetic.navi_prop_outer_blue = (Conf[CosmeticsSection]["navi_prop_outer_blue"] != "") ? Ship::stoi(Conf[CosmeticsSection]["navi_prop_outer_blue"]) : Settings.cosmetic.navi_prop_outer_blue; - CVar_SetS32("gNavi_Prop_Outer_Blue", Settings.cosmetic.navi_prop_outer_blue); - - - - CVar_SetS32("gInputEnabled", Settings.controller.input_enabled); - - Settings.controller.dpad_pause_name = stob(Conf[ControllerSection]["dpad_pause_name"]); - CVar_SetS32("gDpadPauseName", Settings.controller.dpad_pause_name); - - Settings.controller.dpad_ocarina_text = stob(Conf[ControllerSection]["dpad_ocarina_text"]); - CVar_SetS32("gDpadOcarinaText", Settings.controller.dpad_ocarina_text); - - Settings.controller.dpad_shop = stob(Conf[ControllerSection]["dpad_shop"]); - CVar_SetS32("gDpadShop", Settings.controller.dpad_shop); - - // Cheats - Settings.cheats.debug_mode = stob(Conf[CheatSection]["debug_mode"]); - CVar_SetS32("gDebugEnabled", Settings.cheats.debug_mode); - - Settings.cheats.infinite_money = stob(Conf[CheatSection]["infinite_money"]); - CVar_SetS32("gInfiniteMoney", Settings.cheats.infinite_money); - - Settings.cheats.infinite_health = stob(Conf[CheatSection]["infinite_health"]); - CVar_SetS32("gInfiniteHealth", Settings.cheats.infinite_health); - - Settings.cheats.infinite_ammo = stob(Conf[CheatSection]["infinite_ammo"]); - CVar_SetS32("gInfiniteAmmo", Settings.cheats.infinite_ammo); - - Settings.cheats.infinite_magic = stob(Conf[CheatSection]["infinite_magic"]); - CVar_SetS32("gInfiniteMagic", Settings.cheats.infinite_magic); - - Settings.cheats.infinite_nayru = stob(Conf[CheatSection]["infinite_nayru"]); - CVar_SetS32("gInfiniteNayru", Settings.cheats.infinite_nayru); - - Settings.cheats.no_clip = stob(Conf[CheatSection]["no_clip"]); - CVar_SetS32("gNoClip", Settings.cheats.no_clip); - - Settings.cheats.climb_everything = stob(Conf[CheatSection]["climb_everything"]); - CVar_SetS32("gClimbEverything", Settings.cheats.climb_everything); - - Settings.cheats.moon_jump_on_l = stob(Conf[CheatSection]["moon_jump_on_l"]); - CVar_SetS32("gMoonJumpOnL", Settings.cheats.moon_jump_on_l); - - Settings.cheats.super_tunic = stob(Conf[CheatSection]["super_tunic"]); - CVar_SetS32("gSuperTunic", Settings.cheats.super_tunic); - - Settings.cheats.ez_isg = stob(Conf[CheatSection]["ez_isg"]); - CVar_SetS32("gEzISG", Settings.cheats.ez_isg); - - Settings.cheats.no_restrict_item = stob(Conf[CheatSection]["no_restrict_item"]); - CVar_SetS32("gNoRestrictItems", Settings.cheats.no_restrict_item); - - Settings.cheats.freeze_time = stob(Conf[CheatSection]["freeze_time"]); - CVar_SetS32("gFreezeTime", Settings.cheats.freeze_time); - - // Per-Controller - LoadPadSettings(); - UpdateAudio(); } @@ -267,102 +77,9 @@ namespace Game { Conf[ConfSection]["console"] = std::to_string(SohImGui::console->opened); Conf[ConfSection]["menu_bar"] = std::to_string(Settings.debug.menu_bar); Conf[ConfSection]["soh_debug"] = std::to_string(Settings.debug.soh); - Conf[ConfSection]["n64_mode"] = std::to_string(Settings.debug.n64mode); - - // Audio - Conf[AudioSection]["master"] = std::to_string(Settings.audio.master); - Conf[AudioSection]["music_main"] = std::to_string(Settings.audio.music_main); - Conf[AudioSection]["music_sub"] = std::to_string(Settings.audio.music_sub); - Conf[AudioSection]["sfx"] = std::to_string(Settings.audio.sfx); - Conf[AudioSection]["fanfare"] = std::to_string(Settings.audio.fanfare); - - // Enhancements - Conf[EnhancementSection]["skip_text"] = std::to_string(Settings.enhancements.skip_text); - Conf[EnhancementSection]["text_speed"] = std::to_string(Settings.enhancements.text_speed); - Conf[EnhancementSection]["disable_lod"] = std::to_string(Settings.enhancements.disable_lod); - Conf[EnhancementSection]["animated_pause_menu"] = std::to_string(Settings.enhancements.animated_pause_menu); - Conf[EnhancementSection]["dynamic_wallet_icon"] = std::to_string(Settings.enhancements.dynamic_wallet_icon); - Conf[EnhancementSection]["minimal_ui"] = std::to_string(Settings.enhancements.minimal_ui); - Conf[EnhancementSection]["newdrops"] = std::to_string(Settings.enhancements.newdrops); - Conf[EnhancementSection]["visualagony"] = std::to_string(Settings.enhancements.visualagony); - Conf[EnhancementSection]["mm_bunny_hood"] = std::to_string(Settings.enhancements.mm_bunny_hood); - Conf[EnhancementSection]["uniform_lr"] = std::to_string(Settings.enhancements.uniform_lr); - - - // Controllers - Conf[ControllerSection]["rumble_enabled"] = std::to_string(Settings.controller.rumble_enabled); - Conf[ControllerSection]["input_scale"] = std::to_string(Settings.controller.input_scale); - Conf[ControllerSection]["input_enabled"] = std::to_string(Settings.controller.input_enabled); - Conf[ControllerSection]["dpad_pause_name"] = std::to_string(Settings.controller.dpad_pause_name); - Conf[ControllerSection]["dpad_ocarina_text"] = std::to_string(Settings.controller.dpad_ocarina_text); - Conf[ControllerSection]["dpad_shop"] = std::to_string(Settings.controller.dpad_shop); - - - // Cosmetics - Conf[CosmeticsSection]["tunic_kokiri_red"] = std::to_string(Settings.cosmetic.tunic_kokiri_red); - Conf[CosmeticsSection]["tunic_kokiri_green"] = std::to_string(Settings.cosmetic.tunic_kokiri_green); - Conf[CosmeticsSection]["tunic_kokiri_blue"] = std::to_string(Settings.cosmetic.tunic_kokiri_blue); - - Conf[CosmeticsSection]["tunic_goron_red"] = std::to_string(Settings.cosmetic.tunic_goron_red); - Conf[CosmeticsSection]["tunic_goron_green"] = std::to_string(Settings.cosmetic.tunic_goron_green); - Conf[CosmeticsSection]["tunic_goron_blue"] = std::to_string(Settings.cosmetic.tunic_goron_blue); - - Conf[CosmeticsSection]["tunic_zora_red"] = std::to_string(Settings.cosmetic.tunic_zora_red); - Conf[CosmeticsSection]["tunic_zora_green"] = std::to_string(Settings.cosmetic.tunic_zora_green); - Conf[CosmeticsSection]["tunic_zora_blue"] = std::to_string(Settings.cosmetic.tunic_zora_blue); - - Conf[CosmeticsSection]["navi_idle_inner_red"] = std::to_string(Settings.cosmetic.navi_idle_inner_red); - Conf[CosmeticsSection]["navi_idle_inner_green"] = std::to_string(Settings.cosmetic.navi_idle_inner_green); - Conf[CosmeticsSection]["navi_idle_inner_blue"] = std::to_string(Settings.cosmetic.navi_idle_inner_blue); - Conf[CosmeticsSection]["navi_idle_outer_red"] = std::to_string(Settings.cosmetic.navi_idle_outer_red); - Conf[CosmeticsSection]["navi_idle_outer_green"] = std::to_string(Settings.cosmetic.navi_idle_outer_green); - Conf[CosmeticsSection]["navi_idle_outer_blue"] = std::to_string(Settings.cosmetic.navi_idle_outer_blue); - - Conf[CosmeticsSection]["navi_npc_inner_red"] = std::to_string(Settings.cosmetic.navi_npc_inner_red); - Conf[CosmeticsSection]["navi_npc_inner_green"] = std::to_string(Settings.cosmetic.navi_npc_inner_green); - Conf[CosmeticsSection]["navi_npc_inner_blue"] = std::to_string(Settings.cosmetic.navi_npc_inner_blue); - Conf[CosmeticsSection]["navi_npc_outer_red"] = std::to_string(Settings.cosmetic.navi_npc_outer_red); - Conf[CosmeticsSection]["navi_npc_outer_green"] = std::to_string(Settings.cosmetic.navi_npc_outer_green); - Conf[CosmeticsSection]["navi_npc_outer_blue"] = std::to_string(Settings.cosmetic.navi_npc_outer_blue); - - Conf[CosmeticsSection]["navi_enemy_inner_red"] = std::to_string(Settings.cosmetic.navi_enemy_inner_red); - Conf[CosmeticsSection]["navi_enemy_inner_green"] = std::to_string(Settings.cosmetic.navi_enemy_inner_green); - Conf[CosmeticsSection]["navi_enemy_inner_blue"] = std::to_string(Settings.cosmetic.navi_enemy_inner_blue); - Conf[CosmeticsSection]["navi_enemy_outer_red"] = std::to_string(Settings.cosmetic.navi_enemy_outer_red); - Conf[CosmeticsSection]["navi_enemy_outer_green"] = std::to_string(Settings.cosmetic.navi_enemy_outer_green); - Conf[CosmeticsSection]["navi_enemy_outer_blue"] = std::to_string(Settings.cosmetic.navi_enemy_outer_blue); - - Conf[CosmeticsSection]["navi_prop_inner_red"] = std::to_string(Settings.cosmetic.navi_prop_inner_red); - Conf[CosmeticsSection]["navi_prop_inner_green"] = std::to_string(Settings.cosmetic.navi_prop_inner_green); - Conf[CosmeticsSection]["navi_prop_inner_blue"] = std::to_string(Settings.cosmetic.navi_prop_inner_blue); - Conf[CosmeticsSection]["navi_prop_outer_red"] = std::to_string(Settings.cosmetic.navi_prop_outer_red); - Conf[CosmeticsSection]["navi_prop_outer_green"] = std::to_string(Settings.cosmetic.navi_prop_outer_green); - Conf[CosmeticsSection]["navi_prop_outer_blue"] = std::to_string(Settings.cosmetic.navi_prop_outer_blue); - - // Cheats - Conf[CheatSection]["debug_mode"] = std::to_string(Settings.cheats.debug_mode); - Conf[CheatSection]["infinite_money"] = std::to_string(Settings.cheats.infinite_money); - Conf[CheatSection]["infinite_health"] = std::to_string(Settings.cheats.infinite_health); - Conf[CheatSection]["infinite_ammo"] = std::to_string(Settings.cheats.infinite_ammo); - Conf[CheatSection]["infinite_magic"] = std::to_string(Settings.cheats.infinite_magic); - Conf[CheatSection]["no_clip"] = std::to_string(Settings.cheats.no_clip); - Conf[CheatSection]["climb_everything"] = std::to_string(Settings.cheats.climb_everything); - Conf[CheatSection]["moon_jump_on_l"] = std::to_string(Settings.cheats.moon_jump_on_l); - Conf[CheatSection]["super_tunic"] = std::to_string(Settings.cheats.super_tunic); - - // Per-Controller - for (const auto& [i, controllers] : Ship::Window::Controllers) { - for (const auto& controller : controllers) { - if (auto padConfSection = controller->GetPadConfSection()) { - Conf[*padConfSection]["gyro_sensitivity"] = std::to_string(Settings.controller.extra[i].gyro_sensitivity); - Conf[*padConfSection]["rumble_strength"] = std::to_string(Settings.controller.extra[i].rumble_strength); - Conf[*padConfSection]["gyro_drift_x"] = std::to_string(Settings.controller.extra[i].gyro_drift_x); - Conf[*padConfSection]["gyro_drift_y"] = std::to_string(Settings.controller.extra[i].gyro_drift_y); - } - } - } Conf.Save(); + DebugConsole_SaveCVars(); } void InitSettings() { diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index 2feea8dcb..1678eaf3f 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -4,108 +4,16 @@ struct SoHConfigType { // Debug struct { bool soh = false; - bool n64mode = false; bool menu_bar = false; bool soh_sink = true; } debug; - // Audio - struct { - float master = 1.0f; - float music_main = 1.0f; - float fanfare = 1.0f; - float sfx = 1.0f; - float music_sub = 1.0f; - } audio; - - // Enhancements - struct { - int text_speed = 1; - bool skip_text = false; - bool disable_lod = false; - bool animated_pause_menu = false; - bool dynamic_wallet_icon = false; - bool minimal_ui = false; - bool newdrops = false; - bool visualagony = false; - bool mm_bunny_hood = false; - bool uniform_lr = true; - } enhancements; - // Controller struct { - struct { - float gyro_sensitivity = 1.0f; - float rumble_strength = 1.0f; - float gyro_drift_x = 0.0f; - float gyro_drift_y = 0.0f; - } extra[4]; - bool rumble_enabled = true; - float input_scale = 1.0f; - bool input_enabled = false; - bool dpad_pause_name = false; - bool dpad_ocarina_text = false; - bool dpad_shop = false; + float gyroDriftX = 0.0f; + float gyroDriftY = 0.0f; } controller; - struct { - int tunic_kokiri_red = 30; - int tunic_kokiri_green = 105; - int tunic_kokiri_blue = 27; - int tunic_goron_red = 100; - int tunic_goron_green = 20; - int tunic_goron_blue = 0; - int tunic_zora_red = 0; - int tunic_zora_green = 60; - int tunic_zora_blue = 100; - - int navi_idle_inner_red = 255; - int navi_idle_inner_green = 255; - int navi_idle_inner_blue = 255; - int navi_idle_outer_red = 0; - int navi_idle_outer_green = 0; - int navi_idle_outer_blue = 255; - - int navi_enemy_inner_red = 255; - int navi_enemy_inner_green = 255; - int navi_enemy_inner_blue = 0; - int navi_enemy_outer_red = 200; - int navi_enemy_outer_green = 155; - int navi_enemy_outer_blue = 0; - - int navi_npc_inner_red = 150; - int navi_npc_inner_green = 150; - int navi_npc_inner_blue = 255; - int navi_npc_outer_red = 150; - int navi_npc_outer_green = 150; - int navi_npc_outer_blue = 255; - - int navi_prop_inner_red = 0; - int navi_prop_inner_green = 250; - int navi_prop_inner_blue = 0; - int navi_prop_outer_red = 0; - int navi_prop_outer_green = 250; - int navi_prop_outer_blue = 0; - - } cosmetic; - - // Cheats - struct { - bool debug_mode = false; - bool infinite_money = false; - bool infinite_health = false; - bool infinite_ammo = false; - bool infinite_magic = false; - bool infinite_nayru = false; - bool no_clip = false; - bool climb_everything = false; - bool moon_jump_on_l = false; - bool super_tunic = false; - bool ez_isg = false; - bool no_restrict_item = false; - bool freeze_time = false; - } cheats; - // Graphics struct { bool show = false; diff --git a/libultraship/libultraship/SDLController.cpp b/libultraship/libultraship/SDLController.cpp index 267607048..445037010 100644 --- a/libultraship/libultraship/SDLController.cpp +++ b/libultraship/libultraship/SDLController.cpp @@ -5,6 +5,7 @@ #include "spdlog/spdlog.h" #include "stox.h" #include "Window.h" +#include "Cvar.h" extern "C" uint8_t __osMaxControllers; @@ -197,6 +198,7 @@ namespace Ship { const char* contName = SDL_GameControllerName(Cont); const int isSpecialController = !strcmp("PS5 Controller", contName); + const float gyroSensitivity = CVar_GetFloat("gGyroSensitivity", 1.0f); if (gyro_drift_x == 0) { gyro_drift_x = gyroData[0]; diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 83ff7ef0e..364b56bff 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -324,16 +324,82 @@ namespace SohImGui { #define BindButton(btn, status) ImGui::Image(GetTextureByID(DefaultAssets[btn]->textureId), ImVec2(16.0f * scale, 16.0f * scale), ImVec2(0, 0), ImVec2(1.0f, 1.0f), ImVec4(255, 255, 255, (status) ? 255 : 0)); - void BindAudioSlider(const char* name, const char* key, float* value, SeqPlayers playerId) { - ImGui::Text(name, static_cast(100 * *(value))); - if (ImGui::SliderFloat((std::string("##") + key).c_str(), value, 0.0f, 1.0f, "")) { - const float volume = floorf(*(value) * 100) / 100; + void BindAudioSlider(const char* name, const char* key, float defaultValue, SeqPlayers playerId) + { + float value = CVar_GetFloat(key, defaultValue); + + ImGui::Text(name, static_cast(100 * value)); + if (ImGui::SliderFloat((std::string("##") + key).c_str(), &value, 0.0f, 1.0f, "")) { + const float volume = floorf(value * 100) / 100; CVar_SetFloat(key, volume); needs_save = true; Game::SetSeqPlayerVolume(playerId, volume); } } + void EnhancementCheckbox(std::string text, std::string cvarName) + { + bool val = (bool)CVar_GetS32(cvarName.c_str(), 0); + if (ImGui::Checkbox(text.c_str(), &val)) { + CVar_SetS32(cvarName.c_str(), val); + needs_save = true; + } + } + + void EnhancementSliderInt(std::string text, std::string id, std::string cvarName, int min, int max, std::string format) + { + int val = CVar_GetS32(cvarName.c_str(), 0); + + ImGui::Text(text.c_str(), val); + + if (ImGui::SliderInt(id.c_str(), &val, min, max, format.c_str())) + { + CVar_SetS32(cvarName.c_str(), val); + needs_save = true; + } + + if (val < min) + { + val = min; + CVar_SetS32(cvarName.c_str(), val); + needs_save = true; + } + + if (val > max) + { + val = max; + CVar_SetS32(cvarName.c_str(), val); + needs_save = true; + } + } + + void EnhancementSliderFloat(std::string text, std::string id, std::string cvarName, float min, float max, std::string format, float defaultValue) + { + float val = CVar_GetFloat(cvarName.c_str(), defaultValue); + + ImGui::Text(text.c_str(), static_cast(100 * val)); + + if (ImGui::SliderFloat(id.c_str(), &val, min, max, format.c_str())) + { + CVar_SetFloat(cvarName.c_str(), val); + needs_save = true; + } + + if (val < min) + { + val = min; + CVar_SetFloat(cvarName.c_str(), val); + needs_save = true; + } + + if (val > max) + { + val = max; + CVar_SetFloat(cvarName.c_str(), val); + needs_save = true; + } + } + void DrawMainMenuAndCalculateGameSize() { console->Update(); ImGuiBackendNewFrame(); @@ -389,85 +455,42 @@ namespace SohImGui { ImGui::Separator(); if (ImGui::BeginMenu("Audio")) { - const float volume = Game::Settings.audio.master; - ImGui::Text("Master Volume: %d %%", static_cast(100 * volume)); - if (ImGui::SliderFloat("##Master_Vol", &Game::Settings.audio.master, 0.0f, 1.0f, "", ImGuiSliderFlags_AlwaysClamp)) { - CVar_SetFloat("gGameMasterVolume", Game::Settings.audio.master); - needs_save = true; - } + EnhancementSliderFloat("Master Volume: %d %%", "##Master_Vol", "gGameMasterVolume", 0.0f, 1.0f, "", 1.0f); - BindAudioSlider("Main Music Volume: %d %%", "gMainMusicVolume", &Game::Settings.audio.music_main, SEQ_BGM_MAIN); - BindAudioSlider("Sub Music Volume: %d %%", "gSubMusicVolume", &Game::Settings.audio.music_sub, SEQ_BGM_SUB); - BindAudioSlider("Sound Effects Volume: %d %%", "gSFXMusicVolume", &Game::Settings.audio.sfx, SEQ_SFX); - BindAudioSlider("Fanfare Volume: %d %%", "gFanfareVolume", &Game::Settings.audio.fanfare, SEQ_FANFARE); + BindAudioSlider("Main Music Volume: %d %%", "gMainMusicVolume", 1.0f, SEQ_BGM_MAIN); + BindAudioSlider("Sub Music Volume: %d %%", "gSubMusicVolume", 1.0f, SEQ_BGM_SUB); + BindAudioSlider("Sound Effects Volume: %d %%", "gSFXMusicVolume", 1.0f, SEQ_SFX); + BindAudioSlider("Fanfare Volume: %d %%", "gFanfareVolume", 1.0f, SEQ_FANFARE); ImGui::EndMenu(); } - if (ImGui::BeginMenu("Controller")) { - for (const auto& [i, controllers] : Ship::Window::Controllers) { - bool hasPad = std::find_if(controllers.begin(), controllers.end(), [](const auto& c) { - return c->HasPadConf() && c->Connected(); - }) != controllers.end(); - - if (!hasPad) continue; - - auto menuLabel = "Controller " + std::to_string(i + 1); - if (ImGui::BeginMenu(menuLabel.c_str())) { - ImGui::Text("Gyro Sensitivity: %d %%", static_cast(100 * Game::Settings.controller.extra[i].gyro_sensitivity)); - if (ImGui::SliderFloat("##GYROSCOPE", &Game::Settings.controller.extra[i].gyro_sensitivity, 0.0f, 1.0f, "")) { - needs_save = true; - } - - if (ImGui::Button("Recalibrate Gyro")) { - Game::Settings.controller.extra[i].gyro_drift_x = 0; - Game::Settings.controller.extra[i].gyro_drift_y = 0; - needs_save = true; - } - - ImGui::Separator(); - - ImGui::Text("Rumble Strength: %d %%", static_cast(100 * Game::Settings.controller.extra[i].rumble_strength)); - if (ImGui::SliderFloat("##RUMBLE", &Game::Settings.controller.extra[i].rumble_strength, 0.0f, 1.0f, "")) { - needs_save = true; - } - - ImGui::EndMenu(); - } + if (ImGui::BeginMenu("Controller")) + { + EnhancementSliderFloat("Gyro Sensitivity: %d %%", "##GYROSCOPE", "gGyroSensitivity", 0.0f, 1.0f, "", 1.0f); + + if (ImGui::Button("Recalibrate Gyro")) { + Game::Settings.controller.gyroDriftX = 0; + Game::Settings.controller.gyroDriftY = 0; } ImGui::Separator(); + EnhancementSliderFloat("Rumble Strength: %d %%", "##RUMBLE", "gRumbleStrength", 0.0f, 1.0f, "", 1.0f); + + EnhancementCheckbox("Show Inputs", "gInputEnabled"); if (ImGui::Checkbox("Rumble Enabled", &Game::Settings.controller.rumble_enabled)) { CVar_SetS32("gRumbleEnabled", Game::Settings.controller.rumble_enabled); needs_save = true; } - if (ImGui::Checkbox("Show Inputs", &Game::Settings.controller.input_enabled)) { - needs_save = true; - } - - ImGui::Text("Input Scale: %.1f", Game::Settings.controller.input_scale); - if (ImGui::SliderFloat("##Input", &Game::Settings.controller.input_scale, 1.0f, 3.0f, "")) { - needs_save = true; - } + EnhancementSliderFloat("Input Scale: %.1f", "##Input", "gInputScale", 1.0f, 3.0f, "", 1.0f); ImGui::Separator(); - if (ImGui::Checkbox("Dpad Support on Pause and File Select", &Game::Settings.controller.dpad_pause_name)) { - CVar_SetS32("gDpadPauseName", Game::Settings.controller.dpad_pause_name); - needs_save = true; - } - - if (ImGui::Checkbox("DPad Support in Ocarina and Text Choice", &Game::Settings.controller.dpad_ocarina_text)) { - CVar_SetS32("gDpadOcarinaText", Game::Settings.controller.dpad_ocarina_text); - needs_save = true; - } - - if (ImGui::Checkbox("DPad Support for Browsing Shop Items", &Game::Settings.controller.dpad_shop)) { - CVar_SetS32("gDpadShop", Game::Settings.controller.dpad_shop); - needs_save = true; - } + EnhancementCheckbox("Dpad Support on Pause and File Select", "gDpadPauseName"); + EnhancementCheckbox("DPad Support in Ocarina and Text Choice", "gDpadOcarinaText"); + EnhancementCheckbox("DPad Support for Browsing Shop Items", "gDpadShop"); ImGui::EndMenu(); } @@ -477,62 +500,22 @@ namespace SohImGui { ImGui::Text("Gameplay"); ImGui::Separator(); - ImGui::Text("Text Speed: %dx", Game::Settings.enhancements.text_speed); - if (ImGui::SliderInt("##TEXTSPEED", &Game::Settings.enhancements.text_speed, 1, 5, "")) { - CVar_SetS32("gTextSpeed", Game::Settings.enhancements.text_speed); - needs_save = true; - } + EnhancementSliderInt("Text Speed: %dx", "##TEXTSPEED", "gTextSpeed", 1, 5, ""); - if (ImGui::Checkbox("Skip Text", &Game::Settings.enhancements.skip_text)) { - CVar_SetS32("gSkipText", Game::Settings.enhancements.skip_text); - needs_save = true; - } - - if (ImGui::Checkbox("Minimal UI", &Game::Settings.enhancements.minimal_ui)) { - CVar_SetS32("gMinimalUI", Game::Settings.enhancements.minimal_ui); - needs_save = true; - } - - if (ImGui::Checkbox("MM Bunny Hood", &Game::Settings.enhancements.mm_bunny_hood)) { - CVar_SetS32("gMMBunnyHood", Game::Settings.enhancements.mm_bunny_hood); - needs_save = true; - } - - /*if (ImGui::Checkbox("Fix L&R Pause menu", &Game::Settings.enhancements.uniform_lr)) { - CVar_SetS32("gUniformLR", Game::Settings.enhancements.uniform_lr); - needs_save = true; - }*/ - - if (ImGui::Checkbox("Visual Stone of Agony", &Game::Settings.enhancements.visualagony)) { - CVar_SetS32("gVisualAgony", Game::Settings.enhancements.visualagony); - needs_save = true; - } + EnhancementCheckbox("Skip Text", "gSkipText"); + EnhancementCheckbox("Minimal UI", "gMinimalUI"); + EnhancementCheckbox("MM Bunny Hood", "gMMBunnyHood"); + EnhancementCheckbox("Visual Stone of Agony", "gVisualAgony"); ImGui::Text("Graphics"); ImGui::Separator(); - HOOK(ImGui::Checkbox("N64 Mode", &Game::Settings.debug.n64mode)); + EnhancementCheckbox("N64 Mode", "gN64Mode"); - if (ImGui::Checkbox("Animated Link in Pause Menu", &Game::Settings.enhancements.animated_pause_menu)) { - CVar_SetS32("gPauseLiveLink", Game::Settings.enhancements.animated_pause_menu); - needs_save = true; - } - - if (ImGui::Checkbox("Disable LOD", &Game::Settings.enhancements.disable_lod)) { - CVar_SetS32("gDisableLOD", Game::Settings.enhancements.disable_lod); - needs_save = true; - } - - if (ImGui::Checkbox("Enable 3D Dropped items", &Game::Settings.enhancements.newdrops)) { - CVar_SetS32("gNewDrops", Game::Settings.enhancements.newdrops); - needs_save = true; - } - - if (ImGui::Checkbox("Dynamic Wallet Icon", &Game::Settings.enhancements.dynamic_wallet_icon)) { - CVar_SetS32("gDynamicWalletIcon", Game::Settings.enhancements.dynamic_wallet_icon); - - needs_save = true; - } + EnhancementCheckbox("Animated Link in Pause Menu", "gPauseLiveLink"); + EnhancementCheckbox("Disable LOD", "gDisableLOD"); + EnhancementCheckbox("Enable 3D Dropped items", "gNewDrops"); + EnhancementCheckbox("Dynamic Wallet Icon", "gDynamicWalletIcon"); ImGui::EndMenu(); } @@ -544,10 +527,7 @@ namespace SohImGui { ImGui::Text("Debug"); ImGui::Separator(); - if (ImGui::Checkbox("Debug Mode", &Game::Settings.cheats.debug_mode)) { - CVar_SetS32("gDebugEnabled", Game::Settings.cheats.debug_mode); - needs_save = true; - } + EnhancementCheckbox("Debug Mode", "gDebugEnabled"); ImGui::EndMenu(); } @@ -559,52 +539,23 @@ namespace SohImGui { if (ImGui::BeginMenu("Cheats")) { if (ImGui::BeginMenu("Infinite...")) { - if (ImGui::Checkbox("Money", &Game::Settings.cheats.infinite_money)) { - CVar_SetS32("gInfiniteMoney", Game::Settings.cheats.infinite_money); - needs_save = true; - } + EnhancementCheckbox("Money", "gInfiniteMoney"); + EnhancementCheckbox("Health", "gInfiniteHealth"); + EnhancementCheckbox("Ammo", "gInfiniteAmmo"); + EnhancementCheckbox("Magic", "gInfiniteMagic"); + EnhancementCheckbox("Nayru's Love", "gInfiniteNayru"); - if (ImGui::Checkbox("Health", &Game::Settings.cheats.infinite_health)) { - CVar_SetS32("gInfiniteHealth", Game::Settings.cheats.infinite_health); - needs_save = true; - } - - if (ImGui::Checkbox("Ammo", &Game::Settings.cheats.infinite_ammo)) { - CVar_SetS32("gInfiniteAmmo", Game::Settings.cheats.infinite_ammo); - needs_save = true; - } - - if (ImGui::Checkbox("Magic", &Game::Settings.cheats.infinite_magic)) { - CVar_SetS32("gInfiniteMagic", Game::Settings.cheats.infinite_magic); - needs_save = true; - } - - if (ImGui::Checkbox("Nayru's Love", &Game::Settings.cheats.infinite_nayru)) { - CVar_SetS32("gInfiniteNayru", Game::Settings.cheats.infinite_nayru); - needs_save = true; - } ImGui::EndMenu(); } - if (ImGui::Checkbox("No Clip", &Game::Settings.cheats.no_clip)) { - CVar_SetS32("gNoClip", Game::Settings.cheats.no_clip); - needs_save = true; - } + EnhancementCheckbox("No Clip", "gNoClip"); + EnhancementCheckbox("Climb Everything", "gClimbEverything"); + EnhancementCheckbox("Moon Jump on L", "gMoonJumpOnL"); + EnhancementCheckbox("Super Tunic", "gSuperTunic"); + EnhancementCheckbox("Easy ISG", "gEzISG"); + EnhancementCheckbox("Unrestricted Items", "gNoRestrictItems"); + EnhancementCheckbox("Freeze Time", "gFreezeTime"); - if (ImGui::Checkbox("Climb Everything", &Game::Settings.cheats.climb_everything)) { - CVar_SetS32("gClimbEverything", Game::Settings.cheats.climb_everything); - needs_save = true; - } - - if (ImGui::Checkbox("Moon Jump on L", &Game::Settings.cheats.moon_jump_on_l)) { - CVar_SetS32("gMoonJumpOnL", Game::Settings.cheats.moon_jump_on_l); - needs_save = true; - } - - if (ImGui::Checkbox("Super Tunic", &Game::Settings.cheats.super_tunic)) { - CVar_SetS32("gSuperTunic", Game::Settings.cheats.super_tunic); - needs_save = true; - } ImGui::EndMenu(); } @@ -810,7 +761,9 @@ namespace SohImGui { gfx_current_game_window_viewport.y = main_pos.y; gfx_current_game_window_viewport.width = size.x; gfx_current_game_window_viewport.height = size.y; - if (Game::Settings.debug.n64mode) { + + if (CVar_GetS32("gN64Mode", 0)) + { gfx_current_dimensions.width = 320; gfx_current_dimensions.height = 240; const int sw = size.y * 320 / 240; @@ -825,7 +778,7 @@ namespace SohImGui { ImVec2 main_pos = ImGui::GetWindowPos(); ImVec2 size = ImGui::GetContentRegionAvail(); ImVec2 pos = ImVec2(0, 0); - if (Game::Settings.debug.n64mode) { + if (CVar_GetS32("gN64Mode", 0)) { const int sw = size.y * 320 / 240; pos = ImVec2(size.x / 2 - sw / 2, 0); size = ImVec2(sw, size.y); @@ -840,10 +793,10 @@ namespace SohImGui { ImGui::End(); - const float scale = Game::Settings.controller.input_scale; + const float scale = CVar_GetFloat("gInputScale", 1.0f); ImVec2 BtnPos = ImVec2(160 * scale, 85 * scale); - if (Game::Settings.controller.input_enabled) { + if (CVar_GetS32("gInputEnabled", 0)) { ImGui::SetNextWindowSize(BtnPos); ImGui::SetNextWindowPos(ImVec2(main_pos.x + size.x - BtnPos.x - 20, main_pos.y + size.y - BtnPos.y - 20)); diff --git a/libultraship/libultraship/SohImGuiImpl.h b/libultraship/libultraship/SohImGuiImpl.h index dc6e24ee1..b2b29e3d5 100644 --- a/libultraship/libultraship/SohImGuiImpl.h +++ b/libultraship/libultraship/SohImGuiImpl.h @@ -60,7 +60,13 @@ namespace SohImGui { extern Console* console; void Init(WindowImpl window_impl); void Update(EventImpl event); + + + void EnhancementCheckbox(std::string text, std::string cvarName); + void EnhancementSliderInt(std::string text, std::string id, std::string cvarName, int min, int max, std::string format); + void EnhancementSliderFloat(std::string text, std::string id, std::string cvarName, float min, float max, std::string format, float defaultValue); void DrawMainMenuAndCalculateGameSize(void); + void DrawFramebufferAndGameInput(void); void Render(void); void CancelFrame(void); diff --git a/soh/soh/Enhancements/debugconsole.cpp b/soh/soh/Enhancements/debugconsole.cpp index de8cab260..ff69830e7 100644 --- a/soh/soh/Enhancements/debugconsole.cpp +++ b/soh/soh/Enhancements/debugconsole.cpp @@ -327,9 +327,6 @@ static int CheckVarType(const std::string& input) return result; } -void DebugConsole_LoadCVars(); -void DebugConsole_SaveCVars(); - static bool SetCVarHandler(const std::vector& args) { if (args.size() < 3) return CMD_FAILED; diff --git a/soh/soh/Enhancements/debugconsole.h b/soh/soh/Enhancements/debugconsole.h index 21e0b51f1..581c19acd 100644 --- a/soh/soh/Enhancements/debugconsole.h +++ b/soh/soh/Enhancements/debugconsole.h @@ -1,3 +1,5 @@ #pragma once -void DebugConsole_Init(void); \ No newline at end of file +void DebugConsole_Init(void); +void DebugConsole_LoadCVars(); +void DebugConsole_SaveCVars(); \ No newline at end of file From c66c874549007b50c1646373b47b14edc796ccfb Mon Sep 17 00:00:00 2001 From: Nicholas Estelami Date: Fri, 29 Apr 2022 11:49:28 -0400 Subject: [PATCH 087/146] Fixed merge issues --- libultraship/libultraship/GameSettings.cpp | 4 - libultraship/libultraship/GameSettings.h | 6 - libultraship/libultraship/SDLController.cpp | 20 +- libultraship/libultraship/SohImGuiImpl.cpp | 301 ++++++++------------ soh/soh/OTRGlobals.cpp | 8 +- soh/src/code/z_player_lib.c | 24 +- 6 files changed, 144 insertions(+), 219 deletions(-) diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index 799681d59..9b7543b7d 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -60,10 +60,6 @@ namespace Game { for (const auto& [i, controllers] : Ship::Window::Controllers) { for (const auto& controller : controllers) { if (auto padConfSection = controller->GetPadConfSection()) { - Settings.controller.extra[i].gyro_sensitivity = Ship::stof(Conf[*padConfSection]["gyro_sensitivity"]); - Settings.controller.extra[i].rumble_strength = Ship::stof(Conf[*padConfSection]["rumble_strength"]); - Settings.controller.extra[i].gyro_drift_x = Ship::stof(Conf[*padConfSection]["gyro_drift_x"], 0.0f); - Settings.controller.extra[i].gyro_drift_y = Ship::stof(Conf[*padConfSection]["gyro_drift_y"], 0.0f); } } } diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index 1678eaf3f..4b9956d17 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -8,12 +8,6 @@ struct SoHConfigType { bool soh_sink = true; } debug; - // Controller - struct { - float gyroDriftX = 0.0f; - float gyroDriftY = 0.0f; - } controller; - // Graphics struct { bool show = false; diff --git a/libultraship/libultraship/SDLController.cpp b/libultraship/libultraship/SDLController.cpp index 445037010..c6892edbe 100644 --- a/libultraship/libultraship/SDLController.cpp +++ b/libultraship/libultraship/SDLController.cpp @@ -6,6 +6,7 @@ #include "stox.h" #include "Window.h" #include "Cvar.h" +#include extern "C" uint8_t __osMaxControllers; @@ -189,16 +190,15 @@ namespace Ship { if (SDL_GameControllerHasSensor(Cont, SDL_SENSOR_GYRO)) { size_t contNumber = GetControllerNumber(); - float& gyro_drift_x = Game::Settings.controller.extra[contNumber].gyro_drift_x; - float& gyro_drift_y = Game::Settings.controller.extra[contNumber].gyro_drift_y; - const float gyro_sensitivity = Game::Settings.controller.extra[contNumber].gyro_sensitivity; - + float gyroData[3]; SDL_GameControllerGetSensorData(Cont, SDL_SENSOR_GYRO, gyroData, 3); const char* contName = SDL_GameControllerName(Cont); const int isSpecialController = !strcmp("PS5 Controller", contName); - const float gyroSensitivity = CVar_GetFloat("gGyroSensitivity", 1.0f); + float gyro_drift_x = CVar_GetFloat(StringHelper::Sprintf("gCont%i_GyroDriftX").c_str(), 0.0f); + float gyro_drift_y = CVar_GetFloat(StringHelper::Sprintf("gCont%i_GyroDriftY").c_str(), 0.0f); + const float gyro_sensitivity = CVar_GetFloat(StringHelper::Sprintf("gCont%i_GyroSensitivity").c_str(), 1.0f); if (gyro_drift_x == 0) { gyro_drift_x = gyroData[0]; @@ -213,6 +213,9 @@ namespace Ship { } } + CVar_SetFloat(StringHelper::Sprintf("gCont%i_GyroDriftX").c_str(), gyro_drift_x); + CVar_SetFloat(StringHelper::Sprintf("gCont%i_GyroDriftY").c_str(), gyro_drift_y); + if (isSpecialController == 1) { wGyroX = gyroData[0] - gyro_drift_x; wGyroY = -gyroData[2] - gyro_drift_y; @@ -346,7 +349,7 @@ namespace Ship { { if (SDL_GameControllerHasRumble(Cont)) { if (controller->rumble > 0) { - float rumble_strength = Game::Settings.controller.extra[GetControllerNumber()].rumble_strength; + float rumble_strength = CVar_GetFloat(StringHelper::Sprintf("gCont%i_RumbleStrength", GetControllerNumber()).c_str(), 1.0f); SDL_GameControllerRumble(Cont, 0xFFFF * rumble_strength, 0xFFFF * rumble_strength, 0); } else { SDL_GameControllerRumble(Cont, 0, 0, 0); @@ -414,11 +417,6 @@ namespace Ship { std::shared_ptr pConf = GlobalCtx2::GetInstance()->GetConfig(); ConfigFile& Conf = *pConf.get(); - Conf[ConfSection]["gyro_sensitivity"] = std::to_string(1.0f); - Conf[ConfSection]["rumble_strength"] = std::to_string(1.0f); - Conf[ConfSection]["gyro_drift_x"] = std::to_string(0.0f); - Conf[ConfSection]["gyro_drift_y"] = std::to_string(0.0f); - Conf.Save(); } diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 364b56bff..fb4841ee9 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -84,49 +84,51 @@ namespace SohImGui { ImGui_ImplWin32_Init(impl.dx11.window); break; } - kokiri_col[0] = std::clamp((float) CVar_GetS32("gTunic_Kokiri_Red", 30)/255, 0.0f, 1.0f); - kokiri_col[1] = std::clamp((float)CVar_GetS32("gTunic_Kokiri_Green", 105) / 255, 0.0f, 1.0f); - kokiri_col[2] = std::clamp((float)CVar_GetS32("gTunic_Kokiri_Blue", 27) / 255, 0.0f, 1.0f); - - goron_col[0] = std::clamp((float)CVar_GetS32("gTunic_Goron_Red", 100) / 255, 0.0f, 1.0f); - goron_col[1] = std::clamp((float)CVar_GetS32("gTunic_Goron_Green", 20) / 255, 0.0f, 1.0f); - goron_col[2] = std::clamp((float)CVar_GetS32("gTunic_Goron_Blue", 0) / 255, 0.0f, 1.0f); - zora_col[0] = std::clamp((float)CVar_GetS32("gTunic_Zora_Red", 0) / 255, 0.0f, 1.0f); - zora_col[1] = std::clamp((float)CVar_GetS32("gTunic_Zora_Green", 60) / 255, 0.0f, 1.0f); - zora_col[2] = std::clamp((float)CVar_GetS32("gTunic_Zora_Blue", 100) / 255, 0.0f, 1.0f); + // OTRTODO: This gameplay specific stuff should not be in libultraship. This needs to be moved to soh and use sTunicColors + kokiri_col[0] = 30 / 255.0f; + kokiri_col[1] = 105 / 255.0f; + kokiri_col[2] = 27 / 255.0f; - navi_idle_i_col[0] = std::clamp((float)CVar_GetS32("gNavi_Idle_Inner_Red", 0) / 255, 0.0f, 1.0f); - navi_idle_i_col[1] = std::clamp((float)CVar_GetS32("gNavi_Idle_Inner_Green", 0) / 255, 0.0f, 1.0f); - navi_idle_i_col[2] = std::clamp((float)CVar_GetS32("gNavi_Idle_Inner_Blue", 0) / 255, 0.0f, 1.0f); + goron_col[0] = 100 / 255.0f; + goron_col[1] = 20 / 255.0f; + goron_col[2] = 0; + + zora_col[0] = 0; + zora_col[1] = 60 / 255.0f; + zora_col[2] = 100 / 255.0f; - navi_idle_o_col[0] = std::clamp((float)CVar_GetS32("gNavi_Idle_Outer_Red", 0) / 255, 0.0f, 1.0f); - navi_idle_o_col[1] = std::clamp((float)CVar_GetS32("gNavi_Idle_Outer_Green", 0) / 255, 0.0f, 1.0f); - navi_idle_o_col[2] = std::clamp((float)CVar_GetS32("gNavi_Idle_Outer_Blue", 0) / 255, 0.0f, 1.0f); + navi_idle_i_col[0] = 0; + navi_idle_i_col[1] = 0; + navi_idle_i_col[2] = 0; - navi_npc_i_col[0] = std::clamp((float)CVar_GetS32("gNavi_NPC_Inner_Red", 0) / 255, 0.0f, 1.0f); - navi_npc_i_col[1] = std::clamp((float)CVar_GetS32("gNavi_NPC_Inner_Green", 0) / 255, 0.0f, 1.0f); - navi_npc_i_col[2] = std::clamp((float)CVar_GetS32("gNavi_NPC_Inner_Blue", 0) / 255, 0.0f, 1.0f); + navi_idle_o_col[0] = 0; + navi_idle_o_col[1] = 0; + navi_idle_o_col[2] = 0; - navi_npc_o_col[0] = std::clamp((float)CVar_GetS32("gNavi_NPC_Outer_Red", 0) / 255, 0.0f, 1.0f); - navi_npc_o_col[1] = std::clamp((float)CVar_GetS32("gNavi_NPC_Outer_Green", 0) / 255, 0.0f, 1.0f); - navi_npc_o_col[2] = std::clamp((float)CVar_GetS32("gNavi_NPC_Outer_Blue", 0) / 255, 0.0f, 1.0f); + navi_npc_i_col[0] = 0; + navi_npc_i_col[1] = 0; + navi_npc_i_col[2] = 0; - navi_enemy_i_col[0] = std::clamp((float)CVar_GetS32("gNavi_Enemy_Inner_Red", 0) / 255, 0.0f, 1.0f); - navi_enemy_i_col[1] = std::clamp((float)CVar_GetS32("gNavi_Enemy_Inner_Green", 0) / 255, 0.0f, 1.0f); - navi_enemy_i_col[2] = std::clamp((float)CVar_GetS32("gNavi_Enemy_Inner_Blue", 0) / 255, 0.0f, 1.0f); + navi_npc_o_col[0] = 0; + navi_npc_o_col[1] = 0; + navi_npc_o_col[2] = 0; - navi_enemy_o_col[0] = std::clamp((float)CVar_GetS32("gNavi_Enemy_Outer_Red", 0) / 255, 0.0f, 1.0f); - navi_enemy_o_col[1] = std::clamp((float)CVar_GetS32("gNavi_Enemy_Outer_Green", 0) / 255, 0.0f, 1.0f); - navi_enemy_o_col[2] = std::clamp((float)CVar_GetS32("gNavi_Enemy_Outer_Blue", 0) / 255, 0.0f, 1.0f); + navi_enemy_i_col[0] = 0; + navi_enemy_i_col[1] = 0; + navi_enemy_i_col[2] = 0; - navi_prop_i_col[0] = std::clamp((float)CVar_GetS32("gNavi_Prop_Inner_Red", 0) / 255, 0.0f, 1.0f); - navi_prop_i_col[1] = std::clamp((float)CVar_GetS32("gNavi_Prop_Inner_Green", 0) / 255, 0.0f, 1.0f); - navi_prop_i_col[2] = std::clamp((float)CVar_GetS32("gNavi_Prop_Inner_Blue", 0) / 255, 0.0f, 1.0f); + navi_enemy_o_col[0] = 0; + navi_enemy_o_col[1] = 0; + navi_enemy_o_col[2] = 0; - navi_prop_o_col[0] = std::clamp((float)CVar_GetS32("gNavi_Prop_Outer_Red", 0) / 255, 0.0f, 1.0f); - navi_prop_o_col[1] = std::clamp((float)CVar_GetS32("gNavi_Prop_Outer_Green", 0) / 255, 0.0f, 1.0f); - navi_prop_o_col[2] = std::clamp((float)CVar_GetS32("gNavi_Prop_Outer_Blue", 0) / 255, 0.0f, 1.0f); + navi_prop_i_col[0] = 0; + navi_prop_i_col[1] = 0; + navi_prop_i_col[2] = 0; + + navi_prop_o_col[0] = 0; + navi_prop_o_col[1] = 0; + navi_prop_o_col[2] = 0; } void ImGuiBackendInit() { @@ -373,11 +375,14 @@ namespace SohImGui { } } - void EnhancementSliderFloat(std::string text, std::string id, std::string cvarName, float min, float max, std::string format, float defaultValue) + void EnhancementSliderFloat(std::string text, std::string id, std::string cvarName, float min, float max, std::string format, float defaultValue, bool isPercentage) { float val = CVar_GetFloat(cvarName.c_str(), defaultValue); - ImGui::Text(text.c_str(), static_cast(100 * val)); + if (!isPercentage) + ImGui::Text(text.c_str(), val); + else + ImGui::Text(text.c_str(), static_cast(100 * val)); if (ImGui::SliderFloat(id.c_str(), &val, min, max, format.c_str())) { @@ -400,6 +405,28 @@ namespace SohImGui { } } + void EnhancementColor3(std::string text, std::string cvarName, float defaultColors[3]) + { + int r = CVar_GetS32((cvarName + "_Red").c_str(), (defaultColors[0] * 255.0f)); + int g = CVar_GetS32((cvarName + "_Green").c_str(), (defaultColors[1] * 255.0f)); + int b = CVar_GetS32((cvarName + "_Blue").c_str(), (defaultColors[2] * 255.0f)); + + float colors[3]; + colors[0] = r / 255.0f; + colors[1] = g / 255.0f; + colors[2] = b / 255.0f; + + { + if (ImGui::ColorEdit3(text.c_str(), colors)) + { + CVar_SetS32((cvarName + "_Red").c_str(), (int)(colors[0] * 255)); + CVar_SetS32((cvarName + "_Green").c_str(), (int)(colors[1] * 255)); + CVar_SetS32((cvarName + "_Blue").c_str(), (int)(colors[2] * 255)); + needs_save = true; + } + } + } + void DrawMainMenuAndCalculateGameSize() { console->Update(); ImGuiBackendNewFrame(); @@ -455,7 +482,7 @@ namespace SohImGui { ImGui::Separator(); if (ImGui::BeginMenu("Audio")) { - EnhancementSliderFloat("Master Volume: %d %%", "##Master_Vol", "gGameMasterVolume", 0.0f, 1.0f, "", 1.0f); + EnhancementSliderFloat("Master Volume: %d %%", "##Master_Vol", "gGameMasterVolume", 0.0f, 1.0f, "", 1.0f, true); BindAudioSlider("Main Music Volume: %d %%", "gMainMusicVolume", 1.0f, SEQ_BGM_MAIN); BindAudioSlider("Sub Music Volume: %d %%", "gSubMusicVolume", 1.0f, SEQ_BGM_SUB); @@ -465,26 +492,41 @@ namespace SohImGui { ImGui::EndMenu(); } - if (ImGui::BeginMenu("Controller")) + if (ImGui::BeginMenu("Controller")) { - EnhancementSliderFloat("Gyro Sensitivity: %d %%", "##GYROSCOPE", "gGyroSensitivity", 0.0f, 1.0f, "", 1.0f); - - if (ImGui::Button("Recalibrate Gyro")) { - Game::Settings.controller.gyroDriftX = 0; - Game::Settings.controller.gyroDriftY = 0; + for (const auto& [i, controllers] : Ship::Window::Controllers) + { + bool hasPad = std::find_if(controllers.begin(), controllers.end(), [](const auto& c) { + return c->HasPadConf() && c->Connected(); + }) != controllers.end(); + + if (!hasPad) continue; + + auto menuLabel = "Controller " + std::to_string(i + 1); + if (ImGui::BeginMenu(menuLabel.c_str())) + { + EnhancementSliderFloat("Gyro Sensitivity: %d %%", "##GYROSCOPE", StringHelper::Sprintf("gCont%i_GyroSensitivity", i), 0.0f, 1.0f, "", 1.0f, true); + + if (ImGui::Button("Recalibrate Gyro")) + { + CVar_SetFloat(StringHelper::Sprintf("gCont%i_GyroDriftX").c_str(), 0); + CVar_SetFloat(StringHelper::Sprintf("gCont%i_GyroDriftY").c_str(), 0); + needs_save = true; + } + + ImGui::Separator(); + + EnhancementSliderFloat("Rumble Strength: %d %%", "##RUMBLE", StringHelper::Sprintf("gCont%i_RumbleStrength", i), 0.0f, 1.0f, "", 1.0f, true); + + ImGui::EndMenu(); + } + ImGui::Separator(); } - ImGui::Separator(); - - EnhancementSliderFloat("Rumble Strength: %d %%", "##RUMBLE", "gRumbleStrength", 0.0f, 1.0f, "", 1.0f); - EnhancementCheckbox("Show Inputs", "gInputEnabled"); - if (ImGui::Checkbox("Rumble Enabled", &Game::Settings.controller.rumble_enabled)) { - CVar_SetS32("gRumbleEnabled", Game::Settings.controller.rumble_enabled); - needs_save = true; - } + EnhancementCheckbox("Rumble Enabled", "gRumbleEnabled"); - EnhancementSliderFloat("Input Scale: %.1f", "##Input", "gInputScale", 1.0f, 3.0f, "", 1.0f); + EnhancementSliderFloat("Input Scale: %.1f", "##Input", "gInputScale", 1.0f, 3.0f, "", 1.0f, false); ImGui::Separator(); @@ -495,7 +537,8 @@ namespace SohImGui { ImGui::EndMenu(); } - if (ImGui::BeginMenu("Enhancements")) { + if (ImGui::BeginMenu("Enhancements")) + { ImGui::Text("Gameplay"); ImGui::Separator(); @@ -520,7 +563,8 @@ namespace SohImGui { ImGui::EndMenu(); } - if (ImGui::BeginMenu("Developer Tools")) { + if (ImGui::BeginMenu("Developer Tools")) + { HOOK(ImGui::MenuItem("Stats", nullptr, &Game::Settings.debug.soh)); HOOK(ImGui::MenuItem("Console", nullptr, &console->opened)); @@ -532,12 +576,14 @@ namespace SohImGui { ImGui::EndMenu(); } - if (ImGui::BeginMenu("Graphics")) { + if (ImGui::BeginMenu("Graphics")) + { HOOK(ImGui::MenuItem("Anti-aliasing", nullptr, &Game::Settings.graphics.show)); ImGui::EndMenu(); } - if (ImGui::BeginMenu("Cheats")) { + if (ImGui::BeginMenu("Cheats")) + { if (ImGui::BeginMenu("Infinite...")) { EnhancementCheckbox("Money", "gInfiniteMoney"); EnhancementCheckbox("Health", "gInfiniteHealth"); @@ -559,139 +605,26 @@ namespace SohImGui { ImGui::EndMenu(); } - if (ImGui::BeginMenu("Cosmetics")) { + if (ImGui::BeginMenu("Cosmetics")) + { ImGui::Text("Tunics"); ImGui::Separator(); - if (ImGui::ColorEdit3("Kokiri Tunic", kokiri_col)) { - Game::Settings.cosmetic.tunic_kokiri_red = (int)(kokiri_col[0] * 255); - Game::Settings.cosmetic.tunic_kokiri_green = (int)(kokiri_col[1] * 255); - Game::Settings.cosmetic.tunic_kokiri_blue = (int)(kokiri_col[2] * 255); - CVar_SetS32("gTunic_Kokiri_Red", Game::Settings.cosmetic.tunic_kokiri_red); - CVar_SetS32("gTunic_Kokiri_Green", Game::Settings.cosmetic.tunic_kokiri_green); - CVar_SetS32("gTunic_Kokiri_Blue", Game::Settings.cosmetic.tunic_kokiri_blue); - needs_save = true; - } - if (ImGui::ColorEdit3("Goron Tunic", goron_col)) { - Game::Settings.cosmetic.tunic_goron_red = (int)(goron_col[0] * 255); - Game::Settings.cosmetic.tunic_goron_green = (int)(goron_col[1] * 255); - Game::Settings.cosmetic.tunic_goron_blue = (int)(goron_col[2] * 255); - CVar_SetS32("gTunic_Goron_Red", Game::Settings.cosmetic.tunic_goron_red); - CVar_SetS32("gTunic_Goron_Green", Game::Settings.cosmetic.tunic_goron_green); - CVar_SetS32("gTunic_Goron_Blue", Game::Settings.cosmetic.tunic_goron_blue); - needs_save = true; - } - if (ImGui::ColorEdit3("Zora Tunic", zora_col)) { - Game::Settings.cosmetic.tunic_zora_red = (int)(zora_col[0] * 255); - Game::Settings.cosmetic.tunic_zora_green = (int)(zora_col[1] * 255); - Game::Settings.cosmetic.tunic_zora_blue = (int)(zora_col[2] * 255); - CVar_SetS32("gTunic_Zora_Red", Game::Settings.cosmetic.tunic_zora_red); - CVar_SetS32("gTunic_Zora_Green", Game::Settings.cosmetic.tunic_zora_green); - CVar_SetS32("gTunic_Zora_Blue", Game::Settings.cosmetic.tunic_zora_blue); - needs_save = true; - } + + EnhancementColor3("Kokiri Tunic", "gTunic_Kokiri", kokiri_col); + EnhancementColor3("Goron Tunic", "gTunic_Goron", goron_col); + EnhancementColor3("Zora Tunic", "gTunic_Zora", zora_col); + ImGui::Text("Navi"); ImGui::Separator(); - if (ImGui::ColorEdit3("Navi Idle Inner", navi_idle_i_col)) { - Game::Settings.cosmetic.navi_idle_inner_red = (int)(navi_idle_i_col[0] * 255); - Game::Settings.cosmetic.navi_idle_inner_green = (int)(navi_idle_i_col[1] * 255); - Game::Settings.cosmetic.navi_idle_inner_blue = (int)(navi_idle_i_col[2] * 255); - CVar_SetS32("gNavi_Idle_Inner_Red", Game::Settings.cosmetic.navi_idle_inner_red); - CVar_SetS32("gNavi_Idle_Inner_Green", Game::Settings.cosmetic.navi_idle_inner_green); - CVar_SetS32("gNavi_Idle_Inner_Blue", Game::Settings.cosmetic.navi_idle_inner_blue); - needs_save = true; - } - if (ImGui::ColorEdit3("Navi Idle Outer", navi_idle_o_col)) { - Game::Settings.cosmetic.navi_idle_outer_red = (int)(navi_idle_o_col[0] * 255); - Game::Settings.cosmetic.navi_idle_outer_green = (int)(navi_idle_o_col[1] * 255); - Game::Settings.cosmetic.navi_idle_outer_blue = (int)(navi_idle_o_col[2] * 255); - CVar_SetS32("gNavi_Idle_Outer_Red", Game::Settings.cosmetic.navi_idle_outer_red); - CVar_SetS32("gNavi_Idle_Outer_Green", Game::Settings.cosmetic.navi_idle_outer_green); - CVar_SetS32("gNavi_Idle_Outer_Blue", Game::Settings.cosmetic.navi_idle_outer_blue); - needs_save = true; - } - - if (ImGui::ColorEdit3("Navi NPC Inner", navi_npc_i_col)) { - Game::Settings.cosmetic.navi_npc_inner_red = (int)(navi_npc_i_col[0] * 255); - Game::Settings.cosmetic.navi_npc_inner_green = (int)(navi_npc_i_col[1] * 255); - Game::Settings.cosmetic.navi_npc_inner_blue = (int)(navi_npc_i_col[2] * 255); - CVar_SetS32("gNavi_NPC_Inner_Red", Game::Settings.cosmetic.navi_npc_inner_red); - CVar_SetS32("gNavi_NPC_Inner_Green", Game::Settings.cosmetic.navi_npc_inner_green); - CVar_SetS32("gNavi_NPC_Inner_Blue", Game::Settings.cosmetic.navi_npc_inner_blue); - needs_save = true; - } - - if (ImGui::ColorEdit3("Navi NPC Outer", navi_npc_o_col)) { - Game::Settings.cosmetic.navi_npc_outer_red = (int)(navi_npc_o_col[0] * 255); - Game::Settings.cosmetic.navi_npc_outer_green = (int)(navi_npc_o_col[1] * 255); - Game::Settings.cosmetic.navi_npc_outer_blue = (int)(navi_npc_o_col[2] * 255); - CVar_SetS32("gNavi_NPC_Outer_Red", Game::Settings.cosmetic.navi_npc_outer_red); - CVar_SetS32("gNavi_NPC_Outer_Green", Game::Settings.cosmetic.navi_npc_outer_green); - CVar_SetS32("gNavi_NPC_Outer_Blue", Game::Settings.cosmetic.navi_npc_outer_blue); - needs_save = true; - } - - if (ImGui::ColorEdit3("Navi Enemy Inner", navi_enemy_i_col)) { - Game::Settings.cosmetic.navi_enemy_inner_red = (int)(navi_enemy_i_col[0] * 255); - Game::Settings.cosmetic.navi_enemy_inner_green = (int)(navi_enemy_i_col[1] * 255); - Game::Settings.cosmetic.navi_enemy_inner_blue = (int)(navi_enemy_i_col[2] * 255); - CVar_SetS32("gNavi_Enemy_Inner_Red", Game::Settings.cosmetic.navi_enemy_inner_red); - CVar_SetS32("gNavi_Enemy_Inner_Green", Game::Settings.cosmetic.navi_enemy_inner_green); - CVar_SetS32("gNavi_Enemy_Inner_Blue", Game::Settings.cosmetic.navi_enemy_inner_blue); - needs_save = true; - } - - if (ImGui::ColorEdit3("Navi Enemy Outer", navi_enemy_o_col)) { - Game::Settings.cosmetic.navi_enemy_outer_red = (int)(navi_enemy_o_col[0] * 255); - Game::Settings.cosmetic.navi_enemy_outer_green = (int)(navi_enemy_o_col[1] * 255); - Game::Settings.cosmetic.navi_enemy_outer_blue = (int)(navi_enemy_o_col[2] * 255); - CVar_SetS32("gNavi_Enemy_Outer_Red", Game::Settings.cosmetic.navi_enemy_outer_red); - CVar_SetS32("gNavi_Enemy_Outer_Green", Game::Settings.cosmetic.navi_enemy_outer_green); - CVar_SetS32("gNavi_Enemy_Outer_Blue", Game::Settings.cosmetic.navi_enemy_outer_blue); - needs_save = true; - } - - if (ImGui::ColorEdit3("Navi Prop Inner", navi_prop_i_col)) { - Game::Settings.cosmetic.navi_prop_inner_red = (int)(navi_prop_i_col[0] * 255); - Game::Settings.cosmetic.navi_prop_inner_green = (int)(navi_prop_i_col[1] * 255); - Game::Settings.cosmetic.navi_prop_inner_blue = (int)(navi_prop_i_col[2] * 255); - CVar_SetS32("gNavi_Prop_Inner_Red", Game::Settings.cosmetic.navi_prop_inner_red); - CVar_SetS32("gNavi_Prop_Inner_Green", Game::Settings.cosmetic.navi_prop_inner_green); - CVar_SetS32("gNavi_Prop_Inner_Blue", Game::Settings.cosmetic.navi_prop_inner_blue); - needs_save = true; - } - - if (ImGui::ColorEdit3("Navi Prop Outer", navi_prop_o_col)) { - Game::Settings.cosmetic.navi_prop_outer_red = (int)(navi_prop_o_col[0] * 255); - Game::Settings.cosmetic.navi_prop_outer_green = (int)(navi_prop_o_col[1] * 255); - Game::Settings.cosmetic.navi_prop_outer_blue = (int)(navi_prop_o_col[2] * 255); - CVar_SetS32("gNavi_Prop_Outer_Red", Game::Settings.cosmetic.navi_prop_outer_red); - CVar_SetS32("gNavi_Prop_Outer_Green", Game::Settings.cosmetic.navi_prop_outer_green); - CVar_SetS32("gNavi_Prop_Outer_Blue", Game::Settings.cosmetic.navi_prop_outer_blue); - needs_save = true; - } - - ImGui::EndMenu(); - } - - - if (ImGui::BeginMenu("Developer Tools")) { - HOOK(ImGui::MenuItem("Stats", nullptr, &Game::Settings.debug.soh)); - HOOK(ImGui::MenuItem("Console", nullptr, &console->opened)); - if (ImGui::Checkbox("Easy ISG", &Game::Settings.cheats.ez_isg)) { - CVar_SetS32("gEzISG", Game::Settings.cheats.ez_isg); - needs_save = true; - } - - if (ImGui::Checkbox("Unrestricted Items", &Game::Settings.cheats.no_restrict_item)) { - CVar_SetS32("gNoRestrictItems", Game::Settings.cheats.no_restrict_item); - needs_save = true; - } - - if (ImGui::Checkbox("Freeze Time", &Game::Settings.cheats.freeze_time)) { - CVar_SetS32("gFreezeTime", Game::Settings.cheats.freeze_time); - needs_save = true; - } + EnhancementColor3("Navi Idle Inner", "gNavi_Idle_Inner", navi_idle_i_col); + EnhancementColor3("Navi Idle Outer", "gNavi_Idle_Outer", navi_idle_o_col); + EnhancementColor3("Navi NPC Inner", "gNavi_NPC_Inner", navi_npc_i_col); + EnhancementColor3("Navi NPC Outer", "gNavi_NPC_Outer", navi_npc_o_col); + EnhancementColor3("Navi Enemy Inner", "gNavi_Enemy_Inner", navi_enemy_i_col); + EnhancementColor3("Navi Enemy Outer", "gNavi_Enemy_Outer", navi_enemy_o_col); + EnhancementColor3("Navi Prop Inner", "gNavi_Prop_Inner", navi_prop_i_col); + EnhancementColor3("Navi Prop Outer", "gNavi_Prop_Outer", navi_prop_o_col); ImGui::EndMenu(); } diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index f125437ab..69917e8ac 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -26,6 +26,7 @@ #include "../soh/Enhancements/debugger/debugger.h" #include "Utils/BitConverter.h" #include "variables.h" +#include OTRGlobals* OTRGlobals::Instance; @@ -888,8 +889,11 @@ extern "C" void AudioPlayer_Play(const uint8_t* buf, uint32_t len) { } extern "C" int Controller_ShouldRumble(size_t i) { - for (const auto& controller : Ship::Window::Controllers.at(i)) { - if (controller->CanRumble() && Game::Settings.controller.extra[i].rumble_strength > 0.001f) { + for (const auto& controller : Ship::Window::Controllers.at(i)) + { + float rumble_strength = CVar_GetFloat(StringHelper::Sprintf("gCont%i_RumbleStrength", i).c_str(), 1.0f); + + if (controller->CanRumble() && rumble_strength > 0.001f) { return 1; } } diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c index 0251ee498..7f3507abd 100644 --- a/soh/src/code/z_player_lib.c +++ b/soh/src/code/z_player_lib.c @@ -744,24 +744,24 @@ void func_8008F470(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthTextures[eyeIndex])); #endif if (tunic == PLAYER_TUNIC_KOKIRI) { - Color_RGB8 sTemp = { CVar_GetS32("gTunic_Kokiri_Red", &sTunicColors[PLAYER_TUNIC_KOKIRI].r), - CVar_GetS32("gTunic_Kokiri_Green", &sTunicColors[PLAYER_TUNIC_KOKIRI].g), - CVar_GetS32("gTunic_Kokiri_Blue", &sTunicColors[PLAYER_TUNIC_KOKIRI].b) }; + Color_RGB8 sTemp = { CVar_GetS32("gTunic_Kokiri_Red", sTunicColors[PLAYER_TUNIC_KOKIRI].r), + CVar_GetS32("gTunic_Kokiri_Green", sTunicColors[PLAYER_TUNIC_KOKIRI].g), + CVar_GetS32("gTunic_Kokiri_Blue", sTunicColors[PLAYER_TUNIC_KOKIRI].b) }; color = &sTemp; } else if (tunic == PLAYER_TUNIC_GORON) { - Color_RGB8 sTemp = { CVar_GetS32("gTunic_Goron_Red", &sTunicColors[PLAYER_TUNIC_GORON].r), - CVar_GetS32("gTunic_Goron_Green", &sTunicColors[PLAYER_TUNIC_GORON].g), - CVar_GetS32("gTunic_Goron_Blue", &sTunicColors[PLAYER_TUNIC_GORON].b) }; + Color_RGB8 sTemp = { CVar_GetS32("gTunic_Goron_Red", sTunicColors[PLAYER_TUNIC_GORON].r), + CVar_GetS32("gTunic_Goron_Green", sTunicColors[PLAYER_TUNIC_GORON].g), + CVar_GetS32("gTunic_Goron_Blue", sTunicColors[PLAYER_TUNIC_GORON].b) }; color = &sTemp; } else if (tunic == PLAYER_TUNIC_ZORA) { - Color_RGB8 sTemp = { CVar_GetS32("gTunic_Zora_Red", &sTunicColors[PLAYER_TUNIC_ZORA].r), - CVar_GetS32("gTunic_Zora_Green", &sTunicColors[PLAYER_TUNIC_ZORA].g), - CVar_GetS32("gTunic_Zora_Blue", &sTunicColors[PLAYER_TUNIC_ZORA].b) }; + Color_RGB8 sTemp = { CVar_GetS32("gTunic_Zora_Red", sTunicColors[PLAYER_TUNIC_ZORA].r), + CVar_GetS32("gTunic_Zora_Green", sTunicColors[PLAYER_TUNIC_ZORA].g), + CVar_GetS32("gTunic_Zora_Blue", sTunicColors[PLAYER_TUNIC_ZORA].b) }; color = &sTemp; } else { - Color_RGB8 sTemp = { CVar_GetS32("gTunic_Kokiri_Red", &sTunicColors[PLAYER_TUNIC_KOKIRI].r), - CVar_GetS32("gTunic_Kokiri_Green", &sTunicColors[PLAYER_TUNIC_KOKIRI].g), - CVar_GetS32("gTunic_Kokiri_Blue", &sTunicColors[PLAYER_TUNIC_KOKIRI].b) }; + Color_RGB8 sTemp = { CVar_GetS32("gTunic_Kokiri_Red", sTunicColors[PLAYER_TUNIC_KOKIRI].r), + CVar_GetS32("gTunic_Kokiri_Green", sTunicColors[PLAYER_TUNIC_KOKIRI].g), + CVar_GetS32("gTunic_Kokiri_Blue", sTunicColors[PLAYER_TUNIC_KOKIRI].b) }; color = &sTemp; } gDPSetEnvColor(POLY_OPA_DISP++, color->r, color->g, color->b, 0); From bd5a563dae2f44e2e04db144e3f924aae9982c1f Mon Sep 17 00:00:00 2001 From: Nicholas Estelami Date: Tue, 26 Apr 2022 15:05:56 -0400 Subject: [PATCH 088/146] Implemented PAL language support. --- ZAPDTR/ZAPD/ZText.cpp | 30 +++- .../GC_NMQ_D/text/fra_message_data_static.xml | 5 + .../GC_NMQ_D/text/ger_message_data_static.xml | 5 + .../text/fra_message_data_static.xml | 5 + .../text/ger_message_data_static.xml | 5 + soh/soh/z_message_OTR.cpp | 44 ++++-- soh/src/code/z_message_PAL.c | 146 +++++------------- 7 files changed, 113 insertions(+), 127 deletions(-) create mode 100644 soh/assets/xml/GC_NMQ_D/text/fra_message_data_static.xml create mode 100644 soh/assets/xml/GC_NMQ_D/text/ger_message_data_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/text/fra_message_data_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/text/ger_message_data_static.xml diff --git a/ZAPDTR/ZAPD/ZText.cpp b/ZAPDTR/ZAPD/ZText.cpp index 58af61bc9..2e9e0f68a 100644 --- a/ZAPDTR/ZAPD/ZText.cpp +++ b/ZAPDTR/ZAPD/ZText.cpp @@ -12,6 +12,7 @@ REGISTER_ZFILENODE(Text, ZText); ZText::ZText(ZFile* nParent) : ZResource(nParent) { RegisterRequiredAttribute("CodeOffset"); + RegisterOptionalAttribute("LangOffset", "0"); } void ZText::ParseRawData() @@ -20,6 +21,16 @@ void ZText::ParseRawData() const auto& rawData = parent->GetRawData(); uint32_t currentPtr = StringHelper::StrToL(registeredAttributes.at("CodeOffset").value, 16); + uint32_t langPtr = currentPtr; + bool isPalLang = false; + + if (StringHelper::StrToL(registeredAttributes.at("LangOffset").value, 16) != 0) + { + langPtr = StringHelper::StrToL(registeredAttributes.at("LangOffset").value, 16); + + if (langPtr != currentPtr) + isPalLang = true; + } std::vector codeData; @@ -34,8 +45,18 @@ void ZText::ParseRawData() msgEntry.id = BitConverter::ToInt16BE(codeData, currentPtr + 0); msgEntry.textboxType = (codeData[currentPtr + 2] & 0xF0) >> 4; msgEntry.textboxYPos = (codeData[currentPtr + 2] & 0x0F); - msgEntry.segmentId = (codeData[currentPtr + 4]); - msgEntry.msgOffset = BitConverter::ToInt32BE(codeData, currentPtr + 4) & 0x00FFFFFF; + + if (isPalLang) + { + msgEntry.segmentId = (codeData[langPtr + 0]); + msgEntry.msgOffset = BitConverter::ToInt32BE(codeData, langPtr + 0) & 0x00FFFFFF; + } + else + { + msgEntry.segmentId = (codeData[langPtr + 4]); + msgEntry.msgOffset = BitConverter::ToInt32BE(codeData, langPtr + 4) & 0x00FFFFFF; + } + uint32_t msgPtr = msgEntry.msgOffset; unsigned char c = rawData[msgPtr]; @@ -82,6 +103,11 @@ void ZText::ParseRawData() break; currentPtr += 8; + + if (isPalLang) + langPtr += 4; + else + langPtr += 8; } int bp2 = 0; diff --git a/soh/assets/xml/GC_NMQ_D/text/fra_message_data_static.xml b/soh/assets/xml/GC_NMQ_D/text/fra_message_data_static.xml new file mode 100644 index 000000000..bfc725d99 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_D/text/fra_message_data_static.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_D/text/ger_message_data_static.xml b/soh/assets/xml/GC_NMQ_D/text/ger_message_data_static.xml new file mode 100644 index 000000000..c62e756a0 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_D/text/ger_message_data_static.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/text/fra_message_data_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/text/fra_message_data_static.xml new file mode 100644 index 000000000..fcedf3e5f --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/text/fra_message_data_static.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/text/ger_message_data_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/text/ger_message_data_static.xml new file mode 100644 index 000000000..ec7f4cbff --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/text/ger_message_data_static.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/soh/soh/z_message_OTR.cpp b/soh/soh/z_message_OTR.cpp index 354997e16..ac1f013c2 100644 --- a/soh/soh/z_message_OTR.cpp +++ b/soh/soh/z_message_OTR.cpp @@ -8,27 +8,37 @@ #include extern "C" MessageTableEntry* sNesMessageEntryTablePtr; +extern "C" MessageTableEntry* sGerMessageEntryTablePtr; +extern "C" MessageTableEntry* sFraMessageEntryTablePtr; extern "C" MessageTableEntry* sStaffMessageEntryTablePtr; -//extern "C" MessageTableEntry* _message_0xFFFC_nes; +//extern "C" MessageTableEntry* _message_0xFFFC_nes; + +MessageTableEntry* OTRMessage_LoadTable(const char* filePath, bool isNES) { + auto file = std::static_pointer_cast(OTRGlobals::Instance->context->GetResourceManager()->LoadResource(filePath)); + + if (file == nullptr) + return nullptr; + + MessageTableEntry* table = (MessageTableEntry*)malloc(sizeof(MessageTableEntry) * file->messages.size()); + + for (int i = 0; i < file->messages.size(); i++) { + table[i].textId = file->messages[i].id; + table[i].typePos = (file->messages[i].textboxType << 4) | file->messages[i].textboxYPos; + table[i].segment = file->messages[i].msg.c_str(); + table[i].msgSize = file->messages[i].msg.size(); + + if (isNES && file->messages[i].id == 0xFFFC) + _message_0xFFFC_nes = (char*)file->messages[i].msg.c_str(); + } + + return table; +} extern "C" void OTRMessage_Init() { - auto file = std::static_pointer_cast(OTRGlobals::Instance->context->GetResourceManager()->LoadResource("text/nes_message_data_static/nes_message_data_static")); - - sNesMessageEntryTablePtr = (MessageTableEntry*)malloc(sizeof(MessageTableEntry) * file->messages.size()); - - for (int i = 0; i < file->messages.size(); i++) - { - sNesMessageEntryTablePtr[i].textId = file->messages[i].id; - sNesMessageEntryTablePtr[i].typePos = (file->messages[i].textboxType << 4) | file->messages[i].textboxYPos; - sNesMessageEntryTablePtr[i].segment = file->messages[i].msg.c_str(); - sNesMessageEntryTablePtr[i].msgSize = file->messages[i].msg.size(); - - if (file->messages[i].id == 0xFFFC) - { - _message_0xFFFC_nes = (char*)file->messages[i].msg.c_str(); - } - } + sNesMessageEntryTablePtr = OTRMessage_LoadTable("text/nes_message_data_static/nes_message_data_static", true); + sGerMessageEntryTablePtr = OTRMessage_LoadTable("text/ger_message_data_static/ger_message_data_static", false); + sFraMessageEntryTablePtr = OTRMessage_LoadTable("text/fra_message_data_static/fra_message_data_static", false); auto file2 = std::static_pointer_cast(OTRGlobals::Instance->context->GetResourceManager()->LoadResource("text/staff_message_data_static/staff_message_data_static")); diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c index 6a29a6564..6dbe6f6d7 100644 --- a/soh/src/code/z_message_PAL.c +++ b/soh/src/code/z_message_PAL.c @@ -33,42 +33,12 @@ s16 sMessageHasSetSfx = false; u16 sOcarinaSongBitFlags = 0; // ocarina bit flags MessageTableEntry* sNesMessageEntryTablePtr; +MessageTableEntry* sGerMessageEntryTablePtr; +MessageTableEntry* sFraMessageEntryTablePtr; MessageTableEntry* sStaffMessageEntryTablePtr; char* _message_0xFFFC_nes; -//MessageTableEntry sNesMessageEntryTable[] = { -//#define DEFINE_MESSAGE(textId, type, yPos, nesMessage, gerMessage, fraMessage) \ -// { textId, (_SHIFTL(type, 4, 8) | _SHIFTL(yPos, 0, 8)), _message_##textId##_nes }, -//#define DEFINE_MESSAGE_FFFC -//#include "text/message_data.h" -//#undef DEFINE_MESSAGE_FFFC -//#undef DEFINE_MESSAGE -// { 0xFFFF, 0, NULL }, -//}; -// -//const char* sGerMessageEntryTable[] = { -//#define DEFINE_MESSAGE(textId, type, yPos, nesMessage, gerMessage, fraMessage) _message_##textId##_ger, -//#include "text/message_data.h" -//#undef DEFINE_MESSAGE -// NULL, -//}; -// -//const char* sFraMessageEntryTable[] = { -//#define DEFINE_MESSAGE(textId, type, yPos, nesMessage, gerMessage, fraMessage) _message_##textId##_fra, -//#include "text/message_data.h" -//#undef DEFINE_MESSAGE -// NULL, -//}; -// -//MessageTableEntry sStaffMessageEntryTable[] = { -//#define DEFINE_MESSAGE(textId, type, yPos, staffMessage) \ -// { textId, (_SHIFTL(type, 4, 8) | _SHIFTL(yPos, 0, 8)), _message_##textId##_staff }, -//#include "text/message_data_staff.h" -//#undef DEFINE_MESSAGE -// { 0xFFFF, 0, NULL }, -//}; - //MessageTableEntry* sNesMessageEntryTablePtr = sNesMessageEntryTable; //const char** sGerMessageEntryTablePtr = sGerMessageEntryTable; //const char** sFraMessageEntryTablePtr = sFraMessageEntryTable; @@ -310,69 +280,46 @@ void Message_FindMessage(GlobalContext* globalCtx, u16 textId) { Font* font; const char* seg; - - if (gSaveContext.language == LANGUAGE_ENG) { - seg = messageTableEntry->segment; + if (gSaveContext.language == LANGUAGE_GER) + messageTableEntry = sGerMessageEntryTablePtr; + else if (gSaveContext.language == LANGUAGE_FRA) + messageTableEntry = sFraMessageEntryTablePtr; - while (messageTableEntry->textId != 0xFFFF) { - font = &globalCtx->msgCtx.font; + // If PAL languages are not present in the OTR file, default to English + if (messageTableEntry == NULL) + messageTableEntry = sNesMessageEntryTablePtr; - if (messageTableEntry->textId == textId) { - foundSeg = messageTableEntry->segment; - font->charTexBuf[0] = messageTableEntry->typePos; - //messageTableEntry++; - nextSeg = messageTableEntry->segment; - font->msgOffset = messageTableEntry->segment; - font->msgLength = messageTableEntry->msgSize; - // "Message found!!!" - osSyncPrintf(" メッセージãŒ,見ã¤ã‹ã£ãŸï¼ï¼ï¼ = %x " - "(data=%x) (data0=%x) (data1=%x) (data2=%x) (data3=%x)\n", - textId, font->msgOffset, font->msgLength, foundSeg, seg, nextSeg); - return; - } - messageTableEntry++; - } - } else { - //languageSegmentTable = (gSaveContext.language == LANGUAGE_GER) ? sGerMessageEntryTablePtr : sFraMessageEntryTablePtr; // OTRTODO - seg = messageTableEntry->segment; - - while (messageTableEntry->textId != 0xFFFF) { - font = &globalCtx->msgCtx.font; - - if (messageTableEntry->textId == textId) { - foundSeg = *languageSegmentTable; - font->charTexBuf[0] = messageTableEntry->typePos; - languageSegmentTable++; - nextSeg = *languageSegmentTable; - font->msgOffset = foundSeg - seg; - font->msgLength = nextSeg - foundSeg; - // "Message found!!!" - osSyncPrintf(" メッセージãŒ,見ã¤ã‹ã£ãŸï¼ï¼ï¼ = %x " - "(data=%x) (data0=%x) (data1=%x) (data2=%x) (data3=%x)\n", - textId, font->msgOffset, font->msgLength, foundSeg, seg, nextSeg); - return; - } - messageTableEntry++; - languageSegmentTable++; + seg = messageTableEntry->segment; + + while (messageTableEntry->textId != 0xFFFF) { + font = &globalCtx->msgCtx.font; + + if (messageTableEntry->textId == textId) { + foundSeg = messageTableEntry->segment; + font->charTexBuf[0] = messageTableEntry->typePos; + + nextSeg = messageTableEntry->segment; + font->msgOffset = messageTableEntry->segment; + font->msgLength = messageTableEntry->msgSize; + + // "Message found!!!" + osSyncPrintf(" メッセージãŒ,見ã¤ã‹ã£ãŸï¼ï¼ï¼ = %x " + "(data=%x) (data0=%x) (data1=%x) (data2=%x) (data3=%x)\n", + textId, font->msgOffset, font->msgLength, foundSeg, seg, nextSeg); + return; } + messageTableEntry++; } + // "Message not found!!!" osSyncPrintf(" メッセージãŒ,見ã¤ã‹ã‚‰ãªã‹ã£ãŸï¼ï¼ï¼ = %x\n", textId); font = &globalCtx->msgCtx.font; messageTableEntry = sNesMessageEntryTablePtr; - if (gSaveContext.language == LANGUAGE_ENG) { - foundSeg = messageTableEntry->segment; - font->charTexBuf[0] = messageTableEntry->typePos; - messageTableEntry++; - nextSeg = messageTableEntry->segment; - } else { - //languageSegmentTable = (gSaveContext.language == LANGUAGE_GER) ? sGerMessageEntryTablePtr : sFraMessageEntryTablePtr; // OTRTODO - foundSeg = *languageSegmentTable; - font->charTexBuf[0] = messageTableEntry->typePos; - languageSegmentTable++; - nextSeg = *languageSegmentTable; - } + foundSeg = messageTableEntry->segment; + font->charTexBuf[0] = messageTableEntry->typePos; + messageTableEntry++; + nextSeg = messageTableEntry->segment; font->msgOffset = foundSeg - seg; font->msgLength = nextSeg - foundSeg; } @@ -391,7 +338,6 @@ void Message_FindCreditsMessage(GlobalContext* globalCtx, u16 textId) { if (messageTableEntry->textId == textId) { foundSeg = messageTableEntry->segment; font->charTexBuf[0] = messageTableEntry->typePos; - //messageTableEntry++; nextSeg = messageTableEntry->segment; font->msgOffset = messageTableEntry->segment; font->msgLength = messageTableEntry->msgSize; @@ -1145,7 +1091,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) { } } if (msgCtx->textDelayTimer == 0) { - msgCtx->textDrawPos = i + 1; + msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1); msgCtx->textDelayTimer = msgCtx->textDelay; } else { msgCtx->textDelayTimer--; @@ -1640,26 +1586,10 @@ void Message_OpenText(GlobalContext* globalCtx, u16 textId) { //DmaMgr_SendRequest1(font->msgBuf, (uintptr_t)(_staff_message_data_staticSegmentRomStart + 4 + font->msgOffset), //font->msgLength, "../z_message_PAL.c", 1954); } else { - if (gSaveContext.language == LANGUAGE_ENG) - { - Message_FindMessage(globalCtx, textId); - msgCtx->msgLength = font->msgLength; - char* src = (uintptr_t)font->msgOffset; - memcpy(font->msgBuf, src, font->msgLength); - } else if (gSaveContext.language == LANGUAGE_GER) { - // OTRTODO - //Message_FindMessage(globalCtx, textId); - //msgCtx->msgLength = font->msgLength; - //DmaMgr_SendRequest1(font->msgBuf, (uintptr_t)(_ger_message_data_staticSegmentRomStart + font->msgOffset), - //font->msgLength, "../z_message_PAL.c", 1978); - } else - { - // OTRTODO - //Message_FindMessage(globalCtx, textId); - //msgCtx->msgLength = font->msgLength; - //DmaMgr_SendRequest1(font->msgBuf, (uintptr_t)(_fra_message_data_staticSegmentRomStart + font->msgOffset), - //font->msgLength, "../z_message_PAL.c", 1990); - } + Message_FindMessage(globalCtx, textId); + msgCtx->msgLength = font->msgLength; + char* src = (uintptr_t)font->msgOffset; + memcpy(font->msgBuf, src, font->msgLength); } msgCtx->textBoxProperties = font->charTexBuf[0]; From 4c74acdd29fac954017ef82dfb82dbed8114c4cc Mon Sep 17 00:00:00 2001 From: Nicholas Estelami Date: Tue, 26 Apr 2022 18:10:54 -0400 Subject: [PATCH 089/146] Combined message table xmls --- .../xml/GC_NMQ_D/text/fra_message_data_static.xml | 5 ----- .../xml/GC_NMQ_D/text/ger_message_data_static.xml | 5 ----- .../xml/GC_NMQ_D/text/message_data_static.xml | 14 ++++++++++++++ .../xml/GC_NMQ_D/text/nes_message_data_static.xml | 5 ----- .../GC_NMQ_D/text/staff_message_data_static.xml | 5 ----- .../GC_NMQ_PAL_F/text/fra_message_data_static.xml | 5 ----- .../GC_NMQ_PAL_F/text/ger_message_data_static.xml | 5 ----- .../xml/GC_NMQ_PAL_F/text/message_data_static.xml | 14 ++++++++++++++ .../GC_NMQ_PAL_F/text/nes_message_data_static.xml | 5 ----- .../text/staff_message_data_static.xml | 5 ----- 10 files changed, 28 insertions(+), 40 deletions(-) delete mode 100644 soh/assets/xml/GC_NMQ_D/text/fra_message_data_static.xml delete mode 100644 soh/assets/xml/GC_NMQ_D/text/ger_message_data_static.xml create mode 100644 soh/assets/xml/GC_NMQ_D/text/message_data_static.xml delete mode 100644 soh/assets/xml/GC_NMQ_D/text/nes_message_data_static.xml delete mode 100644 soh/assets/xml/GC_NMQ_D/text/staff_message_data_static.xml delete mode 100644 soh/assets/xml/GC_NMQ_PAL_F/text/fra_message_data_static.xml delete mode 100644 soh/assets/xml/GC_NMQ_PAL_F/text/ger_message_data_static.xml create mode 100644 soh/assets/xml/GC_NMQ_PAL_F/text/message_data_static.xml delete mode 100644 soh/assets/xml/GC_NMQ_PAL_F/text/nes_message_data_static.xml delete mode 100644 soh/assets/xml/GC_NMQ_PAL_F/text/staff_message_data_static.xml diff --git a/soh/assets/xml/GC_NMQ_D/text/fra_message_data_static.xml b/soh/assets/xml/GC_NMQ_D/text/fra_message_data_static.xml deleted file mode 100644 index bfc725d99..000000000 --- a/soh/assets/xml/GC_NMQ_D/text/fra_message_data_static.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/soh/assets/xml/GC_NMQ_D/text/ger_message_data_static.xml b/soh/assets/xml/GC_NMQ_D/text/ger_message_data_static.xml deleted file mode 100644 index c62e756a0..000000000 --- a/soh/assets/xml/GC_NMQ_D/text/ger_message_data_static.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/soh/assets/xml/GC_NMQ_D/text/message_data_static.xml b/soh/assets/xml/GC_NMQ_D/text/message_data_static.xml new file mode 100644 index 000000000..223493596 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_D/text/message_data_static.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_D/text/nes_message_data_static.xml b/soh/assets/xml/GC_NMQ_D/text/nes_message_data_static.xml deleted file mode 100644 index e2d39a916..000000000 --- a/soh/assets/xml/GC_NMQ_D/text/nes_message_data_static.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/soh/assets/xml/GC_NMQ_D/text/staff_message_data_static.xml b/soh/assets/xml/GC_NMQ_D/text/staff_message_data_static.xml deleted file mode 100644 index f675929e1..000000000 --- a/soh/assets/xml/GC_NMQ_D/text/staff_message_data_static.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/soh/assets/xml/GC_NMQ_PAL_F/text/fra_message_data_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/text/fra_message_data_static.xml deleted file mode 100644 index fcedf3e5f..000000000 --- a/soh/assets/xml/GC_NMQ_PAL_F/text/fra_message_data_static.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/soh/assets/xml/GC_NMQ_PAL_F/text/ger_message_data_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/text/ger_message_data_static.xml deleted file mode 100644 index ec7f4cbff..000000000 --- a/soh/assets/xml/GC_NMQ_PAL_F/text/ger_message_data_static.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/soh/assets/xml/GC_NMQ_PAL_F/text/message_data_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/text/message_data_static.xml new file mode 100644 index 000000000..400a27e27 --- /dev/null +++ b/soh/assets/xml/GC_NMQ_PAL_F/text/message_data_static.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/text/nes_message_data_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/text/nes_message_data_static.xml deleted file mode 100644 index 4cf46d252..000000000 --- a/soh/assets/xml/GC_NMQ_PAL_F/text/nes_message_data_static.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/soh/assets/xml/GC_NMQ_PAL_F/text/staff_message_data_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/text/staff_message_data_static.xml deleted file mode 100644 index 0a7efda81..000000000 --- a/soh/assets/xml/GC_NMQ_PAL_F/text/staff_message_data_static.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - From 8828d8a17002364367f02c577bb4efa069b58db7 Mon Sep 17 00:00:00 2001 From: Nicholas Estelami Date: Tue, 26 Apr 2022 18:52:25 -0400 Subject: [PATCH 090/146] Minor cleanup --- soh/src/code/z_message_PAL.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c index 6dbe6f6d7..c970aec5f 100644 --- a/soh/src/code/z_message_PAL.c +++ b/soh/src/code/z_message_PAL.c @@ -39,11 +39,6 @@ MessageTableEntry* sStaffMessageEntryTablePtr; char* _message_0xFFFC_nes; -//MessageTableEntry* sNesMessageEntryTablePtr = sNesMessageEntryTable; -//const char** sGerMessageEntryTablePtr = sGerMessageEntryTable; -//const char** sFraMessageEntryTablePtr = sFraMessageEntryTable; -//MessageTableEntry* sStaffMessageEntryTablePtr = sStaffMessageEntryTable; - s16 sTextboxBackgroundForePrimColors[][3] = { { 255, 255, 255 }, { 50, 20, 0 }, { 255, 60, 0 }, { 255, 255, 255 }, { 255, 255, 255 }, { 255, 255, 255 }, { 255, 255, 255 }, { 255, 255, 255 }, @@ -205,8 +200,6 @@ void Message_DrawTextChar(GlobalContext* globalCtx, void* textureImage, Gfx** p) s16 x = msgCtx->textPosX; s16 y = msgCtx->textPosY; - //gSPInvalidateTexCache(gfx++, 0); - //gSPInvalidateTexCache(gfx++, msgCtx->textboxSegment); gSPInvalidateTexCache(gfx++, textureImage); gDPPipeSync(gfx++); From 444026038e31c6320ebbb5e21f108a060b0b4fbb Mon Sep 17 00:00:00 2001 From: Sirius902 <3645979-Sirius902@users.noreply.gitlab.com> Date: Fri, 29 Apr 2022 21:47:38 -0700 Subject: [PATCH 091/146] Fix cvar crash --- libultraship/libultraship/SDLController.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libultraship/libultraship/SDLController.cpp b/libultraship/libultraship/SDLController.cpp index c6892edbe..4533df20b 100644 --- a/libultraship/libultraship/SDLController.cpp +++ b/libultraship/libultraship/SDLController.cpp @@ -196,8 +196,8 @@ namespace Ship { const char* contName = SDL_GameControllerName(Cont); const int isSpecialController = !strcmp("PS5 Controller", contName); - float gyro_drift_x = CVar_GetFloat(StringHelper::Sprintf("gCont%i_GyroDriftX").c_str(), 0.0f); - float gyro_drift_y = CVar_GetFloat(StringHelper::Sprintf("gCont%i_GyroDriftY").c_str(), 0.0f); + float gyro_drift_x = CVar_GetFloat(StringHelper::Sprintf("gCont%i_GyroDriftX", contNumber).c_str(), 0.0f); + float gyro_drift_y = CVar_GetFloat(StringHelper::Sprintf("gCont%i_GyroDriftY", contNumber).c_str(), 0.0f); const float gyro_sensitivity = CVar_GetFloat(StringHelper::Sprintf("gCont%i_GyroSensitivity").c_str(), 1.0f); if (gyro_drift_x == 0) { @@ -213,8 +213,8 @@ namespace Ship { } } - CVar_SetFloat(StringHelper::Sprintf("gCont%i_GyroDriftX").c_str(), gyro_drift_x); - CVar_SetFloat(StringHelper::Sprintf("gCont%i_GyroDriftY").c_str(), gyro_drift_y); + CVar_SetFloat(StringHelper::Sprintf("gCont%i_GyroDriftX", contNumber).c_str(), gyro_drift_x); + CVar_SetFloat(StringHelper::Sprintf("gCont%i_GyroDriftY", contNumber).c_str(), gyro_drift_y); if (isSpecialController == 1) { wGyroX = gyroData[0] - gyro_drift_x; From c7ad92e09a27172318c117005ff496e6af7a7c8c Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Wed, 27 Apr 2022 23:03:04 -0500 Subject: [PATCH 092/146] Fixed lake hylia water collision --- .../actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c b/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c index fbc707ade..2d1cbbc8c 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c @@ -166,6 +166,9 @@ void BgSpot06Objects_Init(Actor* thisx, GlobalContext* globalCtx) { } } else { this->lakeHyliaWaterLevel = 0.0f; + WaterBox* water_boxes = globalCtx->colCtx.colHeader->waterBoxes; + water_boxes[LHWB_MAIN_1].ySurface = WATER_LEVEL_RAISED; + water_boxes[LHWB_MAIN_2].ySurface = WATER_LEVEL_RAISED; this->actionFunc = BgSpot06Objects_DoNothing; } break; From 4a8a7f5c7df68f042e13dc5c5f9c79ae4910131a Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Thu, 28 Apr 2022 12:08:40 -0500 Subject: [PATCH 093/146] Fixed gerudo valley entrance to lho --- .../overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c b/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c index 2d1cbbc8c..bea02aaae 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c @@ -167,6 +167,8 @@ void BgSpot06Objects_Init(Actor* thisx, GlobalContext* globalCtx) { } else { this->lakeHyliaWaterLevel = 0.0f; WaterBox* water_boxes = globalCtx->colCtx.colHeader->waterBoxes; + water_boxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].ySurface = WATER_LEVEL_RIVER_RAISED; + water_boxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].zMin += 50; water_boxes[LHWB_MAIN_1].ySurface = WATER_LEVEL_RAISED; water_boxes[LHWB_MAIN_2].ySurface = WATER_LEVEL_RAISED; this->actionFunc = BgSpot06Objects_DoNothing; From 4f72923fcd62752e1ceb0a8e03b3140a4042c349 Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Thu, 28 Apr 2022 12:51:59 -0500 Subject: [PATCH 094/146] Removed zMin that causes to disable the fall from the cascade --- .../overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c | 1 - 1 file changed, 1 deletion(-) diff --git a/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c b/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c index bea02aaae..0951da7d7 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c @@ -168,7 +168,6 @@ void BgSpot06Objects_Init(Actor* thisx, GlobalContext* globalCtx) { this->lakeHyliaWaterLevel = 0.0f; WaterBox* water_boxes = globalCtx->colCtx.colHeader->waterBoxes; water_boxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].ySurface = WATER_LEVEL_RIVER_RAISED; - water_boxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].zMin += 50; water_boxes[LHWB_MAIN_1].ySurface = WATER_LEVEL_RAISED; water_boxes[LHWB_MAIN_2].ySurface = WATER_LEVEL_RAISED; this->actionFunc = BgSpot06Objects_DoNothing; From ffaafb8b4e571e67f2ac0a1ee33c2a1450aee2f0 Mon Sep 17 00:00:00 2001 From: Ada <60364512+GreatArgorath@users.noreply.github.com> Date: Sun, 24 Apr 2022 13:16:11 +0100 Subject: [PATCH 095/146] Fixes visual bug in shops when above 2x text speed --- soh/src/code/z_message_PAL.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c index c970aec5f..419b322f8 100644 --- a/soh/src/code/z_message_PAL.c +++ b/soh/src/code/z_message_PAL.c @@ -1084,7 +1084,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) { } } if (msgCtx->textDelayTimer == 0) { - msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1); + msgCtx->textDrawPos = i + 1; msgCtx->textDelayTimer = msgCtx->textDelay; } else { msgCtx->textDelayTimer--; From 86869085cd44fc9aa8ccdad657e7963000252a2e Mon Sep 17 00:00:00 2001 From: Ada <60364512+GreatArgorath@users.noreply.github.com> Date: Tue, 26 Apr 2022 18:03:20 +0100 Subject: [PATCH 096/146] Fixes shop UI for text speed (actually this time) Realised my previous PR targetted the wrong line in `z_message_pal`, this might fix other issues people were having, haven't tested yet. --- soh/src/code/z_message_PAL.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c index 419b322f8..ffb0581c7 100644 --- a/soh/src/code/z_message_PAL.c +++ b/soh/src/code/z_message_PAL.c @@ -890,7 +890,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) { } } i = j - 1; - msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1); + msgCtx->textDrawPos = i + 1; if (character) {} } @@ -1084,7 +1084,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) { } } if (msgCtx->textDelayTimer == 0) { - msgCtx->textDrawPos = i + 1; + msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1); msgCtx->textDelayTimer = msgCtx->textDelay; } else { msgCtx->textDelayTimer--; From 5b52e7e570d031875a71208027e9395dc30e37a0 Mon Sep 17 00:00:00 2001 From: sholdee <102821812+sholdee@users.noreply.github.com> Date: Fri, 29 Apr 2022 16:11:38 -0500 Subject: [PATCH 097/146] Commit Jenkinsfile to develop --- Jenkinsfile | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..fa68703b2 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,99 @@ +pipeline { + + environment { + MSBUILD='C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Msbuild\\Current\\Bin\\msbuild.exe' + CONFIG='Release' + OTRPLATFORM='x64' + PLATFORM='x86' + ZIP='C:\\Program Files\\7-Zip\\7z.exe' + PYTHON='C:\\Users\\jenkins\\AppData\\Local\\Programs\\Python\\Python310\\python.exe' + TOOLSET='v142' + EMAILTO='' + } + + agent { + label 'SoH-Builders' + } + + options { + timestamps() + timeout(time: 15, unit: 'MINUTES') + skipDefaultCheckout(true) + } + + stages { + + stage ('Checkout') { + steps { + checkout([ + $class: 'GitSCM', + branches: scm.branches, + doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations, + extensions: scm.extensions, + userRemoteConfigs: scm.userRemoteConfigs + ]) + } + } + + stage ('Build OTRExporter') { + steps { + bat """ + + "${env.MSBUILD}" ".\\OTRExporter\\OTRExporter.sln" -t:restore,build -p:Configuration=${env.CONFIG};Platform=${env.OTRPLATFORM};PlatformToolset=${env.TOOLSET};RestorePackagesConfig=true /nodeReuse:false + + """ + } + } + + stage ('Extract assets') { + steps { + bat """ + + xcopy "..\\..\\ZELOOTD.z64" "OTRExporter\\" + + cd "OTRExporter" + "${env.PYTHON}" ".\\extract_assets.py" + cd "${env.WORKSPACE}" + + """ + } + } + + stage ('Build SoH') { + steps { + bat """ + + "${env.MSBUILD}" ".\\soh\\soh.sln" -t:build -p:Configuration=${env.CONFIG};Platform=${env.PLATFORM};PlatformToolset=${env.TOOLSET} /nodeReuse:false + + """ + } + } + + stage ('Archive artifacts') { + steps { + bat """ + + "${env.ZIP}" a "soh.zip" ".\\soh\\Release\\soh.exe" + + """ + + archiveArtifacts allowEmptyArchive: false, + artifacts: 'soh.zip', + caseSensitive: true, + defaultExcludes: true, + fingerprint: false, + onlyIfSuccessful: true + } + } + } + + post { + always { + step([$class: 'Mailer', + notifyEveryUnstableBuild: true, + recipients: "${env.EMAILTO}", + sendToIndividuals: false]) + step([$class: 'WsCleanup']) // Clean workspace + } + } +} From 589557be9c912668f5b04519cfe5a6a89c75e70a Mon Sep 17 00:00:00 2001 From: Emil Lenngren Date: Fri, 29 Apr 2022 22:17:07 +0200 Subject: [PATCH 098/146] Reduce input lag by one frame by reading the controller at the correct place --- libultraship/libultraship/Window.cpp | 5 ++++- libultraship/libultraship/Window.h | 1 + soh/soh/GbiWrap.cpp | 1 + soh/soh/OTRGlobals.cpp | 4 ++++ soh/soh/OTRGlobals.h | 1 + soh/src/code/graph.c | 1 + 6 files changed, 12 insertions(+), 1 deletion(-) diff --git a/libultraship/libultraship/Window.cpp b/libultraship/libultraship/Window.cpp index 2b57c547e..0feb7229f 100644 --- a/libultraship/libultraship/Window.cpp +++ b/libultraship/libultraship/Window.cpp @@ -275,8 +275,11 @@ namespace Ship { WmApi->set_keyboard_callbacks(Window::KeyDown, Window::KeyUp, Window::AllKeysUp); } - void Window::RunCommands(Gfx* Commands) { + void Window::StartFrame() { gfx_start_frame(); + } + + void Window::RunCommands(Gfx* Commands) { gfx_run(Commands); gfx_end_frame(); } diff --git a/libultraship/libultraship/Window.h b/libultraship/libultraship/Window.h index 0d12211b0..b075e496f 100644 --- a/libultraship/libultraship/Window.h +++ b/libultraship/libultraship/Window.h @@ -18,6 +18,7 @@ namespace Ship { ~Window(); void MainLoop(void (*MainFunction)(void)); void Init(); + void StartFrame(); void RunCommands(Gfx* Commands); void SetFrameDivisor(int divisor); void GetPixelDepthPrepare(float x, float y); diff --git a/soh/soh/GbiWrap.cpp b/soh/soh/GbiWrap.cpp index c7f69f1a9..9f71f1717 100644 --- a/soh/soh/GbiWrap.cpp +++ b/soh/soh/GbiWrap.cpp @@ -5,6 +5,7 @@ extern "C" { void InitOTR(); void Graph_ProcessFrame(void (*run_one_game_iter)(void)); +void Graph_StartFrame(); void Graph_ProcessGfxCommands(Gfx* commands); void OTRLogString(const char* src); void OTRGfxPrint(const char* str, void* printer, void (*printImpl)(void*, char)); diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 69917e8ac..d2bc941cf 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -92,6 +92,10 @@ extern "C" void Graph_ProcessFrame(void (*run_one_game_iter)(void)) { OTRGlobals::Instance->context->GetWindow()->MainLoop(run_one_game_iter); } +extern "C" void Graph_StartFrame() { + OTRGlobals::Instance->context->GetWindow()->StartFrame(); +} + // C->C++ Bridge extern "C" void Graph_ProcessGfxCommands(Gfx* commands) { OTRGlobals::Instance->context->GetWindow()->SetFrameDivisor(R_UPDATE_RATE); diff --git a/soh/soh/OTRGlobals.h b/soh/soh/OTRGlobals.h index dfb235712..7ce08649a 100644 --- a/soh/soh/OTRGlobals.h +++ b/soh/soh/OTRGlobals.h @@ -21,6 +21,7 @@ private: #ifndef __cplusplus void InitOTR(); void Graph_ProcessFrame(void (*run_one_game_iter)(void)); +void Graph_StartFrame(); void Graph_ProcessGfxCommands(Gfx* commands); void OTRLogString(const char* src); void OTRGfxPrint(const char* str, void* printer, void (*printImpl)(void*, char)); diff --git a/soh/src/code/graph.c b/soh/src/code/graph.c index 10293fa5f..5d0495961 100644 --- a/soh/src/code/graph.c +++ b/soh/src/code/graph.c @@ -472,6 +472,7 @@ static void RunFrame() uint64_t ticksA, ticksB; ticksA = GetPerfCounter(); + Graph_StartFrame(); PadMgr_ThreadEntry(&gPadMgr); From 8526e3ee2a65c5994704e875b8cbbc860f87a591 Mon Sep 17 00:00:00 2001 From: Emil Lenngren Date: Sat, 30 Apr 2022 17:43:54 +0200 Subject: [PATCH 099/146] Add back no-near-clipping which was accidentally removed --- libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp index 6f3017c15..e0e76d32a 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp @@ -610,6 +610,7 @@ static void gfx_opengl_init(void) { glGenBuffers(1, &opengl_vbo); glBindBuffer(GL_ARRAY_BUFFER, opengl_vbo); + glEnable(GL_DEPTH_CLAMP); glDepthFunc(GL_LEQUAL); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); From d009c2a539653649fd306b726d5167f1a044a9f1 Mon Sep 17 00:00:00 2001 From: Emil Lenngren Date: Sat, 30 Apr 2022 22:20:02 +0200 Subject: [PATCH 100/146] Workaround Intel OpenGL driver in get pixel depth --- libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp index e0e76d32a..6c5f47577 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp @@ -776,8 +776,13 @@ static std::map, uint16_t> gfx_opengl_get_pixel_depth(in res.emplace(*coordinates.begin(), (depth_stencil_value >> 18) << 2); } else { if (pixel_depth_rb_size < coordinates.size()) { + // Resizing a renderbuffer seems broken with Intel's driver, so recreate one instead. + glBindFramebuffer(GL_FRAMEBUFFER, pixel_depth_fb); + glDeleteRenderbuffers(1, &pixel_depth_rb); + glGenRenderbuffers(1, &pixel_depth_rb); glBindRenderbuffer(GL_RENDERBUFFER, pixel_depth_rb); glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, coordinates.size(), 1); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_RENDERBUFFER, pixel_depth_rb); glBindRenderbuffer(GL_RENDERBUFFER, 0); pixel_depth_rb_size = coordinates.size(); @@ -814,6 +819,7 @@ static std::map, uint16_t> gfx_opengl_get_pixel_depth(in } glBindFramebuffer(GL_FRAMEBUFFER, current_framebuffer); + return res; } From e4dd7027a9f4f36a199545dc30e05955444030be Mon Sep 17 00:00:00 2001 From: rozlette Date: Fri, 8 Apr 2022 17:11:21 -0500 Subject: [PATCH 101/146] POC --- soh/src/code/z_play.c | 60 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/soh/src/code/z_play.c b/soh/src/code/z_play.c index 6218b7d76..6cb04bec3 100644 --- a/soh/src/code/z_play.c +++ b/soh/src/code/z_play.c @@ -1222,8 +1222,64 @@ void Gameplay_Draw(GlobalContext* globalCtx) { sp80 = HREG(84); } Scene_Draw(globalCtx); - Room_Draw(globalCtx, &globalCtx->roomCtx.curRoom, sp80 & 3); - Room_Draw(globalCtx, &globalCtx->roomCtx.prevRoom, sp80 & 3); + //Room_Draw(globalCtx, &globalCtx->roomCtx.curRoom, sp80 & 3); + //Room_Draw(globalCtx, &globalCtx->roomCtx.prevRoom, sp80 & 3); + + Vec3f asd = { 0.0f, 0.0f, 0.0f }; + func_800342EC(&asd, globalCtx); + //func_80093C80(globalCtx); + { + uint32_t rm; + uint32_t blc1; + uint32_t blc2; + + + rm = Z_CMP | Z_UPD | CVG_DST_CLAMP | FORCE_BL; + blc1 = GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1); + blc2 = GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1); + rm |= ZMODE_OPA; + + gSPLoadGeometryMode(POLY_OPA_DISP++, G_ZBUFFER | G_SHADE | G_LIGHTING); + gSPTexture(POLY_OPA_DISP++, 0, 0, 0, G_TX_RENDERTILE, G_OFF); + + //gDPPipeSync(POLY_OPA_DISP++); + gDPSetCycleType(POLY_OPA_DISP++, G_CYC_1CYCLE); + gDPSetRenderMode(POLY_OPA_DISP++, rm | blc1, rm | blc2); + gDPSetCombineMode(POLY_OPA_DISP++, G_CC_HILITERGB, G_CC_HILITERGB); + gDPSetEnvColor(POLY_OPA_DISP++, 0xFF, 0xFF, 0xFF, 0xFF); + } + gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0xFF, 0, 0, 0xFF); + + CollisionHeader* col = globalCtx->colCtx.colHeader; + //for (int i = 0; i < col->numPolygons; i++) { + for (int i = 0; i < col->numPolygons / 2; i++) { + CollisionPoly* poly = &col->polyList[i]; + u16 a = poly->flags_vIA & 0x1FFF; + u16 b = poly->flags_vIB & 0x1FFF; + u16 c = poly->vIC & 0x1FFF; + + Vec3s* va = &col->vtxList[a]; + Vec3s* vb = &col->vtxList[b]; + Vec3s* vc = &col->vtxList[c]; +#define qs105(n) ((int16_t)((n)*0x0020)) +#define gdSPDefVtxN(x, y, z, s, t, nx, ny, nz, ca) \ + ((Vtx){ .n = { .ob = { x, y, z }, .tc = { qs105(s), qs105(t) }, .n = { nx, ny, nz }, .a = ca } }) + Vtx v[3] = { + gdSPDefVtxN(va->x, va->y, va->z, 0, 0, poly->normal.x / 0x100, poly->normal.y / 0x100, + poly->normal.z / 0x100, 0xFF), + gdSPDefVtxN(vb->x, vb->y, vb->z, 0, 0, poly->normal.x / 0x100, poly->normal.y / 0x100, + poly->normal.z / 0x100, 0xFF), + gdSPDefVtxN(vc->x, vc->y, vc->z, 0, 0, poly->normal.x / 0x100, poly->normal.y / 0x100, + poly->normal.z / 0x100, 0xFF), + }; + + void* vtxBuf = Graph_Alloc(gfxCtx, sizeof(Vtx) * 3); + memcpy(vtxBuf, v, sizeof(Vtx) * 3); + gSPVertex(POLY_OPA_DISP++, vtxBuf, 3, 0); + gSP1Triangle(POLY_OPA_DISP++, 0, 1, 2, 0); + + } } } From d0c5e7aa0e9d74a16f205da131f8aec2c511761e Mon Sep 17 00:00:00 2001 From: rozlette Date: Sat, 30 Apr 2022 20:31:11 -0500 Subject: [PATCH 102/146] Add collision viewer --- soh/include/functions.h | 2 + soh/soh.vcxproj | 4 + soh/soh.vcxproj.filters | 12 + .../Enhancements/debugger/ImGuiHelpers.cpp | 21 + soh/soh/Enhancements/debugger/ImGuiHelpers.h | 8 + soh/soh/Enhancements/debugger/colViewer.cpp | 719 ++++++++++++++++++ soh/soh/Enhancements/debugger/colViewer.h | 4 + .../Enhancements/debugger/debugSaveEditor.cpp | 21 +- soh/soh/Enhancements/debugger/debugger.cpp | 10 + soh/soh/Enhancements/debugger/debugger.h | 9 + soh/src/code/graph.c | 2 + soh/src/code/z_play.c | 60 +- 12 files changed, 794 insertions(+), 78 deletions(-) create mode 100644 soh/soh/Enhancements/debugger/ImGuiHelpers.cpp create mode 100644 soh/soh/Enhancements/debugger/ImGuiHelpers.h create mode 100644 soh/soh/Enhancements/debugger/colViewer.cpp create mode 100644 soh/soh/Enhancements/debugger/colViewer.h diff --git a/soh/include/functions.h b/soh/include/functions.h index 13e3a7055..01901d5d0 100644 --- a/soh/include/functions.h +++ b/soh/include/functions.h @@ -656,10 +656,12 @@ Vec3s* SurfaceType_GetCamPosData(CollisionContext* colCtx, CollisionPoly* poly, u32 SurfaceType_GetSceneExitIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); u32 func_80041D4C(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); u32 func_80041D70(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +u32 func_80041D94(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); s32 func_80041DB8(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); s32 func_80041DE4(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); s32 func_80041E18(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); s32 func_80041E4C(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +s32 func_80041E80(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); u32 func_80041EA4(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); u32 func_80041EC8(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); u32 SurfaceType_IsHorseBlocked(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); diff --git a/soh/soh.vcxproj b/soh/soh.vcxproj index d35dd18b3..2bd4380b9 100644 --- a/soh/soh.vcxproj +++ b/soh/soh.vcxproj @@ -175,8 +175,10 @@ + + @@ -922,8 +924,10 @@ + + diff --git a/soh/soh.vcxproj.filters b/soh/soh.vcxproj.filters index c31a78b19..a8455a4c8 100644 --- a/soh/soh.vcxproj.filters +++ b/soh/soh.vcxproj.filters @@ -2184,6 +2184,12 @@ Source Files\soh + + Source Files\soh\Enhancements\debugger + + + Source Files\soh\Enhancements\debugger + @@ -3734,6 +3740,12 @@ Header Files\soh + + Header Files\soh\Enhancements\debugger + + + Header Files\soh\Enhancements\debugger + diff --git a/soh/soh/Enhancements/debugger/ImGuiHelpers.cpp b/soh/soh/Enhancements/debugger/ImGuiHelpers.cpp new file mode 100644 index 000000000..6f4f00637 --- /dev/null +++ b/soh/soh/Enhancements/debugger/ImGuiHelpers.cpp @@ -0,0 +1,21 @@ +#include "ImGuiHelpers.h" + +// Adds a text tooltip for the previous ImGui item +void SetLastItemHoverText(const std::string& text) { + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::Text(text.c_str()); + ImGui::EndTooltip(); + } +} + +// Adds a "?" next to the previous ImGui item with a custom tooltip +void InsertHelpHoverText(const std::string& text) { + ImGui::SameLine(); + ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f), "?"); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::Text(text.c_str()); + ImGui::EndTooltip(); + } +} diff --git a/soh/soh/Enhancements/debugger/ImGuiHelpers.h b/soh/soh/Enhancements/debugger/ImGuiHelpers.h new file mode 100644 index 000000000..7f01e4580 --- /dev/null +++ b/soh/soh/Enhancements/debugger/ImGuiHelpers.h @@ -0,0 +1,8 @@ +#pragma once +#include "../libultraship/Lib/ImGui/imgui.h" + +#include + +void SetLastItemHoverText(const std::string& text); + +void InsertHelpHoverText(const std::string& text); diff --git a/soh/soh/Enhancements/debugger/colViewer.cpp b/soh/soh/Enhancements/debugger/colViewer.cpp new file mode 100644 index 000000000..ad9d341d4 --- /dev/null +++ b/soh/soh/Enhancements/debugger/colViewer.cpp @@ -0,0 +1,719 @@ +#include "colViewer.h" +#include "../libultraship/SohImGuiImpl.h" +#include "ImGuiHelpers.h" + +#include +#include + +extern "C" { +#include +#include "variables.h" +#include "functions.h" +#include "macros.h" +extern GlobalContext* gGlobalCtx; +} + +enum class ColRenderSetting { + Disabled, + Solid, + Transparent, + NumSettings +}; + +std::string ColRenderSettingNames[] = { + "Disabled", + "Solid", + "Transparent", +}; + +static ColRenderSetting showSceneColSetting = ColRenderSetting::Disabled; +static ColRenderSetting showBgActorSetting = ColRenderSetting::Disabled; +static ColRenderSetting showColCheckSetting = ColRenderSetting::Disabled; +static ColRenderSetting showWaterboxSetting = ColRenderSetting::Disabled; + +static uint32_t sceneColor = 0xFFFFFFFF; +static uint32_t hookshotColor = 0x8080FFFF; +static uint32_t entranceColor = 0x00FF00FF; +static uint32_t specialSurfaceColor = 0xC0FFC0FF; +static uint32_t interactableColor = 0xC000C0FF; +static uint32_t slopeColor = 0xFFFF80FF; +static uint32_t voidColor = 0xFF0000FF; + +static uint32_t ocColor = 0xFFFFFFFF; +static uint32_t acColor = 0x0000FFFF; +static uint32_t atColor = 0xFF0000FF; + +static uint32_t waterboxColor = 0x0000FFFF; + +static bool applyAsDecal = false; +static bool isShaded = false; + +static std::vector opaDl; +static std::vector xluDl; +static std::vector vtxDl; +static std::vector mtxDl; + +// These DLs contain a cylinder/sphere model scaled to 128x (to have less error) +// The idea is to push a model view matrix, then draw the DL, to draw the shape somewhere with a certain size +static std::vector cylinderGfx; +static std::vector cylinderVtx; +static std::vector sphereGfx; +static std::vector sphereVtx; + +// Create a dropdown menu to set a ColRenderSetting +void DrawColRenderSetting(const std::string& name, ColRenderSetting& setting) { + if (ImGui::BeginCombo(name.c_str(), ColRenderSettingNames[static_cast(setting)].c_str())) { + for (int32_t settingIndex = 0; settingIndex < static_cast(ColRenderSetting::NumSettings); settingIndex++) { + if (ImGui::Selectable(ColRenderSettingNames[settingIndex].c_str())) { + setting = static_cast(settingIndex); + } + } + ImGui::EndCombo(); + } +} + +// Draw a color picker box +void DrawColorPicker(const std::string& name, uint32_t& color) { + float colorAsFloat[4]; + colorAsFloat[0] = ((color >> 24) & 0xFF) / 255.0f; + colorAsFloat[1] = ((color >> 16) & 0xFF) / 255.0f; + colorAsFloat[2] = ((color >> 8) & 0xFF) / 255.0f; + colorAsFloat[3] = (color & 0xFF) / 255.0f; + if (ImGui::ColorEdit4(name.c_str(), colorAsFloat, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel)) { + color = static_cast(colorAsFloat[3] * 255) | + static_cast(colorAsFloat[2] * 255) << 8 | + static_cast(colorAsFloat[1] * 255) << 16 | + static_cast(colorAsFloat[0] * 255) << 24; + } + ImGui::SameLine(); + ImGui::Text(name.c_str()); +} + +// Draws the ImGui window for the collision viewer +void DrawColViewerWindow(bool& open) { + if (!open) { + return; + } + + ImGui::SetNextWindowSize(ImVec2(520, 600), ImGuiCond_FirstUseEver); + if (!ImGui::Begin("Collision Viewer", &open)) { + ImGui::End(); + return; + } + + DrawColRenderSetting("Scene", showSceneColSetting); + DrawColRenderSetting("Bg Actors", showBgActorSetting); + DrawColRenderSetting("Col Check", showColCheckSetting); + DrawColRenderSetting("Waterbox", showWaterboxSetting); + + ImGui::Checkbox("Apply as decal", &applyAsDecal); + InsertHelpHoverText("Applies the collision as a decal display. This can be useful if there is z-fighting occuring " + "with the scene geometry, but can cause other artifacts."); + ImGui::Checkbox("Shaded", &isShaded); + InsertHelpHoverText("Applies the scene's shading to the collision display."); + + // This has to be duplicated in both code paths due to the nature of ImGui::IsItemHovered() + const std::string colorHelpText = "View and change the colors used for collision display."; + if (ImGui::TreeNode("Colors")) { + InsertHelpHoverText(colorHelpText); + + DrawColorPicker("Normal", sceneColor); + DrawColorPicker("Hookshot", hookshotColor); + DrawColorPicker("Entrance", entranceColor); + DrawColorPicker("Special Surface (Grass/Sand/Etc)", specialSurfaceColor); + DrawColorPicker("Interactable (Vines/Crawlspace/Etc)", interactableColor); + DrawColorPicker("Slope", slopeColor); + DrawColorPicker("Void", voidColor); + DrawColorPicker("OC", ocColor); + DrawColorPicker("AC", acColor); + DrawColorPicker("AT", atColor); + DrawColorPicker("Waterbox", waterboxColor); + + ImGui::TreePop(); + } else { + InsertHelpHoverText(colorHelpText); + } + + ImGui::End(); +} + +// Calculates the normal for a triangle at the 3 specified points +void CalcTriNorm(const Vec3f& v1, const Vec3f& v2, const Vec3f& v3, Vec3f& norm) { + norm.x = (v2.y - v1.y) * (v3.z - v1.z) - (v2.z - v1.z) * (v3.y - v1.y); + norm.y = (v2.z - v1.z) * (v3.x - v1.x) - (v2.x - v1.x) * (v3.z - v1.z); + norm.z = (v2.x - v1.x) * (v3.y - v1.y) - (v2.y - v1.y) * (v3.x - v1.x); + float norm_d = sqrtf(norm.x * norm.x + norm.y * norm.y + norm.z * norm.z); + if (norm_d != 0.f) { + norm.x *= 127.f / norm_d; + norm.y *= 127.f / norm_d; + norm.z *= 127.f / norm_d; + } +} + +// 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 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 } \ + } + + +void CreateCylinderData() { + constexpr int32_t CYL_DIVS = 12; + cylinderGfx.reserve(5 + CYL_DIVS * 2); + cylinderVtx.reserve(2 + CYL_DIVS * 2); + + cylinderVtx.push_back(gdSPDefVtxN(0, 0, 0, 0, 0, 0, -127, 0, 0xFF)); // Bottom center vertex + cylinderVtx.push_back(gdSPDefVtxN(0, 128, 0, 0, 0, 0, 127, 0, 0xFF)); // Top center vertex + // Create two rings of vertices + for (int i = 0; i < CYL_DIVS; ++i) { + short vtx_x = floorf(0.5f + cosf(2.f * M_PI * i / CYL_DIVS) * 128.f); + short vtx_z = floorf(0.5f - sinf(2.f * M_PI * i / CYL_DIVS) * 128.f); + signed char norm_x = cosf(2.f * M_PI * i / CYL_DIVS) * 127.f; + signed char norm_z = -sinf(2.f * M_PI * i / CYL_DIVS) * 127.f; + cylinderVtx.push_back(gdSPDefVtxN(vtx_x, 0, vtx_z, 0, 0, norm_x, 0, norm_z, 0xFF)); + cylinderVtx.push_back(gdSPDefVtxN(vtx_x, 128, vtx_z, 0, 0, norm_x, 0, norm_z, 0xFF)); + } + + // Draw edges + cylinderGfx.push_back(gsSPSetGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH)); + cylinderGfx.push_back(gsSPVertex((uintptr_t)cylinderVtx.data(), 2 + CYL_DIVS * 2, 0)); + for (int i = 0; i < CYL_DIVS; ++i) { + int p = (i + CYL_DIVS - 1) % CYL_DIVS; + int v[4] = { + 2 + p * 2 + 0, + 2 + i * 2 + 0, + 2 + i * 2 + 1, + 2 + p * 2 + 1, + }; + cylinderGfx.push_back(gsSP2Triangles(v[0], v[1], v[2], 0, v[0], v[2], v[3], 0)); + } + + // Draw top & bottom + cylinderGfx.push_back(gsSPClearGeometryMode(G_SHADING_SMOOTH)); + for (int i = 0; i < CYL_DIVS; ++i) { + int p = (i + CYL_DIVS - 1) % CYL_DIVS; + int v[4] = { + 2 + p * 2 + 0, + 2 + i * 2 + 0, + 2 + i * 2 + 1, + 2 + p * 2 + 1, + }; + cylinderGfx.push_back(gsSP2Triangles(0, v[1], v[0], 0, 1, v[3], v[2], 0)); + } + + cylinderGfx.push_back(gsSPClearGeometryMode(G_CULL_BACK)); + cylinderGfx.push_back(gsSPEndDisplayList()); +} + +// This subdivides a face into four tris by placing new verticies at the midpoints of the sides (Like a triforce!), then blowing up the +// verticies so they are on the unit sphere +void CreateSphereFace(std::vector>& faces, int32_t v0Index, int32_t v1Index, int32_t v2Index) { + size_t nextIndex = sphereVtx.size(); + + size_t v01Index = nextIndex; + size_t v12Index = nextIndex + 1; + size_t v20Index = nextIndex + 2; + + faces.emplace_back(v0Index, v01Index, v20Index); + faces.emplace_back(v1Index, v12Index, v01Index); + faces.emplace_back(v2Index, v20Index, v12Index); + faces.emplace_back(v01Index, v12Index, v20Index); + + const Vtx& v0 = sphereVtx[v0Index]; + const Vtx& v1 = sphereVtx[v1Index]; + const Vtx& v2 = sphereVtx[v2Index]; + + // Create 3 new verticies at the midpoints + Vec3f vs[3] = { + Vec3f((v0.n.ob[0] + v1.n.ob[0]) / 2.0f, (v0.n.ob[1] + v1.n.ob[1]) / 2.0f, (v0.n.ob[2] + v1.n.ob[2]) / 2.0f), + Vec3f((v1.n.ob[0] + v2.n.ob[0]) / 2.0f, (v1.n.ob[1] + v2.n.ob[1]) / 2.0f, (v1.n.ob[2] + v2.n.ob[2]) / 2.0f), + Vec3f((v2.n.ob[0] + v0.n.ob[0]) / 2.0f, (v2.n.ob[1] + v0.n.ob[1]) / 2.0f, (v2.n.ob[2] + v0.n.ob[2]) / 2.0f) + }; + + // Normalize vertex positions so they are on the sphere + for (int32_t vAddIndex = 0; vAddIndex < 3; vAddIndex++) { + Vec3f& v = vs[vAddIndex]; + float mag = sqrtf(v.x * v.x + v.y * v.y + v.z * v.z); + v.x /= mag; + v.y /= mag; + v.z /= mag; + sphereVtx.push_back(gdSPDefVtxN((short)(v.x * 127), (short)(v.y * 127), (short)(v.z * 127), 0, 0, + (signed char)(v.x * 127), (signed char)(v.y * 127), (signed char)(v.z * 127), + 0xFF)); + } +} + +// Creates a sphere following the idea in here: http://blog.andreaskahler.com/2009/06/creating-icosphere-mesh-in-code.html +// Spcifically, create a icosahedron by realizing that the points can be placed on 3 rectangles that are on each unit plane. +// Then, subdividing each face. +void CreateSphereData() { + std::vector base; + + float d = (1.0f + sqrtf(5.0f)) / 2.0f; + + // Create the 12 starting verticies, 4 on each rectangle + base.emplace_back(-1, d, 0); + base.emplace_back(1, d, 0); + base.emplace_back(-1, -d, 0); + base.emplace_back(1, -d, 0); + + base.emplace_back(0, -1, d); + base.emplace_back(0, 1, d); + base.emplace_back(0, -1, -d); + base.emplace_back(0, 1, -d); + + base.emplace_back(d, 0, -1); + base.emplace_back(d, 0, 1); + base.emplace_back(-d, 0, -1); + base.emplace_back(-d, 0, 1); + + // Normalize verticies so they are on the unit sphere + for (Vec3f& v : base) { + float mag = sqrtf(v.x * v.x + v.y * v.y + v.z * v.z); + v.x /= mag; + v.y /= mag; + v.z /= mag; + sphereVtx.push_back(gdSPDefVtxN((short)(v.x * 128), (short)(v.y * 128), (short)(v.z * 128), 0, 0, + (signed char)(v.x * 127), (signed char)(v.y * 127), (signed char)(v.z * 127), + 0xFF)); + } + + std::vector> faces; + + // Subdivide faces + CreateSphereFace(faces, 0, 11, 5); + CreateSphereFace(faces, 0, 5, 1); + CreateSphereFace(faces, 0, 1, 7); + CreateSphereFace(faces, 0, 7, 10); + CreateSphereFace(faces, 0, 10, 11); + + CreateSphereFace(faces, 1, 5, 9); + CreateSphereFace(faces, 5, 11, 4); + CreateSphereFace(faces, 11, 10, 2); + CreateSphereFace(faces, 10, 7, 6); + CreateSphereFace(faces, 7, 1, 8); + + CreateSphereFace(faces, 3, 9, 4); + CreateSphereFace(faces, 3, 4, 2); + CreateSphereFace(faces, 3, 2, 6); + CreateSphereFace(faces, 3, 6, 8); + CreateSphereFace(faces, 3, 8, 9); + + CreateSphereFace(faces, 4, 9, 5); + CreateSphereFace(faces, 2, 4, 11); + CreateSphereFace(faces, 6, 2, 10); + CreateSphereFace(faces, 8, 6, 7); + CreateSphereFace(faces, 9, 8, 1); + + size_t vtxStartIndex = sphereVtx.size(); + sphereVtx.reserve(sphereVtx.size() + faces.size() * 3); + for (int32_t faceIndex = 0; faceIndex < faces.size(); faceIndex++) { + sphereVtx.push_back(sphereVtx[std::get<0>(faces[faceIndex])]); + sphereVtx.push_back(sphereVtx[std::get<1>(faces[faceIndex])]); + sphereVtx.push_back(sphereVtx[std::get<2>(faces[faceIndex])]); + sphereGfx.push_back(gsSPVertex((uintptr_t)(sphereVtx.data() + vtxStartIndex + faceIndex * 3), 3, 0)); + sphereGfx.push_back(gsSP1Triangle(0, 1, 2, 0)); + } + + sphereGfx.push_back(gsSPEndDisplayList()); +} + +void InitColViewer() { + SohImGui::AddWindow("Debug", "Collision Viewer", DrawColViewerWindow); + + CreateCylinderData(); + CreateSphereData(); +} + +// Initializes the display list for a ColRenderSetting +void InitGfx(std::vector& gfx, ColRenderSetting setting) { + uint32_t rm; + uint32_t blc1; + uint32_t blc2; + uint8_t alpha; + uint64_t cm; + uint32_t gm; + + if (setting == ColRenderSetting::Transparent) { + rm = Z_CMP | IM_RD | CVG_DST_FULL | FORCE_BL; + blc1 = GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA); + blc2 = GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA); + alpha = 0x80; + } else { + rm = Z_CMP | Z_UPD | CVG_DST_CLAMP | FORCE_BL; + blc1 = GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1); + blc2 = GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1); + alpha = 0xFF; + } + + if (applyAsDecal) { + rm |= ZMODE_DEC; + } else if (setting == ColRenderSetting::Transparent) { + rm |= ZMODE_XLU; + } else { + rm |= ZMODE_OPA; + } + + gfx.push_back(gsSPTexture(0, 0, 0, G_TX_RENDERTILE, G_OFF)); + gfx.push_back(gsDPSetCycleType(G_CYC_1CYCLE)); + gfx.push_back(gsDPSetRenderMode(rm | blc1, rm | blc2)); + + if (isShaded) { + gfx.push_back(gsDPSetCombineMode(G_CC_MODULATERGB_PRIM_ENVA, G_CC_MODULATERGB_PRIM_ENVA)); + gfx.push_back(gsSPLoadGeometryMode(G_CULL_BACK | G_ZBUFFER | G_LIGHTING)); + } else { + gfx.push_back(gsDPSetCombineMode(G_CC_PRIMITIVE_ENVA, G_CC_PRIMITIVE_ENVA)); + gfx.push_back(gsSPLoadGeometryMode(G_ZBUFFER)); + } + + gfx.push_back(gsDPSetEnvColor(0xFF, 0xFF, 0xFF, alpha)); +} + +// Draws a dynapoly structure (scenes or Bg Actors) +void DrawDynapoly(std::vector& dl, CollisionHeader* col, int32_t bgId) { + uint32_t color = sceneColor; + uint32_t lastColor = color; + dl.push_back(gsDPSetPrimColor(0, 0, (color >> 24) & 0xFF, (color >> 16) & 0xFF, (color >> 8) & 0xFF, + (color >> 0) & 0xFF)); + + // This keeps track of if we have processed a poly, but not drawn it yet so we can batch them. + // This saves several hundred commands in larger scenes + bool previousPoly = false; + + for (int i = 0; i < col->numPolygons; i++) { + CollisionPoly* poly = &col->polyList[i]; + + if (SurfaceType_IsHookshotSurface(&gGlobalCtx->colCtx, poly, bgId)) { + color = hookshotColor; + } else if (func_80041D94(&gGlobalCtx->colCtx, poly, bgId) > 0x01) { + color = interactableColor; + } else if (func_80041E80(&gGlobalCtx->colCtx, poly, bgId) == 0x0C) { + color = voidColor; + } else if (SurfaceType_GetSceneExitIndex(&gGlobalCtx->colCtx, poly, bgId) || + func_80041E80(&gGlobalCtx->colCtx, poly, bgId) == 0x05) { + color = entranceColor; + } else if (func_80041D4C(&gGlobalCtx->colCtx, poly, bgId) != 0 || + SurfaceType_IsWallDamage(&gGlobalCtx->colCtx, poly, bgId)) { + color = specialSurfaceColor; + } else if (SurfaceType_GetSlope(&gGlobalCtx->colCtx, poly, bgId) == 0x01) { + color = slopeColor; + } else { + color = sceneColor; + } + + if (lastColor != color) { + // Color changed, flush previous poly + if (previousPoly) { + dl.push_back(gsSPVertex((uintptr_t)&vtxDl.at(vtxDl.size() - 3), 3, 0)); + dl.push_back(gsSP1Triangle(0, 1, 2, 0)); + previousPoly = false; + } + dl.push_back(gsDPSetPrimColor(0, 0, (color >> 24) & 0xFF, (color >> 16) & 0xFF, (color >> 8) & 0xFF, + (color >> 0) & 0xFF)); + } + lastColor = color; + + Vec3s* va = &col->vtxList[COLPOLY_VTX_INDEX(poly->flags_vIA)]; + Vec3s* vb = &col->vtxList[COLPOLY_VTX_INDEX(poly->flags_vIB)]; + Vec3s* vc = &col->vtxList[COLPOLY_VTX_INDEX(poly->vIC)]; + vtxDl.push_back(gdSPDefVtxN(va->x, va->y, va->z, 0, 0, (signed char)(poly->normal.x / 0x100), + (signed char)(poly->normal.y / 0x100), (signed char)(poly->normal.z / 0x100), + 0xFF)); + vtxDl.push_back(gdSPDefVtxN(vb->x, vb->y, vb->z, 0, 0, (signed char)(poly->normal.x / 0x100), + (signed char)(poly->normal.y / 0x100), (signed char)(poly->normal.z / 0x100), + 0xFF)); + vtxDl.push_back(gdSPDefVtxN(vc->x, vc->y, vc->z, 0, 0, (signed char)(poly->normal.x / 0x100), + (signed char)(poly->normal.y / 0x100), (signed char)(poly->normal.z / 0x100), + 0xFF)); + + if (previousPoly) { + dl.push_back(gsSPVertex((uintptr_t)&vtxDl.at(vtxDl.size() - 6), 6, 0)); + dl.push_back(gsSP2Triangles(0, 1, 2, 0, 3, 4, 5, 0)); + previousPoly = false; + } else { + previousPoly = true; + } + } + + // Flush previous poly if this is the end and there's no more coming + if (previousPoly) { + dl.push_back(gsSPVertex((uintptr_t)&vtxDl.at(vtxDl.size() - 3), 3, 0)); + dl.push_back(gsSP1Triangle(0, 1, 2, 0)); + previousPoly = false; + } +} + +// Draws the scene +void DrawSceneCollision() { + if (showSceneColSetting == ColRenderSetting::Disabled) { + return; + } + + std::vector& dl = (showSceneColSetting == ColRenderSetting::Transparent) ? xluDl : opaDl; + InitGfx(dl, showSceneColSetting); + dl.push_back(gsSPMatrix(&gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH)); + + DrawDynapoly(dl, gGlobalCtx->colCtx.colHeader, BGCHECK_SCENE); +} + +// Draws all Bg Actors +void DrawBgActorCollision() { + if (showBgActorSetting == ColRenderSetting::Disabled) { + return; + } + + std::vector& dl = (showBgActorSetting == ColRenderSetting::Transparent) ? xluDl : opaDl; + InitGfx(dl, showBgActorSetting); + dl.push_back(gsSPMatrix(&gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH)); + + for (int32_t bgIndex = 0; bgIndex < BG_ACTOR_MAX; bgIndex++) { + if (gGlobalCtx->colCtx.dyna.bgActorFlags[bgIndex] & 1) { + BgActor& bg = gGlobalCtx->colCtx.dyna.bgActors[bgIndex]; + Mtx m; + MtxF mf; + SkinMatrix_SetTranslateRotateYXZScale(&mf, bg.curTransform.scale.x, bg.curTransform.scale.y, + bg.curTransform.scale.z, bg.curTransform.rot.x, bg.curTransform.rot.y, + bg.curTransform.rot.z, bg.curTransform.pos.x, bg.curTransform.pos.y, + bg.curTransform.pos.z); + guMtxF2L(&mf, &m); + mtxDl.push_back(m); + dl.push_back(gsSPMatrix(&mtxDl.back(), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_PUSH)); + + DrawDynapoly(dl, bg.colHeader, bgIndex); + + dl.push_back(gsSPPopMatrix(G_MTX_MODELVIEW)); + } + } + +} + +// Draws a quad +void DrawQuad(std::vector& dl, Vec3f& v0, Vec3f& v1, Vec3f& v2, Vec3f& v3) { + Vec3f norm; + CalcTriNorm(v0, v1, v2, norm); + + vtxDl.push_back(gdSPDefVtxN((short)v0.x, (short)v0.y, (short)v0.z, 0, 0, (signed char)norm.x, (signed char)norm.y, + (signed char)norm.z, 0xFF)); + vtxDl.push_back(gdSPDefVtxN((short)v1.x, (short)v1.y, (short)v1.z, 0, 0, (signed char)norm.x, (signed char)norm.y, + (signed char)norm.z, 0xFF)); + vtxDl.push_back(gdSPDefVtxN((short)v2.x, (short)v2.y, (short)v2.z, 0, 0, (signed char)norm.x, (signed char)norm.y, + (signed char)norm.z, 0xFF)); + vtxDl.push_back(gdSPDefVtxN((short)v3.x, (short)v3.y, (short)v3.z, 0, 0, (signed char)norm.x, (signed char)norm.y, + (signed char)norm.z, 0xFF)); + dl.push_back(gsSPVertex((uintptr_t)&vtxDl.at(vtxDl.size() - 4), 4, 0)); + dl.push_back(gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0)); +} + +// Draws a list of Col Check objects +void DrawColCheckList(std::vector& dl, Collider** objects, int32_t count) { + for (int32_t colIndex = 0; colIndex < count; colIndex++) { + Collider* col = objects[colIndex]; + switch (col->shape) { + case COLSHAPE_JNTSPH: { + ColliderJntSph* jntSph = (ColliderJntSph*)col; + + for (int32_t sphereIndex = 0; sphereIndex < jntSph->count; sphereIndex++) { + ColliderJntSphElement* sph = &jntSph->elements[sphereIndex]; + + Mtx m; + MtxF mf; + SkinMatrix_SetTranslate(&mf, sph->dim.worldSphere.center.x, sph->dim.worldSphere.center.y, + sph->dim.worldSphere.center.z); + MtxF ms; + int32_t radius = sph->dim.worldSphere.radius == 0 ? 1 : sph->dim.worldSphere.radius; + SkinMatrix_SetScale(&ms, radius / 128.0f, radius / 128.0f, radius / 128.0f); + MtxF dest; + SkinMatrix_MtxFMtxFMult(&mf, &ms, &dest); + guMtxF2L(&dest, &m); + mtxDl.push_back(m); + + dl.push_back(gsSPMatrix(&mtxDl.back(), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_PUSH)); + dl.push_back(gsSPDisplayList(sphereGfx.data())); + dl.push_back(gsSPPopMatrix(G_MTX_MODELVIEW)); + } + } break; + case COLSHAPE_CYLINDER: { + ColliderCylinder* cyl = (ColliderCylinder*)col; + + Mtx m; + MtxF mt; + SkinMatrix_SetTranslate(&mt, cyl->dim.pos.x, cyl->dim.pos.y, cyl->dim.pos.z); + MtxF ms; + int32_t radius = cyl->dim.radius == 0 ? 1 : cyl->dim.radius; + SkinMatrix_SetScale(&ms, radius / 128.0f, cyl->dim.height / 128.0f, radius / 128.0f); + MtxF dest; + SkinMatrix_MtxFMtxFMult(&mt, &ms, &dest); + guMtxF2L(&dest, &m); + mtxDl.push_back(m); + + dl.push_back(gsSPMatrix(&mtxDl.back(), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_PUSH)); + dl.push_back(gsSPDisplayList(cylinderGfx.data())); + dl.push_back(gsSPPopMatrix(G_MTX_MODELVIEW)); + } break; + case COLSHAPE_TRIS: { + ColliderTris* tris = (ColliderTris*)col; + for (int32_t triIndex = 0; triIndex < tris->count; triIndex++) { + ColliderTrisElement* tri = &tris->elements[triIndex]; + + vtxDl.push_back(gdSPDefVtxN((short)tri->dim.vtx[0].x, (short)tri->dim.vtx[0].y, + (short)tri->dim.vtx[0].z, 0, 0, (signed char)tri->dim.plane.normal.x, + (signed char)tri->dim.plane.normal.y, + (signed char)tri->dim.plane.normal.z, 0xFF)); + vtxDl.push_back(gdSPDefVtxN((short)tri->dim.vtx[1].x, (short)tri->dim.vtx[1].y, + (short)tri->dim.vtx[1].z, 0, 0, (signed char)tri->dim.plane.normal.x, + (signed char)tri->dim.plane.normal.y, + (signed char)tri->dim.plane.normal.z, 0xFF)); + vtxDl.push_back(gdSPDefVtxN((short)tri->dim.vtx[2].x, (short)tri->dim.vtx[2].y, + (short)tri->dim.vtx[2].z, 0, 0, (signed char)tri->dim.plane.normal.x, + (signed char)tri->dim.plane.normal.y, + (signed char)tri->dim.plane.normal.z, 0xFF)); + dl.push_back(gsSPVertex((uintptr_t)&vtxDl.at(vtxDl.size() - 3), 3, 0)); + dl.push_back(gsSP1Triangle(0, 1, 2, 0)); + } + } break; + case COLSHAPE_QUAD: { + ColliderQuad* quad = (ColliderQuad*)col; + DrawQuad(dl, quad->dim.quad[0], quad->dim.quad[2], quad->dim.quad[3], quad->dim.quad[1]); + } break; + default: + break; + } + } +} + +// Draws all Col Check objects +void DrawColCheckCollision() { + if (showColCheckSetting == ColRenderSetting::Disabled) { + return; + } + + std::vector& dl = (showColCheckSetting == ColRenderSetting::Transparent) ? xluDl : opaDl; + InitGfx(dl, showColCheckSetting); + dl.push_back(gsSPMatrix(&gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH)); + + CollisionCheckContext& col = gGlobalCtx->colChkCtx; + + dl.push_back(gsDPSetPrimColor(0, 0, (ocColor >> 24) & 0xFF, (ocColor >> 16) & 0xFF, (ocColor >> 8) & 0xFF, + (ocColor >> 0) & 0xFF)); + DrawColCheckList(dl, col.colOC, col.colOCCount); + + dl.push_back(gsDPSetPrimColor(0, 0, (acColor >> 24) & 0xFF, (acColor >> 16) & 0xFF, (acColor >> 8) & 0xFF, + (acColor >> 0) & 0xFF)); + DrawColCheckList(dl, col.colAC, col.colACCount); + + dl.push_back(gsDPSetPrimColor(0, 0, (atColor >> 24) & 0xFF, (atColor >> 16) & 0xFF, (atColor >> 8) & 0xFF, + (atColor >> 0) & 0xFF)); + DrawColCheckList(dl, col.colAT, col.colATCount); +} + +// Draws a waterbox +void DrawWaterbox(std::vector& dl, WaterBox* water, float water_max_depth = -4000.0f) { + // Skip waterboxes that would be disabled in current room + int32_t room = ((water->properties >> 13) & 0x3F); + if ((room != gGlobalCtx->roomCtx.curRoom.num) && (room != 0x3F)) { + return; + } + + Vec3f vtx[] = { + { water->xMin, water->ySurface, water->zMin + water->zLength }, + { water->xMin + water->xLength, water->ySurface, water->zMin + water->zLength }, + { water->xMin + water->xLength, water->ySurface, water->zMin }, + { water->xMin, water->ySurface, water->zMin }, + { water->xMin, water_max_depth, water->zMin + water->zLength }, + { water->xMin + water->xLength, water_max_depth, water->zMin + water->zLength }, + { water->xMin + water->xLength, water_max_depth, water->zMin }, + { water->xMin, water_max_depth, water->zMin }, + }; + DrawQuad(dl, vtx[0], vtx[1], vtx[2], vtx[3]); + DrawQuad(dl, vtx[0], vtx[3], vtx[7], vtx[4]); + DrawQuad(dl, vtx[1], vtx[0], vtx[4], vtx[5]); + DrawQuad(dl, vtx[2], vtx[1], vtx[5], vtx[6]); + DrawQuad(dl, vtx[3], vtx[2], vtx[6], vtx[7]); +} + +extern "C" WaterBox zdWaterBox; +extern "C" f32 zdWaterBoxMinY; + +// Draws all waterboxes +void DrawWaterboxList() { + if (showWaterboxSetting == ColRenderSetting::Disabled) { + return; + } + + std::vector& dl = (showWaterboxSetting == ColRenderSetting::Transparent) ? xluDl : opaDl; + InitGfx(dl, showWaterboxSetting); + dl.push_back(gsSPMatrix(&gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH)); + dl.push_back(gsDPSetPrimColor(0, 0, (waterboxColor >> 24) & 0xFF, (waterboxColor >> 16) & 0xFF, + (waterboxColor >> 8) & 0xFF, (waterboxColor >> 0) & 0xFF)); + + CollisionHeader* col = gGlobalCtx->colCtx.colHeader; + for (int32_t waterboxIndex = 0; waterboxIndex < col->numWaterBoxes; waterboxIndex++) { + WaterBox* water = &col->waterBoxes[waterboxIndex]; + DrawWaterbox(dl, water); + } + + // Zora's Domain has a special, hard-coded waterbox with a bottom so you can go under the waterfall + if (gGlobalCtx->sceneNum == SCENE_SPOT07) { + DrawWaterbox(dl, &zdWaterBox, zdWaterBoxMinY); + } +} + +// Resets a vector for the next frame and returns the capacity +template +size_t ResetVector(T& vec) { + size_t oldSize = vec.size(); + vec.clear(); + // Reserve slightly more space than last frame to account for variance (such as different amounts of bg actors) + vec.reserve(oldSize * 1.2); + return vec.capacity(); +} + +void DrawColViewer() { + if (gGlobalCtx == nullptr) { + return; + } + + ResetVector(opaDl); + ResetVector(xluDl); + size_t vtxDlCapacity = ResetVector(vtxDl); + size_t mtxDlCapacity = ResetVector(mtxDl); + + DrawSceneCollision(); + DrawBgActorCollision(); + DrawColCheckCollision(); + DrawWaterboxList(); + + // Check if we used up more space than we reserved. If so, redo the drawing with our new sizes. + // This is because we resized the vectors while drawing, invalidating pointers to them. + // This only matters for the Vtx and Mtx vectors. + if ((vtxDl.size() > vtxDlCapacity) || (mtxDl.size() > mtxDlCapacity)) { + ResetVector(opaDl); + ResetVector(xluDl); + vtxDlCapacity = ResetVector(vtxDl); + mtxDlCapacity = ResetVector(mtxDl); + + DrawSceneCollision(); + DrawBgActorCollision(); + DrawColCheckCollision(); + DrawWaterboxList(); + } + + if ((vtxDl.size() > vtxDlCapacity) || (mtxDl.size() > mtxDlCapacity)) { + // If the sizes somehow changed between the two draws, we can't continue because we may be using invalid data + printf("Error drawing collision, vertex/matrix sizes didn't settle.\n"); + return; + } + + OPEN_DISPS(gGlobalCtx->state.gfxCtx, "", 0); + + opaDl.push_back(gsSPEndDisplayList()); + gSPDisplayList(POLY_OPA_DISP++, opaDl.data()); + + xluDl.push_back(gsSPEndDisplayList()); + gSPDisplayList(POLY_XLU_DISP++, xluDl.data()); + + CLOSE_DISPS(gGlobalCtx->state.gfxCtx, "", 0); +} diff --git a/soh/soh/Enhancements/debugger/colViewer.h b/soh/soh/Enhancements/debugger/colViewer.h new file mode 100644 index 000000000..e38da7951 --- /dev/null +++ b/soh/soh/Enhancements/debugger/colViewer.h @@ -0,0 +1,4 @@ +#pragma once + +void InitColViewer(); +void DrawColViewer(); \ No newline at end of file diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp index 2aaac5a1b..e2ed02705 100644 --- a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp +++ b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp @@ -1,6 +1,7 @@ #include "debugSaveEditor.h" #include "../../util.h" #include "../libultraship/SohImGuiImpl.h" +#include "ImGuiHelpers.h" #include #include @@ -224,26 +225,6 @@ std::array songMapping = { { SONG_MAP_ENTRY(QUEST_SONG_PRELUDE, 255, 240, 100), } }; -// Adds a text tooltip for the previous ImGui item -void SetLastItemHoverText(const std::string& text) { - if (ImGui::IsItemHovered()) { - ImGui::BeginTooltip(); - ImGui::Text(text.c_str()); - ImGui::EndTooltip(); - } -} - -// Adds a "?" next to the previous ImGui item with a custom tooltip -void InsertHelpHoverText(const std::string& text) { - ImGui::SameLine(); - ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f), "?"); - if (ImGui::IsItemHovered()) { - ImGui::BeginTooltip(); - ImGui::Text(text.c_str()); - ImGui::EndTooltip(); - } -} - // Encapsulates what is drawn by the passed-in function within a border template void DrawGroupWithBorder(T&& drawFunc) { diff --git a/soh/soh/Enhancements/debugger/debugger.cpp b/soh/soh/Enhancements/debugger/debugger.cpp index e493375cd..83e6a94a4 100644 --- a/soh/soh/Enhancements/debugger/debugger.cpp +++ b/soh/soh/Enhancements/debugger/debugger.cpp @@ -1,6 +1,16 @@ #include "debugger.h" #include "debugSaveEditor.h" +#include "colViewer.h" + +extern "C" { void Debug_Init(void) { InitSaveEditor(); + InitColViewer(); +} + +void Debug_Draw(void) { + DrawColViewer(); +} + } diff --git a/soh/soh/Enhancements/debugger/debugger.h b/soh/soh/Enhancements/debugger/debugger.h index 4bc0f985b..bbefd2e21 100644 --- a/soh/soh/Enhancements/debugger/debugger.h +++ b/soh/soh/Enhancements/debugger/debugger.h @@ -1,3 +1,12 @@ #pragma once +#ifdef __cplusplus +extern "C" { +#endif + void Debug_Init(void); +void Debug_Draw(void); + +#ifdef __cplusplus +} +#endif diff --git a/soh/src/code/graph.c b/soh/src/code/graph.c index 5d0495961..9f744ec02 100644 --- a/soh/src/code/graph.c +++ b/soh/src/code/graph.c @@ -5,6 +5,7 @@ #include #include "soh/Enhancements/gameconsole.h" +#include "soh/Enhancements/debugger/debugger.h" #define GFXPOOL_HEAD_MAGIC 0x1234 #define GFXPOOL_TAIL_MAGIC 0x5678 @@ -282,6 +283,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { GameState_ReqPadData(gameState); GameState_Update(gameState); + Debug_Draw(); OPEN_DISPS(gfxCtx, "../graph.c", 987); diff --git a/soh/src/code/z_play.c b/soh/src/code/z_play.c index 6cb04bec3..6218b7d76 100644 --- a/soh/src/code/z_play.c +++ b/soh/src/code/z_play.c @@ -1222,64 +1222,8 @@ void Gameplay_Draw(GlobalContext* globalCtx) { sp80 = HREG(84); } Scene_Draw(globalCtx); - //Room_Draw(globalCtx, &globalCtx->roomCtx.curRoom, sp80 & 3); - //Room_Draw(globalCtx, &globalCtx->roomCtx.prevRoom, sp80 & 3); - - Vec3f asd = { 0.0f, 0.0f, 0.0f }; - func_800342EC(&asd, globalCtx); - //func_80093C80(globalCtx); - { - uint32_t rm; - uint32_t blc1; - uint32_t blc2; - - - rm = Z_CMP | Z_UPD | CVG_DST_CLAMP | FORCE_BL; - blc1 = GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1); - blc2 = GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1); - rm |= ZMODE_OPA; - - gSPLoadGeometryMode(POLY_OPA_DISP++, G_ZBUFFER | G_SHADE | G_LIGHTING); - gSPTexture(POLY_OPA_DISP++, 0, 0, 0, G_TX_RENDERTILE, G_OFF); - - //gDPPipeSync(POLY_OPA_DISP++); - gDPSetCycleType(POLY_OPA_DISP++, G_CYC_1CYCLE); - gDPSetRenderMode(POLY_OPA_DISP++, rm | blc1, rm | blc2); - gDPSetCombineMode(POLY_OPA_DISP++, G_CC_HILITERGB, G_CC_HILITERGB); - gDPSetEnvColor(POLY_OPA_DISP++, 0xFF, 0xFF, 0xFF, 0xFF); - } - gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); - gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0xFF, 0, 0, 0xFF); - - CollisionHeader* col = globalCtx->colCtx.colHeader; - //for (int i = 0; i < col->numPolygons; i++) { - for (int i = 0; i < col->numPolygons / 2; i++) { - CollisionPoly* poly = &col->polyList[i]; - u16 a = poly->flags_vIA & 0x1FFF; - u16 b = poly->flags_vIB & 0x1FFF; - u16 c = poly->vIC & 0x1FFF; - - Vec3s* va = &col->vtxList[a]; - Vec3s* vb = &col->vtxList[b]; - Vec3s* vc = &col->vtxList[c]; -#define qs105(n) ((int16_t)((n)*0x0020)) -#define gdSPDefVtxN(x, y, z, s, t, nx, ny, nz, ca) \ - ((Vtx){ .n = { .ob = { x, y, z }, .tc = { qs105(s), qs105(t) }, .n = { nx, ny, nz }, .a = ca } }) - Vtx v[3] = { - gdSPDefVtxN(va->x, va->y, va->z, 0, 0, poly->normal.x / 0x100, poly->normal.y / 0x100, - poly->normal.z / 0x100, 0xFF), - gdSPDefVtxN(vb->x, vb->y, vb->z, 0, 0, poly->normal.x / 0x100, poly->normal.y / 0x100, - poly->normal.z / 0x100, 0xFF), - gdSPDefVtxN(vc->x, vc->y, vc->z, 0, 0, poly->normal.x / 0x100, poly->normal.y / 0x100, - poly->normal.z / 0x100, 0xFF), - }; - - void* vtxBuf = Graph_Alloc(gfxCtx, sizeof(Vtx) * 3); - memcpy(vtxBuf, v, sizeof(Vtx) * 3); - gSPVertex(POLY_OPA_DISP++, vtxBuf, 3, 0); - gSP1Triangle(POLY_OPA_DISP++, 0, 1, 2, 0); - - } + Room_Draw(globalCtx, &globalCtx->roomCtx.curRoom, sp80 & 3); + Room_Draw(globalCtx, &globalCtx->roomCtx.prevRoom, sp80 & 3); } } From e646f80f41c088c1232556b75ffff5e960fc08ed Mon Sep 17 00:00:00 2001 From: MelonSpeedruns Date: Sun, 1 May 2022 13:23:40 -0400 Subject: [PATCH 103/146] Fixed Gyroscopy Settings & Drift --- libultraship/libultraship/SDLController.cpp | 2 +- libultraship/libultraship/SohImGuiImpl.cpp | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/libultraship/libultraship/SDLController.cpp b/libultraship/libultraship/SDLController.cpp index 4533df20b..50bc5eabb 100644 --- a/libultraship/libultraship/SDLController.cpp +++ b/libultraship/libultraship/SDLController.cpp @@ -198,7 +198,7 @@ namespace Ship { const int isSpecialController = !strcmp("PS5 Controller", contName); float gyro_drift_x = CVar_GetFloat(StringHelper::Sprintf("gCont%i_GyroDriftX", contNumber).c_str(), 0.0f); float gyro_drift_y = CVar_GetFloat(StringHelper::Sprintf("gCont%i_GyroDriftY", contNumber).c_str(), 0.0f); - const float gyro_sensitivity = CVar_GetFloat(StringHelper::Sprintf("gCont%i_GyroSensitivity").c_str(), 1.0f); + const float gyro_sensitivity = CVar_GetFloat(StringHelper::Sprintf("gCont%i_GyroSensitivity", contNumber).c_str(), 1.0f); if (gyro_drift_x == 0) { gyro_drift_x = gyroData[0]; diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index fb4841ee9..1d9927c23 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -310,6 +310,13 @@ namespace SohImGui { LoadTexture("C-Down", "assets/ship_of_harkinian/buttons/CDown.png"); } }); + for (const auto& [i, controllers] : Ship::Window::Controllers) + { + CVar_SetFloat(StringHelper::Sprintf("gCont%i_GyroDriftX", i).c_str(), 0); + CVar_SetFloat(StringHelper::Sprintf("gCont%i_GyroDriftY", i).c_str(), 0); + needs_save = true; + } + ModInternal::registerHookListener({ CONTROLLER_READ, [](const HookEvent ev) { pads = static_cast(ev->baseArgs["cont_pad"]); } }); @@ -509,8 +516,8 @@ namespace SohImGui { if (ImGui::Button("Recalibrate Gyro")) { - CVar_SetFloat(StringHelper::Sprintf("gCont%i_GyroDriftX").c_str(), 0); - CVar_SetFloat(StringHelper::Sprintf("gCont%i_GyroDriftY").c_str(), 0); + CVar_SetFloat(StringHelper::Sprintf("gCont%i_GyroDriftX", i).c_str(), 0); + CVar_SetFloat(StringHelper::Sprintf("gCont%i_GyroDriftY", i).c_str(), 0); needs_save = true; } From 18d2bac409d32c59022ac5293eec80682fa13648 Mon Sep 17 00:00:00 2001 From: Baoulettes Date: Tue, 3 May 2022 00:24:12 +0200 Subject: [PATCH 104/146] Languages selection menu (#232) * Adding Languages section * Added LanguagesSection * Register the Cvar * Added switcher method * Added Language selection menu + function * function ref. * Conflict fixes to be sure nothing else is modded * space removed * no need to have conditions since ID are the same --- libultraship/libultraship/GameSettings.cpp | 2 +- libultraship/libultraship/GameSettings.h | 1 + libultraship/libultraship/SohImGuiImpl.cpp | 33 ++++++++++++++++++++++ libultraship/libultraship/SohImGuiImpl.h | 3 +- soh/soh/Enhancements/bootcommands.c | 1 + soh/src/code/game.c | 4 ++- 6 files changed, 41 insertions(+), 3 deletions(-) diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index 9b7543b7d..c2d876ab0 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -32,7 +32,7 @@ namespace Game { const std::string EnhancementSection = ENHANCEMENTS_SECTION; const std::string CosmeticsSection = COSMETICS_SECTION; const std::string CheatSection = CHEATS_SECTION; - + const std::string LanguagesSection = LANGUAGES_SECTION; void UpdateAudio() { Audio_SetGameVolume(SEQ_BGM_MAIN, CVar_GetFloat("gMainMusicVolume", 1)); diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index 4b9956d17..9d4e3e776 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -28,6 +28,7 @@ enum SeqPlayers { #define ENHANCEMENTS_SECTION "ENHANCEMENT SETTINGS" #define COSMETICS_SECTION "COSMETIC SETTINGS" #define CHEATS_SECTION "CHEATS SETTINGS" +#define LANGUAGES_SECTION "LANGUAGES SETTINGS" namespace Game { extern SoHConfigType Settings; diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 1d9927c23..bb13b7db6 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -56,6 +56,7 @@ namespace SohImGui { Console* console = new Console; bool p_open = false; bool needs_save = false; + int SelectedLanguage = CVar_GetS32("gLanguages", 0); //Default Language to 0=English 1=German 2=French float kokiri_col[3] = { 0.118f, 0.41f, 0.106f }; float goron_col[3] = { 0.392f, 0.078f, 0.0f }; float zora_col[3] = { 0.0f, 0.235f, 0.392f }; @@ -346,6 +347,24 @@ namespace SohImGui { } } + void EnhancementRadioButton(std::string text, std::string cvarName, int id) { + /*Usage : + EnhancementRadioButton("My Visible Name","gMyCVarName", MyID); + First arg is the visible name of the Radio button + Second is the cvar name where MyID will be saved. + Note: the CVar name should be the same to each Buddies. + Example : + EnhancementRadioButton("English", "gLanguages", 0); + EnhancementRadioButton("German", "gLanguages", 1); + EnhancementRadioButton("French", "gLanguages", 2); + */ + int val = CVar_GetS32(cvarName.c_str(), 0); + if (ImGui::RadioButton(text.c_str(), id==val)) { + CVar_SetS32(cvarName.c_str(), (int)id); + needs_save = true; + } + } + void EnhancementCheckbox(std::string text, std::string cvarName) { bool val = (bool)CVar_GetS32(cvarName.c_str(), 0); @@ -636,6 +655,20 @@ namespace SohImGui { ImGui::EndMenu(); } + if (CVar_GetS32("gLanguages", 0) == 0) { + SelectedLanguage = 0; + } else if (CVar_GetS32("gLanguages", 0) == 1) { + SelectedLanguage = 1; + } else if (CVar_GetS32("gLanguages", 0) == 2) { + SelectedLanguage = 2; + } + if (ImGui::BeginMenu("Languages")) { + EnhancementRadioButton("English", "gLanguages", 0); + EnhancementRadioButton("German", "gLanguages", 1); + EnhancementRadioButton("French", "gLanguages", 2); + ImGui::EndMenu(); + } + for (const auto& category : windowCategories) { if (ImGui::BeginMenu(category.first.c_str())) { for (const std::string& name : category.second) { diff --git a/libultraship/libultraship/SohImGuiImpl.h b/libultraship/libultraship/SohImGuiImpl.h index b2b29e3d5..c4fe3f825 100644 --- a/libultraship/libultraship/SohImGuiImpl.h +++ b/libultraship/libultraship/SohImGuiImpl.h @@ -61,10 +61,11 @@ namespace SohImGui { void Init(WindowImpl window_impl); void Update(EventImpl event); - + void EnhancementRadioButton(std::string text, std::string cvarName, int value); void EnhancementCheckbox(std::string text, std::string cvarName); void EnhancementSliderInt(std::string text, std::string id, std::string cvarName, int min, int max, std::string format); void EnhancementSliderFloat(std::string text, std::string id, std::string cvarName, float min, float max, std::string format, float defaultValue); + void DrawMainMenuAndCalculateGameSize(void); void DrawFramebufferAndGameInput(void); diff --git a/soh/soh/Enhancements/bootcommands.c b/soh/soh/Enhancements/bootcommands.c index da4276f77..03742dae9 100644 --- a/soh/soh/Enhancements/bootcommands.c +++ b/soh/soh/Enhancements/bootcommands.c @@ -29,6 +29,7 @@ void BootCommands_Init() CVar_RegisterS32("gUniformLR", 1); CVar_RegisterS32("gNewDrops", 0); CVar_RegisterS32("gVisualAgony", 0); + CVar_RegisterS32("gLanguages", 0); //0 = English / 1 = German / 2 = French } //void BootCommands_ParseBootArgs(char* str) diff --git a/soh/src/code/game.c b/soh/src/code/game.c index b69537fd8..eea895ce1 100644 --- a/soh/src/code/game.c +++ b/soh/src/code/game.c @@ -422,7 +422,9 @@ void GameState_Update(GameState* gameState) { int32_t prevTime = CVar_GetS32("gPrevTime", gSaveContext.dayTime); gSaveContext.dayTime = prevTime; } - + + //since our CVar is same value and properly default to 0 there is not problems doing this in single line. + gSaveContext.language = CVar_GetS32("gLanguages", 0); gameState->frames++; } From 43294d66b5202bf719b805d2103ccac19132feda Mon Sep 17 00:00:00 2001 From: Ralphie Morell Date: Mon, 2 May 2022 18:24:39 -0400 Subject: [PATCH 105/146] Fix Cheat Menuing (#237) * readded cheats to menu; fixed bug with freezing time * removed extraneous dev tools section --- libultraship/libultraship/SohImGuiImpl.cpp | 33 ++++++++++++++++++++++ soh/src/code/game.c | 2 ++ 2 files changed, 35 insertions(+) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index bb13b7db6..f93fce0a6 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -628,7 +628,40 @@ namespace SohImGui { EnhancementCheckbox("Unrestricted Items", "gNoRestrictItems"); EnhancementCheckbox("Freeze Time", "gFreezeTime"); + + if (ImGui::Checkbox("Climb Everything", &Game::Settings.cheats.climb_everything)) { + CVar_SetS32("gClimbEverything", Game::Settings.cheats.climb_everything); + needs_save = true; + } + + if (ImGui::Checkbox("Moon Jump on L", &Game::Settings.cheats.moon_jump_on_l)) { + CVar_SetS32("gMoonJumpOnL", Game::Settings.cheats.moon_jump_on_l); + needs_save = true; + } + + if (ImGui::Checkbox("Super Tunic", &Game::Settings.cheats.super_tunic)) { + CVar_SetS32("gSuperTunic", Game::Settings.cheats.super_tunic); + needs_save = true; + } + + if (ImGui::Checkbox("Easy ISG", &Game::Settings.cheats.ez_isg)) { + CVar_SetS32("gEzISG", Game::Settings.cheats.ez_isg); + needs_save = true; + } + + if (ImGui::Checkbox("Unrestricted Items", &Game::Settings.cheats.no_restrict_item)) { + CVar_SetS32("gNoRestrictItem", Game::Settings.cheats.no_restrict_item); + needs_save = true; + } + + if (ImGui::Checkbox("Freeze Time", &Game::Settings.cheats.freeze_time)) { + CVar_SetS32("gFreezeTime", Game::Settings.cheats.freeze_time); + needs_save = true; + } + + ImGui::EndMenu(); + } if (ImGui::BeginMenu("Cosmetics")) diff --git a/soh/src/code/game.c b/soh/src/code/game.c index eea895ce1..a411523ec 100644 --- a/soh/src/code/game.c +++ b/soh/src/code/game.c @@ -421,6 +421,8 @@ void GameState_Update(GameState* gameState) { int32_t prevTime = CVar_GetS32("gPrevTime", gSaveContext.dayTime); gSaveContext.dayTime = prevTime; + } else { + CVar_SetS32("gPrevTime", -1); } //since our CVar is same value and properly default to 0 there is not problems doing this in single line. From 8c18b4b0571c951fabbddb879762a13028ca8ca2 Mon Sep 17 00:00:00 2001 From: Baoulettes Date: Tue, 3 May 2022 00:25:37 +0200 Subject: [PATCH 106/146] Fix dungeon entrance icon + feature (#252) * Add Cvar stuff and fix dungeon entrance icons * Added Cvar toggles * Move fixes to fix sub menu --- libultraship/libultraship/SohImGuiImpl.cpp | 8 +++++- soh/src/code/z_map_exp.c | 32 +++++++++++++++------- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index f93fce0a6..303bc74e7 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -585,7 +585,13 @@ namespace SohImGui { EnhancementCheckbox("Disable LOD", "gDisableLOD"); EnhancementCheckbox("Enable 3D Dropped items", "gNewDrops"); EnhancementCheckbox("Dynamic Wallet Icon", "gDynamicWalletIcon"); - + EnhancementCheckbox("Always show dungeon entrances", "gAlwaysShowDungeonMinimapIcon"); + + if (ImGui::BeginMenu("Fixes")) { + EnhancementCheckbox("Fix L&R Pause menu", "gUniformLR"); + EnhancementCheckbox("Fix Dungeon entrances", "gFixDungeonMinimapIcon"); + ImGui::EndMenu(); + } ImGui::EndMenu(); } diff --git a/soh/src/code/z_map_exp.c b/soh/src/code/z_map_exp.c index cfef800c9..e97a1a1a5 100644 --- a/soh/src/code/z_map_exp.c +++ b/soh/src/code/z_map_exp.c @@ -737,21 +737,33 @@ void Minimap_Draw(GlobalContext* globalCtx) { if (((globalCtx->sceneNum != SCENE_SPOT01) && (globalCtx->sceneNum != SCENE_SPOT04) && (globalCtx->sceneNum != SCENE_SPOT08)) || (LINK_AGE_IN_YEARS != YEARS_ADULT)) { + s16 IconSize = 8; + s16 PosX = gMapData->owEntranceIconPosX[sEntranceIconMapIndex]; + s16 PosY = gMapData->owEntranceIconPosY[sEntranceIconMapIndex]; + //gFixDungeonMinimapIcon fix both Y position of visible icon and hide these non needed. + if (CVar_GetS32("gFixDungeonMinimapIcon", 1) != 0){ + //No idea why and how Original value work but this does actually fix them all. + PosY = PosY+1024; + } + s16 TopLeftX = OTRGetRectDimensionFromRightEdge(PosX) << 2; + s16 TopLeftY = PosY << 2; + s16 TopLeftW = OTRGetRectDimensionFromRightEdge(PosX + IconSize) << 2; + s16 TopLeftH = (PosY + IconSize) << 2; if ((gMapData->owEntranceFlag[sEntranceIconMapIndex] == 0xFFFF) || ((gMapData->owEntranceFlag[sEntranceIconMapIndex] != 0xFFFF) && (gSaveContext.infTable[26] & gBitFlags[gMapData->owEntranceFlag[mapIndex]]))) { - + if (gMapData->owEntranceIconPosY[sEntranceIconMapIndex] << 2 != 0 && CVar_GetS32("gFixDungeonMinimapIcon", 1) != 0){ + gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, + IconSize, IconSize, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, + G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + gSPWideTextureRectangle(OVERLAY_DISP++, TopLeftX, TopLeftY, TopLeftW, TopLeftH, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); + } + } else if (CVar_GetS32("gAlwaysShowDungeonMinimapIcon", 0) != 0){ //Ability to show entrance Before beating the dungeon itself gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, - 8, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, + IconSize, IconSize, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - - gSPWideTextureRectangle(OVERLAY_DISP++, - OTRGetRectDimensionFromLeftEdge(gMapData->owEntranceIconPosX[sEntranceIconMapIndex]) << 2, - gMapData->owEntranceIconPosY[sEntranceIconMapIndex] << 2, - OTRGetRectDimensionFromLeftEdge(gMapData->owEntranceIconPosX[sEntranceIconMapIndex] + 8) << 2, - (gMapData->owEntranceIconPosY[sEntranceIconMapIndex] + 8) << 2, - G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); - } + gSPWideTextureRectangle(OVERLAY_DISP++, TopLeftX, TopLeftY, TopLeftW, TopLeftH, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); + } } if ((globalCtx->sceneNum == SCENE_SPOT08) && (gSaveContext.infTable[26] & gBitFlags[9])) { From c5f120b6f833528c5a1b0bc61bcb823a5164b597 Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Mon, 2 May 2022 17:26:32 -0500 Subject: [PATCH 107/146] Fixed Lens of truth and sandstorm to be widescreen (#254) --- .../Lib/Fast3D/U64/PR/ultra64/gbi.h | 14 +++++++ soh/soh/OTRGlobals.cpp | 7 ++++ soh/soh/OTRGlobals.h | 1 + soh/src/code/z_actor.c | 22 +++++++---- soh/src/code/z_fbdemo_circle.c | 2 - soh/src/code/z_kankyo.c | 38 ++++++++++++++++--- soh/src/code/z_room.c | 19 ++++++---- 7 files changed, 80 insertions(+), 23 deletions(-) diff --git a/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h b/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h index 8af624e8f..dedc97939 100644 --- a/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h +++ b/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h @@ -4575,6 +4575,20 @@ _DW({ \ _g2->words.w1 = (_SHIFTL(dsdx, 16, 16) | _SHIFTL(dtdy, 0, 16)); \ } +# define gsSPWideTextureRectangle(xl, yl, xh, yh, tile, s, t, dsdx, dtdy) \ +{{ \ + (_SHIFTL(G_TEXRECT_WIDE, 24, 8) | _SHIFTL((xh), 0, 24)), \ + _SHIFTL((yh), 0, 24), \ +}}, \ +{{ \ + (_SHIFTL((tile), 24, 3) | _SHIFTL((xl), 0, 24)), \ + _SHIFTL((yl), 0, 24), \ +}}, \ +{{ \ + _SHIFTL(s, 16, 16) | _SHIFTL(t, 0, 16), \ + _SHIFTL(dsdx, 16, 16) | _SHIFTL(dtdy, 0, 16) \ +}} + /* like gSPTextureRectangle but accepts negative position arguments */ #define gSPScisTextureRectangle(pkt, xl, yl, xh, yh, tile, s, t, dsdx, dtdy) \ _DW({ \ diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index d2bc941cf..aad82be29 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -289,6 +289,13 @@ extern "C" Gfx* ResourceMgr_LoadGfxByName(const char* path) return (Gfx*)&res->instructions[0]; } +extern "C" Gfx* ResourceMgr_PatchGfxByName(const char* path, int size) { + auto res = std::static_pointer_cast( + OTRGlobals::Instance->context->GetResourceManager()->LoadResource(path)); + res->instructions.resize(res->instructions.size() + size); + return (Gfx*)&res->instructions[0]; +} + extern "C" char* ResourceMgr_LoadArrayByName(const char* path) { auto res = std::static_pointer_cast(OTRGlobals::Instance->context->GetResourceManager()->LoadResource(path)); diff --git a/soh/soh/OTRGlobals.h b/soh/soh/OTRGlobals.h index 7ce08649a..339613b25 100644 --- a/soh/soh/OTRGlobals.h +++ b/soh/soh/OTRGlobals.h @@ -38,6 +38,7 @@ char* ResourceMgr_LoadPlayerAnimByName(const char* animPath); char* ResourceMgr_GetNameByCRC(uint64_t crc, char* alloc); Gfx* ResourceMgr_LoadGfxByCRC(uint64_t crc); Gfx* ResourceMgr_LoadGfxByName(const char* path); +Gfx* ResourceMgr_PatchGfxByName(const char* path, int size); Vtx* ResourceMgr_LoadVtxByCRC(uint64_t crc); Vtx* ResourceMgr_LoadVtxByName(const char* path); CollisionHeader* ResourceMgr_LoadColByName(const char* path); diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index bb55009bb..9d9a34c96 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -957,7 +957,7 @@ void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCt default: titleCtx->texture = NULL; return; - + } char newName[512]; @@ -1122,7 +1122,7 @@ void Actor_Init(Actor* actor, GlobalContext* globalCtx) { CollisionCheck_InitInfo(&actor->colChkInfo); actor->floorBgId = BGCHECK_SCENE; ActorShape_Init(&actor->shape, 0.0f, NULL, 0.0f); - //if (Object_IsLoaded(&globalCtx->objectCtx, actor->objBankIndex)) + //if (Object_IsLoaded(&globalCtx->objectCtx, actor->objBankIndex)) { //Actor_SetObjectDependency(globalCtx, actor); actor->init(actor, globalCtx); @@ -2358,7 +2358,7 @@ void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx) { actor->sfx = 0; if (actor->init != NULL) { - if (Object_IsLoaded(&globalCtx->objectCtx, actor->objBankIndex)) + if (Object_IsLoaded(&globalCtx->objectCtx, actor->objBankIndex)) { Actor_SetObjectDependency(globalCtx, actor); actor->init(actor, globalCtx); @@ -2547,10 +2547,16 @@ void func_80030FA8(GraphicsContext* gfxCtx) { gDPLoadTextureBlock(POLY_XLU_DISP++, gLensOfTruthMaskTex, G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0, G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, 6, 6, G_TX_NOLOD, G_TX_NOLOD); - gDPSetTileSize(POLY_XLU_DISP++, G_TX_RENDERTILE, 384, 224, 892, 732); - gSPTextureRectangle(POLY_XLU_DISP++, 0, 0, 1280, 960, G_TX_RENDERTILE, 2240, 1600, 576, 597); - gDPPipeSync(POLY_XLU_DISP++); + s32 x = OTRGetRectDimensionFromLeftEdge(0) << 2; + s32 w = OTRGetRectDimensionFromRightEdge(SCREEN_WIDTH) << 2; + float ratio = OTRGetAspectRatio(); + + gDPSetTileSize(POLY_XLU_DISP++, G_TX_RENDERTILE, 384, 224, 892, 732); + // TODO: Do correct math to fix it + gSPWideTextureRectangle(POLY_XLU_DISP++, x, 0, x + abs(x), 960, G_TX_RENDERTILE, 0, 0, 0, 0); + gSPWideTextureRectangle(POLY_XLU_DISP++, 0, 0, w, 960, G_TX_RENDERTILE, 2240, 1600, 576, 597); + gDPPipeSync(POLY_XLU_DISP++); CLOSE_DISPS(gfxCtx, "../z_actor.c", 6183); } @@ -2894,7 +2900,7 @@ void Actor_FreeOverlay(ActorOverlay* actorOverlay) { osSyncPrintf(VT_FGCOL(CYAN)); if (actorOverlay->numLoaded == 0) { - + if (actorOverlay->initInfo->reset != NULL) { actorOverlay->initInfo->reset(); } @@ -3020,7 +3026,7 @@ Actor* Actor_Spawn(ActorContext* actorCtx, GlobalContext* globalCtx, s16 actorId if (objBankIndex < 0 && !gMapLoading) objBankIndex = 0; - + if ((objBankIndex < 0) || ((actorInit->category == ACTORCAT_ENEMY) && Flags_GetClear(globalCtx, globalCtx->roomCtx.curRoom.num))) { // "No data bank!! (profilep->bank=%d)" diff --git a/soh/src/code/z_fbdemo_circle.c b/soh/src/code/z_fbdemo_circle.c index b19948737..a6a46a0e4 100644 --- a/soh/src/code/z_fbdemo_circle.c +++ b/soh/src/code/z_fbdemo_circle.c @@ -145,8 +145,6 @@ void TransitionCircle_Draw(void* thisx, Gfx** gfxP) { modelView = this->modelView[this->frame]; - this->color.rgba = 0xFFFFFFFF; - this->frame ^= 1; gDPPipeSync(gfx++); texScroll = Gfx_BranchTexScroll(&gfx, this->texX, this->texY, 0x10, 0x40); diff --git a/soh/src/code/z_kankyo.c b/soh/src/code/z_kankyo.c index f3ac083ab..9f7518374 100644 --- a/soh/src/code/z_kankyo.c +++ b/soh/src/code/z_kankyo.c @@ -743,7 +743,7 @@ void Environment_UpdateSkybox(GlobalContext* globalCtx, u8 skyboxId, Environment if (envCtx->skyboxDmaState == SKYBOX_DMA_FILE2_DONE) { envCtx->skyboxDmaState = SKYBOX_DMA_PAL2_START; - if ((newSkybox2Index & 1) ^ ((newSkybox2Index & 4) >> 2)) + if ((newSkybox2Index & 1) ^ ((newSkybox2Index & 4) >> 2)) { SkyboxTableEntry entryA = sSkyboxTable[newSkybox2Index]; LoadSkyboxPalette(skyboxCtx, 0, entryA.palettes[0], 16, 8); @@ -753,7 +753,7 @@ void Environment_UpdateSkybox(GlobalContext* globalCtx, u8 skyboxId, Environment DmaMgr_SendRequest2(&envCtx->dmaRequest, (uintptr_t)skyboxCtx->palettes, gSkyboxFiles[newSkybox2Index].palette.vromStart, size, 0, &envCtx->loadQueue, NULL, "../z_kankyo.c", 1342);*/ - } else + } else { SkyboxTableEntry entryA = sSkyboxTable[newSkybox2Index]; LoadSkyboxPalette(skyboxCtx, 1, entryA.palettes[0], 16, 8); @@ -769,12 +769,12 @@ void Environment_UpdateSkybox(GlobalContext* globalCtx, u8 skyboxId, Environment } if ((envCtx->skyboxDmaState == SKYBOX_DMA_FILE1_START) || (envCtx->skyboxDmaState == SKYBOX_DMA_FILE2_START)) { - //if (osRecvMesg(&envCtx->loadQueue, 0, OS_MESG_NOBLOCK) == 0) + //if (osRecvMesg(&envCtx->loadQueue, 0, OS_MESG_NOBLOCK) == 0) { envCtx->skyboxDmaState++; } } else if (envCtx->skyboxDmaState >= SKYBOX_DMA_FILE1_DONE) { - //if (osRecvMesg(&envCtx->loadQueue, 0, OS_MESG_NOBLOCK) == 0) + //if (osRecvMesg(&envCtx->loadQueue, 0, OS_MESG_NOBLOCK) == 0) { envCtx->skyboxDmaState = SKYBOX_DMA_INACTIVE; } @@ -2275,6 +2275,29 @@ Color_RGB8 sSandstormEnvColors[] = { { 50, 40, 0 }, }; +Gfx* gFieldSandstormDL_Custom = NULL; + +void Environment_PatchSandstorm(GlobalContext* globalCtx) { + if (gFieldSandstormDL_Custom) return; + + gFieldSandstormDL_Custom = ResourceMgr_PatchGfxByName(gFieldSandstormDL, -3); + + const Gfx gFSPatchDL[2] = { gsSPEndDisplayList() }; + bool patched = false; + Gfx* cmd = gFieldSandstormDL_Custom; + int id = 0; + + while (!patched) { + const uint32_t opcode = cmd->words.w0 >> 24; + if (opcode == G_TEXRECT) { + gFieldSandstormDL_Custom[id] = gFSPatchDL[0]; + patched = true; + } + ++cmd; + id++; + } +} + void Environment_DrawSandstorm(GlobalContext* globalCtx, u8 sandstormState) { s32 primA1; s32 envA1; @@ -2288,6 +2311,8 @@ void Environment_DrawSandstorm(GlobalContext* globalCtx, u8 sandstormState) { u16 sp94; u16 sp92; + Environment_PatchSandstorm(globalCtx); + switch (sandstormState) { case 3: if ((globalCtx->sceneNum == SCENE_SPOT13) && (globalCtx->roomCtx.curRoom.num == 0)) { @@ -2394,8 +2419,11 @@ void Environment_DrawSandstorm(GlobalContext* globalCtx, u8 sandstormState) { Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (u32)sp96 % 0x1000, 0, 0x200, 0x20, 1, (u32)sp94 % 0x1000, 0xFFF - ((u32)sp92 % 0x1000), 0x100, 0x40)); gDPSetTextureLUT(POLY_XLU_DISP++, G_TT_NONE); - gSPDisplayList(POLY_XLU_DISP++, gFieldSandstormDL); + gSPDisplayList(POLY_XLU_DISP++, gFieldSandstormDL_Custom); + gSPWideTextureRectangle(POLY_XLU_DISP++, OTRGetRectDimensionFromLeftEdge(0) << 2, 0, + OTRGetRectDimensionFromRightEdge(SCREEN_WIDTH) << 2, 0x03C0, G_TX_RENDERTILE, 0, 0, 0x008C, + -0x008C); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_kankyo.c", 4068); D_8015FDB0 += (s32)sp98; diff --git a/soh/src/code/z_room.c b/soh/src/code/z_room.c index 93aab731f..5212799a6 100644 --- a/soh/src/code/z_room.c +++ b/soh/src/code/z_room.c @@ -126,7 +126,7 @@ void func_80095D04(GlobalContext* globalCtx, Room* room, u32 flags) { sp90.y = polygonDlist->pos.y; sp90.z = polygonDlist->pos.z; SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &sp90, &sp84, &sp80); - if (-(f32)polygonDlist->unk_06 < sp84.z) + if (-(f32)polygonDlist->unk_06 < sp84.z) { temp_f2 = sp84.z - polygonDlist->unk_06; if (temp_f2 < globalCtx->lightCtx.fogFar) { @@ -171,7 +171,7 @@ void func_80095D04(GlobalContext* globalCtx, Room* room, u32 flags) { Gfx* temp2; polygonDlist = spB4->unk_00; - if (iREG(86) != 0) + if (iREG(86) != 0) { temp = sp78; for (phi_v1 = 0; phi_v1 < polygon2->num; phi_v1++, temp++) { @@ -180,7 +180,7 @@ void func_80095D04(GlobalContext* globalCtx, Room* room, u32 flags) { } } - if (((iREG(86) == 1) && (iREG(89) >= sp9C)) || ((iREG(86) == 2) && (iREG(89) == sp9C))) + if (((iREG(86) == 1) && (iREG(89) >= sp9C)) || ((iREG(86) == 2) && (iREG(89) == sp9C))) { if (flags & 1) { temp2 = polygonDlist->opa; @@ -224,7 +224,7 @@ void func_80095D04(GlobalContext* globalCtx, Room* room, u32 flags) { s32 func_80096238(void* data) { OSTime time; - if (*(u32*)data == JPEG_MARKER) + if (*(u32*)data == JPEG_MARKER) { char* decodedJpeg = ResourceMgr_LoadJPEG(data, 320 * 240 * 2); //char* decodedJpeg = ResourceMgr_LoadJPEG(data, 480 * 240 * 2); @@ -235,8 +235,8 @@ s32 func_80096238(void* data) { osSyncPrintf("ワークãƒãƒƒãƒ•ã‚¡ã‚¢ãƒ‰ãƒ¬ã‚¹ï¼ˆï¼ºãƒãƒƒãƒ•ã‚¡ï¼‰%08x\n", gZBuffer); time = osGetTime(); - - //if (!Jpeg_Decode(data, gZBuffer, gGfxSPTaskOutputBuffer, sizeof(gGfxSPTaskOutputBuffer))) + + //if (!Jpeg_Decode(data, gZBuffer, gGfxSPTaskOutputBuffer, sizeof(gGfxSPTaskOutputBuffer))) if (1) { memcpy(data, decodedJpeg, 320 * 240 * 2); @@ -294,14 +294,17 @@ void func_8009638C(Gfx** displayList, void* source, void* tlut, u16 width, u16 h bg->b.frameW = width * 4; bg->b.frameH = height * 4; guS2DInitBg(bg); - - gDPSetOtherMode(displayListHead++, mode0 | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_COPY | G_PM_NPRIMITIVE, + + gDPSetOtherMode(displayListHead++, mode0 | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_FILL | G_PM_NPRIMITIVE, G_AC_THRESHOLD | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2); gDPSetFillColor(displayListHead++, GPACK_RGBA5551(0, 0, 0, 1) << 16 | GPACK_RGBA5551(0, 0, 0, 1)); gDPFillWideRectangle(displayListHead++, OTRGetRectDimensionFromLeftEdge(0), 0, OTRGetRectDimensionFromRightEdge(SCREEN_WIDTH), SCREEN_HEIGHT); + gDPSetOtherMode(displayListHead++, mode0 | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_COPY | G_PM_NPRIMITIVE, + G_AC_THRESHOLD | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2); + gDPLoadMultiTile(displayListHead++, bg->b.imagePtr, 0, G_TX_RENDERTILE, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 0, 0, 0, 0 + 31, 0 + 31, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, From f1e85d1e720ba0fc61259dc4ea65915a9ffca9e1 Mon Sep 17 00:00:00 2001 From: Baoulettes Date: Tue, 3 May 2022 00:27:06 +0200 Subject: [PATCH 108/146] Bosses title cards fixes (#247) * Boss title fixes. * Proper X/Y/H/W * Proper x,y,w,h * Proper X,Y,W,H * Actually had wrong height (was 32, should be 40) * one of the last x,y,h,w fix * WIP really need a better way to check it. * Fix Ganondorf title card. * better conditional logic * No more workaround! * Add two var in the TitleCardContext structures * Added hasTranslation to Phantom Ganon's Horse funny how that the horse that hold the title card. * Add hasTranslation to Dodongo. * Revert workaround and add hasTranslation=false * Added hasTranslation to big piggy Ganon * Add hasTranslation to Gohma * Add hasTranslation to Morpha * Add hasTranslation to Twins first part. * Add hastranslation to that eletro "dude" * Add hastranslation to bongo bongo * Added hasTranslation to airwing v2 * add hasTranslation to TitleCard_InitBossName init * isBossCard to true now that I can confirm it work imagine in TitleCard_InitBossName setting isBossCard to false... * no need to use bool there is seem to not like it * change bool to s16 --- soh/include/functions.h | 2 +- soh/include/z64.h | 2 + soh/src/code/z_actor.c | 38 +++++++++++++++---- .../actors/ovl_Boss_Dodongo/z_boss_dodongo.c | 2 +- .../overlays/actors/ovl_Boss_Fd/z_boss_fd.c | 2 +- .../actors/ovl_Boss_Ganon/z_boss_ganon.c | 4 +- .../actors/ovl_Boss_Ganon2/z_boss_ganon2.c | 5 ++- .../actors/ovl_Boss_Goma/z_boss_goma.c | 2 +- .../overlays/actors/ovl_Boss_Mo/z_boss_mo.c | 4 +- .../overlays/actors/ovl_Boss_Sst/z_boss_sst.c | 4 +- .../overlays/actors/ovl_Boss_Tw/z_boss_tw.c | 4 +- .../overlays/actors/ovl_Boss_Va/z_boss_va.c | 4 +- soh/src/overlays/actors/ovl_En_fHG/z_en_fhg.c | 2 +- 13 files changed, 51 insertions(+), 24 deletions(-) diff --git a/soh/include/functions.h b/soh/include/functions.h index 01901d5d0..7d368edb6 100644 --- a/soh/include/functions.h +++ b/soh/include/functions.h @@ -381,7 +381,7 @@ void Flags_UnsetTempClear(GlobalContext* globalCtx, s32 flag); s32 Flags_GetCollectible(GlobalContext* globalCtx, s32 flag); void Flags_SetCollectible(GlobalContext* globalCtx, s32 flag); void TitleCard_InitBossName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s16 x, s16 y, u8 width, - u8 height); + u8 height, s16 hastranslation); void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s32 x, s32 y, s32 width, s32 height, s32 delay); s32 func_8002D53C(GlobalContext* globalCtx, TitleCardContext* titleCtx); diff --git a/soh/include/z64.h b/soh/include/z64.h index f0dfba52d..103c8650f 100644 --- a/soh/include/z64.h +++ b/soh/include/z64.h @@ -251,6 +251,8 @@ typedef struct { /* 0x0B */ u8 delayTimer; // how long the title card waits to appear /* 0x0C */ s16 alpha; /* 0x0E */ s16 intensity; + /* ---- */ s16 isBossCard; //To detect if that a Boss name title card. + /* ---- */ s16 hasTranslation; // to detect if the current title card has translation (used for bosses only) } TitleCardContext; // size = 0x10 typedef struct { diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index 9d9a34c96..eee3d1724 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -758,12 +758,14 @@ void func_8002CDE4(GlobalContext* globalCtx, TitleCardContext* titleCtx) { } void TitleCard_InitBossName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s16 x, s16 y, u8 width, - u8 height) { + u8 height, s16 hasTranslation) { if (ResourceMgr_OTRSigCheck(texture)) texture = ResourceMgr_LoadTexByName(texture); titleCtx->texture = texture; + titleCtx->isBossCard = true; + titleCtx->hasTranslation = hasTranslation; titleCtx->x = x; titleCtx->y = y; titleCtx->width = width; @@ -981,6 +983,8 @@ void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCt titleCtx->texture = ResourceMgr_LoadTexByName(texture); //titleCtx->texture = texture; + titleCtx->isBossCard = false; + titleCtx->hasTranslation = false; titleCtx->x = x; titleCtx->y = y; titleCtx->width = width; @@ -1009,6 +1013,9 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) { s32 doubleWidth; s32 titleY; s32 titleSecondY; + s32 textureLanguageOffset; + s32 shiftTopY; + s32 shiftBottomY; if (titleCtx->alpha != 0) { width = titleCtx->width; @@ -1022,31 +1029,48 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) { height = (width * height > 0x1000) ? 0x1000 / width : height; titleSecondY = titleY + (height * 4); + textureLanguageOffset = 0x0; + shiftTopY = 0x0; + shiftBottomY = 0x1000; + + //if this card is bosses cards, has translation and that is not using English language. + if (titleCtx->isBossCard == 1 && titleCtx->hasTranslation == 1 && gSaveContext.language != LANGUAGE_ENG) { + if (gSaveContext.language == LANGUAGE_GER) { + textureLanguageOffset = (width * height * gSaveContext.language); + shiftTopY = 0x400; + shiftBottomY = 0x1400; + } else if (gSaveContext.language == LANGUAGE_FRA) { + textureLanguageOffset = (width * height * gSaveContext.language); + shiftTopY = 0x800; + shiftBottomY = 0x1800; + } + } + // WORLD_OVERLAY_DISP Goes over POLY_XLU_DISP but under POLY_KAL_DISP WORLD_OVERLAY_DISP = func_80093808(WORLD_OVERLAY_DISP); gDPSetPrimColor(WORLD_OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->alpha); - gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture, G_IM_FMT_IA, + gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset + shiftBottomY, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - - gSPTextureRectangle(WORLD_OVERLAY_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4) - 1, + //Removing the -1 there remove the gap between top and bottom textures. + gSPTextureRectangle(WORLD_OVERLAY_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4), G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); height = titleCtx->height - height; // If texture is bigger than 0x1000, display the rest if (height > 0) { - gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture + 0x1000, + gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset + shiftBottomY, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - + //Removing the -1 there remove the gap between top and bottom textures. gSPTextureRectangle(WORLD_OVERLAY_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4, - titleSecondY + (height * 4) - 1, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); + titleSecondY + (height * 4), G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 2880); diff --git a/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c b/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c index 3b130b229..fa4d06b05 100644 --- a/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c +++ b/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c @@ -418,7 +418,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) { if (this->unk_198 == 0x5A) { if (!(gSaveContext.eventChkInf[7] & 2)) { TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx, - SEGMENTED_TO_VIRTUAL(gKingDodongoTitleCardTex), 0xA0, 0xB4, 0x80, 0x28); + SEGMENTED_TO_VIRTUAL(gKingDodongoTitleCardTex), 160, 180, 128, 40, true); } Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_FIRE_BOSS); } diff --git a/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c b/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c index 6553b3c11..649774346 100644 --- a/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c +++ b/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c @@ -493,7 +493,7 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) { } if ((this->timers[3] == 130) && !(gSaveContext.eventChkInf[7] & 8)) { TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx, - SEGMENTED_TO_VIRTUAL(gVolvagiaBossTitleCardTex), 0xA0, 0xB4, 0x80, 0x28); + SEGMENTED_TO_VIRTUAL(gVolvagiaBossTitleCardTex), 160, 180, 128, 40, true); } if (this->timers[3] <= 100) { this->camData.eyeVel.x = this->camData.eyeVel.y = this->camData.eyeVel.z = 2.0f; diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c index c5c19f864..e4a5afc65 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c @@ -1088,7 +1088,7 @@ void BossGanon_IntroCutscene(BossGanon* this, GlobalContext* globalCtx) { if (!(gSaveContext.eventChkInf[7] & 0x100)) { TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx, - SEGMENTED_TO_VIRTUAL(gDorfTitleCardTex), 160, 180, 128, 40); + SEGMENTED_TO_VIRTUAL(gDorfTitleCardTex), 160, 180, 128, 40, false); } gSaveContext.eventChkInf[7] |= 0x100; @@ -5044,4 +5044,4 @@ static EnGanonMant* sCape; memset(sEffectBuf, 0, sizeof(sEffectBuf)); -} \ No newline at end of file +} diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index 74da86927..21fd1a149 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -671,7 +671,8 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) { if (this->unk_398 == 80) { BossGanon2_SetObjectSegment(this, globalCtx, OBJECT_GANON2, false); TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx, - SEGMENTED_TO_VIRTUAL(object_ganon2_Tex_021A90), 160, 180, 128, 40); + SEGMENTED_TO_VIRTUAL(object_ganon2_Tex_021A90), 160, 180, 128, 40, true); + //It has translation but they are all the same. they all say "GANON" only } this->unk_3A4.x = ((this->actor.world.pos.x + 500.0f) - 350.0f) + 100.0f; this->unk_3A4.y = this->actor.world.pos.y; @@ -3087,4 +3088,4 @@ void BossGanon2_Reset(void) { memset(D_809105D8, 0, sizeof(D_809105D8)); memset(D_80910608, 0, sizeof(D_80910608)); memset(sParticles, 0, sizeof(sParticles)); -} \ No newline at end of file +} diff --git a/soh/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c b/soh/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c index ad8e4537d..d84cf4a74 100644 --- a/soh/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c +++ b/soh/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c @@ -926,7 +926,7 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) { if (!(gSaveContext.eventChkInf[7] & 1)) { TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx, - SEGMENTED_TO_VIRTUAL(gGohmaTitleCardTex), 0xA0, 0xB4, 0x80, 0x28); + SEGMENTED_TO_VIRTUAL(gGohmaTitleCardTex), 160, 180, 128, 40, true); } Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS); diff --git a/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index 7bcfd7c50..c6d8a8032 100644 --- a/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -1423,7 +1423,7 @@ void BossMo_IntroCs(BossMo* this, GlobalContext* globalCtx) { } if (this->timers[2] == 130) { TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx, - SEGMENTED_TO_VIRTUAL(gMorphaTitleCardTex), 0xA0, 0xB4, 0x80, 0x28); + SEGMENTED_TO_VIRTUAL(gMorphaTitleCardTex), 160, 180, 128, 40, true); gSaveContext.eventChkInf[7] |= 0x10; } break; @@ -3591,4 +3591,4 @@ void BossMo_Reset(void) { sSeed1 = 0; sSeed2 = 0; sSeed3 = 0; -} \ No newline at end of file +} diff --git a/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 6fae3778b..eeae20698 100644 --- a/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -598,7 +598,7 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) { } else if (revealStateTimer == 85) { if (!(gSaveContext.eventChkInf[7] & 0x80)) { TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx, - SEGMENTED_TO_VIRTUAL(gBongoTitleCardTex), 160, 180, 128, 40); + SEGMENTED_TO_VIRTUAL(gBongoTitleCardTex), 160, 180, 128, 40, true); } Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS); Animation_MorphToPlayOnce(&this->skelAnime, &gBongoHeadEyeCloseAnim, -5.0f); @@ -3245,4 +3245,4 @@ void BossSst_Reset(void) { sCutsceneCamera= 0; sBodyStatic = false; -} \ No newline at end of file +} diff --git a/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index 38e4996db..6b31635b9 100644 --- a/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -2220,7 +2220,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) { globalCtx->envCtx.unk_BE = 1; globalCtx->envCtx.unk_BD = 1; globalCtx->envCtx.unk_D8 = 0.0f; - TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gTwinrovaTitleCardTex), 160, 180, 128, 40); // OTRTODO + TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gTwinrovaTitleCardTex), 160, 180, 128, 40, true); gSaveContext.eventChkInf[7] |= 0x20; Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS); } @@ -5469,4 +5469,4 @@ void BossTw_TwinrovaLaugh(BossTw* this, GlobalContext* globalCtx) { void BossTw_Reset(void) { sTwInitalized = false; memset(sTwEffects, 0, sizeof(sTwEffects)); -} \ No newline at end of file +} diff --git a/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index 071baa106..c5b60a327 100644 --- a/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -979,7 +979,7 @@ void BossVa_BodyIntro(BossVa* this, GlobalContext* globalCtx) { if (!(gSaveContext.eventChkInf[7] & 0x40)) { TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx, - SEGMENTED_TO_VIRTUAL(gBarinadeTitleCardTex), 0xA0, 0xB4, 0x80, 0x28); + SEGMENTED_TO_VIRTUAL(gBarinadeTitleCardTex), 160, 180, 128, 40, true); } if (Rand_ZeroOne() < 0.1f) { @@ -4028,4 +4028,4 @@ void BossVa_Reset(void) { sZapperRot.z = 0; sPhase2Timer = 0; sPhase4HP = 0; -} \ No newline at end of file +} diff --git a/soh/src/overlays/actors/ovl_En_fHG/z_en_fhg.c b/soh/src/overlays/actors/ovl_En_fHG/z_en_fhg.c index ce1029165..82f37b801 100644 --- a/soh/src/overlays/actors/ovl_En_fHG/z_en_fhg.c +++ b/soh/src/overlays/actors/ovl_En_fHG/z_en_fhg.c @@ -332,7 +332,7 @@ void EnfHG_Intro(EnfHG* this, GlobalContext* globalCtx) { Math_ApproachF(&this->cameraSpeedMod, 1.0f, 1.0f, 0.05f); if (this->timers[0] == 75) { TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx, - SEGMENTED_TO_VIRTUAL(gPhantomGanonTitleCardTex), 160, 180, 128, 40); + SEGMENTED_TO_VIRTUAL(gPhantomGanonTitleCardTex), 160, 180, 128, 40, true); } if (this->timers[0] == 0) { this->cutsceneState = INTRO_RETREAT; From 5bb7e94cc41ef8279b90172f5bb2830ec88b35d1 Mon Sep 17 00:00:00 2001 From: earthcrafterman Date: Mon, 2 May 2022 18:27:33 -0400 Subject: [PATCH 109/146] Adds a slider that lets players multiply King Zora's speed by up to 5x. (#238) --- libultraship/libultraship/SohImGuiImpl.cpp | 1 + soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 303bc74e7..7aa793096 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -570,6 +570,7 @@ namespace SohImGui { ImGui::Separator(); EnhancementSliderInt("Text Speed: %dx", "##TEXTSPEED", "gTextSpeed", 1, 5, ""); + EnhancementSliderInt("King Zora Speed: %dx", "##WEEPSPEED", "gMweepSpeed", 1, 5, ""); EnhancementCheckbox("Skip Text", "gSkipText"); EnhancementCheckbox("Minimal UI", "gMinimalUI"); diff --git a/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c b/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c index 1161ba5e3..502f2c056 100644 --- a/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c +++ b/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c @@ -287,7 +287,7 @@ s32 EnKz_FollowPath(EnKz* this, GlobalContext* globalCtx) { pathDiffZ = pointPos->z - this->actor.world.pos.z; Math_SmoothStepToS(&this->actor.world.rot.y, (Math_FAtan2F(pathDiffX, pathDiffZ) * (0x8000 / M_PI)), 0xA, 0x3E8, 1); - if ((SQ(pathDiffX) + SQ(pathDiffZ)) < 10.0f) { + if ((SQ(pathDiffX) + SQ(pathDiffZ)) < 10.0f * CVar_GetS32("gMweepSpeed", 1)) { this->waypoint++; if (this->waypoint >= path->count) { this->waypoint = 0; @@ -378,7 +378,7 @@ void EnKz_SetupMweep(EnKz* this, GlobalContext* globalCtx) { initPos.z += 260.0f; Gameplay_CameraSetAtEye(globalCtx, this->cutsceneCamera, &pos, &initPos); func_8002DF54(globalCtx, &this->actor, 8); - this->actor.speedXZ = 0.1f; + this->actor.speedXZ = 0.1f * CVar_GetS32("gMweepSpeed", 1); this->actionFunc = EnKz_Mweep; } From 1b7a613054c34e3fb9afe5b9cdb6cbd7118c4e88 Mon Sep 17 00:00:00 2001 From: MegaMech Date: Mon, 2 May 2022 16:46:18 -0600 Subject: [PATCH 110/146] Fix link to build instructions (#219) * Fix link to build instructions * Update README.md * Update README.md * Update README.md * Update README.md --- README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 65a6b90e0..1cbe0cd3f 100644 --- a/README.md +++ b/README.md @@ -7,14 +7,21 @@ The Ship does not include assets and as such requires a prior copy of the game t ## Quick Start 1) Download The Ship of Harkinian from Discord. -2) Requires an `oot debug` rom (not Master Quest). +2) Requires a supported copy of the game (See supported games below). +3) Use the OTRGui to generate an `oot.otr` archive file. +4) Launch `soh.exe` + +### Supported Games +Ocarina of Time Debug (not Master Quest) ``` Build team: `zelda@srd022j` Build date: `03-02-21 00:49:18` (year-month-day) sha1: cee6bc3c2a634b41728f2af8da54d9bf8cc14099 ``` -3) Use the OTRGui to generate an `oot.otr` archive file. -4) Launch `soh.exe` +Ocarina of Time Pal Gamecube +``` +sha1: d0c95b2cb3c6682a171db267932af7af8cf5fa82 +``` Congratulations, you are now sailing with the Ship of Harkinian! Have fun! @@ -51,7 +58,7 @@ Official Discord: https://discord.com/invite/BtBmd55HVH ## Building The Ship of Harkinian -Refer to the [building instructions](https://github.com/HarbourMasters/Shipwright/BUILDING.md) to compile SoH. +Refer to the [building instructions](BUILDING.md) to compile SoH. ## Troubleshooting The Exporter - Affirm that you have an `/assets` folder filled with XMLs in the same directory as OTRGui.exe From 3d85fa1f3f51df9d7ca7730607e186f0547620cb Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Mon, 2 May 2022 19:58:31 -0500 Subject: [PATCH 111/146] Fixes SohImGui compilation (#259) --- libultraship/libultraship/SohImGuiImpl.cpp | 32 ---------------------- 1 file changed, 32 deletions(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 7aa793096..af5066159 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -635,38 +635,6 @@ namespace SohImGui { EnhancementCheckbox("Unrestricted Items", "gNoRestrictItems"); EnhancementCheckbox("Freeze Time", "gFreezeTime"); - - if (ImGui::Checkbox("Climb Everything", &Game::Settings.cheats.climb_everything)) { - CVar_SetS32("gClimbEverything", Game::Settings.cheats.climb_everything); - needs_save = true; - } - - if (ImGui::Checkbox("Moon Jump on L", &Game::Settings.cheats.moon_jump_on_l)) { - CVar_SetS32("gMoonJumpOnL", Game::Settings.cheats.moon_jump_on_l); - needs_save = true; - } - - if (ImGui::Checkbox("Super Tunic", &Game::Settings.cheats.super_tunic)) { - CVar_SetS32("gSuperTunic", Game::Settings.cheats.super_tunic); - needs_save = true; - } - - if (ImGui::Checkbox("Easy ISG", &Game::Settings.cheats.ez_isg)) { - CVar_SetS32("gEzISG", Game::Settings.cheats.ez_isg); - needs_save = true; - } - - if (ImGui::Checkbox("Unrestricted Items", &Game::Settings.cheats.no_restrict_item)) { - CVar_SetS32("gNoRestrictItem", Game::Settings.cheats.no_restrict_item); - needs_save = true; - } - - if (ImGui::Checkbox("Freeze Time", &Game::Settings.cheats.freeze_time)) { - CVar_SetS32("gFreezeTime", Game::Settings.cheats.freeze_time); - needs_save = true; - } - - ImGui::EndMenu(); } From 47331a904fcffeee4e6dd064665f94a6da6a3c8c Mon Sep 17 00:00:00 2001 From: Baoulettes Date: Tue, 3 May 2022 02:58:52 +0200 Subject: [PATCH 112/146] Title card offsets fix. (#258) was missing (uintptr_t) x4 --- soh/src/code/z_actor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index eee3d1724..f87dd13b4 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -1052,7 +1052,7 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) { gDPSetPrimColor(WORLD_OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->alpha); - gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset + shiftBottomY, G_IM_FMT_IA, + gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture + (uintptr_t)textureLanguageOffset + (uintptr_t)shiftBottomY, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -1064,7 +1064,7 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) { // If texture is bigger than 0x1000, display the rest if (height > 0) { - gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset + shiftBottomY, + gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture + (uintptr_t)textureLanguageOffset + (uintptr_t)shiftBottomY, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); From 091983b3e3c0d0a1938d85a1f9c2e776f873603a Mon Sep 17 00:00:00 2001 From: Baoulettes Date: Wed, 4 May 2022 03:00:49 +0200 Subject: [PATCH 113/146] Cleaning bool check and now use proper variable. (#261) Baou is a noob and confirming it everyday. --- soh/src/code/z_actor.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index f87dd13b4..9a56000ec 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -1034,13 +1034,12 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) { shiftBottomY = 0x1000; //if this card is bosses cards, has translation and that is not using English language. - if (titleCtx->isBossCard == 1 && titleCtx->hasTranslation == 1 && gSaveContext.language != LANGUAGE_ENG) { + if (titleCtx->isBossCard && titleCtx->hasTranslation && gSaveContext.language != LANGUAGE_ENG) { + textureLanguageOffset = (width * height * gSaveContext.language); if (gSaveContext.language == LANGUAGE_GER) { - textureLanguageOffset = (width * height * gSaveContext.language); shiftTopY = 0x400; shiftBottomY = 0x1400; } else if (gSaveContext.language == LANGUAGE_FRA) { - textureLanguageOffset = (width * height * gSaveContext.language); shiftTopY = 0x800; shiftBottomY = 0x1800; } @@ -1052,7 +1051,7 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) { gDPSetPrimColor(WORLD_OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->alpha); - gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture + (uintptr_t)textureLanguageOffset + (uintptr_t)shiftBottomY, G_IM_FMT_IA, + gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset + shiftTopY, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -1064,7 +1063,7 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) { // If texture is bigger than 0x1000, display the rest if (height > 0) { - gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture + (uintptr_t)textureLanguageOffset + (uintptr_t)shiftBottomY, + gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset + shiftBottomY, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); From 2e1a0b51449ef223c3b10403a643c191ba0100ba Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Wed, 11 May 2022 09:59:56 -0500 Subject: [PATCH 114/146] Normalized imgui and added texture filter (#271) * Normalized imgui and added texture filter and fixed develop * Fixed incorrect separator title --- libultraship/libultraship/GameSettings.cpp | 41 +--- libultraship/libultraship/GameSettings.h | 23 --- .../Lib/Fast3D/gfx_direct3d11.cpp | 43 ++-- .../libultraship/Lib/Fast3D/gfx_opengl.cpp | 56 ++++-- .../Lib/Fast3D/gfx_rendering_api.h | 8 + .../include/spdlog/sinks/sohconsole_sink.h | 3 +- libultraship/libultraship/SohConsole.cpp | 2 +- libultraship/libultraship/SohImGuiImpl.cpp | 183 ++++++++++-------- soh/soh/Enhancements/debugconsole.cpp | 40 ++-- soh/soh/Enhancements/debugger/colViewer.cpp | 2 +- .../Enhancements/debugger/debugSaveEditor.cpp | 2 +- 11 files changed, 221 insertions(+), 182 deletions(-) diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index c2d876ab0..d9353a58a 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -10,13 +10,12 @@ #include "Cvar.h" #include "GlobalCtx2.h" #include "SohImGuiImpl.h" -#include "stox.h" #include "../../soh/include/z64audio.h" -#include #include "SohHooks.h" #include "../../soh/soh/Enhancements/debugconsole.h" #include "Window.h" +#include "Lib/Fast3D/gfx_rendering_api.h" #define ABS(var) var < 0 ? -(var) : var @@ -25,14 +24,6 @@ using namespace Ship; namespace Game { bool DeSyncAudio = false; - SoHConfigType Settings; - const std::string ConfSection = DEBUG_SECTION; - const std::string AudioSection = AUDIO_SECTION; - const std::string ControllerSection = CONTROLLER_SECTION; - const std::string EnhancementSection = ENHANCEMENTS_SECTION; - const std::string CosmeticsSection = COSMETICS_SECTION; - const std::string CheatSection = CHEATS_SECTION; - const std::string LanguagesSection = LANGUAGES_SECTION; void UpdateAudio() { Audio_SetGameVolume(SEQ_BGM_MAIN, CVar_GetFloat("gMainMusicVolume", 1)); @@ -41,18 +32,6 @@ namespace Game { Audio_SetGameVolume(SEQ_SFX, CVar_GetFloat("gFanfareVolume", 1)); } - void LoadSettings() { - const std::shared_ptr pConf = GlobalCtx2::GetInstance()->GetConfig(); - ConfigFile& Conf = *pConf; - - // Debug - SohImGui::console->opened = stob(Conf[ConfSection]["console"]); - Settings.debug.menu_bar = stob(Conf[ConfSection]["menu_bar"]); - Settings.debug.soh = stob(Conf[ConfSection]["soh_debug"]); - - UpdateAudio(); - } - void LoadPadSettings() { const std::shared_ptr pConf = GlobalCtx2::GetInstance()->GetConfig(); ConfigFile& Conf = *pConf; @@ -65,16 +44,11 @@ namespace Game { } } + void LoadSettings() { + DebugConsole_LoadCVars(); + } + void SaveSettings() { - const std::shared_ptr pConf = GlobalCtx2::GetInstance()->GetConfig(); - ConfigFile& Conf = *pConf; - - // Debug - Conf[ConfSection]["console"] = std::to_string(SohImGui::console->opened); - Conf[ConfSection]["menu_bar"] = std::to_string(Settings.debug.menu_bar); - Conf[ConfSection]["soh_debug"] = std::to_string(Settings.debug.soh); - - Conf.Save(); DebugConsole_SaveCVars(); } @@ -82,6 +56,11 @@ namespace Game { ModInternal::registerHookListener({ AUDIO_INIT, [](HookEvent ev) { UpdateAudio(); }}); + ModInternal::registerHookListener({ GFX_INIT, [](HookEvent ev) { + gfx_get_current_rendering_api()->set_texture_filter((FilteringMode) CVar_GetS32("gTextureFilter", THREE_POINT)); + SohImGui::console->opened = CVar_GetS32("gConsoleEnabled", 0); + UpdateAudio(); + }}); } void SetSeqPlayerVolume(SeqPlayers playerId, float volume) { diff --git a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h index 9d4e3e776..0a9aa0ee6 100644 --- a/libultraship/libultraship/GameSettings.h +++ b/libultraship/libultraship/GameSettings.h @@ -1,19 +1,5 @@ #pragma once -struct SoHConfigType { - // Debug - struct { - bool soh = false; - bool menu_bar = false; - bool soh_sink = true; - } debug; - - // Graphics - struct { - bool show = false; - } graphics; -}; - enum SeqPlayers { /* 0 */ SEQ_BGM_MAIN, /* 1 */ SEQ_FANFARE, @@ -22,16 +8,7 @@ enum SeqPlayers { /* 4 */ SEQ_MAX }; -#define DEBUG_SECTION "DEBUG SETTINGS" -#define AUDIO_SECTION "AUDIO SETTINGS" -#define CONTROLLER_SECTION "CONTROLLER SECTION" -#define ENHANCEMENTS_SECTION "ENHANCEMENT SETTINGS" -#define COSMETICS_SECTION "COSMETIC SETTINGS" -#define CHEATS_SECTION "CHEATS SETTINGS" -#define LANGUAGES_SECTION "LANGUAGES SETTINGS" - namespace Game { - extern SoHConfigType Settings; void InitSettings(); void LoadSettings(); void LoadPadSettings(); diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp index cea82e09e..8671c3df4 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp @@ -15,11 +15,9 @@ #ifndef _LANGUAGE_C #define _LANGUAGE_C #endif -#include +#include "PR/ultra64/gbi.h" -#include "gfx_cc.h" #include "gfx_window_manager_api.h" -#include "gfx_rendering_api.h" #include "gfx_direct3d_common.h" #define DECLARE_GFX_DXGI_FUNCTIONS @@ -28,7 +26,9 @@ #include "gfx_screen_config.h" #include "../../SohImGuiImpl.h" -#define THREE_POINT_FILTERING 0 +#include "gfx_cc.h" +#include "gfx_rendering_api.h" +#include "gfx_pc.h" #define DEBUG_D3D 0 using namespace Microsoft::WRL; // For ComPtr @@ -135,6 +135,7 @@ static struct { //uint32_t current_width, current_height; uint32_t render_target_height; int current_framebuffer; + FilteringMode current_filter_mode = NONE; int8_t depth_test; int8_t depth_mask; @@ -397,7 +398,7 @@ static struct ShaderProgram *gfx_d3d11_create_and_load_new_shader(uint64_t shade char buf[4096]; size_t len, num_floats; - gfx_direct3d_common_build_shader(buf, len, num_floats, cc_features, false, THREE_POINT_FILTERING); + gfx_direct3d_common_build_shader(buf, len, num_floats, cc_features, false, d3d.current_filter_mode == THREE_POINT); ComPtr vs, ps; ComPtr error_blob; @@ -564,11 +565,8 @@ static void gfx_d3d11_set_sampler_parameters(int tile, bool linear_filter, uint3 D3D11_SAMPLER_DESC sampler_desc; ZeroMemory(&sampler_desc, sizeof(D3D11_SAMPLER_DESC)); -#if THREE_POINT_FILTERING - sampler_desc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT; -#else - sampler_desc.Filter = linear_filter ? D3D11_FILTER_MIN_MAG_MIP_LINEAR : D3D11_FILTER_MIN_MAG_MIP_POINT; -#endif + sampler_desc.Filter = linear_filter && d3d.current_filter_mode == LINEAR ? D3D11_FILTER_MIN_MAG_MIP_LINEAR : D3D11_FILTER_MIN_MAG_MIP_POINT; + sampler_desc.AddressU = gfx_cm_to_d3d11(cms); sampler_desc.AddressV = gfx_cm_to_d3d11(cmt); sampler_desc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP; @@ -672,12 +670,12 @@ static void gfx_d3d11_draw_triangles(float buf_vbo[], size_t buf_vbo_len, size_t d3d.last_resource_views[i] = d3d.textures[d3d.current_texture_ids[i]].resource_view.Get(); d3d.context->PSSetShaderResources(i, 1, d3d.textures[d3d.current_texture_ids[i]].resource_view.GetAddressOf()); -#if THREE_POINT_FILTERING - d3d.per_draw_cb_data.textures[i].width = d3d.textures[d3d.current_texture_ids[i]].width; - d3d.per_draw_cb_data.textures[i].height = d3d.textures[d3d.current_texture_ids[i]].height; - d3d.per_draw_cb_data.textures[i].linear_filtering = d3d.textures[d3d.current_texture_ids[i]].linear_filtering; - textures_changed = true; -#endif + if (d3d.current_filter_mode == THREE_POINT) { + d3d.per_draw_cb_data.textures[i].width = d3d.textures[d3d.current_texture_ids[i]].width; + d3d.per_draw_cb_data.textures[i].height = d3d.textures[d3d.current_texture_ids[i]].height; + d3d.per_draw_cb_data.textures[i].linear_filtering = d3d.textures[d3d.current_texture_ids[i]].linear_filtering; + textures_changed = true; + } if (d3d.last_sampler_states[i].Get() != d3d.textures[d3d.current_texture_ids[i]].sampler_state.Get()) { d3d.last_sampler_states[i] = d3d.textures[d3d.current_texture_ids[i]].sampler_state.Get(); @@ -880,6 +878,15 @@ void gfx_d3d11_select_texture_fb(int fbID) { gfx_d3d11_select_texture(tile, d3d.framebuffers[fbID].texture_id); } +void gfx_d3d11_set_texture_filter(FilteringMode mode) { + d3d.current_filter_mode = mode; + gfx_texture_cache_clear(); +} + +FilteringMode gfx_d3d11_get_texture_filter(void) { + return d3d.current_filter_mode; +} + std::map, uint16_t> gfx_d3d11_get_pixel_depth(int fb_id, const std::set>& coordinates) { Framebuffer& fb = d3d.framebuffers[fb_id]; TextureData& td = d3d.textures[fb.texture_id]; @@ -1019,7 +1026,9 @@ struct GfxRenderingAPI gfx_direct3d11_api = { gfx_d3d11_get_pixel_depth, gfx_d3d11_get_framebuffer_texture_id, gfx_d3d11_select_texture_fb, - gfx_d3d11_delete_texture + gfx_d3d11_delete_texture, + gfx_d3d11_set_texture_filter, + gfx_d3d11_get_texture_filter }; #endif diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp index 6c5f47577..0c649d562 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp @@ -73,6 +73,7 @@ static uint32_t frame_count; static vector framebuffers; static size_t current_framebuffer; static float current_noise_scale; +static FilteringMode current_filter_mode = THREE_POINT; GLuint pixel_depth_rb, pixel_depth_fb; size_t pixel_depth_rb_size; @@ -211,7 +212,7 @@ static struct ShaderProgram* gfx_opengl_create_and_load_new_shader(uint64_t shad gfx_cc_get_features(shader_id0, shader_id1, &cc_features); char vs_buf[1024]; - char fs_buf[1024]; + char fs_buf[3000]; size_t vs_len = 0; size_t fs_len = 0; size_t num_floats = 4; @@ -312,21 +313,42 @@ static struct ShaderProgram* gfx_opengl_create_and_load_new_shader(uint64_t shad append_line(fs_buf, &fs_len, "}"); } + if (current_filter_mode == THREE_POINT) { + append_line(fs_buf, &fs_len, "#define TEX_OFFSET(off) texture2D(tex, texCoord - (off)/texSize)"); + append_line(fs_buf, &fs_len, "vec4 filter3point(in sampler2D tex, in vec2 texCoord, in vec2 texSize) {"); + append_line(fs_buf, &fs_len, " vec2 offset = fract(texCoord*texSize - vec2(0.5));"); + append_line(fs_buf, &fs_len, " offset -= step(1.0, offset.x + offset.y);"); + append_line(fs_buf, &fs_len, " vec4 c0 = TEX_OFFSET(offset);"); + append_line(fs_buf, &fs_len, " vec4 c1 = TEX_OFFSET(vec2(offset.x - sign(offset.x), offset.y));"); + append_line(fs_buf, &fs_len, " vec4 c2 = TEX_OFFSET(vec2(offset.x, offset.y - sign(offset.y)));"); + append_line(fs_buf, &fs_len, " return c0 + abs(offset.x)*(c1-c0) + abs(offset.y)*(c2-c0);"); + append_line(fs_buf, &fs_len, "}"); + append_line(fs_buf, &fs_len, "vec4 hookTexture2D(in sampler2D tex, in vec2 uv, in vec2 texSize) {"); + append_line(fs_buf, &fs_len, " return filter3point(tex, uv, texSize);"); + append_line(fs_buf, &fs_len, "}"); + } else { + append_line(fs_buf, &fs_len, "vec4 hookTexture2D(in sampler2D tex, in vec2 uv, in vec2 texSize) {"); + append_line(fs_buf, &fs_len, " return texture2D(tex, uv);"); + append_line(fs_buf, &fs_len, "}"); + } + append_line(fs_buf, &fs_len, "void main() {"); for (int i = 0; i < 2; i++) { if (cc_features.used_textures[i]) { bool s = cc_features.clamp[i][0], t = cc_features.clamp[i][1]; + + fs_len += sprintf(fs_buf + fs_len, "vec2 texSize%d = textureSize(uTex%d, 0);\n", i, i); + if (!s && !t) { - fs_len += sprintf(fs_buf + fs_len, "vec4 texVal%d = texture2D(uTex%d, vTexCoord%d);\n", i, i, i); + fs_len += sprintf(fs_buf + fs_len, "vec4 texVal%d = hookTexture2D(uTex%d, vTexCoord%d, texSize%d);\n", i, i, i, i); } else { - fs_len += sprintf(fs_buf + fs_len, "vec2 texSize%d = textureSize(uTex%d, 0);\n", i, i); if (s && t) { - fs_len += sprintf(fs_buf + fs_len, "vec4 texVal%d = texture2D(uTex%d, clamp(vTexCoord%d, 0.5 / texSize%d, vec2(vTexClampS%d, vTexClampT%d)));\n", i, i, i, i, i, i); + fs_len += sprintf(fs_buf + fs_len, "vec4 texVal%d = hookTexture2D(uTex%d, clamp(vTexCoord%d, 0.5 / texSize%d, vec2(vTexClampS%d, vTexClampT%d)), texSize%d);\n", i, i, i, i, i, i, i); } else if (s) { - fs_len += sprintf(fs_buf + fs_len, "vec4 texVal%d = texture2D(uTex%d, vec2(clamp(vTexCoord%d.s, 0.5 / texSize%d.s, vTexClampS%d), vTexCoord%d.t));\n", i, i, i, i, i, i); + fs_len += sprintf(fs_buf + fs_len, "vec4 texVal%d = hookTexture2D(uTex%d, vec2(clamp(vTexCoord%d.s, 0.5 / texSize%d.s, vTexClampS%d), vTexCoord%d.t), texSize%d);\n", i, i, i, i, i, i, i); } else { - fs_len += sprintf(fs_buf + fs_len, "vec4 texVal%d = texture2D(uTex%d, vec2(vTexCoord%d.s, clamp(vTexCoord%d.t, 0.5 / texSize%d.t, vTexClampT%d)));\n", i, i, i, i, i, i); + fs_len += sprintf(fs_buf + fs_len, "vec4 texVal%d = hookTexture2D(uTex%d, vec2(vTexCoord%d.s, clamp(vTexCoord%d.t, 0.5 / texSize%d.t, vTexClampT%d)), texSize%d);\n", i, i, i, i, i, i, i); } } } @@ -422,9 +444,9 @@ static struct ShaderProgram* gfx_opengl_create_and_load_new_shader(uint64_t shad GLint max_length = 0; glGetShaderiv(fragment_shader, GL_INFO_LOG_LENGTH, &max_length); char error_log[1024]; - //fprintf(stderr, "Fragment shader compilation failed\n"); + fprintf(stderr, "Fragment shader compilation failed\n"); glGetShaderInfoLog(fragment_shader, max_length, &max_length, &error_log[0]); - //fprintf(stderr, "%s\n", &error_log[0]); + fprintf(stderr, "%s\n", &error_log[0]); abort(); } @@ -552,9 +574,10 @@ static uint32_t gfx_cm_to_opengl(uint32_t val) { } static void gfx_opengl_set_sampler_parameters(int tile, bool linear_filter, uint32_t cms, uint32_t cmt) { + const GLint filter = linear_filter && current_filter_mode == LINEAR ? GL_LINEAR : GL_NEAREST; glActiveTexture(GL_TEXTURE0 + tile); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, linear_filter ? GL_LINEAR : GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, linear_filter ? GL_LINEAR : GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, gfx_cm_to_opengl(cms)); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, gfx_cm_to_opengl(cmt)); } @@ -823,6 +846,15 @@ static std::map, uint16_t> gfx_opengl_get_pixel_depth(in return res; } +void gfx_opengl_set_texture_filter(FilteringMode mode) { + current_filter_mode = mode; + gfx_texture_cache_clear(); +} + +FilteringMode gfx_opengl_get_texture_filter(void) { + return current_filter_mode; +} + struct GfxRenderingAPI gfx_opengl_api = { gfx_opengl_get_clip_parameters, gfx_opengl_unload_shader, @@ -853,7 +885,9 @@ struct GfxRenderingAPI gfx_opengl_api = { gfx_opengl_get_pixel_depth, gfx_opengl_get_framebuffer_texture_id, gfx_opengl_select_texture_fb, - gfx_opengl_delete_texture + gfx_opengl_delete_texture, + gfx_opengl_set_texture_filter, + gfx_opengl_get_texture_filter }; #endif diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_rendering_api.h b/libultraship/libultraship/Lib/Fast3D/gfx_rendering_api.h index 84247fe60..6318be492 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_rendering_api.h +++ b/libultraship/libultraship/Lib/Fast3D/gfx_rendering_api.h @@ -15,6 +15,12 @@ struct GfxClipParameters { bool invert_y; }; +enum FilteringMode { + THREE_POINT, + LINEAR, + NONE +}; + struct GfxRenderingAPI { struct GfxClipParameters (*get_clip_parameters)(void); void (*unload_shader)(struct ShaderProgram *old_prg); @@ -46,6 +52,8 @@ struct GfxRenderingAPI { void *(*get_framebuffer_texture_id)(int fb_id); void (*select_texture_fb)(int fb_id); void (*delete_texture)(uint32_t texID); + void (*set_texture_filter)(FilteringMode mode); + FilteringMode(*get_texture_filter)(void); }; #endif diff --git a/libultraship/libultraship/Lib/spdlog/include/spdlog/sinks/sohconsole_sink.h b/libultraship/libultraship/Lib/spdlog/include/spdlog/sinks/sohconsole_sink.h index 08729f4dc..c674495a6 100644 --- a/libultraship/libultraship/Lib/spdlog/include/spdlog/sinks/sohconsole_sink.h +++ b/libultraship/libultraship/Lib/spdlog/include/spdlog/sinks/sohconsole_sink.h @@ -10,6 +10,7 @@ #include #include "SohImGuiImpl.h" #include "GameSettings.h" +#include "Cvar.h" #include #include #include @@ -45,7 +46,7 @@ protected: } formatted.push_back('\0'); const char *msg_output = formatted.data(); - if (Game::Settings.debug.soh_sink && SohImGui::console->opened) + if (CVar_GetS32("gSinkEnabled", 0) && SohImGui::console->opened) SohImGui::console->Append("SoH Logging", priority, msg_output); } diff --git a/libultraship/libultraship/SohConsole.cpp b/libultraship/libultraship/SohConsole.cpp index 618cd1e1d..c360ea968 100644 --- a/libultraship/libultraship/SohConsole.cpp +++ b/libultraship/libultraship/SohConsole.cpp @@ -106,7 +106,7 @@ void Console::Draw() { if (!this->opened) return; ImGui::SetNextWindowSize(ImVec2(520, 600), ImGuiCond_FirstUseEver); - ImGui::Begin("Console", &this->opened); + ImGui::Begin("Console", nullptr); const ImVec2 pos = ImGui::GetWindowPos(); const ImVec2 size = ImGui::GetWindowSize(); diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index af5066159..ccb3b4a75 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -43,6 +43,11 @@ IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPAR using namespace Ship; bool oldCursorState = true; +#define EXPERIMENTAL() \ + ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(255, 50, 50, 255)); \ + ImGui::Text("Experimental"); \ + ImGui::PopStyleColor(); \ + ImGui::Separator(); #define TOGGLE_BTN ImGuiKey_F1 #define HOOK(b) if(b) needs_save = true; OSContPad* pads; @@ -73,6 +78,12 @@ namespace SohImGui { float navi_prop_i_col[3] = { 0.0f, 0.0f, 0.0f }; float navi_prop_o_col[3] = { 0.0f, 0.0f, 0.0f }; + const char* filters[3] = { + "Three-Point", + "Linear", + "None" + }; + std::map> windowCategories; std::map customWindows; @@ -85,7 +96,7 @@ namespace SohImGui { ImGui_ImplWin32_Init(impl.dx11.window); break; } - + // OTRTODO: This gameplay specific stuff should not be in libultraship. This needs to be moved to soh and use sTunicColors kokiri_col[0] = 30 / 255.0f; kokiri_col[1] = 105 / 255.0f; @@ -94,7 +105,7 @@ namespace SohImGui { goron_col[0] = 100 / 255.0f; goron_col[1] = 20 / 255.0f; goron_col[2] = 0; - + zora_col[0] = 0; zora_col[1] = 60 / 255.0f; zora_col[2] = 100 / 255.0f; @@ -201,7 +212,7 @@ namespace SohImGui { return; } - if (d == Dialogues::dConsole && Game::Settings.debug.menu_bar) { + if (d == Dialogues::dConsole && CVar_GetS32("gOpenMenuBar", 0)) { return; } if (!GlobalCtx2::GetInstance()->GetWindow()->IsFullscreen()) { @@ -280,8 +291,8 @@ namespace SohImGui { } void Init(WindowImpl window_impl) { - impl = window_impl; Game::LoadSettings(); + impl = window_impl; ImGuiContext* ctx = ImGui::CreateContext(); ImGui::SetCurrentContext(ctx); io = &ImGui::GetIO(); @@ -296,7 +307,7 @@ namespace SohImGui { ModInternal::registerHookListener({ GFX_INIT, [](const HookEvent ev) { if (GlobalCtx2::GetInstance()->GetWindow()->IsFullscreen()) - ShowCursor(Game::Settings.debug.menu_bar, Dialogues::dLoadSettings); + ShowCursor(CVar_GetS32("gOpenMenuBar", 0), Dialogues::dLoadSettings); LoadTexture("Game_Icon", "assets/ship_of_harkinian/icons/gSohIcon.png"); LoadTexture("A-Btn", "assets/ship_of_harkinian/buttons/ABtn.png"); @@ -320,7 +331,7 @@ namespace SohImGui { ModInternal::registerHookListener({ CONTROLLER_READ, [](const HookEvent ev) { pads = static_cast(ev->baseArgs["cont_pad"]); - } }); + }}); Game::InitSettings(); } @@ -334,7 +345,7 @@ namespace SohImGui { #define BindButton(btn, status) ImGui::Image(GetTextureByID(DefaultAssets[btn]->textureId), ImVec2(16.0f * scale, 16.0f * scale), ImVec2(0, 0), ImVec2(1.0f, 1.0f), ImVec4(255, 255, 255, (status) ? 255 : 0)); - void BindAudioSlider(const char* name, const char* key, float defaultValue, SeqPlayers playerId) + void BindAudioSlider(const char* name, const char* key, float defaultValue, SeqPlayers playerId) { float value = CVar_GetFloat(key, defaultValue); @@ -380,7 +391,7 @@ namespace SohImGui { ImGui::Text(text.c_str(), val); - if (ImGui::SliderInt(id.c_str(), &val, min, max, format.c_str())) + if (ImGui::SliderInt(id.c_str(), &val, min, max, format.c_str())) { CVar_SetS32(cvarName.c_str(), val); needs_save = true; @@ -443,7 +454,7 @@ namespace SohImGui { colors[2] = b / 255.0f; { - if (ImGui::ColorEdit3(text.c_str(), colors)) + if (ImGui::ColorEdit3(text.c_str(), colors)) { CVar_SetS32((cvarName + "_Red").c_str(), (int)(colors[0] * 255)); CVar_SetS32((cvarName + "_Green").c_str(), (int)(colors[1] * 255)); @@ -463,7 +474,7 @@ namespace SohImGui { ImGuiWindowFlags window_flags = ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoNavFocus | ImGuiWindowFlags_NoResize; - if (Game::Settings.debug.menu_bar) window_flags |= ImGuiWindowFlags_MenuBar; + if (CVar_GetS32("gOpenMenuBar", 0)) window_flags |= ImGuiWindowFlags_MenuBar; const ImGuiViewport* viewport = ImGui::GetMainViewport(); ImGui::SetNextWindowPos(viewport->WorkPos); @@ -491,10 +502,11 @@ namespace SohImGui { ImGui::DockSpace(dockId, ImVec2(0.0f, 0.0f), ImGuiDockNodeFlags_None); if (ImGui::IsKeyPressed(TOGGLE_BTN)) { - Game::Settings.debug.menu_bar = !Game::Settings.debug.menu_bar; + bool menu_bar = CVar_GetS32("gOpenMenuBar", 0); + CVar_SetS32("gOpenMenuBar", !menu_bar); needs_save = true; - GlobalCtx2::GetInstance()->GetWindow()->dwMenubar = Game::Settings.debug.menu_bar; - ShowCursor(Game::Settings.debug.menu_bar, Dialogues::dMenubar); + GlobalCtx2::GetInstance()->GetWindow()->dwMenubar = menu_bar; + ShowCursor(menu_bar, Dialogues::dMenubar); } if (ImGui::BeginMenuBar()) { @@ -563,9 +575,41 @@ namespace SohImGui { ImGui::EndMenu(); } + if (ImGui::BeginMenu("Graphics")) + { + EnhancementSliderInt("Internal Resolution: %dx", "##IMul", "gInternalResolution", 1, 8, ""); + gfx_current_dimensions.internal_mul = CVar_GetS32("gInternalResolution", 1); + EnhancementSliderInt("MSAA: %d", "##IMSAA", "gMSAAValue", 1, 8, ""); + gfx_msaa_level = CVar_GetS32("gMSAAValue", 1); + + EXPERIMENTAL(); + ImGui::Text("Texture Filter (Needs reload)"); + GfxRenderingAPI* gapi = gfx_get_current_rendering_api(); + if (ImGui::BeginCombo("##filters", filters[gapi->get_texture_filter()])) { + for (int fId = 0; fId <= FilteringMode::NONE; fId++) { + if (ImGui::Selectable(filters[fId], fId == gapi->get_texture_filter())) { + INFO("New Filter: %s", filters[fId]); + gapi->set_texture_filter((FilteringMode)fId); + + CVar_SetS32("gTextureFilter", (int) fId); + needs_save = true; + } + + } + ImGui::EndCombo(); + } + ImGui::EndMenu(); + } + + if (ImGui::BeginMenu("Languages")) { + EnhancementRadioButton("English", "gLanguages", 0); + EnhancementRadioButton("German", "gLanguages", 1); + EnhancementRadioButton("French", "gLanguages", 2); + ImGui::EndMenu(); + } + if (ImGui::BeginMenu("Enhancements")) { - ImGui::Text("Gameplay"); ImGui::Separator(); @@ -583,62 +627,22 @@ namespace SohImGui { EnhancementCheckbox("N64 Mode", "gN64Mode"); EnhancementCheckbox("Animated Link in Pause Menu", "gPauseLiveLink"); - EnhancementCheckbox("Disable LOD", "gDisableLOD"); EnhancementCheckbox("Enable 3D Dropped items", "gNewDrops"); EnhancementCheckbox("Dynamic Wallet Icon", "gDynamicWalletIcon"); EnhancementCheckbox("Always show dungeon entrances", "gAlwaysShowDungeonMinimapIcon"); - - if (ImGui::BeginMenu("Fixes")) { - EnhancementCheckbox("Fix L&R Pause menu", "gUniformLR"); - EnhancementCheckbox("Fix Dungeon entrances", "gFixDungeonMinimapIcon"); - ImGui::EndMenu(); - } - ImGui::EndMenu(); - } - if (ImGui::BeginMenu("Developer Tools")) - { - HOOK(ImGui::MenuItem("Stats", nullptr, &Game::Settings.debug.soh)); - HOOK(ImGui::MenuItem("Console", nullptr, &console->opened)); - - ImGui::Text("Debug"); + ImGui::Text("Fixes"); ImGui::Separator(); + EnhancementCheckbox("Fix L&R Pause menu", "gUniformLR"); + EnhancementCheckbox("Fix Dungeon entrances", "gFixDungeonMinimapIcon"); - EnhancementCheckbox("Debug Mode", "gDebugEnabled"); + EXPERIMENTAL(); + + EnhancementCheckbox("Disable LOD", "gDisableLOD"); ImGui::EndMenu(); } - if (ImGui::BeginMenu("Graphics")) - { - HOOK(ImGui::MenuItem("Anti-aliasing", nullptr, &Game::Settings.graphics.show)); - ImGui::EndMenu(); - } - - if (ImGui::BeginMenu("Cheats")) - { - if (ImGui::BeginMenu("Infinite...")) { - EnhancementCheckbox("Money", "gInfiniteMoney"); - EnhancementCheckbox("Health", "gInfiniteHealth"); - EnhancementCheckbox("Ammo", "gInfiniteAmmo"); - EnhancementCheckbox("Magic", "gInfiniteMagic"); - EnhancementCheckbox("Nayru's Love", "gInfiniteNayru"); - - ImGui::EndMenu(); - } - - EnhancementCheckbox("No Clip", "gNoClip"); - EnhancementCheckbox("Climb Everything", "gClimbEverything"); - EnhancementCheckbox("Moon Jump on L", "gMoonJumpOnL"); - EnhancementCheckbox("Super Tunic", "gSuperTunic"); - EnhancementCheckbox("Easy ISG", "gEzISG"); - EnhancementCheckbox("Unrestricted Items", "gNoRestrictItems"); - EnhancementCheckbox("Freeze Time", "gFreezeTime"); - - ImGui::EndMenu(); - - } - if (ImGui::BeginMenu("Cosmetics")) { ImGui::Text("Tunics"); @@ -663,24 +667,48 @@ namespace SohImGui { ImGui::EndMenu(); } - if (CVar_GetS32("gLanguages", 0) == 0) { - SelectedLanguage = 0; - } else if (CVar_GetS32("gLanguages", 0) == 1) { - SelectedLanguage = 1; - } else if (CVar_GetS32("gLanguages", 0) == 2) { - SelectedLanguage = 2; + if (ImGui::BeginMenu("Cheats")) + { + if (ImGui::BeginMenu("Infinite...")) { + EnhancementCheckbox("Money", "gInfiniteMoney"); + EnhancementCheckbox("Health", "gInfiniteHealth"); + EnhancementCheckbox("Ammo", "gInfiniteAmmo"); + EnhancementCheckbox("Magic", "gInfiniteMagic"); + EnhancementCheckbox("Nayru's Love", "gInfiniteNayru"); + + ImGui::EndMenu(); + } + + EnhancementCheckbox("No Clip", "gNoClip"); + EnhancementCheckbox("Climb Everything", "gClimbEverything"); + EnhancementCheckbox("Moon Jump on L", "gMoonJumpOnL"); + EnhancementCheckbox("Super Tunic", "gSuperTunic"); + EnhancementCheckbox("Easy ISG", "gEzISG"); + EnhancementCheckbox("Unrestricted Items", "gNoRestrictItems"); + EnhancementCheckbox("Freeze Time", "gFreezeTime"); + + ImGui::EndMenu(); } - if (ImGui::BeginMenu("Languages")) { - EnhancementRadioButton("English", "gLanguages", 0); - EnhancementRadioButton("German", "gLanguages", 1); - EnhancementRadioButton("French", "gLanguages", 2); + + if (ImGui::BeginMenu("Developer Tools")) + { + EnhancementCheckbox("Stats", "gStatsEnabled"); + EnhancementCheckbox("Console", "gConsoleEnabled"); + console->opened = CVar_GetS32("gConsoleEnabled", 0); + EnhancementCheckbox("OoT Debug Mode", "gDebugEnabled"); + ImGui::EndMenu(); } for (const auto& category : windowCategories) { if (ImGui::BeginMenu(category.first.c_str())) { for (const std::string& name : category.second) { - HOOK(ImGui::MenuItem(name.c_str(), nullptr, &customWindows[name].enabled)); + std::string varName(name); + varName.erase(std::ranges::remove_if(varName, isspace).begin(), varName.end()); + std::string toggleName = "g" + varName + "Enabled"; + + EnhancementCheckbox(name, toggleName); + customWindows[name].enabled = CVar_GetS32(toggleName.c_str(), 0); } ImGui::EndMenu(); } @@ -691,7 +719,7 @@ namespace SohImGui { ImGui::End(); - if (Game::Settings.debug.soh) { + if (CVar_GetS32("gStatsEnabled", 0)) { const float framerate = ImGui::GetIO().Framerate; ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0, 0, 0, 0)); ImGui::Begin("Debug Stats", nullptr, ImGuiWindowFlags_None); @@ -702,17 +730,6 @@ namespace SohImGui { ImGui::PopStyleColor(); } - if (Game::Settings.graphics.show) { - ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0, 0, 0, 0)); - ImGui::Begin("Anti-aliasing settings", nullptr, ImGuiWindowFlags_None); - ImGui::Text("Internal Resolution:"); - ImGui::SliderInt("Mul", reinterpret_cast(&gfx_current_dimensions.internal_mul), 1, 8); - ImGui::Text("MSAA:"); - ImGui::SliderInt("MSAA", reinterpret_cast(&gfx_msaa_level), 1, 8); - ImGui::End(); - ImGui::PopStyleColor(); - } - console->Draw(); for (auto& windowIter : customWindows) { diff --git a/soh/soh/Enhancements/debugconsole.cpp b/soh/soh/Enhancements/debugconsole.cpp index ff69830e7..87252ee92 100644 --- a/soh/soh/Enhancements/debugconsole.cpp +++ b/soh/soh/Enhancements/debugconsole.cpp @@ -122,7 +122,7 @@ static bool RuppeHandler(const std::vector& args) { try { rupeeAmount = std::stoi(args[1]); } - catch (std::invalid_argument const& ex) { + catch (std::invalid_argument const& ex) { ERROR("[SOH] Rupee count must be an integer."); return CMD_FAILED; } @@ -168,13 +168,13 @@ static bool ResetHandler(std::vector args) { ERROR("GlobalCtx == nullptr"); return CMD_FAILED; } - + SET_NEXT_GAMESTATE(&gGlobalCtx->state, TitleSetup_Init, GameState); gGlobalCtx->state.running = false; return CMD_SUCCESS; } -const static std::map ammoItems{ +const static std::map ammoItems{ { "sticks", ITEM_STICK }, { "deku_sticks", ITEM_STICK }, { "nuts", ITEM_NUT }, { "deku_nuts", ITEM_NUT }, { "bombs", ITEM_BOMB }, { "arrows", ITEM_BOW }, @@ -194,7 +194,7 @@ static bool AmmoHandler(const std::vector& args) { try { count = std::stoi(args[2]); - } catch (std::invalid_argument const& ex) { + } catch (std::invalid_argument const& ex) { ERROR("Ammo count must be an integer"); return CMD_FAILED; } @@ -203,7 +203,7 @@ static bool AmmoHandler(const std::vector& args) { ERROR("Ammo count must be positive"); return CMD_FAILED; } - + const auto& it = ammoItems.find(args[1]); if (it == ammoItems.end()) { @@ -213,7 +213,7 @@ static bool AmmoHandler(const std::vector& args) { // I dont think you can do OOB with just this AMMO(it->second) = count; - + //To use a change by uncomment this //Inventory_ChangeAmmo(it->second, count); } @@ -236,7 +236,7 @@ static bool BottleHandler(const std::vector& args) { unsigned int slot; try { slot = std::stoi(args[2]); - } catch (std::invalid_argument const& ex) { + } catch (std::invalid_argument const& ex) { ERROR("[SOH] Bottle slot must be an integer."); return CMD_FAILED; } @@ -275,7 +275,7 @@ static bool ItemHandler(const std::vector& args) { return CMD_FAILED; } - gSaveContext.inventory.items[std::stoi(args[1])] = std::stoi(args[2]); + gSaveContext.inventory.items[std::stoi(args[1])] = std::stoi(args[2]); return CMD_SUCCESS; } @@ -414,8 +414,11 @@ void DebugConsole_Init(void) { { { "slot", ArgumentType::NUMBER }, { "item id", ArgumentType::NUMBER } } }); CMD_REGISTER("entrance", { EntranceHandler, "Sends player to the entered entrance (hex)", { { "entrance", ArgumentType::NUMBER } } }); +} - DebugConsole_LoadCVars(); +template bool is_number(const std::string& s) { + Numeric n; + return ((std::istringstream(s) >> n >> std::ws).eof()); } void DebugConsole_LoadCVars() @@ -424,7 +427,18 @@ void DebugConsole_LoadCVars() const auto lines = File::ReadAllLines("cvars.cfg"); for (const std::string& line : lines) { - SohImGui::console->Dispatch(line); + std::vector cfg = StringHelper::Split(line, " = "); + if (line.empty()) continue; + if (cfg.size() < 2) continue; + if (cfg[1].find("\"") != std::string::npos) { + CVar_SetString(cfg[0].c_str(), const_cast(cfg[1].c_str())); + } + if (is_number(cfg[1])) { + CVar_SetFloat(cfg[0].c_str(), std::stof(cfg[1])); + } + if (is_number(cfg[1])) { + CVar_SetS32(cfg[0].c_str(), std::stoi(cfg[1])); + } } } } @@ -435,11 +449,11 @@ void DebugConsole_SaveCVars() for (const auto &cvar : cvars) { if (cvar.second->type == CVAR_TYPE_STRING) - output += StringHelper::Sprintf("set %s %s\n", cvar.first.c_str(), cvar.second->value.valueStr); + output += StringHelper::Sprintf("%s = \"%s\"\n", cvar.first.c_str(), cvar.second->value.valueStr); else if (cvar.second->type == CVAR_TYPE_S32) - output += StringHelper::Sprintf("set %s %i\n", cvar.first.c_str(), cvar.second->value.valueS32); + output += StringHelper::Sprintf("%s = %i\n", cvar.first.c_str(), cvar.second->value.valueS32); else if (cvar.second->type == CVAR_TYPE_FLOAT) - output += StringHelper::Sprintf("set %s %f\n", cvar.first.c_str(), cvar.second->value.valueFloat); + output += StringHelper::Sprintf("%s = %f\n", cvar.first.c_str(), cvar.second->value.valueFloat); } File::WriteAllText("cvars.cfg", output); diff --git a/soh/soh/Enhancements/debugger/colViewer.cpp b/soh/soh/Enhancements/debugger/colViewer.cpp index ad9d341d4..8cfad1166 100644 --- a/soh/soh/Enhancements/debugger/colViewer.cpp +++ b/soh/soh/Enhancements/debugger/colViewer.cpp @@ -322,7 +322,7 @@ void CreateSphereData() { } void InitColViewer() { - SohImGui::AddWindow("Debug", "Collision Viewer", DrawColViewerWindow); + SohImGui::AddWindow("Developer Tools", "Collision Viewer", DrawColViewerWindow); CreateCylinderData(); CreateSphereData(); diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp index e2ed02705..e7bf0a783 100644 --- a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp +++ b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp @@ -1101,7 +1101,7 @@ void DrawSaveEditor(bool& open) { } void InitSaveEditor() { - SohImGui::AddWindow("Debug", "Save Editor", DrawSaveEditor); + SohImGui::AddWindow("Developer Tools", "Save Editor", DrawSaveEditor); // Load item icons into ImGui for (const auto& entry : itemMapping) { From 09432ee7f44ec1230826ca3ac3cdcf4b5a1f342d Mon Sep 17 00:00:00 2001 From: Random <28494085+Random06457@users.noreply.github.com> Date: Thu, 12 May 2022 02:18:24 +0900 Subject: [PATCH 115/146] Linux/GCC Support (#28) * Initial Linux/GCC support commit * Add instructins for linux in the README * apply suggestions by @Erotemic and @Emill * Fix python 3.10 symlink line * Fix func_80041E80 type mismatch (#3) Type mismatch functions.h:664 * Makefile: clean OTRExporter/libultraship/ZAPDTR with distclean and fix CXX_FILES * Makefile: find C/CXX_FILES automatically * Makefile: remove ugly conditions in find commands * cleanup _MSC_VER usage * fix Windows build * cleanup extraction scripts * fix Windows build * Fix Windows path separator issue * fix rumble support for linux * use glew-cmake in dockerfile * add pulseaudio backend * fix ZAPDTR linkage * Check for "soh.elf" in directory (#6) hide second button if `soh.exe` or `soh.elf` is present * Fix hardcoded segment addresses (#5) * fix condition * hack lus -> soh dep for ZAPDTR Co-authored-by: sholdee <102821812+sholdee@users.noreply.github.com> Co-authored-by: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com> Co-authored-by: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> --- .gitignore | 7 +- BUILDING.md | 35 +- Dockerfile | 38 + OTRExporter/OTRExporter/AnimationExporter.cpp | 4 +- OTRExporter/OTRExporter/ArrayExporter.cpp | 8 +- OTRExporter/OTRExporter/CutsceneExporter.cpp | 8 +- .../OTRExporter/DisplayListExporter.cpp | 58 +- OTRExporter/OTRExporter/Main.cpp | 14 +- OTRExporter/OTRExporter/Makefile | 14 +- OTRExporter/OTRExporter/PathExporter.cpp | 4 +- OTRExporter/OTRExporter/RoomExporter.cpp | 34 +- OTRExporter/OTRExporter/TextExporter.cpp | 4 +- OTRExporter/OTRExporter/VersionInfo.cpp | 36 +- OTRExporter/extract_assets.py | 135 +- OTRExporter/extract_assets_old.py | 125 -- OTRExporter/extract_baserom.py | 53 + OTRExporter/extract_baserom_debug.py | 1608 ----------------- OTRExporter/extract_baserom_gc.py | 1586 ---------------- OTRExporter/rom_chooser.py | 37 + OTRExporter/rom_info.py | 87 + OTRGui/src/game/game.cpp | 6 +- README.md | 2 +- ZAPDTR/ExporterTest/CollisionExporter.cpp | 2 +- ZAPDTR/ExporterTest/CollisionExporter.h | 2 +- ZAPDTR/ExporterTest/RoomExporter.cpp | 2 +- ZAPDTR/ExporterTest/RoomExporter.h | 2 +- ZAPDTR/ExporterTest/TextureExporter.cpp | 2 +- ZAPDTR/ExporterTest/TextureExporter.h | 2 +- ZAPDTR/Makefile | 7 +- ZAPDTR/ZAPD/Main.cpp | 34 +- ZAPDTR/ZAPD/OutputFormatter.cpp | 2 +- ZAPDTR/ZAPD/OutputFormatter.h | 2 +- ZAPDTR/ZAPD/ZDisplayList.cpp | 118 ++ ZAPDTR/ZAPD/ZDisplayList.h | 116 -- ZAPDTR/ZAPD/ZLimb.h | 14 +- ZAPDTR/ZAPDUtils/Utils/BitConverter.h | 1 + ZAPDTR/ZAPDUtils/Utils/Directory.h | 2 +- ZAPDTR/ZAPDUtils/Utils/StringHelper.cpp | 6 +- libultraship/.gitignore | 4 +- libultraship/Makefile | 84 +- libultraship/libultraship/Animation.cpp | 2 +- libultraship/libultraship/Archive.cpp | 50 +- libultraship/libultraship/Array.cpp | 2 + libultraship/libultraship/ConfigFile.h | 2 +- libultraship/libultraship/Cvar.cpp | 2 +- .../Factories/OTRResourceLoader.cpp | 71 - libultraship/libultraship/GameSettings.cpp | 3 +- libultraship/libultraship/GlobalCtx2.cpp | 6 +- .../Lib/Fast3D/U64/PR/ultra64/gbi.h | 10 +- .../Lib/Fast3D/U64/PR/ultra64/mbi.h | 1 + .../Lib/Fast3D/gfx_direct3d11.cpp | 6 +- .../libultraship/Lib/Fast3D/gfx_glx.cpp | 79 +- .../libultraship/Lib/Fast3D/gfx_glx.h | 2 +- .../libultraship/Lib/Fast3D/gfx_opengl.cpp | 5 +- .../libultraship/Lib/Fast3D/gfx_pc.cpp | 38 +- libultraship/libultraship/Lib/Fast3D/gfx_pc.h | 6 +- .../libultraship/Lib/Fast3D/gfx_sdl2.cpp | 12 +- libultraship/libultraship/Lib/StrHash64.h | 12 +- .../include/spdlog/sinks/sohconsole_sink.h | 6 +- libultraship/libultraship/Model.cpp | 12 +- .../libultraship/PulseAudioPlayer.cpp | 173 ++ libultraship/libultraship/PulseAudioPlayer.h | 26 + libultraship/libultraship/Resource.cpp | 12 +- libultraship/libultraship/Resource.h | 10 +- libultraship/libultraship/ResourceMgr.cpp | 64 +- libultraship/libultraship/ResourceMgr.h | 4 +- libultraship/libultraship/SDLController.cpp | 16 +- libultraship/libultraship/SDLController.h | 9 +- libultraship/libultraship/Scene.cpp | 12 +- libultraship/libultraship/SkeletonLimb.cpp | 2 +- libultraship/libultraship/SohConsole.cpp | 14 +- libultraship/libultraship/SohConsole.h | 10 +- libultraship/libultraship/SohHooks.cpp | 2 +- libultraship/libultraship/SohHooks.h | 1 + libultraship/libultraship/SohImGuiImpl.cpp | 46 +- libultraship/libultraship/Utils.cpp | 7 +- .../libultraship/WasapiAudioPlayer.cpp | 4 +- libultraship/libultraship/WasapiAudioPlayer.h | 4 + libultraship/libultraship/Window.cpp | 14 +- libultraship/libultraship/WindowShim.cpp | 4 +- libultraship/libultraship/mixer.c | 5 +- libultraship/libultraship/stox.cpp | 1 + soh/.gitignore | 11 +- soh/Makefile | 158 ++ soh/include/alloca.h | 2 +- soh/include/functions.h | 2 +- soh/include/global.h | 4 +- soh/include/macros.h | 10 +- soh/include/ultra64.h | 3 + soh/soh.vcxproj | 1 + soh/soh/Enhancements/debugconsole.cpp | 2 +- soh/soh/Enhancements/debugger/colViewer.cpp | 1 + soh/soh/Enhancements/gameconsole.h | 2 +- soh/soh/OTRGlobals.cpp | 67 +- soh/soh/stubs.c | 6 +- soh/soh/z_play_otr.cpp | 8 +- soh/soh/z_scene_otr.cpp | 18 +- soh/src/code/audio_effects.c | 6 +- soh/src/code/audio_load.c | 20 +- soh/src/code/audio_seqplayer.c | 4 +- soh/src/code/audio_synthesis.c | 4 +- soh/src/code/padmgr.c | 2 + soh/src/code/z_actor.c | 10 +- soh/src/code/z_bgcheck.c | 2 +- soh/src/code/z_camera.c | 2 +- .../{z_camera_data.c => z_camera_data.inc} | 0 soh/src/code/z_demo.c | 2 +- soh/src/code/z_fbdemo_circle.c | 4 +- soh/src/code/z_player_lib.c | 8 +- soh/src/code/z_skelanime.c | 4 +- soh/src/code/z_vismono.c | 2 +- .../ovl_Boss_Ganondrof/z_boss_ganondrof.c | 8 +- .../ovl_file_choose/z_file_choose.c | 4 +- .../overlays/gamestates/ovl_select/z_select.c | 4 +- .../overlays/gamestates/ovl_title/z_title.c | 2 +- .../ovl_kaleido_scope/z_kaleido_equipment.c | 2 +- 116 files changed, 1403 insertions(+), 4054 deletions(-) create mode 100644 Dockerfile delete mode 100644 OTRExporter/extract_assets_old.py create mode 100644 OTRExporter/extract_baserom.py delete mode 100644 OTRExporter/extract_baserom_debug.py delete mode 100644 OTRExporter/extract_baserom_gc.py create mode 100644 OTRExporter/rom_chooser.py create mode 100644 OTRExporter/rom_info.py delete mode 100644 libultraship/libultraship/Factories/OTRResourceLoader.cpp create mode 100644 libultraship/libultraship/PulseAudioPlayer.cpp create mode 100644 libultraship/libultraship/PulseAudioPlayer.h create mode 100644 soh/Makefile rename soh/src/code/{z_camera_data.c => z_camera_data.inc} (100%) diff --git a/.gitignore b/.gitignore index fafae443d..03468a05c 100644 --- a/.gitignore +++ b/.gitignore @@ -279,7 +279,7 @@ ClientBin/ *.publishsettings orleans.codegen.cs -# Including strong name files can present a security risk +# Including strong name files can present a security risk # (https://github.com/github/gitignore/pull/2483#issue-259490424) #*.snk @@ -375,7 +375,7 @@ __pycache__/ # OpenCover UI analysis results OpenCover/ -# Azure Stream Analytics local run output +# Azure Stream Analytics local run output ASALocalRun/ # MSBuild Binary and Structured Log @@ -384,7 +384,7 @@ ASALocalRun/ # NVidia Nsight GPU debugger configuration file *.nvuser -# MFractors (Xamarin productivity tool) working folder +# MFractors (Xamarin productivity tool) working folder .mfractor/ *.out @@ -395,6 +395,7 @@ ExporterTest/ExporterTest.a ZAPDUtils/ZAPDUtils.a .vscode/ build/ +external/ ZAPDUtils/build/ ZAPD/BuildInfo.h diff --git a/BUILDING.md b/BUILDING.md index 82c26bff4..d37d7c0d6 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -1,5 +1,7 @@ # Building Ship of Harkinian +## Windows + 1. Install [Python](https://www.python.org/ftp/python/3.10.2/python-3.10.2-amd64.exe) 2. Install [Visual Studio 2022 Community Edition](https://visualstudio.microsoft.com/vs/community/) 2b. In the Visual Studio Installer, install `MSVC v142 - VS 2019 C++`. @@ -7,7 +9,7 @@ 5. Place one or more [compatible](#compatible-roms) roms in the `OTRExporter` directory with namings of your choice. 6. Run `OTRExporter/OTRExporter.sln`. 7. Switch the solution to `Release x64`. - 8. Build the solution. + 8. Build the solution. 9. Launching `OTRExporter/extract_assets.py` will generate an `oot.otr` archive file in `OTRExporter/oot.otr`. 10. Run `soh/soh.sln` 11. Switch the solution to `Release x86`. @@ -15,7 +17,36 @@ 13. Copy the `OTRExporter/oot.otr` archive file to `soh/Release`. 14. Launch `soh.exe`. -## Compatible Roms +## Linux + +```bash +# Clone the repo +git clone git@github.com:HarbourMasters/ShipWright.git +cd ShipWright +# Copy the baserom to the OTRExporter folder +cp OTRExporter +# Build the docker image +sudo docker build . -t soh +# Run the docker image with the working directory mounted to /soh +sudo docker run --rm -it -v $(pwd):/soh soh /bin/bash +``` +Inside the Docker container: +```bash +# Clone and build StormLib +git clone https://github.com/ladislav-zezula/StormLib external/StormLib +cmake -B external/StormLib/build -S external/StormLib +cmake --build external/StormLib/build +cp external/StormLib/build/libstorm.a external +cp /usr/local/lib/libGLEW.a external + +cd soh +# Extract the assets/Compile the exporter/Run the exporter +make setup -j$(nproc) +# Compile the code +make -j $(nproc) +``` + +# Compatible Roms ``` OOT_PAL_GC checksum 0x09465AC3 OOT_PAL_GC_DBG1 checksum 0x871E1C92 (debug non-master quest) diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..e981cf573 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,38 @@ + + +FROM ubuntu:21.04 as build + +ENV LANG C.UTF-8 +ARG DEBIAN_FRONTEND=noninteractive + +RUN dpkg --add-architecture i386 && \ + apt-get update && \ + apt-get upgrade -y && \ + apt-get install -y \ + binutils:i386 \ + gcc-10:i386 \ + g++-10:i386 \ + python3.10 \ + python \ + make \ + cmake \ + git \ + lld \ + libsdl2-dev:i386 \ + zlib1g-dev:i386 \ + libbz2-dev:i386 \ + libpng-dev:i386 \ + libgles2-mesa-dev && \ + ln -sf /usr/bin/python3.10 /usr/bin/python3 && \ + ln -s /usr/bin/gcc-10 /usr/bin/gcc && \ + ln -s /usr/bin/gcc-10 /usr/bin/cc && \ + ln -s /usr/bin/g++-10 /usr/bin/g++ && \ + ln -s /usr/bin/g++-10 /usr/bin/c++ + +RUN git clone https://github.com/Perlmint/glew-cmake.git && \ + cmake glew-cmake && \ + make -j$(nproc) && \ + make install ARCH64=false + +RUN mkdir /soh +WORKDIR /soh diff --git a/OTRExporter/OTRExporter/AnimationExporter.cpp b/OTRExporter/OTRExporter/AnimationExporter.cpp index 4f031b8a8..74fa8a7e6 100644 --- a/OTRExporter/OTRExporter/AnimationExporter.cpp +++ b/OTRExporter/OTRExporter/AnimationExporter.cpp @@ -49,12 +49,12 @@ void OTRExporter_Animation::Save(ZResource* res, const fs::path& outPath, Binary writer->Write((uint32_t)normalAnim->rotationValues.size()); - for (int i = 0; i < normalAnim->rotationValues.size(); i++) + for (size_t i = 0; i < normalAnim->rotationValues.size(); i++) writer->Write(normalAnim->rotationValues[i]); writer->Write((uint32_t)normalAnim->rotationIndices.size()); - for (int i = 0; i < normalAnim->rotationIndices.size(); i++) + for (size_t i = 0; i < normalAnim->rotationIndices.size(); i++) { writer->Write(normalAnim->rotationIndices[i].x); writer->Write(normalAnim->rotationIndices[i].y); diff --git a/OTRExporter/OTRExporter/ArrayExporter.cpp b/OTRExporter/OTRExporter/ArrayExporter.cpp index 2ddfd7b10..f83bfd87d 100644 --- a/OTRExporter/OTRExporter/ArrayExporter.cpp +++ b/OTRExporter/OTRExporter/ArrayExporter.cpp @@ -10,7 +10,7 @@ void OTRExporter_Array::Save(ZResource* res, const fs::path& outPath, BinaryWrit writer->Write((uint32_t)arr->resList[0]->GetResourceType()); writer->Write((uint32_t)arr->arrayCnt); - for (int i = 0; i < arr->arrayCnt; i++) + for (size_t i = 0; i < arr->arrayCnt; i++) { if (arr->resList[i]->GetResourceType() == ZResourceType::Vertex) { @@ -32,7 +32,7 @@ void OTRExporter_Array::Save(ZResource* res, const fs::path& outPath, BinaryWrit writer->Write((uint32_t)vec->scalarType); writer->Write((uint32_t)vec->dimensions); - for (int k = 0; k < vec->dimensions; k++) + for (size_t k = 0; k < vec->dimensions; k++) { // OTRTODO: Duplicate code here. Cleanup at a later date... switch (vec->scalarType) @@ -62,6 +62,8 @@ void OTRExporter_Array::Save(ZResource* res, const fs::path& outPath, BinaryWrit writer->Write(vec->scalars[k].scalarData.u64); break; // OTRTODO: ADD OTHER TYPES + default: + break; } } } @@ -98,6 +100,8 @@ void OTRExporter_Array::Save(ZResource* res, const fs::path& outPath, BinaryWrit writer->Write(scal->scalarData.u64); break; // OTRTODO: ADD OTHER TYPES + default: + break; } } } diff --git a/OTRExporter/OTRExporter/CutsceneExporter.cpp b/OTRExporter/OTRExporter/CutsceneExporter.cpp index 7cbf7f175..b52d73d8b 100644 --- a/OTRExporter/OTRExporter/CutsceneExporter.cpp +++ b/OTRExporter/OTRExporter/CutsceneExporter.cpp @@ -29,7 +29,7 @@ void OTRExporter_Cutscene::Save(ZResource* res, const fs::path& outPath, BinaryW for (auto& e : ((CutsceneCommandSetCameraPos*)cs->commands[i])->entries) { writer->Write(CMD_BBH(e->continueFlag, e->cameraRoll, e->nextPointFrame)); - writer->Write(CMD_F(e->viewAngle)); + writer->Write(e->viewAngle); writer->Write(CMD_HH(e->posX, e->posY)); writer->Write(CMD_HH(e->posZ, e->unused)); } @@ -46,7 +46,7 @@ void OTRExporter_Cutscene::Save(ZResource* res, const fs::path& outPath, BinaryW for (auto& e : ((CutsceneCommandSetCameraPos*)cs->commands[i])->entries) { writer->Write(CMD_BBH(e->continueFlag, e->cameraRoll, e->nextPointFrame)); - writer->Write(CMD_F(e->viewAngle)); + writer->Write(e->viewAngle); writer->Write(CMD_HH(e->posX, e->posY)); writer->Write(CMD_HH(e->posZ, e->unused)); } @@ -105,7 +105,7 @@ void OTRExporter_Cutscene::Save(ZResource* res, const fs::path& outPath, BinaryW for (auto& e : ((CutsceneCommandSetCameraPos*)cs->commands[i])->entries) { writer->Write(CMD_BBH(e->continueFlag, e->cameraRoll, e->nextPointFrame)); - writer->Write(CMD_F(e->viewAngle)); + writer->Write(e->viewAngle); writer->Write(CMD_HH(e->posX, e->posY)); writer->Write(CMD_HH(e->posZ, e->unused)); } @@ -122,7 +122,7 @@ void OTRExporter_Cutscene::Save(ZResource* res, const fs::path& outPath, BinaryW for (auto& e : ((CutsceneCommandSetCameraPos*)cs->commands[i])->entries) { writer->Write(CMD_BBH(e->continueFlag, e->cameraRoll, e->nextPointFrame)); - writer->Write(CMD_F(e->viewAngle)); + writer->Write(e->viewAngle); writer->Write(CMD_HH(e->posX, e->posY)); writer->Write(CMD_HH(e->posZ, e->unused)); } diff --git a/OTRExporter/OTRExporter/DisplayListExporter.cpp b/OTRExporter/OTRExporter/DisplayListExporter.cpp index 1fe7cb44a..d03a06333 100644 --- a/OTRExporter/OTRExporter/DisplayListExporter.cpp +++ b/OTRExporter/OTRExporter/DisplayListExporter.cpp @@ -29,20 +29,6 @@ Ab1, Ad1)) \ } -typedef int32_t Mtx_t[4][4]; - -typedef union Mtx -{ - //_Alignas(8) - Mtx_t m; - int32_t l[16]; - struct - { - int16_t i[16]; - uint16_t f[16]; - }; -} Mtx; - #define gsSPBranchLessZraw2(dl, vtx, zval) \ { _SHIFTL(G_BRANCH_Z,24,8)|_SHIFTL((vtx)*5,12,12)|_SHIFTL((vtx)*2,0,12),\ (unsigned int)(zval), } @@ -71,7 +57,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina // DEBUG: Write in a marker Declaration* dbgDecl = dList->parent->GetDeclaration(dList->GetRawDataIndex()); - std::string dbgName = StringHelper::Sprintf("%s\\%s", GetParentFolderName(res).c_str(), dbgDecl->varName.c_str()); + std::string dbgName = StringHelper::Sprintf("%s/%s", GetParentFolderName(res).c_str(), dbgDecl->varName.c_str()); uint64_t hash = CRC64(dbgName.c_str()); writer->Write((uint32_t)(G_MARKER << 24)); writer->Write((uint32_t)0xBEEFBEEF); @@ -81,7 +67,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina auto dlStart = std::chrono::steady_clock::now(); //for (auto data : dList->instructions) - for (int dataIdx = 0; dataIdx < dList->instructions.size(); dataIdx++) + for (size_t dataIdx = 0; dataIdx < dList->instructions.size(); dataIdx++) { auto data = dList->instructions[dataIdx]; uint32_t word0 = 0; @@ -216,7 +202,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina pp ^= G_MTX_PUSH; - mm = (mm & 0x0FFFFFFF) + 0xF0000000; + mm = (mm & 0x0FFFFFFF) + 1; Gfx value = gsSPMatrix(mm, pp); word0 = value.words.w0; @@ -243,7 +229,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina if (mtxDecl != nullptr) { - std::string vName = StringHelper::Sprintf("%s\\%s", (GetParentFolderName(res).c_str()), mtxDecl->varName.c_str()); + std::string vName = StringHelper::Sprintf("%s/%s", (GetParentFolderName(res).c_str()), mtxDecl->varName.c_str()); uint64_t hash = CRC64(vName.c_str()); @@ -347,7 +333,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina if (dListDecl != nullptr) { - std::string vName = StringHelper::Sprintf("%s\\%s", (GetParentFolderName(res).c_str()), dListDecl->varName.c_str()); + std::string vName = StringHelper::Sprintf("%s/%s", (GetParentFolderName(res).c_str()), dListDecl->varName.c_str()); uint64_t hash = CRC64(vName.c_str()); @@ -370,7 +356,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina //std::string fName = StringHelper::Sprintf("%s\\%s", GetParentFolderName(res).c_str(), dListDecl2->varName.c_str()); std::string fName = OTRExporter_DisplayList::GetPathToRes(res, dListDecl2->varName.c_str()); - if (files.find(fName) == files.end() && !File::Exists("Extract\\" + fName)) + if (files.find(fName) == files.end() && !File::Exists("Extract/" + fName)) { MemoryStream* dlStream = new MemoryStream(); BinaryWriter dlWriter = BinaryWriter(dlStream); @@ -383,7 +369,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina #endif if (Globals::Instance->fileMode != ZFileMode::ExtractDirectory) - File::WriteAllBytes("Extract\\" + fName, dlStream->ToVector()); + File::WriteAllBytes("Extract/" + fName, dlStream->ToVector()); else files[fName] = dlStream->ToVector(); @@ -411,7 +397,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina Gfx value; - u32 dListVal = (data & 0x0FFFFFFF) + 0xF0000000; + u32 dListVal = (data & 0x0FFFFFFF) + 1; if (pp != 0) value = gsSPBranchList(dListVal); @@ -444,7 +430,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina if (dListDecl != nullptr) { - std::string vName = StringHelper::Sprintf("%s\\%s", (GetParentFolderName(res).c_str()), dListDecl->varName.c_str()); + std::string vName = StringHelper::Sprintf("%s/%s", (GetParentFolderName(res).c_str()), dListDecl->varName.c_str()); uint64_t hash = CRC64(vName.c_str()); @@ -467,7 +453,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina //std::string fName = StringHelper::Sprintf("%s\\%s", GetParentFolderName(res).c_str(), dListDecl2->varName.c_str()); std::string fName = OTRExporter_DisplayList::GetPathToRes(res, dListDecl2->varName.c_str()); - if (files.find(fName) == files.end() && !File::Exists("Extract\\" + fName)) + if (files.find(fName) == files.end() && !File::Exists("Extract/" + fName)) { MemoryStream* dlStream = new MemoryStream(); BinaryWriter dlWriter = BinaryWriter(dlStream); @@ -475,7 +461,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina Save(dList->otherDLists[i], outPath, &dlWriter); if (Globals::Instance->fileMode != ZFileMode::ExtractDirectory) - File::WriteAllBytes("Extract\\" + fName, dlStream->ToVector()); + File::WriteAllBytes("Extract/" + fName, dlStream->ToVector()); else files[fName] = dlStream->ToVector(); } @@ -533,7 +519,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina int32_t bb = ((data & 0x0000FF0000000000ULL) >> 40) / 2; int32_t cc = ((data & 0x000000FF00000000ULL) >> 32) / 2; int32_t dd = ((data & 0x000000000000FFULL)) / 2; - + Gfx test = gsSP1Quadrangle(aa, bb, cc, dd, 0); word0 = test.words.w0; word1 = test.words.w1; @@ -689,7 +675,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina uint32_t fmt = (__ & 0xE0) >> 5; uint32_t siz = (__ & 0x18) >> 3; - Gfx value = gsDPSetTextureImage(fmt, siz, www + 1, (seg & 0x0FFFFFFF) + 0xF0000000); + Gfx value = gsDPSetTextureImage(fmt, siz, www + 1, (seg & 0x0FFFFFFF) + 1); word0 = value.words.w0; word1 = value.words.w1; @@ -721,7 +707,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina ZFile* assocFile = Globals::Instance->GetSegment(GETSEGNUM(seg), res->parent->workerID); std::string assocFileName = assocFile->GetName(); std::string fName = ""; - + if (GETSEGNUM(seg) == SEGMENT_SCENE || GETSEGNUM(seg) == SEGMENT_ROOM) fName = GetPathToRes(res, texName.c_str()); else @@ -753,7 +739,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina Gfx value = gsSPVertex(data & 0xFFFFFFFF, nn, ((aa >> 1) - nn)); word0 = value.words.w0; - word1 = value.words.w1 | 0xF0000000; + word1 = value.words.w1 | 1; } else { @@ -790,7 +776,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina word0 = hash >> 32; word1 = hash & 0xFFFFFFFF; - if (files.find(fName) == files.end() && !File::Exists("Extract\\" + fName)) + if (files.find(fName) == files.end() && !File::Exists("Extract/" + fName)) { // Write vertices to file MemoryStream* vtxStream = new MemoryStream(); @@ -800,7 +786,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina auto split = StringHelper::Split(vtxDecl->text, "\n"); - for (int i = 0; i < split.size(); i++) + for (size_t i = 0; i < split.size(); i++) { std::string line = split[i]; @@ -842,7 +828,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina } if (Globals::Instance->fileMode != ZFileMode::ExtractDirectory) - File::WriteAllBytes("Extract\\" + fName, vtxStream->ToVector()); + File::WriteAllBytes("Extract/" + fName, vtxStream->ToVector()); else files[fName] = vtxStream->ToVector(); @@ -858,7 +844,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina } break; } - + writer->Write(word0); writer->Write(word1); } @@ -872,7 +858,7 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina std::string OTRExporter_DisplayList::GetPathToRes(ZResource* res, std::string varName) { std::string prefix = GetPrefix(res); - std::string fName = StringHelper::Sprintf("%s\\%s", GetParentFolderName(res).c_str(), varName.c_str()); + std::string fName = StringHelper::Sprintf("%s/%s", GetParentFolderName(res).c_str(), varName.c_str()); return fName; } @@ -886,7 +872,7 @@ std::string OTRExporter_DisplayList::GetParentFolderName(ZResource* res) { auto split = StringHelper::Split(oName, "_"); oName = ""; - for (int i = 0; i < split.size() - 1; i++) + for (size_t i = 0; i < split.size() - 1; i++) oName += split[i] + "_"; oName += "scene"; @@ -897,7 +883,7 @@ std::string OTRExporter_DisplayList::GetParentFolderName(ZResource* res) } if (prefix != "") - oName = prefix + "\\" + oName; + oName = prefix + "/" + oName; return oName; } diff --git a/OTRExporter/OTRExporter/Main.cpp b/OTRExporter/OTRExporter/Main.cpp index a58f94ae3..2ed9cb427 100644 --- a/OTRExporter/OTRExporter/Main.cpp +++ b/OTRExporter/OTRExporter/Main.cpp @@ -52,7 +52,7 @@ static void ExporterParseFileMode(const std::string& buildMode, ZFileMode& fileM for (auto item : lst) { auto fileData = File::ReadAllBytes(item); - otrArchive->AddFile(StringHelper::Split(item, "Extract\\")[1], (uintptr_t)fileData.data(), fileData.size()); + otrArchive->AddFile(StringHelper::Split(item, "Extract/")[1], (uintptr_t)fileData.data(), fileData.size()); } } } @@ -76,7 +76,7 @@ static void ExporterProgramEnd() for (auto item : lst) { auto fileData = File::ReadAllBytes(item); - otrArchive->AddFile(StringHelper::Split(item, "Extract\\")[1], (uintptr_t)fileData.data(), fileData.size()); + otrArchive->AddFile(StringHelper::Split(item, "Extract/")[1], (uintptr_t)fileData.data(), fileData.size()); } otrArchive->AddFile("Audiobank", (uintptr_t)Globals::Instance->GetBaseromFile("Audiobank").data(), Globals::Instance->GetBaseromFile("Audiobank").size()); @@ -117,7 +117,7 @@ static void ExporterFileBegin(ZFile* file) static void ExporterFileEnd(ZFile* file) { - int bp = 0; + // delete fileWriter; } static void ExporterResourceEnd(ZResource* res, BinaryWriter& writer) @@ -140,7 +140,7 @@ static void ExporterResourceEnd(ZResource* res, BinaryWriter& writer) { auto split = StringHelper::Split(oName, "_"); oName = ""; - for (int i = 0; i < split.size() - 1; i++) + for (size_t i = 0; i < split.size() - 1; i++) oName += split[i] + "_"; oName += "scene"; @@ -153,14 +153,14 @@ static void ExporterResourceEnd(ZResource* res, BinaryWriter& writer) std::string fName = ""; if (prefix != "") - fName = StringHelper::Sprintf("%s\\%s\\%s", prefix.c_str(), oName.c_str(), rName.c_str()); + fName = StringHelper::Sprintf("%s/%s/%s", prefix.c_str(), oName.c_str(), rName.c_str()); else - fName = StringHelper::Sprintf("%s\\%s", oName.c_str(), rName.c_str()); + fName = StringHelper::Sprintf("%s/%s", oName.c_str(), rName.c_str()); if (Globals::Instance->fileMode == ZFileMode::ExtractDirectory) files[fName] = strem->ToVector(); else - File::WriteAllBytes("Extract\\" + fName, strem->ToVector()); + File::WriteAllBytes("Extract/" + fName, strem->ToVector()); } auto end = std::chrono::steady_clock::now(); diff --git a/OTRExporter/OTRExporter/Makefile b/OTRExporter/OTRExporter/Makefile index 1c4e61bf2..954b183a3 100644 --- a/OTRExporter/OTRExporter/Makefile +++ b/OTRExporter/OTRExporter/Makefile @@ -39,13 +39,13 @@ D_FILES := $(O_FILES:%.o=%.d) LIB := OTRExporter.a INC_DIRS := $(addprefix -I, \ - ../../ZAPD/ZAPD \ - ../../ZAPD/lib/tinyxml2 \ - ../../ZAPD/lib/libgfxd \ - ../../ZAPD/ZAPDUtils \ - ../../OtrLib/otrlib \ - ../../OtrLib/otrlib/Lib/spdlog/include \ - ../../OtrLib/otrlib/Lib/Fast3D/U64 \ + ../../ZAPDTR/ZAPD \ + ../../ZAPDTR/lib/tinyxml2 \ + ../../ZAPDTR/lib/libgfxd \ + ../../ZAPDTR/ZAPDUtils \ + ../../libultraship/libultraship \ + ../../libultraship/libultraship/Lib/spdlog/include \ + ../../libultraship/libultraship/Lib/Fast3D/U64 \ ) # create build directories diff --git a/OTRExporter/OTRExporter/PathExporter.cpp b/OTRExporter/OTRExporter/PathExporter.cpp index de15789ab..75f6b723f 100644 --- a/OTRExporter/OTRExporter/PathExporter.cpp +++ b/OTRExporter/OTRExporter/PathExporter.cpp @@ -9,11 +9,11 @@ void OTRExporter_Path::Save(ZResource* res, const fs::path& outPath, BinaryWrite writer->Write((uint32_t)path->pathways.size()); - for (int k = 0; k < path->pathways.size(); k++) + for (size_t k = 0; k < path->pathways.size(); k++) { writer->Write((uint32_t)path->pathways[k].points.size()); - for (int i = 0; i < path->pathways[k].points.size(); i++) + for (size_t i = 0; i < path->pathways[k].points.size(); i++) { writer->Write(path->pathways[k].points[i].scalars[0].scalarData.s16); writer->Write(path->pathways[k].points[i].scalars[1].scalarData.s16); diff --git a/OTRExporter/OTRExporter/RoomExporter.cpp b/OTRExporter/OTRExporter/RoomExporter.cpp index 5b7ce4323..9a5704bbc 100644 --- a/OTRExporter/OTRExporter/RoomExporter.cpp +++ b/OTRExporter/OTRExporter/RoomExporter.cpp @@ -46,7 +46,7 @@ void OTRExporter_Room::Save(ZResource* res, const fs::path& outPath, BinaryWrite for (size_t i = 0; i < room->commands.size(); i++) { ZRoomCommand* cmd = room->commands[i]; - + writer->Write((uint32_t)cmd->cmdID); switch (cmd->cmdID) @@ -172,7 +172,7 @@ void OTRExporter_Room::Save(ZResource* res, const fs::path& outPath, BinaryWrite writer->Write((uint32_t)cmdCsCam->points.size()); - for (int i = 0; i < cmdCsCam->points.size(); i++) + for (size_t i = 0; i < cmdCsCam->points.size(); i++) { writer->Write(cmdCsCam->points[i].scalars[0].scalarData.s16); writer->Write(cmdCsCam->points[i].scalars[1].scalarData.s16); @@ -183,7 +183,7 @@ void OTRExporter_Room::Save(ZResource* res, const fs::path& outPath, BinaryWrite case RoomCommand::SetMesh: { SetMesh* cmdMesh = (SetMesh*)cmd; - + writer->Write((uint8_t)cmdMesh->data); // 0x01 writer->Write(cmdMesh->meshHeaderType); @@ -207,12 +207,12 @@ void OTRExporter_Room::Save(ZResource* res, const fs::path& outPath, BinaryWrite Declaration* dListDeclXlu = poly->parent->GetDeclaration(GETSEGOFFSET(test->xlu)); if (test->opa != 0) - writer->Write(StringHelper::Sprintf("%s\\%s", OTRExporter_DisplayList::GetParentFolderName(res).c_str(), dListDeclOpa->varName.c_str())); + writer->Write(StringHelper::Sprintf("%s/%s", OTRExporter_DisplayList::GetParentFolderName(res).c_str(), dListDeclOpa->varName.c_str())); else writer->Write(""); - + if (test->xlu != 0) - writer->Write(StringHelper::Sprintf("%s\\%s", OTRExporter_DisplayList::GetParentFolderName(res).c_str(), dListDeclXlu->varName.c_str())); + writer->Write(StringHelper::Sprintf("%s/%s", OTRExporter_DisplayList::GetParentFolderName(res).c_str(), dListDeclXlu->varName.c_str())); else writer->Write(""); @@ -228,7 +228,7 @@ void OTRExporter_Room::Save(ZResource* res, const fs::path& outPath, BinaryWrite Declaration* bgDecl = poly->parent->GetDeclarationRanged(GETSEGOFFSET(poly->multiList[i].source)); writer->Write(OTRExporter_DisplayList::GetPathToRes(poly->multiList[i].sourceBackground, bgDecl->varName)); - + writer->Write(poly->multiList[i].unk_0C); writer->Write(poly->multiList[i].tlut); writer->Write(poly->multiList[i].width); @@ -338,7 +338,7 @@ void OTRExporter_Room::Save(ZResource* res, const fs::path& outPath, BinaryWrite for (size_t i = 0;i < cmdRoom->romfile->numRooms; i++) { - //std::string roomName = StringHelper::Sprintf("%s\\%s_room_%i", (StringHelper::Split(room->GetName(), "_")[0] + "_scene").c_str(), StringHelper::Split(room->GetName(), "_scene")[0].c_str(), i); + //std::string roomName = StringHelper::Sprintf("%s/%s_room_%i", (StringHelper::Split(room->GetName(), "_")[0] + "_scene").c_str(), StringHelper::Split(room->GetName(), "_scene")[0].c_str(), i); std::string roomName = OTRExporter_DisplayList::GetPathToRes(room, StringHelper::Sprintf("%s_room_%i", StringHelper::Split(room->GetName(), "_scene")[0].c_str(), i)); writer->Write(roomName); writer->Write(cmdRoom->romfile->rooms[i].virtualAddressStart); @@ -383,7 +383,7 @@ void OTRExporter_Room::Save(ZResource* res, const fs::path& outPath, BinaryWrite uint32_t baseStreamEnd = writer->GetStream().get()->GetLength(); writer->Write((uint32_t)cmdStartPos->actors.size()); // 0x01 - + for (const ActorSpawnEntry& entry : cmdStartPos->actors) { writer->Write(entry.actorNum); @@ -441,7 +441,7 @@ void OTRExporter_Room::Save(ZResource* res, const fs::path& outPath, BinaryWrite case RoomCommand::SetCutscenes: { SetCutscenes* cmdSetCutscenes = (SetCutscenes*)cmd; - + std::string listName; Globals::Instance->GetSegmentedPtrName(cmdSetCutscenes->cmdArg2, room->parent, "CutsceneData", listName, res->parent->workerID); std::string fName = OTRExporter_DisplayList::GetPathToRes(room, listName); @@ -452,9 +452,9 @@ void OTRExporter_Room::Save(ZResource* res, const fs::path& outPath, BinaryWrite BinaryWriter csWriter = BinaryWriter(csStream); OTRExporter_Cutscene cs; cs.Save(cmdSetCutscenes->cutscenes[0], "", &csWriter); - + if (Globals::Instance->fileMode != ZFileMode::ExtractDirectory) - File::WriteAllBytes("Extract\\" + fName, csStream->ToVector()); + File::WriteAllBytes("Extract/" + fName, csStream->ToVector()); else files[fName] = csStream->ToVector(); @@ -468,7 +468,7 @@ void OTRExporter_Room::Save(ZResource* res, const fs::path& outPath, BinaryWrite writer->Write((uint32_t)cmdSetPathways->pathwayList.pathways.size()); - for (int i = 0; i < cmdSetPathways->pathwayList.pathways.size(); i++) + for (size_t i = 0; i < cmdSetPathways->pathwayList.pathways.size(); i++) { Declaration* decl = room->parent->GetDeclaration(GETSEGOFFSET(cmdSetPathways->pathwayList.pathways[i].listSegmentAddress)); //std::string path = StringHelper::Sprintf("%s\\%s", OTRExporter_DisplayList::GetParentFolderName(res).c_str(), decl->varName.c_str()); @@ -481,7 +481,7 @@ void OTRExporter_Room::Save(ZResource* res, const fs::path& outPath, BinaryWrite pathExp.Save(&cmdSetPathways->pathwayList, outPath, &pathWriter); if (Globals::Instance->fileMode != ZFileMode::ExtractDirectory) - File::WriteAllBytes("Extract\\" + path, pathStream->ToVector()); + File::WriteAllBytes("Extract/" + path, pathStream->ToVector()); else files[path] = pathStream->ToVector(); @@ -514,12 +514,12 @@ void OTRExporter_Room::WritePolyDList(BinaryWriter* writer, ZRoom* room, Polygon writer->Write(dlist->unk_06); [[fallthrough]]; default: - //writer->Write(StringHelper::Sprintf("%s\\%s", OTRExporter_DisplayList::GetParentFolderName(res).c_str(), dListDeclOpa->varName.c_str())); + //writer->Write(StringHelper::Sprintf("%s/%s", OTRExporter_DisplayList::GetParentFolderName(res).c_str(), dListDeclOpa->varName.c_str())); if (dlist->opaDList != nullptr) { auto opaDecl = room->parent->GetDeclaration(GETSEGOFFSET(dlist->opaDList->GetRawDataIndex())); - writer->Write(StringHelper::Sprintf("%s\\%s", OTRExporter_DisplayList::GetParentFolderName(room).c_str(), opaDecl->varName.c_str())); + writer->Write(StringHelper::Sprintf("%s/%s", OTRExporter_DisplayList::GetParentFolderName(room).c_str(), opaDecl->varName.c_str())); } else writer->Write(""); @@ -527,7 +527,7 @@ void OTRExporter_Room::WritePolyDList(BinaryWriter* writer, ZRoom* room, Polygon if (dlist->xluDList != nullptr) { auto xluDecl = room->parent->GetDeclaration(GETSEGOFFSET(dlist->xluDList->GetRawDataIndex())); - writer->Write(StringHelper::Sprintf("%s\\%s", OTRExporter_DisplayList::GetParentFolderName(room).c_str(), xluDecl->varName.c_str())); + writer->Write(StringHelper::Sprintf("%s/%s", OTRExporter_DisplayList::GetParentFolderName(room).c_str(), xluDecl->varName.c_str())); } else writer->Write(""); diff --git a/OTRExporter/OTRExporter/TextExporter.cpp b/OTRExporter/OTRExporter/TextExporter.cpp index 19bc0ced1..5819b9b33 100644 --- a/OTRExporter/OTRExporter/TextExporter.cpp +++ b/OTRExporter/OTRExporter/TextExporter.cpp @@ -8,8 +8,8 @@ void OTRExporter_Text::Save(ZResource* res, const fs::path& outPath, BinaryWrite WriteHeader(txt, outPath, writer, Ship::ResourceType::Text); writer->Write((uint32_t)txt->messages.size()); - - for (int i = 0; i < txt->messages.size(); i++) + + for (size_t i = 0; i < txt->messages.size(); i++) { writer->Write(txt->messages[i].id); writer->Write(txt->messages[i].textboxType); diff --git a/OTRExporter/OTRExporter/VersionInfo.cpp b/OTRExporter/OTRExporter/VersionInfo.cpp index 9b684d22b..0a2004673 100644 --- a/OTRExporter/OTRExporter/VersionInfo.cpp +++ b/OTRExporter/OTRExporter/VersionInfo.cpp @@ -5,21 +5,23 @@ std::map resourceVersions; void InitVersionInfo() { - resourceVersions[Ship::ResourceType::Animation] = 0; - resourceVersions[Ship::ResourceType::Model] = 0; - resourceVersions[Ship::ResourceType::Texture] = 0; - resourceVersions[Ship::ResourceType::Material] = 0; - resourceVersions[Ship::ResourceType::PlayerAnimation] = 0; - resourceVersions[Ship::ResourceType::DisplayList] = 0; - resourceVersions[Ship::ResourceType::Room] = 0; - resourceVersions[Ship::ResourceType::CollisionHeader] = 0; - resourceVersions[Ship::ResourceType::Skeleton] = 0; - resourceVersions[Ship::ResourceType::SkeletonLimb] = 0; - resourceVersions[Ship::ResourceType::Matrix] = 0; - resourceVersions[Ship::ResourceType::Path] = 0; - resourceVersions[Ship::ResourceType::Vertex] = 0; - resourceVersions[Ship::ResourceType::Cutscene] = 0; - resourceVersions[Ship::ResourceType::Array] = 0; - resourceVersions[Ship::ResourceType::Text] = 0; - resourceVersions[Ship::ResourceType::Blob] = 0; + resourceVersions = { + { Ship::ResourceType::Animation, 0 }, + { Ship::ResourceType::Model, 0 }, + { Ship::ResourceType::Texture, 0 }, + { Ship::ResourceType::Material, 0 }, + { Ship::ResourceType::PlayerAnimation, 0 }, + { Ship::ResourceType::DisplayList, 0 }, + { Ship::ResourceType::Room, 0 }, + { Ship::ResourceType::CollisionHeader, 0 }, + { Ship::ResourceType::Skeleton, 0 }, + { Ship::ResourceType::SkeletonLimb, 0 }, + { Ship::ResourceType::Matrix, 0 }, + { Ship::ResourceType::Path, 0 }, + { Ship::ResourceType::Vertex, 0 }, + { Ship::ResourceType::Cutscene, 0 }, + { Ship::ResourceType::Array, 0 }, + { Ship::ResourceType::Text, 0 }, + { Ship::ResourceType::Blob, 0 }, + }; } \ No newline at end of file diff --git a/OTRExporter/extract_assets.py b/OTRExporter/extract_assets.py index e33b65f0e..67b4ca6e4 100755 --- a/OTRExporter/extract_assets.py +++ b/OTRExporter/extract_assets.py @@ -1,51 +1,15 @@ #!/usr/bin/env python3 -# How to use: -# Place a rom in this directory then run the script. -# If you are using multiple roms, the script will let you choose one. -# To choose with a commandline argument: -# Python3 extract_assets.py -# Invalid input results in the first rom being selected - -import json, os, signal, time, sys, shutil, glob -from multiprocessing import Pool, cpu_count, Event, Manager, ProcessError -from enum import Enum +import os, sys, shutil import shutil - -romVer = "..\\soh\\baserom_non_mq.z64" -roms = []; -checksums = ["", "", ""]; - -class Checksums(Enum): - OOT_NTSC_10 = "EC7011B7" - OOT_NTSC_11 = "D43DA81F" - OOT_NTSC_12 = "693BA2AE" - OOT_PAL_10 = "B044B569" - OOT_PAL_11 = "B2055FBD" - OOT_NTSC_JP_GC_CE = "F7F52DB8" - OOT_NTSC_JP_GC = "F611F4BA" - OOT_NTSC_US_GC = "F3DD35BA" - OOT_PAL_GC = "09465AC3" - OOT_NTSC_JP_MQ = "F43B45BA" - OOT_NTSC_US_MQ = "F034001A" - OOT_PAL_MQ = "1D4136F3" - OOT_PAL_GC_DBG1 = "871E1C92" - OOT_PAL_GC_DBG2 = "87121EFE" - OOT_PAL_GC_MQ_DBG = "917D18F6" - OOT_IQUE_TW = "3D81FB3E" - OOT_IQUE_CN = "B1E1E07B" - OOT_UNKNOWN = "FFFFFFFF" - -CompatibleChecksums = [ - Checksums.OOT_PAL_GC, - Checksums.OOT_PAL_GC_DBG1 -] +from rom_info import Z64Rom +import rom_chooser def BuildOTR(xmlPath, rom): shutil.copytree("assets", "Extract/assets") - execStr = "x64\\Release\\ZAPD.exe" if sys.platform == "win32" else "../ZAPD/ZAPD.out" - execStr += " ed -i %s -b %s -fl CFG\\filelists -o placeholder -osf placeholder -gsf 1 -rconf CFG/Config.xml -se OTR" % (xmlPath, rom) + execStr = "x64\\Release\\ZAPD.exe" if sys.platform == "win32" else "../ZAPDTR/ZAPD.out" + execStr += " ed -i %s -b %s -fl CFG/filelists -o placeholder -osf placeholder -gsf 1 -rconf CFG/Config.xml -se OTR" % (xmlPath, rom) print(execStr) exitValue = os.system(execStr) @@ -55,95 +19,14 @@ def BuildOTR(xmlPath, rom): print("Aborting...", file=os.sys.stderr) print("\n") -def checkChecksum(rom): - r = open(rom, "rb") - r.seek(16) - bytes = r.read(4).hex().upper() - r.close() - - for checksum in Checksums: - if (checksum.value == bytes): - - for compat in CompatibleChecksums: - if (checksum.name == compat.name): - print("Compatible rom found!") - return checksum - print("Valid oot rom found. However, not compatible with SoH.") - print("Compatible roms:") - for compat in CompatibleChecksums: - print(compat.name+" | 0x"+compat.value) - sys.exit(1) - - print("Wrong rom! No valid checksum found") - sys.exit(1) - def main(): - - romToUse = ""; - - for file in glob.glob("*.z64"): - roms.append(file) - - if not (roms): - print("Error: No roms located, place one in the OTRExporter directory", file=os.sys.stderr) - sys.exit(1) - - if (len(roms) > 1): - - # If commandline args exist - if (len(sys.argv) > 1): - try: - if ((int(sys.argv[1]) - 1) < 1): - romToUse = roms[0] - - elif ((int(sys.argv[1]) - 1) > len(roms)): - romToUse = roms[len(roms) - 1] - - else: - romToUse = roms[int(sys.argv[1]) - 1] - except: - romToUse = roms[0] - - # No commandline args, select rom using user input - else: - - print(str(len(roms))+" roms found, please select one by pressing 1-"+str(len(roms))) - - count = 1 - for list in range(len(roms)): - print(str(count)+". "+roms[list]) - count += 1 - - while(1): - try: - selection = int(input()) - except: - print("Bad input. Try again with the number keys.") - continue - - if (selection < 1 or selection > len(roms)): - print("Bad input. Try again.") - continue - - else: break - - romToUse = roms[selection - 1] - - else: - romToUse = roms[0] - - match checkChecksum(romToUse): - case Checksums.OOT_PAL_GC: - xmlVer = "GC_NMQ_PAL_F" - case Checksums.OOT_PAL_GC_DBG1: - xmlVer = "GC_NMQ_D" - case _: # default case - xmlVer = "GC_MQ_D" + rom_path = rom_chooser.chooseROM() + rom = Z64Rom(rom_path) if (os.path.exists("Extract")): shutil.rmtree("Extract") - - BuildOTR("..\\soh\\assets\\xml\\" + xmlVer + "\\", romToUse) + + BuildOTR("../soh/assets/xml/" + rom.version.xml_ver + "/", rom_path) if __name__ == "__main__": main() diff --git a/OTRExporter/extract_assets_old.py b/OTRExporter/extract_assets_old.py deleted file mode 100644 index 2922bbf06..000000000 --- a/OTRExporter/extract_assets_old.py +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env python3 - -import argparse, json, os, signal, time, sys, shutil -from multiprocessing import Pool, cpu_count, Event, Manager, ProcessError -import shutil - -def SignalHandler(sig, frame): - print(f'Signal {sig} received. Aborting...') - mainAbort.set() - # Don't exit immediately to update the extracted assets file. - -def BuildOTR(): - shutil.copyfile("baserom/Audiobank", "Extract/Audiobank") - shutil.copyfile("baserom/Audioseq", "Extract/Audioseq") - shutil.copyfile("baserom/Audiotable", "Extract/Audiotable") - - shutil.copytree("assets", "Extract/assets") - - execStr = "x64\\Release\\ZAPD.exe" if sys.platform == "win32" else "../ZAPD/ZAPD.out" - - execStr += " botr -se OTR" - - print(execStr) - exitValue = os.system(execStr) - if exitValue != 0: - print("\n") - print("Error when building the OTR file...", file=os.sys.stderr) - print("Aborting...", file=os.sys.stderr) - print("\n") - -def ExtractFile(xmlPath, outputPath, outputSourcePath): - execStr = "x64\\Release\\ZAPD.exe" if sys.platform == "win32" else "../ZAPD/ZAPD.out" - execStr += " e -eh -i %s -b baserom/ -o %s -osf %s -gsf 1 -rconf CFG/Config.xml -se OTR" % (xmlPath, outputPath, outputSourcePath) - - if "overlays" in xmlPath: - execStr += " --static" - - print(execStr) - exitValue = os.system(execStr) - #exitValue = 0 - if exitValue != 0: - print("\n") - print("Error when extracting from file " + xmlPath, file=os.sys.stderr) - print("Aborting...", file=os.sys.stderr) - print("\n") - -def ExtractFunc(fullPath): - *pathList, xmlName = fullPath.split(os.sep) - objectName = os.path.splitext(xmlName)[0] - - outPath = os.path.join("..\\soh\\assets\\", *pathList[5:], objectName) - os.makedirs(outPath, exist_ok=True) - outSourcePath = outPath - - ExtractFile(fullPath, outPath, outSourcePath) - -def initializeWorker(abort, test): - global globalAbort - globalAbort = abort - - -def main(): - parser = argparse.ArgumentParser(description="baserom asset extractor") - parser.add_argument("-s", "--single", help="asset path relative to assets/, e.g. objects/gameplay_keep") - parser.add_argument("-f", "--force", help="Force the extraction of every xml instead of checking the touched ones.", action="store_true") - parser.add_argument("-u", "--unaccounted", help="Enables ZAPD unaccounted detector warning system.", action="store_true") - parser.add_argument("-v", "--version", help="Sets game version.") - args = parser.parse_args() - - global mainAbort - mainAbort = Event() - manager = Manager() - signal.signal(signal.SIGINT, SignalHandler) - - extractedAssetsTracker = manager.dict() - - xmlVer = "GC_NMQ_D" - - if (args.version == "gc_pal_nmpq"): - xmlVer = "GC_NMQ_PAL_F" - elif (args.version == "dbg_mq"): - xmlVer = "GC_MQ_D" - - asset_path = args.single - if asset_path is not None: - fullPath = os.path.join("..\\soh\\assets", "xml", asset_path + ".xml") - if not os.path.exists(fullPath): - print(f"Error. File {fullPath} doesn't exists.", file=os.sys.stderr) - exit(1) - - ExtractFunc(fullPath) - else: - extract_text_path = "assets/text/message_data.h" - if os.path.isfile(extract_text_path): - extract_text_path = None - extract_staff_text_path = "assets/text/message_data_staff.h" - if os.path.isfile(extract_staff_text_path): - extract_staff_text_path = None - - xmlFiles = [] - for currentPath, _, files in os.walk(os.path.join("..\\soh\\assets\\xml\\", xmlVer)): - for file in files: - fullPath = os.path.join(currentPath, file) - if file.endswith(".xml"): - xmlFiles.append(fullPath) - - try: - numCores = 2 - print("Extracting assets with " + str(numCores) + " CPU cores.") - with Pool(numCores, initializer=initializeWorker, initargs=(mainAbort, 0)) as p: - p.map(ExtractFunc, xmlFiles) - except Exception as e: - print("Warning: Multiprocessing exception ocurred.", file=os.sys.stderr) - print("Disabling mutliprocessing.", file=os.sys.stderr) - - initializeWorker(mainAbort, 0) - for singlePath in xmlFiles: - ExtractFunc(singlePath) - - - BuildOTR() - shutil.rmtree("Extract") - -if __name__ == "__main__": - main() \ No newline at end of file diff --git a/OTRExporter/extract_baserom.py b/OTRExporter/extract_baserom.py new file mode 100644 index 000000000..f387df57a --- /dev/null +++ b/OTRExporter/extract_baserom.py @@ -0,0 +1,53 @@ +#!/usr/bin/python3 + +import os +import sys +import struct +from multiprocessing import Pool, cpu_count +from rom_info import Z64Rom +import rom_chooser + + +rom = None + +def initialize_worker(input_rom): + global rom + rom = input_rom + +def ExtractFunc(i): + + dma_file = rom.getDmaEntryByIndex(i) + dma_data = rom.readDmaEntry(dma_file) + + filename = '../soh/baserom/' + rom.version.file_table[i] + print('extracting ' + filename + " (0x%08X, 0x%08X)" % (dma_file.virtStart, dma_file.virtEnd)) + + try: + with open(filename, 'wb') as f: + f.write(dma_data) + except IOError: + print('failed to write file ' + filename) + + # TODO: handle this better + if dma_file.compressed: + os.system('tools/yaz0 -d ' + filename + ' ' + filename) + +##################################################################### + +def main(): + try: + os.mkdir('../soh/baserom') + except: + pass + + rom_path = rom_chooser.chooseROM() + input_rom = Z64Rom(rom_path) + + # extract files + num_cores = cpu_count() + print("Extracting baserom with " + str(num_cores) + " CPU cores.") + with Pool(num_cores, initialize_worker, (input_rom,)) as p: + p.map(ExtractFunc, range(len(input_rom.version.file_table))) + +if __name__ == "__main__": + main() diff --git a/OTRExporter/extract_baserom_debug.py b/OTRExporter/extract_baserom_debug.py deleted file mode 100644 index a3eb83a8f..000000000 --- a/OTRExporter/extract_baserom_debug.py +++ /dev/null @@ -1,1608 +0,0 @@ -#!/usr/bin/python3 - -import os -import sys -import struct -from multiprocessing import Pool, cpu_count - - -ROM_FILE_NAME = 'baserom_non_mq.z64' -FILE_TABLE_OFFSET = 0x12F70 - -FILE_NAMES = [ - 'makerom', - 'boot', - 'dmadata', - 'Audiobank', - 'Audioseq', - 'Audiotable', - 'link_animetion', - 'icon_item_static', - 'icon_item_24_static', - 'icon_item_field_static', - 'icon_item_dungeon_static', - 'icon_item_gameover_static', - 'icon_item_nes_static', - 'icon_item_ger_static', - 'icon_item_fra_static', - 'item_name_static', - 'map_name_static', - 'do_action_static', - 'message_static', - 'message_texture_static', - 'nes_font_static', - 'nes_message_data_static', - 'ger_message_data_static', - 'fra_message_data_static', - 'staff_message_data_static', - 'map_grand_static', - 'map_i_static', - 'map_48x85_static', - 'code', - 'ovl_title', - 'ovl_select', - 'ovl_opening', - 'ovl_file_choose', - 'ovl_kaleido_scope', - 'ovl_player_actor', - 'ovl_map_mark_data', - 'ovl_En_Test', - 'ovl_Arms_Hook', - 'ovl_Arrow_Fire', - 'ovl_Arrow_Ice', - 'ovl_Arrow_Light', - 'ovl_Bg_Bdan_Objects', - 'ovl_Bg_Bdan_Switch', - 'ovl_Bg_Bom_Guard', - 'ovl_Bg_Bombwall', - 'ovl_Bg_Bowl_Wall', - 'ovl_Bg_Breakwall', - 'ovl_Bg_Ddan_Jd', - 'ovl_Bg_Ddan_Kd', - 'ovl_Bg_Dodoago', - 'ovl_Bg_Dy_Yoseizo', - 'ovl_Bg_Ganon_Otyuka', - 'ovl_Bg_Gate_Shutter', - 'ovl_Bg_Gjyo_Bridge', - 'ovl_Bg_Gnd_Darkmeiro', - 'ovl_Bg_Gnd_Firemeiro', - 'ovl_Bg_Gnd_Iceblock', - 'ovl_Bg_Gnd_Nisekabe', - 'ovl_Bg_Gnd_Soulmeiro', - 'ovl_Bg_Haka', - 'ovl_Bg_Haka_Gate', - 'ovl_Bg_Haka_Huta', - 'ovl_Bg_Haka_Megane', - 'ovl_Bg_Haka_MeganeBG', - 'ovl_Bg_Haka_Sgami', - 'ovl_Bg_Haka_Ship', - 'ovl_Bg_Haka_Trap', - 'ovl_Bg_Haka_Tubo', - 'ovl_Bg_Haka_Water', - 'ovl_Bg_Haka_Zou', - 'ovl_Bg_Heavy_Block', - 'ovl_Bg_Hidan_Curtain', - 'ovl_Bg_Hidan_Dalm', - 'ovl_Bg_Hidan_Firewall', - 'ovl_Bg_Hidan_Fslift', - 'ovl_Bg_Hidan_Fwbig', - 'ovl_Bg_Hidan_Hamstep', - 'ovl_Bg_Hidan_Hrock', - 'ovl_Bg_Hidan_Kousi', - 'ovl_Bg_Hidan_Kowarerukabe', - 'ovl_Bg_Hidan_Rock', - 'ovl_Bg_Hidan_Rsekizou', - 'ovl_Bg_Hidan_Sekizou', - 'ovl_Bg_Hidan_Sima', - 'ovl_Bg_Hidan_Syoku', - 'ovl_Bg_Ice_Objects', - 'ovl_Bg_Ice_Shelter', - 'ovl_Bg_Ice_Shutter', - 'ovl_Bg_Ice_Turara', - 'ovl_Bg_Ingate', - 'ovl_Bg_Jya_1flift', - 'ovl_Bg_Jya_Amishutter', - 'ovl_Bg_Jya_Bigmirror', - 'ovl_Bg_Jya_Block', - 'ovl_Bg_Jya_Bombchuiwa', - 'ovl_Bg_Jya_Bombiwa', - 'ovl_Bg_Jya_Cobra', - 'ovl_Bg_Jya_Goroiwa', - 'ovl_Bg_Jya_Haheniron', - 'ovl_Bg_Jya_Ironobj', - 'ovl_Bg_Jya_Kanaami', - 'ovl_Bg_Jya_Lift', - 'ovl_Bg_Jya_Megami', - 'ovl_Bg_Jya_Zurerukabe', - 'ovl_Bg_Menkuri_Eye', - 'ovl_Bg_Menkuri_Kaiten', - 'ovl_Bg_Menkuri_Nisekabe', - 'ovl_Bg_Mizu_Bwall', - 'ovl_Bg_Mizu_Movebg', - 'ovl_Bg_Mizu_Shutter', - 'ovl_Bg_Mizu_Uzu', - 'ovl_Bg_Mizu_Water', - 'ovl_Bg_Mjin', - 'ovl_Bg_Mori_Bigst', - 'ovl_Bg_Mori_Elevator', - 'ovl_Bg_Mori_Hashigo', - 'ovl_Bg_Mori_Hashira4', - 'ovl_Bg_Mori_Hineri', - 'ovl_Bg_Mori_Idomizu', - 'ovl_Bg_Mori_Kaitenkabe', - 'ovl_Bg_Mori_Rakkatenjo', - 'ovl_Bg_Po_Event', - 'ovl_Bg_Po_Syokudai', - 'ovl_Bg_Pushbox', - 'ovl_Bg_Relay_Objects', - 'ovl_Bg_Spot00_Break', - 'ovl_Bg_Spot00_Hanebasi', - 'ovl_Bg_Spot01_Fusya', - 'ovl_Bg_Spot01_Idohashira', - 'ovl_Bg_Spot01_Idomizu', - 'ovl_Bg_Spot01_Idosoko', - 'ovl_Bg_Spot01_Objects2', - 'ovl_Bg_Spot02_Objects', - 'ovl_Bg_Spot03_Taki', - 'ovl_Bg_Spot05_Soko', - 'ovl_Bg_Spot06_Objects', - 'ovl_Bg_Spot07_Taki', - 'ovl_Bg_Spot08_Bakudankabe', - 'ovl_Bg_Spot08_Iceblock', - 'ovl_Bg_Spot09_Obj', - 'ovl_Bg_Spot11_Bakudankabe', - 'ovl_Bg_Spot11_Oasis', - 'ovl_Bg_Spot12_Gate', - 'ovl_Bg_Spot12_Saku', - 'ovl_Bg_Spot15_Rrbox', - 'ovl_Bg_Spot15_Saku', - 'ovl_Bg_Spot16_Bombstone', - 'ovl_Bg_Spot16_Doughnut', - 'ovl_Bg_Spot17_Bakudankabe', - 'ovl_Bg_Spot17_Funen', - 'ovl_Bg_Spot18_Basket', - 'ovl_Bg_Spot18_Futa', - 'ovl_Bg_Spot18_Obj', - 'ovl_Bg_Spot18_Shutter', - 'ovl_Bg_Sst_Floor', - 'ovl_Bg_Toki_Hikari', - 'ovl_Bg_Toki_Swd', - 'ovl_Bg_Treemouth', - 'ovl_Bg_Umajump', - 'ovl_Bg_Vb_Sima', - 'ovl_Bg_Ydan_Hasi', - 'ovl_Bg_Ydan_Maruta', - 'ovl_Bg_Ydan_Sp', - 'ovl_Bg_Zg', - 'ovl_Boss_Dodongo', - 'ovl_Boss_Fd', - 'ovl_Boss_Fd2', - 'ovl_Boss_Ganon', - 'ovl_Boss_Ganon2', - 'ovl_Boss_Ganondrof', - 'ovl_Boss_Goma', - 'ovl_Boss_Mo', - 'ovl_Boss_Sst', - 'ovl_Boss_Tw', - 'ovl_Boss_Va', - 'ovl_Demo_6K', - 'ovl_Demo_Du', - 'ovl_Demo_Ec', - 'ovl_Demo_Effect', - 'ovl_Demo_Ext', - 'ovl_Demo_Geff', - 'ovl_Demo_Gj', - 'ovl_Demo_Go', - 'ovl_Demo_Gt', - 'ovl_Demo_Ik', - 'ovl_Demo_Im', - 'ovl_Demo_Kankyo', - 'ovl_Demo_Kekkai', - 'ovl_Demo_Sa', - 'ovl_Demo_Shd', - 'ovl_Demo_Tre_Lgt', - 'ovl_Door_Ana', - 'ovl_Door_Gerudo', - 'ovl_Door_Killer', - 'ovl_Door_Shutter', - 'ovl_Door_Toki', - 'ovl_Door_Warp1', - 'ovl_Efc_Erupc', - 'ovl_Eff_Dust', - 'ovl_Effect_Ss_Blast', - 'ovl_Effect_Ss_Bomb', - 'ovl_Effect_Ss_Bomb2', - 'ovl_Effect_Ss_Bubble', - 'ovl_Effect_Ss_D_Fire', - 'ovl_Effect_Ss_Dead_Db', - 'ovl_Effect_Ss_Dead_Dd', - 'ovl_Effect_Ss_Dead_Ds', - 'ovl_Effect_Ss_Dead_Sound', - 'ovl_Effect_Ss_Dt_Bubble', - 'ovl_Effect_Ss_Dust', - 'ovl_Effect_Ss_En_Fire', - 'ovl_Effect_Ss_En_Ice', - 'ovl_Effect_Ss_Extra', - 'ovl_Effect_Ss_Fcircle', - 'ovl_Effect_Ss_Fhg_Flash', - 'ovl_Effect_Ss_Fire_Tail', - 'ovl_Effect_Ss_G_Fire', - 'ovl_Effect_Ss_G_Magma', - 'ovl_Effect_Ss_G_Magma2', - 'ovl_Effect_Ss_G_Ripple', - 'ovl_Effect_Ss_G_Spk', - 'ovl_Effect_Ss_G_Splash', - 'ovl_Effect_Ss_Hahen', - 'ovl_Effect_Ss_HitMark', - 'ovl_Effect_Ss_Ice_Piece', - 'ovl_Effect_Ss_Ice_Smoke', - 'ovl_Effect_Ss_K_Fire', - 'ovl_Effect_Ss_Kakera', - 'ovl_Effect_Ss_KiraKira', - 'ovl_Effect_Ss_Lightning', - 'ovl_Effect_Ss_Sibuki', - 'ovl_Effect_Ss_Sibuki2', - 'ovl_Effect_Ss_Solder_Srch_Ball', - 'ovl_Effect_Ss_Stick', - 'ovl_Effect_Ss_Stone1', - 'ovl_Elf_Msg', - 'ovl_Elf_Msg2', - 'ovl_En_Am', - 'ovl_En_Ani', - 'ovl_En_Anubice', - 'ovl_En_Anubice_Fire', - 'ovl_En_Anubice_Tag', - 'ovl_En_Arow_Trap', - 'ovl_En_Arrow', - 'ovl_En_Attack_Niw', - 'ovl_En_Ba', - 'ovl_En_Bb', - 'ovl_En_Bdfire', - 'ovl_En_Bigokuta', - 'ovl_En_Bili', - 'ovl_En_Bird', - 'ovl_En_Blkobj', - 'ovl_En_Bom', - 'ovl_En_Bom_Bowl_Man', - 'ovl_En_Bom_Bowl_Pit', - 'ovl_En_Bom_Chu', - 'ovl_En_Bombf', - 'ovl_En_Boom', - 'ovl_En_Box', - 'ovl_En_Brob', - 'ovl_En_Bubble', - 'ovl_En_Butte', - 'ovl_En_Bw', - 'ovl_En_Bx', - 'ovl_En_Changer', - 'ovl_En_Clear_Tag', - 'ovl_En_Cow', - 'ovl_En_Crow', - 'ovl_En_Cs', - 'ovl_En_Daiku', - 'ovl_En_Daiku_Kakariko', - 'ovl_En_Dekubaba', - 'ovl_En_Dekunuts', - 'ovl_En_Dh', - 'ovl_En_Dha', - 'ovl_En_Diving_Game', - 'ovl_En_Dns', - 'ovl_En_Dnt_Demo', - 'ovl_En_Dnt_Jiji', - 'ovl_En_Dnt_Nomal', - 'ovl_En_Dodojr', - 'ovl_En_Dodongo', - 'ovl_En_Dog', - 'ovl_En_Door', - 'ovl_En_Ds', - 'ovl_En_Du', - 'ovl_En_Dy_Extra', - 'ovl_En_Eg', - 'ovl_En_Eiyer', - 'ovl_En_Elf', - 'ovl_En_Encount1', - 'ovl_En_Encount2', - 'ovl_En_Ex_Item', - 'ovl_En_Ex_Ruppy', - 'ovl_En_Fd', - 'ovl_En_Fd_Fire', - 'ovl_En_Fhg_Fire', - 'ovl_En_Fire_Rock', - 'ovl_En_Firefly', - 'ovl_En_Fish', - 'ovl_En_Floormas', - 'ovl_En_Fr', - 'ovl_En_Fu', - 'ovl_En_Fw', - 'ovl_En_Fz', - 'ovl_En_G_Switch', - 'ovl_En_Ganon_Mant', - 'ovl_En_Ganon_Organ', - 'ovl_En_Gb', - 'ovl_En_Ge1', - 'ovl_En_Ge2', - 'ovl_En_Ge3', - 'ovl_En_GeldB', - 'ovl_En_GirlA', - 'ovl_En_Gm', - 'ovl_En_Go', - 'ovl_En_Go2', - 'ovl_En_Goma', - 'ovl_En_Goroiwa', - 'ovl_En_Gs', - 'ovl_En_Guest', - 'ovl_En_Hata', - 'ovl_En_Heishi1', - 'ovl_En_Heishi2', - 'ovl_En_Heishi3', - 'ovl_En_Heishi4', - 'ovl_En_Hintnuts', - 'ovl_En_Holl', - 'ovl_En_Honotrap', - 'ovl_En_Horse', - 'ovl_En_Horse_Game_Check', - 'ovl_En_Horse_Ganon', - 'ovl_En_Horse_Link_Child', - 'ovl_En_Horse_Normal', - 'ovl_En_Horse_Zelda', - 'ovl_En_Hs', - 'ovl_En_Hs2', - 'ovl_En_Hy', - 'ovl_En_Ice_Hono', - 'ovl_En_Ik', - 'ovl_En_In', - 'ovl_En_Insect', - 'ovl_En_Ishi', - 'ovl_En_It', - 'ovl_En_Jj', - 'ovl_En_Js', - 'ovl_En_Jsjutan', - 'ovl_En_Kakasi', - 'ovl_En_Kakasi2', - 'ovl_En_Kakasi3', - 'ovl_En_Kanban', - 'ovl_En_Karebaba', - 'ovl_En_Ko', - 'ovl_En_Kusa', - 'ovl_En_Kz', - 'ovl_En_Light', - 'ovl_En_Lightbox', - 'ovl_En_M_Fire1', - 'ovl_En_M_Thunder', - 'ovl_En_Ma1', - 'ovl_En_Ma2', - 'ovl_En_Ma3', - 'ovl_En_Mag', - 'ovl_En_Mb', - 'ovl_En_Md', - 'ovl_En_Mk', - 'ovl_En_Mm', - 'ovl_En_Mm2', - 'ovl_En_Ms', - 'ovl_En_Mu', - 'ovl_En_Nb', - 'ovl_En_Niw', - 'ovl_En_Niw_Girl', - 'ovl_En_Niw_Lady', - 'ovl_En_Nutsball', - 'ovl_En_Nwc', - 'ovl_En_Ny', - 'ovl_En_OE2', - 'ovl_En_Okarina_Effect', - 'ovl_En_Okarina_Tag', - 'ovl_En_Okuta', - 'ovl_En_Ossan', - 'ovl_En_Owl', - 'ovl_En_Part', - 'ovl_En_Peehat', - 'ovl_En_Po_Desert', - 'ovl_En_Po_Field', - 'ovl_En_Po_Relay', - 'ovl_En_Po_Sisters', - 'ovl_En_Poh', - 'ovl_En_Pu_box', - 'ovl_En_Rd', - 'ovl_En_Reeba', - 'ovl_En_River_Sound', - 'ovl_En_Rl', - 'ovl_En_Rr', - 'ovl_En_Ru1', - 'ovl_En_Ru2', - 'ovl_En_Sa', - 'ovl_En_Sb', - 'ovl_En_Scene_Change', - 'ovl_En_Sda', - 'ovl_En_Shopnuts', - 'ovl_En_Si', - 'ovl_En_Siofuki', - 'ovl_En_Skb', - 'ovl_En_Skj', - 'ovl_En_Skjneedle', - 'ovl_En_Ssh', - 'ovl_En_St', - 'ovl_En_Sth', - 'ovl_En_Stream', - 'ovl_En_Sw', - 'ovl_En_Syateki_Itm', - 'ovl_En_Syateki_Man', - 'ovl_En_Syateki_Niw', - 'ovl_En_Ta', - 'ovl_En_Takara_Man', - 'ovl_En_Tana', - 'ovl_En_Tg', - 'ovl_En_Tite', - 'ovl_En_Tk', - 'ovl_En_Torch', - 'ovl_En_Torch2', - 'ovl_En_Toryo', - 'ovl_En_Tp', - 'ovl_En_Tr', - 'ovl_En_Trap', - 'ovl_En_Tubo_Trap', - 'ovl_En_Vali', - 'ovl_En_Vase', - 'ovl_En_Vb_Ball', - 'ovl_En_Viewer', - 'ovl_En_Vm', - 'ovl_En_Wall_Tubo', - 'ovl_En_Wallmas', - 'ovl_En_Weather_Tag', - 'ovl_En_Weiyer', - 'ovl_En_Wf', - 'ovl_En_Wonder_Item', - 'ovl_En_Wonder_Talk', - 'ovl_En_Wonder_Talk2', - 'ovl_En_Wood02', - 'ovl_En_Xc', - 'ovl_En_Yabusame_Mark', - 'ovl_En_Yukabyun', - 'ovl_En_Zf', - 'ovl_En_Zl1', - 'ovl_En_Zl2', - 'ovl_En_Zl3', - 'ovl_En_Zl4', - 'ovl_En_Zo', - 'ovl_En_fHG', - 'ovl_End_Title', - 'ovl_Fishing', - 'ovl_Item_B_Heart', - 'ovl_Item_Etcetera', - 'ovl_Item_Inbox', - 'ovl_Item_Ocarina', - 'ovl_Item_Shield', - 'ovl_Magic_Dark', - 'ovl_Magic_Fire', - 'ovl_Magic_Wind', - 'ovl_Mir_Ray', - 'ovl_Obj_Bean', - 'ovl_Obj_Blockstop', - 'ovl_Obj_Bombiwa', - 'ovl_Obj_Comb', - 'ovl_Obj_Dekujr', - 'ovl_Obj_Elevator', - 'ovl_Obj_Hamishi', - 'ovl_Obj_Hana', - 'ovl_Obj_Hsblock', - 'ovl_Obj_Ice_Poly', - 'ovl_Obj_Kibako', - 'ovl_Obj_Kibako2', - 'ovl_Obj_Lift', - 'ovl_Obj_Lightswitch', - 'ovl_Obj_Makekinsuta', - 'ovl_Obj_Makeoshihiki', - 'ovl_Obj_Mure', - 'ovl_Obj_Mure2', - 'ovl_Obj_Mure3', - 'ovl_Obj_Oshihiki', - 'ovl_Obj_Roomtimer', - 'ovl_Obj_Switch', - 'ovl_Obj_Syokudai', - 'ovl_Obj_Timeblock', - 'ovl_Obj_Tsubo', - 'ovl_Obj_Warp2block', - 'ovl_Object_Kankyo', - 'ovl_Oceff_Spot', - 'ovl_Oceff_Storm', - 'ovl_Oceff_Wipe', - 'ovl_Oceff_Wipe2', - 'ovl_Oceff_Wipe3', - 'ovl_Oceff_Wipe4', - 'ovl_Shot_Sun', - 'gameplay_keep', - 'gameplay_field_keep', - 'gameplay_dangeon_keep', - 'gameplay_object_exchange_static', - 'object_link_boy', - 'object_link_child', - 'object_box', - 'object_human', - 'object_okuta', - 'object_poh', - 'object_wallmaster', - 'object_dy_obj', - 'object_firefly', - 'object_dodongo', - 'object_fire', - 'object_niw', - 'object_tite', - 'object_reeba', - 'object_peehat', - 'object_kingdodongo', - 'object_horse', - 'object_zf', - 'object_goma', - 'object_zl1', - 'object_gol', - 'object_bubble', - 'object_dodojr', - 'object_torch2', - 'object_bl', - 'object_tp', - 'object_oA1', - 'object_st', - 'object_bw', - 'object_ei', - 'object_horse_normal', - 'object_oB1', - 'object_o_anime', - 'object_spot04_objects', - 'object_ddan_objects', - 'object_hidan_objects', - 'object_horse_ganon', - 'object_oA2', - 'object_spot00_objects', - 'object_mb', - 'object_bombf', - 'object_sk2', - 'object_oE1', - 'object_oE_anime', - 'object_oE2', - 'object_ydan_objects', - 'object_gnd', - 'object_am', - 'object_dekubaba', - 'object_oA3', - 'object_oA4', - 'object_oA5', - 'object_oA6', - 'object_oA7', - 'object_jj', - 'object_oA8', - 'object_oA9', - 'object_oB2', - 'object_oB3', - 'object_oB4', - 'object_horse_zelda', - 'object_opening_demo1', - 'object_warp1', - 'object_b_heart', - 'object_dekunuts', - 'object_oE3', - 'object_oE4', - 'object_menkuri_objects', - 'object_oE5', - 'object_oE6', - 'object_oE7', - 'object_oE8', - 'object_oE9', - 'object_oE10', - 'object_oE11', - 'object_oE12', - 'object_vali', - 'object_oA10', - 'object_oA11', - 'object_mizu_objects', - 'object_fhg', - 'object_ossan', - 'object_mori_hineri1', - 'object_Bb', - 'object_toki_objects', - 'object_yukabyun', - 'object_zl2', - 'object_mjin', - 'object_mjin_flash', - 'object_mjin_dark', - 'object_mjin_flame', - 'object_mjin_ice', - 'object_mjin_soul', - 'object_mjin_wind', - 'object_mjin_oka', - 'object_haka_objects', - 'object_spot06_objects', - 'object_ice_objects', - 'object_relay_objects', - 'object_mori_hineri1a', - 'object_mori_hineri2', - 'object_mori_hineri2a', - 'object_mori_objects', - 'object_mori_tex', - 'object_spot08_obj', - 'object_warp2', - 'object_hata', - 'object_bird', - 'object_wood02', - 'object_lightbox', - 'object_pu_box', - 'object_trap', - 'object_vase', - 'object_im', - 'object_ta', - 'object_tk', - 'object_xc', - 'object_vm', - 'object_bv', - 'object_hakach_objects', - 'object_efc_crystal_light', - 'object_efc_fire_ball', - 'object_efc_flash', - 'object_efc_lgt_shower', - 'object_efc_star_field', - 'object_god_lgt', - 'object_light_ring', - 'object_triforce_spot', - 'object_medal', - 'object_bdan_objects', - 'object_sd', - 'object_rd', - 'object_po_sisters', - 'object_heavy_object', - 'object_gndd', - 'object_fd', - 'object_du', - 'object_fw', - 'object_horse_link_child', - 'object_spot02_objects', - 'object_haka', - 'object_ru1', - 'object_syokudai', - 'object_fd2', - 'object_dh', - 'object_rl', - 'object_efc_tw', - 'object_demo_tre_lgt', - 'object_gi_key', - 'object_mir_ray', - 'object_brob', - 'object_gi_jewel', - 'object_spot09_obj', - 'object_spot18_obj', - 'object_bdoor', - 'object_spot17_obj', - 'object_shop_dungen', - 'object_nb', - 'object_mo', - 'object_sb', - 'object_gi_melody', - 'object_gi_heart', - 'object_gi_compass', - 'object_gi_bosskey', - 'object_gi_medal', - 'object_gi_nuts', - 'object_sa', - 'object_gi_hearts', - 'object_gi_arrowcase', - 'object_gi_bombpouch', - 'object_in', - 'object_tr', - 'object_spot16_obj', - 'object_oE1s', - 'object_oE4s', - 'object_os_anime', - 'object_gi_bottle', - 'object_gi_stick', - 'object_gi_map', - 'object_oF1d_map', - 'object_ru2', - 'object_gi_shield_1', - 'object_dekujr', - 'object_gi_magicpot', - 'object_gi_bomb_1', - 'object_oF1s', - 'object_ma2', - 'object_gi_purse', - 'object_hni', - 'object_tw', - 'object_rr', - 'object_bxa', - 'object_anubice', - 'object_gi_gerudo', - 'object_gi_arrow', - 'object_gi_bomb_2', - 'object_gi_egg', - 'object_gi_scale', - 'object_gi_shield_2', - 'object_gi_hookshot', - 'object_gi_ocarina', - 'object_gi_milk', - 'object_ma1', - 'object_ganon', - 'object_sst', - 'object_ny', - 'object_fr', - 'object_gi_pachinko', - 'object_gi_boomerang', - 'object_gi_bow', - 'object_gi_glasses', - 'object_gi_liquid', - 'object_ani', - 'object_demo_6k', - 'object_gi_shield_3', - 'object_gi_letter', - 'object_spot15_obj', - 'object_jya_obj', - 'object_gi_clothes', - 'object_gi_bean', - 'object_gi_fish', - 'object_gi_saw', - 'object_gi_hammer', - 'object_gi_grass', - 'object_gi_longsword', - 'object_spot01_objects', - 'object_md', - 'object_km1', - 'object_kw1', - 'object_zo', - 'object_kz', - 'object_umajump', - 'object_masterkokiri', - 'object_masterkokirihead', - 'object_mastergolon', - 'object_masterzoora', - 'object_aob', - 'object_ik', - 'object_ahg', - 'object_cne', - 'object_gi_niwatori', - 'object_skj', - 'object_gi_bottle_letter', - 'object_bji', - 'object_bba', - 'object_gi_ocarina_0', - 'object_ds', - 'object_ane', - 'object_boj', - 'object_spot03_object', - 'object_spot07_object', - 'object_fz', - 'object_bob', - 'object_ge1', - 'object_yabusame_point', - 'object_gi_boots_2', - 'object_gi_seed', - 'object_gnd_magic', - 'object_d_elevator', - 'object_d_hsblock', - 'object_d_lift', - 'object_mamenoki', - 'object_goroiwa', - 'object_toryo', - 'object_daiku', - 'object_nwc', - 'object_blkobj', - 'object_gm', - 'object_ms', - 'object_hs', - 'object_ingate', - 'object_lightswitch', - 'object_kusa', - 'object_tsubo', - 'object_gi_gloves', - 'object_gi_coin', - 'object_kanban', - 'object_gjyo_objects', - 'object_owl', - 'object_mk', - 'object_fu', - 'object_gi_ki_tan_mask', - 'object_gi_redead_mask', - 'object_gi_skj_mask', - 'object_gi_rabit_mask', - 'object_gi_truth_mask', - 'object_ganon_objects', - 'object_siofuki', - 'object_stream', - 'object_mm', - 'object_fa', - 'object_os', - 'object_gi_eye_lotion', - 'object_gi_powder', - 'object_gi_mushroom', - 'object_gi_ticketstone', - 'object_gi_brokensword', - 'object_js', - 'object_cs', - 'object_gi_prescription', - 'object_gi_bracelet', - 'object_gi_soldout', - 'object_gi_frog', - 'object_mag', - 'object_door_gerudo', - 'object_gt', - 'object_efc_erupc', - 'object_zl2_anime1', - 'object_zl2_anime2', - 'object_gi_golonmask', - 'object_gi_zoramask', - 'object_gi_gerudomask', - 'object_ganon2', - 'object_ka', - 'object_ts', - 'object_zg', - 'object_gi_hoverboots', - 'object_gi_m_arrow', - 'object_ds2', - 'object_ec', - 'object_fish', - 'object_gi_sutaru', - 'object_gi_goddess', - 'object_ssh', - 'object_bigokuta', - 'object_bg', - 'object_spot05_objects', - 'object_spot12_obj', - 'object_bombiwa', - 'object_hintnuts', - 'object_rs', - 'object_spot00_break', - 'object_gla', - 'object_shopnuts', - 'object_geldb', - 'object_gr', - 'object_dog', - 'object_jya_iron', - 'object_jya_door', - 'object_spot01_objects2', - 'object_spot11_obj', - 'object_kibako2', - 'object_dns', - 'object_dnk', - 'object_gi_fire', - 'object_gi_insect', - 'object_gi_butterfly', - 'object_gi_ghost', - 'object_gi_soul', - 'object_bowl', - 'object_po_field', - 'object_demo_kekkai', - 'object_efc_doughnut', - 'object_gi_dekupouch', - 'object_ganon_anime1', - 'object_ganon_anime2', - 'object_ganon_anime3', - 'object_gi_rupy', - 'object_spot01_matoya', - 'object_spot01_matoyab', - 'object_po_composer', - 'object_mu', - 'object_wf', - 'object_skb', - 'object_gj', - 'object_geff', - 'object_haka_door', - 'object_gs', - 'object_ps', - 'object_bwall', - 'object_crow', - 'object_cow', - 'object_cob', - 'object_gi_sword_1', - 'object_door_killer', - 'object_ouke_haka', - 'object_timeblock', - 'object_zl4', - 'g_pn_01', - 'g_pn_02', - 'g_pn_03', - 'g_pn_04', - 'g_pn_05', - 'g_pn_06', - 'g_pn_07', - 'g_pn_08', - 'g_pn_09', - 'g_pn_10', - 'g_pn_11', - 'g_pn_12', - 'g_pn_13', - 'g_pn_14', - 'g_pn_15', - 'g_pn_16', - 'g_pn_17', - 'g_pn_18', - 'g_pn_19', - 'g_pn_20', - 'g_pn_21', - 'g_pn_22', - 'g_pn_23', - 'g_pn_24', - 'g_pn_25', - 'g_pn_26', - 'g_pn_27', - 'g_pn_28', - 'g_pn_29', - 'g_pn_30', - 'g_pn_31', - 'g_pn_32', - 'g_pn_33', - 'g_pn_34', - 'g_pn_35', - 'g_pn_36', - 'g_pn_37', - 'g_pn_38', - 'g_pn_39', - 'g_pn_40', - 'g_pn_41', - 'g_pn_42', - 'g_pn_43', - 'g_pn_44', - 'g_pn_45', - 'g_pn_46', - 'g_pn_47', - 'g_pn_48', - 'g_pn_49', - 'g_pn_50', - 'g_pn_51', - 'g_pn_52', - 'g_pn_53', - 'g_pn_54', - 'g_pn_55', - 'g_pn_56', - 'g_pn_57', - 'z_select_static', - 'nintendo_rogo_static', - 'title_static', - 'parameter_static', - 'vr_fine0_static', - 'vr_fine0_pal_static', - 'vr_fine1_static', - 'vr_fine1_pal_static', - 'vr_fine2_static', - 'vr_fine2_pal_static', - 'vr_fine3_static', - 'vr_fine3_pal_static', - 'vr_cloud0_static', - 'vr_cloud0_pal_static', - 'vr_cloud1_static', - 'vr_cloud1_pal_static', - 'vr_cloud2_static', - 'vr_cloud2_pal_static', - 'vr_cloud3_static', - 'vr_cloud3_pal_static', - 'vr_holy0_static', - 'vr_holy0_pal_static', - 'vr_holy1_static', - 'vr_holy1_pal_static', - 'vr_MDVR_static', - 'vr_MDVR_pal_static', - 'vr_MNVR_static', - 'vr_MNVR_pal_static', - 'vr_RUVR_static', - 'vr_RUVR_pal_static', - 'vr_LHVR_static', - 'vr_LHVR_pal_static', - 'vr_KHVR_static', - 'vr_KHVR_pal_static', - 'vr_K3VR_static', - 'vr_K3VR_pal_static', - 'vr_K4VR_static', - 'vr_K4VR_pal_static', - 'vr_K5VR_static', - 'vr_K5VR_pal_static', - 'vr_SP1a_static', - 'vr_SP1a_pal_static', - 'vr_MLVR_static', - 'vr_MLVR_pal_static', - 'vr_KKRVR_static', - 'vr_KKRVR_pal_static', - 'vr_KR3VR_static', - 'vr_KR3VR_pal_static', - 'vr_IPVR_static', - 'vr_IPVR_pal_static', - 'vr_KSVR_static', - 'vr_KSVR_pal_static', - 'vr_GLVR_static', - 'vr_GLVR_pal_static', - 'vr_ZRVR_static', - 'vr_ZRVR_pal_static', - 'vr_DGVR_static', - 'vr_DGVR_pal_static', - 'vr_ALVR_static', - 'vr_ALVR_pal_static', - 'vr_NSVR_static', - 'vr_NSVR_pal_static', - 'vr_LBVR_static', - 'vr_LBVR_pal_static', - 'vr_TTVR_static', - 'vr_TTVR_pal_static', - 'vr_FCVR_static', - 'vr_FCVR_pal_static', - 'elf_message_field', - 'elf_message_ydan', - 'syotes_scene', - 'syotes_room_0', - 'syotes2_scene', - 'syotes2_room_0', - 'depth_test_scene', - 'depth_test_room_0', - 'spot00_scene', - 'spot00_room_0', - 'spot01_scene', - 'spot01_room_0', - 'spot02_scene', - 'spot02_room_0', - 'spot02_room_1', - 'spot03_scene', - 'spot03_room_0', - 'spot03_room_1', - 'spot04_scene', - 'spot04_room_0', - 'spot04_room_1', - 'spot04_room_2', - 'spot05_scene', - 'spot05_room_0', - 'spot06_scene', - 'spot06_room_0', - 'spot07_scene', - 'spot07_room_0', - 'spot07_room_1', - 'spot08_scene', - 'spot08_room_0', - 'spot09_scene', - 'spot09_room_0', - 'spot10_scene', - 'spot10_room_0', - 'spot10_room_1', - 'spot10_room_2', - 'spot10_room_3', - 'spot10_room_4', - 'spot10_room_5', - 'spot10_room_6', - 'spot10_room_7', - 'spot10_room_8', - 'spot10_room_9', - 'spot11_scene', - 'spot11_room_0', - 'spot12_scene', - 'spot12_room_0', - 'spot12_room_1', - 'spot13_scene', - 'spot13_room_0', - 'spot13_room_1', - 'spot15_scene', - 'spot15_room_0', - 'spot16_scene', - 'spot16_room_0', - 'spot17_scene', - 'spot17_room_0', - 'spot17_room_1', - 'spot18_scene', - 'spot18_room_0', - 'spot18_room_1', - 'spot18_room_2', - 'spot18_room_3', - 'ydan_scene', - 'ydan_room_0', - 'ydan_room_1', - 'ydan_room_2', - 'ydan_room_3', - 'ydan_room_4', - 'ydan_room_5', - 'ydan_room_6', - 'ydan_room_7', - 'ydan_room_8', - 'ydan_room_9', - 'ydan_room_10', - 'ydan_room_11', - 'ddan_scene', - 'ddan_room_0', - 'ddan_room_1', - 'ddan_room_2', - 'ddan_room_3', - 'ddan_room_4', - 'ddan_room_5', - 'ddan_room_6', - 'ddan_room_7', - 'ddan_room_8', - 'ddan_room_9', - 'ddan_room_10', - 'ddan_room_11', - 'ddan_room_12', - 'ddan_room_13', - 'ddan_room_14', - 'ddan_room_15', - 'ddan_room_16', - 'bdan_scene', - 'bdan_room_0', - 'bdan_room_1', - 'bdan_room_2', - 'bdan_room_3', - 'bdan_room_4', - 'bdan_room_5', - 'bdan_room_6', - 'bdan_room_7', - 'bdan_room_8', - 'bdan_room_9', - 'bdan_room_10', - 'bdan_room_11', - 'bdan_room_12', - 'bdan_room_13', - 'bdan_room_14', - 'bdan_room_15', - 'Bmori1_scene', - 'Bmori1_room_0', - 'Bmori1_room_1', - 'Bmori1_room_2', - 'Bmori1_room_3', - 'Bmori1_room_4', - 'Bmori1_room_5', - 'Bmori1_room_6', - 'Bmori1_room_7', - 'Bmori1_room_8', - 'Bmori1_room_9', - 'Bmori1_room_10', - 'Bmori1_room_11', - 'Bmori1_room_12', - 'Bmori1_room_13', - 'Bmori1_room_14', - 'Bmori1_room_15', - 'Bmori1_room_16', - 'Bmori1_room_17', - 'Bmori1_room_18', - 'Bmori1_room_19', - 'Bmori1_room_20', - 'Bmori1_room_21', - 'Bmori1_room_22', - 'HIDAN_scene', - 'HIDAN_room_0', - 'HIDAN_room_1', - 'HIDAN_room_2', - 'HIDAN_room_3', - 'HIDAN_room_4', - 'HIDAN_room_5', - 'HIDAN_room_6', - 'HIDAN_room_7', - 'HIDAN_room_8', - 'HIDAN_room_9', - 'HIDAN_room_10', - 'HIDAN_room_11', - 'HIDAN_room_12', - 'HIDAN_room_13', - 'HIDAN_room_14', - 'HIDAN_room_15', - 'HIDAN_room_16', - 'HIDAN_room_17', - 'HIDAN_room_18', - 'HIDAN_room_19', - 'HIDAN_room_20', - 'HIDAN_room_21', - 'HIDAN_room_22', - 'HIDAN_room_23', - 'HIDAN_room_24', - 'HIDAN_room_25', - 'HIDAN_room_26', - 'MIZUsin_scene', - 'MIZUsin_room_0', - 'MIZUsin_room_1', - 'MIZUsin_room_2', - 'MIZUsin_room_3', - 'MIZUsin_room_4', - 'MIZUsin_room_5', - 'MIZUsin_room_6', - 'MIZUsin_room_7', - 'MIZUsin_room_8', - 'MIZUsin_room_9', - 'MIZUsin_room_10', - 'MIZUsin_room_11', - 'MIZUsin_room_12', - 'MIZUsin_room_13', - 'MIZUsin_room_14', - 'MIZUsin_room_15', - 'MIZUsin_room_16', - 'MIZUsin_room_17', - 'MIZUsin_room_18', - 'MIZUsin_room_19', - 'MIZUsin_room_20', - 'MIZUsin_room_21', - 'MIZUsin_room_22', - 'jyasinzou_scene', - 'jyasinzou_room_0', - 'jyasinzou_room_1', - 'jyasinzou_room_2', - 'jyasinzou_room_3', - 'jyasinzou_room_4', - 'jyasinzou_room_5', - 'jyasinzou_room_6', - 'jyasinzou_room_7', - 'jyasinzou_room_8', - 'jyasinzou_room_9', - 'jyasinzou_room_10', - 'jyasinzou_room_11', - 'jyasinzou_room_12', - 'jyasinzou_room_13', - 'jyasinzou_room_14', - 'jyasinzou_room_15', - 'jyasinzou_room_16', - 'jyasinzou_room_17', - 'jyasinzou_room_18', - 'jyasinzou_room_19', - 'jyasinzou_room_20', - 'jyasinzou_room_21', - 'jyasinzou_room_22', - 'jyasinzou_room_23', - 'jyasinzou_room_24', - 'jyasinzou_room_25', - 'jyasinzou_room_26', - 'jyasinzou_room_27', - 'jyasinzou_room_28', - 'HAKAdan_scene', - 'HAKAdan_room_0', - 'HAKAdan_room_1', - 'HAKAdan_room_2', - 'HAKAdan_room_3', - 'HAKAdan_room_4', - 'HAKAdan_room_5', - 'HAKAdan_room_6', - 'HAKAdan_room_7', - 'HAKAdan_room_8', - 'HAKAdan_room_9', - 'HAKAdan_room_10', - 'HAKAdan_room_11', - 'HAKAdan_room_12', - 'HAKAdan_room_13', - 'HAKAdan_room_14', - 'HAKAdan_room_15', - 'HAKAdan_room_16', - 'HAKAdan_room_17', - 'HAKAdan_room_18', - 'HAKAdan_room_19', - 'HAKAdan_room_20', - 'HAKAdan_room_21', - 'HAKAdan_room_22', - 'HAKAdanCH_scene', - 'HAKAdanCH_room_0', - 'HAKAdanCH_room_1', - 'HAKAdanCH_room_2', - 'HAKAdanCH_room_3', - 'HAKAdanCH_room_4', - 'HAKAdanCH_room_5', - 'HAKAdanCH_room_6', - 'ice_doukutu_scene', - 'ice_doukutu_room_0', - 'ice_doukutu_room_1', - 'ice_doukutu_room_2', - 'ice_doukutu_room_3', - 'ice_doukutu_room_4', - 'ice_doukutu_room_5', - 'ice_doukutu_room_6', - 'ice_doukutu_room_7', - 'ice_doukutu_room_8', - 'ice_doukutu_room_9', - 'ice_doukutu_room_10', - 'ice_doukutu_room_11', - 'men_scene', - 'men_room_0', - 'men_room_1', - 'men_room_2', - 'men_room_3', - 'men_room_4', - 'men_room_5', - 'men_room_6', - 'men_room_7', - 'men_room_8', - 'men_room_9', - 'men_room_10', - 'ganontika_scene', - 'ganontika_room_0', - 'ganontika_room_1', - 'ganontika_room_2', - 'ganontika_room_3', - 'ganontika_room_4', - 'ganontika_room_5', - 'ganontika_room_6', - 'ganontika_room_7', - 'ganontika_room_8', - 'ganontika_room_9', - 'ganontika_room_10', - 'ganontika_room_11', - 'ganontika_room_12', - 'ganontika_room_13', - 'ganontika_room_14', - 'ganontika_room_15', - 'ganontika_room_16', - 'ganontika_room_17', - 'ganontika_room_18', - 'ganontika_room_19', - 'market_day_scene', - 'market_day_room_0', - 'market_night_scene', - 'market_night_room_0', - 'testroom_scene', - 'testroom_room_0', - 'testroom_room_1', - 'testroom_room_2', - 'testroom_room_3', - 'testroom_room_4', - 'kenjyanoma_scene', - 'kenjyanoma_room_0', - 'tokinoma_scene', - 'tokinoma_room_0', - 'tokinoma_room_1', - 'sutaru_scene', - 'sutaru_room_0', - 'link_home_scene', - 'link_home_room_0', - 'kokiri_shop_scene', - 'kokiri_shop_room_0', - 'kokiri_home_scene', - 'kokiri_home_room_0', - 'kakusiana_scene', - 'kakusiana_room_0', - 'kakusiana_room_1', - 'kakusiana_room_2', - 'kakusiana_room_3', - 'kakusiana_room_4', - 'kakusiana_room_5', - 'kakusiana_room_6', - 'kakusiana_room_7', - 'kakusiana_room_8', - 'kakusiana_room_9', - 'kakusiana_room_10', - 'kakusiana_room_11', - 'kakusiana_room_12', - 'kakusiana_room_13', - 'entra_scene', - 'entra_room_0', - 'moribossroom_scene', - 'moribossroom_room_0', - 'moribossroom_room_1', - 'syatekijyou_scene', - 'syatekijyou_room_0', - 'shop1_scene', - 'shop1_room_0', - 'hairal_niwa_scene', - 'hairal_niwa_room_0', - 'ganon_tou_scene', - 'ganon_tou_room_0', - 'sasatest_scene', - 'sasatest_room_0', - 'market_alley_scene', - 'market_alley_room_0', - 'spot20_scene', - 'spot20_room_0', - 'market_ruins_scene', - 'market_ruins_room_0', - 'entra_n_scene', - 'entra_n_room_0', - 'enrui_scene', - 'enrui_room_0', - 'market_alley_n_scene', - 'market_alley_n_room_0', - 'hiral_demo_scene', - 'hiral_demo_room_0', - 'kokiri_home3_scene', - 'kokiri_home3_room_0', - 'malon_stable_scene', - 'malon_stable_room_0', - 'kakariko_scene', - 'kakariko_room_0', - 'bdan_boss_scene', - 'bdan_boss_room_0', - 'bdan_boss_room_1', - 'FIRE_bs_scene', - 'FIRE_bs_room_0', - 'FIRE_bs_room_1', - 'hut_scene', - 'hut_room_0', - 'daiyousei_izumi_scene', - 'daiyousei_izumi_room_0', - 'hakaana_scene', - 'hakaana_room_0', - 'yousei_izumi_tate_scene', - 'yousei_izumi_tate_room_0', - 'yousei_izumi_yoko_scene', - 'yousei_izumi_yoko_room_0', - 'golon_scene', - 'golon_room_0', - 'zoora_scene', - 'zoora_room_0', - 'drag_scene', - 'drag_room_0', - 'alley_shop_scene', - 'alley_shop_room_0', - 'night_shop_scene', - 'night_shop_room_0', - 'impa_scene', - 'impa_room_0', - 'labo_scene', - 'labo_room_0', - 'tent_scene', - 'tent_room_0', - 'nakaniwa_scene', - 'nakaniwa_room_0', - 'ddan_boss_scene', - 'ddan_boss_room_0', - 'ddan_boss_room_1', - 'ydan_boss_scene', - 'ydan_boss_room_0', - 'ydan_boss_room_1', - 'HAKAdan_bs_scene', - 'HAKAdan_bs_room_0', - 'HAKAdan_bs_room_1', - 'MIZUsin_bs_scene', - 'MIZUsin_bs_room_0', - 'MIZUsin_bs_room_1', - 'ganon_scene', - 'ganon_room_0', - 'ganon_room_1', - 'ganon_room_2', - 'ganon_room_3', - 'ganon_room_4', - 'ganon_room_5', - 'ganon_room_6', - 'ganon_room_7', - 'ganon_room_8', - 'ganon_room_9', - 'ganon_boss_scene', - 'ganon_boss_room_0', - 'jyasinboss_scene', - 'jyasinboss_room_0', - 'jyasinboss_room_1', - 'jyasinboss_room_2', - 'jyasinboss_room_3', - 'kokiri_home4_scene', - 'kokiri_home4_room_0', - 'kokiri_home5_scene', - 'kokiri_home5_room_0', - 'ganon_final_scene', - 'ganon_final_room_0', - 'kakariko3_scene', - 'kakariko3_room_0', - 'hairal_niwa2_scene', - 'hairal_niwa2_room_0', - 'hakasitarelay_scene', - 'hakasitarelay_room_0', - 'hakasitarelay_room_1', - 'hakasitarelay_room_2', - 'hakasitarelay_room_3', - 'hakasitarelay_room_4', - 'hakasitarelay_room_5', - 'hakasitarelay_room_6', - 'shrine_scene', - 'shrine_room_0', - 'turibori_scene', - 'turibori_room_0', - 'shrine_n_scene', - 'shrine_n_room_0', - 'shrine_r_scene', - 'shrine_r_room_0', - 'hakaana2_scene', - 'hakaana2_room_0', - 'gerudoway_scene', - 'gerudoway_room_0', - 'gerudoway_room_1', - 'gerudoway_room_2', - 'gerudoway_room_3', - 'gerudoway_room_4', - 'gerudoway_room_5', - 'hairal_niwa_n_scene', - 'hairal_niwa_n_room_0', - 'bowling_scene', - 'bowling_room_0', - 'hakaana_ouke_scene', - 'hakaana_ouke_room_0', - 'hakaana_ouke_room_1', - 'hakaana_ouke_room_2', - 'hylia_labo_scene', - 'hylia_labo_room_0', - 'souko_scene', - 'souko_room_0', - 'souko_room_1', - 'souko_room_2', - 'miharigoya_scene', - 'miharigoya_room_0', - 'mahouya_scene', - 'mahouya_room_0', - 'takaraya_scene', - 'takaraya_room_0', - 'takaraya_room_1', - 'takaraya_room_2', - 'takaraya_room_3', - 'takaraya_room_4', - 'takaraya_room_5', - 'takaraya_room_6', - 'ganon_sonogo_scene', - 'ganon_sonogo_room_0', - 'ganon_sonogo_room_1', - 'ganon_sonogo_room_2', - 'ganon_sonogo_room_3', - 'ganon_sonogo_room_4', - 'ganon_demo_scene', - 'ganon_demo_room_0', - 'besitu_scene', - 'besitu_room_0', - 'face_shop_scene', - 'face_shop_room_0', - 'kinsuta_scene', - 'kinsuta_room_0', - 'ganontikasonogo_scene', - 'ganontikasonogo_room_0', - 'ganontikasonogo_room_1', - 'test01_scene', - 'test01_room_0', - 'bump_texture_static', - 'anime_model_1_static', - 'anime_model_2_static', - 'anime_model_3_static', - 'anime_model_4_static', - 'anime_model_5_static', - 'anime_model_6_static', - 'anime_texture_1_static', - 'anime_texture_2_static', - 'anime_texture_3_static', - 'anime_texture_4_static', - 'anime_texture_5_static', - 'anime_texture_6_static', - 'softsprite_matrix_static', -] - -romData = None - - -def initialize_worker(rom_data): - global romData - romData = rom_data - -def read_uint32_be(offset): - return struct.unpack('>I', romData[offset:offset+4])[0] - -def write_output_file(name, offset, size): - try: - with open(name, 'wb') as f: - f.write(romData[offset:offset+size]) - except IOError: - print('failed to write file ' + name) - -def ExtractFunc(i): - filename = 'baserom/' + FILE_NAMES[i] - entryOffset = FILE_TABLE_OFFSET + 16 * i - - virtStart = read_uint32_be(entryOffset + 0) - virtEnd = read_uint32_be(entryOffset + 4) - physStart = read_uint32_be(entryOffset + 8) - physEnd = read_uint32_be(entryOffset + 12) - - if physEnd == 0: # uncompressed - compressed = False - size = virtEnd - virtStart - else: # compressed - compressed = True - size = physEnd - physStart - - print('extracting ' + filename + " (0x%08X, 0x%08X)" % (virtStart, virtEnd)) - write_output_file(filename, physStart, size) - if compressed: - os.system('tools/yaz0 -d ' + filename + ' ' + filename) - -##################################################################### - -def main(): - try: - os.mkdir('baserom') - except: - pass - - # read baserom data - try: - with open(ROM_FILE_NAME, 'rb') as f: - rom_data = f.read() - except IOError: - print('failed to read ' + ROM_FILE_NAME) - sys.exit(1) - - # extract files - num_cores = cpu_count() - print("Extracting baserom with " + str(num_cores) + " CPU cores.") - with Pool(num_cores, initialize_worker, (rom_data,)) as p: - p.map(ExtractFunc, range(len(FILE_NAMES))) - -if __name__ == "__main__": - main() diff --git a/OTRExporter/extract_baserom_gc.py b/OTRExporter/extract_baserom_gc.py deleted file mode 100644 index 0bc324f81..000000000 --- a/OTRExporter/extract_baserom_gc.py +++ /dev/null @@ -1,1586 +0,0 @@ -#!/usr/bin/python3 - -import os -import sys -import struct -from multiprocessing import Pool, cpu_count - - -ROM_FILE_NAME = 'zlp_f.n64' -FILE_TABLE_OFFSET = 0x7170 - -FILE_NAMES = [ - 'makerom', - 'boot', - 'dmadata', - 'Audiobank', - 'Audioseq', - 'Audiotable', - 'link_animetion', - 'icon_item_static', - 'icon_item_24_static', - 'icon_item_field_static', - 'icon_item_dungeon_static', - 'icon_item_gameover_static', - 'icon_item_nes_static', - 'icon_item_ger_static', - 'icon_item_fra_static', - 'item_name_static', - 'map_name_static', - 'do_action_static', - 'message_static', - 'message_texture_static', - 'nes_font_static', - 'nes_message_data_static', - 'ger_message_data_static', - 'fra_message_data_static', - 'staff_message_data_static', - 'map_grand_static', - 'map_48x85_static', - 'map_i_static', - 'code', - 'ovl_title', - 'ovl_select', - 'ovl_opening', - 'ovl_file_choose', - 'ovl_kaleido_scope', - 'ovl_player_actor', - 'ovl_map_mark_data', - 'ovl_En_Test', - 'ovl_Arms_Hook', - 'ovl_Arrow_Fire', - 'ovl_Arrow_Ice', - 'ovl_Arrow_Light', - 'ovl_Bg_Bdan_Objects', - 'ovl_Bg_Bdan_Switch', - 'ovl_Bg_Bom_Guard', - 'ovl_Bg_Bombwall', - 'ovl_Bg_Bowl_Wall', - 'ovl_Bg_Breakwall', - 'ovl_Bg_Ddan_Jd', - 'ovl_Bg_Ddan_Kd', - 'ovl_Bg_Dodoago', - 'ovl_Bg_Dy_Yoseizo', - 'ovl_Bg_Ganon_Otyuka', - 'ovl_Bg_Gate_Shutter', - 'ovl_Bg_Gjyo_Bridge', - 'ovl_Bg_Gnd_Darkmeiro', - 'ovl_Bg_Gnd_Firemeiro', - 'ovl_Bg_Gnd_Iceblock', - 'ovl_Bg_Gnd_Nisekabe', - 'ovl_Bg_Gnd_Soulmeiro', - 'ovl_Bg_Haka', - 'ovl_Bg_Haka_Gate', - 'ovl_Bg_Haka_Huta', - 'ovl_Bg_Haka_Megane', - 'ovl_Bg_Haka_MeganeBG', - 'ovl_Bg_Haka_Sgami', - 'ovl_Bg_Haka_Ship', - 'ovl_Bg_Haka_Trap', - 'ovl_Bg_Haka_Tubo', - 'ovl_Bg_Haka_Water', - 'ovl_Bg_Haka_Zou', - 'ovl_Bg_Heavy_Block', - 'ovl_Bg_Hidan_Curtain', - 'ovl_Bg_Hidan_Dalm', - 'ovl_Bg_Hidan_Firewall', - 'ovl_Bg_Hidan_Fslift', - 'ovl_Bg_Hidan_Fwbig', - 'ovl_Bg_Hidan_Hamstep', - 'ovl_Bg_Hidan_Hrock', - 'ovl_Bg_Hidan_Kousi', - 'ovl_Bg_Hidan_Kowarerukabe', - 'ovl_Bg_Hidan_Rock', - 'ovl_Bg_Hidan_Rsekizou', - 'ovl_Bg_Hidan_Sekizou', - 'ovl_Bg_Hidan_Sima', - 'ovl_Bg_Hidan_Syoku', - 'ovl_Bg_Ice_Objects', - 'ovl_Bg_Ice_Shelter', - 'ovl_Bg_Ice_Shutter', - 'ovl_Bg_Ice_Turara', - 'ovl_Bg_Ingate', - 'ovl_Bg_Jya_1flift', - 'ovl_Bg_Jya_Amishutter', - 'ovl_Bg_Jya_Bigmirror', - 'ovl_Bg_Jya_Block', - 'ovl_Bg_Jya_Bombchuiwa', - 'ovl_Bg_Jya_Bombiwa', - 'ovl_Bg_Jya_Cobra', - 'ovl_Bg_Jya_Goroiwa', - 'ovl_Bg_Jya_Haheniron', - 'ovl_Bg_Jya_Ironobj', - 'ovl_Bg_Jya_Kanaami', - 'ovl_Bg_Jya_Lift', - 'ovl_Bg_Jya_Megami', - 'ovl_Bg_Jya_Zurerukabe', - 'ovl_Bg_Menkuri_Eye', - 'ovl_Bg_Menkuri_Kaiten', - 'ovl_Bg_Menkuri_Nisekabe', - 'ovl_Bg_Mizu_Bwall', - 'ovl_Bg_Mizu_Movebg', - 'ovl_Bg_Mizu_Shutter', - 'ovl_Bg_Mizu_Uzu', - 'ovl_Bg_Mizu_Water', - 'ovl_Bg_Mjin', - 'ovl_Bg_Mori_Bigst', - 'ovl_Bg_Mori_Elevator', - 'ovl_Bg_Mori_Hashigo', - 'ovl_Bg_Mori_Hashira4', - 'ovl_Bg_Mori_Hineri', - 'ovl_Bg_Mori_Idomizu', - 'ovl_Bg_Mori_Kaitenkabe', - 'ovl_Bg_Mori_Rakkatenjo', - 'ovl_Bg_Po_Event', - 'ovl_Bg_Po_Syokudai', - 'ovl_Bg_Pushbox', - 'ovl_Bg_Relay_Objects', - 'ovl_Bg_Spot00_Break', - 'ovl_Bg_Spot00_Hanebasi', - 'ovl_Bg_Spot01_Fusya', - 'ovl_Bg_Spot01_Idohashira', - 'ovl_Bg_Spot01_Idomizu', - 'ovl_Bg_Spot01_Idosoko', - 'ovl_Bg_Spot01_Objects2', - 'ovl_Bg_Spot02_Objects', - 'ovl_Bg_Spot03_Taki', - 'ovl_Bg_Spot05_Soko', - 'ovl_Bg_Spot06_Objects', - 'ovl_Bg_Spot07_Taki', - 'ovl_Bg_Spot08_Bakudankabe', - 'ovl_Bg_Spot08_Iceblock', - 'ovl_Bg_Spot09_Obj', - 'ovl_Bg_Spot11_Bakudankabe', - 'ovl_Bg_Spot11_Oasis', - 'ovl_Bg_Spot12_Gate', - 'ovl_Bg_Spot12_Saku', - 'ovl_Bg_Spot15_Rrbox', - 'ovl_Bg_Spot15_Saku', - 'ovl_Bg_Spot16_Bombstone', - 'ovl_Bg_Spot16_Doughnut', - 'ovl_Bg_Spot17_Bakudankabe', - 'ovl_Bg_Spot17_Funen', - 'ovl_Bg_Spot18_Basket', - 'ovl_Bg_Spot18_Futa', - 'ovl_Bg_Spot18_Obj', - 'ovl_Bg_Spot18_Shutter', - 'ovl_Bg_Sst_Floor', - 'ovl_Bg_Toki_Hikari', - 'ovl_Bg_Toki_Swd', - 'ovl_Bg_Treemouth', - 'ovl_Bg_Umajump', - 'ovl_Bg_Vb_Sima', - 'ovl_Bg_Ydan_Hasi', - 'ovl_Bg_Ydan_Maruta', - 'ovl_Bg_Ydan_Sp', - 'ovl_Bg_Zg', - 'ovl_Boss_Dodongo', - 'ovl_Boss_Fd', - 'ovl_Boss_Fd2', - 'ovl_Boss_Ganon', - 'ovl_Boss_Ganon2', - 'ovl_Boss_Ganondrof', - 'ovl_Boss_Goma', - 'ovl_Boss_Mo', - 'ovl_Boss_Sst', - 'ovl_Boss_Tw', - 'ovl_Boss_Va', - 'ovl_Demo_6K', - 'ovl_Demo_Du', - 'ovl_Demo_Ec', - 'ovl_Demo_Effect', - 'ovl_Demo_Ext', - 'ovl_Demo_Geff', - 'ovl_Demo_Gj', - 'ovl_Demo_Go', - 'ovl_Demo_Gt', - 'ovl_Demo_Ik', - 'ovl_Demo_Im', - 'ovl_Demo_Kankyo', - 'ovl_Demo_Kekkai', - 'ovl_Demo_Sa', - 'ovl_Demo_Shd', - 'ovl_Demo_Tre_Lgt', - 'ovl_Door_Ana', - 'ovl_Door_Gerudo', - 'ovl_Door_Killer', - 'ovl_Door_Shutter', - 'ovl_Door_Toki', - 'ovl_Door_Warp1', - 'ovl_Efc_Erupc', - 'ovl_Eff_Dust', - 'ovl_Effect_Ss_Blast', - 'ovl_Effect_Ss_Bomb', - 'ovl_Effect_Ss_Bomb2', - 'ovl_Effect_Ss_Bubble', - 'ovl_Effect_Ss_D_Fire', - 'ovl_Effect_Ss_Dead_Db', - 'ovl_Effect_Ss_Dead_Dd', - 'ovl_Effect_Ss_Dead_Ds', - 'ovl_Effect_Ss_Dead_Sound', - 'ovl_Effect_Ss_Dt_Bubble', - 'ovl_Effect_Ss_Dust', - 'ovl_Effect_Ss_En_Fire', - 'ovl_Effect_Ss_En_Ice', - 'ovl_Effect_Ss_Extra', - 'ovl_Effect_Ss_Fcircle', - 'ovl_Effect_Ss_Fhg_Flash', - 'ovl_Effect_Ss_Fire_Tail', - 'ovl_Effect_Ss_G_Fire', - 'ovl_Effect_Ss_G_Magma', - 'ovl_Effect_Ss_G_Magma2', - 'ovl_Effect_Ss_G_Ripple', - 'ovl_Effect_Ss_G_Spk', - 'ovl_Effect_Ss_G_Splash', - 'ovl_Effect_Ss_Hahen', - 'ovl_Effect_Ss_HitMark', - 'ovl_Effect_Ss_Ice_Piece', - 'ovl_Effect_Ss_Ice_Smoke', - 'ovl_Effect_Ss_K_Fire', - 'ovl_Effect_Ss_Kakera', - 'ovl_Effect_Ss_KiraKira', - 'ovl_Effect_Ss_Lightning', - 'ovl_Effect_Ss_Sibuki', - 'ovl_Effect_Ss_Sibuki2', - 'ovl_Effect_Ss_Solder_Srch_Ball', - 'ovl_Effect_Ss_Stick', - 'ovl_Effect_Ss_Stone1', - 'ovl_Elf_Msg', - 'ovl_Elf_Msg2', - 'ovl_En_Am', - 'ovl_En_Ani', - 'ovl_En_Anubice', - 'ovl_En_Anubice_Fire', - 'ovl_En_Anubice_Tag', - 'ovl_En_Arow_Trap', - 'ovl_En_Arrow', - 'ovl_En_Attack_Niw', - 'ovl_En_Ba', - 'ovl_En_Bb', - 'ovl_En_Bdfire', - 'ovl_En_Bigokuta', - 'ovl_En_Bili', - 'ovl_En_Bird', - 'ovl_En_Blkobj', - 'ovl_En_Bom', - 'ovl_En_Bom_Bowl_Man', - 'ovl_En_Bom_Bowl_Pit', - 'ovl_En_Bom_Chu', - 'ovl_En_Bombf', - 'ovl_En_Boom', - 'ovl_En_Box', - 'ovl_En_Brob', - 'ovl_En_Bubble', - 'ovl_En_Butte', - 'ovl_En_Bw', - 'ovl_En_Bx', - 'ovl_En_Changer', - 'ovl_En_Clear_Tag', - 'ovl_En_Cow', - 'ovl_En_Crow', - 'ovl_En_Cs', - 'ovl_En_Daiku', - 'ovl_En_Daiku_Kakariko', - 'ovl_En_Dekubaba', - 'ovl_En_Dekunuts', - 'ovl_En_Dh', - 'ovl_En_Dha', - 'ovl_En_Diving_Game', - 'ovl_En_Dns', - 'ovl_En_Dnt_Demo', - 'ovl_En_Dnt_Jiji', - 'ovl_En_Dnt_Nomal', - 'ovl_En_Dodojr', - 'ovl_En_Dodongo', - 'ovl_En_Dog', - 'ovl_En_Door', - 'ovl_En_Ds', - 'ovl_En_Du', - 'ovl_En_Dy_Extra', - 'ovl_En_Eg', - 'ovl_En_Eiyer', - 'ovl_En_Elf', - 'ovl_En_Encount1', - 'ovl_En_Encount2', - 'ovl_En_Ex_Item', - 'ovl_En_Ex_Ruppy', - 'ovl_En_Fd', - 'ovl_En_Fd_Fire', - 'ovl_En_Fhg_Fire', - 'ovl_En_Fire_Rock', - 'ovl_En_Firefly', - 'ovl_En_Fish', - 'ovl_En_Floormas', - 'ovl_En_Fr', - 'ovl_En_Fu', - 'ovl_En_Fw', - 'ovl_En_Fz', - 'ovl_En_G_Switch', - 'ovl_En_Ganon_Mant', - 'ovl_En_Ganon_Organ', - 'ovl_En_Gb', - 'ovl_En_Ge1', - 'ovl_En_Ge2', - 'ovl_En_Ge3', - 'ovl_En_GeldB', - 'ovl_En_GirlA', - 'ovl_En_Gm', - 'ovl_En_Go', - 'ovl_En_Go2', - 'ovl_En_Goma', - 'ovl_En_Goroiwa', - 'ovl_En_Gs', - 'ovl_En_Guest', - 'ovl_En_Hata', - 'ovl_En_Heishi1', - 'ovl_En_Heishi2', - 'ovl_En_Heishi3', - 'ovl_En_Heishi4', - 'ovl_En_Hintnuts', - 'ovl_En_Holl', - 'ovl_En_Honotrap', - 'ovl_En_Horse', - 'ovl_En_Horse_Game_Check', - 'ovl_En_Horse_Ganon', - 'ovl_En_Horse_Link_Child', - 'ovl_En_Horse_Normal', - 'ovl_En_Horse_Zelda', - 'ovl_En_Hs', - 'ovl_En_Hs2', - 'ovl_En_Hy', - 'ovl_En_Ice_Hono', - 'ovl_En_Ik', - 'ovl_En_In', - 'ovl_En_Insect', - 'ovl_En_Ishi', - 'ovl_En_It', - 'ovl_En_Jj', - 'ovl_En_Js', - 'ovl_En_Jsjutan', - 'ovl_En_Kakasi', - 'ovl_En_Kakasi2', - 'ovl_En_Kakasi3', - 'ovl_En_Kanban', - 'ovl_En_Karebaba', - 'ovl_En_Ko', - 'ovl_En_Kusa', - 'ovl_En_Kz', - 'ovl_En_Light', - 'ovl_En_Lightbox', - 'ovl_En_M_Fire1', - 'ovl_En_M_Thunder', - 'ovl_En_Ma1', - 'ovl_En_Ma2', - 'ovl_En_Ma3', - 'ovl_En_Mag', - 'ovl_En_Mb', - 'ovl_En_Md', - 'ovl_En_Mk', - 'ovl_En_Mm', - 'ovl_En_Mm2', - 'ovl_En_Ms', - 'ovl_En_Mu', - 'ovl_En_Nb', - 'ovl_En_Niw', - 'ovl_En_Niw_Girl', - 'ovl_En_Niw_Lady', - 'ovl_En_Nutsball', - 'ovl_En_Nwc', - 'ovl_En_Ny', - 'ovl_En_OE2', - 'ovl_En_Okarina_Effect', - 'ovl_En_Okarina_Tag', - 'ovl_En_Okuta', - 'ovl_En_Ossan', - 'ovl_En_Owl', - 'ovl_En_Part', - 'ovl_En_Peehat', - 'ovl_En_Po_Desert', - 'ovl_En_Po_Field', - 'ovl_En_Po_Relay', - 'ovl_En_Po_Sisters', - 'ovl_En_Poh', - 'ovl_En_Pu_box', - 'ovl_En_Rd', - 'ovl_En_Reeba', - 'ovl_En_River_Sound', - 'ovl_En_Rl', - 'ovl_En_Rr', - 'ovl_En_Ru1', - 'ovl_En_Ru2', - 'ovl_En_Sa', - 'ovl_En_Sb', - 'ovl_En_Scene_Change', - 'ovl_En_Sda', - 'ovl_En_Shopnuts', - 'ovl_En_Si', - 'ovl_En_Siofuki', - 'ovl_En_Skb', - 'ovl_En_Skj', - 'ovl_En_Skjneedle', - 'ovl_En_Ssh', - 'ovl_En_St', - 'ovl_En_Sth', - 'ovl_En_Stream', - 'ovl_En_Sw', - 'ovl_En_Syateki_Itm', - 'ovl_En_Syateki_Man', - 'ovl_En_Syateki_Niw', - 'ovl_En_Ta', - 'ovl_En_Takara_Man', - 'ovl_En_Tana', - 'ovl_En_Tg', - 'ovl_En_Tite', - 'ovl_En_Tk', - 'ovl_En_Torch', - 'ovl_En_Torch2', - 'ovl_En_Toryo', - 'ovl_En_Tp', - 'ovl_En_Tr', - 'ovl_En_Trap', - 'ovl_En_Tubo_Trap', - 'ovl_En_Vali', - 'ovl_En_Vase', - 'ovl_En_Vb_Ball', - 'ovl_En_Viewer', - 'ovl_En_Vm', - 'ovl_En_Wall_Tubo', - 'ovl_En_Wallmas', - 'ovl_En_Weather_Tag', - 'ovl_En_Weiyer', - 'ovl_En_Wf', - 'ovl_En_Wonder_Item', - 'ovl_En_Wonder_Talk', - 'ovl_En_Wonder_Talk2', - 'ovl_En_Wood02', - 'ovl_En_Xc', - 'ovl_En_Yabusame_Mark', - 'ovl_En_Yukabyun', - 'ovl_En_Zf', - 'ovl_En_Zl1', - 'ovl_En_Zl2', - 'ovl_En_Zl3', - 'ovl_En_Zl4', - 'ovl_En_Zo', - 'ovl_En_fHG', - 'ovl_End_Title', - 'ovl_Fishing', - 'ovl_Item_B_Heart', - 'ovl_Item_Etcetera', - 'ovl_Item_Inbox', - 'ovl_Item_Ocarina', - 'ovl_Item_Shield', - 'ovl_Magic_Dark', - 'ovl_Magic_Fire', - 'ovl_Magic_Wind', - 'ovl_Mir_Ray', - 'ovl_Obj_Bean', - 'ovl_Obj_Blockstop', - 'ovl_Obj_Bombiwa', - 'ovl_Obj_Comb', - 'ovl_Obj_Dekujr', - 'ovl_Obj_Elevator', - 'ovl_Obj_Hamishi', - 'ovl_Obj_Hana', - 'ovl_Obj_Hsblock', - 'ovl_Obj_Ice_Poly', - 'ovl_Obj_Kibako', - 'ovl_Obj_Kibako2', - 'ovl_Obj_Lift', - 'ovl_Obj_Lightswitch', - 'ovl_Obj_Makekinsuta', - 'ovl_Obj_Makeoshihiki', - 'ovl_Obj_Mure', - 'ovl_Obj_Mure2', - 'ovl_Obj_Mure3', - 'ovl_Obj_Oshihiki', - 'ovl_Obj_Roomtimer', - 'ovl_Obj_Switch', - 'ovl_Obj_Syokudai', - 'ovl_Obj_Timeblock', - 'ovl_Obj_Tsubo', - 'ovl_Obj_Warp2block', - 'ovl_Object_Kankyo', - 'ovl_Oceff_Spot', - 'ovl_Oceff_Storm', - 'ovl_Oceff_Wipe', - 'ovl_Oceff_Wipe2', - 'ovl_Oceff_Wipe3', - 'ovl_Oceff_Wipe4', - 'ovl_Shot_Sun', - 'gameplay_keep', - 'gameplay_field_keep', - 'gameplay_dangeon_keep', - 'gameplay_object_exchange_static', - 'object_link_boy', - 'object_link_child', - 'object_box', - 'object_human', - 'object_okuta', - 'object_poh', - 'object_wallmaster', - 'object_dy_obj', - 'object_firefly', - 'object_dodongo', - 'object_fire', - 'object_niw', - 'object_tite', - 'object_reeba', - 'object_peehat', - 'object_kingdodongo', - 'object_horse', - 'object_zf', - 'object_goma', - 'object_zl1', - 'object_gol', - 'object_bubble', - 'object_dodojr', - 'object_torch2', - 'object_bl', - 'object_tp', - 'object_oA1', - 'object_st', - 'object_bw', - 'object_ei', - 'object_horse_normal', - 'object_oB1', - 'object_o_anime', - 'object_spot04_objects', - 'object_ddan_objects', - 'object_hidan_objects', - 'object_horse_ganon', - 'object_oA2', - 'object_spot00_objects', - 'object_mb', - 'object_bombf', - 'object_sk2', - 'object_oE1', - 'object_oE_anime', - 'object_oE2', - 'object_ydan_objects', - 'object_gnd', - 'object_am', - 'object_dekubaba', - 'object_oA3', - 'object_oA4', - 'object_oA5', - 'object_oA6', - 'object_oA7', - 'object_jj', - 'object_oA8', - 'object_oA9', - 'object_oB2', - 'object_oB3', - 'object_oB4', - 'object_horse_zelda', - 'object_opening_demo1', - 'object_warp1', - 'object_b_heart', - 'object_dekunuts', - 'object_oE3', - 'object_oE4', - 'object_menkuri_objects', - 'object_oE5', - 'object_oE6', - 'object_oE7', - 'object_oE8', - 'object_oE9', - 'object_oE10', - 'object_oE11', - 'object_oE12', - 'object_vali', - 'object_oA10', - 'object_oA11', - 'object_mizu_objects', - 'object_fhg', - 'object_ossan', - 'object_mori_hineri1', - 'object_Bb', - 'object_toki_objects', - 'object_yukabyun', - 'object_zl2', - 'object_mjin', - 'object_mjin_flash', - 'object_mjin_dark', - 'object_mjin_flame', - 'object_mjin_ice', - 'object_mjin_soul', - 'object_mjin_wind', - 'object_mjin_oka', - 'object_haka_objects', - 'object_spot06_objects', - 'object_ice_objects', - 'object_relay_objects', - 'object_mori_hineri1a', - 'object_mori_hineri2', - 'object_mori_hineri2a', - 'object_mori_objects', - 'object_mori_tex', - 'object_spot08_obj', - 'object_warp2', - 'object_hata', - 'object_bird', - 'object_wood02', - 'object_lightbox', - 'object_pu_box', - 'object_trap', - 'object_vase', - 'object_im', - 'object_ta', - 'object_tk', - 'object_xc', - 'object_vm', - 'object_bv', - 'object_hakach_objects', - 'object_efc_crystal_light', - 'object_efc_fire_ball', - 'object_efc_flash', - 'object_efc_lgt_shower', - 'object_efc_star_field', - 'object_god_lgt', - 'object_light_ring', - 'object_triforce_spot', - 'object_medal', - 'object_bdan_objects', - 'object_sd', - 'object_rd', - 'object_po_sisters', - 'object_heavy_object', - 'object_gndd', - 'object_fd', - 'object_du', - 'object_fw', - 'object_horse_link_child', - 'object_spot02_objects', - 'object_haka', - 'object_ru1', - 'object_syokudai', - 'object_fd2', - 'object_dh', - 'object_rl', - 'object_efc_tw', - 'object_demo_tre_lgt', - 'object_gi_key', - 'object_mir_ray', - 'object_brob', - 'object_gi_jewel', - 'object_spot09_obj', - 'object_spot18_obj', - 'object_bdoor', - 'object_spot17_obj', - 'object_shop_dungen', - 'object_nb', - 'object_mo', - 'object_sb', - 'object_gi_melody', - 'object_gi_heart', - 'object_gi_compass', - 'object_gi_bosskey', - 'object_gi_medal', - 'object_gi_nuts', - 'object_sa', - 'object_gi_hearts', - 'object_gi_arrowcase', - 'object_gi_bombpouch', - 'object_in', - 'object_tr', - 'object_spot16_obj', - 'object_oE1s', - 'object_oE4s', - 'object_os_anime', - 'object_gi_bottle', - 'object_gi_stick', - 'object_gi_map', - 'object_oF1d_map', - 'object_ru2', - 'object_gi_shield_1', - 'object_dekujr', - 'object_gi_magicpot', - 'object_gi_bomb_1', - 'object_oF1s', - 'object_ma2', - 'object_gi_purse', - 'object_hni', - 'object_tw', - 'object_rr', - 'object_bxa', - 'object_anubice', - 'object_gi_gerudo', - 'object_gi_arrow', - 'object_gi_bomb_2', - 'object_gi_egg', - 'object_gi_scale', - 'object_gi_shield_2', - 'object_gi_hookshot', - 'object_gi_ocarina', - 'object_gi_milk', - 'object_ma1', - 'object_ganon', - 'object_sst', - 'object_ny', - 'object_fr', - 'object_gi_pachinko', - 'object_gi_boomerang', - 'object_gi_bow', - 'object_gi_glasses', - 'object_gi_liquid', - 'object_ani', - 'object_demo_6k', - 'object_gi_shield_3', - 'object_gi_letter', - 'object_spot15_obj', - 'object_jya_obj', - 'object_gi_clothes', - 'object_gi_bean', - 'object_gi_fish', - 'object_gi_saw', - 'object_gi_hammer', - 'object_gi_grass', - 'object_gi_longsword', - 'object_spot01_objects', - 'object_md', - 'object_km1', - 'object_kw1', - 'object_zo', - 'object_kz', - 'object_umajump', - 'object_masterkokiri', - 'object_masterkokirihead', - 'object_mastergolon', - 'object_masterzoora', - 'object_aob', - 'object_ik', - 'object_ahg', - 'object_cne', - 'object_gi_niwatori', - 'object_skj', - 'object_gi_bottle_letter', - 'object_bji', - 'object_bba', - 'object_gi_ocarina_0', - 'object_ds', - 'object_ane', - 'object_boj', - 'object_spot03_object', - 'object_spot07_object', - 'object_fz', - 'object_bob', - 'object_ge1', - 'object_yabusame_point', - 'object_gi_boots_2', - 'object_gi_seed', - 'object_gnd_magic', - 'object_d_elevator', - 'object_d_hsblock', - 'object_d_lift', - 'object_mamenoki', - 'object_goroiwa', - 'object_toryo', - 'object_daiku', - 'object_nwc', - 'object_blkobj', - 'object_gm', - 'object_ms', - 'object_hs', - 'object_ingate', - 'object_lightswitch', - 'object_kusa', - 'object_tsubo', - 'object_gi_gloves', - 'object_gi_coin', - 'object_kanban', - 'object_gjyo_objects', - 'object_owl', - 'object_mk', - 'object_fu', - 'object_gi_ki_tan_mask', - 'object_gi_redead_mask', - 'object_gi_skj_mask', - 'object_gi_rabit_mask', - 'object_gi_truth_mask', - 'object_ganon_objects', - 'object_siofuki', - 'object_stream', - 'object_mm', - 'object_fa', - 'object_os', - 'object_gi_eye_lotion', - 'object_gi_powder', - 'object_gi_mushroom', - 'object_gi_ticketstone', - 'object_gi_brokensword', - 'object_js', - 'object_cs', - 'object_gi_prescription', - 'object_gi_bracelet', - 'object_gi_soldout', - 'object_gi_frog', - 'object_mag', - 'object_door_gerudo', - 'object_gt', - 'object_efc_erupc', - 'object_zl2_anime1', - 'object_zl2_anime2', - 'object_gi_golonmask', - 'object_gi_zoramask', - 'object_gi_gerudomask', - 'object_ganon2', - 'object_ka', - 'object_ts', - 'object_zg', - 'object_gi_hoverboots', - 'object_gi_m_arrow', - 'object_ds2', - 'object_ec', - 'object_fish', - 'object_gi_sutaru', - 'object_gi_goddess', - 'object_ssh', - 'object_bigokuta', - 'object_bg', - 'object_spot05_objects', - 'object_spot12_obj', - 'object_bombiwa', - 'object_hintnuts', - 'object_rs', - 'object_spot00_break', - 'object_gla', - 'object_shopnuts', - 'object_geldb', - 'object_gr', - 'object_dog', - 'object_jya_iron', - 'object_jya_door', - 'object_spot01_objects2', - 'object_spot11_obj', - 'object_kibako2', - 'object_dns', - 'object_dnk', - 'object_gi_fire', - 'object_gi_insect', - 'object_gi_butterfly', - 'object_gi_ghost', - 'object_gi_soul', - 'object_bowl', - 'object_po_field', - 'object_demo_kekkai', - 'object_efc_doughnut', - 'object_gi_dekupouch', - 'object_ganon_anime1', - 'object_ganon_anime2', - 'object_ganon_anime3', - 'object_gi_rupy', - 'object_spot01_matoya', - 'object_spot01_matoyab', - 'object_po_composer', - 'object_mu', - 'object_wf', - 'object_skb', - 'object_gj', - 'object_geff', - 'object_haka_door', - 'object_gs', - 'object_ps', - 'object_bwall', - 'object_crow', - 'object_cow', - 'object_cob', - 'object_gi_sword_1', - 'object_door_killer', - 'object_ouke_haka', - 'object_timeblock', - 'object_zl4', - 'g_pn_01', - 'g_pn_02', - 'g_pn_03', - 'g_pn_04', - 'g_pn_05', - 'g_pn_06', - 'g_pn_07', - 'g_pn_08', - 'g_pn_09', - 'g_pn_10', - 'g_pn_11', - 'g_pn_12', - 'g_pn_13', - 'g_pn_14', - 'g_pn_15', - 'g_pn_16', - 'g_pn_17', - 'g_pn_18', - 'g_pn_19', - 'g_pn_20', - 'g_pn_21', - 'g_pn_22', - 'g_pn_23', - 'g_pn_24', - 'g_pn_25', - 'g_pn_26', - 'g_pn_27', - 'g_pn_28', - 'g_pn_29', - 'g_pn_30', - 'g_pn_31', - 'g_pn_32', - 'g_pn_33', - 'g_pn_34', - 'g_pn_35', - 'g_pn_36', - 'g_pn_37', - 'g_pn_38', - 'g_pn_39', - 'g_pn_40', - 'g_pn_41', - 'g_pn_42', - 'g_pn_43', - 'g_pn_44', - 'g_pn_45', - 'g_pn_46', - 'g_pn_47', - 'g_pn_48', - 'g_pn_49', - 'g_pn_50', - 'g_pn_51', - 'g_pn_52', - 'g_pn_53', - 'g_pn_54', - 'g_pn_55', - 'g_pn_56', - 'g_pn_57', - 'z_select_static', - 'nintendo_rogo_static', - 'title_static', - 'parameter_static', - 'vr_fine0_static', - 'vr_fine0_pal_static', - 'vr_fine1_static', - 'vr_fine1_pal_static', - 'vr_fine2_static', - 'vr_fine2_pal_static', - 'vr_fine3_static', - 'vr_fine3_pal_static', - 'vr_cloud0_static', - 'vr_cloud0_pal_static', - 'vr_cloud1_static', - 'vr_cloud1_pal_static', - 'vr_cloud2_static', - 'vr_cloud2_pal_static', - 'vr_cloud3_static', - 'vr_cloud3_pal_static', - 'vr_holy0_static', - 'vr_holy0_pal_static', - 'vr_holy1_static', - 'vr_holy1_pal_static', - 'vr_MDVR_static', - 'vr_MDVR_pal_static', - 'vr_MNVR_static', - 'vr_MNVR_pal_static', - 'vr_RUVR_static', - 'vr_RUVR_pal_static', - 'vr_LHVR_static', - 'vr_LHVR_pal_static', - 'vr_KHVR_static', - 'vr_KHVR_pal_static', - 'vr_K3VR_static', - 'vr_K3VR_pal_static', - 'vr_K4VR_static', - 'vr_K4VR_pal_static', - 'vr_K5VR_static', - 'vr_K5VR_pal_static', - 'vr_SP1a_static', - 'vr_SP1a_pal_static', - 'vr_MLVR_static', - 'vr_MLVR_pal_static', - 'vr_KKRVR_static', - 'vr_KKRVR_pal_static', - 'vr_KR3VR_static', - 'vr_KR3VR_pal_static', - 'vr_IPVR_static', - 'vr_IPVR_pal_static', - 'vr_KSVR_static', - 'vr_KSVR_pal_static', - 'vr_GLVR_static', - 'vr_GLVR_pal_static', - 'vr_ZRVR_static', - 'vr_ZRVR_pal_static', - 'vr_DGVR_static', - 'vr_DGVR_pal_static', - 'vr_ALVR_static', - 'vr_ALVR_pal_static', - 'vr_NSVR_static', - 'vr_NSVR_pal_static', - 'vr_LBVR_static', - 'vr_LBVR_pal_static', - 'vr_TTVR_static', - 'vr_TTVR_pal_static', - 'vr_FCVR_static', - 'vr_FCVR_pal_static', - 'elf_message_field', - 'elf_message_ydan', - 'ydan_scene', -'ydan_room_0', -'ydan_room_1', -'ydan_room_2', -'ydan_room_3', -'ydan_room_4', -'ydan_room_5', -'ydan_room_6', -'ydan_room_7', -'ydan_room_8', -'ydan_room_9', -'ydan_room_10', -'ydan_room_11', -'ddan_scene', -'ddan_room_0', -'ddan_room_1', -'ddan_room_2', -'ddan_room_3', -'ddan_room_4', -'ddan_room_5', -'ddan_room_6', -'ddan_room_7', -'ddan_room_8', -'ddan_room_9', -'ddan_room_10', -'ddan_room_11', -'ddan_room_12', -'ddan_room_13', -'ddan_room_14', -'ddan_room_15', -'ddan_room_16', -'bdan_scene', -'bdan_room_0', -'bdan_room_1', -'bdan_room_2', -'bdan_room_3', -'bdan_room_4', -'bdan_room_5', -'bdan_room_6', -'bdan_room_7', -'bdan_room_8', -'bdan_room_9', -'bdan_room_10', -'bdan_room_11', -'bdan_room_12', -'bdan_room_13', -'bdan_room_14', -'bdan_room_15', -'Bmori1_scene', -'Bmori1_room_0', -'Bmori1_room_1', -'Bmori1_room_2', -'Bmori1_room_3', -'Bmori1_room_4', -'Bmori1_room_5', -'Bmori1_room_6', -'Bmori1_room_7', -'Bmori1_room_8', -'Bmori1_room_9', -'Bmori1_room_10', -'Bmori1_room_11', -'Bmori1_room_12', -'Bmori1_room_13', -'Bmori1_room_14', -'Bmori1_room_15', -'Bmori1_room_16', -'Bmori1_room_17', -'Bmori1_room_18', -'Bmori1_room_19', -'Bmori1_room_20', -'Bmori1_room_21', -'Bmori1_room_22', -'HIDAN_scene', -'HIDAN_room_0', -'HIDAN_room_1', -'HIDAN_room_2', -'HIDAN_room_3', -'HIDAN_room_4', -'HIDAN_room_5', -'HIDAN_room_6', -'HIDAN_room_7', -'HIDAN_room_8', -'HIDAN_room_9', -'HIDAN_room_10', -'HIDAN_room_11', -'HIDAN_room_12', -'HIDAN_room_13', -'HIDAN_room_14', -'HIDAN_room_15', -'HIDAN_room_16', -'HIDAN_room_17', -'HIDAN_room_18', -'HIDAN_room_19', -'HIDAN_room_20', -'HIDAN_room_21', -'HIDAN_room_22', -'HIDAN_room_23', -'HIDAN_room_24', -'HIDAN_room_25', -'HIDAN_room_26', -'MIZUsin_scene', -'MIZUsin_room_0', -'MIZUsin_room_1', -'MIZUsin_room_2', -'MIZUsin_room_3', -'MIZUsin_room_4', -'MIZUsin_room_5', -'MIZUsin_room_6', -'MIZUsin_room_7', -'MIZUsin_room_8', -'MIZUsin_room_9', -'MIZUsin_room_10', -'MIZUsin_room_11', -'MIZUsin_room_12', -'MIZUsin_room_13', -'MIZUsin_room_14', -'MIZUsin_room_15', -'MIZUsin_room_16', -'MIZUsin_room_17', -'MIZUsin_room_18', -'MIZUsin_room_19', -'MIZUsin_room_20', -'MIZUsin_room_21', -'MIZUsin_room_22', -'jyasinzou_scene', -'jyasinzou_room_0', -'jyasinzou_room_1', -'jyasinzou_room_2', -'jyasinzou_room_3', -'jyasinzou_room_4', -'jyasinzou_room_5', -'jyasinzou_room_6', -'jyasinzou_room_7', -'jyasinzou_room_8', -'jyasinzou_room_9', -'jyasinzou_room_10', -'jyasinzou_room_11', -'jyasinzou_room_12', -'jyasinzou_room_13', -'jyasinzou_room_14', -'jyasinzou_room_15', -'jyasinzou_room_16', -'jyasinzou_room_17', -'jyasinzou_room_18', -'jyasinzou_room_19', -'jyasinzou_room_20', -'jyasinzou_room_21', -'jyasinzou_room_22', -'jyasinzou_room_23', -'jyasinzou_room_24', -'jyasinzou_room_25', -'jyasinzou_room_26', -'jyasinzou_room_27', -'jyasinzou_room_28', -'HAKAdan_scene', -'HAKAdan_room_0', -'HAKAdan_room_1', -'HAKAdan_room_2', -'HAKAdan_room_3', -'HAKAdan_room_4', -'HAKAdan_room_5', -'HAKAdan_room_6', -'HAKAdan_room_7', -'HAKAdan_room_8', -'HAKAdan_room_9', -'HAKAdan_room_10', -'HAKAdan_room_11', -'HAKAdan_room_12', -'HAKAdan_room_13', -'HAKAdan_room_14', -'HAKAdan_room_15', -'HAKAdan_room_16', -'HAKAdan_room_17', -'HAKAdan_room_18', -'HAKAdan_room_19', -'HAKAdan_room_20', -'HAKAdan_room_21', -'HAKAdan_room_22', -'HAKAdanCH_scene', -'HAKAdanCH_room_0', -'HAKAdanCH_room_1', -'HAKAdanCH_room_2', -'HAKAdanCH_room_3', -'HAKAdanCH_room_4', -'HAKAdanCH_room_5', -'HAKAdanCH_room_6', -'ice_doukutu_scene', -'ice_doukutu_room_0', -'ice_doukutu_room_1', -'ice_doukutu_room_2', -'ice_doukutu_room_3', -'ice_doukutu_room_4', -'ice_doukutu_room_5', -'ice_doukutu_room_6', -'ice_doukutu_room_7', -'ice_doukutu_room_8', -'ice_doukutu_room_9', -'ice_doukutu_room_10', -'ice_doukutu_room_11', -'men_scene', -'men_room_0', -'men_room_1', -'men_room_2', -'men_room_3', -'men_room_4', -'men_room_5', -'men_room_6', -'men_room_7', -'men_room_8', -'men_room_9', -'men_room_10', -'ganontika_scene', -'ganontika_room_0', -'ganontika_room_1', -'ganontika_room_2', -'ganontika_room_3', -'ganontika_room_4', -'ganontika_room_5', -'ganontika_room_6', -'ganontika_room_7', -'ganontika_room_8', -'ganontika_room_9', -'ganontika_room_10', -'ganontika_room_11', -'ganontika_room_12', -'ganontika_room_13', -'ganontika_room_14', -'ganontika_room_15', -'ganontika_room_16', -'ganontika_room_17', -'ganontika_room_18', -'ganontika_room_19', -'spot00_scene', -'spot00_room_0', -'spot01_scene', -'spot01_room_0', -'spot02_scene', -'spot02_room_0', -'spot02_room_1', -'spot03_scene', -'spot03_room_0', -'spot03_room_1', -'spot04_scene', -'spot04_room_0', -'spot04_room_1', -'spot04_room_2', -'spot05_scene', -'spot05_room_0', -'spot06_scene', -'spot06_room_0', -'spot07_scene', -'spot07_room_0', -'spot07_room_1', -'spot08_scene', -'spot08_room_0', -'spot09_scene', -'spot09_room_0', -'spot10_scene', -'spot10_room_0', -'spot10_room_1', -'spot10_room_2', -'spot10_room_3', -'spot10_room_4', -'spot10_room_5', -'spot10_room_6', -'spot10_room_7', -'spot10_room_8', -'spot10_room_9', -'spot11_scene', -'spot11_room_0', -'spot12_scene', -'spot12_room_0', -'spot12_room_1', -'spot13_scene', -'spot13_room_0', -'spot13_room_1', -'spot15_scene', -'spot15_room_0', -'spot16_scene', -'spot16_room_0', -'spot17_scene', -'spot17_room_0', -'spot17_room_1', -'spot18_scene', -'spot18_room_0', -'spot18_room_1', -'spot18_room_2', -'spot18_room_3', -'market_day_scene', -'market_day_room_0', -'market_night_scene', -'market_night_room_0', -'kenjyanoma_scene', -'kenjyanoma_room_0', -'tokinoma_scene', -'tokinoma_room_0', -'tokinoma_room_1', -'link_home_scene', -'link_home_room_0', -'kokiri_shop_scene', -'kokiri_shop_room_0', -'kokiri_home_scene', -'kokiri_home_room_0', -'kakusiana_scene', -'kakusiana_room_0', -'kakusiana_room_1', -'kakusiana_room_2', -'kakusiana_room_3', -'kakusiana_room_4', -'kakusiana_room_5', -'kakusiana_room_6', -'kakusiana_room_7', -'kakusiana_room_8', -'kakusiana_room_9', -'kakusiana_room_10', -'kakusiana_room_11', -'kakusiana_room_12', -'kakusiana_room_13', -'entra_scene', -'entra_room_0', -'moribossroom_scene', -'moribossroom_room_0', -'moribossroom_room_1', -'syatekijyou_scene', -'syatekijyou_room_0', -'shop1_scene', -'shop1_room_0', -'hairal_niwa_scene', -'hairal_niwa_room_0', -'ganon_tou_scene', -'ganon_tou_room_0', -'market_alley_scene', -'market_alley_room_0', -'spot20_scene', -'spot20_room_0', -'market_ruins_scene', -'market_ruins_room_0', -'entra_n_scene', -'entra_n_room_0', -'enrui_scene', -'enrui_room_0', -'market_alley_n_scene', -'market_alley_n_room_0', -'hiral_demo_scene', -'hiral_demo_room_0', -'kokiri_home3_scene', -'kokiri_home3_room_0', -'malon_stable_scene', -'malon_stable_room_0', -'kakariko_scene', -'kakariko_room_0', -'bdan_boss_scene', -'bdan_boss_room_0', -'bdan_boss_room_1', -'FIRE_bs_scene', -'FIRE_bs_room_0', -'FIRE_bs_room_1', -'hut_scene', -'hut_room_0', -'daiyousei_izumi_scene', -'daiyousei_izumi_room_0', -'hakaana_scene', -'hakaana_room_0', -'yousei_izumi_tate_scene', -'yousei_izumi_tate_room_0', -'yousei_izumi_yoko_scene', -'yousei_izumi_yoko_room_0', -'golon_scene', -'golon_room_0', -'zoora_scene', -'zoora_room_0', -'drag_scene', -'drag_room_0', -'alley_shop_scene', -'alley_shop_room_0', -'night_shop_scene', -'night_shop_room_0', -'impa_scene', -'impa_room_0', -'labo_scene', -'labo_room_0', -'tent_scene', -'tent_room_0', -'nakaniwa_scene', -'nakaniwa_room_0', -'ddan_boss_scene', -'ddan_boss_room_0', -'ddan_boss_room_1', -'ydan_boss_scene', -'ydan_boss_room_0', -'ydan_boss_room_1', -'HAKAdan_bs_scene', -'HAKAdan_bs_room_0', -'HAKAdan_bs_room_1', -'MIZUsin_bs_scene', -'MIZUsin_bs_room_0', -'MIZUsin_bs_room_1', -'ganon_scene', -'ganon_room_0', -'ganon_room_1', -'ganon_room_2', -'ganon_room_3', -'ganon_room_4', -'ganon_room_5', -'ganon_room_6', -'ganon_room_7', -'ganon_room_8', -'ganon_room_9', -'ganon_boss_scene', -'ganon_boss_room_0', -'jyasinboss_scene', -'jyasinboss_room_0', -'jyasinboss_room_1', -'jyasinboss_room_2', -'jyasinboss_room_3', -'kokiri_home4_scene', -'kokiri_home4_room_0', -'kokiri_home5_scene', -'kokiri_home5_room_0', -'ganon_final_scene', -'ganon_final_room_0', -'kakariko3_scene', -'kakariko3_room_0', -'hakasitarelay_scene', -'hakasitarelay_room_0', -'hakasitarelay_room_1', -'hakasitarelay_room_2', -'hakasitarelay_room_3', -'hakasitarelay_room_4', -'hakasitarelay_room_5', -'hakasitarelay_room_6', -'shrine_scene', -'shrine_room_0', -'turibori_scene', -'turibori_room_0', -'shrine_n_scene', -'shrine_n_room_0', -'shrine_r_scene', -'shrine_r_room_0', -'hakaana2_scene', -'hakaana2_room_0', -'gerudoway_scene', -'gerudoway_room_0', -'gerudoway_room_1', -'gerudoway_room_2', -'gerudoway_room_3', -'gerudoway_room_4', -'gerudoway_room_5', -'hairal_niwa_n_scene', -'hairal_niwa_n_room_0', -'bowling_scene', -'bowling_room_0', -'hakaana_ouke_scene', -'hakaana_ouke_room_0', -'hakaana_ouke_room_1', -'hakaana_ouke_room_2', -'hylia_labo_scene', -'hylia_labo_room_0', -'souko_scene', -'souko_room_0', -'souko_room_1', -'souko_room_2', -'miharigoya_scene', -'miharigoya_room_0', -'mahouya_scene', -'mahouya_room_0', -'takaraya_scene', -'takaraya_room_0', -'takaraya_room_1', -'takaraya_room_2', -'takaraya_room_3', -'takaraya_room_4', -'takaraya_room_5', -'takaraya_room_6', -'ganon_sonogo_scene', -'ganon_sonogo_room_0', -'ganon_sonogo_room_1', -'ganon_sonogo_room_2', -'ganon_sonogo_room_3', -'ganon_sonogo_room_4', -'ganon_demo_scene', -'ganon_demo_room_0', -'face_shop_scene', -'face_shop_room_0', -'kinsuta_scene', -'kinsuta_room_0', -'ganontikasonogo_scene', -'ganontikasonogo_room_0', -'ganontikasonogo_room_1', - 'bump_texture_static', - 'anime_model_1_static', - 'anime_model_2_static', - 'anime_model_3_static', - 'anime_model_4_static', - 'anime_model_5_static', - 'anime_model_6_static', - 'anime_texture_1_static', - 'anime_texture_2_static', - 'anime_texture_3_static', - 'anime_texture_4_static', - 'anime_texture_5_static', - 'anime_texture_6_static', - 'softsprite_matrix_static', -] - -romData = None - - -def initialize_worker(rom_data): - global romData - romData = rom_data - -def read_uint32_be(offset): - return struct.unpack('>I', romData[offset:offset+4])[0] - -def write_output_file(name, offset, size): - try: - with open(name, 'wb') as f: - f.write(romData[offset:offset+size]) - except IOError: - print('failed to write file ' + name) - -def ExtractFunc(i): - filename = 'baserom/' + FILE_NAMES[i] - entryOffset = FILE_TABLE_OFFSET + 16 * i - - virtStart = read_uint32_be(entryOffset + 0) - virtEnd = read_uint32_be(entryOffset + 4) - physStart = read_uint32_be(entryOffset + 8) - physEnd = read_uint32_be(entryOffset + 12) - - if physEnd == 0: # uncompressed - compressed = False - size = virtEnd - virtStart - else: # compressed - compressed = True - size = physEnd - physStart - - print('extracting ' + filename + " (0x%08X, 0x%08X)" % (virtStart, virtEnd)) - write_output_file(filename, physStart, size) - if compressed: - os.system('tools/yaz0 -d ' + filename + ' ' + filename) - -##################################################################### - -def main(): - try: - os.mkdir('baserom') - except: - pass - - # read baserom data - try: - with open(ROM_FILE_NAME, 'rb') as f: - rom_data = f.read() - except IOError: - print('failed to read ' + ROM_FILE_NAME) - sys.exit(1) - - # extract files - num_cores = cpu_count() - print("Extracting baserom with " + str(num_cores) + " CPU cores.") - with Pool(num_cores, initialize_worker, (rom_data,)) as p: - p.map(ExtractFunc, range(len(FILE_NAMES))) - -if __name__ == "__main__": - main() diff --git a/OTRExporter/rom_chooser.py b/OTRExporter/rom_chooser.py new file mode 100644 index 000000000..5c5f875d0 --- /dev/null +++ b/OTRExporter/rom_chooser.py @@ -0,0 +1,37 @@ +import os, sys, glob + +from rom_info import Z64Rom + +def chooseROM(): + roms = [] + + for file in glob.glob("*.z64"): + if Z64Rom.isValidRom(file): + roms.append(file) + + if not (roms): + print("Error: No roms located, place one in the OTRExporter directory", file=os.sys.stderr) + sys.exit(1) + + if (len(roms) == 1): + return roms[0] + + print(str(len(roms))+ " roms found, please select one by pressing 1-"+str(len(roms))) + + for i in range(len(roms)): + print(str(i+1)+ ". " + roms[i]) + + while(1): + try: + selection = int(input()) + except: + print("Bad input. Try again with the number keys.") + continue + + if (selection < 1 or selection > len(roms)): + print("Bad input. Try again.") + continue + + else: break + + return roms[selection - 1] diff --git a/OTRExporter/rom_info.py b/OTRExporter/rom_info.py new file mode 100644 index 000000000..3edc8b0f9 --- /dev/null +++ b/OTRExporter/rom_info.py @@ -0,0 +1,87 @@ +from enum import Enum +from tabnanny import check +import struct + +class Checksums(Enum): + OOT_NTSC_10 = "EC7011B7" + OOT_NTSC_11 = "D43DA81F" + OOT_NTSC_12 = "693BA2AE" + OOT_PAL_10 = "B044B569" + OOT_PAL_11 = "B2055FBD" + OOT_NTSC_JP_GC_CE = "F7F52DB8" + OOT_NTSC_JP_GC = "F611F4BA" + OOT_NTSC_US_GC = "F3DD35BA" + OOT_PAL_GC = "09465AC3" + OOT_NTSC_JP_MQ = "F43B45BA" + OOT_NTSC_US_MQ = "F034001A" + OOT_PAL_MQ = "1D4136F3" + OOT_PAL_GC_DBG1 = "871E1C92" + OOT_PAL_GC_DBG2 = "87121EFE" + OOT_PAL_GC_MQ_DBG = "917D18F6" + OOT_IQUE_TW = "3D81FB3E" + OOT_IQUE_CN = "B1E1E07B" + OOT_UNKNOWN = "FFFFFFFF" + + @classmethod + def has_value(self, value): + return value in self._value2member_map_ + +class RomVersion: + def __init__(self, file_table_path, file_table_off, xml_ver): + self.file_table_off = file_table_off + self.xml_ver = xml_ver + with open(file_table_path, 'r') as f: + self.file_table = [line.strip('\n') for line in f] + +ROM_INFO_TABLE = dict() +ROM_INFO_TABLE[Checksums.OOT_PAL_GC] = RomVersion("CFG/filelists/gamecube_pal.txt", 0x7170, "GC_NMQ_PAL_F") +ROM_INFO_TABLE[Checksums.OOT_PAL_GC_DBG1] = RomVersion("CFG/filelists/dbg.txt", 0x12F70, "GC_NMQ_D") + +class RomDmaEntry: + def __init__(self, rom, i): + + off = rom.version.file_table_off + 16 * i + + (self.virtStart, \ + self.virtEnd, \ + self.physStart, \ + self.physEnd) = struct.unpack('>IIII', rom.rom_data[off:off+4*4]) + + self.compressed = self.physEnd != 0 + self.size = self.physEnd - self.physStart \ + if self.compressed \ + else self.virtEnd - self.virtStart + self.name = rom.version.file_table[i] + + +class Z64Rom: + def __init__(self, file_path): + self.file_path = file_path + with open(file_path, 'rb') as f: + self.rom_data = f.read() + + self.is_valid = len(self.rom_data) > 20 * 1024 * 1024 + + if not self.is_valid: + return + + # get checkum + checksum_str = self.rom_data[16:16+4].hex().upper() + self.checksum = Checksums(checksum_str) if Checksums.has_value(checksum_str) else Checksums.OOT_UNKNOWN + + if self.checksum == Checksums.OOT_UNKNOWN: + self.is_valid = False + return + + # get rom version + self.version = ROM_INFO_TABLE[self.checksum] + + def getDmaEntryByIndex(self, i): + return RomDmaEntry(self, i) + + def readDmaEntry(self, entry): + return self.rom_data[entry.physStart:entry.physStart + entry.size] + + @staticmethod + def isValidRom(rom_path): + return Z64Rom(rom_path).is_valid diff --git a/OTRGui/src/game/game.cpp b/OTRGui/src/game/game.cpp index 88bd7201f..e995b339c 100644 --- a/OTRGui/src/game/game.cpp +++ b/OTRGui/src/game/game.cpp @@ -67,13 +67,13 @@ void OTRGame::init(){ mat.shader = shader; } - if(fs::exists("soh.exe") && !fs::exists("oot.otr")) { + if((fs::exists("soh.exe") || fs::exists("soh.elf")) && !fs::exists("oot.otr")) { hide_second_btn = true; sohFolder = "."; } } -void ExtractRom() +void ExtractRom() { WriteResult result; @@ -220,4 +220,4 @@ void setCurrentStep(const std::string& step) { void OTRGame::exit(){ -} \ No newline at end of file +} diff --git a/README.md b/README.md index 1cbe0cd3f..3ce3fb21b 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ If you still cannot get the tool to work, join our [Discord Server](https://disc ### Running The Ship of Harkinian -Launch the game. If the window immediately closes, or if there are visual artifacts, you may have selected the wrong rom in the OTRGui tool. +Launch the game. If the window immediately closes, or if there are visual artifacts, you may have selected the wrong rom in the OTRGui tool. Currently, DirectX 11 and OpenGL is supported. Change the renderer by opening the `shipofharkinian.ini` configuration file in notepad and add `sdl` to `gfx backend` for OpenGL or leave blank for DirectX. diff --git a/ZAPDTR/ExporterTest/CollisionExporter.cpp b/ZAPDTR/ExporterTest/CollisionExporter.cpp index e00f5c1b0..4ab8a62cd 100644 --- a/ZAPDTR/ExporterTest/CollisionExporter.cpp +++ b/ZAPDTR/ExporterTest/CollisionExporter.cpp @@ -1,6 +1,6 @@ #include "CollisionExporter.h" -void ExporterExample_Collision::Save(ZResource* res, [[maybe_unused]] fs::path outPath, +void ExporterExample_Collision::Save(ZResource* res, [[maybe_unused]] const fs::path& outPath, BinaryWriter* writer) { ZCollisionHeader* col = (ZCollisionHeader*)res; diff --git a/ZAPDTR/ExporterTest/CollisionExporter.h b/ZAPDTR/ExporterTest/CollisionExporter.h index 5f48e6557..1dc50634e 100644 --- a/ZAPDTR/ExporterTest/CollisionExporter.h +++ b/ZAPDTR/ExporterTest/CollisionExporter.h @@ -6,5 +6,5 @@ class ExporterExample_Collision : public ZResourceExporter { public: - void Save(ZResource* res, fs::path outPath, BinaryWriter* writer) override; + void Save(ZResource* res, const fs::path& outPath, BinaryWriter* writer) override; }; \ No newline at end of file diff --git a/ZAPDTR/ExporterTest/RoomExporter.cpp b/ZAPDTR/ExporterTest/RoomExporter.cpp index 6c5552d8f..bc7ef3727 100644 --- a/ZAPDTR/ExporterTest/RoomExporter.cpp +++ b/ZAPDTR/ExporterTest/RoomExporter.cpp @@ -20,7 +20,7 @@ #include "ZRoom/Commands/SetTimeSettings.h" #include "ZRoom/Commands/SetWind.h" -void ExporterExample_Room::Save(ZResource* res, fs::path outPath, BinaryWriter* writer) +void ExporterExample_Room::Save(ZResource* res, const fs::path& outPath, BinaryWriter* writer) { ZRoom* room = dynamic_cast(res); diff --git a/ZAPDTR/ExporterTest/RoomExporter.h b/ZAPDTR/ExporterTest/RoomExporter.h index ee531dc87..d8f7eae01 100644 --- a/ZAPDTR/ExporterTest/RoomExporter.h +++ b/ZAPDTR/ExporterTest/RoomExporter.h @@ -6,5 +6,5 @@ class ExporterExample_Room : public ZResourceExporter { public: - void Save(ZResource* res, fs::path outPath, BinaryWriter* writer) override; + void Save(ZResource* res, const fs::path& outPath, BinaryWriter* writer) override; }; \ No newline at end of file diff --git a/ZAPDTR/ExporterTest/TextureExporter.cpp b/ZAPDTR/ExporterTest/TextureExporter.cpp index 6488bed3a..58d0964d3 100644 --- a/ZAPDTR/ExporterTest/TextureExporter.cpp +++ b/ZAPDTR/ExporterTest/TextureExporter.cpp @@ -1,7 +1,7 @@ #include "TextureExporter.h" #include "../ZAPD/ZFile.h" -void ExporterExample_Texture::Save(ZResource* res, [[maybe_unused]] fs::path outPath, +void ExporterExample_Texture::Save(ZResource* res, [[maybe_unused]] const fs::path& outPath, BinaryWriter* writer) { ZTexture* tex = (ZTexture*)res; diff --git a/ZAPDTR/ExporterTest/TextureExporter.h b/ZAPDTR/ExporterTest/TextureExporter.h index 41c4e79be..f3922cac1 100644 --- a/ZAPDTR/ExporterTest/TextureExporter.h +++ b/ZAPDTR/ExporterTest/TextureExporter.h @@ -7,5 +7,5 @@ class ExporterExample_Texture : public ZResourceExporter { public: - void Save(ZResource* res, fs::path outPath, BinaryWriter* writer) override; + void Save(ZResource* res, const fs::path& outPath, BinaryWriter* writer) override; }; \ No newline at end of file diff --git a/ZAPDTR/Makefile b/ZAPDTR/Makefile index 2b47a8039..13f0dce20 100644 --- a/ZAPDTR/Makefile +++ b/ZAPDTR/Makefile @@ -44,7 +44,8 @@ ifneq ($(DEPRECATION_ON),0) endif # CXXFLAGS += -DTEXTURE_DEBUG -LDFLAGS := -lm -ldl -lpng +LDFLAGS := -lm -ldl -lpng \ + -L../external -L../libultraship -lz -lbz2 -pthread -lpulse -lultraship -lstorm -lSDL2 -lGLEW -lGL -lX11 # Use LLD if available. Set LLD=0 to not use it ifeq ($(shell command -v ld.lld >/dev/null 2>&1; echo $$?),0) @@ -59,9 +60,9 @@ UNAME := $(shell uname) UNAMEM := $(shell uname -m) ifneq ($(UNAME), Darwin) LDFLAGS += -Wl,-export-dynamic -lstdc++fs - EXPORTERS := -Wl,--whole-archive ExporterTest/ExporterTest.a -Wl,--no-whole-archive + EXPORTERS := -Wl,--whole-archive ../OTRExporter/OTRExporter/OTRExporter.a -Wl,--no-whole-archive else - EXPORTERS := -Wl,-force_load ExporterTest/ExporterTest.a + EXPORTERS := -Wl,-force_load ../OTRExporter/OTRExporter/OTRExporter.a ifeq ($(UNAMEM),arm64) ifeq ($(shell brew list libpng > /dev/null 2>&1; echo $$?),0) LDFLAGS += -L $(shell brew --prefix)/lib diff --git a/ZAPDTR/ZAPD/Main.cpp b/ZAPDTR/ZAPD/Main.cpp index dd53b9c67..65a65fea6 100644 --- a/ZAPDTR/ZAPD/Main.cpp +++ b/ZAPDTR/ZAPD/Main.cpp @@ -10,7 +10,7 @@ #include "ZFile.h" #include "ZTexture.h" -#if !defined(_MSC_VER) && !defined(__CYGWIN__) +#ifdef __linux__ #include #include #include @@ -28,6 +28,31 @@ //extern const char gBuildHash[]; const char gBuildHash[] = ""; +// LINUX_TODO: remove, those are because of soh <-> lus dependency problems +float divisor_num = 0.0f; + +extern "C" void Audio_SetGameVolume(int player_id, float volume) +{ + +} + + +extern "C" int ResourceMgr_OTRSigCheck(char* imgData) +{ + +} + +void DebugConsole_SaveCVars() +{ + +} + +void DebugConsole_LoadCVars() +{ + +} + + bool Parse(const fs::path& xmlFilePath, const fs::path& basePath, const fs::path& outPath, ZFileMode fileMode, int workerID); @@ -38,7 +63,7 @@ int ExtractFunc(int workerID, int fileListSize, std::string fileListItem, ZFileM volatile int numWorkersLeft = 0; -#if !defined(_MSC_VER) && !defined(__CYGWIN__) +#ifdef __linux__ #define ARRAY_COUNT(arr) (sizeof(arr) / sizeof(arr[0])) void ErrorHandler(int sig) { @@ -196,7 +221,7 @@ int main(int argc, char* argv[]) } else if (arg == "-eh") // Enable Error Handler { - #if !defined(_MSC_VER) && !defined(__CYGWIN__) +#ifdef __linux__ signal(SIGSEGV, ErrorHandler); signal(SIGABRT, ErrorHandler); #else @@ -302,7 +327,7 @@ int main(int argc, char* argv[]) ctpl::thread_pool pool(num_threads / 2); bool parseSuccessful; - + auto start = std::chrono::steady_clock::now(); int fileListSize = fileList.size(); Globals::Instance->singleThreaded = false; @@ -453,6 +478,7 @@ int ExtractFunc(int workerID, int fileListSize, std::string fileListItem, ZFileM numWorkersLeft--; } + return 0; } bool Parse(const fs::path& xmlFilePath, const fs::path& basePath, const fs::path& outPath, diff --git a/ZAPDTR/ZAPD/OutputFormatter.cpp b/ZAPDTR/ZAPD/OutputFormatter.cpp index 7fac434b2..362ef98fc 100644 --- a/ZAPDTR/ZAPD/OutputFormatter.cpp +++ b/ZAPDTR/ZAPD/OutputFormatter.cpp @@ -96,7 +96,7 @@ int OutputFormatter::Write(const std::string& buf) return Write(buf.data(), buf.size()); } -__declspec(thread) OutputFormatter* OutputFormatter::Instance; +thread_local OutputFormatter* OutputFormatter::Instance; int OutputFormatter::WriteStatic(const char* buf, int count) { diff --git a/ZAPDTR/ZAPD/OutputFormatter.h b/ZAPDTR/ZAPD/OutputFormatter.h index f008df2cb..03abfdb96 100644 --- a/ZAPDTR/ZAPD/OutputFormatter.h +++ b/ZAPDTR/ZAPD/OutputFormatter.h @@ -25,7 +25,7 @@ private: void Flush(); - static __declspec(thread) OutputFormatter* Instance; + static thread_local OutputFormatter* Instance; static int WriteStatic(const char* buf, int count); public: diff --git a/ZAPDTR/ZAPD/ZDisplayList.cpp b/ZAPDTR/ZAPD/ZDisplayList.cpp index 93269b65e..406245b33 100644 --- a/ZAPDTR/ZAPD/ZDisplayList.cpp +++ b/ZAPDTR/ZAPD/ZDisplayList.cpp @@ -15,6 +15,124 @@ #include "WarningHandler.h" #include "gfxd.h" + +#define G_MDSFT_ALPHACOMPARE 0 +#define G_MDSFT_ZSRCSEL 2 +#define G_MDSFT_RENDERMODE 3 +#define G_MDSFT_BLENDER 16 + +#define G_RM_FOG_SHADE_A 0xC8000000 +#define G_RM_FOG_PRIM_A 0xC4000000 +#define G_RM_PASS 0x0C080000 +#define G_RM_AA_ZB_OPA_SURF 0x442078 +#define G_RM_AA_ZB_OPA_SURF2 0x112078 +#define G_RM_AA_ZB_XLU_SURF 0x4049D8 +#define G_RM_AA_ZB_XLU_SURF2 0x1049D8 +#define G_RM_AA_ZB_OPA_DECAL 0x442D58 +#define G_RM_AA_ZB_OPA_DECAL2 0x112D58 +#define G_RM_AA_ZB_XLU_DECAL 0x404DD8 +#define G_RM_AA_ZB_XLU_DECAL2 0x104DD8 +#define G_RM_AA_ZB_OPA_INTER 0x442478 +#define G_RM_AA_ZB_OPA_INTER2 0x112478 +#define G_RM_AA_ZB_XLU_INTER 0x4045D8 +#define G_RM_AA_ZB_XLU_INTER2 0x1045D8 +#define G_RM_AA_ZB_XLU_LINE 0x407858 +#define G_RM_AA_ZB_XLU_LINE2 0x107858 +#define G_RM_AA_ZB_DEC_LINE 0x407F58 +#define G_RM_AA_ZB_DEC_LINE2 0x107F58 +#define G_RM_AA_ZB_TEX_EDGE 0x443078 +#define G_RM_AA_ZB_TEX_EDGE2 0x113078 +#define G_RM_AA_ZB_TEX_INTER 0x443478 +#define G_RM_AA_ZB_TEX_INTER2 0x113478 +#define G_RM_AA_ZB_SUB_SURF 0x442878 +#define G_RM_AA_ZB_SUB_SURF2 0x112278 +#define G_RM_AA_ZB_PCL_SURF 0x40007B +#define G_RM_AA_ZB_PCL_SURF2 0x10007B +#define G_RM_AA_ZB_OPA_TERR 0x402078 +#define G_RM_AA_ZB_OPA_TERR2 0x102078 +#define G_RM_AA_ZB_TEX_TERR 0x403078 +#define G_RM_AA_ZB_TEX_TERR2 0x103078 +#define G_RM_AA_ZB_SUB_TERR 0x402278 +#define G_RM_AA_ZB_SUB_TERR2 0x102278 +#define G_RM_RA_ZB_OPA_SURF 0x442038 +#define G_RM_RA_ZB_OPA_SURF2 0x112038 +#define G_RM_RA_ZB_OPA_DECAL 0x442D18 +#define G_RM_RA_ZB_OPA_DECAL2 0x112D18 +#define G_RM_RA_ZB_OPA_INTER 0x442438 +#define G_RM_RA_ZB_OPA_INTER2 0x112438 +#define G_RM_AA_OPA_SURF 0x442048 +#define G_RM_AA_OPA_SURF2 0x112048 +#define G_RM_AA_XLU_SURF 0x4041C8 +#define G_RM_AA_XLU_SURF2 0x1041C8 +#define G_RM_AA_XLU_LINE 0x407048 +#define G_RM_AA_XLU_LINE2 0x107048 +#define G_RM_AA_DEC_LINE 0x407248 +#define G_RM_AA_DEC_LINE2 0x107248 +#define G_RM_AA_TEX_EDGE 0x443048 +#define G_RM_AA_TEX_EDGE2 0x113048 +#define G_RM_AA_SUB_SURF 0x442248 +#define G_RM_AA_SUB_SURF2 0x112248 +#define G_RM_AA_PCL_SURF 0x40004B +#define G_RM_AA_PCL_SURF2 0x10004B +#define G_RM_AA_OPA_TERR 0x402048 +#define G_RM_AA_OPA_TERR2 0x102048 +#define G_RM_AA_TEX_TERR 0x403048 +#define G_RM_AA_TEX_TERR2 0x103048 +#define G_RM_AA_SUB_TERR 0x402248 +#define G_RM_AA_SUB_TERR2 0x102248 +#define G_RM_RA_OPA_SURF 0x442008 +#define G_RM_RA_OPA_SURF2 0x112008 +#define G_RM_ZB_OPA_SURF 0x442230 +#define G_RM_ZB_OPA_SURF2 0x112230 +#define G_RM_ZB_XLU_SURF 0x404A50 +#define G_RM_ZB_XLU_SURF2 0x104A50 +#define G_RM_ZB_OPA_DECAL 0x442E10 +#define G_RM_ZB_OPA_DECAL2 0x112E10 +#define G_RM_ZB_XLU_DECAL 0x404E50 +#define G_RM_ZB_XLU_DECAL2 0x104E50 +#define G_RM_ZB_CLD_SURF 0x404B50 +#define G_RM_ZB_CLD_SURF2 0x104B50 +#define G_RM_ZB_OVL_SURF 0x404F50 +#define G_RM_ZB_OVL_SURF2 0x104F50 +#define G_RM_ZB_PCL_SURF 0x0C080233 +#define G_RM_ZB_PCL_SURF2 0x03020233 +#define G_RM_OPA_SURF 0x0C084000 +#define G_RM_OPA_SURF2 0x03024000 +#define G_RM_XLU_SURF 0x00404200 +#define G_RM_XLU_SURF2 0x00104240 +#define G_RM_CLD_SURF 0x00404340 +#define G_RM_CLD_SURF2 0x00104340 +#define G_RM_TEX_EDGE 0x0C087008 +#define G_RM_TEX_EDGE2 0x03027008 +#define G_RM_PCL_SURF 0x0C084203 +#define G_RM_PCL_SURF2 0x03024203 +#define G_RM_ADD 0x04484340 +#define G_RM_ADD2 0x01124340 +#define G_RM_NOOP 0x00000000 +#define G_RM_NOOP2 0x00000000 +#define G_RM_VISCVG 0x0C844040 +#define G_RM_VISCVG2 0x03214040 +#define G_RM_OPA_CI 0x0C080000 +#define G_RM_OPA_CI2 0x03020000 + +#define AA_EN 0x8 +#define Z_CMP 0x10 +#define Z_UPD 0x20 +#define IM_RD 0x40 +#define CLR_ON_CVG 0x80 +#define CVG_DST_CLAMP 0 +#define CVG_DST_WRAP 0x100 +#define CVG_DST_FULL 0x200 +#define CVG_DST_SAVE 0x300 +#define ZMODE_OPA 0 +#define ZMODE_INTER 0x400 +#define ZMODE_XLU 0x800 +#define ZMODE_DEC 0xc00 +#define CVG_X_ALPHA 0x1000 +#define ALPHA_CVG_SEL 0x2000 +#define FORCE_BL 0x4000 +#define TEX_EDGE 0x0000 + REGISTER_ZFILENODE(DList, ZDisplayList); ZDisplayList::ZDisplayList(ZFile* nParent) : ZResource(nParent) diff --git a/ZAPDTR/ZAPD/ZDisplayList.h b/ZAPDTR/ZAPD/ZDisplayList.h index 96808315d..f3828cc79 100644 --- a/ZAPDTR/ZAPD/ZDisplayList.h +++ b/ZAPDTR/ZAPD/ZDisplayList.h @@ -166,122 +166,6 @@ enum class OoTSegments FrameBuffer = 16, }; -#define G_MDSFT_ALPHACOMPARE 0 -#define G_MDSFT_ZSRCSEL 2 -#define G_MDSFT_RENDERMODE 3 -#define G_MDSFT_BLENDER 16 - -#define G_RM_FOG_SHADE_A 0xC8000000 -#define G_RM_FOG_PRIM_A 0xC4000000 -#define G_RM_PASS 0x0C080000 -#define G_RM_AA_ZB_OPA_SURF 0x442078 -#define G_RM_AA_ZB_OPA_SURF2 0x112078 -#define G_RM_AA_ZB_XLU_SURF 0x4049D8 -#define G_RM_AA_ZB_XLU_SURF2 0x1049D8 -#define G_RM_AA_ZB_OPA_DECAL 0x442D58 -#define G_RM_AA_ZB_OPA_DECAL2 0x112D58 -#define G_RM_AA_ZB_XLU_DECAL 0x404DD8 -#define G_RM_AA_ZB_XLU_DECAL2 0x104DD8 -#define G_RM_AA_ZB_OPA_INTER 0x442478 -#define G_RM_AA_ZB_OPA_INTER2 0x112478 -#define G_RM_AA_ZB_XLU_INTER 0x4045D8 -#define G_RM_AA_ZB_XLU_INTER2 0x1045D8 -#define G_RM_AA_ZB_XLU_LINE 0x407858 -#define G_RM_AA_ZB_XLU_LINE2 0x107858 -#define G_RM_AA_ZB_DEC_LINE 0x407F58 -#define G_RM_AA_ZB_DEC_LINE2 0x107F58 -#define G_RM_AA_ZB_TEX_EDGE 0x443078 -#define G_RM_AA_ZB_TEX_EDGE2 0x113078 -#define G_RM_AA_ZB_TEX_INTER 0x443478 -#define G_RM_AA_ZB_TEX_INTER2 0x113478 -#define G_RM_AA_ZB_SUB_SURF 0x442878 -#define G_RM_AA_ZB_SUB_SURF2 0x112278 -#define G_RM_AA_ZB_PCL_SURF 0x40007B -#define G_RM_AA_ZB_PCL_SURF2 0x10007B -#define G_RM_AA_ZB_OPA_TERR 0x402078 -#define G_RM_AA_ZB_OPA_TERR2 0x102078 -#define G_RM_AA_ZB_TEX_TERR 0x403078 -#define G_RM_AA_ZB_TEX_TERR2 0x103078 -#define G_RM_AA_ZB_SUB_TERR 0x402278 -#define G_RM_AA_ZB_SUB_TERR2 0x102278 -#define G_RM_RA_ZB_OPA_SURF 0x442038 -#define G_RM_RA_ZB_OPA_SURF2 0x112038 -#define G_RM_RA_ZB_OPA_DECAL 0x442D18 -#define G_RM_RA_ZB_OPA_DECAL2 0x112D18 -#define G_RM_RA_ZB_OPA_INTER 0x442438 -#define G_RM_RA_ZB_OPA_INTER2 0x112438 -#define G_RM_AA_OPA_SURF 0x442048 -#define G_RM_AA_OPA_SURF2 0x112048 -#define G_RM_AA_XLU_SURF 0x4041C8 -#define G_RM_AA_XLU_SURF2 0x1041C8 -#define G_RM_AA_XLU_LINE 0x407048 -#define G_RM_AA_XLU_LINE2 0x107048 -#define G_RM_AA_DEC_LINE 0x407248 -#define G_RM_AA_DEC_LINE2 0x107248 -#define G_RM_AA_TEX_EDGE 0x443048 -#define G_RM_AA_TEX_EDGE2 0x113048 -#define G_RM_AA_SUB_SURF 0x442248 -#define G_RM_AA_SUB_SURF2 0x112248 -#define G_RM_AA_PCL_SURF 0x40004B -#define G_RM_AA_PCL_SURF2 0x10004B -#define G_RM_AA_OPA_TERR 0x402048 -#define G_RM_AA_OPA_TERR2 0x102048 -#define G_RM_AA_TEX_TERR 0x403048 -#define G_RM_AA_TEX_TERR2 0x103048 -#define G_RM_AA_SUB_TERR 0x402248 -#define G_RM_AA_SUB_TERR2 0x102248 -#define G_RM_RA_OPA_SURF 0x442008 -#define G_RM_RA_OPA_SURF2 0x112008 -#define G_RM_ZB_OPA_SURF 0x442230 -#define G_RM_ZB_OPA_SURF2 0x112230 -#define G_RM_ZB_XLU_SURF 0x404A50 -#define G_RM_ZB_XLU_SURF2 0x104A50 -#define G_RM_ZB_OPA_DECAL 0x442E10 -#define G_RM_ZB_OPA_DECAL2 0x112E10 -#define G_RM_ZB_XLU_DECAL 0x404E50 -#define G_RM_ZB_XLU_DECAL2 0x104E50 -#define G_RM_ZB_CLD_SURF 0x404B50 -#define G_RM_ZB_CLD_SURF2 0x104B50 -#define G_RM_ZB_OVL_SURF 0x404F50 -#define G_RM_ZB_OVL_SURF2 0x104F50 -#define G_RM_ZB_PCL_SURF 0x0C080233 -#define G_RM_ZB_PCL_SURF2 0x03020233 -#define G_RM_OPA_SURF 0x0C084000 -#define G_RM_OPA_SURF2 0x03024000 -#define G_RM_XLU_SURF 0x00404200 -#define G_RM_XLU_SURF2 0x00104240 -#define G_RM_CLD_SURF 0x00404340 -#define G_RM_CLD_SURF2 0x00104340 -#define G_RM_TEX_EDGE 0x0C087008 -#define G_RM_TEX_EDGE2 0x03027008 -#define G_RM_PCL_SURF 0x0C084203 -#define G_RM_PCL_SURF2 0x03024203 -#define G_RM_ADD 0x04484340 -#define G_RM_ADD2 0x01124340 -#define G_RM_NOOP 0x00000000 -#define G_RM_NOOP2 0x00000000 -#define G_RM_VISCVG 0x0C844040 -#define G_RM_VISCVG2 0x03214040 -#define G_RM_OPA_CI 0x0C080000 -#define G_RM_OPA_CI2 0x03020000 - -#define AA_EN 0x8 -#define Z_CMP 0x10 -#define Z_UPD 0x20 -#define IM_RD 0x40 -#define CLR_ON_CVG 0x80 -#define CVG_DST_CLAMP 0 -#define CVG_DST_WRAP 0x100 -#define CVG_DST_FULL 0x200 -#define CVG_DST_SAVE 0x300 -#define ZMODE_OPA 0 -#define ZMODE_INTER 0x400 -#define ZMODE_XLU 0x800 -#define ZMODE_DEC 0xc00 -#define CVG_X_ALPHA 0x1000 -#define ALPHA_CVG_SEL 0x2000 -#define FORCE_BL 0x4000 -#define TEX_EDGE 0x0000 class ZDisplayList : public ZResource { diff --git a/ZAPDTR/ZAPD/ZLimb.h b/ZAPDTR/ZAPD/ZLimb.h index 53a414329..5de5276e9 100644 --- a/ZAPDTR/ZAPD/ZLimb.h +++ b/ZAPDTR/ZAPD/ZLimb.h @@ -25,19 +25,19 @@ public: ZLimbSkinType skinSegmentType = ZLimbSkinType::SkinType_0; // Skin only segptr_t skinSegment = 0; // Skin only - Struct_800A5E28 segmentStruct; // Skin only + Struct_800A5E28 segmentStruct = {0}; // Skin only // Legacy only - float legTransX, legTransY, legTransZ; // Vec3f - uint16_t rotX, rotY, rotZ; // Vec3s - segptr_t childPtr; // LegacyLimb* - segptr_t siblingPtr; // LegacyLimb* + float legTransX = 0, legTransY = 0, legTransZ = 0; // Vec3f + uint16_t rotX = 0, rotY = 0, rotZ = 0; // Vec3s + segptr_t childPtr = 0; // LegacyLimb* + segptr_t siblingPtr = 0; // LegacyLimb* segptr_t dListPtr = 0; segptr_t dList2Ptr = 0; // LOD and Curve Only - int16_t transX, transY, transZ; - uint8_t childIndex, siblingIndex; + int16_t transX = 0, transY = 0, transZ = 0; + uint8_t childIndex = 0, siblingIndex = 0; ZLimb(ZFile* nParent); diff --git a/ZAPDTR/ZAPDUtils/Utils/BitConverter.h b/ZAPDTR/ZAPDUtils/Utils/BitConverter.h index e672b97c2..708d4b537 100644 --- a/ZAPDTR/ZAPDUtils/Utils/BitConverter.h +++ b/ZAPDTR/ZAPDUtils/Utils/BitConverter.h @@ -3,6 +3,7 @@ #include #include #include +#include class BitConverter { diff --git a/ZAPDTR/ZAPDUtils/Utils/Directory.h b/ZAPDTR/ZAPDUtils/Utils/Directory.h index b1ce49699..1ced139be 100644 --- a/ZAPDTR/ZAPDUtils/Utils/Directory.h +++ b/ZAPDTR/ZAPDUtils/Utils/Directory.h @@ -52,7 +52,7 @@ public: for (auto& p : fs::recursive_directory_iterator(dir)) { if (!p.is_directory()) - lst.push_back(p.path().string()); + lst.push_back(p.path().generic_string()); } } diff --git a/ZAPDTR/ZAPDUtils/Utils/StringHelper.cpp b/ZAPDTR/ZAPDUtils/Utils/StringHelper.cpp index e2b646fd9..070fffa63 100644 --- a/ZAPDTR/ZAPDUtils/Utils/StringHelper.cpp +++ b/ZAPDTR/ZAPDUtils/Utils/StringHelper.cpp @@ -3,6 +3,10 @@ #pragma optimize("2", on) #define _CRT_SECURE_NO_WARNINGS +#ifndef _MSC_VER +#define vsprintf_s vsprintf +#endif + std::vector StringHelper::Split(std::string s, const std::string& delimiter) { std::vector result; @@ -44,7 +48,7 @@ std::string StringHelper::Replace(std::string str, const std::string& from, while (start_pos != std::string::npos) { - str.replace(start_pos, from.length(), to); + str.replace(start_pos, from.length(), to); start_pos = str.find(from); } diff --git a/libultraship/.gitignore b/libultraship/.gitignore index da0a72409..1cf3c3325 100644 --- a/libultraship/.gitignore +++ b/libultraship/.gitignore @@ -353,4 +353,6 @@ MigrationBackup/ .ionide/ !libultraship/Lib/** -libultraship/DebugObj/* \ No newline at end of file +libultraship/DebugObj/* +build/ +libultraship.a \ No newline at end of file diff --git a/libultraship/Makefile b/libultraship/Makefile index d7aafd65f..d6789db0b 100644 --- a/libultraship/Makefile +++ b/libultraship/Makefile @@ -1,15 +1,78 @@ # Only used for standalone compilation, usually inherits these from the main makefile -CXXFLAGS ?= -Wall -Wextra -O2 -g -std=c++17 + +CXX := g++ +CC := gcc +AR := ar +FORMAT := clang-format-11 + +ASAN ?= 0 +DEBUG ?= 1 +OPTFLAGS ?= -O0 +LTO ?= 0 + +WARN := -Wall -Wextra -Werror \ + -Wno-unused-variable \ + -Wno-unused-parameter \ + -Wno-unused-function \ + -Wno-parentheses \ + -Wno-narrowing \ + -Wno-missing-field-initializers + +CXXFLAGS := $(WARN) -std=c++20 -D_GNU_SOURCE -DENABLE_OPENGL -DSPDLOG_ACTIVE_LEVEL=0 -m32 +CFLAGS := $(WARN) -std=c99 -D_GNU_SOURCE -DENABLE_OPENGL -DSPDLOG_ACTIVE_LEVEL=0 -m32 +CPPFLAGS := -MMD + +ifneq ($(DEBUG),0) + CXXFLAGS += -g -D_DEBUG + CFLAGS += -g -D_DEBUG +endif + +ifneq ($(ASAN),0) + CXXFLAGS += -fsanitize=address + CFLAGS += -fsanitize=address +endif + +ifneq ($(LTO),0) + CXXFLAGS += -flto + CFLAGS += -flto +endif SRC_DIRS := $(shell find -type d -not -path "*build*") -CPP_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.cpp)) -H_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.h)) -O_FILES := $(foreach f,$(CPP_FILES:.cpp=.o),build/$f) -LIB := otrlib.a +CXX_FILES := \ + $(shell find libultraship/Factories -name *.cpp) \ + $(shell find libultraship/Lib/Fast3D -name *.cpp) \ + $(shell find libultraship -maxdepth 1 -name *.cpp) \ + $(shell find libultraship/Lib/ImGui -maxdepth 1 -name *.cpp) \ + libultraship/Lib/ImGui/backends/imgui_impl_opengl3.cpp \ + libultraship/Lib/ImGui/backends/imgui_impl_sdl.cpp \ + libultraship/Lib/StrHash64.cpp \ + libultraship/Lib/tinyxml2/tinyxml2.cpp + +C_FILES := \ + libultraship/mixer.c \ + libultraship/Lib/stb/stb_impl.c + +FMT_FILES := $(shell find libultraship/ -type f \( -name *.cpp -o -name *.h \) -a -not -path "libultraship/Lib/*") + +O_FILES := \ + $(CXX_FILES:%.cpp=build/%.o) \ + $(C_FILES:%.c=build/%.o) + +D_FILES := $(O_FILES:%.o=%.d) + +LIB := libultraship.a + +INC_DIRS := $(addprefix -I, \ + ../ZAPDTR/ZAPDUtils \ + libultraship/Lib/Fast3D/U64 \ + libultraship/Lib/spdlog \ + libultraship/Lib/spdlog/include \ + libultraship \ +) # create build directories -$(shell mkdir -p $(foreach dir,$(SRC_DIRS),build/$(dir))) +$(shell mkdir -p $(SRC_DIRS:%=build/%)) all: $(LIB) @@ -17,12 +80,17 @@ clean: rm -rf build $(LIB) format: - clang-format-11 -i $(CPP_FILES) $(H_FILES) + $(FORMAT) -i $(FMT_FILES) .PHONY: all clean format build/%.o: %.cpp - $(CXX) $(CXXFLAGS) $(OPTFLAGS) -I ./ -I ../ZAPD/ZAPD -I ../ZAPD/ZAPDUtils -I ../../ZAPD/lib/tinyxml2 -I otrlib/Lib/spdlog/include -c $(OUTPUT_OPTION) $< + $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(OPTFLAGS) $(INC_DIRS) -c $< -o $@ + +build/%.o: %.c + $(CC) $(CFLAGS) $(CPPFLAGS) $(OPTFLAGS) $(INC_DIRS) -c $< -o $@ $(LIB): $(O_FILES) $(AR) rcs $@ $^ + +-include $(D_FILES) \ No newline at end of file diff --git a/libultraship/libultraship/Animation.cpp b/libultraship/libultraship/Animation.cpp index be2decad3..f9a6e2ee8 100644 --- a/libultraship/libultraship/Animation.cpp +++ b/libultraship/libultraship/Animation.cpp @@ -21,7 +21,7 @@ void Ship::AnimationV0::ParseFileBinary(BinaryReader* reader, Resource* res) uint32_t rotIndCnt = reader->ReadUInt32(); anim->rotationIndices.reserve(rotIndCnt); - for (int i = 0; i < rotIndCnt; i++) + for (size_t i = 0; i < rotIndCnt; i++) { uint16_t x = reader->ReadUInt16(); uint16_t y = reader->ReadUInt16(); diff --git a/libultraship/libultraship/Archive.cpp b/libultraship/libultraship/Archive.cpp index 41c6649f8..67ec8831a 100644 --- a/libultraship/libultraship/Archive.cpp +++ b/libultraship/libultraship/Archive.cpp @@ -7,7 +7,7 @@ #include namespace Ship { - Archive::Archive(const std::string& MainPath, bool enableWriting) : Archive(MainPath, "", enableWriting) + Archive::Archive(const std::string& MainPath, bool enableWriting) : Archive(MainPath, "", enableWriting) { mainMPQ = nullptr; } @@ -28,7 +28,7 @@ namespace Ship { std::shared_ptr Archive::CreateArchive(const std::string& archivePath, int fileCapacity) { - Archive* archive = new Archive(archivePath, true); + auto archive = std::make_shared(archivePath, true); TCHAR* t_filename = new TCHAR[archivePath.size() + 1]; t_filename[archivePath.size()] = 0; @@ -37,10 +37,15 @@ namespace Ship { bool success = SFileCreateArchive(t_filename, MPQ_CREATE_LISTFILE | MPQ_CREATE_ATTRIBUTES | MPQ_CREATE_ARCHIVE_V2, fileCapacity, &archive->mainMPQ); int error = GetLastError(); - if (success) { + delete[] t_filename; + + if (success) + { archive->mpqHandles[archivePath] = archive->mainMPQ; - return std::make_shared(*archive); - } else { + return archive; + } + else + { SPDLOG_ERROR("({}) We tried to create an archive, but it has fallen and cannot get up."); return nullptr; } @@ -139,13 +144,16 @@ namespace Ship { bool Archive::AddFile(const std::string& path, uintptr_t fileData, DWORD dwFileSize) { HANDLE hFile; - +#ifdef _WIN32 SYSTEMTIME sysTime; GetSystemTime(&sysTime); FILETIME t; SystemTimeToFileTime(&sysTime, &t); ULONGLONG stupidHack = static_cast(t.dwHighDateTime) << (sizeof(t.dwHighDateTime) * 8) | t.dwLowDateTime; - +#else + time_t stupidHack; + time(&stupidHack); +#endif if (!SFileCreateFile(mainMPQ, path.c_str(), stupidHack, dwFileSize, 0, MPQ_FILE_COMPRESS, &hFile)) { SPDLOG_ERROR("({}) Failed to create file of {} bytes {} in archive {}", GetLastError(), dwFileSize, path.c_str(), MainPath.c_str()); return false; @@ -181,7 +189,7 @@ namespace Ship { SPDLOG_ERROR("({}) Failed to remove file {} in archive {}", GetLastError(), path.c_str(), MainPath.c_str()); return false; } - + return true; } @@ -201,7 +209,7 @@ namespace Ship { SFILE_FIND_DATA findContext; HANDLE hFind; - + hFind = SFileFindFirstFile(mainMPQ, searchMask.c_str(), &findContext, nullptr); //if (hFind && GetLastError() != ERROR_NO_MORE_FILES) { if (hFind != nullptr) { @@ -245,7 +253,7 @@ namespace Ship { auto start = std::chrono::steady_clock::now(); auto lst = ListFiles(filename); - + for (const auto& item : lst) { if (item.cFileName == filename) { result = true; @@ -267,7 +275,7 @@ namespace Ship { return LoadMainMPQ(enableWriting, genCRCMap) && LoadPatchMPQs(); } - bool Archive::Unload() + bool Archive::Unload() { bool success = true; for (const auto& mpqHandle : mpqHandles) { @@ -302,11 +310,16 @@ namespace Ship { bool Archive::LoadMainMPQ(bool enableWriting, bool genCRCMap) { HANDLE mpqHandle = NULL; +#ifdef _WIN32 + std::wstring wfullPath = std::filesystem::absolute(MainPath).wstring(); +#endif std::string fullPath = std::filesystem::absolute(MainPath).string(); - std::wstring wFileName = std::filesystem::absolute(MainPath).wstring(); - - if (!SFileOpenArchive(wFileName.c_str(), 0, enableWriting ? 0 : MPQ_OPEN_READ_ONLY, &mpqHandle)) { +#ifdef _WIN32 + if (!SFileOpenArchive(wfullPath.c_str(), 0, enableWriting ? 0 : MPQ_OPEN_READ_ONLY, &mpqHandle)) { +#else + if (!SFileOpenArchive(fullPath.c_str(), 0, enableWriting ? 0 : MPQ_OPEN_READ_ONLY, &mpqHandle)) { +#endif SPDLOG_ERROR("({}) Failed to open main mpq file {}.", GetLastError(), fullPath.c_str()); return false; } @@ -340,12 +353,19 @@ namespace Ship { std::wstring wPath = std::filesystem::absolute(path).wstring(); +#ifdef _WIN32 if (!SFileOpenArchive(wPath.c_str(), 0, MPQ_OPEN_READ_ONLY, &patchHandle)) { +#else + if (!SFileOpenArchive(fullPath.c_str(), 0, MPQ_OPEN_READ_ONLY, &patchHandle)) { +#endif SPDLOG_ERROR("({}) Failed to open patch mpq file {} while applying to {}.", GetLastError(), path.c_str(), MainPath.c_str()); return false; } - +#ifdef _WIN32 if (!SFileOpenPatchArchive(mainMPQ, wPath.c_str(), "", 0)) { +#else + if (!SFileOpenPatchArchive(mainMPQ, fullPath.c_str(), "", 0)) { +#endif SPDLOG_ERROR("({}) Failed to apply patch mpq file {} to main mpq {}.", GetLastError(), path.c_str(), MainPath.c_str()); return false; } diff --git a/libultraship/libultraship/Array.cpp b/libultraship/libultraship/Array.cpp index f256903bf..fdd522c11 100644 --- a/libultraship/libultraship/Array.cpp +++ b/libultraship/libultraship/Array.cpp @@ -51,6 +51,8 @@ namespace Ship data.u16 = reader->ReadUInt16(); break; // OTRTODO: IMPLEMENT OTHER TYPES! + default: + break; } arr->scalars.push_back(data); diff --git a/libultraship/libultraship/ConfigFile.h b/libultraship/libultraship/ConfigFile.h index dcf2a0e4a..17e3720f8 100644 --- a/libultraship/libultraship/ConfigFile.h +++ b/libultraship/libultraship/ConfigFile.h @@ -29,9 +29,9 @@ namespace Ship { bool CreateDefaultConfig(); private: - mINI::INIFile File; mINI::INIStructure Val; std::weak_ptr Context; std::string Path; + mINI::INIFile File; }; } diff --git a/libultraship/libultraship/Cvar.cpp b/libultraship/libultraship/Cvar.cpp index 91788fd48..b895ac747 100644 --- a/libultraship/libultraship/Cvar.cpp +++ b/libultraship/libultraship/Cvar.cpp @@ -1,4 +1,4 @@ -#include "cvar.h" +#include "Cvar.h" #include #include #include diff --git a/libultraship/libultraship/Factories/OTRResourceLoader.cpp b/libultraship/libultraship/Factories/OTRResourceLoader.cpp deleted file mode 100644 index 125e0d9ec..000000000 --- a/libultraship/libultraship/Factories/OTRResourceLoader.cpp +++ /dev/null @@ -1,71 +0,0 @@ -#include "OTRResourceLoader.h" -#include "OTRMaterialFactory.h" -#include "OTRSceneFactory.h" -#include "OTRCollisionHeaderFactory.h" -#include "OTRDisplayListFactory.h" -#include "OTRPlayerAnimationFactory.h" -#include "OTRSkeletonFactory.h" -#include "OTRSkeletonLimbFactory.h" -#include "OTRAnimationFactory.h" -#include "OTRVtxFactory.h" -#include "OTRCutsceneFactory.h" -#include "OTRArrayFactory.h" -#include "OTRPathFactory.h" - -namespace OtrLib -{ - OTRResource* OTRResourceLoader::LoadResource(BinaryReader* reader) - { - Endianess endianess = (Endianess)reader->ReadByte(); - - // TODO: Setup the binaryreader to use the resource's endianess - - ResourceType resourceType = (ResourceType)reader->ReadUInt32(); - OTRResource* result = nullptr; - - switch (resourceType) - { - case ResourceType::OTRMaterial: - result = OTRMaterialFactory::ReadMaterial(reader); - break; - case ResourceType::OTRRoom: - result = OTRSceneFactory::ReadScene(reader); - break; - case ResourceType::OTRCollisionHeader: - result = OTRCollisionHeaderFactory::ReadCollisionHeader(reader); - break; - case ResourceType::OTRDisplayList: - result = OTRDisplayListFactory::ReadDisplayList(reader); - break; - case ResourceType::OTRPlayerAnimation: - result = OTRPlayerAnimationFactory::ReadPlayerAnimation(reader); - break; - case ResourceType::OTRSkeleton: - result = OTRSkeletonFactory::ReadSkeleton(reader); - break; - case ResourceType::OTRSkeletonLimb: - result = OTRSkeletonLimbFactory::ReadSkeletonLimb(reader); - break; - case ResourceType::OTRVtx: - result = OTRVtxFactory::ReadVtx(reader); - break; - case ResourceType::OTRAnimation: - result = OTRAnimationFactory::ReadAnimation(reader); - break; - case ResourceType::OTRCutscene: - result = OTRCutsceneFactory::ReadCutscene(reader); - break; - case ResourceType::OTRArray: - result = OTRArrayFactory::ReadArray(reader); - break; - case ResourceType::OTRPath: - result = OTRPathFactory::ReadPath(reader); - break; - default: - // RESOURCE TYPE NOT SUPPORTED - break; - } - - return result; - } -} \ No newline at end of file diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index d9353a58a..0cd9aa2f4 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -1,10 +1,11 @@ #include "GameSettings.h" // Audio +#include +#include #include #include #include -#include #include "ConfigFile.h" #include "Cvar.h" diff --git a/libultraship/libultraship/GlobalCtx2.cpp b/libultraship/libultraship/GlobalCtx2.cpp index dd8125bcc..5ce59f5ab 100644 --- a/libultraship/libultraship/GlobalCtx2.cpp +++ b/libultraship/libultraship/GlobalCtx2.cpp @@ -30,7 +30,7 @@ namespace Ship { } GlobalCtx2::GlobalCtx2(const std::string& Name) : Name(Name), MainPath(""), PatchesPath("") { - + } GlobalCtx2::~GlobalCtx2() { @@ -54,7 +54,11 @@ namespace Ship { if (!ResMan->DidLoadSuccessfully()) { +#ifdef _WIN32 MessageBox(NULL, L"Main OTR file not found!", L"Uh oh", MB_OK); +#else + SPDLOG_ERROR("Main OTR file not found!"); +#endif exit(1); } INSTANCE = new ModManager(ResMan); diff --git a/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h b/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h index dedc97939..a9e4f035e 100644 --- a/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h +++ b/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/gbi.h @@ -1004,7 +1004,7 @@ #define G_DL_PUSH 0x00 #define G_DL_NOPUSH 0x01 -#if _MSC_VER +#if defined(_MSC_VER) || defined(__GNUC__) #define _LANGUAGE_C #endif @@ -3132,7 +3132,7 @@ _DW({ \ #endif */ -#ifdef _MSC_VER +#if defined(_MSC_VER) #define CALL_2(A,B) A B #define CALL_3(A,B,C) A B C @@ -3143,12 +3143,12 @@ _DW({ \ #define gsDPSetCombineMode(a, b) gsDPSetCombineLERP(a, b) #endif -#if _MSC_VER +#if defined(_MSC_VER) || defined(__GNUC__) #define CALL_2(A,B) A B #define CALL_3(A,B,C) A B C -#define gsDPSetCombineMode(a, b) CALL_2(gsDPSetCombineLERP, (a, b)) - //#define gsDPSetCombineMode(a, b) _SHIFTL(0, 24, 8), 0 +// #define gsDPSetCombineMode(a, b) CALL_2(gsDPSetCombineLERP, (a, b)) +// #define gsDPSetCombineMode(a, b) _SHIFTL(0, 24, 8), 0 #else #define gsDPSetCombineMode(a, b) gsDPSetCombineLERP(a, b) #endif diff --git a/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/mbi.h b/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/mbi.h index fd6042ff5..988c309df 100644 --- a/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/mbi.h +++ b/libultraship/libultraship/Lib/Fast3D/U64/PR/ultra64/mbi.h @@ -33,6 +33,7 @@ #define G_OFF (0) #include +#include "types.h" #include "gbi.h" #include "abi.h" diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp index 8671c3df4..448c90735 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp @@ -158,7 +158,7 @@ static LARGE_INTEGER last_time, accumulated_time, frequency; int gfx_d3d11_create_framebuffer(void); -void create_depth_stencil_objects(uint32_t width, uint32_t height, uint32_t msaa_count, ID3D11DepthStencilView **view, ID3D11ShaderResourceView **srv) { +static void create_depth_stencil_objects(uint32_t width, uint32_t height, uint32_t msaa_count, ID3D11DepthStencilView **view, ID3D11ShaderResourceView **srv) { D3D11_TEXTURE2D_DESC texture_desc; texture_desc.Width = width; texture_desc.Height = height; @@ -992,8 +992,8 @@ std::map, uint16_t> gfx_d3d11_get_pixel_depth(int fb_id, } // namespace -ImTextureID SohImGui::GetTextureByID(int id) { - return impl.backend == Backend::DX11 ? d3d.textures[id].resource_view.Get() : reinterpret_cast(id); +ImTextureID gfx_d3d11_get_texture_by_id(int id) { + return d3d.textures[id].resource_view.Get(); } struct GfxRenderingAPI gfx_direct3d11_api = { diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_glx.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_glx.cpp index 66bb5c182..d450558b2 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_glx.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_glx.cpp @@ -150,29 +150,29 @@ static struct { Display *dpy; Window root; Window win; - + Atom atom_wm_state; Atom atom_wm_state_fullscreen; Atom atom_wm_delete_window; - + bool is_fullscreen; void (*on_fullscreen_changed)(bool is_now_fullscreen); - + int keymap[256]; bool (*on_key_down)(int scancode); bool (*on_key_up)(int scancode); void (*on_all_keys_up)(void); - + PFNGLXGETSYNCVALUESOMLPROC glXGetSyncValuesOML; PFNGLXSWAPBUFFERSMSCOMLPROC glXSwapBuffersMscOML; PFNGLXWAITFORSBCOMLPROC glXWaitForSbcOML; - + PFNGLXSWAPINTERVALEXTPROC glXSwapIntervalEXT; PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI; - + PFNGLXGETVIDEOSYNCSGIPROC glXGetVideoSyncSGI; PFNGLXWAITVIDEOSYNCSGIPROC glXWaitVideoSyncSGI; - + bool has_oml_sync_control; uint64_t ust0; int64_t last_msc; @@ -181,7 +181,7 @@ static struct { uint64_t last_ust; int64_t target_msc; bool dropped_frame; - + bool has_sgi_video_sync; uint64_t last_sync_counter; int64_t this_msc; @@ -220,7 +220,7 @@ static int64_t glXGetVideoSyncSGI_wrapper(void) { static void init_keymap(void) { XkbDescPtr desc = XkbGetMap(glx.dpy, 0, XkbUseCoreKbd); XkbGetNames(glx.dpy, XkbKeyNamesMask, desc); - + for (int i = desc->min_key_code; i <= desc->max_key_code && i < 256; i++) { char name[XkbKeyNameLength + 1]; memcpy(name, desc->names->keys[i].name, XkbKeyNameLength); @@ -232,7 +232,7 @@ static void init_keymap(void) { } } } - + XkbFreeNames(desc, XkbKeyNamesMask, True); XkbFreeKeyboard(desc, 0, True); } @@ -265,7 +265,7 @@ static void gfx_glx_set_fullscreen_state(bool on, bool call_callback) { return; } glx.is_fullscreen = on; - + XEvent xev; xev.xany.type = ClientMessage; xev.xclient.message_type = glx.atom_wm_state; @@ -276,8 +276,8 @@ static void gfx_glx_set_fullscreen_state(bool on, bool call_callback) { xev.xclient.data.l[2] = 0; xev.xclient.data.l[3] = 0; XSendEvent(glx.dpy, glx.root, 0, SubstructureNotifyMask | SubstructureRedirectMask, &xev); - gfx_glx_ShowHideMouse(on); - + gfx_glx_show_cursor(on); + if (glx.on_fullscreen_changed != NULL && call_callback) { glx.on_fullscreen_changed(on); } @@ -303,7 +303,7 @@ static void gfx_glx_init(const char *game_name, bool start_in_fullscreen) { // which means that glXSwapBuffers should be non-blocking, // if we are sure to wait at least one vsync interval between calls. setenv("__GL_MaxFramesAllowed", "2", true); - + glx.dpy = XOpenDisplay(NULL); if (glx.dpy == NULL) { fprintf(stderr, "Cannot connect to X server\n"); @@ -311,7 +311,7 @@ static void gfx_glx_init(const char *game_name, bool start_in_fullscreen) { } int screen = DefaultScreen(glx.dpy); glx.root = RootWindow(glx.dpy, screen); - + GLint att[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None }; XVisualInfo *vi = glXChooseVisual(glx.dpy, 0, att); if (vi == NULL) { @@ -323,7 +323,7 @@ static void gfx_glx_init(const char *game_name, bool start_in_fullscreen) { swa.colormap = cmap; swa.event_mask = ExposureMask | KeyPressMask | KeyReleaseMask | FocusChangeMask; glx.win = XCreateWindow(glx.dpy, glx.root, 0, 0, DESIRED_SCREEN_WIDTH, DESIRED_SCREEN_HEIGHT, 0, vi->depth, InputOutput, vi->visual, CWColormap | CWEventMask, &swa); - + glx.atom_wm_state = XInternAtom(glx.dpy, "_NET_WM_STATE", False); glx.atom_wm_state_fullscreen = XInternAtom(glx.dpy, "_NET_WM_STATE_FULLSCREEN", False); glx.atom_wm_delete_window = XInternAtom(glx.dpy, "WM_DELETE_WINDOW", False); @@ -340,11 +340,11 @@ static void gfx_glx_init(const char *game_name, bool start_in_fullscreen) { XStoreName(glx.dpy, glx.win, title); GLXContext glc = glXCreateContext(glx.dpy, vi, NULL, GL_TRUE); glXMakeCurrent(glx.dpy, glx.win, glc); - + init_keymap(); - + const char *extensions = glXQueryExtensionsString(glx.dpy, screen); - + if (gfx_glx_check_extension(extensions, "GLX_OML_sync_control")) { glx.glXGetSyncValuesOML = (PFNGLXGETSYNCVALUESOMLPROC)glXGetProcAddressARB((const GLubyte *)"glXGetSyncValuesOML"); glx.glXSwapBuffersMscOML = (PFNGLXSWAPBUFFERSMSCOMLPROC)glXGetProcAddressARB((const GLubyte *)"glXSwapBuffersMscOML"); @@ -360,7 +360,7 @@ static void gfx_glx_init(const char *game_name, bool start_in_fullscreen) { glx.glXGetVideoSyncSGI = (PFNGLXGETVIDEOSYNCSGIPROC)glXGetProcAddressARB((const GLubyte *)"glXGetVideoSyncSGI"); glx.glXWaitVideoSyncSGI = (PFNGLXWAITVIDEOSYNCSGIPROC)glXGetProcAddressARB((const GLubyte *)"glXWaitVideoSyncSGI"); } - + int64_t ust, msc, sbc; if (glx.glXGetSyncValuesOML != NULL && glx.glXGetSyncValuesOML(glx.dpy, glx.win, &ust, &msc, &sbc)) { glx.has_oml_sync_control = true; @@ -439,7 +439,7 @@ static void gfx_glx_handle_events(void) { } } } - if (xev.type == ClientMessage && xev.xclient.data.l[0] == glx.atom_wm_delete_window) { + if (xev.type == ClientMessage && (Atom)xev.xclient.data.l[0] == glx.atom_wm_delete_window) { exit(0); } } @@ -451,19 +451,19 @@ static bool gfx_glx_start_frame(void) { static void gfx_glx_swap_buffers_begin(void) { glx.wanted_ust += FRAME_INTERVAL_US_NUMERATOR; // advance 1/30 seconds on JP/US or 1/25 seconds on EU - + if (!glx.has_oml_sync_control && !glx.has_sgi_video_sync) { glFlush(); - + uint64_t target = glx.wanted_ust / FRAME_INTERVAL_US_DENOMINATOR; uint64_t now; while (target > (now = (uint64_t)get_time() - glx.ust0)) { - struct timespec ts = {(target - now) / 1000000, ((target - now) % 1000000) * 1000}; + struct timespec ts = {(time_t)((target - now) / 1000000), (time_t)(((target - now) % 1000000) * 1000)}; if (nanosleep(&ts, NULL) == 0) { break; } } - + if (target + 2 * FRAME_INTERVAL_US_NUMERATOR / FRAME_INTERVAL_US_DENOMINATOR < now) { if (target + 32 * FRAME_INTERVAL_US_NUMERATOR / FRAME_INTERVAL_US_DENOMINATOR >= now) { printf("Dropping frame\n"); @@ -476,10 +476,10 @@ static void gfx_glx_swap_buffers_begin(void) { } glXSwapBuffers(glx.dpy, glx.win); glx.dropped_frame = false; - + return; } - + double vsyncs_to_wait = (int64_t)(glx.wanted_ust / FRAME_INTERVAL_US_DENOMINATOR - glx.last_ust) / (double)glx.vsync_interval; if (vsyncs_to_wait <= 0) { printf("Dropping frame\n"); @@ -519,17 +519,17 @@ static void gfx_glx_swap_buffers_begin(void) { vsyncs_to_wait = 2; } glx.target_msc = glx.last_msc + vsyncs_to_wait; - + if (glx.has_oml_sync_control) { glx.glXSwapBuffersMscOML(glx.dpy, glx.win, glx.target_msc, 0, 0); } else if (glx.has_sgi_video_sync) { glFlush(); // Try to submit pending work. Don't use glFinish since that busy loops on NVIDIA proprietary driver. - + //uint64_t counter0; uint64_t counter1, counter2; - + //uint64_t before_wait = get_time(); - + counter1 = glXGetVideoSyncSGI_wrapper(); //counter0 = counter1; //int waits = 0; @@ -537,17 +537,17 @@ static void gfx_glx_swap_buffers_begin(void) { counter1 = glXWaitVideoSyncSGI_wrapper(); //++waits; } - + //uint64_t before = get_time(); glXSwapBuffers(glx.dpy, glx.win); - - + + counter2 = glXGetVideoSyncSGI_wrapper(); while (counter2 < (uint64_t)glx.target_msc) { counter2 = glXWaitVideoSyncSGI_wrapper(); } uint64_t after = get_time(); - + //printf("%.3f %.3f %.3f\t%.3f\t%u %d %.2f %u %d\n", before_wait * 0.000060, before * 0.000060, after * 0.000060, (after - before) * 0.000060, counter0, counter2 - counter0, vsyncs_to_wait, (unsigned int)glx.target_msc, waits); glx.this_msc = counter2; glx.this_ust = after; @@ -558,7 +558,7 @@ static void gfx_glx_swap_buffers_end(void) { if (glx.dropped_frame || (!glx.has_oml_sync_control && !glx.has_sgi_video_sync)) { return; } - + int64_t ust, msc, sbc; if (glx.has_oml_sync_control) { if (!glx.glXWaitForSbcOML(glx.dpy, glx.win, 0, &ust, &msc, &sbc)) { @@ -600,6 +600,10 @@ static double gfx_glx_get_time(void) { return 0.0; } +static void gfx_glx_set_frame_divisor(int divisor) { + // TODO +} + struct GfxWindowManagerAPI gfx_glx = { gfx_glx_init, gfx_glx_set_keyboard_callbacks, @@ -612,7 +616,8 @@ struct GfxWindowManagerAPI gfx_glx = { gfx_glx_start_frame, gfx_glx_swap_buffers_begin, gfx_glx_swap_buffers_end, - gfx_glx_get_time + gfx_glx_get_time, + gfx_glx_set_frame_divisor, }; #endif diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_glx.h b/libultraship/libultraship/Lib/Fast3D/gfx_glx.h index fe78db948..1ca410901 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_glx.h +++ b/libultraship/libultraship/Lib/Fast3D/gfx_glx.h @@ -3,6 +3,6 @@ #include "gfx_window_manager_api.h" -struct GfxWindowManagerAPI gfx_glx; +extern struct GfxWindowManagerAPI gfx_glx; #endif diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp index 0c649d562..b2db3186a 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp @@ -29,8 +29,9 @@ #include "SDL_opengl.h" #else #include +#include #define GL_GLEXT_PROTOTYPES 1 -#include +// #include #endif #include "gfx_cc.h" @@ -178,6 +179,7 @@ static const char *shader_item_to_str(uint32_t item, bool with_alpha, bool only_ return "texel.a"; } } + return ""; } static void append_formula(char *buf, size_t *len, uint8_t c[2][4], bool do_single, bool do_multiply, bool do_mix, bool with_alpha, bool only_alpha, bool opt_alpha) { @@ -571,6 +573,7 @@ static uint32_t gfx_cm_to_opengl(uint32_t val) { case G_TX_NOMIRROR | G_TX_WRAP: return GL_REPEAT; } + return 0; } static void gfx_opengl_set_sampler_parameters(int tile, bool linear_filter, uint32_t cms, uint32_t cmt) { diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp index 1d03befe6..6d3a5a5bc 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #ifndef _LANGUAGE_C #define _LANGUAGE_C @@ -45,6 +46,8 @@ extern "C" { using namespace std; +#define SEG_ADDR(seg, addr) (addr | (seg << 24) | 1) + #define SUPPORT_CHECK(x) assert(x) // SCALE_M_N: upscale/downscale M-bit integer to N-bit @@ -209,7 +212,7 @@ static map framebuffers; static set> get_pixel_depth_pending; static map, uint16_t> get_pixel_depth_cached; -#ifdef _MSC_VER +#ifdef _WIN32 // TODO: Properly implement for MSVC static unsigned long get_time(void) { @@ -447,15 +450,15 @@ static void gfx_generate_cc(struct ColorCombiner *comb, uint64_t cc_id) { val = SHADER_COMBINED; break; } - // fallthrough for G_ACMUX_LOD_FRACTION c[i][1][j] = G_CCMUX_LOD_FRACTION; + [[fallthrough]]; // for G_ACMUX_LOD_FRACTION case G_ACMUX_1: //case G_ACMUX_PRIM_LOD_FRAC: same numerical value if (j != 2) { val = SHADER_1; break; } - // fallthrough for G_ACMUX_PRIM_LOD_FRAC + [[fallthrough]]; // for G_ACMUX_PRIM_LOD_FRAC case G_ACMUX_PRIMITIVE: case G_ACMUX_SHADE: case G_ACMUX_ENVIRONMENT: @@ -564,7 +567,7 @@ static void gfx_texture_cache_delete(const uint8_t* orig_addr) if (it->first.texture_addr == orig_addr) { gfx_texture_cache.lru.erase(*(list::iterator*)&it->second.lru_location); gfx_texture_cache.free_texture_ids.push_back(it->second.texture_id); - gfx_texture_cache.map.erase(it); + gfx_texture_cache.map.erase(it->first); again = true; break; } @@ -1692,7 +1695,7 @@ static void gfx_dp_load_block(uint8_t tile, uint32_t uls, uint32_t ult, uint32_t SUPPORT_CHECK(ult == 0); // The lrs field rather seems to be number of pixels to load - uint32_t word_size_shift; + uint32_t word_size_shift = 0; switch (rdp.texture_to_load.siz) { case G_IM_SIZ_4b: word_size_shift = 0; // Or -1? It's unused in SM64 anyway. @@ -1720,7 +1723,7 @@ static void gfx_dp_load_block(uint8_t tile, uint32_t uls, uint32_t ult, uint32_t static void gfx_dp_load_tile(uint8_t tile, uint32_t uls, uint32_t ult, uint32_t lrs, uint32_t lrt) { SUPPORT_CHECK(tile == G_TX_LOADTILE); - uint32_t word_size_shift; + uint32_t word_size_shift = 0; switch (rdp.texture_to_load.siz) { case G_IM_SIZ_4b: word_size_shift = 0; @@ -2060,12 +2063,11 @@ static void gfx_s2dex_bg_copy(const uObjBg* bg) { static inline void* seg_addr(uintptr_t w1) { // Segmented? - if (w1 >= 0xF0000000) + if (w1 & 1) { uint32_t segNum = (w1 >> 24); - segNum -= 0xF0; - uint32_t offset = w1 & 0x00FFFFFF; + uint32_t offset = w1 & 0x00FFFFFE; //offset = 0; // Cursed Malon bug if (segmentPointers[segNum] != 0) @@ -2082,7 +2084,7 @@ static inline void* seg_addr(uintptr_t w1) #define C0(pos, width) ((cmd->words.w0 >> (pos)) & ((1U << width) - 1)) #define C1(pos, width) ((cmd->words.w1 >> (pos)) & ((1U << width) - 1)) -int dListBP; +unsigned int dListBP; int matrixBP; uintptr_t clearMtx; @@ -2149,7 +2151,7 @@ static void gfx_run_dl(Gfx* cmd) { uintptr_t mtxAddr = cmd->words.w1; // OTRTODO: Temp way of dealing with gMtxClear. Need something more elegant in the future... - if (mtxAddr == 0xF012DB20 || mtxAddr == 0xF012DB40) + if (mtxAddr == SEG_ADDR(0, 0x12DB20) || mtxAddr == SEG_ADDR(0, 0x12DB40)) mtxAddr = clearMtx; #ifdef F3DEX_GBI_2 @@ -2250,7 +2252,7 @@ static void gfx_run_dl(Gfx* cmd) { cmd--; - if (ourHash != -1) + if (ourHash != (uint64_t)-1) ResourceMgr_RegisterResourcePatch(ourHash, cmd - dListStart, cmd->words.w1); cmd->words.w1 = (uintptr_t)vtx; @@ -2368,7 +2370,7 @@ static void gfx_run_dl(Gfx* cmd) { case G_QUAD: { int bp = 0; - // fallthrough + [[fallthrough]]; } #endif #if defined(F3DEX_GBI) || defined(F3DLP_GBI) @@ -2398,11 +2400,11 @@ static void gfx_run_dl(Gfx* cmd) { char* imgData = (char*)i; - if ((i & 0xF0000000) != 0xF0000000) + if ((i & 1) != 1) if (ResourceMgr_OTRSigCheck(imgData) == 1) i = (uintptr_t)ResourceMgr_LoadTexByName(imgData); - gfx_dp_set_texture_image(C0(21, 3), C0(19, 2), C0(0, 10), (void*) i, imgData); + gfx_dp_set_texture_image(C0(21, 3), C0(19, 2), C0(0, 10), (void*) i, imgData); break; } case G_SETTIMG_OTR: @@ -2419,7 +2421,7 @@ static void gfx_run_dl(Gfx* cmd) { char* tex = NULL; #endif - if (addr != NULL) + if (addr != 0) { tex = (char*)addr; } @@ -2433,7 +2435,7 @@ static void gfx_run_dl(Gfx* cmd) { uintptr_t oldData = cmd->words.w1; cmd->words.w1 = (uintptr_t)tex; - if (ourHash != -1) + if (ourHash != (uint64_t)-1) ResourceMgr_RegisterResourcePatch(ourHash, cmd - dListStart, oldData); cmd++; @@ -2648,7 +2650,7 @@ void gfx_init(struct GfxWindowManagerAPI *wapi, struct GfxRenderingAPI *rapi, co game_framebuffer_msaa_resolved = gfx_rapi->create_framebuffer(); for (int i = 0; i < 16; i++) - segmentPointers[i] = NULL; + segmentPointers[i] = 0; // Used in the 120 star TAS static uint32_t precomp_shaders[] = { diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_pc.h b/libultraship/libultraship/Lib/Fast3D/gfx_pc.h index d682991d9..d9cd9be8d 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_pc.h +++ b/libultraship/libultraship/Lib/Fast3D/gfx_pc.h @@ -4,12 +4,14 @@ #include #include #include +#include struct GfxRenderingAPI; struct GfxWindowManagerAPI; struct XYWidthHeight { - int16_t x, y, width, height; + int16_t x, y; + uint32_t width, height; }; struct GfxDimensions { @@ -25,7 +27,7 @@ struct TextureCacheKey { uint8_t palette_index; bool operator==(const TextureCacheKey&) const noexcept = default; - + struct Hasher { size_t operator()(const TextureCacheKey& key) const noexcept { uintptr_t addr = (uintptr_t)key.texture_addr; diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_sdl2.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_sdl2.cpp index ffc46f369..e80097c81 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_sdl2.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_sdl2.cpp @@ -1,6 +1,6 @@ #include -#if !defined(__linux__) && defined(ENABLE_OPENGL) +#if defined(ENABLE_OPENGL) #ifdef __MINGW32__ #define FOR_WINDOWS 1 @@ -23,7 +23,9 @@ #include "gfx_window_manager_api.h" #include "gfx_screen_config.h" +#ifdef _WIN32 #include +#endif #include #define GFX_API_NAME "SDL2 - OpenGL" @@ -41,7 +43,7 @@ static bool (*on_key_up_callback)(int scancode); static void (*on_all_keys_up_callback)(void); const SDL_Scancode windows_scancode_table[] = -{ +{ /* 0 1 2 3 4 5 6 7 */ /* 8 9 A B C D E F */ SDL_SCANCODE_UNKNOWN, SDL_SCANCODE_ESCAPE, SDL_SCANCODE_1, SDL_SCANCODE_2, SDL_SCANCODE_3, SDL_SCANCODE_4, SDL_SCANCODE_5, SDL_SCANCODE_6, /* 0 */ @@ -117,7 +119,9 @@ static void set_fullscreen(bool on, bool call_callback) { } static uint64_t previous_time; +#ifndef __linux__ static HANDLE timer; +#endif static int frameDivisor = 1; @@ -131,7 +135,9 @@ static void gfx_sdl_init(const char *game_name, bool start_in_fullscreen) { SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); +#ifndef __linux timer = CreateWaitableTimer(nullptr, false, nullptr); +#endif //SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1); //SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4); @@ -188,7 +194,7 @@ static void gfx_sdl_set_keyboard_callbacks(bool (*on_key_down)(int scancode), bo } static void gfx_sdl_main_loop(void (*run_one_game_iter)(void)) { - while (1) + while (1) { run_one_game_iter(); } diff --git a/libultraship/libultraship/Lib/StrHash64.h b/libultraship/libultraship/Lib/StrHash64.h index 35401bbf8..d8cc8ff62 100644 --- a/libultraship/libultraship/Lib/StrHash64.h +++ b/libultraship/libultraship/Lib/StrHash64.h @@ -86,14 +86,8 @@ #include -#define u8 uint8_t -#define u16 uint16_t -#define u32 uint32_t -#define u64 uint64_t -#define unint uint32_t - #define INITIAL_CRC64 0xffffffffffffffffULL -extern uint64_t update_crc64(const void* buf, unint len, u64 crc); -extern u64 crc64(const void* buf, unint len); -extern u64 CRC64(const char* t); \ No newline at end of file +extern uint64_t update_crc64(const void* buf, uint32_t len, uint64_t crc); +extern uint64_t crc64(const void* buf, uint32_t len); +extern uint64_t CRC64(const char* t); \ No newline at end of file diff --git a/libultraship/libultraship/Lib/spdlog/include/spdlog/sinks/sohconsole_sink.h b/libultraship/libultraship/Lib/spdlog/include/spdlog/sinks/sohconsole_sink.h index c674495a6..4fa03b5e0 100644 --- a/libultraship/libultraship/Lib/spdlog/include/spdlog/sinks/sohconsole_sink.h +++ b/libultraship/libultraship/Lib/spdlog/include/spdlog/sinks/sohconsole_sink.h @@ -46,8 +46,8 @@ protected: } formatted.push_back('\0'); const char *msg_output = formatted.data(); - if (CVar_GetS32("gSinkEnabled", 0) && SohImGui::console->opened) - SohImGui::console->Append("SoH Logging", priority, msg_output); + if (CVar_GetS32("gSinkEnabled", 0) && SohImGui::console->opened) + SohImGui::console->Append("SoH Logging", priority, "%s", msg_output); } void flush_() override {} @@ -67,6 +67,8 @@ private: return Priority::ERROR_LVL; case spdlog::level::critical: return Priority::ERROR_LVL; + default: + break; } return Priority::LOG_LVL; } diff --git a/libultraship/libultraship/Model.cpp b/libultraship/libultraship/Model.cpp index 27220e3bc..9e37de177 100644 --- a/libultraship/libultraship/Model.cpp +++ b/libultraship/libultraship/Model.cpp @@ -39,7 +39,7 @@ namespace Ship Vertex* vtxData = new Vertex[numVerts]; uint32_t* indicesData = new uint32_t[numPolys]; - if (vertices != NULL) + if (vertices != 0) { reader->Seek(headerStart + vertices, SeekOffsetType::Start); @@ -47,7 +47,7 @@ namespace Ship vtxData[i].pos = reader->ReadVec3f(); } - if (normals != NULL) + if (normals != 0) { reader->Seek(headerStart + normals, SeekOffsetType::Start); @@ -55,7 +55,7 @@ namespace Ship vtxData[i].normal = reader->ReadVec3f(); } - if (vertexColors != NULL) + if (vertexColors != 0) { reader->Seek(headerStart + vertexColors, SeekOffsetType::Start); @@ -63,7 +63,7 @@ namespace Ship vtxData[i].color = reader->ReadColor3b(); } - if (uvCoords != NULL) + if (uvCoords != 0) { reader->Seek(headerStart + uvCoords, SeekOffsetType::Start); @@ -71,7 +71,7 @@ namespace Ship vtxData[i].uv = reader->ReadVec2f(); } - if (boneWeights != NULL) + if (boneWeights != 0) { reader->Seek(headerStart + boneWeights, SeekOffsetType::Start); @@ -81,7 +81,7 @@ namespace Ship mdl->boneWeights[i] = reader->ReadVec2f(); } - if (faces != NULL) + if (faces != 0) { reader->Seek(headerStart + faces, SeekOffsetType::Start); reader->Read((char*)indicesData, numPolys * sizeof(uint32_t)); diff --git a/libultraship/libultraship/PulseAudioPlayer.cpp b/libultraship/libultraship/PulseAudioPlayer.cpp new file mode 100644 index 000000000..955b225d1 --- /dev/null +++ b/libultraship/libultraship/PulseAudioPlayer.cpp @@ -0,0 +1,173 @@ +#if defined(__linux__) || defined(__BSD__) + +#include "PulseAudioPlayer.h" +#include + +namespace Ship +{ + static void pas_context_state_cb(pa_context *c, void *userdata) { + switch (pa_context_get_state(c)) { + case PA_CONTEXT_READY: + case PA_CONTEXT_TERMINATED: + case PA_CONTEXT_FAILED: + *(bool*)userdata = true; + break; + default: + break; + } + } + + static void pas_stream_state_cb(pa_stream *s, void *userdata) { + switch (pa_stream_get_state(s)) { + case PA_STREAM_READY: + case PA_STREAM_FAILED: + case PA_STREAM_TERMINATED: + *(bool*)userdata = true; + break; + default: + break; + } + } + + static void pas_stream_write_cb(pa_stream* s, size_t length, void* userdata) { + } + + static void pas_update_complete(pa_stream* stream, int success, void* userdata) { + *(bool*)userdata = true; + } + + static void pas_write_complete(void* userdata) { + *(bool*)userdata = true; + } + + bool PulseAudioPlayer::Init() + { + bool done = false; + const pa_buffer_attr* applied_attr = nullptr; + + // Create mainloop + m_MainLoop = pa_mainloop_new(); + if (m_MainLoop == NULL) { + return false; + } + + // Create context and connect + m_Context = pa_context_new(pa_mainloop_get_api(m_MainLoop), "Ocarina of Time"); + if (m_Context == NULL) { + goto fail; + } + + pa_context_set_state_callback(m_Context, pas_context_state_cb, &done); + + if (pa_context_connect(m_Context, NULL, PA_CONTEXT_NOFLAGS, NULL) < 0) { + goto fail; + } + + while (!done) { + pa_mainloop_iterate(m_MainLoop, true, NULL); + } + pa_context_set_state_callback(m_Context, NULL, NULL); + if (pa_context_get_state(m_Context) != PA_CONTEXT_READY) { + goto fail; + } + + // Create stream + pa_sample_spec ss; + ss.format = PA_SAMPLE_S16LE; + ss.rate = 32000; + ss.channels = 2; + + pa_buffer_attr attr; + attr.maxlength = (1600 + 544 + 528 + 1600) * 4; + attr.tlength = (528*2 + 544) * 4; + attr.prebuf = 1500 * 4; + attr.minreq = 161 * 4; + attr.fragsize = (uint32_t)-1; + + m_Stream = pa_stream_new(m_Context, "zelda", &ss, NULL); + if (m_Stream == NULL) { + goto fail; + } + + done = false; + pa_stream_set_state_callback(m_Stream, pas_stream_state_cb, &done); + pa_stream_set_write_callback(m_Stream, pas_stream_write_cb, NULL); + if (pa_stream_connect_playback(m_Stream, NULL, &attr, PA_STREAM_ADJUST_LATENCY, NULL, NULL) < 0) { + goto fail; + } + + while (!done) { + pa_mainloop_iterate(m_MainLoop, true, NULL); + } + pa_stream_set_state_callback(m_Stream, NULL, NULL); + if (pa_stream_get_state(m_Stream) != PA_STREAM_READY) { + goto fail; + } + + applied_attr = pa_stream_get_buffer_attr(m_Stream); + SPDLOG_TRACE("maxlength: {}\ntlength: {}\nprebuf: {}\nminreq: {}\nfragsize: {}\n", + applied_attr->maxlength, applied_attr->tlength, applied_attr->prebuf, applied_attr->minreq, applied_attr->fragsize); + m_Attr = *applied_attr; + + return true; + + fail: + if (m_Stream != NULL) { + pa_stream_unref(m_Stream); + m_Stream = NULL; + } + if (m_Context != NULL) { + pa_context_disconnect(m_Context); + pa_context_unref(m_Context); + m_Context = NULL; + } + if (m_MainLoop != NULL) { + pa_mainloop_free(m_MainLoop); + m_MainLoop = NULL; + } + return false; + } + + int PulseAudioPlayer::Buffered() + { + if (m_Stream == NULL) { + return 0; + } + + bool done = false; + pa_stream_update_timing_info(m_Stream, pas_update_complete, &done); + while (!done) { + pa_mainloop_iterate(m_MainLoop, true, NULL); + } + + const pa_timing_info *info = pa_stream_get_timing_info(m_Stream); + if (info == NULL) { + SPDLOG_ERROR("pa_stream_get_timing_info failed, state is %d\n", pa_stream_get_state(m_Stream)); + } + return (info->write_index - info->read_index) / 4; + } + + int PulseAudioPlayer::GetDesiredBuffered() + { + // return 1100; + return 1680; + } + + void PulseAudioPlayer::Play(const uint8_t* buff, uint32_t len) + { + size_t ws = m_Attr.maxlength - Buffered() * 4; + if (ws < len) { + len = ws; + } + if (pa_stream_write_ext_free(m_Stream, buff, len, pas_write_complete, &m_WriteComplete, 0LL, PA_SEEK_RELATIVE) < 0) { + SPDLOG_ERROR("pa_stream_write failed"); + return; + } + while (!m_WriteComplete) { + pa_mainloop_iterate(m_MainLoop, true, NULL); + } + m_WriteComplete = false; + } +} + +#endif \ No newline at end of file diff --git a/libultraship/libultraship/PulseAudioPlayer.h b/libultraship/libultraship/PulseAudioPlayer.h new file mode 100644 index 000000000..7bc72b097 --- /dev/null +++ b/libultraship/libultraship/PulseAudioPlayer.h @@ -0,0 +1,26 @@ +#pragma once + +#if defined(__linux__) || defined(__BSD__) + +#include "AudioPlayer.h" +#include + +namespace Ship { + class PulseAudioPlayer : public AudioPlayer { + public: + PulseAudioPlayer() {} + + bool Init() override; + int Buffered() override; + int GetDesiredBuffered() override; + void Play(const uint8_t* buff, uint32_t len) override; + + private: + pa_context* m_Context = nullptr; + pa_stream* m_Stream = nullptr; + pa_mainloop* m_MainLoop = nullptr; + bool m_WriteComplete = false; + pa_buffer_attr m_Attr = {0}; + }; +} +#endif diff --git a/libultraship/libultraship/Resource.cpp b/libultraship/libultraship/Resource.cpp index 5bdfc5efd..04fc2bfbb 100644 --- a/libultraship/libultraship/Resource.cpp +++ b/libultraship/libultraship/Resource.cpp @@ -2,8 +2,8 @@ #include "DisplayList.h" #include "ResourceMgr.h" #include "Utils/BinaryReader.h" -#include "lib/tinyxml2/tinyxml2.h" -#include "lib/Fast3D/U64/PR/ultra64/gbi.h" +#include "Lib/tinyxml2/tinyxml2.h" +#include "Lib/Fast3D/U64/PR/ultra64/gbi.h" namespace Ship { @@ -25,7 +25,7 @@ namespace Ship void ResourceFile::WriteFileBinary(BinaryWriter* writer, Resource* res) { - + } void ResourceFile::WriteFileXML(tinyxml2::XMLElement* writer, Resource* res) @@ -35,17 +35,17 @@ namespace Ship Resource::~Resource() { - free(cachedGameAsset); + free(cachedGameAsset); cachedGameAsset = nullptr; - for (int i = 0; i < patches.size(); i++) + for (size_t i = 0; i < patches.size(); i++) { std::string hashStr = resMgr->HashToString(patches[i].crc); auto resShared = resMgr->GetCachedFile(hashStr); if (resShared != nullptr) { auto res = (Ship::DisplayList*)resShared.get(); - + Gfx* gfx = (Gfx*)&res->instructions[patches[i].index]; gfx->words.w1 = patches[i].origData; } diff --git a/libultraship/libultraship/Resource.h b/libultraship/libultraship/Resource.h index 1df5c5ed7..ae8dc6ce5 100644 --- a/libultraship/libultraship/Resource.h +++ b/libultraship/libultraship/Resource.h @@ -6,7 +6,7 @@ #include "GlobalCtx2.h" #include "StrHash.h" #include "File.h" -#include "lib/tinyxml2/tinyxml2.h" +#include "Lib/tinyxml2/tinyxml2.h" namespace Ship { @@ -101,10 +101,10 @@ namespace Ship class ResourcePromise { public: - std::shared_ptr Resource; - std::shared_ptr File; - std::condition_variable ResourceLoadNotifier; - std::mutex ResourceLoadMutex; + std::shared_ptr resource; + std::shared_ptr file; + std::condition_variable resourceLoadNotifier; + std::mutex resourceLoadMutex; bool bHasResourceLoaded = false; }; } \ No newline at end of file diff --git a/libultraship/libultraship/ResourceMgr.cpp b/libultraship/libultraship/ResourceMgr.cpp index b4d7b76a8..de0296d12 100644 --- a/libultraship/libultraship/ResourceMgr.cpp +++ b/libultraship/libultraship/ResourceMgr.cpp @@ -43,7 +43,7 @@ namespace Ship { const std::lock_guard ResLock(ResourceLoadMutex); bIsRunning = false; } - + FileLoadNotifier.notify_all(); ResourceLoadNotifier.notify_all(); FileLoadThread->join(); @@ -89,7 +89,7 @@ namespace Ship { OTR->LoadFile(ToLoad->path, true, ToLoad); //Lock.lock(); - + if (!ToLoad->bHasLoadError) FileCache[ToLoad->path] = ToLoad->bIsLoaded && !ToLoad->bHasLoadError ? ToLoad : nullptr; @@ -124,15 +124,15 @@ namespace Ship { // Wait for the underlying File to complete loading { - std::unique_lock FileLock(ToLoad->File->FileLoadMutex); - while (!ToLoad->File->bIsLoaded && !ToLoad->File->bHasLoadError) { - ToLoad->File->FileLoadNotifier.wait(FileLock); + std::unique_lock FileLock(ToLoad->file->FileLoadMutex); + while (!ToLoad->file->bIsLoaded && !ToLoad->file->bHasLoadError) { + ToLoad->file->FileLoadNotifier.wait(FileLock); } } - if (!ToLoad->File->bHasLoadError) + if (!ToLoad->file->bHasLoadError) { - auto UnmanagedRes = ResourceLoader::LoadResource(ToLoad->File); + auto UnmanagedRes = ResourceLoader::LoadResource(ToLoad->file); if (UnmanagedRes != nullptr) { @@ -140,13 +140,13 @@ namespace Ship { auto Res = std::shared_ptr(UnmanagedRes); if (Res != nullptr) { - std::unique_lock Lock(ToLoad->ResourceLoadMutex); + std::unique_lock Lock(ToLoad->resourceLoadMutex); ToLoad->bHasResourceLoaded = true; - ToLoad->Resource = Res; + ToLoad->resource = Res; ResourceCache[Res->file->path] = Res; - SPDLOG_DEBUG("Loaded Resource {} on ResourceMgr thread", ToLoad->File->path); + SPDLOG_DEBUG("Loaded Resource {} on ResourceMgr thread", ToLoad->file->path); // Disabled for now because it can cause random crashes //FileCache[Res->File->path] = nullptr; @@ -155,9 +155,9 @@ namespace Ship { } else { ToLoad->bHasResourceLoaded = false; - ToLoad->Resource = nullptr; + ToLoad->resource = nullptr; - SPDLOG_ERROR("Resource load FAILED {} on ResourceMgr thread", ToLoad->File->path); + SPDLOG_ERROR("Resource load FAILED {} on ResourceMgr thread", ToLoad->file->path); } //ResLock.lock(); @@ -167,10 +167,10 @@ namespace Ship { else { ToLoad->bHasResourceLoaded = false; - ToLoad->Resource = nullptr; + ToLoad->resource = nullptr; } - ToLoad->ResourceLoadNotifier.notify_all(); + ToLoad->resourceLoadNotifier.notify_all(); } SPDLOG_INFO("Resource Manager LoadResourceThread ended"); @@ -232,17 +232,17 @@ namespace Ship { if (!Promise->bHasResourceLoaded) { - std::unique_lock Lock(Promise->ResourceLoadMutex); + std::unique_lock Lock(Promise->resourceLoadMutex); while (!Promise->bHasResourceLoaded) { - Promise->ResourceLoadNotifier.wait(Lock); + Promise->resourceLoadNotifier.wait(Lock); } } - return Promise->Resource; + return Promise->resource; } std::shared_ptr ResourceMgr::LoadResourceAsync(std::string FilePath) { - StringHelper::ReplaceOriginal(FilePath, "/", "\\"); + StringHelper::ReplaceOriginal(FilePath, "\\", "/"); if (StringHelper::StartsWith(FilePath, "__OTR__")) FilePath = StringHelper::Split(FilePath, "__OTR__")[1]; @@ -257,9 +257,9 @@ namespace Ship { } std::shared_ptr FileData = LoadFile(FilePath); - Promise->File = FileData; + Promise->file = FileData; - if (Promise->File->bHasLoadError) + if (Promise->file->bHasLoadError) { Promise->bHasResourceLoaded = true; } @@ -271,7 +271,7 @@ namespace Ship { } } else { Promise->bHasResourceLoaded = true; - Promise->Resource = resCacheFind->second; + Promise->resource = resCacheFind->second; } return Promise; @@ -295,37 +295,37 @@ namespace Ship { auto PromiseList = CacheDirectoryAsync(SearchMask); auto LoadedList = std::make_shared>>(); - for (int32_t i = 0; i < PromiseList->size(); i++) { + for (size_t i = 0; i < PromiseList->size(); i++) { auto Promise = PromiseList->at(i); - std::unique_lock Lock(Promise->ResourceLoadMutex); + std::unique_lock Lock(Promise->resourceLoadMutex); while (!Promise->bHasResourceLoaded) { - Promise->ResourceLoadNotifier.wait(Lock); + Promise->resourceLoadNotifier.wait(Lock); } - LoadedList->push_back(Promise->Resource); + LoadedList->push_back(Promise->resource); } return LoadedList; } - std::shared_ptr>> ResourceMgr::DirtyDirectory(std::string SearchMask) + std::shared_ptr>> ResourceMgr::DirtyDirectory(std::string SearchMask) { auto PromiseList = CacheDirectoryAsync(SearchMask); auto LoadedList = std::make_shared>>(); - for (int32_t i = 0; i < PromiseList->size(); i++) { + for (size_t i = 0; i < PromiseList->size(); i++) { auto Promise = PromiseList->at(i); - std::unique_lock Lock(Promise->ResourceLoadMutex); + std::unique_lock Lock(Promise->resourceLoadMutex); while (!Promise->bHasResourceLoaded) { - Promise->ResourceLoadNotifier.wait(Lock); + Promise->resourceLoadNotifier.wait(Lock); } - if (Promise->Resource != nullptr) - Promise->Resource->isDirty = true; + if (Promise->resource != nullptr) + Promise->resource->isDirty = true; - LoadedList->push_back(Promise->Resource); + LoadedList->push_back(Promise->resource); } return LoadedList; diff --git a/libultraship/libultraship/ResourceMgr.h b/libultraship/libultraship/ResourceMgr.h index 5eae61abe..28e77e537 100644 --- a/libultraship/libultraship/ResourceMgr.h +++ b/libultraship/libultraship/ResourceMgr.h @@ -28,7 +28,7 @@ namespace Ship std::string HashToString(uint64_t Hash); void InvalidateResourceCache(); - + uint32_t GetGameVersion(); void SetGameVersion(uint32_t newGameVersion); std::shared_ptr LoadFileAsync(std::string FilePath); @@ -48,6 +48,7 @@ namespace Ship private: std::weak_ptr Context; + volatile bool bIsRunning; std::map> FileCache; std::map> ResourceCache; std::queue> FileLoadQueue; @@ -59,7 +60,6 @@ namespace Ship std::mutex ResourceLoadMutex; std::condition_variable FileLoadNotifier; std::condition_variable ResourceLoadNotifier; - volatile bool bIsRunning; uint32_t gameVersion; }; } \ No newline at end of file diff --git a/libultraship/libultraship/SDLController.cpp b/libultraship/libultraship/SDLController.cpp index 50bc5eabb..ab2c48b30 100644 --- a/libultraship/libultraship/SDLController.cpp +++ b/libultraship/libultraship/SDLController.cpp @@ -61,17 +61,17 @@ namespace Ship { if (Conf[ConfSection]["GUID"].compare("") == 0 || Conf[ConfSection]["GUID"].compare(INVALID_SDL_CONTROLLER_GUID) == 0 || Conf[ConfSection]["GUID"].compare(NewGuid) == 0) { auto NewCont = SDL_GameControllerOpen(i); - if (SDL_GameControllerHasSensor(NewCont, SDL_SENSOR_GYRO)) - { - SDL_GameControllerSetSensorEnabled(NewCont, SDL_SENSOR_GYRO, SDL_TRUE); - } - // We failed to load the controller. Go to next. if (NewCont == nullptr) { SPDLOG_ERROR("SDL Controller failed to open: ({})", SDL_GetError()); continue; } + if (SDL_GameControllerHasSensor(NewCont, SDL_SENSOR_GYRO)) + { + SDL_GameControllerSetSensorEnabled(NewCont, SDL_SENSOR_GYRO, SDL_TRUE); + } + guid = NewGuid; Cont = NewCont; @@ -101,7 +101,7 @@ namespace Ship { } bool SDLController::Close() { - if (SDL_GameControllerHasRumble(Cont)) { + if (CanRumble()) { SDL_GameControllerRumble(Cont, 0, 0, 0); } if (Cont != nullptr) { @@ -190,7 +190,7 @@ namespace Ship { if (SDL_GameControllerHasSensor(Cont, SDL_SENSOR_GYRO)) { size_t contNumber = GetControllerNumber(); - + float gyroData[3]; SDL_GameControllerGetSensorData(Cont, SDL_SENSOR_GYRO, gyroData, 3); @@ -347,7 +347,7 @@ namespace Ship { void SDLController::WriteToSource(ControllerCallback* controller) { - if (SDL_GameControllerHasRumble(Cont)) { + if (CanRumble()) { if (controller->rumble > 0) { float rumble_strength = CVar_GetFloat(StringHelper::Sprintf("gCont%i_RumbleStrength", GetControllerNumber()).c_str(), 1.0f); SDL_GameControllerRumble(Cont, 0xFFFF * rumble_strength, 0xFFFF * rumble_strength, 0); diff --git a/libultraship/libultraship/SDLController.h b/libultraship/libultraship/SDLController.h index 138466a89..fbffa478f 100644 --- a/libultraship/libultraship/SDLController.h +++ b/libultraship/libultraship/SDLController.h @@ -13,7 +13,12 @@ namespace Ship { void ReadFromSource(); void WriteToSource(ControllerCallback* controller); bool Connected() const { return Cont != nullptr; } - bool CanRumble() const { return SDL_GameControllerHasRumble(Cont); } + bool CanRumble() const { +#if SDL_COMPILEDVERSION >= SDL_VERSIONNUM(2,0,18) + return SDL_GameControllerHasRumble(Cont); +#endif + return true; + } std::string GetGuid() { return guid; }; @@ -30,8 +35,8 @@ namespace Ship { static bool IsGuidInUse(const std::string& guid); private: - std::string guid; SDL_GameController* Cont; + std::string guid; std::map ThresholdMapping; void LoadAxisThresholds(); diff --git a/libultraship/libultraship/Scene.cpp b/libultraship/libultraship/Scene.cpp index 9468e3a59..17d2b6976 100644 --- a/libultraship/libultraship/Scene.cpp +++ b/libultraship/libultraship/Scene.cpp @@ -137,8 +137,8 @@ namespace Ship y = 0; z = 0; unk_06 = 0; - opa; - xlu; + // opa; + // xlu; } SetMesh::SetMesh(BinaryReader* reader) : SceneCommand(reader) @@ -398,18 +398,18 @@ namespace Ship LightInfo light = LightInfo(); light.type = reader->ReadUByte(); - + light.x = reader->ReadInt16(); - light.y = reader->ReadInt16(); + light.y = reader->ReadInt16(); light.z = reader->ReadInt16(); light.r = reader->ReadUByte(); light.g = reader->ReadUByte(); light.b = reader->ReadUByte(); - + light.drawGlow = reader->ReadUByte(); light.radius = reader->ReadInt16(); - + lights.push_back(light); } } diff --git a/libultraship/libultraship/SkeletonLimb.cpp b/libultraship/libultraship/SkeletonLimb.cpp index 5020fe8f5..75fd46780 100644 --- a/libultraship/libultraship/SkeletonLimb.cpp +++ b/libultraship/libultraship/SkeletonLimb.cpp @@ -15,7 +15,7 @@ namespace Ship limb->skinVtxCnt = reader->ReadUInt16(); uint32_t skinCnt = reader->ReadUInt32(); - for (int i = 0; i < skinCnt; i++) + for (size_t i = 0; i < skinCnt; i++) { Struct_800A598C struc; diff --git a/libultraship/libultraship/SohConsole.cpp b/libultraship/libultraship/SohConsole.cpp index c360ea968..6c7df3847 100644 --- a/libultraship/libultraship/SohConsole.cpp +++ b/libultraship/libultraship/SohConsole.cpp @@ -16,7 +16,7 @@ std::map BindingToggle; static bool HelpCommand(const std::vector&) { INFO("SoH Commands:"); for(const auto& cmd : SohImGui::console->Commands) { - INFO((" - " + cmd.first).c_str()); + INFO("%s", (" - " + cmd.first).c_str()); } return CMD_SUCCESS; } @@ -35,7 +35,7 @@ std::string toLowerCase(std::string in) { static bool BindCommand(const std::vector& args) { if(args.size() > 2) { const ImGuiIO* io = &ImGui::GetIO();; - for (int k = 0; k < std::size(io->KeysData); k++) { + for (size_t k = 0; k < std::size(io->KeysData); k++) { std::string key(ImGui::GetKeyName(k)); if(toLowerCase(args[1]) == toLowerCase(key)) { @@ -55,7 +55,7 @@ static bool BindCommand(const std::vector& args) { static bool BindToggleCommand(const std::vector& args) { if (args.size() > 2) { const ImGuiIO* io = &ImGui::GetIO();; - for (int k = 0; k < std::size(io->KeysData); k++) { + for (size_t k = 0; k < std::size(io->KeysData); k++) { std::string key(ImGui::GetKeyName(k)); if (toLowerCase(args[1]) == toLowerCase(key)) { @@ -177,8 +177,10 @@ void Console::Draw() { for (const auto& filter : priority_filters) { const bool is_selected = (filter == std::string(this->level_filter)); if (ImGui::Selectable(filter.c_str(), is_selected)) + { this->level_filter = filter; if (is_selected) ImGui::SetItemDefaultFocus(); + } } ImGui::EndCombo(); } @@ -194,7 +196,7 @@ void Console::Draw() { if (ImGui::BeginTable("History", 1)) { if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) - if (this->selectedId < this->Log.size() - 1) ++this->selectedId; + if (this->selectedId < (int)this->Log.size() - 1) ++this->selectedId; if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow))) if (this->selectedId > 0) --this->selectedId; @@ -226,7 +228,7 @@ void Console::Draw() { ImGui::EndChild(); // Renders input textfield - constexpr ImGuiInputTextFlags flags = ImGuiInputTextFlags_EnterReturnsTrue | ImGuiInputTextFlags_CallbackEdit | + constexpr ImGuiInputTextFlags flags = ImGuiInputTextFlags_EnterReturnsTrue | ImGuiInputTextFlags_CallbackEdit | ImGuiInputTextFlags_CallbackCompletion | ImGuiInputTextFlags_CallbackHistory; ImGui::PushItemWidth(-1); if(ImGui::InputTextWithHint("CMDInput", ">", this->InputBuffer, MAX_BUFFER_SIZE, flags, &Console::CallbackStub, this)) { @@ -317,7 +319,7 @@ int Console::CallbackStub(ImGuiInputTextCallbackData* data) { return 0; } -void Console::Append(const std::string& channel, Priority priority, const char* fmt, ...) IM_FMTARGS(4) { +void Console::Append(const std::string& channel, Priority priority, const char* fmt, ...) { char buf[1024]; va_list args; va_start(args, fmt); diff --git a/libultraship/libultraship/SohConsole.h b/libultraship/libultraship/SohConsole.h index 57ad182f8..bfbffd0b9 100644 --- a/libultraship/libultraship/SohConsole.h +++ b/libultraship/libultraship/SohConsole.h @@ -7,10 +7,10 @@ #include "Lib/ImGui/imgui.h" -#define LOG(msg, ...) SohImGui::console->Append("Main", Priority::LOG_LVL, msg, __VA_ARGS__) -#define INFO(msg, ...) SohImGui::console->Append("Main", Priority::INFO_LVL, msg, __VA_ARGS__) -#define WARNING(msg, ...) SohImGui::console->Append("Main", Priority::WARNING_LVL, msg, __VA_ARGS__) -#define ERROR(msg, ...) SohImGui::console->Append("Main", Priority::ERROR_LVL, msg, __VA_ARGS__) +#define LOG(msg, ...) SohImGui::console->Append("Main", Priority::LOG_LVL, msg, ##__VA_ARGS__) +#define INFO(msg, ...) SohImGui::console->Append("Main", Priority::INFO_LVL, msg, ##__VA_ARGS__) +#define WARNING(msg, ...) SohImGui::console->Append("Main", Priority::WARNING_LVL, msg, ##__VA_ARGS__) +#define ERROR(msg, ...) SohImGui::console->Append("Main", Priority::ERROR_LVL, msg, ##__VA_ARGS__) #define CMD_SUCCESS true #define CMD_FAILED false #define MAX_BUFFER_SIZE 255 @@ -75,7 +75,7 @@ public: void Init(); void Update(); void Draw(); - void Append(const std::string& channel, Priority priority, const char* fmt, ...); + void Append(const std::string& channel, Priority priority, const char* fmt, ...) IM_FMTARGS(4); void Dispatch(const std::string& line); static int CallbackStub(ImGuiInputTextCallbackData* data); }; \ No newline at end of file diff --git a/libultraship/libultraship/SohHooks.cpp b/libultraship/libultraship/SohHooks.cpp index d40ab87e2..7ede525d7 100644 --- a/libultraship/libultraship/SohHooks.cpp +++ b/libultraship/libultraship/SohHooks.cpp @@ -24,7 +24,7 @@ namespace ModInternal { bool handleHook(std::shared_ptr call) { std::string hookName = std::string(call->name); - for (int l = 0; l < listeners[hookName].size(); l++) { + for (size_t l = 0; l < listeners[hookName].size(); l++) { (listeners[hookName][l])(call); } return call->cancelled; diff --git a/libultraship/libultraship/SohHooks.h b/libultraship/libultraship/SohHooks.h index 111f789d0..9a41eeb0e 100644 --- a/libultraship/libultraship/SohHooks.h +++ b/libultraship/libultraship/SohHooks.h @@ -47,6 +47,7 @@ struct HookParameter { #include #include #include +#include struct HookCall { std::string name; diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index ccb3b4a75..7e7082b7b 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -92,9 +92,13 @@ namespace SohImGui { case Backend::SDL: ImGui_ImplSDL2_InitForOpenGL(static_cast(impl.sdl.window), impl.sdl.context); break; +#if defined(ENABLE_DX11) || defined(ENABLE_DX12) case Backend::DX11: ImGui_ImplWin32_Init(impl.dx11.window); break; +#endif + default: + break; } // OTRTODO: This gameplay specific stuff should not be in libultraship. This needs to be moved to soh and use sTunicColors @@ -148,9 +152,14 @@ namespace SohImGui { case Backend::SDL: ImGui_ImplOpenGL3_Init("#version 120"); break; + +#if defined(ENABLE_DX11) || defined(ENABLE_DX12) case Backend::DX11: ImGui_ImplDX11_Init(static_cast(impl.dx11.device), static_cast(impl.dx11.device_context)); break; +#endif + default: + break; } } @@ -159,9 +168,13 @@ namespace SohImGui { case Backend::SDL: ImGui_ImplSDL2_ProcessEvent(static_cast(event.sdl.event)); break; +#if defined(ENABLE_DX11) || defined(ENABLE_DX12) case Backend::DX11: ImGui_ImplWin32_WndProcHandler(static_cast(event.win32.handle), event.win32.msg, event.win32.wparam, event.win32.lparam); break; +#endif + default: + break; } } @@ -170,9 +183,13 @@ namespace SohImGui { case Backend::SDL: ImGui_ImplSDL2_NewFrame(static_cast(impl.sdl.window)); break; +#if defined(ENABLE_DX11) || defined(ENABLE_DX12) case Backend::DX11: ImGui_ImplWin32_NewFrame(); break; +#endif + default: + break; } } @@ -181,9 +198,13 @@ namespace SohImGui { case Backend::SDL: ImGui_ImplOpenGL3_NewFrame(); break; +#if defined(ENABLE_DX11) || defined(ENABLE_DX12) case Backend::DX11: ImGui_ImplDX11_NewFrame(); break; +#endif + default: + break; } } @@ -192,9 +213,13 @@ namespace SohImGui { case Backend::SDL: ImGui_ImplOpenGL3_RenderDrawData(data); break; +#if defined(ENABLE_DX11) || defined(ENABLE_DX12) case Backend::DX11: ImGui_ImplDX11_RenderDrawData(data); break; +#endif + default: + break; } } @@ -202,11 +227,12 @@ namespace SohImGui { switch (impl.backend) { case Backend::DX11: return true; + default: + return false; } - return false; } - void SohImGui::ShowCursor(bool hide, Dialogues d) { + void ShowCursor(bool hide, Dialogues d) { if (d == Dialogues::dLoadSettings) { GlobalCtx2::GetInstance()->GetWindow()->ShowCursor(hide); return; @@ -724,7 +750,11 @@ namespace SohImGui { ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0, 0, 0, 0)); ImGui::Begin("Debug Stats", nullptr, ImGuiWindowFlags_None); +#ifdef _WIN32 ImGui::Text("Platform: Windows"); +#else + ImGui::Text("Platform: Linux"); +#endif ImGui::Text("Status: %.3f ms/frame (%.1f FPS)", 1000.0f / framerate, framerate); ImGui::End(); ImGui::PopStyleColor(); @@ -879,4 +909,16 @@ namespace SohImGui { ImTextureID GetTextureByName(const std::string& name) { return GetTextureByID(DefaultAssets[name]->textureId); } + + ImTextureID GetTextureByID(int id) { +#ifdef ENABLE_DX11 + if (impl.backend == Backend::DX11) + { + ImTextureID gfx_d3d11_get_texture_by_id(int id); + return gfx_d3d11_get_texture_by_id(id); + } +#else + return reinterpret_cast(id); +#endif + } } diff --git a/libultraship/libultraship/Utils.cpp b/libultraship/libultraship/Utils.cpp index e36ba29f5..d54952c77 100644 --- a/libultraship/libultraship/Utils.cpp +++ b/libultraship/libultraship/Utils.cpp @@ -1,9 +1,14 @@ #include "Utils.h" +#include + +#ifdef _MSC_VER +#define strdup _strdup +#endif namespace Utils { std::vector SplitText(const std::string text, char separator = ' ', bool keep_quotes = false) { std::vector args; - char* input = _strdup(text.c_str()); + char* input = strdup(text.c_str()); const size_t length = strlen(input); bool inQuotes = false; diff --git a/libultraship/libultraship/WasapiAudioPlayer.cpp b/libultraship/libultraship/WasapiAudioPlayer.cpp index 26e4504d3..30cb10905 100644 --- a/libultraship/libultraship/WasapiAudioPlayer.cpp +++ b/libultraship/libultraship/WasapiAudioPlayer.cpp @@ -1,3 +1,4 @@ +#ifdef _WIN32 #include "WasapiAudioPlayer.h" #include "spdlog/spdlog.h" @@ -169,4 +170,5 @@ namespace Ship { } return S_OK; } -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/libultraship/libultraship/WasapiAudioPlayer.h b/libultraship/libultraship/WasapiAudioPlayer.h index 5067d01a2..dac7dd7a7 100644 --- a/libultraship/libultraship/WasapiAudioPlayer.h +++ b/libultraship/libultraship/WasapiAudioPlayer.h @@ -1,4 +1,7 @@ #pragma once + +#ifdef _WIN32 + #include "AudioPlayer.h" #include #include @@ -39,3 +42,4 @@ namespace Ship { bool started; }; } +#endif diff --git a/libultraship/libultraship/Window.cpp b/libultraship/libultraship/Window.cpp index 0feb7229f..e7c221e41 100644 --- a/libultraship/libultraship/Window.cpp +++ b/libultraship/libultraship/Window.cpp @@ -12,6 +12,8 @@ #include "Matrix.h" #include "AudioPlayer.h" #include "WasapiAudioPlayer.h" +#include "PulseAudioPlayer.h" +#include "SDLAudioPlayer.h" #include "Lib/Fast3D/gfx_pc.h" #include "Lib/Fast3D/gfx_sdl.h" #include "Lib/Fast3D/gfx_opengl.h" @@ -48,7 +50,7 @@ extern "C" { } // TODO: This for loop is debug. Burn it with fire. - for (size_t i = 0; i < SDL_NumJoysticks(); i++) { + for (int i = 0; i < SDL_NumJoysticks(); i++) { if (SDL_IsGameController(i)) { // Get the GUID from SDL char buf[33]; @@ -207,7 +209,7 @@ extern "C" { return (char*)res->imageData; } - void ResourceMgr_WriteTexS16ByName(char* texPath, int index, s16 value) { + void ResourceMgr_WriteTexS16ByName(char* texPath, size_t index, s16 value) { const auto res = static_cast(Ship::GlobalCtx2::GetInstance()->GetResourceManager()->LoadResource(texPath).get()); if (res != nullptr) @@ -237,7 +239,7 @@ extern "C" { } } -extern "C" GfxWindowManagerAPI gfx_sdl; +extern GfxWindowManagerAPI gfx_sdl; void SetWindowManager(GfxWindowManagerAPI** WmApi, GfxRenderingAPI** RenderingApi, const std::string& gfx_backend); namespace Ship { @@ -397,6 +399,12 @@ namespace Ship { } void Window::SetAudioPlayer() { +#ifdef _WIN32 APlayer = std::make_shared(); +#elif defined(__linux) + APlayer = std::make_shared(); +#else + APlayer = std::make_shared(); +#endif } } diff --git a/libultraship/libultraship/WindowShim.cpp b/libultraship/libultraship/WindowShim.cpp index 96b636aff..4469c5c29 100644 --- a/libultraship/libultraship/WindowShim.cpp +++ b/libultraship/libultraship/WindowShim.cpp @@ -23,7 +23,9 @@ void SetWindowManager(struct GfxWindowManagerAPI** WmApi, struct GfxRenderingAPI #ifdef ENABLE_OPENGL *RenderingApi = &gfx_opengl_api; #if defined(__linux__) - *WmApi = &gfx_glx; + // LINUX_TODO: + // *WmApi = &gfx_glx; + *WmApi = &gfx_sdl; #else *WmApi = &gfx_sdl; #endif diff --git a/libultraship/libultraship/mixer.c b/libultraship/libultraship/mixer.c index b81eb915a..302a54ef4 100644 --- a/libultraship/libultraship/mixer.c +++ b/libultraship/libultraship/mixer.c @@ -449,13 +449,16 @@ void aFilterImpl(uint8_t flags, uint16_t count_or_buf, int16_t *state_or_filter) int16_t *buf = BUF_S16(count_or_buf); if (flags == A_INIT) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmemset-elt-size" memset(tmp, 0, 8 * sizeof(int16_t)); +#pragma GCC diagnostic pop memset(tmp2, 0, 8 * sizeof(int16_t)); } else { memcpy(tmp, state_or_filter, 8 * sizeof(int16_t)); memcpy(tmp2, state_or_filter + 8, 8 * sizeof(int16_t)); } - + for (int i = 0; i < 8; i++) { rspa.filter[i] = (tmp2[i] + rspa.filter[i]) / 2; } diff --git a/libultraship/libultraship/stox.cpp b/libultraship/libultraship/stox.cpp index 75fcdfbf0..fa2dff974 100644 --- a/libultraship/libultraship/stox.cpp +++ b/libultraship/libultraship/stox.cpp @@ -1,3 +1,4 @@ +#include #include "stox.h" #include "spdlog/spdlog.h" diff --git a/soh/.gitignore b/soh/.gitignore index fafae443d..5920cfba7 100644 --- a/soh/.gitignore +++ b/soh/.gitignore @@ -25,6 +25,10 @@ docs/doxygen/ *.map *.dump out.txt +shipofharkinian.ini +imgui.ini +oot.otr +oot_save.sav # Tool artifacts tools/mipspro7.2_compiler/ @@ -279,7 +283,7 @@ ClientBin/ *.publishsettings orleans.codegen.cs -# Including strong name files can present a security risk +# Including strong name files can present a security risk # (https://github.com/github/gitignore/pull/2483#issue-259490424) #*.snk @@ -375,7 +379,7 @@ __pycache__/ # OpenCover UI analysis results OpenCover/ -# Azure Stream Analytics local run output +# Azure Stream Analytics local run output ASALocalRun/ # MSBuild Binary and Structured Log @@ -384,7 +388,7 @@ ASALocalRun/ # NVidia Nsight GPU debugger configuration file *.nvuser -# MFractors (Xamarin productivity tool) working folder +# MFractors (Xamarin productivity tool) working folder .mfractor/ *.out @@ -397,6 +401,7 @@ ZAPDUtils/ZAPDUtils.a build/ ZAPDUtils/build/ ZAPD/BuildInfo.h +cvars.cfg DebugObj/* ReleaseObj/* \ No newline at end of file diff --git a/soh/Makefile b/soh/Makefile new file mode 100644 index 000000000..be46f55e7 --- /dev/null +++ b/soh/Makefile @@ -0,0 +1,158 @@ +CXX := g++ +CC := gcc +LD := lld +AR := ar +FORMAT := clang-format-11 +ZAPD := ../ZAPDTR/ZAPD.out + +LIBULTRASHIP := ../libultraship/libultraship.a +ZAPDUTILS := ../ZAPDTR/ZAPDUtils/ZAPDUtils.a + +ASAN ?= 0 +DEBUG ?= 1 +OPTFLAGS ?= -O0 +LTO ?= 0 + +WARN := \ + -Wno-return-type \ + -funsigned-char \ + -m32 -mhard-float -fno-stack-protector -fno-common -fno-zero-initialized-in-bss -fno-strict-aliasing -fno-inline-functions -fno-inline-small-functions -fno-toplevel-reorder -ffreestanding -fwrapv \ + +CXXFLAGS := $(WARN) -std=c++20 -D_GNU_SOURCE -fpermissive -no-pie -nostdlib -march=i386 +CFLAGS := $(WARN) -std=c99 -D_GNU_SOURCE -no-pie -nostdlib -march=i386 +LDFLAGS := -m32 +CPPFLAGS := -MMD + +ifneq ($(DEBUG),0) + CXXFLAGS += -g + CFLAGS += -g +endif + +ifneq ($(ASAN),0) + CXXFLAGS += -fsanitize=address + LDFLAGS += -fsanitize=address +endif + +ifneq ($(LTO),0) + CXXFLAGS += -flto + LDFLAGS += -flto +endif + +TARGET := soh.elf + +INC_DIRS := $(addprefix -I, \ + . \ + assets \ + build \ + include \ + src \ + ../ZAPDTR/ZAPDUtils \ + ../libultraship/libultraship \ + ../libultraship/libultraship/Lib/spdlog/include \ + ../libultraship/libultraship/Lib/Fast3D/U64 \ + ../libultraship/libultraship/Lib/Fast3D/U64/PR \ +) + +LDDIRS := $(addprefix -L, \ + ../external \ + ../libultraship/ \ +) + +LDLIBS := \ + $(ZAPDUTILS) \ + $(addprefix -l, \ + X11 \ + dl \ + bz2 \ + z \ + pthread \ + atomic \ + SDL2 \ + GL \ + GLEW \ + storm \ + pulse\ + ultraship \ +) \ + +ASSET_BIN_DIRS := $(shell find assets/* -type d -not -path "assets/xml*") +ASSET_FILES_XML := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.xml)) +ASSET_FILES_BIN := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.bin)) +ASSET_FILES_OUT := $(foreach f,$(ASSET_FILES_XML:.xml=.c),$f) \ + $(foreach f,$(ASSET_FILES_BIN:.bin=.bin.inc.c),build/$f) + +TEXTURE_FILES_PNG := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.png)) +TEXTURE_FILES_JPG := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.jpg)) +TEXTURE_FILES_OUT := $(foreach f,$(TEXTURE_FILES_PNG:.png=.inc.c),build/$f) \ + $(foreach f,$(TEXTURE_FILES_JPG:.jpg=.jpg.inc.c),build/$f) \ + +CXX_FILES := \ + $(shell find soh -type f -name *.cpp) + +C_FILES := \ + $(shell find soh -type f -name *.c) \ + $(shell find src/boot -type f -name *.c) \ + $(shell find src/buffers -type f -name *.c) \ + $(shell find src/code -type f -name *.c) \ + $(shell find src/overlays -type f -name *.c) \ + src/libultra/gu/coss.c \ + src/libultra/gu/guLookAt.c \ + src/libultra/gu/guLookAtHilite.c \ + src/libultra/gu/guPerspectiveF.c \ + src/libultra/gu/guPosition.c \ + src/libultra/gu/guS2DInitBg.c \ + src/libultra/gu/ortho.c \ + src/libultra/gu/rotate.c \ + src/libultra/gu/sins.c \ + src/libultra/gu/sintable.c \ + src/libultra/libc/sprintf.c + +O_FILES := \ + $(C_FILES:%.c=build/%.o) \ + $(CXX_FILES:%.cpp=build/%.o) +D_FILES := $(O_FILES:%.o=%.d) + +# create build directory +SRC_DIRS := $(shell find . -type d -a -not -path "*build*") +$(shell mkdir -p $(SRC_DIRS:%=build/%)) + +all: + $(MAKE) -C ../libultraship + $(MAKE) $(TARGET) + +setup: + cd ../OTRExporter && python3 extract_baserom.py + $(MAKE) mpq + +mpq: + $(MAKE) -C ../libultraship + $(MAKE) -C ../OTRExporter/OTRExporter + $(MAKE) -C ../ZAPDTR + rm -rf ../OTRExporter/oot.otr + cd ../OTRExporter && python3 extract_assets.py + cp ../OTRExporter/oot.otr . + +distclean: clean + $(RM) -r baserom/ + $(MAKE) clean -C ../libultraship + $(MAKE) clean -C ../OTRExporter/OTRExporter + $(MAKE) clean -C ../ZAPDTR + +clean: + rm -rf build $(TARGET) + +.PHONY: all clean distclean setup mpq + +build/%.o: %.cpp + $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) $(OPTFLAGS) $(INC_DIRS) $< -o $@ + +build/%.o: %.c + $(CC) -c $(CFLAGS) $(CPPFLAGS) $(OPTFLAGS) $(INC_DIRS) $< -o $@ + +# make soh depend on libultraship +$(TARGET): $(LIBULTRASHIP) + +$(TARGET): $(O_FILES) + $(CXX) $^ -o $@ $(LDFLAGS) -fuse-ld=$(LD) $(LDDIRS) $(LDLIBS) + +-include $(D_FILES) \ No newline at end of file diff --git a/soh/include/alloca.h b/soh/include/alloca.h index 9c6a0ab94..10025b7f7 100644 --- a/soh/include/alloca.h +++ b/soh/include/alloca.h @@ -1,7 +1,7 @@ #ifndef ALLOCA_H #define ALLOCA_H -void* alloca(u32); +// void* alloca(u32); //#define alloca __builtin_alloca #define alloca malloc diff --git a/soh/include/functions.h b/soh/include/functions.h index 7d368edb6..4cbc285a3 100644 --- a/soh/include/functions.h +++ b/soh/include/functions.h @@ -14,7 +14,7 @@ extern "C" #if defined(INCLUDE_GAME_PRINTF) && !defined(NDEBUG) #define osSyncPrintf(fmt, ...) lusprintf(__FILE__, __LINE__, 0, fmt, __VA_ARGS__) #else -#define osSyncPrintf(fmt, ...) osSyncPrintfUnused(fmt, __VA_ARGS__) +#define osSyncPrintf(fmt, ...) osSyncPrintfUnused(fmt, ##__VA_ARGS__) #endif f32 fabsf(f32 f); diff --git a/soh/include/global.h b/soh/include/global.h index 4845728dd..2e4808fe0 100644 --- a/soh/include/global.h +++ b/soh/include/global.h @@ -4,8 +4,8 @@ #include "functions.h" #include "variables.h" #include "macros.h" -#include "soh\OTRGlobals.h" -#include "soh\Enhancements\gameconsole.h" +#include "soh/OTRGlobals.h" +#include "soh/Enhancements/gameconsole.h" #include "Cvar.h" diff --git a/soh/include/macros.h b/soh/include/macros.h index c57effe02..a621a65f8 100644 --- a/soh/include/macros.h +++ b/soh/include/macros.h @@ -205,6 +205,14 @@ extern GraphicsContext* __gfxCtx; #define ALIGNED8 #endif -#define SEG_ADDR(seg, addr) (addr | (seg << 24) | 0xF0000000) +#define SEG_ADDR(seg, addr) (addr | (seg << 24) | 1) + +#ifdef _MSC_VER +#define BOMSWAP16 _byteswap_ushort +#define BOMSWAP32 _byteswap_ulong +#else +#define BOMSWAP16 __builtin_bswap16 +#define BOMSWAP32 __builtin_bswap32 +#endif #endif diff --git a/soh/include/ultra64.h b/soh/include/ultra64.h index 65ef6d147..c2e0e9b29 100644 --- a/soh/include/ultra64.h +++ b/soh/include/ultra64.h @@ -1,6 +1,9 @@ #ifndef ULTRA64_H #define ULTRA64_H +#include +#include +#include #include "ultra64/types.h" #include "unk.h" diff --git a/soh/soh.vcxproj b/soh/soh.vcxproj index 2bd4380b9..418fdd057 100644 --- a/soh/soh.vcxproj +++ b/soh/soh.vcxproj @@ -278,6 +278,7 @@ + diff --git a/soh/soh/Enhancements/debugconsole.cpp b/soh/soh/Enhancements/debugconsole.cpp index 87252ee92..e22f66d8c 100644 --- a/soh/soh/Enhancements/debugconsole.cpp +++ b/soh/soh/Enhancements/debugconsole.cpp @@ -18,7 +18,7 @@ extern "C" { extern GlobalContext* gGlobalCtx; } -#include "cvar.h" +#include "Cvar.h" #define CMD_REGISTER SohImGui::BindCmd diff --git a/soh/soh/Enhancements/debugger/colViewer.cpp b/soh/soh/Enhancements/debugger/colViewer.cpp index 8cfad1166..bbf791f67 100644 --- a/soh/soh/Enhancements/debugger/colViewer.cpp +++ b/soh/soh/Enhancements/debugger/colViewer.cpp @@ -4,6 +4,7 @@ #include #include +#include extern "C" { #include diff --git a/soh/soh/Enhancements/gameconsole.h b/soh/soh/Enhancements/gameconsole.h index d7052fce3..33301afe6 100644 --- a/soh/soh/Enhancements/gameconsole.h +++ b/soh/soh/Enhancements/gameconsole.h @@ -3,7 +3,7 @@ #include #include -#include "cvar.h" +#include "Cvar.h" #define MAX_CVARS 2048 diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index aad82be29..f7ff39cdc 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -11,10 +11,14 @@ #include "Window.h" #include "z64animation.h" #include "z64bgcheck.h" -#include "../soh/enhancements/gameconsole.h" +#include "Enhancements/gameconsole.h" #include #include +#ifdef _WIN32 #include +#else +#include +#endif #include #include #include @@ -22,10 +26,11 @@ #include #include "Lib/stb/stb_image.h" #include "AudioPlayer.h" -#include "../soh/Enhancements/debugconsole.h" -#include "../soh/Enhancements/debugger/debugger.h" +#include "Enhancements/debugconsole.h" +#include "Enhancements/debugger/debugger.h" #include "Utils/BitConverter.h" #include "variables.h" +#include "macros.h" #include OTRGlobals* OTRGlobals::Instance; @@ -59,7 +64,7 @@ extern "C" void InitOTR() { OTRGlobals::Instance = new OTRGlobals(); auto t = OTRGlobals::Instance->context->GetResourceManager()->LoadFile("version"); - if (!t->bHasLoadError) + if (!t->bHasLoadError) { //uint32_t gameVersion = BitConverter::ToUInt32BE((uint8_t*)t->buffer.get(), 0); uint32_t gameVersion = *((uint32_t*)t->buffer.get()); @@ -72,6 +77,7 @@ extern "C" void InitOTR() { Debug_Init(); } +#ifdef _WIN32 extern "C" uint64_t GetFrequency() { LARGE_INTEGER nFreq; @@ -86,6 +92,21 @@ extern "C" uint64_t GetPerfCounter() { return ticks.QuadPart; } +#else +extern "C" uint64_t GetFrequency() { + return 1000; // sec -> ms +} + +extern "C" uint64_t GetPerfCounter() { + struct timespec monotime; + clock_gettime(CLOCK_MONOTONIC, &monotime); + + uint64_t remainingMs = (monotime.tv_nsec / 1000000); + + // in milliseconds + return monotime.tv_sec * 1000 + remainingMs; +} +#endif // C->C++ Bridge extern "C" void Graph_ProcessFrame(void (*run_one_game_iter)(void)) { @@ -185,7 +206,7 @@ extern "C" void OTRResetScancode() OTRGlobals::Instance->context->GetWindow()->lastScancode = -1; } -extern "C" uint32_t ResourceMgr_GetGameVersion() +extern "C" uint32_t ResourceMgr_GetGameVersion() { return OTRGlobals::Instance->context->GetResourceManager()->GetGameVersion(); } @@ -309,7 +330,7 @@ extern "C" char* ResourceMgr_LoadArrayByNameAsVec3s(const char* path) { if (res->cachedGameAsset != nullptr) return (char*)res->cachedGameAsset; - else + else { Vec3s* data = (Vec3s*)malloc(sizeof(Vec3s) * res->scalars.size()); @@ -429,7 +450,7 @@ extern "C" int ResourceMgr_OTRSigCheck(char* imgData) { uintptr_t i = (uintptr_t)(imgData); - if (i == 0xD9000000 || i == 0xE7000000 || (i & 0xF0000000) == 0xF0000000) + if (i == 0xD9000000 || i == 0xE7000000 || (i & 1) == 1) return 0; if ((i & 0xFF000000) != 0xAB000000 && (i & 0xFF000000) != 0xCD000000 && i != 0) { @@ -823,24 +844,24 @@ extern "C" int16_t OTRGetRectDimensionFromRightEdge(float v) { } extern "C" void bswapSoundFontSound(SoundFontSound* swappable) { - swappable->sample = (SoundFontSample*)_byteswap_ulong((u32)swappable->sample); - swappable->tuningAsU32 = _byteswap_ulong((u32)swappable->tuningAsU32); + swappable->sample = (SoundFontSample*)BOMSWAP32((u32)swappable->sample); + swappable->tuningAsU32 = BOMSWAP32((u32)swappable->tuningAsU32); } extern "C" void bswapDrum(Drum* swappable) { bswapSoundFontSound(&swappable->sound); - swappable->envelope = (AdsrEnvelope*)_byteswap_ulong((u32)swappable->envelope); + swappable->envelope = (AdsrEnvelope*)BOMSWAP32((u32)swappable->envelope); } extern "C" void bswapInstrument(Instrument* swappable) { - swappable->envelope = (AdsrEnvelope*)_byteswap_ulong((u32)swappable->envelope); + swappable->envelope = (AdsrEnvelope*)BOMSWAP32((u32)swappable->envelope); bswapSoundFontSound(&swappable->lowNotesSound); bswapSoundFontSound(&swappable->normalNotesSound); bswapSoundFontSound(&swappable->highNotesSound); } extern "C" void bswapSoundFontSample(SoundFontSample* swappable) { - u32 origBitfield = _byteswap_ulong(swappable->asU32); + u32 origBitfield = BOMSWAP32(swappable->asU32); swappable->codec = (origBitfield >> 28) & 0x0F; swappable->medium = (origBitfield >> 24) & 0x03; @@ -848,29 +869,29 @@ extern "C" void bswapSoundFontSample(SoundFontSample* swappable) { swappable->unk_bit25 = (origBitfield >> 21) & 0x01; swappable->size = (origBitfield) & 0x00FFFFFF; - swappable->sampleAddr = (u8*)_byteswap_ulong((u32)swappable->sampleAddr); - swappable->loop = (AdpcmLoop*)_byteswap_ulong((u32)swappable->loop); - swappable->book = (AdpcmBook*)_byteswap_ulong((u32)swappable->book); + swappable->sampleAddr = (u8*)BOMSWAP32((u32)swappable->sampleAddr); + swappable->loop = (AdpcmLoop*)BOMSWAP32((u32)swappable->loop); + swappable->book = (AdpcmBook*)BOMSWAP32((u32)swappable->book); } extern "C" void bswapAdpcmLoop(AdpcmLoop* swappable) { - swappable->start = (u32)_byteswap_ulong((u32)swappable->start); - swappable->end = (u32)_byteswap_ulong((u32)swappable->end); - swappable->count = (u32)_byteswap_ulong((u32)swappable->count); + swappable->start = (u32)BOMSWAP32((u32)swappable->start); + swappable->end = (u32)BOMSWAP32((u32)swappable->end); + swappable->count = (u32)BOMSWAP32((u32)swappable->count); if (swappable->count != 0) { for (int i = 0; i < 16; i++) { - swappable->state[i] = (s16)_byteswap_ushort(swappable->state[i]); + swappable->state[i] = (s16)BOMSWAP16(swappable->state[i]); } } } extern "C" void bswapAdpcmBook(AdpcmBook* swappable) { - swappable->order = (u32)_byteswap_ulong((u32)swappable->order); - swappable->npredictors = (u32)_byteswap_ulong((u32)swappable->npredictors); + swappable->order = (u32)BOMSWAP32((u32)swappable->order); + swappable->npredictors = (u32)BOMSWAP32((u32)swappable->npredictors); for (int i = 0; i < swappable->npredictors * swappable->order * sizeof(s16) * 4; i++) - swappable->book[i] = (s16)_byteswap_ushort(swappable->book[i]); + swappable->book[i] = (s16)BOMSWAP16(swappable->book[i]); } extern "C" bool AudioPlayer_Init(void) { @@ -900,7 +921,7 @@ extern "C" void AudioPlayer_Play(const uint8_t* buf, uint32_t len) { } extern "C" int Controller_ShouldRumble(size_t i) { - for (const auto& controller : Ship::Window::Controllers.at(i)) + for (const auto& controller : Ship::Window::Controllers.at(i)) { float rumble_strength = CVar_GetFloat(StringHelper::Sprintf("gCont%i_RumbleStrength", i).c_str(), 1.0f); diff --git a/soh/soh/stubs.c b/soh/soh/stubs.c index c47c1fa5d..98f3b4823 100644 --- a/soh/soh/stubs.c +++ b/soh/soh/stubs.c @@ -12,12 +12,12 @@ OSViMode osViModeNtscLan1; OSViMode osViModeMpalLan1; OSViMode osViModeFpalLan1; OSViMode osViModePalLan1; -AudioContext gAudioContext; -unk_D_8016E750 D_8016E750[4]; +// AudioContext gAudioContext; +// unk_D_8016E750 D_8016E750[4]; u8 gLetterTLUT[4][32]; u8 gFontFF[999]; DmaEntry gDmaDataTable[0x60C]; -u8 D_80133418; +// u8 D_80133418; u16 gAudioSEFlagSwapSource[64]; u16 gAudioSEFlagSwapTarget[64]; u8 gAudioSEFlagSwapMode[64]; diff --git a/soh/soh/z_play_otr.cpp b/soh/soh/z_play_otr.cpp index c84e37482..3e2a990d7 100644 --- a/soh/soh/z_play_otr.cpp +++ b/soh/soh/z_play_otr.cpp @@ -12,7 +12,7 @@ void OTRGameplay_InitScene(GlobalContext* globalCtx, s32 spawn); s32 OTRScene_ExecuteCommands(GlobalContext* globalCtx, Ship::Scene* sceneCmd); //Ship::OTRResource* OTRGameplay_LoadFile(GlobalContext* globalCtx, RomFile* file) { -Ship::Resource* OTRGameplay_LoadFile(GlobalContext* globalCtx, const char* fileName) +Ship::Resource* OTRGameplay_LoadFile(GlobalContext* globalCtx, const char* fileName) { auto res = OTRGlobals::Instance->context->GetResourceManager()->LoadResource(fileName); return res.get(); @@ -28,7 +28,7 @@ extern "C" void OTRGameplay_SpawnScene(GlobalContext* globalCtx, s32 sceneNum, s //osSyncPrintf("\nSCENE SIZE %fK\n", (scene->sceneFile.vromEnd - scene->sceneFile.vromStart) / 1024.0f); - std::string scenePath = StringHelper::Sprintf("scenes\\%s\\%s", scene->sceneFile.fileName, scene->sceneFile.fileName); + std::string scenePath = StringHelper::Sprintf("scenes/%s/%s", scene->sceneFile.fileName, scene->sceneFile.fileName); globalCtx->sceneSegment = (Ship::Scene*)OTRGameplay_LoadFile(globalCtx, scenePath.c_str()); @@ -47,7 +47,7 @@ extern "C" void OTRGameplay_SpawnScene(GlobalContext* globalCtx, s32 sceneNum, s //gSegments[2] = VIRTUAL_TO_PHYSICAL(globalCtx->sceneSegment); OTRGameplay_InitScene(globalCtx, spawn); - + osSyncPrintf("ROOM SIZE=%fK\n", func_80096FE8(globalCtx, &globalCtx->roomCtx) / 1024.0f); } @@ -72,7 +72,7 @@ void OTRGameplay_InitScene(GlobalContext* globalCtx, s32 spawn) { ->GetResourceManager() ->LoadResource("object_link_child\\object_link_childVtx_01FE08") .get()); - + auto data2 = ResourceMgr_LoadVtxByCRC(0x68d4ea06044e228f);*/ volatile int a = 0; diff --git a/soh/soh/z_scene_otr.cpp b/soh/soh/z_scene_otr.cpp index f63df81e4..123f9c636 100644 --- a/soh/soh/z_scene_otr.cpp +++ b/soh/soh/z_scene_otr.cpp @@ -72,7 +72,7 @@ bool func_800985DC(GlobalContext* globalCtx, Ship::SceneCommand* cmd) { else { ActorEntry* entries = (ActorEntry*)malloc(cmdActor->entries.size() * sizeof(ActorEntry)); - + for (int i = 0; i < cmdActor->entries.size(); i++) { entries[i].id = cmdActor->entries[i].actorNum; @@ -241,7 +241,7 @@ bool func_800987F8(GlobalContext* globalCtx, Ship::SceneCommand* cmd) globalCtx->setupEntranceList[i].room = otrEntrance->entrances[i].roomToLoad; globalCtx->setupEntranceList[i].spawn = otrEntrance->entrances[i].startPositionIndex; } - + otrEntrance->cachedGameData = globalCtx->setupEntranceList; } @@ -252,11 +252,11 @@ bool func_800987F8(GlobalContext* globalCtx, Ship::SceneCommand* cmd) bool func_8009883C(GlobalContext* globalCtx, Ship::SceneCommand* cmd) { Ship::SetSpecialObjects* otrSpecial = (Ship::SetSpecialObjects*)cmd; - + if (otrSpecial->globalObject != 0) globalCtx->objectCtx.subKeepIndex = Object_Spawn(&globalCtx->objectCtx, otrSpecial->globalObject); - if (otrSpecial->elfMessage != 0) + if (otrSpecial->elfMessage != 0) { auto res = (Ship::Blob*)OTRGameplay_LoadFile(globalCtx, sNaviMsgFiles[otrSpecial->elfMessage - 1].fileName); globalCtx->cUpElfMsgs = (ElfMessage*)res->data.data(); @@ -436,7 +436,7 @@ extern "C" void* func_800982FC(ObjectContext * objectCtx, s32 bankIndex, s16 obj bool func_8009899C(GlobalContext* globalCtx, Ship::SceneCommand* cmd) { Ship::SetObjectList* cmdObj = (Ship::SetObjectList*)cmd; - + s32 i; s32 j; s32 k; @@ -743,7 +743,7 @@ bool func_8009918C(GlobalContext* globalCtx, Ship::SceneCommand* cmd) } // Scene Command 0x18: Alternate Headers -bool func_800991A0(GlobalContext* globalCtx, Ship::SceneCommand* cmd) +bool func_800991A0(GlobalContext* globalCtx, Ship::SceneCommand* cmd) { Ship::SetAlternateHeaders* cmdHeaders = (Ship::SetAlternateHeaders*)cmd; @@ -754,7 +754,7 @@ bool func_800991A0(GlobalContext* globalCtx, Ship::SceneCommand* cmd) //osSyncPrintf("\n[ZU]sceneset time =[%X]", ((void)0, gSaveContext.cutsceneIndex)); //osSyncPrintf("\n[ZU]sceneset counter=[%X]", ((void)0, gSaveContext.sceneSetupIndex)); - if (gSaveContext.sceneSetupIndex != 0) + if (gSaveContext.sceneSetupIndex != 0) { std::string desiredHeader = cmdHeaders->headers[gSaveContext.sceneSetupIndex - 1]; Ship::Scene* headerData = nullptr; @@ -798,7 +798,7 @@ bool func_800991A0(GlobalContext* globalCtx, Ship::SceneCommand* cmd) } // Scene Command 0x17: Cutscene Data -bool func_8009934C(GlobalContext* globalCtx, Ship::SceneCommand* cmd) +bool func_8009934C(GlobalContext* globalCtx, Ship::SceneCommand* cmd) { Ship::SetCutscenes* cmdCS = (Ship::SetCutscenes*)cmd; @@ -810,7 +810,7 @@ bool func_8009934C(GlobalContext* globalCtx, Ship::SceneCommand* cmd) } // Scene Command 0x19: Misc. Settings (Camera & World Map Area) -bool func_800993C0(GlobalContext* globalCtx, Ship::SceneCommand* cmd) +bool func_800993C0(GlobalContext* globalCtx, Ship::SceneCommand* cmd) { Ship::SetCameraSettings* cmdCam = (Ship::SetCameraSettings*)cmd; diff --git a/soh/src/code/audio_effects.c b/soh/src/code/audio_effects.c index 4813d1c63..d5aa3644f 100644 --- a/soh/src/code/audio_effects.c +++ b/soh/src/code/audio_effects.c @@ -246,7 +246,7 @@ f32 Audio_AdsrUpdate(AdsrState* adsr) { retry: case ADSR_STATE_LOOP: - adsr->delay = (s16)_byteswap_ushort(adsr->envelope[adsr->envIndex].delay); + adsr->delay = (s16)BOMSWAP16(adsr->envelope[adsr->envIndex].delay); switch (adsr->delay) { case ADSR_DISABLE: adsr->action.s.state = ADSR_STATE_DISABLED; @@ -255,7 +255,7 @@ f32 Audio_AdsrUpdate(AdsrState* adsr) { adsr->action.s.state = ADSR_STATE_HANG; break; case ADSR_GOTO: - adsr->envIndex = (s16)_byteswap_ushort(adsr->envelope[adsr->envIndex].arg); + adsr->envIndex = (s16)BOMSWAP16(adsr->envelope[adsr->envIndex].arg); goto retry; case ADSR_RESTART: adsr->action.s.state = ADSR_STATE_INITIAL; @@ -266,7 +266,7 @@ f32 Audio_AdsrUpdate(AdsrState* adsr) { if (adsr->delay == 0) { adsr->delay = 1; } - adsr->target = (s16)_byteswap_ushort(adsr->envelope[adsr->envIndex].arg) / 32767.0f; + adsr->target = (s16)BOMSWAP16(adsr->envelope[adsr->envIndex].arg) / 32767.0f; adsr->target = adsr->target * adsr->target; adsr->velocity = (adsr->target - adsr->current) / adsr->delay; adsr->action.s.state = ADSR_STATE_FADE; diff --git a/soh/src/code/audio_load.c b/soh/src/code/audio_load.c index ec8b7be86..7af9037a6 100644 --- a/soh/src/code/audio_load.c +++ b/soh/src/code/audio_load.c @@ -1058,7 +1058,7 @@ void AudioLoad_InitSwapFontSampleHeaders(SoundFontSample* sample, uintptr_t romA size_t maxSoundFontSize = 0x3AA0; // soundFont 0 is the largest size at 0x3AA0 AdpcmLoop* loop; AdpcmBook* book; - + if (((uintptr_t)sample->loop > maxSoundFontSize) || ((uintptr_t)sample->book > maxSoundFontSize) ) { bswapSoundFontSample(sample); @@ -1093,7 +1093,7 @@ void AudioLoad_InitSwapFont(void) { SoundFontSound* sfxList; SoundFontSound* sfx; Instrument** instList; - Instrument* inst; + Instrument* inst; // Only up to (numFonts - 1) as final font has garbage data to prevent corruption and is never used for (fontId = 0; fontId < (numFonts - 1); fontId++) { @@ -1110,12 +1110,12 @@ void AudioLoad_InitSwapFont(void) { numInstruments = font->numInstruments; // drums - ptrs[0] = (void*)_byteswap_ulong((uintptr_t)ptrs[0]); + ptrs[0] = (void*)BOMSWAP32((uintptr_t)ptrs[0]); if ((ptrs[0] != NULL) && (numDrums != 0)) { drumList = (Drum**)BASE_ROM_OFFSET(ptrs[0]); for (i = 0; i < numDrums; i++) { - drumList[i] = (Drum*)_byteswap_ulong((uintptr_t)drumList[i]); + drumList[i] = (Drum*)BOMSWAP32((uintptr_t)drumList[i]); if (drumList[i] != NULL) { drum = (Drum*)BASE_ROM_OFFSET(drumList[i]); @@ -1128,7 +1128,7 @@ void AudioLoad_InitSwapFont(void) { } // sfxs - ptrs[1] = (void*)_byteswap_ulong((u32)ptrs[1]); + ptrs[1] = (void*)BOMSWAP32((u32)ptrs[1]); if ((ptrs[1] != NULL) && (numSfxs != 0)) { sfxList = (SoundFontSound*)BASE_ROM_OFFSET(ptrs[1]); @@ -1151,7 +1151,7 @@ void AudioLoad_InitSwapFont(void) { instList = (Instrument**)(&ptrs[2]); for (i = 0; i < numInstruments; i++) { - instList[i] = (Instrument*)_byteswap_ulong((uintptr_t)instList[i]); + instList[i] = (Instrument*)BOMSWAP32((uintptr_t)instList[i]); if (instList[i] != NULL) { inst = BASE_ROM_OFFSET(instList[i]); @@ -1159,15 +1159,15 @@ void AudioLoad_InitSwapFont(void) { if (inst->normalRangeLo != 0) { sample = (SoundFontSample*)BASE_ROM_OFFSET(inst->lowNotesSound.sample); - AudioLoad_InitSwapFontSampleHeaders(sample, romAddr); + AudioLoad_InitSwapFontSampleHeaders(sample, romAddr); } sample = (SoundFontSample*)BASE_ROM_OFFSET(inst->normalNotesSound.sample); - AudioLoad_InitSwapFontSampleHeaders(sample, romAddr); - + AudioLoad_InitSwapFontSampleHeaders(sample, romAddr); + if (inst->normalRangeHi != 0x7F) { sample = (SoundFontSample*)BASE_ROM_OFFSET(inst->highNotesSound.sample); - AudioLoad_InitSwapFontSampleHeaders(sample, romAddr); + AudioLoad_InitSwapFontSampleHeaders(sample, romAddr); } } } diff --git a/soh/src/code/audio_seqplayer.c b/soh/src/code/audio_seqplayer.c index 03e8842e3..3dd7b811e 100644 --- a/soh/src/code/audio_seqplayer.c +++ b/soh/src/code/audio_seqplayer.c @@ -1323,14 +1323,14 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) { case 0xB2: offset = (u16)parameters[0]; // OTRTODO: Byteswap added for quick audio - channel->unk_22 = _byteswap_ushort(*(u16*)(seqPlayer->seqData + (uintptr_t)(offset + scriptState->value * 2))); + channel->unk_22 = BOMSWAP16(*(u16*)(seqPlayer->seqData + (uintptr_t)(offset + scriptState->value * 2))); break; case 0xB4: channel->dynTable = (void*)&seqPlayer->seqData[channel->unk_22]; break; case 0xB5: // OTRTODO: Byteswap added for quick audio - channel->unk_22 = _byteswap_ushort(((u16*)(channel->dynTable))[scriptState->value]); + channel->unk_22 = BOMSWAP16(((u16*)(channel->dynTable))[scriptState->value]); break; case 0xB6: scriptState->value = (*channel->dynTable)[0][scriptState->value]; diff --git a/soh/src/code/audio_synthesis.c b/soh/src/code/audio_synthesis.c index e71c6b441..037bd2ec3 100644 --- a/soh/src/code/audio_synthesis.c +++ b/soh/src/code/audio_synthesis.c @@ -1162,7 +1162,7 @@ Acmd* AudioSynth_LoadWaveSamples(Acmd* cmd, NoteSubEu* noteSubEu, NoteSynthesisS if (temp_v0 < nSamplesToLoad) { repeats = ((nSamplesToLoad - temp_v0 + 0x3F) / 0x40); if (repeats != 0) { - aDuplicate(cmd++, repeats, DMEM_UNCOMPRESSED_NOTE, DMEM_UNCOMPRESSED_NOTE + 0x80, 0x80); + aDuplicate(cmd++, repeats, DMEM_UNCOMPRESSED_NOTE, DMEM_UNCOMPRESSED_NOTE + 0x80); } } synthState->samplePosInt = samplePosInt; @@ -1225,6 +1225,6 @@ Acmd* AudioSynth_NoteApplyHeadsetPanEffects(Acmd* cmd, NoteSubEu* noteSubEu, Not aSaveBuffer(cmd++, DMEM_NOTE_PAN_TEMP + bufLen, &synthState->synthesisBuffers->panResampleState[0x8], ALIGN16(panShift)); } - aAddMixer(cmd++, ALIGN64(bufLen), DMEM_NOTE_PAN_TEMP, dest, 0x7FFF); + aAddMixer(cmd++, ALIGN64(bufLen), DMEM_NOTE_PAN_TEMP, dest); return cmd; } diff --git a/soh/src/code/padmgr.c b/soh/src/code/padmgr.c index 08c89869f..b467f5ee6 100644 --- a/soh/src/code/padmgr.c +++ b/soh/src/code/padmgr.c @@ -3,7 +3,9 @@ //#include +#ifdef _MSC_VER extern void* __cdecl memset(_Out_writes_bytes_all_(_Size) void* _Dst, _In_ int _Val, _In_ size_t _Size); +#endif s32 D_8012D280 = 1; diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index 9a56000ec..a9f50f687 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -7,13 +7,13 @@ #include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" #include "objects/object_bdoor/object_bdoor.h" -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined(__GNUC__) #include #include #include #endif -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined(__GNUC__) #include "textures/place_title_cards/g_pn_49.h" #include "textures/place_title_cards/g_pn_01.h" #include "textures/place_title_cards/g_pn_02.h" @@ -765,7 +765,7 @@ void TitleCard_InitBossName(GlobalContext* globalCtx, TitleCardContext* titleCtx titleCtx->texture = texture; titleCtx->isBossCard = true; - titleCtx->hasTranslation = hasTranslation; + titleCtx->hasTranslation = hasTranslation; titleCtx->x = x; titleCtx->y = y; titleCtx->width = width; @@ -774,7 +774,7 @@ void TitleCard_InitBossName(GlobalContext* globalCtx, TitleCardContext* titleCtx titleCtx->delayTimer = 0; } -void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCtx, char* texture, s32 x, s32 y, +void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s32 x, s32 y, s32 width, s32 height, s32 delay) { SceneTableEntry* loadedScene = globalCtx->loadedScene; @@ -4272,8 +4272,6 @@ s32 func_80035124(Actor* actor, GlobalContext* globalCtx) { return ret; } -#include "z_cheap_proc.c" - u8 func_800353E8(GlobalContext* globalCtx) { Player* player = GET_PLAYER(globalCtx); diff --git a/soh/src/code/z_bgcheck.c b/soh/src/code/z_bgcheck.c index 9ce139eed..811b0bea1 100644 --- a/soh/src/code/z_bgcheck.c +++ b/soh/src/code/z_bgcheck.c @@ -4031,7 +4031,7 @@ s32 func_80041E4C(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) { /** * unused */ -u32 func_80041E80(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) { +s32 func_80041E80(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) { return SurfaceType_GetData(colCtx, poly, bgId, 0) >> 26 & 0xF; } diff --git a/soh/src/code/z_camera.c b/soh/src/code/z_camera.c index 7302f9b21..94faf8124 100644 --- a/soh/src/code/z_camera.c +++ b/soh/src/code/z_camera.c @@ -26,7 +26,7 @@ s32 Camera_CheckWater(Camera* camera); #define FLG_ADJSLOPE (1 << 0) #define FLG_OFFGROUND (1 << 7) -#include "z_camera_data.c" +#include "z_camera_data.inc" /*===============================================================*/ diff --git a/soh/src/code/z_camera_data.c b/soh/src/code/z_camera_data.inc similarity index 100% rename from soh/src/code/z_camera_data.c rename to soh/src/code/z_camera_data.inc diff --git a/soh/src/code/z_demo.c b/soh/src/code/z_demo.c index d0145fb43..f6bb7d572 100644 --- a/soh/src/code/z_demo.c +++ b/soh/src/code/z_demo.c @@ -2105,7 +2105,7 @@ void Cutscene_HandleConditionalTriggers(GlobalContext* globalCtx) { } void Cutscene_SetSegment(GlobalContext* globalCtx, void* segment) { - if (SEGMENT_NUMBER(segment) != 0) + if (SEGMENT_NUMBER(segment) != 0) { globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(segment); } else { diff --git a/soh/src/code/z_fbdemo_circle.c b/soh/src/code/z_fbdemo_circle.c index a6a46a0e4..5c8f688fa 100644 --- a/soh/src/code/z_fbdemo_circle.c +++ b/soh/src/code/z_fbdemo_circle.c @@ -19,9 +19,9 @@ Gfx __sCircleDList[] = { G_AC_NONE | G_ZS_PIXEL | G_RM_XLU_SURF | G_RM_XLU_SURF2), // 4 gsDPSetCombineMode(G_CC_BLENDPEDECALA, G_CC_BLENDPEDECALA), // 5 gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), // 6 - gsDPLoadTextureBlock(0xF8000000, G_IM_FMT_I, G_IM_SIZ_8b, 16, 64, 0, G_TX_NOMIRROR | G_TX_WRAP, // 7 + gsDPLoadTextureBlock(SEG_ADDR(8, 0), G_IM_FMT_I, G_IM_SIZ_8b, 16, 64, 0, G_TX_NOMIRROR | G_TX_WRAP, // 7 G_TX_NOMIRROR | G_TX_CLAMP, 4, 6, G_TX_NOLOD, G_TX_NOLOD), - gsSPDisplayList(0xF9000000), // 8 + gsSPDisplayList(SEG_ADDR(9, 0)), // 8 gsSPVertex(sCircleWipeVtx, 32, 0), // 9 gsSP2Triangles(0, 1, 2, 0, 1, 3, 4, 0), // 10 gsSP2Triangles(3, 5, 6, 0, 5, 7, 8, 0), // 11 diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c index 7f3507abd..1c8e013f6 100644 --- a/soh/src/code/z_player_lib.c +++ b/soh/src/code/z_player_lib.c @@ -654,7 +654,7 @@ u8 sEyeMouthIndexes[][2] = { * from adult Link's object are used here. */ -#if defined(MODDING) || (_MSC_VER) +#if defined(MODDING) || defined(_MSC_VER) || defined(__GNUC__) //TODO: Formatting void* sEyeTextures[2][8] = { { gLinkAdultEyesOpenTex, gLinkAdultEyesHalfTex, gLinkAdultEyesClosedfTex, gLinkAdultEyesRollLeftTex, @@ -670,7 +670,7 @@ void* sEyeTextures[] = { }; #endif -#if defined(modding) || defined(_MSC_VER) +#if defined(MODDING) || defined(_MSC_VER) || defined(__GNUC__) void* sMouthTextures[2][4] = { { gLinkAdultMouth1Tex, @@ -726,7 +726,7 @@ void func_8008F470(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, if (eyeIndex > 7) eyeIndex = 7; -#if defined(MODDING) || (_MSC_VER) +#if defined(MODDING) || defined(_MSC_VER) || defined(__GNUC__) gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[gSaveContext.linkAge][eyeIndex])); #else gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[eyeIndex])); @@ -738,7 +738,7 @@ void func_8008F470(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, if (mouthIndex > 3) mouthIndex = 3; -#if defined(MODDING) || (_MSC_VER) +#if defined(MODDING) || defined(_MSC_VER) || defined(__GNUC__) gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthTextures[gSaveContext.linkAge][mouthIndex])); #else gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthTextures[eyeIndex])); diff --git a/soh/src/code/z_skelanime.c b/soh/src/code/z_skelanime.c index 2c03390e9..6dbfac7ef 100644 --- a/soh/src/code/z_skelanime.c +++ b/soh/src/code/z_skelanime.c @@ -863,7 +863,7 @@ void AnimationContext_SetLoadFrame(GlobalContext* globalCtx, LinkAnimationHeader char animPath[2048]; - sprintf(animPath, "misc\\link_animetion\\gPlayerAnimData_%06X", (((uintptr_t)linkAnimHeader->segment - 0x07000000))); + sprintf(animPath, "misc/link_animetion/gPlayerAnimData_%06X", (((uintptr_t)linkAnimHeader->segment - 0x07000000))); //printf("Streaming %s, seg = %08X\n", animPath, linkAnimHeader->segment); @@ -877,7 +877,7 @@ void AnimationContext_SetLoadFrame(GlobalContext* globalCtx, LinkAnimationHeader { ramPtr[i] = i * 7; }*/ - + //DmaMgr_SendRequest2(&entry->data.load.req, ram, //LINK_ANIMATION_OFFSET(linkAnimHeader->segment, ((sizeof(Vec3s) * limbCount + 2) * frame)), diff --git a/soh/src/code/z_vismono.c b/soh/src/code/z_vismono.c index 82acc9a17..2af876ad6 100644 --- a/soh/src/code/z_vismono.c +++ b/soh/src/code/z_vismono.c @@ -42,7 +42,7 @@ Gfx* VisMono_DrawTexture(VisMono* this, Gfx* gfx) s32 y; s32 height = 3; //u16* tex = D_0F000000; - u16* tex = 0xFF000000; + u16* tex = SEG_ADDR(0xF, 0); gDPPipeSync(gfx++); gDPSetOtherMode(gfx++, diff --git a/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c index 94ea16422..227e0d6f0 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c @@ -210,7 +210,7 @@ static Vec3f sAudioVec = { 0.0f, 0.0f, 50.0f }; // OTRTODO: This code appears to cause the game to gradually crash... // Might be an OoB write. For now it's disabled. -void BossGanondrof_ClearPixels8x8(s16* texture, u8* mask, s16 index) +void BossGanondrof_ClearPixels8x8(s16* texture, u8* mask, s16 index) { //texture = ResourceMgr_LoadTexByName(texture); if (mask[index]) { @@ -248,18 +248,18 @@ void BossGanondrof_ClearPixels32x16(s16* texture, u8* mask, s16 index) { } } -void BossGanondrof_ClearPixels16x32(s16* texture, u8* mask, s16 index) { +void BossGanondrof_ClearPixels16x32(s16* texture, u8* mask, s16 index) { //texture = ResourceMgr_LoadTexByName(texture); if (mask[index]) { s16 i = ((index & 0xF) * 2) + ((index & 0xF0) * 2); - + ResourceMgr_WriteTexS16ByName(texture, i + 1, 0); ResourceMgr_WriteTexS16ByName(texture, i, 0); //texture[i + 1] = 0; //texture[i] = 0; } - + } void BossGanondrof_ClearPixels(u8* mask, s16 index) { diff --git a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c index dc48b277d..570eedd1f 100644 --- a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c +++ b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c @@ -1505,9 +1505,9 @@ void FileChoose_LoadGame(GameState* thisx) { (gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KNIFE)) { gSaveContext.equips.buttonItems[0] = ITEM_NONE; - swordEquipMask = _byteswap_ushort(gEquipMasks[EQUIP_SWORD]) & gSaveContext.equips.equipment; + swordEquipMask = BOMSWAP16(gEquipMasks[EQUIP_SWORD]) & gSaveContext.equips.equipment; gSaveContext.equips.equipment &= gEquipNegMasks[EQUIP_SWORD]; - gSaveContext.inventory.equipment ^= (gBitFlags[swordEquipMask - 1] << _byteswap_ushort(gEquipShifts[EQUIP_SWORD])); + gSaveContext.inventory.equipment ^= (gBitFlags[swordEquipMask - 1] << BOMSWAP16(gEquipShifts[EQUIP_SWORD])); } } } diff --git a/soh/src/overlays/gamestates/ovl_select/z_select.c b/soh/src/overlays/gamestates/ovl_select/z_select.c index 98aaa4a63..c4a467d63 100644 --- a/soh/src/overlays/gamestates/ovl_select/z_select.c +++ b/soh/src/overlays/gamestates/ovl_select/z_select.c @@ -624,10 +624,10 @@ void Select_Init(GameState* thisx) { this->pageDownIndex = dREG(82); } R_UPDATE_RATE = 1; - #ifndef _MSC_VER +#if !defined(_MSC_VER) && !defined(__GNUC__) this->staticSegment = GameState_Alloc(&this->state, size, "../z_select.c", 1114); DmaMgr_SendRequest1(this->staticSegment, _z_select_staticSegmentRomStart, size, "../z_select.c", 1115); - #endif +#endif gSaveContext.cutsceneIndex = 0x8000; gSaveContext.linkAge = 1; } diff --git a/soh/src/overlays/gamestates/ovl_title/z_title.c b/soh/src/overlays/gamestates/ovl_title/z_title.c index 380720dd1..18996f15e 100644 --- a/soh/src/overlays/gamestates/ovl_title/z_title.c +++ b/soh/src/overlays/gamestates/ovl_title/z_title.c @@ -34,7 +34,7 @@ void Title_PrintBuildInfo(Gfx** gfxp) { #ifdef _MSC_VER GfxPrint_Printf(&printer, "MSVC SHIP"); #else - GfxPrint_Printf(printer, "GCC SHIP"); + GfxPrint_Printf(&printer, "GCC SHIP"); #endif GfxPrint_SetPos(&printer, 5, 4); diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c index 5b90725e1..27575c3b6 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c @@ -119,7 +119,7 @@ void KaleidoScope_DrawPlayerWork(GlobalContext* globalCtx) { func_8009214C(globalCtx, pauseCtx->playerSegment, &pauseCtx->playerSkelAnime, &pos, &rot, scale, CUR_EQUIP_VALUE(EQUIP_SWORD), CUR_EQUIP_VALUE(EQUIP_TUNIC) - 1, CUR_EQUIP_VALUE(EQUIP_SHIELD), CUR_EQUIP_VALUE(EQUIP_BOOTS) - 1); - gsSPResetFB(globalCtx->state.gfxCtx->polyOpa.p++, fbTest); + gsSPResetFB(globalCtx->state.gfxCtx->polyOpa.p++); } void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) { From ea78c7ea1e86f3cba25b0a723848ab94a5c731e9 Mon Sep 17 00:00:00 2001 From: sholdee <102821812+sholdee@users.noreply.github.com> Date: Wed, 11 May 2022 12:20:25 -0500 Subject: [PATCH 116/146] Add Linux build stage to Jenkinsfile (#270) * Add Linux build stage to Jenkinsfile * Update Jenkinsfile * Add OTRGui * Pull in ZAPD.out to assets/extractor * Switch to 7z for artifacts --- Jenkinsfile | 173 +++++++++++++++++++++++++++++----------------------- 1 file changed, 96 insertions(+), 77 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index fa68703b2..2171cbdc6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,29 +1,27 @@ pipeline { - - environment { - MSBUILD='C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Msbuild\\Current\\Bin\\msbuild.exe' - CONFIG='Release' - OTRPLATFORM='x64' - PLATFORM='x86' - ZIP='C:\\Program Files\\7-Zip\\7z.exe' - PYTHON='C:\\Users\\jenkins\\AppData\\Local\\Programs\\Python\\Python310\\python.exe' - TOOLSET='v142' - EMAILTO='' - } - - agent { - label 'SoH-Builders' - } - + agent none + options { timestamps() - timeout(time: 15, unit: 'MINUTES') + timeout(time: 30, unit: 'MINUTES') skipDefaultCheckout(true) } - + stages { - - stage ('Checkout') { + stage ('Build Windows') { + environment { + MSBUILD='C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Msbuild\\Current\\Bin\\msbuild.exe' + CONFIG='Release' + OTRPLATFORM='x64' + PLATFORM='x86' + ZIP='C:\\Program Files\\7-Zip\\7z.exe' + PYTHON='C:\\Users\\jenkins\\AppData\\Local\\Programs\\Python\\Python310\\python.exe' + CMAKE='C:\\Program Files\\CMake\\bin\\cmake.exe' + TOOLSET='v142' + } + agent { + label "SoH-Builders" + } steps { checkout([ $class: 'GitSCM', @@ -32,68 +30,89 @@ pipeline { extensions: scm.extensions, userRemoteConfigs: scm.userRemoteConfigs ]) + + catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { + bat """ + + "${env.MSBUILD}" ".\\OTRExporter\\OTRExporter.sln" -t:build -p:Configuration=${env.CONFIG};Platform=${env.OTRPLATFORM};PlatformToolset=${env.TOOLSET};RestorePackagesConfig=true /restore /nodeReuse:false /m + + xcopy "..\\..\\ZELOOTD.z64" "OTRExporter\\" + + cd "OTRExporter" + "${env.PYTHON}" ".\\extract_assets.py" + cd "..\\" + + "${env.MSBUILD}" ".\\soh\\soh.sln" -t:build -p:Configuration=${env.CONFIG};Platform=${env.PLATFORM};PlatformToolset=${env.TOOLSET} /nodeReuse:false /m + + cd OTRGui + mkdir build + cd build + + "${env.CMAKE}" .. + "${env.CMAKE}" --build . --config Release + + cd "..\\..\\" + + move "soh\\Release\\soh.exe" ".\\" + move "OTRGui\\build\\assets" ".\\" + move ".\\OTRExporter\\x64\\Release\\ZAPD.exe" ".\\assets\\extractor\\" + move ".\\OTRGui\\build\\Release\\OTRGui.exe" ".\\" + rename README.md readme.txt + + "${env.ZIP}" a soh.7z soh.exe OTRGui.exe assets readme.txt + + """ + archiveArtifacts artifacts: 'soh.7z', followSymlinks: false, onlyIfSuccessful: true + } + } + post { + always { + step([$class: 'WsCleanup']) // Clean workspace + } } } - - stage ('Build OTRExporter') { + stage ('Build Linux') { + agent { + label "SoH-Linux-Builders" + } steps { - bat """ - - "${env.MSBUILD}" ".\\OTRExporter\\OTRExporter.sln" -t:restore,build -p:Configuration=${env.CONFIG};Platform=${env.OTRPLATFORM};PlatformToolset=${env.TOOLSET};RestorePackagesConfig=true /nodeReuse:false - - """ + checkout([ + $class: 'GitSCM', + branches: scm.branches, + doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations, + extensions: scm.extensions, + userRemoteConfigs: scm.userRemoteConfigs + ]) + catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { + sh ''' + + cp ../../ZELOOTD.z64 OTRExporter/baserom_non_mq.z64 + docker build . -t soh + docker run --name sohcont -dit --rm -v $(pwd):/soh soh /bin/bash + cp ../../buildsoh.bash soh + docker exec sohcont soh/buildsoh.bash + + mkdir build + mv soh/soh.elf build/ + mv OTRGui/build/OTRGui build/ + mv OTRGui/build/assets build/ + mv ZAPDTR/ZAPD.out build/assets/extractor/ + mv README.md build/readme.txt + cd build + + 7z a soh-linux.7z soh.elf OTRGui assets readme.txt + mv soh-linux.7z ../ + + ''' + } + sh 'sudo docker container stop sohcont' + archiveArtifacts artifacts: 'soh-linux.7z', followSymlinks: false, onlyIfSuccessful: true } - } - - stage ('Extract assets') { - steps { - bat """ - - xcopy "..\\..\\ZELOOTD.z64" "OTRExporter\\" - - cd "OTRExporter" - "${env.PYTHON}" ".\\extract_assets.py" - cd "${env.WORKSPACE}" - - """ + post { + always { + step([$class: 'WsCleanup']) // Clean workspace + } } } - - stage ('Build SoH') { - steps { - bat """ - - "${env.MSBUILD}" ".\\soh\\soh.sln" -t:build -p:Configuration=${env.CONFIG};Platform=${env.PLATFORM};PlatformToolset=${env.TOOLSET} /nodeReuse:false - - """ - } - } - - stage ('Archive artifacts') { - steps { - bat """ - - "${env.ZIP}" a "soh.zip" ".\\soh\\Release\\soh.exe" - - """ - - archiveArtifacts allowEmptyArchive: false, - artifacts: 'soh.zip', - caseSensitive: true, - defaultExcludes: true, - fingerprint: false, - onlyIfSuccessful: true - } - } - } - - post { - always { - step([$class: 'Mailer', - notifyEveryUnstableBuild: true, - recipients: "${env.EMAILTO}", - sendToIndividuals: false]) - step([$class: 'WsCleanup']) // Clean workspace - } } } From fe3e53493850c2f7f897d27a31dc8bee916ce50c Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Wed, 11 May 2022 12:35:03 -0500 Subject: [PATCH 117/146] Implemented overlay command and api (#289) * Added overlay command * Moved Overlays to GameOverlay * Added custom text size calculation * Fixed string cvar load and added fipps font --- .../ship_of_harkinian/fonts/Fipps-Regular.otf | Bin 0 -> 34220 bytes .../fonts/PressStart2P-Regular.ttf | Bin 0 -> 116008 bytes libultraship/libultraship/GameOverlay.cpp | 186 ++++++++++++++++++ libultraship/libultraship/GameOverlay.h | 38 ++++ libultraship/libultraship/SohImGuiImpl.cpp | 11 +- libultraship/libultraship/SohImGuiImpl.h | 3 + .../libultraship/libultraship.vcxproj | 2 + .../libultraship/libultraship.vcxproj.filters | 9 + soh/soh/Enhancements/debugconsole.cpp | 12 +- 9 files changed, 259 insertions(+), 2 deletions(-) create mode 100644 OTRExporter/assets/ship_of_harkinian/fonts/Fipps-Regular.otf create mode 100644 OTRExporter/assets/ship_of_harkinian/fonts/PressStart2P-Regular.ttf create mode 100644 libultraship/libultraship/GameOverlay.cpp create mode 100644 libultraship/libultraship/GameOverlay.h diff --git a/OTRExporter/assets/ship_of_harkinian/fonts/Fipps-Regular.otf b/OTRExporter/assets/ship_of_harkinian/fonts/Fipps-Regular.otf new file mode 100644 index 0000000000000000000000000000000000000000..9334dad594277ba8339786217d75260e58436dc8 GIT binary patch literal 34220 zcmc(I33yf2x%LVq=R|`jE<+I%j?`MUYJoaWH?=C)p_K|+?Vv#kf*`~Iih>%#bP|#f zKu{4i&WJ_!e;hZsJ&M_sX+VnQVesKEfsY}1{rwPXNU1iMGdyX7+&ghp8Y@20FpLdKY zczopO^G-4Qnm#yRZ;aXNoYCJMQNQla!*MQ!=hNqUQ&M)j;oC+TvIu9+VrjkW*hLV!}*jcz;`cWmaiN+|KdGQ++uq7{%_Qnmqt~k zxPRmJUmo8zcYAGOLt+CCd$XN6!xm? zbpejg(tW{2W?L^vD)z5;^r&*ewCSeIq_Vw=-rwG*;H%wUF8C@1R@kPnci~@63L6pa zTQDN%|1=ycmICy7nk)A<1I(GOTxj+%m$-6~`L>zr$_do3aOI>KVeWS2Vv{iIU3oXN zm)YdXyPIRo$F5vrb}ty}%6+8V+Y}V;1}t?2he2*E7odKvEB7*e3tC(mc2n>NS1vRI z3%0v*k@-=t0j`{g)F;ijUgKSTvFX$6bywcaq|<=xGcURzzc#O%|1oGbTX`3F-g zuc?}N*@Wq-gD*WKHDcJXV^Wt~lNvp}V*J=C6Dv|@O|7V!Qc;yUxN<_p#A(wHIU@D_ z$&*uZ!L(FW#k7j5t18AFar(r{%4s8x7&dI!3DnaGa(wu?6_?GJJhn;>QtsgVimGW7 zr%p*}<58ni!-fsVb;D1XFm?K+Q>R>&!qE{&9i4~3#A&Iqsp(Z?$5mW0wrWyp>i8Xi zRIs^B2y-tzu!HOJGN;6jm{Kv_`~db*X|6F;wOfb`7a|fGC%^}#2FvGANgVH5v zkusxkw!(}zW6cz_u0YLMxVi$@PLXe3SqT~yI6Dn(4>3oe&G*e@Y^g{O)8wcEZFucf z_#TIrr{k(hY}3rSsJYC{z*S>$egw`D$1rn(P$%URBCQY4X&=(bJ#)VFHx2zv1!D3S zQXU2FQqs$CS34ZNOhC)&kOtddh4Xsu2y>JMB=n+loz zW73OCb7#^Iwe^yD;2-R7*R>Tzc7*7EI-&t%sCy zF8t}we*TM#E;hH`c1QE-2OoQK-P)&~dHUJsUVQ$Amf!sPrI&yE+AFXA?u|eE{!Oz4 za3)Vm-+1$)>DRtBr^Yn=tsX{o%O_CstoN_4~z(&7Yna zYbwTHHo;te#T2vh&Rg!f`<{F6yZ?bT=AmCc`uO}AS6w~xnpv~2yZ#1@61(I2vk~`; zFiswX_w=KN@+QFbU7Sx(SZMAvOJYv?GXU(6@hvt8T z+PMYgp!Q0ycRJ+t+!*27x&|8U~wS2oYxT(x;>(fAxKm!VmiImMic;q!d(y#o07?{)KgeE;73 z0pA-iuD;L8JpVR=ziZ9S@US{_qq!RTYB0;pP4K%(=5jOJ)FMVSntHPoez?lqVpf{l z&8_A(GsoP45w96izRTQi?lJd@d>(?t*O-SPrxm8gJZ^qz9yO1dUzxO7XPyMIXUtR3 z#ym*yMPw+?n-|P)OpE!odC9zNUNgTnubAJNSIuIx0Jz@(`ZuAuxn?1x{yO5<4Q3|d z<}7e|mAMWvq8hQV7;!=3N#YW7Z2__zetLZdr$J^C{Yd?lIEN4G*{0yDuDQBL-6U7< z&PT76@}#c0zE1nmYk56Cg%$YxHQuLQ7t-c2ul01;XWnaauzT8m&+CN`T+coGC#_uC z(SCf{W9Ko;`T7@n?1OY2mfUtc$LnK#I}E-~utns_V~^37+19sbU*yqW=j;96_b0~@ zeEzuTV#UjS5iH*K#j^6NI`ijwUE)IR-_vI1+Uv@=ZvC;BMczGl7aMYW(xZL(Pu^>s zY;(_1*17VIwP7DQ*Zwp8d0JiuUjAZl&fB*Lz1F6RSz{&57_-3&H|nS#k^h)*wR&9kJF*hM-C&`E$!BB1ks zd3Av~>7SNE0c5`y#% zA3FT1)lWWi>S2Q=7%i!sKS2}x6xG_&?J4F#sDz$`1oaAnf& zNA|gKkAZvquJ46=?zQLRduI2#bgwV_ozU-%y=U0r_R)R5xzDZpY%M*%bWQ(n_n+JU z`EQK)M)Nm59dP@;gZ8~+;O+xg5Bkoab^G<%Z^r)L+W-B*Yll>)4ol5AV6Ouv9PrxE zf}zI^ec_uYeDlczM;!Rvw~qeSO9vfu(42!l`*z*8Uq1NUgP%C$q(jyodfcIlzcctd zYYwxAJ#zT?BThQvFW(*c-R;9p9`@(qXANII;(!qsj=1A{Cw=d}BlkLT=~25Mb;?oK z9&L_3@#w0f*B;$*Ow%!cJGS}Qj^oB0_r&ps9zXW@myho_;gl2SocP{JXPDsBcJXN&Pk(jfsUsUlZa$;`87t4&e&$hU z-g(xMXFYuOgde7U`1FrvpL5!%y+_^u;~)Mwdv4w6gGMhIv&WdqF(00{_Wa794FAc- z3szoO{?idZefwt%e!l}3e zTX@+=6UI(FaN^%CZ=N)A@_@uqq8t%SpRo$(t?t5#=sDYU;?kJtJ zaQ3{pgKHb=8XE@+m8QluO^X}mrUz%{W{XN~8pIYZUvx$Fpqi%DO-)1E_R5SbP1nw^ zP2-}XTN{)0wGFkk1NX}&vZt3e)Hc))Nhe>-o>4llaqgnI^<$T=&g?h)&h)iQFQ0Q= zUHt(2%9?EJ@;PtaQa@N>CYIbh_3@%5D;t`Y3|@ZI%2#WarXN}K*n)?Ps~258@4^)q zTzBD+g|n_rU$>xmese?9{J|@)z3%v?sl|&I&8wZ>aQ))xL#}IFK4aCOWp^!DI&aAI zwn?S+b@g?ijcyjy&A%bNaADnm+Vp~XOKKYz*EcmRE^chPY4MVQjZLMEiTe7Y_L|J@ zQzy^7XKv=_jlZf{HQ>6sv2zvd!{kHVmlE6b&1{@Va8#^zf|K%d;h`vX|eK zEm4KsP@n$At%K}cICJAI3s*PYUwiMq^WUz0>+ON7URih3O@r62`}Mo`{-%D}(gpSN z7tdaBb;B&ZuBvfm_Pe(Yy7B2upXTNvP3b#F-7x3PS^GZv!zZ3!vv%oKH_co=bJ@}X znWG9DWsTVFS1_R4FXU(i@QfARcz^9R~jzcZ`# znziR&KXCRHBOilk!NIEKcil2XM0MK@H{Uw&rWZb1ej~arn$d98jDa=t=hw~CcGuUg zI%?IRJ7&CfW7Ckvrp5#p#B+ zbnVQBt7i_pvf-lHGX_`Bs#!97esNvh!iK?jEWLHkihGLh`R$xHUK@CK(~bAk4{lss z^wZ4v(%Qx8hIC``;sv!g%^O4@^H(fvTri{|-B7)_zP@Qd<^81#8;a_Zi))MeX4~<% zXhkNG>Bp_TDATWCk(PU7*I3GOwqG*KGS7AvB{PlfMWv|dmu<}A-1gaQ(N>b^n`*D& zH6aOJyw9;9+f~ZyY-2LhufH!ff+DGOq)DZtgjCv#5`7ho13?NX?u}2p#;$K}OA8Lt z0Q_t}P!m-6);%xg3EhV!-zsUJY0)xxYAeC@3HxM=w(CgaY%?iwOWLPfI?{RuyrQIA zvabSbpSfHM_;y$$aP68_$e<>WfpAWFaPxcVR*uz|N6SZY%LH5IlGQfZQC;@W?K2D+!#PRCP<*%cYBc@L%*u|21LNJz+FPbBj zNDuK?edN>28Tq1-IByhoTvDiB^BQ??Q&l4jW#%ywc`Z8$+AY<92HWzS6xyxT;X$5K zgw;>0LteL5do`*PWf;*Je#yN1ASTLqLe@j4QqkzQ{g9p0)I}b&2k%-WBgRfSflaAT z+83)a?sPETyK5p|pyLNIhR#OUp$B+}6MZC?voh-8S%J}B6k1eg7u18uA!Y?VcM9+H z44b8*IzgBs_e_!^79!_14HtVNS2eM{4_54s%JSy#vGzvO#?rPD^o_F} zC2iQCjhME;vB-*?dp&7CjP+`ij!#dP?2{l_|IGOaD&nk5nt}WvX*a_ah=3LoY9wJl zG@=#Ap8L)&HAIIe50~hUK)9iZKWCKQXx?kaY0(1X1-X?NOmSra1a+_tQh;FuUXirV zmf;L!q?ycnEppzjhXo==r!p|-O)w`yWOlPYr6z)F>=TgzReVLTCHwlgBJKp3yq4g@ z9Ro>V;51W@izQHI3ljDtD%~Ob&xnHGZgBw{XDMK|iYhwW?uAU8t;?laXxLeV zVYtP~JwWL#&Kq&EZ`=M6?Xw3Q;?IkZ4RL5Q^y&bD$cJIKqeSx!iBJJFg&8p;8HQC7 zyfkS)t|n%Nf`m?a;8sbSK@^K->N-Gs9uzxi^V8nt<61C_%oz?oHh%O&Y{vzh`(PMg z$DK7C05G+Li6!l)#&?^r9~Yk?RJ9du0eLL>jW}U3x<1i!=A1WI(7Zp4=7e@Nd{w%<~~D|$(Ih% zI{9LMoW9eq)LI^iu=_!EBrC*JQLUMYat@o@Vr)W}bXf!h+reQsw(KF@bZ5y8mXttS zfzX#Y0K3zrl%7P0_TrWVKoD5e&wPJ*3U~q1Z)CMPZ1}M~~tPvm#18Ox3*( z{QOsg7ufJBK=SR7BG-H#p5t>6Nt`@8^xI9L-9@It6exVh>jLKJ2OOGUkm{+i-o^x!s)yjaR^5sMB1xr-x)R?0SBINnlG zL0$On$Z$kPHSv*(>kuIep;;pC%6yNM7R5rY9tC3C+$vKmnl-gTS_oO?V8?!jL?av* zBq%Fdcwqma)RBe-@-p4JE75U{^EzC6vjFe1@}#EW;6hUX*j>3fATg#AD^}e691XIj z$Q201+6~AKL?2ie94?d=N+g7xUGK-Id~WALk@q)*{Iz91yAc;4$qyH52o9k}D; z-rJFZ0OMY;W=PS7b9nKLXj1M+z6{XikF7cWXFsZ@G-ce2O@R{@G{n-Q!CX2-Z8r!M z7IlF?Vz60M1cM+ao_*Q21E?Sp zMgz~%B!;rp(Im`N(G`{9cD_d*V#5x9cH<}@kR*^|pgepGWq#w!GVih*CACMWZ3}{K zJkUz8N!UO9DLPZ2Er(MsCTCBj6oR_C1YWr5Ktj&M zEqw3<(IENea*nrXKSvOK$UH)?)VZ%9h%Ye*OH+PjOk^mSg#&Woc#van^iC-brE38$ z6P!TkjWC>Zyo8e-vV=)5!d^K+#6^a`5iR}ZeU8Tw$S$y;hN`olwctEdK?orEK^d{>!Xz(5 zotq6~*{dZy@+I20Tg!nGLCs5BQMjlhaUnqh2=m}n+EFu#ol_sbMC(#=$wh!E$U}s6 z4JkgQWo%Sm>qu{JC)T!fkREIQ?mJiv2iN+?6Si|0NI2db=`uSlw-6lOD_z&dP zIZ7Qy%?k^eb{iB8Od?lVACK_pBCAt{VA+aq^@yb1=F*$SXhy-*4;$!ltsr5yDrsol z-Ed91L?ZM-WfdaiJut6KpGWa>UmICQS2lcC468Abk~rn=+!|$C0!dNvZhk8~x7YAa z215-`i$2l9fnkg2{61pXvFQkU^P3Zv42YN(!g@V=Hww}tHdj*t8mo{3=~#(lfMjJ9 zBnT($!;#G31KiZ05%I&ji5dmipF`jjLDp&Os+qSPZWXZC3>@ft_LE_ z4C6CnUhLQ|@@%75l5?GVLj_=N_RSWNzw6M+pM%>5SzkmwT6T8feo$}^MJx*JLgt7O zx+QU&J<@p~bM)#u)>4FTRM>D?oW=(NTqM#F3di-#{c9pc z0NxmO-~%5rH&!8pegK^m!rFNmmYrb#X|aE?d5{gs&ySsqfv9cXx%mN!N zBeLpdFxsttzc&eW-oVxgA3UaY<-1 zi2I9Ho(kEQ)es$i$@-_|QciE5jbQ)|MgAFjzGw}3|D-kK9j*X9s+!&14|dGW>3}_3 zU7vMIZA)`LAwGn2(gmLp+Uk1NOAt#*gB0jnk@ku$Z*7&G~ zhB=7y0w*bzB)-E)=a6CN!Ktz6xBX*m9a}6r$5dWwYXPPKF&aksvQjP}~kl`eOfy%I| z5s6by)`v4HBtfZ2{~~Bat+LQ&z0>kK-MpjtWA2^PvXPG=V03 zQA6ZVInloHjbluNWjgC8+CDr02{-#eFww>&L?kS8Z3qVkf&qH1IcDBd~ zjkvie!y-J0D+-R7+Bd2Nk9XwAjFZ0ll{c)U{lr-|+Iv3@I_f3^`yL~g?}{VGL+lo_ zX>ZYb_&yFJbL;4c8#3WXDvs0Kw71ZqwHDKAR)v=!oQacVQ0fL?;_Sz#7UA_AOG?5#~5;oYQZn1u|NYItKI4;g{Axxg z^w^QxDQ4OM-9C05cn+>ZyYM=dxT-c>Kx2=PvU>`_+qUP@e%{hvB;l7sB-Tp&{Kc&z z5C@HfGEMUKgA8K$&RI=x{5mN^7hp!$4IS4w&f%I%QIX|8T@=xbRIP)YvtJ4(66(6W zG~z4`_#rQj8MzmcS-yG_Tp5<=*lezP)84t-`7aGFP6g0HRQxy$pEFhK4RS|{&s%r2 zOhrgNR{0HdADrW2B90^e=Qx7JxnZ1=L`YHVXW7e?Wo|jcs9z(FX0*;iqe%+a?frvc zU@7?XR9(5o@BW8=jfrQ~WVg9c`&qlE-o8k^JxAy=0}62bc$qCYm`CMik;8tXi? zI2pA!g(i_G%8@6>NE8Cg<6UkH0lykSQw;wQiQhtxLZ$xMYs!L`ViNY+YKRjysY~L~ zGR`3Zp;J+o%-yfyao)B$^}#i$Cla|nr%ga74+eKV5zt+b-Z&ZwJ3WRs_u7PgIu~Pr zrF+|FVzhv-FMA6X^qlP2xm^>Hy_!VQo)23Itb$%RepkIP5;%nVzj7iV?&w(|_4r6) zpJPohUI;H@=yVx7n*tD)G~&PhSF6~7tydSzU^+u<)p)=OFG4~NM9g^0_Zk$vE@GfYyp;4I z-@q)DO75~Y5&E3#b6MV3?lhdSmoR2{9AH%cAWkiWu7hKzb+*Ql-7*mw5lxjGQ-xUY zzP!vGiPjlIwv3l#M7zL^DTFjO!D7h+Km|T%%1$_>!*0|7R5^I(Vts+{D0CmOVOP~qG5vQm zk5EfZi~0>UE+0BJ%He23Sp39C9M&KLL$y6T{U3RuA*CLsjCe9U+NYzfMAm^Q`~;yO zIB^ju980>dC?xuBbE&nL%p&ikK_M`%!Q?-{kx+jcZ4WnJc1cml!zR9lEHh|ED4H} z9w{;RNRMcanj{LYzj9AG>M>htaKoyDWNuy#a9f^))VN`1@zk6SQer2{k=*#s!yiWz zQdU8c5H@GLF>Gj~m}HI1r{(0DYVzAY`^jXIhm<8q$+*%%BW0CtZFpl39w@8K`mCZF zh`Zme3)nJuC85ZiUY0!R1ArUL!BuPu4HENP+)UvC9OjhWU?w64;A*4g9_K0=PT5ze z3W&f-Ay*miS5q6R375O$<}<>guE5y`8DvFR&eiG4Tyyxqp9ol`2=iGBZA3TB%BUGa z$+^czBKASd%YsE?YExof(p~|BmKUwX>g^;bhJ#ns8sN=#nb%*^PEuPSaD+Ifg299f zowI*z*f|&0I#+E!x)~NMui>~ zGZw&Z)__gGI9lzG@DAh6KBrcC4A22|ArS)}sj*wI-n|R3feON*-A4@#&(bw3Gr?>d zA%p`eR(ota&apKo5L*z(6gO*q%GBPn3%DZzlf6UUHjDi0p8(xiCPJ2bo%A~xARc_o zqSgb;R__20bm-0+V3qZvf@DZk9DpzL# z@PdSWYaHQoOWOY&FsO9@%X!~0vZfHVX@wjZNB(#dt(9@cGXZ#F z;BqWRB5Z&u&yZ)vGZOJjR&fLLxE@$(x0LUa7MvLe29C!*VWbEE?pE~{9tnQiUQWW% zliD=*m3UZxxrTrB18-Pc%5#}PHbeaSb_Gh27k=3l!=SwZQ;YES1MG#80Sw4UX8Igr z{OZL{-vJJ!N^OEl0>2*%T-fa$Xgoew?$$`M ze4c@AMQkq6b(Zs}al1YPM-s%6yJtq5h4kZ_domo4M(+?M!1~Q@YbEJ!D1%j;C_*pk zn8lWKLyF}>OD?<=J6e5++tw<0!BNt7wC)UT#BK=}@AH3ssPceHT!1_(rB~eE|juo&~;+}vpU9L4`1u+b95ft)sC3#EPuE%p{(g?tV;WNmm zH@pTkIk_Ny#|lrQiNufzJb-mVx1o+(?n<~=Amj~?IPkcSFfqmfV`L}Zf9At=Z%M$|35Z52;1?_?l0#CyJ z?nq}Vu<^Uiki*>c%Ukq}!tw{0THc>kR)HXZVnVeX7hO^n1-)VAMTllI2X)7NradWnT%IIb{ z&g_vN`}s^Z-4RP}O_y!lvxPfn$>n&s#%vo^KLW6$b`)}Yd$6_Q_*i?#4-7E zMYpr-pWra*shr^t~t$9L~&)BkFe=3&Th_Wa# zw^6|&!SF!?1sQ%j*-cZNcP~eI<`pw>P96E%aWVKztEH89A8#Mi(7k>EuIcl-^%D5inzJb_r zZW7M9Fr~JD_>T5LdAX`UMNL*X0<4KF=c08)4Ly57l)>E4rROjY`#L6-m!ln+ms>IQ zyg9zWQIt2YtSC=Cn-*|Kyc$QMqRsE*WdzynYO1NbiU2x~b*a*V=o}<(kGw-ByC-j( z-w6X3`^nGBZRB6GH{f-U3ENp4(b-2@cuN|UB2E~NDxQ~yqX}EaAHi_Tb7CYMIN6>{ zBR|pcnAGf)77j&<&qsbF(>|fZ72HB-C`Cl<&e^TO6CrRl4sHsOkl4u@V&02DiPxh%cn;E0;5}Qmvj)!#uvEa1~V=vDeE>S^n{@L@&n@)If zCl^_FWaZ8AS-_4%O~syF%inXrWVrIS<1Rqm-$&Js>=x6LI0LqDyGLgec(yQsA2Fp? z`Pc-ty2XS;puer)9VaT&kS&zB*)I@AAx$E0$A3lvlKgcFtgXAc96_Xgvk7M;5x476Bxl5uuy2+t9}KonHhWw4kt=kb;NgK7 zegNVY2ahBDvztck1U_c(%^1qun;tsEeVv%Q2{BE1!MpD%k6I^o`LKKQ0Y1-A#QhyB zn8xk|_Rb;WCH-oVxSJMi!YwXBm9@4qidjSMv(@=vMnbPMkwB)gpc~ZM*U$ZWkYVI% zBuV@DQZ<_H0T)DRC$Nm)xu?9b%7#0+colL?=$g1Ud#<+|*wC1rG1QaIQ2KTg%u&a> zT`+jy{u=4q23R*jw~W{5B=Fy7-P)U1N)dC+@-XDEl#AAz z4M2IcyBKa_P<6=4g^3UYae(}IY`Or`dkq~u z{3---<4&91I;Mk9KsxARoTxmT0QD_I&64qK59?%1-#R90n)uBbto$f&l;ujC7nkzd zW-1mwyw3k>4QTzzJf^_u)vogp+$|LEa*N5I!$!SP09LCG?;LmBTuNB^tTmK)chJmT z^$}Pn+_>D`5q`#qD{+WFYGABZ{e~qK7=2}iAxi(dczlA+Tf!67+6w3GG!uqj4bs5k z{_8B)Eq4*o$!{t!%wqZ3_1lOCTHWv_l96XJr1yMzyLQOmRLtoJyyK5uxt?*C7$x*2 zI>wz0VM1T0({lik`=aiDk#EEtFC&c@Dt*3^C1{!GDT4>w?s4*^} zaf?P{HWM{2F|lxoOI$OPWU@?>nPjq>iOFOVlT4gU#%xT~@Bcsd-l|tcH;c)9zu)&w z3cBi5z4z`t_uR9ebMI4HDOH8HK&iRy9do?B-cF_TQ2aVpb2$H#b$#nMU%d88 zw3q#bo=NDV1BO^m|^}(9^v(zGLpc;ykZAaRYt` z9*C~P_l5XAe#7SeOFvb;>{)>J4@xDE+O%~|_jTWX?I9e0NU6y9&E1#w1;=H+fa@D^ zeRfOt=AN$mu4q##`ZVDGY2ViE{pY{u`hQev5?~y1X5Y4+zVD3u_Adc%9M|ttTIsjn zR+acviV*VUDeYbAy-WEx#_!&(Y6i}YS23K)sk77#`2Fe3Fy71a{%gF+f9=oTmSeUQ zdU?Be4ci*F>v!i~P&w;&$~Sj>>zM5CdEvJ%{Z3g8y)M6H0nvh|)jup* zu}|xpI`jIOxQeSaefw0b^~p`kW{nTj@jT8YyOJHrNy*`fAZ~x?jh+>q866jqA5yK) z55Kbd%G8xn(o+JLRJJ~kzRf@R#aHe7#_Q|PT9MCPzha-iwte5x{Pt}8N~MF`^=p>l zN7demS1#EdpBJARuZsog9*O+ zvN)$ev!s&<<}3x;tW-nfw$}zUCGT6;Y*O#ux^3+ib$R%G`;NZtsz3Y=Ftl(JAqJt~8);kv zQoa*T;Uv5(mC`@e_vrI=yN-j3KB6vG8`Mc^gq+hDuZOV(>JRFV^2fUaHBY@uy=>cw z zLez*~hndkpYWdzs{Xh7nLPfop`Q}CC^G|GF|55M9ryC7too)UR_dqD(&%wr{p=vU& z>)XeWg84gpO0VcbWY?9XihFEJknIufUN4rS{`r zAL#W2{M)Y9sBNkj-}`Yq8GpTM6F#@%*Y!AmrkbM`s%5yV7w5A0wpDGxwOO?kN9%BO ziR#9+J^003u?e4R@O=xe?@?><`wkqh#ql;A_oF3VyA(9G5T9qFXI>j_d0|NljW~C< z+)dcndsa;ag#62fAS>v{FLJK z67+Bhpu1e4?NQCp&65Fl4|+I3wc%G{;|%n;Mb0f2{A~xmmf{LxvtKo-#cGmTg6q}; ze}sP90a$28t5f7(u?1q*wUL!pvSqCl?>ZTIvKrj4i61ODMZD)4(ylX>{FMa z-Cm4=7$Q7VFmFvbB1Lg74%UJ>yH#C?E7!>Vvw;iF9I2Dkcr1P=HZN1T0kM4?cs@Me zgq~En4OC%hvq;a2faA^hHLJ!Q6smFHq4D92c_rAK^-FJ~B0!I%n!5Q-9sm(6p!N8_m_tXEy)+wDHp}pZ2wu<616n`NN5) zpZLw`vFUTBKR83rxOB!>X8dtx^UVI4pPKotlZKqsb<({j{p{ppPrmBpXJ-wWwSLyU zvwnTbxu^X4)U!|Bb?URH)tol}v@1`0=Cq&ZDsvlh59D5(J$m-lv!899(0WDdKepAk z-QJ#QKd1dm9l4HcI-c(M&728ymdv?h&RcVHbFY~D=IK|Q{_S~7=iNK+i}U_#e&hVU z`JbBqFAHiHtX=TPg5NBhw(zQjpFQK)Gp;-1pBB|E>Rj~rnayYRp83q;>c#68fAOsO zXZ_QXGnQPlRhd1vQW&mDE{taC3v_w(n~oOj20pF8h2=Z`#p(fOC3pFjUsUE{h| zb$z(&H!DwHdC$r(Ur>F)DHm+J;OSN4R&}qsulwZgtGoYW^^DbbtvPAUooilSyJ78* zda8R)?zz3^rFE%w7q0urx*x2MuWwp^&$mOwlli(terRR{Qj=VyFR!( zvb%ftt-C+F`|T?xUa{kfZ(SL^GI!;rSAO)$KV3EPsw=Mg;kzfld*i#me)Y*$Uw`!v z-!t_+x4-8{*G#+Swrjq3ZT8xWuKmQdKfP}9br)av)9a^QfA{sTUjO!zBl^bW$!)zy&t}5)J>ajdibWF-#p>w z9XJ2zmMynDd29WxOK!dA)*s$B@wSb({qlVc?|b}x|9bn}+dp^v@9&s)$LH_(^ZT3M zzw!N_yfbm<^gH|ReCDp1clF=(^j*LEz{wxj^MRk-ebU_@{b2Hg8$S5e56%0~XFl}P z51;qpYd#YF$h$uBqmR~q^p212zvt|GzI4xTKQ`fG+dh{6c*Vy*e(&-3e*V7neeb&O z{rA0a-)r|L@1K7E`up#^|KIO_^Anps@skH)57a-f^nra3eEq@d2bVl}@q>3i_|`+K zAKLZMT@O9}(AOXO)x+B!{?jMV`Q($I{KX@qA6fFq_DA0T$WxE}^QQv*JLXfnKK1IS zTR;8LPrvo(X^-X~-Jd@te^LJFeR^MFU-Q0u_r3C%|Jbz09)G;)@fD9>@%Yn^|KW+5 zPjo(U+Y`?`@xv#6`{d{+r$4#z$vZ!D%x9ke%qyRH^QqBKo%+=KpUOY=m8X9GwEy(P zr`JAx-P4ag{mrNMKQr-}3!ZuQ*}2a?_1STsed@VY&+UBf`RBg#y!U+L^J|~~((`|O zVZ;k_UbyImyI*+rh5vl9^2JkL-0gBs% z{^rYXeQxIGx<0oBGLi-&z0;wzKIAiqzJbrj)RnN$nsAhXHk_%h(5LHeeTBZwtMi`o zzUY0$`=PJ>qx}~Da(}nK*T2!f#s8T9ke~Ozuiq9hs1=&5p{B$&Sk&ot=_BDchdy&pwiUH2XyM>Fo3M!|KP? zzi*s3E;_DqT=lrxaihkK88>m<>El+7>zVM_gwITPZo*3wzI=4_=v7CrIeOjE7yg(2 zA(^DP6y zyfy@LL}2a#%nC3wYM|f#9n9D-3haD)0N&P1=G)tszP;@2IdAQJ>v5&tnvK8gTVwHF z&$EC2Po>^G&Rln}_n*}A?2mu(lVg7TpFe*2$G80WMtr;W$JhLL_m405@fk|Jy7blg zueQEA`_+lB&U|&stK(nwfAsH4z4FOd9(?8ASMGV`wpY%7#eYS=qJHpZ_05Ui$Qwc_ zN_`rQepxT`?(_Z`LN7J z+1`cTaM%M`FX7GhD!lPtjW^QEcq6>IUb{EP8|wAKXQ+gSI}ASDcr`&C4=Zm5=xLT} zg*7%$ErXSJjyg}Rf>lHNiFVE<-e@oBjqxr9wOt4Q>soc4dat?_p5BMl$Ka_viWt!o z>RI(!cx_)*UsGRK-&EgM|EhkWeyRRL{aXDOIO`%0{)gA>HF?$EG;fyI;+^Jg^EP?c zc$?K9yraD{yb0bGZ;#jK%@_aXN^hCB(Mx$(dm28^F<#7zdU3B7K2HQ5aR%N}8s1%v zs#kUJWXHm@I6*AC;p%j?NX>_BzeJtkwZgLQg-vDbzvb$?;QgIyw|bAdLS3z{QG3;0 z>Na(UdcS&DeL_8`9#S{KpZ= zqVR4+53YxFxk1&c8{wtyfuDA>8mVr9{q_NMlzJaH^-k5G?pCAK?dlkK=|`&%tK-x? zuo^!KyYOB$5uVy~&{~Un1U&tKI#GQJ_W1pNBu1 zpN6;ajA~cU!Ebm0mhhIvqd=d8dSJVpi4Rx;iXIR(&q|R60QWvQ2 zAXf5i)usLgUdSu3G=Biw|24Hy{X2Z9S7CSl99Hg6Vdwu$U8H^mEB8NPps+Z~I`fS~)&(&Re zrM^I~(yR3ry;WbN`}8)wU0>(hPt!N)7Jak+ zl>W4yu5Z;d^lf^kexE)`->y&Acj#IA{rVJrr#@Amraz!_`fh!fo~=KqTlI(ZqdKqK z^oJ3@`H1e&AJuaZ&6%q|22J#FJx|{Y*?ym1pzqfU^(XWh`T@O2Kd8^t59!7FVSSeV zq+X&Q(I@I#ym4N=*WgX`8olGa?Owl^_D=Ptd*^v8yiV_2Z=QEL<9L)9`27FU-!2O; zKM(a+KCXeTFTdvh&F|&#{3U(=HQV}2;27*)!Z+AC_j~ym!rysK_`5rH_qy}$JI|N@ z=Fa^!K3)IrbD%bHPG2$r+yh-Z*l%tegPkAj_krMYzrE8o2kPsu)s};8pgsor?Qr^a zZHBLPzYWypk^B~Jv;02S$HA^Czvocj|5|MwE^Mwp_jxe*25a+h?mbw$Ja@Ql40hdM zznAyR>kju?ckkieb0qB!cI{xlJ6J-WB6IltaPHZU>%xDbc1q-R_!`%)`;GVT*xk$X z{O+!E=fl63pXW6^KhQnlbFNSK>8>yT48!7%!|jBx=dt@9zNWkncP{+N4pT z2Z9msajr{rjDrof-J2)j?<4p_p6tz|2q*Ko{Kw2LY-!2wmVT2nyYi|rn^((MbaZC3 zNOM=5wICl|dhUw+w7UGUovYSm_by+N_a=0kr1zSJ)phmtdDWR$Z4K>@!B1{m)jBD! z8}r#!>n7#B#_ZZ`{-wqF;OKK7J60##I@WaLqa7>i^Zta+CFiZEZ>X=^yCR!kycj>_ zI_t9e89bWN*_qvEuI^r&KNdgPZ`u45o}a=iUs}8(3uyLsXY3p4i#hkXMUW^mKMk%KMGkj%+@d&<)5UZHrgrBMq(jXhSQ;fn5HoN%^3$ z0dQs4?u)E$&GHN(t}_tuJs+&$;b8u4w42 z@66_NOIP4r9fxN7pOlX@=3{LWA442UFcrnuhSmmPyrH!_@2y^!*J}VpK63n|e5^4` zP*ZJdo(|M%TmoQot2%kfs&)Z2-uPH7rP?}LkFPJ_KG9e@7fI8Ko(K>C`-D~5j=c@t zoEO2Dsv}PG**XB}pv3Gnbhn!>QiI%{ACJ3mb75%Vo6;nqhStYYNgtD4*HGVieEp<+ zrg5L=b>!D}w@=DfG-3eRY(CvKpX0(oLu+R~!*5IQErV~9@|9?&N>Gvo2G#)Vd_~); z?A}$`dl<*JI|eoIJZ}Lj z@N6eWG8gdA#jmAPHOK_+Q>vx`C~nKEQy+u(E7VZah?t4jv1~=YvY|EGkxzm6k_{lZ z*6b>D|73NwMtGyOb?>TuL!uM&dnVS61Db|nY&8=nn@$;z0eQ|z{ZrqpP=W&g|g28(}x(XO>$WG4dE;7iZ{PCfa z!wM%aGAAd7P99x2xy_s$)2Q;9iSJ;1V==xlfGdmf@v|P|M7USb*V`Fxfu+OAMptX8cwheQ;inP#;&wL|kb#h~V(!~5EaN!AH zfVrU50okyjdqx8#;z6$f8BWSiDNL;%mOtV6eGy&Tu>yjO6F4=DnFCKZHD+4`-ez2< zI}Vfv5HbUT$KTbkC+O*`_EQ^X>}%4s9NaV@01yv&&nj?5_l!yTmd44$XHCkVc&JN3 z!E12&bj*nwHX%DXJC~dfT+Z9OcW%R6NSYN;5s<792PbM>I}|9L0TDGUUxmv8NX-dy zSw7J=v1jk(hHQ4$UbHu}^pfmk(^fvfO}H|fUqzvjJ8Q+`Ue?dnJ??iqCr z=wS}VhY#rm?G4Zg0HMSUASEyf5l|KsL>VM#u^Tr}5FqdlrA1L$>21q_|ZLcBTODr2HwaH^IK0s#P=r%7^Tx_f!aq$;9HEd{x_u#dT1b*;$>F_f6JA z!Jwy=oLy44xa4fECWbF?H@Oa58}lN_or z9gwXvCOSOK!MB+c>p4rrgdIs?&~q{9TEpNlH^9p^lk?NS&!-Ra`#dzKht}jXJ6aIgpmng?e#KBncD#W;{(&f+y4IJJb= z@L(yg;lVOq!-M6G$RDZMI650gT8_?Xd|aE~R^Z6|*2(KMuRE95$)`84uB6Oie7Q@yR$B6AT#=I0m4UnG$A=|Qzl3YnTO>$Lic&gcqc zgN|2!)RnqQSF4G7h^|59+)(vZU5i}P*WkN-9T|_|dW4#!N2mYkE%SfNxw#BtOeN>E3%98)t`{}XxANT zfu5u1B1`uj)vr%SuIUoB1DTKc$a*YPXXrE3BIG>IRA(aNaTc;2OOb_Jtj@Bzo^z0y zTB0t~E0BxasV-;k2YJX{u&9?JOSeodmpo6GIvZ8s|E~V5FHn2*Ds>KWJgfB@XE zwa5crh0K4CUZ>aV4Z0VZvUBx?$a|iz{zGp>F0)H-Qa{(5kqvwqS-X!&MyU@uC1#ZR zkxyb)iMgZ8kxSZXb4gc9j_GRTkgh@g=sM($_8@0;1M)@hMXu;(eG9Tgw;@AxJF-LX zM`q|Qg}p{epf`zocK*pVNP*|6YGye?fmy|AYRL&B*&V~z1{u8H+MM3+^&ec#ss6KmQ@^F(220r5R4;;TZ4CL^1oFlyWTi65MOPwAU5zYt z4YJU+$X5?XR(d2d%5}&Lk4AQxS?hXav>K4Lo`8(-G2XG>amZ^iyEVz1?496E@unhw z+>HEj3v%7ly&2w2?}Y2XftWz0;8ao9`_^-uVn~k$0xI z*gMNx;w?pHdAa%^a^>gPJlT2P`CgZ|(!0Q0<#l_jy*1uiug6>Gt@k!~z21e$G7m+L zcbFQE4DU$f&FfH0yAiqT&E6K|Vc$UQ^Y4+7J`MTT>yYcMMD{j7b~lRr@Hk|6Bgh$# zL4LRu8Q4|G;^w3p{c-h}w^dbneaJaKj7;u}>hs8yg>N0Xgv-ksH4N z+2MDq&v`eg+1}0GE#9r(ZQlF5+r2xy_j`9D`~L&v#Qzof^qY`PZbOFr`^X~yP<_w4 z%lm+LxA(zd(ei~0qqA3U>$$imHhXjTnr&OR#Aa_@zjaH`M)+5~+t%#Zylzv^rOCFn zTl>4$tm)a(A8lXLjjQmnZEJUbv_tNVcF2#(j>2WJ4%=FXZEbF`we;LITQ_g+Hti+n z7VZg7U){Yeb$anaZ{GaqJOkW3+uS_UTy$Q4@20gqsrki=(+fhaMi+Lk+0ow|=?{{ojA3alg&78Sm$CmZo+jeZ;)V-rWcBX+Ly2RYO#N4|i zbZ>O2oJuV%f)y;oprXs<+SraQy;GW|&W6Gh$JC)XG52{v#VHxw_7_Dbts?}f2m+gz`m#$GeJ3yT-0H-=hGZ(P5vr)SHi?k#J3 z*F-lNyl*mi-xRto*o5ArTg>?_=KPk>dA|pk+-i`%wFK!~4M0&W5+S{8Gxu%_-5cF5 zr&8OCFh(|Q-Ligr(9fCempkmtwnlfDPIi=Zvcryghn?9SGP66(*e@xzo4Txc9KBq+ zOJsxKRt+w4(dwrWd-)8aNX2;WRe{Z+& zwcGpK?fvbxpLW|%hrO=Dj-$g~-(j!su-DD8?ar~+&#~9fvDeQr*SAbH@U={}{WRPA znk}5o_Wou|A1#ia-Fe$?vz^Ztdw+{NZ~JSu^Vw|SY_{~!V&}ct;;F^KVe!-KzPsz} z_?qqfPqY0^v;9r8@J@5^+UuuTIHy@Sr&)NWS@@<|xTZO{T>G~FX%@a|7Ooa|orBwr z-}PhRZL#gQ*#25EJ~ zw#CnEb6<<&>)H0Y+3q?EN2|TQ)wbJe+ikVix7q93EWB+NPwn=;b_-v-y}#Yw-){S9 zxA%A0>pJW>I_&iw_WBNc-5lHQ9DDs7d;J`H{Ty?B%Txnj%TzZWJ0G*{_3ie1drM^Y zroIi`L2FNccVuoi3?LDZ%@7bBecOAXQi5}F%J0DGWgBo5%!ADpS$BaLv!A?Z@$0h~%2Y!}Q)ag(y0>iY z@7dJTYw2dXVdN>Zr}*t13)yPZl-YBFjvd2{~N5^^z^-Xj9L+{#gIE-tP4~`lQbmC?NU1c8mFL z6i?HMQv`B+o*3EQ*S)qUShH!z>IfFaZ|je(?d{&Yb<5h+<{jI6*K}{iTM3UtM2YU)xaK+|qz0 z*l(rvCH&jJYZq?%^Bqj(@7nd&o?Q}`GVN5t7rk}?)8V-je65pMm)e&?j47Ge0)HGU;_G&zrXZJ*kBY(lIX*nIBnLmzyegBz0o9xdkzlL)_DuLy`ONVF&{csjk8R zDyz*alc<~60T8>8o2wh}SzX`K(9%%bunScPyLRn=YY#tm?eZ?-`xjhq2?|vuucjm?f!PqgQkE$CrazrpZkP(}aV%*h<(Gzt;OLL73 zld~oNIPlsA8FFnsN4Xzk=G@sA>NYm+dMl0j6NK1bWsS5Oe+;uZR(;xF;H0FEXVS5F zAI2HWq_@B?&%_ggh)7Tw>G3d|y34Qfh>Pl!7mEceqdExY2N*xlhnq9;^lo!^Z08Z& z-kCc-9#_gCAU-_qro6HulTIZQv1lZ~#QD`j615X+Y8zT2W#}LkI8^L6Q*Mx9XaETC zUn2qv=-4laB8NC?7>?*lgL=l`qCKW{751IztJYYvP^orCv>(-8+V^@807)h)l07Pu z3A$7e%v+$Us?uF5onE*g4iqI;4oP{5#QX%X(jm=M>B`-INjsgnaY{9etIs+FVb($v z0y?Pyg&1}KUW6qY3T#mW=JpG$;b;NaAwCRxERu*H{0dTfD~;m;DCKE`ol{~uQjrNF zeU&;BRAjbbMMN@@PWDv$Rp4;dMM?o$Dk`E~DjFqPf*_2R)8zh&NM^TbAlP|iEp+B4 z$Kye8Fp3Fc0fFAdT;@9s0P47VT3pt0_kB{DDKcf7SdoLeGqAaA$u1cAWgtQ z1^yvw_zH87k9cLBde}-6a7;So`F$CUIBaSQVv+G!GTu`GOkg#L5J);L9JFu&Sj&s8 ztV}?r%#Tr;$jxa#wcFf{u;St0-kCd^sGuk%mjpEdl}9-ms)Q=)2d4<{qJaqF0CEs6 zQKC<(5u+WAsOU=u19PC{B0)0I2ja$t6E+1YmA&lyx8hhijt!y zf;2!N#xStr#Htw|Vs<$Ah`b@n#)=N}u^%?X9&m~M(TI~$8mSSUaXL4mbwvhJ7HSld zKzUF$X^=@e-lI|}zYBZuh!{zB0b`^RY-+T!sz4>D$n6z6v-_Rg51m^SAjAWxx2Avw z>RcmHDK_Mv@JqQg1q+mmQb>vYrGhjhNo$2hCaAx&G@_~^L8L0!ozOw0A8Z*~fjvYr z5t<)EkWn6@dr~?Yjdi7AbU^9q%F0NWibNJJs7ZRhuU1mhV#yh3B-{|x_0D(LQfKbi zQKOWaFy82!QKLtJP{>HgL%<3v;HQ>0Nr?o3<`F#M$L0v-izAthPLPPog=*1n0BbNV z-=IvjwBm?{KZWg0(#u^2S2M9HD+OYKCF?_;1S*mYBH$$zk3z11R;<+t*#ce?tQAP* zWZvuR)NZ*McIOe?-I>FNS_cqFra&Oz6AYYxP$sovOH+E{C2G`KBcKVfKtuY27I}@D zn`_5Rdk}#=$lN6SXaZwVLEH~|R4nF1Wjr3~N@}sAQPpSV83vP*8A&BZf?CB05>Rw~ z3rzc#dhc~$6G9tyJ*;8i7JLghFa!Hx5W}1+SU+{@tlT0<-MEf=eiT%fNNXr{tYCzh zXU!a~1;apYGMQNkzRS$da0O{yLDm-OqY~(u-U1RRC|n_jYNLi5YK0a+2(-hDE#`!V zPyqA_bK%ZTE!t&3Sw%%<-;ioA1Ex=BfV8wqMbarsSJ@|}K_pfx zXP2=VRavq7FKP#NSrA}VcGxr%foiw}lSI2rEO+n&L@N2Cg`^@@hq2=Ey}8y{?*Xk!ub@lve&Rs)^VHtuRV<7Z0hXSeaw?K~(l#E8^60>Nh(o83XAYSGi4rD%!o*au_ z*XPy_sYG^Gt26)v;lca~KzJ&Ee-#g6>)>&TG6ck_lr^taJPzGhRaM;ueYJ@26ZP<5 zoMC(*{Iqn!n5SYh|1c9!aTBnGj9pk0me!aHMEJN{Uy{`3p?8SRqcqz#G;uPY~OeymF~lkE24e{ z^pc7rSRpzy1)T|75bBBX7)T7U08**s%1WI~&QH=44>uD}Cw9N1b_4~^axSxos=%VO z7{hWBBe&B|TBqhU{3oWfjZ=h#%>U`xFWMq0bwZB2>iH;_>wz9{OiLvebv97J_K8{B zhmlPF^EbYEGbK2f46H?rhouC4)T<0vO+lnChHw|Htq85HLZA=9%UD;E#v=qoBqE}2 zeiT$RmAAk_A@v;IJ)OBBuo2*b7Hoo)wF!n>cmXp^HERPn&>4I+;8RjiUZBUKJ;b=( zon{oxFn|*Y$Oi1)7>h(*ln(j_0SAPq5?vXFqc9MRbtN@u90QrgyI|k#K9bvD?=Vbv zknmhZC_EP)A2qEd_u>cWfXxP%0;EZ7Bl;IWPW_mGhG>DL; zKxut2++y))tWsQ~Ewnt{NN743XUq*o?9kAF za9BozHS`%AKq)^Nj{SwzPy+6&48#QO;x%!nDG}NY1?n;-fjS3SeJz>z%^^j;7RwB_ zfCVmuXCHR`oLn2dyC{6ac*tT2YkU*LN2EzCmdcY~3Vf}sm$Y-$k&!z^=m93uS4Z-@RLIusjw4Ic^_QDy>Fzy#7oECc8D)ip2x zOt{RU8U~L^(qM6|5fg#}krzb`m{7;%jy_NWM&QRG+XAd4RDud6niwH|zmRCPqfVnZ z-r5uP6^E;j8|B5nC@tfHMvLx#JRXv)IX2)&X(L0z z#vqc8u!+INY&c*b(MPz;M5BItIJ>la5jl8=%b?Q&HrQ z7%NIdFj$+(s&G0o)m54CQYjEkBvRCovlv-WX~c})!R-h_i>|DTyEt@6<`vRe5`-pq zLb*U+N(NKjZPcWwGiff1_fu4ww4L!Ms0hhGMi@U}#y^uG5@Z?RI8Y73SO$q<)(|sE zyXa~(8tF>GsKVf5vE<5(Gnh}3d(&P79>WpdEJ@n|VulsQi7iBgpndF!jrJ+%9}d=p zK}<4Q+=RFGPy>-iTomC&Gs<}?9tkLC)4rcx4ui%^Mi3TCWDr3}AlM#@S>HRQecw4p z$)pRlW3zmOh$<@=RYE$&XvW0zD>lxRh*#OP^rZVK9sVX+JSK*Wz+`|(2i)a`{n65=Z`P;2_YXzFc0EPkaCr)$zy{1v7mjj5;(bsK@4XWYO9 z3NYnwh^V&|1wr^a!*7@qH$HlDx!frQgQ?)XNixy7Z-^}V!Akf+(3^ugVhBsg1&kJPZ#?>^0E{rGSys zm^#@HYnbT;=RJ|*40y%auTh%~y&eq=1RnCRQmTM@1keL994^V0Xkc8L5XJl3x4r|nc-07v>gWxMvI`B^XhY)E2 z0Kpi^+W8KGFd(j!qAE#IA+JHGhuIICqL$*H!|)qIokNN-n(X=p5nGZj?YTysLFHqk z3#4UZ^c!Nfu0km>ABN3eq#s5YKs?|oK?PtS^@K?~%vpa0Jcy+q!h&0mboYyvN|~nNFg@~y_#Ti z8MTg7*BQQ=l+y4rBSD{G`;0HfB(fN=r_y3iu~01D1z08GGFh%i)M)o%-5_3_DPRa0 zj!29IF@)4B62m301c}`ebL=KcjqJxs#sp(XX0j!f#6ii}Xi}AG=gGN=w5#-T*6TUD z(DMdY77T?rX-#D$Z5shi`wS`@6^AwIl-x;@9nr{+D6B-qDm{j*eU}RHyacFR#Ls{d z#dHIO2dRSGrYHv)n2~nq)kFZOq>BBHR?nFkI^B6XafHj`8Q8IzG^;Uun7}>^2Bc;Z z8j1EuL?Lc$3sQ<1&eY1v3OEH4O`2cuc|vVv5-9dN;>IL|jPSOLB8QXeHiRq&G6gA( zKuH?bQa^!o#UwQ7HgrnkNU(3;kkh4wWVopg38iltTr5#B7$7iO;waIIR{F*>}eN@xL&K}Cfm;NVJQ8|bcTBz_lVU@R|Vqe09^jIG#e zRiY9K2c zuLu9q)-`!y7}U^}q+`fsO684Aa>1yBTU(UK5tvP@%}kC3O9hB~P@m)3Nrr9-GBt&i zqGs(Cnu>g&OFDD4QS2-oO+^uZi^t3mW% zhtw$8nBXNLk|^xJXmnAO2+XLAiG9Ztqm0WVh$LlGK+(=Kjs!l!Ixzyjvnh9i%n8d( z9WipOq)?1iMv;gX#t8V3M#t$Y9` z$z?RG_sUD`R3YD`Svgu=N}VSX0O&f#t=Tf-gh~ z*dRd=qos@u13v{5#OMb`5th059``kzeIy4XNDdx(zmT=mk@By+U%FzLu>+$n!)eE% zPcP0QS?rb_Bv73L=uGi6Bul&tY2tQt<*esn+bs@ZksHRfRQV3V_RhUXXJB@Iu zg``-)2YPBo(F3WM7!+Xr*TmjIlm!kYWRY+qDa+`RTCq<9?3EoLX%vPx4m5_rH8EE_ zPYdCNWO7lGEL2)MmKG6iYG6R!7BK2}0mlLbC}^+|9WoKeS>Kgh>V(jsFva6~x?Xz@{wa6iPCxJ0cE%7EQm{=4dvT&g!+v#|@2D6J9H>M5Ii?Im18qNhu8RY>lzqN;) zE$GEDEQ#W%=x^7lb93iFx};-?bWbG~AwV@`VkYc^#R(>)i#jk$nM@|Kk{T%@PB-JQ zPSg~uQU(mghJlr$Isogk^_*b=PvDgpei_K2nJ{^aMLF;=>QNG&I5e35BuOBVaJF_T zC4Pbk#u&1GQnNAWx)(zdLKI>YGkEG7(lB@vlh8;=G0qu91FjjWE5j%01bhU80r83? z%=C<(29Xvj_){rY=95e&x+;vVZnAhxk`9{5s|;uI$|)G!LnIc-*yuBe9L~C#{SXcf zH5anohMF^F)QoBtrqu=^=V^|dkK{I~?lY4xNN$bUZVg$=a_Mr~#!v+1lwy{)K`Z5y zQcB&d9>2p_c`YDe5J>DEFy&V)qf<2&W_-r$-VW z8Mms0@=&xfof2weyX3}=l-7ymV@{i4SYZxIM9a*@5sR1vKZm6hxnp5&9-Fh zBh`t73)Q2J393YRf{|*v!@+?$TP8Y9%%MzRGR;{|ZG+KTN+isx99Hw7dNP@YcbJ6m zPNo>>bfPtit6=(<33VWs!Oz+T1kq?x zI?gc6fFI-+j>0hrE#)F6O-;F@9Eh4Iv`ZhtSP8hekThuscpqBPR?{17ihK+eNS!G6 zVe_2bM|9(%Dx#dQaz+w9!7UV72=P;!fji{IbV5jG@wbrJ5}V2BQc}%nNaG^4K_a+|=f1xo{1NO7gUEo2TX2xlj?h4_1~{;-d6uQ9wM0 z#z~vuWK<*~zv0>Z28tS}ydmfc)eM7M4)h_6-B4c(@kL_(?%+2 zD-;GHwVPBunW%@PjgAMBMw6un^A@C_UA?Y~G@h0NA8Z(kcPyN^4x=3$3Fv~X_e#R?`kbi9hlaJDl-+a-1%S5d zj^zbdF&A(JOp*QRNm%d4hO@+w-cx3ui}oo-2Lq8W$P4 z8N0C#Id5Mb!Cj?$HMU`;|DssYhRgth$dyp==Oa-}1A~8r1?aBY(bc7}G{-FoNG2u5jEV-S(ixr(xvY{Ka{F$C3;Sb` zbi?V$0OLfBjf~Od-|rx_^Be{;T)8!zem^KKjasRg@*&7$$ed$~0xUZVEYhI!jMat= z?19h~{OJn#)9@x*M9IQP@GVqk!hka>SRl>t81V=s($N%W6LaOL!f?U?wJ624lVUx- zqgwVbNC3vnqFMPxwztzr@p%9|sJ22qBl6XZa+eX5DT9Aya)85++d&7zq^!o{S94U5N(e;BWg+hn)Im7Lum zwXY5&$gcY87APYECcqgx0f(S^h%!U<_)#=ysl`-YwZe?3iF;t`D9~7uaq#M$8qkpr zPnSfGgnZclfpcY~mx=SFeExzIyPId)fcrbJx7`m-lMJ)0|%eXrIRIvP{P`D zxSE+`@Gu#VLWFvf*gy`>)I%ZRD`1+iQW>gbrHOMexP0nqI>DKnG{>>4lC&&QR!aCYKq`+06E{3C%l)zW8b+L1$!!j}SwmeeCkMSvVgF-EI4#cXRZn~S&Ryc?JP!QffkMJEU;io3MK=q&`a&-Vy+bd zg(Mc9iJyb`NJwLwdSI}FEXB0@|HzusX1OUDK@bv#m~%} z5_2P>iDlU3)T0j1%n5enT9Gb5#a@C-g6LU8f0ot+L#7vOArlORjwtT`LGCuP#Z10T zJYe!6(nYoy!GgXCgdqi}S&2tGNNAA_S5~V|hHoEBq297IMOiH3fR2yFLLTD@aziYD zI4DVK4t9sE*kOX{z$9^Kjbd456C^I=E!ZX|DIPf}W3Iqp5d7k;MBdv9MdXc8K*zOM z2&%;xRD*LI$EJwHJz{GKUn9f@2RW%&?&Vx$n>faROP0KzVOm2u-l3X<*Uj3ngSI!g z$}qgmX@w(T$PDjN3Ln(1)ClYslhBN?}w-ia1 z*%vNiGJ&oNoUMdmCA)8M@sf*lNmHb!vbNw>?>wx=4kzH{Mo&5Kn7~MROARKgW7ym9 zyg`F~55H_|3-k`(71W>bBME;e>cKsK3$y%%G@A_wP@RJ=uyD=VMY+Nf zuJRUOlk7ZL5eo*s?DfjYN}J`WJx_8cE4!FllTCQ{*7l6xpp%X__uZLX%)SG9YFE6&K>!5dExs zFZF0yaq+wvdz;O)A=MF&VP_GB%8}7P1wd3qDx!t$Pb*DIiC!F+&p`-RRJa93b=b;_ zIbZCn@Ru}$J=mB@Dy_!=2JABRLddO}B@ZyCOl1ZvOiKdB<|I~ZXvX11JZeFVO(B)y zrWgyU7OHsAQU(1Blw*X{lro+l#19fC$etvfD)D_;m;tOH69JyIiys)hO(v2o9W3ak zBWt5GH*)YQ$0GGRbK5wL1uifHCm~4G#}EVEF=3DLolY6&!2VPUONL|EDF+0AeSzWV zBAx~Vq^H8qz+ouVNEM4fLL1JQ8Y%jXChAd~y^t+owxBek6G4Y^28Q6IBq`xyqg|~V zB+<2!h!G)w(#)DLB6zvtpuCJVvaFjLgqd3%Gr#jjI&_|$RirG*- zAZJ5!AP7^=*&yID)-F=752;!!b+t|(2HgD!X$EUx!}W1`#Ko0Cu_(7%nKl$lkXgpOvnj32-c8Aj*Y)UDBGeB@+8iSy%eHpQuJu`sKHPxtiCkt zRv3ylBub~<;v%ZfRAFD$P@z+sG?I=WA^474IgF~Of-E*V3S5rp zo9x8wRI`j&c(^E)+;3Jc6=|B;w6ShatTu?#xJcwA@W3h<4=%iibv(cWj6!VM#+Wc| zWRMDFGB;omRh5FdXbq)yX(djf{LY&RUJyCwfDA&jF8#HyqwXLKF@ zO^2a_XbYS4A?lkr-T31`Sfv4T7-KZUP%X;v?xH}uF=2(Byohy(AqC6PM}6@_ICD_`7k>u~Qm=#E=}7Iu=YLMOmbu|~Tbu+$sa zu=&Dbe8g!z%!<5Z=YSL?HiMf8 z5}BC}yCx7b%}9P*4tuy@;S*=TEw9C3P01v{N4C0}blo})^&Od?x6!<3b zN@N=PBFRfh4xs{5hiRO=Yo8%8m4Rc~p#&(Eok@~OR~1h>r?U!(z_}|~b|@=po8+D( zcP2U9o3P@|DD<$-N<(KkbdqP88DqtRaI8==hht1+<_`@nf!y#|+>TSQEV$Q3Xze&G z3s=GH%&UXvp15WWW*~^uuoe1b=Z3Xt_`!@AfWMeI$2v3O!fXl2OaYg1!X*Rh0EJs> z1sz#dlWMsbX$!ly1WU@8J24Vs*M5XDASjAH6JvwaLz{CKs#r3Tj73l_9H`e(-sbcu;o!QC{?`(#0fJbE0f}kp%JO?O{2coky3MYjVz$lkiY;(0-OX-gd;F& z)>0C{FdbRGMATKu2FwMZ3bMsaCpYyxbY-)IC4i-dYFpVXh81gejEFX93PE6F5m>Pe zw>QAL-gR_w3_-El*U?fG9BJ1@4j6 zArRB^BB*jjPWeFDj|`m)KZMoANzP+A@|zDCcMyqJ)E>YtXwT{p{f1B=h9>Sc;|>_5 zuq!@79K@J5E!s7?RR|Si;zahrR?g1MiQt6vegN-s2!<|PS8z_OC zqK=Te*Z?L+$kT`x1WjygAPj%8c7w2=om&cD7|R`CcxO0@fPg|qmBlZ3v2fTiP*}B$AZb|i7CjQYd)as+oDQ3RxfQ)!ZrQ-OX47RqFdL_jd+f{=0E5p>)C=G@e@*b*6h7UxDF z9DshT&0^=~z}Sad#!TA!cE9`E=jtF*e#_XIK(~^Fe%XpfqPg}XoGEC|Lrm!(&dPsv- zebOAlKU(B~fK{cmd1w&1N@LkiLLyIA*U!$K3OX^BiZP`lF%%O+l2~rVLK&9+8+|WD zmj~*5^k=PqmXwLUr(gyZaQg~3WEx}uMdY1{dpRA*7;6ffu%w^^QRiI24GOWMC8&t4 zE75>Zj56sk!Ho9{qjHg1)O$oRa#OVEU?#RWhgJ_-ts-+HI$YGC$>mV^K>`|!#f-sN z!dSZx?=KZg1+pb{p-4T>BK1_tMa46jf^P-+N4%QFwBlU30+JH5m&I{K^b%AEgF-PB z3@d|Z!~3+>aU>s9FvPe_f#mgN&LI;h3+)c7rzq6J+cJd|%M=i8Or!vEVXH(0(o8jp zXc_@IiP(v(=dT0d;C{qbrDEa88#vhhkl{fyat6!4l(wjeAP__J#ksLGM(yNijM|?o zJ**-Hh550Bk0+ZHW52cxLzEN7=y}+o0vc*jTs8(iXaLw~C`U^UM$u4ZJU|U4DPi%0 z$qC@SYWrmBcO}aOKhUfg3}xXi7}f7UtQDgB1tP4w=>R@^TOq zt5JTDFO)2UQp6^3R6O#IKZB; z2`;aNV2(jBTY)U;qBM(qCC&~!rql6wx;9N_kyJ@M6;BB)85U*(4rV8@xnpfj0Ui$A zu0`c$bOt1`FsVEYRK*#!5CH(}UE#+`R&bM0EFK~&I;BbQt~~5Pip4_^LAsfx*8-7f zNl-S(%eVO9qH9t%X&dwHs0%WMuyE&*(%E4RsgK&6Vh*rSi@+5NAaG;m8oQkH<5IVw z_3KfMH zsRfuIItmkm*(yv+(S9SHW)Ka+6NoDC@O_tSJnZkJ+z>^JYSe}IfV(wT|QDKl% zF}$L%l$7cAPl#-{On=(IU`63d013>e~Kt$xs6- z4owwp^1@6N=ZX9j)j_w@A^3o@-so4Y63exgk(wtOFp4lgXD@3IH`yLfu?-K9akd!mg1- z8AJeTtKxXTmJtEQA)O~hv}O~=gve6s(TCEzp?P!}UP4LeCg2YdV=JIwC_|-Swg4ue zaxy^-FhXj`kI^!K>%A`iO-8|f4p(=ZEZ9j3 zrT4VzqI_U3pL&#xYIz)3BIZE}TQft#>tgaC-Oc^DB&d#U@ja9lW0x%4os1$>as;;z zp00p4mnaEMiE#BVr&)*)AK?TrjBJ~$z%29G#Q$u@wzzC;*l5q=BU>DhF~mie_8UoOkXsKr@3kffJ@~vc zRpegqREl13iACj}k$RXG6$Oden-Mm)l@-qu z=a7hXCY6{kP(7R@B(Gt=h@8RzAT7`(IhLYI=oi0%ewks|Y3LV=HDXabpa)zDL(y)q zS=?*WEO(^Fl%!{)y&BI}IP~S%jDl&2@{~l9TaFYAPG3?IqOFAS44Uk=j>NptSk?3z z09{mTY&ybBu-KV!Pf%D-zcr4ayEsTV4m~uMNaAz@J=VhIw1ak~N10|LOc4t&#*&%2 zIw?0@#wd;n7vb2lmf`|XU_{23Ny0h+P9@=zC>X z&>@nKc67!wDH|PZ_kw-}lLDQBM@~A1M`>nk#Ufv3)WqDeaD;r3NMJfnB{wUPN=e|a zP{7HJG3~w~TsDh;5cq6RLdD|RiF;RU+i*x}(-G|Q%^FO!T=sMj<1eyJ7y&?!^A?LU z!Fb^|L#fA+QTTk2g1-SODDVj;-#lbZian1XfT;$#xHDHh2w#aa>$V61bRZfePpJQB zte||8W9RQ6Qi}obR;}=~5BcPmJ`svBGb`Z^>1TpmDW!~N5;)960tSOABc8(eBA;vo zf~#qNz$Vw&A4e>s0GuIlZtDwxUAS=-7-tckZ07>FxgmRMH*{HM57UU7GGgo$_yokQ zdy*+DjNd?DS4#(&b;vXe2P7JXUI^U{x(6%r-0T{1OtxH52)V5-3|SANflpOTML|p!?a0?zqhhjL&n0Syb;H5pLS`*h`EumcO`)hc{79S{(5FkdN=yiZ>%vcT7ewb4gSF+m>lJ6htk3=1K8zAt15$;8 zA!3L`idINCIEZw6T*P58YW~|kj3Vs|J4b}}+rpwtyWQyD_F)XA2pzdGTvASLCTdbf zYa*v9IX`49lIbW6OY(s`31siF4N?+IeG;WxG8RizAjMZw*~m6;GkGVrmO!O1Vt@%g zs_ZcDMOkaYzc6XaFp56&WR{vBGSx;U1huj>eb?YpU|cM zKisv^jutb@l}@#am4^vLoUzv!!>5v(;A(7JV8nuDQ!OStue+FX(Na#ErA{_QK$XDy zrr}}*h-JISEWo53v!=Ox8XEwX6CgRn4vq_D2ggNx%3gW3+*F!OFc!IkV@qfUM`Nuc zb|qGm@ub}Djo4}c^<2z^1jXGOV=>K8J|Dp&nalz9eVz&rBivi4h}VBjtkh6{p;5uZ zK@@;%RnVcWX@dcOkWm$LSj^y>f=AXIQX{YJ}fc^L?x?KnIOMKRw%$#bKTJbZ|3icg+JeiYjYB(bk< zGG6+m>EiQe3lD2;;azwbJgbdx`_99=Phu&Ig_oq`WRnD1xsWW*Q$Y~5S`1$y17mlF z3}1{0zBVbI;)dP|amrPONSnl$6LqN9VMfUYPi5XDDhQv&W|lzz1EH1ZBnJSTme7=n z32vqpnSYw$A_EKl8mPup9os5da09|2pdCC*88Crb3#GD5jSv1znBp#7peD;7mSW+% zFenpxg?yO5?WVVQ1=2-G+5cbMO>ZMO+V1*@cmbXu4UUYYlH5Tt1u>a|nB*?E9(TF5 zE3Awx<1-dAT?ioKaW@CqJ5G}$z!Q|DrcT*VXL0j9xYbNz@SV{N3ZM|7l4S~Bs>Hqj zukM^D&+Fg{e?Fat+RN2~#XY?o(id|SN9N4#bSPC5c;F&pZ01ptgFdeV(^C*zMs#t) z#EcN9hYm;<^v-?nh5ccHe{Y zWHAoZXeh!hJJ3nU(=71;^~s(|Vz;7Im$9b)_{@ zl&G2#6~-0zaHe)<8Ch{3tiffg>>Nl%LserDCN`AxNOA>E1W~kNU9Z&HqFuNd8FGdw z3~~;V*-8*mFbV0}r!bW6PFC>x!@CF8V4(OXfB*nt6&bdxOs0lIcu=aFjE;Lv>`O#= zP1rbrZL1jx!*b?_RpG&Gjj`JMFw~tuA9)5 zS^7>iq69=9v4IV8S3+h=9SAlG4pm*0Y#%5~W+5S23u3kpl&}t~n8Z?$8D%yfXmNW) zN==vGCoCIFt3mAEfqWio+17zcc!5V+4FZ8+XNU95f0!ilE?>kIEMokD>xy2SnXLmW zLW;R1pr^2S=?E%93cvsi^i5ET@fk-p<#5c!1_Z1L5tpNsY)}w#0NEU}Dg^O1aD?m} z=c+;ugL-H|W8Xq-GKnWHMe)QXQ#n8(XK5IZl@VZo4@<*ChsNXPvFasTV!BNqNI3E^ z9>{EhQ?f-Mvu|WgBg%!SFC7j=oOPYlxi75+5s^V1l!)5>#i6eX8|+m(H&E6VAC=4gf$lNhRa8a;8qpXTV1a1xk!2g&sNB{${{lXz#MR+(7%Am0mO8 z{$_U4xx*PPR>DSWf-fuEfV={ptgm0g9Bq`zMZXJiw@AQf0@llMHo?(Y!Y3twg(o~0 zoPR#yc{&h7LPLk(S{ljC5c&9LY#1C_w&DDh?qthnO|t?7PjG|efSp8prn<5!6(p#A zuu(t#Mu{BZ`E8)37z&hS|F;n%h7KK3sKGE&r4S#eu978%00b7AK*uMdmBUEwEE8z0 z9?X|9HT`YhRIZ-9OJ5aPlX4cJj8v}50ayY!iD{s!Eo?{FIU z-`t~5sHNmh#t(TXG|ZK#fkH(fe5sIl1*cO0m=z3?5Cy%vC$ezwJ2Z7R!Bi?;J>Zg1j2qdCRkN*U zasTBaOg4H1njqgA(7?~2UlEfQ!a|%8UR(-3=LNa*A?qtpw~Fd>$VEJEb2*&PSejrK zilVu~&+Xw6jb>0IDITZPjn$<~Wn-q`8}LCwHAN~$HLLYLAsETu#2PuxL0h0-sa7H5 zV-yGA^Ss;&#AG7Lc%=MUU~UmJs@>fYp#9NDsUA`Y$u}q*ca07na0WsyO@Q-DuGqA_Ce<@ zg@^f;-v;kt=V12@{Md817aj%#fy#gN%m5TN{|Yfm*otL5>Ti4C{cR7ta5dEbtv&Fp z&V-z-mfZ^qYu;Fg61*9DemcQG!CB(w~Ik(TP-Ai%G-6VM;RS3r67e8&ZSF zY|te}W=%xpYRuz$v6%K^Tj09l2@jFgqAX$LbsIYw?*3W@^S`m=YRI;OT`nT3BvF}2 zQb*9%L39$<^8_5w-h(+K)hZ?m$wNw~Ftm8`vaz~QPlY&~0ND-0SnRECRx}OLkx5$d zDcrQ}Xkkisc<2AnJXAt^+g(7|RWbqB2$~R^=WT%o!eS+O^vR_3S0~TF9lb!dP(LaH zyiAolAkwjoF>gVZ$(xE8VD>h?0HCAk6ImB-|vkj5iPz*Fj-0p|KRR zeN;rKFH}KP%9BlbdR?))2+)_KE;drC|6D$Un>U)uFISgA$CgI3TY+fu$LzC4(c?!= zBSL(PmL`0zwnFc5_RicCj3M;S7+ey$M(N!y)Zvb)W?f9mLI68hB7e*Sx(ug-fr{9{ zA(iqa6}vIDz)<%HBn7bx2sE;1`(}9bC_Ynmq&bD{Y0J-b<`7bWH7CzTi46x|(?PAT zmPL$afg7Ty%x9UAbI+B2)1OozvRV<<;IOux>4zb+4l&LxzDILy-BE!sldA!itFe61 zT8aZ*4hISai+IkYF%PQ}pc5{w!v3!;(`OvQ?)l2_prD2kS=xzcwE$~OjmC3lP@m`d zSYIiV;dw`S3(;y-5JL?h(!6L5c~_WY5L`&^!fSn9XiNFrr-br~d2>7v6ow2QQD(B` zbqhdh$e^?21YKqx{5F)mSXX7V$RYM z8}tZVdCzgUsZJ-);vzbNNl%Is8GJ8d0FgDMLp@?S! zi}a|3v!3xJnBwA@(At>{;DViBOM=tj4EK*B;msjM92=_{52i7BZdL$Teu;pBh9g?j z;GU~B1DjWA7`uJgmLsUBNcX{TM(jQf)MFzLlquJw;zQu^*O{&4R}QVt_#!;&awpka z{oQhJkgnK$xHos^rj8lIz|@$AF%9GJoIDfv88Uo`h-FtHi`6t_(@1r7ZEV=Y8ph;X zm`S6;1p%Xu0FoJTAbyL0npyfyg(fd591^tr@c*=TZa;Qi_kG{ze!tCyLvlz_)aVjf zmMxMR*^y-D#JO1{JMPKi}_ft-bd-bLK|NfP(gnX66ia_TFp#*6)60ss$|v`8ER& zlm7c-kt-iF|H=@G=wNr)>pmd$K8=Z|UE)aH7uROO(Ue+I1fyomguABbAR2vXsg+vF zte5)VVUzg_+Dm>1)-4;&{x&h!R4N8N)h2{f?1L=4f-56`W|AzTGYD; zo_GBo@%_Z-!NjT``-qj4g(tEP?EzAbKF={SM;VS96vcOc&VUw?oH!_eW+p-AkQ9hF9uKwZ;gAL6BA`iiugCH4 zQ*pz^QYn-{#AHtd%#R~^CDcg)u0qbc_dOAsS?jy)&t$F>}{lcrW`PwK)bT(8sA zr1(d%*XK#)=YQax2gf>SDeZRBJ=tvQVULhX=rJ$ogSaE{$e;Sjca}4*tcpAk!S)u& z4{GuYvq9(4_{;BpODR_?E8CV`gzz9LK_Y*q^Q3{FMdt!dP?epo2RL1MkbX!M^OBV! z4^SNzqe79)hLRy7<_BTpy3)4UN!Aua%15M3PF;amOg0co>_b)Ms3uAJNKa*AGCKii zwkFaZ%(WutezR7*l46NQ%CdF5giIZy(0e)GRx}pR-m7Vt8bfofq4ih#CABsjz|DoL zEm*gKk6fzOd`6BSx)#sW`P5&Te4G( zO&mB&&B{A03IZckv!3Ku_7HCue{;!L3_?6Sy__!3Lvwf*nD+bEVi9t~-iTu6_Q@*Z zHb8AynAaAR6~u5@i^A5umzCU7RAXN~7C3bRX3f@!0qsKoGhpC03lnnb#Fe#ioxp~5 z#K=B6mL4en?o4$Yn{SIKYZE?i5x#BmIPIi+)HIBX%o$3`p}P!YnuF45 z&Jf6X&N)M;-QpZE45>6?a*}%>Nn&{teR_{D;EVU#wAo*N6Mtm_Fl1^li0oF*tD{bq zItkS|Nyo{0Rh<()S4PP1FsCu%0z$`xk>CB6?;QB(F1zqS%o^RYcnH2<^V`lt-Tj7q z11o$Myq7rF7sjSM53CxM-_s{oG}w_clTg`ZVd@ca$4&NGx*zuppyb;%zr$kFYGrrM zidUDnJjRQ?EBu$%>-Rl^<-Ohww~wg>aFgAdJ_M%0+$z;&j(z@xgRPg z>YCww5<~{rB?tV)X&w1?h;aW%lW!XV&r`qBe=j0=K5Fn&ucZrJ0O zmOloMI=(k_B#r(^CJEaG1)5viHMMc{S-_DAmi`)OPb@r4{GLhVH_Xty$>FbqRgpdEu-q z&kH|WQYYyK8w+V|95CAwe|FZWblGg-nwyKEt=fh+)Mcd7BftxsqeB|OkLU+a-SlRC zf`$klA9PJaqKUPyjAksY*aeJMa(GRr09UnQ7%;09i6^}x0(tQdHZb(R{Hj6K>qX+C z_lz~7k4&=(nPzYS)@v1^*K;crU^$sMI?5?Gn-^KH*A}8$f*?Uy^kp4F?z+%~GHmlY z^;;y)db2JxDiV*XIi#aE`f(nc`aD_d0?BB(4lt6os_cq<&+rzlO`MhZPkyfJq*=7v z(Y*hHej-Rr+=LTLeR5(Mq5GS-yu&)4kBZMMU(yLR+;`sY1S9gv+q7y1VI`H!M-Ho! z8dlMdwSP{uWQe7!!djSpv;o6aL83?tI}nc9V6wRclL&686LKzfO>38CWlw4Lj5Gly zeZp}JjH2}g`%%v~r=Q_P+%&gNN`-huU<+GA^91vQBb!MD^Jf9#8thp%h-46UNM%9H z$e>J<>s~9zD>UH4SeWE1q#@{CCVpsuYS#4S&mGBW4M6tkjF9Ita3PkH+wGm>N|%yE z@f1=#XIYFD=wMfatWqv0-K zX1~$=9`2tjI8dc|zpl?aH$mrFo$YQAA)MbLz|k`&UBdio5KZ-CJRi*%!3IYwkY@5j zF)V4=Ps%d~+)!(A8+`%-f}`YQ;~xFdgi}0Ud`p}Q97A7(GJKBV8&m|*6f1B51I{g3 zv&tM(FMi9&2oebe!Ik;eoZ2xc%ILOs~ zlRtDe2jU*dxtaiD<}S-y5CLDrGF6C{j7V8uQdC5r;CF^r#Hh%QC3&k4vu9U|V|)ag z-{=e=Nh2xQ*%w}_!wOQZI|N!No2;hh6p)f!@>>1}7#$c4v7)8z6~7f{_9||-HhGD) zNxN1i)V|tGFJ|uYHqYF>HsYKPeObHFsmMM zd}#twlq8l`xa-fyj-KIP!6G(97pEMriF_+|ks@FR@u4QmKk-w?G6xm-GNO2O!VEko zR!do36eHS|=u9{kXGm}7o)NF4bwSAy8*Mbg-e*4(ggDL&jKks1h(@hGU5 zX!B^;+d<9VzqduVw)W9tLh``1d)v%mYClYWFz#Ufu$a$p%-P+~q#Jb~|6q3_oFcvc zh3B7p*3lGZD3k$+t?r^*i>HLff2j(m1epur7I&m09CU)>c_(b#y~D|hs*Hhd7MV;C z9XKc`G)!l%Uy>YBNP#OyXBdjwZWQWrKchcH6NJ zF=Ow(yY^kwV~^`Q-1f2ZkJW2$`CRkbS6o)Q#(wed15asHj(4t)vcQbK$ryfs@2xSW zQkP6^=Jcr{BS2PI6{88!J(;wbt&$kToAs+3V=;>JUyj#)J`Wt6@6N4&gybcf;y8tm z2mu4u9p3pINT@j;Lbp)Br6!9k6YfQff`0<7RD=v}Rr=L7)$^&F@f#Ew47x*t{|wVD z@Z9%_X!M!WH>Svd;4zL0^BTsx<4j}65G@5dwv6|eZ^qR$ynBMnnFHoF0atdMzrLdF zc+X&_X$q?1OWvGA_6?4Ty1ZTX#h$}PfQ(dUBrPmkcfpNjh57{J$0T);sY5zJd62Aa z*%rUiP)31X^FBI``YZBCnYuD~rQOJVAo=W2khz^GH&LtnJ>mUV+5|H1r2Egi*wVGT zYxauo3_XcOC?LJU0Uj>@zGxrGG=}(xBnG#-4>*BL?5UCa^?RcD80lfUcZ~Ihdjy|m zmWsuLRl*^FD#I?A0RNJR-$-Rhi<_ywk6#9{{> z8rF1tXoup|dG$UZkcyWibp5E-Fm_hlT7D)|g^kG|4G!u|$}p%(%7|D3z$!r%axApQ zZF!z>RKQ0`w33gWY$}D>flI|l@mUs|EFSi$o#y?4rqZ8`k=kVIFH*$a$HM~h`2 z(*hAW8ha-HrIPATh{}CV#LnGC_;AhK9^9v{yXQMgHh+BnjEX0>kkimRhd|?6M)y3L zqaUR-FpAQo>?yO7*d@GcbhMaFTB8wqwUcsgv{#%@RY1N>8raH714fph_@H_dpgiCm*0C4k_z-v}nztvNB(4 zI!z7+JHj4rjhc>z?Js}K*H1eW3})Scq45{G!#m5*MA1SyH1_pVIjU4hpr zR$J4*LkGt$mpN{?iZnaf>1ZRMiKHbymO8EU@UHyglBrTXilrEi^=P}bRl^JNP$-0U zMXMr@?e^qoXEAFzE}m*p4*JK9qS7L&9qn%YXisA->3FqZzV#~v)iK_(zK>s7{*t}$ z!~Te7%(!1P;cKQcuyz-Z_v+5@1!iA&x4SsnX)G4k7CA%k$@UZ$QP@K9Q!-cI>_Pz_ zD~0J~YTM#%?N!&kH8Wm0j-SMQFeb9#;2L(QIz}@X4Z5S1dENVVsbd3lI)jI^aj=tw zGFSTbBGmN)rr?PobsAE#Ko-8FbY)Pkp9`m9Xan!Yq9VlwXM zsY_@ftXfeCjlDFnlyB4E4}vFGuU=gl2Oj1p2IySIKC5%H2LV#6^?Cv8%>{az6bF67 zfD(lLx7RJ$`u|ATmkzNC=k4O{!3|_hL2DZYf@7=YaFIZ@2CAqtJ~!e^BfL2Yo?1S z5^}>7juoCFQ`LR} zVgUe!vLKw!{hU>5p}))M7WE!FJN0Pec_gc7pgYquqmPfrBBx?j&JPMC$=0WLtUwKj zIAP8NC&sU0A|B+Jn#U%}2M{j-V|D-P_#(;qfO^_S^8roZQNUUaS5%K^NiiD17G(S) zJy}SrWhc!wJ83pSrLoHr5RNx(JOn4uL6yp%2wX>j#{?A8Us@dpR8l>V2`O}rIwzL& zG1WN6w)>B%|tmVWyr|UU6azmX{`Tx$Sb0Po=#&Yu6JM)RCb5dMTS>rkz9T9W| zy{AH_>`8hb$oyDvLkO0>^dG?HQbB^eF-QB1I7U@P$*21reB$T$IH#0Jo1!oB zE5&{zn1J|F-HAY;5koR)=;a1DKwlgzL`SoSI;~b+oKBjj47$3V)2XB!`WtkFdJ?1z zZidXv{vz`i4yL3TO9S!R^G`mt!dYr2iPzZIcb>_oCtZE6$*1Twa^i|t@MT7hS}nf8 zpKL3XFmVZ31UMKCqQugZ4k0eKs^4huXU)=O&1se{=a6UV5{nO2Ool*zw;wqa$=a?d z*(~I^6d3hfG1~`h7t3*DWrsmVAr-VfR-%YRWqgXy)Ltb{v$E(7D~jqu&Rw#4`gkjp zWx@K@iFVi{{ZP!-45#mMy8f(B{)@YNjEG}1a|&=!L*{7AokR796-<_0~?-x)QV(|n)IQD<|E$DI*^i57bfx!%XR0lnzAyaGmOg~IjQcDXca>T zrzU}$hnp7Xs*w5uReLC6Fj>SR*R()or|cX5o6|HMj*#nEAy-1N?J?^9T2tNqdo!sw zLN%)ub1GkjVe`FtN*~D%C(!^NvU#mIO5JnTK`JN$z8YM`GP877mZhPaEIZCtmCT8= z(^wccSV2i*xV_&q&&J)}?Hc7;gzj91u)lm!A0?rL3dA!$OMbw5J6jnkVlymXXeqT; z^+S$C3LzaUlOn)7u!GgFV1s(k{6AAC#R=8wq}1CG$=jp~s)2JFtjZ^LD{0z>V4+b(w~DcH109uSaG$B^GPzLg50ISQo+Vc0N;qsRu5Q-?WVppuG1 zU^U?tb(U#Xhq%M4MkKEjaDj=K)dQP@-BW6#EVpFy3AY?!PIOY^;kCMgn#5I+;mU^u)Q77cFCbSrZkC+mqHr=@G*EswT=j zG}lC3zhF&NzFqX@4H}gNTGd3c?~kP>s(O+ZUvYynJ`V$U!kVbKwFtjvl~$Flsy?^w znrfqX(0MANpddMw>J?E|ohT&s&RTRT@Zl%6L~Bdk~CDa{Q2CVjw9 zOx|J6CTgKxbH`K?G`rN2xQd=0kr%6kqH_^=DkWQzSu$VmYcSN_BwNSwG92HPu8LDE@FcmdIndW*{aV=)+ zdd<0}Ht_76^S`-<_hM5UL<4x4IMF>-$y%OcNGY7x8_-gPI$4xFRY<4qpFE$5Blb@c zOX2EGzQ{6l-0Hq;7CE+R^4cHqVl3waq{fk(GGmmMn6TkDo>=Q z(yw*7=CNg=QZ@G+cW?@4tqmOSs$D`0UAxxKrd)y~gMu1q4GNy-RcPOvr#{#B%~H?` zn$3s+-8ggaRxN=!RA+sjEz3otn#VNtIh{S;v~5uxct~0x_JwNI)C5EQO<940duY2k zI#Aa@)N>{Ei`zBE?E-PWz$}}W{FHL(m$Z#q-vqG#>}nKO>4w&bQhli) zY;DIlA6#6@4~MbQlZlhXQ(;v>+LQk!+B}>7Q`fwcsxNuIvE6o$l0$e3Ij^y6Gjkb0 ztfRCifcu`hn?d>%W%SjE2UDMVLD4;M*L-K?ky$qmio0*=UPlY>5v@R!rayNvlh`}5>;({=_&(6JWE z&TW=6&%P5}wY=9~jIiFl$w8xffJY)Iov<*)-i?BG+%nkQ^WGnq6dl@-XPE8iq>$!e?z# zvPA8mx21hdXeOuwm!%C^8lIZ~CknIGXUry|4(inE`i8FS%TI&X015R6Ff4?8-_aSG z(s`44j5PWi#r@@5Se6iPZ`dLOQ;pe}T%baM8I=Rc4R0=Ex+b8Ma|V-hG)0S?_YkS^ zdcMDp`QrhCHCHV~FbFV+8pMS3t7ZeZ_c{5E>IhS-oWV2(9E69^_YVyYp&!8zH})hv#ejMsFD8P?ltjJccxwJi9`uu2s<3I#Vx4N5Y;C3K6PY;1b$`3a)6AjrxN`^)D+p&o zMHL9ioTwpe@3k73@E8PT%I&tX1_l-+uPzEedFaCGbmZCM*8NxNUrxIB>Gdy>W>KTy zy@GxjWT1glGFa&HL?ca18Jt^3PzBhc5k({cN_p*eQCrt|ioqr=oefCDimx2XqXnsnO{&vkj-MXFj{n8YD5TCn2TRaFaOni1fQ52JJ@H(rI- zkJuui>RI4oBs|sXT6o+k)hvhUJiM#enc0kXq!^8Ub1;(biR++0 zD|&0+3`jzrxr(ey;}LA(qgIZ{6k&X56|_~?UByMw-tRan1mf$~Rwoq<0OM5?DQ`)_ zc+^gwHz?f8F3Psl5(y<54c$5oo6A$V=-8IJb-*Mz9FddsJi^nRwpbh8RN3-z zU{ccCfpW`sk#nv)8vRDsM0!@V$-Pc9IaDE?n^2eMjqTQdI7ZXLCXtImX%_88yG+k7 z>l&iAv^9Z2m6a!H924LgjfRXWa-)VPNe)?GIMgV2Vu%W*@}!lot$iKF%IX}@ zF?7&<4^`CzFI;|}ftxrP>-F%Wivf2%%P4>=GI0KLUSjxU#KI6SnYO_+`6ZQ?fm@F5 z4)76F_?|+4DFN1tqLF`O7o3!|n2$I7%c8IN;X4j-OWUuW@1@Caj)Y~Yvu4T za~Oiqx;+jFb0Sm5S+AQDWFn#qTVQq5wG^4v1es8Cqt2ZrDfNBRDy4er``9{*>Rho}w7EB-$r0G9KCed+v38jtUd>#9Ui~NA$^ROVG4aE`jA$ zl~5odd%U};urqJh)s!X)P#)w1ByK zwco$$;*zREwgfUU`J|^ryrM|D&|_6HoYr z)R&l^PO2}-088Tag!+=>pE_TCiA)oGBe2a+ZhgsWR5tvFIkJs`L1QQBbtobzA!WNc z#i-m)Mx}k(0_bA_7=NUvEhJq+ia6N})lAm4>YD4`YV`oyFcmRUbz>?b*=8qAMN}Uv z1eh>ZK?#Hyf1EKDv5G~_ihmH+?M;$iiN<`0Wz}v`3x%>(&@)(VK+6QlXW}!OHFVO4 z-dV;BnAA9=fxCp2#TOoBT&UPpvLK`G2uOs%6+Tpm%9h4iYl`+B9s_gon#vEIuqN4^ za(mU*WLzaT3`bYiN1(PLlCgrN&uZTEl_7#35dB*`a9b3vgR8jQ3Ud8X8cPYDief|pbS zo1g|efM3Nu?QK8JW@eZ`mzFAwKhP*Cyh_T4EienpXt0c|vU;>C`(IgLHvQ=M*~Z>rP!H78DW>Ob*Rr^@m= zcjeKos`7|^M3Sj8OhKG9VW}T8p5n-f(ZFXE1xlq)h%Kv>74A76eEp941hKwWM@ebH);X`Ty%${ZF&`4R>}ilWUhl8r+C z+h9~iMMT(Qw`ES5nO>aVNiaOUhiwJ1>&1T$PWxp|)zl=eeq++;PYB~os5wxxQ^NOV zPLn|cRj|`3@bnc0J06d{kXPl09X(Vz^60j@EZ!{#bk^=Q8I0Bc^ny2|K^KR6y{PrZ zOA!ePysFhJ$O$*r7YNE%q)CX`C5C6ugATalefocO+}SQZ3`o4d@iM|lerHmax*t?$ z9Q@9$gG^j6`jaHj<8szVA+8kT&cu~JyP?5htlqLjL?u&L0y2oos}^F&u+(o#muq;w zVYUe8k)Hi(%n%B?s*A5tJW>GSv3{hr1%t^?%+>+?3qe+_P})y$5EV^ulF+QYMx^?> ze1=F==5D5KMh=R$ll?NHd&Zzvf;H&xzO+DEHPW|x%hQ!ciNwk}i0`@&SKNH#91?b( zGwQwP70x|?pVaAYLq>goS9Dl|aIc7{&sy1Nq-MjKpu=AU=GPG∓eYz|5P z;&VuD6#p}@_bzI3XW*efgW;exq~{Q^=0sy~=)+w0r1Np@r73xEgje^~dlM)- zT6Eu@LCN>i&FHSz+Hf}l+mFwGJI1$xLML{E6LJbI`GOLx%7`LF&8F)^9Q=MoJ&ASN z_=im6IUgaorBATT=@&t^S|JBgPCqAj()5#@H&?~Saz+RVI4KVVu;o0E+nSfOsq5S7 zXO6|kP;$=S^{t}4&>>HrKq9nq0U}DqtDZn|TfLk&XW0YxA9w=E3ZM8T4msqD`g84x zN00-iFbDLjLfqRk%5d_>ks@g8|^%Uw#p@Y&@#>?eg_heA24( z>>Hd9`|Sp?60h_&$GwwW2<*4d!|X9ozxo>`Mm+QX)S@Qx=gHb&hR$rnJX6wS9NU=y zoe37Us_oTI^wzzpN-tl%Cu+G}+*eD?m9()rtT(qIpM$iGye3gAt9%XvxVL+7*kQ?{ zPGpHn%(X-rMGh+31WEJ?p+;m;7?Pt8D6@^8v!WTb*?dF{qKKG-iO2_JPPy7dV%VpN z1bU*F1Ue%NQ%xvs2eB%1pN42pfM(6(vqZ^HRz5aQ?&!%K;L-suGQT{F;#P*pv6zRR znyhR^_wOt^eyX;Py+@!W^#x1~L3K8((o<)nXH)3bqR_3|M7|WXA_gwE>;T9cZhP2e zZIJ1R15ikn+>1zzV9$EGfXxmCc8O0Fno1kDI++O@h82ruL}$74Tu(4X{L9Wr`G zohH^O#Cy~ovl_sz+8v+)*HoA6K}5WxOCAu(s6HS*T|Y_uv(Nz)qD z6|%lI>oyfWD8J=5gJLy44TvDK7>7aLxU|pik-D38L%}Nl$hr?U6yhRh0(YQ^o#ZG5(v|u<`VvI*SGZgAq@4-3gcPqx}&AsWXsp@|G1ed?F{M570 z7R9qKJWJbYHCQ`Q9AAR>g5hf{h~xzEVt$I^GTG}mlVTme*uF4Nhpm6etSMAm{W~x4 zFiTnKlG~~qt4~`MGfoQ1t8V%gb2MPZNuxY*-l}l%&^m6;kvFBt|Dj$tMnHSPQ#_O< ziZ<)3*~_yZK0^nk9^vH=C#^A972)MuoQamETsVxMUT<_X4IxG{t1rM?{`h=X(9rQb z9{!a*2@PX^l7-rr$jfXu6!_fJuH>`w@=0G;MgbI#9V1f8)|+Oxce8d>8!^yBLrS`{ zZ2rjkj)=F9Qby`OvrQ1OgWxNFd-*p=lqy;e;BBLJpZfajcT+ze5Ff^(w0D&D+vczM z>`2snP0e{Si>b+*3GD8c84COaq!XK$>%~dvVIft(dy}|8cOK2Am51Ab6X4S8u?QtBC?oOq5Qr#|kXyi)O1pPzwFneY*uz2w(>&)4GSTbBrl}kVm*?ps>R5r4DVws zCHrmsJUihd#Um|%U!ffa#_Sh=5Po9EE*1M#IK?B`*L- z?Y4pBK8v^I`Hd;QuW4)@VQSrnM3x`uMr6)&-;I4bj0YL?(oN+G)>r5tIKN88M5xW{qMxlVvz>4Ckm`BsvyT)!}bcY-#g9c(@hl z0LXot)~NZ|_i4;*6JGd6u8Upo`MH8>+X>Yw0hCBEoIMOo47p@zO9D$O#qTVi^1r5& z@kt3E;r*nTe+P9zGn71A8yrmOm0+7RLM5MB0p(Kz5n~rK9n(qBM-kJlO?15BzJcXI zWqZZ%2E<=0h-|6%LU%|O(}z5G*lnQIG)Zb|(%%Cu>qwbyJdrG*hnVgC{%zHLd|nqa z@q?_V;ec-WtnGZ4o{;7UB#C3}3Si=><{!HfD+~fN{|q(?IvIcUW5ri?z4$M&qh*25 zu+>xsGDFHx)H<(ROQi4*MA7$a3X>gkv{rgr=xDY*LkE$j24%q^6SgJ& zLp6Dz6g)%)!uZ`?ADH!yl*MU0I!!av31?*}pRcJ(nji}(#jq&6c9s(a%;UiKmvKL| zTWBEaNc5o0fmGl7tS75?Dt)!Ox4Yo-XY_e`U&4ydbAhePC|bkgF$raEgc~6{r$e_@ zsk}qBij0E|TCY#beT%JOA^2_m!~W1B>(G)Q=IU@b{2aU+*b$`mS*p)Ro; zU%=2r4QQhVgws=*_rCprO1x8aLC{X>sL)TpJzG*twcJZcWtm--etxB(R+O#uI>iH< z2O}F-#5jA=2=Mm3$++K2Mhkov{p^ah<8{?oRx4kEqbya{k=FwH*O)tq0kL`e*?<5y zsuew1zYxOV+#*dS)GB;p?sr%)hmQu z+W%j)-iI>qPt_gCN=u3UEzqO-x13=qCCD54JYLFC{xWSkuM^1!)RS-98kl@jUtGR1 z8I4ilhaJ*l;0@3kT0bS3w1rfliBQbW&Ttr2W5eyC3=(CRE#|h4g5?1OIix^C@jy6W zoIb3G-TQsX2UU6FnrUl-_L4j*R?HyZ3n58q{15XdkwnLr0`i z%_?H@A)HXM?^qkCz$#i^j}%q_02nwGNd;VmWx;-Ukju4b(-Y})^o{N6H^cRWPQzA)7sgFTS+2@ zwf6fHX8TSiwebUYlg+Dm*^ND7S4;@yxPzP^0_BVNj!Nq$66Y}foG}FI%7=h zjIBj;GHmpxlM)r&V)+);wweVsXNVq)mxTywpqtXS?_j=e*Ohgia~X9RA@&ktWG^y* zmf)^XLzrVd4h;7TxHiq=TRU6}CnpJv4Cb+Sb;!8`mf`-rCM85fc z@tsewwc2AkzuUK%hA;2#N-xOyOSf`9JP{?I)KnW7&hX zIB8LS@X|ey4y47mns2)~5B*dV^Xc*sae38rT-pmBgk}7xZ zY!L3;AO;!8QsATMo+!lo2{I5YwYf|bdMoEA=O}*~i9DK8_7d~Yh~NQTIfLGE%4i1_ zuG6_I6OvCvhGlP{JRKe;Y(zWJy{(_1Gl7iOOXHsV#eWU>eYv2+U~`C5j451=(MQ~j zPQAFGGzv)xS@1xpu*ox;qxaBQ?WcI_9_s*_p5h53#xr7r z5X(nvPR);=CVdI72c7P%^h5kbwvOn)UK~@sWnAQb_|! zc=H9?UUb?`AcIr8^8uoC)ML;RY)=bRIMB4pLW3tK=A)@BWsJq%j7GDWV`6M)G8v$W`?Scot4)?(f%qb$ly!iB zcEWD{U^qJ}Um%nWSFIPY!G%TL3y$|uZ5E#Q=oEm5YeSgDoTCoJQ| zcJqYO?tdix(!C1)EM@P}7aMfBlZ`PAYu} zq69d~hbnqsg{hey-&G5$uQ>&^%ElTDNd_{Lm9JNaC&OM0h}&m=AS<+5_pJEEIGg9F zE+VXi&gKWbtEN8rNhu`#HF-LpkIzX(JMDwVvK!OVKq5&yFD^^;`qE-$Ux!N$il2>@ zT}Q#fpIK^?Un3(baiw?F>VsC-E%Y%cIx(o#54^KvR(Tnv8(yYeqM?ssA#BZnK~;g_ zB~3*-pKM)m$^GKd60oPK09bu}Ma9X~8fsbrQv=4D8lXpO;HPD)Nf5$At2l!CP%5f? z%bIUNoe>b#v{9T5Vs3`A)ebg%hciJ)QhPaXD*h&hR<6BT`Ss#v@m%q8ajW>Z)?a`7 zYUc`0J2$O?gNSQL5ldUaZL?2rxnjmFr(%Y$fr+k&T+gCiV^%i5_`b9DLITvs3=!|MOFq_$55Z zXI#NaPm*quyv9~8U0lcP(G z$?oKBfoB~wwc-VvD{Fwcat2_YlU8g5&cG4K)`235=id@w*!wC#^1n;tJ`NB05Co4~ z#bNOWhRN?XNvRGVsP+YmPIJ(+cTv@ywm~;5*o!gtR=lZqF`V;8Qr%?9>P_!j)DuNph6?Jr~%b*s&< z!zrIy?(+`~f4F^f}C za)BP8N8iO*AZwK7%>6WPo`>}c)v%E_=Rq|{pH`D0Ye-8pvu5j5>G>~ptpI>Fu5xQv_)A}tMwHt52-={oM(01#Ry@XDD^|`5i*OFxo2pD&ec84 z)kfp4MrG*Sj-Ahdm0^P#-E?0c1~{fy>=@+-NvvMn)Y_1l)F2nzsW2{Fw5`%6S+L!{ z+rHoJlA=B6(omHPsAB95F1@s^nwVYn5fzE0Y$Qe16GY?wnp1pd`HJF-)qN44upE2? zzPa5igElu$4wfEkZ*bp+qk0^Kx6A_upVPVu2QuFeUU@ZDG^hW?;oGuVoKD8@L zhO7lP>#S<%j0eOCIQ9HNX(az9^rFv^nUu6?et#59NaLLfQVIvS4BrESS(BzF??~ep z*r5`LxUv+u?6X=l;ZGCisiwUqA z*Y@nHUsKl1Xr`v;+{ViL<@`}j_{rf~M#$pVcOYa&gy19Kd>Ku9c6qbY($vgIC4Q?B zO}=Y>L_I8pPPq*!eX>LJEe^+De+hlI3UCN!n831vL%LWz$Cm(Ud~u13jhsuOmXYM2 z+db`OhC&$yG;zoo5TiCqTS<0(ZyvJKQES7dJGSJkV-EUcY4q1Yib1q$JIAgsyr?-RBub$^AArD4gb9ro7gX*rN zo>)2I`SMbVhAYfADYFF0-GD-tX_;0fASKi8uF15|;l2_N4Oar7B(zfBNxqMTwpV(> zeZ+q8$Vtp#Ph+-!_gjh6rc=qDpj_L`$@FP%d;CCB_Kev|c{F01>t}k-OE-Ihe6ZmS z5YWDgcZmTYU%6p_cDtrs~*u2r4G0PVdgNnl)w3gxMtI9Hpmi6}w5<7m_)ne=?(5RfM8tl0PJU-OMsR0OR*x+KP+9R%*X`>J{3PD2+oF&BW4+RZh-D&n8`|?3!7|=N1 z_2-91gmV&;6hs6GeF2TnCH|>@3ci_Ol6Ib0c?k!<3GRgzgGAacem(ReLfz4sA#pDp zge^6}$>ODtQQjYX6{NEF&iHWW7~?wos?D^1hA^sa!yF66V|DGT91G`{jAjA`A(jZt zkWK$pl({gNmF#}!7_&P2s?BRZU5M3}ZY(rmW0~0xJLvV1m4s>t$SU)ZQR3)ZHmwln z>k|lvm}(85d{Pe)p0a-=l)^_YOWxV!lGcii>N(gz+?yLW8@OL}fPQT2tpW?~ypPc^ zB|ipx+7BtU&hj~Q?p?V({!~dk?dyKbRXpF0YLC)xyd!I+)8 zVc@>yRL#nu-A-zan1iG5w%pN>rNe~e&sVx+-^#@OH4S3*CR#|A`{>8qohn4oE!c_NL}&8zlxCIu4j0g{$+_92VW<0@qG9_Ph@G(cu_08ct>N~v zB*01Eb=8KDDG3V-6F=Mc+4Cp+n2xk~FJ^dzHH&IUr(Xs$!BYo_mWjHZJ2dGD3PO{6 z%0;tZ`&4VWuHq!YAcaSy;mLinkpQ@X&JTfpqrKcmuMMfN>X~;uY|&}W+q7b*?KRf? zble9d5yt@CY^vUnY)PZ^DaMD+&XC^3Zw zF@-sf#1z%*c9XA#W4M2BE5kk~(rxrsY$Ko*sdnH_WF`~2?zkf2U^ZB)&8z4&{}pBpsV<9_=Ay@Hy z0p9_%v|5=ETX1hD&P7U((#@ce1pR~J=a>JG%*7c_qFI4Mp*?EQ?iwM=plqT$YCF)F z9~JZYTeLt?iqF(IPoAJlS|S{OP-O6zsFYT|SP1qAfWwG$8R|gaX`_cym_lii;aCEk zUHA-~!a;lZ6`Vl`4S% zfXa0tEJ%ubicD5snh{=_-wSPoQZ%rdx*%q`k$OVC7Wt}!5u*qz(=vNESWl|pxGTZ_ zx-M;XSi7(7JwE@%1arsZ@!r@7Q#BM8&=n@~*RIm7^#!mG4hb01$%~u;VTw}*6xme^ zi0qdu{ZOjV7hW?Tjk;UJF0mfcC4nnbS|t48lZ4O|rZzT!ym4`&bef8p$Jmpr&+~9RQ>dg#IO8YR0}+VZV{G?vr6(28!>yM*lRw5l%Ci=-9e! zmz`5_B1VbJ)~6z=ou9K;yiMmYLKQ7S74VuiwvSR$x*cK|-l#_e0{o;OfL%F@Y}3A> z#>D;1MG_P=JjT$EA1MTp{-w5>ea$WmFQUB1NXNvPRf!O$1}o`y@6%r=$;FL4SqXKL ziE#$}-VJGJ4#5f&;Ta_oURa`dMZdbzfvb51iWa;=E{=*%FJA;5I?V@Fti%3a0v^qd zq9m9`Mg%3-#Uer!1Q*rg^dB(ip0+vGW$i)nPnKWbZfy|+NVD^*(D5#&*VIC5dI`=t zoxQ6Dt@NYYAzSx;`~K5UE9585aKs`h(VH|?k zI&Z)UT#lG9XjKYgA-G=PQifUVZ@K(}2j`$4Vnq?hGjX?Js7iivfm^#nBv)(S7(zi) zvzxoaZ(vEE`@n6jLjTE{5MdLG(i30AycQ2>wovjD6`^)-P}<}Gk^j8){&&A6$3on# z(jw$7-!F#WzIu6zKHqx9B8M<2JkVcaeCCCcodF237|BIZxhif_XP5vDKhaVtQ+;( zB=K;kQG=w)C%n~JDTh{g0D!&(lE8H-o@uisu9TbCn-g}=-f_k#T%;6T0%EO>Q@V2+ zRxwuAL~@$3d%}(4$?Se5v-HblLjvwZ{1v(VWVbqf_hF@r&G?Hw>nmW8RizWQuQ(^n z85yWZQ~ytQcLqiCl`^X+!&3L_fttQc{7^Wn0ww5_-ek zvTRUh&YR00l?~gVLcY0;ZwU8G89+efzyy{!peUEO zW`kNkw!#UVaCf=&)U~UZFYQoaHXec;c#?zs#HiGNiHwzlUEZ5PrN6m1L>%M?yVZX4 zAII4gydrar$VB>*;}Ob`x6@?EEVd3!A)3_3W7fh*tad*{CN#c6nT-SUA^7LY7FDdm z+L5`!u2X50Ho=NeJ*DcI8@ylFr6pey=W@qd7=O|Hb;%vs^0=0G>sW7_SZ_nT#?!$A zippM8W&-jlalR^}YI`{k=uO6hKBKpb9?%0PWNRs1UQnzGs2A`xi8=p*c9K1|m30gKyA4VrQ z)o&#MZUQn?^n=$*uZ9VC9q6t~$_5tffIBJ!H94lZKuEgfy#qn^zCXC^ zayPecI}`!z-Vx)-8jgPJ??XEs#7ZC!eo8kN-73wz&UE>Mf6?{ZQb{0? z;Ag<-Cht^-=5K(KX+oNyRBORVuuE_fw=hT&2oi}4PUe055||Q{bP+H8@EgHOR2f`l zJJU}#ou$CX7gUrkP+GL^p%;0jLDPb?uBNZxD{{N@eexWne>hg}O0 z;2~@^?jQkNyD*g`IDQ5n%PTNfS=SL%MNr~WzEBHLvJz6Xq^9Fm!3)Jp#b=A_%d4OH z^rwF0xo4kw`uepimv=22gS(G|yX(02*tEGkzjbW-HpkbI@jff~B_Jx{#2Im9`XA|t z(y1jV)qll_@&AGO44C)od^AJ7ydX)B8kg2JiA(2C2ZWQT(Uaq~@ktrBY_2+&xWr(2UMVC1&eJx8CQmL;!SCZjMcj3Sl&37iJ2a4ExA5MEoA zWn?->yR5w~$F?ImP^(DG$xPULt=&iGv*}z7y%n0xAUgKDb~;&tvCFHbu1QCygYf2< z51|}b0rjf9*SE4^r5v$Dtzc z1&`5K5#QF%j{NxLkl=Y0t}4Cvkx_pWI4lktut*lZ=&@?F)ZK6mL&F|cz~W>J+xMdq zP^lBA`*HeuPztKH@D%Egx_FOA#k4(|qC-rI_T<6Vg8sTxiz>i5 z9;a$UBG9z&L}R+Ea@Q~E9+RS_hVf5$6Y|xbe!6n0)O3w3K<$eby-H#Pm4!DFRf7nC zxWt`g2w441*sR^_+%oUT)a!~_{)aW~;IOLvy;A&6cnWS)Xh~%Rb^w7s#mI+A4~zgRNr` zgnGBxodIn_M0uQDCUKlW(4YSHX+ni|VTOzdvWBnmXBJS#?%1TMU0N}7zD?~_1w_Q7 zB*%ZxR_4DF7gM1#(c4R;{?lse(dAKpj{_Wxdw4#Qx?D`J%!aM*VoF~5)#hTmF-Ph@ zDqJa2P$zOktIFNCrTOjbDEO9(L;_(eov$M0Dir4qA^TYCwp_6-OSQp)IP^h&OVg7| zAtrBA8_!o1KT5j;AQ*Hq964Az2alww`ER^(RkM~2jY ztU>BZg4DHX|EeH06QpL>8}s1|pb*tts8VS0)YfF5VWm5Z?xWos&7Dh)?Y*7tN5$Ud z%X<%sy}ipv#pS)rZ$JP1GtWHr)YYqzcb}^yo`3Oq%50u_?wRMFJ$UNoQ#YT!an-@I z`4tZtcl>M(gioIULUOY~BcT#b`Gs<{^?e#3#T5-o0ZHO>BOtR98|o|{O(2!V!--fY zlNCzVDSjoz15BXNktb|#JAV`ziLBMOGF_b!kaf?WG3+S_3@jax97J|T>Kld^j&5b{ zL)Y!uaa&a%$+e6brUVV66&$gqBfuGi4k5HM1xZFWUY;8@a41~EBVlRf&PZv|VKxitQ(w0#>s72UPErK+qg_($T0uO6jv{+~lrU8-) z_slg)ZCN0gRy)8J4bFcO9<`JBRYD~b3QE_OT{1hkDrVZO8LL^j?Jy2=}{UIqm zC|c`57-8TxP_sBbl&TKqVcADmQW`0T#Ql{kdCqL)ZEgml3Xj3S@4e27UroIJ;yo;g zy_iVgtx_q!_iYxJLS)?g54rd6r+eS_-d_O2h4&y%RTD$ME^WM2%sREZN=g0x?~CN( zwngK6Ti^c;=eGBXSA0*(Ql$*Y#VK%#+LT2cz^w9!yiTL|!7eNxy#5VgH}vwoYmHy{ ztD^De=ZB$GM6UYt#xDRwZRqRxFy$rridGa_&YogmjpjcVYe>~de6;cQ{_>LkkDR2d z|AQ%bti5!WYP}2F?egS^Y3Q`&Z8JnKcG|*D^BdvH$939b57lYYM!3574{+KN8Rcoi zA%6&W#RJS;1CG*gzF<7MO%;jbmbmKSYh`q=ph2`Nw!|)KfkzcOm_DUg@ZB+wVEMrT z5*hf^($hx8tA3KkK=F_u1ELZt4f9;C<55^Y;1I^S8&*|VY9;+Eeq!tccYDPXKwWBm zG6cnj1$s-6a>XA%&q8Z1vAA3_un;wf7p62dNM(cE3wQ)Hz`mr!O8Roo!0dBUhGMc% z)eoOC@ItI$+brW7>B`^$Jq?sIVtnIQ|bU{vjft+OdfSPny zPxb0HLh=I%pJ9zft3sWRStR?@=~zSX6Q7)`rJhj@o|4@+C9gD|rM$b?$?M+9XSEX? zC{5fbU$TgsBhXK3T q5O7BvLkED_I;y-U+)p}i7}MNRvQ6gzu645JFOMI(iu? base = GlobalCtx2::GetInstance()->GetResourceManager()->GetArchive(); + std::shared_ptr font = std::make_shared(); + base->LoadFile(normalize(path), false, font); + if (font->bIsLoaded) { + char* font_data = new char[font->dwBufferSize]; + memcpy(font_data, font->buffer.get(), font->dwBufferSize); + Fonts[name] = io.Fonts->AddFontFromMemoryTTF(font_data, font->dwBufferSize, fontSize); + } +} + +void Ship::GameOverlay::TextDraw(float x, float y, bool shadow, const char* fmt, ...) IM_FMTARGS(5) { + char buf[1024]; + va_list args; + va_start(args, fmt); + vsnprintf(buf, IM_ARRAYSIZE(buf), fmt, args); + buf[IM_ARRAYSIZE(buf) - 1] = 0; + va_end(args); + + ImGui::PushFont(Fonts[this->CurrentFont]); + if (shadow) { + ImGui::SetCursorPos(ImVec2(x + 1, y + 1)); + ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(.0f, .0f, .0f, 255)); + ImGui::Text(buf, args); + } + ImGui::PopStyleColor(); + ImGui::SetCursorPos(ImVec2(x, y)); + ImGui::Text(buf, args); + ImGui::PopFont(); +} + +float Ship::GameOverlay::GetScreenWidth() { + const ImGuiViewport* viewport = ImGui::GetMainViewport(); + return viewport->Size.x; +} + +float Ship::GameOverlay::GetScreenHeight() { + const ImGuiViewport* viewport = ImGui::GetMainViewport(); + return viewport->Size.y; +} + +float Ship::GameOverlay::GetStringWidth(const char* text) { + return CalculateTextSize(text).x; +} + +ImVec2 Ship::GameOverlay::CalculateTextSize(const char* text, const char* text_end, bool hide_text_after_double_hash, float wrap_width) { + ImGuiContext& g = *GImGui; + + const char* text_display_end; + if (hide_text_after_double_hash) + text_display_end = ImGui::FindRenderedTextEnd(text, text_end); // Hide anything after a '##' string + else + text_display_end = text_end; + + GameOverlay* overlay = SohImGui::overlay; + + ImFont* font = overlay->CurrentFont == "Default" ? g.Font : overlay->Fonts[overlay->CurrentFont]; + const float font_size = font->FontSize; + if (text == text_display_end) + return ImVec2(0.0f, font_size); + ImVec2 text_size = font->CalcTextSizeA(font_size, FLT_MAX, wrap_width, text, text_display_end, NULL); + + // Round + // FIXME: This has been here since Dec 2015 (7b0bf230) but down the line we want this out. + // FIXME: Investigate using ceilf or e.g. + // - https://git.musl-libc.org/cgit/musl/tree/src/math/ceilf.c + // - https://embarkstudios.github.io/rust-gpu/api/src/libm/math/ceilf.rs.html + text_size.x = IM_FLOOR(text_size.x + 0.99999f); + + return text_size; +} + +void Ship::GameOverlay::Init() { + this->LoadFont("Press Start 2P", "assets/ship_of_harkinian/fonts/PressStart2P-Regular.ttf", 12.0f); + this->LoadFont("Fipps", "assets/ship_of_harkinian/fonts/Fipps-Regular.otf", 32.0f); + const std::string DefaultFont = this->Fonts.begin()->first; + if(!this->Fonts.empty()) { + const std::string font = CVar_GetString("gOverlayFont", ImStrdup(DefaultFont.c_str())); + for (auto& [name, _] : this->Fonts) { + if (font.starts_with(name)) { + this->CurrentFont = name; + break; + } + this->CurrentFont = DefaultFont; + } + } + SohImGui::console->Commands["overlay"] = { OverlayCommand, "Draw an overlay using a cvar value" }; +} + +void Ship::GameOverlay::DrawSettings() { + ImGui::Text("Overlays Text Font"); + if (ImGui::BeginCombo("##TextFont", this->CurrentFont.c_str())) { + for (auto& [name, font] : this->Fonts) { + if (ImGui::Selectable(name.c_str(), name == this->CurrentFont)) { + this->CurrentFont = name; + CVar_SetString("gOverlayFont", ImStrdup(name.c_str())); + SohImGui::needs_save = true; + } + + } + ImGui::EndCombo(); + } +} + + +void Ship::GameOverlay::Draw() { + const ImGuiViewport* viewport = ImGui::GetMainViewport(); + + ImGui::SetNextWindowPos(viewport->Pos, ImGuiCond_Always); + ImGui::SetNextWindowSize(viewport->Size, ImGuiCond_Always); + ImGui::Begin("SoHOverlay", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoBackground | + ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoInputs); + + float textY = 50; + for (auto &[key, overlay] : this->RegisteredOverlays) { + + if (overlay.type == OverlayType::TEXT) { + const char* text = ImStrdup(key.c_str()); + const CVar* var = CVar_GetVar(text); + + switch (var->type) { + case CVAR_TYPE_FLOAT: + this->TextDraw(30, textY, true, "%s %.2f", text, var->value.valueFloat); + break; + case CVAR_TYPE_S32: + this->TextDraw(30, textY, true, "%s %d", text, var->value.valueS32); + break; + case CVAR_TYPE_STRING: + this->TextDraw(30, textY, true, "%s %s", text, var->value.valueStr); + break; + } + + free((void*) text); + textY += 30; + } + } + + ImGui::End(); +} + + +bool Ship::OverlayCommand(const std::vector& args) { + if (args.size() < 3) { + return CMD_FAILED; + } + + if (CVar_GetVar(args[2].c_str()) != nullptr) { + const char* key = args[2].c_str(); + GameOverlay* overlay = SohImGui::overlay; + if (args[1] == "add") { + if (!overlay->RegisteredOverlays.contains(args[2])) { + overlay->RegisteredOverlays[args[2]] = { + OverlayType::TEXT, + key + }; + INFO("Added overlay: %s ", key); + } else { + ERROR("Overlay already exists: %s", key); + } + } + else if (args[1] == "remove") { + if (overlay->RegisteredOverlays.contains(args[2])) { + overlay->RegisteredOverlays.erase(args[2]); + INFO("Removed overlay: %s ", key); + } else { + ERROR("Overlay not found: %s ", key); + } + } + } else { + ERROR("CVar %s does not exist", args[2].c_str()); + } + + return CMD_SUCCESS; +} diff --git a/libultraship/libultraship/GameOverlay.h b/libultraship/libultraship/GameOverlay.h new file mode 100644 index 000000000..c53503a52 --- /dev/null +++ b/libultraship/libultraship/GameOverlay.h @@ -0,0 +1,38 @@ +#pragma once +#include +#include + +#include "Lib/ImGui/imgui.h" +#include +#include + +enum class OverlayType { + TEXT, IMAGE +}; + +struct Overlay { + OverlayType type; + const char* value; +}; + +namespace Ship { + class GameOverlay { + public: + std::unordered_map RegisteredOverlays; + std::unordered_map Fonts; + std::string CurrentFont = "Default"; + void Init(); + void Draw(); + void DrawSettings(); + static float GetScreenWidth(); + static float GetScreenHeight(); + static float GetStringWidth(const char* text); + static ImVec2 CalculateTextSize(const char* text, const char* text_end = NULL, bool hide_text_after_double_hash = false, float wrap_width = -1.0f); + private: + void TextDraw(float x, float y, bool shadow, const char* text, ...); + void LoadFont(const std::string& name, const std::string& path, float fontSize); + }; + + static bool OverlayCommand(const std::vector& args); +} + diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 7e7082b7b..9adbdd820 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -18,6 +18,7 @@ #include "TextureMod.h" #include "Window.h" #include "Cvar.h" +#include "GameOverlay.h" #include "Texture.h" #include "../Fast3D/gfx_pc.h" #include "Lib/stb/stb_image.h" @@ -59,8 +60,10 @@ namespace SohImGui { WindowImpl impl; ImGuiIO* io; Console* console = new Console; + GameOverlay* overlay = new GameOverlay; bool p_open = false; bool needs_save = false; + std::vector CustomTexts; int SelectedLanguage = CVar_GetS32("gLanguages", 0); //Default Language to 0=English 1=German 2=French float kokiri_col[3] = { 0.118f, 0.41f, 0.106f }; float goron_col[3] = { 0.392f, 0.078f, 0.0f }; @@ -323,10 +326,13 @@ namespace SohImGui { ImGui::SetCurrentContext(ctx); io = &ImGui::GetIO(); io->ConfigFlags |= ImGuiConfigFlags_DockingEnable; + io->Fonts->AddFontDefault(); + if (UseViewports()) { io->ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; } console->Init(); + overlay->Init(); ImGuiWMInit(); ImGuiBackendInit(); @@ -490,7 +496,7 @@ namespace SohImGui { } } - void DrawMainMenuAndCalculateGameSize() { + void DrawMainMenuAndCalculateGameSize() { console->Update(); ImGuiBackendNewFrame(); ImGuiWMNewFrame(); @@ -624,6 +630,7 @@ namespace SohImGui { } ImGui::EndCombo(); } + overlay->DrawSettings(); ImGui::EndMenu(); } @@ -800,6 +807,8 @@ namespace SohImGui { pos = ImVec2(size.x / 2 - sw / 2, 0); size = ImVec2(sw, size.y); } + + overlay->Draw(); } void DrawFramebufferAndGameInput() { diff --git a/libultraship/libultraship/SohImGuiImpl.h b/libultraship/libultraship/SohImGuiImpl.h index c4fe3f825..dd0ec9fd3 100644 --- a/libultraship/libultraship/SohImGuiImpl.h +++ b/libultraship/libultraship/SohImGuiImpl.h @@ -1,5 +1,6 @@ #pragma once +#include "GameOverlay.h" #include "Lib/ImGui/imgui.h" #include "SohConsole.h" @@ -58,6 +59,8 @@ namespace SohImGui { } CustomWindow; extern Console* console; + extern Ship::GameOverlay* overlay; + extern bool needs_save; void Init(WindowImpl window_impl); void Update(EventImpl event); diff --git a/libultraship/libultraship/libultraship.vcxproj b/libultraship/libultraship/libultraship.vcxproj index 3bf81a67d..b3448e7b0 100644 --- a/libultraship/libultraship/libultraship.vcxproj +++ b/libultraship/libultraship/libultraship.vcxproj @@ -256,6 +256,7 @@ + @@ -343,6 +344,7 @@ + diff --git a/libultraship/libultraship/libultraship.vcxproj.filters b/libultraship/libultraship/libultraship.vcxproj.filters index 5079d826e..8ac4f0afb 100644 --- a/libultraship/libultraship/libultraship.vcxproj.filters +++ b/libultraship/libultraship/libultraship.vcxproj.filters @@ -88,6 +88,9 @@ {bd6557f1-9480-413b-b0cd-843f8efc1939} + + {3285ab8a-06d8-4dac-9af9-efb2a9723ab1} + @@ -339,6 +342,9 @@ Source Files\CustomImpl + + Source Files\CustomImpl\Overlay + @@ -629,5 +635,8 @@ Source Files\Resources + + Source Files\CustomImpl\Overlay + \ No newline at end of file diff --git a/soh/soh/Enhancements/debugconsole.cpp b/soh/soh/Enhancements/debugconsole.cpp index e22f66d8c..94b230cd1 100644 --- a/soh/soh/Enhancements/debugconsole.cpp +++ b/soh/soh/Enhancements/debugconsole.cpp @@ -421,6 +421,14 @@ template bool is_number(const std::string& s) { return ((std::istringstream(s) >> n >> std::ws).eof()); } +char* Strdup(const char* src) { + const unsigned len = strlen(src) + 1; + char* newstr = static_cast(malloc(len)); + if (newstr) + memcpy(newstr, src, len); + return newstr; +} + void DebugConsole_LoadCVars() { if (File::Exists("cvars.cfg")) { @@ -431,7 +439,9 @@ void DebugConsole_LoadCVars() if (line.empty()) continue; if (cfg.size() < 2) continue; if (cfg[1].find("\"") != std::string::npos) { - CVar_SetString(cfg[0].c_str(), const_cast(cfg[1].c_str())); + std::string value(cfg[1]); + value.erase(std::ranges::remove(value, '\"').begin(), value.end()); + CVar_SetString(cfg[0].c_str(), Strdup(value.c_str())); } if (is_number(cfg[1])) { CVar_SetFloat(cfg[0].c_str(), std::stof(cfg[1])); From 108cd8efc8801ecaaa10a1ebc3abd8312b87ecc6 Mon Sep 17 00:00:00 2001 From: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> Date: Wed, 11 May 2022 19:37:10 +0200 Subject: [PATCH 118/146] Fix crash if LoadFile fails (#265) --- libultraship/libultraship/Archive.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/libultraship/libultraship/Archive.cpp b/libultraship/libultraship/Archive.cpp index 67ec8831a..1e8f8d597 100644 --- a/libultraship/libultraship/Archive.cpp +++ b/libultraship/libultraship/Archive.cpp @@ -54,11 +54,16 @@ namespace Ship { std::shared_ptr Archive::LoadFile(const std::string& filePath, bool includeParent, std::shared_ptr FileToLoad) { HANDLE fileHandle = NULL; + if (FileToLoad == nullptr) { + FileToLoad = std::make_shared(); + FileToLoad->path = filePath; + } + if (!SFileOpenFileEx(mainMPQ, filePath.c_str(), 0, &fileHandle)) { SPDLOG_ERROR("({}) Failed to open file {} from mpq archive {}", GetLastError(), filePath.c_str(), MainPath.c_str()); std::unique_lock Lock(FileToLoad->FileLoadMutex); FileToLoad->bHasLoadError = true; - return nullptr; + return FileToLoad; } DWORD dwFileSize = SFileGetFileSize(fileHandle, 0); @@ -72,18 +77,13 @@ namespace Ship { } std::unique_lock Lock(FileToLoad->FileLoadMutex); FileToLoad->bHasLoadError = true; - return nullptr; + return FileToLoad; } if (!SFileCloseFile(fileHandle)) { SPDLOG_ERROR("({}) Failed to close file {} from mpq archive {}", GetLastError(), filePath.c_str(), MainPath.c_str()); } - if (FileToLoad == nullptr) { - FileToLoad = std::make_shared(); - FileToLoad->path = filePath; - } - std::unique_lock Lock(FileToLoad->FileLoadMutex); FileToLoad->parent = includeParent ? shared_from_this() : nullptr; FileToLoad->buffer = fileData; @@ -97,6 +97,11 @@ namespace Ship { HANDLE fileHandle = NULL; HANDLE mpqHandle = NULL; + if (FileToLoad == nullptr) { + FileToLoad = std::make_shared(); + FileToLoad->path = filePath; + } + for(auto [path, handle] : mpqHandles) { if (SFileOpenFileEx(mpqHandle, filePath.c_str(), 0, &fileHandle)) { std::unique_lock Lock(FileToLoad->FileLoadMutex); @@ -121,18 +126,13 @@ namespace Ship { } std::unique_lock Lock(FileToLoad->FileLoadMutex); FileToLoad->bHasLoadError = true; - return nullptr; + return FileToLoad; } if (!SFileCloseFile(fileHandle)) { SPDLOG_ERROR("({}) Failed to close file {} from mpq archive {}", GetLastError(), filePath.c_str(), MainPath.c_str()); } - if (FileToLoad == nullptr) { - FileToLoad = std::make_shared(); - FileToLoad->path = filePath; - } - std::unique_lock Lock(FileToLoad->FileLoadMutex); FileToLoad->parent = includeParent ? shared_from_this() : nullptr; FileToLoad->buffer = fileData; From 6d2e1a603f9aff76f4cf02c22788ace358bed134 Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Wed, 11 May 2022 13:00:04 -0500 Subject: [PATCH 119/146] Fixed windows build --- libultraship/libultraship/GameOverlay.cpp | 4 ++-- .../libultraship/Lib/Fast3D/gfx_direct3d11.cpp | 2 +- soh/soh/Enhancements/debugconsole.cpp | 12 +++--------- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/libultraship/libultraship/GameOverlay.cpp b/libultraship/libultraship/GameOverlay.cpp index a8438643f..f514599b1 100644 --- a/libultraship/libultraship/GameOverlay.cpp +++ b/libultraship/libultraship/GameOverlay.cpp @@ -13,7 +13,7 @@ void Ship::GameOverlay::LoadFont(const std::string& name, const std::string& pat ImGuiIO& io = ImGui::GetIO(); std::shared_ptr base = GlobalCtx2::GetInstance()->GetResourceManager()->GetArchive(); std::shared_ptr font = std::make_shared(); - base->LoadFile(normalize(path), false, font); + base->LoadFile(path, false, font); if (font->bIsLoaded) { char* font_data = new char[font->dwBufferSize]; memcpy(font_data, font->buffer.get(), font->dwBufferSize); @@ -65,7 +65,7 @@ ImVec2 Ship::GameOverlay::CalculateTextSize(const char* text, const char* text_e text_display_end = text_end; GameOverlay* overlay = SohImGui::overlay; - + ImFont* font = overlay->CurrentFont == "Default" ? g.Font : overlay->Fonts[overlay->CurrentFont]; const float font_size = font->FontSize; if (text == text_display_end) diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp index 448c90735..4664a0faa 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_direct3d11.cpp @@ -1027,7 +1027,7 @@ struct GfxRenderingAPI gfx_direct3d11_api = { gfx_d3d11_get_framebuffer_texture_id, gfx_d3d11_select_texture_fb, gfx_d3d11_delete_texture, - gfx_d3d11_set_texture_filter, + gfx_d3d11_set_texture_filter, gfx_d3d11_get_texture_filter }; diff --git a/soh/soh/Enhancements/debugconsole.cpp b/soh/soh/Enhancements/debugconsole.cpp index 94b230cd1..60375d440 100644 --- a/soh/soh/Enhancements/debugconsole.cpp +++ b/soh/soh/Enhancements/debugconsole.cpp @@ -7,6 +7,8 @@ #define PATH_HACK #include #include + +#include "Lib/ImGui/imgui_internal.h" #undef PATH_HACK #undef Path @@ -421,14 +423,6 @@ template bool is_number(const std::string& s) { return ((std::istringstream(s) >> n >> std::ws).eof()); } -char* Strdup(const char* src) { - const unsigned len = strlen(src) + 1; - char* newstr = static_cast(malloc(len)); - if (newstr) - memcpy(newstr, src, len); - return newstr; -} - void DebugConsole_LoadCVars() { if (File::Exists("cvars.cfg")) { @@ -441,7 +435,7 @@ void DebugConsole_LoadCVars() if (cfg[1].find("\"") != std::string::npos) { std::string value(cfg[1]); value.erase(std::ranges::remove(value, '\"').begin(), value.end()); - CVar_SetString(cfg[0].c_str(), Strdup(value.c_str())); + CVar_SetString(cfg[0].c_str(), ImStrdup(value.c_str())); } if (is_number(cfg[1])) { CVar_SetFloat(cfg[0].c_str(), std::stof(cfg[1])); From 3f74e82a22a88737e6a353fae5ae0181a3383037 Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Wed, 11 May 2022 13:13:22 -0500 Subject: [PATCH 120/146] Fixed linux compilation --- libultraship/libultraship/GameOverlay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libultraship/libultraship/GameOverlay.cpp b/libultraship/libultraship/GameOverlay.cpp index f514599b1..f54bc7e1a 100644 --- a/libultraship/libultraship/GameOverlay.cpp +++ b/libultraship/libultraship/GameOverlay.cpp @@ -21,7 +21,7 @@ void Ship::GameOverlay::LoadFont(const std::string& name, const std::string& pat } } -void Ship::GameOverlay::TextDraw(float x, float y, bool shadow, const char* fmt, ...) IM_FMTARGS(5) { +void Ship::GameOverlay::TextDraw(float x, float y, bool shadow, const char* fmt, ...) { char buf[1024]; va_list args; va_start(args, fmt); From fca0566cef729b3c13bdc181b674d9b125f7820e Mon Sep 17 00:00:00 2001 From: Ralphie Morell Date: Wed, 11 May 2022 15:08:22 -0400 Subject: [PATCH 121/146] Save Editor Enhancements (#273) * Added more SaveContext elements to save viewer; Added player-specific tab * some std::strings changed to const char*; fixed bug with current equips on tunic+boots * Spacing & misc. edits; reversed flag drawing order to match tcrf.net flag tables --- .../Enhancements/debugger/debugSaveEditor.cpp | 540 +++++++++++++++++- 1 file changed, 511 insertions(+), 29 deletions(-) diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp index e7bf0a783..800f8d5b2 100644 --- a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp +++ b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp @@ -251,15 +251,31 @@ void DrawGroupWithBorder(T&& drawFunc) { ImGui::EndGroup(); } +char z2ASCII(int code) { + int ret; + if (code < 10) { //Digits + ret = code + 0x30; + } else if (code >= 10 && code < 36) { //Uppercase letters + ret = code + 0x37; + } else if (code >= 36 && code < 62) { //Lowercase letters + ret = code + 0x3D; + } else if (code == 62) { //Space + ret = code - 0x1E; + } else if (code == 63 || code == 64) { // _ and . + ret = code - 0x12; + } else { + ret = code; + } + return char(ret); + +} + void DrawInfoTab() { - // TODO This is the bare minimum to get the player name showing - // There will need to be more effort to get it robust and editable + // TODO Needs a better method for name changing but for now this will work. std::string name; + ImU16 one = 1; for (int i = 0; i < 8; i++) { - char letter = gSaveContext.playerName[i] + 0x3D; - if (letter == '{') { - letter = '\0'; - } + char letter = z2ASCII(gSaveContext.playerName[i]); name += letter; } name += '\0'; @@ -268,6 +284,14 @@ void DrawInfoTab() { ImGui::Text("Name: %s", name.c_str()); InsertHelpHoverText("Player Name"); + std::string nameID; + for (int i = 0; i < 8; i++) { + nameID = z2ASCII(i); + if (i % 4 != 0) { + ImGui::SameLine(); + } + ImGui::InputScalar(nameID.c_str(), ImGuiDataType_U8, &gSaveContext.playerName[i], &one, NULL); + } // Use an intermediary to keep the health from updating (and potentially killing the player) // until it is done being edited @@ -377,21 +401,101 @@ void DrawInfoTab() { ImGui::InputScalar("Bgs Day Count", ImGuiDataType_S32, &gSaveContext.bgsDayCount); InsertHelpHoverText("Total number of days elapsed since giving Biggoron the claim check"); - // TODO Changing Link's age is more involved than just setting gSaveContext.linkAge - // It might not fit here and instead should be only changable when changing scenes - /* - if (ImGui::BeginCombo("Link Age", LINK_IS_ADULT ? "Adult" : "Child")) { - if (ImGui::Selectable("Adult")) { - gSaveContext.linkAge = 0; + ImGui::InputScalar("Entrance Index", ImGuiDataType_S32, &gSaveContext.entranceIndex); + InsertHelpHoverText("From which entrance did Link arrive?"); + + ImGui::InputScalar("Cutscene Index", ImGuiDataType_S32, &gSaveContext.cutsceneIndex); + InsertHelpHoverText("Which cutscene is this?"); + + ImGui::InputScalar("Navi Timer", ImGuiDataType_U16, &gSaveContext.naviTimer); + InsertHelpHoverText("Navi wants to talk at 600 units, decides not to at 3000."); + + ImGui::InputScalar("Timer 1 State", ImGuiDataType_S16, &gSaveContext.timer1State); + InsertHelpHoverText("Heat timer, race timer, etc. Has white font"); + + ImGui::InputScalar("Timer 1 Value", ImGuiDataType_S16, &gSaveContext.timer1Value, &one, NULL); + InsertHelpHoverText("Time, in seconds"); + + ImGui::InputScalar("Timer 2 State", ImGuiDataType_S16, &gSaveContext.timer2State); + InsertHelpHoverText("Trade timer, Ganon collapse timer, etc. Has yellow font"); + + ImGui::InputScalar("Timer 2 Value", ImGuiDataType_S16, &gSaveContext.timer2Value, &one, NULL); + InsertHelpHoverText("Time, in seconds"); + + const char* audioName; + switch (gSaveContext.audioSetting) { + case 0: + audioName = "Stereo"; + break; + case 1: + audioName = "Mono"; + break; + case 2: + audioName = "Headset"; + break; + case 3: + audioName = "Surround"; + break; + default: + audioName = "?"; + } + if (ImGui::BeginCombo("Audio", audioName)) { + if (ImGui::Selectable("Stereo")) { + gSaveContext.audioSetting = 0; } - if (ImGui::Selectable("Child")) { - gSaveContext.linkAge = 1; + if (ImGui::Selectable("Mono")) { + gSaveContext.audioSetting = 1; + } + if (ImGui::Selectable("Headset")) { + gSaveContext.audioSetting = 2; + } + if (ImGui::Selectable("Surround")) { + gSaveContext.audioSetting = 3; } ImGui::EndCombo(); } - */ + InsertHelpHoverText("Sound setting"); + + bool n64DDFlag = gSaveContext.n64ddFlag != 0; + if (ImGui::Checkbox("64 DD file?", &n64DDFlag)) { + gSaveContext.n64ddFlag = n64DDFlag; + } + InsertHelpHoverText("WARNING! If you save, your file may be locked! Use caution!"); + + if (ImGui::BeginCombo("Z Target Mode", gSaveContext.zTargetSetting ? "Hold" : "Switch")) { + if (ImGui::Selectable("Switch")) { + gSaveContext.zTargetSetting = 0; + } + if (ImGui::Selectable("Hold")) { + gSaveContext.zTargetSetting = 1; + } + ImGui::EndCombo(); + } + InsertHelpHoverText("Z-Targeting behavior"); + + ImGui::PushItemWidth(ImGui::GetFontSize() * 10); + static std::array minigameHS = { "Horseback Archery", + "Big Poe Points", + "Fishing", + "Malon's Obstacle Course", + "Running Man Race", + "?", + "Dampe's Race" }; + + if (ImGui::TreeNode("Minigames")) { + for (int i = 0; i < 7; i++) { + if (i == 5) { //HS_UNK_05 is unused + continue; + } + std::string minigameLbl = minigameHS[i]; + ImGui::InputScalar(minigameLbl.c_str(), ImGuiDataType_S32, &gSaveContext.highScores[i], &one, NULL); + } + + ImGui::TreePop(); + } + ImGui::PopItemWidth(); } @@ -505,7 +609,7 @@ void DrawInventoryTab() { } // Draw a flag bitfield as an grid of checkboxes -void DrawFlagArray(const std::string& name, uint32_t& flags) { +void DrawFlagArray32(const std::string& name, uint32_t& flags) { ImGui::PushID(name.c_str()); for (int32_t flagIndex = 0; flagIndex < 32; flagIndex++) { if ((flagIndex % 8) != 0) { @@ -526,6 +630,25 @@ void DrawFlagArray(const std::string& name, uint32_t& flags) { ImGui::PopID(); } +void DrawFlagArray16(const std::string& name, uint16_t& flags) { + ImGui::PushID(name.c_str()); + for (int32_t flagIndex = 15; flagIndex >= 0; flagIndex--) { + ImGui::SameLine(); + ImGui::PushID(flagIndex); + uint32_t bitMask = 1 << flagIndex; + bool flag = (flags & bitMask) != 0; + if (ImGui::Checkbox("##check", &flag)) { + if (flag) { + flags |= bitMask; + } else { + flags &= ~bitMask; + } + } + ImGui::PopID(); + } + ImGui::PopID(); +} + void DrawFlagsTab() { if (ImGui::TreeNode("Current Scene")) { if (gGlobalCtx != nullptr) { @@ -534,7 +657,7 @@ void DrawFlagsTab() { DrawGroupWithBorder([&]() { ImGui::Text("Switch"); InsertHelpHoverText("Permanently-saved switch flags"); - DrawFlagArray("Switch", act->flags.swch); + DrawFlagArray32("Switch", act->flags.swch); }); ImGui::SameLine(); @@ -542,13 +665,13 @@ void DrawFlagsTab() { DrawGroupWithBorder([&]() { ImGui::Text("Temp Switch"); InsertHelpHoverText("Temporary switch flags. Unset on scene transitions"); - DrawFlagArray("Temp Switch", act->flags.tempSwch); + DrawFlagArray32("Temp Switch", act->flags.tempSwch); }); DrawGroupWithBorder([&]() { ImGui::Text("Clear"); InsertHelpHoverText("Permanently-saved room-clear flags"); - DrawFlagArray("Clear", act->flags.clear); + DrawFlagArray32("Clear", act->flags.clear); }); ImGui::SameLine(); @@ -556,13 +679,13 @@ void DrawFlagsTab() { DrawGroupWithBorder([&]() { ImGui::Text("Temp Clear"); InsertHelpHoverText("Temporary room-clear flags. Unset on scene transitions"); - DrawFlagArray("Temp Clear", act->flags.tempClear); + DrawFlagArray32("Temp Clear", act->flags.tempClear); }); DrawGroupWithBorder([&]() { ImGui::Text("Collect"); InsertHelpHoverText("Permanently-saved collect flags"); - DrawFlagArray("Collect", act->flags.collect); + DrawFlagArray32("Collect", act->flags.collect); }); ImGui::SameLine(); @@ -570,13 +693,13 @@ void DrawFlagsTab() { DrawGroupWithBorder([&]() { ImGui::Text("Temp Collect"); InsertHelpHoverText("Temporary collect flags. Unset on scene transitions"); - DrawFlagArray("Temp Collect", act->flags.tempCollect); + DrawFlagArray32("Temp Collect", act->flags.tempCollect); }); DrawGroupWithBorder([&]() { ImGui::Text("Chest"); InsertHelpHoverText("Permanently-saved chest flags"); - DrawFlagArray("Chest", act->flags.chest); + DrawFlagArray32("Chest", act->flags.chest); }); ImGui::SameLine(); @@ -633,7 +756,7 @@ void DrawFlagsTab() { DrawGroupWithBorder([&]() { ImGui::Text("Switch"); InsertHelpHoverText("Switch flags"); - DrawFlagArray("Switch", gSaveContext.sceneFlags[selectedSceneFlagMap].swch); + DrawFlagArray32("Switch", gSaveContext.sceneFlags[selectedSceneFlagMap].swch); }); ImGui::SameLine(); @@ -641,13 +764,13 @@ void DrawFlagsTab() { DrawGroupWithBorder([&]() { ImGui::Text("Clear"); InsertHelpHoverText("Room-clear flags"); - DrawFlagArray("Clear", gSaveContext.sceneFlags[selectedSceneFlagMap].clear); + DrawFlagArray32("Clear", gSaveContext.sceneFlags[selectedSceneFlagMap].clear); }); DrawGroupWithBorder([&]() { ImGui::Text("Collect"); InsertHelpHoverText("Collect flags"); - DrawFlagArray("Collect", gSaveContext.sceneFlags[selectedSceneFlagMap].collect); + DrawFlagArray32("Collect", gSaveContext.sceneFlags[selectedSceneFlagMap].collect); }); ImGui::SameLine(); @@ -655,13 +778,13 @@ void DrawFlagsTab() { DrawGroupWithBorder([&]() { ImGui::Text("Chest"); InsertHelpHoverText("Chest flags"); - DrawFlagArray("Chest", gSaveContext.sceneFlags[selectedSceneFlagMap].chest); + DrawFlagArray32("Chest", gSaveContext.sceneFlags[selectedSceneFlagMap].chest); }); DrawGroupWithBorder([&]() { ImGui::Text("Rooms"); InsertHelpHoverText("Flags for visted rooms"); - DrawFlagArray("Rooms", gSaveContext.sceneFlags[selectedSceneFlagMap].rooms); + DrawFlagArray32("Rooms", gSaveContext.sceneFlags[selectedSceneFlagMap].rooms); }); ImGui::SameLine(); @@ -669,7 +792,7 @@ void DrawFlagsTab() { DrawGroupWithBorder([&]() { ImGui::Text("Floors"); InsertHelpHoverText("Flags for visted floors"); - DrawFlagArray("Floors", gSaveContext.sceneFlags[selectedSceneFlagMap].floors); + DrawFlagArray32("Floors", gSaveContext.sceneFlags[selectedSceneFlagMap].floors); }); ImGui::TreePop(); @@ -730,6 +853,124 @@ void DrawFlagsTab() { gSaveContext.inventory.gsTokens = gsCount; } }); + + if (ImGui::TreeNode("Event Check Inf Flags")) { + DrawGroupWithBorder([&]() { + ImGui::Text("0"); + InsertHelpHoverText("Mostly Kokiri Forest related"); + DrawFlagArray16("eci0", gSaveContext.eventChkInf[0]); + }); + + DrawGroupWithBorder([&]() { + ImGui::Text("1"); + InsertHelpHoverText("Mostly Lon Lon Ranch related"); + DrawFlagArray16("eci1", gSaveContext.eventChkInf[1]); + }); + + DrawGroupWithBorder([&]() { + ImGui::Text("2"); + InsertHelpHoverText("Dodongo Related?"); + DrawFlagArray16("eci2", gSaveContext.eventChkInf[2]); + }); + + DrawGroupWithBorder([&]() { + ImGui::Text("3"); + InsertHelpHoverText("Mostly Zora related"); + DrawFlagArray16("eci3", gSaveContext.eventChkInf[3]); + }); + + DrawGroupWithBorder([&]() { + ImGui::Text("4"); + InsertHelpHoverText("Random"); + DrawFlagArray16("eci4", gSaveContext.eventChkInf[4]); + }); + + DrawGroupWithBorder([&]() { + ImGui::Text("5"); + InsertHelpHoverText("Mostly song learning related"); + DrawFlagArray16("eci5", gSaveContext.eventChkInf[5]); + }); + + DrawGroupWithBorder([&]() { + ImGui::Text("6"); + InsertHelpHoverText("Random"); + DrawFlagArray16("eci6", gSaveContext.eventChkInf[6]); + }); + + DrawGroupWithBorder([&]() { + ImGui::Text("7"); + InsertHelpHoverText("Boss Battle related"); + DrawFlagArray16("eci7", gSaveContext.eventChkInf[7]); + }); + + DrawGroupWithBorder([&]() { + ImGui::Text("8"); + InsertHelpHoverText("Mask related?"); + DrawFlagArray16("eci8", gSaveContext.eventChkInf[8]); + }); + + DrawGroupWithBorder([&]() { + ImGui::Text("9"); + InsertHelpHoverText("Mostly carpenter related"); + DrawFlagArray16("eci9", gSaveContext.eventChkInf[9]); + }); + + DrawGroupWithBorder([&]() { + ImGui::Text("A"); + InsertHelpHoverText("First-time overworld entrance cs related"); + DrawFlagArray16("eci1", gSaveContext.eventChkInf[10]); + }); + + DrawGroupWithBorder([&]() { + ImGui::Text("B"); + InsertHelpHoverText("First-time dungeon entrance cs/trial cs related"); + DrawFlagArray16("eci11", gSaveContext.eventChkInf[11]); + }); + + DrawGroupWithBorder([&]() { + ImGui::Text("C"); + InsertHelpHoverText("Random"); + DrawFlagArray16("eci12", gSaveContext.eventChkInf[12]); + }); + + DrawGroupWithBorder([&]() { + ImGui::Text("D"); + InsertHelpHoverText("Frog songs/GS rewards"); + DrawFlagArray16("eci13", gSaveContext.eventChkInf[13]); + }); + + ImGui::TreePop(); + } + if (ImGui::TreeNode("Inf Table Flags")) { + for (int i = 0; i < 30; i++) { + std::string it_id = "it" + std::to_string(i); + DrawGroupWithBorder([&]() { + ImGui::Text("%2d", i); + DrawFlagArray16(it_id, gSaveContext.infTable[i]); + }); + } + ImGui::TreePop(); + } + if (ImGui::TreeNode("Item Get Inf Flags")) { + for (int i = 0; i < 4; i++) { + std::string igi_id = "igi" + std::to_string(i); + DrawGroupWithBorder([&]() { + ImGui::Text("%d", i); + DrawFlagArray16(igi_id, gSaveContext.itemGetInf[i]); + }); + } + ImGui::TreePop(); + } + if (ImGui::TreeNode("Event Inf Flags")) { + for (int i = 0; i < 4; i++) { + std::string ei_id = "ei" + std::to_string(i); + DrawGroupWithBorder([&]() { + ImGui::Text("%d", i); + DrawFlagArray16(ei_id, gSaveContext.eventInf[i]); + }); + } + ImGui::TreePop(); + } } // Draws a combo that lets you choose and upgrade value from a drop-down of text values @@ -1057,6 +1298,242 @@ void DrawQuestStatusTab() { ImGui::PopItemWidth(); } +void DrawPlayerTab() { + if (gGlobalCtx != nullptr) { + Player* player = GET_PLAYER(gGlobalCtx); + const char* curSword; + const char* curShield; + const char* curTunic; + const char* curBoots; + + switch (player->currentSwordItem) { + case ITEM_SWORD_KOKIRI: + curSword = "Kokiri Sword"; + break; + case ITEM_SWORD_MASTER: + curSword = "Master Sword"; + break; + case ITEM_SWORD_BGS: + curSword = "Biggoron's Sword"; + break; + case ITEM_NONE: + curSword = "None"; + break; + default: + curSword = "None"; + break; + } + + switch (player->currentShield) { + case PLAYER_SHIELD_NONE: + curShield = "None"; + break; + case PLAYER_SHIELD_DEKU: + curShield = "Deku Shield"; + break; + case PLAYER_SHIELD_HYLIAN: + curShield = "Hylian Shield"; + break; + case PLAYER_SHIELD_MIRROR: + curShield = "Mirror Shield"; + break; + default: + break; + } + + switch (player->currentTunic) { + case PLAYER_TUNIC_KOKIRI: + curTunic = "Kokiri Tunic"; + break; + case PLAYER_TUNIC_GORON: + curTunic = "Goron Tunic"; + break; + case PLAYER_TUNIC_ZORA: + curTunic = "Zora Tunic"; + break; + default: + break; + } + + switch (player->currentBoots) { + case PLAYER_BOOTS_KOKIRI: + curBoots = "Kokiri Boots"; + break; + case PLAYER_BOOTS_IRON: + curBoots = "Iron Boots"; + break; + case PLAYER_BOOTS_HOVER: + curBoots = "Hover Boots"; + break; + default: + break; + } + + ImGui::PushItemWidth(ImGui::GetFontSize() * 6); + DrawGroupWithBorder([&]() { + ImGui::Text("Link's Position"); + ImGui::InputScalar("X Pos", ImGuiDataType_Float, &player->actor.world.pos.x); + ImGui::SameLine(); + ImGui::InputScalar("Y Pos", ImGuiDataType_Float, &player->actor.world.pos.y); + ImGui::SameLine(); + ImGui::InputScalar("Z Pos", ImGuiDataType_Float, &player->actor.world.pos.z); + }); + + DrawGroupWithBorder([&]() { + ImGui::Text("Link's Rotation"); + InsertHelpHoverText("For Link's rotation in relation to the world"); + ImGui::InputScalar("X Rot", ImGuiDataType_S16, &player->actor.world.rot.x); + ImGui::SameLine(); + ImGui::InputScalar("Y Rot", ImGuiDataType_S16, &player->actor.world.rot.y); + ImGui::SameLine(); + ImGui::InputScalar("Z Rot", ImGuiDataType_S16, &player->actor.world.rot.z); + }); + + DrawGroupWithBorder([&]() { + ImGui::Text("Link's Model Rotation"); + InsertHelpHoverText("For Link's actual model"); + ImGui::InputScalar("X ModRot", ImGuiDataType_S16, &player->actor.shape.rot.x); + ImGui::SameLine(); + ImGui::InputScalar("Y ModRot", ImGuiDataType_S16, &player->actor.shape.rot.y); + ImGui::SameLine(); + ImGui::InputScalar("Z ModRot", ImGuiDataType_S16, &player->actor.shape.rot.z); + }); + + ImGui::InputScalar("Linear Velocity", ImGuiDataType_Float, &player->linearVelocity); + InsertHelpHoverText("Link's speed along the XZ plane"); + + ImGui::InputScalar("Y Velocity", ImGuiDataType_Float, &player->actor.velocity.y); + InsertHelpHoverText("Link's speed along the Y plane. Caps at -20"); + + ImGui::InputScalar("Wall Height", ImGuiDataType_Float, &player->wallHeight); + InsertHelpHoverText("\"height used to determine whether link can climb or grab a ledge at the top\""); + + ImGui::InputScalar("Invincibility Timer", ImGuiDataType_S8, &player->invincibilityTimer); + InsertHelpHoverText("Can't take damage while this is nonzero"); + + ImGui::InputScalar("Gravity", ImGuiDataType_Float, &player->actor.gravity); + InsertHelpHoverText("Rate at which Link falls. Default -4.0f"); + + if (ImGui::BeginCombo("Link Age on Load", gGlobalCtx->linkAgeOnLoad == 0 ? "Adult" : "Child")) { + if (ImGui::Selectable("Adult")) { + gGlobalCtx->linkAgeOnLoad = 0; + } + if (ImGui::Selectable("Child")) { + gGlobalCtx->linkAgeOnLoad = 1; + } + ImGui::EndCombo(); + } + + InsertHelpHoverText("This will change Link's age when you load a map"); + + ImGui::Separator(); + + ImGui::Text("Link's Current Equipment"); + ImGui::PushItemWidth(ImGui::GetFontSize() * 15); + if (ImGui::BeginCombo("Sword", curSword)) { + if (ImGui::Selectable("None")) { + player->currentSwordItem = ITEM_NONE; + gSaveContext.equips.buttonItems[0] = ITEM_NONE; + Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_NONE); + } + if (ImGui::Selectable("Kokiri Sword")) { + player->currentSwordItem = ITEM_SWORD_KOKIRI; + gSaveContext.equips.buttonItems[0] = ITEM_SWORD_KOKIRI; + Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_KOKIRI); + } + if (ImGui::Selectable("Master Sword")) { + player->currentSwordItem = ITEM_SWORD_MASTER; + gSaveContext.equips.buttonItems[0] = ITEM_SWORD_MASTER; + Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_MASTER); + } + if (ImGui::Selectable("Biggoron's Sword")) { + if (gSaveContext.bgsFlag) { + if (gSaveContext.swordHealth < 8) { + gSaveContext.swordHealth = 8; + } + player->currentSwordItem = ITEM_SWORD_BGS; + gSaveContext.equips.buttonItems[0] = ITEM_SWORD_BGS; + } else { + if (gSaveContext.swordHealth < 8) { + gSaveContext.swordHealth = 8; + } + player->currentSwordItem = ITEM_SWORD_BGS; + gSaveContext.equips.buttonItems[0] = ITEM_SWORD_KNIFE; + } + + Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_BGS); + } + ImGui::EndCombo(); + + } + if (ImGui::BeginCombo("Shield", curShield)) { + if (ImGui::Selectable("None")) { + player->currentShield = PLAYER_SHIELD_NONE; + Inventory_ChangeEquipment(EQUIP_SHIELD, PLAYER_SHIELD_NONE); + } + if (ImGui::Selectable("Deku Shield")) { + player->currentShield = PLAYER_SHIELD_DEKU; + Inventory_ChangeEquipment(EQUIP_SHIELD, PLAYER_SHIELD_DEKU); + } + if (ImGui::Selectable("Hylian Shield")) { + player->currentShield = PLAYER_SHIELD_HYLIAN; + Inventory_ChangeEquipment(EQUIP_SHIELD, PLAYER_SHIELD_HYLIAN); + } + if (ImGui::Selectable("Mirror Shield")) { + player->currentShield = PLAYER_SHIELD_MIRROR; + Inventory_ChangeEquipment(EQUIP_SHIELD, PLAYER_SHIELD_MIRROR); + } + ImGui::EndCombo(); + } + + if (ImGui::BeginCombo("Tunic", curTunic)) { + if (ImGui::Selectable("Kokiri Tunic")) { + player->currentTunic = PLAYER_TUNIC_KOKIRI; + Inventory_ChangeEquipment(EQUIP_TUNIC, PLAYER_TUNIC_KOKIRI + 1); + } + if (ImGui::Selectable("Goron Tunic")) { + player->currentTunic = PLAYER_TUNIC_GORON; + Inventory_ChangeEquipment(EQUIP_TUNIC, PLAYER_TUNIC_GORON + 1); + } + if (ImGui::Selectable("Zora Tunic")) { + player->currentTunic = PLAYER_TUNIC_ZORA; + Inventory_ChangeEquipment(EQUIP_TUNIC, PLAYER_TUNIC_ZORA + 1); + } + ImGui::EndCombo(); + } + + if (ImGui::BeginCombo("Boots", curBoots)) { + if (ImGui::Selectable("Kokiri Boots")) { + player->currentBoots = PLAYER_BOOTS_KOKIRI; + Inventory_ChangeEquipment(EQUIP_BOOTS, PLAYER_BOOTS_KOKIRI + 1); + } + if (ImGui::Selectable("Iron Boots")) { + player->currentBoots = PLAYER_BOOTS_IRON; + Inventory_ChangeEquipment(EQUIP_BOOTS, PLAYER_BOOTS_IRON + 1); + } + if (ImGui::Selectable("Hover Boots")) { + player->currentBoots = PLAYER_BOOTS_HOVER; + Inventory_ChangeEquipment(EQUIP_BOOTS, PLAYER_BOOTS_HOVER + 1); + } + ImGui::EndCombo(); + } + + ImU16 one = 1; + ImGui::PushItemWidth(ImGui::GetFontSize() * 6); + DrawGroupWithBorder([&]() { + ImGui::Text("Current C Equips"); + ImGui::InputScalar("C Left", ImGuiDataType_U8, &gSaveContext.equips.buttonItems[1], &one, NULL); + ImGui::SameLine(); + ImGui::InputScalar("C Down", ImGuiDataType_U8, &gSaveContext.equips.buttonItems[2], &one, NULL); + ImGui::SameLine(); + ImGui::InputScalar("C Right", ImGuiDataType_U8, &gSaveContext.equips.buttonItems[3], &one, NULL); + }); + + } else { + ImGui::Text("Global Context needed for player info!"); + } +} + void DrawSaveEditor(bool& open) { if (!open) { return; @@ -1094,6 +1571,11 @@ void DrawSaveEditor(bool& open) { ImGui::EndTabItem(); } + if (ImGui::BeginTabItem("Player")) { + DrawPlayerTab(); + ImGui::EndTabItem(); + } + ImGui::EndTabBar(); } From 234283f4652867bc1bf64f69ecbda91dc3a64884 Mon Sep 17 00:00:00 2001 From: Baoulettes Date: Wed, 11 May 2022 21:10:07 +0200 Subject: [PATCH 122/146] Fix actual position map name GER/FRA (#279) --- soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c index 8732093ca..df6520ebf 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c @@ -3179,9 +3179,9 @@ void KaleidoScope_Update(GlobalContext* globalCtx) if (gSaveContext.language == LANGUAGE_ENG) { memcpy(pauseCtx->nameSegment + 0x400, ResourceMgr_LoadTexByName(mapNameTextures[36 + gSaveContext.worldMapArea]), 0xA00); } else if (gSaveContext.language == LANGUAGE_GER) { - memcpy(pauseCtx->nameSegment + 0x400, ResourceMgr_LoadTexByName(mapNameTextures[59 + gSaveContext.worldMapArea]), 0xA00); + memcpy(pauseCtx->nameSegment + 0x400, ResourceMgr_LoadTexByName(mapNameTextures[58 + gSaveContext.worldMapArea]), 0xA00); } else { - memcpy(pauseCtx->nameSegment + 0x400, ResourceMgr_LoadTexByName(mapNameTextures[81 + gSaveContext.worldMapArea]), 0xA00); + memcpy(pauseCtx->nameSegment + 0x400, ResourceMgr_LoadTexByName(mapNameTextures[80 + gSaveContext.worldMapArea]), 0xA00); } } // OTRTODO - player on pause From b054abbd657a0e15c7d2f6e9b4cbdd4f9d2aa3c1 Mon Sep 17 00:00:00 2001 From: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> Date: Wed, 11 May 2022 21:10:44 +0200 Subject: [PATCH 123/146] Fix tunic colors (#280) --- soh/src/code/z_player_lib.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c index 1c8e013f6..355d323e0 100644 --- a/soh/src/code/z_player_lib.c +++ b/soh/src/code/z_player_lib.c @@ -743,26 +743,24 @@ void func_8008F470(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, #else gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthTextures[eyeIndex])); #endif + Color_RGB8 sTemp; + color = &sTemp; if (tunic == PLAYER_TUNIC_KOKIRI) { - Color_RGB8 sTemp = { CVar_GetS32("gTunic_Kokiri_Red", sTunicColors[PLAYER_TUNIC_KOKIRI].r), - CVar_GetS32("gTunic_Kokiri_Green", sTunicColors[PLAYER_TUNIC_KOKIRI].g), - CVar_GetS32("gTunic_Kokiri_Blue", sTunicColors[PLAYER_TUNIC_KOKIRI].b) }; - color = &sTemp; + color->r = CVar_GetS32("gTunic_Kokiri_Red", sTunicColors[PLAYER_TUNIC_KOKIRI].r); + color->g = CVar_GetS32("gTunic_Kokiri_Green", sTunicColors[PLAYER_TUNIC_KOKIRI].g); + color->b = CVar_GetS32("gTunic_Kokiri_Blue", sTunicColors[PLAYER_TUNIC_KOKIRI].b); } else if (tunic == PLAYER_TUNIC_GORON) { - Color_RGB8 sTemp = { CVar_GetS32("gTunic_Goron_Red", sTunicColors[PLAYER_TUNIC_GORON].r), - CVar_GetS32("gTunic_Goron_Green", sTunicColors[PLAYER_TUNIC_GORON].g), - CVar_GetS32("gTunic_Goron_Blue", sTunicColors[PLAYER_TUNIC_GORON].b) }; - color = &sTemp; + color->r = CVar_GetS32("gTunic_Goron_Red", sTunicColors[PLAYER_TUNIC_GORON].r); + color->g = CVar_GetS32("gTunic_Goron_Green", sTunicColors[PLAYER_TUNIC_GORON].g); + color->b = CVar_GetS32("gTunic_Goron_Blue", sTunicColors[PLAYER_TUNIC_GORON].b); } else if (tunic == PLAYER_TUNIC_ZORA) { - Color_RGB8 sTemp = { CVar_GetS32("gTunic_Zora_Red", sTunicColors[PLAYER_TUNIC_ZORA].r), - CVar_GetS32("gTunic_Zora_Green", sTunicColors[PLAYER_TUNIC_ZORA].g), - CVar_GetS32("gTunic_Zora_Blue", sTunicColors[PLAYER_TUNIC_ZORA].b) }; - color = &sTemp; + color->r = CVar_GetS32("gTunic_Zora_Red", sTunicColors[PLAYER_TUNIC_ZORA].r); + color->g = CVar_GetS32("gTunic_Zora_Green", sTunicColors[PLAYER_TUNIC_ZORA].g); + color->b = CVar_GetS32("gTunic_Zora_Blue", sTunicColors[PLAYER_TUNIC_ZORA].b); } else { - Color_RGB8 sTemp = { CVar_GetS32("gTunic_Kokiri_Red", sTunicColors[PLAYER_TUNIC_KOKIRI].r), - CVar_GetS32("gTunic_Kokiri_Green", sTunicColors[PLAYER_TUNIC_KOKIRI].g), - CVar_GetS32("gTunic_Kokiri_Blue", sTunicColors[PLAYER_TUNIC_KOKIRI].b) }; - color = &sTemp; + color->r = CVar_GetS32("gTunic_Kokiri_Red", sTunicColors[PLAYER_TUNIC_KOKIRI].r); + color->g = CVar_GetS32("gTunic_Kokiri_Green", sTunicColors[PLAYER_TUNIC_KOKIRI].g); + color->b = CVar_GetS32("gTunic_Kokiri_Blue", sTunicColors[PLAYER_TUNIC_KOKIRI].b); } gDPSetEnvColor(POLY_OPA_DISP++, color->r, color->g, color->b, 0); From f8b47b36bf012341793453f02ae16e2cbd37be6c Mon Sep 17 00:00:00 2001 From: Baoulettes Date: Wed, 11 May 2022 21:11:36 +0200 Subject: [PATCH 124/146] Added GER/FRA textures variant + offset (#286) --- .../misc/ovl_kaleido_scope/z_kaleido_map_PAL.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c index bd5277286..f0b59fa4b 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c @@ -17,6 +17,14 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC gPauseDekuTitleENGTex, gPauseDodongoTitleENGTex, gPauseJabuTitleENGTex, gPauseForestTitleENGTex, gPauseFireTitleENGTex, gPauseWaterTitleENGTex, gPauseSpiritTitleENGTex, gPauseShadowTitleENGTex, gPauseBotWTitleENGTex, gPauseIceCavernTitleENGTex, + + gPauseDekuTitleGERTex, gPauseDodongoTitleGERTex, gPauseJabuTitleGERTex, gPauseForestTitleGERTex, + gPauseFireTitleGERTex, gPauseWaterTitleGERTex, gPauseSpiritTitleGERTex, gPauseShadowTitleGERTex, + gPauseBotWTitleGERTex, gPauseIceCavernTitleGERTex, + + gPauseDekuTitleFRATex, gPauseDodongoTitleFRATex, gPauseJabuTitleFRATex, gPauseForestTitleFRATex, + gPauseFireTitleFRATex, gPauseWaterTitleFRATex, gPauseSpiritTitleFRATex, gPauseShadowTitleFRATex, + gPauseBotWTitleFRATex, gPauseIceCavernTitleFRATex, }; static void* floorIconTexs[] = { gDungeonMapBlankFloorButtonTex, gDungeonMap8FButtonTex, gDungeonMap7FButtonTex, gDungeonMap6FButtonTex, @@ -216,7 +224,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC gSPVertex(POLY_KAL_DISP++, &pauseCtx->mapPageVtx[68], 16, 0); - gDPLoadTextureBlock(POLY_KAL_DISP++, dungeonTitleTexs[gSaveContext.mapIndex], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 16, 0, + gDPLoadTextureBlock(POLY_KAL_DISP++, dungeonTitleTexs[gSaveContext.mapIndex+(10*gSaveContext.language)], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 16, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); From a12e8b68aeba22184d2f4991ebd41c15bdc98f8d Mon Sep 17 00:00:00 2001 From: Baoulettes Date: Wed, 11 May 2022 21:12:04 +0200 Subject: [PATCH 125/146] Fix dungeons chests map Kaleido (#285) * fix chest position * Add original game chests loc * Remove Jabu jabu 1F left over --- .../misc/ovl_kaleido_scope/z_lmap_mark_data.c | 516 ++++++++++++++++++ 1 file changed, 516 insertions(+) diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_lmap_mark_data.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_lmap_mark_data.c index df96fc876..64275108b 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_lmap_mark_data.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_lmap_mark_data.c @@ -15,6 +15,522 @@ static const Vtx sMarkChestVtx[] = { }; PauseMapMarksData gPauseMapMarkDataTable[] = { + // Deku Tree map 3F + { + { PAUSE_MAP_MARK_CHEST, + 23, //unk + sMarkChestVtx, + 4, //unk + 2, //Number of icons to show. + { //ID, X, Y + { 2, 40.0f, -33.0f }, + { 6, 49.0f, -42.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Deku Tree map 2F + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 2, + { + { 1, 48.0f, -63.0f }, + { 5, 52.0f, -68.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Deku Tree map 1F + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 1, + { + { 3, 84.0f, -39.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Deku Tree map B1 + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 1, + { + { 4, 77.0f, -26.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Deku Tree map B2 + { + { PAUSE_MAP_MARK_BOSS, + 23, + sMarkBossVtx, + 4, + 1, + { + { -1, 55.0f, 0.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Dodongo's Cavern map 2F + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 3, + { + { 10, 25.0f, -41.0f }, + { 4, 53.0f, -47.0f }, + { 6, 58.0f, -59.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Dodongo's Cavern map 1F + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 2, + { + { 5, 13.0f, -60.0f }, + { 8, 20.0f, -49.0f }, + } }, + { PAUSE_MAP_MARK_BOSS, + 23, + sMarkBossVtx, + 4, + 1, + { + { -1, 23.0f, -25.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Jabu-Jabu's Belly map 1F + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 3, + { + { 1, 67.0f, -13.0f }, + { 2, 28.0f, -13.0f }, + { 4, 38.0f, 0.0f }, + } }, + { PAUSE_MAP_MARK_BOSS, + 23, + sMarkBossVtx, + 4, + 1, + { + { -1, 65.0f, -37.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Jabu-Jabu's Belly map B1 + { + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Forest Temple map 2F + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 4, + { + { 0, 49.0f, -3.0f }, + { 2, 12.0f, -26.0f }, + { 5, 74.0f, -13.0f }, + { 7, 82.0f, -22.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Forest Temple map 1F + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 4, + { + { 0, 49.0f, -3.0f }, + { 2, 12.0f, -26.0f }, + { 5, 74.0f, -13.0f }, + { 7, 82.0f, -22.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Forest Temple map B1 + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 1, + { + { 9, 31.0f, -29.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Forest Temple map B2 + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 1, + { + { 11, 40.0f, -41.0f }, + } }, + { PAUSE_MAP_MARK_BOSS, + 23, + sMarkBossVtx, + 4, + 1, + { + { -1, 50.0f, -11.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Fire Temple map 5F + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 2, + { + { 5, 22.0f, -41.0f }, + { 13, 74.0f, -29.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Fire Temple map 4F + { + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Fire Temple map 3F + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 3, + { + { 3, 76.0f, -48.0f }, + { 6, 72.0f, -50.0f }, + { 7, 44.0f, -17.0f }, + { 8, 63.0f, -12.0f }, + { 9, 30.0f, -34.0f }, + { 10, 61.0f, -31.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Fire Temple map 2F + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 1, + { + { 11, 78.0f, -34.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Fire Temple map 1F + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 5, + { + { 0, 48.0f, -17.0f }, + { 1, 35.0f, -45.0f }, + { 2, 67.0f, -58.0f }, + { 4, 74.0f, -15.0f }, + { 12, 47.0f, -27.0f }, + } }, + { PAUSE_MAP_MARK_BOSS, + 23, + sMarkBossVtx, + 4, + 1, + { + { -1, 26.0f, -34.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Water Temple map 3F + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 3, + { + { 2, 88.0f, -60.0f }, + { 7, 23.0f, -2.0f }, + { 9, 84.0f, -45.0f }, + } }, + { PAUSE_MAP_MARK_BOSS, + 23, + sMarkBossVtx, + 4, + 1, + { + { -1, 62.0f, -23.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Water Temple map 2F + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 2, + { + { 0, 86.0f, -60.0f }, + { 8, 76.0f, -72.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Water Temple map 1F + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 4, + { + { 1, 88.0f, -60.0f }, + { 3, 42.0f, -21.0f }, + { 5, 47.0f, -15.0f }, + { 10, 33.0f, -31.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Water Temple map B1 + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 1, + { + { 6, 77.0f, -66.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Spirit Temple map 4F + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 2, + { + { 10, 59.0f, -9.0f }, + { 18, 32.0f, -20.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Spirit Temple map 3F + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 5, + { + { 1, 20.0f, -43.0f }, + { 5, 83.0f, -26.0f }, + { 15, 57.0f, -14.0f }, + { 20, 81.0f, -55.0f }, + { 21, 87.0f, -55.0f }, + } }, + { PAUSE_MAP_MARK_BOSS, + 23, + sMarkBossVtx, + 4, + 1, + { + { -1, 47.0f, 0.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Spirit Temple map 2F + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 6, + { + { 2, 41.0f, -16.0f }, + { 3, 47.0f, -17.0f }, + { 6, 27.0f, -16.0f }, + { 12, 29.0f, -20.0f }, + { 13, 70.0f, -22.0f }, + { 14, 70.0f, -25.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Spirit Temple map 1F + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 4, + { + { 0, 38.0f, -17.0f }, + { 4, 55.0f, -14.0f }, + { 8, 15.0f, -14.0f }, + { 7, 78.0f, -3.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Shadow Temple map B1 + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 2, + { + { 1, 41.0f, -17.0f }, + { 7, 27.0f, -24.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Shadow Temple map B2 + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 2, + { + { 2, 81.0f, -20.0f }, + { 3, 74.0f, -37.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Shadow Temple map B3 + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 2, + { + { 12, 96.0f, -51.0f }, + { 22, 96.0f, -55.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Shadow Temple map B4 + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 10, + { + { 4, 43.0f, -66.0f }, + { 5, 37.0f, -66.0f }, + { 6, 33.0f, -72.0f }, + { 8, 85.0f, -18.0f }, + { 9, 61.0f, -42.0f }, + { 10, 15.0f, -4.0f }, + { 11, 25.0f, -4.0f }, + { 13, 19.0f, -29.0f }, + { 21, 92.0f, -29.0f }, + { 20, 87.0f, -20.0f }, + } }, + { PAUSE_MAP_MARK_BOSS, + 23, + sMarkBossVtx, + 4, + 1, + { + { -1, 31.0f, -45.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Bottom of the Well map B1 + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 9, + { + { 1, 51.0f, -24.0f }, + { 3, 84.0f, -38.0f }, + { 4, 31.0f, -2.0f }, + { 5, 67.0f, -27.0f }, + { 8, 46.0f, -27.0f }, + { 10, 82.0f, -12.0f }, + { 12, 80.0f, -16.0f }, + { 14, 62.0f, -24.0f }, + { 20, 89.0f, -38.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Bottom of the Well map B2 + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 3, + { + { 2, 54.0f, -27.0f }, + { 9, 28.0f, -17.0f }, + { 16, 56.0f, -38.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Bottom of the Well map B3 + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 1, + { + { 7, 71.0f, -33.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, + // Ice Cavern map 1F + { + { PAUSE_MAP_MARK_CHEST, + 23, + sMarkChestVtx, + 4, + 3, + { + { 0, 66.0f, -2.0f }, + { 1, 77.0f, -46.0f }, + { 2, 27.0f, -45.0f }, + } }, + { PAUSE_MAP_MARK_NONE, 0, NULL, 0, 0, { 0 } }, + }, +}; +PauseMapMarksData gPauseMapMarkDataTableMasterQuest[] = { // Deku Tree map 0 { { PAUSE_MAP_MARK_CHEST, From a5651742baa7b4b5c5ba18d81ede5af6bd9542ce Mon Sep 17 00:00:00 2001 From: Sirius902 <10891979+Sirius902@users.noreply.github.com> Date: Wed, 11 May 2022 12:12:52 -0700 Subject: [PATCH 126/146] Improve CVars a bit (#283) * Improve CVars a bit * Just use boolean operators on ptr --- libultraship/libultraship/Cvar.cpp | 53 ++++++++++-------------- libultraship/libultraship/Cvar.h | 15 +++---- libultraship/libultraship/SohConsole.cpp | 2 +- soh/soh/Enhancements/debugconsole.cpp | 4 +- 4 files changed, 32 insertions(+), 42 deletions(-) diff --git a/libultraship/libultraship/Cvar.cpp b/libultraship/libultraship/Cvar.cpp index b895ac747..891ee73af 100644 --- a/libultraship/libultraship/Cvar.cpp +++ b/libultraship/libultraship/Cvar.cpp @@ -1,23 +1,22 @@ #include "Cvar.h" #include #include +#include +#include +#include #include -std::map cvars; - -CVar* CVar_GetVar(const char* name) { - std::string key(name); - return cvars.contains(key) ? cvars[key] : nullptr; -} +std::map, std::less<>> cvars; extern "C" CVar* CVar_Get(const char* name) { - return CVar_GetVar(name); + auto it = cvars.find(name); + return (it != cvars.end()) ? it->second.get() : nullptr; } extern "C" s32 CVar_GetS32(const char* name, s32 defaultValue) { CVar* cvar = CVar_Get(name); - if (cvar != nullptr) { + if (cvar) { if (cvar->type == CVAR_TYPE_S32) return cvar->value.valueS32; } @@ -28,7 +27,7 @@ extern "C" s32 CVar_GetS32(const char* name, s32 defaultValue) { extern "C" float CVar_GetFloat(const char* name, float defaultValue) { CVar* cvar = CVar_Get(name); - if (cvar != nullptr) { + if (cvar) { if (cvar->type == CVAR_TYPE_FLOAT) return cvar->value.valueFloat; } @@ -36,10 +35,10 @@ extern "C" float CVar_GetFloat(const char* name, float defaultValue) { return defaultValue; } -extern "C" char* CVar_GetString(const char* name, char* defaultValue) { +extern "C" const char* CVar_GetString(const char* name, const char* defaultValue) { CVar* cvar = CVar_Get(name); - if (cvar != nullptr) { + if (cvar) { if (cvar->type == CVAR_TYPE_STRING) return cvar->value.valueStr; } @@ -48,53 +47,43 @@ extern "C" char* CVar_GetString(const char* name, char* defaultValue) { } extern "C" void CVar_SetS32(const char* name, s32 value) { - CVar* cvar = CVar_Get(name); + auto& cvar = cvars[name]; if (!cvar) { - cvar = new CVar; - cvars[std::string(name)] = cvar; + cvar = std::make_unique(); } cvar->type = CVAR_TYPE_S32; cvar->value.valueS32 = value; } void CVar_SetFloat(const char* name, float value) { - CVar* cvar = CVar_Get(name); + auto& cvar = cvars[name]; if (!cvar) { - cvar = new CVar; - cvars[std::string(name)] = cvar; + cvar = std::make_unique(); } cvar->type = CVAR_TYPE_FLOAT; cvar->value.valueFloat = value; } -void CVar_SetString(const char* name, char* value) { - CVar* cvar = CVar_Get(name); +void CVar_SetString(const char* name, const char* value) { + auto& cvar = cvars[name]; if (!cvar) { - cvar = new CVar; - cvars[std::string(name)] = cvar; + cvar = std::make_unique(); } cvar->type = CVAR_TYPE_STRING; cvar->value.valueStr = value; } - extern "C" void CVar_RegisterS32(const char* name, s32 defaultValue) { - CVar* cvar = CVar_Get(name); - - if (cvar == nullptr) + if (!CVar_Get(name)) CVar_SetS32(name, defaultValue); } extern "C" void CVar_RegisterFloat(const char* name, float defaultValue) { - CVar* cvar = CVar_Get(name); - - if (cvar == nullptr) + if (!CVar_Get(name)) CVar_SetFloat(name, defaultValue); } -extern "C" void CVar_RegisterString(const char* name, char* defaultValue) { - CVar* cvar = CVar_Get(name); - - if (cvar == nullptr) +extern "C" void CVar_RegisterString(const char* name, const char* defaultValue) { + if (!CVar_Get(name)) CVar_SetString(name, defaultValue); } diff --git a/libultraship/libultraship/Cvar.h b/libultraship/libultraship/Cvar.h index a85bb8fd3..4d75bb440 100644 --- a/libultraship/libultraship/Cvar.h +++ b/libultraship/libultraship/Cvar.h @@ -6,13 +6,13 @@ typedef enum CVarType { CVAR_TYPE_S32, CVAR_TYPE_FLOAT, CVAR_TYPE_STRING } CVarType; typedef struct CVar { - char* name; + const char* name; CVarType type; union { s32 valueS32; float valueFloat; - char* valueStr; + const char* valueStr; } value; } CVar; @@ -22,16 +22,15 @@ extern "C" #endif //#include - CVar* CVar_Get(const char* name); s32 CVar_GetS32(const char* name, s32 defaultValue); float CVar_GetFloat(const char* name, float defaultValue); -char* CVar_GetString(const char* name, char* defaultValue); +const char* CVar_GetString(const char* name, const char* defaultValue); void CVar_SetS32(const char* name, s32 value); void CVar_RegisterS32(const char* name, s32 defaultValue); void CVar_RegisterFloat(const char* name, float defaultValue); -void CVar_RegisterString(const char* name, char* defaultValue); +void CVar_RegisterString(const char* name, const char* defaultValue); #ifdef __cplusplus }; @@ -40,10 +39,12 @@ void CVar_RegisterString(const char* name, char* defaultValue); #ifdef __cplusplus #include #include +#include +#include -extern std::map cvars; +extern std::map, std::less<>> cvars; CVar* CVar_GetVar(const char* name); void CVar_SetFloat(const char* name, float value); -void CVar_SetString(const char* name, char* value); +void CVar_SetString(const char* name, const char* value); #endif #endif diff --git a/libultraship/libultraship/SohConsole.cpp b/libultraship/libultraship/SohConsole.cpp index 6c7df3847..29e8a5daa 100644 --- a/libultraship/libultraship/SohConsole.cpp +++ b/libultraship/libultraship/SohConsole.cpp @@ -92,7 +92,7 @@ void Console::Update() { } for (auto [key, var] : BindingToggle) { if (ImGui::IsKeyPressed(key)) { - CVar* cvar = CVar_GetVar(var.c_str()); + CVar* cvar = CVar_Get(var.c_str()); Dispatch("set " + var + " " + std::to_string(cvar == nullptr ? 0 : !static_cast(cvar->value.valueS32))); } } diff --git a/soh/soh/Enhancements/debugconsole.cpp b/soh/soh/Enhancements/debugconsole.cpp index 60375d440..189230798 100644 --- a/soh/soh/Enhancements/debugconsole.cpp +++ b/soh/soh/Enhancements/debugconsole.cpp @@ -336,7 +336,7 @@ static bool SetCVarHandler(const std::vector& args) { int vType = CheckVarType(args[2]); if (vType == VARTYPE_STRING) - CVar_SetString(args[1].c_str(), (char*)args[2].c_str()); + CVar_SetString(args[1].c_str(), args[2].c_str()); else if (vType == VARTYPE_FLOAT) CVar_SetFloat(args[1].c_str(), std::stof(args[2])); else @@ -353,7 +353,7 @@ static bool GetCVarHandler(const std::vector& args) { if (args.size() < 2) return CMD_FAILED; - CVar* cvar = CVar_GetVar(args[1].c_str()); + CVar* cvar = CVar_Get(args[1].c_str()); if (cvar != nullptr) { From bf2825e9a54313fcf8048aff9a64a72a36b44341 Mon Sep 17 00:00:00 2001 From: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> Date: Wed, 11 May 2022 21:14:40 +0200 Subject: [PATCH 127/146] Fix missing gMtxClear address for pal gc roms (#282) --- libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp index 6d3a5a5bc..da39c0a4d 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp @@ -31,6 +31,8 @@ #include "../StrHash64.h" #include "../../SohImGuiImpl.h" #include "../../Environment.h" +#include "../../GameVersions.h" +#include "../../ResourceMgr.h" // OTRTODO: fix header files for these extern "C" { @@ -2151,8 +2153,16 @@ static void gfx_run_dl(Gfx* cmd) { uintptr_t mtxAddr = cmd->words.w1; // OTRTODO: Temp way of dealing with gMtxClear. Need something more elegant in the future... - if (mtxAddr == SEG_ADDR(0, 0x12DB20) || mtxAddr == SEG_ADDR(0, 0x12DB40)) - mtxAddr = clearMtx; + uint32_t gameVersion = Ship::GlobalCtx2::GetInstance()->GetResourceManager()->GetGameVersion(); + if (gameVersion == OOT_PAL_GC) { + if (mtxAddr == SEG_ADDR(0, 0x0FBC20)) { + mtxAddr = clearMtx; + } + } else { + if (mtxAddr == SEG_ADDR(0, 0x12DB20) || mtxAddr == SEG_ADDR(0, 0x12DB40)) { + mtxAddr = clearMtx; + } + } #ifdef F3DEX_GBI_2 gfx_sp_matrix(C0(0, 8) ^ G_MTX_PUSH, (const int32_t *) seg_addr(mtxAddr)); From c7e552fc5f7589386681d2df77a8c13190f760ca Mon Sep 17 00:00:00 2001 From: Sirius902 <3645979-Sirius902@users.noreply.gitlab.com> Date: Wed, 11 May 2022 12:44:12 -0700 Subject: [PATCH 128/146] Replace remaining occurances of CVar_GetVar with CVar_Get --- libultraship/libultraship/Cvar.h | 1 - libultraship/libultraship/GameOverlay.cpp | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libultraship/libultraship/Cvar.h b/libultraship/libultraship/Cvar.h index 4d75bb440..e16f4469f 100644 --- a/libultraship/libultraship/Cvar.h +++ b/libultraship/libultraship/Cvar.h @@ -43,7 +43,6 @@ void CVar_RegisterString(const char* name, const char* defaultValue); #include extern std::map, std::less<>> cvars; -CVar* CVar_GetVar(const char* name); void CVar_SetFloat(const char* name, float value); void CVar_SetString(const char* name, const char* value); #endif diff --git a/libultraship/libultraship/GameOverlay.cpp b/libultraship/libultraship/GameOverlay.cpp index f54bc7e1a..bf9ca9a71 100644 --- a/libultraship/libultraship/GameOverlay.cpp +++ b/libultraship/libultraship/GameOverlay.cpp @@ -128,7 +128,7 @@ void Ship::GameOverlay::Draw() { if (overlay.type == OverlayType::TEXT) { const char* text = ImStrdup(key.c_str()); - const CVar* var = CVar_GetVar(text); + const CVar* var = CVar_Get(text); switch (var->type) { case CVAR_TYPE_FLOAT: @@ -156,7 +156,7 @@ bool Ship::OverlayCommand(const std::vector& args) { return CMD_FAILED; } - if (CVar_GetVar(args[2].c_str()) != nullptr) { + if (CVar_Get(args[2].c_str()) != nullptr) { const char* key = args[2].c_str(); GameOverlay* overlay = SohImGui::overlay; if (args[1] == "add") { From 8ba5d827c5e03762829f481aef424609f2949af3 Mon Sep 17 00:00:00 2001 From: sholdee <102821812+sholdee@users.noreply.github.com> Date: Wed, 11 May 2022 14:38:05 -0500 Subject: [PATCH 129/146] Increase build pipeline timeout 30min could possibly be too low in some instances --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2171cbdc6..71513289b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,7 +3,7 @@ pipeline { options { timestamps() - timeout(time: 30, unit: 'MINUTES') + timeout(time: 60, unit: 'MINUTES') skipDefaultCheckout(true) } From 3013c18e13c8cdd26dcc3ab46bb53f5936e05d14 Mon Sep 17 00:00:00 2001 From: sholdee <102821812+sholdee@users.noreply.github.com> Date: Wed, 11 May 2022 14:58:02 -0500 Subject: [PATCH 130/146] Get rid of timeout Just causing problems --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 71513289b..7f1132bae 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,7 +3,6 @@ pipeline { options { timestamps() - timeout(time: 60, unit: 'MINUTES') skipDefaultCheckout(true) } From 1719986a35b5d0c727eab479c012691e85aa7120 Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Wed, 11 May 2022 18:07:35 -0500 Subject: [PATCH 131/146] Added notification system --- libultraship/libultraship/GameOverlay.cpp | 59 +++++++++++++++------- libultraship/libultraship/GameOverlay.h | 10 ++-- libultraship/libultraship/SohImGuiImpl.cpp | 4 ++ 3 files changed, 52 insertions(+), 21 deletions(-) diff --git a/libultraship/libultraship/GameOverlay.cpp b/libultraship/libultraship/GameOverlay.cpp index bf9ca9a71..02e089366 100644 --- a/libultraship/libultraship/GameOverlay.cpp +++ b/libultraship/libultraship/GameOverlay.cpp @@ -21,7 +21,7 @@ void Ship::GameOverlay::LoadFont(const std::string& name, const std::string& pat } } -void Ship::GameOverlay::TextDraw(float x, float y, bool shadow, const char* fmt, ...) { +void Ship::GameOverlay::TextDraw(float x, float y, bool shadow, ImVec4 color, const char* fmt, ...) { char buf[1024]; va_list args; va_start(args, fmt); @@ -29,18 +29,32 @@ void Ship::GameOverlay::TextDraw(float x, float y, bool shadow, const char* fmt, buf[IM_ARRAYSIZE(buf) - 1] = 0; va_end(args); + ImGui::PushStyleColor(ImGuiCol_Text, color); ImGui::PushFont(Fonts[this->CurrentFont]); if (shadow) { ImGui::SetCursorPos(ImVec2(x + 1, y + 1)); - ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(.0f, .0f, .0f, 255)); + ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(.0f, .0f, .0f, color.w)); ImGui::Text(buf, args); } ImGui::PopStyleColor(); ImGui::SetCursorPos(ImVec2(x, y)); ImGui::Text(buf, args); ImGui::PopFont(); + ImGui::PopStyleColor(); } +void Ship::GameOverlay::TextDrawNotification(float duration, bool shadow, const char* fmt, ...) { + char buf[1024]; + va_list args; + va_start(args, fmt); + vsnprintf(buf, IM_ARRAYSIZE(buf), fmt, args); + buf[IM_ARRAYSIZE(buf) - 1] = 0; + va_end(args); + + this->RegisteredOverlays[fmt] = new Overlay({ OverlayType::NOTIFICATION, ImStrdup(buf), duration, duration }); +} + + float Ship::GameOverlay::GetScreenWidth() { const ImGuiViewport* viewport = ImGui::GetMainViewport(); return viewport->Size.x; @@ -124,27 +138,42 @@ void Ship::GameOverlay::Draw() { ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoInputs); float textY = 50; + float notY = 0; + for (auto &[key, overlay] : this->RegisteredOverlays) { - if (overlay.type == OverlayType::TEXT) { - const char* text = ImStrdup(key.c_str()); + if (overlay->type == OverlayType::TEXT) { + const char* text = ImStrdup(overlay->value); const CVar* var = CVar_Get(text); + ImVec4 color = ImVec4(1.0f, 1.0f, 1.0f, 1.0f); switch (var->type) { case CVAR_TYPE_FLOAT: - this->TextDraw(30, textY, true, "%s %.2f", text, var->value.valueFloat); + this->TextDraw(30, textY, true, color, "%s %.2f", text, var->value.valueFloat); break; case CVAR_TYPE_S32: - this->TextDraw(30, textY, true, "%s %d", text, var->value.valueS32); + this->TextDraw(30, textY, true, color, "%s %d", text, var->value.valueS32); break; case CVAR_TYPE_STRING: - this->TextDraw(30, textY, true, "%s %s", text, var->value.valueStr); + this->TextDraw(30, textY, true, color, "%s %s", text, var->value.valueStr); break; } free((void*) text); textY += 30; } + + if (overlay->type == OverlayType::NOTIFICATION && overlay->duration > 0) { + const char* text = overlay->value; + const float duration = overlay->duration / overlay->fadeTime; + + const ImVec4 color = ImVec4(1.0f, 1.0f, 1.0f, duration); + const float textWidth = this->GetStringWidth(overlay->value); + + this->TextDraw(GetScreenWidth() - textWidth - 40, GetScreenHeight() - 40 - notY, true, color, text); + notY += 30; + overlay->duration -= .05f; + } } ImGui::End(); @@ -160,19 +189,15 @@ bool Ship::OverlayCommand(const std::vector& args) { const char* key = args[2].c_str(); GameOverlay* overlay = SohImGui::overlay; if (args[1] == "add") { - if (!overlay->RegisteredOverlays.contains(args[2])) { - overlay->RegisteredOverlays[args[2]] = { - OverlayType::TEXT, - key - }; + if (!overlay->RegisteredOverlays.contains(key)) { + overlay->RegisteredOverlays[key] = new Overlay({ OverlayType::TEXT, ImStrdup(key), -1.0f }); INFO("Added overlay: %s ", key); } else { ERROR("Overlay already exists: %s", key); } - } - else if (args[1] == "remove") { - if (overlay->RegisteredOverlays.contains(args[2])) { - overlay->RegisteredOverlays.erase(args[2]); + } else if (args[1] == "remove") { + if (overlay->RegisteredOverlays.contains(key)) { + overlay->RegisteredOverlays.erase(key); INFO("Removed overlay: %s ", key); } else { ERROR("Overlay not found: %s ", key); @@ -183,4 +208,4 @@ bool Ship::OverlayCommand(const std::vector& args) { } return CMD_SUCCESS; -} +} \ No newline at end of file diff --git a/libultraship/libultraship/GameOverlay.h b/libultraship/libultraship/GameOverlay.h index c53503a52..e3161bca3 100644 --- a/libultraship/libultraship/GameOverlay.h +++ b/libultraship/libultraship/GameOverlay.h @@ -7,18 +7,20 @@ #include enum class OverlayType { - TEXT, IMAGE + TEXT, IMAGE, NOTIFICATION }; struct Overlay { OverlayType type; const char* value; + float fadeTime; + float duration; }; namespace Ship { class GameOverlay { public: - std::unordered_map RegisteredOverlays; + std::unordered_map RegisteredOverlays; std::unordered_map Fonts; std::string CurrentFont = "Default"; void Init(); @@ -28,11 +30,11 @@ namespace Ship { static float GetScreenHeight(); static float GetStringWidth(const char* text); static ImVec2 CalculateTextSize(const char* text, const char* text_end = NULL, bool hide_text_after_double_hash = false, float wrap_width = -1.0f); + void TextDraw(float x, float y, bool shadow, ImVec4 color, const char* text, ...); + void TextDrawNotification(float duration, bool shadow, const char* fmt, ...); private: - void TextDraw(float x, float y, bool shadow, const char* text, ...); void LoadFont(const std::string& name, const std::string& path, float fontSize); }; static bool OverlayCommand(const std::vector& args); } - diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 9adbdd820..40e1b56c4 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -808,6 +808,10 @@ namespace SohImGui { size = ImVec2(sw, size.y); } + if (ImGui::Button("Test Notification")) { + overlay->TextDrawNotification(3.0f, true, ("Test Notification: " + std::to_string(rand())).c_str()); + } + overlay->Draw(); } From 4aeed97e3ad94cceb039f05dcc67c986df2c7265 Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Wed, 11 May 2022 18:08:28 -0500 Subject: [PATCH 132/146] Removed debug button --- libultraship/libultraship/SohImGuiImpl.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 40e1b56c4..9adbdd820 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -808,10 +808,6 @@ namespace SohImGui { size = ImVec2(sw, size.y); } - if (ImGui::Button("Test Notification")) { - overlay->TextDrawNotification(3.0f, true, ("Test Notification: " + std::to_string(rand())).c_str()); - } - overlay->Draw(); } From 0adad641a64b226f10cf2851772c519bf3037931 Mon Sep 17 00:00:00 2001 From: Random <28494085+Random06457@users.noreply.github.com> Date: Thu, 12 May 2022 12:21:25 +0900 Subject: [PATCH 133/146] fix thisx hack (#299) --- soh/include/functions.h | 1 + 1 file changed, 1 insertion(+) diff --git a/soh/include/functions.h b/soh/include/functions.h index 4cbc285a3..360afc687 100644 --- a/soh/include/functions.h +++ b/soh/include/functions.h @@ -2404,6 +2404,7 @@ void Heaps_Alloc(void); void Heaps_Free(void); #ifdef __cplusplus +#undef this }; #endif From e2c801a2acc9a4915ad361fc3808c793bb5019ed Mon Sep 17 00:00:00 2001 From: PurpleHato <47987542+PurpleHato@users.noreply.github.com> Date: Thu, 12 May 2022 15:05:54 +0200 Subject: [PATCH 134/146] Fixed ImGui developer menu (#298) Fixes the Auto Windows Opening that could cancel the menu by itself --- libultraship/libultraship/SohConsole.cpp | 2 +- libultraship/libultraship/SohImGuiImpl.cpp | 15 +++++++++++++-- soh/soh/Enhancements/debugger/colViewer.cpp | 2 +- soh/soh/Enhancements/debugger/debugSaveEditor.cpp | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/libultraship/libultraship/SohConsole.cpp b/libultraship/libultraship/SohConsole.cpp index 29e8a5daa..6f04bc917 100644 --- a/libultraship/libultraship/SohConsole.cpp +++ b/libultraship/libultraship/SohConsole.cpp @@ -106,7 +106,7 @@ void Console::Draw() { if (!this->opened) return; ImGui::SetNextWindowSize(ImVec2(520, 600), ImGuiCond_FirstUseEver); - ImGui::Begin("Console", nullptr); + ImGui::Begin("Console", nullptr, ImGuiWindowFlags_NoFocusOnAppearing); const ImVec2 pos = ImGui::GetWindowPos(); const ImVec2 size = ImGui::GetWindowSize(); diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 9adbdd820..0fbba2b75 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -417,6 +417,15 @@ namespace SohImGui { } } + void EnhancementButton(std::string text, std::string cvarName) + { + bool val = (bool)CVar_GetS32(cvarName.c_str(), 0); + if (ImGui::Button(text.c_str())) { + CVar_SetS32(cvarName.c_str(), !val); + needs_save = true; + } + } + void EnhancementSliderInt(std::string text, std::string id, std::string cvarName, int min, int max, std::string format) { int val = CVar_GetS32(cvarName.c_str(), 0); @@ -725,10 +734,11 @@ namespace SohImGui { if (ImGui::BeginMenu("Developer Tools")) { + EnhancementCheckbox("OoT Debug Mode", "gDebugEnabled"); + ImGui::Separator(); EnhancementCheckbox("Stats", "gStatsEnabled"); EnhancementCheckbox("Console", "gConsoleEnabled"); console->opened = CVar_GetS32("gConsoleEnabled", 0); - EnhancementCheckbox("OoT Debug Mode", "gDebugEnabled"); ImGui::EndMenu(); } @@ -745,6 +755,7 @@ namespace SohImGui { } ImGui::EndMenu(); } + } ImGui::EndMenuBar(); @@ -755,7 +766,7 @@ namespace SohImGui { if (CVar_GetS32("gStatsEnabled", 0)) { const float framerate = ImGui::GetIO().Framerate; ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0, 0, 0, 0)); - ImGui::Begin("Debug Stats", nullptr, ImGuiWindowFlags_None); + ImGui::Begin("Debug Stats", nullptr, ImGuiWindowFlags_NoFocusOnAppearing); #ifdef _WIN32 ImGui::Text("Platform: Windows"); diff --git a/soh/soh/Enhancements/debugger/colViewer.cpp b/soh/soh/Enhancements/debugger/colViewer.cpp index bbf791f67..ed0fe0b56 100644 --- a/soh/soh/Enhancements/debugger/colViewer.cpp +++ b/soh/soh/Enhancements/debugger/colViewer.cpp @@ -97,7 +97,7 @@ void DrawColViewerWindow(bool& open) { } ImGui::SetNextWindowSize(ImVec2(520, 600), ImGuiCond_FirstUseEver); - if (!ImGui::Begin("Collision Viewer", &open)) { + if (!ImGui::Begin("Collision Viewer", &open, ImGuiWindowFlags_NoFocusOnAppearing)) { ImGui::End(); return; } diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp index 800f8d5b2..ca1b67798 100644 --- a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp +++ b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp @@ -1540,7 +1540,7 @@ void DrawSaveEditor(bool& open) { } ImGui::SetNextWindowSize(ImVec2(520, 600), ImGuiCond_FirstUseEver); - if (!ImGui::Begin("Save Editor", &open)) { + if (!ImGui::Begin("Save Editor", &open, ImGuiWindowFlags_NoFocusOnAppearing)) { ImGui::End(); return; } From 9eb5ff6136f6f0481c2c8fb84eeb03908a0332cc Mon Sep 17 00:00:00 2001 From: Rozelette Date: Thu, 12 May 2022 08:06:39 -0500 Subject: [PATCH 135/146] Fix GetTextureByID not returning anything on non-DX11 (#297) --- libultraship/libultraship/SohImGuiImpl.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 0fbba2b75..e5d51a5a1 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -932,13 +932,12 @@ namespace SohImGui { ImTextureID GetTextureByID(int id) { #ifdef ENABLE_DX11 - if (impl.backend == Backend::DX11) - { - ImTextureID gfx_d3d11_get_texture_by_id(int id); - return gfx_d3d11_get_texture_by_id(id); - } -#else - return reinterpret_cast(id); + if (impl.backend == Backend::DX11) + { + ImTextureID gfx_d3d11_get_texture_by_id(int id); + return gfx_d3d11_get_texture_by_id(id); + } #endif + return reinterpret_cast(id); } } From fdd613f41ee70fe5302c7700fad215ad44181361 Mon Sep 17 00:00:00 2001 From: Marcelo20XX Date: Thu, 12 May 2022 09:08:37 -0400 Subject: [PATCH 136/146] Add QoL feature: Faster Block Pushing (#275) --- libultraship/libultraship/SohImGuiImpl.cpp | 1 + .../overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c | 9 +++++++-- .../overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c | 4 ++-- .../overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c | 6 ++++-- .../actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c | 4 ++-- soh/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c | 4 ++-- .../actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c | 4 ++-- .../overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c | 4 ++-- 8 files changed, 22 insertions(+), 14 deletions(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index e5d51a5a1..166edf50d 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -670,6 +670,7 @@ namespace SohImGui { EnhancementCheckbox("Animated Link in Pause Menu", "gPauseLiveLink"); EnhancementCheckbox("Enable 3D Dropped items", "gNewDrops"); + EnhancementCheckbox("Faster Block Push", "gFasterBlockPush"); EnhancementCheckbox("Dynamic Wallet Icon", "gDynamicWalletIcon"); EnhancementCheckbox("Always show dungeon entrances", "gAlwaysShowDungeonMinimapIcon"); diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c b/soh/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c index 7e3cd9155..46ba447cb 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c @@ -192,7 +192,12 @@ void BgHakaGate_StatueTurn(BgHakaGate* this, GlobalContext* globalCtx) { s16 turnAngle; this->vTurnRateDeg10++; - this->vTurnRateDeg10 = CLAMP_MAX(this->vTurnRateDeg10, 5); + if (CVar_GetS32("gFasterBlockPush", 0) != 0) { + this->vTurnRateDeg10 = 10; + CLAMP_MAX(this->vTurnRateDeg10, 5); + } else { + this->vTurnRateDeg10 = CLAMP_MAX(this->vTurnRateDeg10, 5); + } turnFinished = Math_StepToS(&this->vTurnAngleDeg10, 600, this->vTurnRateDeg10); turnAngle = this->vTurnAngleDeg10 * this->vTurnDirection; this->dyna.actor.shape.rot.y = (this->vRotYDeg10 + turnAngle) * 0.1f * (0x10000 / 360.0f); @@ -212,7 +217,7 @@ void BgHakaGate_StatueTurn(BgHakaGate* this, GlobalContext* globalCtx) { this->vRotYDeg10 = (this->vRotYDeg10 + turnAngle) % 3600; this->vTurnRateDeg10 = 0; this->vTurnAngleDeg10 = 0; - this->vTimer = 5; + this->vTimer = CVar_GetS32("gFasterBlockPush", 0) != 0 ? 2 : 5; this->actionFunc = BgHakaGate_StatueIdle; this->dyna.unk_150 = 0.0f; } diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c b/soh/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c index 4522a9486..4f7ce9a63 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c @@ -137,7 +137,7 @@ void func_8088B268(BgHidanRock* this, GlobalContext* globalCtx) { } } - this->dyna.actor.speedXZ += 0.05f; + this->dyna.actor.speedXZ += CVar_GetS32("gFasterBlockPush", 0) != 0 ? 0.5f : 0.05f; this->dyna.actor.speedXZ = CLAMP_MAX(this->dyna.actor.speedXZ, 2.0f); if (D_8088BFC0 > 0.0f) { @@ -156,7 +156,7 @@ void func_8088B268(BgHidanRock* this, GlobalContext* globalCtx) { this->dyna.actor.home.pos.z = this->dyna.actor.world.pos.z; D_8088BFC0 = 0.0f; this->dyna.actor.speedXZ = 0.0f; - this->timer = 5; + this->timer = CVar_GetS32("gFasterBlockPush", 0) != 0 ? 2 : 5; } func_8002F974(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); diff --git a/soh/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c b/soh/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c index 3f659ad57..064537f2d 100644 --- a/soh/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c +++ b/soh/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c @@ -444,7 +444,7 @@ void func_80896950(BgJyaCobra* this, GlobalContext* globalCtx) { if (this->dyna.unk_150 > 0.001f) { this->unk_168++; - if (this->unk_168 >= 15) { + if (this->unk_168 >= CVar_GetS32("gFasterBlockPush", 0) != 0 ? 5 : 15) { func_808969F8(this, globalCtx); } } else { @@ -484,9 +484,11 @@ void func_808969F8(BgJyaCobra* this, GlobalContext* globalCtx) { void func_80896ABC(BgJyaCobra* this, GlobalContext* globalCtx) { s16 temp_v0; Player* player = GET_PLAYER(globalCtx); + if (CVar_GetS32("gFasterBlockPush", 0) != 0) + this->unk_16E = 150.0f; temp_v0 = (s16)((this->unk_16C * 0x2000) + this->dyna.actor.home.rot.y) - this->dyna.actor.world.rot.y; - if (ABS(temp_v0) < 7424) { + if (ABS(temp_v0) < CVar_GetS32("gFasterBlockPush", 0) != 0 ? 3712 : 7424) { Math_StepToS(&this->unk_16E, 106, 4); } else { Math_StepToS(&this->unk_16E, 21, 10); diff --git a/soh/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c b/soh/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c index 4ad89d7b3..68bf02fb7 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c +++ b/soh/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c @@ -94,7 +94,7 @@ void BgMoriKaitenkabe_Wait(BgMoriKaitenkabe* this, GlobalContext* globalCtx) { if (this->dyna.unk_150 > 0.001f) { this->timer++; - if ((this->timer > 28) && !Player_InCsMode(globalCtx)) { + if ((this->timer > CVar_GetS32("gFasterBlockPush", 0) != 0 ? 14 : 28) && !Player_InCsMode(globalCtx)) { BgMoriKaitenkabe_SetupRotate(this); func_8002DF54(globalCtx, &this->dyna.actor, 8); Math_Vec3f_Copy(&this->lockedPlayerPos, &player->actor.world.pos); @@ -118,7 +118,7 @@ void BgMoriKaitenkabe_Wait(BgMoriKaitenkabe* this, GlobalContext* globalCtx) { void BgMoriKaitenkabe_SetupRotate(BgMoriKaitenkabe* this) { this->actionFunc = BgMoriKaitenkabe_Rotate; - this->rotSpeed = 0.0f; + this->rotSpeed = CVar_GetS32("gFasterBlockPush", 0) != 0 ? 0.5f : 0.0f; this->rotYdeg = 0.0f; } diff --git a/soh/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c b/soh/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c index 1a1cc6c60..efceb7939 100644 --- a/soh/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c +++ b/soh/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c @@ -388,7 +388,7 @@ void BgPoEvent_BlockPush(BgPoEvent* this, GlobalContext* globalCtx) { s32 blockStop; Player* player = GET_PLAYER(globalCtx); - this->dyna.actor.speedXZ += 0.1f; + this->dyna.actor.speedXZ += CVar_GetS32("gFasterBlockPush", 0) != 0 ? 0.5f : 0.1f; this->dyna.actor.speedXZ = CLAMP_MAX(this->dyna.actor.speedXZ, 2.0f); blockStop = Math_StepToF(&blockPushDist, 20.0f, this->dyna.actor.speedXZ); displacement = this->direction * blockPushDist; @@ -404,7 +404,7 @@ void BgPoEvent_BlockPush(BgPoEvent* this, GlobalContext* globalCtx) { this->dyna.actor.home.pos.z = this->dyna.actor.world.pos.z; blockPushDist = 0.0f; this->dyna.actor.speedXZ = 0.0f; - this->direction = 5; + this->direction = CVar_GetS32("gFasterBlockPush", 0) != 0 ? 3 : 5; sBlocksAtRest++; this->actionFunc = BgPoEvent_BlockIdle; if (this->type == 1) { diff --git a/soh/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c b/soh/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c index 240235917..684336e17 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c @@ -260,7 +260,7 @@ void func_808B4194(BgSpot15Rrbox* this, GlobalContext* globalCtx) { s32 approxFResult; Actor* actor = &this->dyna.actor; - this->unk_174 += 0.5f; + this->unk_174 += CVar_GetS32("gFasterBlockPush", 0) != 0 ? 1.0f : 0.5f; this->unk_174 = CLAMP_MAX(this->unk_174, 2.0f); @@ -294,7 +294,7 @@ void func_808B4194(BgSpot15Rrbox* this, GlobalContext* globalCtx) { this->dyna.unk_150 = 0.0f; this->unk_178 = 0.0f; this->unk_174 = 0.0f; - this->unk_168 = 10; + this->unk_168 = CVar_GetS32("gFasterBlockPush", 0) != 0 ? 3 : 10; func_808B4084(this, globalCtx); } Audio_PlayActorSound2(actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); diff --git a/soh/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c b/soh/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c index 76e285881..70e4f4d7f 100644 --- a/soh/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c +++ b/soh/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c @@ -558,7 +558,7 @@ void ObjOshihiki_Push(ObjOshihiki* this, GlobalContext* globalCtx) { f32 pushDistSigned; s32 stopFlag; - this->pushSpeed += 0.5f; + this->pushSpeed += CVar_GetS32("gFasterBlockPush", 0) != 0 ? 1.0f : 0.5f; this->stateFlags |= PUSHBLOCK_PUSH; this->pushSpeed = CLAMP_MAX(this->pushSpeed, 2.0f); stopFlag = Math_StepToF(&this->pushDist, 20.0f, this->pushSpeed); @@ -586,7 +586,7 @@ void ObjOshihiki_Push(ObjOshihiki* this, GlobalContext* globalCtx) { this->dyna.unk_150 = 0.0f; this->pushDist = 0.0f; this->pushSpeed = 0.0f; - this->timer = 10; + this->timer = CVar_GetS32("gFasterBlockPush", 0) != 0 ? 3 : 10; if (this->floorBgIds[this->highestFloor] == BGCHECK_SCENE) { ObjOshihiki_SetupOnScene(this, globalCtx); } else { From a790638bf50cd92ed0038541fac2301b6520f76d Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Thu, 12 May 2022 09:26:32 -0500 Subject: [PATCH 137/146] Fixed texture loads on imgui --- libultraship/libultraship/SohImGuiImpl.cpp | 4 ++-- libultraship/libultraship/TextureMod.cpp | 2 +- libultraship/libultraship/TextureMod.h | 9 --------- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 166edf50d..3af8fa885 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -257,7 +257,7 @@ namespace SohImGui { void LoadTexture(const std::string& name, const std::string& path) { GfxRenderingAPI* api = gfx_get_current_rendering_api(); - const auto res = GlobalCtx2::GetInstance()->GetResourceManager()->LoadFile(normalize(path)); + const auto res = GlobalCtx2::GetInstance()->GetResourceManager()->LoadFile(path); const auto asset = new GameAsset{ api->new_texture() }; uint8_t* img_data = stbi_load_from_memory(reinterpret_cast(res->buffer.get()), res->dwBufferSize, &asset->width, &asset->height, nullptr, 4); @@ -277,7 +277,7 @@ namespace SohImGui { void LoadResource(const std::string& name, const std::string& path, const ImVec4& tint) { GfxRenderingAPI* api = gfx_get_current_rendering_api(); - const auto res = static_cast(GlobalCtx2::GetInstance()->GetResourceManager()->LoadResource(normalize(path)).get()); + const auto res = static_cast(GlobalCtx2::GetInstance()->GetResourceManager()->LoadResource(path)).get()); std::vector texBuffer; texBuffer.reserve(res->width * res->height * 4); diff --git a/libultraship/libultraship/TextureMod.cpp b/libultraship/libultraship/TextureMod.cpp index 2a7e39511..7caf6b6f6 100644 --- a/libultraship/libultraship/TextureMod.cpp +++ b/libultraship/libultraship/TextureMod.cpp @@ -43,7 +43,7 @@ namespace Ship { if (raw_path == nullptr) return; const auto api = BIND_PTR("gfx_api", GfxRenderingAPI*); - const auto path = normalize(raw_path) + ".png"; + const auto path = raw_path + ".png"; const auto node = BIND_PTR("node", TextureCacheNode**); const auto fmt = BIND_VAR("fmt", uint32_t*); const auto siz = BIND_VAR("siz", uint32_t*); diff --git a/libultraship/libultraship/TextureMod.h b/libultraship/libultraship/TextureMod.h index 987a0c6f3..8dac99387 100644 --- a/libultraship/libultraship/TextureMod.h +++ b/libultraship/libultraship/TextureMod.h @@ -36,15 +36,6 @@ namespace Ship { void Hook_InvalidateTexture(HookEvent event); }; - inline std::string normalize(std::string path) { -#ifdef _WIN32 - std::ranges::replace(path, '/', '\\'); -#else - std::replace(path.begin(), path.end(), '\\', '/'); -#endif - return path; - } - inline void GrayOutTexture(uint8_t* data, int width, int height) { for (int x = 0; x < width * height * 4; x += 4) { From 57463051576e8208c18f560598f96cd5e64364c8 Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Thu, 12 May 2022 09:28:25 -0500 Subject: [PATCH 138/146] Fixed compilation errors --- libultraship/libultraship/SohImGuiImpl.cpp | 2 +- libultraship/libultraship/TextureMod.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 3af8fa885..72d9cee1a 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -277,7 +277,7 @@ namespace SohImGui { void LoadResource(const std::string& name, const std::string& path, const ImVec4& tint) { GfxRenderingAPI* api = gfx_get_current_rendering_api(); - const auto res = static_cast(GlobalCtx2::GetInstance()->GetResourceManager()->LoadResource(path)).get()); + const auto res = static_cast(GlobalCtx2::GetInstance()->GetResourceManager()->LoadResource(path).get()); std::vector texBuffer; texBuffer.reserve(res->width * res->height * 4); diff --git a/libultraship/libultraship/TextureMod.cpp b/libultraship/libultraship/TextureMod.cpp index 7caf6b6f6..b44987a62 100644 --- a/libultraship/libultraship/TextureMod.cpp +++ b/libultraship/libultraship/TextureMod.cpp @@ -43,7 +43,7 @@ namespace Ship { if (raw_path == nullptr) return; const auto api = BIND_PTR("gfx_api", GfxRenderingAPI*); - const auto path = raw_path + ".png"; + const auto path = std::string(raw_path) + ".png"; const auto node = BIND_PTR("node", TextureCacheNode**); const auto fmt = BIND_VAR("fmt", uint32_t*); const auto siz = BIND_VAR("siz", uint32_t*); From 635fb71b76ad45fb46bceb9c566c6fdc651e3ded Mon Sep 17 00:00:00 2001 From: louist103 <35883445+louist103@users.noreply.github.com> Date: Thu, 12 May 2022 13:28:24 -0400 Subject: [PATCH 139/146] Save states (#300) --- libultraship/libultraship/ConfigFile.h | 5 + libultraship/libultraship/GameVersions.h | 7 +- libultraship/libultraship/GlobalCtx2.h | 7 +- libultraship/libultraship/Window.cpp | 3 + soh/include/functions.h | 2 + soh/include/libc/stddef.h | 5 + soh/include/z64.h | 3 + soh/soh.vcxproj | 6 +- soh/soh.vcxproj.filters | 15 +- soh/soh/Enhancements/debugconsole.cpp | 75 ++ soh/soh/Enhancements/savestates.cpp | 957 ++++++++++++++++++ soh/soh/Enhancements/savestates.h | 62 ++ soh/soh/Enhancements/savestates_extern.inc | 257 +++++ soh/soh/OTRAudio.h | 8 + soh/soh/OTRGlobals.cpp | 75 +- soh/soh/OTRGlobals.h | 15 +- soh/src/buffers/heaps.c | 3 - soh/src/code/graph.c | 3 + soh/src/code/z_camera.c | 12 +- soh/src/code/z_map_mark.c | 2 +- soh/src/code/z_onepointdemo.c | 4 +- ...intdemo_data.c => z_onepointdemo_data.inc} | 70 +- soh/src/code/z_play.c | 2 +- .../actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c | 26 +- .../actors/ovl_Bg_Dodoago/z_bg_dodoago.c | 36 +- .../actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c | 12 +- .../actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c | 4 +- .../ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c | 2 +- .../ovl_Bg_Jya_1flift/z_bg_jya_1flift.c | 10 +- .../ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c | 8 +- .../actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c | 8 +- .../ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c | 2 +- .../ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c | 10 +- .../ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c | 16 +- .../ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c | 8 +- .../actors/ovl_Bg_Po_Event/z_bg_po_event.c | 78 +- .../ovl_Bg_Relay_Objects/z_bg_relay_objects.c | 2 +- .../ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c | 2 +- .../actors/ovl_Boss_Ganon/z_boss_ganon.c | 303 +++--- .../actors/ovl_Boss_Ganon/z_boss_ganon.h | 18 + .../actors/ovl_Boss_Ganon2/z_boss_ganon2.c | 201 ++-- .../actors/ovl_Boss_Ganon2/z_boss_ganon2.h | 14 + .../ovl_Boss_Ganon2/z_boss_ganon2_data.c | 41 +- .../overlays/actors/ovl_Boss_Mo/z_boss_mo.c | 28 +- .../overlays/actors/ovl_Boss_Tw/z_boss_tw.c | 45 +- .../overlays/actors/ovl_Boss_Tw/z_boss_tw.h | 45 +- .../overlays/actors/ovl_Demo_6K/z_demo_6k.c | 16 +- .../actors/ovl_Demo_Kekkai/z_demo_kekkai.c | 22 +- .../actors/ovl_Door_Warp1/z_door_warp1.c | 2 +- soh/src/overlays/actors/ovl_En_Bw/z_en_bw.c | 2 +- .../actors/ovl_En_Clear_Tag/z_en_clear_tag.c | 14 +- soh/src/overlays/actors/ovl_En_Fr/z_en_fr.c | 14 +- soh/src/overlays/actors/ovl_En_Fr/z_en_fr.h | 11 + .../overlays/actors/ovl_En_Goma/z_en_goma.c | 2 +- .../actors/ovl_En_Insect/z_en_insect.c | 6 +- .../overlays/actors/ovl_En_Ishi/z_en_ishi.c | 24 +- soh/src/overlays/actors/ovl_En_Niw/z_en_niw.c | 6 +- .../actors/ovl_En_Po_Field/z_en_po_field.c | 36 +- .../ovl_En_Takara_Man/z_en_takara_man.c | 2 +- soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c | 14 +- soh/src/overlays/actors/ovl_En_Zf/z_en_zf.c | 4 +- soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c | 6 +- .../ovl_Object_Kankyo/z_object_kankyo.c | 14 +- .../actors/ovl_player_actor/z_player.c | 6 +- 64 files changed, 2084 insertions(+), 634 deletions(-) create mode 100644 soh/soh/Enhancements/savestates.cpp create mode 100644 soh/soh/Enhancements/savestates.h create mode 100644 soh/soh/Enhancements/savestates_extern.inc create mode 100644 soh/soh/OTRAudio.h rename soh/src/code/{z_onepointdemo_data.c => z_onepointdemo_data.inc} (96%) diff --git a/libultraship/libultraship/ConfigFile.h b/libultraship/libultraship/ConfigFile.h index 17e3720f8..b94e22f88 100644 --- a/libultraship/libultraship/ConfigFile.h +++ b/libultraship/libultraship/ConfigFile.h @@ -1,3 +1,6 @@ +#ifndef CONFIG_FILE_H +#define CONFIG_FILE_H + #pragma once #include @@ -35,3 +38,5 @@ namespace Ship { mINI::INIFile File; }; } + +#endif diff --git a/libultraship/libultraship/GameVersions.h b/libultraship/libultraship/GameVersions.h index a25463bf4..8d3753b21 100644 --- a/libultraship/libultraship/GameVersions.h +++ b/libultraship/libultraship/GameVersions.h @@ -1,3 +1,6 @@ +#ifndef GAME_VERSION_H +#define GAME_VERSION_H + #pragma once #define OOT_NTSC_10 0xEC7011B7 @@ -17,4 +20,6 @@ #define OOT_PAL_GC_MQ_DBG 0x917D18F6 #define OOT_IQUE_TW 0x3D81FB3E #define OOT_IQUE_CN 0xB1E1E07B -#define OOT_UNKNOWN 0xFFFFFFFF \ No newline at end of file +#define OOT_UNKNOWN 0xFFFFFFFF + +#endif diff --git a/libultraship/libultraship/GlobalCtx2.h b/libultraship/libultraship/GlobalCtx2.h index a10421ec0..1ed512347 100644 --- a/libultraship/libultraship/GlobalCtx2.h +++ b/libultraship/libultraship/GlobalCtx2.h @@ -1,3 +1,6 @@ +#ifndef GLOBAL_CTX_2 +#define GLOBAL_CTX_2 + #pragma once #ifdef __cplusplus @@ -38,4 +41,6 @@ namespace Ship { std::string PatchesPath; }; } -#endif \ No newline at end of file +#endif + +#endif diff --git a/libultraship/libultraship/Window.cpp b/libultraship/libultraship/Window.cpp index e7c221e41..35a95f0de 100644 --- a/libultraship/libultraship/Window.cpp +++ b/libultraship/libultraship/Window.cpp @@ -24,6 +24,7 @@ #include #include "SohHooks.h" #include "SohConsole.h" + #include extern "C" { @@ -328,6 +329,8 @@ namespace Ship { GlobalCtx2::GetInstance()->GetWindow()->ToggleFullscreen(); } + + // OTRTODO: Rig with Kirito's console? //if (dwScancode == Ship::stoi(Conf["KEYBOARD SHORTCUTS"]["KEY_CONSOLE"])) { // ToggleConsole(); diff --git a/soh/include/functions.h b/soh/include/functions.h index 360afc687..4631cdb92 100644 --- a/soh/include/functions.h +++ b/soh/include/functions.h @@ -29,6 +29,7 @@ void gDPSetTextureImage(Gfx* pkt, u32 f, u32 s, u32 w, uintptr_t i); void gSPDisplayList(Gfx* pkt, Gfx* dl); void gSPDisplayListOffset(Gfx* pkt, Gfx* dl, int offset); void gSPVertex(Gfx* pkt, uintptr_t v, int n, int v0); +void gSPInvalidateTexCache(Gfx* pkt, uintptr_t texAddr); void cleararena(void); void bootproc(void); @@ -2406,6 +2407,7 @@ void Heaps_Free(void); #ifdef __cplusplus #undef this }; +#undef this #endif #endif diff --git a/soh/include/libc/stddef.h b/soh/include/libc/stddef.h index c30e392f8..e5fbe2d22 100644 --- a/soh/include/libc/stddef.h +++ b/soh/include/libc/stddef.h @@ -1,7 +1,12 @@ #ifndef STDDEF_H #define STDDEF_H +#ifndef __cplusplus #define NULL ((void*)0) +#else +#define NULL nullptr +#endif + #if 0 #define size_t unsigned long #define ssize_t long diff --git a/soh/include/z64.h b/soh/include/z64.h index 103c8650f..7720144b4 100644 --- a/soh/include/z64.h +++ b/soh/include/z64.h @@ -30,6 +30,9 @@ #include "ichain.h" #include "regs.h" +#define AUDIO_HEAP_SIZE 0x38000 +#define SYSTEM_HEAP_SIZE (1024 * 1024 * 4) + #ifdef __cplusplus namespace Ship { diff --git a/soh/soh.vcxproj b/soh/soh.vcxproj index 418fdd057..a395a22ce 100644 --- a/soh/soh.vcxproj +++ b/soh/soh.vcxproj @@ -180,6 +180,7 @@ + @@ -328,7 +329,6 @@ - @@ -926,10 +926,12 @@ + + @@ -1409,4 +1411,4 @@ - + \ No newline at end of file diff --git a/soh/soh.vcxproj.filters b/soh/soh.vcxproj.filters index a8455a4c8..b9d68b704 100644 --- a/soh/soh.vcxproj.filters +++ b/soh/soh.vcxproj.filters @@ -630,9 +630,6 @@ Source Files\src\code - - Source Files\src\code - Source Files\src\code @@ -2190,6 +2187,12 @@ Source Files\soh\Enhancements\debugger + + Source Files + + + Source Files\soh\Enhancements + @@ -3746,6 +3749,12 @@ Header Files\soh\Enhancements\debugger + + Source Files\soh\Enhancements + + + Source Files\soh + diff --git a/soh/soh/Enhancements/debugconsole.cpp b/soh/soh/Enhancements/debugconsole.cpp index 189230798..1b892be74 100644 --- a/soh/soh/Enhancements/debugconsole.cpp +++ b/soh/soh/Enhancements/debugconsole.cpp @@ -1,7 +1,15 @@ +#ifdef _MSC_VER +#define NOGDI +#endif + #include "debugconsole.h" #include "../libultraship/SohImGuiImpl.h" +#include "savestates.h" + #include #include +#include "soh/OTRGlobals.h" + #define Path _Path #define PATH_HACK @@ -303,6 +311,66 @@ static bool EntranceHandler(const std::vector& args) { gSaveContext.nextTransition = 11; } +static bool SaveStateHandler(const std::vector& args) { + unsigned int slot = OTRGlobals::Instance->gSaveStateMgr->GetCurrentSlot(); + const SaveStateReturn rtn = OTRGlobals::Instance->gSaveStateMgr->AddRequest({ slot, RequestType::SAVE }); + + switch (rtn) { + case SaveStateReturn::SUCCESS: + INFO("[SOH] Saved state to slot %u", slot); + return CMD_SUCCESS; + case SaveStateReturn::FAIL_WRONG_GAMESTATE: + ERROR("[SOH] Can not save a state outside of \"GamePlay\""); + return CMD_FAILED; + + } +} + +static bool LoadStateHandler(const std::vector& args) { + unsigned int slot = OTRGlobals::Instance->gSaveStateMgr->GetCurrentSlot(); + const SaveStateReturn rtn = OTRGlobals::Instance->gSaveStateMgr->AddRequest({ slot, RequestType::LOAD }); + + switch (rtn) { + case SaveStateReturn::SUCCESS: + INFO("[SOH] Loaded state from slot %u", slot); + return CMD_SUCCESS; + case SaveStateReturn::FAIL_INVALID_SLOT: + ERROR("[SOH] Invalid State Slot Number (%u)", slot); + return CMD_FAILED; + case SaveStateReturn::FAIL_STATE_EMPTY: + ERROR("[SOH] State Slot (%u) is empty", slot); + return CMD_FAILED; + case SaveStateReturn::FAIL_WRONG_GAMESTATE: + ERROR("[SOH] Can not load a state outside of \"GamePlay\""); + return CMD_FAILED; + } + +} + +static bool StateSlotSelectHandler(const std::vector& args) { + if (args.size() != 2) { + ERROR("[SOH] Unexpected arguments passed"); + return CMD_FAILED; + } + int slot; + + try { + slot = std::stoi(args[1], nullptr, 10); + } catch (std::invalid_argument const& ex) { + ERROR("[SOH] SaveState slot value must be a number."); + return CMD_FAILED; + } + + if (slot < 0) { + ERROR("[SOH] Invalid slot passed. Slot must be between 0 and 2"); + return CMD_FAILED; + } + + OTRGlobals::Instance->gSaveStateMgr->SetCurrentSlot(slot); + INFO("[SOH] Slot %u selected", OTRGlobals::Instance->gSaveStateMgr->GetCurrentSlot()); + return CMD_SUCCESS; +} + #define VARTYPE_INTEGER 0 #define VARTYPE_FLOAT 1 #define VARTYPE_STRING 2 @@ -416,6 +484,13 @@ void DebugConsole_Init(void) { { { "slot", ArgumentType::NUMBER }, { "item id", ArgumentType::NUMBER } } }); CMD_REGISTER("entrance", { EntranceHandler, "Sends player to the entered entrance (hex)", { { "entrance", ArgumentType::NUMBER } } }); + + CMD_REGISTER("save_state", { SaveStateHandler, "Save a state." }); + CMD_REGISTER("load_state", { LoadStateHandler, "Load a state." }); + CMD_REGISTER("set_slot", { StateSlotSelectHandler, "Selects a SaveState slot", { + { "Slot number", ArgumentType::NUMBER, } + } }); + DebugConsole_LoadCVars(); } template bool is_number(const std::string& s) { diff --git a/soh/soh/Enhancements/savestates.cpp b/soh/soh/Enhancements/savestates.cpp new file mode 100644 index 000000000..2b6d27189 --- /dev/null +++ b/soh/soh/Enhancements/savestates.cpp @@ -0,0 +1,957 @@ +#include "savestates.h" + +#include "GameVersions.h" + +#include // std::sprintf + +#include "spdlog/spdlog.h" + +#include +#include + +#include + +#include "z64.h" +#include "z64save.h" +#include +#include +#include "z64map_mark.h" +#include "../../src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h" +#include "../../src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.h" +#include "../../src/overlays/actors/ovl_Boss_Tw/z_boss_tw.h" +#include "../../src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.h" +#include "../../src/overlays/actors/ovl_En_Fr/z_en_fr.h" + +extern "C" GlobalContext* gGlobalCtx; + +// FROM z_lights.c +// I didn't feel like moving it into a header file. +#define LIGHTS_BUFFER_SIZE 32 + +typedef struct { + /* 0x000 */ s32 numOccupied; + /* 0x004 */ s32 searchIndex; + /* 0x008 */ LightNode buf[LIGHTS_BUFFER_SIZE]; +} LightsBuffer; // size = 0x188 + +#include "savestates_extern.inc" + +typedef struct SaveStateInfo { + unsigned char sysHeapCopy[SYSTEM_HEAP_SIZE]; + unsigned char audioHeapCopy[AUDIO_HEAP_SIZE]; + + SaveContext saveContextCopy; + GameInfo gameInfoCopy; + LightsBuffer lightBufferCopy; + AudioContext audioContextCopy; + MtxF mtxStackCopy[20]; // always 20 matricies + MtxF currentMtxCopy; + uint32_t rngSeed; + int16_t blueWarpTimerCopy; /* From door_warp_1 */ + + SeqScriptState seqScriptStateCopy[4];// Unrelocated + unk_D_8016E750 unk_D_8016E750Copy[4]; + + ActiveSound gActiveSoundsCopy[7][MAX_CHANNELS_PER_BANK]; + uint8_t gSoundBankMutedCopy[7]; + + u8 D_801333F0_copy; + u8 gAudioSfxSwapOff_copy; + uint16_t gAudioSfxSwapSource_copy[10]; + uint16_t gAudioSfxSwapTarget_copy[10]; + uint8_t gAudioSfxSwapMode_copy[10]; + void (*D_801755D0_copy)(void); + MapMarkData** sLoadedMarkDataTableCopy; + + //Static Data + + //Camera data + int32_t sInitRegs_copy; + int32_t gDbgCamEnabled_copy; + int32_t sDbgModeIdx_copy; + int16_t sNextUID_copy; + int32_t sCameraInterfaceFlags_copy; + int32_t sCameraInterfaceAlpha_copy; + int32_t sCameraShrinkWindowVal_copy; + int32_t D_8011D3AC_copy; + int32_t sDemo5PrevAction12Frame_copy; + int32_t sDemo5PrevSfxFrame_copy; + int32_t D_8011D3F0_copy; + OnePointCsFull D_8011D6AC_copy[3]; + OnePointCsFull D_8011D724_copy[3]; + OnePointCsFull D_8011D79C_copy[3]; + OnePointCsFull D_8011D83C_copy[2]; + OnePointCsFull D_8011D88C_copy[2]; + OnePointCsFull D_8011D8DC_copy[3]; + OnePointCsFull D_8011D954_copy[4]; + OnePointCsFull D_8011D9F4_copy[3]; + int16_t D_8011DB08_copy; + int16_t D_8011DB0C_copy; + int32_t sOOBTimer_copy; + f32 D_8015CE50_copy; + f32 D_8015CE54_copy; + CamColChk D_8015CE58_copy; + + //Gameover + uint16_t gGameOverTimer_copy; + + //One point demo + uint32_t sPrevFrameCs1100_copy; + CutsceneCameraPoint D_8012013C_copy[14]; + CutsceneCameraPoint D_8012021C_copy[14]; + CutsceneCameraPoint D_801204D4_copy[14]; + CutsceneCameraPoint D_801205B4_copy[14]; + OnePointCsFull D_801208EC_copy[3]; + OnePointCsFull D_80120964_copy[2]; + OnePointCsFull D_801209B4_copy[4]; + OnePointCsFull D_80120ACC_copy[5]; + OnePointCsFull D_80120B94_copy[11]; + OnePointCsFull D_80120D4C_copy[7]; + OnePointCsFull D_80120FA4_copy[6]; + OnePointCsFull D_80121184_copy[2]; + OnePointCsFull D_801211D4_copy[2]; + OnePointCsFull D_8012133C_copy[3]; + OnePointCsFull D_801213B4_copy[5]; + OnePointCsFull D_8012151C_copy[2]; + OnePointCsFull D_8012156C_copy[2]; + OnePointCsFull D_801215BC_copy[1]; + OnePointCsFull D_80121C24_copy[7]; + OnePointCsFull D_80121D3C_copy[3]; + OnePointCsFull D_80121F1C_copy[4]; + OnePointCsFull D_80121FBC_copy[4]; + OnePointCsFull D_801220D4_copy[5]; + OnePointCsFull D_80122714_copy[4]; + OnePointCsFull D_80122CB4_copy[2]; + OnePointCsFull D_80122D04_copy[2]; + OnePointCsFull D_80122E44_copy[2][7]; + OnePointCsFull D_8012313C_copy[3]; + OnePointCsFull D_801231B4_copy[4]; + OnePointCsFull D_80123254_copy[2]; + OnePointCsFull D_801232A4_copy[1]; + OnePointCsFull D_80123894_copy[3]; + OnePointCsFull D_8012390C_copy[2]; + OnePointCsFull D_8012395C_copy[3]; + OnePointCsFull D_801239D4_copy[3]; + + uint16_t gTimeIncrement_copy; + + //Overlay static data + // z_bg_ddan_kd + Vec3f sBgDdanKdVelocity_copy; + Vec3f sBgDdanKdAccel_copy; + + // z_bg_dodoago + s16 sBgDodoagoFirstExplosiveFlag_copy; + u8 sBgDodoagoDisableBombCatcher_copy; + s32 sBgDodoagoTimer_copy; + + // z_bg_haka_trap + uint32_t D_80880F30_copy; + uint32_t D_80881014_copy; + + // z_bg_hidan_rock + float D_8088BFC0_copy; + + // z_bg_menkuri_eye + int32_t D_8089C1A0_copy; + + // z_bg_mori_hineri + int16_t sBgMoriHineriNextCamIdx_copy; + + // z_bg_po_event + uint8_t sBgPoEventBlocksAtRest_copy; + uint8_t sBgPoEventPuzzleState_copy; + float sBgPoEventblockPushDist_copy; + + // z_bg_relay_objects + uint32_t D_808A9508_copy; + + // z_bg_spot18_basket + int16_t D_808B85D0_copy; + + // z_boss_ganon + uint32_t sBossGanonSeed1_copy; + uint32_t sBossGanonSeed2_copy; + uint32_t sBossGanonSeed3_copy; + void* sBossGanonGanondorf_copy; + void* sBossGanonZelda_copy; + void* sBossGanonCape_copy; + GanondorfEffect sBossGanonEffectBuf_copy[200]; + + // z_boss_ganon + uint32_t sBossGanonSeed1; + uint32_t sBossGanonSeed2; + uint32_t sBossGanonSeed3; + void* sBossGanonGanondorf; + void* sBossGanonZelda; + void* sBossGanonCape; + GanondorfEffect sBossGanonEffectBuf[200]; + + // z_boss_ganon2 + Vec3f D_8090EB20_copy; + int8_t D_80910638_copy; + void* sBossGanon2Zelda_copy; + void* D_8090EB30_copy; + int32_t sBossGanon2Seed1_copy; + int32_t sBossGanon2Seed2_copy; + int32_t sBossGanon2Seed3_copy; + Vec3f D_809105D8_copy[4]; + Vec3f D_80910608_copy[4]; + BossGanon2Effect sBossGanon2Particles_copy[100]; + + // z_boss_tw + uint8_t sTwInitalized_copy; + BossTwEffect sTwEffects_copy[150]; + + // z_demo_6k + Vec3f sDemo6kVelocity_copy; + + // z_demo_du + int32_t D_8096CE94_copy; + + // z_demo_kekkai + Vec3f demoKekkaiVel_copy; + + // z_en_bw + int32_t sSlugGroup_copy; + + // z_en_clear_tag + uint8_t sClearTagIsEffectInitialized_copy; + EnClearTagEffect sClearTagEffects_copy[CLEAR_TAG_EFFECT_MAX_COUNT]; + + // z_en_fr + EnFrPointers sEnFrPointers_copy; + + // z_en_goma + uint8_t sSpawnNum_copy; + + // z_en_insect + float D_80A7DEB0_copy; + int16_t D_80A7DEB4_copy; + int16_t D_80A7DEB8_copy; + + // z_en_ishi + int16_t sRockRotSpeedX_copy; + int16_t sRockRotSpeedY_copy; + + // z_en_niw + int16_t D_80AB85E0_copy; + uint8_t sLowerRiverSpawned_copy; + uint8_t sUpperRiverSpawned_copy; + + // z_en_po_field + int32_t sEnPoFieldNumSpawned_copy; + Vec3s sEnPoFieldSpawnPositions_copy[10]; + u8 sEnPoFieldSpawnSwitchFlags_copy[10]; + + // z_en_takara_man + uint8_t sTakaraIsInitialized_copy; + + // z_en_xc + int32_t D_80B41D90_copy; + int32_t sEnXcFlameSpawned_copy; + int32_t D_80B41DA8_copy; + int32_t D_80B41DAC_copy; + + // z_en_zf + int16_t D_80B4A1B0_copy; + int16_t D_80B4A1B4_copy; + + int32_t D_80B5A468_copy; + int32_t D_80B5A494_copy; + int32_t D_80B5A4BC_copy; + + uint8_t sKankyoIsSpawned_copy; + int16_t sTrailingFairies_copy; + + + //Misc static data + // z_map_exp + + s16 sPlayerInitialPosX_copy; + s16 sPlayerInitialPosZ_copy; + s16 sPlayerInitialDirection_copy; + + // code_800E(something. fill me in later) + u8 sOcarinaInpEnabled_copy; + s8 D_80130F10_copy; + u8 sCurOcarinaBtnVal_copy; + u8 sPrevOcarinaNoteVal_copy; + u8 sCurOcarinaBtnIdx_copy; + u8 sLearnSongLastBtn_copy; + f32 D_80130F24_copy; + f32 D_80130F28_copy; + s8 D_80130F2C_copy; + s8 D_80130F30_copy; + s8 D_80130F34_copy; + u8 sDisplayedNoteValue_copy; + u8 sPlaybackState_copy; + u32 D_80130F3C_copy; + u32 sNotePlaybackTimer_copy; + u16 sPlaybackNotePos_copy; + u16 sStaffPlaybackPos_copy; + + u32 sCurOcarinaBtnPress_copy; + u32 D_8016BA10_copy; + u32 sPrevOcarinaBtnPress_copy; + s32 D_8016BA18_copy; + s32 D_8016BA1C_copy; + u8 sCurOcarinaSong_copy[8]; + u8 sOcarinaSongAppendPos_copy; + u8 sOcarinaHasStartedSong_copy; + u8 sOcarinaSongNoteStartIdx_copy; + u8 sOcarinaSongCnt_copy; + u16 sOcarinaAvailSongs_copy; + u8 sStaffPlayingPos_copy; + u16 sLearnSongPos_copy[0x10]; + u16 D_8016BA50_copy[0x10]; + u16 D_8016BA70_copy[0x10]; + u8 sLearnSongExpectedNote_copy[0x10]; + OcarinaNote D_8016BAA0_copy; + u8 sAudioHasMalonBgm_copy; + f32 sAudioMalonBgmDist_copy; + + // Message_PAL + s16 sOcarinaNoteBufPos_copy; + s16 sOcarinaNoteBufLen_copy; + u8 sOcarinaNoteBuf_copy[12]; + + u8 D_8014B2F4_copy; + u8 sTextboxSkipped_copy; + u16 sNextTextId_copy; + s16 sLastPlayedSong_copy; + s16 sHasSunsSong_copy; + s16 sMessageHasSetSfx_copy; + u16 sOcarinaSongBitFlags_copy; + + +} SaveStateInfo; + +class SaveState { + friend class SaveStateMgr; + + public: + SaveState(std::shared_ptr mgr, unsigned int slot); + + private: + unsigned int slot; + std::shared_ptr saveStateMgr; + std::shared_ptr info; + + void Save(void); + void Load(void); + void BackupSeqScriptState(void); + void LoadSeqScriptState(void); + void BackupCameraData(void); + void LoadCameraData(void); + void SaveOnePointDemoData(void); + void LoadOnePointDemoData(void); + void SaveOverlayStaticData(void); + void LoadOverlayStaticData(void); + + void SaveMiscCodeData(void); + void LoadMiscCodeData(void); + + SaveStateInfo* GetSaveStateInfo(void); +}; + +SaveStateMgr::SaveStateMgr() { + this->SetCurrentSlot(0); +} +SaveStateMgr::~SaveStateMgr() { + this->states.clear(); +} + +SaveState::SaveState(std::shared_ptr mgr, unsigned int slot) : saveStateMgr(mgr), slot(slot), info(nullptr) { + this->info = std::make_shared(); +} + +void SaveState::BackupSeqScriptState(void) { + for (unsigned int i = 0; i < 4; i++) { + info->seqScriptStateCopy[i].value = gAudioContext.seqPlayers[i].scriptState.value; + + info->seqScriptStateCopy[i].remLoopIters[0] = gAudioContext.seqPlayers[i].scriptState.remLoopIters[0]; + info->seqScriptStateCopy[i].remLoopIters[1] = gAudioContext.seqPlayers[i].scriptState.remLoopIters[1]; + info->seqScriptStateCopy[i].remLoopIters[2] = gAudioContext.seqPlayers[i].scriptState.remLoopIters[2]; + info->seqScriptStateCopy[i].remLoopIters[3] = gAudioContext.seqPlayers[i].scriptState.remLoopIters[3]; + + info->seqScriptStateCopy[i].depth = gAudioContext.seqPlayers[i].scriptState.depth; + + info->seqScriptStateCopy[i].pc = (u8*)((uintptr_t)gAudioContext.seqPlayers[i].scriptState.pc - (uintptr_t)gAudioHeap); + + info->seqScriptStateCopy[i].stack[0] = + (u8*)((uintptr_t)gAudioContext.seqPlayers[i].scriptState.stack[0] - (uintptr_t)gAudioHeap); + info->seqScriptStateCopy[i].stack[1] = + (u8*)((uintptr_t)gAudioContext.seqPlayers[i].scriptState.stack[1] - (uintptr_t)gAudioHeap); + info->seqScriptStateCopy[i].stack[2] = + (u8*)((uintptr_t)gAudioContext.seqPlayers[i].scriptState.stack[2] - (uintptr_t)gAudioHeap); + info->seqScriptStateCopy[i].stack[3] = + (u8*)((uintptr_t)gAudioContext.seqPlayers[i].scriptState.stack[3] - (uintptr_t)gAudioHeap); + } +} + +void SaveState::LoadSeqScriptState(void) { + for (unsigned int i = 0; i < 4; i++) { + gAudioContext.seqPlayers[i].scriptState.value = info->seqScriptStateCopy[i].value; + + gAudioContext.seqPlayers[i].scriptState.remLoopIters[0] = info->seqScriptStateCopy[i].remLoopIters[0]; + gAudioContext.seqPlayers[i].scriptState.remLoopIters[1] = info->seqScriptStateCopy[i].remLoopIters[1]; + gAudioContext.seqPlayers[i].scriptState.remLoopIters[2] = info->seqScriptStateCopy[i].remLoopIters[2]; + gAudioContext.seqPlayers[i].scriptState.remLoopIters[3] = info->seqScriptStateCopy[i].remLoopIters[3]; + + gAudioContext.seqPlayers[i].scriptState.depth = info->seqScriptStateCopy[i].depth; + + gAudioContext.seqPlayers[i].scriptState.pc = + (u8*)((uintptr_t)info->seqScriptStateCopy[i].pc + (uintptr_t)gAudioHeap); + + gAudioContext.seqPlayers[i].scriptState.stack[0] = + (u8*)((uintptr_t)info->seqScriptStateCopy[i].stack[0] + (uintptr_t)gAudioHeap); + gAudioContext.seqPlayers[i].scriptState.stack[1] = + (u8*)((uintptr_t)info->seqScriptStateCopy[i].stack[1] + (uintptr_t)gAudioHeap); + gAudioContext.seqPlayers[i].scriptState.stack[2] = + (u8*)((uintptr_t)info->seqScriptStateCopy[i].stack[2] + (uintptr_t)gAudioHeap); + gAudioContext.seqPlayers[i].scriptState.stack[3] = + (u8*)((uintptr_t)info->seqScriptStateCopy[i].stack[3] + (uintptr_t)gAudioHeap); + } +} + +void SaveState::BackupCameraData(void) { + info->sInitRegs_copy = sInitRegs; + info->gDbgCamEnabled_copy = gDbgCamEnabled; + info->sNextUID_copy = sNextUID; + info->sCameraInterfaceFlags_copy = sCameraInterfaceFlags; + info->sCameraInterfaceAlpha_copy = sCameraInterfaceAlpha; + info->sCameraShrinkWindowVal_copy = sCameraShrinkWindowVal; + info->D_8011D3AC_copy = D_8011D3AC; + info->sDemo5PrevAction12Frame_copy = sDemo5PrevAction12Frame; + info->sDemo5PrevSfxFrame_copy = sDemo5PrevSfxFrame; + info->D_8011D3F0_copy = D_8011D3F0; + memcpy(info->D_8011D6AC_copy, D_8011D6AC, sizeof(info->D_8011D6AC_copy)); + memcpy(info->D_8011D724_copy, D_8011D724, sizeof(info->D_8011D724_copy)); + memcpy(info->D_8011D79C_copy, D_8011D79C, sizeof(info->D_8011D79C_copy)); + memcpy(info->D_8011D83C_copy, D_8011D83C, sizeof(info->D_8011D83C_copy)); + memcpy(info->D_8011D88C_copy, D_8011D88C, sizeof(info->D_8011D88C_copy)); + memcpy(info->D_8011D8DC_copy, D_8011D8DC, sizeof(info->D_8011D8DC_copy)); + memcpy(info->D_8011D954_copy, D_8011D954, sizeof(info->D_8011D954_copy)); + memcpy(info->D_8011D9F4_copy, D_8011D9F4, sizeof(info->D_8011D9F4_copy)); + info->D_8011DB08_copy = D_8011DB08; + info->D_8011DB0C_copy = D_8011DB0C; + info->sOOBTimer_copy = sOOBTimer; + info->D_8015CE50_copy = D_8015CE50; + info->D_8015CE54_copy = D_8015CE54; + memcpy(&info->D_8015CE58_copy, &D_8015CE58, sizeof(info->D_8015CE58_copy)); +} + +void SaveState::LoadCameraData(void) { + sInitRegs = info->sInitRegs_copy; + gDbgCamEnabled = info->gDbgCamEnabled_copy; + sDbgModeIdx = info->sDbgModeIdx_copy; + sNextUID = info->sNextUID_copy; + sCameraInterfaceAlpha = info->sCameraInterfaceAlpha_copy; + sCameraInterfaceFlags = info->sCameraInterfaceFlags_copy; + sCameraShrinkWindowVal = info->sCameraShrinkWindowVal_copy; + D_8011D3AC = info->D_8011D3AC_copy; + sDemo5PrevAction12Frame = info->sDemo5PrevAction12Frame_copy; + sDemo5PrevSfxFrame = info->sDemo5PrevSfxFrame_copy; + D_8011D3F0 = info->D_8011D3F0_copy; + memcpy(D_8011D6AC, info->D_8011D6AC_copy, sizeof(info->D_8011D6AC_copy)); + memcpy(D_8011D724, info->D_8011D724_copy, sizeof(info->D_8011D724_copy)); + memcpy(D_8011D79C, info->D_8011D79C_copy, sizeof(info->D_8011D79C_copy)); + memcpy(D_8011D83C, info->D_8011D83C_copy, sizeof(info->D_8011D83C_copy)); + memcpy(D_8011D88C, info->D_8011D88C_copy, sizeof(info->D_8011D88C_copy)); + memcpy(D_8011D8DC, info->D_8011D8DC_copy, sizeof(info->D_8011D8DC_copy)); + memcpy(D_8011D954, info->D_8011D954_copy, sizeof(info->D_8011D954_copy)); + memcpy(D_8011D9F4, info->D_8011D9F4_copy, sizeof(info->D_8011D9F4_copy)); + D_8011DB08 = info->D_8011DB08_copy; + D_8011DB0C = info->D_8011DB0C_copy; + sOOBTimer = info->sOOBTimer_copy; + D_8015CE50 = info->D_8015CE50_copy; + D_8015CE54 = info->D_8015CE54_copy; + memcpy(&D_8015CE58, &info->D_8015CE58_copy, sizeof(info->D_8015CE58_copy)); +} + +void SaveState::SaveOnePointDemoData(void) { + info->sPrevFrameCs1100_copy = sPrevFrameCs1100; + memcpy(info->D_8012013C_copy, D_8012013C, sizeof(info->D_8012013C_copy)); + memcpy(info->D_8012021C_copy, D_8012021C, sizeof(info->D_8012021C_copy)); + memcpy(info->D_801204D4_copy, D_801204D4, sizeof(info->D_801204D4_copy)); + memcpy(info->D_801205B4_copy, D_801205B4, sizeof(info->D_801205B4_copy)); + memcpy(info->D_801208EC_copy, D_801208EC, sizeof(info->D_801208EC_copy)); + memcpy(info->D_80120964_copy, D_80120964, sizeof(info->D_80120964_copy)); + memcpy(info->D_801209B4_copy, D_801209B4, sizeof(info->D_801209B4_copy)); + memcpy(info->D_80120ACC_copy, D_80120ACC, sizeof(info->D_80120ACC_copy)); + memcpy(info->D_80120B94_copy, D_80120B94, sizeof(info->D_80120B94_copy)); + memcpy(info->D_80120D4C_copy, D_80120D4C, sizeof(info->D_80120D4C_copy)); + memcpy(info->D_80120FA4_copy, D_80120FA4, sizeof(info->D_80120FA4_copy)); + memcpy(info->D_80121184_copy, D_80121184, sizeof(info->D_80121184_copy)); + memcpy(info->D_801211D4_copy, D_801211D4, sizeof(info->D_801211D4_copy)); + memcpy(info->D_8012133C_copy, D_8012133C, sizeof(info->D_8012133C_copy)); + memcpy(info->D_801213B4_copy, D_801213B4, sizeof(info->D_801213B4_copy)); + memcpy(info->D_8012151C_copy, D_8012151C, sizeof(info->D_8012151C_copy)); + memcpy(info->D_8012156C_copy, D_8012156C, sizeof(info->D_8012156C_copy)); + memcpy(info->D_801215BC_copy, D_801215BC, sizeof(info->D_801215BC_copy)); + memcpy(info->D_80121C24_copy, D_80121C24, sizeof(info->D_80121C24_copy)); + memcpy(info->D_80121D3C_copy, D_80121D3C, sizeof(info->D_80121D3C_copy)); + memcpy(info->D_80121F1C_copy, D_80121F1C, sizeof(info->D_80121F1C_copy)); + memcpy(info->D_80121FBC_copy, D_80121FBC, sizeof(info->D_80121FBC_copy)); + memcpy(info->D_801220D4_copy, D_801220D4, sizeof(info->D_801220D4_copy)); + memcpy(info->D_80122714_copy, D_80122714, sizeof(info->D_80122714_copy)); + memcpy(info->D_80122CB4_copy, D_80122CB4, sizeof(info->D_80122CB4_copy)); + memcpy(info->D_80122D04_copy, D_80122D04, sizeof(info->D_80122D04_copy)); + memcpy(info->D_80122E44_copy, D_80122E44, sizeof(info->D_80122E44_copy)); + memcpy(info->D_8012313C_copy, D_8012313C, sizeof(info->D_8012313C_copy)); + memcpy(info->D_801231B4_copy, D_801231B4, sizeof(info->D_801231B4_copy)); + memcpy(info->D_80123254_copy, D_80123254, sizeof(info->D_80123254_copy)); + memcpy(info->D_801232A4_copy, D_801232A4, sizeof(info->D_801232A4_copy)); + memcpy(info->D_80123894_copy, D_80123894, sizeof(info->D_80123894_copy)); + memcpy(info->D_8012390C_copy, D_8012390C, sizeof(info->D_8012390C_copy)); + memcpy(info->D_8012395C_copy, D_8012395C, sizeof(info->D_8012395C_copy)); + memcpy(info->D_801239D4_copy, D_801239D4, sizeof(info->D_801239D4_copy)); +} + +void SaveState::LoadOnePointDemoData(void) { + sPrevFrameCs1100 = info->sPrevFrameCs1100_copy; + memcpy(D_8012013C, info->D_8012013C_copy, sizeof(info->D_8012013C_copy)); + memcpy(D_8012021C, info->D_8012021C_copy, sizeof(info->D_8012021C_copy)); + memcpy(D_801204D4, info->D_801204D4_copy, sizeof(info->D_801204D4_copy)); + memcpy(D_801205B4, info->D_801205B4_copy, sizeof(info->D_801205B4_copy)); + memcpy(D_801208EC, info->D_801208EC_copy, sizeof(info->D_801208EC_copy)); + memcpy(D_80120964, info->D_80120964_copy, sizeof(info->D_80120964_copy)); + memcpy(D_801209B4, info->D_801209B4_copy, sizeof(info->D_801209B4_copy)); + memcpy(D_80120ACC, info->D_80120ACC_copy, sizeof(info->D_80120ACC_copy)); + memcpy(D_80120B94, info->D_80120B94_copy, sizeof(info->D_80120B94_copy)); + memcpy(D_80120D4C, info->D_80120D4C_copy, sizeof(info->D_80120D4C_copy)); + memcpy(D_80120FA4, info->D_80120FA4_copy, sizeof(info->D_80120FA4_copy)); + memcpy(D_80121184, info->D_80121184_copy, sizeof(info->D_80121184_copy)); + memcpy(D_801211D4, info->D_801211D4_copy, sizeof(info->D_801211D4_copy)); + memcpy(D_8012133C, info->D_8012133C_copy, sizeof(info->D_8012133C_copy)); + memcpy(D_801213B4, info->D_801213B4_copy, sizeof(info->D_801213B4_copy)); + memcpy(D_8012151C, info->D_8012151C_copy, sizeof(info->D_8012151C_copy)); + memcpy(D_8012156C, info->D_8012156C_copy, sizeof(info->D_8012156C_copy)); + memcpy(D_801215BC, info->D_801215BC_copy, sizeof(info->D_801215BC_copy)); + memcpy(D_80121C24, info->D_80121C24_copy, sizeof(info->D_80121C24_copy)); + memcpy(D_80121D3C, info->D_80121D3C_copy, sizeof(info->D_80121D3C_copy)); + memcpy(D_80121F1C, info->D_80121F1C_copy, sizeof(info->D_80121F1C_copy)); + memcpy(D_80121FBC, info->D_80121FBC_copy, sizeof(info->D_80121FBC_copy)); + memcpy(D_801220D4, info->D_801220D4_copy, sizeof(info->D_801220D4_copy)); + memcpy(D_80122714, info->D_80122714_copy, sizeof(info->D_80122714_copy)); + memcpy(D_80122CB4, info->D_80122CB4_copy, sizeof(info->D_80122CB4_copy)); + memcpy(D_80122D04, info->D_80122D04_copy, sizeof(info->D_80122D04_copy)); + memcpy(D_80122E44, info->D_80122E44_copy, sizeof(info->D_80122E44_copy)); + memcpy(D_8012313C, info->D_8012313C_copy, sizeof(info->D_8012313C_copy)); + memcpy(D_801231B4, info->D_801231B4_copy, sizeof(info->D_801231B4_copy)); + memcpy(D_80123254, info->D_80123254_copy, sizeof(info->D_80123254_copy)); + memcpy(D_801232A4, info->D_801232A4_copy, sizeof(info->D_801232A4_copy)); + memcpy(D_80123894, info->D_80123894_copy, sizeof(info->D_80123894_copy)); + memcpy(D_8012390C, info->D_8012390C_copy, sizeof(info->D_8012390C_copy)); + memcpy(D_8012395C, info->D_8012395C_copy, sizeof(info->D_8012395C_copy)); + memcpy(D_801239D4, info->D_801239D4_copy, sizeof(info->D_801239D4_copy)); +} + +void SaveState::SaveOverlayStaticData(void) { + info->sBgDdanKdVelocity_copy = sBgDdanKdVelocity; + info->sBgDdanKdAccel_copy = sBgDdanKdAccel; + info->sBgDodoagoFirstExplosiveFlag_copy = sBgDodoagoFirstExplosiveFlag; + info->sBgDodoagoDisableBombCatcher_copy = sBgDodoagoDisableBombCatcher; + info->sBgDodoagoTimer_copy = sBgDodoagoTimer; + info->D_80880F30_copy = D_80880F30; + info->D_80881014_copy = D_80881014; + info->D_8088BFC0_copy = D_8088BFC0; + info->sBgMoriHineriNextCamIdx_copy = sBgMoriHineriNextCamIdx; + info->sBgPoEventBlocksAtRest_copy = sBgPoEventBlocksAtRest; + info->sBgPoEventPuzzleState_copy = sBgPoEventPuzzleState; + info->sBgPoEventblockPushDist_copy = sBgPoEventblockPushDist; + info->D_808A9508_copy = D_808A9508; + info->D_808B85D0_copy = D_808B85D0; + info->sBossGanonSeed1_copy = sBossGanonSeed1; + info->sBossGanonSeed2_copy = sBossGanonSeed2; + info->sBossGanonSeed3_copy = sBossGanonSeed3; + info->sBossGanonGanondorf_copy = sBossGanonGanondorf; + info->sBossGanonZelda_copy = sBossGanonZelda; + info->sBossGanonCape_copy = sBossGanonCape; + memcpy(info->sBossGanonEffectBuf_copy, sBossGanonEffectBuf, sizeof(info->sBossGanonEffectBuf_copy)); + info->D_8090EB20_copy = D_8090EB20; + info->D_80910638_copy = D_80910638; + info->sBossGanon2Zelda_copy = sBossGanon2Zelda; + info->D_8090EB30_copy = D_8090EB30; + info->sBossGanon2Seed1_copy = sBossGanon2Seed1; + info->sBossGanon2Seed2_copy = sBossGanon2Seed2; + info->sBossGanon2Seed3_copy = sBossGanon2Seed3; + memcpy(info->D_809105D8_copy, D_809105D8, sizeof(D_809105D8)); + memcpy(info->D_80910608_copy, D_80910608, sizeof(D_80910608)); + memcpy(info->sBossGanon2Particles_copy, sBossGanon2Particles, sizeof(sBossGanon2Particles)); + info->sTwInitalized_copy = sTwInitalized; + memcpy(info->sTwEffects_copy, sTwEffects, sizeof(sTwEffects)); + info->sDemo6kVelocity_copy = sDemo6kVelocity; + info->D_8096CE94_copy = D_8096CE94; + info->demoKekkaiVel_copy = demoKekkaiVel; + info->sSlugGroup_copy = sSlugGroup; + info->sClearTagIsEffectInitialized_copy = sClearTagIsEffectsInitialized; + memcpy(info->sClearTagEffects_copy, sClearTagEffects, sizeof(sClearTagEffects)); + + memcpy(&info->sEnFrPointers_copy, &sEnFrPointers, sizeof(info->sEnFrPointers_copy)); + info->sSpawnNum_copy = sSpawnNum; + + info->D_80A7DEB0_copy = D_80A7DEB0; + info->D_80A7DEB4_copy = D_80A7DEB4; + info->D_80A7DEB8_copy = D_80A7DEB8; + info->sRockRotSpeedX_copy = sRockRotSpeedX; + info->sRockRotSpeedY_copy = sRockRotSpeedY; + info->D_80AB85E0_copy = D_80AB85E0; + info->sLowerRiverSpawned_copy = sLowerRiverSpawned; + info->sUpperRiverSpawned_copy = sUpperRiverSpawned; + info->sEnPoFieldNumSpawned_copy = sEnPoFieldNumSpawned; + memcpy(info->sEnPoFieldSpawnPositions_copy, sEnPoFieldSpawnPositions, sizeof(info->sEnPoFieldSpawnPositions_copy)); + memcpy(info->sEnPoFieldSpawnSwitchFlags_copy, sEnPoFieldSpawnSwitchFlags, sizeof(info->sEnPoFieldSpawnSwitchFlags_copy)); + + info->sTakaraIsInitialized_copy = sTakaraIsInitialized; + info->D_80B41D90_copy = D_80B41D90; + info->sEnXcFlameSpawned_copy = sEnXcFlameSpawned; + info->D_80B41DA8_copy = D_80B41DA8; + info->D_80B41DAC_copy = D_80B41DAC; + info->D_80B4A1B0_copy = D_80B4A1B0; + info->D_80B4A1B4_copy = D_80B4A1B4; + info->D_80B5A468_copy = D_80B5A468; + info->D_80B5A494_copy = D_80B5A494; + info->D_80B5A4BC_copy = D_80B5A4BC; + info->sKankyoIsSpawned_copy = sKankyoIsSpawned; + info->sTrailingFairies_copy = sTrailingFairies; + +} + +void SaveState::LoadOverlayStaticData(void) { + sBgDdanKdVelocity = info->sBgDdanKdVelocity_copy; + sBgDdanKdAccel = info->sBgDdanKdAccel_copy; + sBgDodoagoFirstExplosiveFlag = info->sBgDodoagoFirstExplosiveFlag_copy; + sBgDodoagoDisableBombCatcher = info->sBgDodoagoDisableBombCatcher_copy; + sBgDodoagoTimer = info->sBgDodoagoTimer_copy; + D_80880F30 = info->D_80880F30_copy; + D_80881014 = info->D_80881014_copy; + D_8088BFC0 = info->D_8088BFC0_copy; + sBgMoriHineriNextCamIdx = info->sBgMoriHineriNextCamIdx_copy; + sBgPoEventBlocksAtRest = info->sBgPoEventBlocksAtRest_copy; + sBgPoEventPuzzleState = info->sBgPoEventPuzzleState_copy; + sBgPoEventblockPushDist = info->sBgPoEventblockPushDist_copy; + D_808A9508 = info->D_808A9508_copy; + D_808B85D0 = info->D_808B85D0_copy; + sBossGanonSeed1 = info->sBossGanonSeed1_copy; + sBossGanonSeed2 = info->sBossGanonSeed2_copy; + sBossGanonSeed3 = info->sBossGanonSeed3_copy; + sBossGanonGanondorf = info->sBossGanonGanondorf_copy; + sBossGanonZelda = info->sBossGanonZelda_copy; + sBossGanonCape = info->sBossGanonCape_copy; + memcpy(sBossGanonEffectBuf, info->sBossGanonEffectBuf_copy, sizeof(info->sBossGanonEffectBuf_copy)); + + D_8090EB20 = info->D_8090EB20_copy; + D_80910638 = info->D_80910638_copy; + sBossGanon2Zelda = info->sBossGanon2Zelda_copy; + D_8090EB30 = info->D_8090EB30_copy; + sBossGanon2Seed1 = info->sBossGanon2Seed1_copy; + sBossGanon2Seed2 = info->sBossGanon2Seed2_copy; + sBossGanon2Seed3 = info->sBossGanon2Seed3_copy; + memcpy(D_809105D8, info->D_809105D8_copy, sizeof(D_809105D8)); + memcpy(D_80910608, info->D_80910608_copy, sizeof(D_80910608)); + memcpy(sBossGanon2Particles, info->sBossGanon2Particles_copy, sizeof(sBossGanon2Particles)); + sTwInitalized = info->sTwInitalized_copy; + memcpy(sTwEffects, info->sTwEffects_copy, sizeof(sTwEffects)); + sDemo6kVelocity = info->sDemo6kVelocity_copy; + + D_8096CE94 = info->D_8096CE94_copy; + demoKekkaiVel = info->demoKekkaiVel_copy; + sSlugGroup = info->sSlugGroup_copy; + sClearTagIsEffectsInitialized = info->sClearTagIsEffectInitialized_copy; + memcpy(sClearTagEffects, info->sClearTagEffects_copy, sizeof(sClearTagEffects)); + + D_80A7DEB0 = info->D_80A7DEB0_copy; + D_80A7DEB4 = info->D_80A7DEB4_copy; + D_80A7DEB8 = info->D_80A7DEB8_copy; + sRockRotSpeedX = info->sRockRotSpeedX_copy; + sRockRotSpeedY = info->sRockRotSpeedY_copy; + D_80AB85E0 = info->D_80AB85E0_copy; + sLowerRiverSpawned = info->sLowerRiverSpawned_copy; + sUpperRiverSpawned = info->sUpperRiverSpawned_copy; + sEnPoFieldNumSpawned = info->sEnPoFieldNumSpawned_copy; + memcpy(sEnPoFieldSpawnPositions, info->sEnPoFieldSpawnPositions_copy, sizeof(info->sEnPoFieldSpawnPositions_copy)); + memcpy(sEnPoFieldSpawnSwitchFlags, info->sEnPoFieldSpawnSwitchFlags_copy, sizeof(info->sEnPoFieldSpawnSwitchFlags_copy)); + + sTakaraIsInitialized = info->sTakaraIsInitialized_copy; + D_80B41D90 = info->D_80B41D90_copy; + sEnXcFlameSpawned = info->sEnXcFlameSpawned_copy; + D_80B41DA8 = info->D_80B41DA8_copy; + D_80B41DAC = info->D_80B41DAC_copy; + D_80B4A1B0 = info->D_80B4A1B0_copy; + D_80B4A1B4 = info->D_80B4A1B4_copy; + D_80B5A468 = info->D_80B5A468_copy; + D_80B5A494 = info->D_80B5A494_copy; + D_80B5A4BC = info->D_80B5A4BC_copy; + sKankyoIsSpawned = info->sKankyoIsSpawned_copy; + sTrailingFairies = info->sTrailingFairies_copy; +} + +void SaveState::SaveMiscCodeData(void) { + info->gGameOverTimer_copy = gGameOverTimer; + info->gTimeIncrement_copy = gTimeIncrement; + info->sLoadedMarkDataTableCopy = sLoadedMarkDataTable; + + info->sPlayerInitialPosX_copy = sPlayerInitialPosX; + info->sPlayerInitialPosZ_copy = sPlayerInitialPosZ; + info->sPlayerInitialDirection_copy = sPlayerInitialDirection; + + info->sOcarinaInpEnabled_copy = sOcarinaInpEnabled; + info->D_80130F10_copy = D_80130F10; + info->sCurOcarinaBtnVal_copy = sCurOcarinaBtnVal; + info->sPrevOcarinaNoteVal_copy = sPrevOcarinaNoteVal; + info->sCurOcarinaBtnIdx_copy = sCurOcarinaBtnIdx; + info->sLearnSongLastBtn_copy = sLearnSongLastBtn; + info->D_80130F24_copy = D_80130F24; + info->D_80130F28_copy = D_80130F28; + info->D_80130F2C_copy = D_80130F2C; + info->D_80130F30_copy = D_80130F30; + info->D_80130F34_copy = D_80130F34; + info->sPlaybackState_copy = sPlaybackState; + info->D_80130F3C_copy = D_80130F3C; + info->sNotePlaybackTimer_copy = sNotePlaybackTimer; + info->sPlaybackNotePos_copy = sPlaybackNotePos; + info->sStaffPlaybackPos_copy = sStaffPlaybackPos; + + + info->sCurOcarinaBtnPress_copy = sCurOcarinaBtnPress; + info->D_8016BA10_copy = D_8016BA10; + info->sPrevOcarinaBtnPress_copy = sPrevOcarinaBtnPress; + info->D_8016BA18_copy = D_8016BA18; + info->D_8016BA1C_copy = D_8016BA1C; + memcpy(info->sCurOcarinaSong_copy, sCurOcarinaSong, sizeof(sCurOcarinaSong)); + info->sOcarinaSongAppendPos_copy = sOcarinaSongAppendPos; + info->sOcarinaHasStartedSong_copy = sOcarinaHasStartedSong; + info->sOcarinaSongNoteStartIdx_copy = sOcarinaSongNoteStartIdx; + info->sOcarinaSongCnt_copy = sOcarinaSongCnt; + info->sOcarinaAvailSongs_copy = sOcarinaAvailSongs; + info->sStaffPlayingPos_copy = sStaffPlayingPos; + memcpy(info->sLearnSongPos_copy, sLearnSongPos, sizeof(sLearnSongPos)); + memcpy(info->D_8016BA50_copy, D_8016BA50, sizeof(D_8016BA50)); + memcpy(info->D_8016BA70_copy, D_8016BA70, sizeof(D_8016BA70)); + memcpy(info->sLearnSongExpectedNote_copy, sLearnSongExpectedNote, sizeof(sLearnSongExpectedNote)); + memcpy(&info->D_8016BAA0_copy, &D_8016BAA0, sizeof(D_8016BAA0)); + info->sAudioHasMalonBgm_copy = sAudioHasMalonBgm; + info->sAudioMalonBgmDist_copy = sAudioMalonBgmDist; + info->sDisplayedNoteValue_copy = sDisplayedNoteValue; + + + info->sOcarinaNoteBufPos_copy = sOcarinaNoteBufPos; + info->sOcarinaNoteBufLen_copy = sOcarinaNoteBufLen; + memcpy(info->sOcarinaNoteBuf_copy, sOcarinaNoteBuf, sizeof(sOcarinaNoteBuf)); + info->D_8014B2F4_copy = D_8014B2F4; + info->sTextboxSkipped_copy = sTextboxSkipped; + info->sNextTextId_copy = sNextTextId; + info->sLastPlayedSong_copy = sLastPlayedSong; + info->sHasSunsSong_copy = sHasSunsSong; + info->sMessageHasSetSfx_copy = sMessageHasSetSfx; + info->sOcarinaSongBitFlags_copy = sOcarinaSongBitFlags; +} + +void SaveState::LoadMiscCodeData(void) { + gGameOverTimer = info->gGameOverTimer_copy; + gTimeIncrement = info->gTimeIncrement_copy; + sLoadedMarkDataTable = info->sLoadedMarkDataTableCopy; + + sPlayerInitialPosX = info->sPlayerInitialPosX_copy; + sPlayerInitialPosZ = info->sPlayerInitialPosZ_copy; + sPlayerInitialDirection = info->sPlayerInitialDirection_copy; + + sOcarinaInpEnabled = info->sOcarinaInpEnabled_copy; + D_80130F10 = info->D_80130F10_copy; + sCurOcarinaBtnVal = info->sCurOcarinaBtnVal_copy; + sPrevOcarinaNoteVal = info->sPrevOcarinaNoteVal_copy; + sCurOcarinaBtnIdx = info->sCurOcarinaBtnIdx_copy; + sLearnSongLastBtn = info->sLearnSongLastBtn_copy; + D_80130F24 = info->D_80130F24_copy; + D_80130F28 = info->D_80130F28_copy; + D_80130F2C = info->D_80130F2C_copy; + D_80130F30 = info->D_80130F30_copy; + D_80130F34 = info->D_80130F34_copy; + sPlaybackState = info->sPlaybackState_copy; + D_80130F3C = info->D_80130F3C_copy; + sNotePlaybackTimer = info->sNotePlaybackTimer_copy; + sPlaybackNotePos = info->sPlaybackNotePos_copy; + sStaffPlaybackPos = info->sStaffPlaybackPos_copy; + + sCurOcarinaBtnPress = info->sCurOcarinaBtnPress_copy; + D_8016BA10 = info->D_8016BA10_copy; + sPrevOcarinaBtnPress = info->sPrevOcarinaBtnPress_copy; + D_8016BA18 = info->D_8016BA18_copy; + D_8016BA1C = info->D_8016BA1C_copy; + memcpy(sCurOcarinaSong, info->sCurOcarinaSong_copy, sizeof(sCurOcarinaSong)); + sOcarinaSongAppendPos = info->sOcarinaSongAppendPos_copy; + sOcarinaHasStartedSong = info->sOcarinaHasStartedSong_copy; + sOcarinaSongNoteStartIdx = info->sOcarinaSongNoteStartIdx_copy; + sOcarinaSongCnt = info->sOcarinaSongCnt_copy; + sOcarinaAvailSongs = info->sOcarinaAvailSongs_copy; + sStaffPlayingPos = info->sStaffPlayingPos_copy; + memcpy(info->sLearnSongPos_copy, info->sLearnSongPos_copy, sizeof(sLearnSongPos)); + memcpy(info->D_8016BA50_copy, info->D_8016BA50_copy, sizeof(D_8016BA50)); + memcpy(info->D_8016BA70_copy, info->D_8016BA70_copy, sizeof(D_8016BA70)); + memcpy(info->sLearnSongExpectedNote_copy, info->sLearnSongExpectedNote_copy, sizeof(sLearnSongExpectedNote)); + memcpy(&D_8016BAA0, &info->D_8016BAA0_copy, sizeof(D_8016BAA0)); + sAudioHasMalonBgm = info->sAudioHasMalonBgm_copy; + sAudioMalonBgmDist = info->sAudioMalonBgmDist_copy; + sDisplayedNoteValue = info->sDisplayedNoteValue_copy; + + sOcarinaNoteBufPos = info->sOcarinaNoteBufPos_copy; + sOcarinaNoteBufLen = info->sOcarinaNoteBufLen_copy; + memcpy(sOcarinaNoteBuf, info->sOcarinaNoteBuf_copy, sizeof(sOcarinaNoteBuf)); + + D_8014B2F4 = info->D_8014B2F4_copy; + sTextboxSkipped = info->sTextboxSkipped_copy; + sNextTextId = info->sNextTextId_copy; + sLastPlayedSong = info->sLastPlayedSong_copy; + sHasSunsSong = info->sHasSunsSong_copy; + sMessageHasSetSfx = info->sMessageHasSetSfx_copy; + sOcarinaSongBitFlags = info->sOcarinaSongBitFlags_copy; + + +} + +extern "C" void ProcessSaveStateRequests(void) { + OTRGlobals::Instance->gSaveStateMgr->ProcessSaveStateRequests(); +} + +void SaveStateMgr::SetCurrentSlot(unsigned int slot) { + SohImGui::overlay->TextDrawNotification(1.0f, true, "slot %u set", slot); + this->currentSlot = slot; +} + +unsigned int SaveStateMgr::GetCurrentSlot(void) { + return this->currentSlot; +} + +void SaveStateMgr::ProcessSaveStateRequests(void) { + while (!this->requests.empty()) { + const auto& request = this->requests.front(); + + switch (request.type) { + case RequestType::SAVE: + if (!this->states.contains(request.slot)) { + this->states[request.slot] = std::make_shared(OTRGlobals::Instance->gSaveStateMgr, request.slot); + } + this->states[request.slot]->Save(); + SohImGui::overlay->TextDrawNotification(1.0f, true, "saved state %u", request.slot); + break; + case RequestType::LOAD: + if (this->states.contains(request.slot)) { + this->states[request.slot]->Load(); + SohImGui::overlay->TextDrawNotification(1.0f, true, "loaded state %u", request.slot); + } else { + SPDLOG_ERROR("Invalid SaveState slot: {}", request.type); + } + break; + [[unlikely]] default: + SPDLOG_ERROR("Invalid SaveState request type: {}", request.type); + break; + } + this->requests.pop(); + } +} + +SaveStateReturn SaveStateMgr::AddRequest(const SaveStateRequest request) { + if (gGlobalCtx == nullptr) { + SPDLOG_ERROR("[SOH] Can not save or load a state outside of \"GamePlay\""); + SohImGui::overlay->TextDrawNotification(1.0f, true, "states not available here", request.slot); + return SaveStateReturn::FAIL_WRONG_GAMESTATE; + } + + switch (request.type) { + case RequestType::SAVE: + requests.push(request); + break; + case RequestType::LOAD: + if (states.contains(request.slot)) { + requests.push(request); + } else { + SPDLOG_ERROR("Invalid SaveState slot: {}", request.type); + SohImGui::overlay->TextDrawNotification(1.0f, true, "state slot %u empty", request.slot); + return SaveStateReturn::FAIL_INVALID_SLOT; + } + break; + [[unlikely]] default: + SPDLOG_ERROR("Invalid SaveState request type: {}", request.type); + return SaveStateReturn::FAIL_BAD_REQUEST; + break; + + } +} + +void SaveState::Save(void) { + std::unique_lock Lock(audio.mutex); + memcpy(&info->sysHeapCopy, gSystemHeap, SYSTEM_HEAP_SIZE /* sizeof(gSystemHeap) */); + memcpy(&info->audioHeapCopy, gAudioHeap, AUDIO_HEAP_SIZE /* sizeof(gAudioContext) */); + + memcpy(&info->audioContextCopy, &gAudioContext, sizeof(AudioContext)); + memcpy(&info->unk_D_8016E750Copy, D_8016E750, sizeof(info->unk_D_8016E750Copy)); + BackupSeqScriptState(); + + memcpy(info->gActiveSoundsCopy, gActiveSounds, sizeof(gActiveSounds)); + memcpy(&info->gSoundBankMutedCopy, gSoundBankMuted, sizeof(info->gSoundBankMutedCopy)); + + info->D_801333F0_copy = D_801333F0; + info->gAudioSfxSwapOff_copy = gAudioSfxSwapOff; + + memcpy(&info->gAudioSfxSwapSource_copy, gAudioSfxSwapSource, + sizeof(info->gAudioSfxSwapSource_copy)); + memcpy(&info->gAudioSfxSwapTarget_copy, gAudioSfxSwapTarget, + sizeof(info->gAudioSfxSwapTarget_copy)); + memcpy(&info->gAudioSfxSwapMode_copy, gAudioSfxSwapMode, + sizeof(info->gAudioSfxSwapMode_copy)); + + info->D_801755D0_copy = D_801755D0; + + memcpy(&info->saveContextCopy, &gSaveContext, sizeof(gSaveContext)); + memcpy(&info->gameInfoCopy, gGameInfo, sizeof(*gGameInfo)); + memcpy(&info->lightBufferCopy, &sLightsBuffer, sizeof(sLightsBuffer)); + memcpy(&info->mtxStackCopy, &sMatrixStack, sizeof(MtxF) * 20); + memcpy(&info->currentMtxCopy, &sCurrentMatrix, sizeof(MtxF)); + + //Various static data + info->blueWarpTimerCopy = sWarpTimerTarget; + BackupCameraData(); + SaveOnePointDemoData(); + SaveOverlayStaticData(); + SaveMiscCodeData(); + +} + +void SaveState::Load(void) { + std::unique_lock Lock(audio.mutex); + memcpy(gSystemHeap, &info->sysHeapCopy, SYSTEM_HEAP_SIZE); + memcpy(gAudioHeap, &info->audioHeapCopy, AUDIO_HEAP_SIZE); + + memcpy(&gAudioContext, &info->audioContextCopy, sizeof(AudioContext)); + memcpy(D_8016E750, &info->unk_D_8016E750Copy, sizeof(info->unk_D_8016E750Copy)); + LoadSeqScriptState(); + + memcpy(&gSaveContext, &info->saveContextCopy, sizeof(gSaveContext)); + memcpy(gGameInfo, &info->gameInfoCopy, sizeof(*gGameInfo)); + memcpy(&sLightsBuffer, &info->lightBufferCopy, sizeof(sLightsBuffer)); + memcpy(&sMatrixStack, &info->mtxStackCopy, sizeof(MtxF) * 20); + memcpy(&sCurrentMatrix, &info->currentMtxCopy, sizeof(MtxF)); + sWarpTimerTarget = info->blueWarpTimerCopy; + + memcpy(gActiveSounds, info->gActiveSoundsCopy, sizeof(gActiveSounds)); + memcpy(gSoundBankMuted, &info->gSoundBankMutedCopy, sizeof(info->gSoundBankMutedCopy)); + D_801333F0 = info->D_801333F0_copy; + gAudioSfxSwapOff = info->gAudioSfxSwapOff_copy; + + memcpy(gAudioSfxSwapSource, &info->gAudioSfxSwapSource_copy, + sizeof(info->gAudioSfxSwapSource_copy)); + memcpy(gAudioSfxSwapTarget, &info->gAudioSfxSwapTarget_copy, + sizeof(info->gAudioSfxSwapTarget_copy)); + memcpy(gAudioSfxSwapMode, &info->gAudioSfxSwapMode_copy, + sizeof(info->gAudioSfxSwapMode_copy)); + + //Various static data + D_801755D0 = info->D_801755D0_copy; + LoadCameraData(); + LoadOnePointDemoData(); + LoadOverlayStaticData(); + LoadMiscCodeData(); + +} diff --git a/soh/soh/Enhancements/savestates.h b/soh/soh/Enhancements/savestates.h new file mode 100644 index 000000000..4ac142172 --- /dev/null +++ b/soh/soh/Enhancements/savestates.h @@ -0,0 +1,62 @@ +#ifndef SAVE_STATES_H +#define SAVE_STATES_H + +#include +#include +#include +#include +#include + +enum class SaveStateReturn { + SUCCESS, + FAIL_INVALID_SLOT, + FAIL_NO_MEMORY, + FAIL_STATE_EMPTY, + FAIL_WRONG_GAMESTATE, + FAIL_BAD_REQUEST, +}; + +typedef struct SaveStateHeader { + uint32_t stateMagic; + uint32_t stateVersion; + //uint32_t gameVersion; +} SaveStateHeader; + +enum class RequestType { + SAVE, + LOAD, +}; + +typedef struct SaveStateRequest { + unsigned int slot; + RequestType type; +} SaveStateRequest; + +class SaveState; + +class SaveStateMgr { + friend class SaveState; + private: + unsigned int currentSlot; + std::unordered_map> states; + std::queue requests; + std::mutex mutex; + + public: + + SaveStateReturn AddRequest(const SaveStateRequest request); + SaveStateMgr(); + ~SaveStateMgr(); + + void SetCurrentSlot(unsigned int slot); + unsigned int GetCurrentSlot(void); + + SaveStateMgr& operator=(const SaveStateMgr& rhs) = delete; + SaveStateMgr(const SaveStateMgr& rhs) = delete; + + void ProcessSaveStateRequests(void); + +}; +extern std::shared_ptr gSaveStateMgr; + +#endif diff --git a/soh/soh/Enhancements/savestates_extern.inc b/soh/soh/Enhancements/savestates_extern.inc new file mode 100644 index 000000000..c3b129a32 --- /dev/null +++ b/soh/soh/Enhancements/savestates_extern.inc @@ -0,0 +1,257 @@ +extern "C" MtxF* sMatrixStack; +extern "C" MtxF* sCurrentMatrix; +extern "C" LightsBuffer sLightsBuffer; +extern "C" s16 sWarpTimerTarget; +extern "C" MapMarkData** sLoadedMarkDataTable; + +//Camera static data +extern "C" int32_t sInitRegs; +extern "C" int32_t gDbgCamEnabled; +extern "C" int32_t sDbgModeIdx; +extern "C" int16_t sNextUID; +extern "C" int32_t sCameraInterfaceFlags; +extern "C" int32_t sCameraInterfaceAlpha; +extern "C" int32_t sCameraShrinkWindowVal; +extern "C" int32_t D_8011D3AC; +extern "C" int32_t sDemo5PrevAction12Frame; +extern "C" int32_t sDemo5PrevSfxFrame; +extern "C" int32_t D_8011D3F0; +extern "C" OnePointCsFull D_8011D6AC[]; +extern "C" OnePointCsFull D_8011D724[]; +extern "C" OnePointCsFull D_8011D79C[]; +extern "C" OnePointCsFull D_8011D83C[]; +extern "C" OnePointCsFull D_8011D88C[]; +extern "C" OnePointCsFull D_8011D8DC[]; +extern "C" OnePointCsFull D_8011D954[]; +extern "C" OnePointCsFull D_8011D9F4[]; +extern "C" int16_t D_8011DB08; +extern "C" int16_t D_8011DB0C; +extern "C" int32_t sOOBTimer; +extern "C" f32 D_8015CE50; +extern "C" f32 D_8015CE54; +extern "C" CamColChk D_8015CE58; + +//Gameover +extern "C" uint16_t gGameOverTimer; + +//One Point Demo +extern "C" uint32_t sPrevFrameCs1100; +extern "C" CutsceneCameraPoint D_8012013C[14]; +extern "C" CutsceneCameraPoint D_8012021C[14]; +extern "C" CutsceneCameraPoint D_801204D4[14]; +extern "C" CutsceneCameraPoint D_801205B4[14]; +extern "C" OnePointCsFull D_801208EC[3]; +extern "C" OnePointCsFull D_80120964[2]; +extern "C" OnePointCsFull D_801209B4[4]; +extern "C" OnePointCsFull D_80120ACC[5]; +extern "C" OnePointCsFull D_80120B94[11]; +extern "C" OnePointCsFull D_80120D4C[7]; +extern "C" OnePointCsFull D_80120FA4[6]; +extern "C" OnePointCsFull D_80121184[2]; +extern "C" OnePointCsFull D_801211D4[2]; +extern "C" OnePointCsFull D_8012133C[3]; +extern "C" OnePointCsFull D_801213B4[5]; +extern "C" OnePointCsFull D_8012151C[2]; +extern "C" OnePointCsFull D_8012156C[2]; +extern "C" OnePointCsFull D_801215BC[1]; +extern "C" OnePointCsFull D_80121C24[7]; +extern "C" OnePointCsFull D_80121D3C[3]; +extern "C" OnePointCsFull D_80121F1C[4]; +extern "C" OnePointCsFull D_80121FBC[4]; +extern "C" OnePointCsFull D_801220D4[5]; +extern "C" OnePointCsFull D_80122714[4]; +extern "C" OnePointCsFull D_80122CB4[2]; +extern "C" OnePointCsFull D_80122D04[2]; +extern "C" OnePointCsFull D_80122E44[2][7]; +extern "C" OnePointCsFull D_8012313C[3]; +extern "C" OnePointCsFull D_801231B4[4]; +extern "C" OnePointCsFull D_80123254[2]; +extern "C" OnePointCsFull D_801232A4[1]; +extern "C" OnePointCsFull D_80123894[3]; +extern "C" OnePointCsFull D_8012390C[2]; +extern "C" OnePointCsFull D_8012395C[3]; +extern "C" OnePointCsFull D_801239D4[3]; + +// z_bg_ddan_kd +extern "C" Vec3f sBgDdanKdVelocity; +extern "C" Vec3f sBgDdanKdAccel; + +// z_bg_dodoago +extern "C" s16 sBgDodoagoFirstExplosiveFlag; +extern "C" u8 sBgDodoagoDisableBombCatcher; +extern "C" s32 sBgDodoagoTimer; + +// z_bg_haka_trap +extern "C" uint32_t D_80880F30; +extern "C" uint32_t D_80881014; + +// z_bg_hidan_rock +extern "C" float D_8088BFC0; + +// z_bg_menkuri_eye +extern "C" int32_t D_8089C1A0; + +// z_bg_mori_hineri +extern "C" int16_t sBgMoriHineriNextCamIdx; + +// z_bg_po_event +extern "C" uint8_t sBgPoEventBlocksAtRest; +extern "C" uint8_t sBgPoEventPuzzleState; +extern "C" float sBgPoEventblockPushDist; + +// z_bg_relay_objects +extern "C" uint32_t D_808A9508; + +// z_bg_spot18_basket +extern "C" int16_t D_808B85D0; + +// z_boss_ganon +extern "C" uint32_t sBossGanonSeed1; +extern "C" uint32_t sBossGanonSeed2; +extern "C" uint32_t sBossGanonSeed3; +extern "C" void* sBossGanonGanondorf; +extern "C" void* sBossGanonZelda; +extern "C" void* sBossGanonCape; +extern "C" GanondorfEffect sBossGanonEffectBuf[200]; + +// z_boss_ganon2 +extern "C" Vec3f D_8090EB20; +extern "C" int8_t D_80910638; +extern "C" void* sBossGanon2Zelda; +extern "C" void* D_8090EB30; +extern "C" int32_t sBossGanon2Seed1; +extern "C" int32_t sBossGanon2Seed2; +extern "C" int32_t sBossGanon2Seed3; +extern "C" Vec3f D_809105D8[4]; +extern "C" Vec3f D_80910608[4]; +extern "C" BossGanon2Effect sBossGanon2Particles[100]; + +// z_boss_tw +extern "C" uint8_t sTwInitalized; +extern "C" BossTwEffect sTwEffects[150]; + +// z_demo_6k +extern "C" Vec3f sDemo6kVelocity; + +// z_demo_du +extern "C" int32_t D_8096CE94; + +// z_demo_kekkai +extern "C" Vec3f demoKekkaiVel; + +// z_en_bw +extern "C" int32_t sSlugGroup; + +// z_en_clear_tag +extern "C" uint8_t sClearTagIsEffectsInitialized; +extern "C" EnClearTagEffect sClearTagEffects[CLEAR_TAG_EFFECT_MAX_COUNT]; + +// z_en_fr +extern "C" EnFrPointers sEnFrPointers; + +// z_en_goma +extern "C" uint8_t sSpawnNum; + +// z_en_in +extern "C" int32_t D_80A7B998; + +// z_en_insect +extern "C" float D_80A7DEB0; +extern "C" int16_t D_80A7DEB4; +extern "C" int16_t D_80A7DEB8; + +// z_en_ishi +extern "C" int16_t sRockRotSpeedX; +extern "C" int16_t sRockRotSpeedY; + +// z_en_niw +extern "C" int16_t D_80AB85E0; +extern "C" uint8_t sLowerRiverSpawned; +extern "C" uint8_t sUpperRiverSpawned; + +// z_en_po_field +extern "C" int32_t sEnPoFieldNumSpawned; +extern "C" Vec3s sEnPoFieldSpawnPositions[10]; +extern "C" u8 sEnPoFieldSpawnSwitchFlags[10]; + +// z_en_takara_man +extern "C" uint8_t sTakaraIsInitialized; + +// z_en_xc +extern "C" int32_t D_80B41D90; +extern "C" int32_t sEnXcFlameSpawned; +extern "C" int32_t D_80B41DA8; +extern "C" int32_t D_80B41DAC; + +// z_en_zf +extern "C" int16_t D_80B4A1B0; +extern "C" int16_t D_80B4A1B4; + +extern "C" int32_t D_80B5A468; +extern "C" int32_t D_80B5A494; +extern "C" int32_t D_80B5A4BC; + +extern "C" uint8_t sKankyoIsSpawned; +extern "C" int16_t sTrailingFairies; + +extern "C" uint16_t gTimeIncrement; + +extern "C" s16 sPlayerInitialPosX; +extern "C" s16 sPlayerInitialPosZ; +extern "C" s16 sPlayerInitialDirection; + +// code_800EC960 +// Related to ocarina +extern "C" u8 sOcarinaInpEnabled; +extern "C" s8 D_80130F10; +extern "C" u8 sCurOcarinaBtnVal; +extern "C" u8 sPrevOcarinaNoteVal; +extern "C" u8 sCurOcarinaBtnIdx; +extern "C" u8 sLearnSongLastBtn; +extern "C" f32 D_80130F24; +extern "C" f32 D_80130F28; +extern "C" s8 D_80130F2C; +extern "C" s8 D_80130F30; +extern "C" s8 D_80130F34; +extern "C" u8 sPlaybackState; +extern "C" u32 D_80130F3C; +extern "C" u32 sNotePlaybackTimer; +extern "C" u16 sPlaybackNotePos; +extern "C" u16 sStaffPlaybackPos; + +//IDK what this is but it looks important +extern "C" u32 sCurOcarinaBtnPress; +extern "C" u32 D_8016BA10; +extern "C" u32 sPrevOcarinaBtnPress; +extern "C" s32 D_8016BA18; +extern "C" s32 D_8016BA1C; +extern "C" u8 sCurOcarinaSong[8]; +extern "C" u8 sOcarinaSongAppendPos; +extern "C" u8 sOcarinaHasStartedSong; +extern "C" u8 sOcarinaSongNoteStartIdx; +extern "C" u8 sOcarinaSongCnt; +extern "C" u16 sOcarinaAvailSongs; +extern "C" u8 sStaffPlayingPos; +extern "C" u16 sLearnSongPos[0x10]; +extern "C" u16 D_8016BA50[0x10]; +extern "C" u16 D_8016BA70[0x10]; +extern "C" u8 sLearnSongExpectedNote[0x10]; +extern "C" OcarinaNote D_8016BAA0; +extern "C" u8 sAudioHasMalonBgm; +extern "C" f32 sAudioMalonBgmDist; +extern "C" u8 sDisplayedNoteValue; + + + +// z_message_PAL +extern "C" s16 sOcarinaNoteBufPos; +extern "C" s16 sOcarinaNoteBufLen; +extern "C" u8 sOcarinaNoteBuf[12]; + +extern "C" u8 D_8014B2F4; +extern "C" u8 sTextboxSkipped; +extern "C" u16 sNextTextId; +extern "C" s16 sLastPlayedSong; +extern "C" s16 sHasSunsSong; +extern "C" s16 sMessageHasSetSfx; +extern "C" u16 sOcarinaSongBitFlags; \ No newline at end of file diff --git a/soh/soh/OTRAudio.h b/soh/soh/OTRAudio.h new file mode 100644 index 000000000..ee0ec46a2 --- /dev/null +++ b/soh/soh/OTRAudio.h @@ -0,0 +1,8 @@ +#pragma once + +static struct { + std::condition_variable cv_to_thread, cv_from_thread; + std::mutex mutex; + bool initialized; + bool processing; +} audio; diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index f7ff39cdc..7456ebf7e 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1,4 +1,5 @@ #include "OTRGlobals.h" +#include "OTRAudio.h" #include #include #include @@ -33,17 +34,14 @@ #include "macros.h" #include +#include + OTRGlobals* OTRGlobals::Instance; -static struct { - std::condition_variable cv_to_thread, cv_from_thread; - std::mutex mutex; - bool initialized; - bool processing; -} audio; - OTRGlobals::OTRGlobals() { + context = Ship::GlobalCtx2::CreateInstance("Ship of Harkinian"); + gSaveStateMgr = std::make_shared(); context->GetWindow()->Init(); } @@ -114,6 +112,63 @@ extern "C" void Graph_ProcessFrame(void (*run_one_game_iter)(void)) { } extern "C" void Graph_StartFrame() { + // Why -1? + int32_t dwScancode = OTRGlobals::Instance->context->GetWindow()->lastScancode; + OTRGlobals::Instance->context->GetWindow()->lastScancode = -1; + + switch (dwScancode - 1) { + case SDL_SCANCODE_F5: { + const unsigned int slot = OTRGlobals::Instance->gSaveStateMgr->GetCurrentSlot(); + const SaveStateReturn stateReturn = + OTRGlobals::Instance->gSaveStateMgr->AddRequest({ slot, RequestType::SAVE }); + + switch (stateReturn) { + case SaveStateReturn::SUCCESS: + SPDLOG_INFO("[SOH] Saved state to slot {}", slot); + break; + case SaveStateReturn::FAIL_WRONG_GAMESTATE: + SPDLOG_ERROR("[SOH] Can not save a state outside of \"GamePlay\""); + break; + [[unlikely]] default: + break; + } + break; + } + case SDL_SCANCODE_F6: { + unsigned int slot = OTRGlobals::Instance->gSaveStateMgr->GetCurrentSlot(); + slot++; + if (slot > 5) { + slot = 0; + } + OTRGlobals::Instance->gSaveStateMgr->SetCurrentSlot(slot); + SPDLOG_INFO("Set SaveState slot to {}.", slot); + break; + } + case SDL_SCANCODE_F7: { + const unsigned int slot = OTRGlobals::Instance->gSaveStateMgr->GetCurrentSlot(); + const SaveStateReturn stateReturn = + OTRGlobals::Instance->gSaveStateMgr->AddRequest({ slot, RequestType::LOAD }); + + switch (stateReturn) { + case SaveStateReturn::SUCCESS: + SPDLOG_INFO("[SOH] Loaded state from slot {}", slot); + break; + case SaveStateReturn::FAIL_INVALID_SLOT: + SPDLOG_ERROR("[SOH] Invalid State Slot Number {}", slot); + break; + case SaveStateReturn::FAIL_STATE_EMPTY: + SPDLOG_ERROR("[SOH] State Slot {} is empty", slot); + break; + case SaveStateReturn::FAIL_WRONG_GAMESTATE: + SPDLOG_ERROR("[SOH] Can not load a state outside of \"GamePlay\""); + break; + [[unlikely]] default: + break; + } + + break; + } + } OTRGlobals::Instance->context->GetWindow()->StartFrame(); } @@ -131,6 +186,7 @@ extern "C" void Graph_ProcessGfxCommands(Gfx* commands) { audio.cv_to_thread.wait(Lock); } } + std::unique_lock Lock(audio.mutex); //AudioMgr_ThreadEntry(&gAudioMgr); // 528 and 544 relate to 60 fps at 32 kHz 32000/60 = 533.333.. // in an ideal world, one third of the calls should use num_samples=544 and two thirds num_samples=528 @@ -156,10 +212,7 @@ extern "C" void Graph_ProcessGfxCommands(Gfx* commands) { // printf("Audio samples before submitting: %d\n", audio_api->buffered()); AudioPlayer_Play((u8*)audio_buffer, num_audio_samples * (sizeof(int16_t) * NUM_AUDIO_CHANNELS * AUDIO_FRAMES_PER_UPDATE)); - { - std::unique_lock Lock(audio.mutex); - audio.processing = false; - } + audio.processing = false; audio.cv_from_thread.notify_one(); } }).detach(); diff --git a/soh/soh/OTRGlobals.h b/soh/soh/OTRGlobals.h index 339613b25..0a318de73 100644 --- a/soh/soh/OTRGlobals.h +++ b/soh/soh/OTRGlobals.h @@ -1,17 +1,22 @@ +#ifndef OTR_GLOBALS_H +#define OTR_GLOBALS_H + #pragma once #include "GlobalCtx2.h" #ifdef __cplusplus +#include "Enhancements/savestates.h" class OTRGlobals { public: - static OTRGlobals* Instance; + static OTRGlobals* Instance; - std::shared_ptr context; + std::shared_ptr context; + std::shared_ptr gSaveStateMgr; - OTRGlobals(); - ~OTRGlobals(); + OTRGlobals(); + ~OTRGlobals(); private: @@ -68,3 +73,5 @@ void AudioPlayer_Play(const uint8_t* buf, uint32_t len); void AudioMgr_CreateNextAudioBuffer(s16* samples, u32 num_samples); int Controller_ShouldRumble(size_t i); #endif + +#endif \ No newline at end of file diff --git a/soh/src/buffers/heaps.c b/soh/src/buffers/heaps.c index d09f86e72..b6f16ab11 100644 --- a/soh/src/buffers/heaps.c +++ b/soh/src/buffers/heaps.c @@ -6,9 +6,6 @@ #include #endif -#define AUDIO_HEAP_SIZE 0x38000 -#define SYSTEM_HEAP_SIZE (1024 * 1024 * 128) - u8* gAudioHeap; u8* gSystemHeap; diff --git a/soh/src/code/graph.c b/soh/src/code/graph.c index 9f744ec02..4b1887c18 100644 --- a/soh/src/code/graph.c +++ b/soh/src/code/graph.c @@ -431,6 +431,8 @@ static struct RunFrameContext { extern AudioMgr gAudioMgr; +extern void ProcessSaveStateRequests(void); + static void RunFrame() { u32 size; @@ -487,6 +489,7 @@ static void RunFrame() //uint64_t diff = (ticksB - ticksA) / (freq / 1000); //printf("Frame simulated in %ims\n", diff); runFrameContext.state = 1; + ProcessSaveStateRequests(); return; nextFrame:; } diff --git a/soh/src/code/z_camera.c b/soh/src/code/z_camera.c index 94faf8124..41c16b5cc 100644 --- a/soh/src/code/z_camera.c +++ b/soh/src/code/z_camera.c @@ -565,10 +565,10 @@ s16 Camera_XZAngle(Vec3f* to, Vec3f* from) { return DEGF_TO_BINANG(RADF_TO_DEGF(Math_FAtan2F(from->x - to->x, from->z - to->z))); } + f32 D_8015CE50; + f32 D_8015CE54; + CamColChk D_8015CE58; s16 func_80044ADC(Camera* camera, s16 yaw, s16 arg2) { - static f32 D_8015CE50; - static f32 D_8015CE54; - static CamColChk D_8015CE58; Vec3f playerPos; Vec3f rotatedPos; Vec3f floorNorm; @@ -7221,9 +7221,9 @@ s32 Camera_DbgChangeMode(Camera* camera) { return true; } +s16 D_8011DB08 = 0x3F0; +s16 D_8011DB0C = 0x156; void func_80058E8C(Camera* camera) { - static s16 D_8011DB08 = 0x3F0; - static s16 D_8011DB0C = 0x156; s32 pad3; f32 sp60; s32 pad; @@ -7299,8 +7299,8 @@ void func_80058E8C(Camera* camera) { } } +s32 sOOBTimer = 0; Vec3s Camera_Update(Camera* camera) { - static s32 sOOBTimer = 0; Vec3f viewAt; Vec3f viewEye; Vec3f viewUp; diff --git a/soh/src/code/z_map_mark.c b/soh/src/code/z_map_mark.c index f5a8a3c39..8d43a33a0 100644 --- a/soh/src/code/z_map_mark.c +++ b/soh/src/code/z_map_mark.c @@ -52,7 +52,7 @@ static MapMarkDataOverlay sMapMarkDataOvl = { gMapMarkDataTable, }; -static MapMarkData** sLoadedMarkDataTable; +MapMarkData** sLoadedMarkDataTable; void MapMark_Init(GlobalContext* globalCtx) { MapMarkDataOverlay* overlay = &sMapMarkDataOvl; diff --git a/soh/src/code/z_onepointdemo.c b/soh/src/code/z_onepointdemo.c index 96ef33c18..538859764 100644 --- a/soh/src/code/z_onepointdemo.c +++ b/soh/src/code/z_onepointdemo.c @@ -4,9 +4,9 @@ static s16 sDisableAttention = false; static s16 sUnused = -1; -static s32 sPrevFrameCs1100 = -4096; +s32 sPrevFrameCs1100 = -4096; -#include "z_onepointdemo_data.c" +#include "z_onepointdemo_data.inc" void OnePointCutscene_AddVecSphToVec3f(Vec3f* dst, Vec3f* src, VecSph* vecSph) { Vec3f out; diff --git a/soh/src/code/z_onepointdemo_data.c b/soh/src/code/z_onepointdemo_data.inc similarity index 96% rename from soh/src/code/z_onepointdemo_data.c rename to soh/src/code/z_onepointdemo_data.inc index 1d1838b05..2488be71b 100644 --- a/soh/src/code/z_onepointdemo_data.c +++ b/soh/src/code/z_onepointdemo_data.inc @@ -1,6 +1,6 @@ #include "global.h" -static CutsceneCameraPoint D_8012013C[14] = { +CutsceneCameraPoint D_8012013C[14] = { { CS_CMD_CONTINUE, 25, 40, 70.79991f, { -1814, 533, -1297 } }, { CS_CMD_CONTINUE, 20, 40, 70.99991f, { -1805, 434, -1293 } }, { CS_CMD_CONTINUE, 10, 30, 60.0f, { -1794, 323, -1280 } }, @@ -16,7 +16,7 @@ static CutsceneCameraPoint D_8012013C[14] = { { CS_CMD_STOP, 0, 50, 60.0f, { -1974, 12, -1179 } }, { CS_CMD_STOP, 0, 30, 60.0f, { -1974, 12, -1179 } }, }; -static CutsceneCameraPoint D_8012021C[14] = { +CutsceneCameraPoint D_8012021C[14] = { { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1751, 604, -1233 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1752, 516, -1233 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1751, 417, -1233 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1767, 306, -1219 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1776, 257, -1205 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1881, 147, -1149 } }, @@ -54,7 +54,7 @@ static CutsceneCameraPoint D_80120434[10] = { { CS_CMD_STOP, 0, 0, 60.0f, { 0, 62, -119 } }, { CS_CMD_STOP, 0, 0, 60.0f, { 0, 62, -119 } }, }; -static CutsceneCameraPoint D_801204D4[14] = { +CutsceneCameraPoint D_801204D4[14] = { { CS_CMD_CONTINUE, -15, 40, 80.600006f, { -60, 332, 183 } }, { CS_CMD_CONTINUE, -22, 30, 80.600006f, { -60, 332, 183 } }, { CS_CMD_CONTINUE, -20, 38, 80.600006f, { -118, 344, 41 } }, @@ -70,7 +70,7 @@ static CutsceneCameraPoint D_801204D4[14] = { { CS_CMD_STOP, 6, 30, 85.199936f, { 25, 127, -950 } }, { CS_CMD_STOP, 0, 30, 85.199936f, { 25, 127, -950 } }, }; -static CutsceneCameraPoint D_801205B4[14] = { +CutsceneCameraPoint D_801205B4[14] = { { CS_CMD_CONTINUE, 0, 0, 60.0f, { -225, 785, -242 } }, { CS_CMD_CONTINUE, -21, 0, 80.600006f, { -245, 784, -242 } }, { CS_CMD_CONTINUE, -21, 0, 80.600006f, { -288, 485, -379 } }, @@ -118,18 +118,18 @@ static s16 D_801208E0 = 12; static s16 D_801208E4 = 90; static s16 D_801208E8 = 8; -static OnePointCsFull D_801208EC[3] = { +OnePointCsFull D_801208EC[3] = { { 0x0F, 0x08, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, { 0x81, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } }, { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; -static OnePointCsFull D_80120964[2] = { +OnePointCsFull D_80120964[2] = { { 0x8F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, { 0x81, 0xFF, 0xA121, 1, 0, 75.0f, 0.6f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } }, }; -static OnePointCsFull D_801209B4[4] = { +OnePointCsFull D_801209B4[4] = { { 0x8F, 0x08, 0x0101, 1, 0, 60.0f, 0.9f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, { 0x84, 0x01, 0x0100, 29, 0, 45.0f, 0.1f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } }, { 0x83, 0xFF, 0x0000, 10, 0, 60.0f, 0.2f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } }, @@ -142,7 +142,7 @@ static OnePointCsFull D_80120A54[3] = { { 0x8B, 0xFF, 0x0022, 5000, 0, 75.0f, 0.005f, { 0.0f, 0.0f, -10.0f }, { -1.0f, -1.0f, -1.0f } }, }; -static OnePointCsFull D_80120ACC[5] = { +OnePointCsFull D_80120ACC[5] = { { 0x8F, 0xFF, 0x0442, 10, 0, 40.0f, 1.0f, { -10.0f, 45.0f, 20.0f }, { 20.0f, 30.0f, 160.0f } }, { 0x95, 0xFF, 0x0000, 1, 0, 40.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, { 0x8F, 0x01, 0x0442, 10, 0, 40.0f, 1.0f, { -10.0f, 45.0f, 20.0f }, { 20.0f, 30.0f, 160.0f } }, @@ -150,7 +150,7 @@ static OnePointCsFull D_80120ACC[5] = { { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; -static OnePointCsFull D_80120B94[11] = { +OnePointCsFull D_80120B94[11] = { { 0x8F, 0x01, 0x2142, 1, 0, 40.0f, 1.0f, { 20.0f, 40.0f, 20.0f }, { -20.0f, 0.0f, -30.0f } }, { 0x84, 0xFF, 0x0404, 19, 5, 70.0f, 0.01f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, { 0x84, 0xFF, 0x0404, 20, 0, 60.0f, 0.01f, { 0.0f, 20.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, @@ -164,7 +164,7 @@ static OnePointCsFull D_80120B94[11] = { { 0x98, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; -static OnePointCsFull D_80120D4C[7] = { +OnePointCsFull D_80120D4C[7] = { { 0x8F, 0x01, 0x2142, 1, 0, 40.0f, 1.0f, { 20.0f, 40.0f, 20.0f }, { -20.0f, 0.0f, -30.0f } }, { 0x84, 0xFF, 0x0404, 19, 5, 70.0f, 0.01f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, { 0x84, 0xFF, 0x0404, 20, 0, 60.0f, 0.01f, { 0.0f, 20.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, @@ -185,7 +185,7 @@ static OnePointCsFull D_80120E64[8] = { { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; -static OnePointCsFull D_80120FA4[6] = { +OnePointCsFull D_80120FA4[6] = { { 0x8F, 0x01, 0x2143, 30, 0, 70.0f, 0.4f, { 0.0f, 40.0f, 50.0f }, { 30.0f, 10.0f, -50.0f } }, { 0x95, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, { 0x8F, 0xFF, 0x2222, 10, 0, 42.0f, 1.0f, { 0.0f, 40.0f, 0.0f }, { 0.0f, 85.0f, 45.0f } }, @@ -206,12 +206,12 @@ static OnePointCsFull D_8012110C[3] = { { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; -static OnePointCsFull D_80121184[2] = { +OnePointCsFull D_80121184[2] = { { 0x83, 0x01, 0x0101, 40, 0, -1.0f, 0.1f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; -static OnePointCsFull D_801211D4[2] = { +OnePointCsFull D_801211D4[2] = { { 0x8F, 0x08, 0x0101, 50, 0, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { -10.0f, 85.0f, 0.0f } }, { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; @@ -229,13 +229,13 @@ static OnePointCsFull D_80121314[1] = { { 0x8F, 0x08, 0x4141, 1000, 0, 75.0f, 0.6f, { 0.0f, 0.0f, 10.0f }, { 0.0f, 0.0f, 100.0f } }, }; -static OnePointCsFull D_8012133C[3] = { +OnePointCsFull D_8012133C[3] = { { 0x8F, 0x01, 0x0141, 40, 0, 75.0f, 1.0f, { 0.0f, 60.0f, 0.0f }, { 0.0f, 0.0f, 100.0f } }, { 0x83, 0xFF, 0x2121, 20, 0, 60.0f, 0.2f, { 0.0f, -10.0f, -10.0f }, { 0.0f, 10.0f, -100.0f } }, { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; -static OnePointCsFull D_801213B4[5] = { +OnePointCsFull D_801213B4[5] = { { 0x8F, 0x08, 0xC2C2, 40, 0, 70.0f, 1.0f, { 80.0f, 0.0f, 20.0f }, { 20.0f, 0.0f, 80.0f } }, { 0x8B, 0x01, 0xC2C2, 120, 0, 70.0f, 0.1f, { 80.0f, 0.0f, 20.0f }, { 20.0f, 0.0f, 80.0f } }, { 0x8F, 0x53, 0xC2C2, 30, 0, 50.0f, 1.0f, { 60.0f, 0.0f, 20.0f }, { 60.0f, 0.0f, 60.0f } }, @@ -250,17 +250,17 @@ static OnePointCsFull D_8012147C[4] = { { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; -static OnePointCsFull D_8012151C[2] = { +OnePointCsFull D_8012151C[2] = { { 0x0F, 0x01, 0x0101, 29, 0, 60.0f, 1.0f, { -700.0f, 875.0f, -100.0f }, { -550.0f, 920.0f, -150.0f } }, { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; -static OnePointCsFull D_8012156C[2] = { +OnePointCsFull D_8012156C[2] = { { 0x8F, 0x4D, 0x4242, 1, 0, 65.0f, 1.0f, { 60.0f, 30.0f, 0.0f }, { 50.0f, 20.0f, 150.0f } }, { 0x81, 0xFF, 0x4242, -1, 0, 65.0f, 1.0f, { -50.0f, 60.0f, 0.0f }, { -60.0f, 40.0f, 150.0f } }, }; -static OnePointCsFull D_801215BC[1] = { +OnePointCsFull D_801215BC[1] = { { 0x0F, 0xFF, 0x0101, 5, 0, 65.0f, 1.0f, { -1185.0f, 655.0f, 1185.0f }, { -1255.0f, 735.0f, 1255.0f } }, }; @@ -331,7 +331,7 @@ static OnePointCsFull D_80121A44[12] = { { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; -static OnePointCsFull D_80121C24[7] = { +OnePointCsFull D_80121C24[7] = { { 0x0F, 0x05, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, { 0x03, 0xFF, 0x0101, 89, 0, 50.0f, 0.4f, { 125.0f, 320.0f, -1500.0f }, { 125.0f, 500.0f, -1150.0f } }, { 0x0F, 0x08, 0x0101, 40, 4, 55.0f, 1.0f, { 0.0f, 375.0f, -1440.0f }, { 5.0f, 365.0f, -1315.0f } }, @@ -341,7 +341,7 @@ static OnePointCsFull D_80121C24[7] = { { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; -static OnePointCsFull D_80121D3C[3] = { +OnePointCsFull D_80121D3C[3] = { { 0x0F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 1023.0f, 738.0f, -2628.0f }, { 993.0f, 770.0f, -2740.0f } }, { 0x02, 0xFF, 0x0101, 4, 0, 50.0f, 1.0f, { 1255.0f, 350.0f, -1870.0f }, { 1240.0f, 575.0f, -2100.0f } }, { 0x0F, 0xFF, 0x0000, -1, 0, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, @@ -359,14 +359,14 @@ static OnePointCsFull D_80121DB4[9] = { { 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; -static OnePointCsFull D_80121F1C[4] = { +OnePointCsFull D_80121F1C[4] = { { 0x0F, 0x08, 0x0101, 10, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, { 0x01, 0xFF, 0x2121, 10, 0, 50.0f, 0.5f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } }, { 0x01, 0x02, 0x2121, 23, 0, 50.0f, 0.5f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } }, { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; -static OnePointCsFull D_80121FBC[4] = { +OnePointCsFull D_80121FBC[4] = { { 0x0F, 0xFF, 0x0101, 5, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, { 0x01, 0xFF, 0x0101, 10, 0, 30.0f, 1.0f, { -2130.0f, 2885.0f, -1055.0f }, { -2085.0f, 2875.0f, -1145.0f } }, { 0x0F, 0xFF, 0x0000, 30, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, @@ -379,7 +379,7 @@ static OnePointCsFull D_8012205C[3] = { { 0x01, 0x01, 0x21A1, 10, 0, 60.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, -200.0f } }, }; -static OnePointCsFull D_801220D4[5] = { +OnePointCsFull D_801220D4[5] = { { 0x0F, 0x01, 0x0101, 5, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, { 0x01, 0xFF, 0x4141, 10, 5, 55.0f, 0.75f, { 400.0f, -50.0f, 800.0f }, { 600.0f, -60.0f, 800.0f } }, { 0x01, 0xFF, 0x4141, 15, 10, 40.0f, 0.75f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 10.0f, 200.0f } }, @@ -443,7 +443,7 @@ static OnePointCsFull D_8012269C[3] = { { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; -static OnePointCsFull D_80122714[4] = { +OnePointCsFull D_80122714[4] = { { 0x0F, 0xFF, 0x0101, 20, 0, 45.0f, 1.0f, { -915.0f, -2185.0f, 6335.0f }, { -915.0f, -2290.0f, 6165.0f } }, { 0x02, 0xFF, 0x0101, -1, 0, 80.0f, 0.8f, { -920.0f, -2270.0f, 6140.0f }, { -920.0f, -2280.0f, 6070.0f } }, { 0x02, 0xFF, 0x0101, 20, 0, 80.0f, 0.9f, { -920.0f, -2300.0f, 6140.0f }, { -920.0f, -2300.0f, 6070.0f } }, @@ -512,12 +512,12 @@ static OnePointCsFull D_80122C8C[1] = { { 0x0F, 0xFF, 0x0101, 999, 5, 60.0f, 1.0f, { -70.0f, 140.0f, 25.0f }, { 10.0f, 180.0f, 195.0f } }, }; -static OnePointCsFull D_80122CB4[2] = { +OnePointCsFull D_80122CB4[2] = { { 0x0F, 0xFF, 0x4242, 5, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 1000.0f }, { 0.0f, 0.0f, 1100.0f } }, { 0x02, 0xFF, 0x4242, -1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, -100.0f }, { 0.0f, 0.0f, 0.0f } }, }; -static OnePointCsFull D_80122D04[2] = { +OnePointCsFull D_80122D04[2] = { { 0x0F, 0xFF, 0x4242, 10, 0, 60.0f, 1.0f, { 0.0f, 0.0f, -100.0f }, { 0.0f, 0.0f, 0.0f } }, { 0x02, 0xFF, 0x4242, -1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 1000.0f }, { 0.0f, 0.0f, 1100.0f } }, }; @@ -534,7 +534,7 @@ static OnePointCsFull D_80122DCC[3] = { { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; -static OnePointCsFull D_80122E44[2][7] = { +OnePointCsFull D_80122E44[2][7] = { { { 0x83, 0xFF, 0x2222, 10, 5, 90.0f, 0.2f, { 50.0f, 100.0f, 140.0f }, { -30.0f, 10.0f, -20.0f } }, { 0x8F, 0xFF, 0x0000, 20, 0, 90.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, @@ -563,25 +563,25 @@ static OnePointCsFull D_80123074[5] = { { 0x92, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; -static OnePointCsFull D_8012313C[3] = { +OnePointCsFull D_8012313C[3] = { { 0x8F, 0xFF, 0xA2A2, 20, 8, 70.0f, 1.0f, { 65.0f, -150.0f, 50.0f }, { 30.0f, 10.0f, 90.0f } }, { 0x81, 0xFF, 0xA2A2, 100, 0, 60.0f, 1.0f, { 70.0f, -160.0f, 50.0f }, { 25.0f, 180.0f, 180.0f } }, { 0x92, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; -static OnePointCsFull D_801231B4[4] = { +OnePointCsFull D_801231B4[4] = { { 0x8F, 0xC5, 0x4343, 1, 0, 50.0f, 1.0f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 5.0f, -1.0f } }, { 0x81, 0xC5, 0x4343, 48, 0, 50.0f, 0.75f, { 0.0f, 80.0f, 0.0f }, { 0.0f, 15.0f, -1.0f } }, { 0x8F, 0xC5, 0x4343, 1, 5, 45.0f, 1.0f, { 0.0f, 0.0f, 30.0f }, { 30.0f, 120.0f, 60.0f } }, { 0x81, 0xC5, 0x4343, -1, 0, -1.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; -static OnePointCsFull D_80123254[2] = { +OnePointCsFull D_80123254[2] = { { 0x0F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, { 0x03, 0xC5, 0x0101, 49, 0, 50.0f, 0.05f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, }; -static OnePointCsFull D_801232A4[1] = { +OnePointCsFull D_801232A4[1] = { { 0x0F, 0x45, 0x0101, 9999, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, }; @@ -646,24 +646,24 @@ static OnePointCsFull D_801237CC[5] = { { 0x0F, 0xFF, 0x0000, 100, -45, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; -static OnePointCsFull D_80123894[3] = { +OnePointCsFull D_80123894[3] = { { 0x0F, 0xFF, 0x0101, 60, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, { 0x0F, 0xFF, 0x4242, 30, 0, 50.0f, 1.0f, { 0.0f, 28.0f, 0.0f }, { 0.0f, 20.0f, 40.0f } }, { 0x0D, 0xFF, 0x0000, 120, 0, 180.0f, 0.4f, { 0.0f, -5.0f, 0.0f }, { 0.0f, 2.0f, 40.0f } }, }; -static OnePointCsFull D_8012390C[2] = { +OnePointCsFull D_8012390C[2] = { { 0x0F, 0xFF, 0x0101, 30, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, { 0x0F, 0xFF, 0x4242, 180, 0, 60.0f, 1.0f, { 0.0f, 78.0f, 0.0f }, { 0.0f, 78.0f, 200.0f } }, }; -static OnePointCsFull D_8012395C[3] = { +OnePointCsFull D_8012395C[3] = { { 0x0F, 0xFF, 0x0101, 60, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, { 0x0F, 0xFF, 0x4242, 30, 0, 50.0f, 1.0f, { 0.0f, 28.0f, 0.0f }, { 0.0f, 20.0f, -45.0f } }, { 0x0D, 0xFF, 0x0000, 120, 0, 180.0f, 0.4f, { 0.0f, -5.0f, 0.0f }, { 0.0f, 2.0f, 45.0f } }, }; -static OnePointCsFull D_801239D4[3] = { +OnePointCsFull D_801239D4[3] = { { 0x0F, 0xFF, 0x4242, 5, 0, 60.0f, 1.0f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 40.0f, -120.0f } }, { 0x09, 0xFF, 0x4242, 0, 0, 60.0f, 1.0f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, diff --git a/soh/src/code/z_play.c b/soh/src/code/z_play.c index 6218b7d76..2934e5e1b 100644 --- a/soh/src/code/z_play.c +++ b/soh/src/code/z_play.c @@ -421,7 +421,7 @@ void Gameplay_Update(GlobalContext* globalCtx) { input = globalCtx->state.input; - if ((SREG(1) < 0) || (DREG(0) != 0)) { + if ((SREG(1) < 0) || (DREG(0) != 0)) { SREG(1) = 0; ZeldaArena_Display(); } diff --git a/soh/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c b/soh/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c index 260fa21ea..9ca8599b9 100644 --- a/soh/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c +++ b/soh/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c @@ -121,8 +121,8 @@ void BgDdanKd_CheckForExplosions(BgDdanKd* this, GlobalContext* globalCtx) { } } -static Vec3f velocity = { 0.0f, 5.0f, 0.0f }; -static Vec3f accel = { 0.0f, -0.45f, 0.0f }; +Vec3f sBgDdanKdVelocity = { 0.0f, 5.0f, 0.0f }; +Vec3f sBgDdanKdAccel = { 0.0f, -0.45f, 0.0f }; void BgDdanKd_LowerStairs(BgDdanKd* this, GlobalContext* globalCtx) { Vec3f pos1; @@ -158,11 +158,11 @@ void BgDdanKd_LowerStairs(BgDdanKd* this, GlobalContext* globalCtx) { func_80033480(globalCtx, &pos1, 20.0f, 1, effectStrength * 135.0f, 60, 1); func_80033480(globalCtx, &pos2, 20.0f, 1, effectStrength * 135.0f, 60, 1); - velocity.x = Rand_CenteredFloat(3.0f); - velocity.z = Rand_CenteredFloat(3.0f); + sBgDdanKdVelocity.x = Rand_CenteredFloat(3.0f); + sBgDdanKdVelocity.z = Rand_CenteredFloat(3.0f); - func_8003555C(globalCtx, &pos1, &velocity, &accel); - func_8003555C(globalCtx, &pos2, &velocity, &accel); + func_8003555C(globalCtx, &pos1, &sBgDdanKdVelocity, &sBgDdanKdAccel); + func_8003555C(globalCtx, &pos2, &sBgDdanKdVelocity, &sBgDdanKdAccel); pos1 = this->dyna.actor.world.pos; pos1.z += 560.0f + Rand_ZeroOne() * 5.0f; @@ -170,7 +170,7 @@ void BgDdanKd_LowerStairs(BgDdanKd* this, GlobalContext* globalCtx) { pos1.y = Rand_ZeroOne() * 3.0f + (this->dyna.actor.floorHeight + 20.0f); func_80033480(globalCtx, &pos1, 20.0f, 1, effectStrength * 135.0f, 60, 1); - func_8003555C(globalCtx, &pos1, &velocity, &accel); + func_8003555C(globalCtx, &pos1, &sBgDdanKdVelocity, &sBgDdanKdAccel); } Camera_AddQuake(&globalCtx->mainCamera, 0, effectStrength * 0.6f, 3); Audio_PlaySoundGeneral(NA_SE_EV_PILLAR_SINK - SFX_FLAG, &this->dyna.actor.projectedPos, 4, &D_801333E0, @@ -192,11 +192,11 @@ void BgDdanKd_Draw(Actor* thisx, GlobalContext* globalCtx) { } void BgDdanKd_Reset(void) { - velocity.x = 0.0f; - velocity.y = 5.0f; - velocity.z = 0.0f; + sBgDdanKdVelocity.x = 0.0f; + sBgDdanKdVelocity.y = 5.0f; + sBgDdanKdVelocity.z = 0.0f; - accel.x = 0.0f; - accel.y = -0.45f; - accel.z = 0.0f; + sBgDdanKdAccel.x = 0.0f; + sBgDdanKdAccel.y = -0.45f; + sBgDdanKdAccel.z = 0.0f; } \ No newline at end of file diff --git a/soh/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c b/soh/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c index a089aa013..dbeb5eb7c 100644 --- a/soh/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c +++ b/soh/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c @@ -74,13 +74,13 @@ static ColliderCylinderInit sColCylinderInitLeftRight = { { 50, 60, 280, { 0, 0, 0 } }, }; -static s16 sFirstExplosiveFlag = false; +s16 sBgDodoagoFirstExplosiveFlag = false; -static u8 sDisableBombCatcher; +u8 sBgDodoagoDisableBombCatcher; -static u8 sUnused[90]; // unknown length +//static u8 sUnused[90]; // unknown length -static s32 sTimer; +s32 sBgDodoagoTimer; void BgDodoago_SetupAction(BgDodoago* this, BgDodoagoActionFunc actionFunc) { this->actionFunc = actionFunc; @@ -135,7 +135,7 @@ void BgDodoago_Init(Actor* thisx, GlobalContext* globalCtx) { Collider_SetCylinder(globalCtx, &this->colliderRight, &this->dyna.actor, &sColCylinderInitLeftRight); BgDodoago_SetupAction(this, BgDodoago_WaitExplosives); - sDisableBombCatcher = false; + sBgDodoagoDisableBombCatcher = false; } void BgDodoago_Destroy(Actor* thisx, GlobalContext* globalCtx) { @@ -170,16 +170,16 @@ void BgDodoago_WaitExplosives(BgDodoago* this, GlobalContext* globalCtx) { } else { OnePointCutscene_Init(globalCtx, 3065, 20, &this->dyna.actor, MAIN_CAM); Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); - sTimer += 30; + sBgDodoagoTimer += 30; return; } // the flag is never set back to false, so this only runs once - if (!sFirstExplosiveFlag) { + if (!sBgDodoagoFirstExplosiveFlag) { // this disables the bomb catcher (see BgDodoago_Update) for a few seconds this->dyna.actor.parent = explosive; - sFirstExplosiveFlag = true; - sTimer = 50; + sBgDodoagoFirstExplosiveFlag = true; + sBgDodoagoTimer = 50; } } else if (Flags_GetEventChkInf(0xB0)) { Collider_UpdateCylinder(&this->dyna.actor, &this->colliderMain); @@ -219,11 +219,11 @@ void BgDodoago_OpenJaw(BgDodoago* this, GlobalContext* globalCtx) { } if (globalCtx->roomCtx.unk_74[BGDODOAGO_EYE_LEFT] != 255 || globalCtx->roomCtx.unk_74[BGDODOAGO_EYE_RIGHT] != 255) { - sTimer--; + sBgDodoagoTimer--; return; } - if (sTimer == 108) { + if (sBgDodoagoTimer == 108) { for (i = ARRAY_COUNT(dustOffsets) - 1; i >= 0; i--) { pos.x = dustOffsets[i].x + this->dyna.actor.world.pos.x; pos.y = dustOffsets[i].y + this->dyna.actor.world.pos.y; @@ -290,16 +290,16 @@ void BgDodoago_Update(Actor* thisx, GlobalContext* globalCtx) { this->dyna.actor.parent = &bomb->actor; bomb->timer = 50; bomb->actor.speedXZ = 0.0f; - sTimer = 0; + sBgDodoagoTimer = 0; } } } else { - sTimer++; + sBgDodoagoTimer++; Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F); - if (!sDisableBombCatcher && sTimer > 140) { + if (!sBgDodoagoDisableBombCatcher && sBgDodoagoTimer > 140) { if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) { // this prevents clearing the actor's parent pointer, effectively disabling the bomb catcher - sDisableBombCatcher++; + sBgDodoagoDisableBombCatcher++; } else { this->dyna.actor.parent = NULL; } @@ -322,7 +322,7 @@ void BgDodoago_Draw(Actor* thisx, GlobalContext* globalCtx) { } void BgDodoago_Reset(void) { - sFirstExplosiveFlag = false; - sDisableBombCatcher = 0; - sTimer = 0; + sBgDodoagoFirstExplosiveFlag = false; + sBgDodoagoDisableBombCatcher = 0; + sBgDodoagoTimer = 0; } \ No newline at end of file diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c b/soh/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c index 46ba447cb..2a4a4420f 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c @@ -47,7 +47,7 @@ void BgHakaGate_SkullOfTruth(BgHakaGate* this, GlobalContext* globalCtx); void BgHakaGate_FalseSkull(BgHakaGate* this, GlobalContext* globalCtx); static s16 sSkullOfTruthRotY = 0x100; -static u8 sPuzzleState = 1; +static u8 sBgPoEventPuzzleState = 1; static f32 sStatueDistToPlayer = 0; static s16 sStatueRotY; @@ -82,7 +82,7 @@ void BgHakaGate_Init(Actor* thisx, GlobalContext* globalCtx) { if (sSkullOfTruthRotY != 0x100) { this->actionFunc = BgHakaGate_FalseSkull; } else if (ABS(thisx->shape.rot.y) < 0x4000) { - if ((Rand_ZeroOne() * 3.0f) < sPuzzleState) { + if ((Rand_ZeroOne() * 3.0f) < sBgPoEventPuzzleState) { this->vIsSkullOfTruth = true; sSkullOfTruthRotY = thisx->shape.rot.y + 0x8000; if (Flags_GetSwitch(globalCtx, this->switchFlag)) { @@ -91,7 +91,7 @@ void BgHakaGate_Init(Actor* thisx, GlobalContext* globalCtx) { this->actionFunc = BgHakaGate_SkullOfTruth; } } else { - sPuzzleState++; + sBgPoEventPuzzleState++; this->actionFunc = BgHakaGate_FalseSkull; } } else { @@ -141,7 +141,7 @@ void BgHakaGate_Destroy(Actor* thisx, GlobalContext* globalCtx) { DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); if (this->dyna.actor.params == BGHAKAGATE_STATUE) { sSkullOfTruthRotY = 0x100; - sPuzzleState = 1; + sBgPoEventPuzzleState = 1; } } @@ -178,7 +178,7 @@ void BgHakaGate_StatueIdle(BgHakaGate* this, GlobalContext* globalCtx) { } } } else { - if (sPuzzleState == SKULL_OF_TRUTH_FOUND) { + if (sBgPoEventPuzzleState == SKULL_OF_TRUTH_FOUND) { this->actionFunc = BgHakaGate_StatueInactive; } else { this->vTimer = 0; @@ -243,7 +243,7 @@ void BgHakaGate_FloorClosed(BgHakaGate* this, GlobalContext* globalCtx) { sStatueDistToPlayer = 0.0f; if (ABS(yawDiff) < 0x80) { Flags_SetSwitch(globalCtx, this->switchFlag); - sPuzzleState = SKULL_OF_TRUTH_FOUND; + sBgPoEventPuzzleState = SKULL_OF_TRUTH_FOUND; this->actionFunc = BgHakaGate_DoNothing; } else { func_80078884(NA_SE_SY_ERROR); diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c b/soh/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c index 83cd8dfd6..877916b67 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c @@ -28,7 +28,7 @@ void func_80880AE8(BgHakaTrap* this, GlobalContext* globalCtx); void func_80880C0C(BgHakaTrap* this, GlobalContext* globalCtx); void func_80880D68(BgHakaTrap* this); -static UNK_TYPE D_80880F30 = 0; +UNK_TYPE D_80880F30 = 0; const ActorInit Bg_Haka_Trap_InitVars = { ACTOR_BG_HAKA_TRAP, @@ -107,7 +107,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), }; -static UNK_TYPE D_80881014 = 0; +UNK_TYPE D_80881014 = 0; void BgHakaTrap_Init(Actor* thisx, GlobalContext* globalCtx) { BgHakaTrap* this = (BgHakaTrap*)thisx; s32 pad; diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c b/soh/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c index 4f7ce9a63..a962dbc2e 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c @@ -120,7 +120,7 @@ void func_8088B24C(BgHidanRock* this) { this->actionFunc = func_8088B990; } -static f32 D_8088BFC0 = 0.0f; +f32 D_8088BFC0 = 0.0f; void func_8088B268(BgHidanRock* this, GlobalContext* globalCtx) { f32 sp2C; s32 temp_v1; diff --git a/soh/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c b/soh/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c index 1d50e6c49..dc1a3b758 100644 --- a/soh/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c +++ b/soh/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c @@ -23,7 +23,7 @@ void BgJya1flift_SetupDoNothing(BgJya1flift* this); void BgJya1flift_ResetMoveDelay(BgJya1flift* this); void BgJya1flift_DelayMove(BgJya1flift* this, GlobalContext* globalCtx); -static u8 sIsSpawned = false; +static u8 sKankyoIsSpawned = false; const ActorInit Bg_Jya_1flift_InitVars = { ACTOR_BG_JYA_1FLIFT, @@ -94,9 +94,9 @@ void BgJya1flift_InitCollision(Actor* thisx, GlobalContext* globalCtx) { void BgJya1flift_Init(Actor* thisx, GlobalContext* globalCtx) { BgJya1flift* this = (BgJya1flift*)thisx; // "1 F lift" - osSyncPrintf("(1Fリフト)(flag %d)(room %d)\n", sIsSpawned, globalCtx->roomCtx.curRoom.num); + osSyncPrintf("(1Fリフト)(flag %d)(room %d)\n", sKankyoIsSpawned, globalCtx->roomCtx.curRoom.num); this->hasInitialized = false; - if (sIsSpawned) { + if (sKankyoIsSpawned) { Actor_Kill(thisx); return; } @@ -109,7 +109,7 @@ void BgJya1flift_Init(Actor* thisx, GlobalContext* globalCtx) { BgJya1flift_SetupWaitForSwitch(this); } thisx->room = -1; - sIsSpawned = true; + sKankyoIsSpawned = true; this->hasInitialized = true; } @@ -117,7 +117,7 @@ void BgJya1flift_Destroy(Actor* thisx, GlobalContext* globalCtx) { BgJya1flift* this = (BgJya1flift*)thisx; if (this->hasInitialized) { - sIsSpawned = false; + sKankyoIsSpawned = false; Collider_DestroyCylinder(globalCtx, &this->collider); DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } diff --git a/soh/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c b/soh/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c index 934329337..e872a4cdf 100644 --- a/soh/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c +++ b/soh/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c @@ -14,7 +14,7 @@ void BgJyaBigmirror_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaBigmirror_Update(Actor* thisx, GlobalContext* globalCtx); void BgJyaBigmirror_Draw(Actor* thisx, GlobalContext* globalCtx); -static u8 sIsSpawned = false; +static u8 sKankyoIsSpawned = false; const ActorInit Bg_Jya_Bigmirror_InitVars = { ACTOR_BG_JYA_BIGMIRROR, @@ -176,7 +176,7 @@ void BgJyaBigmirror_HandleMirRay(Actor* thisx, GlobalContext* globalCtx) { void BgJyaBigmirror_Init(Actor* thisx, GlobalContext* globalCtx) { BgJyaBigmirror* this = (BgJyaBigmirror*)thisx; - if (sIsSpawned) { + if (sKankyoIsSpawned) { Actor_Kill(&this->actor); return; } @@ -185,7 +185,7 @@ void BgJyaBigmirror_Init(Actor* thisx, GlobalContext* globalCtx) { this->cobraInfo[0].rotY = sCobraSpawnData[0].initRotY; this->cobraInfo[1].rotY = sCobraSpawnData[1].initRotY; this->actor.room = -1; - sIsSpawned = true; + sKankyoIsSpawned = true; this->spawned = true; this->mirRayObjIndex = -1; @@ -197,7 +197,7 @@ void BgJyaBigmirror_Destroy(Actor* thisx, GlobalContext* globalCtx) { BgJyaBigmirror* this = (BgJyaBigmirror*)thisx; if (this->spawned) { - sIsSpawned = false; + sKankyoIsSpawned = false; } } diff --git a/soh/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c b/soh/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c index f57c64b84..57c7ac413 100644 --- a/soh/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c +++ b/soh/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c @@ -20,7 +20,7 @@ void BgJyaLift_DelayMove(BgJyaLift* this, GlobalContext* globalCtx); void BgJyaLift_SetupMove(BgJyaLift* this); void BgJyaLift_Move(BgJyaLift* this, GlobalContext* globalCtx); -static s16 sIsSpawned = false; +static s16 sKankyoIsSpawned = false; const ActorInit Bg_Jya_Lift_InitVars = { ACTOR_BG_JYA_LIFT, @@ -55,7 +55,7 @@ void BgJyaLift_Init(Actor* thisx, GlobalContext* globalCtx) { BgJyaLift* this = (BgJyaLift*)thisx; this->isSpawned = false; - if (sIsSpawned) { + if (sKankyoIsSpawned) { Actor_Kill(thisx); return; } @@ -70,7 +70,7 @@ void BgJyaLift_Init(Actor* thisx, GlobalContext* globalCtx) { BgJyaLift_SetInitPosY(this); } thisx->room = -1; - sIsSpawned = true; + sKankyoIsSpawned = true; this->isSpawned = true; } @@ -81,7 +81,7 @@ void BgJyaLift_Destroy(Actor* thisx, GlobalContext* globalCtx) { // "Goddess Lift DT" osSyncPrintf("女神リフト DT\n"); - sIsSpawned = false; + sKankyoIsSpawned = false; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } } diff --git a/soh/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c b/soh/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c index 70360c423..a8871b50c 100644 --- a/soh/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c +++ b/soh/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c @@ -28,7 +28,7 @@ const ActorInit Bg_Menkuri_Eye_InitVars = { (ActorResetFunc)BgMenkuriEye_Reset, }; -static s32 D_8089C1A0; +s32 D_8089C1A0; static ColliderJntSphElementInit sJntSphElementsInit[1] = { { diff --git a/soh/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c b/soh/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c index edda63bbb..269b5e411 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c +++ b/soh/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c @@ -17,7 +17,7 @@ void func_808A2008(BgMoriElevator* this, GlobalContext* globalCtx); void BgMoriElevator_MoveIntoGround(BgMoriElevator* this, GlobalContext* globalCtx); void BgMoriElevator_MoveAboveGround(BgMoriElevator* this, GlobalContext* globalCtx); -static s16 sIsSpawned = false; +static s16 sKankyoIsSpawned = false; const ActorInit Bg_Mori_Elevator_InitVars = { ACTOR_BG_MORI_ELEVATOR, @@ -87,18 +87,18 @@ void BgMoriElevator_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; CollisionHeader* colHeader = NULL; - this->unk_172 = sIsSpawned; + this->unk_172 = sKankyoIsSpawned; this->moriTexObjIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_MORI_TEX); if (this->moriTexObjIndex < 0) { Actor_Kill(thisx); // "Forest Temple obj elevator Bank Danger!" osSyncPrintf("Error : 森ã®ç¥žæ®¿ obj elevator ãƒãƒ³ã‚¯å±é™ºï¼(%s %d)\n", "../z_bg_mori_elevator.c", 277); } else { - switch (sIsSpawned) { + switch (sKankyoIsSpawned) { case false: // "Forest Temple elevator CT" osSyncPrintf("森ã®ç¥žæ®¿ elevator CT\n"); - sIsSpawned = true; + sKankyoIsSpawned = true; this->dyna.actor.room = -1; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, DPM_PLAYER); @@ -120,7 +120,7 @@ void BgMoriElevator_Destroy(Actor* thisx, GlobalContext* globalCtx) { // "Forest Temple elevator DT" osSyncPrintf("森ã®ç¥žæ®¿ elevator DT\n"); DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); - sIsSpawned = false; + sKankyoIsSpawned = false; } } diff --git a/soh/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c b/soh/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c index 8dfbff765..7508b6a24 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c +++ b/soh/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c @@ -28,7 +28,7 @@ void BgMoriHineri_SpawnBossKeyChest(BgMoriHineri* this, GlobalContext* globalCtx void BgMoriHineri_DoNothing(BgMoriHineri* this, GlobalContext* globalCtx); void func_808A3D58(BgMoriHineri* this, GlobalContext* globalCtx); -static s16 sNextCamIdx = SUBCAM_NONE; +s16 sBgMoriHineriNextCamIdx = SUBCAM_NONE; const ActorInit Bg_Mori_Hineri_InitVars = { ACTOR_BG_MORI_HINERI, @@ -194,28 +194,28 @@ void func_808A3D58(BgMoriHineri* this, GlobalContext* globalCtx) { OnePointCutscene_EndCutscene(globalCtx, mainCamChildIdx); } OnePointCutscene_Init(globalCtx, 3260, 40, &this->dyna.actor, MAIN_CAM); - sNextCamIdx = OnePointCutscene_Init(globalCtx, 3261, 40, &this->dyna.actor, MAIN_CAM); + sBgMoriHineriNextCamIdx = OnePointCutscene_Init(globalCtx, 3261, 40, &this->dyna.actor, MAIN_CAM); } } void func_808A3E54(BgMoriHineri* this, GlobalContext* globalCtx) { s8 objBankIndex; - if (globalCtx->activeCamera == sNextCamIdx) { - if (sNextCamIdx != MAIN_CAM) { + if (globalCtx->activeCamera == sBgMoriHineriNextCamIdx) { + if (sBgMoriHineriNextCamIdx != MAIN_CAM) { objBankIndex = this->dyna.actor.objBankIndex; this->dyna.actor.objBankIndex = this->moriHineriObjIdx; this->moriHineriObjIdx = objBankIndex; this->dyna.actor.params ^= 1; - sNextCamIdx = MAIN_CAM; + sBgMoriHineriNextCamIdx = MAIN_CAM; func_80078884(NA_SE_SY_TRE_BOX_APPEAR); } else { this->dyna.actor.draw = NULL; this->actionFunc = func_808A3D58; - sNextCamIdx = SUBCAM_NONE; + sBgMoriHineriNextCamIdx = SUBCAM_NONE; } } - if ((sNextCamIdx >= SUBCAM_FIRST) && + if ((sBgMoriHineriNextCamIdx >= SUBCAM_FIRST) && ((GET_ACTIVE_CAM(globalCtx)->eye.z - this->dyna.actor.world.pos.z) < 1100.0f)) { func_8002F948(&this->dyna.actor, NA_SE_EV_FLOOR_ROLLING - SFX_FLAG); } @@ -283,5 +283,5 @@ void BgMoriHineri_DrawHallAndRoom(Actor* thisx, GlobalContext* globalCtx) { } void BgMoriHineri_Reset() { - sNextCamIdx = SUBCAM_NONE; + sBgMoriHineriNextCamIdx = SUBCAM_NONE; } \ No newline at end of file diff --git a/soh/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c b/soh/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c index 3c605926f..962c4d1aa 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c +++ b/soh/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c @@ -19,7 +19,7 @@ void BgMoriIdomizu_WaitForMoriTex(BgMoriIdomizu* this, GlobalContext* globalCtx) void BgMoriIdomizu_SetupMain(BgMoriIdomizu* this); void BgMoriIdomizu_Main(BgMoriIdomizu* this, GlobalContext* globalCtx); -static s16 sIsSpawned = false; +static s16 sKankyoIsSpawned = false; const ActorInit Bg_Mori_Idomizu_InitVars = { ACTOR_BG_MORI_IDOMIZU, @@ -50,7 +50,7 @@ void BgMoriIdomizu_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; BgMoriIdomizu* this = (BgMoriIdomizu*)thisx; - if (sIsSpawned) { + if (sKankyoIsSpawned) { Actor_Kill(&this->actor); return; } @@ -76,7 +76,7 @@ void BgMoriIdomizu_Init(Actor* thisx, GlobalContext* globalCtx) { return; } BgMoriIdomizu_SetupWaitForMoriTex(this); - sIsSpawned = true; + sKankyoIsSpawned = true; this->isLoaded = true; this->actor.room = -1; // "Forest Temple well water" @@ -88,7 +88,7 @@ void BgMoriIdomizu_Destroy(Actor* thisx, GlobalContext* globalCtx) { BgMoriIdomizu* this = (BgMoriIdomizu*)thisx; if (this->isLoaded) { - sIsSpawned = false; + sKankyoIsSpawned = false; } } diff --git a/soh/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c b/soh/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c index efceb7939..c2ed8a29b 100644 --- a/soh/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c +++ b/soh/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c @@ -80,11 +80,11 @@ static ColliderTrisInit sTrisInit = { sTrisElementsInit, }; -static u8 sBlocksAtRest = 0; +u8 sBgPoEventBlocksAtRest = 0; static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f }; -static u8 sPuzzleState; +u8 sBgPoEventPuzzleState; void BgPoEvent_InitPaintings(BgPoEvent* this, GlobalContext* globalCtx) { static s16 paintingPosX[] = { -1302, -866, 1421, 985 }; @@ -142,10 +142,10 @@ void BgPoEvent_InitPaintings(BgPoEvent* this, GlobalContext* globalCtx) { } this->timer = 0; if (this->type == 4) { - sPuzzleState = 0; + sBgPoEventPuzzleState = 0; this->actionFunc = BgPoEvent_AmyWait; } else { - sPuzzleState = (s32)(Rand_ZeroOne() * 3.0f) % 3; + sBgPoEventPuzzleState = (s32)(Rand_ZeroOne() * 3.0f) % 3; this->actionFunc = BgPoEvent_PaintingEmpty; } } @@ -236,7 +236,7 @@ void BgPoEvent_Destroy(Actor* thisx, GlobalContext* globalCtx) { void BgPoEvent_BlockWait(BgPoEvent* this, GlobalContext* globalCtx) { this->dyna.actor.world.pos.y = 833.0f; - if (sPuzzleState == 0x3F) { + if (sBgPoEventPuzzleState == 0x3F) { if (this->type == 1) { OnePointCutscene_Init(globalCtx, 3150, 65, NULL, MAIN_CAM); } @@ -244,14 +244,14 @@ void BgPoEvent_BlockWait(BgPoEvent* this, GlobalContext* globalCtx) { this->actionFunc = BgPoEvent_BlockShake; } else if (this->dyna.actor.xzDistToPlayer > 50.0f) { if (this->type != 1) { - sPuzzleState |= (1 << this->index); + sBgPoEventPuzzleState |= (1 << this->index); } else { - sPuzzleState |= 0x10; + sBgPoEventPuzzleState |= 0x10; } } else if (this->type != 1) { - sPuzzleState &= ~(1 << this->index); + sBgPoEventPuzzleState &= ~(1 << this->index); } else { - sPuzzleState &= ~0x10; + sBgPoEventPuzzleState &= ~0x10; } } @@ -265,7 +265,7 @@ void BgPoEvent_BlockShake(BgPoEvent* this, GlobalContext* globalCtx) { } if (this->timer == 0) { this->dyna.actor.world.pos.x = this->dyna.actor.home.pos.x; - sPuzzleState = 0; + sBgPoEventPuzzleState = 0; this->timer = 60; this->actionFunc = BgPoEvent_BlockFall; } @@ -299,9 +299,9 @@ void BgPoEvent_CheckBlock(BgPoEvent* this) { } } if ((phi_v1 == phi_a1) && ((phi_t0 - phi_a3) == 60)) { - sPuzzleState |= (1 << this->index); + sBgPoEventPuzzleState |= (1 << this->index); } else { - sPuzzleState &= ~(1 << this->index); + sBgPoEventPuzzleState &= ~(1 << this->index); } } @@ -312,7 +312,7 @@ void BgPoEvent_BlockFall(BgPoEvent* this, GlobalContext* globalCtx) { if (Math_StepToF(&this->dyna.actor.world.pos.y, 433.0f, this->dyna.actor.velocity.y)) { this->dyna.actor.flags &= ~ACTOR_FLAG_5; this->dyna.actor.velocity.y = 0.0f; - sBlocksAtRest++; + sBgPoEventBlocksAtRest++; if (this->type != 1) { BgPoEvent_CheckBlock(this); } else { @@ -334,7 +334,7 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, GlobalContext* globalCtx) { Player* player = GET_PLAYER(globalCtx); Actor* amy; - if (sPuzzleState == 0xF) { + if (sBgPoEventPuzzleState == 0xF) { this->actionFunc = BgPoEvent_BlockSolved; if ((this->type == 0) && (this->index == 0)) { amy = @@ -348,23 +348,23 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, GlobalContext* globalCtx) { gSaveContext.timer1State = 0xA; } } else { - if ((gSaveContext.timer1Value == 0) && (sBlocksAtRest == 5)) { + if ((gSaveContext.timer1Value == 0) && (sBgPoEventBlocksAtRest == 5)) { player->stateFlags2 &= ~0x10; - sPuzzleState = 0x10; - sBlocksAtRest = 0; + sBgPoEventPuzzleState = 0x10; + sBgPoEventBlocksAtRest = 0; } - if ((sPuzzleState == 0x40) || ((sPuzzleState == 0x10) && !Player_InCsMode(globalCtx))) { + if ((sBgPoEventPuzzleState == 0x40) || ((sBgPoEventPuzzleState == 0x10) && !Player_InCsMode(globalCtx))) { this->dyna.actor.world.rot.z = this->dyna.actor.shape.rot.z; this->actionFunc = BgPoEvent_BlockReset; - if (sPuzzleState == 0x10) { - sPuzzleState = 0x40; + if (sBgPoEventPuzzleState == 0x10) { + sBgPoEventPuzzleState = 0x40; Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_RISING); func_8002DF54(globalCtx, &player->actor, 8); } } else if (this->dyna.unk_150 != 0.0f) { if (this->direction == 0) { if (func_800435D8(globalCtx, &this->dyna, 0x1E, 0x32, -0x14) != 0) { - sBlocksAtRest--; + sBgPoEventBlocksAtRest--; this->direction = (this->dyna.unk_150 >= 0.0f) ? 1.0f : -1.0f; this->actionFunc = BgPoEvent_BlockPush; } else { @@ -382,7 +382,7 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, GlobalContext* globalCtx) { } } -static f32 blockPushDist = 0.0f; +f32 sBgPoEventblockPushDist = 0.0f; void BgPoEvent_BlockPush(BgPoEvent* this, GlobalContext* globalCtx) { f32 displacement; s32 blockStop; @@ -390,8 +390,8 @@ void BgPoEvent_BlockPush(BgPoEvent* this, GlobalContext* globalCtx) { this->dyna.actor.speedXZ += CVar_GetS32("gFasterBlockPush", 0) != 0 ? 0.5f : 0.1f; this->dyna.actor.speedXZ = CLAMP_MAX(this->dyna.actor.speedXZ, 2.0f); - blockStop = Math_StepToF(&blockPushDist, 20.0f, this->dyna.actor.speedXZ); - displacement = this->direction * blockPushDist; + blockStop = Math_StepToF(&sBgPoEventblockPushDist, 20.0f, this->dyna.actor.speedXZ); + displacement = this->direction * sBgPoEventblockPushDist; this->dyna.actor.world.pos.x = (Math_SinS(this->dyna.unk_158) * displacement) + this->dyna.actor.home.pos.x; this->dyna.actor.world.pos.z = (Math_CosS(this->dyna.unk_158) * displacement) + this->dyna.actor.home.pos.z; if (blockStop) { @@ -402,10 +402,10 @@ void BgPoEvent_BlockPush(BgPoEvent* this, GlobalContext* globalCtx) { this->dyna.unk_150 = 0.0f; this->dyna.actor.home.pos.x = this->dyna.actor.world.pos.x; this->dyna.actor.home.pos.z = this->dyna.actor.world.pos.z; - blockPushDist = 0.0f; + sBgPoEventblockPushDist = 0.0f; this->dyna.actor.speedXZ = 0.0f; this->direction = CVar_GetS32("gFasterBlockPush", 0) != 0 ? 3 : 5; - sBlocksAtRest++; + sBgPoEventBlocksAtRest++; this->actionFunc = BgPoEvent_BlockIdle; if (this->type == 1) { return; @@ -428,7 +428,7 @@ void BgPoEvent_BlockReset(BgPoEvent* this, GlobalContext* globalCtx) { this->index = (this->index + 1) % 4; this->actionFunc = BgPoEvent_BlockFall; - sPuzzleState = 0; + sBgPoEventPuzzleState = 0; if (this->type == 1) { this->timer += 10; this->timer = CLAMP_MAX(this->timer, 120); @@ -443,14 +443,14 @@ void BgPoEvent_BlockSolved(BgPoEvent* this, GlobalContext* globalCtx) { player->stateFlags2 &= ~0x10; } if (Math_StepToF(&this->dyna.actor.world.pos.y, 369.0f, 2.0f)) { - sPuzzleState = 0x20; + sBgPoEventPuzzleState = 0x20; Actor_Kill(&this->dyna.actor); } } void BgPoEvent_AmyWait(BgPoEvent* this, GlobalContext* globalCtx) { if (this->collider.base.acFlags & AC_HIT) { - sPuzzleState |= 0x20; + sBgPoEventPuzzleState |= 0x20; this->timer = 5; Actor_SetColorFilter(&this->dyna.actor, 0x4000, 0xFF, 0, 5); Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EN_PO_LAUGH2); @@ -461,12 +461,12 @@ void BgPoEvent_AmyWait(BgPoEvent* this, GlobalContext* globalCtx) { void BgPoEvent_AmyPuzzle(BgPoEvent* this, GlobalContext* globalCtx) { Vec3f pos; - if (sPuzzleState == 0xF) { + if (sBgPoEventPuzzleState == 0xF) { pos.x = this->dyna.actor.world.pos.x - 5.0f; pos.y = Rand_CenteredFloat(120.0f) + this->dyna.actor.world.pos.y; pos.z = Rand_CenteredFloat(120.0f) + this->dyna.actor.world.pos.z; EffectSsDeadDb_Spawn(globalCtx, &pos, &sZeroVec, &sZeroVec, 170, 0, 200, 255, 100, 170, 0, 255, 0, 1, 9, true); - } else if (sPuzzleState == 0x20) { + } else if (sBgPoEventPuzzleState == 0x20) { Actor_Kill(&this->dyna.actor); } else { DECR(this->timer); @@ -476,14 +476,14 @@ void BgPoEvent_AmyPuzzle(BgPoEvent* this, GlobalContext* globalCtx) { s32 BgPoEvent_NextPainting(BgPoEvent* this) { if ((this->dyna.actor.parent != NULL) && (this->dyna.actor.child != NULL)) { if (Rand_ZeroOne() < 0.5f) { - sPuzzleState = ((BgPoEvent*)this->dyna.actor.parent)->index; + sBgPoEventPuzzleState = ((BgPoEvent*)this->dyna.actor.parent)->index; } else { - sPuzzleState = ((BgPoEvent*)this->dyna.actor.child)->index; + sBgPoEventPuzzleState = ((BgPoEvent*)this->dyna.actor.child)->index; } } else if (this->dyna.actor.parent != NULL) { - sPuzzleState = ((BgPoEvent*)this->dyna.actor.parent)->index; + sBgPoEventPuzzleState = ((BgPoEvent*)this->dyna.actor.parent)->index; } else if (this->dyna.actor.child != NULL) { - sPuzzleState = ((BgPoEvent*)this->dyna.actor.child)->index; + sBgPoEventPuzzleState = ((BgPoEvent*)this->dyna.actor.child)->index; } else { return false; } @@ -491,7 +491,7 @@ s32 BgPoEvent_NextPainting(BgPoEvent* this) { } void BgPoEvent_PaintingEmpty(BgPoEvent* this, GlobalContext* globalCtx) { - if (sPuzzleState == this->index) { + if (sBgPoEventPuzzleState == this->index) { this->timer = 255; this->actionFunc = BgPoEvent_PaintingAppear; } @@ -636,7 +636,7 @@ void BgPoEvent_Draw(Actor* thisx, GlobalContext* globalCtx) { } void BgPoEvent_Reset(void) { - sBlocksAtRest = 0; - sPuzzleState = 0; - blockPushDist = 0.0f; + sBgPoEventBlocksAtRest = 0; + sBgPoEventPuzzleState = 0; + sBgPoEventblockPushDist = 0.0f; } \ No newline at end of file diff --git a/soh/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c b/soh/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c index 33e94d172..58d0f62d8 100644 --- a/soh/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c +++ b/soh/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c @@ -45,7 +45,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), }; -static u32 D_808A9508 = 0; +u32 D_808A9508 = 0; void BgRelayObjects_Init(Actor* thisx, GlobalContext* globalCtx) { BgRelayObjects* this = (BgRelayObjects*)thisx; s32 pad; diff --git a/soh/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c b/soh/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c index 2e9297e4c..caa727c69 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c @@ -84,7 +84,7 @@ void func_808B7710(Actor* thisx, GlobalContext* globalCtx) { this->dyna.actor.colChkInfo.mass = MASS_IMMOVABLE; } -static s16 D_808B85D0 = 0; +s16 D_808B85D0 = 0; void func_808B7770(BgSpot18Basket* this, GlobalContext* globalCtx, f32 arg2) { Vec3f acceleration; Vec3f velocity; diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c index e4a5afc65..f7132bcaf 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c @@ -105,35 +105,17 @@ static ColliderCylinderInit sLightBallCylinderInit = { static u8 D_808E4C58[] = { 0, 12, 10, 12, 14, 16, 12, 14, 16, 12, 14, 16, 12, 14, 16, 10, 16, 14 }; static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f }; -static EnGanonMant* sCape; +EnGanonMant* sBossGanonCape; -static s32 sSeed1; -static s32 sSeed2; -static s32 sSeed3; +s32 sBossGanonSeed1; +s32 sBossGanonSeed3; +s32 sBossGanonSeed2; -static BossGanon* sGanondorf; +BossGanon* sBossGanonGanondorf; -static EnZl3* sZelda; +EnZl3* sBossGanonZelda; -typedef struct { - /* 0x00 */ u8 type; - /* 0x01 */ u8 timer; - /* 0x04 */ Vec3f pos; - /* 0x10 */ Vec3f velocity; - /* 0x1C */ Vec3f accel; - /* 0x28 */ Color_RGB8 color; - /* 0x2C */ s16 alpha; - /* 0x2E */ s16 unk_2E; - /* 0x30 */ s16 unk_30; - /* 0x34 */ f32 scale; - /* 0x38 */ f32 unk_38; // scale target mostly, but used for other things - /* 0x3C */ f32 unk_3C; // mostly z rot - /* 0x40 */ f32 unk_40; - /* 0x44 */ f32 unk_44; // mostly x rot - /* 0x48 */ f32 unk_48; // mostly y rot -} GanondorfEffect; // size = 0x4C - -GanondorfEffect sEffectBuf[200]; +GanondorfEffect sBossGanonEffectBuf[200]; void BossGanonEff_SpawnWindowShard(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, f32 scale) { static Color_RGB8 shardColors[] = { { 255, 175, 85 }, { 155, 205, 155 }, { 155, 125, 55 } }; @@ -348,13 +330,13 @@ void BossGanon_Init(Actor* thisx, GlobalContext* globalCtx2) { if (thisx->params < 0x64) { Flags_SetSwitch(globalCtx, 0x14); - globalCtx->specialEffects = sEffectBuf; + globalCtx->specialEffects = sBossGanonEffectBuf; - for (i = 0; i < ARRAY_COUNT(sEffectBuf); i++) { - sEffectBuf[i].type = GDF_EFF_NONE; + for (i = 0; i < ARRAY_COUNT(sBossGanonEffectBuf); i++) { + sBossGanonEffectBuf[i].type = GDF_EFF_NONE; } - sGanondorf = this; + sBossGanonGanondorf = this; thisx->colChkInfo.health = 40; Actor_ProcessInitChain(thisx, sInitChain); ActorShape_Init(&thisx->shape, 0, NULL, 0); @@ -381,7 +363,7 @@ void BossGanon_Init(Actor* thisx, GlobalContext* globalCtx2) { BossGanon_SetupTowerCutscene(this, globalCtx); } - sCape = (EnGanonMant*)Actor_SpawnAsChild(&globalCtx->actorCtx, thisx, globalCtx, ACTOR_EN_GANON_MANT, 0.0f, + sBossGanonCape = (EnGanonMant*)Actor_SpawnAsChild(&globalCtx->actorCtx, thisx, globalCtx, ACTOR_EN_GANON_MANT, 0.0f, 0.0f, 0.0f, 0, 0, 0, 1); Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, thisx, ACTORCAT_BOSS); } else { @@ -538,10 +520,10 @@ void BossGanon_IntroCutscene(BossGanon* this, GlobalContext* globalCtx) { gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->animBankIndex].segment); - sCape->backPush = -2.0f; - sCape->backSwayMagnitude = 0.25f; - sCape->sideSwayMagnitude = -1.0f; - sCape->minDist = 0.0f; + sBossGanonCape->backPush = -2.0f; + sBossGanonCape->backSwayMagnitude = 0.25f; + sBossGanonCape->sideSwayMagnitude = -1.0f; + sBossGanonCape->minDist = 0.0f; this->csTimer++; @@ -584,13 +566,13 @@ void BossGanon_IntroCutscene(BossGanon* this, GlobalContext* globalCtx) { this->useOpenHand = true; BossGanon_SetIntroCsCamera(this, 0); this->csState = 1; - sZelda = (EnZl3*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_ZL3, 0.0f, + sBossGanonZelda = (EnZl3*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_ZL3, 0.0f, 220.0f, -150.0f, 0, 0, 0, 0x2000); } Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_GANON_ORGAN, 0.0f, 0.0f, 0.0f, 0, 0, 0, 1); - sCape->minY = 57.0f; + sBossGanonCape->minY = 57.0f; // fallthrough case 1: this->envLightMode = 3; @@ -736,7 +718,7 @@ void BossGanon_IntroCutscene(BossGanon* this, GlobalContext* globalCtx) { this->csState = 9; this->csTimer = 0; func_8002DF54(globalCtx, &this->actor, 8); - sZelda->unk_3C8 = 0; + sBossGanonZelda->unk_3C8 = 0; this->triforceType = GDF_TRIFORCE_ZELDA; this->fwork[GDF_TRIFORCE_SCALE] = 10.0f; this->fwork[GDF_TRIFORCE_PRIM_A] = 0.0f; @@ -755,7 +737,7 @@ void BossGanon_IntroCutscene(BossGanon* this, GlobalContext* globalCtx) { Math_ApproachF(&this->fwork[GDF_TRIFORCE_ENV_G], 200.0f, 1.0f, 3.0f); if (this->csTimer == 30) { - sZelda->unk_3C8 = 1; + sBossGanonZelda->unk_3C8 = 1; } if (this->csTimer >= 32) { @@ -847,7 +829,7 @@ void BossGanon_IntroCutscene(BossGanon* this, GlobalContext* globalCtx) { this->csTimer = 0; BossGanon_SetIntroCsCamera(this, 11); this->unk_198 = 2; - sZelda->unk_3C8 = 2; + sBossGanonZelda->unk_3C8 = 2; this->timers[2] = 110; this->envLightMode = 3; } @@ -883,7 +865,7 @@ void BossGanon_IntroCutscene(BossGanon* this, GlobalContext* globalCtx) { if (this->csTimer > 10) { if (this->csTimer == 62) { - sCape->attachRightArmTimer = 20.0f; + sBossGanonCape->attachRightArmTimer = 20.0f; } if (this->csTimer == 57) { @@ -1076,7 +1058,7 @@ void BossGanon_IntroCutscene(BossGanon* this, GlobalContext* globalCtx) { Animation_MorphToPlayOnce(&this->skelAnime, &gDorfGetUp3Anim, 0.0f); SkelAnime_Update(&this->skelAnime); this->actor.shape.yOffset = 0.0f; - sCape->attachShouldersTimer = 18.0f; + sBossGanonCape->attachShouldersTimer = 18.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EV_GANON_MANTLE); this->unk_198 = 0; Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_GANONDORF_BOSS); @@ -1101,9 +1083,9 @@ void BossGanon_IntroCutscene(BossGanon* this, GlobalContext* globalCtx) { Math_ApproachF(&this->actor.world.pos.y, 228.0f, 0.05f, 2.0f); Math_ApproachF(&this->actor.world.pos.z, -230.0f, 0.05f, 4.0f); - sCape->backPush = -3.0f; - sCape->backSwayMagnitude = 0.25f; - sCape->sideSwayMagnitude = -3.0f; + sBossGanonCape->backPush = -3.0f; + sBossGanonCape->backSwayMagnitude = 0.25f; + sBossGanonCape->sideSwayMagnitude = -3.0f; sin = Math_SinS(this->csTimer * 1500); this->actor.velocity.y = this->fwork[GDF_FWORK_0] * sin * 0.04f; @@ -1136,10 +1118,10 @@ void BossGanon_IntroCutscene(BossGanon* this, GlobalContext* globalCtx) { BossGanon_SetupWait(this, globalCtx); } - if (sZelda != NULL) { - sZelda->actor.world.pos.x = 0.0f; - sZelda->actor.world.pos.y = 350.0f; - sZelda->actor.world.pos.z = 0.0f; + if (sBossGanonZelda != NULL) { + sBossGanonZelda->actor.world.pos.x = 0.0f; + sBossGanonZelda->actor.world.pos.y = 350.0f; + sBossGanonZelda->actor.world.pos.z = 0.0f; } } @@ -1529,7 +1511,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, GlobalContext* globalCtx) this->fwork[1] = Animation_GetLastFrame(&object_ganon_anime2_Anim_00EA00); this->csState = 101; this->skelAnime.playSpeed = 0.0f; - sZelda = (EnZl3*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_ZL3, 0.0f, + sBossGanonZelda = (EnZl3*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_ZL3, 0.0f, 6000.0f, 0.0f, 0, 0, 0, 0x2000); player->actor.world.pos.x = -472.0f; @@ -1551,12 +1533,12 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, GlobalContext* globalCtx) this->csCamAt.z = -100.0f; - sCape->backPush = -2.0f; - sCape->backSwayMagnitude = 0.25f; - sCape->sideSwayMagnitude = -1.0f; - sCape->minDist = 0.0f; - sCape->minY = 4104.0f; - sCape->tearTimer = 20; + sBossGanonCape->backPush = -2.0f; + sBossGanonCape->backSwayMagnitude = 0.25f; + sBossGanonCape->sideSwayMagnitude = -1.0f; + sBossGanonCape->minDist = 0.0f; + sBossGanonCape->minY = 4104.0f; + sBossGanonCape->tearTimer = 20; this->whiteFillAlpha = 255.0f; globalCtx->envCtx.unk_D8 = 1.0f; @@ -1620,27 +1602,27 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, GlobalContext* globalCtx) if (this->csTimer == 90) { this->csState = 103; this->csTimer = 0; - sZelda->actor.world.pos.x = -472.0f; - sZelda->actor.world.pos.y = 4352.0f; - sZelda->actor.world.pos.z = -200.0f; - sZelda->unk_3C8 = 3; + sBossGanonZelda->actor.world.pos.x = -472.0f; + sBossGanonZelda->actor.world.pos.y = 4352.0f; + sBossGanonZelda->actor.world.pos.z = -200.0f; + sBossGanonZelda->unk_3C8 = 3; } break; case 103: - Audio_PlayActorSound2(&sZelda->actor, NA_SE_EV_DOWN_TO_GROUND - SFX_FLAG); - Math_ApproachF(&sZelda->actor.world.pos.y, 4102.0f, 0.05f, 1.5f); + Audio_PlayActorSound2(&sBossGanonZelda->actor, NA_SE_EV_DOWN_TO_GROUND - SFX_FLAG); + Math_ApproachF(&sBossGanonZelda->actor.world.pos.y, 4102.0f, 0.05f, 1.5f); this->csCamEye.x = -242.0f; this->csCamEye.y = 4122.0f; this->csCamEye.z = -190.0f; - this->csCamAt.x = sZelda->actor.world.pos.x; - this->csCamAt.y = sZelda->actor.world.pos.y + 40.0f + 5.0f; - this->csCamAt.z = sZelda->actor.world.pos.z; + this->csCamAt.x = sBossGanonZelda->actor.world.pos.x; + this->csCamAt.y = sBossGanonZelda->actor.world.pos.y + 40.0f + 5.0f; + this->csCamAt.z = sBossGanonZelda->actor.world.pos.z; if (this->csTimer == 200) { - sZelda->actor.world.pos.y = 4102.0f; + sBossGanonZelda->actor.world.pos.y = 4102.0f; this->csState = 104; this->csTimer = 0; } else { @@ -1652,20 +1634,20 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, GlobalContext* globalCtx) this->csCamEye.y = 4147.0f; this->csCamEye.z = -200.0f; - this->csCamAt.x = sZelda->actor.world.pos.x; - this->csCamAt.y = sZelda->actor.world.pos.y + 40.0f + 5.0f; - this->csCamAt.z = sZelda->actor.world.pos.z; + this->csCamAt.x = sBossGanonZelda->actor.world.pos.x; + this->csCamAt.y = sBossGanonZelda->actor.world.pos.y + 40.0f + 5.0f; + this->csCamAt.z = sBossGanonZelda->actor.world.pos.z; if (this->csTimer >= 10) { Math_ApproachZeroF(&globalCtx->envCtx.unk_D8, 1.0f, 0.05f); } if (this->csTimer == 10) { - sZelda->unk_3C8 = 8; + sBossGanonZelda->unk_3C8 = 8; } if (this->csTimer == 50) { - sZelda->unk_3C8 = 4; + sBossGanonZelda->unk_3C8 = 4; } if (this->csTimer == 100) { @@ -1679,9 +1661,9 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, GlobalContext* globalCtx) this->csCamEye.y = 4154.0f; this->csCamEye.z = -182.0f; - this->csCamAt.x = sZelda->actor.world.pos.x - 5.0f; - this->csCamAt.y = sZelda->actor.world.pos.y + 40.0f + 5.0f; - this->csCamAt.z = sZelda->actor.world.pos.z - 25.0f; + this->csCamAt.x = sBossGanonZelda->actor.world.pos.x - 5.0f; + this->csCamAt.y = sBossGanonZelda->actor.world.pos.y + 40.0f + 5.0f; + this->csCamAt.z = sBossGanonZelda->actor.world.pos.z - 25.0f; if (this->csTimer == 10) { Message_StartTextbox(globalCtx, 0x70D0, NULL); @@ -1698,7 +1680,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, GlobalContext* globalCtx) func_80078884(NA_SE_EV_EARTHQUAKE - SFX_FLAG); if (this->csTimer == 20) { - sZelda->unk_3C8 = 5; + sBossGanonZelda->unk_3C8 = 5; func_8002DF54(globalCtx, &this->actor, 0x39); } @@ -1747,15 +1729,15 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, GlobalContext* globalCtx) this->csCamEye.y = 4154.0f; this->csCamEye.z = -182.0f; - this->csCamAt.x = sZelda->actor.world.pos.x - 5.0f; - this->csCamAt.y = sZelda->actor.world.pos.y + 40.0f + 5.0f; - this->csCamAt.z = sZelda->actor.world.pos.z - 25.0f; + this->csCamAt.x = sBossGanonZelda->actor.world.pos.x - 5.0f; + this->csCamAt.y = sBossGanonZelda->actor.world.pos.y + 40.0f + 5.0f; + this->csCamAt.z = sBossGanonZelda->actor.world.pos.z - 25.0f; this->unk_70C = Math_SinS(this->csTimer * 0x6300) * 0.3f; func_80078884(NA_SE_EV_EARTHQUAKE - SFX_FLAG); if (this->csTimer == 70) { - sZelda->unk_3C8 = 6; + sBossGanonZelda->unk_3C8 = 6; } if (this->csTimer == 90) { @@ -1778,12 +1760,12 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, GlobalContext* globalCtx) this->csCamEye.y = 4154.0f; this->csCamEye.z = -242.0f; - this->csCamAt.x = (sZelda->actor.world.pos.x - 5.0f) - 30.0f; - this->csCamAt.y = (sZelda->actor.world.pos.y + 40.0f + 5.0f) - 20.0f; - this->csCamAt.z = (sZelda->actor.world.pos.z - 25.0f) + 80.0f; + this->csCamAt.x = (sBossGanonZelda->actor.world.pos.x - 5.0f) - 30.0f; + this->csCamAt.y = (sBossGanonZelda->actor.world.pos.y + 40.0f + 5.0f) - 20.0f; + this->csCamAt.z = (sBossGanonZelda->actor.world.pos.z - 25.0f) + 80.0f; if ((this->csTimer > 50) && (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_NONE)) { - sZelda->unk_3C8 = 7; + sBossGanonZelda->unk_3C8 = 7; this->csState = 108; this->csTimer = 0; } @@ -1793,9 +1775,9 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, GlobalContext* globalCtx) this->unk_70C = Math_SinS(this->csTimer * 0x6300) * 0.8f; func_80078884(NA_SE_EV_EARTHQUAKE - SFX_FLAG); - this->csCamAt.x = (sZelda->actor.world.pos.x - 5.0f) - 30.0f; - this->csCamAt.y = (sZelda->actor.world.pos.y + 40.0f + 5.0f) - 20.0f; - this->csCamAt.z = (sZelda->actor.world.pos.z - 25.0f) + 80.0f; + this->csCamAt.x = (sBossGanonZelda->actor.world.pos.x - 5.0f) - 30.0f; + this->csCamAt.y = (sBossGanonZelda->actor.world.pos.y + 40.0f + 5.0f) - 20.0f; + this->csCamAt.z = (sBossGanonZelda->actor.world.pos.z - 25.0f) + 80.0f; if (this->csTimer > 50) { mainCam = Gameplay_GetCamera(globalCtx, MAIN_CAM); @@ -1905,7 +1887,7 @@ void BossGanon_PoundFloor(BossGanon* this, GlobalContext* globalCtx) { break; case 1: - sCape->gravity = -1.0f; + sBossGanonCape->gravity = -1.0f; this->envLightMode = 1; Math_ApproachF(&this->actor.velocity.y, -50.0f, 1.0f, 10.0f); this->actor.world.pos.y += this->actor.velocity.y; @@ -1952,7 +1934,7 @@ void BossGanon_PoundFloor(BossGanon* this, GlobalContext* globalCtx) { this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfGetUp3Anim); Animation_MorphToPlayOnce(&this->skelAnime, &gDorfGetUp3Anim, 0.0f); SkelAnime_Update(&this->skelAnime); - sCape->attachShouldersTimer = 18.0f; + sBossGanonCape->attachShouldersTimer = 18.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EV_GANON_MANTLE); this->unk_1C2 = 4; } @@ -2136,7 +2118,7 @@ void BossGanon_ChargeBigMagic(BossGanon* this, GlobalContext* globalCtx) { } if (this->timers[0] == 1) { - sCape->attachLeftArmTimer = 15.0f; + sBossGanonCape->attachLeftArmTimer = 15.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EV_GANON_MANTLE); } @@ -2174,7 +2156,7 @@ void BossGanon_ChargeBigMagic(BossGanon* this, GlobalContext* globalCtx) { } if (Animation_OnFrame(&this->skelAnime, 3.0f)) { - sCape->attachShouldersTimer = 26.0f; + sBossGanonCape->attachShouldersTimer = 26.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EV_GANON_MANTLE); } @@ -2202,7 +2184,7 @@ void BossGanon_SetupWait(BossGanon* this, GlobalContext* globalCtx) { this->fwork[GDF_FWORK_0] = 0.0f; this->timers[0] = (s16)Rand_ZeroFloat(64.0f) + 30; this->unk_1C2 = 0; - sCape->minY = 2.0f; + sBossGanonCape->minY = 2.0f; } void BossGanon_Wait(BossGanon* this, GlobalContext* globalCtx) { @@ -2213,10 +2195,10 @@ void BossGanon_Wait(BossGanon* this, GlobalContext* globalCtx) { this->legSwayEnabled = true; - sCape->backPush = -3.0f; - sCape->backSwayMagnitude = 0.25f; - sCape->sideSwayMagnitude = -3.0f; - sCape->minDist = 20.0f; + sBossGanonCape->backPush = -3.0f; + sBossGanonCape->backSwayMagnitude = 0.25f; + sBossGanonCape->sideSwayMagnitude = -3.0f; + sBossGanonCape->minDist = 20.0f; SkelAnime_Update(&this->skelAnime); @@ -2271,10 +2253,10 @@ void BossGanon_SetupChargeLightBall(BossGanon* this, GlobalContext* globalCtx) { void BossGanon_ChargeLightBall(BossGanon* this, GlobalContext* globalCtx) { SkelAnime_Update(&this->skelAnime); - sCape->backPush = -3.0f; - sCape->backSwayMagnitude = 1.25f; - sCape->sideSwayMagnitude = -2.0f; - sCape->minDist = 10.0f; + sBossGanonCape->backPush = -3.0f; + sBossGanonCape->backSwayMagnitude = 1.25f; + sBossGanonCape->sideSwayMagnitude = -2.0f; + sBossGanonCape->minDist = 10.0f; if (this->timers[0] < 17) { this->envLightMode = 1; @@ -2355,7 +2337,7 @@ void BossGanon_PlayTennis(BossGanon* this, GlobalContext* globalCtx) { rand = Rand_ZeroOne() * 1.99f; this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(volleyAnims[rand]); Animation_MorphToPlayOnce(&this->skelAnime, volleyAnims[rand], 0.0f); - sCape->attachRightArmTimer = capeRightArmDurations[rand]; + sBossGanonCape->attachRightArmTimer = capeRightArmDurations[rand]; Audio_PlayActorSound2(&this->actor, NA_SE_EV_GANON_MANTLE); this->startVolley = false; } @@ -2383,7 +2365,7 @@ void BossGanon_SetupBlock(BossGanon* this, GlobalContext* globalCtx) { } this->unk_1C2 = 0; - sCape->attachLeftArmTimer = this->timers[0] = 10; + sBossGanonCape->attachLeftArmTimer = this->timers[0] = 10; Audio_PlayActorSound2(&this->actor, NA_SE_EV_GANON_MANTLE); this->handLightBallScale = 0.0f; } @@ -2391,10 +2373,10 @@ void BossGanon_SetupBlock(BossGanon* this, GlobalContext* globalCtx) { void BossGanon_Block(BossGanon* this, GlobalContext* globalCtx) { this->collider.base.colType = 9; SkelAnime_Update(&this->skelAnime); - sCape->backPush = -9.0f; - sCape->backSwayMagnitude = 0.25f; - sCape->sideSwayMagnitude = -2.0f; - sCape->minDist = 13.0f; + sBossGanonCape->backPush = -9.0f; + sBossGanonCape->backSwayMagnitude = 0.25f; + sBossGanonCape->sideSwayMagnitude = -2.0f; + sBossGanonCape->minDist = 13.0f; if (this->unk_1C2 == 0) { if (this->timers[0] == 0) { @@ -2402,11 +2384,11 @@ void BossGanon_Block(BossGanon* this, GlobalContext* globalCtx) { Animation_MorphToPlayOnce(&this->skelAnime, &gDorfBlockReleaseAnim, 0.0f); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfBlockReleaseAnim); SkelAnime_Update(&this->skelAnime); - sCape->attachShouldersTimer = 15.0f; + sBossGanonCape->attachShouldersTimer = 15.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EV_GANON_MANTLE); } } else { - sCape->sideSwayMagnitude = -13.0f; + sBossGanonCape->sideSwayMagnitude = -13.0f; if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) { BossGanon_SetupWait(this, globalCtx); @@ -2429,7 +2411,7 @@ void BossGanon_SetupHitByLightBall(BossGanon* this, GlobalContext* globalCtx) { this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfBigMagicHitAnim); Animation_MorphToPlayOnce(&this->skelAnime, &gDorfBigMagicHitAnim, 0); this->timers[0] = 70; - sCape->attachRightArmTimer = sCape->attachLeftArmTimer = 0; + sBossGanonCape->attachRightArmTimer = sBossGanonCape->attachLeftArmTimer = 0; for (i = 1; i < 15; i++) { this->unk_4E4[i] = D_808E4C58[i]; @@ -2466,7 +2448,7 @@ void BossGanon_HitByLightBall(BossGanon* this, GlobalContext* globalCtx) { Animation_MorphToPlayOnce(&this->skelAnime, &gDorfGetUp3Anim, 0.0f); this->unk_1C2 = 2; SkelAnime_Update(&this->skelAnime); - sCape->attachShouldersTimer = 18.0f; + sBossGanonCape->attachShouldersTimer = 18.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EV_GANON_MANTLE); Audio_PlayActorSound2(&this->actor, NA_SE_EN_GANON_RESTORE); this->timers[2] = 130; @@ -2500,7 +2482,7 @@ void BossGanon_SetupVulnerable(BossGanon* this, GlobalContext* globalCtx) { BossGanon_SetAnimationObject(this, globalCtx, OBJECT_GANON_ANIME1); this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfLightArrowHitAnim); Animation_MorphToPlayOnce(&this->skelAnime, &gDorfLightArrowHitAnim, 0.0f); - sCape->attachRightArmTimer = sCape->attachLeftArmTimer = 0; + sBossGanonCape->attachRightArmTimer = sBossGanonCape->attachLeftArmTimer = 0; this->actionFunc = BossGanon_Vulnerable; this->actor.velocity.x = 0.0f; @@ -2508,10 +2490,10 @@ void BossGanon_SetupVulnerable(BossGanon* this, GlobalContext* globalCtx) { this->actor.velocity.z = 0.0f; this->unk_1C2 = 0; - sCape->backPush = -4.0f; - sCape->backSwayMagnitude = 0.75f; - sCape->sideSwayMagnitude = -3.0f; - sCape->minDist = 20.0f; + sBossGanonCape->backPush = -4.0f; + sBossGanonCape->backSwayMagnitude = 0.75f; + sBossGanonCape->sideSwayMagnitude = -3.0f; + sBossGanonCape->minDist = 20.0f; for (i = 0; i < 10; i++) { Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_BOSS_GANON, this->unk_1FC.x, @@ -2571,7 +2553,7 @@ void BossGanon_Vulnerable(BossGanon* this, GlobalContext* globalCtx) { break; case 2: - sCape->minDist = 0.0f; + sBossGanonCape->minDist = 0.0f; this->actor.velocity.y = this->actor.velocity.y - 0.5f; if (this->actor.world.pos.y < 40.0f) { @@ -2625,7 +2607,7 @@ void BossGanon_Vulnerable(BossGanon* this, GlobalContext* globalCtx) { this->unk_1C2 = 6; this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfGetUp2Anim); Animation_MorphToPlayOnce(&this->skelAnime, &gDorfGetUp2Anim, 0.0f); - sCape->minDist = 20.0f; + sBossGanonCape->minDist = 20.0f; this->unk_19F = 1; } break; @@ -2646,7 +2628,7 @@ void BossGanon_Vulnerable(BossGanon* this, GlobalContext* globalCtx) { Animation_MorphToPlayOnce(&this->skelAnime, &gDorfGetUp3Anim, 0.0f); this->unk_1C2 = 8; SkelAnime_Update(&this->skelAnime); - sCape->attachShouldersTimer = 18.0f; + sBossGanonCape->attachShouldersTimer = 18.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EV_GANON_MANTLE); Audio_PlayActorSound2(&this->actor, NA_SE_EN_GANON_RESTORE); break; @@ -2743,10 +2725,10 @@ void BossGanon_UpdateDamage(BossGanon* this, GlobalContext* globalCtx) { this->actor.colChkInfo.health -= damage; } - for (i = 0; i < ARRAY_COUNT(sCape->strands); i++) { + for (i = 0; i < ARRAY_COUNT(sBossGanonCape->strands); i++) { for (j = 1; j < 12; j++) { - sCape->strands[i].velocities[j].x = Rand_CenteredFloat(15.0f); - sCape->strands[i].velocities[j].z = Rand_CenteredFloat(15.0f); + sBossGanonCape->strands[i].velocities[j].x = Rand_CenteredFloat(15.0f); + sBossGanonCape->strands[i].velocities[j].z = Rand_CenteredFloat(15.0f); } } @@ -2762,16 +2744,16 @@ void BossGanon_UpdateDamage(BossGanon* this, GlobalContext* globalCtx) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_GANON_CUTBODY); BossGanon_SetupDamaged(this, globalCtx); this->unk_1A6 = 15; - sCape->tearTimer = 1; + sBossGanonCape->tearTimer = 1; } } } else if (acHitInfo->toucher.dmgFlags & 0x1F8A4) { Audio_PlayActorSound2(&this->actor, 0); - for (i = 0; i < ARRAY_COUNT(sCape->strands); i++) { + for (i = 0; i < ARRAY_COUNT(sBossGanonCape->strands); i++) { for (j = 1; j < 12; j++) { - sCape->strands[i].velocities[j].x = Rand_CenteredFloat(15.0f); - sCape->strands[i].velocities[j].z = Rand_CenteredFloat(15.0f); + sBossGanonCape->strands[i].velocities[j].x = Rand_CenteredFloat(15.0f); + sBossGanonCape->strands[i].velocities[j].z = Rand_CenteredFloat(15.0f); } } } @@ -2841,7 +2823,7 @@ void BossGanon_Update(Actor* thisx, GlobalContext* globalCtx2) { } this->collider.base.colType = 3; - sCape->gravity = -3.0f; + sBossGanonCape->gravity = -3.0f; this->shockGlow = false; this->actor.flags &= ~ACTOR_FLAG_0; this->unk_1A2++; @@ -3334,20 +3316,20 @@ void BossGanon_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList } void BossGanon_InitRand(s32 seedInit0, s32 seedInit1, s32 seedInit2) { - sSeed1 = seedInit0; - sSeed2 = seedInit1; - sSeed3 = seedInit2; + sBossGanonSeed1 = seedInit0; + sBossGanonSeed2 = seedInit1; + sBossGanonSeed3 = seedInit2; } f32 BossGanon_RandZeroOne(void) { // Wichmann-Hill algorithm f32 randFloat; - sSeed1 = (sSeed1 * 171) % 30269; - sSeed2 = (sSeed2 * 172) % 30307; - sSeed3 = (sSeed3 * 170) % 30323; + sBossGanonSeed1 = (sBossGanonSeed1 * 171) % 30269; + sBossGanonSeed2 = (sBossGanonSeed2 * 172) % 30307; + sBossGanonSeed3 = (sBossGanonSeed3 * 170) % 30323; - randFloat = (sSeed1 / 30269.0f) + (sSeed2 / 30307.0f) + (sSeed3 / 30323.0f); + randFloat = (sBossGanonSeed1 / 30269.0f) + (sBossGanonSeed2 / 30307.0f) + (sBossGanonSeed3 / 30323.0f); while (randFloat >= 1.0f) { randFloat -= 1.0f; @@ -3559,7 +3541,7 @@ void BossGanon_DrawTriforce(BossGanon* this, GlobalContext* globalCtx) { this->triforcePos.y += 3.0f; this->triforcePos.z += -2.0f; } else if (this->triforceType == GDF_TRIFORCE_ZELDA) { - this->triforcePos = sZelda->unk_31C; + this->triforcePos = sBossGanonZelda->unk_31C; this->triforcePos.y += 1.8f; this->triforcePos.z += 4.0f; @@ -3734,9 +3716,9 @@ void BossGanon_GenShadowTexture(u8* tex, BossGanon* this, GlobalContext* globalC for (i = 0; i < 12; i++) { for (j = 0; j < 12; j++) { - sp7C.x = sCape->strands[i].joints[j].x - this->actor.world.pos.x; - sp7C.y = sCape->strands[i].joints[j].y - this->actor.world.pos.y + 76.0f + 100.0f + 30.0f; - sp7C.z = sCape->strands[i].joints[j].z - this->actor.world.pos.z; + sp7C.x = sBossGanonCape->strands[i].joints[j].x - this->actor.world.pos.x; + sp7C.y = sBossGanonCape->strands[i].joints[j].y - this->actor.world.pos.y + 76.0f + 100.0f + 30.0f; + sp7C.z = sBossGanonCape->strands[i].joints[j].z - this->actor.world.pos.z; Matrix_MultVec3f(&sp7C, &sp70); @@ -3746,7 +3728,7 @@ void BossGanon_GenShadowTexture(u8* tex, BossGanon* this, GlobalContext* globalC baseX = (s32)(sp70.x + 32.0f); baseY = (s16)sp70.y * 0x40; - if (!sCape->strands[i].torn[j]) { + if (!sBossGanonCape->strands[i].torn[j]) { for (y = -1, addY = -0x40; y <= 1; y++, addY += 0x40) { for (x = -3; x <= 3; x++) { index = baseX + x + baseY + addY; @@ -3827,13 +3809,13 @@ void BossGanon_Draw(Actor* thisx, GlobalContext* globalCtx) { BossGanon_DrawEffects(globalCtx); - sCape->actor.world.pos = this->actor.world.pos; + sBossGanonCape->actor.world.pos = this->actor.world.pos; - sCape->rightForearmPos = this->unk_214; - sCape->leftForearmPos = this->unk_220; + sBossGanonCape->rightForearmPos = this->unk_214; + sBossGanonCape->leftForearmPos = this->unk_220; - sCape->rightShoulderPos = this->unk_22C; - sCape->leftShoulderPos = this->unk_238; + sBossGanonCape->rightShoulderPos = this->unk_22C; + sBossGanonCape->leftShoulderPos = this->unk_238; BossGanon_DrawShock(this, globalCtx); BossGanon_DrawHandLightBall(this, globalCtx); @@ -4628,7 +4610,7 @@ void BossGanon_UpdateEffects(GlobalContext* globalCtx) { spA0.x = 0.0f; spA0.y = 0.0f; - for (i = 0; i < ARRAY_COUNT(sEffectBuf); i++, eff++) { + for (i = 0; i < ARRAY_COUNT(sBossGanonEffectBuf); i++, eff++) { if (eff->type != GDF_EFF_NONE) { eff->pos.x += eff->velocity.x; eff->pos.y += eff->velocity.y; @@ -4662,9 +4644,9 @@ void BossGanon_UpdateEffects(GlobalContext* globalCtx) { eff->alpha = 255; } } else if (eff->type == GDF_EFF_BLACK_DOT) { - xDiff = sGanondorf->unk_278.x - eff->pos.x; - yDiff = sGanondorf->unk_278.y - eff->pos.y; - zDiff = sGanondorf->unk_278.z - eff->pos.z; + xDiff = sBossGanonGanondorf->unk_278.x - eff->pos.x; + yDiff = sBossGanonGanondorf->unk_278.y - eff->pos.y; + zDiff = sBossGanonGanondorf->unk_278.z - eff->pos.z; yRot = Math_FAtan2F(xDiff, zDiff); @@ -4704,9 +4686,9 @@ void BossGanon_UpdateEffects(GlobalContext* globalCtx) { if (eff->unk_2E == GDF_SHOCK_DORF_YELLOW) { bodyPart = (s16)Rand_ZeroFloat(13.9f) + 1; - eff->pos.x = sGanondorf->unk_2EC[bodyPart].x + Rand_CenteredFloat(20.0f); - eff->pos.y = sGanondorf->unk_2EC[bodyPart].y + Rand_CenteredFloat(20.0f); - eff->pos.z = sGanondorf->unk_2EC[bodyPart].z + Rand_CenteredFloat(20.0f); + eff->pos.x = sBossGanonGanondorf->unk_2EC[bodyPart].x + Rand_CenteredFloat(20.0f); + eff->pos.y = sBossGanonGanondorf->unk_2EC[bodyPart].y + Rand_CenteredFloat(20.0f); + eff->pos.z = sBossGanonGanondorf->unk_2EC[bodyPart].z + Rand_CenteredFloat(20.0f); } else { bodyPart = (s16)Rand_ZeroFloat(17.9f); @@ -4799,7 +4781,7 @@ void BossGanon_UpdateEffects(GlobalContext* globalCtx) { if (((eff->scale * 150.0f) < distToPlayer) && (distToPlayer < (eff->scale * 300.0f))) { eff->timer = 150; - func_8002F6D4(globalCtx, &sGanondorf->actor, 7.0f, sGanondorf->actor.yawTowardsPlayer, 0.0f, + func_8002F6D4(globalCtx, &sBossGanonGanondorf->actor, 7.0f, sBossGanonGanondorf->actor.yawTowardsPlayer, 0.0f, 0x20); } } @@ -4940,7 +4922,7 @@ void BossGanon_DrawEffects(GlobalContext* globalCtx) { 255); gDPSetEnvColor(POLY_XLU_DISP++, sLightningEnvColors[(eff->timer * 3) + 0], sLightningEnvColors[(eff->timer * 3) + 1], sLightningEnvColors[(eff->timer * 3) + 2], 0); - Matrix_Translate(sGanondorf->unk_260.x, sGanondorf->unk_260.y, sGanondorf->unk_260.z, MTXMODE_NEW); + Matrix_Translate(sBossGanonGanondorf->unk_260.x, sBossGanonGanondorf->unk_260.y, sBossGanonGanondorf->unk_260.z, MTXMODE_NEW); Matrix_RotateY(eff->unk_48, MTXMODE_APPLY); Matrix_RotateZ(eff->unk_3C, MTXMODE_APPLY); Matrix_Scale(eff->scale, eff->scale, eff->scale, MTXMODE_APPLY); @@ -5032,16 +5014,11 @@ void BossGanon_DrawEffects(GlobalContext* globalCtx) { #include "overlays/ovl_Boss_Ganon/ovl_Boss_Ganon.h" void BossGanon_Reset(void) { - -static EnGanonMant* sCape; - - sSeed1 = 0; - sSeed2 = 0; - sSeed3 = 0; - sGanondorf = NULL; - sZelda = NULL; - sCape = NULL; - - - memset(sEffectBuf, 0, sizeof(sEffectBuf)); -} + sBossGanonSeed1 = 0; + sBossGanonSeed2 = 0; + sBossGanonSeed3 = 0; + sBossGanonGanondorf = NULL; + sBossGanonZelda = NULL; + sBossGanonCape = NULL; + memset(sBossGanonEffectBuf, 0, sizeof(sBossGanonEffectBuf)); +} \ No newline at end of file diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h b/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h index a3e3e503e..69a983717 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h +++ b/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h @@ -53,6 +53,24 @@ typedef enum { /* 2 */ GDF_TRIFORCE_DORF } GanondorfTriforceType; +typedef struct { + /* 0x00 */ u8 type; + /* 0x01 */ u8 timer; + /* 0x04 */ Vec3f pos; + /* 0x10 */ Vec3f velocity; + /* 0x1C */ Vec3f accel; + /* 0x28 */ Color_RGB8 color; + /* 0x2C */ s16 alpha; + /* 0x2E */ s16 unk_2E; + /* 0x30 */ s16 unk_30; + /* 0x34 */ f32 scale; + /* 0x38 */ f32 unk_38; // scale target mostly, but used for other things + /* 0x3C */ f32 unk_3C; // mostly z rot + /* 0x40 */ f32 unk_40; + /* 0x44 */ f32 unk_44; // mostly x rot + /* 0x48 */ f32 unk_48; // mostly y rot +} GanondorfEffect; // size = 0x4C + typedef struct BossGanon { /* 0x0000 */ Actor actor; /* 0x014C */ s32 animBankIndex; diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index 21fd1a149..b946054b8 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -49,21 +49,40 @@ const ActorInit Boss_Ganon2_InitVars = { #include "z_boss_ganon2_data.c" +Vec3f D_8090EB20; + +EnZl3* sBossGanon2Zelda; + +Actor* D_8090EB30; + +BossGanon2Effect sBossGanon2Particles[100]; + +s32 sBossGanon2Seed1; +s32 sBossGanon2Seed2; +s32 sBossGanon2Seed3; + +Vec3f D_809105D8[4]; + +Vec3f D_80910608[4]; + +s8 D_80910638; + + void BossGanon2_InitRand(s32 seedInit0, s32 seedInit1, s32 seedInit2) { - sSeed1 = seedInit0; - sSeed2 = seedInit1; - sSeed3 = seedInit2; + sBossGanon2Seed1 = seedInit0; + sBossGanon2Seed2 = seedInit1; + sBossGanon2Seed3 = seedInit2; } f32 BossGanon2_RandZeroOne(void) { // Wichmann-Hill algorithm f32 randFloat; - sSeed1 = (sSeed1 * 171) % 30269; - sSeed2 = (sSeed2 * 172) % 30307; - sSeed3 = (sSeed3 * 170) % 30323; + sBossGanon2Seed1 = (sBossGanon2Seed1 * 171) % 30269; + sBossGanon2Seed2 = (sBossGanon2Seed2 * 172) % 30307; + sBossGanon2Seed3 = (sBossGanon2Seed3 * 170) % 30323; - randFloat = (sSeed1 / 30269.0f) + (sSeed2 / 30307.0f) + (sSeed3 / 30323.0f); + randFloat = (sBossGanon2Seed1 / 30269.0f) + (sBossGanon2Seed2 / 30307.0f) + (sBossGanon2Seed3 / 30323.0f); while (randFloat >= 1.0f) { randFloat -= 1.0f; } @@ -114,7 +133,7 @@ void func_808FD27C(GlobalContext* globalCtx, Vec3f* position, Vec3f* velocity, f BossGanon2Effect* effect = globalCtx->specialEffects; s16 i; - for (i = 0; i < ARRAY_COUNT(sParticles); i++, effect++) { + for (i = 0; i < ARRAY_COUNT(sBossGanon2Particles); i++, effect++) { if (effect->type == 0) { effect->type = 2; effect->position = *position; @@ -136,10 +155,10 @@ void BossGanon2_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; s16 i; - globalCtx->specialEffects = sParticles; + globalCtx->specialEffects = sBossGanon2Particles; - for (i = 0; i < ARRAY_COUNT(sParticles); i++) { - sParticles[i].type = 0; + for (i = 0; i < ARRAY_COUNT(sBossGanon2Particles); i++) { + sBossGanon2Particles[i].type = 0; } this->actor.colChkInfo.mass = MASS_IMMOVABLE; @@ -204,13 +223,13 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) { Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT); Gameplay_ChangeCameraStatus(globalCtx, this->unk_39E, CAM_STAT_ACTIVE); this->unk_39C = 1; - sZelda = (EnZl3*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_ZL3, 970.0f, + sBossGanon2Zelda = (EnZl3*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_ZL3, 970.0f, 1086.0f, -200.0f, 0, 0, 0, 1); - sZelda->unk_3C8 = 0; - sZelda->actor.world.pos.x = 970.0f; - sZelda->actor.world.pos.y = 1086.0f; - sZelda->actor.world.pos.z = -214.0f; - sZelda->actor.shape.rot.y = -0x7000; + sBossGanon2Zelda->unk_3C8 = 0; + sBossGanon2Zelda->actor.world.pos.x = 970.0f; + sBossGanon2Zelda->actor.world.pos.y = 1086.0f; + sBossGanon2Zelda->actor.world.pos.z = -214.0f; + sBossGanon2Zelda->actor.shape.rot.y = -0x7000; this->unk_3BC.x = 0.0f; this->unk_3BC.y = 1.0f; this->unk_3BC.z = 0.0f; @@ -258,20 +277,20 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) { player->actor.world.pos.x = 970.0f; player->actor.world.pos.y = 1086.0f; player->actor.world.pos.z = -166.0f; - sZelda->actor.world.pos.x = 974.0f; - sZelda->actor.world.pos.y = 1086.0f; - sZelda->actor.world.pos.z = -186.0f; + sBossGanon2Zelda->actor.world.pos.x = 974.0f; + sBossGanon2Zelda->actor.world.pos.y = 1086.0f; + sBossGanon2Zelda->actor.world.pos.z = -186.0f; player->actor.shape.rot.y = -0x5000; - sZelda->actor.shape.rot.y = -0x5000; + sBossGanon2Zelda->actor.shape.rot.y = -0x5000; if (this->unk_398 == 60) { Message_StartTextbox(globalCtx, 0x70D4, NULL); } if (this->unk_398 == 40) { - sZelda->unk_3C8 = 1; + sBossGanon2Zelda->unk_3C8 = 1; func_8002DF54(globalCtx, &this->actor, 0x4E); } if (this->unk_398 == 85) { - sZelda->unk_3C8 = 2; + sBossGanon2Zelda->unk_3C8 = 2; func_8002DF54(globalCtx, &this->actor, 0x4F); } this->unk_3A4.x = 930.0f; @@ -300,14 +319,14 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) { Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_STOP); } if (this->unk_398 == 20) { - sZelda->unk_3C8 = 3; + sBossGanon2Zelda->unk_3C8 = 3; func_8002DF54(globalCtx, &this->actor, 0x50); } if (this->unk_398 == 55) { this->unk_39C = 4; this->unk_398 = 0; this->unk_410.x = 0.0f; - sZelda->unk_3C8 = 4; + sBossGanon2Zelda->unk_3C8 = 4; func_8002DF54(globalCtx, &this->actor, 0x50); } break; @@ -347,11 +366,11 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) { player->actor.world.pos.x = 490.0f; player->actor.world.pos.y = 1086.0f; player->actor.world.pos.z = -166.0f; - sZelda->actor.world.pos.x = 724.0f; - sZelda->actor.world.pos.y = 1086.0f; - sZelda->actor.world.pos.z = -186.0f; + sBossGanon2Zelda->actor.world.pos.x = 724.0f; + sBossGanon2Zelda->actor.world.pos.y = 1086.0f; + sBossGanon2Zelda->actor.world.pos.z = -186.0f; player->actor.shape.rot.y = -0x4000; - sZelda->actor.shape.rot.y = -0x5000; + sBossGanon2Zelda->actor.shape.rot.y = -0x5000; this->unk_3A4.x = 410.0f; this->unk_3A4.y = 1096.0f; this->unk_3A4.z = -110.0f; @@ -370,7 +389,7 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) { this->unk_339 = 4; } if (this->unk_398 == 30) { - sZelda->unk_3C8 = 5; + sBossGanon2Zelda->unk_3C8 = 5; func_8002DF54(globalCtx, &this->actor, 0x51); } if (this->unk_398 == 50) { @@ -384,11 +403,11 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) { player->actor.world.pos.x = 490.0f; player->actor.world.pos.y = 1086.0f; player->actor.world.pos.z = -166.0f; - sZelda->actor.world.pos.x = 724.0f; - sZelda->actor.world.pos.y = 1086.0f; - sZelda->actor.world.pos.z = -186.0f; + sBossGanon2Zelda->actor.world.pos.x = 724.0f; + sBossGanon2Zelda->actor.world.pos.y = 1086.0f; + sBossGanon2Zelda->actor.world.pos.z = -186.0f; player->actor.shape.rot.y = -0x4000; - sZelda->actor.shape.rot.y = -0x5000; + sBossGanon2Zelda->actor.shape.rot.y = -0x5000; this->unk_3A4.x = 450.0f; this->unk_3A4.y = 1121.0f; this->unk_3A4.z = -158.0f; @@ -457,9 +476,9 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) { player->actor.world.pos.y = 1086.0f; player->actor.world.pos.z = -266.0f; player->actor.shape.rot.y = -0x4000; - sZelda->actor.world.pos.x = 724.0f; - sZelda->actor.world.pos.y = 1086.0f; - sZelda->actor.world.pos.z = -186.0f; + sBossGanon2Zelda->actor.world.pos.x = 724.0f; + sBossGanon2Zelda->actor.world.pos.y = 1086.0f; + sBossGanon2Zelda->actor.world.pos.z = -186.0f; this->unk_3A4.x = this->actor.world.pos.x + -10.0f; this->unk_3A4.y = this->actor.world.pos.y + 80.0f; this->unk_3A4.z = this->actor.world.pos.z + 50.0f; @@ -770,9 +789,9 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) { BossGanon2Effect* effect = globalCtx->specialEffects; effect->unk_2E = 1; - effect->position.x = sZelda->actor.world.pos.x + 50.0f + 10.0f; - effect->position.y = sZelda->actor.world.pos.y + 350.0f; - effect->position.z = sZelda->actor.world.pos.z - 25.0f; + effect->position.x = sBossGanon2Zelda->actor.world.pos.x + 50.0f + 10.0f; + effect->position.y = sBossGanon2Zelda->actor.world.pos.y + 350.0f; + effect->position.z = sBossGanon2Zelda->actor.world.pos.z - 25.0f; effect->velocity.x = 0.0f; effect->velocity.z = 0.0f; effect->velocity.y = -30.0f; @@ -782,15 +801,15 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) { break; } case 26: - this->unk_3A4.x = sZelda->actor.world.pos.x + 100.0f + 30.0f; - this->unk_3A4.y = sZelda->actor.world.pos.y + 10.0f; - this->unk_3A4.z = sZelda->actor.world.pos.z + 5.0f; - this->unk_3B0.x = sZelda->actor.world.pos.x; - this->unk_3B0.y = sZelda->actor.world.pos.y + 30.0f; - this->unk_3B0.z = sZelda->actor.world.pos.z - 20.0f; + this->unk_3A4.x = sBossGanon2Zelda->actor.world.pos.x + 100.0f + 30.0f; + this->unk_3A4.y = sBossGanon2Zelda->actor.world.pos.y + 10.0f; + this->unk_3A4.z = sBossGanon2Zelda->actor.world.pos.z + 5.0f; + this->unk_3B0.x = sBossGanon2Zelda->actor.world.pos.x; + this->unk_3B0.y = sBossGanon2Zelda->actor.world.pos.y + 30.0f; + this->unk_3B0.z = sBossGanon2Zelda->actor.world.pos.z - 20.0f; this->unk_3BC.z = -0.5f; if (this->unk_398 == 13) { - sZelda->unk_3C8 = 6; + sBossGanon2Zelda->unk_3C8 = 6; } if (this->unk_398 == 50) { this->unk_39C = 27; @@ -879,7 +898,7 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) { func_808FFDB0(this, globalCtx); this->unk_1A2[1] = 50; this->actor.flags |= ACTOR_FLAG_0; - sZelda->unk_3C8 = 7; + sBossGanon2Zelda->unk_3C8 = 7; } break; } @@ -1323,12 +1342,12 @@ void func_80900890(BossGanon2* this, GlobalContext* globalCtx) { break; case 2: this->unk_1A2[0] = 300; - this->unk_3A4.x = sZelda->actor.world.pos.x - 100.0f; - this->unk_3A4.y = sZelda->actor.world.pos.y + 30.0f; - this->unk_3A4.z = (sZelda->actor.world.pos.z + 30.0f) - 60.0f; - this->unk_3B0.x = sZelda->actor.world.pos.x; - this->unk_3B0.y = sZelda->actor.world.pos.y + 30.0f; - this->unk_3B0.z = sZelda->actor.world.pos.z - 10.0f; + this->unk_3A4.x = sBossGanon2Zelda->actor.world.pos.x - 100.0f; + this->unk_3A4.y = sBossGanon2Zelda->actor.world.pos.y + 30.0f; + this->unk_3A4.z = (sBossGanon2Zelda->actor.world.pos.z + 30.0f) - 60.0f; + this->unk_3B0.x = sBossGanon2Zelda->actor.world.pos.x; + this->unk_3B0.y = sBossGanon2Zelda->actor.world.pos.y + 30.0f; + this->unk_3B0.z = sBossGanon2Zelda->actor.world.pos.z - 10.0f; Math_ApproachZeroF(&this->unk_324, 1.0f, 5.0f); Math_ApproachF(&globalCtx->envCtx.unk_D8, 1.0f, 1.0f, 1.0f / 51); if (this->unk_1A2[1] == 80) { @@ -1356,8 +1375,8 @@ void func_80900890(BossGanon2* this, GlobalContext* globalCtx) { func_8002DF54(globalCtx, &this->actor, 0x60); this->unk_398 = 0; case 11: - player->actor.world.pos.x = sZelda->actor.world.pos.x + 50.0f + 10.0f; - player->actor.world.pos.z = sZelda->actor.world.pos.z - 25.0f; + player->actor.world.pos.x = sBossGanon2Zelda->actor.world.pos.x + 50.0f + 10.0f; + player->actor.world.pos.z = sBossGanon2Zelda->actor.world.pos.z - 25.0f; player->actor.shape.rot.y = -0x8000; this->unk_3A4.x = (player->actor.world.pos.x + 100.0f) - 80.0f; this->unk_3A4.y = (player->actor.world.pos.y + 60.0f) - 40.0f; @@ -1482,7 +1501,7 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) { func_8002DF54(globalCtx, &this->actor, 8); this->unk_39C = 1; this->unk_398 = 0; - sZelda->unk_3C8 = 9; + sBossGanon2Zelda->unk_3C8 = 9; this->unk_31C = 0; this->unk_1A2[2] = 0; this->unk_336 = 0; @@ -1522,9 +1541,9 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) { player->actor.shape.rot.y = -0x4000; player->actor.world.pos.x = 200.0f; player->actor.world.pos.z = 30.0f; - sZelda->actor.world.pos.x = 340.0f; - sZelda->actor.world.pos.z = -250.0f; - sZelda->actor.world.rot.y = sZelda->actor.shape.rot.y = -0x2000; + sBossGanon2Zelda->actor.world.pos.x = 340.0f; + sBossGanon2Zelda->actor.world.pos.z = -250.0f; + sBossGanon2Zelda->actor.world.rot.y = sBossGanon2Zelda->actor.shape.rot.y = -0x2000; this->unk_3A4.x = 250; this->unk_3A4.y = 1150.0f; this->unk_3A4.z = 0.0f; @@ -1543,9 +1562,9 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) { this->unk_3A4.x = 250; this->unk_3A4.y = 1150.0f; this->unk_3A4.z = 0.0f; - Math_ApproachF(&this->unk_3B0.x, sZelda->actor.world.pos.x, 0.2f, 20.0f); - Math_ApproachF(&this->unk_3B0.y, sZelda->actor.world.pos.y + 50.0f, 0.2f, 10.0f); - Math_ApproachF(&this->unk_3B0.z, sZelda->actor.world.pos.z, 0.2f, 20.0f); + Math_ApproachF(&this->unk_3B0.x, sBossGanon2Zelda->actor.world.pos.x, 0.2f, 20.0f); + Math_ApproachF(&this->unk_3B0.y, sBossGanon2Zelda->actor.world.pos.y + 50.0f, 0.2f, 10.0f); + Math_ApproachF(&this->unk_3B0.z, sBossGanon2Zelda->actor.world.pos.z, 0.2f, 20.0f); if (this->unk_398 == 50) { this->unk_39C = 3; this->unk_398 = 0; @@ -1557,9 +1576,9 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) { this->unk_3A4.x = 330.0f; this->unk_3A4.y = 1120.0f; this->unk_3A4.z = -150.0f; - this->unk_3B0.x = sZelda->actor.world.pos.x; - this->unk_3B0.y = sZelda->actor.world.pos.y + 40.0f; - this->unk_3B0.z = sZelda->actor.world.pos.z; + this->unk_3B0.x = sBossGanon2Zelda->actor.world.pos.x; + this->unk_3B0.y = sBossGanon2Zelda->actor.world.pos.y + 40.0f; + this->unk_3B0.z = sBossGanon2Zelda->actor.world.pos.z; if (this->unk_398 == 10) { Message_StartTextbox(globalCtx, 0x70D8, NULL); } @@ -1572,7 +1591,7 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) { if (this->unk_398 > 10) { Math_ApproachZeroF(&this->unk_37C, 1.0f, 10.0f); if (this->unk_398 == 30) { - sZelda->unk_3C8 = 10; + sBossGanon2Zelda->unk_3C8 = 10; } this->unk_339 = 23; Math_ApproachZeroF(&globalCtx->envCtx.unk_D8, 1.0f, 0.05f); @@ -1743,7 +1762,7 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) { if (this->unk_398 == 40) { this->unk_39C = 9; this->unk_398 = 0; - sZelda->unk_3C8 = 11; + sBossGanon2Zelda->unk_3C8 = 11; Message_StartTextbox(globalCtx, 0x70D9, NULL); this->unk_336 = 0; globalCtx->envCtx.unk_D8 = 0.0f; @@ -1754,9 +1773,9 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) { this->unk_3A4.x = 330.0f; this->unk_3A4.y = 1120.0f; this->unk_3A4.z = -150.0f; - this->unk_3B0.x = sZelda->actor.world.pos.x; - this->unk_3B0.y = sZelda->actor.world.pos.y + 40.0f; - this->unk_3B0.z = sZelda->actor.world.pos.z; + this->unk_3B0.x = sBossGanon2Zelda->actor.world.pos.x; + this->unk_3B0.y = sBossGanon2Zelda->actor.world.pos.y + 40.0f; + this->unk_3B0.z = sBossGanon2Zelda->actor.world.pos.z; if (this->unk_398 > 60) { this->unk_39C = 10; this->unk_398 = 0; @@ -1771,26 +1790,26 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) { if ((this->unk_398 >= 40) && (this->unk_398 <= 110)) { Math_ApproachF(&globalCtx->envCtx.unk_D8, 1.0f, 1.0f, 0.02f); Math_ApproachF(&this->unk_384, 10.0f, 0.1f, 0.2f); - Audio_PlayActorSound2(&sZelda->actor, NA_SE_EV_GOD_LIGHTBALL_2 - SFX_FLAG); + Audio_PlayActorSound2(&sBossGanon2Zelda->actor, NA_SE_EV_GOD_LIGHTBALL_2 - SFX_FLAG); } else { Math_ApproachZeroF(&this->unk_384, 1.0f, 0.2f); } if (this->unk_398 > 130) { - Math_ApproachF(&this->unk_3B0.y, (sZelda->actor.world.pos.y + 40.0f + 10.0f) - 20.0f, 0.1f, + Math_ApproachF(&this->unk_3B0.y, (sBossGanon2Zelda->actor.world.pos.y + 40.0f + 10.0f) - 20.0f, 0.1f, this->unk_410.x); } else { - Math_ApproachF(&this->unk_3B0.y, sZelda->actor.world.pos.y + 40.0f + 10.0f, 0.05f, + Math_ApproachF(&this->unk_3B0.y, sBossGanon2Zelda->actor.world.pos.y + 40.0f + 10.0f, 0.05f, this->unk_410.x * 0.25f); } Math_ApproachF(&this->unk_410.x, 1.0f, 1.0f, 0.01f); if (this->unk_398 == 10) { - sZelda->unk_3C8 = 12; + sBossGanon2Zelda->unk_3C8 = 12; } if (this->unk_398 == 110) { - sZelda->unk_3C8 = 13; + sBossGanon2Zelda->unk_3C8 = 13; } if (this->unk_398 == 140) { - Audio_PlayActorSound2(&sZelda->actor, NA_SE_EV_HUMAN_BOUND); + Audio_PlayActorSound2(&sBossGanon2Zelda->actor, NA_SE_EV_HUMAN_BOUND); } if (this->unk_398 < 160) { break; @@ -1845,7 +1864,7 @@ void func_80902348(BossGanon2* this, GlobalContext* globalCtx) { } func_8002F6D4(globalCtx, &this->actor, 15.0f, this->actor.yawTowardsPlayer + phi_v0_2, 2.0f, 0); - sZelda->unk_3C8 = 8; + sBossGanon2Zelda->unk_3C8 = 8; this->unk_316 = 10; break; } @@ -1864,7 +1883,7 @@ void func_80902348(BossGanon2* this, GlobalContext* globalCtx) { player->isBurning = true; func_8002F6D4(globalCtx, &this->actor, 10.0f, Math_Atan2S(temp_f12, temp_f2), 0.0f, 0x10); - sZelda->unk_3C8 = 8; + sBossGanon2Zelda->unk_3C8 = 8; } } } @@ -2168,7 +2187,7 @@ void BossGanon2_Update(Actor* thisx, GlobalContext* globalCtx) { if (D_80906D78 != 0) { D_80906D78 = 0; - for (i2 = 0; i2 < ARRAY_COUNT(sParticles); i2++) { + for (i2 = 0; i2 < ARRAY_COUNT(sBossGanon2Particles); i2++) { angle = Rand_ZeroFloat(2 * M_PI); sp44 = Rand_ZeroFloat(40.0f) + 10.0f; sp58 = this->actor.world.pos; @@ -2641,7 +2660,7 @@ void func_80904FC8(BossGanon2* this, GlobalContext* globalCtx) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 200); gDPSetEnvColor(POLY_XLU_DISP++, 255, 200, 0, 0); gSPDisplayList(POLY_XLU_DISP++, ovl_Boss_Ganon2_DL_00B308); - Matrix_Translate(sZelda->actor.world.pos.x, sZelda->actor.world.pos.y + 80.0f, sZelda->actor.world.pos.z, + Matrix_Translate(sBossGanon2Zelda->actor.world.pos.x, sBossGanon2Zelda->actor.world.pos.y + 80.0f, sBossGanon2Zelda->actor.world.pos.z, MTXMODE_NEW); Matrix_ReplaceRotation(&globalCtx->billboardMtxF); Matrix_Scale(this->unk_384, this->unk_384, this->unk_384, MTXMODE_APPLY); @@ -2728,8 +2747,8 @@ void func_80905674(BossGanon2* this, GlobalContext* globalCtx) { this->unk_19C * -8, 32, 32)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 170, (s16)this->unk_37C); gDPSetEnvColor(POLY_XLU_DISP++, 255, 200, 0, 128); - Matrix_Translate(sZelda->actor.world.pos.x + 100.0f, sZelda->actor.world.pos.y + 35.0f + 7.0f, - sZelda->actor.world.pos.z - 100.0f, MTXMODE_NEW); + Matrix_Translate(sBossGanon2Zelda->actor.world.pos.x + 100.0f, sBossGanon2Zelda->actor.world.pos.y + 35.0f + 7.0f, + sBossGanon2Zelda->actor.world.pos.z - 100.0f, MTXMODE_NEW); Matrix_RotateY(-M_PI / 4.0f, MTXMODE_APPLY); Matrix_Scale(0.040000003f, 0.040000003f, this->unk_380, MTXMODE_APPLY); Matrix_RotateX(M_PI / 2.0f, MTXMODE_APPLY); @@ -2826,7 +2845,7 @@ void func_80905DA8(BossGanon2* this, GlobalContext* globalCtx) { Vec3f sp78; s16 i; - for (i = 0; i < ARRAY_COUNT(sParticles); i++, effect++) { + for (i = 0; i < ARRAY_COUNT(sBossGanon2Particles); i++, effect++) { if (effect->type != 0) { effect->position.x += effect->velocity.x; effect->position.y += effect->velocity.y; @@ -2934,7 +2953,7 @@ void func_809060E8(GlobalContext* globalCtx) { effect = effects; - for (i = 0; i < ARRAY_COUNT(sParticles); i++, effect++) { + for (i = 0; i < ARRAY_COUNT(sBossGanon2Particles); i++, effect++) { if (effect->type == 2) { if (!usingObjectGEff) { BossGanon2_SetObjectSegment(NULL, globalCtx, OBJECT_GEFF, true); @@ -3080,12 +3099,12 @@ void BossGanon2_Reset(void) { D_8090EB20.y = 0; D_8090EB20.z = 0; D_80910638 = 0; - sZelda = NULL; + sBossGanon2Zelda = NULL; D_8090EB30 = NULL; - sSeed1 = 0; - sSeed2 = 0; - sSeed3 = 0; + sBossGanon2Seed1 = 0; + sBossGanon2Seed2 = 0; + sBossGanon2Seed3 = 0; memset(D_809105D8, 0, sizeof(D_809105D8)); memset(D_80910608, 0, sizeof(D_80910608)); - memset(sParticles, 0, sizeof(sParticles)); -} + memset(sBossGanon2Particles, 0, sizeof(sBossGanon2Particles)); +} \ No newline at end of file diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.h b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.h index 3d2625231..6271f5c14 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.h +++ b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.h @@ -4,6 +4,20 @@ #include "ultra64.h" #include "global.h" + +typedef struct { + /* 0x00 */ u8 type; + /* 0x01 */ u8 unk_01; + /* 0x04 */ Vec3f position; + /* 0x10 */ Vec3f velocity; + /* 0x1C */ Vec3f accel; + /* 0x28 */ char unk_28[0x6]; + /* 0x2E */ s16 unk_2E; + /* 0x30 */ char unk_30[0x4]; + /* 0x34 */ f32 scale; + /* 0x38 */ Vec3f unk_38; +} BossGanon2Effect; // size = 0x44 + struct BossGanon2; typedef void (*BossGanon2ActionFunc)(struct BossGanon2*, GlobalContext*); diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2_data.c b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2_data.c index 47201ed0d..e19b36bd6 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2_data.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2_data.c @@ -2,19 +2,6 @@ #include "overlays/actors/ovl_En_Zl3/z_en_zl3.h" #include "objects/object_ganon2/object_ganon2.h" -typedef struct { - /* 0x00 */ u8 type; - /* 0x01 */ u8 unk_01; - /* 0x04 */ Vec3f position; - /* 0x10 */ Vec3f velocity; - /* 0x1C */ Vec3f accel; - /* 0x28 */ char unk_28[0x6]; - /* 0x2E */ s16 unk_2E; - /* 0x30 */ char unk_30[0x4]; - /* 0x34 */ f32 scale; - /* 0x38 */ Vec3f unk_38; -} BossGanon2Effect; // size = 0x44 - static Vec3f D_80906D60 = { 0.0f, 0.0f, 0.0f }; static Vec3f D_80906D6C = { 0.0f, 0.0f, 500.0f }; @@ -326,31 +313,7 @@ static s16 D_809071CC[] = { 1, -1, 1, 1, 3, 4, 1, 6, 7, 2, 9, 10, 2, 12, 13 }; static u8 D_809071EC[] = { 3, 2, 2, 1, 3, 3, 1, 3, 3, 1, 0, 3, 1, 0, 3 }; -// padding -static u32 D_809071FC[2] = { 0 }; - #include "overlays/ovl_Boss_Ganon2/ovl_Boss_Ganon2.h" -static Vec3f D_8090EB20; - -static EnZl3* sZelda; - -static Actor* D_8090EB30; - -// unused -static UNK_TYPE D_8090EB34; - -static BossGanon2Effect sParticles[100]; - -static s32 sSeed1; -static s32 sSeed2; -static s32 sSeed3; - -// unused -static UNK_TYPE D_809105DC; - -static Vec3f D_809105D8[4]; - -static Vec3f D_80910608[4]; - -static s8 D_80910638; +// padding +//static u32 D_809071FC[2] = { 0 }; diff --git a/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index c6d8a8032..ec4899a28 100644 --- a/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -144,25 +144,25 @@ static f32 sFlatWidth[41] = { #include "z_boss_mo_colchk.c" static BossMoEffect sEffects[300]; -static s32 sSeed1; -static s32 sSeed2; -static s32 sSeed3; +static s32 sBossGanonSeed1; +static s32 sBossGanonSeed2; +static s32 sBossGanonSeed3; void BossMo_InitRand(s32 seedInit0, s32 seedInit1, s32 seedInit2) { - sSeed1 = seedInit0; - sSeed2 = seedInit1; - sSeed3 = seedInit2; + sBossGanonSeed1 = seedInit0; + sBossGanonSeed2 = seedInit1; + sBossGanonSeed3 = seedInit2; } f32 BossMo_RandZeroOne(void) { // Wichmann-Hill algorithm f32 randFloat; - sSeed1 = (sSeed1 * 171) % 30269; - sSeed2 = (sSeed2 * 172) % 30307; - sSeed3 = (sSeed3 * 170) % 30323; + sBossGanonSeed1 = (sBossGanonSeed1 * 171) % 30269; + sBossGanonSeed2 = (sBossGanonSeed2 * 172) % 30307; + sBossGanonSeed3 = (sBossGanonSeed3 * 170) % 30323; - randFloat = (sSeed1 / 30269.0f) + (sSeed2 / 30307.0f) + (sSeed3 / 30323.0f); + randFloat = (sBossGanonSeed1 / 30269.0f) + (sBossGanonSeed2 / 30307.0f) + (sBossGanonSeed3 / 30323.0f); while (randFloat >= 1.0f) { randFloat -= 1.0f; } @@ -3588,7 +3588,7 @@ void BossMo_Reset(void) { sMorphaTent1 = NULL; sMorphaTent2 = NULL; memset(sEffects, 0, sizeof(sEffects)); - sSeed1 = 0; - sSeed2 = 0; - sSeed3 = 0; -} + sBossGanonSeed1 = 0; + sBossGanonSeed2 = 0; + sBossGanonSeed3 = 0; +} \ No newline at end of file diff --git a/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index 6b31635b9..3c8fa9d91 100644 --- a/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -7,34 +7,6 @@ #define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) -typedef enum { - /* 0 */ TWEFF_NONE, - /* 1 */ TWEFF_DOT, - /* 2 */ TWEFF_2, - /* 3 */ TWEFF_3, - /* 4 */ TWEFF_RING, - /* 5 */ TWEFF_PLYR_FRZ, - /* 6 */ TWEFF_FLAME, - /* 7 */ TWEFF_MERGEFLAME, - /* 8 */ TWEFF_SHLD_BLST, - /* 9 */ TWEFF_SHLD_DEFL, - /* 10 */ TWEFF_SHLD_HIT -} TwEffType; - -typedef enum { - /* 0 */ EFF_ARGS, - /* 1 */ EFF_UNKS1, - /* 2 */ EFF_WORK_MAX -} EffectWork; - -typedef enum { - /* 0 */ EFF_SCALE, - /* 1 */ EFF_DIST, - /* 2 */ EFF_ROLL, - /* 3 */ EFF_YAW, - /* 4 */ EFF_FWORK_MAX -} EffectFWork; - typedef enum { /* 0x00 */ TW_KOTAKE, /* 0x01 */ TW_KOUME, @@ -47,19 +19,6 @@ typedef enum { /* 0x69 */ TW_DEATHBALL_KOUME } TwinrovaType; -typedef struct { - /* 0x0000 */ u8 type; - /* 0x0001 */ u8 frame; - /* 0x0004 */ Vec3f pos; - /* 0x0010 */ Vec3f curSpeed; - /* 0x001C */ Vec3f accel; - /* 0x0028 */ Color_RGB8 color; - /* 0x002C */ s16 alpha; - /* 0x002E */ s16 work[EFF_WORK_MAX]; - /* 0x0034 */ f32 workf[EFF_FWORK_MAX]; - /* 0x0044 */ Actor* target; -} BossTwEffect; - void BossTw_Init(Actor* thisx, GlobalContext* globalCtx); void BossTw_Destroy(Actor* thisx, GlobalContext* globalCtx); void BossTw_Update(Actor* thisx, GlobalContext* globalCtx); @@ -200,7 +159,7 @@ static Vec3f sTwinrovaPillarPos[] = { { 0.0f, 380.0f, -580.0f }, }; -static u8 sTwInitalized = false; +u8 sTwInitalized = false; static InitChainEntry sInitChain[] = { ICHAIN_U8(targetMode, 5, ICHAIN_CONTINUE), @@ -233,7 +192,7 @@ static u8 D_8094C878; static s16 D_8094C87A; static s16 D_8094C87C; static u8 D_8094C87E; -static BossTwEffect sTwEffects[150]; +BossTwEffect sTwEffects[150]; void BossTw_AddDotEffect(GlobalContext* globalCtx, Vec3f* initalPos, Vec3f* initalSpeed, Vec3f* accel, f32 scale, s16 args, s16 countLimit) { diff --git a/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.h b/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.h index 575997c26..51b664726 100644 --- a/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.h +++ b/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.h @@ -4,9 +4,46 @@ #include "ultra64.h" #include "global.h" -struct BossTw; +typedef enum { + /* 0 */ TWEFF_NONE, + /* 1 */ TWEFF_DOT, + /* 2 */ TWEFF_2, + /* 3 */ TWEFF_3, + /* 4 */ TWEFF_RING, + /* 5 */ TWEFF_PLYR_FRZ, + /* 6 */ TWEFF_FLAME, + /* 7 */ TWEFF_MERGEFLAME, + /* 8 */ TWEFF_SHLD_BLST, + /* 9 */ TWEFF_SHLD_DEFL, + /* 10 */ TWEFF_SHLD_HIT +} TwEffType; -typedef void (*BossTwActionFunc)(struct BossTw* this, GlobalContext* globalCtx); +typedef enum { + /* 0 */ EFF_ARGS, + /* 1 */ EFF_UNKS1, + /* 2 */ EFF_WORK_MAX +} EffectWork; + +typedef enum { + /* 0 */ EFF_SCALE, + /* 1 */ EFF_DIST, + /* 2 */ EFF_ROLL, + /* 3 */ EFF_YAW, + /* 4 */ EFF_FWORK_MAX +} EffectFWork; + +typedef struct { + /* 0x0000 */ u8 type; + /* 0x0001 */ u8 frame; + /* 0x0004 */ Vec3f pos; + /* 0x0010 */ Vec3f curSpeed; + /* 0x001C */ Vec3f accel; + /* 0x0028 */ Color_RGB8 color; + /* 0x002C */ s16 alpha; + /* 0x002E */ s16 work[EFF_WORK_MAX]; + /* 0x0034 */ f32 workf[EFF_FWORK_MAX]; + /* 0x0044 */ Actor* target; +} BossTwEffect; typedef enum { /* 0 */ CS_TIMER_1, @@ -55,6 +92,10 @@ typedef enum { /* 26 */ FWORK_MAX } TwFwork; +struct BossTw; + +typedef void (*BossTwActionFunc)(struct BossTw*, GlobalContext* globalCtx); + typedef struct BossTw { /* 0x0000 */ Actor actor; /* 0x014C */ BossTwActionFunc actionFunc; diff --git a/soh/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c b/soh/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c index 4f75a03cd..acff25c75 100644 --- a/soh/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c +++ b/soh/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c @@ -307,7 +307,7 @@ void func_8096712C(Demo6K* this, GlobalContext* globalCtx) { } } -static Vec3f velocity = { 0.0f, 0.0f, 0.0f }; +Vec3f sDemo6kVelocity = { 0.0f, 0.0f, 0.0f }; void func_80967244(Demo6K* this, GlobalContext* globalCtx) { static Vec3f accel = { 0.0f, 0.0f, 0.0f }; static Color_RGBA8 primColor = { 255, 255, 255, 0 }; @@ -324,9 +324,9 @@ void func_80967244(Demo6K* this, GlobalContext* globalCtx) { rand1 = Rand_ZeroFloat(0xFFFF); rand2 = Rand_ZeroFloat(0xFFFF); - velocity.x = Math_SinS(rand2) * Math_CosS(rand1) * 20.0f; - velocity.z = Math_CosS(rand2) * Math_CosS(rand1) * 20.0f; - velocity.y = Math_SinS(rand1) * 20.0f; + sDemo6kVelocity.x = Math_SinS(rand2) * Math_CosS(rand1) * 20.0f; + sDemo6kVelocity.z = Math_CosS(rand2) * Math_CosS(rand1) * 20.0f; + sDemo6kVelocity.y = Math_SinS(rand1) * 20.0f; accel.y = 0.0f; @@ -342,7 +342,7 @@ void func_80967244(Demo6K* this, GlobalContext* globalCtx) { scale = 18000; } - EffectSsKiraKira_SpawnFocused(globalCtx, &pos, &velocity, &accel, &primColor, &envColor, scale, 20); + EffectSsKiraKira_SpawnFocused(globalCtx, &pos, &sDemo6kVelocity, &accel, &primColor, &envColor, scale, 20); } void func_80967410(Demo6K* this, GlobalContext* globalCtx) { @@ -820,7 +820,7 @@ void func_809691BC(Demo6K* this, GlobalContext* globalCtx, s32 params) { } void Demo6K_Reset(void) { - velocity.x = 0.0f; - velocity.y = 0.0f; - velocity.z = 0.0f; + sDemo6kVelocity.x = 0.0f; + sDemo6kVelocity.y = 0.0f; + sDemo6kVelocity.z = 0.0f; } \ No newline at end of file diff --git a/soh/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c b/soh/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c index a94fa36af..53044464c 100644 --- a/soh/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c +++ b/soh/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c @@ -132,7 +132,7 @@ void DemoKekkai_Destroy(Actor* thisx, GlobalContext* globalCtx) { Collider_DestroyCylinder(globalCtx, &this->collider2); } -static Vec3f vel = { 0.0f, 0.0f, 0.0f }; +Vec3f demoKekkaiVel = { 0.0f, 0.0f, 0.0f }; void DemoKekkai_SpawnParticles(DemoKekkai* this, GlobalContext* globalCtx) { static Vec3f accel = { 0.0f, 0.0f, 0.0f }; static Color_RGBA8 lightYellow = { 255, 255, 170, 0 }; @@ -144,15 +144,15 @@ void DemoKekkai_SpawnParticles(DemoKekkai* this, GlobalContext* globalCtx) { s16 roll = Rand_ZeroFloat(65535.0f); s16 yaw = Rand_ZeroFloat(65535.0f); - vel.x = Math_SinS(yaw) * Math_CosS(roll) * Rand_ZeroFloat(8.0f); - vel.z = Math_CosS(yaw) * Math_CosS(roll) * Rand_ZeroFloat(8.0f); - vel.y = Math_SinS(roll) * Rand_ZeroFloat(3.0f); + demoKekkaiVel.x = Math_SinS(yaw) * Math_CosS(roll) * Rand_ZeroFloat(8.0f); + demoKekkaiVel.z = Math_CosS(yaw) * Math_CosS(roll) * Rand_ZeroFloat(8.0f); + demoKekkaiVel.y = Math_SinS(roll) * Rand_ZeroFloat(3.0f); - pos.x = (vel.x * 7.0f) + this->actor.world.pos.x; - pos.y = (vel.y * 20.0f) + this->actor.world.pos.y + 120.0f; - pos.z = (vel.z * 7.0f) + this->actor.world.pos.z; + pos.x = (demoKekkaiVel.x * 7.0f) + this->actor.world.pos.x; + pos.y = (demoKekkaiVel.y * 20.0f) + this->actor.world.pos.y + 120.0f; + pos.z = (demoKekkaiVel.z * 7.0f) + this->actor.world.pos.z; - EffectSsKiraKira_SpawnFocused(globalCtx, &pos, &vel, &accel, &lightYellow, &darkRed, 3000, + EffectSsKiraKira_SpawnFocused(globalCtx, &pos, &demoKekkaiVel, &accel, &lightYellow, &darkRed, 3000, (s32)Rand_ZeroFloat(40.0f) + 45); } } @@ -338,7 +338,7 @@ void DemoKekkai_DrawTowerBarrier(Actor* thisx, GlobalContext* globalCtx) { } void DemoKekkai_Reset(void) { - vel.x = 0.0f; - vel.y = 0.0f; - vel.z = 0.0f; + demoKekkaiVel.x = 0.0f; + demoKekkaiVel.y = 0.0f; + demoKekkaiVel.z = 0.0f; } \ No newline at end of file diff --git a/soh/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c b/soh/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c index 46f3d1857..ee503dd43 100644 --- a/soh/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c +++ b/soh/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c @@ -53,7 +53,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(uncullZoneDownward, 4000, ICHAIN_STOP), }; -static s16 sWarpTimerTarget; +s16 sWarpTimerTarget; void DoorWarp1_SetupAction(DoorWarp1* this, DoorWarp1ActionFunc actionFunc) { this->actionFunc = actionFunc; diff --git a/soh/src/overlays/actors/ovl_En_Bw/z_en_bw.c b/soh/src/overlays/actors/ovl_En_Bw/z_en_bw.c index 14e9ff15c..6eaa2f777 100644 --- a/soh/src/overlays/actors/ovl_En_Bw/z_en_bw.c +++ b/soh/src/overlays/actors/ovl_En_Bw/z_en_bw.c @@ -122,7 +122,7 @@ static DamageTable sDamageTable = { /* Unknown 2 */ DMG_ENTRY(0, 0x0), }; -static s32 sSlugGroup = 0; +s32 sSlugGroup = 0; void EnBw_SetupAction(EnBw* this, EnBwActionFunc actionFunc) { this->actionFunc = actionFunc; diff --git a/soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c b/soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c index e68eaabb1..274505978 100644 --- a/soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c +++ b/soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c @@ -35,7 +35,7 @@ const ActorInit En_Clear_Tag_InitVars = { (ActorResetFunc)EnClearTag_Reset, }; -static u8 sIsEffectsInitialized = false; +u8 sClearTagIsEffectsInitialized = false; static Vec3f sZeroVector = { 0.0f, 0.0f, 0.0f }; @@ -79,10 +79,10 @@ static ColliderCylinderInit sLaserCylinderInit = { { 15, 30, 10, { 0, 0, 0 } }, }; -static UNK_TYPE4 D_809D5C98 = 0; // unused -static UNK_TYPE4 D_809D5C9C = 0; // unused +//static UNK_TYPE4 D_809D5C98 = 0; // unused +//static UNK_TYPE4 D_809D5C9C = 0; // unused -static EnClearTagEffect sClearTagEffects[CLEAR_TAG_EFFECT_MAX_COUNT]; +EnClearTagEffect sClearTagEffects[CLEAR_TAG_EFFECT_MAX_COUNT]; #include "overlays/ovl_En_Clear_Tag/ovl_En_Clear_Tag.h" @@ -273,8 +273,8 @@ void EnClearTag_Init(Actor* thisx, GlobalContext* globalCtx) { } // Initialize all effects to available if effects have not been initialized. - if (!sIsEffectsInitialized) { - sIsEffectsInitialized = true; + if (!sClearTagIsEffectsInitialized) { + sClearTagIsEffectsInitialized = true; globalCtx->specialEffects = &sClearTagEffects[0]; for (i = 0; i < CLEAR_TAG_EFFECT_MAX_COUNT; i++) { sClearTagEffects[i].type = CLEAR_TAG_EFFECT_AVAILABLE; @@ -1027,5 +1027,5 @@ void EnClearTag_DrawEffects(GlobalContext* globalCtx) { void EnClearTag_Reset(void) { memset(sClearTagEffects, 0, sizeof(sClearTagEffects)); - sIsEffectsInitialized = false; + sClearTagIsEffectsInitialized = false; } \ No newline at end of file diff --git a/soh/src/overlays/actors/ovl_En_Fr/z_en_fr.c b/soh/src/overlays/actors/ovl_En_Fr/z_en_fr.c index 38c86eda3..c84a22fb8 100644 --- a/soh/src/overlays/actors/ovl_En_Fr/z_en_fr.c +++ b/soh/src/overlays/actors/ovl_En_Fr/z_en_fr.c @@ -84,18 +84,7 @@ sEnFrPointers.flags = 12 - Deactivate frogs, frogs will jump back into the water */ -typedef struct { - u8 flags; - EnFr* frogs[5]; -} EnFrPointers; - -typedef struct { - f32 xzDist; - f32 yaw; - f32 yDist; -} LogSpotToFromWater; - -static EnFrPointers sEnFrPointers = { +EnFrPointers sEnFrPointers = { 0x00, { NULL, @@ -106,6 +95,7 @@ static EnFrPointers sEnFrPointers = { }, }; + // Flags for gSaveContext.eventChkInf[13] static u16 sSongIndex[] = { 0x0002, 0x0004, 0x0010, 0x0008, 0x0020, 0x0040, 0x0001, 0x0000, diff --git a/soh/src/overlays/actors/ovl_En_Fr/z_en_fr.h b/soh/src/overlays/actors/ovl_En_Fr/z_en_fr.h index ba2ef5014..154aefc17 100644 --- a/soh/src/overlays/actors/ovl_En_Fr/z_en_fr.h +++ b/soh/src/overlays/actors/ovl_En_Fr/z_en_fr.h @@ -28,6 +28,12 @@ typedef enum { /* 07 */ FROG_NO_SONG } FrogSongType; +typedef struct { + f32 xzDist; + f32 yaw; + f32 yDist; +} LogSpotToFromWater; + typedef struct EnFr { /* 0x0000 */ Actor actor; /* 0x014C */ SkelAnime skelAnime; // Frog Skeleton @@ -69,4 +75,9 @@ typedef struct EnFr { /* 0x03B8 */ Vec3f posButterflyLight; // Used in Lights_PointNoGlowSetInfo() } EnFr; // size = 0x03C4 +typedef struct { + u8 flags; + EnFr* frogs[5]; +} EnFrPointers; + #endif diff --git a/soh/src/overlays/actors/ovl_En_Goma/z_en_goma.c b/soh/src/overlays/actors/ovl_En_Goma/z_en_goma.c index 85049b7f1..a9997c383 100644 --- a/soh/src/overlays/actors/ovl_En_Goma/z_en_goma.c +++ b/soh/src/overlays/actors/ovl_En_Goma/z_en_goma.c @@ -96,7 +96,7 @@ static ColliderCylinderInit D_80A4B7CC = { { 15, 30, 10, { 0, 0, 0 } }, }; -static u8 sSpawnNum = 0; +u8 sSpawnNum = 0; static Vec3f sDeadEffectVel = { 0.0f, 0.0f, 0.0f }; static InitChainEntry sInitChain[] = { diff --git a/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c b/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c index 649c1b747..bd529ea55 100644 --- a/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c +++ b/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c @@ -32,9 +32,9 @@ void func_80A7D26C(EnInsect* this, GlobalContext* globalCtx); void func_80A7D39C(EnInsect* this); void func_80A7D460(EnInsect* this, GlobalContext* globalCtx); -static f32 D_80A7DEB0 = 0.0f; -static s16 D_80A7DEB4 = 0; -static s16 D_80A7DEB8 = 0; +f32 D_80A7DEB0 = 0.0f; +s16 D_80A7DEB4 = 0; +s16 D_80A7DEB8 = 0; const ActorInit En_Insect_InitVars = { ACTOR_EN_INSECT, diff --git a/soh/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c b/soh/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c index 4ce8fae20..11573dba0 100644 --- a/soh/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c +++ b/soh/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c @@ -29,8 +29,8 @@ void EnIshi_SpawnFragmentsLarge(EnIshi* this, GlobalContext* globalCtx); void EnIshi_SpawnDustSmall(EnIshi* this, GlobalContext* globalCtx); void EnIshi_SpawnDustLarge(EnIshi* this, GlobalContext* globalCtx); -static s16 sRotSpeedX = 0; -static s16 sRotSpeedY = 0; +s16 sRockRotSpeedX = 0; +s16 sRockRotSpeedY = 0; const ActorInit En_Ishi_InitVars = { ACTOR_EN_ISHI, @@ -405,11 +405,11 @@ void EnIshi_SetupFly(EnIshi* this) { this->actor.velocity.x = Math_SinS(this->actor.world.rot.y) * this->actor.speedXZ; this->actor.velocity.z = Math_CosS(this->actor.world.rot.y) * this->actor.speedXZ; if ((this->actor.params & 1) == ROCK_SMALL) { - sRotSpeedX = (Rand_ZeroOne() - 0.5f) * 16000.0f; - sRotSpeedY = (Rand_ZeroOne() - 0.5f) * 2400.0f; + sRockRotSpeedX = (Rand_ZeroOne() - 0.5f) * 16000.0f; + sRockRotSpeedY = (Rand_ZeroOne() - 0.5f) * 2400.0f; } else { - sRotSpeedX = (Rand_ZeroOne() - 0.5f) * 8000.0f; - sRotSpeedY = (Rand_ZeroOne() - 0.5f) * 1600.0f; + sRockRotSpeedX = (Rand_ZeroOne() - 0.5f) * 8000.0f; + sRockRotSpeedY = (Rand_ZeroOne() - 0.5f) * 1600.0f; } this->actor.colChkInfo.mass = 240; this->actionFunc = EnIshi_Fly; @@ -455,8 +455,8 @@ void EnIshi_Fly(EnIshi* this, GlobalContext* globalCtx) { EffectSsGRipple_Spawn(globalCtx, &contactPos, 500, 1300, 8); } this->actor.minVelocityY = -6.0f; - sRotSpeedX >>= 2; - sRotSpeedY >>= 2; + sRockRotSpeedX >>= 2; + sRockRotSpeedY >>= 2; SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L); this->actor.bgCheckFlags &= ~0x40; } @@ -464,8 +464,8 @@ void EnIshi_Fly(EnIshi* this, GlobalContext* globalCtx) { EnIshi_Fall(this); func_80A7ED94(&this->actor.velocity, D_80A7FA28[type]); func_8002D7EC(&this->actor); - this->actor.shape.rot.x += sRotSpeedX; - this->actor.shape.rot.y += sRotSpeedY; + this->actor.shape.rot.x += sRockRotSpeedX; + this->actor.shape.rot.y += sRockRotSpeedY; Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 7.5f, 35.0f, 0.0f, 0xC5); Collider_UpdateCylinder(&this->actor, &this->collider); CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); @@ -502,6 +502,6 @@ void EnIshi_Draw(Actor* thisx, GlobalContext* globalCtx) { } void EnIshi_Reset(void) { - sRotSpeedX = 0; - sRotSpeedY = 0; + sRockRotSpeedX = 0; + sRockRotSpeedY = 0; } \ No newline at end of file diff --git a/soh/src/overlays/actors/ovl_En_Niw/z_en_niw.c b/soh/src/overlays/actors/ovl_En_Niw/z_en_niw.c index c6e23b8b9..5cf7abc25 100644 --- a/soh/src/overlays/actors/ovl_En_Niw/z_en_niw.c +++ b/soh/src/overlays/actors/ovl_En_Niw/z_en_niw.c @@ -35,7 +35,7 @@ void EnNiw_FeatherSpawn(EnNiw* this, Vec3f* pos, Vec3f* vel, Vec3f* accel, f32 s void EnNiw_FeatherUpdate(EnNiw* this, GlobalContext* globalCtx); void EnNiw_FeatherDraw(EnNiw* this, GlobalContext* globalCtx); -static s16 D_80AB85E0 = 0; +s16 D_80AB85E0 = 0; const ActorInit En_Niw_InitVars = { ACTOR_EN_NIW, @@ -70,9 +70,9 @@ static s16 sKakarikoFlagList[] = { 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000, 0x8000, }; -static u8 sLowerRiverSpawned = false; +u8 sLowerRiverSpawned = false; -static u8 sUpperRiverSpawned = false; +u8 sUpperRiverSpawned = false; static ColliderCylinderInit sCylinderInit1 = { { diff --git a/soh/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c b/soh/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c index 93f48417e..63b386238 100644 --- a/soh/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c +++ b/soh/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c @@ -126,7 +126,7 @@ static DamageTable sDamageTable = { /* Unknown 2 */ DMG_ENTRY(0, 0x0), }; -static s32 sNumSpawned = 0; +s32 sEnPoFieldNumSpawned = 0; static Vec3f sFieldMiddle = { -1000.0f, 0.0f, 6500.0f }; @@ -145,22 +145,22 @@ static EnPoFieldInfo sPoFieldInfo[2] = { static Vec3f D_80AD714C = { 0.0f, 1400.0f, 0.0f }; -static Vec3s sSpawnPositions[10]; -static u8 sSpawnSwitchFlags[10]; +Vec3s sEnPoFieldSpawnPositions[10]; +u8 sEnPoFieldSpawnSwitchFlags[10]; static MtxF sLimb7Mtx; void EnPoField_Init(Actor* thisx, GlobalContext* globalCtx) { EnPoField* this = (EnPoField*)thisx; s32 pad; - if (sNumSpawned != 10) { - sSpawnPositions[sNumSpawned].x = this->actor.world.pos.x; - sSpawnPositions[sNumSpawned].y = this->actor.world.pos.y; - sSpawnPositions[sNumSpawned].z = this->actor.world.pos.z; - sSpawnSwitchFlags[sNumSpawned] = this->actor.params & 0xFF; - sNumSpawned++; + if (sEnPoFieldNumSpawned != 10) { + sEnPoFieldSpawnPositions[sEnPoFieldNumSpawned].x = this->actor.world.pos.x; + sEnPoFieldSpawnPositions[sEnPoFieldNumSpawned].y = this->actor.world.pos.y; + sEnPoFieldSpawnPositions[sEnPoFieldNumSpawned].z = this->actor.world.pos.z; + sEnPoFieldSpawnSwitchFlags[sEnPoFieldNumSpawned] = this->actor.params & 0xFF; + sEnPoFieldNumSpawned++; } - if (sNumSpawned >= 2) { + if (sEnPoFieldNumSpawned >= 2) { this->actor.params = 0xFF; Actor_Kill(&this->actor); return; @@ -407,10 +407,10 @@ void EnPoField_WaitForSpawn(EnPoField* this, GlobalContext* globalCtx) { this->actionTimer--; } if (this->actionTimer == 0) { - for (i = 0; i < sNumSpawned; i++) { - if (fabsf(sSpawnPositions[i].x - player->actor.world.pos.x) < 150.0f && - fabsf(sSpawnPositions[i].z - player->actor.world.pos.z) < 150.0f) { - if (Flags_GetSwitch(globalCtx, sSpawnSwitchFlags[i])) { + for (i = 0; i < sEnPoFieldNumSpawned; i++) { + if (fabsf(sEnPoFieldSpawnPositions[i].x - player->actor.world.pos.x) < 150.0f && + fabsf(sEnPoFieldSpawnPositions[i].z - player->actor.world.pos.z) < 150.0f) { + if (Flags_GetSwitch(globalCtx, sEnPoFieldSpawnSwitchFlags[i])) { if (player->stateFlags1 & 0x800000) { // Player riding Epona return; } else { @@ -711,7 +711,7 @@ void EnPoField_SoulInteract(EnPoField* this, GlobalContext* globalCtx) { } else { this->actor.textId = 0x508F; Item_Give(globalCtx, ITEM_BIG_POE); - Flags_SetSwitch(globalCtx, sSpawnSwitchFlags[this->spawnFlagIndex]); + Flags_SetSwitch(globalCtx, sEnPoFieldSpawnSwitchFlags[this->spawnFlagIndex]); } } else { Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_LAUGH); @@ -1009,8 +1009,8 @@ void EnPoField_DrawSoul(Actor* thisx, GlobalContext* globalCtx) { } void EnPoField_Reset(void) { - sNumSpawned = 0; + sEnPoFieldNumSpawned = 0; - memset(sSpawnPositions, 0, sizeof(sSpawnPositions)); - memset(sSpawnSwitchFlags, 0, sizeof(sSpawnSwitchFlags)); + memset(sEnPoFieldSpawnPositions, 0, sizeof(sEnPoFieldSpawnPositions)); + memset(sEnPoFieldSpawnSwitchFlags, 0, sizeof(sEnPoFieldSpawnSwitchFlags)); } \ No newline at end of file diff --git a/soh/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c b/soh/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c index 71cd47144..c1d169dfe 100644 --- a/soh/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c +++ b/soh/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c @@ -35,7 +35,7 @@ const ActorInit En_Takara_Man_InitVars = { (ActorResetFunc)EnTakaraMan_Reset, }; -static u8 sTakaraIsInitialized = false; +u8 sTakaraIsInitialized = false; void EnTakaraMan_Reset(Actor* thisx, GlobalContext* globalCtx) { sTakaraIsInitialized = false; diff --git a/soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c b/soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c index c64f9acb7..92497bf3e 100644 --- a/soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c +++ b/soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c @@ -447,7 +447,7 @@ void func_80B3D118(GlobalContext* globalCtx) { static Vec3f D_80B42DA0; -static s32 D_80B41D90 = 0; +s32 D_80B41D90 = 0; void EnXc_SetColossusWindSFX(GlobalContext* globalCtx) { if (gSaveContext.sceneSetupIndex == 4) { static Vec3f sPos = { 0.0f, 0.0f, 0.0f }; @@ -484,17 +484,17 @@ void EnXc_SetColossusWindSFX(GlobalContext* globalCtx) { } } -static s32 sFlameSpawned = false; +s32 sEnXcFlameSpawned = false; void EnXc_SpawnFlame(EnXc* this, GlobalContext* globalCtx) { - if (!sFlameSpawned) { + if (!sEnXcFlameSpawned) { CsCmdActorAction* npcAction = EnXc_GetCsCmd(globalCtx, 0); f32 xPos = npcAction->startPos.x; f32 yPos = npcAction->startPos.y; f32 zPos = npcAction->startPos.z; this->flameActor = Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_LIGHT, xPos, yPos, zPos, 0, 0, 0, 5); - sFlameSpawned = true; + sEnXcFlameSpawned = true; } } @@ -519,7 +519,7 @@ void EnXc_DestroyFlame(EnXc* this) { Actor_Kill(&this->actor); } -static s32 D_80B41DA8 = 1; +s32 D_80B41DA8 = 1; void EnXc_InitFlame(EnXc* this, GlobalContext* globalCtx) { s32 pad; s16 sceneNum = globalCtx->sceneNum; @@ -1402,7 +1402,7 @@ void func_80B3F534(GlobalContext* globalCtx) { } } -static s32 D_80B41DAC = 1; +s32 D_80B41DAC = 1; void func_80B3F59C(EnXc* this, GlobalContext* globalCtx) { CsCmdActorAction* npcAction = EnXc_GetCsCmd(globalCtx, 0); @@ -2430,7 +2430,7 @@ const ActorInit En_Xc_InitVars = { void EnXc_Reset(void) { D_80B41D90 = 0; - sFlameSpawned = false; + sEnXcFlameSpawned = false; D_80B41DA8 = 1; D_80B41DAC = 1; } \ No newline at end of file diff --git a/soh/src/overlays/actors/ovl_En_Zf/z_en_zf.c b/soh/src/overlays/actors/ovl_En_Zf/z_en_zf.c index c5ed809db..a6b0f5809 100644 --- a/soh/src/overlays/actors/ovl_En_Zf/z_en_zf.c +++ b/soh/src/overlays/actors/ovl_En_Zf/z_en_zf.c @@ -97,8 +97,8 @@ static Vec3f sPlatformPositions[] = { }; // These seem to relate to the tagging in/out the minibosses do -static s16 D_80B4A1B0 = 0; -static s16 D_80B4A1B4 = 1; +s16 D_80B4A1B0 = 0; +s16 D_80B4A1B4 = 1; const ActorInit En_Zf_InitVars = { ACTOR_EN_ZF, diff --git a/soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c b/soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c index 8ad3a2cef..6ea271bf4 100644 --- a/soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c +++ b/soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c @@ -45,7 +45,7 @@ static void* sEyeTextures[] = { gZelda2EyeOpenTex, gZelda2EyeHalfTex, gZelda2Eye static void* sMouthTextures[] = { gZelda2MouthSeriousTex, gZelda2MouthHappyTex, gZelda2MouthOpenTex }; -static s32 D_80B5A468 = 0; +s32 D_80B5A468 = 0; static Vec3f D_80B5A46C = { 0.0f, 0.0f, 0.0f }; @@ -55,7 +55,7 @@ static f32 D_80B5A484 = 0.0f; static Vec3f D_80B5A488 = { 0.0f, 0.0f, 0.0f }; -static s32 D_80B5A494 = -1; +s32 D_80B5A494 = -1; static Vec3f D_80B5A498 = { 148.0f, 260.0f, -87.0f }; @@ -63,7 +63,7 @@ static Vec3f D_80B5A4A4 = { -12.0f, 260.0f, -147.0f }; static Vec3f D_80B5A4B0 = { 42.0f, 260.0f, 13.0f }; -static u32 D_80B5A4BC = 0; +u32 D_80B5A4BC = 0; void func_80B533B0(Actor* thisx, GlobalContext* globalCtx) { EnZl3* this = (EnZl3*)thisx; diff --git a/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c b/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c index 237f1e926..b01bcf1d9 100644 --- a/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c +++ b/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c @@ -57,8 +57,8 @@ const ActorInit Object_Kankyo_InitVars = { (ActorResetFunc)ObjectKankyo_Reset, }; -static u8 sIsSpawned = false; -static s16 sTrailingFairies = 0; +u8 sKankyoIsSpawned = false; +s16 sTrailingFairies = 0; void ObjectKankyo_SetupAction(ObjectKankyo* this, ObjectKankyoActionFunc action) { this->actionFunc = action; @@ -76,18 +76,18 @@ void ObjectKankyo_Init(Actor* thisx, GlobalContext* globalCtx) { this->actor.room = -1; switch (this->actor.params) { case 0: - if (!sIsSpawned) { + if (!sKankyoIsSpawned) { ObjectKankyo_SetupAction(this, ObjectKankyo_Fairies); - sIsSpawned = true; + sKankyoIsSpawned = true; } else { Actor_Kill(&this->actor); } break; case 3: - if (!sIsSpawned) { + if (!sKankyoIsSpawned) { ObjectKankyo_SetupAction(this, ObjectKankyo_Snow); - sIsSpawned = true; + sKankyoIsSpawned = true; } else { Actor_Kill(&this->actor); } @@ -939,6 +939,6 @@ void ObjectKankyo_DrawBeams(ObjectKankyo* this2, GlobalContext* globalCtx2) { } void ObjectKankyo_Reset(void) { - sIsSpawned = false; + sKankyoIsSpawned = false; sTrailingFairies = 0; } \ No newline at end of file diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index aa11b6d7e..49ad4e6e4 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -4804,7 +4804,7 @@ s32 func_8083ADD4(GlobalContext* globalCtx, Player* this) { void func_8083AE40(Player* this, s16 objectId) { s32 pad; - u32 size; + size_t size; if (objectId != OBJECT_INVALID) { this->giObjectLoading = true; @@ -4815,7 +4815,7 @@ void func_8083AE40(Player* this, s16 objectId) { LOG_HEX("size", size, "../z_player.c", 9090); ASSERT(size <= 1024 * 8, "size <= 1024 * 8", "../z_player.c", 9091); - DmaMgr_SendRequest2(&this->giObjectDmaRequest, (u32)this->giObjectSegment, gObjectTable[objectId].vromStart, + DmaMgr_SendRequest2(&this->giObjectDmaRequest, (uintptr_t)this->giObjectSegment, gObjectTable[objectId].vromStart, size, 0, &this->giObjectLoadQueue, NULL, "../z_player.c", 9099); } } @@ -10751,7 +10751,7 @@ void Player_UpdateCommon(Player* this, GlobalContext* globalCtx, Input* input) { static Vec3f D_80854838 = { 0.0f, 0.0f, -30.0f }; void Player_Update(Actor* thisx, GlobalContext* globalCtx) { - static Vec3f sDogSpawnPos; + static Vec3f sDogSpawnPos; Player* this = (Player*)thisx; s32 dogParams; s32 pad; From 3bc0564d9abb481749277fab54e5fa449ac57f10 Mon Sep 17 00:00:00 2001 From: Emill Date: Fri, 13 May 2022 02:43:07 +0200 Subject: [PATCH 140/146] Use DX11 by default, if available (#307) --- libultraship/libultraship/ConfigFile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libultraship/libultraship/ConfigFile.cpp b/libultraship/libultraship/ConfigFile.cpp index 2e9a8cc94..8a0794643 100644 --- a/libultraship/libultraship/ConfigFile.cpp +++ b/libultraship/libultraship/ConfigFile.cpp @@ -72,7 +72,7 @@ namespace Ship { (*this)["WINDOW"]["FULLSCREEN WIDTH"] = std::to_string(1920); (*this)["WINDOW"]["FULLSCREEN HEIGHT"] = std::to_string(1080); (*this)["WINDOW"]["FULLSCREEN"] = std::to_string(false); - (*this)["WINDOW"]["GFX BACKEND"] = "sdl"; + (*this)["WINDOW"]["GFX BACKEND"] = ""; (*this)["KEYBOARD CONTROLLER BINDING 1"][STR(BTN_CRIGHT)] = std::to_string(0x14D); (*this)["KEYBOARD CONTROLLER BINDING 1"][STR(BTN_CLEFT)] = std::to_string(0x14B); From b3d19eee3a50fb563cff3fb93e754c4b52f759bf Mon Sep 17 00:00:00 2001 From: KiritoDev <36680385+KiritoDv@users.noreply.github.com> Date: Thu, 12 May 2022 19:44:50 -0500 Subject: [PATCH 141/146] Fixed id and cleanup on finish of notifications (#304) Co-authored-by: KiritoDv --- libultraship/libultraship/GameOverlay.cpp | 18 ++++++++++++++++-- libultraship/libultraship/GameOverlay.h | 2 ++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/libultraship/libultraship/GameOverlay.cpp b/libultraship/libultraship/GameOverlay.cpp index 02e089366..042ff980c 100644 --- a/libultraship/libultraship/GameOverlay.cpp +++ b/libultraship/libultraship/GameOverlay.cpp @@ -8,6 +8,7 @@ #include "SohImGuiImpl.h" #include "TextureMod.h" #include "Lib/ImGui/imgui_internal.h" +#include "Utils/StringHelper.h" void Ship::GameOverlay::LoadFont(const std::string& name, const std::string& path, float fontSize) { ImGuiIO& io = ImGui::GetIO(); @@ -50,10 +51,21 @@ void Ship::GameOverlay::TextDrawNotification(float duration, bool shadow, const vsnprintf(buf, IM_ARRAYSIZE(buf), fmt, args); buf[IM_ARRAYSIZE(buf) - 1] = 0; va_end(args); - - this->RegisteredOverlays[fmt] = new Overlay({ OverlayType::NOTIFICATION, ImStrdup(buf), duration, duration }); + this->RegisteredOverlays[StringHelper::Sprintf("NotificationID:%d%d", rand(), this->RegisteredOverlays.size())] = new Overlay({ OverlayType::NOTIFICATION, ImStrdup(buf), duration, duration }); + NeedsCleanup = true; } +void Ship::GameOverlay::CleanupNotifications() { + if(!NeedsCleanup) return; + for (auto it = this->RegisteredOverlays.begin(); it != this->RegisteredOverlays.end(); ) { + if (it->second->type == OverlayType::NOTIFICATION && it->second->duration <= 0.0f) { + it = this->RegisteredOverlays.erase(it); + } else { + ++it; + } + } + NeedsCleanup = false; +} float Ship::GameOverlay::GetScreenWidth() { const ImGuiViewport* viewport = ImGui::GetMainViewport(); @@ -137,6 +149,8 @@ void Ship::GameOverlay::Draw() { ImGui::Begin("SoHOverlay", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoInputs); + this->CleanupNotifications(); + float textY = 50; float notY = 0; diff --git a/libultraship/libultraship/GameOverlay.h b/libultraship/libultraship/GameOverlay.h index e3161bca3..605cd5898 100644 --- a/libultraship/libultraship/GameOverlay.h +++ b/libultraship/libultraship/GameOverlay.h @@ -33,6 +33,8 @@ namespace Ship { void TextDraw(float x, float y, bool shadow, ImVec4 color, const char* text, ...); void TextDrawNotification(float duration, bool shadow, const char* fmt, ...); private: + bool NeedsCleanup = false; + void CleanupNotifications(); void LoadFont(const std::string& name, const std::string& path, float fontSize); }; From 0a8db6d8a62f6d997065223cd6e2237f71c6aecc Mon Sep 17 00:00:00 2001 From: louist103 <35883445+louist103@users.noreply.github.com> Date: Thu, 12 May 2022 20:45:24 -0400 Subject: [PATCH 142/146] add new files (#308) --- .../GC_NMQ_D/textures/map_48x85_static.xml | 136 ++++++++--------- .../textures/map_48x85_static.xml | 138 +++++++++--------- 2 files changed, 137 insertions(+), 137 deletions(-) diff --git a/soh/assets/xml/GC_NMQ_D/textures/map_48x85_static.xml b/soh/assets/xml/GC_NMQ_D/textures/map_48x85_static.xml index b5b1d1a85..2788498a8 100644 --- a/soh/assets/xml/GC_NMQ_D/textures/map_48x85_static.xml +++ b/soh/assets/xml/GC_NMQ_D/textures/map_48x85_static.xml @@ -1,72 +1,72 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/soh/assets/xml/GC_NMQ_PAL_F/textures/map_48x85_static.xml b/soh/assets/xml/GC_NMQ_PAL_F/textures/map_48x85_static.xml index b5b1d1a85..b2ea46340 100644 --- a/soh/assets/xml/GC_NMQ_PAL_F/textures/map_48x85_static.xml +++ b/soh/assets/xml/GC_NMQ_PAL_F/textures/map_48x85_static.xml @@ -1,72 +1,72 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + \ No newline at end of file From bcd57f45b2cf5e553bd5d8dbc0848e26304d9a0b Mon Sep 17 00:00:00 2001 From: Ada <60364512+GreatArgorath@users.noreply.github.com> Date: Fri, 13 May 2022 01:46:05 +0100 Subject: [PATCH 143/146] Corrects tooltip on otrgui (#305) Previously said Master Quest rom would work, this removes that and replaces it with GameCube PAL support --- OTRGui/src/game/game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OTRGui/src/game/game.cpp b/OTRGui/src/game/game.cpp index e995b339c..022a7788e 100644 --- a/OTRGui/src/game/game.cpp +++ b/OTRGui/src/game/game.cpp @@ -188,7 +188,7 @@ void OTRGame::draw() { sohFolder = path; } - if (UIUtils::GuiIconButton("Cartridge", "Open\nOoT Rom", 32, 50, currentStep != NULLSTR, "Select an Ocarina of Time\nMaster Quest or Vanilla Debug Rom\n\nYou can dump it or lend one from Nintendo")) { + if (UIUtils::GuiIconButton("Cartridge", "Open\nOoT Rom", 32, 50, currentStep != NULLSTR, "Select an Ocarina of Time\nGameCube PAL or Vanilla Debug Rom\n\nYou can dump it or lend one from Nintendo")) { const std::string path = NativeFS->LaunchFileExplorer(LaunchType::FILE); if (path != NULLSTR) { const std::string patched_n64 = std::string(patched_rom); From 45e5e5ca720100e22a1e32dba5c84c3f11cbadcd Mon Sep 17 00:00:00 2001 From: Emill Date: Sat, 14 May 2022 00:43:55 +0200 Subject: [PATCH 144/146] Experimental interpolation (#309) * Experimental 60 fps * Fix compile error * Fix compile error * Fix compile error --- .../libultraship/Lib/Fast3D/gfx_pc.cpp | 54 +- libultraship/libultraship/Lib/Fast3D/gfx_pc.h | 14 +- libultraship/libultraship/SohImGuiImpl.cpp | 1 + libultraship/libultraship/Window.cpp | 8 +- libultraship/libultraship/Window.h | 2 +- soh/include/macros.h | 8 + soh/include/z64effect.h | 1 + soh/soh.vcxproj | 2 + soh/soh.vcxproj.filters | 4 + soh/soh/Enhancements/debugger/colViewer.cpp | 1 + soh/soh/OTRGlobals.cpp | 13 +- soh/soh/frame_interpolation.cpp | 732 ++++++++++++++++++ soh/soh/frame_interpolation.h | 61 ++ soh/src/code/sys_matrix.c | 22 +- soh/src/code/z_actor.c | 8 + soh/src/code/z_camera.c | 5 + soh/src/code/z_eff_blure.c | 4 + soh/src/code/z_eff_shield_particle.c | 4 + soh/src/code/z_eff_spark.c | 4 + soh/src/code/z_effect_soft_sprite.c | 5 + soh/src/code/z_lights.c | 4 + soh/src/code/z_play.c | 4 + soh/src/code/z_skin_matrix.c | 3 + soh/src/code/z_view.c | 109 ++- soh/src/code/z_vr_box_draw.c | 5 +- soh/src/libultra/gu/guLookAt.c | 3 +- soh/src/libultra/gu/guPerspectiveF.c | 4 +- soh/src/libultra/gu/ortho.c | 7 +- .../ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c | 10 +- .../z_bg_hidan_rsekizou.c | 3 +- .../overlays/actors/ovl_Boss_Fd/z_boss_fd.c | 16 + .../overlays/actors/ovl_Boss_Fd/z_boss_fd.h | 1 + .../overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c | 5 + .../actors/ovl_Boss_Ganon/z_boss_ganon.c | 29 + .../actors/ovl_Boss_Ganon/z_boss_ganon.h | 1 + .../overlays/actors/ovl_Boss_Mo/z_boss_mo.c | 17 + .../overlays/actors/ovl_Boss_Va/z_boss_va.c | 20 + soh/src/overlays/actors/ovl_En_Zo/z_en_zo.c | 11 + soh/src/overlays/actors/ovl_En_Zo/z_en_zo.h | 1 + .../overlays/actors/ovl_Fishing/z_fishing.c | 33 + .../ovl_Object_Kankyo/z_object_kankyo.c | 11 + .../ovl_Object_Kankyo/z_object_kankyo.h | 1 + .../ovl_kaleido_scope/z_kaleido_scope_PAL.c | 4 + 43 files changed, 1206 insertions(+), 49 deletions(-) create mode 100644 soh/soh/frame_interpolation.cpp create mode 100644 soh/soh/frame_interpolation.h diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp index da39c0a4d..6f7e8c271 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp @@ -190,8 +190,12 @@ static int game_framebuffer_msaa_resolved; uint32_t gfx_msaa_level = 1; +static bool has_drawn_imgui_menu; + static bool dropped_frame; +static const std::unordered_map *current_mtx_replacements; + static float buf_vbo[MAX_BUFFERED * (32 * 3)]; // 3 vertices in a triangle and 32 floats per vtx static size_t buf_vbo_len; static size_t buf_vbo_num_tris; @@ -916,20 +920,31 @@ static void gfx_matrix_mul(float res[4][4], const float a[4][4], const float b[4 static void gfx_sp_matrix(uint8_t parameters, const int32_t *addr) { float matrix[4][4]; -#ifndef GBI_FLOATS - // Original GBI where fixed point matrices are used - for (int i = 0; i < 4; i++) { - for (int j = 0; j < 4; j += 2) { - int32_t int_part = addr[i * 2 + j / 2]; - uint32_t frac_part = addr[8 + i * 2 + j / 2]; - matrix[i][j] = (int32_t)((int_part & 0xffff0000) | (frac_part >> 16)) / 65536.0f; - matrix[i][j + 1] = (int32_t)((int_part << 16) | (frac_part & 0xffff)) / 65536.0f; + + if (auto it = current_mtx_replacements->find((Mtx *)addr); it != current_mtx_replacements->end()) { + for (int i = 0; i < 4; i++) { + for (int j = 0; j < 4; j++) { + float v = it->second.mf[i][j]; + int as_int = (int)(v * 65536.0f); + matrix[i][j] = as_int * (1.0f / 65536.0f); + } + } + } else { +#ifndef GBI_FLOATS + // Original GBI where fixed point matrices are used + for (int i = 0; i < 4; i++) { + for (int j = 0; j < 4; j += 2) { + int32_t int_part = addr[i * 2 + j / 2]; + uint32_t frac_part = addr[8 + i * 2 + j / 2]; + matrix[i][j] = (int32_t)((int_part & 0xffff0000) | (frac_part >> 16)) / 65536.0f; + matrix[i][j + 1] = (int32_t)((int_part << 16) | (frac_part & 0xffff)) / 65536.0f; + } } - } #else - // For a modified GBI where fixed point values are replaced with floats - memcpy(matrix, addr, sizeof(matrix)); + // For a modified GBI where fixed point values are replaced with floats + memcpy(matrix, addr, sizeof(matrix)); #endif + } if (parameters & G_MTX_PROJECTION) { if (parameters & G_MTX_LOAD) { @@ -2708,6 +2723,7 @@ void gfx_start_frame(void) { gfx_wapi->handle_events(); gfx_wapi->get_dimensions(&gfx_current_window_dimensions.width, &gfx_current_window_dimensions.height); SohImGui::DrawMainMenuAndCalculateGameSize(); + has_drawn_imgui_menu = true; if (gfx_current_dimensions.height == 0) { // Avoid division by zero gfx_current_dimensions.height = 1; @@ -2746,7 +2762,7 @@ void gfx_start_frame(void) { fbActive = 0; } -void gfx_run(Gfx *commands) { +void gfx_run(Gfx *commands, const std::unordered_map& mtx_replacements) { gfx_sp_reset(); //puts("New frame"); @@ -2755,12 +2771,21 @@ void gfx_run(Gfx *commands) { if (!gfx_wapi->start_frame()) { dropped_frame = true; - SohImGui::DrawFramebufferAndGameInput(); - SohImGui::CancelFrame(); + if (has_drawn_imgui_menu) { + SohImGui::DrawFramebufferAndGameInput(); + SohImGui::CancelFrame(); + has_drawn_imgui_menu = false; + } return; } dropped_frame = false; + if (!has_drawn_imgui_menu) { + SohImGui::DrawMainMenuAndCalculateGameSize(); + } + + current_mtx_replacements = &mtx_replacements; + double t0 = gfx_wapi->get_time(); gfx_rapi->update_framebuffer_parameters(0, gfx_current_window_dimensions.width, gfx_current_window_dimensions.height, 1, false, true, true, !game_renders_to_framebuffer); gfx_rapi->start_frame(); @@ -2792,6 +2817,7 @@ void gfx_run(Gfx *commands) { //printf("Process %f %f\n", t1, t1 - t0); gfx_rapi->end_frame(); gfx_wapi->swap_buffers_begin(); + has_drawn_imgui_menu = false; } void gfx_end_frame(void) { diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_pc.h b/libultraship/libultraship/Lib/Fast3D/gfx_pc.h index d9cd9be8d..62f80ab3c 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_pc.h +++ b/libultraship/libultraship/Lib/Fast3D/gfx_pc.h @@ -6,6 +6,8 @@ #include #include +#include "U64/PR/ultra64/types.h" + struct GfxRenderingAPI; struct GfxWindowManagerAPI; @@ -52,26 +54,24 @@ struct TextureCacheValue { #endif }; -#ifdef __cplusplus extern "C" { -#endif + extern struct GfxDimensions gfx_current_window_dimensions; // The dimensions of the window extern struct GfxDimensions gfx_current_dimensions; // The dimensions of the draw area the game draws to, before scaling (if applicable) extern struct XYWidthHeight gfx_current_game_window_viewport; // The area of the window the game is drawn to, (0, 0) is top-left corner extern uint32_t gfx_msaa_level; +} + void gfx_init(struct GfxWindowManagerAPI* wapi, struct GfxRenderingAPI* rapi, const char* game_name, bool start_in_fullscreen); struct GfxRenderingAPI* gfx_get_current_rendering_api(void); void gfx_start_frame(void); -void gfx_run(Gfx* commands); +void gfx_run(Gfx* commands, const std::unordered_map& mtx_replacements); void gfx_end_frame(void); void gfx_set_framedivisor(int); void gfx_texture_cache_clear(); -int gfx_create_framebuffer(uint32_t width, uint32_t height); +extern "C" int gfx_create_framebuffer(uint32_t width, uint32_t height); void gfx_get_pixel_depth_prepare(float x, float y); uint16_t gfx_get_pixel_depth(float x, float y); -#ifdef __cplusplus -} -#endif #endif diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 72d9cee1a..785a29dee 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -681,6 +681,7 @@ namespace SohImGui { EXPERIMENTAL(); + EnhancementCheckbox("60 fps interpolation", "g60FPS"); EnhancementCheckbox("Disable LOD", "gDisableLOD"); ImGui::EndMenu(); diff --git a/libultraship/libultraship/Window.cpp b/libultraship/libultraship/Window.cpp index 35a95f0de..588e3af50 100644 --- a/libultraship/libultraship/Window.cpp +++ b/libultraship/libultraship/Window.cpp @@ -282,8 +282,12 @@ namespace Ship { gfx_start_frame(); } - void Window::RunCommands(Gfx* Commands) { - gfx_run(Commands); + void Window::RunCommands(Gfx* Commands, const std::vector>& mtx_replacements) { + for (const auto& m : mtx_replacements) { + gfx_run(Commands, m); + gfx_end_frame(); + } + gfx_run(Commands, {}); gfx_end_frame(); } diff --git a/libultraship/libultraship/Window.h b/libultraship/libultraship/Window.h index b075e496f..04886c53e 100644 --- a/libultraship/libultraship/Window.h +++ b/libultraship/libultraship/Window.h @@ -19,7 +19,7 @@ namespace Ship { void MainLoop(void (*MainFunction)(void)); void Init(); void StartFrame(); - void RunCommands(Gfx* Commands); + void RunCommands(Gfx* Commands, const std::vector>& mtx_replacements); void SetFrameDivisor(int divisor); void GetPixelDepthPrepare(float x, float y); uint16_t GetPixelDepth(float x, float y); diff --git a/soh/include/macros.h b/soh/include/macros.h index a621a65f8..7392274d9 100644 --- a/soh/include/macros.h +++ b/soh/include/macros.h @@ -138,6 +138,8 @@ extern GraphicsContext* __gfxCtx; #ifndef NDEBUG #define OPEN_DISPS(gfxCtx, file, line) \ { \ + void FrameInterpolation_RecordOpenChild(const void* a, int b); \ + FrameInterpolation_RecordOpenChild(file, line); \ GraphicsContext* __gfxCtx; \ Gfx* dispRefs[4]; \ __gfxCtx = gfxCtx; \ @@ -146,6 +148,8 @@ extern GraphicsContext* __gfxCtx; #else #define OPEN_DISPS(gfxCtx, file, line) \ { \ + void FrameInterpolation_RecordOpenChild(const void* a, int b); \ + FrameInterpolation_RecordOpenChild(file, line); \ GraphicsContext* __gfxCtx; \ __gfxCtx = gfxCtx; \ (void)__gfxCtx; @@ -153,11 +157,15 @@ extern GraphicsContext* __gfxCtx; #ifndef NDEBUG #define CLOSE_DISPS(gfxCtx, file, line) \ + {void FrameInterpolation_RecordCloseChild(void); \ + FrameInterpolation_RecordCloseChild();} \ Graph_CloseDisps(dispRefs, gfxCtx, file, line); \ } \ (void)0 #else #define CLOSE_DISPS(gfxCtx, file, line) \ + {void FrameInterpolation_RecordCloseChild(void); \ + FrameInterpolation_RecordCloseChild();} \ (void)0; \ } \ (void)0 diff --git a/soh/include/z64effect.h b/soh/include/z64effect.h index c85c9d617..1b35d46b6 100644 --- a/soh/include/z64effect.h +++ b/soh/include/z64effect.h @@ -225,6 +225,7 @@ typedef struct EffectSs { /* 0x5C */ s16 life; // -1 means this entry is free /* 0x5E */ u8 priority; // Lower value means higher priority /* 0x5F */ u8 type; + u32 epoch; } EffectSs; // size = 0x60 typedef struct { diff --git a/soh/soh.vcxproj b/soh/soh.vcxproj index a395a22ce..0a2006122 100644 --- a/soh/soh.vcxproj +++ b/soh/soh.vcxproj @@ -173,6 +173,7 @@ + @@ -878,6 +879,7 @@ + diff --git a/soh/soh.vcxproj.filters b/soh/soh.vcxproj.filters index b9d68b704..04f6030a8 100644 --- a/soh/soh.vcxproj.filters +++ b/soh/soh.vcxproj.filters @@ -2186,6 +2186,8 @@ Source Files\soh\Enhancements\debugger + + Source Files\soh Source Files @@ -3748,6 +3750,8 @@ Header Files\soh\Enhancements\debugger + + Header Files\soh Source Files\soh\Enhancements diff --git a/soh/soh/Enhancements/debugger/colViewer.cpp b/soh/soh/Enhancements/debugger/colViewer.cpp index ed0fe0b56..f5c283aac 100644 --- a/soh/soh/Enhancements/debugger/colViewer.cpp +++ b/soh/soh/Enhancements/debugger/colViewer.cpp @@ -1,6 +1,7 @@ #include "colViewer.h" #include "../libultraship/SohImGuiImpl.h" #include "ImGuiHelpers.h" +#include "../../frame_interpolation.h" #include #include diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 7456ebf7e..e8e1b31c1 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -29,6 +29,7 @@ #include "AudioPlayer.h" #include "Enhancements/debugconsole.h" #include "Enhancements/debugger/debugger.h" +#include "soh/frame_interpolation.h" #include "Utils/BitConverter.h" #include "variables.h" #include "macros.h" @@ -174,7 +175,7 @@ extern "C" void Graph_StartFrame() { // C->C++ Bridge extern "C" void Graph_ProcessGfxCommands(Gfx* commands) { - OTRGlobals::Instance->context->GetWindow()->SetFrameDivisor(R_UPDATE_RATE); + OTRGlobals::Instance->context->GetWindow()->SetFrameDivisor(CVar_GetS32("g60FPS", 0) == 0 ? R_UPDATE_RATE : 1); if (!audio.initialized) { audio.initialized = true; @@ -224,7 +225,15 @@ extern "C" void Graph_ProcessGfxCommands(Gfx* commands) { } audio.cv_to_thread.notify_one(); - OTRGlobals::Instance->context->GetWindow()->RunCommands(commands); + std::vector> mtx_replacements; + if (CVar_GetS32("g60FPS", 0) != 0) { + int to = R_UPDATE_RATE; + for (int i = 1; i < to; i++) { + mtx_replacements.push_back(FrameInterpolation_Interpolate(i / (float)to)); + } + } + + OTRGlobals::Instance->context->GetWindow()->RunCommands(commands, mtx_replacements); { std::unique_lock Lock(audio.mutex); diff --git a/soh/soh/frame_interpolation.cpp b/soh/soh/frame_interpolation.cpp new file mode 100644 index 000000000..bd85d41ce --- /dev/null +++ b/soh/soh/frame_interpolation.cpp @@ -0,0 +1,732 @@ +#include "Cvar.h" + +#include +#include +#include +#include + +#include "frame_interpolation.h" + +/* +Frame interpolation. + +The idea of this code is to interpolate all matrices. + +The code contains two approaches. The first is to interpolate +all inputs in transformations, such as angles, scale and distances, +and then perform the same transformations with the interpolated values. +After evaluation for some reason some animations such rolling look strange. + +The second approach is to simply interpolate the final matrices. This will +more or less simply interpolate the world coordinates for movements. +This will however make rotations ~180 degrees get the "paper effect". +The mitigation is to identify this case for actors and interpolate the +matrix but in model coordinates instead, by "removing" the rotation- +translation before interpolating, create a rotation matrix with the +interpolated angle which is then applied to the matrix. + +Currently the code contains both methods but only the second one is currently +used. + +Both approaches build a tree of instructions, containing matrices +at leaves. Every node is built from OPEN_DISPS/CLOSE_DISPS and manually +inserted FrameInterpolation_OpenChild/FrameInterpolation_Close child calls. +These nodes contain information that should suffice to identify the matrix, +so we can find it in an adjacent frame. + +We can interpolate an arbitrary amount of frames between two original frames, +given a specific interpolation factor (0=old frame, 0.5=average of frames, +1.0=new frame). +*/ + +extern "C" { + +void Matrix_Init(struct GameState* gameState); +void Matrix_Push(void); +void Matrix_Pop(void); +void Matrix_Get(MtxF* dest); +void Matrix_Put(MtxF* src); +void Matrix_Mult(MtxF* mf, u8 mode); +void Matrix_Translate(f32 x, f32 y, f32 z, u8 mode); +void Matrix_Scale(f32 x, f32 y, f32 z, u8 mode); +void Matrix_RotateX(f32 x, u8 mode); +void Matrix_RotateY(f32 y, u8 mode); +void Matrix_RotateZ(f32 z, u8 mode); +void Matrix_RotateZYX(s16 x, s16 y, s16 z, u8 mode); +void Matrix_TranslateRotateZYX(Vec3f* translation, Vec3s* rotation); +void Matrix_SetTranslateRotateYXZ(f32 translateX, f32 translateY, f32 translateZ, Vec3s* rot); +Mtx* Matrix_MtxFToMtx(MtxF* src, Mtx* dest); +Mtx* Matrix_ToMtx(Mtx* dest, char* file, s32 line); +Mtx* Matrix_NewMtx(struct GraphicsContext* gfxCtx, char* file, s32 line); +Mtx* Matrix_MtxFToNewMtx(MtxF* src, struct GraphicsContext* gfxCtx); +void Matrix_MultVec3f(Vec3f* src, Vec3f* dest); +void Matrix_MtxFCopy(MtxF* dest, MtxF* src); +void Matrix_MtxToMtxF(Mtx* src, MtxF* dest); +void Matrix_MultVec3fExt(Vec3f* src, Vec3f* dest, MtxF* mf); +void Matrix_Transpose(MtxF* mf); +void Matrix_ReplaceRotation(MtxF* mf); +void Matrix_MtxFToYXZRotS(MtxF* mf, Vec3s* rotDest, s32 flag); +void Matrix_MtxFToZYXRotS(MtxF* mf, Vec3s* rotDest, s32 flag); +void Matrix_RotateAxis(f32 angle, Vec3f* axis, u8 mode); +MtxF* Matrix_CheckFloats(MtxF* mf, char* file, s32 line); +void Matrix_SetTranslateScaleMtx2(Mtx* mtx, f32 scaleX, f32 scaleY, f32 scaleZ, f32 translateX, f32 translateY, + f32 translateZ); + +MtxF* Matrix_GetCurrent(void); + +void SkinMatrix_MtxFMtxFMult(MtxF* mfA, MtxF* mfB, MtxF* dest); + +} + +static bool invert_matrix(const float m[16], float invOut[16]); + +using namespace std; + +namespace { + + enum class Op { + OpenChild, + CloseChild, + + MatrixPush, + MatrixPop, + MatrixPut, + MatrixMult, + MatrixTranslate, + MatrixScale, + MatrixRotate1Coord, + MatrixRotateZYX, + MatrixTranslateRotateZYX, + MatrixSetTranslateRotateYXZ, + MatrixMtxFToMtx, + MatrixToMtx, + MatrixReplaceRotation, + MatrixRotateAxis, + SkinMatrixMtxFToMtx + }; + + typedef pair label; + + union Data { + Data() { + } + + struct { + MtxF src; + } matrix_put; + + struct { + MtxF mf; + u8 mode; + } matrix_mult; + + struct { + f32 x, y, z; + u8 mode; + } matrix_translate, matrix_scale; + + struct { + u32 coord; + f32 value; + u8 mode; + } matrix_rotate_1_coord; + + struct { + s16 x, y, z; + u8 mode; + } matrix_rotate_zyx; + + struct { + Vec3f translation; + Vec3s rotation; + } matrix_translate_rotate_zyx; + + struct { + f32 translateX, translateY, translateZ; + Vec3s rot; + //MtxF mtx; + bool has_mtx; + } matrix_set_translate_rotate_yxz; + + struct { + MtxF src; + Mtx* dest; + } matrix_mtxf_to_mtx; + + struct { + Mtx* dest; + MtxF src; + bool has_adjusted; + } matrix_to_mtx; + + struct { + MtxF mf; + } matrix_replace_rotation; + + struct { + f32 angle; + Vec3f axis; + u8 mode; + } matrix_rotate_axis; + + struct { + label key; + size_t idx; + } open_child; + }; + + struct Path { + map> children; + map> ops; + vector> items; + }; + + struct Recording { + Path root_path; + }; + + bool is_recording; + vector current_path; + uint32_t camera_epoch; + uint32_t previous_camera_epoch; + Recording current_recording; + Recording previous_recording; + + bool next_is_actor_pos_rot_matrix; + bool has_inv_actor_mtx; + MtxF inv_actor_mtx; + size_t inv_actor_mtx_path_index; + + Data& append(Op op) { + auto& m = current_path.back()->ops[op]; + current_path.back()->items.emplace_back(op, m.size()); + return m.emplace_back(); + } + + struct InterpolateCtx { + float step; + float w; + unordered_map mtx_replacements; + MtxF tmp_mtxf, tmp_mtxf2; + Vec3f tmp_vec3f; + Vec3s tmp_vec3s; + MtxF actor_mtx; + + MtxF* new_replacement(Mtx* addr) { + return &mtx_replacements[addr]; + } + + void interpolate_mtxf(MtxF* res, MtxF* o, MtxF* n) { + for (size_t i = 0; i < 4; i++) { + for (size_t j = 0; j < 4; j++) { + res->mf[i][j] = w * o->mf[i][j] + step * n->mf[i][j]; + } + } + } + + float lerp(f32 o, f32 n) { + return w * o + step * n; + } + + void lerp_vec3f(Vec3f* res, Vec3f* o, Vec3f* n) { + res->x = lerp(o->x, n->x); + res->y = lerp(o->y, n->y); + res->z = lerp(o->z, n->z); + } + + float interpolate_angle(f32 o, f32 n) { + if (o == n) + return n; + o = fmodf(o, 2 * M_PI); + if (o < 0.0f) { + o += 2 * M_PI; + } + n = fmodf(n, 2 * M_PI); + if (n < 0.0f) { + n += 2 * M_PI; + } + if (fabsf(o - n) > M_PI) { + if (o < n) { + o += 2 * M_PI; + } else { + n += 2 * M_PI; + } + } + if (fabsf(o - n) > M_PI / 2) { + //return n; + } + return lerp(o, n); + } + + s16 interpolate_angle(s16 os, s16 ns) { + if (os == ns) + return ns; + int o = (u16)os; + int n = (u16)ns; + u16 res; + int diff = o - n; + if (-0x8000 <= diff && diff <= 0x8000) { + if (diff < -0x4000 || diff > 0x4000) { + return ns; + } + res = (u16)(w * o + step * n); + } else { + if (o < n) { + o += 0x10000; + } else { + n += 0x10000; + } + diff = o - n; + if (diff < -0x4000 || diff > 0x4000) { + return ns; + } + res = (u16)(w * o + step * n); + } + if (os / 327 == ns / 327 && (s16)res / 327 != os / 327) { + int bp = 0; + } + return res; + } + + void interpolate_angles(Vec3s* res, Vec3s* o, Vec3s* n) { + res->x = interpolate_angle(o->x, n->x); + res->y = interpolate_angle(o->y, n->y); + res->z = interpolate_angle(o->z, n->z); + } + + void interpolate_branch(Path* old_path, Path *new_path) { + for (auto& item : new_path->items) { + Data& new_op = new_path->ops[item.first][item.second]; + + if (item.first == Op::OpenChild) { + if (auto it = old_path->children.find(new_op.open_child.key); + it != old_path->children.end() && new_op.open_child.idx < it->second.size()) { + interpolate_branch(&it->second[new_op.open_child.idx], + &new_path->children.find(new_op.open_child.key)->second[new_op.open_child.idx]); + } else { + interpolate_branch( + &new_path->children.find(new_op.open_child.key)->second[new_op.open_child.idx], + &new_path->children.find(new_op.open_child.key)->second[new_op.open_child.idx]); + } + continue; + } + + if (auto it = old_path->ops.find(item.first); it != old_path->ops.end()) { + if (item.second < it->second.size()) { + Data& old_op = it->second[item.second]; + switch (item.first) { + case Op::OpenChild: + break; + case Op::CloseChild: + break; + + case Op::MatrixPush: + Matrix_Push(); + break; + + case Op::MatrixPop: + Matrix_Pop(); + break; + + case Op::MatrixPut: + interpolate_mtxf(&tmp_mtxf, &old_op.matrix_put.src, &new_op.matrix_put.src); + Matrix_Put(&tmp_mtxf); + break; + + case Op::MatrixMult: + interpolate_mtxf(&tmp_mtxf, &old_op.matrix_mult.mf, &new_op.matrix_mult.mf); + Matrix_Mult(&tmp_mtxf, new_op.matrix_mult.mode); + break; + + case Op::MatrixTranslate: + Matrix_Translate(lerp(old_op.matrix_translate.x, new_op.matrix_translate.x), + lerp(old_op.matrix_translate.y, new_op.matrix_translate.y), + lerp(old_op.matrix_translate.z, new_op.matrix_translate.z), + new_op.matrix_translate.mode); + break; + + case Op::MatrixScale: + Matrix_Scale(lerp(old_op.matrix_scale.x, new_op.matrix_scale.x), + lerp(old_op.matrix_scale.y, new_op.matrix_scale.y), + lerp(old_op.matrix_scale.z, new_op.matrix_scale.z), + new_op.matrix_scale.mode); + break; + + case Op::MatrixRotate1Coord: { + float v = interpolate_angle(old_op.matrix_rotate_1_coord.value, new_op.matrix_rotate_1_coord.value); + u8 mode = new_op.matrix_rotate_1_coord.mode; + switch (new_op.matrix_rotate_1_coord.coord) { + case 0: + Matrix_RotateX(v, mode); + break; + + case 1: + Matrix_RotateY(v, mode); + break; + + case 2: + Matrix_RotateZ(v, mode); + break; + } + break; + } + + case Op::MatrixRotateZYX: + Matrix_RotateZYX(interpolate_angle(old_op.matrix_rotate_zyx.x, new_op.matrix_rotate_zyx.x), + interpolate_angle(old_op.matrix_rotate_zyx.y, new_op.matrix_rotate_zyx.y), + interpolate_angle(old_op.matrix_rotate_zyx.z, new_op.matrix_rotate_zyx.z), + new_op.matrix_rotate_zyx.mode); + break; + + case Op::MatrixTranslateRotateZYX: + lerp_vec3f(&tmp_vec3f, &old_op.matrix_translate_rotate_zyx.translation, &new_op.matrix_translate_rotate_zyx.translation); + interpolate_angles(&tmp_vec3s, &old_op.matrix_translate_rotate_zyx.rotation, &new_op.matrix_translate_rotate_zyx.rotation); + Matrix_TranslateRotateZYX(&tmp_vec3f, &tmp_vec3s); + break; + + case Op::MatrixSetTranslateRotateYXZ: + interpolate_angles(&tmp_vec3s, &old_op.matrix_set_translate_rotate_yxz.rot, + &new_op.matrix_set_translate_rotate_yxz.rot); + Matrix_SetTranslateRotateYXZ(lerp(old_op.matrix_set_translate_rotate_yxz.translateX, + new_op.matrix_set_translate_rotate_yxz.translateX), + lerp(old_op.matrix_set_translate_rotate_yxz.translateY, + new_op.matrix_set_translate_rotate_yxz.translateY), + lerp(old_op.matrix_set_translate_rotate_yxz.translateZ, + new_op.matrix_set_translate_rotate_yxz.translateZ), + &tmp_vec3s); + if (new_op.matrix_set_translate_rotate_yxz.has_mtx && old_op.matrix_set_translate_rotate_yxz.has_mtx) { + actor_mtx = *Matrix_GetCurrent(); + } + break; + + case Op::MatrixMtxFToMtx: + interpolate_mtxf(new_replacement(new_op.matrix_mtxf_to_mtx.dest), + &old_op.matrix_mtxf_to_mtx.src, &new_op.matrix_mtxf_to_mtx.src); + break; + + case Op::MatrixToMtx: { + //*new_replacement(new_op.matrix_to_mtx.dest) = *Matrix_GetCurrent(); + if (old_op.matrix_to_mtx.has_adjusted && new_op.matrix_to_mtx.has_adjusted) { + interpolate_mtxf(&tmp_mtxf, &old_op.matrix_to_mtx.src, &new_op.matrix_to_mtx.src); + SkinMatrix_MtxFMtxFMult(&actor_mtx, &tmp_mtxf, new_replacement(new_op.matrix_to_mtx.dest)); + } else { + interpolate_mtxf(new_replacement(new_op.matrix_to_mtx.dest), + &old_op.matrix_to_mtx.src, &new_op.matrix_to_mtx.src); + } + break; + } + + case Op::MatrixReplaceRotation: + interpolate_mtxf(&tmp_mtxf, &old_op.matrix_replace_rotation.mf, &new_op.matrix_replace_rotation.mf); + Matrix_ReplaceRotation(&tmp_mtxf); + break; + + case Op::MatrixRotateAxis: + lerp_vec3f(&tmp_vec3f, &old_op.matrix_rotate_axis.axis, &new_op.matrix_rotate_axis.axis); + Matrix_RotateAxis(interpolate_angle(old_op.matrix_rotate_axis.angle, new_op.matrix_rotate_axis.angle), + &tmp_vec3f, new_op.matrix_rotate_axis.mode); + break; + + case Op::SkinMatrixMtxFToMtx: + break; + } + } + } + } + } + }; + +} // anonymous namespace + +unordered_map FrameInterpolation_Interpolate(float step) { + InterpolateCtx ctx; + ctx.step = step; + ctx.w = 1.0f - step; + ctx.interpolate_branch(&previous_recording.root_path, ¤t_recording.root_path); + return ctx.mtx_replacements; +} + +void FrameInterpolation_StartRecord(void) { + previous_recording = move(current_recording); + current_recording = {}; + current_path.clear(); + current_path.push_back(¤t_recording.root_path); + if (CVar_GetS32("g60FPS", 0) != 0) { + is_recording = true; + } +} + +void FrameInterpolation_StopRecord(void) { + previous_camera_epoch = camera_epoch; + is_recording = false; +} + +void FrameInterpolation_RecordOpenChild(const void* a, int b) { + if (!is_recording) + return; + label key = { a, b }; + auto& m = current_path.back()->children[key]; + append(Op::OpenChild).open_child = { key, m.size() }; + current_path.push_back(&m.emplace_back()); +} + +void FrameInterpolation_RecordCloseChild(void) { + if (!is_recording) + return; + //append(Op::CloseChild); + if (has_inv_actor_mtx && current_path.size() == inv_actor_mtx_path_index) { + has_inv_actor_mtx = false; + } + current_path.pop_back(); +} + +void FrameInterpolation_DontInterpolateCamera(void) { + camera_epoch = previous_camera_epoch + 1; +} + +int FrameInterpolation_GetCameraEpoch(void) { + return (int)camera_epoch; +} + +void FrameInterpolation_RecordActorPosRotMatrix(void) { + if (!is_recording) + return; + next_is_actor_pos_rot_matrix = true; +} + +void FrameInterpolation_RecordMatrixPush(void) { + if (!is_recording) + return; + append(Op::MatrixPush); +} + +void FrameInterpolation_RecordMatrixPop(void) { + if (!is_recording) + return; + append(Op::MatrixPop); +} + +void FrameInterpolation_RecordMatrixPut(MtxF* src) { + if (!is_recording) + return; + append(Op::MatrixPut).matrix_put = { *src }; +} + +void FrameInterpolation_RecordMatrixMult(MtxF* mf, u8 mode) { + if (!is_recording) + return; + append(Op::MatrixMult).matrix_mult = { *mf, mode }; +} + +void FrameInterpolation_RecordMatrixTranslate(f32 x, f32 y, f32 z, u8 mode) { + if (!is_recording) + return; + append(Op::MatrixTranslate).matrix_translate = { x, y, z, mode }; +} + +void FrameInterpolation_RecordMatrixScale(f32 x, f32 y, f32 z, u8 mode) { + if (!is_recording) + return; + append(Op::MatrixScale).matrix_scale = { x, y, z, mode }; +} + +void FrameInterpolation_RecordMatrixRotate1Coord(u32 coord, f32 value, u8 mode) { + if (!is_recording) + return; + append(Op::MatrixRotate1Coord).matrix_rotate_1_coord = { coord, value, mode }; +} + +void FrameInterpolation_RecordMatrixRotateZYX(s16 x, s16 y, s16 z, u8 mode) { + if (!is_recording) + return; + append(Op::MatrixRotateZYX).matrix_rotate_zyx = { x, y, z, mode }; +} + +void FrameInterpolation_RecordMatrixTranslateRotateZYX(Vec3f* translation, Vec3s* rotation) { + if (!is_recording) + return; + append(Op::MatrixTranslateRotateZYX).matrix_translate_rotate_zyx = { *translation, *rotation }; +} + +void FrameInterpolation_RecordMatrixSetTranslateRotateYXZ(f32 translateX, f32 translateY, f32 translateZ, Vec3s* rot) { + if (!is_recording) + return; + auto& d = append(Op::MatrixSetTranslateRotateYXZ).matrix_set_translate_rotate_yxz = { translateX, translateY, translateZ, + *rot }; + if (next_is_actor_pos_rot_matrix) { + d.has_mtx = true; + //d.mtx = *Matrix_GetCurrent(); + invert_matrix((const float *)Matrix_GetCurrent()->mf, (float *)inv_actor_mtx.mf); + next_is_actor_pos_rot_matrix = false; + has_inv_actor_mtx = true; + inv_actor_mtx_path_index = current_path.size(); + } +} + +void FrameInterpolation_RecordMatrixMtxFToMtx(MtxF* src, Mtx* dest) { + if (!is_recording) + return; + append(Op::MatrixMtxFToMtx).matrix_mtxf_to_mtx = { *src, dest }; +} + +void FrameInterpolation_RecordMatrixToMtx(Mtx* dest, char* file, s32 line) { + if (!is_recording) + return; + auto& d = append(Op::MatrixToMtx).matrix_to_mtx = { dest }; + if (has_inv_actor_mtx) { + d.has_adjusted = true; + SkinMatrix_MtxFMtxFMult(&inv_actor_mtx, Matrix_GetCurrent(), &d.src); + } else { + d.src = *Matrix_GetCurrent(); + } +} + +void FrameInterpolation_RecordMatrixReplaceRotation(MtxF* mf) { + if (!is_recording) + return; + append(Op::MatrixReplaceRotation).matrix_replace_rotation = { *mf }; +} + +void FrameInterpolation_RecordMatrixRotateAxis(f32 angle, Vec3f* axis, u8 mode) { + if (!is_recording) + return; + append(Op::MatrixRotateAxis).matrix_rotate_axis = { angle, *axis, mode }; +} + +void FrameInterpolation_RecordSkinMatrixMtxFToMtx(MtxF* src, Mtx* dest) { + if (!is_recording) + return; + FrameInterpolation_RecordMatrixMtxFToMtx(src, dest); +} + +// https://stackoverflow.com/questions/1148309/inverting-a-4x4-matrix +static bool invert_matrix(const float m[16], float invOut[16]) { + float inv[16], det; + int i; + + inv[0] = m[5] * m[10] * m[15] - + m[5] * m[11] * m[14] - + m[9] * m[6] * m[15] + + m[9] * m[7] * m[14] + + m[13] * m[6] * m[11] - + m[13] * m[7] * m[10]; + + inv[4] = -m[4] * m[10] * m[15] + + m[4] * m[11] * m[14] + + m[8] * m[6] * m[15] - + m[8] * m[7] * m[14] - + m[12] * m[6] * m[11] + + m[12] * m[7] * m[10]; + + inv[8] = m[4] * m[9] * m[15] - + m[4] * m[11] * m[13] - + m[8] * m[5] * m[15] + + m[8] * m[7] * m[13] + + m[12] * m[5] * m[11] - + m[12] * m[7] * m[9]; + + inv[12] = -m[4] * m[9] * m[14] + + m[4] * m[10] * m[13] + + m[8] * m[5] * m[14] - + m[8] * m[6] * m[13] - + m[12] * m[5] * m[10] + + m[12] * m[6] * m[9]; + + inv[1] = -m[1] * m[10] * m[15] + + m[1] * m[11] * m[14] + + m[9] * m[2] * m[15] - + m[9] * m[3] * m[14] - + m[13] * m[2] * m[11] + + m[13] * m[3] * m[10]; + + inv[5] = m[0] * m[10] * m[15] - + m[0] * m[11] * m[14] - + m[8] * m[2] * m[15] + + m[8] * m[3] * m[14] + + m[12] * m[2] * m[11] - + m[12] * m[3] * m[10]; + + inv[9] = -m[0] * m[9] * m[15] + + m[0] * m[11] * m[13] + + m[8] * m[1] * m[15] - + m[8] * m[3] * m[13] - + m[12] * m[1] * m[11] + + m[12] * m[3] * m[9]; + + inv[13] = m[0] * m[9] * m[14] - + m[0] * m[10] * m[13] - + m[8] * m[1] * m[14] + + m[8] * m[2] * m[13] + + m[12] * m[1] * m[10] - + m[12] * m[2] * m[9]; + + inv[2] = m[1] * m[6] * m[15] - + m[1] * m[7] * m[14] - + m[5] * m[2] * m[15] + + m[5] * m[3] * m[14] + + m[13] * m[2] * m[7] - + m[13] * m[3] * m[6]; + + inv[6] = -m[0] * m[6] * m[15] + + m[0] * m[7] * m[14] + + m[4] * m[2] * m[15] - + m[4] * m[3] * m[14] - + m[12] * m[2] * m[7] + + m[12] * m[3] * m[6]; + + inv[10] = m[0] * m[5] * m[15] - + m[0] * m[7] * m[13] - + m[4] * m[1] * m[15] + + m[4] * m[3] * m[13] + + m[12] * m[1] * m[7] - + m[12] * m[3] * m[5]; + + inv[14] = -m[0] * m[5] * m[14] + + m[0] * m[6] * m[13] + + m[4] * m[1] * m[14] - + m[4] * m[2] * m[13] - + m[12] * m[1] * m[6] + + m[12] * m[2] * m[5]; + + inv[3] = -m[1] * m[6] * m[11] + + m[1] * m[7] * m[10] + + m[5] * m[2] * m[11] - + m[5] * m[3] * m[10] - + m[9] * m[2] * m[7] + + m[9] * m[3] * m[6]; + + inv[7] = m[0] * m[6] * m[11] - + m[0] * m[7] * m[10] - + m[4] * m[2] * m[11] + + m[4] * m[3] * m[10] + + m[8] * m[2] * m[7] - + m[8] * m[3] * m[6]; + + inv[11] = -m[0] * m[5] * m[11] + + m[0] * m[7] * m[9] + + m[4] * m[1] * m[11] - + m[4] * m[3] * m[9] - + m[8] * m[1] * m[7] + + m[8] * m[3] * m[5]; + + inv[15] = m[0] * m[5] * m[10] - + m[0] * m[6] * m[9] - + m[4] * m[1] * m[10] + + m[4] * m[2] * m[9] + + m[8] * m[1] * m[6] - + m[8] * m[2] * m[5]; + + det = m[0] * inv[0] + m[1] * inv[4] + m[2] * inv[8] + m[3] * inv[12]; + + if (det == 0) { + return false; + } + + det = 1.0 / det; + + for (i = 0; i < 16; i++) { + invOut[i] = inv[i] * det; + } + + return true; +} diff --git a/soh/soh/frame_interpolation.h b/soh/soh/frame_interpolation.h new file mode 100644 index 000000000..64c7197cd --- /dev/null +++ b/soh/soh/frame_interpolation.h @@ -0,0 +1,61 @@ +#pragma once + +#include "include/z64math.h" + +#ifdef __cplusplus + +#include + +std::unordered_map FrameInterpolation_Interpolate(float step); + +extern "C" { + +#endif + +void FrameInterpolation_StartRecord(void); + +void FrameInterpolation_StopRecord(void); + +void FrameInterpolation_RecordOpenChild(const void* a, int b); + +void FrameInterpolation_RecordCloseChild(void); + +void FrameInterpolation_DontInterpolateCamera(void); + +int FrameInterpolation_GetCameraEpoch(void); + +void FrameInterpolation_RecordActorPosRotMatrix(void); + +void FrameInterpolation_RecordMatrixPush(void); + +void FrameInterpolation_RecordMatrixPop(void); + +void FrameInterpolation_RecordMatrixPut(MtxF* src); + +void FrameInterpolation_RecordMatrixMult(MtxF* mf, u8 mode); + +void FrameInterpolation_RecordMatrixTranslate(f32 x, f32 y, f32 z, u8 mode); + +void FrameInterpolation_RecordMatrixScale(f32 x, f32 y, f32 z, u8 mode); + +void FrameInterpolation_RecordMatrixRotate1Coord(u32 coord, f32 value, u8 mode); + +void FrameInterpolation_RecordMatrixRotateZYX(s16 x, s16 y, s16 z, u8 mode); + +void FrameInterpolation_RecordMatrixTranslateRotateZYX(Vec3f* translation, Vec3s* rotation); + +void FrameInterpolation_RecordMatrixSetTranslateRotateYXZ(f32 translateX, f32 translateY, f32 translateZ, Vec3s* rot); + +void FrameInterpolation_RecordMatrixMtxFToMtx(MtxF* src, Mtx* dest); + +void FrameInterpolation_RecordMatrixToMtx(Mtx* dest, char* file, s32 line); + +void FrameInterpolation_RecordMatrixReplaceRotation(MtxF* mf); + +void FrameInterpolation_RecordMatrixRotateAxis(f32 angle, Vec3f* axis, u8 mode); + +void FrameInterpolation_RecordSkinMatrixMtxFToMtx(MtxF* src, Mtx* dest); + +#ifdef __cplusplus +} +#endif diff --git a/soh/src/code/sys_matrix.c b/soh/src/code/sys_matrix.c index 9d7c73967..bc90bf669 100644 --- a/soh/src/code/sys_matrix.c +++ b/soh/src/code/sys_matrix.c @@ -1,5 +1,7 @@ #include "global.h" +#include "soh/frame_interpolation.h" + // clang-format off Mtx gMtxClear = { 65536, 0, 1, 0, @@ -25,11 +27,13 @@ void Matrix_Init(GameState* gameState) { } void Matrix_Push(void) { + FrameInterpolation_RecordMatrixPush(); Matrix_MtxFCopy(sCurrentMatrix + 1, sCurrentMatrix); sCurrentMatrix++; } void Matrix_Pop(void) { + FrameInterpolation_RecordMatrixPop(); sCurrentMatrix--; ASSERT(sCurrentMatrix >= sMatrixStack, "Matrix_now >= Matrix_stack", "../sys_matrix.c", 176); } @@ -39,6 +43,7 @@ void Matrix_Get(MtxF* dest) { } void Matrix_Put(MtxF* src) { + FrameInterpolation_RecordMatrixPut(src); Matrix_MtxFCopy(sCurrentMatrix, src); } @@ -47,6 +52,7 @@ MtxF* Matrix_GetCurrent(void) { } void Matrix_Mult(MtxF* mf, u8 mode) { + FrameInterpolation_RecordMatrixMult(mf, mode); MtxF* cmf = Matrix_GetCurrent(); if (mode == MTXMODE_APPLY) { @@ -57,6 +63,7 @@ void Matrix_Mult(MtxF* mf, u8 mode) { } void Matrix_Translate(f32 x, f32 y, f32 z, u8 mode) { + FrameInterpolation_RecordMatrixTranslate(x, y, z, mode); MtxF* cmf = sCurrentMatrix; f32 tx; f32 ty; @@ -80,6 +87,7 @@ void Matrix_Translate(f32 x, f32 y, f32 z, u8 mode) { } void Matrix_Scale(f32 x, f32 y, f32 z, u8 mode) { + FrameInterpolation_RecordMatrixScale(x, y, z, mode); MtxF* cmf = sCurrentMatrix; if (mode == MTXMODE_APPLY) { @@ -101,6 +109,7 @@ void Matrix_Scale(f32 x, f32 y, f32 z, u8 mode) { } void Matrix_RotateX(f32 x, u8 mode) { + FrameInterpolation_RecordMatrixRotate1Coord(0, x, mode); MtxF* cmf; f32 sin; f32 cos; @@ -165,6 +174,7 @@ void Matrix_RotateX(f32 x, u8 mode) { } void Matrix_RotateY(f32 y, u8 mode) { + FrameInterpolation_RecordMatrixRotate1Coord(1, y, mode); MtxF* cmf; f32 sin; f32 cos; @@ -229,6 +239,7 @@ void Matrix_RotateY(f32 y, u8 mode) { } void Matrix_RotateZ(f32 z, u8 mode) { + FrameInterpolation_RecordMatrixRotate1Coord(2, z, mode); MtxF* cmf; f32 sin; f32 cos; @@ -299,6 +310,7 @@ void Matrix_RotateZ(f32 z, u8 mode) { * Original Name: Matrix_RotateXYZ, changed to reflect rotation order. */ void Matrix_RotateZYX(s16 x, s16 y, s16 z, u8 mode) { + FrameInterpolation_RecordMatrixRotateZYX(x, y, z, mode); MtxF* cmf = sCurrentMatrix; f32 temp1; f32 temp2; @@ -389,6 +401,7 @@ void Matrix_RotateZYX(s16 x, s16 y, s16 z, u8 mode) { * transformed according to whatever the matrix was previously. */ void Matrix_TranslateRotateZYX(Vec3f* translation, Vec3s* rotation) { + FrameInterpolation_RecordMatrixTranslateRotateZYX(translation, rotation); MtxF* cmf = sCurrentMatrix; f32 sin = Math_SinS(rotation->z); f32 cos = Math_CosS(rotation->z); @@ -530,15 +543,20 @@ void Matrix_SetTranslateRotateYXZ(f32 translateX, f32 translateY, f32 translateZ } else { cmf->yx = 0.0f; } + FrameInterpolation_RecordMatrixSetTranslateRotateYXZ(translateX, translateY, translateZ, rot); } Mtx* Matrix_MtxFToMtx(MtxF* src, Mtx* dest) { + FrameInterpolation_RecordMatrixMtxFToMtx(src, dest); guMtxF2L(src, dest); return dest; } Mtx* Matrix_ToMtx(Mtx* dest, char* file, s32 line) { - return Matrix_MtxFToMtx(Matrix_CheckFloats(sCurrentMatrix, file, line), dest); + FrameInterpolation_RecordMatrixToMtx(dest, file, line); + guMtxF2L(Matrix_CheckFloats(sCurrentMatrix, file, line), dest); + return dest; + //return Matrix_MtxFToMtx(Matrix_CheckFloats(sCurrentMatrix, file, line), dest); } Mtx* Matrix_NewMtx(GraphicsContext* gfxCtx, char* file, s32 line) { @@ -627,6 +645,7 @@ void Matrix_Transpose(MtxF* mf) { * seen as replacing the R rotation with `mf`, hence the function name. */ void Matrix_ReplaceRotation(MtxF* mf) { + FrameInterpolation_RecordMatrixReplaceRotation(mf); MtxF* cmf = sCurrentMatrix; f32 acc; f32 temp; @@ -779,6 +798,7 @@ void Matrix_MtxFToZYXRotS(MtxF* mf, Vec3s* rotDest, s32 flag) { * NB: `axis` is assumed to be a unit vector. */ void Matrix_RotateAxis(f32 angle, Vec3f* axis, u8 mode) { + FrameInterpolation_RecordMatrixRotateAxis(angle, axis, mode); MtxF* cmf; f32 sin; f32 cos; diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index a9f50f687..caa16a7ec 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -6,6 +6,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" #include "objects/object_bdoor/object_bdoor.h" +#include "soh/frame_interpolation.h" #if defined(_MSC_VER) || defined(__GNUC__) #include @@ -410,6 +411,7 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) { f32 var2; s32 i; + FrameInterpolation_RecordOpenChild(actor, 0); player = GET_PLAYER(globalCtx); spCE = 0xFF; @@ -486,10 +488,12 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) { } } } + FrameInterpolation_RecordCloseChild(); } actor = targetCtx->unk_94; if ((actor != NULL) && !(actor->flags & ACTOR_FLAG_27)) { + FrameInterpolation_RecordOpenChild(actor, 1); NaviColor* naviColor = &sNaviColorList[actor->category]; POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x7); @@ -503,6 +507,7 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 2153), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, gZTargetArrowDL); + FrameInterpolation_RecordCloseChild(); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 2158); @@ -2490,6 +2495,7 @@ void Actor_Draw(GlobalContext* globalCtx, Actor* actor) { Fault_AddClient(&faultClient, Actor_FaultPrint, actor, "Actor_draw"); + FrameInterpolation_RecordOpenChild(actor, 0); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 6035); lights = LightContext_NewLights(&globalCtx->lightCtx, globalCtx->state.gfxCtx); @@ -2497,6 +2503,7 @@ void Actor_Draw(GlobalContext* globalCtx, Actor* actor) { Lights_BindAll(lights, globalCtx->lightCtx.listHead, (actor->flags & ACTOR_FLAG_22) ? NULL : &actor->world.pos); Lights_Draw(lights, globalCtx->state.gfxCtx); + FrameInterpolation_RecordActorPosRotMatrix(); if (actor->flags & ACTOR_FLAG_12) { Matrix_SetTranslateRotateYXZ( actor->world.pos.x + globalCtx->mainCamera.skyboxOffset.x, @@ -2546,6 +2553,7 @@ void Actor_Draw(GlobalContext* globalCtx, Actor* actor) { } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 6119); + FrameInterpolation_RecordCloseChild(); Fault_RemoveClient(&faultClient); } diff --git a/soh/src/code/z_camera.c b/soh/src/code/z_camera.c index 41c16b5cc..00f3f70f0 100644 --- a/soh/src/code/z_camera.c +++ b/soh/src/code/z_camera.c @@ -6,6 +6,8 @@ #include "overlays/actors/ovl_En_Horse/z_en_horse.h" +#include "soh/frame_interpolation.h" + s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags); s32 Camera_ChangeModeFlags(Camera* camera, s16 mode, u8 flags); s32 Camera_QRegInit(void); @@ -6675,6 +6677,7 @@ s32 Camera_Special9(Camera* camera) { case 1: spec9->doorParams.timer1--; if (spec9->doorParams.timer1 <= 0) { + FrameInterpolation_DontInterpolateCamera(); camera->animState++; if (params->interfaceFlags & 1) { camPosData = Camera_GetCamBGData(camera); @@ -7968,6 +7971,8 @@ s32 Camera_SetCSParams(Camera* camera, CutsceneCameraPoint* atPoints, CutsceneCa camera->speedRatio = 0.0f; } + FrameInterpolation_DontInterpolateCamera(); + return 1; } diff --git a/soh/src/code/z_eff_blure.c b/soh/src/code/z_eff_blure.c index e08f8f337..f3a1e6122 100644 --- a/soh/src/code/z_eff_blure.c +++ b/soh/src/code/z_eff_blure.c @@ -1,6 +1,8 @@ #include "global.h" #include "objects/gameplay_keep/gameplay_keep.h" +#include "soh/frame_interpolation.h" + void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2) { EffectBlureElement* elem; s32 numElements; @@ -946,6 +948,7 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) { s32 j; s32 phi_t2; + FrameInterpolation_RecordOpenChild(this, 0); OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 1596); gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -1059,4 +1062,5 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) { } CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 1823); + FrameInterpolation_RecordCloseChild(); } diff --git a/soh/src/code/z_eff_shield_particle.c b/soh/src/code/z_eff_shield_particle.c index fad499286..73134a654 100644 --- a/soh/src/code/z_eff_shield_particle.c +++ b/soh/src/code/z_eff_shield_particle.c @@ -2,6 +2,8 @@ #include "vt.h" #include "objects/gameplay_keep/gameplay_keep.h" +#include "soh/frame_interpolation.h" + static Vtx sVertices[5] = { VTX(-32, -32, 0, 0, 1024, 0xFF, 0xFF, 0xFF, 0xFF), VTX(32, 32, 0, 1024, 0, 0xFF, 0xFF, 0xFF, 0xFF), @@ -154,6 +156,7 @@ void EffectShieldParticle_Draw(void* thisx, GraphicsContext* gfxCtx) { Color_RGBA8 primColor; Color_RGBA8 envColor; + FrameInterpolation_RecordOpenChild(this, 0); OPEN_DISPS(gfxCtx, "../z_eff_shield_particle.c", 272); if (this != NULL) { @@ -213,4 +216,5 @@ void EffectShieldParticle_Draw(void* thisx, GraphicsContext* gfxCtx) { } CLOSE_DISPS(gfxCtx, "../z_eff_shield_particle.c", 359); + FrameInterpolation_RecordCloseChild(); } diff --git a/soh/src/code/z_eff_spark.c b/soh/src/code/z_eff_spark.c index cfe8f628f..b76968371 100644 --- a/soh/src/code/z_eff_spark.c +++ b/soh/src/code/z_eff_spark.c @@ -1,6 +1,8 @@ #include "global.h" #include "objects/gameplay_keep/gameplay_keep.h" +#include "soh/frame_interpolation.h" + // original name: "spark" void EffectSpark_Init(void* thisx, void* initParamsx) { EffectSpark* this = (EffectSpark*)thisx; @@ -152,6 +154,7 @@ void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx) { u8 sp1C4; f32 ratio; + FrameInterpolation_RecordOpenChild(this, 0); OPEN_DISPS(gfxCtx, "../z_eff_spark.c", 293); if (this != NULL) { @@ -274,4 +277,5 @@ void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx) { end: CLOSE_DISPS(gfxCtx, "../z_eff_spark.c", 498); + FrameInterpolation_RecordCloseChild(); } diff --git a/soh/src/code/z_effect_soft_sprite.c b/soh/src/code/z_effect_soft_sprite.c index aa0b922fe..2548966cc 100644 --- a/soh/src/code/z_effect_soft_sprite.c +++ b/soh/src/code/z_effect_soft_sprite.c @@ -1,6 +1,8 @@ #include "global.h" #include "vt.h" +#include "soh/frame_interpolation.h" + EffectSsInfo sEffectSsInfo = { 0 }; // "EffectSS2Info" void EffectSs_InitInfo(GlobalContext* globalCtx, s32 tableSize) { @@ -233,6 +235,7 @@ void EffectSs_Spawn(GlobalContext* globalCtx, s32 type, s32 priority, void* init sEffectSsInfo.table[index].type = type; sEffectSsInfo.table[index].priority = priority; + sEffectSsInfo.table[index].epoch++; if (initInfo->init(globalCtx, index, &sEffectSsInfo.table[index], initParams) == 0) { osSyncPrintf(VT_FGCOL(GREEN)); @@ -284,7 +287,9 @@ void EffectSs_Draw(GlobalContext* globalCtx, s32 index) { EffectSs* effectSs = &sEffectSsInfo.table[index]; if (effectSs->draw != NULL) { + FrameInterpolation_RecordOpenChild(effectSs, effectSs->epoch); effectSs->draw(globalCtx, index, effectSs); + FrameInterpolation_RecordCloseChild(); } } diff --git a/soh/src/code/z_lights.c b/soh/src/code/z_lights.c index c9b60ceca..bee677276 100644 --- a/soh/src/code/z_lights.c +++ b/soh/src/code/z_lights.c @@ -4,6 +4,8 @@ #include "objects/gameplay_keep/gameplay_keep.h" +#include "soh/frame_interpolation.h" + #define LIGHTS_BUFFER_SIZE 32 //#define LIGHTS_BUFFER_SIZE 1024 // Kill me @@ -434,12 +436,14 @@ void Lights_DrawGlow(GlobalContext* globalCtx) { if ((info->type == LIGHT_POINT_GLOW) && (params->drawGlow)) { scale = SQ(params->radius) * 0.0000026f; + FrameInterpolation_RecordOpenChild(node, 0); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, params->color[0], params->color[1], params->color[2], 50); Matrix_Translate(params->x, params->y, params->z, MTXMODE_NEW); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_lights.c", 918), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gGlowCircleDL); + FrameInterpolation_RecordCloseChild(); } node = node->next; diff --git a/soh/src/code/z_play.c b/soh/src/code/z_play.c index 2934e5e1b..632ed41f6 100644 --- a/soh/src/code/z_play.c +++ b/soh/src/code/z_play.c @@ -5,6 +5,8 @@ #include "soh/Enhancements/gameconsole.h" +#include "soh/frame_interpolation.h" + void* D_8012D1F0 = NULL; //UNK_TYPE D_8012D1F4 = 0; // unused Input* D_8012D1F8 = NULL; @@ -1379,7 +1381,9 @@ void Gameplay_Main(GameState* thisx) { LOG_NUM("1", 1, "../z_play.c", 4583); } + FrameInterpolation_StartRecord(); Gameplay_Draw(globalCtx); + FrameInterpolation_StopRecord(); if (1 && HREG(63)) { LOG_NUM("1", 1, "../z_play.c", 4587); diff --git a/soh/src/code/z_skin_matrix.c b/soh/src/code/z_skin_matrix.c index f7df8091f..d822d6c13 100644 --- a/soh/src/code/z_skin_matrix.c +++ b/soh/src/code/z_skin_matrix.c @@ -1,6 +1,8 @@ #include "global.h" #include "vt.h" +#include "soh/frame_interpolation.h" + // clang-format off MtxF sMtxFClear = { 1.0f, 0.0f, 0.0f, 0.0f, @@ -523,6 +525,7 @@ void SkinMatrix_Vec3sToVec3f(Vec3s* src, Vec3f* dest) { } void SkinMatrix_MtxFToMtx(MtxF* src, Mtx* dest) { + FrameInterpolation_RecordSkinMatrixMtxFToMtx(src, dest); guMtxF2L(src, dest); } diff --git a/soh/src/code/z_view.c b/soh/src/code/z_view.c index 97f1ad26e..e03daee83 100644 --- a/soh/src/code/z_view.c +++ b/soh/src/code/z_view.c @@ -2,6 +2,9 @@ #include "vt.h" #include +#include + +#include "soh/frame_interpolation.h" vu32 D_8012ABF0 = true; @@ -277,6 +280,10 @@ void func_800AAA50(View* view, s32 arg1) { } } +static float sqr(float a) { + return a * a; +} + s32 func_800AAA9C(View* view) { f32 aspect; s32 width; @@ -307,6 +314,85 @@ s32 func_800AAA9C(View* view) { height = view->viewport.bottomY - view->viewport.topY; aspect = (f32)width / (f32)height; + viewing = Graph_Alloc(gfxCtx, sizeof(Mtx)); + LogUtils_CheckNullPointer("viewing", viewing, "../z_view.c", 667); + view->viewingPtr = viewing; + + if (view->eye.x == view->lookAt.x && view->eye.y == view->lookAt.y && view->eye.z == view->lookAt.z) { + view->eye.x += 1.0f; + view->eye.y += 1.0f; + view->eye.z += 1.0f; + } + + func_800ABE74(view->eye.x, view->eye.y, view->eye.z); + MtxF viewingF; + guLookAtF(viewingF.mf, view->eye.x, view->eye.y, view->eye.z, view->lookAt.x, view->lookAt.y, view->lookAt.z, view->up.x, + view->up.y, view->up.z); + + // Some heuristics to identify instant camera movements and skip interpolation in that case + + static View old_view; + + float dirx = view->eye.x - view->lookAt.x; + float diry = view->eye.y - view->lookAt.y; + float dirz = view->eye.z - view->lookAt.z; + float dir_dist = sqrtf(sqr(dirx) + sqr(diry) + sqr(dirz)); + dirx /= dir_dist; + diry /= dir_dist; + dirz /= dir_dist; + + float odirx = old_view.eye.x - old_view.lookAt.x; + float odiry = old_view.eye.y - old_view.lookAt.y; + float odirz = old_view.eye.z - old_view.lookAt.z; + float odir_dist = sqrtf(sqr(odirx) + sqr(odiry) + sqr(odirz)); + odirx /= odir_dist; + odiry /= odir_dist; + odirz /= odir_dist; + + float eye_dist = sqrtf(sqr(view->eye.x - old_view.eye.x) + sqr(view->eye.y - old_view.eye.y) + sqr(view->eye.z - old_view.eye.z)); + float look_dist = sqrtf(sqr(view->lookAt.x - old_view.lookAt.x) + sqr(view->lookAt.y - old_view.lookAt.y) + sqr(view->lookAt.z - old_view.lookAt.z)); + float up_dist = sqrtf(sqr(view->up.x - old_view.up.x) + sqr(view->up.y - old_view.up.y) + sqr(view->up.z - old_view.up.z)); + float d_dist = sqrtf(sqr(dirx - odirx) + sqr(diry - odiry) + sqr(dirz - odirz)); + + bool dont_interpolate = false; + + if (up_dist < 0.01 && d_dist < 0.01) { + if (eye_dist + look_dist > 300) { + dont_interpolate = true; + } + } else { + if (eye_dist >= 400) { + dont_interpolate = true; + } + if (look_dist >= 100) { + dont_interpolate = true; + } + if (up_dist >= 1.50f) { + dont_interpolate = true; + } + if (d_dist >= 1.414f && look_dist >= 15) { + dont_interpolate = true; + } + if (d_dist >= 1.414f && up_dist >= 0.31f && look_dist >= 1 && eye_dist >= 300) { + dont_interpolate = true; + } + if (d_dist >= 0.5f && up_dist >= 0.31f && look_dist >= 3 && eye_dist >= 170) { + dont_interpolate = true; + } + if (look_dist >= 52 && eye_dist >= 52) { + dont_interpolate = true; + } + if (look_dist >= 30 && eye_dist >= 90) { + dont_interpolate = true; + } + } + + if (dont_interpolate) { + FrameInterpolation_DontInterpolateCamera(); + } + + FrameInterpolation_RecordOpenChild(NULL, FrameInterpolation_GetCameraEpoch()); + if (HREG(80) == 11) { if (HREG(94) != 11) { HREG(94) = 11; @@ -347,22 +433,17 @@ s32 func_800AAA9C(View* view) { gSPPerspNormalize(POLY_KAL_DISP++, view->normal); gSPMatrix(POLY_KAL_DISP++, projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); - viewing = Graph_Alloc(gfxCtx, sizeof(Mtx)); - LogUtils_CheckNullPointer("viewing", viewing, "../z_view.c", 667); - view->viewingPtr = viewing; - - if (view->eye.x == view->lookAt.x && view->eye.y == view->lookAt.y && view->eye.z == view->lookAt.z) { - view->eye.x += 1.0f; - view->eye.y += 1.0f; - view->eye.z += 1.0f; - } - - func_800ABE74(view->eye.x, view->eye.y, view->eye.z); - guLookAt(viewing, view->eye.x, view->eye.y, view->eye.z, view->lookAt.x, view->lookAt.y, view->lookAt.z, view->up.x, - view->up.y, view->up.z); + Matrix_MtxFToMtx(viewingF.mf, viewing); view->viewing = *viewing; + + /*if (eye_dist > 1 || look_dist > 1 || abs(up_dist) > 0.1 || abs(d_dist) > 0.1) + printf("%d %f %f %f, %f %f %f, %f %f %f, %f %f %f %f %d\n", (int)view->fovy, view->eye.x, view->eye.y, view->eye.z, view->lookAt.x, view->lookAt.y, view->lookAt.z, + view->up.x, view->up.y, view->up.z, eye_dist, look_dist, up_dist, d_dist, dont_interpolate);*/ + + old_view = *view; + if (QREG(88) & 2) { s32 i; MtxF mf; @@ -374,10 +455,10 @@ s32 func_800AAA9C(View* view) { } osSyncPrintf("\n"); } - gSPMatrix(POLY_OPA_DISP++, viewing, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); gSPMatrix(POLY_XLU_DISP++, viewing, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); gSPMatrix(POLY_KAL_DISP++, viewing, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); + FrameInterpolation_RecordCloseChild(); CLOSE_DISPS(gfxCtx, "../z_view.c", 711); diff --git a/soh/src/code/z_vr_box_draw.c b/soh/src/code/z_vr_box_draw.c index 292789333..13eb93bd0 100644 --- a/soh/src/code/z_vr_box_draw.c +++ b/soh/src/code/z_vr_box_draw.c @@ -1,5 +1,7 @@ #include "global.h" +#include "soh/frame_interpolation.h" + Mtx* sSkyboxDrawMatrix; Mtx* SkyboxDraw_UpdateMatrix(SkyboxContext* skyboxCtx, f32 x, f32 y, f32 z) { @@ -13,6 +15,7 @@ Mtx* SkyboxDraw_UpdateMatrix(SkyboxContext* skyboxCtx, f32 x, f32 y, f32 z) { void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyboxId, s16 blend, f32 x, f32 y, f32 z) { OPEN_DISPS(gfxCtx, "../z_vr_box_draw.c", 52); + FrameInterpolation_RecordOpenChild(NULL, FrameInterpolation_GetCameraEpoch()); func_800945A0(gfxCtx); @@ -85,7 +88,7 @@ void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyb gDPPipeSync(POLY_OPA_DISP++); //gsSPShaderTest2(POLY_OPA_DISP++); - + FrameInterpolation_RecordCloseChild(); CLOSE_DISPS(gfxCtx, "../z_vr_box_draw.c", 125); } diff --git a/soh/src/libultra/gu/guLookAt.c b/soh/src/libultra/gu/guLookAt.c index 58946f4dc..f94204bc4 100644 --- a/soh/src/libultra/gu/guLookAt.c +++ b/soh/src/libultra/gu/guLookAt.c @@ -62,5 +62,6 @@ void guLookAt(Mtx* m, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f guLookAtF(mf, xEye, yEye, zEye, xAt, yAt, zAt, xUp, yUp, zUp); - guMtxF2L((MtxF*)mf, m); + //guMtxF2L((MtxF*)mf, m); + Matrix_MtxFToMtx((MtxF*)mf, m); } diff --git a/soh/src/libultra/gu/guPerspectiveF.c b/soh/src/libultra/gu/guPerspectiveF.c index 731cec3e9..dd020f589 100644 --- a/soh/src/libultra/gu/guPerspectiveF.c +++ b/soh/src/libultra/gu/guPerspectiveF.c @@ -37,6 +37,6 @@ void guPerspective(Mtx* m, u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 f f32 mf[4][4]; guPerspectiveF(mf, perspNorm, fovy, aspect, near, far, scale); - guMtxF2L((MtxF*)mf, m); - + //guMtxF2L((MtxF*)mf, m); + Matrix_MtxFToMtx((MtxF*)mf, m); } diff --git a/soh/src/libultra/gu/ortho.c b/soh/src/libultra/gu/ortho.c index 517ba1dcc..77d43ce21 100644 --- a/soh/src/libultra/gu/ortho.c +++ b/soh/src/libultra/gu/ortho.c @@ -1,5 +1,7 @@ #include "global.h" +#include "soh/frame_interpolation.h" + void guOrthoF(f32 mf[4][4], f32 left, f32 right, f32 bottom, f32 top, f32 near, f32 far, f32 scale) { s32 i, j; @@ -25,5 +27,8 @@ void guOrtho(Mtx* mtx, f32 left, f32 right, f32 bottom, f32 top, f32 near, f32 f guOrthoF(mf, left, right, bottom, top, near, far, scale); - guMtxF2L((MtxF*)mf, mtx); + //guMtxF2L((MtxF*)mf, mtx); + FrameInterpolation_RecordOpenChild("ortho", 0); + Matrix_MtxFToMtx((MtxF*)mf, mtx); + FrameInterpolation_RecordCloseChild(); } diff --git a/soh/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c b/soh/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c index d1e940619..9616204cd 100644 --- a/soh/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c +++ b/soh/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c @@ -8,6 +8,8 @@ #include "overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h" #include "vt.h" +#include "soh/frame_interpolation.h" + #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) typedef enum { @@ -283,6 +285,7 @@ void BgGanonOtyuka_Draw(Actor* thisx, GlobalContext* globalCtx) { platform = (BgGanonOtyuka*)actor; if (platform->dyna.actor.projectedPos.z > spBC) { + FrameInterpolation_RecordOpenChild(platform, 0); if (camera->eye.y > platform->dyna.actor.world.pos.y) { phi_s2 = sPlatformTopDL; } else { @@ -309,7 +312,7 @@ void BgGanonOtyuka_Draw(Actor* thisx, GlobalContext* globalCtx) { } for (i = 0; i < ARRAY_COUNT(sSides); i++) { - if (platform->visibleSides & sSides[i]) { + if ((platform->visibleSides & sSides[i]) || 1) { // || 1 for frame interpolation Matrix_Push(); Matrix_Translate(sSideCenters[i].x, 0.0f, sSideCenters[i].z, MTXMODE_APPLY); Matrix_RotateY(sSideAngles[i], MTXMODE_APPLY); @@ -320,6 +323,7 @@ void BgGanonOtyuka_Draw(Actor* thisx, GlobalContext* globalCtx) { Matrix_Pop(); } } + FrameInterpolation_RecordCloseChild(); } } @@ -333,6 +337,7 @@ void BgGanonOtyuka_Draw(Actor* thisx, GlobalContext* globalCtx) { platform = (BgGanonOtyuka*)actor; if ((platform->dyna.actor.projectedPos.z > -30.0f) && (platform->flashState != FLASH_NONE)) { + FrameInterpolation_RecordOpenChild(platform, 0); gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, platform->flashTimer * 4, 0, 32, 64, 1, platform->flashTimer * 4, 0, 32, 64)); @@ -344,7 +349,7 @@ void BgGanonOtyuka_Draw(Actor* thisx, GlobalContext* globalCtx) { Matrix_Translate(platform->dyna.actor.world.pos.x, 0.0f, platform->dyna.actor.world.pos.z, MTXMODE_NEW); for (i = 0; i < ARRAY_COUNT(sSides); i++) { - if (platform->unwalledSides & sSides[i]) { + if ((platform->unwalledSides & sSides[i]) || 1) { // || 1 for frame interpolation Matrix_Push(); Matrix_Translate(sSideCenters[i].x, 0.0f, sSideCenters[i].z, MTXMODE_APPLY); Matrix_RotateY(sSideAngles[i], MTXMODE_APPLY); @@ -356,6 +361,7 @@ void BgGanonOtyuka_Draw(Actor* thisx, GlobalContext* globalCtx) { Matrix_Pop(); } } + FrameInterpolation_RecordCloseChild(); } } diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c b/soh/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c index 73044e8b1..c2599e185 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c @@ -240,7 +240,8 @@ void BgHidanRsekizou_Draw(Actor* thisx, GlobalContext* globalCtx) { POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x14); - if ((s16)((Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) - this->dyna.actor.shape.rot.y) - 0x2E6C) >= 0) { + // Strange original code. Add || 1 for frame interpolation to get correct. + if ((s16)((Camera_GetCamDirYaw(GET_ACTIVE_CAM(globalCtx)) - this->dyna.actor.shape.rot.y) - 0x2E6C) >= 0 || 1) { for (i = 3; i >= 0; i--) { POLY_XLU_DISP = BgHidanRsekizou_DrawFireball(globalCtx, this, i, &mf, 0, POLY_XLU_DISP); } diff --git a/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c b/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c index 649774346..5b468c7d3 100644 --- a/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c +++ b/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c @@ -12,6 +12,8 @@ #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" #include "objects/gameplay_keep/gameplay_keep.h" +#include "soh/frame_interpolation.h" + #define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) typedef enum { @@ -78,6 +80,7 @@ void BossFd_SpawnEmber(BossFdEffect* effect, Vec3f* position, Vec3f* velocity, V effect->scale = scale / 1000.0f; effect->alpha = 255; effect->timer1 = (s16)Rand_ZeroFloat(10.0f); + effect->epoch++; break; } } @@ -95,6 +98,7 @@ void BossFd_SpawnDebris(BossFdEffect* effect, Vec3f* position, Vec3f* velocity, effect->scale = scale / 1000.0f; effect->vFdFxRotX = Rand_ZeroFloat(100.0f); effect->vFdFxRotY = Rand_ZeroFloat(100.0f); + effect->epoch++; break; } } @@ -111,6 +115,7 @@ void BossFd_SpawnDust(BossFdEffect* effect, Vec3f* position, Vec3f* velocity, Ve effect->accel = *acceleration; effect->timer2 = 0; effect->scale = scale / 400.0f; + effect->epoch++; break; } } @@ -136,6 +141,7 @@ void BossFd_SpawnFireBreath(BossFdEffect* effect, Vec3f* position, Vec3f* veloci effect->timer2 = 0; effect->scale = scale / 400.0f; effect->kbAngle = kbAngle; + effect->epoch++; break; } } @@ -1522,6 +1528,7 @@ void BossFd_DrawEffects(BossFdEffect* effect, GlobalContext* globalCtx) { for (i = 0; i < 180; i++, effect++) { if (effect->type == BFD_FX_EMBER) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (!flag) { func_80093D84(globalCtx->state.gfxCtx); gSPDisplayList(POLY_XLU_DISP++, gVolvagiaEmberMaterialDL); @@ -1536,6 +1543,7 @@ void BossFd_DrawEffects(BossFdEffect* effect, GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_fd.c", 4046), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gVolvagiaEmberModelDL); + FrameInterpolation_RecordCloseChild(); } } @@ -1543,6 +1551,7 @@ void BossFd_DrawEffects(BossFdEffect* effect, GlobalContext* globalCtx) { flag = false; for (i = 0; i < 180; i++, effect++) { if (effect->type == BFD_FX_DEBRIS) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (!flag) { func_80093D18(globalCtx->state.gfxCtx); gSPDisplayList(POLY_OPA_DISP++, gVolvagiaDebrisMaterialDL); @@ -1557,6 +1566,7 @@ void BossFd_DrawEffects(BossFdEffect* effect, GlobalContext* globalCtx) { gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_fd.c", 4068), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, gVolvagiaDebrisModelDL); + FrameInterpolation_RecordCloseChild(); } } @@ -1564,6 +1574,7 @@ void BossFd_DrawEffects(BossFdEffect* effect, GlobalContext* globalCtx) { flag = false; for (i = 0; i < 180; i++, effect++) { if (effect->type == BFD_FX_DUST) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (!flag) { POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0); gSPDisplayList(POLY_XLU_DISP++, gVolvagiaDustMaterialDL); @@ -1580,6 +1591,7 @@ void BossFd_DrawEffects(BossFdEffect* effect, GlobalContext* globalCtx) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(dustTex[effect->timer2])); gSPDisplayList(POLY_XLU_DISP++, gVolvagiaDustModelDL); + FrameInterpolation_RecordCloseChild(); } } @@ -1587,6 +1599,7 @@ void BossFd_DrawEffects(BossFdEffect* effect, GlobalContext* globalCtx) { flag = false; for (i = 0; i < 180; i++, effect++) { if (effect->type == BFD_FX_FIRE_BREATH) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (!flag) { POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0); gSPDisplayList(POLY_XLU_DISP++, gVolvagiaDustMaterialDL); @@ -1603,6 +1616,7 @@ void BossFd_DrawEffects(BossFdEffect* effect, GlobalContext* globalCtx) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(dustTex[effect->timer2])); gSPDisplayList(POLY_XLU_DISP++, gVolvagiaDustModelDL); + FrameInterpolation_RecordCloseChild(); } } @@ -1610,6 +1624,7 @@ void BossFd_DrawEffects(BossFdEffect* effect, GlobalContext* globalCtx) { flag = false; for (i = 0; i < 180; i++, effect++) { if (effect->type == BFD_FX_SKULL_PIECE) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (!flag) { func_80093D84(globalCtx->state.gfxCtx); gSPDisplayList(POLY_XLU_DISP++, gVolvagiaSkullPieceMaterialDL); @@ -1624,6 +1639,7 @@ void BossFd_DrawEffects(BossFdEffect* effect, GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_fd.c", 4192), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gVolvagiaSkullPieceModelDL); + FrameInterpolation_RecordCloseChild(); } } diff --git a/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.h b/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.h index ea24fd346..d9580fc28 100644 --- a/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.h +++ b/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.h @@ -49,6 +49,7 @@ typedef struct { /* 0x30 */ f32 scale; /* 0x34 */ f32 bFdFxFloat1; /* 0x38 */ f32 bFdFxFloat2; + u32 epoch; } BossFdEffect; // size = 0x3C #define BOSSFD_EFFECT_COUNT 180 diff --git a/soh/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c b/soh/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c index 20db1fb55..779584e32 100644 --- a/soh/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c +++ b/soh/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c @@ -87,6 +87,7 @@ void BossFd2_SpawnDebris(GlobalContext* globalCtx, BossFdEffect* effect, Vec3f* effect->scale = scale / 1000.0f; effect->vFdFxRotX = Rand_ZeroFloat(100.0f); effect->vFdFxRotY = Rand_ZeroFloat(100.0f); + effect->epoch++; break; } } @@ -112,6 +113,7 @@ void BossFd2_SpawnFireBreath(GlobalContext* globalCtx, BossFdEffect* effect, Vec effect->timer2 = 0; effect->scale = scale / 400.0f; effect->kbAngle = kbAngle; + effect->epoch++; break; } } @@ -130,6 +132,7 @@ void BossFd2_SpawnEmber(GlobalContext* globalCtx, BossFdEffect* effect, Vec3f* p effect->scale = scale / 1000.0f; effect->alpha = 255; effect->timer1 = (s16)Rand_ZeroFloat(10.0f); + effect->epoch++; break; } } @@ -148,6 +151,7 @@ void BossFd2_SpawnSkullPiece(GlobalContext* globalCtx, BossFdEffect* effect, Vec effect->scale = scale / 1000.0f; effect->vFdFxRotX = Rand_ZeroFloat(100.0f); effect->vFdFxRotY = Rand_ZeroFloat(100.0f); + effect->epoch++; break; } } @@ -164,6 +168,7 @@ void BossFd2_SpawnDust(BossFdEffect* effect, Vec3f* position, Vec3f* velocity, V effect->accel = *acceleration; effect->timer2 = 0; effect->scale = scale / 400.0f; + effect->epoch++; break; } } diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c index f7132bcaf..21199d420 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c @@ -9,6 +9,8 @@ #include "assets/objects/object_ganon_anime2/object_ganon_anime2.h" #include "assets/scenes/dungeons/ganon_boss/ganon_boss_scene.h" +#include "soh/frame_interpolation.h" + #include #define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) @@ -138,6 +140,7 @@ void BossGanonEff_SpawnWindowShard(GlobalContext* globalCtx, Vec3f* pos, Vec3f* eff->color.g = color->g; eff->color.b = color->b; eff->timer = (s16)Rand_ZeroFloat(20.0f); + eff->epoch++; break; } } @@ -158,6 +161,7 @@ void BossGanonEff_SpawnSparkle(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velo eff->unk_2E = (s16)Rand_ZeroFloat(100.0f) + 0xC8; eff->unk_30 = arg6; eff->timer = (s16)Rand_ZeroFloat(10.0f); + eff->epoch++; break; } } @@ -182,6 +186,7 @@ void BossGanonEff_SpawnLightRay(GlobalContext* globalCtx, Vec3f* pos, Vec3f* vel eff->timer = (s16)Rand_ZeroFloat(10.0f); eff->unk_48 = Math_Atan2F(eff->velocity.z, eff->velocity.x); eff->unk_44 = -Math_Atan2F(sqrtf(SQXZ(eff->velocity)), eff->velocity.y); + eff->epoch++; break; } } @@ -201,6 +206,7 @@ void BossGanonEff_SpawnShock(GlobalContext* globalCtx, f32 scale, s16 shockType) eff->scale = scale / 1000.0f; eff->unk_2E = shockType; eff->timer = 0; + eff->epoch++; break; } } @@ -220,6 +226,7 @@ void BossGanonEff_SpawnLightning(GlobalContext* globalCtx, f32 scale, f32 arg2, eff->unk_48 = arg2; eff->unk_3C = arg3; eff->timer = 0; + eff->epoch++; break; } } @@ -240,6 +247,7 @@ void BossGanonEff_SpawnDustDark(GlobalContext* globalCtx, Vec3f* pos, f32 scale, eff->unk_38 = arg3; eff->unk_30 = (s16)Rand_ZeroFloat(100.0f); eff->unk_2E = eff->timer = eff->alpha = 0; + eff->epoch++; break; } } @@ -257,6 +265,7 @@ void BossGanonEff_SpawnDustLight(GlobalContext* globalCtx, Vec3f* pos, f32 scale effArr[bufIndex].unk_38 = arg3; effArr[bufIndex].unk_30 = Rand_ZeroFloat(100.0f); effArr[bufIndex].unk_2E = effArr[bufIndex].timer = effArr[bufIndex].alpha = 0; + effArr[bufIndex].epoch++; } void BossGanonEff_SpawnShockwave(GlobalContext* globalCtx, Vec3f* pos, f32 scale, f32 arg3) { @@ -275,6 +284,7 @@ void BossGanonEff_SpawnShockwave(GlobalContext* globalCtx, Vec3f* pos, f32 scale eff->unk_38 = arg3; eff->unk_30 = (s16)Rand_ZeroFloat(100.0f); eff->unk_2E = eff->timer = 0; + eff->epoch++; break; } } @@ -295,6 +305,7 @@ void BossGanonEff_SpawnBlackDot(GlobalContext* globalCtx, Vec3f* pos, f32 scale) eff->timer = 0; eff->alpha = 0; eff->unk_2E = 0; + eff->epoch++; break; } } @@ -4820,6 +4831,7 @@ void BossGanon_DrawEffects(GlobalContext* globalCtx) { for (i = 0; i < 200; i++, eff++) { if (eff->type == GDF_EFF_WINDOW_SHARD) { + FrameInterpolation_RecordOpenChild(eff, eff->epoch); gDPPipeSync(POLY_OPA_DISP++); if (flag == 0) { gSPDisplayList(POLY_OPA_DISP++, gDorfWindowShardMaterialDL); @@ -4837,6 +4849,7 @@ void BossGanon_DrawEffects(GlobalContext* globalCtx) { gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 10898), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, gDorfWindowShardModelDL); + FrameInterpolation_RecordCloseChild(); } } @@ -4845,6 +4858,7 @@ void BossGanon_DrawEffects(GlobalContext* globalCtx) { for (i = 0; i < 150; i++, eff++) { if (eff->type == GDF_EFF_SPARKLE) { + FrameInterpolation_RecordOpenChild(eff, eff->epoch); gDPPipeSync(POLY_XLU_DISP++); if (flag == 0) { gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 0); @@ -4859,6 +4873,7 @@ void BossGanon_DrawEffects(GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 10932), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gDorfSquareDL); + FrameInterpolation_RecordCloseChild(); } } @@ -4867,6 +4882,7 @@ void BossGanon_DrawEffects(GlobalContext* globalCtx) { for (i = 0; i < 150; i++, eff++) { if (eff->type == GDF_EFF_LIGHT_RAY) { + FrameInterpolation_RecordOpenChild(eff, eff->epoch); gDPPipeSync(POLY_XLU_DISP++); if (flag == 0) { gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 0); @@ -4883,6 +4899,7 @@ void BossGanon_DrawEffects(GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 10971), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gDorfSquareDL); + FrameInterpolation_RecordCloseChild(); } } @@ -4891,6 +4908,7 @@ void BossGanon_DrawEffects(GlobalContext* globalCtx) { for (i = 0; i < 150; i++, eff++) { if (eff->type == GDF_EFF_SHOCK) { + FrameInterpolation_RecordOpenChild(eff, eff->epoch); if (flag == 0) { gDPPipeSync(POLY_XLU_DISP++); if (eff->unk_2E == GDF_SHOCK_PLAYER_PURPLE) { @@ -4909,6 +4927,7 @@ void BossGanon_DrawEffects(GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 11023), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gDorfShockDL); + FrameInterpolation_RecordCloseChild(); } } @@ -4916,6 +4935,7 @@ void BossGanon_DrawEffects(GlobalContext* globalCtx) { for (i = 0; i < 150; i++, eff++) { if (eff->type == GDF_EFF_LIGHTNING) { + FrameInterpolation_RecordOpenChild(eff, eff->epoch); gDPPipeSync(POLY_XLU_DISP++); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, sLightningPrimColors[(eff->timer * 3) + 0], sLightningPrimColors[(eff->timer * 3) + 1], sLightningPrimColors[(eff->timer * 3) + 2], @@ -4931,6 +4951,7 @@ void BossGanon_DrawEffects(GlobalContext* globalCtx) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sLightningTextures[eff->timer])); gSPDisplayList(POLY_XLU_DISP++, gDorfLightningDL); + FrameInterpolation_RecordCloseChild(); } } @@ -4938,6 +4959,7 @@ void BossGanon_DrawEffects(GlobalContext* globalCtx) { for (i = 0; i < 150; i++, eff++) { if (eff->type == GDF_EFF_IMPACT_DUST_DARK) { + FrameInterpolation_RecordOpenChild(eff, eff->epoch); gDPPipeSync(POLY_XLU_DISP++); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, 0, 0, eff->alpha); gDPSetEnvColor(POLY_XLU_DISP++, 100, 70, 0, 128); @@ -4949,6 +4971,7 @@ void BossGanon_DrawEffects(GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 11121), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gDorfImpactDarkDL); + FrameInterpolation_RecordCloseChild(); } } @@ -4956,6 +4979,7 @@ void BossGanon_DrawEffects(GlobalContext* globalCtx) { for (i = 0; i < 150; i++, eff++) { if (eff->type == GDF_EFF_IMPACT_DUST_LIGHT) { + FrameInterpolation_RecordOpenChild(eff, eff->epoch); gDPPipeSync(POLY_XLU_DISP++); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, eff->alpha); gDPSetEnvColor(POLY_XLU_DISP++, 200, 100, 0, 128); @@ -4967,6 +4991,7 @@ void BossGanon_DrawEffects(GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 11165), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gDorfImpactLightDL); + FrameInterpolation_RecordCloseChild(); } } @@ -4974,6 +4999,7 @@ void BossGanon_DrawEffects(GlobalContext* globalCtx) { for (i = 0; i < 150; i++, eff++) { if (eff->type == GDF_EFF_SHOCKWAVE) { + FrameInterpolation_RecordOpenChild(eff, eff->epoch); gDPPipeSync(POLY_XLU_DISP++); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 170, eff->alpha); gDPSetEnvColor(POLY_XLU_DISP++, 150, 255, 0, 128); @@ -4986,6 +5012,7 @@ void BossGanon_DrawEffects(GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 11209), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gDorfShockwaveDL); + FrameInterpolation_RecordCloseChild(); } } @@ -4993,6 +5020,7 @@ void BossGanon_DrawEffects(GlobalContext* globalCtx) { for (i = 0; i < 150; i++, eff++) { if (eff->type == GDF_EFF_BLACK_DOT) { + FrameInterpolation_RecordOpenChild(eff, eff->epoch); gDPPipeSync(POLY_XLU_DISP++); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 150, 170, 0, eff->alpha); gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, 128); @@ -5005,6 +5033,7 @@ void BossGanon_DrawEffects(GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_ganon.c", 11250), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gDorfDotDL); + FrameInterpolation_RecordCloseChild(); } } diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h b/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h index 69a983717..7a797ad74 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h +++ b/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h @@ -69,6 +69,7 @@ typedef struct { /* 0x40 */ f32 unk_40; /* 0x44 */ f32 unk_44; // mostly x rot /* 0x48 */ f32 unk_48; // mostly y rot + u32 epoch; } GanondorfEffect; // size = 0x4C typedef struct BossGanon { diff --git a/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index ec4899a28..ae436ca2d 100644 --- a/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -10,6 +10,8 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "vt.h" +#include "soh/frame_interpolation.h" + #include #define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) @@ -34,6 +36,7 @@ typedef struct { /* 0x30 */ f32 scale; /* 0x30 */ f32 fwork[2]; /* 0x3C */ Vec3f* targetPos; + u32 epoch; } BossMoEffect; // size = 0x40 #define MO_FX_MAX_SIZE 0 @@ -211,6 +214,7 @@ void BossMo_SpawnRipple(BossMoEffect* effect, Vec3f* pos, f32 scale, f32 maxScal effect->rippleMode = 1; effect->fwork[MO_FX_SPREAD_RATE] = (effect->fwork[MO_FX_MAX_SIZE] - effect->scale) * 0.1f; } + effect->epoch++; break; } } @@ -232,6 +236,7 @@ void BossMo_SpawnDroplet(s16 type, BossMoEffect* effect, Vec3f* pos, Vec3f* vel, effect->scale = scale; effect->fwork[MO_FX_SPREAD_RATE] = 1.0f; effect->stopTimer = 0; + effect->epoch++; break; } } @@ -250,6 +255,7 @@ void BossMo_SpawnStillDroplet(BossMoEffect* effect, Vec3f* pos, f32 scale) { effect->accel = zeroVec; effect->scale = scale; effect->fwork[MO_FX_SPREAD_RATE] = 1.0f; + effect->epoch++; break; } } @@ -274,6 +280,7 @@ void BossMo_SpawnBubble(BossMoEffect* effect, Vec3f* pos, Vec3f* vel, Vec3f* acc effect->alpha = 0; } effect->timer = 0; + effect->epoch++; break; } } @@ -2909,6 +2916,7 @@ void BossMo_DrawEffects(BossMoEffect* effect, GlobalContext* globalCtx) { for (i = 0; i < ARRAY_COUNT(sEffects); i++, effect++) { if (effect->type == MO_FX_BIG_RIPPLE) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (flag == 0) { func_80094BC4(gfxCtx); @@ -2925,6 +2933,7 @@ void BossMo_DrawEffects(BossMoEffect* effect, GlobalContext* globalCtx) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gEffWaterRippleDL); + FrameInterpolation_RecordCloseChild(); } } @@ -2932,6 +2941,7 @@ void BossMo_DrawEffects(BossMoEffect* effect, GlobalContext* globalCtx) { flag = 0; for (i = 0; i < ARRAY_COUNT(sEffects); i++, effect++) { if (effect->type == MO_FX_SMALL_RIPPLE) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (flag == 0) { func_80093D84(globalCtx->state.gfxCtx); @@ -2948,6 +2958,7 @@ void BossMo_DrawEffects(BossMoEffect* effect, GlobalContext* globalCtx) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gEffShockwaveDL); + FrameInterpolation_RecordCloseChild(); } } @@ -2956,6 +2967,7 @@ void BossMo_DrawEffects(BossMoEffect* effect, GlobalContext* globalCtx) { for (i = 0; i < ARRAY_COUNT(sEffects); i++, effect++) { if (((effect->type == MO_FX_DROPLET) || (effect->type == MO_FX_SPLASH)) || (effect->type == MO_FX_SPLASH_TRAIL)) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (flag == 0) { POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0); @@ -2977,6 +2989,7 @@ void BossMo_DrawEffects(BossMoEffect* effect, GlobalContext* globalCtx) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gMorphaDropletModelDL); + FrameInterpolation_RecordCloseChild(); } } @@ -2984,6 +2997,7 @@ void BossMo_DrawEffects(BossMoEffect* effect, GlobalContext* globalCtx) { flag = 0; for (i = 0; i < ARRAY_COUNT(sEffects); i++, effect++) { if (effect->type == MO_FX_WET_SPOT) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (flag == 0) { func_80094044(gfxCtx); @@ -3003,6 +3017,7 @@ void BossMo_DrawEffects(BossMoEffect* effect, GlobalContext* globalCtx) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gMorphaWetSpotModelDL); + FrameInterpolation_RecordCloseChild(); } } @@ -3010,6 +3025,7 @@ void BossMo_DrawEffects(BossMoEffect* effect, GlobalContext* globalCtx) { flag = 0; for (i = 0; i < ARRAY_COUNT(sEffects); i++, effect++) { if (effect->type == MO_FX_BUBBLE) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (flag == 0) { func_80093D18(globalCtx->state.gfxCtx); @@ -3027,6 +3043,7 @@ void BossMo_DrawEffects(BossMoEffect* effect, GlobalContext* globalCtx) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, gMorphaBubbleDL); + FrameInterpolation_RecordCloseChild(); } } diff --git a/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index c5b60a327..3d6865e24 100644 --- a/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -12,6 +12,8 @@ #include "overlays/actors/ovl_En_Boom/z_en_boom.h" #include "objects/gameplay_keep/gameplay_keep.h" +#include "soh/frame_interpolation.h" + #define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) #define GET_BODY(this) ((BossVa*)(this)->actor.parent) @@ -40,6 +42,7 @@ typedef struct BossVaEffect { /* 0x44 */ f32 scaleMod; /* 0x48 */ Vec3f offset; /* 0x54 */ struct BossVa* parent; + u32 epoch; } BossVaEffect; // size = 0x58 typedef enum { @@ -3519,6 +3522,7 @@ void BossVa_DrawEffects(BossVaEffect* effect, GlobalContext* globalCtx) { for (i = 0; i < ARRAY_COUNT(sVaEffects); i++, effect++) { if (effect->type == VA_LARGE_SPARK) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (!flag) { func_80093D84(globalCtx->state.gfxCtx); gDPSetEnvColor(POLY_XLU_DISP++, 130, 130, 30, 0); @@ -3534,12 +3538,14 @@ void BossVa_DrawEffects(BossVaEffect* effect, GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_va.c", 4976), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gBarinadeDL_015710); + FrameInterpolation_RecordCloseChild(); } } effect = effectHead; for (i = 0, flag = 0; i < ARRAY_COUNT(sVaEffects); i++, effect++) { if (effect->type == VA_SPARK_BALL) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (!flag) { func_80093D84(globalCtx->state.gfxCtx); gSPDisplayList(POLY_XLU_DISP++, gBarinadeDL_011738); @@ -3560,12 +3566,14 @@ void BossVa_DrawEffects(BossVaEffect* effect, GlobalContext* globalCtx) { gDPSetEnvColor(POLY_XLU_DISP++, effect->envColor[0], effect->envColor[1], effect->envColor[2], effect->envColor[3]); gSPDisplayList(POLY_XLU_DISP++, gBarinadeDL_011768); + FrameInterpolation_RecordCloseChild(); } } effect = effectHead; for (i = 0, flag = 0; i < ARRAY_COUNT(sVaEffects); i++, effect++) { if (effect->type == VA_BLOOD) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (!flag) { func_80093D84(globalCtx->state.gfxCtx); gSPDisplayList(POLY_XLU_DISP++, gBarinadeDL_009430); @@ -3590,6 +3598,7 @@ void BossVa_DrawEffects(BossVaEffect* effect, GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_va.c", 5052), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gBarinadeDL_009468); + FrameInterpolation_RecordCloseChild(); } } @@ -3598,6 +3607,7 @@ void BossVa_DrawEffects(BossVaEffect* effect, GlobalContext* globalCtx) { if (effect->type == VA_TUMOR) { BossVa* parent = effect->parent; + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (!flag) { func_80093D18(globalCtx->state.gfxCtx); gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, effect->envColor[3]); @@ -3614,12 +3624,14 @@ void BossVa_DrawEffects(BossVaEffect* effect, GlobalContext* globalCtx) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, gBarinadeDL_012948); } + FrameInterpolation_RecordCloseChild(); } } effect = effectHead; for (i = 0, flag = 0; i < ARRAY_COUNT(sVaEffects); i++, effect++) { if (effect->type == VA_GORE) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (!flag) { func_80093D18(globalCtx->state.gfxCtx); gSPDisplayList(POLY_OPA_DISP++, gBarinadeDL_012BA0); @@ -3645,12 +3657,14 @@ void BossVa_DrawEffects(BossVaEffect* effect, GlobalContext* globalCtx) { gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_va.c", 5124), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, gBarinadeDL_012C50); + FrameInterpolation_RecordCloseChild(); } } effect = effectHead; for (i = 0, flag = 0; i < ARRAY_COUNT(sVaEffects); i++, effect++) { if (effect->type == VA_ZAP_CHARGE) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (!flag) { func_80093D84(globalCtx->state.gfxCtx); gSPDisplayList(POLY_XLU_DISP++, gBarinadeDL_0135B0); @@ -3668,12 +3682,14 @@ void BossVa_DrawEffects(BossVaEffect* effect, GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_va.c", 5152), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gBarinadeDL_013638); + FrameInterpolation_RecordCloseChild(); } } effect = effectHead; for (i = 0, flag = 0; i < ARRAY_COUNT(sVaEffects); i++, effect++) { if (effect->type == VA_BLAST_SPARK) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (!flag) { func_80093C14(globalCtx->state.gfxCtx); gDPSetEnvColor(POLY_XLU_DISP++, 130, 130, 30, 0); @@ -3690,12 +3706,14 @@ void BossVa_DrawEffects(BossVaEffect* effect, GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_va.c", 5180), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gBarinadeDL_015710); + FrameInterpolation_RecordCloseChild(); } } effect = effectHead; for (i = 0, flag = 0; i < ARRAY_COUNT(sVaEffects); i++, effect++) { if (effect->type == VA_SMALL_SPARK) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (!flag) { func_80093D84(globalCtx->state.gfxCtx); gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 100, 0); @@ -3712,6 +3730,7 @@ void BossVa_DrawEffects(BossVaEffect* effect, GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_boss_va.c", 5208), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gBarinadeDL_008F70); + FrameInterpolation_RecordCloseChild(); } } @@ -3734,6 +3753,7 @@ void BossVa_SpawnSpark(GlobalContext* globalCtx, BossVaEffect* effect, BossVa* t effect->timer = (s16)(Rand_ZeroOne() * 10.0f) + 111; effect->velocity = effect->accel = sZeroVec; effect->mode = mode; + effect->epoch++; switch (mode) { case SPARK_UNUSED: diff --git a/soh/src/overlays/actors/ovl_En_Zo/z_en_zo.c b/soh/src/overlays/actors/ovl_En_Zo/z_en_zo.c index b55777484..ac50f226a 100644 --- a/soh/src/overlays/actors/ovl_En_Zo/z_en_zo.c +++ b/soh/src/overlays/actors/ovl_En_Zo/z_en_zo.c @@ -7,6 +7,8 @@ #include "z_en_zo.h" #include "objects/object_zo/object_zo.h" +#include "soh/frame_interpolation.h" + #define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) typedef enum { @@ -41,6 +43,7 @@ void EnZo_Ripple(EnZo* this, Vec3f* pos, f32 scale, f32 targetScale, u8 alpha) { effect->scale = scale; effect->targetScale = targetScale; effect->color.a = alpha; + effect->epoch++; break; } effect++; @@ -65,6 +68,7 @@ void EnZo_Bubble(EnZo* this, Vec3f* pos) { effect->vec = *pos; effect->vel = vel; effect->scale = ((Rand_ZeroOne() - 0.5f) * 0.02f) + 0.12f; + effect->epoch++; break; } } @@ -87,6 +91,7 @@ void EnZo_Splash(EnZo* this, Vec3f* pos, Vec3f* vel, f32 scale) { effect->vel = *vel; effect->color.a = (Rand_ZeroOne() * 100.0f) + 100.0f; effect->scale = scale; + effect->epoch++; break; } effect++; @@ -180,6 +185,7 @@ void EnZo_DrawRipples(EnZo* this, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); for (i = 0; i < ARRAY_COUNT(this->effects); i++) { if (effect->type == ENZO_EFFECT_RIPPLE) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (!setup) { if (1) {} gDPPipeSync(POLY_XLU_DISP++); @@ -194,6 +200,7 @@ void EnZo_DrawRipples(EnZo* this, GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_zo_eff.c", 242), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gZoraRipplesModelDL); + FrameInterpolation_RecordCloseChild(); } effect++; } @@ -210,6 +217,7 @@ void EnZo_DrawBubbles(EnZo* this, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); for (i = 0; i < ARRAY_COUNT(this->effects); i++) { if (effect->type == ENZO_EFFECT_BUBBLE) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (!setup) { if (1) {} gSPDisplayList(POLY_XLU_DISP++, gZoraBubblesMaterialDL); @@ -227,6 +235,7 @@ void EnZo_DrawBubbles(EnZo* this, GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_zo_eff.c", 281), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gZoraBubblesModelDL); + FrameInterpolation_RecordCloseChild(); } effect++; } @@ -244,6 +253,7 @@ void EnZo_DrawSplashes(EnZo* this, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); for (i = 0; i < ARRAY_COUNT(this->effects); i++) { if (effect->type == ENZO_EFFECT_SPLASH) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (!setup) { if (1) {} gSPDisplayList(POLY_XLU_DISP++, gZoraSplashesMaterialDL); @@ -260,6 +270,7 @@ void EnZo_DrawSplashes(EnZo* this, GlobalContext* globalCtx) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gZoraSplashesModelDL); + FrameInterpolation_RecordCloseChild(); } effect++; } diff --git a/soh/src/overlays/actors/ovl_En_Zo/z_en_zo.h b/soh/src/overlays/actors/ovl_En_Zo/z_en_zo.h index ba6eebb30..8911ce399 100644 --- a/soh/src/overlays/actors/ovl_En_Zo/z_en_zo.h +++ b/soh/src/overlays/actors/ovl_En_Zo/z_en_zo.h @@ -15,6 +15,7 @@ typedef struct { /* 0x14 */ Vec3f pos; /* 0x20 */ Vec3f vel; /* 0x2C */ Vec3f vec; // Usage specific + u32 epoch; } EnZoEffect; // size = 0x38 typedef void (*EnZoActionFunc)(struct EnZo*, GlobalContext*); diff --git a/soh/src/overlays/actors/ovl_Fishing/z_fishing.c b/soh/src/overlays/actors/ovl_Fishing/z_fishing.c index a103c4826..0798145db 100644 --- a/soh/src/overlays/actors/ovl_Fishing/z_fishing.c +++ b/soh/src/overlays/actors/ovl_Fishing/z_fishing.c @@ -10,6 +10,8 @@ #include "objects/object_fish/object_fish.h" #include "vt.h" +#include "soh/frame_interpolation.h" + #define FLAGS ACTOR_FLAG_4 #define WATER_SURFACE_Y(globalCtx) globalCtx->colCtx.colHeader->waterBoxes->ySurface @@ -56,6 +58,7 @@ typedef struct { /* 0x34 */ f32 unk_34; /* 0x38 */ f32 unk_38; /* 0x3C */ f32 unk_3C; + u32 epoch; } FishingEffect; // size = 0x40 #define POND_PROP_COUNT 140 @@ -490,6 +493,8 @@ void Fishing_SpawnRipple(Vec3f* projectedPos, FishingEffect* effect, Vec3f* pos, effect->unk_2C = 1; effect->unk_38 = (effect->unk_34 - effect->unk_30) * 0.1f; } + + effect->epoch++; break; } @@ -514,6 +519,7 @@ void Fishing_SpawnDustSplash(Vec3f* projectedPos, FishingEffect* effect, Vec3f* effect->accel = accel; effect->alpha = 100 + (s16)Rand_ZeroFloat(100.0f); effect->unk_30 = scale; + effect->epoch++; break; } @@ -539,6 +545,7 @@ void Fishing_SpawnWaterDust(Vec3f* projectedPos, FishingEffect* effect, Vec3f* p effect->timer = (s16)Rand_ZeroFloat(100.0f); effect->unk_30 = scale; effect->unk_34 = 2.0f * scale; + effect->epoch++; break; } @@ -563,6 +570,7 @@ void Fishing_SpawnBubble(Vec3f* projectedPos, FishingEffect* effect, Vec3f* pos, effect->timer = (s16)Rand_ZeroFloat(100.0f); effect->unk_30 = scale; effect->unk_2C = arg4; + effect->epoch++; break; } @@ -591,6 +599,7 @@ void Fishing_SpawnRainDrop(FishingEffect* effect, Vec3f* pos, Vec3f* rot) { Matrix_RotateY(rot->y, MTXMODE_NEW); Matrix_RotateX(rot->x, MTXMODE_APPLY); Matrix_MultVec3f(&velSrc, &effect->vel); + effect->epoch++; break; } @@ -1182,6 +1191,7 @@ void Fishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) { for (i = 0; i < 100; i++) { if (effect->type == FS_EFF_RIPPLE) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (flag == 0) { gSPDisplayList(POLY_XLU_DISP++, gFishingRippleMaterialDL); gDPSetEnvColor(POLY_XLU_DISP++, 155, 155, 155, 0); @@ -1197,6 +1207,7 @@ void Fishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gFishingRippleModelDL); + FrameInterpolation_RecordCloseChild(); } effect++; } @@ -1205,6 +1216,7 @@ void Fishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) { flag = 0; for (i = 0; i < 100; i++) { if (effect->type == FS_EFF_DUST_SPLASH) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (flag == 0) { gSPDisplayList(POLY_XLU_DISP++, gFishingDustSplashMaterialDL); gDPSetEnvColor(POLY_XLU_DISP++, 200, 200, 200, 0); @@ -1221,6 +1233,7 @@ void Fishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gFishingDustSplashModelDL); + FrameInterpolation_RecordCloseChild(); } effect++; } @@ -1229,6 +1242,7 @@ void Fishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) { flag = 0; for (i = 0; i < 100; i++) { if (effect->type == FS_EFF_WATER_DUST) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (flag == 0) { gSPDisplayList(POLY_OPA_DISP++, gFishingWaterDustMaterialDL); gDPSetEnvColor(POLY_OPA_DISP++, 40, 90, 80, 128); @@ -1249,6 +1263,7 @@ void Fishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, gFishingWaterDustModelDL); + FrameInterpolation_RecordCloseChild(); } effect++; } @@ -1257,6 +1272,7 @@ void Fishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) { flag = 0; for (i = 0; i < 100; i++) { if (effect->type == FS_EFF_BUBBLE) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (flag == 0) { gSPDisplayList(POLY_XLU_DISP++, gFishingBubbleMaterialDL); gDPSetEnvColor(POLY_XLU_DISP++, 150, 150, 150, 0); @@ -1272,6 +1288,7 @@ void Fishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gFishingBubbleModelDL); + FrameInterpolation_RecordCloseChild(); } effect++; } @@ -1280,6 +1297,7 @@ void Fishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) { flag = 0; for (i = 30; i < EFFECT_COUNT; i++) { if (effect->type == FS_EFF_RAIN_DROP) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (flag == 0) { POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x14); gDPSetCombineMode(POLY_XLU_DISP++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); @@ -1297,6 +1315,7 @@ void Fishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gFishingRainDropModelDL); + FrameInterpolation_RecordCloseChild(); } effect++; } @@ -1307,6 +1326,7 @@ void Fishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) { flag = 0; for (i = 30; i < EFFECT_COUNT; i++) { if (effect->type == FS_EFF_RAIN_RIPPLE) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (flag == 0) { gSPDisplayList(POLY_XLU_DISP++, gFishingRippleMaterialDL); gDPSetEnvColor(POLY_XLU_DISP++, 155, 155, 155, 0); @@ -1321,6 +1341,7 @@ void Fishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gFishingRippleModelDL); + FrameInterpolation_RecordCloseChild(); } effect++; } @@ -1329,6 +1350,7 @@ void Fishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) { flag = 0; for (i = 30; i < EFFECT_COUNT; i++) { if (effect->type == FS_EFF_RAIN_SPLASH) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); if (flag == 0) { gSPDisplayList(POLY_XLU_DISP++, gFishingRainSplashMaterialDL); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, KREG(19) + 80); @@ -1350,12 +1372,14 @@ void Fishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gFishingRainSplashModelDL); + FrameInterpolation_RecordCloseChild(); } effect++; } effect = firstEffect; if (effect->type == FS_EFF_OWNER_HAT) { + FrameInterpolation_RecordOpenChild(effect, effect->epoch); Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW); Matrix_RotateY((sEffOwnerHatRot.y * M_PI) / 32768, MTXMODE_APPLY); Matrix_RotateX((sEffOwnerHatRot.x * M_PI) / 32768, MTXMODE_APPLY); @@ -1367,6 +1391,7 @@ void Fishing_DrawEffects(FishingEffect* effect, GlobalContext* globalCtx) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, gFishingOwnerHatDL); + FrameInterpolation_RecordCloseChild(); } Matrix_Pop(); @@ -4398,6 +4423,7 @@ void Fishing_DrawPondProps(GlobalContext* globalCtx) { } if (prop->shouldDraw) { + FrameInterpolation_RecordOpenChild(prop, 0); Matrix_Translate(prop->pos.x, prop->pos.y, prop->pos.z, MTXMODE_NEW); Matrix_Scale(prop->scale, prop->scale, prop->scale, MTXMODE_APPLY); Matrix_RotateY(prop->rotY, MTXMODE_APPLY); @@ -4407,6 +4433,7 @@ void Fishing_DrawPondProps(GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_fishing.c", 7726), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gFishingReedModelDL); + FrameInterpolation_RecordCloseChild(); } } @@ -4423,12 +4450,14 @@ void Fishing_DrawPondProps(GlobalContext* globalCtx) { } if (prop->shouldDraw) { + FrameInterpolation_RecordOpenChild(prop, 0); Matrix_Translate(prop->pos.x, prop->pos.y, prop->pos.z, MTXMODE_NEW); Matrix_Scale(prop->scale, prop->scale, prop->scale, MTXMODE_APPLY); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_fishing.c", 7748), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, gFishingWoodPostModelDL); + FrameInterpolation_RecordCloseChild(); } } @@ -4445,6 +4474,7 @@ void Fishing_DrawPondProps(GlobalContext* globalCtx) { } if (prop->shouldDraw) { + FrameInterpolation_RecordOpenChild(prop, 0); Matrix_Translate(prop->pos.x, prop->pos.y, prop->pos.z, MTXMODE_NEW); Matrix_Scale(prop->scale, 1.0f, prop->scale, MTXMODE_APPLY); Matrix_RotateY(prop->lilyPadAngle * (M_PI / 32768), MTXMODE_APPLY); @@ -4454,6 +4484,7 @@ void Fishing_DrawPondProps(GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_fishing.c", 7774), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gFishingLilyPadModelDL); + FrameInterpolation_RecordCloseChild(); } } @@ -4470,6 +4501,7 @@ void Fishing_DrawPondProps(GlobalContext* globalCtx) { } if (prop->shouldDraw) { + FrameInterpolation_RecordOpenChild(prop, 0); Matrix_Translate(prop->pos.x, prop->pos.y, prop->pos.z, MTXMODE_NEW); Matrix_Scale(prop->scale, prop->scale, prop->scale, MTXMODE_APPLY); Matrix_RotateY(prop->rotY, MTXMODE_APPLY); @@ -4477,6 +4509,7 @@ void Fishing_DrawPondProps(GlobalContext* globalCtx) { gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_fishing.c", 7798), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, gFishingRockModelDL); + FrameInterpolation_RecordCloseChild(); } } diff --git a/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c b/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c index b01bcf1d9..d4282b91b 100644 --- a/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c +++ b/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c @@ -9,6 +9,8 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_spot02_objects/object_spot02_objects.h" +#include "soh/frame_interpolation.h" + #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25) void ObjectKankyo_Init(Actor* thisx, GlobalContext* globalCtx); @@ -260,6 +262,7 @@ void ObjectKankyo_Fairies(ObjectKankyo* this, GlobalContext* globalCtx) { this->effects[i].dirPhase.z = Rand_ZeroOne() * 360.0f; this->effects[i].state++; this->effects[i].timer = 0; + this->effects[i].epoch++; break; case 1: // blinking fairies / inactive fairy trails @@ -417,26 +420,32 @@ void ObjectKankyo_Fairies(ObjectKankyo* this, GlobalContext* globalCtx) { if (this->effects[i].base.x + this->effects[i].pos.x - baseX > maxDist) { this->effects[i].base.x = baseX - maxDist; this->effects[i].pos.x = 0.0f; + this->effects[i].epoch++; } if (this->effects[i].base.x + this->effects[i].pos.x - baseX < -maxDist) { this->effects[i].base.x = baseX + maxDist; this->effects[i].pos.x = 0.0f; + this->effects[i].epoch++; } if (this->effects[i].base.y + this->effects[i].pos.y - baseY > 50.0f) { this->effects[i].base.y = baseY - 50.0f; this->effects[i].pos.y = 0.0f; + this->effects[i].epoch++; } if (this->effects[i].base.y + this->effects[i].pos.y - baseY < -50.0f) { this->effects[i].base.y = baseY + 50.0f; this->effects[i].pos.y = 0.0f; + this->effects[i].epoch++; } if (this->effects[i].base.z + this->effects[i].pos.z - baseZ > maxDist) { this->effects[i].base.z = baseZ - maxDist; this->effects[i].pos.z = 0.0f; + this->effects[i].epoch++; } if (this->effects[i].base.z + this->effects[i].pos.z - baseZ < -maxDist) { this->effects[i].base.z = baseZ + maxDist; this->effects[i].pos.z = 0.0f; + this->effects[i].epoch++; } } } @@ -496,6 +505,7 @@ void ObjectKankyo_DrawFairies(ObjectKankyo* this2, GlobalContext* globalCtx2) { gSPDisplayList(POLY_XLU_DISP++, gKokiriDustMoteTextureLoadDL); for (i = 0; i < globalCtx->envCtx.unk_EE[3]; i++) { + FrameInterpolation_RecordOpenChild(&this->effects[i], this->effects[i].epoch); Matrix_Translate(this->effects[i].base.x + this->effects[i].pos.x, this->effects[i].base.y + this->effects[i].pos.y, this->effects[i].base.z + this->effects[i].pos.z, MTXMODE_NEW); @@ -561,6 +571,7 @@ void ObjectKankyo_DrawFairies(ObjectKankyo* this2, GlobalContext* globalCtx2) { Matrix_RotateZ(DEG_TO_RAD(globalCtx->state.frames * 20.0f), MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_object_kankyo.c", 913), G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, gKokiriDustMoteDL); + FrameInterpolation_RecordCloseChild(); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_object_kankyo.c", 922); } diff --git a/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.h b/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.h index 9b9a69975..fc45e156e 100644 --- a/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.h +++ b/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.h @@ -24,6 +24,7 @@ typedef struct ObjectKankyoEffect { /* 0x4A */ u16 flightRadius; /* 0x4C */ f32 amplitude; /* 0x50 */ u16 timer; + u32 epoch; } ObjectKankyoEffect; // size = 0x54 typedef struct ObjectKankyo { diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c index df6520ebf..4dbb1b20f 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c @@ -14,6 +14,8 @@ #include "vt.h" #include "SohHooks.h" +#include "soh/frame_interpolation.h" + static void* sEquipmentFRATexs[] = { gPauseEquipment00FRATex, gPauseEquipment01Tex, gPauseEquipment02Tex, gPauseEquipment03Tex, gPauseEquipment04Tex, gPauseEquipment10FRATex, gPauseEquipment11Tex, gPauseEquipment12Tex, gPauseEquipment13Tex, gPauseEquipment14Tex, @@ -1047,6 +1049,7 @@ void KaleidoScope_DrawPages(GlobalContext* globalCtx, GraphicsContext* gfxCtx) { s16 stepG; s16 stepB; + FrameInterpolation_RecordOpenChild(NULL, pauseCtx->state + pauseCtx->pageIndex * 100); OPEN_DISPS(gfxCtx, "../z_kaleido_scope_PAL.c", 1100); if ((pauseCtx->state < 8) || (pauseCtx->state > 0x11)) { @@ -1418,6 +1421,7 @@ void KaleidoScope_DrawPages(GlobalContext* globalCtx, GraphicsContext* gfxCtx) { } CLOSE_DISPS(gfxCtx, "../z_kaleido_scope_PAL.c", 1577); + FrameInterpolation_RecordCloseChild(); } void KaleidoScope_DrawInfoPanel(GlobalContext* globalCtx) { From 90f849dfcf58c32b001aa2c4691363bbad2d4dca Mon Sep 17 00:00:00 2001 From: sholdee <102821812+sholdee@users.noreply.github.com> Date: Fri, 13 May 2022 17:44:04 -0500 Subject: [PATCH 145/146] Add args to build release config on Linux (#312) --- BUILDING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index d37d7c0d6..546bb2905 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -41,9 +41,9 @@ cp /usr/local/lib/libGLEW.a external cd soh # Extract the assets/Compile the exporter/Run the exporter -make setup -j$(nproc) +make setup -j$(nproc) OPTFLAGS=-O0 DEBUG=0 # Compile the code -make -j $(nproc) +make -j $(nproc) OPTFLAGS=-O0 DEBUG=0 ``` # Compatible Roms From 2b0af54f88d34aa088c89afecac2be9ade576da7 Mon Sep 17 00:00:00 2001 From: MelonSpeedruns Date: Fri, 13 May 2022 18:44:58 -0400 Subject: [PATCH 146/146] Readme stuff (#313) * Fixed Gyroscopy Settings & Drift * readme stuff --- BUILDING.md | 17 ++++++++-- README.md | 78 ++++++++++++++++++++++++-------------------- soh/src/boot/build.c | 2 +- 3 files changed, 58 insertions(+), 39 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 546bb2905..3e4d7b21a 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -2,9 +2,9 @@ ## Windows - 1. Install [Python](https://www.python.org/ftp/python/3.10.2/python-3.10.2-amd64.exe) + 1. Install [Python](https://www.python.org/downloads/) >= 3.6. 2. Install [Visual Studio 2022 Community Edition](https://visualstudio.microsoft.com/vs/community/) - 2b. In the Visual Studio Installer, install `MSVC v142 - VS 2019 C++`. + 3. In the Visual Studio Installer, install `MSVC v142 - VS 2019 C++`. 4. Clone the Ship of Harkinian repository. 5. Place one or more [compatible](#compatible-roms) roms in the `OTRExporter` directory with namings of your choice. 6. Run `OTRExporter/OTRExporter.sln`. @@ -51,3 +51,16 @@ make -j $(nproc) OPTFLAGS=-O0 DEBUG=0 OOT_PAL_GC checksum 0x09465AC3 OOT_PAL_GC_DBG1 checksum 0x871E1C92 (debug non-master quest) ``` + +# OTRExporter Usage + +The OTRExporter exports an `oot.otr` archive file which Ship of Harkinian requires to play. + +Use the `extract_assets.py` script file to run the exporter using any of the following methods: + +1. Double click on the script after placing one or more roms in the directory. +2. Drag & Drop a rom onto the script. +3. In a terminal run `python3 extract_assets.py` after placing one or more roms in the directory. +4. In a terminal run `python3 extract_assets.py ` + +If the script finds multiple roms the user is prompted which to use. Selection is done using the number keys and then pressing the carriage return key. \ No newline at end of file diff --git a/README.md b/README.md index 3ce3fb21b..8a4538e2a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ The Ship does not include assets and as such requires a prior copy of the game t ## Quick Start -1) Download The Ship of Harkinian from Discord. +1) Download The Ship of Harkinian from [Discord](https://discord.com/invite/BtBmd55HVH). 2) Requires a supported copy of the game (See supported games below). 3) Use the OTRGui to generate an `oot.otr` archive file. 4) Launch `soh.exe` @@ -18,9 +18,9 @@ Build team: `zelda@srd022j` Build date: `03-02-21 00:49:18` (year-month-day) sha1: cee6bc3c2a634b41728f2af8da54d9bf8cc14099 ``` -Ocarina of Time Pal Gamecube +Ocarina of Time PAL GameCube ``` -sha1: d0c95b2cb3c6682a171db267932af7af8cf5fa82 +sha1: 0227d7c0074f2d0ac935631990da8ec5914597b4 ``` Congratulations, you are now sailing with the Ship of Harkinian! Have fun! @@ -67,39 +67,45 @@ Refer to the [building instructions](BUILDING.md) to compile SoH. ## The Harbour Masters Are... - Kenix | Lead Developer/Public Relations - Resource Management Programmer, Audio System Programmer, and General Programmer - Jack Walker | Lead Developer - OTR Format Programmer, Resource Load Programmer, and General Programmer - Louist103 | Developer - Save System Programmer and General Programmer - Emil | Developer - Fast3D Programmer - m4xw | Developer - Shipwright, Throwing Baguettes, and General Programmer - MelonSpeedruns | Developer - General Programmer - Rozlette | Developer - General Programmer - JoshDuMan | Developer - General Programmer - KiritoDev/Lywx | Developer - General Programmer - Theo3 | Developer - General Programmer - Random06457 | Developer - Linux Build + Kenix | Lead Developer/Public Relations - Resource Management Programmer, Audio System Programmer, and General Programmer + Jack Walker | Lead Developer - OTR Format Programmer, Resource Load Programmer, and General Programmer + Louist103 | Developer - Save System Programmer and General Programmer + Emil | Developer - Fast3D Programmer + m4xw | Developer - Shipwright, Throwing Baguettes, and General Programmer + MelonSpeedruns | Developer - General Programmer + Rozlette | Developer - General Programmer + JoshDuMan | Developer - General Programmer + KiritoDev/Lywx | Developer - General Programmer + Theo3 | Developer - General Programmer + Random06457 | Developer - Linux Build ## Special Thanks - Decomp & ZAPD | Made this project even possible in the first place! - MNGoldenEagle | Patiently explained audio data formats, encouragement, and founding ZSO which was the first source of the game's code and resource format documentation. - Rrrrry123 | Speedbunner, encouragement, and community moderation - Fierce deity | Encouragement and community moderation - mzxrules | For his contributions to decomp - zel. | For his contributions to decomp - Aloxado | Developer - General Programmer - MegaMech | Developer - General Programmer - Revo | Tester - GCC support and General Testing - zfg | Tester - General Testing - Horseless Headman | Tester - General Testing - Steven Pritchett | Tester - General Testing - Trenton May | Tester - General Testing - Zeldaboy14 | Tester - General Testing, encouragement, and community moderation - Koby Howell | Tester - General Testing - Logg | Tester - General Testing - Taylor Daley | Graphic Design - Can't Sleep | Graphic Design - MicTheMicrophone | Voice actor for the King - Amphibibro | Voice actor for Link - -Lemons + Decomp & ZAPD | Made this project even possible in the first place! + MNGoldenEagle | Patiently explained audio data formats, encouragement, and founding ZSO which was the first source of the game's code and resource format documentation. + Rrrrry123 | Speedbunner, encouragement, and community moderation + Fierce deity | Encouragement and community moderation + mzxrules | For his contributions to decomp + zel. | For his contributions to decomp + Aloxado | Developer - General Programmer + MegaMech | Developer - General Programmer + Revo | Tester - GCC support and General Testing + zfg | Tester - General Testing + Horseless Headman | Tester - General Testing + Steven Pritchett | Tester - General Testing + Trenton May | Tester - General Testing + Zeldaboy14 | Tester - General Testing, encouragement, and community moderation + Koby Howell | Tester - General Testing + Logg | Tester - General Testing + Taylor Daley | Graphic Design + Can't Sleep | Graphic Design + +## Video Credits + Kenix | Producer / Writer + rainbow_fash | Executive Producer + TheLegendOfXela | Editor + MicTheMicrophone | Gwonam / The King + Amphibibro | Link + AceHeart | Zelda + +###### Lemons \ No newline at end of file diff --git a/soh/src/boot/build.c b/soh/src/boot/build.c index f60380467..94d142020 100644 --- a/soh/src/boot/build.c +++ b/soh/src/boot/build.c @@ -1,4 +1,4 @@ -const char gBuildVersion[] = "DECKARD ALFA (1.0.0)"; +const char gBuildVersion[] = "ROY ALFA (2.0.0)"; const char gBuildTeam[] = "github.com/harbourmasters"; const char gBuildDate[] = __DATE__ " " __TIME__; const char gBuildMakeOption[] = "";