From 2c4d4ea6f67ee6d6fe00095a3e3a729452f5add4 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Fri, 4 Apr 2025 02:00:17 -0600 Subject: [PATCH] Fix debug build --- CMakeLists.txt | 9 --------- CMakePresets.json | 4 ---- Runtime/CObjectList.cpp | 1 + Runtime/CStateManager.cpp | 2 +- Runtime/GuiSys/CGuiFrame.cpp | 1 + Runtime/Particle/CElementGen.cpp | 1 + Runtime/Particle/CParticleElectric.cpp | 1 + Runtime/Particle/CParticleSwoosh.cpp | 1 + Runtime/Weapon/CEnergyProjectile.cpp | 1 + Runtime/World/CActor.cpp | 1 + Runtime/World/CFishCloud.cpp | 1 + Runtime/World/CPlayer.cpp | 3 ++- Runtime/World/CScriptGunTurret.cpp | 1 + Runtime/World/CScriptTrigger.cpp | 7 ++++--- Runtime/World/CWallCrawlerSwarm.cpp | 1 + Runtime/rstl.hpp | 6 +----- extern/aurora | 2 +- 17 files changed, 19 insertions(+), 24 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d3a5a2000..85153af04 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -339,15 +339,6 @@ include(${CMAKE_CURRENT_LIST_DIR}/bintoc/bintocHelpers.cmake) add_subdirectory(extern) add_subdirectory(imgui) - -if(NOT TARGET atdna) - # Import native atdna if cross-compiling - find_package(atdna REQUIRED) - if(NOT TARGET atdna) - message(FATAL_ERROR "atdna required for building Metaforce; please verify LLVM installation") - endif() -endif() - add_subdirectory(NESEmulator EXCLUDE_FROM_ALL) add_subdirectory(Runtime) add_subdirectory(gbalink EXCLUDE_FROM_ALL) diff --git a/CMakePresets.json b/CMakePresets.json index fd1e034d9..6fac4ed9d 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -288,10 +288,6 @@ "cacheVariables": { "CMAKE_C_COMPILER_LAUNCHER": "buildcache", "CMAKE_CXX_COMPILER_LAUNCHER": "buildcache", - "BUILD_ATDNA": { - "type": "BOOL", - "value": false - }, "USE_LTO": { "type": "BOOL", "value": false diff --git a/Runtime/CObjectList.cpp b/Runtime/CObjectList.cpp index b256477b8..361f7474d 100644 --- a/Runtime/CObjectList.cpp +++ b/Runtime/CObjectList.cpp @@ -1,6 +1,7 @@ #include "Runtime/CObjectList.hpp" #ifndef NDEBUG #include "Runtime/Logging.hpp" +#include "Runtime/Formatting.hpp" #endif namespace metaforce { diff --git a/Runtime/CStateManager.cpp b/Runtime/CStateManager.cpp index ef9c4a422..7b86c8d2d 100644 --- a/Runtime/CStateManager.cpp +++ b/Runtime/CStateManager.cpp @@ -1435,7 +1435,7 @@ std::pair CStateManager::LoadScriptObject(TAreaId aid, ESc return {kInvalidEditorId, kInvalidUniqueId}; } else { #ifndef NDEBUG - LogModule.report(logvisor::Info, "Loaded {} in area {}", ent->GetName(), ent->GetAreaIdAlways()); + spdlog::info("Loaded {} in area {}", ent->GetName(), ent->GetAreaIdAlways()); #endif return {id, ent->GetUniqueId()}; } diff --git a/Runtime/GuiSys/CGuiFrame.cpp b/Runtime/GuiSys/CGuiFrame.cpp index 11e880339..15ecd2598 100644 --- a/Runtime/GuiSys/CGuiFrame.cpp +++ b/Runtime/GuiSys/CGuiFrame.cpp @@ -11,6 +11,7 @@ #include "Runtime/GuiSys/CGuiWidget.hpp" #include "Runtime/GuiSys/CGuiWidgetDrawParms.hpp" #include "Runtime/Input/CFinalInput.hpp" +#include "Runtime/Formatting.hpp" #include diff --git a/Runtime/Particle/CElementGen.cpp b/Runtime/Particle/CElementGen.cpp index 769a6290b..bf773bf3f 100644 --- a/Runtime/Particle/CElementGen.cpp +++ b/Runtime/Particle/CElementGen.cpp @@ -14,6 +14,7 @@ #include "Runtime/Particle/CSwooshDescription.hpp" #include "Runtime/Particle/CWarp.hpp" #include "Runtime/Logging.hpp" +#include "Runtime/Formatting.hpp" #define MAX_GLOBAL_PARTICLES 2560 diff --git a/Runtime/Particle/CParticleElectric.cpp b/Runtime/Particle/CParticleElectric.cpp index 66827a298..b7a9a95c6 100644 --- a/Runtime/Particle/CParticleElectric.cpp +++ b/Runtime/Particle/CParticleElectric.cpp @@ -12,6 +12,7 @@ #include "Runtime/Particle/CParticleGlobals.hpp" #include "Runtime/Particle/CParticleSwoosh.hpp" #include "Runtime/Particle/CSwooshDescription.hpp" +#include "Runtime/Formatting.hpp" #include #include diff --git a/Runtime/Particle/CParticleSwoosh.cpp b/Runtime/Particle/CParticleSwoosh.cpp index 13cc62d60..0630f7a5e 100644 --- a/Runtime/Particle/CParticleSwoosh.cpp +++ b/Runtime/Particle/CParticleSwoosh.cpp @@ -4,6 +4,7 @@ #include "Runtime/Graphics/CCubeRenderer.hpp" #include "Runtime/Particle/CParticleGlobals.hpp" #include "Runtime/Particle/CSwooshDescription.hpp" +#include "Runtime/Formatting.hpp" #include diff --git a/Runtime/Weapon/CEnergyProjectile.cpp b/Runtime/Weapon/CEnergyProjectile.cpp index 0ac582e9e..f9caca211 100644 --- a/Runtime/Weapon/CEnergyProjectile.cpp +++ b/Runtime/Weapon/CEnergyProjectile.cpp @@ -11,6 +11,7 @@ #include "Runtime/World/CPlayer.hpp" #include "Runtime/World/CScriptPlatform.hpp" #include "Runtime/World/CWorld.hpp" +#include "Runtime/Formatting.hpp" #include "TCastTo.hpp" // Generated file, do not modify include path diff --git a/Runtime/World/CActor.cpp b/Runtime/World/CActor.cpp index f06dfd3d4..dde1b9951 100644 --- a/Runtime/World/CActor.cpp +++ b/Runtime/World/CActor.cpp @@ -13,6 +13,7 @@ #include "Runtime/Graphics/CSkinnedModel.hpp" #include "Runtime/World/CActorParameters.hpp" #include "Runtime/World/CWorld.hpp" +#include "Runtime/Formatting.hpp" #include "TCastTo.hpp" // Generated file, do not modify include path diff --git a/Runtime/World/CFishCloud.cpp b/Runtime/World/CFishCloud.cpp index e40720f6b..0ed487df9 100644 --- a/Runtime/World/CFishCloud.cpp +++ b/Runtime/World/CFishCloud.cpp @@ -10,6 +10,7 @@ #include "Runtime/World/CActorParameters.hpp" #include "Runtime/World/CPlayer.hpp" #include "Runtime/World/CWorld.hpp" +#include "Runtime/Formatting.hpp" #include "TCastTo.hpp" // Generated file, do not modify include path diff --git a/Runtime/World/CPlayer.cpp b/Runtime/World/CPlayer.cpp index d595e0d2d..4dcd62450 100644 --- a/Runtime/World/CPlayer.cpp +++ b/Runtime/World/CPlayer.cpp @@ -30,6 +30,7 @@ #include "Runtime/World/CScriptPlayerHint.hpp" #include "Runtime/World/CScriptWater.hpp" #include "Runtime/Logging.hpp" +#include "Runtime/Formatting.hpp" #include "TCastTo.hpp" // Generated file, do not modify include path @@ -3941,7 +3942,7 @@ void CPlayer::SetOrbitState(EPlayerOrbitState state, CStateManager& mgr) { #ifndef NDEBUG if (x310_orbitTargetId != kInvalidUniqueId) { if (const CEntity* ent = mgr.GetObjectById(x310_orbitTargetId)) { - Log.report(logvisor::Info, "Orbiting {} {}", ent->GetEditorId(), ent->GetName()); + spdlog::info("Orbiting {} {}", ent->GetEditorId(), ent->GetName()); } } #endif diff --git a/Runtime/World/CScriptGunTurret.cpp b/Runtime/World/CScriptGunTurret.cpp index 7063e57b0..2581a0f15 100644 --- a/Runtime/World/CScriptGunTurret.cpp +++ b/Runtime/World/CScriptGunTurret.cpp @@ -15,6 +15,7 @@ #include "Runtime/World/CAiFuncMap.hpp" #include "Runtime/World/CGameLight.hpp" #include "Runtime/World/CPlayer.hpp" +#include "Runtime/Formatting.hpp" #include "TCastTo.hpp" // Generated file, do not modify include path diff --git a/Runtime/World/CScriptTrigger.cpp b/Runtime/World/CScriptTrigger.cpp index e23c31173..7e8520227 100644 --- a/Runtime/World/CScriptTrigger.cpp +++ b/Runtime/World/CScriptTrigger.cpp @@ -6,6 +6,7 @@ #include "Runtime/World/CActorParameters.hpp" #include "Runtime/World/CPlayer.hpp" #include "Runtime/Logging.hpp" +#include "Runtime/Formatting.hpp" #include "TCastTo.hpp" // Generated file, do not modify include path namespace metaforce { @@ -24,10 +25,10 @@ CScriptTrigger::CScriptTrigger(TUniqueId uid, std::string_view name, const CEnti , x148_27_deactivateOnExited(deactivateOnExited) { SetCallTouch(false); #ifndef NDEBUG - // HACK: For some reason MetroidPrime's lair doesn't enable this trigger until after the cutscene, activate it in debug build + // HACK: For some reason MetroidPrime's lair doesn't enable this trigger until after the cutscene, activate it in + // debug build if (GetEditorId() == 0x000B01DB && !GetActive()) { - Log.report(logvisor::Warning, "BUG THIS!: Overriding active for trigger {} in area {}", GetEditorId(), - GetAreaIdAlways()); + spdlog::warn("BUG THIS!: Overriding active for trigger {} in area {}", GetEditorId(), GetAreaIdAlways()); SetActive(true); } #endif diff --git a/Runtime/World/CWallCrawlerSwarm.cpp b/Runtime/World/CWallCrawlerSwarm.cpp index 95ce1eb21..ae07fb82a 100644 --- a/Runtime/World/CWallCrawlerSwarm.cpp +++ b/Runtime/World/CWallCrawlerSwarm.cpp @@ -22,6 +22,7 @@ #include "Runtime/World/CScriptDoor.hpp" #include "Runtime/World/CScriptWaypoint.hpp" #include "Runtime/World/CWorld.hpp" +#include "Runtime/Formatting.hpp" #include "TCastTo.hpp" // Generated file, do not modify include path diff --git a/Runtime/rstl.hpp b/Runtime/rstl.hpp index 59169dc68..09376c6da 100644 --- a/Runtime/rstl.hpp +++ b/Runtime/rstl.hpp @@ -8,15 +8,11 @@ #include #ifndef NDEBUG -#include +#include "Runtime/Logging.hpp" #endif namespace rstl { -#ifndef NDEBUG -static logvisor::Module Log("rstl"); -#endif - /** * @brief Base vector backed by statically-allocated array */ diff --git a/extern/aurora b/extern/aurora index b07d55f71..1016fbb36 160000 --- a/extern/aurora +++ b/extern/aurora @@ -1 +1 @@ -Subproject commit b07d55f71d7d43099d537d23db1d9cfafd87b175 +Subproject commit 1016fbb36d5479cbad909323d083ed232063a7a5