diff --git a/src/port/Engine.cpp b/src/port/Engine.cpp index 2e65f5cf4..09658b207 100644 --- a/src/port/Engine.cpp +++ b/src/port/Engine.cpp @@ -1,6 +1,7 @@ #include "Engine.h" + +#include "StringHelper.h" #include "ui/ImguiUI.h" -#include "ZAPDUtils/Utils/StringHelper.h" #include "libultraship/src/Context.h" #include "resource/type/ResourceType.h" #include "resource/importers/GenericArrayFactory.h" @@ -22,13 +23,13 @@ GameEngine* GameEngine::Instance; GameEngine::GameEngine() { std::vector OTRFiles; - if (const std::string cube_path = LUS::Context::GetPathRelativeToAppDirectory("mkcube.otr"); std::filesystem::exists(cube_path)) { + if (const std::string cube_path = Ship::Context::GetPathRelativeToAppDirectory("mkcube.otr"); std::filesystem::exists(cube_path)) { OTRFiles.push_back(cube_path); } - if (const std::string sm64_otr_path = LUS::Context::GetPathRelativeToAppBundle("sm64.otr"); std::filesystem::exists(sm64_otr_path)) { + if (const std::string sm64_otr_path = Ship::Context::GetPathRelativeToAppBundle("sm64.otr"); std::filesystem::exists(sm64_otr_path)) { OTRFiles.push_back(sm64_otr_path); } - if (const std::string patches_path = LUS::Context::GetPathRelativeToAppDirectory("mods"); !patches_path.empty() && std::filesystem::exists(patches_path)) { + if (const std::string patches_path = Ship::Context::GetPathRelativeToAppDirectory("mods"); !patches_path.empty() && std::filesystem::exists(patches_path)) { if (std::filesystem::is_directory(patches_path)) { for (const auto&p: std::filesystem::recursive_directory_iterator(patches_path)) { if (StringHelper::IEquals(p.path().extension().string(), ".otr")) { @@ -38,7 +39,7 @@ GameEngine::GameEngine() { } } - this->context = LUS::Context::CreateInstance("Spaghettify", "skart64", "spaghettify.cfg.json", OTRFiles, {}, 3); + this->context = Ship::Context::CreateInstance("Spaghettify", "skart64", "spaghettify.cfg.json", OTRFiles, {}, 3); auto loader = context->GetResourceManager()->GetResourceLoader(); loader->RegisterResourceFactory(std::make_shared(), RESOURCE_FORMAT_BINARY, "Vec3f", static_cast(SF64::ResourceType::Vec3f), 0); @@ -62,7 +63,7 @@ bool ShouldClearTextureCacheAtEndOfFrame = false; void GameEngine::StartFrame() const{ - using LUS::KbScancode; + using Ship::KbScancode; const int32_t dwScancode = this->context->GetWindow()->GetLastScancode(); this->context->GetWindow()->SetLastScancode(-1); @@ -99,7 +100,7 @@ void GameEngine::ProcessGfxCommands(Gfx* commands) { } extern "C" uint32_t GameEngine_GetSampleRate() { - auto player = LUS::Context::GetInstance()->GetAudio()->GetAudioPlayer(); + auto player = Ship::Context::GetInstance()->GetAudio()->GetAudioPlayer(); if (player == nullptr) { return 0; } diff --git a/src/port/Engine.h b/src/port/Engine.h index 79c29533a..8e7147107 100644 --- a/src/port/Engine.h +++ b/src/port/Engine.h @@ -18,7 +18,7 @@ class GameEngine { public: static GameEngine* Instance; - std::shared_ptr context; + std::shared_ptr context; GameEngine(); static void Create(); diff --git a/src/port/GBIMiddleware.cpp b/src/port/GBIMiddleware.cpp index 37b86004a..13bda57fd 100644 --- a/src/port/GBIMiddleware.cpp +++ b/src/port/GBIMiddleware.cpp @@ -10,12 +10,12 @@ extern "C" void gSPDisplayList(Gfx* pkt, Gfx* dl) { char* imgData = (char*)dl; if (GameEngine_OTRSigCheck(imgData) == 1) { - auto resource = LUS::Context::GetInstance()->GetResourceManager()->LoadResource(imgData); + auto resource = Ship::Context::GetInstance()->GetResourceManager()->LoadResource(imgData); auto res = std::static_pointer_cast(resource); dl = &res->Instructions[0]; - dl->words.trace.file = imgData; - dl->words.trace.idx = 0; - dl->words.trace.valid = true; + // dl->words.trace.file = imgData; + // dl->words.trace.idx = 0; + // dl->words.trace.valid = true; } __gSPDisplayList(pkt, dl); @@ -34,7 +34,7 @@ extern "C" void gSPInvalidateTexCache(Gfx* pkt, uintptr_t texAddr) { auto data = reinterpret_cast(texAddr); if (texAddr != 0 && GameEngine_OTRSigCheck(data)) { - const auto res = LUS::Context::GetInstance()->GetResourceManager()->LoadResource(data); + const auto res = Ship::Context::GetInstance()->GetResourceManager()->LoadResource(data); const auto type = static_cast(res->GetInitData()->Type); switch(type) { @@ -51,4 +51,4 @@ extern "C" void gSPInvalidateTexCache(Gfx* pkt, uintptr_t texAddr) { } __gSPInvalidateTexCache(pkt, texAddr); -} +} \ No newline at end of file diff --git a/src/port/resource/importers/GenericArrayFactory.cpp b/src/port/resource/importers/GenericArrayFactory.cpp index 64608f442..27abc55f8 100644 --- a/src/port/resource/importers/GenericArrayFactory.cpp +++ b/src/port/resource/importers/GenericArrayFactory.cpp @@ -3,13 +3,13 @@ #include "spdlog/spdlog.h" namespace SF64 { -std::shared_ptr ResourceFactoryBinaryGenericArrayV0::ReadResource(std::shared_ptr file) { +std::shared_ptr ResourceFactoryBinaryGenericArrayV0::ReadResource(std::shared_ptr file) { if (!FileHasValidFormatAndReader(file)) { return nullptr; } auto arr = std::make_shared(file->InitData); - auto reader = std::get>(file->Reader); + auto reader = std::get>(file->Reader); auto type = reader->ReadUInt32(); diff --git a/src/port/resource/importers/GenericArrayFactory.h b/src/port/resource/importers/GenericArrayFactory.h index ce0d2262a..78f9087f1 100644 --- a/src/port/resource/importers/GenericArrayFactory.h +++ b/src/port/resource/importers/GenericArrayFactory.h @@ -4,8 +4,8 @@ #include "ResourceFactoryBinary.h" namespace SF64 { -class ResourceFactoryBinaryGenericArrayV0 : public LUS::ResourceFactoryBinary { +class ResourceFactoryBinaryGenericArrayV0 : public Ship::ResourceFactoryBinary { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file) override; }; }; // namespace LUS diff --git a/src/port/resource/importers/ResourceUtil.h b/src/port/resource/importers/ResourceUtil.h index 4872ad649..e85f6eefb 100644 --- a/src/port/resource/importers/ResourceUtil.h +++ b/src/port/resource/importers/ResourceUtil.h @@ -9,7 +9,7 @@ template T LoadChild(uint64_t crc) { if (path == nullptr) { return nullptr; } - auto asset = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(path); + auto asset = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(path); return asset ? static_cast(asset->GetRawPointer()) : nullptr; } } \ No newline at end of file diff --git a/src/port/resource/importers/Vec3fFactory.cpp b/src/port/resource/importers/Vec3fFactory.cpp index e93b4f3d5..6781c5b7f 100644 --- a/src/port/resource/importers/Vec3fFactory.cpp +++ b/src/port/resource/importers/Vec3fFactory.cpp @@ -3,13 +3,13 @@ #include "spdlog/spdlog.h" namespace SF64 { -std::shared_ptr ResourceFactoryBinaryVec3fV0::ReadResource(std::shared_ptr file) { +std::shared_ptr ResourceFactoryBinaryVec3fV0::ReadResource(std::shared_ptr file) { if (!FileHasValidFormatAndReader(file)) { return nullptr; } auto vec = std::make_shared(file->InitData); - auto reader = std::get>(file->Reader); + auto reader = std::get>(file->Reader); auto vecCount = reader->ReadUInt32(); diff --git a/src/port/resource/importers/Vec3fFactory.h b/src/port/resource/importers/Vec3fFactory.h index ee7ac7e0c..bb9da1add 100644 --- a/src/port/resource/importers/Vec3fFactory.h +++ b/src/port/resource/importers/Vec3fFactory.h @@ -4,8 +4,8 @@ #include "ResourceFactoryBinary.h" namespace SF64 { -class ResourceFactoryBinaryVec3fV0 : public LUS::ResourceFactoryBinary { +class ResourceFactoryBinaryVec3fV0 : public Ship::ResourceFactoryBinary { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file) override; }; }; // namespace LUS diff --git a/src/port/resource/importers/Vec3sFactory.cpp b/src/port/resource/importers/Vec3sFactory.cpp index 549a1d20f..810dc95df 100644 --- a/src/port/resource/importers/Vec3sFactory.cpp +++ b/src/port/resource/importers/Vec3sFactory.cpp @@ -3,13 +3,13 @@ #include "spdlog/spdlog.h" namespace SF64 { -std::shared_ptr ResourceFactoryBinaryVec3sV0::ReadResource(std::shared_ptr file) { +std::shared_ptr ResourceFactoryBinaryVec3sV0::ReadResource(std::shared_ptr file) { if (!FileHasValidFormatAndReader(file)) { return nullptr; } auto vec = std::make_shared(file->InitData); - auto reader = std::get>(file->Reader); + auto reader = std::get>(file->Reader); auto vecCount = reader->ReadUInt32(); diff --git a/src/port/resource/importers/Vec3sFactory.h b/src/port/resource/importers/Vec3sFactory.h index eddcc1dc7..85162dda3 100644 --- a/src/port/resource/importers/Vec3sFactory.h +++ b/src/port/resource/importers/Vec3sFactory.h @@ -4,8 +4,8 @@ #include "ResourceFactoryBinary.h" namespace SF64 { -class ResourceFactoryBinaryVec3sV0 : public LUS::ResourceFactoryBinary { +class ResourceFactoryBinaryVec3sV0 : public Ship::ResourceFactoryBinary { public: - std::shared_ptr ReadResource(std::shared_ptr file) override; + std::shared_ptr ReadResource(std::shared_ptr file) override; }; }; // namespace LUS diff --git a/src/port/resource/type/Animation.h b/src/port/resource/type/Animation.h index 868aa5d2c..de08a14f4 100644 --- a/src/port/resource/type/Animation.h +++ b/src/port/resource/type/Animation.h @@ -21,11 +21,11 @@ struct AnimationData { /* 0x08 */ JointKey* jointKey; }; // size = 0xC -class Animation : public LUS::Resource { +class Animation : public Ship::Resource { public: using Resource::Resource; - Animation() : Resource(std::shared_ptr()) {} + Animation() : Resource(std::shared_ptr()) {} AnimationData* GetPointer(); size_t GetPointerSize(); diff --git a/src/port/resource/type/ColPoly.h b/src/port/resource/type/ColPoly.h index 49c6c5ba6..c64e18e30 100644 --- a/src/port/resource/type/ColPoly.h +++ b/src/port/resource/type/ColPoly.h @@ -19,11 +19,11 @@ struct ColPolyData { ColPolyData(Vec3s tri, int16_t unk_06, Vec3s norm, int16_t unk_0E, int32_t dist) : tri(std::move(tri)), unk_06(unk_06), norm(std::move(norm)), unk_0E(unk_0E), dist(dist) {} }; // size = 0x14 -class ColPoly : public LUS::Resource { +class ColPoly : public Ship::Resource { public: using Resource::Resource; - ColPoly() : Resource(std::shared_ptr()) {} + ColPoly() : Resource(std::shared_ptr()) {} ColPolyData* GetPointer(); size_t GetPointerSize(); diff --git a/src/port/resource/type/EnvSettings.h b/src/port/resource/type/EnvSettings.h index eba0e47ef..6f50e7955 100644 --- a/src/port/resource/type/EnvSettings.h +++ b/src/port/resource/type/EnvSettings.h @@ -26,11 +26,11 @@ struct EnvSettingsData { /* 0x40 */ int32_t ambB; }; -class EnvSettings : public LUS::Resource { +class EnvSettings : public Ship::Resource { public: using Resource::Resource; - EnvSettings() : Resource(std::shared_ptr()) {} + EnvSettings() : Resource(std::shared_ptr()) {} EnvSettingsData* GetPointer(); size_t GetPointerSize(); diff --git a/src/port/resource/type/GenericArray.h b/src/port/resource/type/GenericArray.h index 576c60150..7043faf54 100644 --- a/src/port/resource/type/GenericArray.h +++ b/src/port/resource/type/GenericArray.h @@ -40,11 +40,11 @@ enum class ArrayType { u8, s8, u16, s16, u32, s32, u64, f32, f64, Vec2f, Vec3f, Vec3s, Vec3i, Vec4f, Vec4s, }; -class GenericArray : public LUS::Resource { +class GenericArray : public Ship::Resource { public: using Resource::Resource; - GenericArray() : Resource(std::shared_ptr()) {} + GenericArray() : Resource(std::shared_ptr()) {} uint8_t* GetPointer(); size_t GetPointerSize(); diff --git a/src/port/resource/type/Hitbox.h b/src/port/resource/type/Hitbox.h index 832eedf15..c3ab987d7 100644 --- a/src/port/resource/type/Hitbox.h +++ b/src/port/resource/type/Hitbox.h @@ -4,7 +4,7 @@ #include namespace SF64 { -class Hitbox : public LUS::Resource { +class Hitbox : public Ship::Resource { public: using Resource::Resource; diff --git a/src/port/resource/type/Limb.h b/src/port/resource/type/Limb.h index eb12e2e32..2a485834b 100644 --- a/src/port/resource/type/Limb.h +++ b/src/port/resource/type/Limb.h @@ -23,11 +23,11 @@ struct LimbData { /* 0x01C */ LimbData* child; }; // size = 0x20 -class Limb : public LUS::Resource { +class Limb : public Ship::Resource { public: using Resource::Resource; - Limb() : Resource(std::shared_ptr()) {} + Limb() : Resource(std::shared_ptr()) {} LimbData* GetPointer(); size_t GetPointerSize(); diff --git a/src/port/resource/type/Message.h b/src/port/resource/type/Message.h index ac0748627..71b48c69f 100644 --- a/src/port/resource/type/Message.h +++ b/src/port/resource/type/Message.h @@ -10,7 +10,7 @@ typedef struct { u16* msgPtr; } MsgLookup; -class Message : public LUS::Resource { +class Message : public Ship::Resource { public: using Resource::Resource; @@ -20,7 +20,7 @@ class Message : public LUS::Resource { std::vector mMessage; }; -class MessageLookup : public LUS::Resource { +class MessageLookup : public Ship::Resource { public: using Resource::Resource; diff --git a/src/port/resource/type/ObjectInit.h b/src/port/resource/type/ObjectInit.h index 56f755665..e6da7023d 100644 --- a/src/port/resource/type/ObjectInit.h +++ b/src/port/resource/type/ObjectInit.h @@ -16,11 +16,11 @@ struct ObjectInitData { /* 0x10 */ int16_t id; }; // size = 0x14 -class ObjectInit : public LUS::Resource { +class ObjectInit : public Ship::Resource { public: using Resource::Resource; - ObjectInit() : Resource(std::shared_ptr()) {} + ObjectInit() : Resource(std::shared_ptr()) {} ObjectInitData* GetPointer(); size_t GetPointerSize(); diff --git a/src/port/resource/type/Script.h b/src/port/resource/type/Script.h index 55d0b348d..b04cbea16 100644 --- a/src/port/resource/type/Script.h +++ b/src/port/resource/type/Script.h @@ -4,7 +4,7 @@ #include namespace SF64 { -class Script : public LUS::Resource { +class Script : public Ship::Resource { public: using Resource::Resource; @@ -14,7 +14,7 @@ class Script : public LUS::Resource { std::vector mScripts; }; -class ScriptCMDs : public LUS::Resource { +class ScriptCMDs : public Ship::Resource { public: using Resource::Resource; diff --git a/src/port/resource/type/Skeleton.h b/src/port/resource/type/Skeleton.h index 3332abf77..51b521bfd 100644 --- a/src/port/resource/type/Skeleton.h +++ b/src/port/resource/type/Skeleton.h @@ -5,11 +5,11 @@ #include namespace SF64 { -class Skeleton : public LUS::Resource { +class Skeleton : public Ship::Resource { public: using Resource::Resource; - Skeleton() : Resource(std::shared_ptr()) {} + Skeleton() : Resource(std::shared_ptr()) {} LimbData** GetPointer(); size_t GetPointerSize(); diff --git a/src/port/resource/type/Vec3fArray.h b/src/port/resource/type/Vec3fArray.h index 9a6cb0bdf..1fc3d3543 100644 --- a/src/port/resource/type/Vec3fArray.h +++ b/src/port/resource/type/Vec3fArray.h @@ -11,11 +11,11 @@ struct Vec3fData { Vec3fData(float x, float y, float z) : x(x), y(y), z(z) {} }; -class Vec3fArray : public LUS::Resource { +class Vec3fArray : public Ship::Resource { public: using Resource::Resource; - Vec3fArray() : Resource(std::shared_ptr()) {} + Vec3fArray() : Resource(std::shared_ptr()) {} Vec3fData* GetPointer(); size_t GetPointerSize(); diff --git a/src/port/resource/type/Vec3sArray.h b/src/port/resource/type/Vec3sArray.h index 5e8f466b9..8ee88f197 100644 --- a/src/port/resource/type/Vec3sArray.h +++ b/src/port/resource/type/Vec3sArray.h @@ -11,11 +11,11 @@ struct Vec3sData { Vec3sData(int16_t x, int16_t y, int16_t z) : x(x), y(y), z(z) {} }; -class Vec3sArray : public LUS::Resource { +class Vec3sArray : public Ship::Resource { public: using Resource::Resource; - Vec3sArray() : Resource(std::shared_ptr()) {} + Vec3sArray() : Resource(std::shared_ptr()) {} Vec3sData* GetPointer(); size_t GetPointerSize(); diff --git a/src/port/ui/ImguiUI.cpp b/src/port/ui/ImguiUI.cpp index 83e91ed6b..1aa95adea 100644 --- a/src/port/ui/ImguiUI.cpp +++ b/src/port/ui/ImguiUI.cpp @@ -3,11 +3,11 @@ #include "ResolutionEditor.h" #include -#include +#include #define IMGUI_DEFINE_MATH_OPERATORS #include "libultraship/src/Context.h" -#include +#include #include #include #include "port/Engine.h" @@ -18,14 +18,14 @@ extern "C" { namespace GameUI { std::shared_ptr mGameMenuBar; -std::shared_ptr mConsoleWindow; -std::shared_ptr mStatsWindow; -std::shared_ptr mInputEditorWindow; -std::shared_ptr mGfxDebuggerWindow; +std::shared_ptr mConsoleWindow; +std::shared_ptr mStatsWindow; +std::shared_ptr mInputEditorWindow; +std::shared_ptr mGfxDebuggerWindow; std::shared_ptr mAdvancedResolutionSettingsWindow; void SetupGuiElements() { - auto gui = LUS::Context::GetInstance()->GetWindow()->GetGui(); + auto gui = Ship::Context::GetInstance()->GetWindow()->GetGui(); auto& style = ImGui::GetStyle(); style.FramePadding = ImVec2(4.0f, 6.0f); @@ -112,28 +112,28 @@ void DrawSettingsMenu(){ // audio_set_player_volume(SEQ_PLAYER_ENV, CVarGetFloat("gEnvironmentVolume", 1.0f)); // } // - // static std::unordered_map audioBackendNames = { - // { LUS::AudioBackend::WASAPI, "Windows Audio Session API" }, - // { LUS::AudioBackend::PULSE, "PulseAudio" }, - // { LUS::AudioBackend::SDL, "SDL" }, + // static std::unordered_map audioBackendNames = { + // { Ship::AudioBackend::WASAPI, "Windows Audio Session API" }, + // { Ship::AudioBackend::PULSE, "PulseAudio" }, + // { Ship::AudioBackend::SDL, "SDL" }, // }; // // ImGui::Text("Audio API (Needs reload)"); - // auto currentAudioBackend = LUS::Context::GetInstance()->GetAudio()->GetAudioBackend(); + // auto currentAudioBackend = Ship::Context::GetInstance()->GetAudio()->GetAudioBackend(); // - // if (LUS::Context::GetInstance()->GetAudio()->GetAvailableAudioBackends()->size() <= 1) { + // if (Ship::Context::GetInstance()->GetAudio()->GetAvailableAudioBackends()->size() <= 1) { // UIWidgets::DisableComponent(ImGui::GetStyle().Alpha * 0.5f); // } // if (ImGui::BeginCombo("##AApi", audioBackendNames[currentAudioBackend])) { - // for (uint8_t i = 0; i < LUS::Context::GetInstance()->GetAudio()->GetAvailableAudioBackends()->size(); i++) { - // auto backend = LUS::Context::GetInstance()->GetAudio()->GetAvailableAudioBackends()->data()[i]; + // for (uint8_t i = 0; i < Ship::Context::GetInstance()->GetAudio()->GetAvailableAudioBackends()->size(); i++) { + // auto backend = Ship::Context::GetInstance()->GetAudio()->GetAvailableAudioBackends()->data()[i]; // if (ImGui::Selectable(audioBackendNames[backend], backend == currentAudioBackend)) { - // LUS::Context::GetInstance()->GetAudio()->SetAudioBackend(backend); + // Ship::Context::GetInstance()->GetAudio()->SetAudioBackend(backend); // } // } // ImGui::EndCombo(); // } - // if (LUS::Context::GetInstance()->GetAudio()->GetAvailableAudioBackends()->size() <= 1) { + // if (Ship::Context::GetInstance()->GetAudio()->GetAvailableAudioBackends()->size() <= 1) { // UIWidgets::ReEnableComponent(""); // } // @@ -175,23 +175,23 @@ void DrawSettingsMenu(){ UIWidgets::Spacer(0); // Previously was running every frame, and nothing was setting it? Maybe a bad copy/paste? - // LUS::Context::GetInstance()->GetWindow()->SetResolutionMultiplier(CVarGetFloat("gInternalResolution", 1)); + // Ship::Context::GetInstance()->GetWindow()->SetResolutionMultiplier(CVarGetFloat("gInternalResolution", 1)); // UIWidgets::Tooltip("Multiplies your output resolution by the value inputted, as a more intensive but effective form of anti-aliasing"); #ifndef __WIIU__ if (UIWidgets::CVarSliderInt("MSAA: %d", "gMSAAValue", 1, 8, 1, { .tooltip = "Activates multi-sample anti-aliasing when above 1x up to 8x for 8 samples for every pixel" })) { - LUS::Context::GetInstance()->GetWindow()->SetMsaaLevel(CVarGetInteger("gMSAAValue", 1)); + Ship::Context::GetInstance()->GetWindow()->SetMsaaLevel(CVarGetInteger("gMSAAValue", 1)); } #endif { // FPS Slider const int minFps = 30; static int maxFps; - if (LUS::Context::GetInstance()->GetWindow()->GetWindowBackend() == LUS::WindowBackend::DX11) { + if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::DX11) { maxFps = 360; } else { - maxFps = LUS::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(); + maxFps = Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(); } int currentFps = 0; #ifdef __WIIU__ @@ -253,15 +253,15 @@ void DrawSettingsMenu(){ currentFps = 60; } CVarSetInteger("gInterpolationFPS", currentFps); - LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); #else bool matchingRefreshRate = - CVarGetInteger("gMatchRefreshRate", 0) && LUS::Context::GetInstance()->GetWindow()->GetWindowBackend() != LUS::WindowBackend::DX11; + CVarGetInteger("gMatchRefreshRate", 0) && Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() != Ship::WindowBackend::DX11; UIWidgets::CVarSliderInt((currentFps == 20) ? "FPS: Original (20)" : "FPS: %d", "gInterpolationFPS", minFps, maxFps, 1, { .disabled = matchingRefreshRate }); #endif - if (LUS::Context::GetInstance()->GetWindow()->GetWindowBackend() == LUS::WindowBackend::DX11) { + if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::DX11) { UIWidgets::Tooltip( "Uses Matrix Interpolation to create extra frames, resulting in smoother graphics. This is purely " "visual and does not impact game logic, execution of glitches etc.\n\n" @@ -275,13 +275,13 @@ void DrawSettingsMenu(){ } } // END FPS Slider - if (LUS::Context::GetInstance()->GetWindow()->GetWindowBackend() == LUS::WindowBackend::DX11) { + if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::DX11) { UIWidgets::Spacer(0); if (ImGui::Button("Match Refresh Rate")) { - int hz = LUS::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(); + int hz = Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(); if (hz >= 30 && hz <= 360) { CVarSetInteger("gInterpolationFPS", hz); - LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); } } } else { @@ -290,7 +290,7 @@ void DrawSettingsMenu(){ UIWidgets::Tooltip("Matches interpolation value to the current game's window refresh rate"); - if (LUS::Context::GetInstance()->GetWindow()->GetWindowBackend() == LUS::WindowBackend::DX11) { + if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::DX11) { UIWidgets::PaddedEnhancementSliderInt(CVarGetInteger("gExtraLatencyThreshold", 80) == 0 ? "Jitter fix: Off" : "Jitter fix: >= %d FPS", "##ExtraLatencyThreshold", "gExtraLatencyThreshold", 0, 360, "", 80, true, true, false); UIWidgets::Tooltip("When Interpolation FPS setting is at least this threshold, add one frame of input lag (e.g. 16.6 ms for 60 FPS) in order to avoid jitter. This setting allows the CPU to work on one frame while GPU works on the previous frame.\nThis setting should be used when your computer is too slow to do CPU + GPU work in time."); @@ -299,51 +299,51 @@ void DrawSettingsMenu(){ UIWidgets::PaddedSeparator(true, true, 3.0f, 3.0f); - static std::unordered_map windowBackendNames = { - { LUS::WindowBackend::DX11, "DirectX" }, - { LUS::WindowBackend::SDL_OPENGL, "OpenGL"}, - { LUS::WindowBackend::SDL_METAL, "Metal" }, - { LUS::WindowBackend::GX2, "GX2"} + static std::unordered_map windowBackendNames = { + { Ship::WindowBackend::DX11, "DirectX" }, + { Ship::WindowBackend::SDL_OPENGL, "OpenGL"}, + { Ship::WindowBackend::SDL_METAL, "Metal" }, + { Ship::WindowBackend::GX2, "GX2"} }; ImGui::Text("Renderer API (Needs reload)"); - LUS::WindowBackend runningWindowBackend = LUS::Context::GetInstance()->GetWindow()->GetWindowBackend(); - LUS::WindowBackend configWindowBackend; - int configWindowBackendId = LUS::Context::GetInstance()->GetConfig()->GetInt("Window.Backend.Id", -1); - if (configWindowBackendId != -1 && configWindowBackendId < static_cast(LUS::WindowBackend::BACKEND_COUNT)) { - configWindowBackend = static_cast(configWindowBackendId); + Ship::WindowBackend runningWindowBackend = Ship::Context::GetInstance()->GetWindow()->GetWindowBackend(); + Ship::WindowBackend configWindowBackend; + int configWindowBackendId = Ship::Context::GetInstance()->GetConfig()->GetInt("Window.Backend.Id", -1); + if (configWindowBackendId != -1 && configWindowBackendId < static_cast(Ship::WindowBackend::BACKEND_COUNT)) { + configWindowBackend = static_cast(configWindowBackendId); } else { configWindowBackend = runningWindowBackend; } - if (LUS::Context::GetInstance()->GetWindow()->GetAvailableWindowBackends()->size() <= 1) { + if (Ship::Context::GetInstance()->GetWindow()->GetAvailableWindowBackends()->size() <= 1) { UIWidgets::DisableComponent(ImGui::GetStyle().Alpha * 0.5f); } if (ImGui::BeginCombo("##RApi", windowBackendNames[configWindowBackend])) { - for (size_t i = 0; i < LUS::Context::GetInstance()->GetWindow()->GetAvailableWindowBackends()->size(); i++) { - auto backend = LUS::Context::GetInstance()->GetWindow()->GetAvailableWindowBackends()->data()[i]; + for (size_t i = 0; i < Ship::Context::GetInstance()->GetWindow()->GetAvailableWindowBackends()->size(); i++) { + auto backend = Ship::Context::GetInstance()->GetWindow()->GetAvailableWindowBackends()->data()[i]; if (ImGui::Selectable(windowBackendNames[backend], backend == configWindowBackend)) { - LUS::Context::GetInstance()->GetConfig()->SetInt("Window.Backend.Id", static_cast(backend)); - LUS::Context::GetInstance()->GetConfig()->SetString("Window.Backend.Name", + Ship::Context::GetInstance()->GetConfig()->SetInt("Window.Backend.Id", static_cast(backend)); + Ship::Context::GetInstance()->GetConfig()->SetString("Window.Backend.Name", windowBackendNames[backend]); - LUS::Context::GetInstance()->GetConfig()->Save(); + Ship::Context::GetInstance()->GetConfig()->Save(); } } ImGui::EndCombo(); } - if (LUS::Context::GetInstance()->GetWindow()->GetAvailableWindowBackends()->size() <= 1) { + if (Ship::Context::GetInstance()->GetWindow()->GetAvailableWindowBackends()->size() <= 1) { UIWidgets::ReEnableComponent(""); } - if (LUS::Context::GetInstance()->GetWindow()->CanDisableVerticalSync()) { + if (Ship::Context::GetInstance()->GetWindow()->CanDisableVerticalSync()) { UIWidgets::PaddedEnhancementCheckbox("Enable Vsync", "gVsyncEnabled", true, false); } - if (LUS::Context::GetInstance()->GetWindow()->SupportsWindowedFullscreen()) { + if (Ship::Context::GetInstance()->GetWindow()->SupportsWindowedFullscreen()) { UIWidgets::PaddedEnhancementCheckbox("Windowed fullscreen", "gSdlWindowedFullscreen", true, false); } - if (LUS::Context::GetInstance()->GetWindow()->GetGui()->SupportsViewports()) { + if (Ship::Context::GetInstance()->GetWindow()->GetGui()->SupportsViewports()) { UIWidgets::PaddedEnhancementCheckbox("Allow multi-windows", "gEnableMultiViewports", true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true); UIWidgets::Tooltip("Allows windows to be able to be dragged off of the main game window. Requires a reload to take effect."); } @@ -355,7 +355,7 @@ void DrawSettingsMenu(){ UIWidgets::Spacer(0); - LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->DrawSettings(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->DrawSettings(); ImGui::EndMenu(); } @@ -364,11 +364,11 @@ void DrawSettingsMenu(){ void DrawMenuBarIcon() { static bool gameIconLoaded = false; if (!gameIconLoaded) { - // LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTexture("Game_Icon", "textures/icons/gIcon.png"); + // Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTexture("Game_Icon", "textures/icons/gIcon.png"); gameIconLoaded = false; } - if (LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName("Game_Icon")) { + if (Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName("Game_Icon")) { #ifdef __SWITCH__ ImVec2 iconSize = ImVec2(20.0f, 20.0f); float posScale = 1.0f; @@ -380,7 +380,7 @@ void DrawMenuBarIcon() { float posScale = 1.5f; #endif ImGui::SetCursorPos(ImVec2(5, 2.5f) * posScale); - ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName("Game_Icon"), iconSize); + ImGui::Image(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName("Game_Icon"), iconSize); ImGui::SameLine(); ImGui::SetCursorPos(ImVec2(25, 0) * posScale); } @@ -400,11 +400,11 @@ void DrawGameMenu() { #if !defined(__SWITCH__) && !defined(__WIIU__) if (UIWidgets::MenuItem("Toggle Fullscreen", "F9")) { - LUS::Context::GetInstance()->GetWindow()->ToggleFullscreen(); + Ship::Context::GetInstance()->GetWindow()->ToggleFullscreen(); } if (UIWidgets::MenuItem("Quit")) { - LUS::Context::GetInstance()->GetWindow()->Close(); + Ship::Context::GetInstance()->GetWindow()->Close(); } #endif ImGui::EndMenu(); diff --git a/src/port/ui/ImguiUI.h b/src/port/ui/ImguiUI.h index 2d233f4c5..e3fa9a668 100644 --- a/src/port/ui/ImguiUI.h +++ b/src/port/ui/ImguiUI.h @@ -6,9 +6,9 @@ namespace GameUI { void Destroy(); } -class GameMenuBar : public LUS::GuiMenuBar { +class GameMenuBar : public Ship::GuiMenuBar { public: - using LUS::GuiMenuBar::GuiMenuBar; + using Ship::GuiMenuBar::GuiMenuBar; protected: void DrawElement() override; void InitElement() override {}; diff --git a/src/port/ui/ResolutionEditor.cpp b/src/port/ui/ResolutionEditor.cpp index 01995a3c9..f28ae3923 100644 --- a/src/port/ui/ResolutionEditor.cpp +++ b/src/port/ui/ResolutionEditor.cpp @@ -2,7 +2,7 @@ #include "UIWidgets.h" #include "libultraship/src/Context.h" -#include +#include #include #include @@ -40,7 +40,7 @@ namespace AdvancedResolutionSettings { const int pixelCountPresets[] = { 480, 240, 480, 720, 960, 1200, 1440, 1080, 2160, 480 }; const int default_pixelCount = 0; // Default combo list option - const uint32_t minVerticalPixelCount = 240; // see: LUS::AdvancedResolution() + const uint32_t minVerticalPixelCount = 240; // see: Ship::AdvancedResolution() const uint32_t maxVerticalPixelCount = 4320; const unsigned short default_maxIntegerScaleFactor = 6; // Default size of Integer scale factor slider. @@ -104,7 +104,7 @@ namespace AdvancedResolutionSettings { (CVarGetInteger("gAdvancedResolution.VerticalResolutionToggle", 0) && CVarGetInteger("gAdvancedResolution.Enabled", 0)) || CVarGetInteger("gLowResMode", 0))) { - LUS::Context::GetInstance()->GetWindow()->SetResolutionMultiplier(CVarGetFloat("gInternalResolution", 1)); + Ship::Context::GetInstance()->GetWindow()->SetResolutionMultiplier(CVarGetFloat("gInternalResolution", 1)); } UIWidgets::Tooltip("Multiplies your output resolution by the value entered, as a more intensive but effective " "form of anti-aliasing"); // Description pulled from SohMenuBar.cpp diff --git a/src/port/ui/ResolutionEditor.h b/src/port/ui/ResolutionEditor.h index 38af56073..90b10f5b0 100644 --- a/src/port/ui/ResolutionEditor.h +++ b/src/port/ui/ResolutionEditor.h @@ -2,7 +2,7 @@ #include namespace AdvancedResolutionSettings { - class AdvancedResolutionSettingsWindow : public LUS::GuiWindow { + class AdvancedResolutionSettingsWindow : public Ship::GuiWindow { private: bool IsDroppingFrames(); @@ -10,7 +10,7 @@ namespace AdvancedResolutionSettings { bool IsBoolArrayTrue(bool*); public: - using LUS::GuiWindow::GuiWindow; + using Ship::GuiWindow::GuiWindow; void InitElement() override; void DrawElement() override; diff --git a/src/port/ui/UIWidgets.cpp b/src/port/ui/UIWidgets.cpp index 7aec506c6..255d84f26 100644 --- a/src/port/ui/UIWidgets.cpp +++ b/src/port/ui/UIWidgets.cpp @@ -9,8 +9,8 @@ #include "libultraship/src/Context.h" -#include -#include +#include +#include #include #include @@ -205,7 +205,7 @@ namespace UIWidgets { bool val = (bool)CVarGetInteger(cvarName, defaultValue); if (CustomCheckbox(text, &val, disabled, disabledGraphic)) { CVarSetInteger(cvarName, val); - LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); changed = true; } @@ -245,7 +245,7 @@ namespace UIWidgets { CVarSetInteger(cvarName, i); selected = i; changed = true; - LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); } } } @@ -258,7 +258,7 @@ namespace UIWidgets { if (disabledValue >= 0 && selected != disabledValue) { CVarSetInteger(cvarName, disabledValue); changed = true; - LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); } } @@ -347,7 +347,7 @@ namespace UIWidgets { if (changed) { CVarSetInteger(cvarName, val); - LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); } return changed; @@ -423,7 +423,7 @@ namespace UIWidgets { if (changed) { CVarSetFloat(cvarName, val); - LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); } return changed; @@ -470,7 +470,7 @@ namespace UIWidgets { int val = CVarGetInteger(cvarName, 0); if (ImGui::RadioButton(make_invisible.c_str(), id == val)) { CVarSetInteger(cvarName, id); - LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); ret = true; } ImGui::SameLine(); @@ -497,7 +497,7 @@ namespace UIWidgets { CVarSetColor(cvarName, colorsRGBA); CVarSetInteger(Cvar_RBM.c_str(), 0); //On click disable rainbow mode. - LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); changed = true; } Tooltip("Revert colors to the game's original colors (GameCube version)\nOverwrites previously chosen color"); @@ -673,7 +673,7 @@ namespace UIWidgets { return dirty; } - bool WindowButton(const char* label, const char* cvarName, std::shared_ptr windowPtr, const ButtonOptions& options) { + bool WindowButton(const char* label, const char* cvarName, std::shared_ptr windowPtr, const ButtonOptions& options) { ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0, 0)); std::string buttonText = label; bool dirty = false; @@ -763,7 +763,7 @@ namespace UIWidgets { bool value = (bool)CVarGetInteger(cvarName, options.defaultValue); if (Checkbox(label, &value, options)) { CVarSetInteger(cvarName, value); - LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); dirty = true; } return dirty; @@ -867,7 +867,7 @@ namespace UIWidgets { uint8_t value = (uint8_t)CVarGetInteger(cvarName, options.defaultIndex); if (Combobox(label, &value, comboArray, options)) { CVarSetInteger(cvarName, value); - LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); dirty = true; } return dirty; @@ -914,7 +914,7 @@ namespace UIWidgets { if (Button("-", { .color = options.color, .size = Sizes::Inline }) && *value > min) { *value -= options.step; if (*value < min) *value = min; - LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); dirty = true; } ImGui::SameLine(0, 3.0f); @@ -923,7 +923,7 @@ namespace UIWidgets { ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); } if (ImGui::SliderScalar(invisibleLabel, ImGuiDataType_S32, value, &min, &max, options.format, options.flags)) { - LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); dirty = true; } if (options.showButtons) { @@ -932,7 +932,7 @@ namespace UIWidgets { if (Button("+", { .color = options.color, .size = Sizes::Inline }) && *value < max) { *value += options.step; if (*value > max) *value = max; - LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); dirty = true; } } @@ -953,7 +953,7 @@ namespace UIWidgets { int32_t value = CVarGetInteger(cvarName, defaultValue); if (SliderInt(label, &value, min, max, options)) { CVarSetInteger(cvarName, value); - LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); dirty = true; } return dirty; @@ -985,7 +985,7 @@ namespace UIWidgets { if (Button("-", { .color = options.color, .size = Sizes::Inline }) && *value > min) { *value -= options.step; if (*value < min) *value = min; - LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); dirty = true; } ImGui::SameLine(0, 3.0f); @@ -995,7 +995,7 @@ namespace UIWidgets { } if (ImGui::SliderScalar(invisibleLabel, ImGuiDataType_Float, &valueToDisplay, &minToDisplay, &maxToDisplay, options.format, options.flags)) { *value = options.isPercentage ? valueToDisplay / 100.0f : valueToDisplay; - LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); dirty = true; } if (options.showButtons) { @@ -1004,7 +1004,7 @@ namespace UIWidgets { if (Button("+", { .color = options.color, .size = Sizes::Inline }) && *value < max) { *value += options.step; if (*value > max) *value = max; - LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); dirty = true; } } @@ -1025,7 +1025,7 @@ namespace UIWidgets { float value = CVarGetFloat(cvarName, defaultValue); if (SliderFloat(label, &value, min, max, options)) { CVarSetFloat(cvarName, value); - LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); dirty = true; } return dirty; diff --git a/src/port/ui/UIWidgets.h b/src/port/ui/UIWidgets.h index 63daa568f..ef860db27 100644 --- a/src/port/ui/UIWidgets.h +++ b/src/port/ui/UIWidgets.h @@ -3,9 +3,9 @@ #include #include #include -#include +#include #define IMGUI_DEFINE_MATH_OPERATORS -#include +#include #include namespace UIWidgets { @@ -25,7 +25,7 @@ namespace UIWidgets { } return 1; } - + }; // MARK: - Enums @@ -65,17 +65,17 @@ namespace UIWidgets { bool EnhancementCheckbox(const char* text, const char* cvarName, bool disabled = false, const char* disabledTooltipText = "", CheckboxGraphics disabledGraphic = CheckboxGraphics::Cross, bool defaultValue = false); bool PaddedEnhancementCheckbox(const char* text, const char* cvarName, bool padTop = true, bool padBottom = true, bool disabled = false, const char* disabledTooltipText = "", CheckboxGraphics disabledGraphic = CheckboxGraphics::Cross, bool defaultValue = false); - + bool EnhancementCombobox(const char* cvarName, std::span comboArray, uint8_t defaultIndex, bool disabled = false, const char* disabledTooltipText = "", uint8_t disabledValue = -1); bool LabeledRightAlignedEnhancementCombobox(const char* label, const char* cvarName, std::span comboArray, uint8_t defaultIndex, bool disabled = false, const char* disabledTooltipText = "", uint8_t disabledValue = -1); - + void PaddedText(const char* text, bool padTop = true, bool padBottom = true); - + bool EnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue = 0, bool PlusMinusButton = true, bool disabled = false, const char* disabledTooltipText = ""); bool PaddedEnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue = 0, bool PlusMinusButton = true, bool padTop = true, bool padBottom = true, bool disabled = false, const char* disabledTooltipText = ""); bool EnhancementSliderFloat(const char* text, const char* id, const char* cvarName, float min, float max, const char* format, float defaultValue, bool isPercentage, bool PlusMinusButton = true, bool disabled = false, const char* disabledTooltipText = ""); bool PaddedEnhancementSliderFloat(const char* text, const char* id, const char* cvarName, float min, float max, const char* format, float defaultValue, bool isPercentage, bool PlusMinusButton = true, bool padTop = true, bool padBottom = true, bool disabled = false, const char* disabledTooltipText = ""); - + bool EnhancementRadioButton(const char* text, const char* cvarName, int id); bool DrawResetColorButton(const char* cvarName, ImVec4* colors, ImVec4 defaultcolors, bool has_alpha); @@ -141,7 +141,7 @@ namespace UIWidgets { void PushStyleButton(const ImVec4& color = Colors::Gray); void PopStyleButton(); bool Button(const char* label, const ButtonOptions& options = {}); - bool WindowButton(const char* label, const char* cvarName, std::shared_ptr windowPtr, const ButtonOptions& options = {}); + bool WindowButton(const char* label, const char* cvarName, std::shared_ptr windowPtr, const ButtonOptions& options = {}); struct CheckboxOptions { const ImVec4 color = Colors::Indigo; diff --git a/src/racing/memory.c b/src/racing/memory.c index 4656628f9..331696907 100644 --- a/src/racing/memory.c +++ b/src/racing/memory.c @@ -80,7 +80,7 @@ void move_segment_table_to_dmem(void) { s32 i; for (i = 0; i < 16; i++) { - gSPSegment(gDisplayListHead++, i, gSegmentTable[i]); + __gSPSegment(gDisplayListHead++, i, gSegmentTable[i]); } }