diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 6c67a87fa..48958193e 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -41,8 +41,10 @@ IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPAR #endif // #include "../../soh/include/randomizer/main.cpp" -#include "../../soh/include/randomizer/menu.hpp" -#include "../../soh/soh/OTRGlobals.h" +// #include "../../soh/include/randomizer/main.hpp" +#include "../../soh/include/randomizer/rando_main.hpp" +#include "../../soh/include/randomizer/spoiler_log.hpp" +// #include "../../soh/soh/OTRGlobals.h" using namespace Ship; bool oldCursorState = true; @@ -1034,9 +1036,9 @@ namespace SohImGui { EnhancementCheckbox("Enable Randomizer", "gRandomizer"); if (ImGui::Button("Generate Seed") && CVar_GetS32("gRandomizer", 0) != 0) { - GenerateRandomizer(); - gSpoilerData = GetSpoilerData(); - ParseItemLocations(gSpoilerData); + RandoMain::GenerateRando(); + // gSpoilerData = GetSpoilerData(); + // ParseItemLocations(gSpoilerData); } ImGui::EndMenu(); diff --git a/soh/include/randomizer/rando_main.cpp b/soh/include/randomizer/rando_main.cpp new file mode 100644 index 000000000..0f599c85b --- /dev/null +++ b/soh/include/randomizer/rando_main.cpp @@ -0,0 +1,16 @@ +#include "menu.hpp" +#include "hint_list.hpp" +#include "item_list.hpp" +#include "item_location.hpp" +#include "location_access.hpp" +#include "rando_main.hpp" + +#define TICKS_PER_SEC 268123480.0 + +int RandoMain::GenerateRando() { + HintTable_Init(); + ItemTable_Init(); + LocationTable_Init(); + GenerateRandomizer(); + return 0; +} \ No newline at end of file diff --git a/soh/include/randomizer/rando_main.hpp b/soh/include/randomizer/rando_main.hpp new file mode 100644 index 000000000..13c77838c --- /dev/null +++ b/soh/include/randomizer/rando_main.hpp @@ -0,0 +1,5 @@ +#pragma once + +namespace RandoMain { + int GenerateRando(); +}