From 4f0ed2949e60d29543fd68e2a73f37651a00bb63 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Sat, 17 May 2025 10:55:21 -0400 Subject: [PATCH 1/2] fix seed gen underflow (#5499) --- soh/soh/Enhancements/randomizer/3drando/fill.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/3drando/fill.cpp b/soh/soh/Enhancements/randomizer/3drando/fill.cpp index 49bfc4012..f0954231b 100644 --- a/soh/soh/Enhancements/randomizer/3drando/fill.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/fill.cpp @@ -712,11 +712,11 @@ static void PareDownPlaythrough() { auto ctx = Rando::Context::GetInstance(); std::vector toAddBackItem; // Start at sphere before Ganon's and count down - for (size_t i = ctx->playthroughLocations.size() - 2; i >= 0; i--) { + for (int32_t i = static_cast(ctx->playthroughLocations.size()) - 2; i >= 0; i--) { // Check each item location in sphere std::vector erasableIndices; std::vector sphere = ctx->playthroughLocations.at(i); - for (size_t j = sphere.size() - 1; j >= 0; j--) { + for (int32_t j = static_cast(sphere.size()) - 1; j >= 0; j--) { RandomizerCheck loc = sphere.at(j); RandomizerGet locGet = ctx->GetItemLocation(loc)->GetPlacedRandomizerGet(); // Copy out item From b418db77924dc36055a509629fc7e3f2adfd558a Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Sat, 17 May 2025 15:35:51 -0400 Subject: [PATCH 2/2] bump lus (#5500) --- CMake/lus-cvars.cmake | 2 -- libultraship | 2 +- soh/soh/OTRGlobals.cpp | 10 ++++++---- soh/soh/SohGui/Menu.h | 2 +- soh/soh/SohGui/SohGui.cpp | 2 +- soh/soh/SohGui/SohMenu.h | 8 ++++---- soh/soh/SohGui/SohMenuBar.cpp | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CMake/lus-cvars.cmake b/CMake/lus-cvars.cmake index f6a036479..c64782e75 100644 --- a/CMake/lus-cvars.cmake +++ b/CMake/lus-cvars.cmake @@ -1,7 +1,5 @@ set(CVAR_VSYNC_ENABLED "${CVAR_PREFIX_SETTING}.VsyncEnabled" CACHE STRING "") set(CVAR_Z_FIGHTING_MODE "${CVAR_PREFIX_SETTING}.ZFightingMode" CACHE STRING "") -set(CVAR_NEW_FILE_DROPPED "${CVAR_PREFIX_GENERAL}.NewFileDropped" CACHE STRING "") -set(CVAR_DROPPED_FILE "${CVAR_PREFIX_GENERAL}.DroppedFile" CACHE STRING "") set(CVAR_INTERNAL_RESOLUTION "${CVAR_PREFIX_SETTING}.InternalResolution" CACHE STRING "") set(CVAR_MSAA_VALUE "${CVAR_PREFIX_SETTING}.MSAAValue" CACHE STRING "") set(CVAR_SDL_WINDOWED_FULLSCREEN "${CVAR_PREFIX_SETTING}.SdlWindowedFullscreen" CACHE STRING "") diff --git a/libultraship b/libultraship index ce38cb688..7135d1494 160000 --- a/libultraship +++ b/libultraship @@ -1 +1 @@ -Subproject commit ce38cb6883ca030e61749eae584b6d9a7cb7bca5 +Subproject commit 7135d1494e74c38aa7fca734b92ec50bba543b44 diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 935c388d4..bcd23c260 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -40,6 +40,7 @@ #include "z64.h" #include "macros.h" #include "Fonts.h" +#include "window/FileDropMgr.h" #include "window/gui/resource/Font.h" #include #include "Enhancements/custom-message/CustomMessageManager.h" @@ -307,6 +308,7 @@ OTRGlobals::OTRGlobals() { context->InitGfxDebugger(); context->InitConfiguration(); context->InitConsoleVariables(); + context->InitFileDropMgr(); // tell LUS to reserve 3 SoH specific threads (Game, Audio, Save) context->InitResourceManager(OTRFiles, {}, 3); @@ -1434,13 +1436,13 @@ extern "C" void Graph_StartFrame() { } #endif - if (CVarGetInteger(CVAR_NEW_FILE_DROPPED, 0)) { - std::string filePath = SohUtils::Sanitize(CVarGetString(CVAR_DROPPED_FILE, "")); + auto dropMgr = Ship::Context::GetInstance()->GetFileDropMgr(); + if (dropMgr->FileDropped()) { + std::string filePath = dropMgr->GetDroppedFile(); if (!filePath.empty()) { GameInteractor::Instance->ExecuteHooks(filePath); } - CVarClear(CVAR_NEW_FILE_DROPPED); - CVarClear(CVAR_DROPPED_FILE); + dropMgr->ClearDroppedFile(); } } diff --git a/soh/soh/SohGui/Menu.h b/soh/soh/SohGui/Menu.h index 139f90030..a7facffd1 100644 --- a/soh/soh/SohGui/Menu.h +++ b/soh/soh/SohGui/Menu.h @@ -2,7 +2,7 @@ #define MENU_H #include -#include "graphic/Fast3D/gfx_rendering_api.h" +#include "graphic/Fast3D/backends/gfx_rendering_api.h" #include "MenuTypes.h" namespace Ship { diff --git a/soh/soh/SohGui/SohGui.cpp b/soh/soh/SohGui/SohGui.cpp index f4088b6a5..e9b27eda1 100644 --- a/soh/soh/SohGui/SohGui.cpp +++ b/soh/soh/SohGui/SohGui.cpp @@ -13,7 +13,7 @@ #include #ifdef __APPLE__ -#include "graphic/Fast3D/gfx_metal.h" +#include "graphic/Fast3D/backends/gfx_metal.h" #endif #ifdef __SWITCH__ diff --git a/soh/soh/SohGui/SohMenu.h b/soh/soh/SohGui/SohMenu.h index eb3b1f4f7..362cc4721 100644 --- a/soh/soh/SohGui/SohMenu.h +++ b/soh/soh/SohGui/SohMenu.h @@ -4,7 +4,7 @@ #include #include "UIWidgets.hpp" #include "Menu.h" -#include "graphic/Fast3D/gfx_rendering_api.h" +#include "graphic/Fast3D/backends/gfx_rendering_api.h" #include "soh/cvar_prefixes.h" #include "soh/Enhancements/enhancementTypes.h" #include "soh/Enhancements/Presets/Presets.h" @@ -53,9 +53,9 @@ static const std::unordered_map menuThemeOptions = { }; static const std::unordered_map textureFilteringMap = { - { FILTER_THREE_POINT, "Three-Point" }, - { FILTER_LINEAR, "Linear" }, - { FILTER_NONE, "None" }, + { Fast::FILTER_THREE_POINT, "Three-Point" }, + { Fast::FILTER_LINEAR, "Linear" }, + { Fast::FILTER_NONE, "None" }, }; static const std::unordered_map logLevels = { diff --git a/soh/soh/SohGui/SohMenuBar.cpp b/soh/soh/SohGui/SohMenuBar.cpp index aa747c168..418d02eb5 100644 --- a/soh/soh/SohGui/SohMenuBar.cpp +++ b/soh/soh/SohGui/SohMenuBar.cpp @@ -5,7 +5,7 @@ #include #include "UIWidgets.hpp" #include "include/z64audio.h" -#include "graphic/Fast3D/gfx_rendering_api.h" +#include "graphic/Fast3D/backends/gfx_rendering_api.h" #include "soh/OTRGlobals.h" #include "soh/SaveManager.h" #include "z64.h"