diff --git a/Runtime/AutoMapper/CAutoMapper.hpp b/Runtime/AutoMapper/CAutoMapper.hpp index acfccccb4..ac93ab3fc 100644 --- a/Runtime/AutoMapper/CAutoMapper.hpp +++ b/Runtime/AutoMapper/CAutoMapper.hpp @@ -8,6 +8,7 @@ #include "Runtime/rstl.hpp" #include "Runtime/RetroTypes.hpp" +#include "Runtime/AutoMapper/CMapUniverse.hpp" #include "Runtime/MP1/CInGameGuiManager.hpp" #include @@ -17,7 +18,6 @@ #include namespace urde { -class CMapUniverse; class CMapWorldInfo; class CStateManager; class IWorld; diff --git a/Runtime/CStateManager.cpp b/Runtime/CStateManager.cpp index bbc581345..740ebc9d0 100644 --- a/Runtime/CStateManager.cpp +++ b/Runtime/CStateManager.cpp @@ -1357,8 +1357,8 @@ std::pair CStateManager::LoadScriptObject(TAreaId aid, ESc } CEntity* ent = nullptr; + const CEntityInfo info(aid, std::move(conns), id); if (loader) { - const CEntityInfo info(aid, std::move(conns), id); ent = loader(*this, in, propCount, info); } else { error = true; @@ -1377,7 +1377,11 @@ std::pair CStateManager::LoadScriptObject(TAreaId aid, ESc in.readByte(); if (error || ent == nullptr) { - LogModule.report(logvisor::Error, FMT_STRING("Script load error while loading {}"), ScriptObjectTypeToStr(type)); + in.seek(startPos, athena::SeekOrigin::Begin); + std::string name; //= HashInstanceName(in); + LogModule.report(logvisor::Error, FMT_STRING("Script load error while loading {}, name: {}"), + ScriptObjectTypeToStr(type), name); + loader(*this, in, propCount, info); return {kInvalidEditorId, kInvalidUniqueId}; } else { LogModule.report(logvisor::Info, FMT_STRING("Loaded {} in area {}"), ent->GetName(), ent->GetAreaIdAlways()); diff --git a/Runtime/CStopwatch.hpp b/Runtime/CStopwatch.hpp index 301dff669..87397fd88 100644 --- a/Runtime/CStopwatch.hpp +++ b/Runtime/CStopwatch.hpp @@ -12,17 +12,17 @@ public: double report(const char* name) const { double t = std::chrono::duration_cast( std::chrono::steady_clock::now() - m_start).count() / 1000000.0; -#ifndef NDEBUG - fmt::print(FMT_STRING("{} {}\n"), name, t); -#endif +//#ifndef NDEBUG +// fmt::print(FMT_STRING("{} {}\n"), name, t); +//#endif return t; } double reportReset(const char* name) { std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now(); double t = std::chrono::duration_cast(now - m_start).count() / 1000000.0; -#ifndef NDEBUG - fmt::print(FMT_STRING("{} {}\n"), name, t); -#endif +//#ifndef NDEBUG +// fmt::print(FMT_STRING("{} {}\n"), name, t); +//#endif m_start = now; return t; } diff --git a/Runtime/Camera/CCameraFilter.hpp b/Runtime/Camera/CCameraFilter.hpp index f42aeaec6..44bbd88ff 100644 --- a/Runtime/Camera/CCameraFilter.hpp +++ b/Runtime/Camera/CCameraFilter.hpp @@ -5,14 +5,13 @@ #include "Runtime/CToken.hpp" #include "Runtime/RetroTypes.hpp" +#include "Runtime/Graphics/CTexture.hpp" #include "Runtime/Graphics/Shaders/CCameraBlurFilter.hpp" #include "Runtime/Graphics/Shaders/CXRayBlurFilter.hpp" #include namespace urde { -class CTexture; - enum class EFilterType { Passthru, Multiply, diff --git a/Runtime/Character/CAnimSysContext.hpp b/Runtime/Character/CAnimSysContext.hpp index ca0986e1b..4a75b23ba 100644 --- a/Runtime/Character/CAnimSysContext.hpp +++ b/Runtime/Character/CAnimSysContext.hpp @@ -5,10 +5,10 @@ #include "Runtime/CRandom16.hpp" #include "Runtime/CToken.hpp" #include "Runtime/GCNTypes.hpp" +#include "Runtime/Character/CTransitionDatabaseGame.hpp" namespace urde { class CSimplePool; -class CTransitionDatabaseGame; struct CAnimSysContext { TToken x0_transDB; diff --git a/Runtime/Character/CAnimationManager.hpp b/Runtime/Character/CAnimationManager.hpp index ef194d97b..26956ed29 100644 --- a/Runtime/Character/CAnimationManager.hpp +++ b/Runtime/Character/CAnimationManager.hpp @@ -3,13 +3,12 @@ #include #include "Runtime/CToken.hpp" +#include "Runtime/Character/CAnimationDatabaseGame.hpp" #include "Runtime/Character/CAnimSysContext.hpp" namespace urde { class CAnimTreeNode; -class CAnimationDatabaseGame; class CSimplePool; -class CTransitionDatabaseGame; class IMetaAnim; struct CMetaAnimTreeBuildOrders; diff --git a/Runtime/Character/CPoseAsTransforms.hpp b/Runtime/Character/CPoseAsTransforms.hpp index 1c2087fc9..e896eb438 100644 --- a/Runtime/Character/CPoseAsTransforms.hpp +++ b/Runtime/Character/CPoseAsTransforms.hpp @@ -5,6 +5,7 @@ #include #include "Runtime/RetroTypes.hpp" +#include "Runtime/Character/CCharLayoutInfo.hpp" #include "Runtime/Character/CSegId.hpp" #include @@ -12,8 +13,6 @@ #include namespace urde { -class CCharLayoutInfo; - class CPoseAsTransforms { friend class CAnimData; public: diff --git a/Runtime/Character/CSequenceHelper.hpp b/Runtime/Character/CSequenceHelper.hpp index 331974369..da275ec72 100644 --- a/Runtime/Character/CSequenceHelper.hpp +++ b/Runtime/Character/CSequenceHelper.hpp @@ -9,9 +9,9 @@ #include "Runtime/Character/CInt32POINode.hpp" #include "Runtime/Character/CParticlePOINode.hpp" #include "Runtime/Character/CSoundPOINode.hpp" +#include "Runtime/Character/CTransitionDatabaseGame.hpp" namespace urde { -class CTransitionDatabaseGame; class IMetaAnim; class CSequenceFundamentals { diff --git a/Runtime/Character/CTransitionManager.hpp b/Runtime/Character/CTransitionManager.hpp index 4ba58a2e0..d5466bdd5 100644 --- a/Runtime/Character/CTransitionManager.hpp +++ b/Runtime/Character/CTransitionManager.hpp @@ -4,12 +4,12 @@ #include "Runtime/CToken.hpp" #include "Runtime/Character/CAnimSysContext.hpp" +#include "Runtime/Character/CTransitionDatabaseGame.hpp" namespace urde { class CAnimTreeNode; class CRandom16; class CSimplePool; -class CTransitionDatabaseGame; class CTransitionManager { CAnimSysContext x0_animCtx; diff --git a/Runtime/Graphics/CModel.hpp b/Runtime/Graphics/CModel.hpp index b6ef2e16f..e267d2136 100644 --- a/Runtime/Graphics/CModel.hpp +++ b/Runtime/Graphics/CModel.hpp @@ -5,12 +5,13 @@ #include #include -#include "DNACommon/CMDL.hpp" -#include "DNAMP1/CMDLMaterials.hpp" +#include "DataSpec/DNACommon/CMDL.hpp" +#include "DataSpec/DNAMP1/CMDLMaterials.hpp" #include "Runtime/CFactoryMgr.hpp" #include "Runtime/CToken.hpp" #include "Runtime/RetroTypes.hpp" -#include "Shaders/CModelShaders.hpp" +#include "Runtime/Graphics/CTexture.hpp" +#include "Runtime/Graphics/Shaders/CModelShaders.hpp" #include #include @@ -22,7 +23,6 @@ class CLight; class CModel; class CPoseAsTransforms; class CSkinRules; -class CTexture; class IObjectStore; struct CModelFlags { diff --git a/Runtime/Graphics/Shaders/CTextSupportShader.cpp b/Runtime/Graphics/Shaders/CTextSupportShader.cpp index f3b072861..de61952ce 100644 --- a/Runtime/Graphics/Shaders/CTextSupportShader.cpp +++ b/Runtime/Graphics/Shaders/CTextSupportShader.cpp @@ -1,5 +1,6 @@ #include "Runtime/Graphics/Shaders/CTextSupportShader.hpp" +#include "Runtime/GuiSys/CFontImageDef.hpp" #include "Runtime/GuiSys/CRasterFont.hpp" #include diff --git a/Runtime/GuiSys/CGuiTextSupport.hpp b/Runtime/GuiSys/CGuiTextSupport.hpp index 6cc9c833f..74840ff6f 100644 --- a/Runtime/GuiSys/CGuiTextSupport.hpp +++ b/Runtime/GuiSys/CGuiTextSupport.hpp @@ -9,12 +9,12 @@ #include "Runtime/CToken.hpp" #include "Runtime/RetroTypes.hpp" #include "Runtime/GuiSys/CGuiWidget.hpp" +#include "Runtime/GuiSys/CRasterFont.hpp" #include "Runtime/GuiSys/CTextRenderBuffer.hpp" #include namespace urde { -class CRasterFont; class CSimplePool; class CTextExecuteBuffer; class CTextRenderBuffer; @@ -34,8 +34,6 @@ enum class EVerticalJustification { RightMono }; -enum class EColorType { Main, Outline, Geometry, Foreground, Background }; - enum class ETextDirection { Horizontal, Vertical }; class CGuiTextProperties { diff --git a/Runtime/GuiSys/CRasterFont.hpp b/Runtime/GuiSys/CRasterFont.hpp index 0b582792f..97a7a38a0 100644 --- a/Runtime/GuiSys/CRasterFont.hpp +++ b/Runtime/GuiSys/CRasterFont.hpp @@ -8,7 +8,6 @@ #include "Runtime/GCNTypes.hpp" #include "Runtime/IOStreams.hpp" #include "Runtime/Graphics/CTexture.hpp" -#include "Runtime/GuiSys/CGuiTextSupport.hpp" #include @@ -17,6 +16,8 @@ class CDrawStringOptions; class CTextRenderBuffer; class IObjectStore; +enum class EColorType { Main, Outline, Geometry, Foreground, Background }; + /* NOTE: Is this a good place for CGlyph and CKernPair? */ class CGlyph { private: diff --git a/Runtime/GuiSys/CSaveableState.hpp b/Runtime/GuiSys/CSaveableState.hpp index ca6168828..7b875f000 100644 --- a/Runtime/GuiSys/CSaveableState.hpp +++ b/Runtime/GuiSys/CSaveableState.hpp @@ -6,12 +6,11 @@ #include "Runtime/GCNTypes.hpp" #include "Runtime/GuiSys/CDrawStringOptions.hpp" #include "Runtime/GuiSys/CGuiTextSupport.hpp" +#include "Runtime/GuiSys/CRasterFont.hpp" #include namespace urde { -class CRasterFont; - class CSaveableState { friend class CColorOverrideInstruction; friend class CFontInstruction; diff --git a/Runtime/MP1/CInGameGuiManager.hpp b/Runtime/MP1/CInGameGuiManager.hpp index 3009e4d34..e89fb4185 100644 --- a/Runtime/MP1/CInGameGuiManager.hpp +++ b/Runtime/MP1/CInGameGuiManager.hpp @@ -7,6 +7,7 @@ #include "DataSpec/DNACommon/Tweaks/ITweakGui.hpp" +#include "Runtime/CDependencyGroup.hpp" #include "Runtime/CRandom16.hpp" #include "Runtime/CToken.hpp" #include "Runtime/CStateManager.hpp" @@ -30,7 +31,6 @@ namespace urde { class CActorLights; class CArchitectureQueue; class CAutoMapper; -class CDependencyGroup; class CGuiCamera; class CGuiModel; class CModelData; diff --git a/Runtime/MP1/CSlideShow.hpp b/Runtime/MP1/CSlideShow.hpp index 20bed1176..ce1de5b75 100644 --- a/Runtime/MP1/CSlideShow.hpp +++ b/Runtime/MP1/CSlideShow.hpp @@ -4,6 +4,7 @@ #include #include +#include "Runtime/CDependencyGroup.hpp" #include "Runtime/CIOWin.hpp" #include "Runtime/CToken.hpp" #include "Runtime/RetroTypes.hpp" @@ -16,7 +17,6 @@ #include namespace urde { -class CDependencyGroup; class CTexture; class CSlideShow : public CIOWin { diff --git a/Runtime/MP1/World/CFlaahgra.cpp b/Runtime/MP1/World/CFlaahgra.cpp index 8df1d39ac..4768fc538 100644 --- a/Runtime/MP1/World/CFlaahgra.cpp +++ b/Runtime/MP1/World/CFlaahgra.cpp @@ -297,9 +297,9 @@ void CFlaahgra::DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, E return; } case EUserEventType::BeginAction: { -#ifndef NDEBUG - printf("BeginAction\n"); -#endif +//#ifndef NDEBUG +// printf("BeginAction\n"); +//#endif x8e4_26_ = true; x7c4_ = GetEndActionTime(); break; diff --git a/Runtime/Particle/CParticleDataFactory.hpp b/Runtime/Particle/CParticleDataFactory.hpp index 7cf3527aa..889a5fac3 100644 --- a/Runtime/Particle/CParticleDataFactory.hpp +++ b/Runtime/Particle/CParticleDataFactory.hpp @@ -8,6 +8,7 @@ #include "Runtime/IOStreams.hpp" #include "Runtime/IObj.hpp" #include "Runtime/RetroTypes.hpp" +#include "Runtime/Graphics/CModel.hpp" namespace urde { class CColorElement; @@ -16,7 +17,6 @@ class CEmitterElement; class CGenDescription; class CIntElement; class CModVectorElement; -class CModel; class CRealElement; class CSimplePool; class CSwooshDescription; @@ -100,3 +100,9 @@ CFactoryFnReturn FParticleFactory(const SObjectTag& tag, CInputStream& in, const CObjectReference* selfRef); } // namespace urde + +// FIXME hacky workaround for MSVC; these need to be complete types +// but introduce circular dependencies if included at the start +#include "Runtime/Particle/CGenDescription.hpp" +#include "Runtime/Particle/CSwooshDescription.hpp" +#include "Runtime/Particle/CElectricDescription.hpp" \ No newline at end of file diff --git a/Runtime/Weapon/CGunWeapon.hpp b/Runtime/Weapon/CGunWeapon.hpp index a4d099cde..d29afbd93 100644 --- a/Runtime/Weapon/CGunWeapon.hpp +++ b/Runtime/Weapon/CGunWeapon.hpp @@ -13,6 +13,7 @@ #include "Runtime/Character/CAnimCharacterSet.hpp" #include "Runtime/Collision/CMaterialList.hpp" #include "Runtime/Particle/CElementGen.hpp" +#include "Runtime/Particle/CWeaponDescription.hpp" #include "Runtime/Weapon/CGunController.hpp" #include "Runtime/Weapon/CGunMotion.hpp" #include "Runtime/Weapon/CWeaponMgr.hpp" @@ -25,7 +26,6 @@ namespace urde { class CActorLights; struct CModelFlags; -class CWeaponDescription; enum class EChargeState { Normal, Charged }; diff --git a/Runtime/World/CScriptPlatform.hpp b/Runtime/World/CScriptPlatform.hpp index 5891b5875..db0d1d915 100644 --- a/Runtime/World/CScriptPlatform.hpp +++ b/Runtime/World/CScriptPlatform.hpp @@ -8,6 +8,7 @@ #include "Runtime/CToken.hpp" #include "Runtime/RetroTypes.hpp" #include "Runtime/rstl.hpp" +#include "Runtime/Collision/CCollidableOBBTreeGroup.hpp" #include "Runtime/World/CDamageVulnerability.hpp" #include "Runtime/World/CHealthInfo.hpp" #include "Runtime/World/CPhysicsActor.hpp" @@ -17,8 +18,6 @@ #include namespace urde { -class CCollidableOBBTreeGroup; -class CCollidableOBBTreeGroupContainer; class CFluidPlane; struct SRiders { diff --git a/Runtime/World/CWorldTransManager.hpp b/Runtime/World/CWorldTransManager.hpp index 105d23ce8..5dc5c65a2 100644 --- a/Runtime/World/CWorldTransManager.hpp +++ b/Runtime/World/CWorldTransManager.hpp @@ -14,6 +14,7 @@ #include "Runtime/Graphics/Shaders/CColoredQuadFilter.hpp" #include "Runtime/Graphics/Shaders/CTexturedQuadFilter.hpp" #include "Runtime/GuiSys/CGuiTextSupport.hpp" +#include "Runtime/GuiSys/CStringTable.hpp" #include #include @@ -21,7 +22,6 @@ namespace urde { class CSimplePool; -class CStringTable; class CWorldTransManager { public: diff --git a/hecl b/hecl index 2f81bf8d1..2c01e89c1 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 2f81bf8d1626e9bc4cd39e2604c98efa213a2dc1 +Subproject commit 2c01e89c1e5cd7894470195315e35be45580ed17 diff --git a/hecl-gui b/hecl-gui index c66d33b0b..e5e3713b1 160000 --- a/hecl-gui +++ b/hecl-gui @@ -1 +1 @@ -Subproject commit c66d33b0b2fca695c39d1c0c829489ba67a52f47 +Subproject commit e5e3713b12f6c6b93cae5ca59b1879f45d498f22 diff --git a/specter b/specter index fc0d79ace..f54b6e265 160000 --- a/specter +++ b/specter @@ -1 +1 @@ -Subproject commit fc0d79ace7063f24efaeaf8153753855eb3e2b95 +Subproject commit f54b6e2650711b9872b230d27f15e0e231a5f12d