From 9d2cbf61ed9c524c3c69ace942f64d226a4a42f7 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 3 Aug 2019 16:44:52 -0700 Subject: [PATCH 01/65] Add texture cache containing information about textures --- DataSpec/DNACommon/PAK.hpp | 6 +++ DataSpec/DNACommon/TXTR.cpp | 67 ++++++++++++++++++++++--------- DataSpec/DNACommon/TXTR.hpp | 21 +++++++++- DataSpec/DNAMP1/CMDLMaterials.cpp | 4 ++ DataSpec/SpecMP1.cpp | 32 ++++++++++++++- 5 files changed, 108 insertions(+), 22 deletions(-) diff --git a/DataSpec/DNACommon/PAK.hpp b/DataSpec/DNACommon/PAK.hpp index 80695e246..fcc95ee98 100644 --- a/DataSpec/DNACommon/PAK.hpp +++ b/DataSpec/DNACommon/PAK.hpp @@ -198,6 +198,12 @@ public: return true; } + PAKEntryReadStream beginReadStreamForId(const IDType& id, bool silenceWarnings = false) { + const nod::Node* node; + const EntryType* entry = lookupEntry(id, &node, silenceWarnings); + return entry->beginReadStream(*node); + } + const typename CharacterAssociations::RigPair* lookupCMDLRigPair(const IDType& id) const; const typename CharacterAssociations::MultimapIteratorPair lookupCharacterAttachmentRigs(const IDType& id) const; diff --git a/DataSpec/DNACommon/TXTR.cpp b/DataSpec/DNACommon/TXTR.cpp index de610439f..d69182efa 100644 --- a/DataSpec/DNACommon/TXTR.cpp +++ b/DataSpec/DNACommon/TXTR.cpp @@ -1595,33 +1595,66 @@ bool TXTR::CookPC(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outP return true; } +template +void DataSpec::TXTR::PaletteMeta::Enumerate(typename Op::StreamT& s) { + Do({"format"}, format, s); + Do({"elementCount"}, elementCount, s); + Do({"dolphinHash"}, dolphinHash, s); +} + +AT_SPECIALIZE_DNA_YAML(DataSpec::TXTR::PaletteMeta) + +const char* DataSpec::TXTR::PaletteMeta::DNAType() { + return "DataSpec::TXTR::PaletteMeta"; +} + +template +void DataSpec::TXTR::Meta::Enumerate(typename Op::StreamT& s) { + Do({"format"}, format, s); + Do({"mips"}, mips, s); + Do({"width"}, width, s); + Do({"height"}, height, s); + Do({"dolphinHash"}, dolphinHash, s); + Do({"hasPalette"}, hasPalette, s); + if (hasPalette) + Do({"palette"}, palette, s); +} + +AT_SPECIALIZE_DNA_YAML(DataSpec::TXTR::Meta) + +const char* DataSpec::TXTR::Meta::DNAType() { + return "DataSpec::TXTR::Meta"; +} + static const atInt32 RetroToDol[11] { 0, 1, 2, 3, 8, 9, -1, 4, 5, 6, 14 }; -std::string TXTR::CalculateDolphinName(DataSpec::PAKEntryReadStream& rs) { - atUint32 format = RetroToDol[rs.readUint32Big()]; +TXTR::Meta TXTR::GetMetaData(DataSpec::PAKEntryReadStream& rs) { + atUint32 retroFormat = rs.readUint32Big(); + atUint32 format = RetroToDol[retroFormat]; if (format == UINT32_MAX) return {}; - atUint16 width = rs.readUint16Big(); - atUint16 height = rs.readUint16Big(); - atUint32 mips = rs.readUint32Big(); - std::string res = fmt::format(fmt("tex1_{}x{}{}"), width, height, mips > 1 ? "_m" : ""); - atUint64 palHash = 0; - bool hasPalette = false; - atUint32 textureSize = width * height; + Meta meta; + meta.format = retroFormat; + meta.width = rs.readUint16Big(); + meta.height = rs.readUint16Big(); + meta.mips = rs.readUint32Big(); + atUint32 textureSize = meta.width * meta.height; if (format == 8 || format == 9) { - hasPalette = true; - atUint32 paletteFormat = rs.readUint32Big(); + meta.hasPalette = true; + PaletteMeta& palMeta = meta.palette; + palMeta.format = rs.readUint32Big(); atUint16 palWidth = rs.readUint16Big(); atUint16 palHeight = rs.readUint16Big(); + palMeta.elementCount = palWidth * palHeight; atUint32 palSize = atUint32(palWidth * palHeight * 2); - if (format == 4) + if (palMeta.format == 4) textureSize /= 2; std::unique_ptr palData(new u8[palSize]); rs.readUBytesToBuf(palData.get(), palSize); - palHash = XXH64(palData.get(), palSize, 0); + palMeta.dolphinHash = XXH64(palData.get(), palSize, 0); } else { switch(format) { case 0: // I4 @@ -1642,13 +1675,9 @@ std::string TXTR::CalculateDolphinName(DataSpec::PAKEntryReadStream& rs) { } std::unique_ptr textureData(new u8[textureSize]); rs.readUBytesToBuf(textureData.get(), textureSize); - atUint64 texHash = XXH64(textureData.get(), textureSize, 0); - res += fmt::format(fmt("_{:016X}"), texHash); - if (hasPalette) - res += fmt::format(fmt("_{:016X}"), palHash); - res += fmt::format(fmt("_{}"), format); + meta.dolphinHash = XXH64(textureData.get(), textureSize, 0); - return res; + return meta; } } // namespace DataSpec diff --git a/DataSpec/DNACommon/TXTR.hpp b/DataSpec/DNACommon/TXTR.hpp index 59e0c3958..9619e94cc 100644 --- a/DataSpec/DNACommon/TXTR.hpp +++ b/DataSpec/DNACommon/TXTR.hpp @@ -6,10 +6,29 @@ namespace DataSpec { class PAKEntryReadStream; struct TXTR { + struct PaletteMeta : BigDNAVYaml { + AT_DECL_EXPLICIT_DNA_YAML + AT_DECL_DNAV + Value format = UINT_MAX; + Value elementCount = 0; + Value dolphinHash = 0; + }; + struct Meta : BigDNAVYaml { + AT_DECL_EXPLICIT_DNA_YAML + AT_DECL_DNAV + Value format = UINT_MAX; + Value mips = 0; + Value width = 0; + Value height = 0; + Value dolphinHash = 0; + Value hasPalette = false; + PaletteMeta palette; + }; + static bool Extract(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath); static bool Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPath); static bool CookPC(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPath); - static std::string CalculateDolphinName(PAKEntryReadStream& rs); + static TXTR::Meta GetMetaData(PAKEntryReadStream& rs); }; } // namespace DataSpec diff --git a/DataSpec/DNAMP1/CMDLMaterials.cpp b/DataSpec/DNAMP1/CMDLMaterials.cpp index 0ae9ce961..d545ef5e4 100644 --- a/DataSpec/DNAMP1/CMDLMaterials.cpp +++ b/DataSpec/DNAMP1/CMDLMaterials.cpp @@ -578,6 +578,8 @@ static void _ConstructMaterial(Stream& out, const MAT& material, unsigned groupI _GenerateRootShader(out, "RetroShader", "Lightmap"_tex, "Diffuse"_tex, "Specular"_tex, "Reflection"_tex, TexLink("Alpha", 1, true)); break; case 0x54A92F25: /* RetroShader: ObjLightmap, KColorDiffuse, Alpha=KAlpha */ _GenerateRootShader(out, "RetroShader", "Lightmap"_tex, "Diffuse"_kcol, "Alpha"_kcola); break; + case 0x54C6204C: + _GenerateRootShader(out, "RetroShader"); break; case 0x5A62D5F0: /* RetroShader: Lightmap, Diffuse, UnusedExtendedSpecular?, Alpha=DiffuseAlpha */ _GenerateRootShader(out, "RetroShader", "Lightmap"_tex, "Diffuse"_tex, TexLink("Alpha", 1, true)); break; case 0x5CB59821: /* RetroShader: Diffuse, UnusedSpecular?, Alpha=KAlpha */ @@ -606,6 +608,8 @@ static void _ConstructMaterial(Stream& out, const MAT& material, unsigned groupI _GenerateRootShader(out, "RetroShader", WhiteColorLink("Specular"), "Reflection"_tex); break; case 0x846215DA: /* RetroShader: Diffuse, Specular, Reflection, Alpha=DiffuseAlpha, IndirectTex */ _GenerateRootShader(out, "RetroShader", "Diffuse"_tex, "Specular"_tex, "Reflection"_tex, "IndirectTex"_tex, TexLink("Alpha", 0, true)); break; + case 0x8E916C01: /* RetroShader: NULL, all inputs 0 */ + _GenerateRootShader(out, "RetroShader"); break; case 0x957709F8: /* RetroShader: Emissive, Alpha=1.0 */ _GenerateRootShader(out, "RetroShader", "Emissive"_tex); break; case 0x96ABB2D3: /* RetroShader: Lightmap, Diffuse, Alpha=DiffuseAlpha */ diff --git a/DataSpec/SpecMP1.cpp b/DataSpec/SpecMP1.cpp index 4a1142a03..ef9ef3115 100644 --- a/DataSpec/SpecMP1.cpp +++ b/DataSpec/SpecMP1.cpp @@ -136,6 +136,32 @@ struct OriginalIDs { } }; +struct TextureCache { + static void Generate(PAKRouter& pakRouter, hecl::Database::Project& project) { + std::unordered_map metaMap; + + pakRouter.enumerateResources([&](const DNAMP1::PAK::Entry* ent) { + if (ent->type == FOURCC('TXTR') && metaMap.find(ent->id) == metaMap.end()) { + PAKEntryReadStream rs = pakRouter.beginReadStreamForId(ent->id); + metaMap[ent->id] = TXTR::GetMetaData(rs); + } + return true; + }); + + athena::io::YAMLDocWriter yamlW("MP1TextureCache"); + for (const auto& pair : metaMap) { + hecl::ProjectPath path = pakRouter.getWorking(pair.first); + auto rec = yamlW.enterSubRecord(path.getRelativePathUTF8().data()); + pair.second.write(yamlW); + } + + hecl::ProjectPath path(project.getProjectWorkingPath(), "MP1/!texture_cache.yaml"); + path.makeDirChain(false); + athena::io::FileWriter fileW(path.getAbsolutePath()); + yamlW.finish(&fileW); + } +}; + struct SpecMP1 : SpecBase { bool checkStandaloneID(const char* id) const { return !memcmp(id, "GM8", 3); } @@ -394,6 +420,8 @@ struct SpecMP1 : SpecBase { /* Generate original ID mapping for MLVL and SCAN entries - marks complete project */ OriginalIDs::Generate(m_pakRouter, m_project); + /* Generate Texture Cache containing meta data for every texture file */ + TextureCache::Generate(m_pakRouter, m_project); return true; } @@ -744,8 +772,8 @@ struct SpecMP1 : SpecBase { progress(_SYS_STR("Collision Mesh")); continue; } - meshCompiles.push_back(ds.compileMesh( - mesh, fast ? hecl::HMDLTopology::Triangles : hecl::HMDLTopology::TriStrips, -1, !m_pc)); + meshCompiles.push_back( + ds.compileMesh(mesh, fast ? hecl::HMDLTopology::Triangles : hecl::HMDLTopology::TriStrips, -1, !m_pc)); } if (!colMesh) From ff83dbc676be4e4b34174bd89baed24beab4ab31 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 3 Aug 2019 17:02:53 -0700 Subject: [PATCH 02/65] Minor fixes and cleanup --- DataSpec/DNACommon/TXTR.cpp | 2 +- DataSpec/DNAMP1/CMDLMaterials.cpp | 1 + DataSpec/DNAMP1/Tweaks/CTweakGame.hpp | 3 +- Doxyfile | 8 ++-- Runtime/AutoMapper/CMapArea.cpp | 2 +- Runtime/AutoMapper/CMappableObject.hpp | 2 +- Runtime/Graphics/CTexture.hpp | 4 ++ Runtime/Graphics/CTextureBoo.cpp | 2 + Runtime/MP1/MP1.cpp | 6 ++- Runtime/MP1/World/CChozoGhost.cpp | 18 ++++++++- Runtime/MP1/World/CChozoGhost.hpp | 56 ++++++++++++++++++++++++++ Runtime/MP1/World/CFlaahgra.cpp | 5 +-- 12 files changed, 96 insertions(+), 13 deletions(-) diff --git a/DataSpec/DNACommon/TXTR.cpp b/DataSpec/DNACommon/TXTR.cpp index d69182efa..4947b2ff4 100644 --- a/DataSpec/DNACommon/TXTR.cpp +++ b/DataSpec/DNACommon/TXTR.cpp @@ -1650,7 +1650,7 @@ TXTR::Meta TXTR::GetMetaData(DataSpec::PAKEntryReadStream& rs) { atUint16 palHeight = rs.readUint16Big(); palMeta.elementCount = palWidth * palHeight; atUint32 palSize = atUint32(palWidth * palHeight * 2); - if (palMeta.format == 4) + if (format == 8) textureSize /= 2; std::unique_ptr palData(new u8[palSize]); rs.readUBytesToBuf(palData.get(), palSize); diff --git a/DataSpec/DNAMP1/CMDLMaterials.cpp b/DataSpec/DNAMP1/CMDLMaterials.cpp index d545ef5e4..a4d1ee65c 100644 --- a/DataSpec/DNAMP1/CMDLMaterials.cpp +++ b/DataSpec/DNAMP1/CMDLMaterials.cpp @@ -454,6 +454,7 @@ static void _ConstructMaterial(Stream& out, const MAT& material, unsigned groupI out.format(fmt("new_material = bpy.data.materials.new('MAT_{}_{}')\n"), groupIdx, matIdx); out << "new_material.use_fake_user = True\n" "new_material.use_nodes = True\n" + "new_material.use_backface_culling = True\n" "new_nodetree = new_material.node_tree\n" "for n in new_nodetree.nodes:\n" " new_nodetree.nodes.remove(n)\n" diff --git a/DataSpec/DNAMP1/Tweaks/CTweakGame.hpp b/DataSpec/DNAMP1/Tweaks/CTweakGame.hpp index 1c8866f5e..714f7e048 100644 --- a/DataSpec/DNAMP1/Tweaks/CTweakGame.hpp +++ b/DataSpec/DNAMP1/Tweaks/CTweakGame.hpp @@ -7,7 +7,7 @@ namespace DataSpec::DNAMP1 { struct CTweakGame final : ITweakGame { AT_DECL_DNA_YAML String<-1> x4_worldPrefix; - String<-1> x14_ruinsArea; // ???? + String<-1> x14_defaultRoom; Value x24_fov; Value x28_unknown1; Value x29_unknown2; @@ -30,6 +30,7 @@ struct CTweakGame final : ITweakGame { Value x64_hardmodeWeaponMult; std::string_view GetWorldPrefix() const { return x4_worldPrefix; } + std::string_view GetDefaultRoom() const { return x14_defaultRoom; } bool GetSplashScreensDisabled() const { return x2b_splashScreensDisabled; } float GetFirstPersonFOV() const { return x24_fov; } float GetPressStartDelay() const { return x30_pressStartDelay; } diff --git a/Doxyfile b/Doxyfile index 820437273..da33f39c1 100644 --- a/Doxyfile +++ b/Doxyfile @@ -2295,7 +2295,7 @@ DIRECTORY_GRAPH = YES # The default value is: png. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_IMAGE_FORMAT = png +DOT_IMAGE_FORMAT = svg # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # enable generation of interactive SVG images that allow zooming and panning. @@ -2307,7 +2307,7 @@ DOT_IMAGE_FORMAT = png # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. -INTERACTIVE_SVG = NO +INTERACTIVE_SVG = YES # The DOT_PATH tag can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. @@ -2381,7 +2381,7 @@ MAX_DOT_GRAPH_DEPTH = 0 # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_TRANSPARENT = NO +DOT_TRANSPARENT = YES # Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This @@ -2390,7 +2390,7 @@ DOT_TRANSPARENT = NO # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_MULTI_TARGETS = NO +DOT_MULTI_TARGETS = YES # If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page # explaining the meaning of the various boxes and arrows in the dot generated diff --git a/Runtime/AutoMapper/CMapArea.cpp b/Runtime/AutoMapper/CMapArea.cpp index 1769ea695..90bd12932 100644 --- a/Runtime/AutoMapper/CMapArea.cpp +++ b/Runtime/AutoMapper/CMapArea.cpp @@ -82,7 +82,7 @@ void CMapArea::PostConstruct() { for (u32 i = 0; i < x28_mappableObjCount; ++i) { CMappableObject& mapObj = m_mappableObjects[i]; if (CMappableObject::IsDoorType(mapObj.GetType())) - mapObj.m_doorSurface.emplace(ctx); + mapObj.CreateDoorSurface(ctx); } return true; } BooTrace); diff --git a/Runtime/AutoMapper/CMappableObject.hpp b/Runtime/AutoMapper/CMappableObject.hpp index 7c918ef44..41334ed28 100644 --- a/Runtime/AutoMapper/CMappableObject.hpp +++ b/Runtime/AutoMapper/CMappableObject.hpp @@ -13,7 +13,6 @@ class CStateManager; class CMapWorldInfo; class CMappableObject { - friend class CMapArea; static boo::ObjToken g_doorVbo; static boo::ObjToken g_doorIbo; @@ -83,6 +82,7 @@ public: bool IsDoorConnectedToVisitedArea(const CStateManager&) const; bool IsVisibleToAutoMapper(bool worldVis, const CMapWorldInfo& mwInfo) const; bool GetIsSeen() const; + void CreateDoorSurface(boo::IGraphicsDataFactory::Context& ctx) { m_doorSurface.emplace(ctx); } static void ReadAutoMapperTweaks(const ITweakAutoMapper&); static bool GetTweakIsMapVisibilityCheat(); diff --git a/Runtime/Graphics/CTexture.hpp b/Runtime/Graphics/CTexture.hpp index 3b1dff0ce..278caac7c 100644 --- a/Runtime/Graphics/CTexture.hpp +++ b/Runtime/Graphics/CTexture.hpp @@ -31,6 +31,7 @@ private: boo::ObjToken m_paletteTex; std::unique_ptr m_otex; EFontType m_ftype = EFontType::None; + std::string m_dolphinName; size_t ComputeMippedTexelCount(); size_t ComputeMippedBlockCountDXT1(); @@ -67,6 +68,9 @@ public: const boo::ObjToken& GetPaletteTexture() const { return m_paletteTex; } std::unique_ptr BuildMemoryCardTex(u32& sizeOut, ETexelFormat& fmtOut, std::unique_ptr& paletteOut) const; const boo::ObjToken& GetFontTexture(EFontType tp); + + std::string_view GetDolphinName() const { return m_dolphinName; } + bool HasDolphinName() const { return !m_dolphinName.empty(); } }; CFactoryFnReturn FTextureFactory(const urde::SObjectTag& tag, std::unique_ptr&& in, u32 len, diff --git a/Runtime/Graphics/CTextureBoo.cpp b/Runtime/Graphics/CTextureBoo.cpp index e5382a3c0..490e63bc1 100644 --- a/Runtime/Graphics/CTextureBoo.cpp +++ b/Runtime/Graphics/CTextureBoo.cpp @@ -762,6 +762,8 @@ CTexture::CTexture(std::unique_ptr&& in, u32 length, bool otex) { Log.report(logvisor::Fatal, fmt("invalid texture type {} for boo"), int(x0_fmt)); } + if (r.readBool()) + m_dolphinName = r.readString(); if (otex) m_otex = std::move(owned); } diff --git a/Runtime/MP1/MP1.cpp b/Runtime/MP1/MP1.cpp index 201b38c3e..16821d7e8 100644 --- a/Runtime/MP1/MP1.cpp +++ b/Runtime/MP1/MP1.cpp @@ -372,7 +372,11 @@ void CMain::MemoryCardInitializePump() { } } -void CMain::FillInAssetIDs() {} +void CMain::FillInAssetIDs() { + if (const SObjectTag* tag = g_ResFactory->GetResourceIdByName(g_tweakGame->GetDefaultRoom())) { + g_GameState->SetCurrentWorldId(tag->id); + } +} bool CMain::LoadAudio() { if (x164_archSupport) diff --git a/Runtime/MP1/World/CChozoGhost.cpp b/Runtime/MP1/World/CChozoGhost.cpp index 47f42a46f..d3c53aff9 100644 --- a/Runtime/MP1/World/CChozoGhost.cpp +++ b/Runtime/MP1/World/CChozoGhost.cpp @@ -24,5 +24,21 @@ CChozoGhost::CChozoGhost(TUniqueId uid, std::string_view name, const CEntityInfo const CBehaveChance& chance3, u16 sId1, float f5, u16 sId2, u16 sId3, u32 w1, float f6, u32 w2, float f7, CAssetId partId, s16 sId4, float f8, float f9, u32 w3, u32 w4) : CPatterned(ECharacter::ChozoGhost, uid, name, EFlavorType::Zero, info, xf, std::move(mData), pInfo, - EMovementType::Flyer, EColliderType::Zero, EBodyType::BiPedal, actParms, EKnockBackVariant::Medium) {} + EMovementType::Flyer, EColliderType::Zero, EBodyType::BiPedal, actParms, EKnockBackVariant::Medium) +, x568_(f1) +, x56c_(f2) +, x570_(f3) +, x574_(f4) +, x578_(wpsc1, dInfo1) +, x5a0_(wpsc2, dInfo2) +, x5c8_(chance1) +, x5e8_(chance2) +, x608_(chance3) +, x628_(sId1) +, x62c_(f5) +, x630_(sId2) +, x632_(sId3) +, x634_(f6) +, x638_(f7) +, x63c_(w2) {} } // namespace urde::MP1 \ No newline at end of file diff --git a/Runtime/MP1/World/CChozoGhost.hpp b/Runtime/MP1/World/CChozoGhost.hpp index adf9cb918..f34fdff43 100644 --- a/Runtime/MP1/World/CChozoGhost.hpp +++ b/Runtime/MP1/World/CChozoGhost.hpp @@ -1,6 +1,8 @@ #pragma once #include "World/CPatterned.hpp" +#include "Weapon/CProjectileInfo.hpp" +#include "Character/CBoneTracking.hpp" namespace urde::MP1 { class CChozoGhost : public CPatterned { @@ -20,6 +22,60 @@ public: }; private: + float x568_; + float x56c_; + float x570_; + float x574_; + CProjectileInfo x578_; + CProjectileInfo x5a0_; + CBehaveChance x5c8_; + CBehaveChance x5e8_; + CBehaveChance x608_; + s16 x628_; + float x62c_; + s16 x630_; + s16 x632_; + float x634_; + float x638_; + u32 x63c_; + TLockedToken x640_; + s16 x650_; + float x654_; + float x658_; + u32 x65c_; + u32 x660_; + union { + struct { + bool x664_24_ : 1; + bool x664_25_ : 1; + bool x664_26_ : 1; + bool x664_27_ : 1; + bool x664_28_ : 1; + bool x664_29_ : 1; + bool x664_30_ : 1; + bool x664_31_ : 1; + bool x665_24_ : 1; + bool x665_25_ : 1; + bool x665_26_ : 1; + bool x665_27_ : 1; + bool x665_28_ : 1; + bool x665_29_ : 1; + }; + u32 _dummy = 0; + }; + float x668_ = 0.f; + float x66c_ = 0.f; + float x670_ = 0.f; + TUniqueId x674_ = kInvalidUniqueId; + u32 x67c_ = -1; + u32 x680_; + float x684_ = 1.f; + CSteeringBehaviors x688_; + //CBoneTracking x68c_boneTracking; + TUniqueId x6c4_ = kInvalidUniqueId; + float x6c8_ = 0.f; + zeus::CVector3f x6cc_; + u32 x6d8_ = 1; public: DEFINE_PATTERNED(ChozoGhost) diff --git a/Runtime/MP1/World/CFlaahgra.cpp b/Runtime/MP1/World/CFlaahgra.cpp index bf8acd8d4..26fca64fd 100644 --- a/Runtime/MP1/World/CFlaahgra.cpp +++ b/Runtime/MP1/World/CFlaahgra.cpp @@ -163,8 +163,7 @@ void CFlaahgra::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateM CDamageInfo contactDamage = GetContactDamage(); if (x7a8_ == 4) contactDamage = x7dc_; - - if (!sub801ae670()) + else if (!sub801ae670()) contactDamage.SetDamage(0.5f * contactDamage.GetDamage()); if (x788_ >= 2) @@ -188,7 +187,7 @@ void CFlaahgra::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateM if (TCastToConstPtr proj = mgr.GetObjectById(colAct->GetLastTouchedObject())) { if (x780_ != 3) break; - if (IsDizzy(mgr, 0.f) && !x450_bodyController->HasBodyState(pas::EAnimationState::LoopReaction)) { + if (!IsDizzy(mgr, 0.f) && x450_bodyController->HasBodyState(pas::EAnimationState::LoopReaction)) { TakeDamage({}, 0.f); if ((x56c_.x140_ - proj->GetDamageInfo().GetDamage()) >= x810_) { From d648f156b88cd64b0b03507b011be0a750b9ed16 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 3 Aug 2019 17:05:40 -0700 Subject: [PATCH 03/65] Revert original dolphin hash idea completely --- Runtime/Graphics/CTextureBoo.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Runtime/Graphics/CTextureBoo.cpp b/Runtime/Graphics/CTextureBoo.cpp index 490e63bc1..e5382a3c0 100644 --- a/Runtime/Graphics/CTextureBoo.cpp +++ b/Runtime/Graphics/CTextureBoo.cpp @@ -762,8 +762,6 @@ CTexture::CTexture(std::unique_ptr&& in, u32 length, bool otex) { Log.report(logvisor::Fatal, fmt("invalid texture type {} for boo"), int(x0_fmt)); } - if (r.readBool()) - m_dolphinName = r.readString(); if (otex) m_otex = std::move(owned); } From fc906eec66c060fd547e51081c26080232c48c4d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 8 Aug 2019 23:09:55 -0400 Subject: [PATCH 04/65] MP1/CMFGame: Remove erroneous forward declaration This type is actually defined within the urde::MP1 namespace, not the top-level urde namespace. We remove the namespace itself however, given the header for that type is already being included. --- Runtime/MP1/CMFGame.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Runtime/MP1/CMFGame.hpp b/Runtime/MP1/CMFGame.hpp index ecfeeb01a..bb3c1aeb2 100644 --- a/Runtime/MP1/CMFGame.hpp +++ b/Runtime/MP1/CMFGame.hpp @@ -6,7 +6,6 @@ namespace urde { class CStateManager; -class CInGameGuiManager; class CToken; namespace MP1 { From af8731f2d28c0cb8f5d740c32a945d4fc437dec5 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 9 Aug 2019 07:07:59 -0400 Subject: [PATCH 05/65] GuiSys/CInstruction: Correct erroneous assignment in TestLargestFont Without this, x20_largestMonoW will never be any value other than zero, which is indicative of a logic bug. --- Runtime/GuiSys/CInstruction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/GuiSys/CInstruction.cpp b/Runtime/GuiSys/CInstruction.cpp index 3dab285a8..bf64407f2 100644 --- a/Runtime/GuiSys/CInstruction.cpp +++ b/Runtime/GuiSys/CInstruction.cpp @@ -225,7 +225,7 @@ void CBlockInstruction::TestLargestFont(s32 monoW, s32 monoH, s32 baseline) { x28_largestBaseline = baseline; if (x20_largestMonoW < monoW) - monoW = x20_largestMonoW; + x20_largestMonoW = monoW; if (x24_largestMonoH < monoH) { x24_largestMonoH = monoH; From 2059535b552c0886d18b72078efaf43feadd75ac Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 9 Aug 2019 08:45:18 -0400 Subject: [PATCH 06/65] RuntimeCommonB: Use the override specifier where applicable Applies the override keyword where applicable to indicate visually where member function overriding is occurring. This only targets the RuntimeCommonB target as a starting point, which resolves around 900+ cases where the keyword could be used. --- Runtime/Audio/CSfxManager.hpp | 40 +++---- Runtime/Audio/CStaticAudioPlayer.hpp | 4 +- Runtime/CDvdFile.cpp | 10 +- Runtime/CMainFlowBase.hpp | 2 +- Runtime/CPlayMovieBase.hpp | 4 +- Runtime/CResFactory.hpp | 46 ++++---- Runtime/CSimplePool.hpp | 20 ++-- Runtime/GameObjectLists.hpp | 15 ++- Runtime/GuiSys/CAuiEnergyBarT01.hpp | 6 +- Runtime/GuiSys/CAuiImagePane.hpp | 10 +- Runtime/GuiSys/CAuiMeter.hpp | 8 +- Runtime/GuiSys/CConsoleOutputWindow.hpp | 4 +- Runtime/GuiSys/CErrorOutputWindow.hpp | 6 +- Runtime/GuiSys/CGuiCamera.hpp | 4 +- Runtime/GuiSys/CGuiCompoundWidget.hpp | 6 +- Runtime/GuiSys/CGuiGroup.hpp | 6 +- Runtime/GuiSys/CGuiHeadWidget.hpp | 2 +- Runtime/GuiSys/CGuiLight.hpp | 6 +- Runtime/GuiSys/CGuiModel.hpp | 10 +- Runtime/GuiSys/CGuiPane.hpp | 2 +- Runtime/GuiSys/CGuiSliderGroup.hpp | 12 +- Runtime/GuiSys/CGuiTableGroup.hpp | 6 +- Runtime/GuiSys/CGuiTextPane.hpp | 14 +-- Runtime/GuiSys/CGuiWidget.hpp | 7 +- Runtime/GuiSys/CHudDecoInterface.hpp | 84 ++++++------- Runtime/GuiSys/CHudFreeLookInterface.hpp | 16 +-- Runtime/GuiSys/CInstruction.hpp | 56 ++++----- Runtime/GuiSys/CSplashScreen.hpp | 4 +- Runtime/IOStreams.hpp | 12 +- Runtime/IObj.hpp | 2 +- Runtime/IVParamObj.hpp | 2 +- Runtime/Input/CInputGenerator.hpp | 13 +- Runtime/Particle/CColorElement.hpp | 16 +-- Runtime/Particle/CElementGen.hpp | 56 ++++----- Runtime/Particle/CEmitterElement.hpp | 6 +- Runtime/Particle/CFlameWarp.hpp | 10 +- Runtime/Particle/CIntElement.hpp | 76 ++++++------ Runtime/Particle/CModVectorElement.hpp | 26 ++-- Runtime/Particle/CParticleElectric.hpp | 50 ++++---- Runtime/Particle/CParticleSwoosh.hpp | 52 ++++---- Runtime/Particle/CRealElement.hpp | 82 ++++++------- Runtime/Particle/CUVElement.hpp | 16 +-- Runtime/Particle/CVectorElement.hpp | 44 +++---- Runtime/Weapon/CBeamProjectile.hpp | 6 +- Runtime/Weapon/CBomb.hpp | 14 +-- Runtime/Weapon/CElectricBeamProjectile.hpp | 14 +-- Runtime/Weapon/CFlameThrower.hpp | 8 +- Runtime/Weapon/CGameProjectile.hpp | 6 +- Runtime/Weapon/CIceBeam.hpp | 20 ++-- Runtime/Weapon/CPhazonBeam.hpp | 20 ++-- Runtime/Weapon/CPlasmaBeam.hpp | 16 +-- Runtime/Weapon/CPlasmaProjectile.hpp | 18 +-- Runtime/Weapon/CPowerBeam.hpp | 18 +-- Runtime/Weapon/CPowerBomb.hpp | 14 +-- Runtime/Weapon/CTargetableProjectile.hpp | 6 +- Runtime/Weapon/CWaveBeam.hpp | 16 +-- Runtime/Weapon/CWeapon.hpp | 10 +- Runtime/World/CActor.hpp | 4 +- Runtime/World/CAi.hpp | 14 ++- Runtime/World/CAmbientAI.hpp | 14 +-- Runtime/World/CEffect.hpp | 4 +- Runtime/World/CExplosion.hpp | 14 +-- Runtime/World/CFire.hpp | 12 +- Runtime/World/CFishCloud.hpp | 16 +-- Runtime/World/CFishCloudModifier.hpp | 4 +- Runtime/World/CFluidPlaneCPU.hpp | 4 +- Runtime/World/CFluidPlaneDoor.hpp | 12 +- Runtime/World/CFluidPlaneGPU.hpp | 2 +- Runtime/World/CGameArea.hpp | 34 +++--- Runtime/World/CGameLight.hpp | 4 +- Runtime/World/CHUDBillboardEffect.hpp | 12 +- Runtime/World/CIceImpact.hpp | 2 +- Runtime/World/CPatterned.hpp | 111 +++++++++--------- Runtime/World/CPhysicsActor.hpp | 6 +- Runtime/World/CPlayer.hpp | 46 ++++---- Runtime/World/CRepulsor.hpp | 4 +- Runtime/World/CScriptActor.hpp | 20 ++-- Runtime/World/CScriptActorKeyframe.hpp | 6 +- Runtime/World/CScriptActorRotate.hpp | 6 +- Runtime/World/CScriptAiJumpPoint.hpp | 12 +- Runtime/World/CScriptAreaAttributes.hpp | 4 +- Runtime/World/CScriptBallTrigger.hpp | 10 +- Runtime/World/CScriptBeam.hpp | 6 +- Runtime/World/CScriptCameraBlurKeyframe.hpp | 4 +- Runtime/World/CScriptCameraFilterKeyframe.hpp | 4 +- Runtime/World/CScriptCameraHint.hpp | 4 +- Runtime/World/CScriptCameraHintTrigger.hpp | 8 +- Runtime/World/CScriptCameraPitchVolume.hpp | 8 +- Runtime/World/CScriptCameraShaker.hpp | 4 +- Runtime/World/CScriptCameraWaypoint.hpp | 8 +- Runtime/World/CScriptColorModulate.hpp | 6 +- Runtime/World/CScriptControllerAction.hpp | 4 +- Runtime/World/CScriptCounter.hpp | 4 +- Runtime/World/CScriptCoverPoint.hpp | 12 +- Runtime/World/CScriptDamageableTrigger.hpp | 20 ++-- Runtime/World/CScriptDebris.hpp | 18 +-- Runtime/World/CScriptDebugCameraWaypoint.hpp | 2 +- Runtime/World/CScriptDistanceFog.hpp | 4 +- Runtime/World/CScriptDock.hpp | 10 +- Runtime/World/CScriptDockAreaChange.hpp | 4 +- Runtime/World/CScriptDoor.hpp | 14 +-- Runtime/World/CScriptEMPulse.hpp | 14 +-- Runtime/World/CScriptEffect.hpp | 20 ++-- Runtime/World/CScriptGenerator.hpp | 4 +- Runtime/World/CScriptGrapplePoint.hpp | 12 +- Runtime/World/CScriptGunTurret.hpp | 22 ++-- Runtime/World/CScriptHUDMemo.hpp | 4 +- Runtime/World/CScriptMazeNode.hpp | 2 +- Runtime/World/CScriptMemoryRelay.hpp | 4 +- Runtime/World/CScriptMidi.hpp | 4 +- Runtime/World/CScriptPickup.hpp | 8 +- Runtime/World/CScriptPickupGenerator.hpp | 4 +- Runtime/World/CScriptPlatform.hpp | 28 ++--- Runtime/World/CScriptPlayerActor.hpp | 12 +- Runtime/World/CScriptPlayerHint.hpp | 4 +- Runtime/World/CScriptPlayerStateChange.hpp | 4 +- Runtime/World/CScriptPointOfInterest.hpp | 14 +-- Runtime/World/CScriptRandomRelay.hpp | 4 +- Runtime/World/CScriptRelay.hpp | 6 +- Runtime/World/CScriptRipple.hpp | 6 +- Runtime/World/CScriptRoomAcoustics.hpp | 6 +- Runtime/World/CScriptShadowProjector.hpp | 10 +- Runtime/World/CScriptSound.hpp | 10 +- Runtime/World/CScriptSpawnPoint.hpp | 4 +- Runtime/World/CScriptSpecialFunction.hpp | 12 +- .../CScriptSpiderBallAttractionSurface.hpp | 10 +- Runtime/World/CScriptSpiderBallWaypoint.hpp | 10 +- Runtime/World/CScriptSpindleCamera.hpp | 12 +- Runtime/World/CScriptSteam.hpp | 6 +- Runtime/World/CScriptStreamedMusic.hpp | 4 +- Runtime/World/CScriptSwitch.hpp | 4 +- Runtime/World/CScriptTargetingPoint.hpp | 8 +- Runtime/World/CScriptTimer.hpp | 6 +- Runtime/World/CScriptTrigger.hpp | 10 +- Runtime/World/CScriptVisorFlare.hpp | 12 +- Runtime/World/CScriptVisorGoo.hpp | 14 +-- Runtime/World/CScriptWater.hpp | 20 ++-- Runtime/World/CScriptWaypoint.hpp | 6 +- Runtime/World/CScriptWorldTeleporter.hpp | 4 +- Runtime/World/CSnakeWeedSwarm.hpp | 2 +- Runtime/World/CTeamAiMgr.hpp | 6 +- Runtime/World/CWallCrawlerSwarm.hpp | 24 ++-- Runtime/World/CWallWalker.hpp | 8 +- Runtime/World/CWorld.hpp | 46 ++++---- 144 files changed, 1011 insertions(+), 999 deletions(-) diff --git a/Runtime/Audio/CSfxManager.hpp b/Runtime/Audio/CSfxManager.hpp index af89114aa..2e2384d47 100644 --- a/Runtime/Audio/CSfxManager.hpp +++ b/Runtime/Audio/CSfxManager.hpp @@ -125,16 +125,16 @@ public: float x55_cachedMaxVol; public: - bool IsPlaying() const; - void Play(); - void Stop(); - bool Ready(); - ESfxAudibility GetAudible(const zeus::CVector3f&); - amuse::ObjToken GetVoice() const { return x50_emitterHandle->getVoice(); } - u16 GetSfxId() const; - void UpdateEmitterSilent(); - void UpdateEmitter(); - void SetReverb(float rev); + bool IsPlaying() const override; + void Play() override; + void Stop() override; + bool Ready() override; + ESfxAudibility GetAudible(const zeus::CVector3f&) override; + amuse::ObjToken GetVoice() const override { return x50_emitterHandle->getVoice(); } + u16 GetSfxId() const override; + void UpdateEmitterSilent() override; + void UpdateEmitter() override; + void SetReverb(float rev) override; CAudioSys::C3DEmitterParmData& GetEmitterData() { return x24_parmData; } amuse::ObjToken GetHandle() const { return x50_emitterHandle; } @@ -154,16 +154,16 @@ public: bool x24_ready = true; public: - bool IsPlaying() const; - void Play(); - void Stop(); - bool Ready(); - ESfxAudibility GetAudible(const zeus::CVector3f&) { return ESfxAudibility::Aud3; } - amuse::ObjToken GetVoice() const { return x1c_voiceHandle; } - u16 GetSfxId() const; - void UpdateEmitterSilent(); - void UpdateEmitter(); - void SetReverb(float rev); + bool IsPlaying() const override; + void Play() override; + void Stop() override; + bool Ready() override; + ESfxAudibility GetAudible(const zeus::CVector3f&) override { return ESfxAudibility::Aud3; } + amuse::ObjToken GetVoice() const override { return x1c_voiceHandle; } + u16 GetSfxId() const override; + void UpdateEmitterSilent() override; + void UpdateEmitter() override; + void SetReverb(float rev) override; void SetVolume(float vol) { x20_vol = vol; } CSfxWrapper(bool looped, s16 prio, u16 sfxId, float vol, float pan, diff --git a/Runtime/Audio/CStaticAudioPlayer.hpp b/Runtime/Audio/CStaticAudioPlayer.hpp index 359f815f2..b8bbb69b5 100644 --- a/Runtime/Audio/CStaticAudioPlayer.hpp +++ b/Runtime/Audio/CStaticAudioPlayer.hpp @@ -37,8 +37,8 @@ class CStaticAudioPlayer { struct AudioVoiceCallback : boo::IAudioVoiceCallback { CStaticAudioPlayer& m_parent; - void preSupplyAudio(boo::IAudioVoice&, double) {} - size_t supplyAudio(boo::IAudioVoice& voice, size_t frames, int16_t* data) { + void preSupplyAudio(boo::IAudioVoice&, double) override {} + size_t supplyAudio(boo::IAudioVoice& voice, size_t frames, int16_t* data) override { if (m_parent.IsReady()) { m_parent.x38_dvdRequests.clear(); m_parent.Decode(data, frames); diff --git a/Runtime/CDvdFile.cpp b/Runtime/CDvdFile.cpp index b4e20fd51..4d8331ec1 100644 --- a/Runtime/CDvdFile.cpp +++ b/Runtime/CDvdFile.cpp @@ -18,20 +18,20 @@ class CFileDvdRequest : public IDvdRequest { std::function m_callback; public: - ~CFileDvdRequest() { PostCancelRequest(); } + ~CFileDvdRequest() override { PostCancelRequest(); } - void WaitUntilComplete() { + void WaitUntilComplete() override { while (!m_complete.load() && !m_cancel.load()) { std::unique_lock lk(CDvdFile::m_WaitMutex); } } - bool IsComplete() { return m_complete.load(); } - void PostCancelRequest() { + bool IsComplete() override { return m_complete.load(); } + void PostCancelRequest() override { std::unique_lock waitlk(CDvdFile::m_WaitMutex); m_cancel.store(true); } - EMediaType GetMediaType() const { return EMediaType::File; } + EMediaType GetMediaType() const override { return EMediaType::File; } CFileDvdRequest(CDvdFile& file, void* buf, u32 len, ESeekOrigin whence, int off, std::function&& cb) : m_reader(file.m_reader), m_buf(buf), m_len(len), m_whence(whence), m_offset(off), m_callback(std::move(cb)) {} diff --git a/Runtime/CMainFlowBase.hpp b/Runtime/CMainFlowBase.hpp index e88d22c3f..44a9835f8 100644 --- a/Runtime/CMainFlowBase.hpp +++ b/Runtime/CMainFlowBase.hpp @@ -12,7 +12,7 @@ protected: public: CMainFlowBase(const char* name) : CIOWin(name) {} - EMessageReturn OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue); + EMessageReturn OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue) override; virtual void AdvanceGameState(CArchitectureQueue& queue) = 0; virtual void SetGameState(EClientFlowStates state, CArchitectureQueue& queue) = 0; }; diff --git a/Runtime/CPlayMovieBase.hpp b/Runtime/CPlayMovieBase.hpp index a4dec0946..996baa16e 100644 --- a/Runtime/CPlayMovieBase.hpp +++ b/Runtime/CPlayMovieBase.hpp @@ -10,8 +10,8 @@ class CPlayMovieBase : public CIOWin { public: CPlayMovieBase(const char* iowName, const char* path) : CIOWin(iowName), x18_moviePlayer(path, 0.0, false, false) {} - EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&) { return EMessageReturn::Normal; } - void Draw() const {} + EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&) override { return EMessageReturn::Normal; } + void Draw() const override {} }; } // namespace urde diff --git a/Runtime/CResFactory.hpp b/Runtime/CResFactory.hpp index a0419ee71..2326a7dd0 100644 --- a/Runtime/CResFactory.hpp +++ b/Runtime/CResFactory.hpp @@ -45,58 +45,64 @@ private: public: CResLoader& GetLoader() { return x4_loader; } - std::unique_ptr Build(const SObjectTag&, const CVParamTransfer&, CObjectReference* selfRef); - void BuildAsync(const SObjectTag&, const CVParamTransfer&, std::unique_ptr*, CObjectReference* selfRef); - void AsyncIdle(); - void CancelBuild(const SObjectTag&); + std::unique_ptr Build(const SObjectTag&, const CVParamTransfer&, CObjectReference* selfRef) override; + void BuildAsync(const SObjectTag&, const CVParamTransfer&, std::unique_ptr*, + CObjectReference* selfRef) override; + void AsyncIdle() override; + void CancelBuild(const SObjectTag&) override; - bool CanBuild(const SObjectTag& tag) { return x4_loader.ResourceExists(tag); } + bool CanBuild(const SObjectTag& tag) override { return x4_loader.ResourceExists(tag); } - u32 ResourceSize(const urde::SObjectTag& tag) { return x4_loader.ResourceSize(tag); } + u32 ResourceSize(const urde::SObjectTag& tag) override { return x4_loader.ResourceSize(tag); } - std::unique_ptr LoadResourceSync(const urde::SObjectTag& tag) { return x4_loader.LoadResourceSync(tag); } + std::unique_ptr LoadResourceSync(const urde::SObjectTag& tag) override { + return x4_loader.LoadResourceSync(tag); + } - std::unique_ptr LoadNewResourcePartSync(const urde::SObjectTag& tag, u32 off, u32 size) { + std::unique_ptr LoadNewResourcePartSync(const urde::SObjectTag& tag, u32 off, u32 size) override { return x4_loader.LoadNewResourcePartSync(tag, off, size); } - void GetTagListForFile(const char* pakName, std::vector& out) const { + void GetTagListForFile(const char* pakName, std::vector& out) const override { return x4_loader.GetTagListForFile(pakName, out); } - std::shared_ptr LoadResourceAsync(const urde::SObjectTag& tag, void* target) { + std::shared_ptr LoadResourceAsync(const urde::SObjectTag& tag, void* target) override { return x4_loader.LoadResourceAsync(tag, target); } - std::shared_ptr LoadResourcePartAsync(const urde::SObjectTag& tag, u32 off, u32 size, void* target) { + std::shared_ptr LoadResourcePartAsync(const urde::SObjectTag& tag, u32 off, u32 size, + void* target) override { return x4_loader.LoadResourcePartAsync(tag, off, size, target); } - const SObjectTag* GetResourceIdByName(std::string_view name) const { return x4_loader.GetResourceIdByName(name); } + const SObjectTag* GetResourceIdByName(std::string_view name) const override { + return x4_loader.GetResourceIdByName(name); + } - FourCC GetResourceTypeById(CAssetId id) const { return x4_loader.GetResourceTypeById(id); } + FourCC GetResourceTypeById(CAssetId id) const override { return x4_loader.GetResourceTypeById(id); } std::vector> GetResourceIdToNameList() const { return x4_loader.GetResourceIdToNameList(); } - void EnumerateResources(const std::function& lambda) const { + void EnumerateResources(const std::function& lambda) const override { return x4_loader.EnumerateResources(lambda); } - void EnumerateNamedResources(const std::function& lambda) const { + void EnumerateNamedResources(const std::function& lambda) const override { return x4_loader.EnumerateNamedResources(lambda); } void LoadPersistentResources(CSimplePool& sp); void UnloadPersistentResources() { m_nonWorldTokens.clear(); } - void LoadOriginalIDs(CSimplePool& sp); - CAssetId TranslateOriginalToNew(CAssetId id) const; - CAssetId TranslateNewToOriginal(CAssetId id) const; + void LoadOriginalIDs(CSimplePool& sp) override; + CAssetId TranslateOriginalToNew(CAssetId id) const override; + CAssetId TranslateNewToOriginal(CAssetId id) const override; - CResLoader* GetResLoader() { return &x4_loader; } - CFactoryMgr* GetFactoryMgr() { return &x5c_factoryMgr; } + CResLoader* GetResLoader() override { return &x4_loader; } + CFactoryMgr* GetFactoryMgr() override { return &x5c_factoryMgr; } }; } // namespace urde diff --git a/Runtime/CSimplePool.hpp b/Runtime/CSimplePool.hpp index 6f1cf544f..5797c7a30 100644 --- a/Runtime/CSimplePool.hpp +++ b/Runtime/CSimplePool.hpp @@ -19,16 +19,16 @@ protected: public: CSimplePool(IFactory& factory); - ~CSimplePool(); - CToken GetObj(const SObjectTag&, const CVParamTransfer&); - CToken GetObj(const SObjectTag&); - CToken GetObj(std::string_view); - CToken GetObj(std::string_view, const CVParamTransfer&); - bool HasObject(const SObjectTag&) const; - bool ObjectIsLive(const SObjectTag&) const; - IFactory& GetFactory() const { return x18_factory; } - void Flush(); - void ObjectUnreferenced(const SObjectTag&); + ~CSimplePool() override; + CToken GetObj(const SObjectTag&, const CVParamTransfer&) override; + CToken GetObj(const SObjectTag&) override; + CToken GetObj(std::string_view) override; + CToken GetObj(std::string_view, const CVParamTransfer&) override; + bool HasObject(const SObjectTag&) const override; + bool ObjectIsLive(const SObjectTag&) const override; + IFactory& GetFactory() const override { return x18_factory; } + void Flush() override; + void ObjectUnreferenced(const SObjectTag&) override; std::vector GetReferencedTags() const; }; diff --git a/Runtime/GameObjectLists.hpp b/Runtime/GameObjectLists.hpp index 095690c53..715b153b9 100644 --- a/Runtime/GameObjectLists.hpp +++ b/Runtime/GameObjectLists.hpp @@ -8,39 +8,38 @@ class CActorList : public CObjectList { public: CActorList(); - bool IsQualified(const CEntity&); + bool IsQualified(const CEntity&) override; }; class CPhysicsActorList : public CObjectList { public: CPhysicsActorList(); - bool IsQualified(const CEntity&); + bool IsQualified(const CEntity&) override; }; class CGameCameraList : public CObjectList { public: CGameCameraList(); - bool IsQualified(const CEntity&); + bool IsQualified(const CEntity&) override; }; class CListeningAiList : public CObjectList { public: CListeningAiList(); - - bool IsQualified(const CEntity&); + bool IsQualified(const CEntity&) override; }; class CAiWaypointList : public CObjectList { public: CAiWaypointList(); - bool IsQualified(const CEntity&); + bool IsQualified(const CEntity&) override; }; class CPlatformAndDoorList : public CObjectList { public: CPlatformAndDoorList(); - bool IsQualified(const CEntity&); + bool IsQualified(const CEntity&) override; bool IsDoor(const CEntity&); bool IsPlatform(const CEntity&); }; @@ -49,7 +48,7 @@ class CGameLightList : public CObjectList { public: CGameLightList(); - bool IsQualified(const CEntity&); + bool IsQualified(const CEntity&) override; }; } // namespace urde diff --git a/Runtime/GuiSys/CAuiEnergyBarT01.hpp b/Runtime/GuiSys/CAuiEnergyBarT01.hpp index e5bef304e..5144637fd 100644 --- a/Runtime/GuiSys/CAuiEnergyBarT01.hpp +++ b/Runtime/GuiSys/CAuiEnergyBarT01.hpp @@ -36,10 +36,10 @@ private: public: CAuiEnergyBarT01(const CGuiWidgetParms& parms, CSimplePool* sp, CAssetId txtrId); - FourCC GetWidgetTypeID() const { return FOURCC('ENRG'); } + FourCC GetWidgetTypeID() const override { return FOURCC('ENRG'); } static std::pair DownloadBarCoordFunc(float t); - void Update(float dt); - void Draw(const CGuiWidgetDrawParms& drawParms) const; + void Update(float dt) override; + void Draw(const CGuiWidgetDrawParms& drawParms) const override; float GetActualFraction() const { return xe0_maxEnergy == 0.f ? 0.f : xf4_setEnergy / xe0_maxEnergy; } float GetSetEnergy() const { return xf4_setEnergy; } float GetMaxEnergy() const { return xe0_maxEnergy; } diff --git a/Runtime/GuiSys/CAuiImagePane.hpp b/Runtime/GuiSys/CAuiImagePane.hpp index 7e5978ca2..3c574f214 100644 --- a/Runtime/GuiSys/CAuiImagePane.hpp +++ b/Runtime/GuiSys/CAuiImagePane.hpp @@ -38,13 +38,13 @@ public: CAuiImagePane(const CGuiWidgetParms& parms, CSimplePool* sp, CAssetId, CAssetId, rstl::reserved_vector&& coords, rstl::reserved_vector&& uvs, bool initTex); - FourCC GetWidgetTypeID() const { return FOURCC('IMGP'); } + FourCC GetWidgetTypeID() const override { return FOURCC('IMGP'); } static std::shared_ptr Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp); - void Reset(ETraversalMode mode); - void Update(float dt); - void Draw(const CGuiWidgetDrawParms& params) const; - bool GetIsFinishedLoadingWidgetSpecific() const; + void Reset(ETraversalMode mode) override; + void Update(float dt) override; + void Draw(const CGuiWidgetDrawParms& params) const override; + bool GetIsFinishedLoadingWidgetSpecific() const override; void SetTextureID0(CAssetId tex, CSimplePool* sp); void SetAnimationParms(const zeus::CVector2f& vec, float interval, float duration); void SetDeResFactor(float d) { x14c_deResFactor = d; } diff --git a/Runtime/GuiSys/CAuiMeter.hpp b/Runtime/GuiSys/CAuiMeter.hpp index c6db6b208..6934cfb4d 100644 --- a/Runtime/GuiSys/CAuiMeter.hpp +++ b/Runtime/GuiSys/CAuiMeter.hpp @@ -15,14 +15,14 @@ class CAuiMeter : public CGuiGroup { public: CAuiMeter(const CGuiWidgetParms& parms, bool noRoundUp, u32 maxCapacity, u32 workerCount); - FourCC GetWidgetTypeID() const { return FOURCC('METR'); } + FourCC GetWidgetTypeID() const override { return FOURCC('METR'); } - void OnVisibleChange(); + void OnVisibleChange() override; void SetCurrValue(s32 val); void SetCapacity(s32 cap); void SetMaxCapacity(s32 cap); - CGuiWidget* GetWorkerWidget(int id) const; - bool AddWorkerWidget(CGuiWidget* worker); + CGuiWidget* GetWorkerWidget(int id) const override; + bool AddWorkerWidget(CGuiWidget* worker) override; static std::shared_ptr Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp); }; diff --git a/Runtime/GuiSys/CConsoleOutputWindow.hpp b/Runtime/GuiSys/CConsoleOutputWindow.hpp index df6fc6234..3220d798c 100644 --- a/Runtime/GuiSys/CConsoleOutputWindow.hpp +++ b/Runtime/GuiSys/CConsoleOutputWindow.hpp @@ -7,8 +7,8 @@ namespace urde { class CConsoleOutputWindow : public CIOWin { public: CConsoleOutputWindow(int, float, float); - EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&); - void Draw() const; + EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&) override; + void Draw() const override; }; } // namespace urde diff --git a/Runtime/GuiSys/CErrorOutputWindow.hpp b/Runtime/GuiSys/CErrorOutputWindow.hpp index c338e3915..99dad5dc8 100644 --- a/Runtime/GuiSys/CErrorOutputWindow.hpp +++ b/Runtime/GuiSys/CErrorOutputWindow.hpp @@ -25,9 +25,9 @@ private: public: CErrorOutputWindow(bool); - EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&); - bool GetIsContinueDraw() const { return int(x14_state) < 2; } - void Draw() const; + EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&) override; + bool GetIsContinueDraw() const override { return int(x14_state) < 2; } + void Draw() const override; }; } // namespace urde diff --git a/Runtime/GuiSys/CGuiCamera.hpp b/Runtime/GuiSys/CGuiCamera.hpp index d56fd2f6b..5b56cdd88 100644 --- a/Runtime/GuiSys/CGuiCamera.hpp +++ b/Runtime/GuiSys/CGuiCamera.hpp @@ -38,14 +38,14 @@ private: public: CGuiCamera(const CGuiWidgetParms& parms, float left, float right, float top, float bottom, float znear, float zfar); CGuiCamera(const CGuiWidgetParms& parms, float fov, float aspect, float znear, float zfar); - FourCC GetWidgetTypeID() const { return FOURCC('CAMR'); } + FourCC GetWidgetTypeID() const override { return FOURCC('CAMR'); } static std::shared_ptr Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp); zeus::CVector3f ConvertToScreenSpace(const zeus::CVector3f& vec) const; const SProjection& GetProjection() const { return m_proj; } void SetFov(float fov) { m_proj.xbc_fov = fov; } - void Draw(const CGuiWidgetDrawParms& parms) const; + void Draw(const CGuiWidgetDrawParms& parms) const override; std::shared_ptr shared_from_this() { return std::static_pointer_cast(CGuiObject::shared_from_this()); diff --git a/Runtime/GuiSys/CGuiCompoundWidget.hpp b/Runtime/GuiSys/CGuiCompoundWidget.hpp index 5d7feadc9..82bd0f1c5 100644 --- a/Runtime/GuiSys/CGuiCompoundWidget.hpp +++ b/Runtime/GuiSys/CGuiCompoundWidget.hpp @@ -7,10 +7,10 @@ namespace urde { class CGuiCompoundWidget : public CGuiWidget { public: CGuiCompoundWidget(const CGuiWidgetParms& parms); - FourCC GetWidgetTypeID() const { return FourCC(-1); } + FourCC GetWidgetTypeID() const override { return FourCC(-1); } - void OnVisibleChange(); - void OnActiveChange(); + void OnVisibleChange() override; + void OnActiveChange() override; virtual CGuiWidget* GetWorkerWidget(int id) const; }; diff --git a/Runtime/GuiSys/CGuiGroup.hpp b/Runtime/GuiSys/CGuiGroup.hpp index 31218dee3..93d75d4c9 100644 --- a/Runtime/GuiSys/CGuiGroup.hpp +++ b/Runtime/GuiSys/CGuiGroup.hpp @@ -11,12 +11,12 @@ class CGuiGroup : public CGuiCompoundWidget { public: CGuiGroup(const CGuiWidgetParms& parms, int defaultWorker, bool b); - FourCC GetWidgetTypeID() const { return FOURCC('GRUP'); } + FourCC GetWidgetTypeID() const override { return FOURCC('GRUP'); } void SelectWorkerWidget(int workerId, bool setActive, bool setVisible); CGuiWidget* GetSelectedWidget(); - bool AddWorkerWidget(CGuiWidget* worker); - void OnActiveChange(); + bool AddWorkerWidget(CGuiWidget* worker) override; + void OnActiveChange() override; static std::shared_ptr Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp); static void LoadWidgetFnMap(); diff --git a/Runtime/GuiSys/CGuiHeadWidget.hpp b/Runtime/GuiSys/CGuiHeadWidget.hpp index 4eeb9073c..d53064e66 100644 --- a/Runtime/GuiSys/CGuiHeadWidget.hpp +++ b/Runtime/GuiSys/CGuiHeadWidget.hpp @@ -6,7 +6,7 @@ namespace urde { class CGuiHeadWidget : public CGuiWidget { public: - FourCC GetWidgetTypeID() const { return FOURCC('HWIG'); } + FourCC GetWidgetTypeID() const override { return FOURCC('HWIG'); } CGuiHeadWidget(const CGuiWidgetParms& parms); static std::shared_ptr Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp); diff --git a/Runtime/GuiSys/CGuiLight.hpp b/Runtime/GuiSys/CGuiLight.hpp index 2973ba927..3d86bd1cd 100644 --- a/Runtime/GuiSys/CGuiLight.hpp +++ b/Runtime/GuiSys/CGuiLight.hpp @@ -19,12 +19,12 @@ class CGuiLight : public CGuiWidget { zeus::CColor xdc_ambColor = zeus::skBlack; public: - ~CGuiLight(); + ~CGuiLight() override; CGuiLight(const CGuiWidgetParms& parms, const CLight& light); - FourCC GetWidgetTypeID() const { return FOURCC('LITE'); } + FourCC GetWidgetTypeID() const override { return FOURCC('LITE'); } CLight BuildLight() const; - void SetIsVisible(bool vis); + void SetIsVisible(bool vis) override; u32 GetLightId() const { return xd8_lightId; } const zeus::CColor& GetAmbientLightColor() const { return xdc_ambColor; } void SetSpotCutoff(float v) { xbc_spotCutoff = v; } diff --git a/Runtime/GuiSys/CGuiModel.hpp b/Runtime/GuiSys/CGuiModel.hpp index 6a66cc48f..9b40c52fd 100644 --- a/Runtime/GuiSys/CGuiModel.hpp +++ b/Runtime/GuiSys/CGuiModel.hpp @@ -14,14 +14,14 @@ class CGuiModel : public CGuiWidget { public: CGuiModel(const CGuiWidgetParms& parms, CSimplePool* sp, CAssetId modelId, u32 lightMask, bool flag); - FourCC GetWidgetTypeID() const { return FOURCC('MODL'); } + FourCC GetWidgetTypeID() const override { return FOURCC('MODL'); } std::vector GetModelAssets() const { return {xc8_modelId}; } const TLockedToken& GetModel() const { return xb8_model; } - bool GetIsFinishedLoadingWidgetSpecific() const; - void Touch() const; - void Draw(const CGuiWidgetDrawParms& parms) const; - bool TestCursorHit(const zeus::CMatrix4f& vp, const zeus::CVector2f& point) const; + bool GetIsFinishedLoadingWidgetSpecific() const override; + void Touch() const override; + void Draw(const CGuiWidgetDrawParms& parms) const override; + bool TestCursorHit(const zeus::CMatrix4f& vp, const zeus::CVector2f& point) const override; static std::shared_ptr Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp); }; diff --git a/Runtime/GuiSys/CGuiPane.hpp b/Runtime/GuiSys/CGuiPane.hpp index 377e8d631..ffcdb390c 100644 --- a/Runtime/GuiSys/CGuiPane.hpp +++ b/Runtime/GuiSys/CGuiPane.hpp @@ -17,7 +17,7 @@ protected: public: CGuiPane(const CGuiWidgetParms& parms, const zeus::CVector2f& dim, const zeus::CVector3f& scaleCenter); - FourCC GetWidgetTypeID() const { return FOURCC('PANE'); } + FourCC GetWidgetTypeID() const override { return FOURCC('PANE'); } virtual void ScaleDimensions(const zeus::CVector3f& scale); virtual void SetDimensions(const zeus::CVector2f& dim, bool initVBO); diff --git a/Runtime/GuiSys/CGuiSliderGroup.hpp b/Runtime/GuiSys/CGuiSliderGroup.hpp index 31eb340be..4831bd752 100644 --- a/Runtime/GuiSys/CGuiSliderGroup.hpp +++ b/Runtime/GuiSys/CGuiSliderGroup.hpp @@ -35,7 +35,7 @@ private: public: CGuiSliderGroup(const CGuiWidgetParms& parms, float a, float b, float c, float d); - FourCC GetWidgetTypeID() const { return FOURCC('SLGP'); } + FourCC GetWidgetTypeID() const override { return FOURCC('SLGP'); } EState GetState() const { return xf0_state; } void SetSelectionChangedCallback(std::function&& func); @@ -51,13 +51,13 @@ public: void SetCurVal(float cur); float GetGurVal() const { return xc0_roundedCurVal; } - bool TestCursorHit(const zeus::CMatrix4f& vp, const zeus::CVector2f& point) const; + bool TestCursorHit(const zeus::CMatrix4f& vp, const zeus::CVector2f& point) const override; - void ProcessUserInput(const CFinalInput& input); - void Update(float dt); + void ProcessUserInput(const CFinalInput& input) override; + void Update(float dt) override; - bool AddWorkerWidget(CGuiWidget* worker); - CGuiWidget* GetWorkerWidget(int id) const; + bool AddWorkerWidget(CGuiWidget* worker) override; + CGuiWidget* GetWorkerWidget(int id) const override; static std::shared_ptr Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp); }; diff --git a/Runtime/GuiSys/CGuiTableGroup.hpp b/Runtime/GuiSys/CGuiTableGroup.hpp index 3e336f651..6affde0f9 100644 --- a/Runtime/GuiSys/CGuiTableGroup.hpp +++ b/Runtime/GuiSys/CGuiTableGroup.hpp @@ -45,7 +45,7 @@ private: public: CGuiTableGroup(const CGuiWidgetParms& parms, int, int, bool); - FourCC GetWidgetTypeID() const { return FOURCC('TBGP'); } + FourCC GetWidgetTypeID() const override { return FOURCC('TBGP'); } void SetMenuAdvanceCallback(std::function&& cb) { xd4_doMenuAdvance = std::move(cb); } @@ -84,9 +84,9 @@ public: void SetWorkersMouseActive(bool); - void ProcessUserInput(const CFinalInput& input); + void ProcessUserInput(const CFinalInput& input) override; - bool AddWorkerWidget(CGuiWidget* worker) { return true; } + bool AddWorkerWidget(CGuiWidget* worker) override { return true; } static std::shared_ptr Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp); }; diff --git a/Runtime/GuiSys/CGuiTextPane.hpp b/Runtime/GuiSys/CGuiTextPane.hpp index f6dc8a1f5..bcc67e431 100644 --- a/Runtime/GuiSys/CGuiTextPane.hpp +++ b/Runtime/GuiSys/CGuiTextPane.hpp @@ -12,17 +12,17 @@ public: CGuiTextPane(const CGuiWidgetParms& parms, CSimplePool* sp, const zeus::CVector2f& dim, const zeus::CVector3f& vec, CAssetId fontId, const CGuiTextProperties& props, const zeus::CColor& col1, const zeus::CColor& col2, s32 padX, s32 padY); - FourCC GetWidgetTypeID() const { return FOURCC('TXPN'); } + FourCC GetWidgetTypeID() const override { return FOURCC('TXPN'); } CGuiTextSupport& TextSupport() { return xd4_textSupport; } const CGuiTextSupport& GetTextSupport() const { return xd4_textSupport; } - void Update(float dt); - bool GetIsFinishedLoadingWidgetSpecific() const; + void Update(float dt) override; + bool GetIsFinishedLoadingWidgetSpecific() const override; std::vector GetFontAssets() const { return {xd4_textSupport.x5c_fontId}; } - void SetDimensions(const zeus::CVector2f& dim, bool initVBO); - void ScaleDimensions(const zeus::CVector3f& scale); - void Draw(const CGuiWidgetDrawParms& parms) const; - bool TestCursorHit(const zeus::CMatrix4f& vp, const zeus::CVector2f& point) const; + void SetDimensions(const zeus::CVector2f& dim, bool initVBO) override; + void ScaleDimensions(const zeus::CVector3f& scale) override; + void Draw(const CGuiWidgetDrawParms& parms) const override; + bool TestCursorHit(const zeus::CMatrix4f& vp, const zeus::CVector2f& point) const override; static std::shared_ptr Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp); }; diff --git a/Runtime/GuiSys/CGuiWidget.hpp b/Runtime/GuiSys/CGuiWidget.hpp index ee1900c79..7f083ac24 100644 --- a/Runtime/GuiSys/CGuiWidget.hpp +++ b/Runtime/GuiSys/CGuiWidget.hpp @@ -86,10 +86,11 @@ public: static CGuiWidgetParms ReadWidgetHeader(CGuiFrame* frame, CInputStream& in); static std::shared_ptr Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp); + void Update(float dt) override; + void Draw(const CGuiWidgetDrawParms& drawParms) const override; + void Initialize() override; + virtual void Reset(ETraversalMode mode); - virtual void Update(float dt); - virtual void Draw(const CGuiWidgetDrawParms& drawParms) const; - virtual void Initialize(); virtual void ProcessUserInput(const CFinalInput& input); virtual void Touch() const; virtual bool GetIsVisible() const; diff --git a/Runtime/GuiSys/CHudDecoInterface.hpp b/Runtime/GuiSys/CHudDecoInterface.hpp index b012096db..c91673416 100644 --- a/Runtime/GuiSys/CHudDecoInterface.hpp +++ b/Runtime/GuiSys/CHudDecoInterface.hpp @@ -53,15 +53,15 @@ class CHudDecoInterfaceCombat : public IHudDecoInterface { public: CHudDecoInterfaceCombat(CGuiFrame& selHud); - void SetIsVisibleDebug(bool v); - void SetIsVisibleGame(bool v); - void SetHudRotation(const zeus::CQuaternion& rot); - void SetHudOffset(const zeus::CVector3f& off); - void SetDamageTransform(const zeus::CMatrix3f& rotation, const zeus::CVector3f& position); - void SetFrameColorValue(float v); - void Update(float dt, const CStateManager& stateMgr); - void UpdateCameraDebugSettings(float fov, float y, float z); - void UpdateHudAlpha(); + void SetIsVisibleDebug(bool v) override; + void SetIsVisibleGame(bool v) override; + void SetHudRotation(const zeus::CQuaternion& rot) override; + void SetHudOffset(const zeus::CVector3f& off) override; + void SetDamageTransform(const zeus::CMatrix3f& rotation, const zeus::CVector3f& position) override; + void SetFrameColorValue(float v) override; + void Update(float dt, const CStateManager& stateMgr) override; + void UpdateCameraDebugSettings(float fov, float y, float z) override; + void UpdateHudAlpha() override; }; class CHudDecoInterfaceScan : public IHudDecoInterface { @@ -104,22 +104,22 @@ class CHudDecoInterfaceScan : public IHudDecoInterface { public: CHudDecoInterfaceScan(CGuiFrame& selHud); - void SetIsVisibleDebug(bool v); - void SetIsVisibleGame(bool v); - void SetHudRotation(const zeus::CQuaternion& rot); - void SetHudOffset(const zeus::CVector3f& off); - void SetReticuleTransform(const zeus::CMatrix3f& xf); - void SetDamageTransform(const zeus::CMatrix3f& rotation, const zeus::CVector3f& position); - void SetFrameColorValue(float v); + void SetIsVisibleDebug(bool v) override; + void SetIsVisibleGame(bool v) override; + void SetHudRotation(const zeus::CQuaternion& rot) override; + void SetHudOffset(const zeus::CVector3f& off) override; + void SetReticuleTransform(const zeus::CMatrix3f& xf) override; + void SetDamageTransform(const zeus::CMatrix3f& rotation, const zeus::CVector3f& position) override; + void SetFrameColorValue(float v) override; void InitializeFlatFrame(); const CScannableObjectInfo* GetCurrScanInfo(const CStateManager& stateMgr) const; void UpdateScanDisplay(const CStateManager& stateMgr, float dt); - void Update(float dt, const CStateManager& stateMgr); - void Draw() const; - void ProcessInput(const CFinalInput& input); - void UpdateCameraDebugSettings(float fov, float y, float z); - void UpdateHudAlpha(); - float GetHudTextAlpha() const; + void Update(float dt, const CStateManager& stateMgr) override; + void Draw() const override; + void ProcessInput(const CFinalInput& input) override; + void UpdateCameraDebugSettings(float fov, float y, float z) override; + void UpdateHudAlpha() override; + float GetHudTextAlpha() const override; }; class CHudDecoInterfaceXRay : public IHudDecoInterface { @@ -142,17 +142,17 @@ class CHudDecoInterfaceXRay : public IHudDecoInterface { public: CHudDecoInterfaceXRay(CGuiFrame& selHud); - void SetIsVisibleDebug(bool v); - void SetIsVisibleGame(bool v); - void SetHudRotation(const zeus::CQuaternion& rot); - void SetHudOffset(const zeus::CVector3f& off); - void SetReticuleTransform(const zeus::CMatrix3f& xf); - void SetDecoRotation(float angle); - void SetDamageTransform(const zeus::CMatrix3f& rotation, const zeus::CVector3f& position); - void SetFrameColorValue(float v); - void Update(float dt, const CStateManager& stateMgr); - void UpdateCameraDebugSettings(float fov, float y, float z); - void UpdateHudAlpha(); + void SetIsVisibleDebug(bool v) override; + void SetIsVisibleGame(bool v) override; + void SetHudRotation(const zeus::CQuaternion& rot) override; + void SetHudOffset(const zeus::CVector3f& off) override; + void SetReticuleTransform(const zeus::CMatrix3f& xf) override; + void SetDecoRotation(float angle) override; + void SetDamageTransform(const zeus::CMatrix3f& rotation, const zeus::CVector3f& position) override; + void SetFrameColorValue(float v) override; + void Update(float dt, const CStateManager& stateMgr) override; + void UpdateCameraDebugSettings(float fov, float y, float z) override; + void UpdateHudAlpha() override; }; class CHudDecoInterfaceThermal : public IHudDecoInterface { @@ -175,15 +175,15 @@ class CHudDecoInterfaceThermal : public IHudDecoInterface { public: CHudDecoInterfaceThermal(CGuiFrame& selHud); - void SetIsVisibleDebug(bool v); - void SetIsVisibleGame(bool v); - void SetHudRotation(const zeus::CQuaternion& rot); - void SetHudOffset(const zeus::CVector3f& off); - void SetReticuleTransform(const zeus::CMatrix3f& xf); - void SetDamageTransform(const zeus::CMatrix3f& rotation, const zeus::CVector3f& position); - void Update(float dt, const CStateManager& stateMgr); - void UpdateCameraDebugSettings(float fov, float y, float z); - void UpdateHudAlpha(); + void SetIsVisibleDebug(bool v) override; + void SetIsVisibleGame(bool v) override; + void SetHudRotation(const zeus::CQuaternion& rot) override; + void SetHudOffset(const zeus::CVector3f& off) override; + void SetReticuleTransform(const zeus::CMatrix3f& xf) override; + void SetDamageTransform(const zeus::CMatrix3f& rotation, const zeus::CVector3f& position) override; + void Update(float dt, const CStateManager& stateMgr) override; + void UpdateCameraDebugSettings(float fov, float y, float z) override; + void UpdateHudAlpha() override; }; } // namespace urde diff --git a/Runtime/GuiSys/CHudFreeLookInterface.hpp b/Runtime/GuiSys/CHudFreeLookInterface.hpp index 562ed710a..a0564777f 100644 --- a/Runtime/GuiSys/CHudFreeLookInterface.hpp +++ b/Runtime/GuiSys/CHudFreeLookInterface.hpp @@ -45,10 +45,10 @@ class CHudFreeLookInterface : public IFreeLookInterface { public: CHudFreeLookInterface(CGuiFrame& selHud, EHudType hudType, bool inFreeLook, bool lookControlHeld, bool lockedOnObj); - void Update(float dt); - void SetIsVisibleDebug(bool v); - void SetIsVisibleGame(bool v); - void SetFreeLookState(bool inFreeLook, bool lookControlHeld, bool lockedOnObj, float vertLookAngle); + void Update(float dt) override; + void SetIsVisibleDebug(bool v) override; + void SetIsVisibleGame(bool v) override; + void SetFreeLookState(bool inFreeLook, bool lookControlHeld, bool lockedOnObj, float vertLookAngle) override; }; class CHudFreeLookInterfaceXRay : public IFreeLookInterface { @@ -67,10 +67,10 @@ class CHudFreeLookInterfaceXRay : public IFreeLookInterface { public: CHudFreeLookInterfaceXRay(CGuiFrame& selHud, bool inFreeLook, bool lookControlHeld, bool lockedOnObj); - void Update(float dt); - void SetIsVisibleDebug(bool v); - void SetIsVisibleGame(bool v); - void SetFreeLookState(bool inFreeLook, bool lookControlHeld, bool lockedOnObj, float vertLookAngle); + void Update(float dt) override; + void SetIsVisibleDebug(bool v) override; + void SetIsVisibleGame(bool v) override; + void SetFreeLookState(bool inFreeLook, bool lookControlHeld, bool lockedOnObj, float vertLookAngle) override; }; } // namespace urde diff --git a/Runtime/GuiSys/CInstruction.hpp b/Runtime/GuiSys/CInstruction.hpp index 6c1dadbd7..fe2caef0e 100644 --- a/Runtime/GuiSys/CInstruction.hpp +++ b/Runtime/GuiSys/CInstruction.hpp @@ -25,8 +25,8 @@ class CColorInstruction : public CInstruction { public: CColorInstruction(EColorType tp, const CTextColor& color) : x4_cType(tp), x8_color(color) {} - void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const; - void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const; + void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; + void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; }; class CColorOverrideInstruction : public CInstruction { @@ -35,8 +35,8 @@ class CColorOverrideInstruction : public CInstruction { public: CColorOverrideInstruction(int idx, const CTextColor& color) : x4_overrideIdx(idx), x8_color(color) {} - void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const; - void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const; + void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; + void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; }; class CFontInstruction : public CInstruction { @@ -44,10 +44,10 @@ class CFontInstruction : public CInstruction { public: CFontInstruction(const TToken& font) : x4_font(font) {} - void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const; - void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const; - void GetAssets(std::vector& assetsOut) const; - size_t GetAssetCount() const; + void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; + void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; + void GetAssets(std::vector& assetsOut) const override; + size_t GetAssetCount() const override; }; class CLineExtraSpaceInstruction : public CInstruction { @@ -55,8 +55,8 @@ class CLineExtraSpaceInstruction : public CInstruction { public: CLineExtraSpaceInstruction(s32 extraSpace) : x4_extraSpace(extraSpace) {} - void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const; - void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const; + void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; + void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; }; class CLineInstruction : public CInstruction { @@ -84,8 +84,8 @@ public: void TestLargestFont(s32 w, s32 h, s32 b); void TestLargestImage(s32 w, s32 h, s32 b); void InvokeLTR(CFontRenderState& state) const; - void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const; - void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const; + void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; + void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; s32 GetHeight() const { if (x10_largestMonoHeight && !x30_imageBaseline) @@ -107,20 +107,20 @@ class CLineSpacingInstruction : public CInstruction { public: CLineSpacingInstruction(float spacing) : x4_lineSpacing(spacing) {} - void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const; - void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const; + void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; + void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; }; class CPopStateInstruction : public CInstruction { public: - void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const; - void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const; + void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; + void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; }; class CPushStateInstruction : public CInstruction { public: - void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const; - void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const; + void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; + void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; }; class CRemoveColorOverrideInstruction : public CInstruction { @@ -128,8 +128,8 @@ class CRemoveColorOverrideInstruction : public CInstruction { public: CRemoveColorOverrideInstruction(int idx) : x4_idx(idx) {} - void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const; - void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const; + void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; + void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; }; class CImageInstruction : public CInstruction { @@ -137,16 +137,16 @@ class CImageInstruction : public CInstruction { public: CImageInstruction(const CFontImageDef& image) : x4_image(image) {} - void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const; - void GetAssets(std::vector& assetsOut) const; - size_t GetAssetCount() const; + void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; + void GetAssets(std::vector& assetsOut) const override; + size_t GetAssetCount() const override; }; class CTextInstruction : public CInstruction { std::u16string x4_str; /* used to be a placement-new sized allocation */ public: CTextInstruction(const char16_t* str, int len) : x4_str(str, len) {} - void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const; + void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; }; class CBlockInstruction : public CInstruction { @@ -182,15 +182,15 @@ public: , x1c_vertJustification(vjust) {} void TestLargestFont(s32 monoW, s32 monoH, s32 baseline); void SetupPositionLTR(CFontRenderState& state) const; - void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const; - void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const; + void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; + void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; }; class CWordInstruction : public CInstruction { public: void InvokeLTR(CFontRenderState& state) const; - void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const; - void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const; + void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; + void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const override; }; } // namespace urde diff --git a/Runtime/GuiSys/CSplashScreen.hpp b/Runtime/GuiSys/CSplashScreen.hpp index e5718037c..88ba3b32e 100644 --- a/Runtime/GuiSys/CSplashScreen.hpp +++ b/Runtime/GuiSys/CSplashScreen.hpp @@ -23,8 +23,8 @@ private: public: CSplashScreen(ESplashScreen); - EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&); - void Draw() const; + EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&) override; + void Draw() const override; }; } // namespace urde diff --git a/Runtime/IOStreams.hpp b/Runtime/IOStreams.hpp index 0718052cf..1f2d7df3c 100644 --- a/Runtime/IOStreams.hpp +++ b/Runtime/IOStreams.hpp @@ -46,7 +46,7 @@ public: void Flush(); - ~CBitStreamWriter() { Flush(); } + ~CBitStreamWriter() override { Flush(); } }; using CMemoryInStream = athena::io::MemoryReader; @@ -60,11 +60,11 @@ class CZipInputStream : public CInputStream { public: CZipInputStream(std::unique_ptr&& strm); - ~CZipInputStream(); - atUint64 readUBytesToBuf(void* buf, atUint64 len); - void seek(atInt64, athena::SeekOrigin) {} - atUint64 position() const { return 0; } - atUint64 length() const { return 0; } + ~CZipInputStream() override; + atUint64 readUBytesToBuf(void* buf, atUint64 len) override; + void seek(atInt64, athena::SeekOrigin) override {} + atUint64 position() const override { return 0; } + atUint64 length() const override { return 0; } }; #endif diff --git a/Runtime/IObj.hpp b/Runtime/IObj.hpp index 57c929774..74898b636 100644 --- a/Runtime/IObj.hpp +++ b/Runtime/IObj.hpp @@ -25,7 +25,7 @@ public: static std::unique_ptr> GetNewDerivedObject(std::unique_ptr&& obj) { return std::unique_ptr>(new TObjOwnerDerivedFromIObj(obj.release())); } - ~TObjOwnerDerivedFromIObj() { std::default_delete()(static_cast(m_objPtr)); } + ~TObjOwnerDerivedFromIObj() override { std::default_delete()(static_cast(m_objPtr)); } T* GetObj() { return static_cast(m_objPtr); } }; diff --git a/Runtime/IVParamObj.hpp b/Runtime/IVParamObj.hpp index 9204bad22..81239514f 100644 --- a/Runtime/IVParamObj.hpp +++ b/Runtime/IVParamObj.hpp @@ -7,7 +7,7 @@ namespace urde { class IVParamObj : public IObj { public: - virtual ~IVParamObj() {} + ~IVParamObj() override = default; }; template diff --git a/Runtime/Input/CInputGenerator.hpp b/Runtime/Input/CInputGenerator.hpp index 22c5aa65f..bca3fde7c 100644 --- a/Runtime/Input/CInputGenerator.hpp +++ b/Runtime/Input/CInputGenerator.hpp @@ -34,7 +34,7 @@ public: CInputGenerator(float leftDiv, float rightDiv) : boo::DeviceFinder({dev_typeid(DolphinSmashAdapter)}), m_leftDiv(leftDiv), m_rightDiv(rightDiv) {} - ~CInputGenerator() { + ~CInputGenerator() override { if (smashAdapter) smashAdapter->setCallback(nullptr); } @@ -81,17 +81,18 @@ public: bool m_connected[4] = {}; boo::DolphinControllerState m_states[4]; std::mutex m_stateLock; - void controllerConnected(unsigned idx, boo::EDolphinControllerType) { + void controllerConnected(unsigned idx, boo::EDolphinControllerType) override { /* Controller thread */ m_statusChanges[idx].store(EStatusChange::Connected); } - void controllerDisconnected(unsigned idx) { + void controllerDisconnected(unsigned idx) override { /* Controller thread */ std::unique_lock lk(m_stateLock); m_statusChanges[idx].store(EStatusChange::Disconnected); m_states[idx].reset(); } - void controllerUpdate(unsigned idx, boo::EDolphinControllerType, const boo::DolphinControllerState& state) { + void controllerUpdate(unsigned idx, boo::EDolphinControllerType, + const boo::DolphinControllerState& state) override { /* Controller thread */ std::unique_lock lk(m_stateLock); m_states[idx] = state; @@ -124,7 +125,7 @@ public: * received. Device pointers should only be manipulated by this thread using * the deviceConnected() and deviceDisconnected() callbacks. */ std::shared_ptr smashAdapter; - void deviceConnected(boo::DeviceToken& tok) { + void deviceConnected(boo::DeviceToken& tok) override { /* Device listener thread */ if (!smashAdapter) { auto dev = tok.openAndGetDevice(); @@ -134,7 +135,7 @@ public: } } } - void deviceDisconnected(boo::DeviceToken&, boo::DeviceBase* device) { + void deviceDisconnected(boo::DeviceToken&, boo::DeviceBase* device) override { if (smashAdapter.get() == device) smashAdapter.reset(); } diff --git a/Runtime/Particle/CColorElement.hpp b/Runtime/Particle/CColorElement.hpp index 43afa36af..22b82a7ff 100644 --- a/Runtime/Particle/CColorElement.hpp +++ b/Runtime/Particle/CColorElement.hpp @@ -17,7 +17,7 @@ class CCEKeyframeEmitter : public CColorElement { public: CCEKeyframeEmitter(CInputStream& in); - bool GetValue(int frame, zeus::CColor& colorOut) const; + bool GetValue(int frame, zeus::CColor& colorOut) const override; }; class CCEConstant : public CColorElement { @@ -30,7 +30,7 @@ public: CCEConstant(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c, std::unique_ptr&& d) : x4_r(std::move(a)), x8_g(std::move(b)), xc_b(std::move(c)), x10_a(std::move(d)) {} - bool GetValue(int frame, zeus::CColor& colorOut) const; + bool GetValue(int frame, zeus::CColor& colorOut) const override; }; class CCEFastConstant : public CColorElement { @@ -38,7 +38,7 @@ class CCEFastConstant : public CColorElement { public: CCEFastConstant(float a, float b, float c, float d) : x4_val(a, b, c, d) {} - bool GetValue(int frame, zeus::CColor& colorOut) const; + bool GetValue(int frame, zeus::CColor& colorOut) const override; }; class CCETimeChain : public CColorElement { @@ -49,7 +49,7 @@ class CCETimeChain : public CColorElement { public: CCETimeChain(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c) : x4_a(std::move(a)), x8_b(std::move(b)), xc_swFrame(std::move(c)) {} - bool GetValue(int frame, zeus::CColor& colorOut) const; + bool GetValue(int frame, zeus::CColor& colorOut) const override; }; class CCEFadeEnd : public CColorElement { @@ -62,7 +62,7 @@ public: CCEFadeEnd(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c, std::unique_ptr&& d) : x4_a(std::move(a)), x8_b(std::move(b)), xc_startFrame(std::move(c)), x10_endFrame(std::move(d)) {} - bool GetValue(int frame, zeus::CColor& colorOut) const; + bool GetValue(int frame, zeus::CColor& colorOut) const override; }; class CCEFade : public CColorElement { @@ -73,7 +73,7 @@ class CCEFade : public CColorElement { public: CCEFade(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c) : x4_a(std::move(a)), x8_b(std::move(b)), xc_endFrame(std::move(c)) {} - bool GetValue(int frame, zeus::CColor& colorOut) const; + bool GetValue(int frame, zeus::CColor& colorOut) const override; }; class CCEPulse : public CColorElement { @@ -86,11 +86,11 @@ public: CCEPulse(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c, std::unique_ptr&& d) : x4_aDuration(std::move(a)), x8_bDuration(std::move(b)), xc_aVal(std::move(c)), x10_bVal(std::move(d)) {} - bool GetValue(int frame, zeus::CColor& colorOut) const; + bool GetValue(int frame, zeus::CColor& colorOut) const override; }; class CCEParticleColor : public CColorElement { public: - bool GetValue(int frame, zeus::CColor& colorOut) const; + bool GetValue(int frame, zeus::CColor& colorOut) const override; }; } // namespace urde diff --git a/Runtime/Particle/CElementGen.hpp b/Runtime/Particle/CElementGen.hpp index 3d1f4ab11..275b6aad8 100644 --- a/Runtime/Particle/CElementGen.hpp +++ b/Runtime/Particle/CElementGen.hpp @@ -142,7 +142,7 @@ private: public: CElementGen(const TToken& gen, EModelOrientationType orientType = EModelOrientationType::Normal, EOptionalSystemFlags flags = EOptionalSystemFlags::One); - ~CElementGen(); + ~CElementGen() override; boo::ObjToken m_normalDataBind[2]; boo::ObjToken m_normalSubDataBind[2]; @@ -191,34 +191,34 @@ public: void RenderParticles(); void RenderParticlesIndirectTexture(); - bool Update(double); - void Render(const CActorLights* = nullptr); - void SetOrientation(const zeus::CTransform&); - void SetTranslation(const zeus::CVector3f&); - void SetGlobalOrientation(const zeus::CTransform&); - void SetGlobalTranslation(const zeus::CVector3f&); - void SetGlobalScale(const zeus::CVector3f&); - void SetLocalScale(const zeus::CVector3f&); + bool Update(double) override; + void Render(const CActorLights* = nullptr) override; + void SetOrientation(const zeus::CTransform&) override; + void SetTranslation(const zeus::CVector3f&) override; + void SetGlobalOrientation(const zeus::CTransform&) override; + void SetGlobalTranslation(const zeus::CVector3f&) override; + void SetGlobalScale(const zeus::CVector3f&) override; + void SetLocalScale(const zeus::CVector3f&) override; void SetGlobalOrientAndTrans(const zeus::CTransform& xf); - void SetParticleEmission(bool); - void SetModulationColor(const zeus::CColor&); - void SetGeneratorRate(float rate); - const zeus::CTransform& GetOrientation() const; - const zeus::CVector3f& GetTranslation() const; - const zeus::CTransform& GetGlobalOrientation() const; - const zeus::CVector3f& GetGlobalTranslation() const; - const zeus::CVector3f& GetGlobalScale() const; - const zeus::CColor& GetModulationColor() const; - float GetGeneratorRate() const { return x98_generatorRate; } - bool IsSystemDeletable() const; - std::optional GetBounds() const; - u32 GetParticleCount() const; - bool SystemHasLight() const; - CLight GetLight() const; - bool GetParticleEmission() const; - void DestroyParticles(); - void Reset(); - FourCC Get4CharId() const { return FOURCC('PART'); } + void SetParticleEmission(bool) override; + void SetModulationColor(const zeus::CColor&) override; + void SetGeneratorRate(float rate) override; + const zeus::CTransform& GetOrientation() const override; + const zeus::CVector3f& GetTranslation() const override; + const zeus::CTransform& GetGlobalOrientation() const override; + const zeus::CVector3f& GetGlobalTranslation() const override; + const zeus::CVector3f& GetGlobalScale() const override; + const zeus::CColor& GetModulationColor() const override; + float GetGeneratorRate() const override { return x98_generatorRate; } + bool IsSystemDeletable() const override; + std::optional GetBounds() const override; + u32 GetParticleCount() const override; + bool SystemHasLight() const override; + CLight GetLight() const override; + bool GetParticleEmission() const override; + void DestroyParticles() override; + void Reset() override; + FourCC Get4CharId() const override { return FOURCC('PART'); } size_t GetNumActiveChildParticles() const { return x290_activePartChildren.size(); } CParticleGen& GetActiveChildParticle(size_t idx) const { return *x290_activePartChildren[idx]; } bool IsIndirectTextured() const { return x28_loadedGenDesc->x54_x40_TEXR && x28_loadedGenDesc->x58_x44_TIND; } diff --git a/Runtime/Particle/CEmitterElement.hpp b/Runtime/Particle/CEmitterElement.hpp index 119faa780..93f1e3cfa 100644 --- a/Runtime/Particle/CEmitterElement.hpp +++ b/Runtime/Particle/CEmitterElement.hpp @@ -13,7 +13,7 @@ class CEESimpleEmitter : public CEmitterElement { public: CEESimpleEmitter(std::unique_ptr&& a, std::unique_ptr&& b) : x4_loc(std::move(a)), x8_vec(std::move(b)) {} - bool GetValue(int frame, zeus::CVector3f& pPos, zeus::CVector3f& pVel) const; + bool GetValue(int frame, zeus::CVector3f& pPos, zeus::CVector3f& pVel) const override; }; class CVESphere : public CEmitterElement { @@ -24,7 +24,7 @@ class CVESphere : public CEmitterElement { public: CVESphere(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c) : x4_sphereOrigin(std::move(a)), x8_sphereRadius(std::move(b)), xc_velocityMag(std::move(c)) {} - bool GetValue(int frame, zeus::CVector3f& pPos, zeus::CVector3f& pVel) const; + bool GetValue(int frame, zeus::CVector3f& pPos, zeus::CVector3f& pVel) const override; }; class CVEAngleSphere : public CEmitterElement { @@ -48,7 +48,7 @@ public: , x14_angleYBias(std::move(e)) , x18_angleXRange(std::move(f)) , x1c_angleYRange(std::move(g)) {} - bool GetValue(int frame, zeus::CVector3f& pPos, zeus::CVector3f& pVel) const; + bool GetValue(int frame, zeus::CVector3f& pPos, zeus::CVector3f& pVel) const override; }; } // namespace urde diff --git a/Runtime/Particle/CFlameWarp.hpp b/Runtime/Particle/CFlameWarp.hpp index 7c3c6091c..a3e2d364a 100644 --- a/Runtime/Particle/CFlameWarp.hpp +++ b/Runtime/Particle/CFlameWarp.hpp @@ -37,12 +37,12 @@ public: const zeus::CVector3f& GetFloatingPoint() const { return x80_floatingPoint; } void SetMaxDistSq(float d) { x8c_maxDistSq = d; } void SetStateManager(CStateManager& mgr) { x9c_stateMgr = &mgr; } - bool UpdateWarp() { return xa0_24_activated; } - void ModifyParticles(std::vector& particles); - void Activate(bool val) { xa0_24_activated = val; } - bool IsActivated() { return xa0_24_activated; } + bool UpdateWarp() override { return xa0_24_activated; } + void ModifyParticles(std::vector& particles) override; + void Activate(bool val) override { xa0_24_activated = val; } + bool IsActivated() override { return xa0_24_activated; } bool IsProcessed() const { return xa0_26_processed; } - FourCC Get4CharID() { return FOURCC('FWRP'); } + FourCC Get4CharID() override { return FOURCC('FWRP'); } void ResetPosition(const zeus::CVector3f& pos) { for (auto& vec : x4_collisionPoints) { vec = pos; diff --git a/Runtime/Particle/CIntElement.hpp b/Runtime/Particle/CIntElement.hpp index 63da02e50..a58460f9a 100644 --- a/Runtime/Particle/CIntElement.hpp +++ b/Runtime/Particle/CIntElement.hpp @@ -17,8 +17,8 @@ class CIEKeyframeEmitter : public CIntElement { public: CIEKeyframeEmitter(CInputStream& in); - bool GetValue(int frame, int& valOut) const; - int GetMaxValue() const; + bool GetValue(int frame, int& valOut) const override; + int GetMaxValue() const override; }; class CIEDeath : public CIntElement { @@ -28,8 +28,8 @@ class CIEDeath : public CIntElement { public: CIEDeath(std::unique_ptr&& a, std::unique_ptr&& b) : x4_a(std::move(a)), x8_b(std::move(b)) {} - bool GetValue(int frame, int& valOut) const; - int GetMaxValue() const; + bool GetValue(int frame, int& valOut) const override; + int GetMaxValue() const override; }; class CIEClamp : public CIntElement { @@ -40,8 +40,8 @@ class CIEClamp : public CIntElement { public: CIEClamp(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c) : x4_min(std::move(a)), x8_max(std::move(b)), xc_val(std::move(c)) {} - bool GetValue(int frame, int& valOut) const; - int GetMaxValue() const; + bool GetValue(int frame, int& valOut) const override; + int GetMaxValue() const override; }; class CIETimeChain : public CIntElement { @@ -52,8 +52,8 @@ class CIETimeChain : public CIntElement { public: CIETimeChain(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c) : x4_a(std::move(a)), x8_b(std::move(b)), xc_swFrame(std::move(c)) {} - bool GetValue(int frame, int& valOut) const; - int GetMaxValue() const; + bool GetValue(int frame, int& valOut) const override; + int GetMaxValue() const override; }; class CIEAdd : public CIntElement { @@ -62,8 +62,8 @@ class CIEAdd : public CIntElement { public: CIEAdd(std::unique_ptr&& a, std::unique_ptr&& b) : x4_a(std::move(a)), x8_b(std::move(b)) {} - bool GetValue(int frame, int& valOut) const; - int GetMaxValue() const; + bool GetValue(int frame, int& valOut) const override; + int GetMaxValue() const override; }; class CIEConstant : public CIntElement { @@ -71,8 +71,8 @@ class CIEConstant : public CIntElement { public: CIEConstant(int val) : x4_val(val) {} - bool GetValue(int frame, int& valOut) const; - int GetMaxValue() const; + bool GetValue(int frame, int& valOut) const override; + int GetMaxValue() const override; }; class CIEImpulse : public CIntElement { @@ -80,8 +80,8 @@ class CIEImpulse : public CIntElement { public: CIEImpulse(std::unique_ptr&& a) : x4_a(std::move(a)) {} - bool GetValue(int frame, int& valOut) const; - int GetMaxValue() const; + bool GetValue(int frame, int& valOut) const override; + int GetMaxValue() const override; }; class CIELifetimePercent : public CIntElement { @@ -89,8 +89,8 @@ class CIELifetimePercent : public CIntElement { public: CIELifetimePercent(std::unique_ptr&& a) : x4_percentVal(std::move(a)) {} - bool GetValue(int frame, int& valOut) const; - int GetMaxValue() const; + bool GetValue(int frame, int& valOut) const override; + int GetMaxValue() const override; }; class CIEInitialRandom : public CIntElement { @@ -100,8 +100,8 @@ class CIEInitialRandom : public CIntElement { public: CIEInitialRandom(std::unique_ptr&& a, std::unique_ptr&& b) : x4_a(std::move(a)), x8_b(std::move(b)) {} - bool GetValue(int frame, int& valOut) const; - int GetMaxValue() const; + bool GetValue(int frame, int& valOut) const override; + int GetMaxValue() const override; }; class CIEPulse : public CIntElement { @@ -114,8 +114,8 @@ public: CIEPulse(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c, std::unique_ptr&& d) : x4_aDuration(std::move(a)), x8_bDuration(std::move(b)), xc_aVal(std::move(c)), x10_bVal(std::move(d)) {} - bool GetValue(int frame, int& valOut) const; - int GetMaxValue() const; + bool GetValue(int frame, int& valOut) const override; + int GetMaxValue() const override; }; class CIEMultiply : public CIntElement { @@ -125,8 +125,8 @@ class CIEMultiply : public CIntElement { public: CIEMultiply(std::unique_ptr&& a, std::unique_ptr&& b) : x4_a(std::move(a)), x8_b(std::move(b)) {} - bool GetValue(int frame, int& valOut) const; - int GetMaxValue() const; + bool GetValue(int frame, int& valOut) const override; + int GetMaxValue() const override; }; class CIESampleAndHold : public CIntElement { @@ -139,8 +139,8 @@ class CIESampleAndHold : public CIntElement { public: CIESampleAndHold(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c) : x4_sampleSource(std::move(a)), xc_waitFramesMin(std::move(b)), x10_waitFramesMax(std::move(c)) {} - bool GetValue(int frame, int& valOut) const; - int GetMaxValue() const; + bool GetValue(int frame, int& valOut) const override; + int GetMaxValue() const override; }; class CIERandom : public CIntElement { @@ -150,8 +150,8 @@ class CIERandom : public CIntElement { public: CIERandom(std::unique_ptr&& a, std::unique_ptr&& b) : x4_min(std::move(a)), x8_max(std::move(b)) {} - bool GetValue(int frame, int& valOut) const; - int GetMaxValue() const; + bool GetValue(int frame, int& valOut) const override; + int GetMaxValue() const override; }; class CIETimeScale : public CIntElement { @@ -159,26 +159,26 @@ class CIETimeScale : public CIntElement { public: CIETimeScale(std::unique_ptr&& a) : x4_a(std::move(a)) {} - bool GetValue(int frame, int& valOut) const; - int GetMaxValue() const; + bool GetValue(int frame, int& valOut) const override; + int GetMaxValue() const override; }; class CIEGetCumulativeParticleCount : public CIntElement { public: - bool GetValue(int frame, int& valOut) const; - int GetMaxValue() const; + bool GetValue(int frame, int& valOut) const override; + int GetMaxValue() const override; }; class CIEGetActiveParticleCount : public CIntElement { public: - bool GetValue(int frame, int& valOut) const; - int GetMaxValue() const; + bool GetValue(int frame, int& valOut) const override; + int GetMaxValue() const override; }; class CIEGetEmitterTime : public CIntElement { public: - bool GetValue(int frame, int& valOut) const; - int GetMaxValue() const; + bool GetValue(int frame, int& valOut) const override; + int GetMaxValue() const override; }; class CIEModulo : public CIntElement { @@ -188,8 +188,8 @@ class CIEModulo : public CIntElement { public: CIEModulo(std::unique_ptr&& a, std::unique_ptr&& b) : x4_a(std::move(a)), x8_b(std::move(b)) {} - bool GetValue(int frame, int& valOut) const; - int GetMaxValue() const; + bool GetValue(int frame, int& valOut) const override; + int GetMaxValue() const override; }; class CIESubtract : public CIntElement { @@ -199,8 +199,8 @@ class CIESubtract : public CIntElement { public: CIESubtract(std::unique_ptr&& a, std::unique_ptr&& b) : x4_a(std::move(a)), x8_b(std::move(b)) {} - bool GetValue(int frame, int& valOut) const; - int GetMaxValue() const; + bool GetValue(int frame, int& valOut) const override; + int GetMaxValue() const override; }; } // namespace urde diff --git a/Runtime/Particle/CModVectorElement.hpp b/Runtime/Particle/CModVectorElement.hpp index 963e7333c..6e01908f4 100644 --- a/Runtime/Particle/CModVectorElement.hpp +++ b/Runtime/Particle/CModVectorElement.hpp @@ -21,7 +21,7 @@ public: , xc_maxMag(std::move(c)) , x10_minMag(std::move(d)) , x14_enableMinMag(std::move(e)) {} - bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const; + bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override; }; class CMVEExponentialImplosion : public CModVectorElement { @@ -39,7 +39,7 @@ public: , xc_maxMag(std::move(c)) , x10_minMag(std::move(d)) , x14_enableMinMag(std::move(e)) {} - bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const; + bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override; }; class CMVELinearImplosion : public CModVectorElement { @@ -57,7 +57,7 @@ public: , xc_maxMag(std::move(c)) , x10_minMag(std::move(d)) , x14_enableMinMag(std::move(e)) {} - bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const; + bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override; }; class CMVETimeChain : public CModVectorElement { @@ -69,7 +69,7 @@ public: CMVETimeChain(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c) : x4_a(std::move(a)), x8_b(std::move(b)), xc_swFrame(std::move(c)) {} - bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const; + bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override; }; class CMVEBounce : public CModVectorElement { @@ -85,7 +85,7 @@ class CMVEBounce : public CModVectorElement { public: CMVEBounce(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c, std::unique_ptr&& d, bool e); - bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const; + bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override; }; class CMVEConstant : public CModVectorElement { @@ -96,7 +96,7 @@ class CMVEConstant : public CModVectorElement { public: CMVEConstant(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c) : x4_x(std::move(a)), x8_y(std::move(b)), xc_z(std::move(c)) {} - bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const; + bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override; }; class CMVEFastConstant : public CModVectorElement { @@ -104,7 +104,7 @@ class CMVEFastConstant : public CModVectorElement { public: CMVEFastConstant(float a, float b, float c) : x4_val(a, b, c) {} - bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const; + bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override; }; class CMVEGravity : public CModVectorElement { @@ -112,7 +112,7 @@ class CMVEGravity : public CModVectorElement { public: CMVEGravity(std::unique_ptr&& a) : x4_a(std::move(a)) {} - bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const; + bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override; }; class CMVEExplode : public CModVectorElement { @@ -122,7 +122,7 @@ class CMVEExplode : public CModVectorElement { public: CMVEExplode(std::unique_ptr&& a, std::unique_ptr&& b) : x4_a(std::move(a)), x8_b(std::move(b)) {} - bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const; + bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override; }; class CMVESetPosition : public CModVectorElement { @@ -130,7 +130,7 @@ class CMVESetPosition : public CModVectorElement { public: CMVESetPosition(std::unique_ptr&& a) : x4_a(std::move(a)) {} - bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const; + bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override; }; class CMVEPulse : public CModVectorElement { @@ -143,7 +143,7 @@ public: CMVEPulse(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c, std::unique_ptr&& d) : x4_aDuration(std::move(a)), x8_bDuration(std::move(b)), xc_aVal(std::move(c)), x10_bVal(std::move(d)) {} - bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const; + bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override; }; class CMVEWind : public CModVectorElement { @@ -153,7 +153,7 @@ class CMVEWind : public CModVectorElement { public: CMVEWind(std::unique_ptr&& a, std::unique_ptr&& b) : x4_velocity(std::move(a)), x8_factor(std::move(b)) {} - bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const; + bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override; }; class CMVESwirl : public CModVectorElement { @@ -169,7 +169,7 @@ public: , x8_curveBinormal(std::move(b)) , xc_filterGain(std::move(c)) , x10_tangentialVelocity(std::move(d)) {} - bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const; + bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const override; }; } // namespace urde diff --git a/Runtime/Particle/CParticleElectric.hpp b/Runtime/Particle/CParticleElectric.hpp index 3e94945ed..22e8cb04e 100644 --- a/Runtime/Particle/CParticleElectric.hpp +++ b/Runtime/Particle/CParticleElectric.hpp @@ -105,39 +105,39 @@ private: public: CParticleElectric(const TToken& desc); - bool Update(double); - void Render(const CActorLights* = nullptr); - void SetOrientation(const zeus::CTransform&); - void SetTranslation(const zeus::CVector3f&); - void SetGlobalOrientation(const zeus::CTransform&); - void SetGlobalTranslation(const zeus::CVector3f&); - void SetGlobalScale(const zeus::CVector3f&); - void SetLocalScale(const zeus::CVector3f&); - void SetParticleEmission(bool); - void SetModulationColor(const zeus::CColor&); + bool Update(double) override; + void Render(const CActorLights* = nullptr) override; + void SetOrientation(const zeus::CTransform&) override; + void SetTranslation(const zeus::CVector3f&) override; + void SetGlobalOrientation(const zeus::CTransform&) override; + void SetGlobalTranslation(const zeus::CVector3f&) override; + void SetGlobalScale(const zeus::CVector3f&) override; + void SetLocalScale(const zeus::CVector3f&) override; + void SetParticleEmission(bool) override; + void SetModulationColor(const zeus::CColor&) override; void SetOverrideIPos(const zeus::CVector3f& vec) { x178_overrideIPos.emplace(vec); } void SetOverrideIVel(const zeus::CVector3f& vec) { x188_overrideIVel.emplace(vec); } void SetOverrideFPos(const zeus::CVector3f& vec) { x198_overrideFPos.emplace(vec); } void SetOverrideFVel(const zeus::CVector3f& vec) { x1a8_overrideFVel.emplace(vec); } - const zeus::CTransform& GetOrientation() const; - const zeus::CVector3f& GetTranslation() const; - const zeus::CTransform& GetGlobalOrientation() const; - const zeus::CVector3f& GetGlobalTranslation() const; - const zeus::CVector3f& GetGlobalScale() const; - const zeus::CColor& GetModulationColor() const; - bool IsSystemDeletable() const; - std::optional GetBounds() const; - u32 GetParticleCount() const; - bool SystemHasLight() const; - CLight GetLight() const; - bool GetParticleEmission() const; - void DestroyParticles(); - void Reset() {} + const zeus::CTransform& GetOrientation() const override; + const zeus::CVector3f& GetTranslation() const override; + const zeus::CTransform& GetGlobalOrientation() const override; + const zeus::CVector3f& GetGlobalTranslation() const override; + const zeus::CVector3f& GetGlobalScale() const override; + const zeus::CColor& GetModulationColor() const override; + bool IsSystemDeletable() const override; + std::optional GetBounds() const override; + u32 GetParticleCount() const override; + bool SystemHasLight() const override; + CLight GetLight() const override; + bool GetParticleEmission() const override; + void DestroyParticles() override; + void Reset() override {} void ForceParticleCreation(s32 count) { CGlobalRandom gRnd{x14c_randState}; CreateNewParticles(count); } - FourCC Get4CharId() const { return FOURCC('ELSC'); } + FourCC Get4CharId() const override { return FOURCC('ELSC'); } }; } // namespace urde diff --git a/Runtime/Particle/CParticleSwoosh.hpp b/Runtime/Particle/CParticleSwoosh.hpp index 6432dc1f1..46c85b7c1 100644 --- a/Runtime/Particle/CParticleSwoosh.hpp +++ b/Runtime/Particle/CParticleSwoosh.hpp @@ -129,35 +129,35 @@ class CParticleSwoosh : public CParticleGen { public: CParticleSwoosh(const TToken& desc, int); - ~CParticleSwoosh(); + ~CParticleSwoosh() override; CSwooshDescription* GetDesc() { return x1c_desc.GetObj(); } - bool Update(double); - void Render(const CActorLights* = nullptr); - void SetOrientation(const zeus::CTransform&); - void SetTranslation(const zeus::CVector3f&); - void SetGlobalOrientation(const zeus::CTransform&); - void SetGlobalTranslation(const zeus::CVector3f&); - void SetGlobalScale(const zeus::CVector3f&); - void SetLocalScale(const zeus::CVector3f&); - void SetParticleEmission(bool); - void SetModulationColor(const zeus::CColor&); - const zeus::CTransform& GetOrientation() const; - const zeus::CVector3f& GetTranslation() const; - const zeus::CTransform& GetGlobalOrientation() const; - const zeus::CVector3f& GetGlobalTranslation() const; - const zeus::CVector3f& GetGlobalScale() const; - const zeus::CColor& GetModulationColor() const; - bool IsSystemDeletable() const; - std::optional GetBounds() const; - u32 GetParticleCount() const; - bool SystemHasLight() const; - CLight GetLight() const; - bool GetParticleEmission() const; - void DestroyParticles(); - void Reset() {} - FourCC Get4CharId() const { return FOURCC('SWHC'); } + bool Update(double) override; + void Render(const CActorLights* = nullptr) override; + void SetOrientation(const zeus::CTransform&) override; + void SetTranslation(const zeus::CVector3f&) override; + void SetGlobalOrientation(const zeus::CTransform&) override; + void SetGlobalTranslation(const zeus::CVector3f&) override; + void SetGlobalScale(const zeus::CVector3f&) override; + void SetLocalScale(const zeus::CVector3f&) override; + void SetParticleEmission(bool) override; + void SetModulationColor(const zeus::CColor&) override; + const zeus::CTransform& GetOrientation() const override; + const zeus::CVector3f& GetTranslation() const override; + const zeus::CTransform& GetGlobalOrientation() const override; + const zeus::CVector3f& GetGlobalTranslation() const override; + const zeus::CVector3f& GetGlobalScale() const override; + const zeus::CColor& GetModulationColor() const override; + bool IsSystemDeletable() const override; + std::optional GetBounds() const override; + u32 GetParticleCount() const override; + bool SystemHasLight() const override; + CLight GetLight() const override; + bool GetParticleEmission() const override; + void DestroyParticles() override; + void Reset() override {} + FourCC Get4CharId() const override { return FOURCC('SWHC'); } void SetRenderGaps(bool r) { x1d0_27_renderGaps = r; } void DoWarmupUpdate() { diff --git a/Runtime/Particle/CRealElement.hpp b/Runtime/Particle/CRealElement.hpp index a007f8ee1..dad6d1daf 100644 --- a/Runtime/Particle/CRealElement.hpp +++ b/Runtime/Particle/CRealElement.hpp @@ -17,7 +17,7 @@ class CREKeyframeEmitter : public CRealElement { public: CREKeyframeEmitter(CInputStream& in); - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CRELifetimeTween : public CRealElement { @@ -27,7 +27,7 @@ class CRELifetimeTween : public CRealElement { public: CRELifetimeTween(std::unique_ptr&& a, std::unique_ptr&& b) : x4_a(std::move(a)), x8_b(std::move(b)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREConstant : public CRealElement { @@ -35,8 +35,8 @@ class CREConstant : public CRealElement { public: CREConstant(float val) : x4_val(val) {} - bool GetValue(int frame, float& valOut) const; - bool IsConstant() const { return true; } + bool GetValue(int frame, float& valOut) const override; + bool IsConstant() const override { return true; } }; class CRETimeChain : public CRealElement { @@ -47,7 +47,7 @@ class CRETimeChain : public CRealElement { public: CRETimeChain(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c) : x4_a(std::move(a)), x8_b(std::move(b)), xc_swFrame(std::move(c)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREAdd : public CRealElement { @@ -57,7 +57,7 @@ class CREAdd : public CRealElement { public: CREAdd(std::unique_ptr&& a, std::unique_ptr&& b) : x4_a(std::move(a)), x8_b(std::move(b)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREClamp : public CRealElement { @@ -68,7 +68,7 @@ class CREClamp : public CRealElement { public: CREClamp(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c) : x4_min(std::move(a)), x8_max(std::move(b)), xc_val(std::move(c)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREInitialRandom : public CRealElement { @@ -78,8 +78,8 @@ class CREInitialRandom : public CRealElement { public: CREInitialRandom(std::unique_ptr&& a, std::unique_ptr&& b) : x4_min(std::move(a)), x8_max(std::move(b)) {} - bool GetValue(int frame, float& valOut) const; - bool IsConstant() const { return true; } + bool GetValue(int frame, float& valOut) const override; + bool IsConstant() const override { return true; } }; class CRERandom : public CRealElement { @@ -89,7 +89,7 @@ class CRERandom : public CRealElement { public: CRERandom(std::unique_ptr&& a, std::unique_ptr&& b) : x4_min(std::move(a)), x8_max(std::move(b)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREDotProduct : public CRealElement { @@ -99,7 +99,7 @@ class CREDotProduct : public CRealElement { public: CREDotProduct(std::unique_ptr&& a, std::unique_ptr&& b) : x4_a(std::move(a)), x8_b(std::move(b)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREMultiply : public CRealElement { @@ -109,7 +109,7 @@ class CREMultiply : public CRealElement { public: CREMultiply(std::unique_ptr&& a, std::unique_ptr&& b) : x4_a(std::move(a)), x8_b(std::move(b)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREPulse : public CRealElement { @@ -122,7 +122,7 @@ public: CREPulse(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c, std::unique_ptr&& d) : x4_aDuration(std::move(a)), x8_bDuration(std::move(b)), xc_valA(std::move(c)), x10_valB(std::move(d)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CRETimeScale : public CRealElement { @@ -130,7 +130,7 @@ class CRETimeScale : public CRealElement { public: CRETimeScale(std::unique_ptr&& a) : x4_a(std::move(a)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CRELifetimePercent : public CRealElement { @@ -138,7 +138,7 @@ class CRELifetimePercent : public CRealElement { public: CRELifetimePercent(std::unique_ptr&& a) : x4_percentVal(std::move(a)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CRESineWave : public CRealElement { @@ -149,7 +149,7 @@ class CRESineWave : public CRealElement { public: CRESineWave(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c) : x4_frequency(std::move(a)), x8_amplitude(std::move(b)), xc_phase(std::move(c)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREInitialSwitch : public CRealElement { @@ -159,7 +159,7 @@ class CREInitialSwitch : public CRealElement { public: CREInitialSwitch(std::unique_ptr&& a, std::unique_ptr&& b) : x4_a(std::move(a)), x8_b(std::move(b)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CRECompareLessThan : public CRealElement { @@ -172,7 +172,7 @@ public: CRECompareLessThan(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c, std::unique_ptr&& d) : x4_a(std::move(a)), x8_b(std::move(b)), xc_c(std::move(c)), x10_d(std::move(d)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CRECompareEquals : public CRealElement { @@ -185,57 +185,57 @@ public: CRECompareEquals(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c, std::unique_ptr&& d) : x4_a(std::move(a)), x8_b(std::move(b)), xc_c(std::move(c)), x10_d(std::move(d)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREParticleAccessParam1 : public CRealElement { public: - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREParticleAccessParam2 : public CRealElement { public: - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREParticleAccessParam3 : public CRealElement { public: - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREParticleAccessParam4 : public CRealElement { public: - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREParticleAccessParam5 : public CRealElement { public: - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREParticleAccessParam6 : public CRealElement { public: - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREParticleAccessParam7 : public CRealElement { public: - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREParticleAccessParam8 : public CRealElement { public: - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREParticleSizeOrLineLength : public CRealElement { public: - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREParticleRotationOrLineWidth : public CRealElement { public: - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CRESubtract : public CRealElement { @@ -245,7 +245,7 @@ class CRESubtract : public CRealElement { public: CRESubtract(std::unique_ptr&& a, std::unique_ptr&& b) : x4_a(std::move(a)), x8_b(std::move(b)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREVectorMagnitude : public CRealElement { @@ -253,7 +253,7 @@ class CREVectorMagnitude : public CRealElement { public: CREVectorMagnitude(std::unique_ptr&& a) : x4_a(std::move(a)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREVectorXToReal : public CRealElement { @@ -261,7 +261,7 @@ class CREVectorXToReal : public CRealElement { public: CREVectorXToReal(std::unique_ptr&& a) : x4_a(std::move(a)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREVectorYToReal : public CRealElement { @@ -269,7 +269,7 @@ class CREVectorYToReal : public CRealElement { public: CREVectorYToReal(std::unique_ptr&& a) : x4_a(std::move(a)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREVectorZToReal : public CRealElement { @@ -277,7 +277,7 @@ class CREVectorZToReal : public CRealElement { public: CREVectorZToReal(std::unique_ptr&& a) : x4_a(std::move(a)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CRECEXT : public CRealElement { @@ -285,7 +285,7 @@ class CRECEXT : public CRealElement { public: CRECEXT(std::unique_ptr&& a) : x4_a(std::move(a)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREIntTimesReal : public CRealElement { @@ -295,7 +295,7 @@ class CREIntTimesReal : public CRealElement { public: CREIntTimesReal(std::unique_ptr&& a, std::unique_ptr&& b) : x4_a(std::move(a)), x8_b(std::move(b)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREConstantRange : public CRealElement { @@ -315,7 +315,7 @@ public: , x10_inRange(std::move(d)) , x14_outOfRange(std::move(e)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREGetComponentRed : public CRealElement { @@ -324,7 +324,7 @@ class CREGetComponentRed : public CRealElement { public: CREGetComponentRed(std::unique_ptr&& a) : x4_a(std::move(a)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREGetComponentGreen : public CRealElement { @@ -333,7 +333,7 @@ class CREGetComponentGreen : public CRealElement { public: CREGetComponentGreen(std::unique_ptr&& a) : x4_a(std::move(a)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREGetComponentBlue : public CRealElement { @@ -342,7 +342,7 @@ class CREGetComponentBlue : public CRealElement { public: CREGetComponentBlue(std::unique_ptr&& a) : x4_a(std::move(a)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; class CREGetComponentAlpha : public CRealElement { @@ -351,6 +351,6 @@ class CREGetComponentAlpha : public CRealElement { public: CREGetComponentAlpha(std::unique_ptr&& a) : x4_a(std::move(a)) {} - bool GetValue(int frame, float& valOut) const; + bool GetValue(int frame, float& valOut) const override; }; } // namespace urde diff --git a/Runtime/Particle/CUVElement.hpp b/Runtime/Particle/CUVElement.hpp index 099fe4e99..0c8b052f4 100644 --- a/Runtime/Particle/CUVElement.hpp +++ b/Runtime/Particle/CUVElement.hpp @@ -26,10 +26,10 @@ struct CUVEConstant : public CUVElement { public: CUVEConstant(TToken&& tex) : x4_tex(std::move(tex)) {} - TLockedToken GetValueTexture(int frame) const { return TLockedToken(x4_tex); } - void GetValueUV(int frame, SUVElementSet& valOut) const { valOut = {0.f, 0.f, 1.f, 1.f}; } - bool HasConstantTexture() const { return true; } - bool HasConstantUV() const { return true; } + TLockedToken GetValueTexture(int frame) const override { return TLockedToken(x4_tex); } + void GetValueUV(int frame, SUVElementSet& valOut) const override { valOut = {0.f, 0.f, 1.f, 1.f}; } + bool HasConstantTexture() const override { return true; } + bool HasConstantUV() const override { return true; } }; struct CUVEAnimTexture : public CUVElement { @@ -44,10 +44,10 @@ public: CUVEAnimTexture(TToken&& tex, std::unique_ptr&& tileW, std::unique_ptr&& tileH, std::unique_ptr&& strideW, std::unique_ptr&& strideH, std::unique_ptr&& cycleFrames, bool loop); - TLockedToken GetValueTexture(int frame) const { return TLockedToken(x4_tex); } - void GetValueUV(int frame, SUVElementSet& valOut) const; - bool HasConstantTexture() const { return true; } - bool HasConstantUV() const { return false; } + TLockedToken GetValueTexture(int frame) const override { return TLockedToken(x4_tex); } + void GetValueUV(int frame, SUVElementSet& valOut) const override; + bool HasConstantTexture() const override { return true; } + bool HasConstantUV() const override { return false; } }; } // namespace urde diff --git a/Runtime/Particle/CVectorElement.hpp b/Runtime/Particle/CVectorElement.hpp index 434ace7c4..cda30aba4 100644 --- a/Runtime/Particle/CVectorElement.hpp +++ b/Runtime/Particle/CVectorElement.hpp @@ -17,7 +17,7 @@ class CVEKeyframeEmitter : public CVectorElement { public: CVEKeyframeEmitter(CInputStream& in); - bool GetValue(int frame, zeus::CVector3f& valOut) const; + bool GetValue(int frame, zeus::CVector3f& valOut) const override; }; class CVECone : public CVectorElement { @@ -28,7 +28,7 @@ class CVECone : public CVectorElement { public: CVECone(std::unique_ptr&& a, std::unique_ptr&& b); - bool GetValue(int frame, zeus::CVector3f& valOut) const; + bool GetValue(int frame, zeus::CVector3f& valOut) const override; }; class CVETimeChain : public CVectorElement { @@ -40,7 +40,7 @@ public: CVETimeChain(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c) : x4_a(std::move(a)), x8_b(std::move(b)), xc_swFrame(std::move(c)) {} - bool GetValue(int frame, zeus::CVector3f& valOut) const; + bool GetValue(int frame, zeus::CVector3f& valOut) const override; }; class CVEAngleCone : public CVectorElement { @@ -58,7 +58,7 @@ public: , xc_angleXRange(std::move(c)) , x10_angleYRange(std::move(d)) , x14_magnitude(std::move(e)) {} - bool GetValue(int frame, zeus::CVector3f& valOut) const; + bool GetValue(int frame, zeus::CVector3f& valOut) const override; }; class CVEAdd : public CVectorElement { @@ -68,7 +68,7 @@ class CVEAdd : public CVectorElement { public: CVEAdd(std::unique_ptr&& a, std::unique_ptr&& b) : x4_a(std::move(a)), x8_b(std::move(b)) {} - bool GetValue(int frame, zeus::CVector3f& valOut) const; + bool GetValue(int frame, zeus::CVector3f& valOut) const override; }; class CVECircleCluster : public CVectorElement { @@ -81,7 +81,7 @@ class CVECircleCluster : public CVectorElement { public: CVECircleCluster(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c, std::unique_ptr&& d); - bool GetValue(int frame, zeus::CVector3f& valOut) const; + bool GetValue(int frame, zeus::CVector3f& valOut) const override; }; class CVEConstant : public CVectorElement { @@ -92,7 +92,7 @@ class CVEConstant : public CVectorElement { public: CVEConstant(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c) : x4_a(std::move(a)), x8_b(std::move(b)), xc_c(std::move(c)) {} - bool GetValue(int frame, zeus::CVector3f& valOut) const; + bool GetValue(int frame, zeus::CVector3f& valOut) const override; }; class CVEFastConstant : public CVectorElement { @@ -100,8 +100,8 @@ class CVEFastConstant : public CVectorElement { public: CVEFastConstant(float a, float b, float c) : x4_val(a, b, c) {} - bool GetValue(int frame, zeus::CVector3f& valOut) const; - bool IsFastConstant() const { return true; } + bool GetValue(int frame, zeus::CVector3f& valOut) const override; + bool IsFastConstant() const override { return true; } }; class CVECircle : public CVectorElement { @@ -115,7 +115,7 @@ class CVECircle : public CVectorElement { public: CVECircle(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c, std::unique_ptr&& d, std::unique_ptr&& e); - bool GetValue(int frame, zeus::CVector3f& valOut) const; + bool GetValue(int frame, zeus::CVector3f& valOut) const override; }; class CVEMultiply : public CVectorElement { @@ -125,7 +125,7 @@ class CVEMultiply : public CVectorElement { public: CVEMultiply(std::unique_ptr&& a, std::unique_ptr&& b) : x4_a(std::move(a)), x8_b(std::move(b)) {} - bool GetValue(int frame, zeus::CVector3f& valOut) const; + bool GetValue(int frame, zeus::CVector3f& valOut) const override; }; class CVERealToVector : public CVectorElement { @@ -133,7 +133,7 @@ class CVERealToVector : public CVectorElement { public: CVERealToVector(std::unique_ptr&& a) : x4_a(std::move(a)) {} - bool GetValue(int frame, zeus::CVector3f& valOut) const; + bool GetValue(int frame, zeus::CVector3f& valOut) const override; }; class CVEPulse : public CVectorElement { @@ -146,42 +146,42 @@ public: CVEPulse(std::unique_ptr&& a, std::unique_ptr&& b, std::unique_ptr&& c, std::unique_ptr&& d) : x4_aDuration(std::move(a)), x8_bDuration(std::move(b)), xc_aVal(std::move(c)), x10_bVal(std::move(d)) {} - bool GetValue(int frame, zeus::CVector3f& valOut) const; + bool GetValue(int frame, zeus::CVector3f& valOut) const override; }; class CVEParticleVelocity : public CVectorElement { public: - bool GetValue(int frame, zeus::CVector3f& valOut) const; + bool GetValue(int frame, zeus::CVector3f& valOut) const override; }; class CVEParticleColor : public CVectorElement { public: - bool GetValue(int frame, zeus::CVector3f& valOut) const; + bool GetValue(int frame, zeus::CVector3f& valOut) const override; }; class CVEParticleLocation : public CVectorElement { public: - bool GetValue(int frame, zeus::CVector3f& valOut) const; + bool GetValue(int frame, zeus::CVector3f& valOut) const override; }; class CVEParticleSystemOrientationFront : public CVectorElement { public: - bool GetValue(int frame, zeus::CVector3f& valOut) const; + bool GetValue(int frame, zeus::CVector3f& valOut) const override; }; class CVEParticleSystemOrientationUp : public CVectorElement { public: - bool GetValue(int frame, zeus::CVector3f& valOut) const; + bool GetValue(int frame, zeus::CVector3f& valOut) const override; }; class CVEParticleSystemOrientationRight : public CVectorElement { public: - bool GetValue(int frame, zeus::CVector3f& valOut) const; + bool GetValue(int frame, zeus::CVector3f& valOut) const override; }; class CVEParticleSystemTranslation : public CVectorElement { public: - bool GetValue(int frame, zeus::CVector3f& valOut) const; + bool GetValue(int frame, zeus::CVector3f& valOut) const override; }; class CVESubtract : public CVectorElement { @@ -191,7 +191,7 @@ class CVESubtract : public CVectorElement { public: CVESubtract(std::unique_ptr&& a, std::unique_ptr&& b) : x4_a(std::move(a)), x8_b(std::move(b)) {} - bool GetValue(int frame, zeus::CVector3f& valOut) const; + bool GetValue(int frame, zeus::CVector3f& valOut) const override; }; class CVEColorToVector : public CVectorElement { @@ -200,7 +200,7 @@ class CVEColorToVector : public CVectorElement { public: CVEColorToVector(std::unique_ptr&& a) : x4_a(std::move(a)) {} - bool GetValue(int frame, zeus::CVector3f& valOut) const; + bool GetValue(int frame, zeus::CVector3f& valOut) const override; }; } // namespace urde diff --git a/Runtime/Weapon/CBeamProjectile.hpp b/Runtime/Weapon/CBeamProjectile.hpp index 014eee185..a9fcf573c 100644 --- a/Runtime/Weapon/CBeamProjectile.hpp +++ b/Runtime/Weapon/CBeamProjectile.hpp @@ -39,7 +39,7 @@ public: EMaterialTypes matType, const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner, EProjectileAttrib attribs, bool growingBeam); - void Accept(IVisitor& visitor); + void Accept(IVisitor& visitor) override; float GetMaxRadius() const { return x2f4_beamRadius; } const zeus::CVector3f& GetSurfaceNormal() const { return x30c_collisionNormal; } EDamageType GetDamageType() const { return x2f8_damageType; } @@ -54,8 +54,8 @@ public: s32 GetIntMaxLength() const { return x2e8_intMaxLength; } TUniqueId GetCollisionActorId() const { return x2fe_collisionActorId; } - std::optional GetTouchBounds() const; - void CalculateRenderBounds(); + std::optional GetTouchBounds() const override; + void CalculateRenderBounds() override; virtual void ResetBeam(CStateManager&, bool); virtual void UpdateFx(const zeus::CTransform&, float, CStateManager&); virtual void Fire(const zeus::CTransform&, CStateManager&, bool) = 0; diff --git a/Runtime/Weapon/CBomb.hpp b/Runtime/Weapon/CBomb.hpp index 3c348aacb..c3c6f2aea 100644 --- a/Runtime/Weapon/CBomb.hpp +++ b/Runtime/Weapon/CBomb.hpp @@ -24,15 +24,15 @@ public: CBomb(const TCachedToken& particle1, const TCachedToken& particle2, TUniqueId uid, TAreaId aid, TUniqueId playerId, float f1, const zeus::CTransform& xf, const CDamageInfo& dInfo); - void Accept(IVisitor&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; - void Render(const CStateManager&) const {} - void Touch(CActor&, CStateManager&); + void Accept(IVisitor&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; + void Render(const CStateManager&) const override {} + void Touch(CActor&, CStateManager&) override; void Explode(const zeus::CVector3f&, CStateManager&); void UpdateLight(float, CStateManager&); - std::optional GetTouchBounds() const; + std::optional GetTouchBounds() const override; void SetVelocityWR(const zeus::CVector3f& vel) { x158_velocity = vel; } void SetConstantAccelerationWR(const zeus::CVector3f& acc) { x164_acceleration = acc; } void SetFuseDisabled(bool b) { x190_26_disableFuse = false; } diff --git a/Runtime/Weapon/CElectricBeamProjectile.hpp b/Runtime/Weapon/CElectricBeamProjectile.hpp index 5e364679c..e89dc18d1 100644 --- a/Runtime/Weapon/CElectricBeamProjectile.hpp +++ b/Runtime/Weapon/CElectricBeamProjectile.hpp @@ -27,12 +27,12 @@ public: const zeus::CTransform&, EMaterialTypes, const CDamageInfo&, TUniqueId, TAreaId, TUniqueId, EProjectileAttrib); - void Accept(IVisitor&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void PreRender(CStateManager&, const zeus::CFrustum&); - void Touch(CActor&, CStateManager&){}; - void UpdateFx(const zeus::CTransform&, float, CStateManager&); - void ResetBeam(CStateManager&, bool); - void Fire(const zeus::CTransform&, CStateManager&, bool); + void Accept(IVisitor&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void PreRender(CStateManager&, const zeus::CFrustum&) override; + void Touch(CActor&, CStateManager&) override {} + void UpdateFx(const zeus::CTransform&, float, CStateManager&) override; + void ResetBeam(CStateManager&, bool) override; + void Fire(const zeus::CTransform&, CStateManager&, bool) override; }; } // namespace urde \ No newline at end of file diff --git a/Runtime/Weapon/CFlameThrower.hpp b/Runtime/Weapon/CFlameThrower.hpp index f456312ab..9d7a6462e 100644 --- a/Runtime/Weapon/CFlameThrower.hpp +++ b/Runtime/Weapon/CFlameThrower.hpp @@ -51,10 +51,10 @@ public: const CDamageInfo& dInfo, TUniqueId uid, TAreaId aId, TUniqueId owner, EProjectileAttrib attribs, CAssetId playerSteamTxtr, s16 playerHitSfx, CAssetId playerIceTxtr); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; void SetTransform(const zeus::CTransform& xf, float); void Reset(CStateManager&, bool); void Fire(const zeus::CTransform&, CStateManager&, bool); diff --git a/Runtime/Weapon/CGameProjectile.hpp b/Runtime/Weapon/CGameProjectile.hpp index 9d7d7185d..1699b51bd 100644 --- a/Runtime/Weapon/CGameProjectile.hpp +++ b/Runtime/Weapon/CGameProjectile.hpp @@ -61,9 +61,9 @@ public: const std::optional>& visorParticle, u16 visorSfx, bool sendCollideMsg); - virtual void Accept(IVisitor& visitor); + void Accept(IVisitor& visitor) override; virtual void ResolveCollisionWithActor(const CRayCastResult& res, CActor& act, CStateManager& mgr); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; static EProjectileAttrib GetBeamAttribType(EWeaponType wType); void DeleteProjectileLight(CStateManager&); void CreateProjectileLight(std::string_view, const CLight&, CStateManager&); @@ -81,7 +81,7 @@ public: CProjectileTouchResult CanCollideWithGameObject(CActor& act, CStateManager& mgr) const; CProjectileTouchResult CanCollideWithTrigger(CActor& act, CStateManager& mgr) const; zeus::CAABox GetProjectileBounds() const; - std::optional GetTouchBounds() const; + std::optional GetTouchBounds() const override; CProjectileWeapon& ProjectileWeapon() { return x170_projectile; } const CProjectileWeapon& GetProjectileWeapon() const { return x170_projectile; } TUniqueId GetHomingTargetId() const { return x2c0_homingTargetId; } diff --git a/Runtime/Weapon/CIceBeam.hpp b/Runtime/Weapon/CIceBeam.hpp index cb6294e85..66cd20c81 100644 --- a/Runtime/Weapon/CIceBeam.hpp +++ b/Runtime/Weapon/CIceBeam.hpp @@ -18,17 +18,17 @@ public: CIceBeam(CAssetId characterId, EWeaponType type, TUniqueId playerId, EMaterialTypes playerMaterial, const zeus::CVector3f& scale); - void PreRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf); - void PostRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf); - void UpdateGunFx(bool shotSmoke, float dt, const CStateManager& mgr, const zeus::CTransform& xf); + void PreRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf) override; + void PostRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf) override; + void UpdateGunFx(bool shotSmoke, float dt, const CStateManager& mgr, const zeus::CTransform& xf) override; void Fire(bool underwater, float dt, EChargeState chargeState, const zeus::CTransform& xf, CStateManager& mgr, - TUniqueId homingTarget, float chargeFactor1, float chargeFactor2); - void EnableFx(bool enable); - void EnableSecondaryFx(ESecondaryFxType type); - void Update(float dt, CStateManager& mgr); - void Load(CStateManager& mgr, bool subtypeBasePose); - void Unload(CStateManager& mgr); - bool IsLoaded() const; + TUniqueId homingTarget, float chargeFactor1, float chargeFactor2) override; + void EnableFx(bool enable) override; + void EnableSecondaryFx(ESecondaryFxType type) override; + void Update(float dt, CStateManager& mgr) override; + void Load(CStateManager& mgr, bool subtypeBasePose) override; + void Unload(CStateManager& mgr) override; + bool IsLoaded() const override; }; } // namespace urde diff --git a/Runtime/Weapon/CPhazonBeam.hpp b/Runtime/Weapon/CPhazonBeam.hpp index 711c009a9..d1867504b 100644 --- a/Runtime/Weapon/CPhazonBeam.hpp +++ b/Runtime/Weapon/CPhazonBeam.hpp @@ -37,18 +37,18 @@ public: void UpdateBeam(float dt, const zeus::CTransform& targetXf, const zeus::CVector3f& localBeamPos, CStateManager& mgr); void CreateBeam(CStateManager& mgr); - void PreRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf); - void PostRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf); - void UpdateGunFx(bool shotSmoke, float dt, const CStateManager& mgr, const zeus::CTransform& xf); + void PreRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf) override; + void PostRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf) override; + void UpdateGunFx(bool shotSmoke, float dt, const CStateManager& mgr, const zeus::CTransform& xf) override; void Fire(bool underwater, float dt, EChargeState chargeState, const zeus::CTransform& xf, CStateManager& mgr, - TUniqueId homingTarget, float chargeFactor1, float chargeFactor2); - void Update(float dt, CStateManager& mgr); - void Load(CStateManager& mgr, bool subtypeBasePose); - void Unload(CStateManager& mgr); - bool IsLoaded() const; + TUniqueId homingTarget, float chargeFactor1, float chargeFactor2) override; + void Update(float dt, CStateManager& mgr) override; + void Load(CStateManager& mgr, bool subtypeBasePose) override; + void Unload(CStateManager& mgr) override; + bool IsLoaded() const override; void Draw(bool drawSuitArm, const CStateManager& mgr, const zeus::CTransform& xf, const CModelFlags& flags, - const CActorLights* lights) const; - void DrawMuzzleFx(const CStateManager& mgr) const; + const CActorLights* lights) const override; + void DrawMuzzleFx(const CStateManager& mgr) const override; }; } // namespace urde diff --git a/Runtime/Weapon/CPlasmaBeam.hpp b/Runtime/Weapon/CPlasmaBeam.hpp index 1546ed978..be2594d80 100644 --- a/Runtime/Weapon/CPlasmaBeam.hpp +++ b/Runtime/Weapon/CPlasmaBeam.hpp @@ -30,15 +30,15 @@ public: } void DeleteBeam(CStateManager& mgr); - void PostRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf); - void UpdateGunFx(bool shotSmoke, float dt, const CStateManager& mgr, const zeus::CTransform& xf); + void PostRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf) override; + void UpdateGunFx(bool shotSmoke, float dt, const CStateManager& mgr, const zeus::CTransform& xf) override; void Fire(bool underwater, float dt, EChargeState chargeState, const zeus::CTransform& xf, CStateManager& mgr, - TUniqueId homingTarget, float chargeFactor1, float chargeFactor2); - void EnableSecondaryFx(ESecondaryFxType type); - void Update(float dt, CStateManager& mgr); - void Load(CStateManager& mgr, bool subtypeBasePose); - void Unload(CStateManager& mgr); - bool IsLoaded() const; + TUniqueId homingTarget, float chargeFactor1, float chargeFactor2) override; + void EnableSecondaryFx(ESecondaryFxType type) override; + void Update(float dt, CStateManager& mgr) override; + void Load(CStateManager& mgr, bool subtypeBasePose) override; + void Unload(CStateManager& mgr) override; + bool IsLoaded() const override; }; } // namespace urde diff --git a/Runtime/Weapon/CPlasmaProjectile.hpp b/Runtime/Weapon/CPlasmaProjectile.hpp index fe6e3053f..368daf534 100644 --- a/Runtime/Weapon/CPlasmaProjectile.hpp +++ b/Runtime/Weapon/CPlasmaProjectile.hpp @@ -104,14 +104,14 @@ public: const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner, const PlayerEffectResoures& res, bool growingBeam, EProjectileAttrib attribs); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr); - void ResetBeam(CStateManager& mgr, bool fullReset); - void UpdateFx(const zeus::CTransform& xf, float dt, CStateManager& mgr); - void Fire(const zeus::CTransform& xf, CStateManager& mgr, bool b); - void Touch(CActor& other, CStateManager& mgr); - bool CanRenderUnsorted(const CStateManager& mgr) const; - void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const; - void Render(const CStateManager& mgr) const; + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr) override; + void ResetBeam(CStateManager& mgr, bool fullReset) override; + void UpdateFx(const zeus::CTransform& xf, float dt, CStateManager& mgr) override; + void Fire(const zeus::CTransform& xf, CStateManager& mgr, bool b) override; + void Touch(CActor& other, CStateManager& mgr) override; + bool CanRenderUnsorted(const CStateManager& mgr) const override; + void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const override; + void Render(const CStateManager& mgr) const override; }; } // namespace urde diff --git a/Runtime/Weapon/CPowerBeam.hpp b/Runtime/Weapon/CPowerBeam.hpp index 5fc1c84b8..9ca278cb9 100644 --- a/Runtime/Weapon/CPowerBeam.hpp +++ b/Runtime/Weapon/CPowerBeam.hpp @@ -20,16 +20,16 @@ public: CPowerBeam(CAssetId characterId, EWeaponType type, TUniqueId playerId, EMaterialTypes playerMaterial, const zeus::CVector3f& scale); - void PreRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf); - void PostRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf); - void UpdateGunFx(bool shotSmoke, float dt, const CStateManager& mgr, const zeus::CTransform& xf); + void PreRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf) override; + void PostRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf) override; + void UpdateGunFx(bool shotSmoke, float dt, const CStateManager& mgr, const zeus::CTransform& xf) override; void Fire(bool underwater, float dt, EChargeState chargeState, const zeus::CTransform& xf, CStateManager& mgr, - TUniqueId homingTarget, float chargeFactor1, float chargeFactor2); - void EnableSecondaryFx(ESecondaryFxType type); - void Update(float dt, CStateManager& mgr); - void Load(CStateManager& mgr, bool subtypeBasePose); - void Unload(CStateManager& mgr); - bool IsLoaded() const; + TUniqueId homingTarget, float chargeFactor1, float chargeFactor2) override; + void EnableSecondaryFx(ESecondaryFxType type) override; + void Update(float dt, CStateManager& mgr) override; + void Load(CStateManager& mgr, bool subtypeBasePose) override; + void Unload(CStateManager& mgr) override; + bool IsLoaded() const override; }; } // namespace urde diff --git a/Runtime/Weapon/CPowerBomb.hpp b/Runtime/Weapon/CPowerBomb.hpp index 9e6c35247..0f969d5a2 100644 --- a/Runtime/Weapon/CPowerBomb.hpp +++ b/Runtime/Weapon/CPowerBomb.hpp @@ -20,13 +20,13 @@ public: CPowerBomb(const TToken& particle, TUniqueId uid, TAreaId aid, TUniqueId playerId, const zeus::CTransform& xf, const CDamageInfo& dInfo); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; - void Render(const CStateManager&) const {} - std::optional GetTouchBounds() const { return {}; } - void Touch(CActor&, CStateManager&) { /*x158_24_canStartFilter; */ + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; + void Render(const CStateManager&) const override {} + std::optional GetTouchBounds() const override { return {}; } + void Touch(CActor&, CStateManager&) override { /*x158_24_canStartFilter; */ } float GetCurTime() const { return x15c_curTime; } void ApplyDynamicDamage(const zeus::CVector3f&, CStateManager&); diff --git a/Runtime/Weapon/CTargetableProjectile.hpp b/Runtime/Weapon/CTargetableProjectile.hpp index a23c195b1..2b9a77aab 100644 --- a/Runtime/Weapon/CTargetableProjectile.hpp +++ b/Runtime/Weapon/CTargetableProjectile.hpp @@ -16,10 +16,10 @@ public: const std::optional>& visorParticle, u16 visorSfx, bool sendCollideMsg); - void Accept(IVisitor&); - zeus::CVector3f GetAimPosition(const CStateManager&, float) const; + void Accept(IVisitor&) override; + zeus::CVector3f GetAimPosition(const CStateManager&, float) const override; bool Explode(const zeus::CVector3f& pos, const zeus::CVector3f& normal, EWeaponCollisionResponseTypes type, - CStateManager& mgr, const CDamageVulnerability& dVuln, TUniqueId hitActor); + CStateManager& mgr, const CDamageVulnerability& dVuln, TUniqueId hitActor) override; }; } // namespace urde diff --git a/Runtime/Weapon/CWaveBeam.hpp b/Runtime/Weapon/CWaveBeam.hpp index 83c6f73e5..83c3ac4ab 100644 --- a/Runtime/Weapon/CWaveBeam.hpp +++ b/Runtime/Weapon/CWaveBeam.hpp @@ -20,15 +20,15 @@ public: CWaveBeam(CAssetId characterId, EWeaponType type, TUniqueId playerId, EMaterialTypes playerMaterial, const zeus::CVector3f& scale); - void PostRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf); - void UpdateGunFx(bool shotSmoke, float dt, const CStateManager& mgr, const zeus::CTransform& xf); + void PostRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf) override; + void UpdateGunFx(bool shotSmoke, float dt, const CStateManager& mgr, const zeus::CTransform& xf) override; void Fire(bool underwater, float dt, EChargeState chargeState, const zeus::CTransform& xf, CStateManager& mgr, - TUniqueId homingTarget, float chargeFactor1, float chargeFactor2); - void EnableSecondaryFx(ESecondaryFxType type); - void Update(float dt, CStateManager& mgr); - void Load(CStateManager& mgr, bool subtypeBasePose); - void Unload(CStateManager& mgr); - bool IsLoaded() const; + TUniqueId homingTarget, float chargeFactor1, float chargeFactor2) override; + void EnableSecondaryFx(ESecondaryFxType type) override; + void Update(float dt, CStateManager& mgr) override; + void Load(CStateManager& mgr, bool subtypeBasePose) override; + void Unload(CStateManager& mgr) override; + bool IsLoaded() const override; }; } // namespace urde diff --git a/Runtime/Weapon/CWeapon.hpp b/Runtime/Weapon/CWeapon.hpp index 79e8accf4..901afa8ce 100644 --- a/Runtime/Weapon/CWeapon.hpp +++ b/Runtime/Weapon/CWeapon.hpp @@ -24,7 +24,7 @@ public: const zeus::CTransform& xf, const CMaterialFilter& filter, const CMaterialList& mList, const CDamageInfo&, EProjectileAttrib attribs, CModelData&& mData); - virtual void Accept(IVisitor& visitor); + void Accept(IVisitor& visitor) override; bool HasAttrib(EProjectileAttrib attrib) const { return (int(xe8_projectileAttribs) & int(attrib)) == int(attrib); } EProjectileAttrib GetAttribField() const { return xe8_projectileAttribs; } const CMaterialFilter& GetFilter() const { return xf8_filter; } @@ -38,10 +38,10 @@ public: float GetDamageDuration() const { return x150_damageDuration; } float GetInterferenceDuration() const { return x154_interferenceDuration; } - void Think(float, CStateManager&); - void Render(const CStateManager&) const; + void Think(float, CStateManager&) override; + void Render(const CStateManager&) const override; EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&, - const CWeaponMode&, EProjectileAttrib) const; - void FluidFXThink(EFluidState state, CScriptWater& water, CStateManager& mgr); + const CWeaponMode&, EProjectileAttrib) const override; + void FluidFXThink(EFluidState state, CScriptWater& water, CStateManager& mgr) override; }; } // namespace urde diff --git a/Runtime/World/CActor.hpp b/Runtime/World/CActor.hpp index f81fadac1..a726ccff0 100644 --- a/Runtime/World/CActor.hpp +++ b/Runtime/World/CActor.hpp @@ -98,8 +98,8 @@ public: CActor(TUniqueId uid, bool active, std::string_view name, const CEntityInfo& info, const zeus::CTransform&, CModelData&& mData, const CMaterialList& list, const CActorParameters& params, TUniqueId otherUid); - virtual void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - virtual void SetActive(bool active) { + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void SetActive(bool active) override { xe4_27_notInSortedLists = true; xe4_28_transformDirty = true; xe4_29_actorLightsDirty = true; diff --git a/Runtime/World/CAi.hpp b/Runtime/World/CAi.hpp index 36e23296a..9f8780a10 100644 --- a/Runtime/World/CAi.hpp +++ b/Runtime/World/CAi.hpp @@ -39,19 +39,21 @@ public: const CStateMachine* GetStateMachine() const; - virtual void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - virtual CHealthInfo* HealthInfo(CStateManager&) { return &x258_healthInfo; } + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + CHealthInfo* HealthInfo(CStateManager&) override { return &x258_healthInfo; } + const CDamageVulnerability* GetDamageVulnerability() const override { return &x260_damageVulnerability; } + EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&, + const CWeaponMode&, EProjectileAttrib) const override; + void FluidFXThink(EFluidState, CScriptWater&, CStateManager&) override; + virtual void Death(CStateManager& mgr, const zeus::CVector3f& direction, EScriptObjectState state) = 0; virtual void KnockBack(const zeus::CVector3f&, CStateManager&, const CDamageInfo& info, EKnockBackType type, bool inDeferred, float magnitude) = 0; - virtual const CDamageVulnerability* GetDamageVulnerability() const { return &x260_damageVulnerability; } + virtual void TakeDamage(const zeus::CVector3f& direction, float magnitude) {} virtual bool CanBeShot(const CStateManager&, int) { return true; } virtual bool IsListening() const { return false; } virtual bool Listen(const zeus::CVector3f&, EListenNoiseType) { return 0; } - virtual EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&, - const CWeaponMode&, EProjectileAttrib) const; - void FluidFXThink(EFluidState, CScriptWater&, CStateManager&); virtual zeus::CVector3f GetOrigin(const CStateManager& mgr, const CTeamAiRole& role, const zeus::CVector3f& aimPos) const { diff --git a/Runtime/World/CAmbientAI.hpp b/Runtime/World/CAmbientAI.hpp index 03802ff50..1d05d9506 100644 --- a/Runtime/World/CAmbientAI.hpp +++ b/Runtime/World/CAmbientAI.hpp @@ -29,13 +29,13 @@ public: const zeus::CAABox&, const CMaterialList&, float, const CHealthInfo&, const CDamageVulnerability&, const CActorParameters&, float, float, s32, s32, bool); - void Accept(IVisitor&); - void Think(float, CStateManager&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - CHealthInfo* HealthInfo(CStateManager&) { return &x260_healthInfo; } - const CDamageVulnerability* GetDamageVulnerability() const { return &x268_dVuln; } - std::optional GetTouchBounds() const; - void Touch(CActor&, CStateManager&) {} + void Accept(IVisitor&) override; + void Think(float, CStateManager&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + CHealthInfo* HealthInfo(CStateManager&) override{ return &x260_healthInfo; } + const CDamageVulnerability* GetDamageVulnerability() const override{ return &x268_dVuln; } + std::optional GetTouchBounds() const override; + void Touch(CActor&, CStateManager&) override{} void RandomizePlaybackRate(CStateManager&); }; diff --git a/Runtime/World/CEffect.hpp b/Runtime/World/CEffect.hpp index 9a1d68f76..04d3d297a 100644 --- a/Runtime/World/CEffect.hpp +++ b/Runtime/World/CEffect.hpp @@ -8,8 +8,8 @@ class CEffect : public CActor { public: CEffect(TUniqueId uid, const CEntityInfo& info, bool active, std::string_view name, const zeus::CTransform& xf); - virtual void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const {} - virtual void Render(const CStateManager&) const {} + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override{} + void Render(const CStateManager&) const override{} }; } // namespace urde diff --git a/Runtime/World/CExplosion.hpp b/Runtime/World/CExplosion.hpp index a97893ce8..5971b0d39 100644 --- a/Runtime/World/CExplosion.hpp +++ b/Runtime/World/CExplosion.hpp @@ -26,13 +26,13 @@ public: std::string_view name, const zeus::CTransform& xf, u32, const zeus::CVector3f& scale, const zeus::CColor& color); - void Accept(IVisitor&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); - void PreRender(CStateManager&, const zeus::CFrustum&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; - void Render(const CStateManager&) const; - bool CanRenderUnsorted(const CStateManager&) const; + void Accept(IVisitor&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; + void PreRender(CStateManager&, const zeus::CFrustum&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; + void Render(const CStateManager&) const override; + bool CanRenderUnsorted(const CStateManager&) const override; }; } // namespace urde diff --git a/Runtime/World/CFire.hpp b/Runtime/World/CFire.hpp index 479d96e73..401a56f68 100644 --- a/Runtime/World/CFire.hpp +++ b/Runtime/World/CFire.hpp @@ -28,17 +28,17 @@ public: CFire(TToken, TUniqueId, TAreaId, bool, TUniqueId, const zeus::CTransform&, const CDamageInfo&, const zeus::CAABox&, const zeus::CVector3f&, bool, CAssetId, bool, bool, bool, float, float, float, float); - void Accept(IVisitor&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); - std::optional GetTouchBounds() const { + void Accept(IVisitor&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; + std::optional GetTouchBounds() const override { if (GetActive()) return x128_; return {}; } - void Touch(CActor&, CStateManager&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; + void Touch(CActor&, CStateManager&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; }; } // namespace urde \ No newline at end of file diff --git a/Runtime/World/CFishCloud.hpp b/Runtime/World/CFishCloud.hpp index 9b46ce7db..52033a382 100644 --- a/Runtime/World/CFishCloud.hpp +++ b/Runtime/World/CFishCloud.hpp @@ -135,14 +135,14 @@ public: CAssetId part1, u32 partCount1, CAssetId part2, u32 partCount2, CAssetId part3, u32 partCount3, CAssetId part4, u32 partCount4, u32 deathSfx, bool repelFromThreats, bool hotInThermal); - void Accept(IVisitor& visitor); - void Think(float dt, CStateManager& mgr); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr); - void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum); - void Render(const CStateManager& mgr) const; - void CalculateRenderBounds(); - std::optional GetTouchBounds() const; - void Touch(CActor& other, CStateManager& mgr); + void Accept(IVisitor& visitor) override; + void Think(float dt, CStateManager& mgr) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr) override; + void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) override; + void Render(const CStateManager& mgr) const override; + void CalculateRenderBounds() override; + std::optional GetTouchBounds() const override; + void Touch(CActor& other, CStateManager& mgr) override; void RemoveRepulsor(TUniqueId source); void RemoveAttractor(TUniqueId source); bool AddRepulsor(TUniqueId source, bool swirl, float radius, float priority); diff --git a/Runtime/World/CFishCloudModifier.hpp b/Runtime/World/CFishCloudModifier.hpp index abc1aea6d..d2da1dac2 100644 --- a/Runtime/World/CFishCloudModifier.hpp +++ b/Runtime/World/CFishCloudModifier.hpp @@ -13,8 +13,8 @@ public: CFishCloudModifier(TUniqueId uid, bool active, std::string_view name, const CEntityInfo& eInfo, const zeus::CVector3f& pos, bool isRepulsor, bool swirl, float radius, float priority); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; void AddSelf(CStateManager&); void RemoveSelf(CStateManager&); diff --git a/Runtime/World/CFluidPlaneCPU.hpp b/Runtime/World/CFluidPlaneCPU.hpp index f152aa217..a68094b3e 100644 --- a/Runtime/World/CFluidPlaneCPU.hpp +++ b/Runtime/World/CFluidPlaneCPU.hpp @@ -94,8 +94,8 @@ public: const CScriptWater* water) const; void Render(const CStateManager& mgr, float alpha, const zeus::CAABox& aabb, const zeus::CTransform& xf, const zeus::CTransform& areaXf, bool noNormals, const zeus::CFrustum& frustum, - const std::optional& rippleManager, TUniqueId waterId, - const bool* gridFlags, u32 gridDimX, u32 gridDimY, const zeus::CVector3f& areaCenter) const; + const std::optional& rippleManager, TUniqueId waterId, const bool* gridFlags, + u32 gridDimX, u32 gridDimY, const zeus::CVector3f& areaCenter) const override; float GetReflectionBlend() const { return x114_reflectionBlend; } float GetSpecularMax() const { return x110_specularMax; } float GetSpecularMin() const { return x10c_specularMin; } diff --git a/Runtime/World/CFluidPlaneDoor.hpp b/Runtime/World/CFluidPlaneDoor.hpp index 6d6e39c6a..ac705a946 100644 --- a/Runtime/World/CFluidPlaneDoor.hpp +++ b/Runtime/World/CFluidPlaneDoor.hpp @@ -15,16 +15,16 @@ class CFluidPlaneDoor final : public CFluidPlane { public: CFluidPlaneDoor(CAssetId patternTex1, CAssetId patternTex2, CAssetId colorTex, float tileSize, u32 tileSubdivisions, EFluidType fluidType, float alpha, const CFluidUVMotion& uvMotion); - void AddRipple(float mag, TUniqueId rippler, const zeus::CVector3f& center, CScriptWater& water, CStateManager& mgr) { - } + void AddRipple(float mag, TUniqueId rippler, const zeus::CVector3f& center, CScriptWater& water, + CStateManager& mgr) override {} void AddRipple(float intensity, TUniqueId rippler, const zeus::CVector3f& center, const zeus::CVector3f& velocity, - const CScriptWater& water, CStateManager& mgr, const zeus::CVector3f& upVec) {} - void AddRipple(const CRipple& ripple, const CScriptWater& water, CStateManager& mgr) {} + const CScriptWater& water, CStateManager& mgr, const zeus::CVector3f& upVec) override {} + void AddRipple(const CRipple& ripple, const CScriptWater& water, CStateManager& mgr) override {} void Render(const CStateManager& mgr, float alpha, const zeus::CAABox& aabb, const zeus::CTransform& xf, const zeus::CTransform& areaXf, bool noNormals, const zeus::CFrustum& frustum, - const std::optional& rippleManager, TUniqueId waterId, - const bool* gridFlags, u32 gridDimX, u32 gridDimY, const zeus::CVector3f& areaCenter) const; + const std::optional& rippleManager, TUniqueId waterId, const bool* gridFlags, + u32 gridDimX, u32 gridDimY, const zeus::CVector3f& areaCenter) const override; }; } // namespace urde diff --git a/Runtime/World/CFluidPlaneGPU.hpp b/Runtime/World/CFluidPlaneGPU.hpp index f5ce68025..723a07353 100644 --- a/Runtime/World/CFluidPlaneGPU.hpp +++ b/Runtime/World/CFluidPlaneGPU.hpp @@ -17,7 +17,7 @@ public: void RenderStripWithRipples(float curY, const CFluidPlaneRender::SHFieldSample (&heights)[46][46], const u8 (&flags)[9][9], int startYDiv, const CFluidPlaneRender::SPatchInfo& info, std::vector& vOut, - std::vector& pvOut) const; + std::vector& pvOut) const override; }; } // namespace urde diff --git a/Runtime/World/CGameArea.hpp b/Runtime/World/CGameArea.hpp index 3b81604ad..a411c44c4 100644 --- a/Runtime/World/CGameArea.hpp +++ b/Runtime/World/CGameArea.hpp @@ -50,14 +50,14 @@ class CDummyGameArea final : public IGameArea { public: CDummyGameArea(CInputStream& in, int idx, int mlvlVersion); - std::pair, s32> IGetScriptingMemoryAlways() const; - TAreaId IGetAreaId() const; - CAssetId IGetAreaAssetId() const; - bool IIsActive() const; - TAreaId IGetAttachedAreaId(int) const; - u32 IGetNumAttachedAreas() const; - CAssetId IGetStringTableAssetId() const; - const zeus::CTransform& IGetTM() const; + std::pair, s32> IGetScriptingMemoryAlways() const override; + TAreaId IGetAreaId() const override; + CAssetId IGetAreaAssetId() const override; + bool IIsActive() const override; + TAreaId IGetAttachedAreaId(int) const override; + u32 IGetNumAttachedAreas() const override; + CAssetId IGetStringTableAssetId() const override; + const zeus::CTransform& IGetTM() const override; }; struct CAreaRenderOctTree { @@ -164,7 +164,7 @@ public: public: CAreaObjectList(TAreaId areaIdx) : CObjectList(EGameObjectList::Invalid), x200c_areaIdx(areaIdx) {} - bool IsQualified(const CEntity& ent); + bool IsQualified(const CEntity& ent) override; }; enum class EOcclusionState { Occluded, Visible }; @@ -272,15 +272,15 @@ public: void ReadDependencyList(); void SetLoadPauseState(bool paused); - std::pair, s32> IGetScriptingMemoryAlways() const; + std::pair, s32> IGetScriptingMemoryAlways() const override; TAreaId GetAreaId() const { return x4_selfIdx; } - TAreaId IGetAreaId() const { return x4_selfIdx; } - CAssetId IGetAreaAssetId() const { return x84_mrea; } - bool IIsActive() const; - TAreaId IGetAttachedAreaId(int) const; - u32 IGetNumAttachedAreas() const; - CAssetId IGetStringTableAssetId() const; - const zeus::CTransform& IGetTM() const; + TAreaId IGetAreaId() const override { return x4_selfIdx; } + CAssetId IGetAreaAssetId() const override { return x84_mrea; } + bool IIsActive() const override; + TAreaId IGetAttachedAreaId(int) const override; + u32 IGetNumAttachedAreas() const override; + CAssetId IGetStringTableAssetId() const override; + const zeus::CTransform& IGetTM() const override; void SetXRaySpeedAndTarget(float speed, float target); void SetThermalSpeedAndTarget(float speed, float target); diff --git a/Runtime/World/CGameLight.hpp b/Runtime/World/CGameLight.hpp index 755d21507..a5f7f3ebd 100644 --- a/Runtime/World/CGameLight.hpp +++ b/Runtime/World/CGameLight.hpp @@ -14,8 +14,8 @@ public: CGameLight(TUniqueId, TAreaId, bool, std::string_view, const zeus::CTransform&, TUniqueId, const CLight&, u32 sourceId, u32, float); - void Accept(IVisitor& visitor); - void Think(float, CStateManager&); + void Accept(IVisitor& visitor) override; + void Think(float, CStateManager&) override; void SetLightPriorityAndId(); void SetLight(const CLight&); CLight GetLight() const; diff --git a/Runtime/World/CHUDBillboardEffect.hpp b/Runtime/World/CHUDBillboardEffect.hpp index c446c860f..0afd69daf 100644 --- a/Runtime/World/CHUDBillboardEffect.hpp +++ b/Runtime/World/CHUDBillboardEffect.hpp @@ -29,12 +29,12 @@ public: const std::optional>& electric, TUniqueId uid, bool active, std::string_view name, float dist, const zeus::CVector3f& scale0, const zeus::CColor& color, const zeus::CVector3f& scale1, const zeus::CVector3f& translation); - ~CHUDBillboardEffect(); - void Accept(IVisitor& visitor); - void Think(float dt, CStateManager& mgr); - void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const; - void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum); - void Render(const CStateManager& mgr) const; + ~CHUDBillboardEffect() override; + void Accept(IVisitor& visitor) override; + void Think(float dt, CStateManager& mgr) override; + void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const override; + void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) override; + void Render(const CStateManager& mgr) const override; bool IsElementGen() const { return x104_26_isElementGen; } void SetRunIndefinitely(bool b) { x104_27_runIndefinitely = b; } CParticleGen* GetParticleGen() const { return xe8_generator.get(); } diff --git a/Runtime/World/CIceImpact.hpp b/Runtime/World/CIceImpact.hpp index 40d205205..ab7be8ff5 100644 --- a/Runtime/World/CIceImpact.hpp +++ b/Runtime/World/CIceImpact.hpp @@ -9,7 +9,7 @@ public: CIceImpact(const TLockedToken& particle, TUniqueId uid, TAreaId aid, bool active, std::string_view name, const zeus::CTransform& xf, u32 flags, const zeus::CVector3f& scale, const zeus::CColor& color); - void Accept(IVisitor& visitor); + void Accept(IVisitor& visitor) override; }; } // namespace urde diff --git a/Runtime/World/CPatterned.hpp b/Runtime/World/CPatterned.hpp index 4f55001d3..f546c07f0 100644 --- a/Runtime/World/CPatterned.hpp +++ b/Runtime/World/CPatterned.hpp @@ -256,67 +256,70 @@ public: CPatterned::EMovementType movement, EColliderType collider, EBodyType body, const CActorParameters& params, EKnockBackVariant kbVariant); - void Accept(IVisitor&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void PreThink(float dt, CStateManager& mgr) { x500_preThinkDt = dt; CEntity::Think(x500_preThinkDt, mgr); } - void Think(float, CStateManager&); - void PreRender(CStateManager&, const zeus::CFrustum&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; - void Render(const CStateManager& mgr) const; + void Accept(IVisitor&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void PreThink(float dt, CStateManager& mgr) override { + x500_preThinkDt = dt; + CEntity::Think(x500_preThinkDt, mgr); + } + void Think(float, CStateManager&) override; + void PreRender(CStateManager&, const zeus::CFrustum&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; + void Render(const CStateManager& mgr) const override; - void CollidedWith(TUniqueId, const CCollisionInfoList&, CStateManager& mgr); - void Touch(CActor& act, CStateManager& mgr); - std::optional GetTouchBounds() const; - bool CanRenderUnsorted(const CStateManager& mgr) const; - zeus::CVector3f GetOrbitPosition(const CStateManager& mgr) const { return GetAimPosition(mgr, 0.f); } - zeus::CVector3f GetAimPosition(const CStateManager& mgr, float) const; + void CollidedWith(TUniqueId, const CCollisionInfoList&, CStateManager& mgr) override; + void Touch(CActor& act, CStateManager& mgr) override; + std::optional GetTouchBounds() const override; + bool CanRenderUnsorted(const CStateManager& mgr) const override; + zeus::CVector3f GetOrbitPosition(const CStateManager& mgr) const override { return GetAimPosition(mgr, 0.f); } + zeus::CVector3f GetAimPosition(const CStateManager& mgr, float) const override; zeus::CTransform GetLctrTransform(std::string_view name) const; zeus::CTransform GetLctrTransform(CSegId id) const; bool ApplyBoneTracking() const; void DeathDelete(CStateManager& mgr); - void Death(CStateManager& mgr, const zeus::CVector3f& direction, EScriptObjectState state); + void Death(CStateManager& mgr, const zeus::CVector3f& direction, EScriptObjectState state) override; void KnockBack(const zeus::CVector3f&, CStateManager&, const CDamageInfo& info, EKnockBackType type, bool inDeferred, - float magnitude); - void TakeDamage(const zeus::CVector3f&, float arg); - bool FixedRandom(CStateManager&, float arg); - bool Random(CStateManager&, float arg); - bool CodeTrigger(CStateManager&, float arg); - bool FixedDelay(CStateManager&, float arg); - bool RandomDelay(CStateManager&, float arg); - bool Delay(CStateManager&, float arg); - bool PatrolPathOver(CStateManager&, float arg); - bool Stuck(CStateManager&, float arg); - bool AnimOver(CStateManager&, float arg); - bool InPosition(CStateManager&, float arg); - bool HasPatrolPath(CStateManager& mgr, float arg); - bool Attacked(CStateManager&, float arg); - bool PatternShagged(CStateManager&, float arg); - bool PatternOver(CStateManager&, float arg); - bool HasRetreatPattern(CStateManager& mgr, float arg); - bool HasAttackPattern(CStateManager& mgr, float arg); - bool NoPathNodes(CStateManager&, float arg); - bool PathShagged(CStateManager&, float arg); - bool PathFound(CStateManager&, float arg); - bool PathOver(CStateManager&, float arg); - bool Landed(CStateManager&, float arg); - bool PlayerSpot(CStateManager&, float arg); - bool SpotPlayer(CStateManager&, float arg); - bool Leash(CStateManager&, float arg); - bool InDetectionRange(CStateManager&, float arg); - bool InMaxRange(CStateManager&, float arg); - bool TooClose(CStateManager&, float arg); - bool InRange(CStateManager&, float arg); - bool OffLine(CStateManager&, float arg); - bool Default(CStateManager&, float arg) { return true; } - void PathFind(CStateManager&, EStateMsg msg, float dt); - void Dead(CStateManager&, EStateMsg msg, float dt); - void TargetPlayer(CStateManager&, EStateMsg msg, float dt); - void TargetPatrol(CStateManager&, EStateMsg msg, float dt); - void FollowPattern(CStateManager&, EStateMsg msg, float dt); - void Patrol(CStateManager&, EStateMsg msg, float dt); - void Start(CStateManager&, EStateMsg msg, float dt) {} + float magnitude) override; + void TakeDamage(const zeus::CVector3f&, float arg) override; + bool FixedRandom(CStateManager&, float arg) override; + bool Random(CStateManager&, float arg) override; + bool CodeTrigger(CStateManager&, float arg) override; + bool FixedDelay(CStateManager&, float arg) override; + bool RandomDelay(CStateManager&, float arg) override; + bool Delay(CStateManager&, float arg) override; + bool PatrolPathOver(CStateManager&, float arg) override; + bool Stuck(CStateManager&, float arg) override; + bool AnimOver(CStateManager&, float arg) override; + bool InPosition(CStateManager&, float arg) override; + bool HasPatrolPath(CStateManager& mgr, float arg) override; + bool Attacked(CStateManager&, float arg) override; + bool PatternShagged(CStateManager&, float arg) override; + bool PatternOver(CStateManager&, float arg) override; + bool HasRetreatPattern(CStateManager& mgr, float arg) override; + bool HasAttackPattern(CStateManager& mgr, float arg) override; + bool NoPathNodes(CStateManager&, float arg) override; + bool PathShagged(CStateManager&, float arg) override; + bool PathFound(CStateManager&, float arg) override; + bool PathOver(CStateManager&, float arg) override; + bool Landed(CStateManager&, float arg) override; + bool PlayerSpot(CStateManager&, float arg) override; + bool SpotPlayer(CStateManager&, float arg) override; + bool Leash(CStateManager&, float arg) override; + bool InDetectionRange(CStateManager&, float arg) override; + bool InMaxRange(CStateManager&, float arg) override; + bool TooClose(CStateManager&, float arg) override; + bool InRange(CStateManager&, float arg) override; + bool OffLine(CStateManager&, float arg) override; + bool Default(CStateManager&, float arg) override { return true; } + void PathFind(CStateManager&, EStateMsg msg, float dt) override; + void Dead(CStateManager&, EStateMsg msg, float dt) override; + void TargetPlayer(CStateManager&, EStateMsg msg, float dt) override; + void TargetPatrol(CStateManager&, EStateMsg msg, float dt) override; + void FollowPattern(CStateManager&, EStateMsg msg, float dt) override; + void Patrol(CStateManager&, EStateMsg msg, float dt) override; + void Start(CStateManager&, EStateMsg msg, float dt) override {} void TryCommand(CStateManager& mgr, pas::EAnimationState state, CPatternedTryFunc func, int arg); void TryLoopReaction(CStateManager& mgr, int arg); @@ -364,7 +367,7 @@ public: void LaunchProjectile(const zeus::CTransform& gunXf, CStateManager& mgr, int maxAllowed, EProjectileAttrib attrib, bool playerHoming, const std::optional>& visorParticle, u16 visorSfx, bool sendCollideMsg, const zeus::CVector3f& scale); - void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt); + void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt) override; void SetDestPos(const zeus::CVector3f& pos) { x2e0_destPos = pos; } void UpdateAlphaDelta(float dt, CStateManager& mgr); diff --git a/Runtime/World/CPhysicsActor.hpp b/Runtime/World/CPhysicsActor.hpp index afb4b5044..0db06d62e 100644 --- a/Runtime/World/CPhysicsActor.hpp +++ b/Runtime/World/CPhysicsActor.hpp @@ -112,9 +112,9 @@ public: CPhysicsActor(TUniqueId, bool, std::string_view, const CEntityInfo&, const zeus::CTransform&, CModelData&&, const CMaterialList&, const zeus::CAABox&, const SMoverData&, const CActorParameters&, float, float); - void Render(const CStateManager& mgr) const; - zeus::CVector3f GetOrbitPosition(const CStateManager&) const; - zeus::CVector3f GetAimPosition(const CStateManager&, float val) const; + void Render(const CStateManager& mgr) const override; + zeus::CVector3f GetOrbitPosition(const CStateManager&) const override; + zeus::CVector3f GetAimPosition(const CStateManager&, float val) const override; virtual const CCollisionPrimitive* GetCollisionPrimitive() const; virtual zeus::CTransform GetPrimitiveTransform() const; virtual void CollidedWith(TUniqueId, const CCollisionInfoList&, CStateManager&); diff --git a/Runtime/World/CPlayer.hpp b/Runtime/World/CPlayer.hpp index 13932577a..2e8510407 100644 --- a/Runtime/World/CPlayer.hpp +++ b/Runtime/World/CPlayer.hpp @@ -367,23 +367,23 @@ public: void AsyncLoadSuit(CStateManager& mgr); void LoadAnimationTokens(); bool HasTransitionBeamModel() const; - bool CanRenderUnsorted(const CStateManager& mgr) const; + bool CanRenderUnsorted(const CStateManager& mgr) const override; const CDamageVulnerability* GetDamageVulnerability(const zeus::CVector3f& v1, const zeus::CVector3f& v2, - const CDamageInfo& info) const; - const CDamageVulnerability* GetDamageVulnerability() const; - zeus::CVector3f GetHomingPosition(const CStateManager& mgr, float) const; - zeus::CVector3f GetAimPosition(const CStateManager& mgr, float) const; - void FluidFXThink(CActor::EFluidState, CScriptWater& water, CStateManager& mgr); + const CDamageInfo& info) const override; + const CDamageVulnerability* GetDamageVulnerability() const override; + zeus::CVector3f GetHomingPosition(const CStateManager& mgr, float) const override; + zeus::CVector3f GetAimPosition(const CStateManager& mgr, float) const override; + void FluidFXThink(CActor::EFluidState, CScriptWater& water, CStateManager& mgr) override; zeus::CVector3f GetDamageLocationWR() const { return x564_damageLocation; } float GetPrevDamageAmount() const { return x560_prevDamageAmt; } float GetDamageAmount() const { return x55c_damageAmt; } bool WasDamaged() const { return x558_wasDamaged; } void TakeDamage(bool, const zeus::CVector3f&, float, EWeaponType, CStateManager& mgr); - void Accept(IVisitor& visitor); - CHealthInfo* HealthInfo(CStateManager& mgr); + void Accept(IVisitor& visitor) override; + CHealthInfo* HealthInfo(CStateManager& mgr) override; bool IsUnderBetaMetroidAttack(CStateManager& mgr) const; - std::optional GetTouchBounds() const; - void Touch(CActor& actor, CStateManager& mgr); + std::optional GetTouchBounds() const override; + void Touch(CActor& actor, CStateManager& mgr) override; void DoPreThink(float dt, CStateManager& mgr); void DoThink(float dt, CStateManager& mgr); void UpdateScanningState(const CFinalInput& input, CStateManager& mgr, float); @@ -394,11 +394,11 @@ public: bool GetExplorationMode() const; bool GetCombatMode() const; void RenderGun(const CStateManager& mgr, const zeus::CVector3f&) const; - void Render(const CStateManager& mgr) const; + void Render(const CStateManager& mgr) const override; void RenderReflectedPlayer(CStateManager& mgr); - void PreRender(CStateManager& mgr, const zeus::CFrustum&); - void CalculateRenderBounds(); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; + void PreRender(CStateManager& mgr, const zeus::CFrustum&) override; + void CalculateRenderBounds() override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; void ComputeFreeLook(const CFinalInput& input); void UpdateFreeLookState(const CFinalInput&, float dt, CStateManager&); void UpdateFreeLook(float dt); @@ -427,9 +427,9 @@ public: void ResetControlDirectionInterpolation(); void SetControlDirectionInterpolation(float time); void UpdatePlayerControlDirection(float dt, CStateManager& mgr); - void Think(float, CStateManager&); - void PreThink(float, CStateManager&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); + void Think(float, CStateManager&) override; + void PreThink(float, CStateManager&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; void SetVisorSteam(float, float, float, CAssetId, bool); void UpdateFootstepSounds(const CFinalInput& input, CStateManager&, float); u16 GetMaterialSoundUnderPlayer(CStateManager& mgr, const u16*, u32, u16); @@ -514,15 +514,15 @@ public: zeus::CVector3f GetEyePosition() const; float GetEyeHeight() const; float GetUnbiasedEyeHeight() const; - float GetStepUpHeight() const; - float GetStepDownHeight() const; + float GetStepUpHeight() const override; + float GetStepDownHeight() const override; void Teleport(const zeus::CTransform& xf, CStateManager& mgr, bool resetBallCam); void BombJump(const zeus::CVector3f& pos, CStateManager& mgr); zeus::CTransform CreateTransformFromMovementDirection() const; - const CCollisionPrimitive* GetCollisionPrimitive() const; + const CCollisionPrimitive* GetCollisionPrimitive() const override; const CCollidableSphere* GetCollidableSphere() const; - zeus::CTransform GetPrimitiveTransform() const; - void CollidedWith(TUniqueId, const CCollisionInfoList&, CStateManager& mgr); + zeus::CTransform GetPrimitiveTransform() const override; + void CollidedWith(TUniqueId, const CCollisionInfoList&, CStateManager& mgr) override; float GetBallMaxVelocity() const; float GetActualBallMaxVelocity(float dt) const; float GetActualFirstPersonMaxVelocity(float dt) const; @@ -536,7 +536,7 @@ public: void FinishSidewaysDash(); void ComputeDash(const CFinalInput& input, float dt, CStateManager& mgr); void ComputeMovement(const CFinalInput& input, CStateManager& mgr, float dt); - float GetWeight() const; + float GetWeight() const override; zeus::CVector3f GetDampedClampedVelocityWR() const; const CVisorSteam& GetVisorSteam() const { return x7a0_visorSteam; } float GetVisorStaticAlpha() const { return x74c_visorStaticAlpha; } diff --git a/Runtime/World/CRepulsor.hpp b/Runtime/World/CRepulsor.hpp index e17f5e238..c1e48ba3b 100644 --- a/Runtime/World/CRepulsor.hpp +++ b/Runtime/World/CRepulsor.hpp @@ -8,8 +8,8 @@ class CRepulsor : public CActor { public: CRepulsor(TUniqueId, bool, std::string_view, const CEntityInfo&, const zeus::CVector3f&, float); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; float GetAffectRadius() const { return xe8_affectRadius; } }; diff --git a/Runtime/World/CScriptActor.hpp b/Runtime/World/CScriptActor.hpp index ad80b5770..4136329c2 100644 --- a/Runtime/World/CScriptActor.hpp +++ b/Runtime/World/CScriptActor.hpp @@ -32,17 +32,17 @@ public: const CHealthInfo& hInfo, const CDamageVulnerability& dVuln, const CActorParameters& actParms, bool looping, bool active, s32 shaderIdx, float xrayAlpha, bool noThermalHotZ, bool castsShadow, bool scaleAdvancementDelta, bool materialFlag54); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); - void PreRender(CStateManager&, const zeus::CFrustum&); - zeus::CAABox GetSortingBounds(const CStateManager&) const; + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; + void PreRender(CStateManager&, const zeus::CFrustum&) override; + zeus::CAABox GetSortingBounds(const CStateManager&) const override; EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&, - const CWeaponMode&, EProjectileAttrib) const; - std::optional GetTouchBounds() const; - void Touch(CActor&, CStateManager&); - const CDamageVulnerability* GetDamageVulnerability() const { return &x268_damageVulnerability; } - CHealthInfo* HealthInfo(CStateManager&) { return &x260_currentHealth; } + const CWeaponMode&, EProjectileAttrib) const override; + std::optional GetTouchBounds() const override; + void Touch(CActor&, CStateManager&) override; + const CDamageVulnerability* GetDamageVulnerability() const override { return &x268_damageVulnerability; } + CHealthInfo* HealthInfo(CStateManager&) override { return &x260_currentHealth; } bool IsPlayerActor() const { return x2e3_24_isPlayerActor; } }; }; // namespace urde diff --git a/Runtime/World/CScriptActorKeyframe.hpp b/Runtime/World/CScriptActorKeyframe.hpp index 4e401d4a0..62a3851c9 100644 --- a/Runtime/World/CScriptActorKeyframe.hpp +++ b/Runtime/World/CScriptActorKeyframe.hpp @@ -25,9 +25,9 @@ public: CScriptActorKeyframe(TUniqueId uid, std::string_view name, const CEntityInfo& info, s32 animId, bool looping, float lifetime, bool isPassive, u32 fadeOut, bool active, float totalPlayback); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); - void Think(float, CStateManager&); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; + void Think(float, CStateManager&) override; void UpdateEntity(TUniqueId, CStateManager&); bool IsPassive() const { return x44_25_isPassive; } void SetIsPassive(bool b) { x44_25_isPassive = b; } diff --git a/Runtime/World/CScriptActorRotate.hpp b/Runtime/World/CScriptActorRotate.hpp index ef639bf1e..735982f54 100644 --- a/Runtime/World/CScriptActorRotate.hpp +++ b/Runtime/World/CScriptActorRotate.hpp @@ -30,9 +30,9 @@ class CScriptActorRotate : public CEntity { public: CScriptActorRotate(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CVector3f&, float, bool, bool, bool); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; }; } // namespace urde diff --git a/Runtime/World/CScriptAiJumpPoint.hpp b/Runtime/World/CScriptAiJumpPoint.hpp index 6e0eda688..a5dc82f64 100644 --- a/Runtime/World/CScriptAiJumpPoint.hpp +++ b/Runtime/World/CScriptAiJumpPoint.hpp @@ -21,12 +21,12 @@ private: public: CScriptAiJumpPoint(TUniqueId, std::string_view, const CEntityInfo&, zeus::CTransform&, bool, float); - void Accept(IVisitor& visitor); - void Think(float, CStateManager&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const {} - void Render(const CStateManager&) const {} - std::optional GetTouchBounds() const; + void Accept(IVisitor& visitor) override; + void Think(float, CStateManager&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override {} + void Render(const CStateManager&) const override {} + std::optional GetTouchBounds() const override; bool GetInUse(TUniqueId uid) const; TUniqueId GetJumpPoint() const { return x10c_currentWaypoint; } TUniqueId GetJumpTarget() const { return x10e_nextWaypoint; } diff --git a/Runtime/World/CScriptAreaAttributes.hpp b/Runtime/World/CScriptAreaAttributes.hpp index 759da32a2..dde2eeab3 100644 --- a/Runtime/World/CScriptAreaAttributes.hpp +++ b/Runtime/World/CScriptAreaAttributes.hpp @@ -19,8 +19,8 @@ public: float thermalHeat, float xrayFogDistance, float worldLightingLevel, CAssetId skybox, EPhazonType phazonType); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; bool GetNeedsSky() const { return x34_24_showSkybox; } bool GetNeedsEnvFx() const { return x38_envFx != EEnvFxType::None; } diff --git a/Runtime/World/CScriptBallTrigger.hpp b/Runtime/World/CScriptBallTrigger.hpp index 6ac215a1e..8e9b41aa7 100644 --- a/Runtime/World/CScriptBallTrigger.hpp +++ b/Runtime/World/CScriptBallTrigger.hpp @@ -15,10 +15,10 @@ public: CScriptBallTrigger(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CVector3f&, const zeus::CVector3f&, bool, float, float, float, const zeus::CVector3f&, bool); - void Accept(IVisitor&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager& mgr); - void InhabitantAdded(CActor&, CStateManager&); - void InhabitantExited(CActor&, CStateManager&); + void Accept(IVisitor&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager& mgr) override; + void InhabitantAdded(CActor&, CStateManager&) override; + void InhabitantExited(CActor&, CStateManager&) override; }; } // namespace urde diff --git a/Runtime/World/CScriptBeam.hpp b/Runtime/World/CScriptBeam.hpp index aefd05ce4..87c450e66 100644 --- a/Runtime/World/CScriptBeam.hpp +++ b/Runtime/World/CScriptBeam.hpp @@ -16,8 +16,8 @@ public: CScriptBeam(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, bool, const TToken&, const CBeamInfo&, const CDamageInfo&); - void Accept(IVisitor& visitor); - void Think(float, CStateManager&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); + void Accept(IVisitor& visitor) override; + void Think(float, CStateManager&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; }; } // namespace urde diff --git a/Runtime/World/CScriptCameraBlurKeyframe.hpp b/Runtime/World/CScriptCameraBlurKeyframe.hpp index 94d4c746c..872ec3402 100644 --- a/Runtime/World/CScriptCameraBlurKeyframe.hpp +++ b/Runtime/World/CScriptCameraBlurKeyframe.hpp @@ -15,7 +15,7 @@ public: CScriptCameraBlurKeyframe(TUniqueId uid, std::string_view name, const CEntityInfo& info, EBlurType type, float amount, u32 unk, float timeIn, float timeOut, bool active); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); - void Accept(IVisitor& visitor); + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; + void Accept(IVisitor& visitor) override; }; } // namespace urde diff --git a/Runtime/World/CScriptCameraFilterKeyframe.hpp b/Runtime/World/CScriptCameraFilterKeyframe.hpp index 5457e1c5f..36d2d3677 100644 --- a/Runtime/World/CScriptCameraFilterKeyframe.hpp +++ b/Runtime/World/CScriptCameraFilterKeyframe.hpp @@ -20,7 +20,7 @@ public: EFilterShape shape, u32 filterIdx, u32 unk, const zeus::CColor& color, float timeIn, float timeOut, CAssetId txtr, bool active); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); - void Accept(IVisitor& visitor); + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; + void Accept(IVisitor& visitor) override; }; } // namespace urde diff --git a/Runtime/World/CScriptCameraHint.hpp b/Runtime/World/CScriptCameraHint.hpp index ba290e6bd..4a984a707 100644 --- a/Runtime/World/CScriptCameraHint.hpp +++ b/Runtime/World/CScriptCameraHint.hpp @@ -90,8 +90,8 @@ public: float clampRotRange, float elevation, float interpolateTime, float clampVelTime, float controlInterpDur); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr) override; void ClearIdList() { x150_helpers.clear(); } void SetInactive(bool inactive) { x166_inactive = inactive; } diff --git a/Runtime/World/CScriptCameraHintTrigger.hpp b/Runtime/World/CScriptCameraHintTrigger.hpp index a807214e0..a02c5e44e 100644 --- a/Runtime/World/CScriptCameraHintTrigger.hpp +++ b/Runtime/World/CScriptCameraHintTrigger.hpp @@ -23,9 +23,9 @@ public: const zeus::CTransform& xf, bool deactivateOnEnter, bool deactivateOnExit); - void Accept(IVisitor& visitor); - void Think(float dt, CStateManager& mgr); - void Touch(CActor& other, CStateManager& mgr); - std::optional GetTouchBounds() const; + void Accept(IVisitor& visitor) override; + void Think(float dt, CStateManager& mgr) override; + void Touch(CActor& other, CStateManager& mgr) override; + std::optional GetTouchBounds() const override; }; } // namespace urde diff --git a/Runtime/World/CScriptCameraPitchVolume.hpp b/Runtime/World/CScriptCameraPitchVolume.hpp index b95860f2a..e4ce1d688 100644 --- a/Runtime/World/CScriptCameraPitchVolume.hpp +++ b/Runtime/World/CScriptCameraPitchVolume.hpp @@ -25,10 +25,10 @@ public: CScriptCameraPitchVolume(TUniqueId, bool, std::string_view, const CEntityInfo&, const zeus::CVector3f&, const zeus::CTransform&, const zeus::CRelAngle&, const zeus::CRelAngle&, float); - void Accept(IVisitor& visitor); - void Think(float, CStateManager&); - std::optional GetTouchBounds() const; - void Touch(CActor&, CStateManager&); + void Accept(IVisitor& visitor) override; + void Think(float, CStateManager&) override; + std::optional GetTouchBounds() const override; + void Touch(CActor&, CStateManager&) override; float GetUpPitch() const { return x124_upPitch; } float GetDownPitch() const { return x128_downPitch; } const zeus::CVector3f& GetScale() const { return x12c_scale; } diff --git a/Runtime/World/CScriptCameraShaker.hpp b/Runtime/World/CScriptCameraShaker.hpp index 227538d2a..4f5fd3ec0 100644 --- a/Runtime/World/CScriptCameraShaker.hpp +++ b/Runtime/World/CScriptCameraShaker.hpp @@ -11,8 +11,8 @@ class CScriptCameraShaker : public CEntity { public: CScriptCameraShaker(TUniqueId uid, std::string_view name, const CEntityInfo& info, bool active, const CCameraShakeData& shakeData); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; }; } // namespace urde diff --git a/Runtime/World/CScriptCameraWaypoint.hpp b/Runtime/World/CScriptCameraWaypoint.hpp index 4f468afe0..ffd3f3f32 100644 --- a/Runtime/World/CScriptCameraWaypoint.hpp +++ b/Runtime/World/CScriptCameraWaypoint.hpp @@ -12,10 +12,10 @@ public: CScriptCameraWaypoint(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, bool active, float hfov, u32); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const {} - void Render(const CStateManager&) const {} + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override {} + void Render(const CStateManager&) const override {} TUniqueId GetRandomNextWaypointId(CStateManager& mgr) const; float GetHFov() const { return xe8_hfov; } }; diff --git a/Runtime/World/CScriptColorModulate.hpp b/Runtime/World/CScriptColorModulate.hpp index dce64f0b3..a9778e761 100644 --- a/Runtime/World/CScriptColorModulate.hpp +++ b/Runtime/World/CScriptColorModulate.hpp @@ -45,9 +45,9 @@ public: const zeus::CColor& colorB, EBlendMode blendMode, float timeA2B, float timeB2A, bool doReverse, bool resetTargetWhenDone, bool depthCompare, bool depthUpdate, bool depthBackwards, bool active); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); - void Think(float, CStateManager&); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; + void Think(float, CStateManager&) override; CModelFlags CalculateFlags(const zeus::CColor&) const; void SetTargetFlags(CStateManager&, const CModelFlags&); static TUniqueId FadeOutHelper(CStateManager& mgr, TUniqueId obj, float fadetime); diff --git a/Runtime/World/CScriptControllerAction.hpp b/Runtime/World/CScriptControllerAction.hpp index d18b02cb0..8d1a61694 100644 --- a/Runtime/World/CScriptControllerAction.hpp +++ b/Runtime/World/CScriptControllerAction.hpp @@ -20,8 +20,8 @@ class CScriptControllerAction : public CEntity { public: CScriptControllerAction(TUniqueId uid, std::string_view name, const CEntityInfo& info, bool active, ControlMapper::ECommands command, bool b1, u32 w1, bool b2); - void Accept(IVisitor& visitor); - void Think(float, CStateManager&); + void Accept(IVisitor& visitor) override; + void Think(float, CStateManager&) override; }; } // namespace urde diff --git a/Runtime/World/CScriptCounter.hpp b/Runtime/World/CScriptCounter.hpp index 6f66fb2d4..a42819967 100644 --- a/Runtime/World/CScriptCounter.hpp +++ b/Runtime/World/CScriptCounter.hpp @@ -13,8 +13,8 @@ class CScriptCounter : public CEntity { public: CScriptCounter(TUniqueId, std::string_view name, const CEntityInfo& info, s32, s32, bool, bool); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; }; } // namespace urde diff --git a/Runtime/World/CScriptCoverPoint.hpp b/Runtime/World/CScriptCoverPoint.hpp index fe2fba1ee..15d7e92bd 100644 --- a/Runtime/World/CScriptCoverPoint.hpp +++ b/Runtime/World/CScriptCoverPoint.hpp @@ -32,12 +32,12 @@ public: CScriptCoverPoint(TUniqueId uid, std::string_view name, const CEntityInfo& info, zeus::CTransform xf, bool active, u32 flags, bool crouch, float horizontalAngle, float verticalAngle, float coverTime); - void Accept(IVisitor& visitor); - void Think(float, CStateManager&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const {} - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Render(const CStateManager&) const {} - std::optional GetTouchBounds() const; + void Accept(IVisitor& visitor) override; + void Think(float, CStateManager&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override {} + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Render(const CStateManager&) const override {} + std::optional GetTouchBounds() const override; void SetInUse(bool inUse); bool GetInUse(TUniqueId uid) const; bool ShouldLandHere() const { return xe8_26_landHere; } diff --git a/Runtime/World/CScriptDamageableTrigger.hpp b/Runtime/World/CScriptDamageableTrigger.hpp index bb9040a81..3604a9f25 100644 --- a/Runtime/World/CScriptDamageableTrigger.hpp +++ b/Runtime/World/CScriptDamageableTrigger.hpp @@ -45,16 +45,16 @@ public: const CDamageVulnerability& dVuln, u32 faceFlag, CAssetId patternTex1, CAssetId patternTex2, CAssetId colorTex, ECanOrbit canOrbit, bool active, const CVisorParameters& vParams); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&, - const CWeaponMode&, EProjectileAttrib) const; - void Render(const CStateManager& mgr) const; - void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const; - void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum); - const CDamageVulnerability* GetDamageVulnerability() const { return &x174_dVuln; } - CHealthInfo* HealthInfo(CStateManager&) { return &x16c_hInfo; } - void Think(float, CStateManager&); - std::optional GetTouchBounds() const; + const CWeaponMode&, EProjectileAttrib) const override; + void Render(const CStateManager& mgr) const override; + void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const override; + void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) override; + const CDamageVulnerability* GetDamageVulnerability() const override { return &x174_dVuln; } + CHealthInfo* HealthInfo(CStateManager&) override { return &x16c_hInfo; } + void Think(float, CStateManager&) override; + std::optional GetTouchBounds() const override; }; } // namespace urde diff --git a/Runtime/World/CScriptDebris.hpp b/Runtime/World/CScriptDebris.hpp index b4d633968..4c2ee77b2 100644 --- a/Runtime/World/CScriptDebris.hpp +++ b/Runtime/World/CScriptDebris.hpp @@ -70,15 +70,15 @@ public: const zeus::CVector3f& particle3Scale, EOrientationType particle3Or, bool solid, bool dieOnProjectile, bool noBounce, bool active); - void Accept(IVisitor& visitor); - void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const; - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr); - void Think(float dt, CStateManager& mgr); - void Touch(CActor& other, CStateManager& mgr); - std::optional GetTouchBounds() const; - void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum); - void Render(const CStateManager& mgr) const; + void Accept(IVisitor& visitor) override; + void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr) override; + void Think(float dt, CStateManager& mgr) override; + void Touch(CActor& other, CStateManager& mgr) override; + std::optional GetTouchBounds() const override; + void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) override; + void Render(const CStateManager& mgr) const override; - void CollidedWith(TUniqueId uid, const CCollisionInfoList&, CStateManager&); + void CollidedWith(TUniqueId uid, const CCollisionInfoList&, CStateManager&) override; }; } // namespace urde diff --git a/Runtime/World/CScriptDebugCameraWaypoint.hpp b/Runtime/World/CScriptDebugCameraWaypoint.hpp index 09b58c001..cba74817b 100644 --- a/Runtime/World/CScriptDebugCameraWaypoint.hpp +++ b/Runtime/World/CScriptDebugCameraWaypoint.hpp @@ -11,7 +11,7 @@ public: CScriptDebugCameraWaypoint(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, u32 w1); - void Accept(IVisitor&); + void Accept(IVisitor&) override; }; } // namespace urde diff --git a/Runtime/World/CScriptDistanceFog.hpp b/Runtime/World/CScriptDistanceFog.hpp index 6bba135ea..be9350bf5 100644 --- a/Runtime/World/CScriptDistanceFog.hpp +++ b/Runtime/World/CScriptDistanceFog.hpp @@ -21,7 +21,7 @@ public: CScriptDistanceFog(TUniqueId, std::string_view, const CEntityInfo&, ERglFogMode, const zeus::CColor&, const zeus::CVector2f&, float, const zeus::CVector2f&, bool, bool, float, float, float, float); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; }; } // namespace urde diff --git a/Runtime/World/CScriptDock.hpp b/Runtime/World/CScriptDock.hpp index 858b9b998..8623cedc5 100644 --- a/Runtime/World/CScriptDock.hpp +++ b/Runtime/World/CScriptDock.hpp @@ -26,11 +26,11 @@ public: const zeus::CVector3f& extent, s32 dock, TAreaId area, bool active, s32 dockReferenceCount, bool loadConnected); - void Accept(IVisitor& visitor); - void Think(float, CStateManager&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - std::optional GetTouchBounds() const; - void Touch(CActor&, CStateManager&); + void Accept(IVisitor& visitor) override; + void Think(float, CStateManager&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + std::optional GetTouchBounds() const override; + void Touch(CActor&, CStateManager&) override; void CleanUp() {} zeus::CPlane GetPlane(const CStateManager&) const; TAreaId GetAreaId() const { return x260_area; } diff --git a/Runtime/World/CScriptDockAreaChange.hpp b/Runtime/World/CScriptDockAreaChange.hpp index 4660b21bd..8898cab5e 100644 --- a/Runtime/World/CScriptDockAreaChange.hpp +++ b/Runtime/World/CScriptDockAreaChange.hpp @@ -9,7 +9,7 @@ class CScriptDockAreaChange : public CEntity { public: CScriptDockAreaChange(TUniqueId, std::string_view, const CEntityInfo&, s32, bool); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; }; } // namespace urde diff --git a/Runtime/World/CScriptDoor.hpp b/Runtime/World/CScriptDoor.hpp index 6ebd6c3ba..a4d000e82 100644 --- a/Runtime/World/CScriptDoor.hpp +++ b/Runtime/World/CScriptDoor.hpp @@ -42,18 +42,18 @@ public: const CActorParameters&, const zeus::CVector3f&, const zeus::CAABox&, bool active, bool open, bool, float, bool ballDoor); - zeus::CVector3f GetOrbitPosition(const CStateManager& mgr) const; - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr); - void Think(float, CStateManager& mgr); - void AddToRenderer(const zeus::CFrustum&, const CStateManager& mgr) const; - void Render(const CStateManager&) const {} + zeus::CVector3f GetOrbitPosition(const CStateManager& mgr) const override; + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override; + void Think(float, CStateManager& mgr) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager& mgr) const override; + void Render(const CStateManager&) const override {} void ForceClosed(CStateManager&); bool IsConnectedToArea(const CStateManager& mgr, TAreaId area); void OpenDoor(TUniqueId, CStateManager&); EDoorOpenCondition GetDoorOpenCondition(CStateManager& mgr); void SetDoorAnimation(EDoorAnimType); - std::optional GetTouchBounds() const; + std::optional GetTouchBounds() const override; std::optional GetProjectileBounds() const; bool IsOpen() const { return x2a8_26_isOpen; } }; diff --git a/Runtime/World/CScriptEMPulse.hpp b/Runtime/World/CScriptEMPulse.hpp index ed9ebdef1..29081d045 100644 --- a/Runtime/World/CScriptEMPulse.hpp +++ b/Runtime/World/CScriptEMPulse.hpp @@ -23,13 +23,13 @@ public: CScriptEMPulse(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, bool, float, float, float, float, float, float, float, CAssetId); - void Accept(IVisitor&); - void Think(float, CStateManager&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; - void CalculateRenderBounds(); - std::optional GetTouchBounds() const; - void Touch(CActor&, CStateManager&); + void Accept(IVisitor&) override; + void Think(float, CStateManager&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; + void CalculateRenderBounds() override; + std::optional GetTouchBounds() const override; + void Touch(CActor&, CStateManager&) override; }; } // namespace urde #endif // __URDE_CSCRIPTEMPULSE_HPP__ \ No newline at end of file diff --git a/Runtime/World/CScriptEffect.hpp b/Runtime/World/CScriptEffect.hpp index d1e1795b0..1d37e44a7 100644 --- a/Runtime/World/CScriptEffect.hpp +++ b/Runtime/World/CScriptEffect.hpp @@ -52,19 +52,19 @@ public: float rateCamDistRangeFarRate, bool combatVisorVisible, bool thermalVisorVisible, bool xrayVisorVisible, const CLightParameters& lParms, bool dieWhenSystemsDone); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void PreRender(CStateManager&, const zeus::CFrustum&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; - void Render(const CStateManager&) const; - void Think(float, CStateManager&); - bool CanRenderUnsorted(const CStateManager&) const { return false; } - void SetActive(bool active) { + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void PreRender(CStateManager&, const zeus::CFrustum&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; + void Render(const CStateManager&) const override; + void Think(float, CStateManager&) override; + bool CanRenderUnsorted(const CStateManager&) const override { return false; } + void SetActive(bool active) override { CActor::SetActive(active); xe7_29_drawEnabled = true; } - void CalculateRenderBounds(); - zeus::CAABox GetSortingBounds(const CStateManager&) const; + void CalculateRenderBounds() override; + zeus::CAABox GetSortingBounds(const CStateManager&) const override; bool AreBothSystemsDeleteable(); static void ResetParticleCounts() { g_NumParticlesUpdating = 0; diff --git a/Runtime/World/CScriptGenerator.hpp b/Runtime/World/CScriptGenerator.hpp index b2afade9d..5ec814a65 100644 --- a/Runtime/World/CScriptGenerator.hpp +++ b/Runtime/World/CScriptGenerator.hpp @@ -22,7 +22,7 @@ public: CScriptGenerator(TUniqueId uid, std::string_view name, const CEntityInfo& info, u32 spawnCount, bool noReuseFollowers, const zeus::CVector3f& vec1, bool noInheritXf, bool active, float minScale, float maxScale); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; }; } // namespace urde diff --git a/Runtime/World/CScriptGrapplePoint.hpp b/Runtime/World/CScriptGrapplePoint.hpp index 79481d903..bab2f6281 100644 --- a/Runtime/World/CScriptGrapplePoint.hpp +++ b/Runtime/World/CScriptGrapplePoint.hpp @@ -12,12 +12,12 @@ public: CScriptGrapplePoint(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& transform, bool active, const CGrappleParameters& params); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); - void Render(const CStateManager&) const; - std::optional GetTouchBounds() const; - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; + void Render(const CStateManager&) const override; + std::optional GetTouchBounds() const override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; const CGrappleParameters& GetGrappleParameters() const { return x100_parameters; } }; } // namespace urde diff --git a/Runtime/World/CScriptGunTurret.hpp b/Runtime/World/CScriptGunTurret.hpp index 12d0bd93f..0753601f5 100644 --- a/Runtime/World/CScriptGunTurret.hpp +++ b/Runtime/World/CScriptGunTurret.hpp @@ -221,17 +221,17 @@ public: const CDamageVulnerability& dVuln, const CActorParameters& aParms, const CScriptGunTurretData& turretData); - void Accept(IVisitor&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); - void Touch(CActor&, CStateManager&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; - void Render(const CStateManager&) const; - std::optional GetTouchBounds() const; - zeus::CVector3f GetOrbitPosition(const CStateManager&) const; - zeus::CVector3f GetAimPosition(const CStateManager&, float) const; + void Accept(IVisitor&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; + void Touch(CActor&, CStateManager&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; + void Render(const CStateManager&) const override; + std::optional GetTouchBounds() const override; + zeus::CVector3f GetOrbitPosition(const CStateManager&) const override; + zeus::CVector3f GetAimPosition(const CStateManager&, float) const override; - CHealthInfo* HealthInfo(CStateManager&) { return &x264_healthInfo; } - const CDamageVulnerability* GetDamageVulnerability() const { return &x26c_damageVuln; } + CHealthInfo* HealthInfo(CStateManager&) override { return &x264_healthInfo; } + const CDamageVulnerability* GetDamageVulnerability() const override { return &x26c_damageVuln; } }; } // namespace urde diff --git a/Runtime/World/CScriptHUDMemo.hpp b/Runtime/World/CScriptHUDMemo.hpp index 56ff8a70a..18b3836c7 100644 --- a/Runtime/World/CScriptHUDMemo.hpp +++ b/Runtime/World/CScriptHUDMemo.hpp @@ -21,7 +21,7 @@ public: CScriptHUDMemo(TUniqueId, std::string_view, const CEntityInfo&, const CHUDMemoParms&, CScriptHUDMemo::EDisplayType, CAssetId, bool); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; }; } // namespace urde diff --git a/Runtime/World/CScriptMazeNode.hpp b/Runtime/World/CScriptMazeNode.hpp index 9bb18f724..79cadf353 100644 --- a/Runtime/World/CScriptMazeNode.hpp +++ b/Runtime/World/CScriptMazeNode.hpp @@ -32,7 +32,7 @@ public: CScriptMazeNode(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, bool, s32, s32, s32, const zeus::CVector3f&, const zeus::CVector3f&, const zeus::CVector3f&); - void Accept(IVisitor& visitor); + void Accept(IVisitor& visitor) override; static void LoadMazeSeeds(); }; } // namespace urde diff --git a/Runtime/World/CScriptMemoryRelay.hpp b/Runtime/World/CScriptMemoryRelay.hpp index 3eb4f0fa8..6ad43ce4e 100644 --- a/Runtime/World/CScriptMemoryRelay.hpp +++ b/Runtime/World/CScriptMemoryRelay.hpp @@ -15,7 +15,7 @@ class CScriptMemoryRelay : public CEntity { public: CScriptMemoryRelay(TUniqueId, std::string_view name, const CEntityInfo&, bool, bool, bool); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; }; } // namespace urde diff --git a/Runtime/World/CScriptMidi.hpp b/Runtime/World/CScriptMidi.hpp index 5512c7c12..2e3192ef3 100644 --- a/Runtime/World/CScriptMidi.hpp +++ b/Runtime/World/CScriptMidi.hpp @@ -21,8 +21,8 @@ public: void Stop(CStateManager& mgr, float fadeTime); void Play(CStateManager& mgr, float fadeTime); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; }; } // namespace urde diff --git a/Runtime/World/CScriptPickup.hpp b/Runtime/World/CScriptPickup.hpp index fb9d66b52..c619ff0e2 100644 --- a/Runtime/World/CScriptPickup.hpp +++ b/Runtime/World/CScriptPickup.hpp @@ -26,10 +26,10 @@ public: CPlayerState::EItemType itemType, s32 amount, s32 capacity, CAssetId pickupEffect, float possibility, float lifeTime, float fadeInTime, float startDelay, bool active); - void Accept(IVisitor& visitor); - void Think(float, CStateManager&); - void Touch(CActor&, CStateManager&); - std::optional GetTouchBounds() const { return CPhysicsActor::GetBoundingBox(); } + void Accept(IVisitor& visitor) override; + void Think(float, CStateManager&) override; + void Touch(CActor&, CStateManager&) override; + std::optional GetTouchBounds() const override { return CPhysicsActor::GetBoundingBox(); } float GetPossibility() const { return x264_possibility; } CPlayerState::EItemType GetItem() const { return x258_itemType; } void SetGenerated() { x28c_24_generated = true; } diff --git a/Runtime/World/CScriptPickupGenerator.hpp b/Runtime/World/CScriptPickupGenerator.hpp index 359d9935b..dffb67818 100644 --- a/Runtime/World/CScriptPickupGenerator.hpp +++ b/Runtime/World/CScriptPickupGenerator.hpp @@ -16,7 +16,7 @@ class CScriptPickupGenerator : public CEntity { public: CScriptPickupGenerator(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CVector3f&, float, bool); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& stateMgr); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& stateMgr) override; }; } // namespace urde diff --git a/Runtime/World/CScriptPlatform.hpp b/Runtime/World/CScriptPlatform.hpp index 29fa8751a..47364348b 100644 --- a/Runtime/World/CScriptPlatform.hpp +++ b/Runtime/World/CScriptPlatform.hpp @@ -76,18 +76,18 @@ public: const std::optional>& dcln, bool rainSplashes, u32 maxRainSplashes, u32 rainGenRate); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void PreThink(float, CStateManager&); - void Think(float, CStateManager&); - void PreRender(CStateManager&, const zeus::CFrustum&); - void Render(const CStateManager&) const; - std::optional GetTouchBounds() const; - zeus::CTransform GetPrimitiveTransform() const; - const CCollisionPrimitive* GetCollisionPrimitive() const; - zeus::CVector3f GetOrbitPosition(const CStateManager& mgr) const; - zeus::CVector3f GetAimPosition(const CStateManager& mgr, float dt) const; - zeus::CAABox GetSortingBounds(const CStateManager& mgr) const; + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void PreThink(float, CStateManager&) override; + void Think(float, CStateManager&) override; + void PreRender(CStateManager&, const zeus::CFrustum&) override; + void Render(const CStateManager&) const override; + std::optional GetTouchBounds() const override; + zeus::CTransform GetPrimitiveTransform() const override; + const CCollisionPrimitive* GetCollisionPrimitive() const override; + zeus::CVector3f GetOrbitPosition(const CStateManager& mgr) const override; + zeus::CVector3f GetAimPosition(const CStateManager& mgr, float dt) const override; + zeus::CAABox GetSortingBounds(const CStateManager& mgr) const override; bool IsRider(TUniqueId id) const; bool IsSlave(TUniqueId id) const; std::vector& GetStaticSlaves() { return x328_slavesStatic; } @@ -101,8 +101,8 @@ public: TUniqueId GetNext(TUniqueId, CStateManager&); TUniqueId GetWaypoint(CStateManager&); - const CDamageVulnerability* GetDamageVulnerability() const { return &x29c_damageVuln; } - CHealthInfo* HealthInfo(CStateManager&) { return &x294_health; } + const CDamageVulnerability* GetDamageVulnerability() const override { return &x29c_damageVuln; } + CHealthInfo* HealthInfo(CStateManager&) override { return &x294_health; } void SetControlledAnimation(bool controlled) { x356_25_controlledAnimation = controlled; } virtual void SplashThink(const zeus::CAABox&, const CFluidPlane&, float, CStateManager&) const; diff --git a/Runtime/World/CScriptPlayerActor.hpp b/Runtime/World/CScriptPlayerActor.hpp index e45f3f1b3..dd1e25090 100644 --- a/Runtime/World/CScriptPlayerActor.hpp +++ b/Runtime/World/CScriptPlayerActor.hpp @@ -59,12 +59,12 @@ public: const CDamageVulnerability& dVuln, const CActorParameters& aParams, bool loop, bool active, u32 flags, CPlayerState::EBeamId beam); - void Think(float, CStateManager&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void SetActive(bool active); - void PreRender(CStateManager&, const zeus::CFrustum&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; - void Render(const CStateManager& mgr) const; + void Think(float, CStateManager&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void SetActive(bool active) override; + void PreRender(CStateManager&, const zeus::CFrustum&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; + void Render(const CStateManager& mgr) const override; void TouchModels(const CStateManager& mgr) const; }; } // namespace urde diff --git a/Runtime/World/CScriptPlayerHint.hpp b/Runtime/World/CScriptPlayerHint.hpp index 92cf85d6a..0ed5114b5 100644 --- a/Runtime/World/CScriptPlayerHint.hpp +++ b/Runtime/World/CScriptPlayerHint.hpp @@ -16,8 +16,8 @@ class CScriptPlayerHint : public CActor { public: CScriptPlayerHint(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, bool active, u32 priority, u32 overrideFlags); - void Accept(IVisitor& visit); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); + void Accept(IVisitor& visit) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; u32 GetPriority() const { return x100_priority; } u32 GetOverrideFlags() const { return x104_overrideFlags; } TUniqueId GetActorId() const { return x108_mpId; } diff --git a/Runtime/World/CScriptPlayerStateChange.hpp b/Runtime/World/CScriptPlayerStateChange.hpp index 58917a45c..024bf283f 100644 --- a/Runtime/World/CScriptPlayerStateChange.hpp +++ b/Runtime/World/CScriptPlayerStateChange.hpp @@ -18,7 +18,7 @@ private: public: CScriptPlayerStateChange(TUniqueId, std::string_view, const CEntityInfo&, bool, u32, u32, u32, EControl, EControlCommandOption); - void Accept(IVisitor& visit); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); + void Accept(IVisitor& visit) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; }; } // namespace urde diff --git a/Runtime/World/CScriptPointOfInterest.hpp b/Runtime/World/CScriptPointOfInterest.hpp index 6218b323e..7c24dfae2 100644 --- a/Runtime/World/CScriptPointOfInterest.hpp +++ b/Runtime/World/CScriptPointOfInterest.hpp @@ -12,12 +12,12 @@ public: CScriptPointOfInterest(TUniqueId, std::string_view, const CEntityInfo, const zeus::CTransform&, bool, const CScannableParameters&, float); - void Accept(IVisitor& visitor); - void Think(float, CStateManager&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; - void Render(const CStateManager&) const; - void CalculateRenderBounds(); - std::optional GetTouchBounds() const; + void Accept(IVisitor& visitor) override; + void Think(float, CStateManager&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; + void Render(const CStateManager&) const override; + void CalculateRenderBounds() override; + std::optional GetTouchBounds() const override; }; } // namespace urde diff --git a/Runtime/World/CScriptRandomRelay.hpp b/Runtime/World/CScriptRandomRelay.hpp index 955cd0f5f..33490677b 100644 --- a/Runtime/World/CScriptRandomRelay.hpp +++ b/Runtime/World/CScriptRandomRelay.hpp @@ -12,8 +12,8 @@ public: CScriptRandomRelay(TUniqueId uid, std::string_view name, const CEntityInfo& info, s32 sendSetSize, s32 sendSetVariance, bool percentSize, bool active); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; void SendLocalScriptMsgs(EScriptObjectState state, CStateManager& stateMgr); }; } // namespace urde diff --git a/Runtime/World/CScriptRelay.hpp b/Runtime/World/CScriptRelay.hpp index 839cf3e13..a2c12ce9a 100644 --- a/Runtime/World/CScriptRelay.hpp +++ b/Runtime/World/CScriptRelay.hpp @@ -10,9 +10,9 @@ class CScriptRelay : public CEntity { public: CScriptRelay(TUniqueId, std::string_view, const CEntityInfo&, bool); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); - void Think(float, CStateManager& stateMgr); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; + void Think(float, CStateManager& stateMgr) override; void UpdateObjectRef(CStateManager& stateMgr); }; } // namespace urde diff --git a/Runtime/World/CScriptRipple.hpp b/Runtime/World/CScriptRipple.hpp index e5e9b4262..3f9decfa9 100644 --- a/Runtime/World/CScriptRipple.hpp +++ b/Runtime/World/CScriptRipple.hpp @@ -11,8 +11,8 @@ class CScriptRipple : public CEntity { public: CScriptRipple(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CVector3f&, bool, float); - void Accept(IVisitor&); - void Think(float, CStateManager&) {} - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); + void Accept(IVisitor&) override; + void Think(float, CStateManager&) override {} + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; }; } // namespace urde diff --git a/Runtime/World/CScriptRoomAcoustics.hpp b/Runtime/World/CScriptRoomAcoustics.hpp index 8e17c44dc..371dfa6f4 100644 --- a/Runtime/World/CScriptRoomAcoustics.hpp +++ b/Runtime/World/CScriptRoomAcoustics.hpp @@ -30,9 +30,9 @@ public: float revStdMix, float revStdTime, float revStdDamping, float revStdPreDelay, bool delay, u32 delayL, u32 delayR, u32 delayS, u32 feedbackL, u32 feedbackR, u32 feedbackS, u32 outputL, u32 outputR, u32 outputS); - void Think(float dt, CStateManager& stateMgr); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); - void Accept(IVisitor& visitor); + void Think(float dt, CStateManager& stateMgr) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; + void Accept(IVisitor& visitor) override; void EnableAuxCallbacks(); static void DisableAuxCallbacks(); diff --git a/Runtime/World/CScriptShadowProjector.hpp b/Runtime/World/CScriptShadowProjector.hpp index c770c6c4f..7a61f831d 100644 --- a/Runtime/World/CScriptShadowProjector.hpp +++ b/Runtime/World/CScriptShadowProjector.hpp @@ -26,11 +26,11 @@ public: CScriptShadowProjector(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, bool, const zeus::CVector3f&, bool, float, float, float, float, s32); - void Accept(IVisitor& visitor); - void Think(float, CStateManager&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void PreRender(CStateManager&, const zeus::CFrustum&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const {} + void Accept(IVisitor& visitor) override; + void Think(float, CStateManager&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void PreRender(CStateManager&, const zeus::CFrustum&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override {} void CreateProjectedShadow(); }; } // namespace urde diff --git a/Runtime/World/CScriptSound.hpp b/Runtime/World/CScriptSound.hpp index 942fc6710..8fa637fab 100644 --- a/Runtime/World/CScriptSound.hpp +++ b/Runtime/World/CScriptSound.hpp @@ -48,11 +48,11 @@ public: u32 pan, u32 w6, bool looped, bool nonEmitter, bool autoStart, bool occlusionTest, bool acoustics, bool worldSfx, bool allowDuplicates, s32 pitch); - void Accept(IVisitor& visitor); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const {} - void PreThink(float, CStateManager&); - void Think(float, CStateManager&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); + void Accept(IVisitor& visitor) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override {} + void PreThink(float, CStateManager&) override; + void Think(float, CStateManager&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; void PlaySound(CStateManager&); void StopSound(CStateManager&); }; diff --git a/Runtime/World/CScriptSpawnPoint.hpp b/Runtime/World/CScriptSpawnPoint.hpp index e998fc0d0..5ea69e072 100644 --- a/Runtime/World/CScriptSpawnPoint.hpp +++ b/Runtime/World/CScriptSpawnPoint.hpp @@ -21,8 +21,8 @@ public: CScriptSpawnPoint(TUniqueId, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, const rstl::reserved_vector& itemCounts, bool, bool, bool); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; bool FirstSpawn() const { return x10c_24_firstSpawn; } const zeus::CTransform& GetTransform() const { return x34_xf; } u32 GetPowerup(CPlayerState::EItemType item) const; diff --git a/Runtime/World/CScriptSpecialFunction.hpp b/Runtime/World/CScriptSpecialFunction.hpp index c486242c7..0db12c6d7 100644 --- a/Runtime/World/CScriptSpecialFunction.hpp +++ b/Runtime/World/CScriptSpecialFunction.hpp @@ -119,12 +119,12 @@ public: std::string_view, float, float, float, float, const zeus::CVector3f&, const zeus::CColor&, bool, const CDamageInfo&, s32, s32, CPlayerState::EItemType, s16, s16, s16); - void Accept(IVisitor& visitor); - void Think(float, CStateManager&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void PreRender(CStateManager&, const zeus::CFrustum&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; - void Render(const CStateManager&) const; + void Accept(IVisitor& visitor) override; + void Think(float, CStateManager&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void PreRender(CStateManager&, const zeus::CFrustum&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; + void Render(const CStateManager&) const override; void SkipCinematic(CStateManager&); void RingScramble(CStateManager&); diff --git a/Runtime/World/CScriptSpiderBallAttractionSurface.hpp b/Runtime/World/CScriptSpiderBallAttractionSurface.hpp index a2b77867d..d5889db01 100644 --- a/Runtime/World/CScriptSpiderBallAttractionSurface.hpp +++ b/Runtime/World/CScriptSpiderBallAttractionSurface.hpp @@ -11,11 +11,11 @@ class CScriptSpiderBallAttractionSurface : public CActor { public: CScriptSpiderBallAttractionSurface(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, const zeus::CVector3f& scale, bool active); - void Accept(IVisitor& visitor); - void Think(float dt, CStateManager& mgr); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr); - std::optional GetTouchBounds() const; - void Touch(CActor& actor, CStateManager& mgr); + void Accept(IVisitor& visitor) override; + void Think(float dt, CStateManager& mgr) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr) override; + std::optional GetTouchBounds() const override; + void Touch(CActor& actor, CStateManager& mgr) override; const zeus::CVector3f& GetScale() const { return xe8_scale; } }; diff --git a/Runtime/World/CScriptSpiderBallWaypoint.hpp b/Runtime/World/CScriptSpiderBallWaypoint.hpp index 16547d2e9..c43409e2f 100644 --- a/Runtime/World/CScriptSpiderBallWaypoint.hpp +++ b/Runtime/World/CScriptSpiderBallWaypoint.hpp @@ -11,11 +11,11 @@ class CScriptSpiderBallWaypoint : public CActor { public: CScriptSpiderBallWaypoint(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, bool, u32); - void Accept(IVisitor&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Render(const CStateManager& mgr) const { CActor::Render(mgr); } - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const {} - std::optional GetTouchBounds() const { return xfc_aabox; } + void Accept(IVisitor&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Render(const CStateManager& mgr) const override { CActor::Render(mgr); } + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override {} + std::optional GetTouchBounds() const override { return xfc_aabox; } void AccumulateBounds(const zeus::CVector3f& v); void BuildWaypointListAndBounds(CStateManager& mgr); void AddPreviousWaypoint(TUniqueId uid); diff --git a/Runtime/World/CScriptSpindleCamera.hpp b/Runtime/World/CScriptSpindleCamera.hpp index d271c3569..577a6eee1 100644 --- a/Runtime/World/CScriptSpindleCamera.hpp +++ b/Runtime/World/CScriptSpindleCamera.hpp @@ -96,12 +96,12 @@ public: const SSpindleProperty& deleteHintBallDist, const SSpindleProperty& recoverClampedAzimuthFromHintDir); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); - void Render(const CStateManager&) const; - void Reset(const zeus::CTransform& xf, CStateManager& mgr); - void ProcessInput(const CFinalInput& input, CStateManager& mgr); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; + void Render(const CStateManager&) const override; + void Reset(const zeus::CTransform& xf, CStateManager& mgr) override; + void ProcessInput(const CFinalInput& input, CStateManager& mgr) override; }; } // namespace urde diff --git a/Runtime/World/CScriptSteam.hpp b/Runtime/World/CScriptSteam.hpp index 8643762e9..b93ef11f7 100644 --- a/Runtime/World/CScriptSteam.hpp +++ b/Runtime/World/CScriptSteam.hpp @@ -18,9 +18,9 @@ public: const zeus::CAABox&, const CDamageInfo& dInfo, const zeus::CVector3f& orientedForce, ETriggerFlags flags, bool active, CAssetId, float, float, float, float, bool); - void Accept(IVisitor&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); + void Accept(IVisitor&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; }; } // namespace urde diff --git a/Runtime/World/CScriptStreamedMusic.hpp b/Runtime/World/CScriptStreamedMusic.hpp index 1fd93f9fd..fa0408243 100644 --- a/Runtime/World/CScriptStreamedMusic.hpp +++ b/Runtime/World/CScriptStreamedMusic.hpp @@ -25,8 +25,8 @@ public: void Stop(CStateManager& mgr); void Play(CStateManager& mgr); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; }; } // namespace urde diff --git a/Runtime/World/CScriptSwitch.hpp b/Runtime/World/CScriptSwitch.hpp index 0aa91c2ff..20c2ea32a 100644 --- a/Runtime/World/CScriptSwitch.hpp +++ b/Runtime/World/CScriptSwitch.hpp @@ -10,7 +10,7 @@ class CScriptSwitch : public CEntity { public: CScriptSwitch(TUniqueId, std::string_view, const CEntityInfo&, bool, bool, bool); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; }; } // namespace urde diff --git a/Runtime/World/CScriptTargetingPoint.hpp b/Runtime/World/CScriptTargetingPoint.hpp index d1bb1c833..2c8b27ecd 100644 --- a/Runtime/World/CScriptTargetingPoint.hpp +++ b/Runtime/World/CScriptTargetingPoint.hpp @@ -17,10 +17,10 @@ private: public: CScriptTargetingPoint(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, bool); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); - void Render(const CStateManager&) const {} + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; + void Render(const CStateManager&) const override {} bool GetLocked() const; }; diff --git a/Runtime/World/CScriptTimer.hpp b/Runtime/World/CScriptTimer.hpp index a12f6c824..a9f3cba04 100644 --- a/Runtime/World/CScriptTimer.hpp +++ b/Runtime/World/CScriptTimer.hpp @@ -15,9 +15,9 @@ class CScriptTimer : public CEntity { public: CScriptTimer(TUniqueId, std::string_view name, const CEntityInfo& info, float, float, bool, bool, bool); - void Accept(IVisitor& visitor); - void Think(float, CStateManager&); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); + void Accept(IVisitor& visitor) override; + void Think(float, CStateManager&) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; bool IsTiming() const; void StartTiming(bool isTiming); void Reset(CStateManager&); diff --git a/Runtime/World/CScriptTrigger.hpp b/Runtime/World/CScriptTrigger.hpp index 88eb0c25a..1167c2086 100644 --- a/Runtime/World/CScriptTrigger.hpp +++ b/Runtime/World/CScriptTrigger.hpp @@ -66,9 +66,9 @@ public: const zeus::CAABox&, const CDamageInfo& dInfo, const zeus::CVector3f& orientedForce, ETriggerFlags triggerFlags, bool, bool, bool); - void Accept(IVisitor& visitor); - void Think(float, CStateManager&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); + void Accept(IVisitor& visitor) override; + void Think(float, CStateManager&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; virtual void InhabitantRejected(CActor&, CStateManager&) {} virtual void InhabitantExited(CActor&, CStateManager&) {} virtual void InhabitantIdle(CActor&, CStateManager&) {} @@ -76,8 +76,8 @@ public: CObjectTracker* FindObject(TUniqueId); void UpdateInhabitants(float, CStateManager&); std::list& GetInhabitants(); - std::optional GetTouchBounds() const; - void Touch(CActor&, CStateManager&); + std::optional GetTouchBounds() const override; + void Touch(CActor&, CStateManager&) override; const zeus::CAABox& GetTriggerBoundsOR() const { return x130_bounds; } zeus::CAABox GetTriggerBoundsWR() const; const CDamageInfo& GetDamageInfo() const { return x100_damageInfo; } diff --git a/Runtime/World/CScriptVisorFlare.hpp b/Runtime/World/CScriptVisorFlare.hpp index 59c5b29c8..ba8e55541 100644 --- a/Runtime/World/CScriptVisorFlare.hpp +++ b/Runtime/World/CScriptVisorFlare.hpp @@ -14,12 +14,12 @@ public: CVisorFlare::EBlendMode blendMode, bool, float, float, float, u32, u32, const std::vector& flares); - void Accept(IVisitor& visitor); - void Think(float, CStateManager& stateMgr); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); - void PreRender(CStateManager&, const zeus::CFrustum&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; - void Render(const CStateManager&) const; + void Accept(IVisitor& visitor) override; + void Think(float, CStateManager& stateMgr) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; + void PreRender(CStateManager&, const zeus::CFrustum&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; + void Render(const CStateManager&) const override; }; } // namespace urde diff --git a/Runtime/World/CScriptVisorGoo.hpp b/Runtime/World/CScriptVisorGoo.hpp index ca8d17c51..0ecbaab0a 100644 --- a/Runtime/World/CScriptVisorGoo.hpp +++ b/Runtime/World/CScriptVisorGoo.hpp @@ -22,13 +22,13 @@ public: CAssetId particle, CAssetId electric, float minDist, float maxDist, float nearProb, float farProb, const zeus::CColor& color, int sfx, bool forceShow, bool active); - void Accept(IVisitor& visitor); - void Think(float, CStateManager& stateMgr); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; - void Render(const CStateManager&) const; - std::optional GetTouchBounds() const; - void Touch(CActor&, CStateManager&); + void Accept(IVisitor& visitor) override; + void Think(float, CStateManager& stateMgr) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; + void Render(const CStateManager&) const override; + std::optional GetTouchBounds() const override; + void Touch(CActor&, CStateManager&) override; }; } // namespace urde diff --git a/Runtime/World/CScriptWater.hpp b/Runtime/World/CScriptWater.hpp index e172bb3c8..09d453bf5 100644 --- a/Runtime/World/CScriptWater.hpp +++ b/Runtime/World/CScriptWater.hpp @@ -89,17 +89,17 @@ public: float unitsPerLightmapTexel, float alphaInTime, float alphaOutTime, u32, u32, bool, s32, s32, std::unique_ptr&& u32Arr); - void Accept(IVisitor& visitor); - void Think(float, CStateManager&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void PreRender(CStateManager&, const zeus::CFrustum&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; - void Render(const CStateManager&) const; - void Touch(CActor&, CStateManager&); - void CalculateRenderBounds(); - zeus::CAABox GetSortingBounds(const CStateManager&) const; + void Accept(IVisitor& visitor) override; + void Think(float, CStateManager&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void PreRender(CStateManager&, const zeus::CFrustum&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; + void Render(const CStateManager&) const override; + void Touch(CActor&, CStateManager&) override; + void CalculateRenderBounds() override; + zeus::CAABox GetSortingBounds(const CStateManager&) const override; EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&, - const CWeaponMode&, EProjectileAttrib) const; + const CWeaponMode&, EProjectileAttrib) const override; u16 GetSplashSound(float) const; const std::optional>& GetSplashEffect(float) const; diff --git a/Runtime/World/CScriptWaypoint.hpp b/Runtime/World/CScriptWaypoint.hpp index fa85aada4..d9906c9e6 100644 --- a/Runtime/World/CScriptWaypoint.hpp +++ b/Runtime/World/CScriptWaypoint.hpp @@ -20,9 +20,9 @@ public: bool active, float speed, float pause, u32 patternTranslate, u32 patternOrient, u32 patternFit, u32 behaviour, u32 behaviourOrient, u32 behaviourModifiers, u32 animation); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; TUniqueId FollowWaypoint(CStateManager& mgr) const; TUniqueId NextWaypoint(CStateManager& mgr) const; float GetSpeed() const { return xe8_speed; } diff --git a/Runtime/World/CScriptWorldTeleporter.hpp b/Runtime/World/CScriptWorldTeleporter.hpp index a403c85b0..c3fd5fa10 100644 --- a/Runtime/World/CScriptWorldTeleporter.hpp +++ b/Runtime/World/CScriptWorldTeleporter.hpp @@ -44,8 +44,8 @@ public: const zeus::CVector3f&, CAssetId, const zeus::CVector3f&, CAssetId, const zeus::CVector3f&, bool, u16, u8, u8); - void Accept(IVisitor&); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr); + void Accept(IVisitor&) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override; void StartTransition(CStateManager&); }; } // namespace urde diff --git a/Runtime/World/CSnakeWeedSwarm.hpp b/Runtime/World/CSnakeWeedSwarm.hpp index f4b239b21..3a39d9566 100644 --- a/Runtime/World/CSnakeWeedSwarm.hpp +++ b/Runtime/World/CSnakeWeedSwarm.hpp @@ -12,7 +12,7 @@ public: float, float, float, float, float, float, float, const CDamageInfo&, float, u32, u32, u32, u32, u32, u32, float); - void Accept(IVisitor&); + void Accept(IVisitor&) override; void ApplyRadiusDamage(const zeus::CVector3f& pos, const CDamageInfo& info, CStateManager& stateMgr) {} }; } // namespace urde diff --git a/Runtime/World/CTeamAiMgr.hpp b/Runtime/World/CTeamAiMgr.hpp index 008b32369..712e10996 100644 --- a/Runtime/World/CTeamAiMgr.hpp +++ b/Runtime/World/CTeamAiMgr.hpp @@ -78,9 +78,9 @@ private: public: CTeamAiMgr(TUniqueId uid, std::string_view name, const CEntityInfo& info, const CTeamAiData& data); - void Accept(IVisitor&); - void Think(float dt, CStateManager& mgr); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& mgr); + void Accept(IVisitor&) override; + void Think(float dt, CStateManager& mgr) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& mgr) override; CTeamAiRole* GetTeamAiRole(TUniqueId aiId); bool IsPartOfTeam(TUniqueId aiId) const; bool HasTeamAiRole(TUniqueId aiId) const; diff --git a/Runtime/World/CWallCrawlerSwarm.hpp b/Runtime/World/CWallCrawlerSwarm.hpp index d010be8f4..8c7689deb 100644 --- a/Runtime/World/CWallCrawlerSwarm.hpp +++ b/Runtime/World/CWallCrawlerSwarm.hpp @@ -180,18 +180,18 @@ public: const CDamageVulnerability& dVuln, s32 launchSfx, s32 scatterSfx, const CActorParameters& aParams); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); - void PreRender(CStateManager&, const zeus::CFrustum&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; - void Render(const CStateManager&) const; - bool CanRenderUnsorted(const CStateManager&) const; - void CalculateRenderBounds(); - std::optional GetTouchBounds() const; - void Touch(CActor& other, CStateManager&); - zeus::CVector3f GetOrbitPosition(const CStateManager&) const; - zeus::CVector3f GetAimPosition(const CStateManager&, float) const; + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; + void PreRender(CStateManager&, const zeus::CFrustum&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; + void Render(const CStateManager&) const override; + bool CanRenderUnsorted(const CStateManager&) const override; + void CalculateRenderBounds() override; + std::optional GetTouchBounds() const override; + void Touch(CActor& other, CStateManager&) override; + zeus::CVector3f GetOrbitPosition(const CStateManager&) const override; + zeus::CVector3f GetAimPosition(const CStateManager&, float) const override; const zeus::CVector3f& GetLastKilledOffset() const { return x130_lastKilledOffset; } void ApplyRadiusDamage(const zeus::CVector3f& pos, const CDamageInfo& info, CStateManager& stateMgr) {} const std::vector& GetBoids() const { return x108_boids; } diff --git a/Runtime/World/CWallWalker.hpp b/Runtime/World/CWallWalker.hpp index b2ab0be8d..7ee081c41 100644 --- a/Runtime/World/CWallWalker.hpp +++ b/Runtime/World/CWallWalker.hpp @@ -48,10 +48,10 @@ public: float alignAngVel, EKnockBackVariant kbVariant, float advanceWpRadius, EWalkerType wType, float playerObstructionMinDist, bool disableMove); - void PreThink(float, CStateManager&); - void Think(float, CStateManager&); - void Render(const CStateManager&) const; - const CCollisionPrimitive* GetCollisionPrimitive() const { return &x590_colSphere; } + void PreThink(float, CStateManager&) override; + void Think(float, CStateManager&) override; + void Render(const CStateManager&) const override; + const CCollisionPrimitive* GetCollisionPrimitive() const override { return &x590_colSphere; } void UpdateWPDestination(CStateManager&); }; } // namespace urde diff --git a/Runtime/World/CWorld.hpp b/Runtime/World/CWorld.hpp index b879b0585..12d7200ec 100644 --- a/Runtime/World/CWorld.hpp +++ b/Runtime/World/CWorld.hpp @@ -52,18 +52,18 @@ class CDummyWorld : public IWorld { public: CDummyWorld(CAssetId mlvlId, bool loadMap); - ~CDummyWorld(); - CAssetId IGetWorldAssetId() const; - CAssetId IGetStringTableAssetId() const; - CAssetId IGetSaveWorldAssetId() const; - const CMapWorld* IGetMapWorld() const; - CMapWorld* IMapWorld(); - const IGameArea* IGetAreaAlways(TAreaId id) const; - TAreaId IGetCurrentAreaId() const; - TAreaId IGetAreaId(CAssetId id) const; - bool ICheckWorldComplete(); - std::string IGetDefaultAudioTrack() const; - int IGetAreaCount() const; + ~CDummyWorld() override; + CAssetId IGetWorldAssetId() const override; + CAssetId IGetStringTableAssetId() const override; + CAssetId IGetSaveWorldAssetId() const override; + const CMapWorld* IGetMapWorld() const override; + CMapWorld* IMapWorld() override; + const IGameArea* IGetAreaAlways(TAreaId id) const override; + TAreaId IGetCurrentAreaId() const override; + TAreaId IGetAreaId(CAssetId id) const override; + bool ICheckWorldComplete() override; + std::string IGetDefaultAudioTrack() const override; + int IGetAreaCount() const override; }; class CWorld : public IWorld { @@ -173,21 +173,21 @@ public: u32 GetRelayCount() const { return x2c_relays.size(); } CRelay GetRelay(u32 idx) const { return x2c_relays[idx]; } - CAssetId IGetWorldAssetId() const; - CAssetId IGetStringTableAssetId() const; - CAssetId IGetSaveWorldAssetId() const; - const CMapWorld* IGetMapWorld() const; - CMapWorld* IMapWorld(); + CAssetId IGetWorldAssetId() const override; + CAssetId IGetStringTableAssetId() const override; + CAssetId IGetSaveWorldAssetId() const override; + const CMapWorld* IGetMapWorld() const override; + CMapWorld* IMapWorld() override; const CGameArea* GetAreaAlways(TAreaId) const; CGameArea* GetArea(TAreaId); s32 GetNumAreas() const { return x18_areas.size(); } - const IGameArea* IGetAreaAlways(TAreaId id) const; - TAreaId IGetCurrentAreaId() const; + const IGameArea* IGetAreaAlways(TAreaId id) const override; + TAreaId IGetCurrentAreaId() const override; TAreaId GetCurrentAreaId() const { return x68_curAreaId; } - TAreaId IGetAreaId(CAssetId id) const; - bool ICheckWorldComplete(); - std::string IGetDefaultAudioTrack() const; - int IGetAreaCount() const; + TAreaId IGetAreaId(CAssetId id) const override; + bool ICheckWorldComplete() override; + std::string IGetDefaultAudioTrack() const override; + int IGetAreaCount() const override; static void PropogateAreaChain(CGameArea::EOcclusionState, CGameArea*, CWorld*); static CGameArea::CConstChainIterator GetAliveAreasEnd() { return {skGlobalEnd}; } From 9312eef9052ffcdff772d1455ad3d2503269ebe9 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 9 Aug 2019 15:46:49 -0400 Subject: [PATCH 07/65] RuntimeCommon: Use override where applicable Continues the override modernization by applying it to the main RuntimeCommon target. Resolves around 1100+ cases where override can be used. --- Editor/ProjectResourceFactoryBase.hpp | 41 ++-- Editor/ProjectResourceFactoryMP1.hpp | 4 +- Runtime/Audio/CStreamAudioManager.cpp | 4 +- Runtime/Camera/CBallCamera.hpp | 12 +- Runtime/Camera/CCameraFilter.hpp | 8 +- Runtime/Camera/CCinematicCamera.hpp | 10 +- Runtime/Camera/CFirstPersonCamera.hpp | 10 +- Runtime/Camera/CGameCamera.hpp | 4 +- Runtime/Camera/CInterpolationCamera.hpp | 12 +- Runtime/Camera/CPathCamera.hpp | 12 +- Runtime/Character/CAdditiveBodyState.hpp | 20 +- Runtime/Character/CAnimSourceReader.hpp | 57 ++--- .../CAnimTreeAnimReaderContainer.hpp | 52 +++-- Runtime/Character/CAnimTreeBlend.hpp | 12 +- Runtime/Character/CAnimTreeDoubleChild.hpp | 34 +-- Runtime/Character/CAnimTreeLoopIn.hpp | 25 +- Runtime/Character/CAnimTreeNode.hpp | 2 +- Runtime/Character/CAnimTreeSequence.hpp | 23 +- Runtime/Character/CAnimTreeSingleChild.hpp | 41 ++-- Runtime/Character/CAnimTreeTimeScale.hpp | 33 +-- Runtime/Character/CAnimTreeTransition.hpp | 18 +- Runtime/Character/CAnimTreeTweenBase.hpp | 17 +- Runtime/Character/CAnimationDatabaseGame.hpp | 10 +- Runtime/Character/CAssetFactory.hpp | 28 +-- Runtime/Character/CBodyState.hpp | 220 +++++++++--------- Runtime/Character/CCharacterFactory.hpp | 28 +-- Runtime/Character/CFBStreamedAnimReader.hpp | 42 ++-- Runtime/Character/CMetaAnimBlend.hpp | 6 +- Runtime/Character/CMetaAnimPhaseBlend.hpp | 6 +- Runtime/Character/CMetaAnimPlay.hpp | 6 +- Runtime/Character/CMetaAnimRandom.hpp | 6 +- Runtime/Character/CMetaAnimSequence.hpp | 6 +- Runtime/Character/CMetaTransMetaAnim.hpp | 4 +- Runtime/Character/CMetaTransPhaseTrans.hpp | 4 +- Runtime/Character/CMetaTransSnap.hpp | 4 +- Runtime/Character/CMetaTransTrans.hpp | 4 +- Runtime/Character/CParticleGenInfo.hpp | 34 +-- Runtime/Character/CTimeScaleFunctions.hpp | 20 +- Runtime/Character/CTransitionDatabaseGame.hpp | 2 +- Runtime/Collision/CAABoxFilter.hpp | 2 +- Runtime/Collision/CBallFilter.hpp | 2 +- Runtime/Collision/CCollidableAABox.hpp | 10 +- Runtime/Collision/CCollidableOBBTree.hpp | 12 +- Runtime/Collision/CCollidableOBBTreeGroup.hpp | 12 +- Runtime/Collision/CCollidableSphere.hpp | 10 +- Runtime/Collision/CCollisionActor.hpp | 26 +-- Runtime/Graphics/CBooRenderer.hpp | 87 +++---- Runtime/Graphics/IWeaponRenderer.hpp | 2 +- Runtime/MP1/CAudioStateWin.hpp | 2 +- Runtime/MP1/CCredits.hpp | 6 +- Runtime/MP1/CFrontEndUI.hpp | 4 +- Runtime/MP1/CInventoryScreen.hpp | 38 +-- Runtime/MP1/CLogBookScreen.hpp | 30 +-- Runtime/MP1/CMFGame.hpp | 12 +- Runtime/MP1/CMainFlow.hpp | 8 +- Runtime/MP1/COptionsScreen.hpp | 28 +-- Runtime/MP1/CPreFrontEnd.hpp | 2 +- Runtime/MP1/CSlideShow.hpp | 6 +- Runtime/MP1/CStateSetterFlow.hpp | 2 +- Runtime/MP1/MP1.hpp | 20 +- Runtime/MP1/World/CActorContraption.hpp | 8 +- Runtime/MP1/World/CAtomicAlpha.hpp | 26 +-- Runtime/MP1/World/CAtomicBeta.hpp | 10 +- Runtime/MP1/World/CBabygoth.hpp | 99 ++++---- Runtime/MP1/World/CBeetle.hpp | 98 ++++---- Runtime/MP1/World/CBloodFlower.hpp | 24 +- Runtime/MP1/World/CBurrower.hpp | 2 +- Runtime/MP1/World/CEyeball.hpp | 26 +-- Runtime/MP1/World/CFireFlea.hpp | 26 +-- Runtime/MP1/World/CFlaahgra.hpp | 84 +++---- Runtime/MP1/World/CFlaahgraTentacle.hpp | 24 +- Runtime/MP1/World/CFlickerBat.hpp | 28 +-- Runtime/MP1/World/CJellyZap.hpp | 26 +-- Runtime/MP1/World/CMagdolite.hpp | 2 +- Runtime/MP1/World/CMetaree.hpp | 32 +-- Runtime/MP1/World/CMetroidPrimeRelay.hpp | 2 +- Runtime/MP1/World/CNewIntroBoss.hpp | 34 +-- Runtime/MP1/World/CParasite.hpp | 72 +++--- Runtime/MP1/World/CPuddleSpore.hpp | 44 ++-- Runtime/MP1/World/CPuddleToadGamma.hpp | 38 +-- Runtime/MP1/World/CPuffer.hpp | 12 +- Runtime/MP1/World/CSeedling.hpp | 32 +-- Runtime/MP1/World/CSpacePirate.hpp | 173 +++++++------- Runtime/MP1/World/CSpankWeed.hpp | 34 +-- Runtime/MP1/World/CTryclops.hpp | 72 +++--- Runtime/MP1/World/CWarWasp.hpp | 73 +++--- 86 files changed, 1173 insertions(+), 1130 deletions(-) diff --git a/Editor/ProjectResourceFactoryBase.hpp b/Editor/ProjectResourceFactoryBase.hpp index 733334bdc..79df9f0ff 100644 --- a/Editor/ProjectResourceFactoryBase.hpp +++ b/Editor/ProjectResourceFactoryBase.hpp @@ -61,10 +61,10 @@ public: void EnsurePath(const urde::SObjectTag& tag, const hecl::ProjectPath& path); void CookComplete(); bool AsyncPump(); - void WaitUntilComplete(); - bool IsComplete() { return m_complete; } - void PostCancelRequest() {} - EMediaType GetMediaType() const { return EMediaType::Real; } + void WaitUntilComplete() override; + bool IsComplete() override { return m_complete; } + void PostCancelRequest() override {} + EMediaType GetMediaType() const override { return EMediaType::Real; } }; protected: @@ -102,7 +102,7 @@ protected: SObjectTag BuildTagFromPath(const hecl::ProjectPath& path) const { return static_cast(*m_cookSpec).buildTagFromPath(path); } - void GetTagListForFile(const char* pakName, std::vector& out) const { + void GetTagListForFile(const char* pakName, std::vector& out) const override { return static_cast(*m_cookSpec).getTagListForFile(pakName, out); } void CancelBackgroundIndex() { @@ -120,32 +120,33 @@ protected: public: ProjectResourceFactoryBase(hecl::ClientProcess& clientProc) : m_clientProc(clientProc) {} - std::unique_ptr Build(const urde::SObjectTag&, const urde::CVParamTransfer&, CObjectReference* selfRef); + std::unique_ptr Build(const urde::SObjectTag&, const urde::CVParamTransfer&, + CObjectReference* selfRef) override; void BuildAsync(const urde::SObjectTag&, const urde::CVParamTransfer&, std::unique_ptr*, - CObjectReference* selfRef); - void CancelBuild(const urde::SObjectTag&); - bool CanBuild(const urde::SObjectTag&); - const urde::SObjectTag* GetResourceIdByName(std::string_view) const; - FourCC GetResourceTypeById(CAssetId id) const; + CObjectReference* selfRef) override; + void CancelBuild(const urde::SObjectTag&) override; + bool CanBuild(const urde::SObjectTag&) override; + const urde::SObjectTag* GetResourceIdByName(std::string_view) const override; + FourCC GetResourceTypeById(CAssetId id) const override; hecl::ProjectPath GetCookedPath(const hecl::ProjectPath& working, bool pcTarget) const { return static_cast(*m_cookSpec).getCookedPath(working, pcTarget); } - void EnumerateResources(const std::function& lambda) const; - void EnumerateNamedResources(const std::function& lambda) const; + void EnumerateResources(const std::function& lambda) const override; + void EnumerateNamedResources(const std::function& lambda) const override; - u32 ResourceSize(const SObjectTag& tag); - std::shared_ptr LoadResourceAsync(const urde::SObjectTag& tag, void* target); + u32 ResourceSize(const SObjectTag& tag) override; + std::shared_ptr LoadResourceAsync(const urde::SObjectTag& tag, void* target) override; std::shared_ptr LoadResourcePartAsync(const urde::SObjectTag& tag, u32 off, u32 size, - void* target); - std::unique_ptr LoadResourceSync(const urde::SObjectTag& tag); - std::unique_ptr LoadNewResourcePartSync(const urde::SObjectTag& tag, u32 off, u32 size); + void* target) override; + std::unique_ptr LoadResourceSync(const urde::SObjectTag& tag) override; + std::unique_ptr LoadNewResourcePartSync(const urde::SObjectTag& tag, u32 off, u32 size) override; std::shared_ptr CookResourceAsync(const urde::SObjectTag& tag); template bool AsyncPumpTask(ItType& it); - void AsyncIdle(); + void AsyncIdle() override; void Shutdown() { CancelBackgroundIndex(); } bool IsBusy() const { return m_asyncLoadMap.size() != 0; } @@ -153,7 +154,7 @@ public: return TagFromPath(hecl::ProjectPath(*(hecl::Database::Project*)m_proj, path)); } - ~ProjectResourceFactoryBase() { Shutdown(); } + ~ProjectResourceFactoryBase() override { Shutdown(); } }; } // namespace urde diff --git a/Editor/ProjectResourceFactoryMP1.hpp b/Editor/ProjectResourceFactoryMP1.hpp index 27dcd7019..143f6248a 100644 --- a/Editor/ProjectResourceFactoryMP1.hpp +++ b/Editor/ProjectResourceFactoryMP1.hpp @@ -15,8 +15,8 @@ public: void IndexMP1Resources(hecl::Database::Project& proj, CSimplePool& sp); void Shutdown(); - CAssetId TranslateOriginalToNew(CAssetId id) const; - CAssetId TranslateNewToOriginal(CAssetId id) const; + CAssetId TranslateOriginalToNew(CAssetId id) const override; + CAssetId TranslateNewToOriginal(CAssetId id) const override; }; } // namespace urde diff --git a/Runtime/Audio/CStreamAudioManager.cpp b/Runtime/Audio/CStreamAudioManager.cpp index e387e473b..6bb845958 100644 --- a/Runtime/Audio/CStreamAudioManager.cpp +++ b/Runtime/Audio/CStreamAudioManager.cpp @@ -148,7 +148,7 @@ struct SDSPStream : boo::IAudioVoiceCallback { s16 m_prev1 = 0; s16 m_prev2 = 0; - void preSupplyAudio(boo::IAudioVoice&, double) {} + void preSupplyAudio(boo::IAudioVoice&, double) override {} unsigned decompressChunk(unsigned readToSample, int16_t*& data) { unsigned startSamp = m_curSample; @@ -173,7 +173,7 @@ struct SDSPStream : boo::IAudioVoiceCallback { return m_curSample - startSamp; } - size_t supplyAudio(boo::IAudioVoice&, size_t frames, int16_t* data) { + size_t supplyAudio(boo::IAudioVoice&, size_t frames, int16_t* data) override { if (!x0_active) { memset(data, 0, frames * 2); return frames; diff --git a/Runtime/Camera/CBallCamera.hpp b/Runtime/Camera/CBallCamera.hpp index 66a725495..bcc4d52d4 100644 --- a/Runtime/Camera/CBallCamera.hpp +++ b/Runtime/Camera/CBallCamera.hpp @@ -235,15 +235,15 @@ public: CBallCamera(TUniqueId uid, TUniqueId watchedId, const zeus::CTransform& xf, float fovy, float znear, float zfar, float aspect); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr); - void ProcessInput(const CFinalInput& input, CStateManager& mgr); - void Reset(const zeus::CTransform&, CStateManager& mgr); - void Render(const CStateManager& mgr) const; + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override; + void ProcessInput(const CFinalInput& input, CStateManager& mgr) override; + void Reset(const zeus::CTransform&, CStateManager& mgr) override; + void Render(const CStateManager& mgr) const override; EBallCameraBehaviour GetBehaviour() const { return x188_behaviour; } EBallCameraState GetState() const { return x400_state; } void SetState(EBallCameraState state, CStateManager& mgr); - void Think(float dt, CStateManager& mgr); + void Think(float dt, CStateManager& mgr) override; bool TransitionFromMorphBallState(CStateManager& mgr); TUniqueId GetTooCloseActorId() const { return x3dc_tooCloseActorId; } float GetTooCloseActorDistance() const { return x3e0_tooCloseActorDist; } diff --git a/Runtime/Camera/CCameraFilter.hpp b/Runtime/Camera/CCameraFilter.hpp index d9faf726a..c68be2306 100644 --- a/Runtime/Camera/CCameraFilter.hpp +++ b/Runtime/Camera/CCameraFilter.hpp @@ -62,10 +62,10 @@ class CCameraFilterPass final : public CCameraFilterPassBase { std::optional m_shader; public: - void Update(float dt); - void SetFilter(EFilterType type, EFilterShape shape, float time, const zeus::CColor& color, CAssetId txtr); - void DisableFilter(float time); - void Draw() const; + void Update(float dt) override; + void SetFilter(EFilterType type, EFilterShape shape, float time, const zeus::CColor& color, CAssetId txtr) override; + void DisableFilter(float time) override; + void Draw() const override; }; class CCameraFilterPassPoly { diff --git a/Runtime/Camera/CCinematicCamera.hpp b/Runtime/Camera/CCinematicCamera.hpp index b22b9bad9..6749c9fe3 100644 --- a/Runtime/Camera/CCinematicCamera.hpp +++ b/Runtime/Camera/CCinematicCamera.hpp @@ -38,11 +38,11 @@ public: CCinematicCamera(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, bool active, float shotDuration, float fovy, float znear, float zfar, float aspect, u32 flags); - void Accept(IVisitor& visitor); - void Think(float dt, CStateManager& mgr); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr); - void ProcessInput(const CFinalInput&, CStateManager& mgr); - void Reset(const zeus::CTransform&, CStateManager& mgr); + void Accept(IVisitor& visitor) override; + void Think(float dt, CStateManager& mgr) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override; + void ProcessInput(const CFinalInput&, CStateManager& mgr) override; + void Reset(const zeus::CTransform&, CStateManager& mgr) override; u32 GetFlags() const { return x21c_flags; } void WasDeactivated(CStateManager& mgr); void SendArrivedMsg(TUniqueId reciever, CStateManager& mgr); diff --git a/Runtime/Camera/CFirstPersonCamera.hpp b/Runtime/Camera/CFirstPersonCamera.hpp index c5e6746b2..97f92b8d0 100644 --- a/Runtime/Camera/CFirstPersonCamera.hpp +++ b/Runtime/Camera/CFirstPersonCamera.hpp @@ -18,11 +18,11 @@ public: CFirstPersonCamera(TUniqueId, const zeus::CTransform& xf, TUniqueId, float orbitCameraSpeed, float fov, float nearplane, float farplane, float aspect); - void Accept(IVisitor& visitor); - void PreThink(float dt, CStateManager& mgr); - void Think(float dt, CStateManager& mgr); - void ProcessInput(const CFinalInput&, CStateManager& mgr); - void Reset(const zeus::CTransform&, CStateManager& mgr); + void Accept(IVisitor& visitor) override; + void PreThink(float dt, CStateManager& mgr) override; + void Think(float dt, CStateManager& mgr) override; + void ProcessInput(const CFinalInput&, CStateManager& mgr) override; + void Reset(const zeus::CTransform&, CStateManager& mgr) override; void SkipCinematic(); const zeus::CTransform& GetGunFollowTransform() const { return x190_gunFollowXf; } diff --git a/Runtime/Camera/CGameCamera.hpp b/Runtime/Camera/CGameCamera.hpp index f486092b1..f98ce69b6 100644 --- a/Runtime/Camera/CGameCamera.hpp +++ b/Runtime/Camera/CGameCamera.hpp @@ -32,8 +32,8 @@ public: float fov, float nearz, float farz, float aspect, TUniqueId watchedId, bool disableInput, u32 controllerIdx); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void SetActive(bool active); + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void SetActive(bool active) override; virtual void ProcessInput(const CFinalInput&, CStateManager& mgr) = 0; virtual void Reset(const zeus::CTransform&, CStateManager& mgr) = 0; diff --git a/Runtime/Camera/CInterpolationCamera.hpp b/Runtime/Camera/CInterpolationCamera.hpp index a3463cfaf..84e1c9146 100644 --- a/Runtime/Camera/CInterpolationCamera.hpp +++ b/Runtime/Camera/CInterpolationCamera.hpp @@ -24,12 +24,12 @@ class CInterpolationCamera : public CGameCamera { public: CInterpolationCamera(TUniqueId uid, const zeus::CTransform& xf); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void ProcessInput(const CFinalInput&, CStateManager& mgr); - void Render(const CStateManager&) const; - void Reset(const zeus::CTransform&, CStateManager& mgr); - void Think(float, CStateManager&); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void ProcessInput(const CFinalInput&, CStateManager& mgr) override; + void Render(const CStateManager&) const override; + void Reset(const zeus::CTransform&, CStateManager& mgr) override; + void Think(float, CStateManager&) override; void SetInterpolation(const zeus::CTransform& xf, const zeus::CVector3f& lookPos, float maxTime, float positionSpeed, float rotationSpeed, TUniqueId camId, bool sinusoidal, CStateManager& mgr); void DeactivateInterpCamera(CStateManager&); diff --git a/Runtime/Camera/CPathCamera.hpp b/Runtime/Camera/CPathCamera.hpp index 281d9fb8e..7afd0f142 100644 --- a/Runtime/Camera/CPathCamera.hpp +++ b/Runtime/Camera/CPathCamera.hpp @@ -26,12 +26,12 @@ public: float lengthExtent, float filterMag, float filterProportion, float minEaseDist, float maxEaseDist, u32 flags, EInitialSplinePosition initPos); - void Accept(IVisitor&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); - void Render(const CStateManager&) const {} - void ProcessInput(const CFinalInput&, CStateManager& mgr); - void Reset(const zeus::CTransform&, CStateManager& mgr); + void Accept(IVisitor&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; + void Render(const CStateManager&) const override {} + void ProcessInput(const CFinalInput&, CStateManager& mgr) override; + void Reset(const zeus::CTransform&, CStateManager& mgr) override; zeus::CTransform MoveAlongSpline(float, CStateManager&); void ClampToClosedDoor(CStateManager&); }; diff --git a/Runtime/Character/CAdditiveBodyState.hpp b/Runtime/Character/CAdditiveBodyState.hpp index 24bc2d286..8a039b54b 100644 --- a/Runtime/Character/CAdditiveBodyState.hpp +++ b/Runtime/Character/CAdditiveBodyState.hpp @@ -29,9 +29,9 @@ class CABSAim : public CAdditiveBodyState { pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); public: - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController& bc); + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController& bc) override; }; class CABSFlinch : public CAdditiveBodyState { @@ -41,8 +41,8 @@ class CABSFlinch : public CAdditiveBodyState { public: void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController& bc) {} + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController& bc) override {} }; class CABSIdle : public CAdditiveBodyState { @@ -50,8 +50,8 @@ class CABSIdle : public CAdditiveBodyState { public: void Start(CBodyController& bc, CStateManager& mgr) {} - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController& bc) {} + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController& bc) override {} }; class CABSReaction : public CAdditiveBodyState { @@ -63,9 +63,9 @@ class CABSReaction : public CAdditiveBodyState { void StopAnimation(CBodyController& bc); public: - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController& bc) { StopAnimation(bc); } + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController& bc) override { StopAnimation(bc); } }; } // namespace urde diff --git a/Runtime/Character/CAnimSourceReader.hpp b/Runtime/Character/CAnimSourceReader.hpp index 497371e4d..d9e909ca0 100644 --- a/Runtime/Character/CAnimSourceReader.hpp +++ b/Runtime/Character/CAnimSourceReader.hpp @@ -24,12 +24,12 @@ class CAnimSourceInfo : public IAnimSourceInfo { public: CAnimSourceInfo(const TSubAnimTypeToken& token); - bool HasPOIData() const; - const std::vector& GetBoolPOIStream() const; - const std::vector& GetInt32POIStream() const; - const std::vector& GetParticlePOIStream() const; - const std::vector& GetSoundPOIStream() const; - CCharAnimTime GetAnimationDuration() const; + bool HasPOIData() const override; + const std::vector& GetBoolPOIStream() const override; + const std::vector& GetInt32POIStream() const override; + const std::vector& GetParticlePOIStream() const override; + const std::vector& GetSoundPOIStream() const override; + CCharAnimTime GetAnimationDuration() const override; }; class CAnimSourceReaderBase : public IAnimReader { @@ -56,13 +56,16 @@ protected: public: CAnimSourceReaderBase(std::unique_ptr&& sourceInfo, const CCharAnimTime& time); - u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const; - bool VGetBoolPOIState(const char* name) const; - s32 VGetInt32POIState(const char* name) const; - CParticleData::EParentedMode VGetParticlePOIState(const char* name) const; + u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const override; + u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, + u32) const override; + u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, + u32) const override; + u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, + u32) const override; + bool VGetBoolPOIState(const char* name) const override; + s32 VGetInt32POIState(const char* name) const override; + CParticleData::EParentedMode VGetParticlePOIState(const char* name) const override; using IAnimReader::VGetOffset; virtual zeus::CVector3f VGetOffset(const CSegId& seg, const CCharAnimTime& b) const = 0; @@ -80,20 +83,20 @@ public: CAnimSourceReader(const TSubAnimTypeToken& source, const CCharAnimTime& time); CAnimSourceReader(const CAnimSourceReader& other); - SAdvancementResults VGetAdvancementResults(const CCharAnimTime& a, const CCharAnimTime& b) const; - bool VSupportsReverseView() const { return true; } - void VSetPhase(float); - SAdvancementResults VReverseView(const CCharAnimTime& time); - std::unique_ptr VClone() const; - void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut) const; - void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut, const CCharAnimTime& time) const; - SAdvancementResults VAdvanceView(const CCharAnimTime& a); - CCharAnimTime VGetTimeRemaining() const; - CSteadyStateAnimInfo VGetSteadyStateAnimInfo() const; - bool VHasOffset(const CSegId& seg) const; - zeus::CVector3f VGetOffset(const CSegId& seg) const; - zeus::CVector3f VGetOffset(const CSegId& seg, const CCharAnimTime& time) const; - zeus::CQuaternion VGetRotation(const CSegId& seg) const; + SAdvancementResults VGetAdvancementResults(const CCharAnimTime& a, const CCharAnimTime& b) const override; + bool VSupportsReverseView() const override { return true; } + void VSetPhase(float) override; + SAdvancementResults VReverseView(const CCharAnimTime& time) override; + std::unique_ptr VClone() const override; + void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut) const override; + void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut, const CCharAnimTime& time) const override; + SAdvancementResults VAdvanceView(const CCharAnimTime& a) override; + CCharAnimTime VGetTimeRemaining() const override; + CSteadyStateAnimInfo VGetSteadyStateAnimInfo() const override; + bool VHasOffset(const CSegId& seg) const override; + zeus::CVector3f VGetOffset(const CSegId& seg) const override; + zeus::CVector3f VGetOffset(const CSegId& seg, const CCharAnimTime& time) const override; + zeus::CQuaternion VGetRotation(const CSegId& seg) const override; }; } // namespace urde diff --git a/Runtime/Character/CAnimTreeAnimReaderContainer.hpp b/Runtime/Character/CAnimTreeAnimReaderContainer.hpp index f64d7cb22..571269c34 100644 --- a/Runtime/Character/CAnimTreeAnimReaderContainer.hpp +++ b/Runtime/Character/CAnimTreeAnimReaderContainer.hpp @@ -11,31 +11,35 @@ class CAnimTreeAnimReaderContainer : public CAnimTreeNode { public: CAnimTreeAnimReaderContainer(std::string_view name, std::shared_ptr reader, u32 animDbIdx); - u32 Depth() const; - CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const; - u32 VGetNumChildren() const; - std::shared_ptr VGetBestUnblendedChild() const; - void VGetWeightedReaders(rstl::reserved_vector>, 16>& out, float w) const; + u32 Depth() const override; + CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const override; + u32 VGetNumChildren() const override; + std::shared_ptr VGetBestUnblendedChild() const override; + void VGetWeightedReaders(rstl::reserved_vector>, 16>& out, + float w) const override; - SAdvancementResults VAdvanceView(const CCharAnimTime& a); - CCharAnimTime VGetTimeRemaining() const; - CSteadyStateAnimInfo VGetSteadyStateAnimInfo() const; - bool VHasOffset(const CSegId& seg) const; - zeus::CVector3f VGetOffset(const CSegId& seg) const; - zeus::CQuaternion VGetRotation(const CSegId& seg) const; - u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const; - bool VGetBoolPOIState(const char*) const; - s32 VGetInt32POIState(const char*) const; - CParticleData::EParentedMode VGetParticlePOIState(const char*) const; - void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut) const; - void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut, const CCharAnimTime& time) const; - std::unique_ptr VClone() const; - std::optional> VSimplified(); - void VSetPhase(float); - SAdvancementResults VGetAdvancementResults(const CCharAnimTime& a, const CCharAnimTime& b) const; + SAdvancementResults VAdvanceView(const CCharAnimTime& a) override; + CCharAnimTime VGetTimeRemaining() const override; + CSteadyStateAnimInfo VGetSteadyStateAnimInfo() const override; + bool VHasOffset(const CSegId& seg) const override; + zeus::CVector3f VGetOffset(const CSegId& seg) const override; + zeus::CQuaternion VGetRotation(const CSegId& seg) const override; + u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const override; + u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, + u32) const override; + u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, + u32) const override; + u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, + u32) const override; + bool VGetBoolPOIState(const char*) const override; + s32 VGetInt32POIState(const char*) const override; + CParticleData::EParentedMode VGetParticlePOIState(const char*) const override; + void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut) const override; + void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut, const CCharAnimTime& time) const override; + std::unique_ptr VClone() const override; + std::optional> VSimplified() override; + void VSetPhase(float) override; + SAdvancementResults VGetAdvancementResults(const CCharAnimTime& a, const CCharAnimTime& b) const override; }; } // namespace urde diff --git a/Runtime/Character/CAnimTreeBlend.hpp b/Runtime/Character/CAnimTreeBlend.hpp index fb0a8a4b5..9bc814f67 100644 --- a/Runtime/Character/CAnimTreeBlend.hpp +++ b/Runtime/Character/CAnimTreeBlend.hpp @@ -14,12 +14,12 @@ public: CAnimTreeBlend(bool, const std::shared_ptr& a, const std::shared_ptr& b, float blendWeight, std::string_view name); - SAdvancementResults VAdvanceView(const CCharAnimTime& dt); - CCharAnimTime VGetTimeRemaining() const; - CSteadyStateAnimInfo VGetSteadyStateAnimInfo() const; - std::unique_ptr VClone() const; - void SetBlendingWeight(float w); - float VGetBlendingWeight() const; + SAdvancementResults VAdvanceView(const CCharAnimTime& dt) override; + CCharAnimTime VGetTimeRemaining() const override; + CSteadyStateAnimInfo VGetSteadyStateAnimInfo() const override; + std::unique_ptr VClone() const override; + void SetBlendingWeight(float w) override; + float VGetBlendingWeight() const override; }; } // namespace urde diff --git a/Runtime/Character/CAnimTreeDoubleChild.hpp b/Runtime/Character/CAnimTreeDoubleChild.hpp index 7e1135a28..1d0ab0f1d 100644 --- a/Runtime/Character/CAnimTreeDoubleChild.hpp +++ b/Runtime/Character/CAnimTreeDoubleChild.hpp @@ -29,21 +29,25 @@ protected: public: CAnimTreeDoubleChild(const std::weak_ptr& a, const std::weak_ptr& b, std::string_view name); - SAdvancementResults VAdvanceView(const CCharAnimTime& a); - u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const; - bool VGetBoolPOIState(const char* name) const; - s32 VGetInt32POIState(const char* name) const; - CParticleData::EParentedMode VGetParticlePOIState(const char* name) const; - void VSetPhase(float); - SAdvancementResults VGetAdvancementResults(const CCharAnimTime& a, const CCharAnimTime& b) const; - u32 Depth() const; - CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const; - u32 VGetNumChildren() const; - std::shared_ptr VGetBestUnblendedChild() const; - void VGetWeightedReaders(rstl::reserved_vector>, 16>& out, float w) const; + SAdvancementResults VAdvanceView(const CCharAnimTime& a) override; + u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const override; + u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, + u32) const override; + u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, + u32) const override; + u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, + u32) const override; + bool VGetBoolPOIState(const char* name) const override; + s32 VGetInt32POIState(const char* name) const override; + CParticleData::EParentedMode VGetParticlePOIState(const char* name) const override; + void VSetPhase(float) override; + SAdvancementResults VGetAdvancementResults(const CCharAnimTime& a, const CCharAnimTime& b) const override; + u32 Depth() const override; + CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const override; + u32 VGetNumChildren() const override; + std::shared_ptr VGetBestUnblendedChild() const override; + void VGetWeightedReaders(rstl::reserved_vector>, 16>& out, + float w) const override; virtual float VGetRightChildWeight() const = 0; float GetRightChildWeight() const { return VGetRightChildWeight(); } diff --git a/Runtime/Character/CAnimTreeLoopIn.hpp b/Runtime/Character/CAnimTreeLoopIn.hpp index 2dcd22bea..ccaa20b85 100644 --- a/Runtime/Character/CAnimTreeLoopIn.hpp +++ b/Runtime/Character/CAnimTreeLoopIn.hpp @@ -21,18 +21,21 @@ public: CAnimTreeLoopIn(const std::weak_ptr& a, const std::weak_ptr& b, bool didLoopIn, const CAnimSysContext& animCtx, std::string_view name, const CSequenceFundamentals& fundamentals, const CCharAnimTime& time); - CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const; + CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const override; bool VSupportsReverseView() const { return false; } - std::optional> VSimplified(); - std::shared_ptr VGetBestUnblendedChild() const; - std::unique_ptr VClone() const; - u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const; - CSteadyStateAnimInfo VGetSteadyStateAnimInfo() const; - CCharAnimTime VGetTimeRemaining() const; - SAdvancementResults VAdvanceView(const CCharAnimTime& dt); + std::optional> VSimplified() override; + std::shared_ptr VGetBestUnblendedChild() const override; + std::unique_ptr VClone() const override; + u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const override; + u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, + u32) const override; + u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, + u32) const override; + u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, + u32) const override; + CSteadyStateAnimInfo VGetSteadyStateAnimInfo() const override; + CCharAnimTime VGetTimeRemaining() const override; + SAdvancementResults VAdvanceView(const CCharAnimTime& dt) override; }; } // namespace urde diff --git a/Runtime/Character/CAnimTreeNode.hpp b/Runtime/Character/CAnimTreeNode.hpp index 3b8c93edf..3d689b0c0 100644 --- a/Runtime/Character/CAnimTreeNode.hpp +++ b/Runtime/Character/CAnimTreeNode.hpp @@ -10,7 +10,7 @@ protected: public: CAnimTreeNode(std::string_view name) : x4_name(name) {} - bool IsCAnimTreeNode() const { return true; } + bool IsCAnimTreeNode() const override { return true; } static std::shared_ptr Cast(std::unique_ptr&& ptr) { if (ptr->IsCAnimTreeNode()) return std::static_pointer_cast(std::shared_ptr(std::move(ptr))); diff --git a/Runtime/Character/CAnimTreeSequence.hpp b/Runtime/Character/CAnimTreeSequence.hpp index 8941f8356..a1386c798 100644 --- a/Runtime/Character/CAnimTreeSequence.hpp +++ b/Runtime/Character/CAnimTreeSequence.hpp @@ -22,18 +22,21 @@ public: const std::vector>& metaAnims, const CAnimSysContext& animSys, std::string_view name, const CSequenceFundamentals& fundamentals, const CCharAnimTime& time); - CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const; - std::shared_ptr VGetBestUnblendedChild() const; + CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const override; + std::shared_ptr VGetBestUnblendedChild() const override; bool VSupportsReverseView() const { return false; } - SAdvancementResults VAdvanceView(const CCharAnimTime& dt); - CCharAnimTime VGetTimeRemaining() const; - CSteadyStateAnimInfo VGetSteadyStateAnimInfo() const; - u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const; - std::unique_ptr VClone() const; + SAdvancementResults VAdvanceView(const CCharAnimTime& dt) override; + CCharAnimTime VGetTimeRemaining() const override; + CSteadyStateAnimInfo VGetSteadyStateAnimInfo() const override; + u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const override; + u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, + u32) const override; + u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, + u32) const override; + u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, + u32) const override; + std::unique_ptr VClone() const override; }; } // namespace urde diff --git a/Runtime/Character/CAnimTreeSingleChild.hpp b/Runtime/Character/CAnimTreeSingleChild.hpp index 2340528dc..9c5724fc5 100644 --- a/Runtime/Character/CAnimTreeSingleChild.hpp +++ b/Runtime/Character/CAnimTreeSingleChild.hpp @@ -11,26 +11,29 @@ protected: public: CAnimTreeSingleChild(const std::weak_ptr& node, std::string_view name); - SAdvancementResults VAdvanceView(const CCharAnimTime& dt); - CCharAnimTime VGetTimeRemaining() const; - bool VHasOffset(const CSegId& seg) const; - zeus::CVector3f VGetOffset(const CSegId& seg) const; - zeus::CQuaternion VGetRotation(const CSegId& seg) const; - u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const; - bool VGetBoolPOIState(const char* name) const; - s32 VGetInt32POIState(const char* name) const; - CParticleData::EParentedMode VGetParticlePOIState(const char* name) const; - void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut) const; - void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut, const CCharAnimTime& time) const; - void VSetPhase(float); - SAdvancementResults VGetAdvancementResults(const CCharAnimTime& a, const CCharAnimTime& b) const; - u32 Depth() const; - u32 VGetNumChildren() const; + SAdvancementResults VAdvanceView(const CCharAnimTime& dt) override; + CCharAnimTime VGetTimeRemaining() const override; + bool VHasOffset(const CSegId& seg) const override; + zeus::CVector3f VGetOffset(const CSegId& seg) const override; + zeus::CQuaternion VGetRotation(const CSegId& seg) const override; + u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const override; + u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, + u32) const override; + u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, + u32) const override; + u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, + u32) const override; + bool VGetBoolPOIState(const char* name) const override; + s32 VGetInt32POIState(const char* name) const override; + CParticleData::EParentedMode VGetParticlePOIState(const char* name) const override; + void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut) const override; + void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut, const CCharAnimTime& time) const override; + void VSetPhase(float) override; + SAdvancementResults VGetAdvancementResults(const CCharAnimTime& a, const CCharAnimTime& b) const override; + u32 Depth() const override; + u32 VGetNumChildren() const override; void VGetWeightedReaders(rstl::reserved_vector>, 16>& out, - float w) const { + float w) const override { x14_child->VGetWeightedReaders(out, w); } }; diff --git a/Runtime/Character/CAnimTreeTimeScale.hpp b/Runtime/Character/CAnimTreeTimeScale.hpp index 85bb1234d..b376b47c1 100644 --- a/Runtime/Character/CAnimTreeTimeScale.hpp +++ b/Runtime/Character/CAnimTreeTimeScale.hpp @@ -19,23 +19,26 @@ public: static std::string CreatePrimitiveName(const std::weak_ptr&, float, const CCharAnimTime&, float); CCharAnimTime GetRealLifeTime(const CCharAnimTime&) const; - void VSetPhase(float); - std::optional> VSimplified(); + void VSetPhase(float) override; + std::optional> VSimplified() override; - u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, u32) const; - u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const; - bool VGetBoolPOIState(const char* name) const; - s32 VGetInt32POIState(const char* name) const; - CParticleData::EParentedMode VGetParticlePOIState(const char* name) const; + u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const override; + u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, + u32) const override; + u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, + u32) const override; + u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, + u32) const override; + bool VGetBoolPOIState(const char* name) const override; + s32 VGetInt32POIState(const char* name) const override; + CParticleData::EParentedMode VGetParticlePOIState(const char* name) const override; - CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const; - std::shared_ptr VGetBestUnblendedChild() const; - std::unique_ptr VClone() const; - CSteadyStateAnimInfo VGetSteadyStateAnimInfo() const; - CCharAnimTime VGetTimeRemaining() const; - SAdvancementResults VAdvanceView(const CCharAnimTime& dt); + CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const override; + std::shared_ptr VGetBestUnblendedChild() const override; + std::unique_ptr VClone() const override; + CSteadyStateAnimInfo VGetSteadyStateAnimInfo() const override; + CCharAnimTime VGetTimeRemaining() const override; + SAdvancementResults VAdvanceView(const CCharAnimTime& dt) override; }; } // namespace urde diff --git a/Runtime/Character/CAnimTreeTransition.hpp b/Runtime/Character/CAnimTreeTransition.hpp index 4dc45b22c..8bdc4a808 100644 --- a/Runtime/Character/CAnimTreeTransition.hpp +++ b/Runtime/Character/CAnimTreeTransition.hpp @@ -23,14 +23,14 @@ public: std::string_view name, bool initialized); CAnimTreeTransition(bool b1, const std::weak_ptr& a, const std::weak_ptr& b, const CCharAnimTime& transDur, bool runA, int flags, std::string_view name); - std::shared_ptr VGetBestUnblendedChild() const; - CCharAnimTime VGetTimeRemaining() const; - CSteadyStateAnimInfo VGetSteadyStateAnimInfo() const; - std::unique_ptr VClone() const; - std::optional> VSimplified(); - std::optional> VReverseSimplified(); - SAdvancementResults VAdvanceView(const CCharAnimTime& a); - void SetBlendingWeight(float w); - float VGetBlendingWeight() const; + std::shared_ptr VGetBestUnblendedChild() const override; + CCharAnimTime VGetTimeRemaining() const override; + CSteadyStateAnimInfo VGetSteadyStateAnimInfo() const override; + std::unique_ptr VClone() const override; + std::optional> VSimplified() override; + std::optional> VReverseSimplified() override; + SAdvancementResults VAdvanceView(const CCharAnimTime& a) override; + void SetBlendingWeight(float w) override; + float VGetBlendingWeight() const override; }; } // namespace urde diff --git a/Runtime/Character/CAnimTreeTweenBase.hpp b/Runtime/Character/CAnimTreeTweenBase.hpp index 866edb96b..6049ac340 100644 --- a/Runtime/Character/CAnimTreeTweenBase.hpp +++ b/Runtime/Character/CAnimTreeTweenBase.hpp @@ -21,16 +21,17 @@ public: float GetBlendingWeight() const { return VGetBlendingWeight(); } - void VGetWeightedReaders(rstl::reserved_vector>, 16>& out, float w) const; - float VGetRightChildWeight() const { return GetBlendingWeight(); } + void VGetWeightedReaders(rstl::reserved_vector>, 16>& out, + float w) const override; + float VGetRightChildWeight() const override { return GetBlendingWeight(); } - void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut) const; - void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut, const CCharAnimTime& time) const; - bool VHasOffset(const CSegId& seg) const; - zeus::CVector3f VGetOffset(const CSegId& seg) const; - zeus::CQuaternion VGetRotation(const CSegId& seg) const; + void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut) const override; + void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut, const CCharAnimTime& time) const override; + bool VHasOffset(const CSegId& seg) const override; + zeus::CVector3f VGetOffset(const CSegId& seg) const override; + zeus::CQuaternion VGetRotation(const CSegId& seg) const override; - std::optional> VSimplified(); + std::optional> VSimplified() override; virtual std::optional> VReverseSimplified() { return CAnimTreeTweenBase::VSimplified(); } diff --git a/Runtime/Character/CAnimationDatabaseGame.hpp b/Runtime/Character/CAnimationDatabaseGame.hpp index d78ca9dfb..fb7d80516 100644 --- a/Runtime/Character/CAnimationDatabaseGame.hpp +++ b/Runtime/Character/CAnimationDatabaseGame.hpp @@ -10,11 +10,11 @@ class CAnimationDatabaseGame final : public CAnimationDatabase { public: CAnimationDatabaseGame(const std::vector& anims); - const std::shared_ptr& GetMetaAnim(s32 idx) const; - u32 GetNumMetaAnims() const; - const char* GetMetaAnimName(s32 idx) const; - void GetAllUniquePrimitives(std::vector& primsOut) const; - void GetUniquePrimitivesFromMetaAnim(std::set& primsOut, std::string_view name) const; + const std::shared_ptr& GetMetaAnim(s32 idx) const override; + u32 GetNumMetaAnims() const override; + const char* GetMetaAnimName(s32 idx) const override; + void GetAllUniquePrimitives(std::vector& primsOut) const override; + void GetUniquePrimitivesFromMetaAnim(std::set& primsOut, std::string_view name) const override; }; } // namespace urde diff --git a/Runtime/Character/CAssetFactory.hpp b/Runtime/Character/CAssetFactory.hpp index f542e9227..38eebb026 100644 --- a/Runtime/Character/CAssetFactory.hpp +++ b/Runtime/Character/CAssetFactory.hpp @@ -13,21 +13,23 @@ class CCharacterFactoryBuilder { public: class CDummyFactory : public IFactory { public: - CFactoryFnReturn Build(const SObjectTag&, const CVParamTransfer&, CObjectReference* selfRef); - void BuildAsync(const SObjectTag&, const CVParamTransfer&, std::unique_ptr*, CObjectReference* selfRef); - void CancelBuild(const SObjectTag&); - bool CanBuild(const SObjectTag&); - const SObjectTag* GetResourceIdByName(std::string_view) const; - FourCC GetResourceTypeById(CAssetId id) const; + CFactoryFnReturn Build(const SObjectTag&, const CVParamTransfer&, CObjectReference* selfRef) override; + void BuildAsync(const SObjectTag&, const CVParamTransfer&, std::unique_ptr*, + CObjectReference* selfRef) override; + void CancelBuild(const SObjectTag&) override; + bool CanBuild(const SObjectTag&) override; + const SObjectTag* GetResourceIdByName(std::string_view) const override; + FourCC GetResourceTypeById(CAssetId id) const override; - void EnumerateResources(const std::function& lambda) const; - void EnumerateNamedResources(const std::function& lambda) const; + void EnumerateResources(const std::function& lambda) const override; + void EnumerateNamedResources(const std::function& lambda) const override; - u32 ResourceSize(const urde::SObjectTag& tag); - std::shared_ptr LoadResourceAsync(const urde::SObjectTag& tag, void* target); - std::shared_ptr LoadResourcePartAsync(const urde::SObjectTag& tag, u32 off, u32 size, void* target); - std::unique_ptr LoadResourceSync(const urde::SObjectTag& tag); - std::unique_ptr LoadNewResourcePartSync(const urde::SObjectTag& tag, u32 off, u32 size); + u32 ResourceSize(const urde::SObjectTag& tag) override; + std::shared_ptr LoadResourceAsync(const urde::SObjectTag& tag, void* target) override; + std::shared_ptr LoadResourcePartAsync(const urde::SObjectTag& tag, u32 off, u32 size, + void* target) override; + std::unique_ptr LoadResourceSync(const urde::SObjectTag& tag) override; + std::unique_ptr LoadNewResourcePartSync(const urde::SObjectTag& tag, u32 off, u32 size) override; }; private: diff --git a/Runtime/Character/CBodyState.hpp b/Runtime/Character/CBodyState.hpp index 05d7e2048..fddd68fa9 100644 --- a/Runtime/Character/CBodyState.hpp +++ b/Runtime/Character/CBodyState.hpp @@ -35,20 +35,20 @@ class CBSAttack : public CBodyState { void UpdatePhysicsActor(CBodyController& bc, float dt); public: - bool CanShoot() const { return false; } - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController&) {} + bool CanShoot() const override { return false; } + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController&) override {} }; class CBSProjectileAttack : public CBodyState { pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); public: - bool CanShoot() const { return true; } - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController&) {} + bool CanShoot() const override { return true; } + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController&) override {} }; class CBSDie : public CBodyState { @@ -56,11 +56,11 @@ class CBSDie : public CBodyState { bool x8_isDead = false; public: - bool IsDead() const { return x8_isDead; } - bool IsDying() const { return true; } - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController&) {} + bool IsDead() const override { return x8_isDead; } + bool IsDying() const override { return true; } + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController&) override {} }; class CBSFall : public CBodyState { @@ -70,9 +70,9 @@ class CBSFall : public CBodyState { pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); public: - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController& bc); + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController& bc) override; }; class CBSGetup : public CBodyState { @@ -80,9 +80,9 @@ class CBSGetup : public CBodyState { pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); public: - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController& bc); + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController& bc) override; }; class CBSKnockBack : public CBodyState { @@ -92,10 +92,10 @@ class CBSKnockBack : public CBodyState { pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); public: - bool IsMoving() const { return true; } - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController&) {} + bool IsMoving() const override { return true; } + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController&) override {} }; class CBSLieOnGround : public CBodyState { @@ -104,20 +104,20 @@ class CBSLieOnGround : public CBodyState { public: CBSLieOnGround(CActor& actor); - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController& bc); + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController& bc) override; }; class CBSStep : public CBodyState { pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); public: - bool IsMoving() const { return true; } - bool CanShoot() const { return true; } - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController&) {} + bool IsMoving() const override { return true; } + bool CanShoot() const override { return true; } + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController&) override {} }; class CBSTurn : public CBodyState { @@ -128,17 +128,17 @@ protected: bool FacingDest(CBodyController& bc) const; public: - bool CanShoot() const { return true; } - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController&) {} + bool CanShoot() const override { return true; } + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController&) override {} virtual pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); }; class CBSFlyerTurn : public CBSTurn { public: - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; }; class CBSLoopAttack : public CBodyState { @@ -153,10 +153,10 @@ public: xc_24_waitForAnimOver = false; xc_25_advance = false; } - bool CanShoot() const { return true; } - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController&) {} + bool CanShoot() const override { return true; } + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController&) override {} }; class CBSLoopReaction : public CBodyState { @@ -168,9 +168,9 @@ class CBSLoopReaction : public CBodyState { public: CBSLoopReaction() { xc_24_loopHit = false; } - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController&) {} + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController&) override {} }; class CBSGroundHit : public CBodyState { @@ -180,18 +180,18 @@ class CBSGroundHit : public CBodyState { pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); public: - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController& bc); + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController& bc) override; }; class CBSGenerate : public CBodyState { pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); public: - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController&) {} + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController&) override {} }; class CBSJump : public CBodyState { @@ -216,14 +216,14 @@ class CBSJump : public CBodyState { void PlayJumpLoop(CStateManager& mgr, CBodyController& bc); public: - bool IsMoving() const { return true; } - bool ApplyHeadTracking() const { return false; } - bool CanShoot() const; - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - bool ApplyAnimationDeltas() const; - bool IsInAir(const CBodyController& bc) const; - void Shutdown(CBodyController&) {} + bool IsMoving() const override { return true; } + bool ApplyHeadTracking() const override { return false; } + bool CanShoot() const override; + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + bool ApplyAnimationDeltas() const override; + bool IsInAir(const CBodyController& bc) const override; + void Shutdown(CBodyController&) override {} }; class CBSHurled : public CBodyState { @@ -245,12 +245,12 @@ class CBSHurled : public CBodyState { public: CBSHurled() { x2c_24_needsRecover = false; } - bool IsMoving() const { return true; } - bool IsInAir(const CBodyController&) const { return true; } - bool ApplyHeadTracking() const { return false; } - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController&) {} + bool IsMoving() const override { return true; } + bool IsInAir(const CBodyController&) const override { return true; } + bool ApplyHeadTracking() const override { return false; } + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController&) override {} }; class CBSSlide : public CBodyState { @@ -258,20 +258,20 @@ class CBSSlide : public CBodyState { pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); public: - bool ApplyHeadTracking() const { return false; } - bool IsMoving() const { return true; } - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController&) {} + bool ApplyHeadTracking() const override { return false; } + bool IsMoving() const override { return true; } + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController&) override {} }; class CBSTaunt : public CBodyState { pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); public: - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController&) {} + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController&) override {} }; class CBSScripted : public CBodyState { @@ -286,10 +286,10 @@ class CBSScripted : public CBodyState { pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); public: - bool ApplyHeadTracking() const { return false; } - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController&) {} + bool ApplyHeadTracking() const override { return false; } + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController&) override {} }; class CBSCover : public CBodyState { @@ -299,12 +299,12 @@ class CBSCover : public CBodyState { pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); public: - bool ApplyHeadTracking() const { return false; } - bool IsMoving() const { return true; } - bool CanShoot() const { return x4_state == pas::ECoverState::Lean; } - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController&) {} + bool ApplyHeadTracking() const override { return false; } + bool IsMoving() const override { return true; } + bool CanShoot() const override { return x4_state == pas::ECoverState::Lean; } + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController&) override {} }; class CBSWallHang : public CBodyState { @@ -325,15 +325,15 @@ class CBSWallHang : public CBodyState { void SetLaunchVelocity(CBodyController& bc); public: - bool IsMoving() const { return true; } - bool CanShoot() const { return x4_state == pas::EWallHangState::WallHang; } - bool IsInAir(const CBodyController& bc) const; - bool ApplyGravity() const; - bool ApplyHeadTracking() const; - bool ApplyAnimationDeltas() const; - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController&) {} + bool IsMoving() const override { return true; } + bool CanShoot() const override { return x4_state == pas::EWallHangState::WallHang; } + bool IsInAir(const CBodyController& bc) const override; + bool ApplyGravity() const override; + bool ApplyHeadTracking() const override; + bool ApplyAnimationDeltas() const override; + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController&) override {} }; class CBSLocomotion : public CBodyState { @@ -344,11 +344,11 @@ protected: float ComputeWeightPercentage(const std::pair& a, const std::pair& b, float f) const; public: - bool IsMoving() const = 0; - bool CanShoot() const { return true; } - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - void Shutdown(CBodyController& bc); + bool IsMoving() const override = 0; + bool CanShoot() const override { return true; } + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController& bc) override; virtual bool IsPitchable() const { return false; } virtual float GetLocomotionSpeed(pas::ELocomotionType type, pas::ELocomotionAnim anim) const = 0; virtual float ApplyLocomotionPhysics(float dt, CBodyController& bc); @@ -370,11 +370,11 @@ protected: public: CBSBiPedLocomotion(CActor& actor); - bool IsMoving() const { return x3c4_anim != pas::ELocomotionAnim::Idle; } - void Start(CBodyController& bc, CStateManager& mgr); - pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr); - float GetLocomotionSpeed(pas::ELocomotionType type, pas::ELocomotionAnim anim) const; - float UpdateLocomotionAnimation(float dt, float velMag, CBodyController& bc, bool init); + bool IsMoving() const override { return x3c4_anim != pas::ELocomotionAnim::Idle; } + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + float GetLocomotionSpeed(pas::ELocomotionType type, pas::ELocomotionAnim anim) const override; + float UpdateLocomotionAnimation(float dt, float velMag, CBodyController& bc, bool init) override; virtual bool IsStrafing(const CBodyController& bc) const; }; @@ -383,22 +383,22 @@ class CBSFlyerLocomotion : public CBSBiPedLocomotion { public: CBSFlyerLocomotion(CActor& actor, bool pitchable); - bool IsPitchable() const { return x3cc_pitchable; } - float ApplyLocomotionPhysics(float dt, CBodyController& bc); + bool IsPitchable() const override { return x3cc_pitchable; } + float ApplyLocomotionPhysics(float dt, CBodyController& bc) override; virtual bool IsBackPedal(CBodyController& bc) const { return false; } }; class CBSWallWalkerLocomotion : public CBSBiPedLocomotion { public: CBSWallWalkerLocomotion(CActor& actor); - float ApplyLocomotionPhysics(float dt, CBodyController& bc); + float ApplyLocomotionPhysics(float dt, CBodyController& bc) override; }; class CBSNewFlyerLocomotion : public CBSBiPedLocomotion { public: CBSNewFlyerLocomotion(CActor& actor); - float ApplyLocomotionPhysics(float dt, CBodyController& bc); - float UpdateLocomotionAnimation(float dt, float velMag, CBodyController& bc, bool init); + float ApplyLocomotionPhysics(float dt, CBodyController& bc) override; + float UpdateLocomotionAnimation(float dt, float velMag, CBodyController& bc, bool init) override; }; class CBSRestrictedLocomotion : public CBSLocomotion { @@ -407,14 +407,14 @@ class CBSRestrictedLocomotion : public CBSLocomotion { public: CBSRestrictedLocomotion(CActor& actor); - bool IsMoving() const { return false; } - float GetLocomotionSpeed(pas::ELocomotionType type, pas::ELocomotionAnim anim) const { return 0.f; } - float UpdateLocomotionAnimation(float dt, float velMag, CBodyController& bc, bool init); + bool IsMoving() const override { return false; } + float GetLocomotionSpeed(pas::ELocomotionType type, pas::ELocomotionAnim anim) const override { return 0.f; } + float UpdateLocomotionAnimation(float dt, float velMag, CBodyController& bc, bool init) override; }; class CBSRestrictedFlyerLocomotion : public CBSRestrictedLocomotion { public: CBSRestrictedFlyerLocomotion(CActor& actor); - float ApplyLocomotionPhysics(float dt, CBodyController& bc); + float ApplyLocomotionPhysics(float dt, CBodyController& bc) override; }; } // namespace urde diff --git a/Runtime/Character/CCharacterFactory.hpp b/Runtime/Character/CCharacterFactory.hpp index e40888afe..de2881aac 100644 --- a/Runtime/Character/CCharacterFactory.hpp +++ b/Runtime/Character/CCharacterFactory.hpp @@ -22,21 +22,23 @@ class CCharacterFactory : public IObjFactory { public: class CDummyFactory : public IFactory { public: - CFactoryFnReturn Build(const SObjectTag&, const CVParamTransfer&, CObjectReference* selfRef); - void BuildAsync(const SObjectTag&, const CVParamTransfer&, std::unique_ptr*, CObjectReference* selfRef); - void CancelBuild(const SObjectTag&); - bool CanBuild(const SObjectTag&); - const SObjectTag* GetResourceIdByName(std::string_view) const; - FourCC GetResourceTypeById(CAssetId id) const; + CFactoryFnReturn Build(const SObjectTag&, const CVParamTransfer&, CObjectReference* selfRef) override; + void BuildAsync(const SObjectTag&, const CVParamTransfer&, std::unique_ptr*, + CObjectReference* selfRef) override; + void CancelBuild(const SObjectTag&) override; + bool CanBuild(const SObjectTag&) override; + const SObjectTag* GetResourceIdByName(std::string_view) const override; + FourCC GetResourceTypeById(CAssetId id) const override; - void EnumerateResources(const std::function& lambda) const; - void EnumerateNamedResources(const std::function& lambda) const; + void EnumerateResources(const std::function& lambda) const override; + void EnumerateNamedResources(const std::function& lambda) const override; - u32 ResourceSize(const urde::SObjectTag& tag); - std::shared_ptr LoadResourceAsync(const urde::SObjectTag& tag, void* target); - std::shared_ptr LoadResourcePartAsync(const urde::SObjectTag& tag, u32 off, u32 size, void* target); - std::unique_ptr LoadResourceSync(const urde::SObjectTag& tag); - std::unique_ptr LoadNewResourcePartSync(const urde::SObjectTag& tag, u32 off, u32 size); + u32 ResourceSize(const urde::SObjectTag& tag) override; + std::shared_ptr LoadResourceAsync(const urde::SObjectTag& tag, void* target) override; + std::shared_ptr LoadResourcePartAsync(const urde::SObjectTag& tag, u32 off, u32 size, + void* target) override; + std::unique_ptr LoadResourceSync(const urde::SObjectTag& tag) override; + std::unique_ptr LoadNewResourcePartSync(const urde::SObjectTag& tag, u32 off, u32 size) override; }; private: diff --git a/Runtime/Character/CFBStreamedAnimReader.hpp b/Runtime/Character/CFBStreamedAnimReader.hpp index cf12d4eed..f6cb7a966 100644 --- a/Runtime/Character/CFBStreamedAnimReader.hpp +++ b/Runtime/Character/CFBStreamedAnimReader.hpp @@ -12,12 +12,14 @@ class TAnimSourceInfo : public IAnimSourceInfo { public: TAnimSourceInfo(const TSubAnimTypeToken& token) : x4_token(token) {} - bool HasPOIData() const { return x4_token->HasPOIData(); } - const std::vector& GetBoolPOIStream() const { return x4_token->GetBoolPOIStream(); } - const std::vector& GetInt32POIStream() const { return x4_token->GetInt32POIStream(); } - const std::vector& GetParticlePOIStream() const { return x4_token->GetParticlePOIStream(); } - const std::vector& GetSoundPOIStream() const { return x4_token->GetSoundPOIStream(); } - CCharAnimTime GetAnimationDuration() const { return x4_token->GetAnimationDuration(); } + bool HasPOIData() const override { return x4_token->HasPOIData(); } + const std::vector& GetBoolPOIStream() const override { return x4_token->GetBoolPOIStream(); } + const std::vector& GetInt32POIStream() const override { return x4_token->GetInt32POIStream(); } + const std::vector& GetParticlePOIStream() const override { + return x4_token->GetParticlePOIStream(); + } + const std::vector& GetSoundPOIStream() const override { return x4_token->GetSoundPOIStream(); } + CCharAnimTime GetAnimationDuration() const override { return x4_token->GetAnimationDuration(); } }; class CFBStreamedAnimReaderTotals { @@ -101,20 +103,20 @@ class CFBStreamedAnimReader : public CAnimSourceReaderBase { public: CFBStreamedAnimReader(const TSubAnimTypeToken& source, const CCharAnimTime& time); - SAdvancementResults VGetAdvancementResults(const CCharAnimTime& a, const CCharAnimTime& b) const; - bool VSupportsReverseView() const { return false; } - void VSetPhase(float); - SAdvancementResults VReverseView(const CCharAnimTime& time); - std::unique_ptr VClone() const; - void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut) const; - void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut, const CCharAnimTime& time) const; - SAdvancementResults VAdvanceView(const CCharAnimTime& a); - CCharAnimTime VGetTimeRemaining() const; - CSteadyStateAnimInfo VGetSteadyStateAnimInfo() const; - bool VHasOffset(const CSegId& seg) const; - zeus::CVector3f VGetOffset(const CSegId& seg) const; - zeus::CVector3f VGetOffset(const CSegId& seg, const CCharAnimTime& time) const; - zeus::CQuaternion VGetRotation(const CSegId& seg) const; + SAdvancementResults VGetAdvancementResults(const CCharAnimTime& a, const CCharAnimTime& b) const override; + bool VSupportsReverseView() const override { return false; } + void VSetPhase(float) override; + SAdvancementResults VReverseView(const CCharAnimTime& time) override; + std::unique_ptr VClone() const override; + void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut) const override; + void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut, const CCharAnimTime& time) const override; + SAdvancementResults VAdvanceView(const CCharAnimTime& a) override; + CCharAnimTime VGetTimeRemaining() const override; + CSteadyStateAnimInfo VGetSteadyStateAnimInfo() const override; + bool VHasOffset(const CSegId& seg) const override; + zeus::CVector3f VGetOffset(const CSegId& seg) const override; + zeus::CVector3f VGetOffset(const CSegId& seg, const CCharAnimTime& time) const override; + zeus::CQuaternion VGetRotation(const CSegId& seg) const override; }; } // namespace urde diff --git a/Runtime/Character/CMetaAnimBlend.hpp b/Runtime/Character/CMetaAnimBlend.hpp index 291b84abf..cd39e11ab 100644 --- a/Runtime/Character/CMetaAnimBlend.hpp +++ b/Runtime/Character/CMetaAnimBlend.hpp @@ -13,11 +13,11 @@ class CMetaAnimBlend : public IMetaAnim { public: CMetaAnimBlend(CInputStream& in); - EMetaAnimType GetType() const { return EMetaAnimType::Blend; } + EMetaAnimType GetType() const override { return EMetaAnimType::Blend; } - void GetUniquePrimitives(std::set& primsOut) const; + void GetUniquePrimitives(std::set& primsOut) const override; std::shared_ptr VGetAnimationTree(const CAnimSysContext& animSys, - const CMetaAnimTreeBuildOrders& orders) const; + const CMetaAnimTreeBuildOrders& orders) const override; }; } // namespace urde diff --git a/Runtime/Character/CMetaAnimPhaseBlend.hpp b/Runtime/Character/CMetaAnimPhaseBlend.hpp index 13781c05c..695a0c3a6 100644 --- a/Runtime/Character/CMetaAnimPhaseBlend.hpp +++ b/Runtime/Character/CMetaAnimPhaseBlend.hpp @@ -13,11 +13,11 @@ class CMetaAnimPhaseBlend : public IMetaAnim { public: CMetaAnimPhaseBlend(CInputStream& in); - EMetaAnimType GetType() const { return EMetaAnimType::PhaseBlend; } + EMetaAnimType GetType() const override { return EMetaAnimType::PhaseBlend; } - void GetUniquePrimitives(std::set& primsOut) const; + void GetUniquePrimitives(std::set& primsOut) const override; std::shared_ptr VGetAnimationTree(const CAnimSysContext& animSys, - const CMetaAnimTreeBuildOrders& orders) const; + const CMetaAnimTreeBuildOrders& orders) const override; }; } // namespace urde diff --git a/Runtime/Character/CMetaAnimPlay.hpp b/Runtime/Character/CMetaAnimPlay.hpp index d3b217cd2..cb0c445f9 100644 --- a/Runtime/Character/CMetaAnimPlay.hpp +++ b/Runtime/Character/CMetaAnimPlay.hpp @@ -12,11 +12,11 @@ class CMetaAnimPlay : public IMetaAnim { public: CMetaAnimPlay(CInputStream& in); - EMetaAnimType GetType() const { return EMetaAnimType::Play; } + EMetaAnimType GetType() const override { return EMetaAnimType::Play; } - void GetUniquePrimitives(std::set& primsOut) const; + void GetUniquePrimitives(std::set& primsOut) const override; std::shared_ptr VGetAnimationTree(const CAnimSysContext& animSys, - const CMetaAnimTreeBuildOrders& orders) const; + const CMetaAnimTreeBuildOrders& orders) const override; }; } // namespace urde diff --git a/Runtime/Character/CMetaAnimRandom.hpp b/Runtime/Character/CMetaAnimRandom.hpp index fb42d7ca4..ac85f1c1b 100644 --- a/Runtime/Character/CMetaAnimRandom.hpp +++ b/Runtime/Character/CMetaAnimRandom.hpp @@ -12,11 +12,11 @@ class CMetaAnimRandom : public IMetaAnim { public: CMetaAnimRandom(CInputStream& in); - EMetaAnimType GetType() const { return EMetaAnimType::Random; } + EMetaAnimType GetType() const override { return EMetaAnimType::Random; } - void GetUniquePrimitives(std::set& primsOut) const; + void GetUniquePrimitives(std::set& primsOut) const override; std::shared_ptr VGetAnimationTree(const CAnimSysContext& animSys, - const CMetaAnimTreeBuildOrders& orders) const; + const CMetaAnimTreeBuildOrders& orders) const override; }; } // namespace urde diff --git a/Runtime/Character/CMetaAnimSequence.hpp b/Runtime/Character/CMetaAnimSequence.hpp index 9d991be0b..fd14c2f57 100644 --- a/Runtime/Character/CMetaAnimSequence.hpp +++ b/Runtime/Character/CMetaAnimSequence.hpp @@ -11,11 +11,11 @@ class CMetaAnimSequence : public IMetaAnim { public: CMetaAnimSequence(CInputStream& in); - EMetaAnimType GetType() const { return EMetaAnimType::Sequence; } + EMetaAnimType GetType() const override { return EMetaAnimType::Sequence; } - void GetUniquePrimitives(std::set& primsOut) const; + void GetUniquePrimitives(std::set& primsOut) const override; std::shared_ptr VGetAnimationTree(const CAnimSysContext& animSys, - const CMetaAnimTreeBuildOrders& orders) const; + const CMetaAnimTreeBuildOrders& orders) const override; }; } // namespace urde diff --git a/Runtime/Character/CMetaTransMetaAnim.hpp b/Runtime/Character/CMetaTransMetaAnim.hpp index a08645fee..6aa02381b 100644 --- a/Runtime/Character/CMetaTransMetaAnim.hpp +++ b/Runtime/Character/CMetaTransMetaAnim.hpp @@ -11,11 +11,11 @@ class CMetaTransMetaAnim : public IMetaTrans { public: CMetaTransMetaAnim(CInputStream& in); - EMetaTransType GetType() const { return EMetaTransType::MetaAnim; } + EMetaTransType GetType() const override { return EMetaTransType::MetaAnim; } std::shared_ptr VGetTransitionTree(const std::weak_ptr& a, const std::weak_ptr& b, - const CAnimSysContext& animSys) const; + const CAnimSysContext& animSys) const override; }; } // namespace urde diff --git a/Runtime/Character/CMetaTransPhaseTrans.hpp b/Runtime/Character/CMetaTransPhaseTrans.hpp index e777811e6..b327b87d2 100644 --- a/Runtime/Character/CMetaTransPhaseTrans.hpp +++ b/Runtime/Character/CMetaTransPhaseTrans.hpp @@ -14,11 +14,11 @@ class CMetaTransPhaseTrans : public IMetaTrans { public: CMetaTransPhaseTrans(CInputStream& in); - EMetaTransType GetType() const { return EMetaTransType::PhaseTrans; } + EMetaTransType GetType() const override { return EMetaTransType::PhaseTrans; } std::shared_ptr VGetTransitionTree(const std::weak_ptr& a, const std::weak_ptr& b, - const CAnimSysContext& animSys) const; + const CAnimSysContext& animSys) const override; }; } // namespace urde diff --git a/Runtime/Character/CMetaTransSnap.hpp b/Runtime/Character/CMetaTransSnap.hpp index b886153c6..cc3dc5f51 100644 --- a/Runtime/Character/CMetaTransSnap.hpp +++ b/Runtime/Character/CMetaTransSnap.hpp @@ -7,11 +7,11 @@ namespace urde { class CMetaTransSnap : public IMetaTrans { public: - EMetaTransType GetType() const { return EMetaTransType::Snap; } + EMetaTransType GetType() const override { return EMetaTransType::Snap; } std::shared_ptr VGetTransitionTree(const std::weak_ptr& a, const std::weak_ptr& b, - const CAnimSysContext& animSys) const; + const CAnimSysContext& animSys) const override; }; } // namespace urde diff --git a/Runtime/Character/CMetaTransTrans.hpp b/Runtime/Character/CMetaTransTrans.hpp index 2b7ab380e..429c0a163 100644 --- a/Runtime/Character/CMetaTransTrans.hpp +++ b/Runtime/Character/CMetaTransTrans.hpp @@ -14,11 +14,11 @@ class CMetaTransTrans : public IMetaTrans { public: CMetaTransTrans(CInputStream& in); - EMetaTransType GetType() const { return EMetaTransType::Trans; } + EMetaTransType GetType() const override { return EMetaTransType::Trans; } std::shared_ptr VGetTransitionTree(const std::weak_ptr& a, const std::weak_ptr& b, - const CAnimSysContext& animSys) const; + const CAnimSysContext& animSys) const override; }; } // namespace urde diff --git a/Runtime/Character/CParticleGenInfo.hpp b/Runtime/Character/CParticleGenInfo.hpp index 53938df52..e76fbe2c8 100644 --- a/Runtime/Character/CParticleGenInfo.hpp +++ b/Runtime/Character/CParticleGenInfo.hpp @@ -85,23 +85,23 @@ public: CParticleData::EParentedMode parentMode, int flags, CStateManager& stateMgr, TAreaId, int lightId, EParticleGenType state); - void AddToRenderer(); - void Render(); - void Update(float dt, CStateManager& stateMgr); - void SetOrientation(const zeus::CTransform& xf, CStateManager& stateMgr); - void SetTranslation(const zeus::CVector3f& trans, CStateManager& stateMgr); - void SetGlobalOrientation(const zeus::CTransform& xf, CStateManager& stateMgr); - void SetGlobalTranslation(const zeus::CVector3f& trans, CStateManager& stateMgr); - void SetGlobalScale(const zeus::CVector3f& scale); - void SetParticleEmission(bool, CStateManager& stateMgr); - bool IsSystemDeletable() const; - std::optional GetBounds() const; - bool HasActiveParticles() const; - void DestroyParticles(); - bool HasLight() const; - TUniqueId GetLightId() const; - void DeleteLight(CStateManager& mgr); - void SetModulationColor(const zeus::CColor& color); + void AddToRenderer() override; + void Render() override; + void Update(float dt, CStateManager& stateMgr) override; + void SetOrientation(const zeus::CTransform& xf, CStateManager& stateMgr) override; + void SetTranslation(const zeus::CVector3f& trans, CStateManager& stateMgr) override; + void SetGlobalOrientation(const zeus::CTransform& xf, CStateManager& stateMgr) override; + void SetGlobalTranslation(const zeus::CVector3f& trans, CStateManager& stateMgr) override; + void SetGlobalScale(const zeus::CVector3f& scale) override; + void SetParticleEmission(bool, CStateManager& stateMgr) override; + bool IsSystemDeletable() const override; + std::optional GetBounds() const override; + bool HasActiveParticles() const override; + void DestroyParticles() override; + bool HasLight() const override; + TUniqueId GetLightId() const override; + void DeleteLight(CStateManager& mgr) override; + void SetModulationColor(const zeus::CColor& color) override; const std::shared_ptr GetParticleSystem() const { return x84_system; } }; } // namespace urde diff --git a/Runtime/Character/CTimeScaleFunctions.hpp b/Runtime/Character/CTimeScaleFunctions.hpp index 559d0b3d7..1da9fb482 100644 --- a/Runtime/Character/CTimeScaleFunctions.hpp +++ b/Runtime/Character/CTimeScaleFunctions.hpp @@ -25,11 +25,11 @@ private: public: CConstantAnimationTimeScale(float scale) : x4_scale(scale) {} - EVaryingAnimationTimeScaleType GetType() const { return EVaryingAnimationTimeScaleType::Constant; } - float VTimeScaleIntegral(float lowerLimit, float upperLimit) const; - float VFindUpperLimit(float lowerLimit, float root) const; - std::unique_ptr VClone() const; - std::unique_ptr VGetFunctionMirrored(float value) const; + EVaryingAnimationTimeScaleType GetType() const override { return EVaryingAnimationTimeScaleType::Constant; } + float VTimeScaleIntegral(float lowerLimit, float upperLimit) const override; + float VFindUpperLimit(float lowerLimit, float root) const override; + std::unique_ptr VClone() const override; + std::unique_ptr VGetFunctionMirrored(float value) const override; }; class CLinearAnimationTimeScale : public IVaryingAnimationTimeScale { @@ -46,11 +46,11 @@ class CLinearAnimationTimeScale : public IVaryingAnimationTimeScale { public: CLinearAnimationTimeScale(const CCharAnimTime& t1, float y1, const CCharAnimTime& t2, float y2); - EVaryingAnimationTimeScaleType GetType() const { return EVaryingAnimationTimeScaleType::Linear; } - float VTimeScaleIntegral(float lowerLimit, float upperLimit) const; - float VFindUpperLimit(float lowerLimit, float root) const; - std::unique_ptr VClone() const; - std::unique_ptr VGetFunctionMirrored(float value) const; + EVaryingAnimationTimeScaleType GetType() const override { return EVaryingAnimationTimeScaleType::Linear; } + float VTimeScaleIntegral(float lowerLimit, float upperLimit) const override; + float VFindUpperLimit(float lowerLimit, float root) const override; + std::unique_ptr VClone() const override; + std::unique_ptr VGetFunctionMirrored(float value) const override; }; } // namespace urde diff --git a/Runtime/Character/CTransitionDatabaseGame.hpp b/Runtime/Character/CTransitionDatabaseGame.hpp index 6895c8f54..56f8a9b85 100644 --- a/Runtime/Character/CTransitionDatabaseGame.hpp +++ b/Runtime/Character/CTransitionDatabaseGame.hpp @@ -15,7 +15,7 @@ public: CTransitionDatabaseGame(const std::vector& transitions, const std::vector& halfTransitions, const std::shared_ptr& defaultTrans); - const std::shared_ptr& GetMetaTrans(u32, u32) const; + const std::shared_ptr& GetMetaTrans(u32, u32) const override; }; } // namespace urde diff --git a/Runtime/Collision/CAABoxFilter.hpp b/Runtime/Collision/CAABoxFilter.hpp index 951ac9c5f..ee683cce8 100644 --- a/Runtime/Collision/CAABoxFilter.hpp +++ b/Runtime/Collision/CAABoxFilter.hpp @@ -7,7 +7,7 @@ namespace urde { class CAABoxFilter : public ICollisionFilter { public: CAABoxFilter(CActor& actor) : ICollisionFilter(actor) {} - void Filter(const CCollisionInfoList& in, CCollisionInfoList& out) const; + void Filter(const CCollisionInfoList& in, CCollisionInfoList& out) const override; static void FilterBoxFloorCollisions(const CCollisionInfoList& in, CCollisionInfoList& out); }; diff --git a/Runtime/Collision/CBallFilter.hpp b/Runtime/Collision/CBallFilter.hpp index 4301c56e1..bd80dd5c4 100644 --- a/Runtime/Collision/CBallFilter.hpp +++ b/Runtime/Collision/CBallFilter.hpp @@ -8,7 +8,7 @@ class CPhysicsActor; class CBallFilter : public ICollisionFilter { public: CBallFilter(CActor& actor) : ICollisionFilter(actor) {} - void Filter(const CCollisionInfoList& in, CCollisionInfoList& out) const; + void Filter(const CCollisionInfoList& in, CCollisionInfoList& out) const override; }; } // namespace urde diff --git a/Runtime/Collision/CCollidableAABox.hpp b/Runtime/Collision/CCollidableAABox.hpp index e2675c9b7..4164980ab 100644 --- a/Runtime/Collision/CCollidableAABox.hpp +++ b/Runtime/Collision/CCollidableAABox.hpp @@ -19,11 +19,11 @@ public: CCollidableAABox(const zeus::CAABox&, const CMaterialList&); zeus::CAABox Transform(const zeus::CTransform&) const; - virtual u32 GetTableIndex() const; - virtual zeus::CAABox CalculateAABox(const zeus::CTransform&) const; - virtual zeus::CAABox CalculateLocalAABox() const; - virtual FourCC GetPrimType() const; - virtual CRayCastResult CastRayInternal(const CInternalRayCastStructure&) const; + u32 GetTableIndex() const override; + zeus::CAABox CalculateAABox(const zeus::CTransform&) const override; + zeus::CAABox CalculateLocalAABox() const override; + FourCC GetPrimType() const override; + CRayCastResult CastRayInternal(const CInternalRayCastStructure&) const override; const zeus::CAABox& GetBox() const { return x10_aabox; } zeus::CAABox& Box() { return x10_aabox; } diff --git a/Runtime/Collision/CCollidableOBBTree.hpp b/Runtime/Collision/CCollidableOBBTree.hpp index 2516aebe6..56e67592e 100644 --- a/Runtime/Collision/CCollidableOBBTree.hpp +++ b/Runtime/Collision/CCollidableOBBTree.hpp @@ -73,14 +73,14 @@ class CCollidableOBBTree : public CCollisionPrimitive { public: CCollidableOBBTree(const COBBTree* tree, const CMaterialList& material); - virtual ~CCollidableOBBTree() = default; + ~CCollidableOBBTree() override = default; void ResetTestStats() const; void ResetTestStatsRecurse(const COBBTree::CNode&) const; - u32 GetTableIndex() const { return sTableIndex; } - zeus::CAABox CalculateAABox(const zeus::CTransform&) const; - zeus::CAABox CalculateLocalAABox() const; - FourCC GetPrimType() const; - CRayCastResult CastRayInternal(const CInternalRayCastStructure&) const; + u32 GetTableIndex() const override { return sTableIndex; } + zeus::CAABox CalculateAABox(const zeus::CTransform&) const override; + zeus::CAABox CalculateLocalAABox() const override; + FourCC GetPrimType() const override; + CRayCastResult CastRayInternal(const CInternalRayCastStructure&) const override; }; } // namespace urde diff --git a/Runtime/Collision/CCollidableOBBTreeGroup.hpp b/Runtime/Collision/CCollidableOBBTreeGroup.hpp index 39e90e0e8..58d085045 100644 --- a/Runtime/Collision/CCollidableOBBTreeGroup.hpp +++ b/Runtime/Collision/CCollidableOBBTreeGroup.hpp @@ -25,14 +25,14 @@ class CCollidableOBBTreeGroup : public CCollisionPrimitive { public: CCollidableOBBTreeGroup(const CCollidableOBBTreeGroupContainer*, const CMaterialList&); - virtual ~CCollidableOBBTreeGroup() = default; + ~CCollidableOBBTreeGroup() override = default; void ResetTestStats() const; - virtual u32 GetTableIndex() const; - virtual zeus::CAABox CalculateAABox(const zeus::CTransform&) const; - virtual zeus::CAABox CalculateLocalAABox() const; - virtual FourCC GetPrimType() const; - virtual CRayCastResult CastRayInternal(const CInternalRayCastStructure&) const; + u32 GetTableIndex() const override; + zeus::CAABox CalculateAABox(const zeus::CTransform&) const override; + zeus::CAABox CalculateLocalAABox() const override; + FourCC GetPrimType() const override; + CRayCastResult CastRayInternal(const CInternalRayCastStructure&) const override; static const Type& GetType(); static void SetStaticTableIndex(u32 index); diff --git a/Runtime/Collision/CCollidableSphere.hpp b/Runtime/Collision/CCollidableSphere.hpp index fa89b0bd9..a00ae87f1 100644 --- a/Runtime/Collision/CCollidableSphere.hpp +++ b/Runtime/Collision/CCollidableSphere.hpp @@ -23,11 +23,11 @@ public: void SetSphereCenter(const zeus::CVector3f& center) { x10_sphere.position = center; } zeus::CSphere Transform(const zeus::CTransform& xf) const; - virtual u32 GetTableIndex() const; - virtual zeus::CAABox CalculateAABox(const zeus::CTransform&) const; - virtual zeus::CAABox CalculateLocalAABox() const; - virtual FourCC GetPrimType() const; - virtual CRayCastResult CastRayInternal(const CInternalRayCastStructure&) const; + u32 GetTableIndex() const override; + zeus::CAABox CalculateAABox(const zeus::CTransform&) const override; + zeus::CAABox CalculateLocalAABox() const override; + FourCC GetPrimType() const override; + CRayCastResult CastRayInternal(const CInternalRayCastStructure&) const override; static const Type& GetType() { return sType; } static void SetStaticTableIndex(u32 index) { sTableIndex = index; } diff --git a/Runtime/Collision/CCollisionActor.hpp b/Runtime/Collision/CCollisionActor.hpp index 6ce96455a..71bdd4703 100644 --- a/Runtime/Collision/CCollisionActor.hpp +++ b/Runtime/Collision/CCollisionActor.hpp @@ -31,27 +31,27 @@ public: CCollisionActor(TUniqueId, TAreaId, TUniqueId, const zeus::CVector3f&, bool, float, std::string_view name); CCollisionActor(TUniqueId, TAreaId, TUniqueId, bool, float, float, std::string_view name); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - CHealthInfo* HealthInfo(CStateManager&); - const CDamageVulnerability* GetDamageVulnerability() const; + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + CHealthInfo* HealthInfo(CStateManager&) override; + const CDamageVulnerability* GetDamageVulnerability() const override; const CDamageVulnerability* GetDamageVulnerability(const zeus::CVector3f&, const zeus::CVector3f&, - const CDamageInfo&) const; - void OnScanStateChanged(EScanState, CStateManager&); + const CDamageInfo&) const override; + void OnScanStateChanged(EScanState, CStateManager&) override; - void Touch(CActor&, CStateManager&); - zeus::CVector3f GetOrbitPosition(const CStateManager&) const; - const CCollisionPrimitive* GetCollisionPrimitive() const; + void Touch(CActor&, CStateManager&) override; + zeus::CVector3f GetOrbitPosition(const CStateManager&) const override; + const CCollisionPrimitive* GetCollisionPrimitive() const override; EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&, - const CWeaponMode&, EProjectileAttrib) const; + const CWeaponMode&, EProjectileAttrib) const override; void SetWeaponCollisionResponseType(EWeaponCollisionResponseTypes type) { x300_responseType = type; } - zeus::CTransform GetPrimitiveTransform() const; - std::optional GetTouchBounds() const; + zeus::CTransform GetPrimitiveTransform() const override; + std::optional GetTouchBounds() const override; void SetDamageVulnerability(const CDamageVulnerability& vuln); const zeus::CVector3f& GetBoxSize() const { return x260_boxSize; } TUniqueId GetOwnerId() const { return x25c_owner; } TUniqueId GetLastTouchedObject() const { return x2fc_lastTouched; } - zeus::CVector3f GetScanObjectIndicatorPosition(const CStateManager&) const; + zeus::CVector3f GetScanObjectIndicatorPosition(const CStateManager&) const override; void SetExtendedTouchBounds(const zeus::CVector3f& boundExt) { x304_extendedTouchBounds = boundExt; } float GetSphereRadius() const { return x288_sphereRadius; } }; diff --git a/Runtime/Graphics/CBooRenderer.hpp b/Runtime/Graphics/CBooRenderer.hpp index cc6a37ba3..1e73eb524 100644 --- a/Runtime/Graphics/CBooRenderer.hpp +++ b/Runtime/Graphics/CBooRenderer.hpp @@ -200,35 +200,35 @@ class CBooRenderer final : public IRenderer { public: CBooRenderer(IObjectStore& store, IFactory& resFac); - ~CBooRenderer(); + ~CBooRenderer() override; void AddWorldSurfaces(CBooModel& model); std::list::iterator FindStaticGeometry(const std::vector*); void AddStaticGeometry(const std::vector*, const CAreaRenderOctTree*, int areaIdx, - const SShader* shaderSet); - void EnablePVS(const CPVSVisSet&, u32); - void DisablePVS(); + const SShader* shaderSet) override; + void EnablePVS(const CPVSVisSet&, u32) override; + void DisablePVS() override; void UpdateAreaUniforms(int areaIdx, EWorldShadowMode shadowMode = EWorldShadowMode::None, bool activateLights = true, int cubeFace = -1, const CModelFlags* ballShadowFlags = nullptr); - void RemoveStaticGeometry(const std::vector*); - void DrawAreaGeometry(int areaIdx, int mask, int targetMask); - void DrawUnsortedGeometry(int areaIdx, int mask, int targetMask, bool shadowRender = false); - void DrawSortedGeometry(int areaIdx, int mask, int targetMask); - void DrawStaticGeometry(int areaIdx, int mask, int targetMask); - void DrawModelFlat(const CModel& model, const CModelFlags& flags, bool unsortedOnly); - void PostRenderFogs(); - void AddParticleGen(const CParticleGen&); - void AddParticleGen(const CParticleGen&, const zeus::CVector3f&, const zeus::CAABox&); - void AddPlaneObject(const void*, const zeus::CAABox&, const zeus::CPlane&, int); - void AddDrawable(void const*, const zeus::CVector3f&, const zeus::CAABox&, int, EDrawableSorting); - void SetDrawableCallback(TDrawableCallback, const void*); - void SetWorldViewpoint(const zeus::CTransform&); - void SetPerspective(float, float, float, float, float); - void SetPerspective(float, float, float, float); - std::pair SetViewportOrtho(bool, float, float); - void SetClippingPlanes(const zeus::CFrustum& frustum); - void SetViewport(int, int, int, int); + void RemoveStaticGeometry(const std::vector*) override; + void DrawAreaGeometry(int areaIdx, int mask, int targetMask) override; + void DrawUnsortedGeometry(int areaIdx, int mask, int targetMask, bool shadowRender = false) override; + void DrawSortedGeometry(int areaIdx, int mask, int targetMask) override; + void DrawStaticGeometry(int areaIdx, int mask, int targetMask) override; + void DrawModelFlat(const CModel& model, const CModelFlags& flags, bool unsortedOnly) override; + void PostRenderFogs() override; + void AddParticleGen(const CParticleGen&) override; + void AddParticleGen(const CParticleGen&, const zeus::CVector3f&, const zeus::CAABox&) override; + void AddPlaneObject(const void*, const zeus::CAABox&, const zeus::CPlane&, int) override; + void AddDrawable(void const*, const zeus::CVector3f&, const zeus::CAABox&, int, EDrawableSorting) override; + void SetDrawableCallback(TDrawableCallback, const void*) override; + void SetWorldViewpoint(const zeus::CTransform&) override; + void SetPerspective(float, float, float, float, float) override; + void SetPerspective(float, float, float, float) override; + std::pair SetViewportOrtho(bool, float, float) override; + void SetClippingPlanes(const zeus::CFrustum& frustum) override; + void SetViewport(int, int, int, int) override; // void SetDepthReadWrite(bool, bool); // void SetBlendMode_AdditiveAlpha(); // void SetBlendMode_AlphaBlended(); @@ -238,9 +238,9 @@ public: // void SetBlendMode_InvertSrc(); // void SetBlendMode_Replace(); // void SetBlendMode_AdditiveDestColor(); - void SetDebugOption(EDebugOption, int); - void BeginScene(); - void EndScene(); + void SetDebugOption(EDebugOption, int) override; + void BeginScene() override; + void EndScene() override; // void BeginPrimitive(EPrimitiveType, int); // void BeginLines(int); // void BeginLineStrip(int); @@ -252,24 +252,25 @@ public: // void PrimColor(float, float, float, float); // void PrimColor(const zeus::CColor&); // void EndPrimitive(); - void SetAmbientColor(const zeus::CColor&); - void DrawString(const char*, int, int); - u32 GetFPS(); - void CacheReflection(TReflectionCallback, void*, bool); - void DrawSpaceWarp(const zeus::CVector3f&, float); - void DrawThermalModel(const CModel& model, const zeus::CColor& multCol, const zeus::CColor& addCol); - void DrawXRayOutline(const zeus::CAABox&); - void SetWireframeFlags(int); - void SetWorldFog(ERglFogMode, float, float, const zeus::CColor&); - void RenderFogVolume(const zeus::CColor&, const zeus::CAABox&, const TLockedToken*, const CSkinnedModel*); - void SetThermal(bool, float, const zeus::CColor&); - void SetThermalColdScale(float scale); - void DoThermalBlendCold(); - void DoThermalBlendHot(); - u32 GetStaticWorldDataSize(); - void PrepareDynamicLights(const std::vector& lights); - void SetGXRegister1Color(const zeus::CColor& color); - void SetWorldLightFadeLevel(float level); + void SetAmbientColor(const zeus::CColor&) override; + void DrawString(const char*, int, int) override; + u32 GetFPS() override; + void CacheReflection(TReflectionCallback, void*, bool) override; + void DrawSpaceWarp(const zeus::CVector3f&, float) override; + void DrawThermalModel(const CModel& model, const zeus::CColor& multCol, const zeus::CColor& addCol) override; + void DrawXRayOutline(const zeus::CAABox&) override; + void SetWireframeFlags(int) override; + void SetWorldFog(ERglFogMode, float, float, const zeus::CColor&) override; + void RenderFogVolume(const zeus::CColor&, const zeus::CAABox&, const TLockedToken*, + const CSkinnedModel*) override; + void SetThermal(bool, float, const zeus::CColor&) override; + void SetThermalColdScale(float scale) override; + void DoThermalBlendCold() override; + void DoThermalBlendHot() override; + u32 GetStaticWorldDataSize() override; + void PrepareDynamicLights(const std::vector& lights) override; + void SetGXRegister1Color(const zeus::CColor& color) override; + void SetWorldLightFadeLevel(float level) override; void DrawPhazonSuitIndirectEffect(const zeus::CColor& nonIndirectMod, const TLockedToken& indTex, const zeus::CColor& indirectMod, float blurRadius, float indScale, float indOffX, float indOffY); diff --git a/Runtime/Graphics/IWeaponRenderer.hpp b/Runtime/Graphics/IWeaponRenderer.hpp index cd1886abe..2f86e56c7 100644 --- a/Runtime/Graphics/IWeaponRenderer.hpp +++ b/Runtime/Graphics/IWeaponRenderer.hpp @@ -11,7 +11,7 @@ public: class CDefaultWeaponRenderer : public IWeaponRenderer { public: - void AddParticleGen(const CParticleGen&); + void AddParticleGen(const CParticleGen&) override; }; } // namespace urde diff --git a/Runtime/MP1/CAudioStateWin.hpp b/Runtime/MP1/CAudioStateWin.hpp index b0e1baa05..9efd53739 100644 --- a/Runtime/MP1/CAudioStateWin.hpp +++ b/Runtime/MP1/CAudioStateWin.hpp @@ -6,7 +6,7 @@ namespace urde::MP1 { class CAudioStateWin : public CIOWin { public: CAudioStateWin() : CIOWin("CAudioStateWin") {} - CIOWin::EMessageReturn OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue); + CIOWin::EMessageReturn OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue) override; }; } // namespace urde::MP1 diff --git a/Runtime/MP1/CCredits.hpp b/Runtime/MP1/CCredits.hpp index afef0d743..0c3be524a 100644 --- a/Runtime/MP1/CCredits.hpp +++ b/Runtime/MP1/CCredits.hpp @@ -7,9 +7,9 @@ namespace urde::MP1 { class CCredits : public CIOWin { public: CCredits(); - EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&); - bool GetIsContinueDraw() const { return false; } - void Draw() const; + EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&) override; + bool GetIsContinueDraw() const override { return false; } + void Draw() const override; }; } // namespace urde::MP1 diff --git a/Runtime/MP1/CFrontEndUI.hpp b/Runtime/MP1/CFrontEndUI.hpp index 83538af09..a63e2b76c 100644 --- a/Runtime/MP1/CFrontEndUI.hpp +++ b/Runtime/MP1/CFrontEndUI.hpp @@ -379,12 +379,12 @@ public: void StartStateTransition(EScreen screen); void CompleteStateTransition(); void HandleDebugMenuReturnValue(CGameDebug::EReturnValue val, CArchitectureQueue& queue); - void Draw() const; + void Draw() const override; void UpdateMovies(float dt); bool PumpMovieLoad(); void ProcessUserInput(const CFinalInput& input, CArchitectureQueue& queue); EMessageReturn Update(float dt, CArchitectureQueue& queue); - EMessageReturn OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue); + EMessageReturn OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue) override; }; } // namespace MP1 diff --git a/Runtime/MP1/CInventoryScreen.hpp b/Runtime/MP1/CInventoryScreen.hpp index 096dd1562..372b0d480 100644 --- a/Runtime/MP1/CInventoryScreen.hpp +++ b/Runtime/MP1/CInventoryScreen.hpp @@ -32,27 +32,27 @@ class CInventoryScreen : public CPauseScreenBase { public: CInventoryScreen(const CStateManager& mgr, CGuiFrame& frame, const CStringTable& pauseStrg, const CDependencyGroup& suitDgrp, const CDependencyGroup& ballDgrp); - ~CInventoryScreen(); + ~CInventoryScreen() override; - bool InputDisabled() const; - void TransitioningAway(); - void Update(float dt, CRandom16& rand, CArchitectureQueue& archQueue); - void Touch(); - void ProcessControllerInput(const CFinalInput& input); - void Draw(float transInterp, float totalAlpha, float yOff); - float GetCameraYBias() const; - bool VReady() const; - void VActivate(); - void RightTableSelectionChanged(int oldSel, int newSel); - void ChangedMode(EMode oldMode); - void UpdateRightTable(); - bool ShouldLeftTableAdvance() const; - bool ShouldRightTableAdvance() const; - u32 GetRightTableCount() const; - bool IsRightLogDynamic() const; - void UpdateRightLogColors(bool active, const zeus::CColor& activeColor, const zeus::CColor& inactiveColor); + bool InputDisabled() const override; + void TransitioningAway() override; + void Update(float dt, CRandom16& rand, CArchitectureQueue& archQueue) override; + void Touch() override; + void ProcessControllerInput(const CFinalInput& input) override; + void Draw(float transInterp, float totalAlpha, float yOff) override; + float GetCameraYBias() const override; + bool VReady() const override; + void VActivate() override; + void RightTableSelectionChanged(int oldSel, int newSel) override; + void ChangedMode(EMode oldMode) override; + void UpdateRightTable() override; + bool ShouldLeftTableAdvance() const override; + bool ShouldRightTableAdvance() const override; + u32 GetRightTableCount() const override; + bool IsRightLogDynamic() const override; + void UpdateRightLogColors(bool active, const zeus::CColor& activeColor, const zeus::CColor& inactiveColor) override; void UpdateRightLogHighlight(bool active, int idx, const zeus::CColor& activeColor, - const zeus::CColor& inactiveColor); + const zeus::CColor& inactiveColor) override; }; } // namespace MP1 diff --git a/Runtime/MP1/CLogBookScreen.hpp b/Runtime/MP1/CLogBookScreen.hpp index 3d00e991a..fbaa8111e 100644 --- a/Runtime/MP1/CLogBookScreen.hpp +++ b/Runtime/MP1/CLogBookScreen.hpp @@ -39,22 +39,22 @@ class CLogBookScreen : public CPauseScreenBase { public: CLogBookScreen(const CStateManager& mgr, CGuiFrame& frame, const CStringTable& pauseStrg); - ~CLogBookScreen(); + ~CLogBookScreen() override; - bool InputDisabled() const; - void TransitioningAway(); - void Update(float dt, CRandom16& rand, CArchitectureQueue& archQueue); - void Touch(); - void ProcessControllerInput(const CFinalInput& input); - void Draw(float transInterp, float totalAlpha, float yOff); - bool VReady() const; - void VActivate(); - void RightTableSelectionChanged(int oldSel, int newSel); - void ChangedMode(EMode oldMode); - void UpdateRightTable(); - bool ShouldLeftTableAdvance() const; - bool ShouldRightTableAdvance() const; - u32 GetRightTableCount() const; + bool InputDisabled() const override; + void TransitioningAway() override; + void Update(float dt, CRandom16& rand, CArchitectureQueue& archQueue) override; + void Touch() override; + void ProcessControllerInput(const CFinalInput& input) override; + void Draw(float transInterp, float totalAlpha, float yOff) override; + bool VReady() const override; + void VActivate() override; + void RightTableSelectionChanged(int oldSel, int newSel) override; + void ChangedMode(EMode oldMode) override; + void UpdateRightTable() override; + bool ShouldLeftTableAdvance() const override; + bool ShouldRightTableAdvance() const override; + u32 GetRightTableCount() const override; }; } // namespace urde::MP1 diff --git a/Runtime/MP1/CMFGame.hpp b/Runtime/MP1/CMFGame.hpp index bb3c1aeb2..fdf612a50 100644 --- a/Runtime/MP1/CMFGame.hpp +++ b/Runtime/MP1/CMFGame.hpp @@ -36,10 +36,10 @@ class CMFGame : public CMFGameBase { public: CMFGame(const std::weak_ptr& stateMgr, const std::weak_ptr& guiMgr, const CArchitectureQueue&); - ~CMFGame(); - CIOWin::EMessageReturn OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue); + ~CMFGame() override; + CIOWin::EMessageReturn OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue) override; void Touch(); - void Draw() const; + void Draw() const override; void PlayerDied(); void UnpauseGame(); void EnterMessageScreen(float time); @@ -66,9 +66,9 @@ class CMFGameLoader : public CMFGameLoaderBase { public: CMFGameLoader(); - ~CMFGameLoader(); - EMessageReturn OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue); - void Draw() const; + ~CMFGameLoader() override; + EMessageReturn OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue) override; + void Draw() const override; }; } // namespace MP1 diff --git a/Runtime/MP1/CMainFlow.hpp b/Runtime/MP1/CMainFlow.hpp index 921b2efd7..19f3ff777 100644 --- a/Runtime/MP1/CMainFlow.hpp +++ b/Runtime/MP1/CMainFlow.hpp @@ -11,10 +11,10 @@ namespace MP1 { class CMainFlow : public CMainFlowBase { public: CMainFlow() : CMainFlowBase("CMainFlow") {} - void AdvanceGameState(CArchitectureQueue& queue); - void SetGameState(EClientFlowStates state, CArchitectureQueue& queue); - bool GetIsContinueDraw() const { return false; } - void Draw() const {} + void AdvanceGameState(CArchitectureQueue& queue) override; + void SetGameState(EClientFlowStates state, CArchitectureQueue& queue) override; + bool GetIsContinueDraw() const override { return false; } + void Draw() const override {} }; } // namespace MP1 diff --git a/Runtime/MP1/COptionsScreen.hpp b/Runtime/MP1/COptionsScreen.hpp index 23c2152ba..a2fc3fc35 100644 --- a/Runtime/MP1/COptionsScreen.hpp +++ b/Runtime/MP1/COptionsScreen.hpp @@ -22,21 +22,21 @@ class COptionsScreen : public CPauseScreenBase { public: COptionsScreen(const CStateManager& mgr, CGuiFrame& frame, const CStringTable& pauseStrg); - ~COptionsScreen(); + ~COptionsScreen() override; - bool InputDisabled() const; - void Update(float dt, CRandom16& rand, CArchitectureQueue& archQueue); - void Touch(); - void ProcessControllerInput(const CFinalInput& input); - void Draw(float transInterp, float totalAlpha, float yOff); - bool VReady() const; - void VActivate(); - void RightTableSelectionChanged(int oldSel, int newSel); - void ChangedMode(EMode oldMode); - void UpdateRightTable(); - bool ShouldLeftTableAdvance() const; - bool ShouldRightTableAdvance() const; - u32 GetRightTableCount() const; + bool InputDisabled() const override; + void Update(float dt, CRandom16& rand, CArchitectureQueue& archQueue) override; + void Touch() override; + void ProcessControllerInput(const CFinalInput& input) override; + void Draw(float transInterp, float totalAlpha, float yOff) override; + bool VReady() const override; + void VActivate() override; + void RightTableSelectionChanged(int oldSel, int newSel) override; + void ChangedMode(EMode oldMode) override; + void UpdateRightTable() override; + bool ShouldLeftTableAdvance() const override; + bool ShouldRightTableAdvance() const override; + u32 GetRightTableCount() const override; }; } // namespace urde::MP1 diff --git a/Runtime/MP1/CPreFrontEnd.hpp b/Runtime/MP1/CPreFrontEnd.hpp index 349594653..7c6270e06 100644 --- a/Runtime/MP1/CPreFrontEnd.hpp +++ b/Runtime/MP1/CPreFrontEnd.hpp @@ -9,7 +9,7 @@ class CPreFrontEnd : public CIOWin { public: CPreFrontEnd(); - EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&); + EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&) override; }; } // namespace urde::MP1 diff --git a/Runtime/MP1/CSlideShow.hpp b/Runtime/MP1/CSlideShow.hpp index 2f7235c52..a3d22a7eb 100644 --- a/Runtime/MP1/CSlideShow.hpp +++ b/Runtime/MP1/CSlideShow.hpp @@ -100,9 +100,9 @@ private: public: CSlideShow(); - EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&); - bool GetIsContinueDraw() const { return false; } - void Draw() const; + EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&) override; + bool GetIsContinueDraw() const override { return false; } + void Draw() const override; static u32 SlideShowGalleryFlags(); }; diff --git a/Runtime/MP1/CStateSetterFlow.hpp b/Runtime/MP1/CStateSetterFlow.hpp index 6aaae2cb2..df1699df2 100644 --- a/Runtime/MP1/CStateSetterFlow.hpp +++ b/Runtime/MP1/CStateSetterFlow.hpp @@ -7,7 +7,7 @@ namespace urde::MP1 { class CStateSetterFlow : public CIOWin { public: CStateSetterFlow(); - EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&); + EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&) override; }; } // namespace urde::MP1 diff --git a/Runtime/MP1/MP1.hpp b/Runtime/MP1/MP1.hpp index 5e59ca987..5a91cede1 100644 --- a/Runtime/MP1/MP1.hpp +++ b/Runtime/MP1/MP1.hpp @@ -269,12 +269,12 @@ public: // int RsMain(int argc, const boo::SystemChar* argv[]); void Init(const hecl::Runtime::FileStoreManager& storeMgr, hecl::CVarManager* cvarManager, boo::IWindow* window, - boo::IAudioVoiceEngine* voiceEngine, amuse::IBackendVoiceAllocator& backend); - void WarmupShaders(); - bool Proc(); - void Draw(); - void Shutdown(); - boo::IWindow* GetMainWindow() const; + boo::IAudioVoiceEngine* voiceEngine, amuse::IBackendVoiceAllocator& backend) override; + void WarmupShaders() override; + bool Proc() override; + void Draw() override; + void Shutdown() override; + boo::IWindow* GetMainWindow() const override; void MemoryCardInitializePump(); @@ -294,14 +294,14 @@ public: static void EnsureWorldPaksReady(); static void EnsureWorldPakReady(CAssetId mlvl); - EFlowState GetFlowState() const { return x12c_flowState; } - void SetFlowState(EFlowState s) { x12c_flowState = s; } + EFlowState GetFlowState() const override { return x12c_flowState; } + void SetFlowState(EFlowState s) override { x12c_flowState = s; } void SetX30(bool v) { x160_30_ = v; } CGameArchitectureSupport* GetArchSupport() const { return x164_archSupport.get(); } - size_t GetExpectedIdSize() const { return sizeof(u32); } + size_t GetExpectedIdSize() const override { return sizeof(u32); } void quit(hecl::Console*, const std::vector&) { m_doQuit = true; } void Give(hecl::Console*, const std::vector&); void Remove(hecl::Console*, const std::vector&); @@ -309,7 +309,7 @@ public: void Teleport(hecl::Console*, const std::vector&); void ListWorlds(hecl::Console*, const std::vector&); void Warp(hecl::Console*, const std::vector&); - hecl::Console* Console() const { return m_console.get(); } + hecl::Console* Console() const override { return m_console.get(); } int m_warpWorldIdx = -1; TAreaId m_warpAreaId = 0; diff --git a/Runtime/MP1/World/CActorContraption.hpp b/Runtime/MP1/World/CActorContraption.hpp index abd8adeb8..fc1f15fdb 100644 --- a/Runtime/MP1/World/CActorContraption.hpp +++ b/Runtime/MP1/World/CActorContraption.hpp @@ -18,10 +18,10 @@ public: const zeus::CAABox&, const CMaterialList&, float, float, const CHealthInfo&, const CDamageVulnerability&, const CActorParameters&, CAssetId, const CDamageInfo&, bool); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); - void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float dt); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; + void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float dt) override; CFlameThrower* CreateFlameThrower(std::string_view, CStateManager&); void ResetFlameThrowers(CStateManager& mgr); }; diff --git a/Runtime/MP1/World/CAtomicAlpha.hpp b/Runtime/MP1/World/CAtomicAlpha.hpp index 54a4cf08c..59c53e67d 100644 --- a/Runtime/MP1/World/CAtomicAlpha.hpp +++ b/Runtime/MP1/World/CAtomicAlpha.hpp @@ -36,26 +36,26 @@ public: const CActorParameters&, const CPatternedInfo&, CAssetId, const CDamageInfo&, float, float, float, CAssetId, bool, bool); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Render(const CStateManager&) const; - void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const; - void Think(float, CStateManager&); - void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt); + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Render(const CStateManager&) const override; + void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const override; + void Think(float, CStateManager&) override; + void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt) override; - CPathFindSearch* GetSearchPath() { return &x580_pathFind; } + CPathFindSearch* GetSearchPath() override { return &x580_pathFind; } EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&, - const CWeaponMode& wMode, EProjectileAttrib) const { + const CWeaponMode& wMode, EProjectileAttrib) const override { return GetDamageVulnerability()->WeaponHits(wMode, false) ? EWeaponCollisionResponseTypes::AtomicAlpha : EWeaponCollisionResponseTypes::AtomicAlphaReflect; } - bool Leash(CStateManager& mgr, float); - bool AggressionCheck(CStateManager&, float); - void CollidedWith(TUniqueId, const CCollisionInfoList&, CStateManager&); - void Patrol(CStateManager&, EStateMsg, float); - void Attack(CStateManager&, EStateMsg, float); + bool Leash(CStateManager& mgr, float) override; + bool AggressionCheck(CStateManager&, float) override; + void CollidedWith(TUniqueId, const CCollisionInfoList&, CStateManager&) override; + void Patrol(CStateManager&, EStateMsg, float) override; + void Attack(CStateManager&, EStateMsg, float) override; - CProjectileInfo* GetProjectileInfo() { return &x668_bombProjectile; } + CProjectileInfo* GetProjectileInfo() override { return &x668_bombProjectile; } }; } // namespace urde::MP1 diff --git a/Runtime/MP1/World/CAtomicBeta.hpp b/Runtime/MP1/World/CAtomicBeta.hpp index 10bdb2abc..d8a0a0a52 100644 --- a/Runtime/MP1/World/CAtomicBeta.hpp +++ b/Runtime/MP1/World/CAtomicBeta.hpp @@ -46,16 +46,16 @@ public: const CActorParameters&, const CPatternedInfo&, CAssetId, CAssetId, const CDamageInfo&, CAssetId, float, float, float, const CDamageVulnerability&, float, float, float, s16, s16, s16, float); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; - void Think(float, CStateManager&); - const CDamageVulnerability* GetDamageVulnerability() const; + void Think(float, CStateManager&) override; + const CDamageVulnerability* GetDamageVulnerability() const override; EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&, - const CWeaponMode& mode, EProjectileAttrib) const { + const CWeaponMode& mode, EProjectileAttrib) const override { return GetDamageVulnerability()->WeaponHits(mode, false) ? EWeaponCollisionResponseTypes::AtomicBeta : EWeaponCollisionResponseTypes::AtomicBetaReflect; } - void Death(CStateManager&, const zeus::CVector3f&, EScriptObjectState); + void Death(CStateManager&, const zeus::CVector3f&, EScriptObjectState) override; static bool IsPlayerBeamChargedEnough(const CStateManager& mgr); }; } // namespace urde::MP1 \ No newline at end of file diff --git a/Runtime/MP1/World/CBabygoth.hpp b/Runtime/MP1/World/CBabygoth.hpp index a32bdd375..5d05ca855 100644 --- a/Runtime/MP1/World/CBabygoth.hpp +++ b/Runtime/MP1/World/CBabygoth.hpp @@ -186,25 +186,26 @@ public: CBabygoth(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, CModelData&&, const CPatternedInfo&, const CActorParameters&, const CBabygothData&); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr); + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override; - void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) { + void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) override { CPatterned::PreRender(mgr, frustum); xb4_drawFlags.x1_matSetIdx = u8(xa04_drawMaterialIdx); } - void Think(float, CStateManager&); + void Think(float, CStateManager&) override; - void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt); + void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt) override; - float GetGravityConstant() const { return 10.f * CPhysicsActor::GravityConstant(); } + float GetGravityConstant() const override { return 10.f * CPhysicsActor::GravityConstant(); } void SetPathFindMode(EPathFindMode mode) { x8b4_pathFindMode = mode; } - const CCollisionPrimitive* GetCollisionPrimitive() const { return &x930_aabox; } + const CCollisionPrimitive* GetCollisionPrimitive() const override { return &x930_aabox; } EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f& v1, const zeus::CVector3f& v2, - const CWeaponMode& wMode, EProjectileAttrib attrib) const { + const CWeaponMode& wMode, + EProjectileAttrib attrib) const override { if (wMode.GetType() == EWeaponType::Ice) return EWeaponCollisionResponseTypes::None; if (x56c_shellState != EShellState::Destroyed) @@ -212,110 +213,110 @@ public: return CPatterned::GetCollisionResponseType(v1, v2, wMode, attrib); } - const CDamageVulnerability* GetDamageVulnerability() const { + const CDamageVulnerability* GetDamageVulnerability() const override { return &CDamageVulnerability::ReflectVulnerabilty(); } const CDamageVulnerability* GetDamageVulnerability(const zeus::CVector3f&, const zeus::CVector3f&, - const CDamageInfo&) const { + const CDamageInfo&) const override { return &CDamageVulnerability::ReflectVulnerabilty(); } - zeus::CVector3f GetAimPosition(const CStateManager& mgr, float dt) const; + zeus::CVector3f GetAimPosition(const CStateManager& mgr, float dt) const override; zeus::CVector3f GetOrigin(const CStateManager& mgr, const CTeamAiRole& role, - const zeus::CVector3f& aimPos) const; + const zeus::CVector3f& aimPos) const override; - void TakeDamage(const zeus::CVector3f&, float) { + void TakeDamage(const zeus::CVector3f&, float) override { if (x400_25_alive) x428_damageCooldownTimer = 0.33f; } - bool IsListening() const { return true; } + bool IsListening() const override { return true; } void KnockBack(const zeus::CVector3f&, CStateManager&, const CDamageInfo& info, EKnockBackType type, bool inDeferred, - float magnitude); + float magnitude) override; - void Shock(CStateManager&, float, float); + void Shock(CStateManager&, float, float) override; - void TurnAround(CStateManager&, EStateMsg, float); + void TurnAround(CStateManager&, EStateMsg, float) override; - void GetUp(CStateManager&, EStateMsg, float); + void GetUp(CStateManager&, EStateMsg, float) override; - void Enraged(CStateManager&, EStateMsg, float); + void Enraged(CStateManager&, EStateMsg, float) override; - void FollowPattern(CStateManager&, EStateMsg, float); + void FollowPattern(CStateManager&, EStateMsg, float) override; - void Taunt(CStateManager&, EStateMsg, float); + void Taunt(CStateManager&, EStateMsg, float) override; - void Crouch(CStateManager&, EStateMsg, float); + void Crouch(CStateManager&, EStateMsg, float) override; - void Deactivate(CStateManager&, EStateMsg, float); + void Deactivate(CStateManager&, EStateMsg, float) override; - void Generate(CStateManager&, EStateMsg, float); + void Generate(CStateManager&, EStateMsg, float) override; - void TargetPatrol(CStateManager&, EStateMsg, float); + void TargetPatrol(CStateManager&, EStateMsg, float) override; - void Patrol(CStateManager&, EStateMsg, float); + void Patrol(CStateManager&, EStateMsg, float) override; - void Approach(CStateManager&, EStateMsg, float); + void Approach(CStateManager&, EStateMsg, float) override; - void PathFind(CStateManager&, EStateMsg, float); + void PathFind(CStateManager&, EStateMsg, float) override; - void SpecialAttack(CStateManager&, EStateMsg, float); + void SpecialAttack(CStateManager&, EStateMsg, float) override; - void Attack(CStateManager&, EStateMsg, float); + void Attack(CStateManager&, EStateMsg, float) override; - void ProjectileAttack(CStateManager&, EStateMsg, float); + void ProjectileAttack(CStateManager&, EStateMsg, float) override; - bool Leash(CStateManager&, float); + bool Leash(CStateManager&, float) override; - bool AnimOver(CStateManager&, float) { return x568_stateProg == 4; } + bool AnimOver(CStateManager&, float) override { return x568_stateProg == 4; } - bool SpotPlayer(CStateManager& mgr, float arg) { + bool SpotPlayer(CStateManager& mgr, float arg) override { if (xa48_24_isAlert) return true; return CPatterned::SpotPlayer(mgr, arg); } - bool InPosition(CStateManager&, float) { return (x8b8_backupDestPos - GetTranslation()).magSquared() < 9.f; } + bool InPosition(CStateManager&, float) override { return (x8b8_backupDestPos - GetTranslation()).magSquared() < 9.f; } - bool InMaxRange(CStateManager&, float); + bool InMaxRange(CStateManager&, float) override; - bool InDetectionRange(CStateManager&, float); + bool InDetectionRange(CStateManager&, float) override; - bool ShotAt(CStateManager&, float) { return x400_24_hitByPlayerProjectile; } + bool ShotAt(CStateManager&, float) override { return x400_24_hitByPlayerProjectile; } - bool OffLine(CStateManager& mgr, float arg) { + bool OffLine(CStateManager& mgr, float arg) override { SetPathFindMode(EPathFindMode::Normal); return PathShagged(mgr, arg); } - bool ShouldTurn(CStateManager& mgr, float arg); + bool ShouldTurn(CStateManager& mgr, float arg) override; - bool ShouldAttack(CStateManager& mgr, float arg); + bool ShouldAttack(CStateManager& mgr, float arg) override; - bool ShouldSpecialAttack(CStateManager& mgr, float arg); + bool ShouldSpecialAttack(CStateManager& mgr, float arg) override; - bool ShouldFire(CStateManager& mgr, float arg); + bool ShouldFire(CStateManager& mgr, float arg) override; - bool TooClose(CStateManager& mgr, float arg); + bool TooClose(CStateManager& mgr, float arg) override; - bool LineOfSight(CStateManager& mgr, float arg); + bool LineOfSight(CStateManager& mgr, float arg) override; - bool AggressionCheck(CStateManager& mgr, float arg) { + bool AggressionCheck(CStateManager& mgr, float arg) override { return x400_25_alive && !xa48_29_hasBeenEnraged && x56c_shellState == EShellState::Destroyed; } - bool LostInterest(CStateManager& mgr, float arg); + bool LostInterest(CStateManager& mgr, float arg) override; - bool Listen(const zeus::CVector3f&, EListenNoiseType); + bool Listen(const zeus::CVector3f&, EListenNoiseType) override; - CPathFindSearch* GetSearchPath() { + CPathFindSearch* GetSearchPath() override { return x8b4_pathFindMode == EPathFindMode::Normal ? &x6ec_pathSearch : &x7d0_approachPathSearch; } - CProjectileInfo* GetProjectileInfo() { return &x958_iceProjectile; } + CProjectileInfo* GetProjectileInfo() override { return &x958_iceProjectile; } }; } // namespace urde::MP1 diff --git a/Runtime/MP1/World/CBeetle.hpp b/Runtime/MP1/World/CBeetle.hpp index fcca2f0a1..cdb161664 100644 --- a/Runtime/MP1/World/CBeetle.hpp +++ b/Runtime/MP1/World/CBeetle.hpp @@ -58,61 +58,63 @@ public: const CDamageVulnerability& tailVuln, const CActorParameters& aParams, const std::optional& tailModel); - void Accept(IVisitor& visitor); - void Think(float dt, CStateManager& mgr); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr); - void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum); - void Render(const CStateManager& mgr) const; + void Accept(IVisitor& visitor) override; + void Think(float dt, CStateManager& mgr) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr) override; + void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) override; + void Render(const CStateManager& mgr) const override; - const CDamageVulnerability* GetDamageVulnerability() const; + const CDamageVulnerability* GetDamageVulnerability() const override; const CDamageVulnerability* GetDamageVulnerability(const zeus::CVector3f& pos, const zeus::CVector3f& dir, - const CDamageInfo& dInfo) const; - zeus::CVector3f GetOrbitPosition(const CStateManager&) const; - zeus::CVector3f GetAimPosition(const CStateManager& mgr, float) const; + const CDamageInfo& dInfo) const override; + zeus::CVector3f GetOrbitPosition(const CStateManager&) const override; + zeus::CVector3f GetAimPosition(const CStateManager& mgr, float) const override; EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f& pos, const zeus::CVector3f& dir, - const CWeaponMode& wMode, EProjectileAttrib attribs) const; - void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float dt); - void CollidedWith(TUniqueId, const CCollisionInfoList&, CStateManager& mgr); - void Death(CStateManager& mgr, const zeus::CVector3f& direction, EScriptObjectState state); - void TakeDamage(const zeus::CVector3f& direction, float magnitude); - bool IsListening() const; - zeus::CVector3f GetOrigin(const CStateManager& mgr, const CTeamAiRole& role, const zeus::CVector3f& aimPos) const; + const CWeaponMode& wMode, + EProjectileAttrib attribs) const override; + void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float dt) override; + void CollidedWith(TUniqueId, const CCollisionInfoList&, CStateManager& mgr) override; + void Death(CStateManager& mgr, const zeus::CVector3f& direction, EScriptObjectState state) override; + void TakeDamage(const zeus::CVector3f& direction, float magnitude) override; + bool IsListening() const override; + zeus::CVector3f GetOrigin(const CStateManager& mgr, const CTeamAiRole& role, + const zeus::CVector3f& aimPos) const override; - void FollowPattern(CStateManager&, EStateMsg msg, float dt); - void PathFind(CStateManager& mgr, EStateMsg msg, float dt); - void TargetPlayer(CStateManager&, EStateMsg msg, float dt); - void Generate(CStateManager&, EStateMsg msg, float dt); - void Deactivate(CStateManager&, EStateMsg msg, float dt); - void Attack(CStateManager&, EStateMsg msg, float dt); - void JumpBack(CStateManager&, EStateMsg msg, float dt); - void DoubleSnap(CStateManager&, EStateMsg msg, float dt); - void Shuffle(CStateManager&, EStateMsg msg, float dt); - void TurnAround(CStateManager&, EStateMsg msg, float dt); - void Skid(CStateManager&, EStateMsg msg, float dt); - void Taunt(CStateManager&, EStateMsg msg, float dt); - void Retreat(CStateManager&, EStateMsg msg, float dt); + void FollowPattern(CStateManager&, EStateMsg msg, float dt) override; + void PathFind(CStateManager& mgr, EStateMsg msg, float dt) override; + void TargetPlayer(CStateManager&, EStateMsg msg, float dt) override; + void Generate(CStateManager&, EStateMsg msg, float dt) override; + void Deactivate(CStateManager&, EStateMsg msg, float dt) override; + void Attack(CStateManager&, EStateMsg msg, float dt) override; + void JumpBack(CStateManager&, EStateMsg msg, float dt) override; + void DoubleSnap(CStateManager&, EStateMsg msg, float dt) override; + void Shuffle(CStateManager&, EStateMsg msg, float dt) override; + void TurnAround(CStateManager&, EStateMsg msg, float dt) override; + void Skid(CStateManager&, EStateMsg msg, float dt) override; + void Taunt(CStateManager&, EStateMsg msg, float dt) override; + void Retreat(CStateManager&, EStateMsg msg, float dt) override; - bool InAttackPosition(CStateManager&, float arg); - bool PathShagged(CStateManager&, float arg); - bool InRange(CStateManager&, float arg); - bool PatternOver(CStateManager&, float arg); - bool HasAttackPattern(CStateManager&, float arg); - bool AnimOver(CStateManager&, float arg); - bool ShouldAttack(CStateManager&, float arg); - bool ShouldDoubleSnap(CStateManager&, float arg); - bool ShouldTurn(CStateManager&, float arg); - bool HitSomething(CStateManager&, float arg); - bool ShouldJumpBack(CStateManager&, float arg); - bool Stuck(CStateManager&, float arg); - bool NoPathNodes(CStateManager&, float arg); - bool ShouldTaunt(CStateManager&, float arg); - bool ShotAt(CStateManager&, float arg); + bool InAttackPosition(CStateManager&, float arg) override; + bool PathShagged(CStateManager&, float arg) override; + bool InRange(CStateManager&, float arg) override; + bool PatternOver(CStateManager&, float arg) override; + bool HasAttackPattern(CStateManager&, float arg) override; + bool AnimOver(CStateManager&, float arg) override; + bool ShouldAttack(CStateManager&, float arg) override; + bool ShouldDoubleSnap(CStateManager&, float arg) override; + bool ShouldTurn(CStateManager&, float arg) override; + bool HitSomething(CStateManager&, float arg) override; + bool ShouldJumpBack(CStateManager&, float arg) override; + bool Stuck(CStateManager&, float arg) override; + bool NoPathNodes(CStateManager&, float arg) override; + bool ShouldTaunt(CStateManager&, float arg) override; + bool ShotAt(CStateManager&, float arg) override; - void Burn(float duration, float damage); - void Shock(CStateManager& mgr, float duration, float damage); + void Burn(float duration, float damage) override; + void Shock(CStateManager& mgr, float duration, float damage) override; - CPathFindSearch* GetSearchPath(); - float GetGravityConstant() const; + CPathFindSearch* GetSearchPath() override; + float GetGravityConstant() const override; }; } // namespace MP1 } // namespace urde diff --git a/Runtime/MP1/World/CBloodFlower.hpp b/Runtime/MP1/World/CBloodFlower.hpp index 9e14d9bb5..6a338a2db 100644 --- a/Runtime/MP1/World/CBloodFlower.hpp +++ b/Runtime/MP1/World/CBloodFlower.hpp @@ -48,19 +48,19 @@ public: const CPatternedInfo&, CAssetId, CAssetId, const CActorParameters&, CAssetId, const CDamageInfo&, const CDamageInfo&, const CDamageInfo&, CAssetId, CAssetId, CAssetId, float, CAssetId, u32); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float dt, CStateManager& mgr); + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float dt, CStateManager& mgr) override; void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt); - void Render(const CStateManager& mgr) const; - void Touch(CActor&, CStateManager&) {} - CProjectileInfo* GetProjectileInfo() { return &x590_projectileInfo; } + void Render(const CStateManager& mgr) const override; + void Touch(CActor&, CStateManager&) override {} + CProjectileInfo* GetProjectileInfo() override { return &x590_projectileInfo; } - bool ShouldAttack(CStateManager&, float); - bool ShouldTurn(CStateManager&, float); - bool Leash(CStateManager&, float) { return x5c0_ < x3d0_playerLeashTime; } - void Active(CStateManager&, EStateMsg, float); - void InActive(CStateManager&, EStateMsg, float); - void BulbAttack(CStateManager&, EStateMsg, float); - void PodAttack(CStateManager&, EStateMsg, float); + bool ShouldAttack(CStateManager&, float) override; + bool ShouldTurn(CStateManager&, float) override; + bool Leash(CStateManager&, float) override { return x5c0_ < x3d0_playerLeashTime; } + void Active(CStateManager&, EStateMsg, float) override; + void InActive(CStateManager&, EStateMsg, float) override; + void BulbAttack(CStateManager&, EStateMsg, float) override; + void PodAttack(CStateManager&, EStateMsg, float) override; }; } // namespace urde::MP1 diff --git a/Runtime/MP1/World/CBurrower.hpp b/Runtime/MP1/World/CBurrower.hpp index 630529bdd..d6b96a99a 100644 --- a/Runtime/MP1/World/CBurrower.hpp +++ b/Runtime/MP1/World/CBurrower.hpp @@ -13,6 +13,6 @@ public: const CPatternedInfo&, const CActorParameters&, CAssetId, CAssetId, CAssetId, const CDamageInfo&, CAssetId, u32, CAssetId); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; }; } // namespace urde::MP1 diff --git a/Runtime/MP1/World/CEyeball.hpp b/Runtime/MP1/World/CEyeball.hpp index 55a192fa5..3fabd721a 100644 --- a/Runtime/MP1/World/CEyeball.hpp +++ b/Runtime/MP1/World/CEyeball.hpp @@ -42,21 +42,21 @@ public: CAssetId beamPulseFxId, CAssetId beamTextureId, CAssetId beamGlowTextureId, u32 anim0, u32 anim1, u32 anim2, u32 anim3, u32 beamSfx, bool attackDisabled, const CActorParameters& actParms); - void Accept(IVisitor& visitor); - void PreRender(CStateManager&, const zeus::CFrustum&); - void Touch(CActor&, CStateManager&){}; - void Death(CStateManager&, const zeus::CVector3f&, EScriptObjectState); + void Accept(IVisitor& visitor) override; + void PreRender(CStateManager&, const zeus::CFrustum&) override; + void Touch(CActor&, CStateManager&) override {} + void Death(CStateManager&, const zeus::CVector3f&, EScriptObjectState) override; - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr); - void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float); - void Think(float, CStateManager&); - void Flinch(CStateManager&, EStateMsg, float); - void Active(CStateManager&, EStateMsg, float); - void InActive(CStateManager&, EStateMsg, float); + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override; + void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float) override; + void Think(float, CStateManager&) override; + void Flinch(CStateManager&, EStateMsg, float) override; + void Active(CStateManager&, EStateMsg, float) override; + void InActive(CStateManager&, EStateMsg, float) override; - void Cover(CStateManager&, EStateMsg, float); + void Cover(CStateManager&, EStateMsg, float) override; - bool ShouldAttack(CStateManager&, float) { return x60c_26_alert; } - bool ShouldFire(CStateManager&, float) { return !x60c_27_attackDisabled; } + bool ShouldAttack(CStateManager&, float) override { return x60c_26_alert; } + bool ShouldFire(CStateManager&, float) override { return !x60c_27_attackDisabled; } }; } // namespace urde::MP1 \ No newline at end of file diff --git a/Runtime/MP1/World/CFireFlea.hpp b/Runtime/MP1/World/CFireFlea.hpp index c42dbdba0..2fd93c16b 100644 --- a/Runtime/MP1/World/CFireFlea.hpp +++ b/Runtime/MP1/World/CFireFlea.hpp @@ -18,9 +18,9 @@ class CFireFlea : public CPatterned { static zeus::CColor sCurrentFadeColor; CDeathCameraEffect(TUniqueId, TAreaId, std::string_view); - void Accept(IVisitor&); - void PreThink(float, CStateManager&); - void Think(float, CStateManager&); + void Accept(IVisitor&) override; + void PreThink(float, CStateManager&) override; + void Think(float, CStateManager&) override; }; float x568_ = 1.f; float x56c_; @@ -40,15 +40,15 @@ public: CFireFlea(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, CModelData&&, const CActorParameters&, const CPatternedInfo&, float); - void Accept(IVisitor&); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr); - void Dead(CStateManager&, EStateMsg msg, float dt); - bool Delay(CStateManager&, float arg); - bool InPosition(CStateManager& mgr, float dt); - bool HearShot(CStateManager&, float); - void TargetPatrol(CStateManager&, EStateMsg, float); - void Patrol(CStateManager&, EStateMsg, float); - void Flee(CStateManager&, EStateMsg, float); - CPathFindSearch* GetSearchPath() { return &xd8c_pathFind; } + void Accept(IVisitor&) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override; + void Dead(CStateManager&, EStateMsg msg, float dt) override; + bool Delay(CStateManager&, float arg) override; + bool InPosition(CStateManager& mgr, float dt) override; + bool HearShot(CStateManager&, float) override; + void TargetPatrol(CStateManager&, EStateMsg, float) override; + void Patrol(CStateManager&, EStateMsg, float) override; + void Flee(CStateManager&, EStateMsg, float) override; + CPathFindSearch* GetSearchPath() override { return &xd8c_pathFind; } }; } // namespace urde::MP1 \ No newline at end of file diff --git a/Runtime/MP1/World/CFlaahgra.hpp b/Runtime/MP1/World/CFlaahgra.hpp index 1da681efe..37cb7d6c8 100644 --- a/Runtime/MP1/World/CFlaahgra.hpp +++ b/Runtime/MP1/World/CFlaahgra.hpp @@ -45,9 +45,9 @@ class CFlaahgraRenderer : public CActor { public: CFlaahgraRenderer(TUniqueId, TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; - void Accept(IVisitor&); - std::optional GetTouchBounds() const { return {}; } + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; + void Accept(IVisitor&) override; + std::optional GetTouchBounds() const override { return {}; } }; class CFlaahgraPlants : public CActor { @@ -62,12 +62,12 @@ public: CFlaahgraPlants(const TToken&, const CActorParameters&, TUniqueId, TAreaId, TUniqueId, const zeus::CTransform&, const CDamageInfo&, const zeus::CVector3f&); - void Accept(IVisitor&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; - std::optional GetTouchBounds() const { return x110_aabox; } - void Touch(CActor&, CStateManager&); + void Accept(IVisitor&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; + std::optional GetTouchBounds() const override { return x110_aabox; } + void Touch(CActor&, CStateManager&) override; }; class CFlaahgra : public CPatterned { @@ -186,44 +186,44 @@ public: CFlaahgra(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, const CAnimRes&, const CPatternedInfo&, const CActorParameters&, const CFlaahgraData&); - void Think(float, CStateManager&); - void PreThink(float, CStateManager&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; - bool CanRenderUnsorted(const CStateManager&) const { return true; } - zeus::CVector3f GetAimPosition(const CStateManager&, float) const { return x820_; } - void Death(CStateManager&, const zeus::CVector3f&, EScriptObjectState); - void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float dt); + void Think(float, CStateManager&) override; + void PreThink(float, CStateManager&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; + bool CanRenderUnsorted(const CStateManager&) const override { return true; } + zeus::CVector3f GetAimPosition(const CStateManager&, float) const override { return x820_; } + void Death(CStateManager&, const zeus::CVector3f&, EScriptObjectState) override; + void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float dt) override; - CProjectileInfo* GetProjectileInfo() { return x8e4_30_ ? &x704_ : &x6dc_; } + CProjectileInfo* GetProjectileInfo() override { return x8e4_30_ ? &x704_ : &x6dc_; } - bool AnimOver(CStateManager&, float) { return x568_ == 4; } - bool AIStage(CStateManager&, float arg) { return x780_ == u32(arg); } - bool HitSomething(CStateManager&, float arg) { return x7d0_ > 0.f; } - bool OffLine(CStateManager&, float) { return (x8e5_29_ && x8e5_28_); } - bool ShouldTurn(CStateManager&, float); - bool ShouldAttack(CStateManager&, float); - bool BreakAttack(CStateManager&, float) { return x7d4_ >= x56c_.xc_ && !x8e4_29_getup; } - bool IsDizzy(CStateManager&, float) { + bool AnimOver(CStateManager&, float) override { return x568_ == 4; } + bool AIStage(CStateManager&, float arg) override { return x780_ == u32(arg); } + bool HitSomething(CStateManager&, float arg) override { return x7d0_ > 0.f; } + bool OffLine(CStateManager&, float) override { return (x8e5_29_ && x8e5_28_); } + bool ShouldTurn(CStateManager&, float) override; + bool ShouldAttack(CStateManager&, float) override; + bool BreakAttack(CStateManager&, float) override { return x7d4_ >= x56c_.xc_ && !x8e4_29_getup; } + bool IsDizzy(CStateManager&, float) override { return x450_bodyController->GetBodyStateInfo().GetCurrentStateId() == pas::EAnimationState::LoopReaction; } - bool CoverCheck(CStateManager&, float); + bool CoverCheck(CStateManager&, float) override; - void FadeIn(CStateManager&, EStateMsg, float); - void FadeOut(CStateManager&, EStateMsg, float); - void TurnAround(CStateManager&, EStateMsg, float); - void GetUp(CStateManager&, EStateMsg, float); - void Growth(CStateManager&, EStateMsg, float); - void Generate(CStateManager&, EStateMsg, float); - void Faint(CStateManager&, EStateMsg, float); - void Dead(CStateManager&, EStateMsg, float); - void Attack(CStateManager&, EStateMsg, float); - void Dizzy(CStateManager&, EStateMsg, float); - void Suck(CStateManager&, EStateMsg, float); - void ProjectileAttack(CStateManager&, EStateMsg, float); - void Cover(CStateManager&, EStateMsg, float); - void SpecialAttack(CStateManager&, EStateMsg, float); - void Enraged(CStateManager&, EStateMsg, float); + void FadeIn(CStateManager&, EStateMsg, float) override; + void FadeOut(CStateManager&, EStateMsg, float) override; + void TurnAround(CStateManager&, EStateMsg, float) override; + void GetUp(CStateManager&, EStateMsg, float) override; + void Growth(CStateManager&, EStateMsg, float) override; + void Generate(CStateManager&, EStateMsg, float) override; + void Faint(CStateManager&, EStateMsg, float) override; + void Dead(CStateManager&, EStateMsg, float) override; + void Attack(CStateManager&, EStateMsg, float) override; + void Dizzy(CStateManager&, EStateMsg, float) override; + void Suck(CStateManager&, EStateMsg, float) override; + void ProjectileAttack(CStateManager&, EStateMsg, float) override; + void Cover(CStateManager&, EStateMsg, float) override; + void SpecialAttack(CStateManager&, EStateMsg, float) override; + void Enraged(CStateManager&, EStateMsg, float) override; }; } \ No newline at end of file diff --git a/Runtime/MP1/World/CFlaahgraTentacle.hpp b/Runtime/MP1/World/CFlaahgraTentacle.hpp index 86a26675f..9d4d4cbe3 100644 --- a/Runtime/MP1/World/CFlaahgraTentacle.hpp +++ b/Runtime/MP1/World/CFlaahgraTentacle.hpp @@ -27,18 +27,22 @@ public: CFlaahgraTentacle(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, CModelData&&, const CPatternedInfo&, const CActorParameters&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; - zeus::CVector3f GetAimPosition(const CStateManager&, float) const; + zeus::CVector3f GetAimPosition(const CStateManager&, float) const override; - bool Inside(CStateManager&, float) { return x450_bodyController->GetLocomotionType() == pas::ELocomotionType::Crouch; } - bool AnimOver(CStateManager&, float) { return x568_ == 3; } - bool ShouldAttack(CStateManager&, float); + bool Inside(CStateManager&, float) override { + return x450_bodyController->GetLocomotionType() == pas::ELocomotionType::Crouch; + } + bool AnimOver(CStateManager&, float) override { return x568_ == 3; } + bool ShouldAttack(CStateManager&, float) override; - void Dead(CStateManager&, EStateMsg, float) { x450_bodyController->SetLocomotionType(pas::ELocomotionType::Crouch); } - void Attack(CStateManager&, EStateMsg, float); - void Retreat(CStateManager&, EStateMsg, float); - void InActive(CStateManager&, EStateMsg, float); + void Dead(CStateManager&, EStateMsg, float) override { + x450_bodyController->SetLocomotionType(pas::ELocomotionType::Crouch); + } + void Attack(CStateManager&, EStateMsg, float) override; + void Retreat(CStateManager&, EStateMsg, float) override; + void InActive(CStateManager&, EStateMsg, float) override; }; } \ No newline at end of file diff --git a/Runtime/MP1/World/CFlickerBat.hpp b/Runtime/MP1/World/CFlickerBat.hpp index abaceac23..e4439dc3c 100644 --- a/Runtime/MP1/World/CFlickerBat.hpp +++ b/Runtime/MP1/World/CFlickerBat.hpp @@ -28,20 +28,20 @@ public: CFlickerBat(TUniqueId, std::string_view name, EFlavorType, const CEntityInfo&, const zeus::CTransform&, CModelData&&, const CPatternedInfo&, EColliderType, bool, const CActorParameters&, bool); - void Accept(IVisitor&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); - void Render(const CStateManager&) const; - void Touch(CActor&, CStateManager&); - void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float dt); - void Death(CStateManager& mgr, const zeus::CVector3f& direction, EScriptObjectState state); - bool CanBeShot(const CStateManager&, int); - void Patrol(CStateManager&, EStateMsg, float); - void Attack(CStateManager&, EStateMsg, float); - void Shuffle(CStateManager&, EStateMsg, float); - void Taunt(CStateManager&, EStateMsg, float); - bool InPosition(CStateManager&, float); - bool HearShot(CStateManager&, float); + void Accept(IVisitor&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; + void Render(const CStateManager&) const override; + void Touch(CActor&, CStateManager&) override; + void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float dt) override; + void Death(CStateManager& mgr, const zeus::CVector3f& direction, EScriptObjectState state) override; + bool CanBeShot(const CStateManager&, int) override; + void Patrol(CStateManager&, EStateMsg, float) override; + void Attack(CStateManager&, EStateMsg, float) override; + void Shuffle(CStateManager&, EStateMsg, float) override; + void Taunt(CStateManager&, EStateMsg, float) override; + bool InPosition(CStateManager&, float) override; + bool HearShot(CStateManager&, float) override; EFlickerBatState GetFlickerBatState() const { return x574_state; } void SetFlickerBatState(EFlickerBatState state, CStateManager&); diff --git a/Runtime/MP1/World/CJellyZap.hpp b/Runtime/MP1/World/CJellyZap.hpp index 3178d06e1..601952bf9 100644 --- a/Runtime/MP1/World/CJellyZap.hpp +++ b/Runtime/MP1/World/CJellyZap.hpp @@ -37,18 +37,18 @@ public: bool, float, float, float, float, float, float, float, float, float, float, float, float, const CPatternedInfo&, const CActorParameters&); - void Accept(IVisitor&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); - void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float dt); - void Attack(CStateManager&, EStateMsg, float); - void Suck(CStateManager&, EStateMsg, float); - void Active(CStateManager&, EStateMsg, float); - void InActive(CStateManager&, EStateMsg, float); - void Flinch(CStateManager&, EStateMsg, float); - bool ShouldAttack(CStateManager&, float) { return x330_stateMachineState.GetTime() > x5a8_attackDelay; } - bool ShouldSpecialAttack(CStateManager& mgr, float) { return ClosestToPlayer(mgr); } - bool InAttackPosition(CStateManager&, float); - bool InDetectionRange(CStateManager&, float); + void Accept(IVisitor&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; + void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float dt) override; + void Attack(CStateManager&, EStateMsg, float) override; + void Suck(CStateManager&, EStateMsg, float) override; + void Active(CStateManager&, EStateMsg, float) override; + void InActive(CStateManager&, EStateMsg, float) override; + void Flinch(CStateManager&, EStateMsg, float) override; + bool ShouldAttack(CStateManager&, float) override { return x330_stateMachineState.GetTime() > x5a8_attackDelay; } + bool ShouldSpecialAttack(CStateManager& mgr, float) override { return ClosestToPlayer(mgr); } + bool InAttackPosition(CStateManager&, float) override; + bool InDetectionRange(CStateManager&, float) override; }; } // namespace urde::MP1 \ No newline at end of file diff --git a/Runtime/MP1/World/CMagdolite.hpp b/Runtime/MP1/World/CMagdolite.hpp index 0c68a6c43..612cab133 100644 --- a/Runtime/MP1/World/CMagdolite.hpp +++ b/Runtime/MP1/World/CMagdolite.hpp @@ -35,6 +35,6 @@ public: const CDamageVulnerability&, const CDamageVulnerability&, CAssetId, CAssetId, float, float, float, float, const CMagdoliteData&, float, float, float); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; }; } // namespace urde::MP1 diff --git a/Runtime/MP1/World/CMetaree.hpp b/Runtime/MP1/World/CMetaree.hpp index 4a6bb4de9..44373d479 100644 --- a/Runtime/MP1/World/CMetaree.hpp +++ b/Runtime/MP1/World/CMetaree.hpp @@ -35,22 +35,22 @@ public: const CPatternedInfo&, const CDamageInfo&, float, const zeus::CVector3f&, float, EBodyType, float, float, const CActorParameters&); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; - void Touch(CActor&, CStateManager&); - void CollidedWith(TUniqueId, const CCollisionInfoList&, CStateManager&); - void ThinkAboutMove(float){}; - bool Delay(CStateManager&, float) { return x330_stateMachineState.GetTime() > x568_delay; } - void Explode(CStateManager&, EStateMsg, float); - void Flee(CStateManager&, EStateMsg, float); - void Dead(CStateManager&, EStateMsg, float); - void Attack(CStateManager&, EStateMsg, float); - void Halt(CStateManager&, EStateMsg, float); - void Active(CStateManager&, EStateMsg, float); - void InActive(CStateManager&, EStateMsg, float); - bool InRange(CStateManager&, float); - bool ShouldAttack(CStateManager&, float); + void Touch(CActor&, CStateManager&) override; + void CollidedWith(TUniqueId, const CCollisionInfoList&, CStateManager&) override; + void ThinkAboutMove(float) override {} + bool Delay(CStateManager&, float) override { return x330_stateMachineState.GetTime() > x568_delay; } + void Explode(CStateManager&, EStateMsg, float) override; + void Flee(CStateManager&, EStateMsg, float) override; + void Dead(CStateManager&, EStateMsg, float) override; + void Attack(CStateManager&, EStateMsg, float) override; + void Halt(CStateManager&, EStateMsg, float) override; + void Active(CStateManager&, EStateMsg, float) override; + void InActive(CStateManager&, EStateMsg, float) override; + bool InRange(CStateManager&, float) override; + bool ShouldAttack(CStateManager&, float) override; }; } // namespace urde::MP1 diff --git a/Runtime/MP1/World/CMetroidPrimeRelay.hpp b/Runtime/MP1/World/CMetroidPrimeRelay.hpp index fc91bfc67..fd0ef2281 100644 --- a/Runtime/MP1/World/CMetroidPrimeRelay.hpp +++ b/Runtime/MP1/World/CMetroidPrimeRelay.hpp @@ -28,7 +28,7 @@ public: const zeus::CTransform& xf, const zeus::CVector3f& scale, SPrimeExoParameters&& parms, float f1, float f2, float f3, u32 w1, bool b1, u32 w2, const CHealthInfo& hInfo1, const CHealthInfo& hInfo2, u32 w3, u32 w4, u32 w5, rstl::reserved_vector&& roomParms); - void Accept(IVisitor& visitor); + void Accept(IVisitor& visitor) override; TUniqueId GetMetroidPrimeExoId() const { return x34_mpUid; } }; diff --git a/Runtime/MP1/World/CNewIntroBoss.hpp b/Runtime/MP1/World/CNewIntroBoss.hpp index 6b7984d69..19c3871f7 100644 --- a/Runtime/MP1/World/CNewIntroBoss.hpp +++ b/Runtime/MP1/World/CNewIntroBoss.hpp @@ -52,27 +52,27 @@ public: CAssetId projectile, const CDamageInfo& dInfo, CAssetId beamContactFxId, CAssetId beamPulseFxId, CAssetId beamTextureId, CAssetId beamGlowTextureId); - void Accept(IVisitor& visitor); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager&); - void Think(float dt, CStateManager& mgr); - void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; - void OnScanStateChanged(EScanState, CStateManager&); - CProjectileInfo* GetProjectileInfo() { return &x5ac_projectileInfo; } - zeus::CAABox GetSortingBounds(const CStateManager&) const { + void Accept(IVisitor& visitor) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager&) override; + void Think(float dt, CStateManager& mgr) override; + void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override; + void OnScanStateChanged(EScanState, CStateManager&) override; + CProjectileInfo* GetProjectileInfo() override { return &x5ac_projectileInfo; } + zeus::CAABox GetSortingBounds(const CStateManager&) const override { zeus::CAABox box = GetModelData()->GetBounds(); return zeus::CAABox({-0.5f, -0.5f, box.min.z()}, {0.5f, 0.5f, box.max.z()}).getTransformedAABox(x34_transform); } - std::optional GetTouchBounds() const { return {}; } - void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float dt); - void Generate(CStateManager&, EStateMsg, float); - void Attack(CStateManager&, EStateMsg, float); - void Patrol(CStateManager&, EStateMsg, float); - bool ShouldTurn(CStateManager&, float); - bool ShouldAttack(CStateManager&, float); - bool AIStage(CStateManager&, float); - bool AnimOver(CStateManager&, float); - bool InAttackPosition(CStateManager&, float); + std::optional GetTouchBounds() const override { return {}; } + void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float dt) override; + void Generate(CStateManager&, EStateMsg, float) override; + void Attack(CStateManager&, EStateMsg, float) override; + void Patrol(CStateManager&, EStateMsg, float) override; + bool ShouldTurn(CStateManager&, float) override; + bool ShouldAttack(CStateManager&, float) override; + bool AIStage(CStateManager&, float) override; + bool AnimOver(CStateManager&, float) override; + bool InAttackPosition(CStateManager&, float) override; }; } // namespace MP1 diff --git a/Runtime/MP1/World/CParasite.hpp b/Runtime/MP1/World/CParasite.hpp index 0a9ddb5da..379748915 100644 --- a/Runtime/MP1/World/CParasite.hpp +++ b/Runtime/MP1/World/CParasite.hpp @@ -108,42 +108,42 @@ public: u16 haltSfx, u16 getUpSfx, u16 crouchSfx, CAssetId modelRes, CAssetId skinRes, float iceZoomerJointHP, const CActorParameters& aParams); - void Accept(IVisitor&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void PreThink(float, CStateManager&); - void Think(float dt, CStateManager& mgr); - void Render(const CStateManager&) const; - const CDamageVulnerability* GetDamageVulnerability() const; - CDamageInfo GetContactDamage() const; - void Touch(CActor& actor, CStateManager&); - zeus::CVector3f GetAimPosition(const CStateManager&, float) const; - void CollidedWith(TUniqueId uid, const CCollisionInfoList&, CStateManager&); - void Death(CStateManager& mgr, const zeus::CVector3f& direction, EScriptObjectState state); - void Patrol(CStateManager&, EStateMsg msg, float dt); - void PathFind(CStateManager&, EStateMsg msg, float dt); - void TargetPlayer(CStateManager&, EStateMsg msg, float dt); - void TargetPatrol(CStateManager&, EStateMsg msg, float dt); - void Halt(CStateManager&, EStateMsg, float); - void Run(CStateManager&, EStateMsg, float); - void Generate(CStateManager&, EStateMsg, float); - void Deactivate(CStateManager&, EStateMsg, float); - void Attack(CStateManager&, EStateMsg, float); - void Crouch(CStateManager&, EStateMsg, float); - void GetUp(CStateManager&, EStateMsg, float); - void TelegraphAttack(CStateManager&, EStateMsg, float); - void Jump(CStateManager&, EStateMsg, float); - void Retreat(CStateManager&, EStateMsg, float); - bool AnimOver(CStateManager&, float); - bool ShouldAttack(CStateManager&, float); - bool HitSomething(CStateManager&, float); - bool Stuck(CStateManager&, float); - bool Landed(CStateManager&, float); - bool AttackOver(CStateManager&, float); - bool ShotAt(CStateManager&, float); - void MassiveDeath(CStateManager&); - void MassiveFrozenDeath(CStateManager&); - void ThinkAboutMove(float); - bool IsOnGround() const; + void Accept(IVisitor&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void PreThink(float, CStateManager&) override; + void Think(float dt, CStateManager& mgr) override; + void Render(const CStateManager&) const override; + const CDamageVulnerability* GetDamageVulnerability() const override; + CDamageInfo GetContactDamage() const override; + void Touch(CActor& actor, CStateManager&) override; + zeus::CVector3f GetAimPosition(const CStateManager&, float) const override; + void CollidedWith(TUniqueId uid, const CCollisionInfoList&, CStateManager&) override; + void Death(CStateManager& mgr, const zeus::CVector3f& direction, EScriptObjectState state) override; + void Patrol(CStateManager&, EStateMsg msg, float dt) override; + void PathFind(CStateManager&, EStateMsg msg, float dt) override; + void TargetPlayer(CStateManager&, EStateMsg msg, float dt) override; + void TargetPatrol(CStateManager&, EStateMsg msg, float dt) override; + void Halt(CStateManager&, EStateMsg, float) override; + void Run(CStateManager&, EStateMsg, float) override; + void Generate(CStateManager&, EStateMsg, float) override; + void Deactivate(CStateManager&, EStateMsg, float) override; + void Attack(CStateManager&, EStateMsg, float) override; + void Crouch(CStateManager&, EStateMsg, float) override; + void GetUp(CStateManager&, EStateMsg, float) override; + void TelegraphAttack(CStateManager&, EStateMsg, float) override; + void Jump(CStateManager&, EStateMsg, float) override; + void Retreat(CStateManager&, EStateMsg, float) override; + bool AnimOver(CStateManager&, float) override; + bool ShouldAttack(CStateManager&, float) override; + bool HitSomething(CStateManager&, float) override; + bool Stuck(CStateManager&, float) override; + bool Landed(CStateManager&, float) override; + bool AttackOver(CStateManager&, float) override; + bool ShotAt(CStateManager&, float) override; + void MassiveDeath(CStateManager&) override; + void MassiveFrozenDeath(CStateManager&) override; + void ThinkAboutMove(float) override; + bool IsOnGround() const override; virtual void UpdateWalkerAnimation(CStateManager&, float); }; } // namespace urde::MP1 diff --git a/Runtime/MP1/World/CPuddleSpore.hpp b/Runtime/MP1/World/CPuddleSpore.hpp index 2ef479a81..4d3e10f79 100644 --- a/Runtime/MP1/World/CPuddleSpore.hpp +++ b/Runtime/MP1/World/CPuddleSpore.hpp @@ -40,42 +40,42 @@ public: const CPatternedInfo&, EColliderType, CAssetId, float, float, float, float, float, const CActorParameters&, CAssetId, const CDamageInfo&); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr); - void PreThink(float, CStateManager&); - void Think(float, CStateManager&); - void Render(const CStateManager&) const; - void Touch(CActor&, CStateManager&); - void FluidFXThink(EFluidState, CScriptWater&, CStateManager&); + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override; + void PreThink(float, CStateManager&) override; + void Think(float, CStateManager&) override; + void Render(const CStateManager&) const override; + void Touch(CActor&, CStateManager&) override; + void FluidFXThink(EFluidState, CScriptWater&, CStateManager&) override; void KnockBack(const zeus::CVector3f& dir, CStateManager& mgr, const CDamageInfo& dInfo, EKnockBackType type, - bool inDeferred, float dt) { + bool inDeferred, float dt) override { if (x5c8_ == 1) return; CPatterned::KnockBack(dir, mgr, dInfo, type, inDeferred, dt); } EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f& point, const zeus::CVector3f&, - const CWeaponMode&, EProjectileAttrib) const { + const CWeaponMode&, EProjectileAttrib) const override { return HitShell(point) ? EWeaponCollisionResponseTypes::Unknown84 : EWeaponCollisionResponseTypes::Unknown34; } - void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float); - void CollidedWith(TUniqueId uid, const CCollisionInfoList& colList, CStateManager& mgr) { + void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float) override; + void CollidedWith(TUniqueId uid, const CCollisionInfoList& colList, CStateManager& mgr) override { if (x5c8_ == 2) return; CPatterned::CollidedWith(uid, colList, mgr); } - const CCollisionPrimitive* GetCollisionPrimitive() const { return &x5a0_; } + const CCollisionPrimitive* GetCollisionPrimitive() const override { return &x5a0_; } zeus::CAABox CalculateBoundingBox() const; - CProjectileInfo* GetProjectileInfo() { return &x5ec_projectileInfo; } + CProjectileInfo* GetProjectileInfo() override { return &x5ec_projectileInfo; } - bool InAttackPosition(CStateManager&, float) { return x568_ >= x570_; } - bool ShouldAttack(CStateManager&, float) { return x568_ >= x574_; } - bool ShouldTurn(CStateManager&, float); - bool AnimOver(CStateManager&, float) { return x5cc_ == 2; } + bool InAttackPosition(CStateManager&, float) override { return x568_ >= x570_; } + bool ShouldAttack(CStateManager&, float) override { return x568_ >= x574_; } + bool ShouldTurn(CStateManager&, float) override; + bool AnimOver(CStateManager&, float) override { return x5cc_ == 2; } - void InActive(CStateManager&, EStateMsg, float); - void Active(CStateManager&, EStateMsg, float); - void Run(CStateManager&, EStateMsg, float); - void TurnAround(CStateManager&, EStateMsg, float); - void GetUp(CStateManager&, EStateMsg, float); - void Attack(CStateManager&, EStateMsg, float); + void InActive(CStateManager&, EStateMsg, float) override; + void Active(CStateManager&, EStateMsg, float) override; + void Run(CStateManager&, EStateMsg, float) override; + void TurnAround(CStateManager&, EStateMsg, float) override; + void GetUp(CStateManager&, EStateMsg, float) override; + void Attack(CStateManager&, EStateMsg, float) override; }; } // namespace urde::MP1 \ No newline at end of file diff --git a/Runtime/MP1/World/CPuddleToadGamma.hpp b/Runtime/MP1/World/CPuddleToadGamma.hpp index d12e1846c..932668114 100644 --- a/Runtime/MP1/World/CPuddleToadGamma.hpp +++ b/Runtime/MP1/World/CPuddleToadGamma.hpp @@ -45,30 +45,32 @@ public: float spotPlayerWaitTime, const CDamageInfo& playerShootDamage, const CDamageInfo& dInfo2, CAssetId dcln); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float dt, CStateManager& mgr); - void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt); - std::optional GetTouchBounds() const; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float dt, CStateManager& mgr) override; + void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt) override; + std::optional GetTouchBounds() const override; const CDamageVulnerability* GetDamageVulnerability(const zeus::CVector3f&, const zeus::CVector3f&, - const CDamageInfo&) const; + const CDamageInfo&) const override; - const CDamageVulnerability* GetDamageVulnerability() const { return &CDamageVulnerability::ImmuneVulnerabilty(); } + const CDamageVulnerability* GetDamageVulnerability() const override { + return &CDamageVulnerability::ImmuneVulnerabilty(); + } - const CCollisionPrimitive* GetCollisionPrimitive() const; + const CCollisionPrimitive* GetCollisionPrimitive() const override; - zeus::CTransform GetPrimitiveTransform() const; + zeus::CTransform GetPrimitiveTransform() const override; - void InActive(CStateManager&, EStateMsg, float); - void Active(CStateManager&, EStateMsg, float); - void Suck(CStateManager&, EStateMsg, float); - void Attack(CStateManager&, EStateMsg, float); - void Crouch(CStateManager&, EStateMsg, float); - bool InAttackPosition(CStateManager&, float); - bool SpotPlayer(CStateManager&, float); - bool ShouldAttack(CStateManager&, float); - bool LostInterest(CStateManager&, float); - bool Inside(CStateManager&, float); + void InActive(CStateManager&, EStateMsg, float) override; + void Active(CStateManager&, EStateMsg, float) override; + void Suck(CStateManager&, EStateMsg, float) override; + void Attack(CStateManager&, EStateMsg, float) override; + void Crouch(CStateManager&, EStateMsg, float) override; + bool InAttackPosition(CStateManager&, float) override; + bool SpotPlayer(CStateManager&, float) override; + bool ShouldAttack(CStateManager&, float) override; + bool LostInterest(CStateManager&, float) override; + bool Inside(CStateManager&, float) override; }; } // namespace urde::MP1 diff --git a/Runtime/MP1/World/CPuffer.hpp b/Runtime/MP1/World/CPuffer.hpp index 722c8c375..06a40dd88 100644 --- a/Runtime/MP1/World/CPuffer.hpp +++ b/Runtime/MP1/World/CPuffer.hpp @@ -28,11 +28,11 @@ public: const CActorParameters&, const CPatternedInfo&, float, CAssetId, const CDamageInfo&, CAssetId, float, bool, bool, bool, const CDamageInfo&, s16); - void Accept(IVisitor&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); - std::optional GetTouchBounds() const; - void Touch(CActor&, CStateManager&); - void Death(CStateManager&, const zeus::CVector3f&, EScriptObjectState); + void Accept(IVisitor&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; + std::optional GetTouchBounds() const override; + void Touch(CActor&, CStateManager&) override; + void Death(CStateManager&, const zeus::CVector3f&, EScriptObjectState) override; }; } // namespace urde::MP1 diff --git a/Runtime/MP1/World/CSeedling.hpp b/Runtime/MP1/World/CSeedling.hpp index 99957f9af..7499670dc 100644 --- a/Runtime/MP1/World/CSeedling.hpp +++ b/Runtime/MP1/World/CSeedling.hpp @@ -24,21 +24,21 @@ public: const CPatternedInfo&, const CActorParameters&, CAssetId, CAssetId, const CDamageInfo&, const CDamageInfo&, float, float, float, float); - void Accept(IVisitor&); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); - void Render(const CStateManager&) const; - void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt); - CProjectileInfo* GetProjectileInfo() { return &x6c0_projectileInfo; } - std::optional GetTouchBounds() const; - void Touch(CActor&, CStateManager&); - CPathFindSearch* GetSearchPath() { return &x5d8_searchPath; } - void Patrol(CStateManager&, EStateMsg, float); - void Active(CStateManager&, EStateMsg, float); - void Enraged(CStateManager&, EStateMsg, float); - void ProjectileAttack(CStateManager&, EStateMsg, float); - void Generate(CStateManager&, EStateMsg, float); - bool ShouldAttack(CStateManager&, float); - void MassiveDeath(CStateManager&); + void Accept(IVisitor&) override; + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; + void Render(const CStateManager&) const override; + void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt) override; + CProjectileInfo* GetProjectileInfo() override { return &x6c0_projectileInfo; } + std::optional GetTouchBounds() const override; + void Touch(CActor&, CStateManager&) override; + CPathFindSearch* GetSearchPath() override { return &x5d8_searchPath; } + void Patrol(CStateManager&, EStateMsg, float) override; + void Active(CStateManager&, EStateMsg, float) override; + void Enraged(CStateManager&, EStateMsg, float) override; + void ProjectileAttack(CStateManager&, EStateMsg, float) override; + void Generate(CStateManager&, EStateMsg, float) override; + bool ShouldAttack(CStateManager&, float) override; + void MassiveDeath(CStateManager&) override; }; } // namespace urde::MP1 diff --git a/Runtime/MP1/World/CSpacePirate.hpp b/Runtime/MP1/World/CSpacePirate.hpp index 9c356e73e..4fe491e26 100644 --- a/Runtime/MP1/World/CSpacePirate.hpp +++ b/Runtime/MP1/World/CSpacePirate.hpp @@ -24,9 +24,9 @@ class CPirateRagDoll : public CRagDoll { public: CPirateRagDoll(CStateManager& mgr, CSpacePirate* sp, u16 thudSfx, u32 flags); - void PreRender(const zeus::CVector3f& v, CModelData& mData); - void Update(CStateManager& mgr, float dt, float waterTop); - void Prime(CStateManager& mgr, const zeus::CTransform& xf, CModelData& mData); + void PreRender(const zeus::CVector3f& v, CModelData& mData) override; + void Update(CStateManager& mgr, float dt, float waterTop) override; + void Prime(CStateManager& mgr, const zeus::CTransform& xf, CModelData& mData) override; zeus::CVector3f& TorsoImpulse() { return x84_torsoImpulse; } }; @@ -249,96 +249,97 @@ public: CSpacePirate(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, CModelData&&, const CActorParameters&, const CPatternedInfo&, CInputStream&, u32); - void Accept(IVisitor& visitor); - void Think(float dt, CStateManager& mgr); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr); - void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum); - void Render(const CStateManager& mgr) const; + void Accept(IVisitor& visitor) override; + void Think(float dt, CStateManager& mgr) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr) override; + void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) override; + void Render(const CStateManager& mgr) const override; - void CalculateRenderBounds(); - void Touch(CActor& other, CStateManager& mgr); - zeus::CAABox GetSortingBounds(const CStateManager& mgr) const; - void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt); - void Death(CStateManager& mgr, const zeus::CVector3f& direction, EScriptObjectState state); + void CalculateRenderBounds() override; + void Touch(CActor& other, CStateManager& mgr) override; + zeus::CAABox GetSortingBounds(const CStateManager& mgr) const override; + void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt) override; + void Death(CStateManager& mgr, const zeus::CVector3f& direction, EScriptObjectState state) override; void KnockBack(const zeus::CVector3f&, CStateManager&, const CDamageInfo& info, EKnockBackType type, bool inDeferred, - float magnitude); - bool IsListening() const; - bool Listen(const zeus::CVector3f&, EListenNoiseType); - zeus::CVector3f GetOrigin(const CStateManager& mgr, const CTeamAiRole& role, const zeus::CVector3f& aimPos) const; + float magnitude) override; + bool IsListening() const override; + bool Listen(const zeus::CVector3f&, EListenNoiseType) override; + zeus::CVector3f GetOrigin(const CStateManager& mgr, const CTeamAiRole& role, + const zeus::CVector3f& aimPos) const override; void DetachActorFromPirate() { x7b4_attachedActor = kInvalidUniqueId; } bool AttachActorToPirate(TUniqueId id); void SetAttackTarget(TUniqueId id); - void Patrol(CStateManager&, EStateMsg, float); - void Dead(CStateManager&, EStateMsg, float); - void PathFind(CStateManager& mgr, EStateMsg msg, float dt); - void TargetPatrol(CStateManager&, EStateMsg, float); - void TargetCover(CStateManager&, EStateMsg, float); - void Halt(CStateManager&, EStateMsg, float); - void Run(CStateManager&, EStateMsg, float); - void Generate(CStateManager&, EStateMsg, float); - void Deactivate(CStateManager&, EStateMsg, float); - void Attack(CStateManager&, EStateMsg, float); - void JumpBack(CStateManager&, EStateMsg, float); - void DoubleSnap(CStateManager&, EStateMsg, float); - void Shuffle(CStateManager&, EStateMsg, float); - void TurnAround(CStateManager&, EStateMsg, float); - void Skid(CStateManager&, EStateMsg, float); - void CoverAttack(CStateManager&, EStateMsg, float); - void Crouch(CStateManager&, EStateMsg, float); - void GetUp(CStateManager&, EStateMsg, float); - void Taunt(CStateManager&, EStateMsg, float); - void Flee(CStateManager&, EStateMsg, float); - void Lurk(CStateManager&, EStateMsg, float); - void Jump(CStateManager&, EStateMsg, float); - void Dodge(CStateManager&, EStateMsg, float); - void Cover(CStateManager&, EStateMsg, float); - void Approach(CStateManager&, EStateMsg, float); - void WallHang(CStateManager&, EStateMsg, float); - void WallDetach(CStateManager&, EStateMsg, float); - void Enraged(CStateManager&, EStateMsg, float); - void SpecialAttack(CStateManager&, EStateMsg, float); - void Bounce(CStateManager&, EStateMsg, float); - void PathFindEx(CStateManager&, EStateMsg, float); + void Patrol(CStateManager&, EStateMsg, float) override; + void Dead(CStateManager&, EStateMsg, float) override; + void PathFind(CStateManager& mgr, EStateMsg msg, float dt) override; + void TargetPatrol(CStateManager&, EStateMsg, float) override; + void TargetCover(CStateManager&, EStateMsg, float) override; + void Halt(CStateManager&, EStateMsg, float) override; + void Run(CStateManager&, EStateMsg, float) override; + void Generate(CStateManager&, EStateMsg, float) override; + void Deactivate(CStateManager&, EStateMsg, float) override; + void Attack(CStateManager&, EStateMsg, float) override; + void JumpBack(CStateManager&, EStateMsg, float) override; + void DoubleSnap(CStateManager&, EStateMsg, float) override; + void Shuffle(CStateManager&, EStateMsg, float) override; + void TurnAround(CStateManager&, EStateMsg, float) override; + void Skid(CStateManager&, EStateMsg, float) override; + void CoverAttack(CStateManager&, EStateMsg, float) override; + void Crouch(CStateManager&, EStateMsg, float) override; + void GetUp(CStateManager&, EStateMsg, float) override; + void Taunt(CStateManager&, EStateMsg, float) override; + void Flee(CStateManager&, EStateMsg, float) override; + void Lurk(CStateManager&, EStateMsg, float) override; + void Jump(CStateManager&, EStateMsg, float) override; + void Dodge(CStateManager&, EStateMsg, float) override; + void Cover(CStateManager&, EStateMsg, float) override; + void Approach(CStateManager&, EStateMsg, float) override; + void WallHang(CStateManager&, EStateMsg, float) override; + void WallDetach(CStateManager&, EStateMsg, float) override; + void Enraged(CStateManager&, EStateMsg, float) override; + void SpecialAttack(CStateManager&, EStateMsg, float) override; + void Bounce(CStateManager&, EStateMsg, float) override; + void PathFindEx(CStateManager&, EStateMsg, float) override; - bool Leash(CStateManager&, float); - bool OffLine(CStateManager&, float); - bool Attacked(CStateManager&, float); - bool InRange(CStateManager&, float); - bool SpotPlayer(CStateManager&, float); - bool PatternOver(CStateManager&, float); - bool PatternShagged(CStateManager&, float); - bool AnimOver(CStateManager&, float); - bool ShouldAttack(CStateManager&, float); - bool ShouldJumpBack(CStateManager& mgr, float arg); - bool Stuck(CStateManager&, float); - bool Landed(CStateManager&, float); - bool HearShot(CStateManager&, float); - bool HearPlayer(CStateManager&, float); - bool CoverCheck(CStateManager&, float); - bool CoverFind(CStateManager&, float); - bool CoverBlown(CStateManager&, float); - bool CoverNearlyBlown(CStateManager&, float); - bool CoveringFire(CStateManager&, float); - bool LineOfSight(CStateManager&, float); - bool AggressionCheck(CStateManager&, float); - bool ShouldDodge(CStateManager&, float); - bool ShouldRetreat(CStateManager&, float); - bool ShouldCrouch(CStateManager&, float); - bool ShouldMove(CStateManager&, float); - bool ShotAt(CStateManager&, float); - bool HasTargetingPoint(CStateManager&, float); - bool ShouldWallHang(CStateManager&, float); - bool StartAttack(CStateManager&, float); - bool BreakAttack(CStateManager&, float); - bool ShouldStrafe(CStateManager& mgr, float arg); - bool ShouldSpecialAttack(CStateManager&, float); - bool LostInterest(CStateManager&, float); - bool BounceFind(CStateManager& mgr, float arg); + bool Leash(CStateManager&, float) override; + bool OffLine(CStateManager&, float) override; + bool Attacked(CStateManager&, float) override; + bool InRange(CStateManager&, float) override; + bool SpotPlayer(CStateManager&, float) override; + bool PatternOver(CStateManager&, float) override; + bool PatternShagged(CStateManager&, float) override; + bool AnimOver(CStateManager&, float) override; + bool ShouldAttack(CStateManager&, float) override; + bool ShouldJumpBack(CStateManager& mgr, float arg) override; + bool Stuck(CStateManager&, float) override; + bool Landed(CStateManager&, float) override; + bool HearShot(CStateManager&, float) override; + bool HearPlayer(CStateManager&, float) override; + bool CoverCheck(CStateManager&, float) override; + bool CoverFind(CStateManager&, float) override; + bool CoverBlown(CStateManager&, float) override; + bool CoverNearlyBlown(CStateManager&, float) override; + bool CoveringFire(CStateManager&, float) override; + bool LineOfSight(CStateManager&, float) override; + bool AggressionCheck(CStateManager&, float) override; + bool ShouldDodge(CStateManager&, float) override; + bool ShouldRetreat(CStateManager&, float) override; + bool ShouldCrouch(CStateManager&, float) override; + bool ShouldMove(CStateManager&, float) override; + bool ShotAt(CStateManager&, float) override; + bool HasTargetingPoint(CStateManager&, float) override; + bool ShouldWallHang(CStateManager&, float) override; + bool StartAttack(CStateManager&, float) override; + bool BreakAttack(CStateManager&, float) override; + bool ShouldStrafe(CStateManager& mgr, float arg) override; + bool ShouldSpecialAttack(CStateManager&, float) override; + bool LostInterest(CStateManager&, float) override; + bool BounceFind(CStateManager& mgr, float arg) override; - CPathFindSearch* GetSearchPath(); - u8 GetModelAlphau8(const CStateManager& mgr) const; - float GetGravityConstant() const; - CProjectileInfo* GetProjectileInfo(); + CPathFindSearch* GetSearchPath() override; + u8 GetModelAlphau8(const CStateManager& mgr) const override; + float GetGravityConstant() const override; + CProjectileInfo* GetProjectileInfo() override; }; } // namespace urde::MP1 diff --git a/Runtime/MP1/World/CSpankWeed.hpp b/Runtime/MP1/World/CSpankWeed.hpp index 3c3ade4c3..13be1784e 100644 --- a/Runtime/MP1/World/CSpankWeed.hpp +++ b/Runtime/MP1/World/CSpankWeed.hpp @@ -30,23 +30,23 @@ public: CSpankWeed(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, CModelData&&, const CActorParameters&, const CPatternedInfo&, float, float, float, float); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); - zeus::CVector3f GetOrbitPosition(const CStateManager&) const; - zeus::CVector3f GetAimPosition(const CStateManager&, float) const; - bool AnimOver(CStateManager&, float) { return x5bc_ == 3; } - void Flinch(CStateManager&, EStateMsg, float); - bool Delay(CStateManager&, float); - bool InRange(CStateManager&, float); - bool HearPlayer(CStateManager&, float); - bool InDetectionRange(CStateManager&, float); - void Attack(CStateManager&, EStateMsg, float); - void TargetPatrol(CStateManager&, EStateMsg, float); - void Lurk(CStateManager&, EStateMsg, float); - void FadeOut(CStateManager&, EStateMsg, float); - void FadeIn(CStateManager&, EStateMsg, float); - void Patrol(CStateManager&, EStateMsg, float); + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; + zeus::CVector3f GetOrbitPosition(const CStateManager&) const override; + zeus::CVector3f GetAimPosition(const CStateManager&, float) const override; + bool AnimOver(CStateManager&, float) override { return x5bc_ == 3; } + void Flinch(CStateManager&, EStateMsg, float) override; + bool Delay(CStateManager&, float) override; + bool InRange(CStateManager&, float) override; + bool HearPlayer(CStateManager&, float) override; + bool InDetectionRange(CStateManager&, float) override; + void Attack(CStateManager&, EStateMsg, float) override; + void TargetPatrol(CStateManager&, EStateMsg, float) override; + void Lurk(CStateManager&, EStateMsg, float) override; + void FadeOut(CStateManager&, EStateMsg, float) override; + void FadeIn(CStateManager&, EStateMsg, float) override; + void Patrol(CStateManager&, EStateMsg, float) override; void KnockBack(const zeus::CVector3f&, CStateManager&, const CDamageInfo& info, EKnockBackType type, bool inDeferred, - float magnitude); + float magnitude) override; }; } // namespace urde::MP1 \ No newline at end of file diff --git a/Runtime/MP1/World/CTryclops.hpp b/Runtime/MP1/World/CTryclops.hpp index 422ee7b65..d831a49b9 100644 --- a/Runtime/MP1/World/CTryclops.hpp +++ b/Runtime/MP1/World/CTryclops.hpp @@ -38,9 +38,9 @@ public: CTryclops(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, CModelData&&, const CPatternedInfo&, const CActorParameters&, float, float, float, float); - void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); - void Think(float, CStateManager&); - const CDamageVulnerability* GetDamageVulnerability() const { + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; + void Think(float, CStateManager&) override; + const CDamageVulnerability* GetDamageVulnerability() const override { if (x698_26_) return CAi::GetDamageVulnerability(); @@ -48,44 +48,44 @@ public: } const CDamageVulnerability* GetDamageVulnerability(const zeus::CVector3f&, const zeus::CVector3f&, - const CDamageInfo&) const { + const CDamageInfo&) const override { if (x698_26_) return CAi::GetDamageVulnerability(); return &skVulnerabilities; } - void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float); - void Death(CStateManager&, const zeus::CVector3f&, EScriptObjectState); - bool IsListening() const { return true; } - void Patrol(CStateManager&, EStateMsg, float); - void PathFind(CStateManager&, EStateMsg, float); - void SelectTarget(CStateManager&, EStateMsg, float); - void TargetPatrol(CStateManager&, EStateMsg, float); - void TargetPlayer(CStateManager&, EStateMsg, float); - void TargetCover(CStateManager&, EStateMsg, float); - void Attack(CStateManager&, EStateMsg, float); - void JumpBack(CStateManager&, EStateMsg, float); - void Shuffle(CStateManager&, EStateMsg, float); - void TurnAround(CStateManager&, EStateMsg, float); - void Crouch(CStateManager&, EStateMsg, float); - void GetUp(CStateManager&, EStateMsg, float); - void Suck(CStateManager&, EStateMsg, float); - void Cover(CStateManager&, EStateMsg, float); - void Approach(CStateManager&, EStateMsg, float); - void PathFindEx(CStateManager&, EStateMsg, float); - void Dizzy(CStateManager&, EStateMsg, float); - bool InAttackPosition(CStateManager&, float); - bool InRange(CStateManager&, float); - bool InMaxRange(CStateManager&, float); - bool InDetectionRange(CStateManager&, float); - bool SpotPlayer(CStateManager&, float); - bool InPosition(CStateManager&, float); - bool HearShot(CStateManager&, float); - bool CoverBlown(CStateManager&, float); - bool Inside(CStateManager&, float); - bool ShouldRetreat(CStateManager&, float); - bool IsDizzy(CStateManager&, float); - CPathFindSearch* GetSearchPath() { return &x568_pathFindSearch; } + void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float) override; + void Death(CStateManager&, const zeus::CVector3f&, EScriptObjectState) override; + bool IsListening() const override { return true; } + void Patrol(CStateManager&, EStateMsg, float) override; + void PathFind(CStateManager&, EStateMsg, float) override; + void SelectTarget(CStateManager&, EStateMsg, float) override; + void TargetPatrol(CStateManager&, EStateMsg, float) override; + void TargetPlayer(CStateManager&, EStateMsg, float) override; + void TargetCover(CStateManager&, EStateMsg, float) override; + void Attack(CStateManager&, EStateMsg, float) override; + void JumpBack(CStateManager&, EStateMsg, float) override; + void Shuffle(CStateManager&, EStateMsg, float) override; + void TurnAround(CStateManager&, EStateMsg, float) override; + void Crouch(CStateManager&, EStateMsg, float) override; + void GetUp(CStateManager&, EStateMsg, float) override; + void Suck(CStateManager&, EStateMsg, float) override; + void Cover(CStateManager&, EStateMsg, float) override; + void Approach(CStateManager&, EStateMsg, float) override; + void PathFindEx(CStateManager&, EStateMsg, float) override; + void Dizzy(CStateManager&, EStateMsg, float) override; + bool InAttackPosition(CStateManager&, float) override; + bool InRange(CStateManager&, float) override; + bool InMaxRange(CStateManager&, float) override; + bool InDetectionRange(CStateManager&, float) override; + bool SpotPlayer(CStateManager&, float) override; + bool InPosition(CStateManager&, float) override; + bool HearShot(CStateManager&, float) override; + bool CoverBlown(CStateManager&, float) override; + bool Inside(CStateManager&, float) override; + bool ShouldRetreat(CStateManager&, float) override; + bool IsDizzy(CStateManager&, float) override; + CPathFindSearch* GetSearchPath() override { return &x568_pathFindSearch; } }; } // namespace urde::MP1 diff --git a/Runtime/MP1/World/CWarWasp.hpp b/Runtime/MP1/World/CWarWasp.hpp index fb5424f3d..ca2e5e1d5 100644 --- a/Runtime/MP1/World/CWarWasp.hpp +++ b/Runtime/MP1/World/CWarWasp.hpp @@ -75,48 +75,49 @@ public: const CDamageInfo& dInfo1, const CActorParameters&, CAssetId projectileWeapon, const CDamageInfo& projectileDamage, CAssetId projectileVisorParticle, u32 projecileVisorSfx); - void Accept(IVisitor& visitor); - void Think(float dt, CStateManager& mgr); - void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr); + void Accept(IVisitor& visitor) override; + void Think(float dt, CStateManager& mgr) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr) override; - std::optional GetTouchBounds() const; - void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt); - const CCollisionPrimitive* GetCollisionPrimitive() const; - void Death(CStateManager& mgr, const zeus::CVector3f& direction, EScriptObjectState state); - bool IsListening() const; - bool Listen(const zeus::CVector3f&, EListenNoiseType); - zeus::CVector3f GetOrigin(const CStateManager& mgr, const CTeamAiRole& role, const zeus::CVector3f& aimPos) const; + std::optional GetTouchBounds() const override; + void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt) override; + const CCollisionPrimitive* GetCollisionPrimitive() const override; + void Death(CStateManager& mgr, const zeus::CVector3f& direction, EScriptObjectState state) override; + bool IsListening() const override; + bool Listen(const zeus::CVector3f&, EListenNoiseType) override; + zeus::CVector3f GetOrigin(const CStateManager& mgr, const CTeamAiRole& role, + const zeus::CVector3f& aimPos) const override; void UpdateTouchBounds(); bool IsRetreating() const { return x72e_30_isRetreating; } - void Patrol(CStateManager&, EStateMsg, float); - void PathFind(CStateManager& mgr, EStateMsg msg, float dt); - void TargetPatrol(CStateManager&, EStateMsg, float); - void Generate(CStateManager&, EStateMsg, float); - void Deactivate(CStateManager&, EStateMsg, float); - void Attack(CStateManager&, EStateMsg, float); - void JumpBack(CStateManager&, EStateMsg, float); - void Shuffle(CStateManager&, EStateMsg, float); - void ProjectileAttack(CStateManager&, EStateMsg, float); - void TelegraphAttack(CStateManager&, EStateMsg, float); - void Dodge(CStateManager&, EStateMsg, float); - void Retreat(CStateManager&, EStateMsg, float); - void SpecialAttack(CStateManager&, EStateMsg, float); + void Patrol(CStateManager&, EStateMsg, float) override; + void PathFind(CStateManager& mgr, EStateMsg msg, float dt) override; + void TargetPatrol(CStateManager&, EStateMsg, float) override; + void Generate(CStateManager&, EStateMsg, float) override; + void Deactivate(CStateManager&, EStateMsg, float) override; + void Attack(CStateManager&, EStateMsg, float) override; + void JumpBack(CStateManager&, EStateMsg, float) override; + void Shuffle(CStateManager&, EStateMsg, float) override; + void ProjectileAttack(CStateManager&, EStateMsg, float) override; + void TelegraphAttack(CStateManager&, EStateMsg, float) override; + void Dodge(CStateManager&, EStateMsg, float) override; + void Retreat(CStateManager&, EStateMsg, float) override; + void SpecialAttack(CStateManager&, EStateMsg, float) override; - bool InAttackPosition(CStateManager&, float); - bool Leash(CStateManager&, float); - bool PathShagged(CStateManager&, float); - bool AnimOver(CStateManager&, float); - bool ShouldAttack(CStateManager&, float); - bool InPosition(CStateManager&, float); - bool ShouldTurn(CStateManager&, float); - bool HearShot(CStateManager&, float); - bool ShouldFire(CStateManager&, float); - bool ShouldDodge(CStateManager&, float); - bool ShouldSpecialAttack(CStateManager&, float); + bool InAttackPosition(CStateManager&, float) override; + bool Leash(CStateManager&, float) override; + bool PathShagged(CStateManager&, float) override; + bool AnimOver(CStateManager&, float) override; + bool ShouldAttack(CStateManager&, float) override; + bool InPosition(CStateManager&, float) override; + bool ShouldTurn(CStateManager&, float) override; + bool HearShot(CStateManager&, float) override; + bool ShouldFire(CStateManager&, float) override; + bool ShouldDodge(CStateManager&, float) override; + bool ShouldSpecialAttack(CStateManager&, float) override; - CPathFindSearch* GetSearchPath(); - CProjectileInfo* GetProjectileInfo(); + CPathFindSearch* GetSearchPath() override; + CProjectileInfo* GetProjectileInfo() override; }; } // namespace MP1 } // namespace urde From 1d3e5cdb700b368fb4c2a1bc1cc1ed926c9bdbf0 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Fri, 9 Aug 2019 14:55:59 -0700 Subject: [PATCH 08/65] Implement Oculus loader --- DataSpec/SpecMP1.cpp | 40 ++++++++++++++++++++++++++++++++++ Runtime/World/ScriptLoader.cpp | 30 ++++++++++++++++++++++++- 2 files changed, 69 insertions(+), 1 deletion(-) diff --git a/DataSpec/SpecMP1.cpp b/DataSpec/SpecMP1.cpp index ef9ef3115..7359e835c 100644 --- a/DataSpec/SpecMP1.cpp +++ b/DataSpec/SpecMP1.cpp @@ -69,6 +69,7 @@ static const std::unordered_set IndividualOrigIDs = { struct OriginalIDs { static void Generate(PAKRouter& pakRouter, hecl::Database::Project& project) { + Log.report(logvisor::Level::Info, fmt("Generating Original ID mappings...")); std::unordered_set addedIDs; std::vector originalIDs; @@ -93,6 +94,7 @@ struct OriginalIDs { path.makeDirChain(false); athena::io::FileWriter fileW(path.getAbsolutePath()); yamlW.finish(&fileW); + Log.report(logvisor::Level::Info, fmt("Done")); } static void Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPath) { @@ -138,6 +140,7 @@ struct OriginalIDs { struct TextureCache { static void Generate(PAKRouter& pakRouter, hecl::Database::Project& project) { + Log.report(logvisor::Level::Info, fmt("Gathering Texture metadata (this can take up to 10 seconds)...")); std::unordered_map metaMap; pakRouter.enumerateResources([&](const DNAMP1::PAK::Entry* ent) { @@ -159,6 +162,36 @@ struct TextureCache { path.makeDirChain(false); athena::io::FileWriter fileW(path.getAbsolutePath()); yamlW.finish(&fileW); + Log.report(logvisor::Level::Info, fmt("Done...")); + } + + static void Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPath) { + hecl::Database::Project& project = inPath.getProject(); + athena::io::YAMLDocReader r; + athena::io::FileReader fr(inPath.getAbsolutePath()); + if (!fr.isOpen() || !r.parse(&fr)) + return; + + std::vector> metaPairs; + metaPairs.reserve(r.getRootNode()->m_mapChildren.size()); + for (const auto& node : r.getRootNode()->m_mapChildren) { + hecl::ProjectPath projectPath(project, node.first); + auto rec = r.enterSubRecord(node.first.c_str()); + TXTR::Meta meta; + meta.read(r); + metaPairs.push_back(std::make_pair(projectPath.hash().val32(), meta)); + } + + std::sort(metaPairs.begin(), metaPairs.end(), [](const auto& a, const auto& b) -> bool { + return a.first < b.first; + }); + + athena::io::FileWriter w(outPath.getAbsolutePath()); + w.writeUint32Big(metaPairs.size()); + for (const auto& pair : metaPairs) { + pair.first.write(w); + pair.second.write(w); + } } }; @@ -504,6 +537,8 @@ struct SpecMP1 : SpecBase { return true; else if (!strcmp(classType, "MP1OriginalIDs")) return true; + else if (!strcmp(classType, "MP1TextureCache")) + return true; return false; }); } @@ -657,6 +692,9 @@ struct SpecMP1 : SpecBase { } else if (!strcmp(className, "MP1OriginalIDs")) { resTag.type = SBIG('OIDS'); return true; + } else if (!strcmp(className, "MP1TextureCache")) { + resTag.type = SBIG('TMET'); + return true; } return false; @@ -947,6 +985,8 @@ struct SpecMP1 : SpecBase { DNAMP1::AFSM::Cook(in, out); } else if (!classStr.compare("MP1OriginalIDs")) { OriginalIDs::Cook(in, out); + } else if (!classStr.compare("MP1TextureCache")) { + TextureCache::Cook(in, out); } } progress(_SYS_STR("Done")); diff --git a/Runtime/World/ScriptLoader.cpp b/Runtime/World/ScriptLoader.cpp index 378b3cd05..3e5bfa9e8 100644 --- a/Runtime/World/ScriptLoader.cpp +++ b/Runtime/World/ScriptLoader.cpp @@ -2977,7 +2977,35 @@ CEntity* ScriptLoader::LoadActorContraption(CStateManager& mgr, CInputStream& in } CEntity* ScriptLoader::LoadOculus(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info) { - return nullptr; + if (!EnsurePropertyCount(propCount, 15, "Oculus")) + return nullptr; + + SScaledActorHead aHead = LoadScaledActorHead(in, mgr); + auto pair = CPatternedInfo::HasCorrectParameterCount(in); + if (!pair.first) + return nullptr; + CPatternedInfo pInfo(in, pair.second); + CActorParameters actParms = LoadActorParameters(in); + if (!pInfo.GetAnimationParameters().GetACSFile().IsValid()) + return nullptr; + + float f1 = in.readFloatBig(); + float f2 = in.readFloatBig(); + float f3 = in.readFloatBig(); + float f4 = in.readFloatBig(); + float f5 = in.readFloatBig(); + float f6 = in.readFloatBig(); + CDamageVulnerability dVuln(in); + float f7 = in.readFloatBig(); + CDamageInfo dInfo(in); + const CAnimationParameters animParms = pInfo.GetAnimationParameters(); + CModelData mData(CAnimRes(animParms.GetACSFile(), animParms.GetCharacter(), aHead.x40_scale, + animParms.GetInitialAnimation(), true)); + + return new MP1::CParasite( + mgr.AllocateUniqueId(), aHead.x0_name, CPatterned::EFlavorType::Zero, info, aHead.x10_transform, std::move(mData), + pInfo, EBodyType::WallWalker, 0.f, f1, f2, f3, f4, 0.2f, 0.4f, 0.f, 0.f, 0.f, 0.f, 0.f, 1.f, f7, 0.f, 0.f, f5, f6, + false, CWallWalker::EWalkerType::Oculus, dVuln, dInfo, -1, -1, -1, CAssetId(), CAssetId(), 0.f, actParms); } CEntity* ScriptLoader::LoadGeemer(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info) { From 1e625e09957d2e6678c764be61c699d0d11faa04 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Fri, 9 Aug 2019 15:07:52 -0700 Subject: [PATCH 09/65] Fix missed `override` declarations --- Runtime/Character/CAdditiveBodyState.hpp | 4 ++-- Runtime/MP1/World/CBloodFlower.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Runtime/Character/CAdditiveBodyState.hpp b/Runtime/Character/CAdditiveBodyState.hpp index 8a039b54b..1bdb65808 100644 --- a/Runtime/Character/CAdditiveBodyState.hpp +++ b/Runtime/Character/CAdditiveBodyState.hpp @@ -40,7 +40,7 @@ class CABSFlinch : public CAdditiveBodyState { pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); public: - void Start(CBodyController& bc, CStateManager& mgr); + void Start(CBodyController& bc, CStateManager& mgr) override; pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; void Shutdown(CBodyController& bc) override {} }; @@ -49,7 +49,7 @@ class CABSIdle : public CAdditiveBodyState { pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); public: - void Start(CBodyController& bc, CStateManager& mgr) {} + void Start(CBodyController& bc, CStateManager& mgr) override {} pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; void Shutdown(CBodyController& bc) override {} }; diff --git a/Runtime/MP1/World/CBloodFlower.hpp b/Runtime/MP1/World/CBloodFlower.hpp index 6a338a2db..297529284 100644 --- a/Runtime/MP1/World/CBloodFlower.hpp +++ b/Runtime/MP1/World/CBloodFlower.hpp @@ -50,7 +50,7 @@ public: void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; void Think(float dt, CStateManager& mgr) override; - void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt); + void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt) override; void Render(const CStateManager& mgr) const override; void Touch(CActor&, CStateManager&) override {} CProjectileInfo* GetProjectileInfo() override { return &x590_projectileInfo; } From a5a25161381c56b5d55f40c81ce9c1557eef3d64 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 9 Aug 2019 22:32:48 -0400 Subject: [PATCH 10/65] RetroDataSpec: Use override where applicable Continues the override modernizations, applying the keyword where applicable to the RetroDataSpec target. --- DataSpec/DNACommon/FONT.hpp | 30 +- DataSpec/DNACommon/MAPA.hpp | 24 +- DataSpec/DNACommon/PAK.hpp | 10 +- DataSpec/DNACommon/ParticleCommon.hpp | 184 ++++++------ DataSpec/DNACommon/STRG.hpp | 2 +- DataSpec/DNAMP1/ANCS.hpp | 26 +- DataSpec/DNAMP1/FRME.hpp | 52 ++-- DataSpec/DNAMP1/STRG.hpp | 12 +- DataSpec/DNAMP1/ScriptObjects/Actor.hpp | 11 +- .../DNAMP1/ScriptObjects/ActorContraption.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/AmbientAI.hpp | 9 +- .../DNAMP1/ScriptObjects/AreaAttributes.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/AtomicAlpha.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/AtomicBeta.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/Babygoth.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/Beetle.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/BloodFlower.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/Burrower.hpp | 9 +- .../ScriptObjects/CameraFilterKeyframe.hpp | 5 +- DataSpec/DNAMP1/ScriptObjects/ChozoGhost.hpp | 9 +- .../ScriptObjects/DamageableTrigger.hpp | 7 +- DataSpec/DNAMP1/ScriptObjects/Debris.hpp | 7 +- .../DNAMP1/ScriptObjects/DebrisExtended.hpp | 7 +- DataSpec/DNAMP1/ScriptObjects/DoorArea.hpp | 11 +- DataSpec/DNAMP1/ScriptObjects/Drone.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/Effect.hpp | 5 +- .../ScriptObjects/ElectroMagneticPulse.hpp | 5 +- DataSpec/DNAMP1/ScriptObjects/ElitePirate.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/EnergyBall.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/Eyeball.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/FireFlea.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/FishCloud.hpp | 5 +- DataSpec/DNAMP1/ScriptObjects/Flaahgra.hpp | 9 +- .../DNAMP1/ScriptObjects/FlaahgraTentacle.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/FlickerBat.hpp | 9 +- .../DNAMP1/ScriptObjects/FlyingPirate.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/Geemer.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/GunTurret.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/HUDMemo.hpp | 5 +- .../DNAMP1/ScriptObjects/IScriptObject.hpp | 2 +- DataSpec/DNAMP1/ScriptObjects/IceSheegoth.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/IceZoomer.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/JellyZap.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/Magdolite.hpp | 9 +- .../DNAMP1/ScriptObjects/MetareeAlpha.hpp | 9 +- .../DNAMP1/ScriptObjects/MetroidAlpha.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/MetroidBeta.hpp | 9 +- .../ScriptObjects/MetroidPrimeStage1.hpp | 9 +- .../ScriptObjects/MetroidPrimeStage2.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/Midi.hpp | 5 +- .../DNAMP1/ScriptObjects/NewIntroBoss.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/Oculus.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/OmegaPirate.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/Parasite.hpp | 9 +- .../ScriptObjects/PhazonHealingNodule.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/PhazonPool.hpp | 5 +- DataSpec/DNAMP1/ScriptObjects/Pickup.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/Platform.hpp | 11 +- DataSpec/DNAMP1/ScriptObjects/PlayerActor.hpp | 9 +- .../DNAMP1/ScriptObjects/PointOfInterest.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/PuddleSpore.hpp | 9 +- .../DNAMP1/ScriptObjects/PuddleToadGamma.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/Puffer.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/Ridley.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/Ripper.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/ScriptBeam.hpp | 5 +- DataSpec/DNAMP1/ScriptObjects/Seedling.hpp | 9 +- .../DNAMP1/ScriptObjects/SnakeWeedSwarm.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/SpacePirate.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/SpankWeed.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/Steam.hpp | 5 +- DataSpec/DNAMP1/ScriptObjects/Thardus.hpp | 9 +- .../ScriptObjects/ThardusRockProjectile.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/Trigger.hpp | 2 +- DataSpec/DNAMP1/ScriptObjects/Tryclops.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/VisorFlare.hpp | 5 +- DataSpec/DNAMP1/ScriptObjects/VisorGoo.hpp | 5 +- .../DNAMP1/ScriptObjects/WallCrawlerSwarm.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/Warwasp.hpp | 9 +- DataSpec/DNAMP1/ScriptObjects/Water.hpp | 7 +- .../DNAMP1/ScriptObjects/WorldTeleporter.hpp | 5 +- DataSpec/DNAMP1/Tweaks/CTweakAutoMapper.hpp | 110 ++++---- DataSpec/DNAMP1/Tweaks/CTweakBall.hpp | 126 +++++---- DataSpec/DNAMP1/Tweaks/CTweakGame.hpp | 36 +-- DataSpec/DNAMP1/Tweaks/CTweakGui.hpp | 230 +++++++-------- DataSpec/DNAMP1/Tweaks/CTweakGuiColors.hpp | 162 +++++------ DataSpec/DNAMP1/Tweaks/CTweakGunRes.hpp | 42 +-- DataSpec/DNAMP1/Tweaks/CTweakPlayer.hpp | 266 +++++++++--------- .../DNAMP1/Tweaks/CTweakPlayerControl.hpp | 2 +- DataSpec/DNAMP1/Tweaks/CTweakPlayerGun.hpp | 48 ++-- DataSpec/DNAMP1/Tweaks/CTweakPlayerRes.hpp | 40 +-- DataSpec/DNAMP1/Tweaks/CTweakSlideShow.hpp | 10 +- DataSpec/DNAMP1/Tweaks/CTweakTargeting.hpp | 176 ++++++------ DataSpec/DNAMP2/MREA.hpp | 8 +- DataSpec/DNAMP2/STRG.hpp | 10 +- DataSpec/DNAMP3/CHAR.hpp | 10 +- DataSpec/DNAMP3/CMDLMaterials.hpp | 6 +- DataSpec/DNAMP3/STRG.hpp | 10 +- DataSpec/SpecMP1.cpp | 61 ++-- DataSpec/SpecMP2.cpp | 50 ++-- DataSpec/SpecMP3.cpp | 50 ++-- 101 files changed, 1230 insertions(+), 1150 deletions(-) diff --git a/DataSpec/DNACommon/FONT.hpp b/DataSpec/DNACommon/FONT.hpp index ddc84bcbf..5ae523942 100644 --- a/DataSpec/DNACommon/FONT.hpp +++ b/DataSpec/DNACommon/FONT.hpp @@ -44,13 +44,13 @@ struct GlyphMP1 : IGlyph { Value m_baseline; Value m_kerningIndex; - atInt32 leftPadding() const { return m_leftPadding; } - atInt32 advance() const { return m_advance; } - atInt32 rightPadding() const { return m_rightPadding; } - atInt32 width() const { return m_width; } - atInt32 height() const { return m_height; } - atInt32 baseline() const { return m_baseline; } - atInt32 kerningIndex() const { return m_kerningIndex; } + atInt32 leftPadding() const override { return m_leftPadding; } + atInt32 advance() const override { return m_advance; } + atInt32 rightPadding() const override { return m_rightPadding; } + atInt32 width() const override { return m_width; } + atInt32 height() const override { return m_height; } + atInt32 baseline() const override { return m_baseline; } + atInt32 kerningIndex() const override { return m_kerningIndex; } }; struct GlyphMP2 : IGlyph { @@ -65,14 +65,14 @@ struct GlyphMP2 : IGlyph { Value m_baseline; Value m_kerningIndex; - atInt32 layer() const { return m_layer; } - atInt32 leftPadding() const { return m_leftPadding; } - atInt32 advance() const { return m_advance; } - atInt32 rightPadding() const { return m_rightPadding; } - atInt32 width() const { return m_width; } - atInt32 height() const { return m_height; } - atInt32 baseline() const { return m_baseline; } - atInt32 kerningIndex() const { return m_kerningIndex; } + atInt32 layer() const override { return m_layer; } + atInt32 leftPadding() const override { return m_leftPadding; } + atInt32 advance() const override { return m_advance; } + atInt32 rightPadding() const override { return m_rightPadding; } + atInt32 width() const override { return m_width; } + atInt32 height() const override { return m_height; } + atInt32 baseline() const override { return m_baseline; } + atInt32 kerningIndex() const override { return m_kerningIndex; } }; struct KerningInfo : BigDNA { diff --git a/DataSpec/DNACommon/MAPA.hpp b/DataSpec/DNACommon/MAPA.hpp index 59d045a40..064f57eeb 100644 --- a/DataSpec/DNACommon/MAPA.hpp +++ b/DataSpec/DNACommon/MAPA.hpp @@ -25,10 +25,10 @@ struct MAPA : BigDNA { Value moCount = 0; Value vtxCount = 0; Value surfCount = 0; - atUint32 visMode() const { return mapVisMode; } - atUint32 mappableObjectCount() const { return moCount; } - atUint32 vertexCount() const { return vtxCount; } - atUint32 surfaceCount() const { return surfCount; } + atUint32 visMode() const override { return mapVisMode; } + atUint32 mappableObjectCount() const override { return moCount; } + atUint32 vertexCount() const override { return vtxCount; } + atUint32 surfaceCount() const override { return surfCount; } }; struct HeaderMP2 : IMAPAHeader { @@ -43,10 +43,10 @@ struct MAPA : BigDNA { Value moCount = 0; Value vtxCount = 0; Value surfCount = 0; - atUint32 visMode() const { return mapVisMode; } - atUint32 mappableObjectCount() const { return moCount; } - atUint32 vertexCount() const { return vtxCount; } - atUint32 surfaceCount() const { return surfCount; } + atUint32 visMode() const override { return mapVisMode; } + atUint32 mappableObjectCount() const override { return moCount; } + atUint32 vertexCount() const override { return vtxCount; } + atUint32 surfaceCount() const override { return surfCount; } }; struct HeaderMP3 : IMAPAHeader { @@ -65,10 +65,10 @@ struct MAPA : BigDNA { Value internalNameLength = 0; Value unknown7 = 0; String internalName; - atUint32 visMode() const { return mapVisMode; } - atUint32 mappableObjectCount() const { return moCount; } - atUint32 vertexCount() const { return vtxCount; } - atUint32 surfaceCount() const { return surfCount; } + atUint32 visMode() const override { return mapVisMode; } + atUint32 mappableObjectCount() const override { return moCount; } + atUint32 vertexCount() const override { return vtxCount; } + atUint32 surfaceCount() const override { return surfCount; } }; std::unique_ptr header; diff --git a/DataSpec/DNACommon/PAK.hpp b/DataSpec/DNACommon/PAK.hpp index fcc95ee98..2b27f1b98 100644 --- a/DataSpec/DNACommon/PAK.hpp +++ b/DataSpec/DNACommon/PAK.hpp @@ -25,7 +25,7 @@ public: if (m_pos >= m_sz) LogDNACommon.report(logvisor::Fatal, fmt("PAK stream cursor overrun")); } - void seek(atInt64 pos, athena::SeekOrigin origin) { + void seek(atInt64 pos, athena::SeekOrigin origin) override { if (origin == athena::Begin) m_pos = pos; else if (origin == athena::Current) @@ -35,10 +35,10 @@ public: if (m_pos > m_sz) LogDNACommon.report(logvisor::Fatal, fmt("PAK stream cursor overrun")); } - atUint64 position() const { return m_pos; } - atUint64 length() const { return m_sz; } + atUint64 position() const override { return m_pos; } + atUint64 length() const override { return m_sz; } const atUint8* data() const { return m_buf.get(); } - atUint64 readUBytesToBuf(void* buf, atUint64 len) { + atUint64 readUBytesToBuf(void* buf, atUint64 len) override { atUint64 bufEnd = m_pos + len; if (bufEnd > m_sz) len -= bufEnd - m_sz; @@ -172,7 +172,7 @@ public: using PAKRouterBase::getWorking; hecl::ProjectPath getWorking(const EntryType* entry, const ResExtractor& extractor) const; hecl::ProjectPath getWorking(const EntryType* entry) const; - hecl::ProjectPath getWorking(const IDType& id, bool silenceWarnings = false) const; + hecl::ProjectPath getWorking(const IDType& id, bool silenceWarnings = false) const override; hecl::ProjectPath getCooked(const EntryType* entry) const; hecl::ProjectPath getCooked(const IDType& id, bool silenceWarnings = false) const; diff --git a/DataSpec/DNACommon/ParticleCommon.hpp b/DataSpec/DNACommon/ParticleCommon.hpp index e7469d196..668fa1192 100644 --- a/DataSpec/DNACommon/ParticleCommon.hpp +++ b/DataSpec/DNACommon/ParticleCommon.hpp @@ -7,9 +7,9 @@ extern logvisor::Module LogModule; struct IElement : BigDNAVYaml { Delete _d; - virtual ~IElement() = default; + ~IElement() override = default; virtual const char* ClassID() const = 0; - const char* DNATypeV() const { return ClassID(); } + const char* DNATypeV() const override { return ClassID(); } }; struct IRealElement : IElement { @@ -79,20 +79,20 @@ struct BoolHelper : IElement { value = val; return *this; } - const char* ClassID() const { return "BoolHelper"; } + const char* ClassID() const override { return "BoolHelper"; } }; struct RELifetimeTween : IRealElement { AT_DECL_DNA_YAML RealElementFactory a; RealElementFactory b; - const char* ClassID() const { return "LFTW"; } + const char* ClassID() const override { return "LFTW"; } }; struct REConstant : IRealElement { AT_DECL_EXPLICIT_DNA_YAML Value val; - const char* ClassID() const { return "CNST"; } + const char* ClassID() const override { return "CNST"; } }; struct RETimeChain : IRealElement { @@ -100,14 +100,14 @@ struct RETimeChain : IRealElement { RealElementFactory a; RealElementFactory b; IntElementFactory thresholdFrame; - const char* ClassID() const { return "CHAN"; } + const char* ClassID() const override { return "CHAN"; } }; struct REAdd : IRealElement { AT_DECL_DNA_YAML RealElementFactory a; RealElementFactory b; - const char* ClassID() const { return "ADD_"; } + const char* ClassID() const override { return "ADD_"; } }; struct REClamp : IRealElement { @@ -115,7 +115,7 @@ struct REClamp : IRealElement { RealElementFactory min; RealElementFactory max; RealElementFactory val; - const char* ClassID() const { return "CLMP"; } + const char* ClassID() const override { return "CLMP"; } }; struct REKeyframeEmitter : IRealElement { @@ -128,28 +128,28 @@ struct REKeyframeEmitter : IRealElement { Value loopStart; Value count; Vector keys; - const char* ClassID() const { return percentageTween ? "KEYP" : "KEYE"; } + const char* ClassID() const override { return percentageTween ? "KEYP" : "KEYE"; } }; struct REInitialRandom : IRealElement { AT_DECL_DNA_YAML RealElementFactory a; RealElementFactory b; - const char* ClassID() const { return "IRND"; } + const char* ClassID() const override { return "IRND"; } }; struct RERandom : IRealElement { AT_DECL_DNA_YAML RealElementFactory a; RealElementFactory b; - const char* ClassID() const { return "RAND"; } + const char* ClassID() const override { return "RAND"; } }; struct REMultiply : IRealElement { AT_DECL_DNA_YAML RealElementFactory a; RealElementFactory b; - const char* ClassID() const { return "MULT"; } + const char* ClassID() const override { return "MULT"; } }; struct REPulse : IRealElement { @@ -158,19 +158,19 @@ struct REPulse : IRealElement { IntElementFactory bDuration; RealElementFactory a; RealElementFactory b; - const char* ClassID() const { return "PULS"; } + const char* ClassID() const override { return "PULS"; } }; struct RETimeScale : IRealElement { AT_DECL_DNA_YAML RealElementFactory dv; - const char* ClassID() const { return "SCAL"; } + const char* ClassID() const override { return "SCAL"; } }; struct RELifetimePercent : IRealElement { AT_DECL_DNA_YAML RealElementFactory percent; - const char* ClassID() const { return "RLPT"; } + const char* ClassID() const override { return "RLPT"; } }; struct RESineWave : IRealElement { @@ -178,14 +178,14 @@ struct RESineWave : IRealElement { RealElementFactory frequency; RealElementFactory amplitude; RealElementFactory phase; - const char* ClassID() const { return "SINE"; } + const char* ClassID() const override { return "SINE"; } }; struct REInitialSwitch : IRealElement { AT_DECL_DNA_YAML RealElementFactory a; RealElementFactory b; - const char* ClassID() const { return "ISWT"; } + const char* ClassID() const override { return "ISWT"; } }; struct RECompareLessThan : IRealElement { @@ -194,7 +194,7 @@ struct RECompareLessThan : IRealElement { RealElementFactory cb; RealElementFactory pass; RealElementFactory fail; - const char* ClassID() const { return "CLTN"; } + const char* ClassID() const override { return "CLTN"; } }; struct RECompareEquals : IRealElement { @@ -203,101 +203,101 @@ struct RECompareEquals : IRealElement { RealElementFactory cb; RealElementFactory pass; RealElementFactory fail; - const char* ClassID() const { return "CEQL"; } + const char* ClassID() const override { return "CEQL"; } }; struct REParticleAdvanceParam1 : IRealElement { AT_DECL_DNA_YAML - const char* ClassID() const { return "PAP1"; } + const char* ClassID() const override { return "PAP1"; } }; struct REParticleAdvanceParam2 : IRealElement { AT_DECL_DNA_YAML - const char* ClassID() const { return "PAP2"; } + const char* ClassID() const override { return "PAP2"; } }; struct REParticleAdvanceParam3 : IRealElement { AT_DECL_DNA_YAML - const char* ClassID() const { return "PAP3"; } + const char* ClassID() const override { return "PAP3"; } }; struct REParticleAdvanceParam4 : IRealElement { AT_DECL_DNA_YAML - const char* ClassID() const { return "PAP4"; } + const char* ClassID() const override { return "PAP4"; } }; struct REParticleAdvanceParam5 : IRealElement { AT_DECL_DNA_YAML - const char* ClassID() const { return "PAP5"; } + const char* ClassID() const override { return "PAP5"; } }; struct REParticleAdvanceParam6 : IRealElement { AT_DECL_DNA_YAML - const char* ClassID() const { return "PAP6"; } + const char* ClassID() const override { return "PAP6"; } }; struct REParticleAdvanceParam7 : IRealElement { AT_DECL_DNA_YAML - const char* ClassID() const { return "PAP7"; } + const char* ClassID() const override { return "PAP7"; } }; struct REParticleAdvanceParam8 : IRealElement { AT_DECL_DNA_YAML - const char* ClassID() const { return "PAP8"; } + const char* ClassID() const override { return "PAP8"; } }; struct REParticleSizeOrLineLength : IRealElement { AT_DECL_DNA_YAML - const char* ClassID() const { return "PSLL"; } + const char* ClassID() const override { return "PSLL"; } }; struct REParticleRotationOrLineWidth : IRealElement { AT_DECL_DNA_YAML - const char* ClassID() const { return "PRLW"; } + const char* ClassID() const override { return "PRLW"; } }; struct RESubtract : IRealElement { AT_DECL_DNA_YAML RealElementFactory a; RealElementFactory b; - const char* ClassID() const { return "SUB_"; } + const char* ClassID() const override { return "SUB_"; } }; struct REVectorMagnitude : IRealElement { AT_DECL_DNA_YAML VectorElementFactory vec; - const char* ClassID() const { return "VMAG"; } + const char* ClassID() const override { return "VMAG"; } }; struct REVectorXToReal : IRealElement { AT_DECL_DNA_YAML VectorElementFactory vec; - const char* ClassID() const { return "VXTR"; } + const char* ClassID() const override { return "VXTR"; } }; struct REVectorYToReal : IRealElement { AT_DECL_DNA_YAML VectorElementFactory vec; - const char* ClassID() const { return "VYTR"; } + const char* ClassID() const override { return "VYTR"; } }; struct REVectorZToReal : IRealElement { AT_DECL_DNA_YAML VectorElementFactory vec; - const char* ClassID() const { return "VZTR"; } + const char* ClassID() const override { return "VZTR"; } }; struct RECEXT : IRealElement { AT_DECL_DNA_YAML IntElementFactory index; - const char* ClassID() const { return "CEXT"; } + const char* ClassID() const override { return "CEXT"; } }; struct REIntTimesReal : IRealElement { AT_DECL_DNA_YAML IntElementFactory a; RealElementFactory b; - const char* ClassID() const { return "ITRL"; } + const char* ClassID() const override { return "ITRL"; } }; struct IEKeyframeEmitter : IIntElement { @@ -310,14 +310,14 @@ struct IEKeyframeEmitter : IIntElement { Value loopStart; Value count; Vector keys; - const char* ClassID() const { return percentageTween ? "KEYP" : "KEYE"; } + const char* ClassID() const override { return percentageTween ? "KEYP" : "KEYE"; } }; struct IEDeath : IIntElement { AT_DECL_DNA_YAML IntElementFactory passthrough; IntElementFactory thresholdFrame; - const char* ClassID() const { return "DETH"; } + const char* ClassID() const override { return "DETH"; } }; struct IEClamp : IIntElement { @@ -325,7 +325,7 @@ struct IEClamp : IIntElement { IntElementFactory min; IntElementFactory max; IntElementFactory val; - const char* ClassID() const { return "CLMP"; } + const char* ClassID() const override { return "CLMP"; } }; struct IETimeChain : IIntElement { @@ -333,39 +333,39 @@ struct IETimeChain : IIntElement { IntElementFactory a; IntElementFactory b; IntElementFactory thresholdFrame; - const char* ClassID() const { return "CHAN"; } + const char* ClassID() const override { return "CHAN"; } }; struct IEAdd : IIntElement { AT_DECL_DNA_YAML IntElementFactory a; IntElementFactory b; - const char* ClassID() const { return "ADD_"; } + const char* ClassID() const override { return "ADD_"; } }; struct IEConstant : IIntElement { AT_DECL_EXPLICIT_DNA_YAML Value val; - const char* ClassID() const { return "CNST"; } + const char* ClassID() const override { return "CNST"; } }; struct IEImpulse : IIntElement { AT_DECL_DNA_YAML IntElementFactory val; - const char* ClassID() const { return "IMPL"; } + const char* ClassID() const override { return "IMPL"; } }; struct IELifetimePercent : IIntElement { AT_DECL_DNA_YAML IntElementFactory percent; - const char* ClassID() const { return "ILPT"; } + const char* ClassID() const override { return "ILPT"; } }; struct IEInitialRandom : IIntElement { AT_DECL_DNA_YAML IntElementFactory a; IntElementFactory b; - const char* ClassID() const { return "IRND"; } + const char* ClassID() const override { return "IRND"; } }; struct IEPulse : IIntElement { @@ -374,14 +374,14 @@ struct IEPulse : IIntElement { IntElementFactory bDuration; IntElementFactory a; IntElementFactory b; - const char* ClassID() const { return "PULS"; } + const char* ClassID() const override { return "PULS"; } }; struct IEMultiply : IIntElement { AT_DECL_DNA_YAML IntElementFactory a; IntElementFactory b; - const char* ClassID() const { return "MULT"; } + const char* ClassID() const override { return "MULT"; } }; struct IESampleAndHold : IIntElement { @@ -389,46 +389,46 @@ struct IESampleAndHold : IIntElement { IntElementFactory val; IntElementFactory waitMin; IntElementFactory waitMax; - const char* ClassID() const { return "SPAH"; } + const char* ClassID() const override { return "SPAH"; } }; struct IERandom : IIntElement { AT_DECL_DNA_YAML IntElementFactory a; IntElementFactory b; - const char* ClassID() const { return "RAND"; } + const char* ClassID() const override { return "RAND"; } }; struct IETimeScale : IIntElement { AT_DECL_DNA_YAML RealElementFactory dv; - const char* ClassID() const { return "TSCL"; } + const char* ClassID() const override { return "TSCL"; } }; struct IEGTCP : IIntElement { AT_DECL_DNA_YAML - const char* ClassID() const { return "GTCP"; } + const char* ClassID() const override { return "GTCP"; } }; struct IEModulo : IIntElement { AT_DECL_DNA_YAML IntElementFactory a; IntElementFactory b; - const char* ClassID() const { return "MODU"; } + const char* ClassID() const override { return "MODU"; } }; struct IESubtract : IIntElement { AT_DECL_DNA_YAML IntElementFactory direction; IntElementFactory baseRadius; - const char* ClassID() const { return "SUB_"; } + const char* ClassID() const override { return "SUB_"; } }; struct VECone : IVectorElement { AT_DECL_DNA_YAML VectorElementFactory a; RealElementFactory b; - const char* ClassID() const { return "CONE"; } + const char* ClassID() const override { return "CONE"; } }; struct VETimeChain : IVectorElement { @@ -436,7 +436,7 @@ struct VETimeChain : IVectorElement { VectorElementFactory a; VectorElementFactory b; IntElementFactory thresholdFrame; - const char* ClassID() const { return "CHAN"; } + const char* ClassID() const override { return "CHAN"; } }; struct VEAngleCone : IVectorElement { @@ -446,14 +446,14 @@ struct VEAngleCone : IVectorElement { RealElementFactory angleXRange; RealElementFactory angleYRange; RealElementFactory magnitude; - const char* ClassID() const { return "ANGC"; } + const char* ClassID() const override { return "ANGC"; } }; struct VEAdd : IVectorElement { AT_DECL_DNA_YAML VectorElementFactory a; VectorElementFactory b; - const char* ClassID() const { return "ADD_"; } + const char* ClassID() const override { return "ADD_"; } }; struct VECircleCluster : IVectorElement { @@ -462,13 +462,13 @@ struct VECircleCluster : IVectorElement { VectorElementFactory circleNormal; IntElementFactory cycleFrames; RealElementFactory randomFactor; - const char* ClassID() const { return "CCLU"; } + const char* ClassID() const override { return "CCLU"; } }; struct VEConstant : IVectorElement { AT_DECL_EXPLICIT_DNA_YAML RealElementFactory comps[3]; - const char* ClassID() const { return "CNST"; } + const char* ClassID() const override { return "CNST"; } }; struct VECircle : IVectorElement { @@ -478,7 +478,7 @@ struct VECircle : IVectorElement { RealElementFactory angleConstant; RealElementFactory angleLinear; RealElementFactory circleRadius; - const char* ClassID() const { return "CIRC"; } + const char* ClassID() const override { return "CIRC"; } }; struct VEKeyframeEmitter : IVectorElement { @@ -491,20 +491,20 @@ struct VEKeyframeEmitter : IVectorElement { Value loopStart; Value count; Vector keys; - const char* ClassID() const { return percentageTween ? "KEYP" : "KEYE"; } + const char* ClassID() const override { return percentageTween ? "KEYP" : "KEYE"; } }; struct VEMultiply : IVectorElement { AT_DECL_DNA_YAML VectorElementFactory a; VectorElementFactory b; - const char* ClassID() const { return "MULT"; } + const char* ClassID() const override { return "MULT"; } }; struct VERealToVector : IVectorElement { AT_DECL_DNA_YAML RealElementFactory a; - const char* ClassID() const { return "RTOV"; } + const char* ClassID() const override { return "RTOV"; } }; struct VEPulse : IVectorElement { @@ -513,23 +513,23 @@ struct VEPulse : IVectorElement { IntElementFactory bDuration; VectorElementFactory a; VectorElementFactory b; - const char* ClassID() const { return "PULS"; } + const char* ClassID() const override { return "PULS"; } }; struct VEParticleVelocity : IVectorElement { AT_DECL_DNA_YAML - const char* ClassID() const { return "PVEL"; } + const char* ClassID() const override { return "PVEL"; } }; struct VESPOS : IVectorElement { AT_DECL_DNA_YAML VectorElementFactory a; - const char* ClassID() const { return "SPOS"; } + const char* ClassID() const override { return "SPOS"; } }; struct VEPLCO : IVectorElement { AT_DECL_DNA_YAML - const char* ClassID() const { return "PLCO"; } + const char* ClassID() const override { return "PLCO"; } }; struct VEPLOC : IVectorElement { @@ -539,12 +539,12 @@ struct VEPLOC : IVectorElement { struct VEPSOR : IVectorElement { AT_DECL_DNA_YAML - const char* ClassID() const { return "PSOR"; } + const char* ClassID() const override { return "PSOR"; } }; struct VEPSOF : IVectorElement { AT_DECL_DNA_YAML - const char* ClassID() const { return "PSOF"; } + const char* ClassID() const override { return "PSOF"; } }; struct CEKeyframeEmitter : IColorElement { @@ -557,13 +557,13 @@ struct CEKeyframeEmitter : IColorElement { Value loopStart; Value count; Vector keys; - const char* ClassID() const { return percentageTween ? "KEYP" : "KEYE"; } + const char* ClassID() const override { return percentageTween ? "KEYP" : "KEYE"; } }; struct CEConstant : IColorElement { AT_DECL_EXPLICIT_DNA_YAML RealElementFactory comps[4]; - const char* ClassID() const { return "CNST"; } + const char* ClassID() const override { return "CNST"; } }; struct CETimeChain : IColorElement { @@ -571,7 +571,7 @@ struct CETimeChain : IColorElement { ColorElementFactory a; ColorElementFactory b; IntElementFactory thresholdFrame; - const char* ClassID() const { return "CHAN"; } + const char* ClassID() const override { return "CHAN"; } }; struct CEFadeEnd : IColorElement { @@ -580,7 +580,7 @@ struct CEFadeEnd : IColorElement { ColorElementFactory b; RealElementFactory startFrame; RealElementFactory endFrame; - const char* ClassID() const { return "CFDE"; } + const char* ClassID() const override { return "CFDE"; } }; struct CEFade : IColorElement { @@ -588,7 +588,7 @@ struct CEFade : IColorElement { ColorElementFactory a; ColorElementFactory b; RealElementFactory endFrame; - const char* ClassID() const { return "FADE"; } + const char* ClassID() const override { return "FADE"; } }; struct CEPulse : IColorElement { @@ -597,7 +597,7 @@ struct CEPulse : IColorElement { IntElementFactory bDuration; ColorElementFactory a; ColorElementFactory b; - const char* ClassID() const { return "PULS"; } + const char* ClassID() const override { return "PULS"; } }; struct MVEImplosion : IModVectorElement { @@ -607,7 +607,7 @@ struct MVEImplosion : IModVectorElement { RealElementFactory maxRadius; RealElementFactory minRadius; BoolHelper enableMinRadius; - const char* ClassID() const { return "IMPL"; } + const char* ClassID() const override { return "IMPL"; } }; struct MVEExponentialImplosion : IModVectorElement { @@ -617,7 +617,7 @@ struct MVEExponentialImplosion : IModVectorElement { RealElementFactory maxRadius; RealElementFactory minRadius; BoolHelper enableMinRadius; - const char* ClassID() const { return "EMPL"; } + const char* ClassID() const override { return "EMPL"; } }; struct MVETimeChain : IModVectorElement { @@ -625,7 +625,7 @@ struct MVETimeChain : IModVectorElement { ModVectorElementFactory a; ModVectorElementFactory b; IntElementFactory thresholdFrame; - const char* ClassID() const { return "CHAN"; } + const char* ClassID() const override { return "CHAN"; } }; struct MVEBounce : IModVectorElement { @@ -635,13 +635,13 @@ struct MVEBounce : IModVectorElement { RealElementFactory friction; RealElementFactory restitution; BoolHelper dieOnPenetrate; - const char* ClassID() const { return "BNCE"; } + const char* ClassID() const override { return "BNCE"; } }; struct MVEConstant : IModVectorElement { AT_DECL_EXPLICIT_DNA_YAML RealElementFactory comps[3]; - const char* ClassID() const { return "CNST"; } + const char* ClassID() const override { return "CNST"; } }; struct MVEGravity : IModVectorElement { @@ -654,13 +654,13 @@ struct MVEExplode : IModVectorElement { AT_DECL_DNA_YAML RealElementFactory impulseMagnitude; RealElementFactory falloffFactor; - const char* ClassID() const { return "EXPL"; } + const char* ClassID() const override { return "EXPL"; } }; struct MVESetPosition : IModVectorElement { AT_DECL_DNA_YAML VectorElementFactory position; - const char* ClassID() const { return "SPOS"; } + const char* ClassID() const override { return "SPOS"; } }; struct MVELinearImplosion : IModVectorElement { @@ -670,7 +670,7 @@ struct MVELinearImplosion : IModVectorElement { RealElementFactory maxRadius; RealElementFactory minRadius; BoolHelper enableMinRadius; - const char* ClassID() const { return "LMPL"; } + const char* ClassID() const override { return "LMPL"; } }; struct MVEPulse : IModVectorElement { @@ -679,14 +679,14 @@ struct MVEPulse : IModVectorElement { IntElementFactory bDuration; ModVectorElementFactory a; ModVectorElementFactory b; - const char* ClassID() const { return "PULS"; } + const char* ClassID() const override { return "PULS"; } }; struct MVEWind : IModVectorElement { AT_DECL_DNA_YAML VectorElementFactory windVelocity; RealElementFactory factor; - const char* ClassID() const { return "WIND"; } + const char* ClassID() const override { return "WIND"; } }; struct MVESwirl : IModVectorElement { @@ -695,14 +695,14 @@ struct MVESwirl : IModVectorElement { VectorElementFactory curveBinormal; RealElementFactory filterGain; RealElementFactory tangentialVelocity; - const char* ClassID() const { return "SWRL"; } + const char* ClassID() const override { return "SWRL"; } }; struct EESimpleEmitter : IEmitterElement { AT_DECL_DNA_YAML VectorElementFactory position; VectorElementFactory velocity; - const char* ClassID() const { return "SEMR"; } + const char* ClassID() const override { return "SEMR"; } }; struct VESphere : IEmitterElement { @@ -710,7 +710,7 @@ struct VESphere : IEmitterElement { VectorElementFactory sphereOrigin; RealElementFactory sphereRadius; RealElementFactory magnitude; - const char* ClassID() const { return "SPHE"; } + const char* ClassID() const override { return "SPHE"; } }; struct VEAngleSphere : IEmitterElement { @@ -722,12 +722,12 @@ struct VEAngleSphere : IEmitterElement { RealElementFactory angleYBias; RealElementFactory angleXRange; RealElementFactory angleYRange; - const char* ClassID() const { return "ASPH"; } + const char* ClassID() const override { return "ASPH"; } }; struct EESimpleEmitterTR : EESimpleEmitter { AT_DECL_EXPLICIT_DNA_YAML - const char* ClassID() const { return "SETR"; } + const char* ClassID() const override { return "SETR"; } }; template @@ -735,7 +735,7 @@ struct UVEConstant : IUVElement { AT_DECL_EXPLICIT_DNA_YAML AT_SUBDECL_DNA CastIDToZero tex; - const char* ClassID() const { return "CNST"; } + const char* ClassID() const override { return "CNST"; } void gatherDependencies(std::vector& pathsOut) const { g_curSpec->flattenDependencies(tex, pathsOut); @@ -753,7 +753,7 @@ struct UVEAnimTexture : IUVElement { IntElementFactory strideH; IntElementFactory cycleFrames; Value loop = false; - const char* ClassID() const { return "ATEX"; } + const char* ClassID() const override { return "ATEX"; } void gatherDependencies(std::vector& pathsOut) const { g_curSpec->flattenDependencies(tex, pathsOut); diff --git a/DataSpec/DNACommon/STRG.hpp b/DataSpec/DNACommon/STRG.hpp index 7c7372383..8f32d3055 100644 --- a/DataSpec/DNACommon/STRG.hpp +++ b/DataSpec/DNACommon/STRG.hpp @@ -9,7 +9,7 @@ namespace DataSpec { struct ISTRG : BigDNAVYaml { - virtual ~ISTRG() = default; + ~ISTRG() override = default; virtual size_t count() const = 0; virtual std::string getUTF8(const FourCC& lang, size_t idx) const = 0; diff --git a/DataSpec/DNAMP1/ANCS.hpp b/DataSpec/DNAMP1/ANCS.hpp index 23b390681..290d6439a 100644 --- a/DataSpec/DNAMP1/ANCS.hpp +++ b/DataSpec/DNAMP1/ANCS.hpp @@ -156,9 +156,11 @@ struct ANCS : BigDNA { Value unk2; void gatherPrimitives(PAKRouter* pakRouter, - std::map>& out); + std::map>& out) override; - bool enumeratePrimitives(const std::function& func) { return func(*this); } + bool enumeratePrimitives(const std::function& func) override { + return func(*this); + } }; struct MetaAnimBlend : IMetaAnim { MetaAnimBlend() : IMetaAnim(Type::Blend, "Blend") {} @@ -170,12 +172,12 @@ struct ANCS : BigDNA { Value unk; void gatherPrimitives(PAKRouter* pakRouter, - std::map>& out) { + std::map>& out) override { animA.m_anim->gatherPrimitives(pakRouter, out); animB.m_anim->gatherPrimitives(pakRouter, out); } - bool enumeratePrimitives(const std::function& func) { + bool enumeratePrimitives(const std::function& func) override { if (!animA.m_anim->enumeratePrimitives(func)) return false; if (!animB.m_anim->enumeratePrimitives(func)) @@ -193,12 +195,12 @@ struct ANCS : BigDNA { Value unk; void gatherPrimitives(PAKRouter* pakRouter, - std::map>& out) { + std::map>& out) override { animA.m_anim->gatherPrimitives(pakRouter, out); animB.m_anim->gatherPrimitives(pakRouter, out); } - bool enumeratePrimitives(const std::function& func) { + bool enumeratePrimitives(const std::function& func) override { if (!animA.m_anim->enumeratePrimitives(func)) return false; if (!animB.m_anim->enumeratePrimitives(func)) @@ -219,12 +221,12 @@ struct ANCS : BigDNA { Vector children; void gatherPrimitives(PAKRouter* pakRouter, - std::map>& out) { + std::map>& out) override { for (const auto& child : children) child.anim.m_anim->gatherPrimitives(pakRouter, out); } - bool enumeratePrimitives(const std::function& func) { + bool enumeratePrimitives(const std::function& func) override { for (auto& child : children) if (!child.anim.m_anim->enumeratePrimitives(func)) return false; @@ -239,12 +241,12 @@ struct ANCS : BigDNA { Vector children; void gatherPrimitives(PAKRouter* pakRouter, - std::map>& out) { + std::map>& out) override { for (const auto& child : children) child.m_anim->gatherPrimitives(pakRouter, out); } - bool enumeratePrimitives(const std::function& func) { + bool enumeratePrimitives(const std::function& func) override { for (auto& child : children) if (!child.m_anim->enumeratePrimitives(func)) return false; @@ -285,11 +287,11 @@ struct ANCS : BigDNA { MetaAnimFactory anim; void gatherPrimitives(PAKRouter* pakRouter, - std::map>& out) { + std::map>& out) override { anim.m_anim->gatherPrimitives(pakRouter, out); } - bool enumeratePrimitives(const std::function& func) { + bool enumeratePrimitives(const std::function& func) override { return anim.m_anim->enumeratePrimitives(func); } }; diff --git a/DataSpec/DNAMP1/FRME.hpp b/DataSpec/DNAMP1/FRME.hpp index 849509742..6afd0ada9 100644 --- a/DataSpec/DNAMP1/FRME.hpp +++ b/DataSpec/DNAMP1/FRME.hpp @@ -46,19 +46,19 @@ struct FRME : BigDNA { struct BWIGInfo : IWidgetInfo { AT_DECL_DNA - const char* DNATypeV() const { return "FRME::BWIG"; } - FourCC fourcc() const { return FOURCC('BWIG'); } + const char* DNATypeV() const override { return "FRME::BWIG"; } + FourCC fourcc() const override { return FOURCC('BWIG'); } }; struct HWIGInfo : IWidgetInfo { AT_DECL_DNA - const char* DNATypeV() const { return "FRME::HWIG"; } - FourCC fourcc() const { return FOURCC('HWIG'); } + const char* DNATypeV() const override { return "FRME::HWIG"; } + FourCC fourcc() const override { return FOURCC('HWIG'); } }; struct CAMRInfo : IWidgetInfo { AT_DECL_EXPLICIT_DNA - const char* DNATypeV() const { return "FRME::CAMR"; } + const char* DNATypeV() const override { return "FRME::CAMR"; } enum class ProjectionType { Perspective, Orthographic }; Value projectionType; @@ -91,24 +91,24 @@ struct FRME : BigDNA { }; std::unique_ptr projection; - FourCC fourcc() const { return FOURCC('CAMR'); } + FourCC fourcc() const override { return FOURCC('CAMR'); } }; struct MODLInfo : IWidgetInfo { AT_DECL_DNA - const char* DNATypeV() const { return "FRME::MODL"; } + const char* DNATypeV() const override { return "FRME::MODL"; } UniqueID32 model; enum class BlendMode { Unknown0, Unknown1, Unknown2, Additive }; Value blendMode; Value lightMask; - FourCC fourcc() const { return FOURCC('MODL'); } + FourCC fourcc() const override { return FOURCC('MODL'); } }; struct LITEInfo : IWidgetInfo { AT_DECL_EXPLICIT_DNA - const char* DNATypeV() const { return "FRME::LITE"; } + const char* DNATypeV() const override { return "FRME::LITE"; } enum class ELightType : atUint32 { Spot = 0, Point = 1, @@ -127,40 +127,40 @@ struct FRME : BigDNA { Value loadedIdx; Value cutoff; /* Spot only */ - FourCC fourcc() const { return FOURCC('LITE'); } + FourCC fourcc() const override { return FOURCC('LITE'); } }; struct ENRGInfo : IWidgetInfo { AT_DECL_DNA - const char* DNATypeV() const { return "FRME::ENRG"; } + const char* DNATypeV() const override { return "FRME::ENRG"; } UniqueID32 texture; - FourCC fourcc() const { return FOURCC('ENRG'); } + FourCC fourcc() const override { return FOURCC('ENRG'); } }; struct METRInfo : IWidgetInfo { AT_DECL_DNA - const char* DNATypeV() const { return "FRME::METR"; } + const char* DNATypeV() const override { return "FRME::METR"; } Value unk1; Value noRoundUp; Value maxCapacity; Value workerCount; - FourCC fourcc() const { return FOURCC('METR'); } + FourCC fourcc() const override { return FOURCC('METR'); } }; struct GRUPInfo : IWidgetInfo { AT_DECL_DNA - const char* DNATypeV() const { return "FRME::GRUP"; } + const char* DNATypeV() const override { return "FRME::GRUP"; } Value defaultWorker; Value unk3; - FourCC fourcc() const { return FOURCC('GRUP'); } + FourCC fourcc() const override { return FOURCC('GRUP'); } }; struct TBGPInfo : IWidgetInfo { AT_DECL_DNA - const char* DNATypeV() const { return "FRME::TBGP"; } + const char* DNATypeV() const override { return "FRME::TBGP"; } Value elementCount; Value unk2; Value unkEnum; @@ -177,32 +177,32 @@ struct FRME : BigDNA { Value unk10; Value unk11; - FourCC fourcc() const { return FOURCC('TBGP'); } + FourCC fourcc() const override { return FOURCC('TBGP'); } }; struct SLGPInfo : IWidgetInfo { AT_DECL_DNA - const char* DNATypeV() const { return "FRME::SLGP"; } + const char* DNATypeV() const override { return "FRME::SLGP"; } Value min; Value max; Value cur; Value increment; - FourCC fourcc() const { return FOURCC('SLGP'); } + FourCC fourcc() const override { return FOURCC('SLGP'); } }; struct PANEInfo : IWidgetInfo { AT_DECL_DNA - const char* DNATypeV() const { return "FRME::PANE"; } + const char* DNATypeV() const override { return "FRME::PANE"; } Value xDim; Value zDim; Value scaleCenter; - FourCC fourcc() const { return FOURCC('PANE'); } + FourCC fourcc() const override { return FOURCC('PANE'); } }; struct TXPNInfo : IWidgetInfo { - const char* DNATypeV() const { return "FRME::TXPN"; } + const char* DNATypeV() const override { return "FRME::TXPN"; } enum class Justification : atUint32 { Left = 0, Center, @@ -249,12 +249,12 @@ struct FRME : BigDNA { UniqueID32 jpnFont; Value jpnPointScale[2] = {}; - FourCC fourcc() const { return FOURCC('TXPN'); } + FourCC fourcc() const override { return FOURCC('TXPN'); } }; struct IMGPInfo : IWidgetInfo { AT_DECL_DNA - const char* DNATypeV() const { return "FRME::IMGP"; } + const char* DNATypeV() const override { return "FRME::IMGP"; } UniqueID32 texture; Value unk1; Value unk2; @@ -263,7 +263,7 @@ struct FRME : BigDNA { Value uvCoordCount; Vector uvCoords; - FourCC fourcc() const { return FOURCC('IMGP'); } + FourCC fourcc() const override { return FOURCC('IMGP'); } }; }; diff --git a/DataSpec/DNAMP1/STRG.hpp b/DataSpec/DNAMP1/STRG.hpp index 0d1af14eb..093fde9bf 100644 --- a/DataSpec/DNAMP1/STRG.hpp +++ b/DataSpec/DNAMP1/STRG.hpp @@ -14,9 +14,9 @@ struct STRG : ISTRG { std::vector>> langs; std::unordered_map*> langMap; - int32_t lookupIdx(std::string_view name) const { return -1; } + int32_t lookupIdx(std::string_view name) const override { return -1; } - size_t count() const { + size_t count() const override { size_t retval = 0; for (const auto& item : langs) { size_t sz = item.second.size(); @@ -25,19 +25,19 @@ struct STRG : ISTRG { } return retval; } - std::string getUTF8(const FourCC& lang, size_t idx) const { + std::string getUTF8(const FourCC& lang, size_t idx) const override { auto search = langMap.find(lang); if (search != langMap.end()) return hecl::Char16ToUTF8(search->second->at(idx)); return std::string(); } - std::u16string getUTF16(const FourCC& lang, size_t idx) const { + std::u16string getUTF16(const FourCC& lang, size_t idx) const override { auto search = langMap.find(lang); if (search != langMap.end()) return search->second->at(idx); return std::u16string(); } - hecl::SystemString getSystemString(const FourCC& lang, size_t idx) const { + hecl::SystemString getSystemString(const FourCC& lang, size_t idx) const override { auto search = langMap.find(lang); if (search != langMap.end()) #if HECL_UCS2 @@ -71,7 +71,7 @@ struct STRG : ISTRG { return true; } - void gatherDependencies(std::vector& pathsOut) const; + void gatherDependencies(std::vector& pathsOut) const override; }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/Actor.hpp b/DataSpec/DNAMP1/ScriptObjects/Actor.hpp index a1b16e966..47d4300ba 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Actor.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Actor.hpp @@ -32,11 +32,11 @@ struct Actor : IScriptObject { Value scaleAdvancementDelta; Value materialFlag54; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (model.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model); ent->name = name + "_model"; @@ -45,14 +45,15 @@ struct Actor : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(model, pathsOut); animationParameters.depANCS(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } - zeus::CAABox getVISIAABB(hecl::blender::Token& btok) const; + zeus::CAABox getVISIAABB(hecl::blender::Token& btok) const override; }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/ActorContraption.hpp b/DataSpec/DNAMP1/ScriptObjects/ActorContraption.hpp index ba86901d9..0f14e08fc 100644 --- a/DataSpec/DNAMP1/ScriptObjects/ActorContraption.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/ActorContraption.hpp @@ -24,11 +24,11 @@ struct ActorContraption : IScriptObject { DamageInfo damageInfo; Value active; // needs verification - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (particle.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle); ent->name = name + "_part"; @@ -37,12 +37,13 @@ struct ActorContraption : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(particle, pathsOut); animationParameters.depANCS(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/AmbientAI.hpp b/DataSpec/DNAMP1/ScriptObjects/AmbientAI.hpp index c399cbff6..4c7895367 100644 --- a/DataSpec/DNAMP1/ScriptObjects/AmbientAI.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/AmbientAI.hpp @@ -25,20 +25,21 @@ struct AmbientAI : IScriptObject { Value impactAnim; Value active; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { animationParameters.nameANCS(pakRouter, name + "_animp"); actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { animationParameters.depANCS(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/AreaAttributes.hpp b/DataSpec/DNAMP1/ScriptObjects/AreaAttributes.hpp index c22fedf36..93d1bfe65 100644 --- a/DataSpec/DNAMP1/ScriptObjects/AreaAttributes.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/AreaAttributes.hpp @@ -20,7 +20,8 @@ struct AreaAttributes : IScriptObject { UniqueID32 skybox; Value phazonType; - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(skybox, pathsOut); } }; diff --git a/DataSpec/DNAMP1/ScriptObjects/AtomicAlpha.hpp b/DataSpec/DNAMP1/ScriptObjects/AtomicAlpha.hpp index 29c4afc43..e7fb0dc4b 100644 --- a/DataSpec/DNAMP1/ScriptObjects/AtomicAlpha.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/AtomicAlpha.hpp @@ -23,11 +23,11 @@ struct AtomicAlpha : IScriptObject { Value invisible; Value applyBeamAttraction; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (wpsc.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc); ent->name = name + "_wpsc"; @@ -40,13 +40,14 @@ struct AtomicAlpha : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(wpsc, pathsOut); g_curSpec->flattenDependencies(model, pathsOut); patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/AtomicBeta.hpp b/DataSpec/DNAMP1/ScriptObjects/AtomicBeta.hpp index 9fbfe97eb..02904d8cc 100644 --- a/DataSpec/DNAMP1/ScriptObjects/AtomicBeta.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/AtomicBeta.hpp @@ -30,11 +30,11 @@ struct AtomicBeta : IScriptObject { Value unknown9; Value unknown10; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (elsc.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(elsc); ent->name = name + "_elsc"; @@ -51,7 +51,8 @@ struct AtomicBeta : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(elsc, pathsOut); g_curSpec->flattenDependencies(wpsc, pathsOut); g_curSpec->flattenDependencies(part, pathsOut); @@ -59,6 +60,6 @@ struct AtomicBeta : IScriptObject { actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/Babygoth.hpp b/DataSpec/DNAMP1/ScriptObjects/Babygoth.hpp index 1756a407f..4ca89aafb 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Babygoth.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Babygoth.hpp @@ -42,7 +42,7 @@ struct Babygoth : IScriptObject { Value flamePlayerHitSfx; UniqueID32 flamePlayerIceTxtr; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { UniqueID32 cinf = patternedInfo.animationParameters.getCINF(pakRouter); actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); @@ -54,7 +54,7 @@ struct Babygoth : IScriptObject { } } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (fireballWeapon.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(fireballWeapon); ent->name = name + "_wpsc1"; @@ -103,7 +103,8 @@ struct Babygoth : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(fireballWeapon, pathsOut); g_curSpec->flattenDependencies(fireBreathWeapon, pathsOut); g_curSpec->flattenDependencies(fireBreathRes, pathsOut); @@ -119,6 +120,6 @@ struct Babygoth : IScriptObject { actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/Beetle.hpp b/DataSpec/DNAMP1/ScriptObjects/Beetle.hpp index 584ccb8be..2b5459543 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Beetle.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Beetle.hpp @@ -25,11 +25,11 @@ struct Beetle : IScriptObject { Value initialAttackDelay; Value retreatTime; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (tailModel.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(tailModel); ent->name = name + "_tailModel"; @@ -38,12 +38,13 @@ struct Beetle : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(tailModel, pathsOut); patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/BloodFlower.hpp b/DataSpec/DNAMP1/ScriptObjects/BloodFlower.hpp index e50042c41..e0dd154e0 100644 --- a/DataSpec/DNAMP1/ScriptObjects/BloodFlower.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/BloodFlower.hpp @@ -27,11 +27,11 @@ struct BloodFlower : IScriptObject { UniqueID32 particle5; Value unknown2; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (wpsc1.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc1); ent->name = name + "_wpsc1"; @@ -64,7 +64,8 @@ struct BloodFlower : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(wpsc1, pathsOut); g_curSpec->flattenDependencies(wpsc2, pathsOut); g_curSpec->flattenDependencies(particle1, pathsOut); @@ -76,6 +77,6 @@ struct BloodFlower : IScriptObject { actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/Burrower.hpp b/DataSpec/DNAMP1/ScriptObjects/Burrower.hpp index f72a68675..e98a58200 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Burrower.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Burrower.hpp @@ -22,11 +22,11 @@ struct Burrower : IScriptObject { Value unknown; // always FF UniqueID32 particle4; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (wpsc.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc); ent->name = name + "_wpsc"; @@ -51,7 +51,8 @@ struct Burrower : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(wpsc, pathsOut); g_curSpec->flattenDependencies(particle1, pathsOut); g_curSpec->flattenDependencies(particle2, pathsOut); @@ -61,6 +62,6 @@ struct Burrower : IScriptObject { actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/CameraFilterKeyframe.hpp b/DataSpec/DNAMP1/ScriptObjects/CameraFilterKeyframe.hpp index 596f0199b..eb492d1db 100644 --- a/DataSpec/DNAMP1/ScriptObjects/CameraFilterKeyframe.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/CameraFilterKeyframe.hpp @@ -19,14 +19,15 @@ struct CameraFilterKeyframe : IScriptObject { Value timeOut; UniqueID32 texture; - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (texture.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture); ent->name = name + "_texture"; } } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(texture, pathsOut); } }; diff --git a/DataSpec/DNAMP1/ScriptObjects/ChozoGhost.hpp b/DataSpec/DNAMP1/ScriptObjects/ChozoGhost.hpp index 83e3d0970..b5ccc0829 100644 --- a/DataSpec/DNAMP1/ScriptObjects/ChozoGhost.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/ChozoGhost.hpp @@ -40,11 +40,11 @@ struct ChozoGhost : IScriptObject { Value unknown12; Value unknown13; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (wpsc1.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc1); ent->name = name + "_wpsc1"; @@ -61,7 +61,8 @@ struct ChozoGhost : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(wpsc1, pathsOut); g_curSpec->flattenDependencies(wpsc2, pathsOut); g_curSpec->flattenDependencies(particle, pathsOut); @@ -69,6 +70,6 @@ struct ChozoGhost : IScriptObject { actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/DamageableTrigger.hpp b/DataSpec/DNAMP1/ScriptObjects/DamageableTrigger.hpp index 2edc99fca..f9c79cac1 100644 --- a/DataSpec/DNAMP1/ScriptObjects/DamageableTrigger.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/DamageableTrigger.hpp @@ -21,7 +21,7 @@ struct DamageableTrigger : IScriptObject { Value active; VisorParameters visorParameters; - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (patternTex1.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(patternTex1); ent->name = name + "_patternTex1"; @@ -36,13 +36,14 @@ struct DamageableTrigger : IScriptObject { } } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(patternTex1, pathsOut); g_curSpec->flattenDependencies(patternTex2, pathsOut); g_curSpec->flattenDependencies(colorTex, pathsOut); } - zeus::CAABox getVISIAABB(hecl::blender::Token& btok) const { + zeus::CAABox getVISIAABB(hecl::blender::Token& btok) const override { zeus::CVector3f halfExtent = zeus::CVector3f(volume) / 2.f; zeus::CVector3f loc(location); return zeus::CAABox(loc - halfExtent, loc + halfExtent); diff --git a/DataSpec/DNAMP1/ScriptObjects/Debris.hpp b/DataSpec/DNAMP1/ScriptObjects/Debris.hpp index 7859077e9..ad614fb5d 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Debris.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Debris.hpp @@ -27,7 +27,7 @@ struct Debris : IScriptObject { Value b1; Value active; - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (model.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model); ent->name = name + "_model"; @@ -39,12 +39,13 @@ struct Debris : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(model, pathsOut); g_curSpec->flattenDependencies(particle, pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/DebrisExtended.hpp b/DataSpec/DNAMP1/ScriptObjects/DebrisExtended.hpp index f02f667d2..2210c7b04 100644 --- a/DataSpec/DNAMP1/ScriptObjects/DebrisExtended.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/DebrisExtended.hpp @@ -48,7 +48,7 @@ struct DebrisExtended : IScriptObject { Value noBounce; Value active; - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (model.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model); ent->name = name + "_model"; @@ -68,7 +68,8 @@ struct DebrisExtended : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(model, pathsOut); g_curSpec->flattenDependencies(particle1, pathsOut); g_curSpec->flattenDependencies(particle2, pathsOut); @@ -76,6 +77,6 @@ struct DebrisExtended : IScriptObject { actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/DoorArea.hpp b/DataSpec/DNAMP1/ScriptObjects/DoorArea.hpp index 283c9b555..03ba6ae4f 100644 --- a/DataSpec/DNAMP1/ScriptObjects/DoorArea.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/DoorArea.hpp @@ -23,22 +23,23 @@ struct DoorArea : IScriptObject { Value animationLength; Value isMorphballDoor; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { animationParameters.nameANCS(pakRouter, name + "_animp"); actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { animationParameters.depANCS(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } - zeus::CAABox getVISIAABB(hecl::blender::Token& btok) const; + zeus::CAABox getVISIAABB(hecl::blender::Token& btok) const override; }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/Drone.hpp b/DataSpec/DNAMP1/ScriptObjects/Drone.hpp index 788091c50..20bc158e2 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Drone.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Drone.hpp @@ -54,11 +54,11 @@ struct Drone : IScriptObject { Value sound; // verification needed Value unknown30; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (crsc.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(crsc); ent->name = name + "_crsc"; @@ -72,7 +72,8 @@ struct Drone : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(crsc, pathsOut); flareDefinition1.depIDs(pathsOut); flareDefinition2.depIDs(pathsOut); @@ -83,6 +84,6 @@ struct Drone : IScriptObject { actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/Effect.hpp b/DataSpec/DNAMP1/ScriptObjects/Effect.hpp index 777e2aa6f..0d1ca2b9c 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Effect.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Effect.hpp @@ -33,7 +33,7 @@ struct Effect : IScriptObject { Value dieWhenSystemsDone; LightParameters lightParameters; - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (part.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(part); ent->name = name + "_part"; @@ -44,7 +44,8 @@ struct Effect : IScriptObject { } } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(part, pathsOut); g_curSpec->flattenDependencies(elsc, pathsOut); } diff --git a/DataSpec/DNAMP1/ScriptObjects/ElectroMagneticPulse.hpp b/DataSpec/DNAMP1/ScriptObjects/ElectroMagneticPulse.hpp index 776b21cb8..518d95f8c 100644 --- a/DataSpec/DNAMP1/ScriptObjects/ElectroMagneticPulse.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/ElectroMagneticPulse.hpp @@ -21,14 +21,15 @@ struct ElectroMagneticPulse : IScriptObject { Value unknown8; UniqueID32 particle; - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (particle.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle); ent->name = name + "_part"; } } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(particle, pathsOut); } }; diff --git a/DataSpec/DNAMP1/ScriptObjects/ElitePirate.hpp b/DataSpec/DNAMP1/ScriptObjects/ElitePirate.hpp index d37cf9e39..1b314082b 100644 --- a/DataSpec/DNAMP1/ScriptObjects/ElitePirate.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/ElitePirate.hpp @@ -51,12 +51,12 @@ struct ElitePirate : IScriptObject { Value unknown17; Value unknown18; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters1.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); actorParameters2.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (particle1.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1); ent->name = name + "_part1"; @@ -99,7 +99,8 @@ struct ElitePirate : IScriptObject { animationParameters.nameANCS(pakRouter, name + "_animp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(particle1, pathsOut); g_curSpec->flattenDependencies(particle2, pathsOut); g_curSpec->flattenDependencies(model, pathsOut); @@ -115,7 +116,7 @@ struct ElitePirate : IScriptObject { animationParameters.depANCS(pathsOut); } - void gatherScans(std::vector& scansOut) const { + void gatherScans(std::vector& scansOut) const override { actorParameters1.scanIDs(scansOut); actorParameters2.scanIDs(scansOut); } diff --git a/DataSpec/DNAMP1/ScriptObjects/EnergyBall.hpp b/DataSpec/DNAMP1/ScriptObjects/EnergyBall.hpp index 367ec9d4a..d464e2822 100644 --- a/DataSpec/DNAMP1/ScriptObjects/EnergyBall.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/EnergyBall.hpp @@ -29,11 +29,11 @@ struct EnergyBall : IScriptObject { DamageInfo damageInfo2; Value unknown6; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (texture.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture); ent->name = name + "_texture"; @@ -54,7 +54,8 @@ struct EnergyBall : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(texture, pathsOut); g_curSpec->flattenDependencies(particle1, pathsOut); g_curSpec->flattenDependencies(particle2, pathsOut); @@ -63,6 +64,6 @@ struct EnergyBall : IScriptObject { actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/Eyeball.hpp b/DataSpec/DNAMP1/ScriptObjects/Eyeball.hpp index d800d0ad9..9382b9d8f 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Eyeball.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Eyeball.hpp @@ -30,11 +30,11 @@ struct Eyeball : IScriptObject { Value beamSfx; Value attackDisabled; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (wpsc.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc); ent->name = name + "_wpsc"; @@ -59,7 +59,8 @@ struct Eyeball : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(wpsc, pathsOut); g_curSpec->flattenDependencies(beamContactFxId, pathsOut); g_curSpec->flattenDependencies(beamPulseFxId, pathsOut); @@ -69,6 +70,6 @@ struct Eyeball : IScriptObject { actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/FireFlea.hpp b/DataSpec/DNAMP1/ScriptObjects/FireFlea.hpp index 31cf29ee8..0906d4b5d 100644 --- a/DataSpec/DNAMP1/ScriptObjects/FireFlea.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/FireFlea.hpp @@ -18,20 +18,21 @@ struct FireFlea : IScriptObject { Value unknown2; Value unknown3; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { patternedInfo.nameIDs(pakRouter, name + "_patterned"); actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/FishCloud.hpp b/DataSpec/DNAMP1/ScriptObjects/FishCloud.hpp index ee548c246..16b3b7846 100644 --- a/DataSpec/DNAMP1/ScriptObjects/FishCloud.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/FishCloud.hpp @@ -45,7 +45,7 @@ struct FishCloud : IScriptObject { Value repelFromThreats; Value hotInThermal; - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (model.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model); ent->name = name + "_model"; @@ -69,7 +69,8 @@ struct FishCloud : IScriptObject { } } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(model, pathsOut); animationParameters.depANCS(pathsOut); g_curSpec->flattenDependencies(deathParticle1, pathsOut); diff --git a/DataSpec/DNAMP1/ScriptObjects/Flaahgra.hpp b/DataSpec/DNAMP1/ScriptObjects/Flaahgra.hpp index 6b95a7113..bf45839f5 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Flaahgra.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Flaahgra.hpp @@ -32,12 +32,12 @@ struct Flaahgra : IScriptObject { AnimationParameters animationParameters; UniqueID32 dependencyGroup; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters1.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); actorParameters2.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (wpsc1.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc1); ent->name = name + "_wpsc1"; @@ -60,7 +60,8 @@ struct Flaahgra : IScriptObject { animationParameters.nameANCS(pakRouter, name + "_animp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(wpsc1, pathsOut); g_curSpec->flattenDependencies(wpsc2, pathsOut); g_curSpec->flattenDependencies(particle, pathsOut); @@ -71,7 +72,7 @@ struct Flaahgra : IScriptObject { animationParameters.depANCS(pathsOut); } - void gatherScans(std::vector& scansOut) const { + void gatherScans(std::vector& scansOut) const override { actorParameters1.scanIDs(scansOut); actorParameters2.scanIDs(scansOut); } diff --git a/DataSpec/DNAMP1/ScriptObjects/FlaahgraTentacle.hpp b/DataSpec/DNAMP1/ScriptObjects/FlaahgraTentacle.hpp index 5af9af4c8..29f90e441 100644 --- a/DataSpec/DNAMP1/ScriptObjects/FlaahgraTentacle.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/FlaahgraTentacle.hpp @@ -15,20 +15,21 @@ struct FlaahgraTentacle : IScriptObject { PatternedInfo patternedInfo; ActorParameters actorParameters; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { patternedInfo.nameIDs(pakRouter, name + "_patterned"); actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/FlickerBat.hpp b/DataSpec/DNAMP1/ScriptObjects/FlickerBat.hpp index 6632d5c2e..452840f7c 100644 --- a/DataSpec/DNAMP1/ScriptObjects/FlickerBat.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/FlickerBat.hpp @@ -19,20 +19,21 @@ struct FlickerBat : IScriptObject { Value startsHidden; Value enableLineOfSight; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { patternedInfo.nameIDs(pakRouter, name + "_patterned"); actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/FlyingPirate.hpp b/DataSpec/DNAMP1/ScriptObjects/FlyingPirate.hpp index 1858d161a..c6de02341 100644 --- a/DataSpec/DNAMP1/ScriptObjects/FlyingPirate.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/FlyingPirate.hpp @@ -45,11 +45,11 @@ struct FlyingPirate : IScriptObject { Value unknown19; Value unknown20; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (wpsc1.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc1); ent->name = name + "_wpsc1"; @@ -82,7 +82,8 @@ struct FlyingPirate : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(wpsc1, pathsOut); g_curSpec->flattenDependencies(wpsc2, pathsOut); g_curSpec->flattenDependencies(wpsc3, pathsOut); @@ -94,6 +95,6 @@ struct FlyingPirate : IScriptObject { actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/Geemer.hpp b/DataSpec/DNAMP1/ScriptObjects/Geemer.hpp index 83a3f4567..ac1b6e874 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Geemer.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Geemer.hpp @@ -25,20 +25,21 @@ struct Geemer : IScriptObject { Value getUpSfx; Value crouchSfx; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { patternedInfo.nameIDs(pakRouter, name + "_patterned"); actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/GunTurret.hpp b/DataSpec/DNAMP1/ScriptObjects/GunTurret.hpp index 0029e3819..99a6b9e1d 100644 --- a/DataSpec/DNAMP1/ScriptObjects/GunTurret.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/GunTurret.hpp @@ -57,11 +57,11 @@ struct GunTurret : IScriptObject { Value frenzyDuration; Value scriptedStartOnly; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (projectileRes.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(projectileRes); ent->name = name + "_projectileRes"; @@ -102,7 +102,8 @@ struct GunTurret : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(projectileRes, pathsOut); g_curSpec->flattenDependencies(idleLightRes, pathsOut); g_curSpec->flattenDependencies(deactivateLightRes, pathsOut); @@ -116,6 +117,6 @@ struct GunTurret : IScriptObject { actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/HUDMemo.hpp b/DataSpec/DNAMP1/ScriptObjects/HUDMemo.hpp index f6e7d8fa5..23b6d80c4 100644 --- a/DataSpec/DNAMP1/ScriptObjects/HUDMemo.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/HUDMemo.hpp @@ -15,14 +15,15 @@ struct HUDMemo : IScriptObject { UniqueID32 message; Value active; - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (message.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(message); ent->name = name + "_message"; } } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(message, pathsOut); } }; diff --git a/DataSpec/DNAMP1/ScriptObjects/IScriptObject.hpp b/DataSpec/DNAMP1/ScriptObjects/IScriptObject.hpp index 22e41d4df..c269ef5d9 100644 --- a/DataSpec/DNAMP1/ScriptObjects/IScriptObject.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/IScriptObject.hpp @@ -34,7 +34,7 @@ struct IScriptObject : BigDNAVYaml { Value connectionCount; Vector connections; Value propertyCount; - virtual ~IScriptObject() = default; + ~IScriptObject() override = default; virtual void addCMDLRigPairs(PAKRouter&, CharacterAssociations& charAssoc) const {} virtual void nameIDs(PAKRouter& pakRouter) const {} diff --git a/DataSpec/DNAMP1/ScriptObjects/IceSheegoth.hpp b/DataSpec/DNAMP1/ScriptObjects/IceSheegoth.hpp index 5472fac31..59769abc0 100644 --- a/DataSpec/DNAMP1/ScriptObjects/IceSheegoth.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/IceSheegoth.hpp @@ -46,11 +46,11 @@ struct IceSheegoth : IScriptObject { Value unknown12; Value unknown13; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (wpsc1.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc1); ent->name = name + "_wpsc1"; @@ -95,7 +95,8 @@ struct IceSheegoth : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(wpsc1, pathsOut); g_curSpec->flattenDependencies(wpsc2, pathsOut); g_curSpec->flattenDependencies(particle1, pathsOut); @@ -110,6 +111,6 @@ struct IceSheegoth : IScriptObject { actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/IceZoomer.hpp b/DataSpec/DNAMP1/ScriptObjects/IceZoomer.hpp index 8540cef7d..d83612ae2 100644 --- a/DataSpec/DNAMP1/ScriptObjects/IceZoomer.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/IceZoomer.hpp @@ -25,22 +25,23 @@ struct IceZoomer : IScriptObject { DamageVulnerability damageVulnerabilty; Value unknown9; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { patternedInfo.nameIDs(pakRouter, name + "_patterned"); actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); g_curSpec->flattenDependencies(modelRes, pathsOut); g_curSpec->flattenDependencies(skinRes, pathsOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/JellyZap.hpp b/DataSpec/DNAMP1/ScriptObjects/JellyZap.hpp index 3930dd34f..c6b8f80b4 100644 --- a/DataSpec/DNAMP1/ScriptObjects/JellyZap.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/JellyZap.hpp @@ -29,20 +29,21 @@ struct JellyZap : IScriptObject { Value unknown12; Value unknown13; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { patternedInfo.nameIDs(pakRouter, name + "_patterned"); actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/Magdolite.hpp b/DataSpec/DNAMP1/ScriptObjects/Magdolite.hpp index 78729f46a..45a6a365e 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Magdolite.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Magdolite.hpp @@ -40,7 +40,7 @@ struct Magdolite : IScriptObject { Value unknown8; Value unknown9; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { UniqueID32 cinf = patternedInfo.animationParameters.getCINF(pakRouter); actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); @@ -52,7 +52,7 @@ struct Magdolite : IScriptObject { } } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (cmdlHeadless.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(cmdlHeadless); ent->name = name + "_emodel"; @@ -69,7 +69,8 @@ struct Magdolite : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(cmdlHeadless, pathsOut); g_curSpec->flattenDependencies(cskrHeadless, pathsOut); g_curSpec->flattenDependencies(magdoliteParameters.particle, pathsOut); @@ -77,6 +78,6 @@ struct Magdolite : IScriptObject { actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/MetareeAlpha.hpp b/DataSpec/DNAMP1/ScriptObjects/MetareeAlpha.hpp index cac9a79a4..a6dc0a9de 100644 --- a/DataSpec/DNAMP1/ScriptObjects/MetareeAlpha.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/MetareeAlpha.hpp @@ -21,20 +21,21 @@ struct MetareeAlpha : IScriptObject { Value delay; Value unknown5; // Appears to be unused - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { patternedInfo.nameIDs(pakRouter, name + "_patterned"); actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/MetroidAlpha.hpp b/DataSpec/DNAMP1/ScriptObjects/MetroidAlpha.hpp index 9eb323f41..cf1b19563 100644 --- a/DataSpec/DNAMP1/ScriptObjects/MetroidAlpha.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/MetroidAlpha.hpp @@ -29,11 +29,11 @@ struct MetroidAlpha : IScriptObject { AnimationParameters animationParameters4; Value unknown8; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { patternedInfo.nameIDs(pakRouter, name + "_patterned"); actorParameters.nameIDs(pakRouter, name + "_actp"); animationParameters1.nameANCS(pakRouter, name + "_animp1"); @@ -42,7 +42,8 @@ struct MetroidAlpha : IScriptObject { animationParameters4.nameANCS(pakRouter, name + "_animp4"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); animationParameters1.depANCS(pathsOut); @@ -51,6 +52,6 @@ struct MetroidAlpha : IScriptObject { animationParameters4.depANCS(pathsOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/MetroidBeta.hpp b/DataSpec/DNAMP1/ScriptObjects/MetroidBeta.hpp index 950ad9c81..6b092b8a3 100644 --- a/DataSpec/DNAMP1/ScriptObjects/MetroidBeta.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/MetroidBeta.hpp @@ -32,11 +32,11 @@ struct MetroidBeta : IScriptObject { UniqueID32 particle4; Value unknown10; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (particle1.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1); ent->name = name + "_part1"; @@ -61,7 +61,8 @@ struct MetroidBeta : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(particle1, pathsOut); g_curSpec->flattenDependencies(particle2, pathsOut); g_curSpec->flattenDependencies(particle3, pathsOut); @@ -71,6 +72,6 @@ struct MetroidBeta : IScriptObject { actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/MetroidPrimeStage1.hpp b/DataSpec/DNAMP1/ScriptObjects/MetroidPrimeStage1.hpp index 7fcddeea5..0d9f72049 100644 --- a/DataSpec/DNAMP1/ScriptObjects/MetroidPrimeStage1.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/MetroidPrimeStage1.hpp @@ -285,19 +285,20 @@ struct MetroidPrimeStage1 : IScriptObject { void scanIDs(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } } massivePrimeStruct; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { massivePrimeStruct.actorParameters.addCMDLRigPairs(pakRouter, charAssoc, massivePrimeStruct.patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { massivePrimeStruct.nameIDs(pakRouter, name + "_massiveStruct"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { massivePrimeStruct.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { massivePrimeStruct.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { massivePrimeStruct.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/MetroidPrimeStage2.hpp b/DataSpec/DNAMP1/ScriptObjects/MetroidPrimeStage2.hpp index 62f8c2bc2..37c680eb0 100644 --- a/DataSpec/DNAMP1/ScriptObjects/MetroidPrimeStage2.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/MetroidPrimeStage2.hpp @@ -20,11 +20,11 @@ struct MetroidPrimeStage2 : IScriptObject { Value unknown; UniqueID32 particle2; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (particle1.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1); ent->name = name + "_part1"; @@ -41,7 +41,8 @@ struct MetroidPrimeStage2 : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(particle1, pathsOut); g_curSpec->flattenDependencies(particle2, pathsOut); g_curSpec->flattenDependencies(elsc, pathsOut); @@ -49,6 +50,6 @@ struct MetroidPrimeStage2 : IScriptObject { actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/Midi.hpp b/DataSpec/DNAMP1/ScriptObjects/Midi.hpp index ac331affd..689c19775 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Midi.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Midi.hpp @@ -15,14 +15,15 @@ struct Midi : IScriptObject { Value fadeOutTime; Value volume; - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (song.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(song); ent->name = name + "_song"; } } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { // Dedicated PAK for this // g_curSpec->flattenDependencies(song, pathsOut); } diff --git a/DataSpec/DNAMP1/ScriptObjects/NewIntroBoss.hpp b/DataSpec/DNAMP1/ScriptObjects/NewIntroBoss.hpp index b0e40f346..94455e94c 100644 --- a/DataSpec/DNAMP1/ScriptObjects/NewIntroBoss.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/NewIntroBoss.hpp @@ -22,11 +22,11 @@ struct NewIntroBoss : IScriptObject { UniqueID32 beamTextureId; UniqueID32 beamGlowTextureId; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (beamContactFxId.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(beamContactFxId); ent->name = name + "_beamContactFxId"; @@ -47,7 +47,8 @@ struct NewIntroBoss : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(weaponDesc, pathsOut); g_curSpec->flattenDependencies(beamContactFxId, pathsOut); g_curSpec->flattenDependencies(beamPulseFxId, pathsOut); @@ -57,6 +58,6 @@ struct NewIntroBoss : IScriptObject { actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/Oculus.hpp b/DataSpec/DNAMP1/ScriptObjects/Oculus.hpp index d5c1b64bd..d7cd5b7a8 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Oculus.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Oculus.hpp @@ -27,21 +27,22 @@ struct Oculus : IScriptObject { /* Trilogy addition */ Value unknown8; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { patternedInfo.nameIDs(pakRouter, name + "_patterned"); actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/OmegaPirate.hpp b/DataSpec/DNAMP1/ScriptObjects/OmegaPirate.hpp index 26a72bbc1..fac6e34b6 100644 --- a/DataSpec/DNAMP1/ScriptObjects/OmegaPirate.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/OmegaPirate.hpp @@ -54,7 +54,7 @@ struct OmegaPirate : IScriptObject { UniqueID32 cskrPhazonVeins; UniqueID32 cinfPhazonVeins; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters1.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); actorParameters2.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); if (cmdlPhazonVeins.isValid() && cskrPhazonVeins.isValid() && cinfPhazonVeins.isValid()) { @@ -69,7 +69,7 @@ struct OmegaPirate : IScriptObject { } } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (particle1.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1); ent->name = name + "_part1"; @@ -124,7 +124,8 @@ struct OmegaPirate : IScriptObject { animationParameters.nameANCS(pakRouter, name + "_animp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(particle1, pathsOut); g_curSpec->flattenDependencies(particle2, pathsOut); g_curSpec->flattenDependencies(particle3, pathsOut); @@ -143,7 +144,7 @@ struct OmegaPirate : IScriptObject { animationParameters.depANCS(pathsOut); } - void gatherScans(std::vector& scansOut) const { + void gatherScans(std::vector& scansOut) const override { actorParameters1.scanIDs(scansOut); actorParameters2.scanIDs(scansOut); } diff --git a/DataSpec/DNAMP1/ScriptObjects/Parasite.hpp b/DataSpec/DNAMP1/ScriptObjects/Parasite.hpp index 7f36408e9..e43828a85 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Parasite.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Parasite.hpp @@ -34,20 +34,21 @@ struct Parasite : IScriptObject { Value playerObstructionMinDist; Value disableMove; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { patternedInfo.nameIDs(pakRouter, name + "_patterned"); actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/PhazonHealingNodule.hpp b/DataSpec/DNAMP1/ScriptObjects/PhazonHealingNodule.hpp index b2b47b275..1d758cf44 100644 --- a/DataSpec/DNAMP1/ScriptObjects/PhazonHealingNodule.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/PhazonHealingNodule.hpp @@ -18,11 +18,11 @@ struct PhazonHealingNodule : IScriptObject { UniqueID32 elsc; String<-1> unknown2; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (elsc.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(elsc); ent->name = name + "_elsc"; @@ -31,12 +31,13 @@ struct PhazonHealingNodule : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(elsc, pathsOut); patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/PhazonPool.hpp b/DataSpec/DNAMP1/ScriptObjects/PhazonPool.hpp index 2c75993b0..9e2ff2177 100644 --- a/DataSpec/DNAMP1/ScriptObjects/PhazonPool.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/PhazonPool.hpp @@ -27,7 +27,7 @@ struct PhazonPool : IScriptObject { Value unknown8; Value unknown9; - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (particle1.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1); ent->name = name + "_part1"; @@ -46,7 +46,8 @@ struct PhazonPool : IScriptObject { } } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(particle1, pathsOut); g_curSpec->flattenDependencies(particle2, pathsOut); g_curSpec->flattenDependencies(model1, pathsOut); diff --git a/DataSpec/DNAMP1/ScriptObjects/Pickup.hpp b/DataSpec/DNAMP1/ScriptObjects/Pickup.hpp index 494392d8b..aee593920 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Pickup.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Pickup.hpp @@ -28,11 +28,11 @@ struct Pickup : IScriptObject { Value startDelay; UniqueID32 pickupParticle; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (pickupParticle.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(pickupParticle); ent->name = name + "_part"; @@ -45,14 +45,15 @@ struct Pickup : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(pickupParticle, pathsOut); g_curSpec->flattenDependencies(model, pathsOut); animationParameters.depANCS(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/Platform.hpp b/DataSpec/DNAMP1/ScriptObjects/Platform.hpp index 2b32ae4b4..c4bd05584 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Platform.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Platform.hpp @@ -28,11 +28,11 @@ struct Platform : IScriptObject { Value maxRainSplashes; Value rainGenRate; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (dcln.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(dcln); ent->name = name + "_dcln"; @@ -45,15 +45,16 @@ struct Platform : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(dcln, pathsOut); g_curSpec->flattenDependencies(model, pathsOut); animationParameters.depANCS(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } - zeus::CAABox getVISIAABB(hecl::blender::Token& btok) const; + zeus::CAABox getVISIAABB(hecl::blender::Token& btok) const override; }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/PlayerActor.hpp b/DataSpec/DNAMP1/ScriptObjects/PlayerActor.hpp index 863fd7ec3..590ccb630 100644 --- a/DataSpec/DNAMP1/ScriptObjects/PlayerActor.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/PlayerActor.hpp @@ -28,11 +28,11 @@ struct PlayerActor : IScriptObject { PropertyFlags playerParameters; Value beamId; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (model.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model); ent->name = name + "_model"; @@ -41,13 +41,14 @@ struct PlayerActor : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(model, pathsOut); animationParameters.depANCS(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); animationParameters.depANCSAll(lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/PointOfInterest.hpp b/DataSpec/DNAMP1/ScriptObjects/PointOfInterest.hpp index 85a6ffc53..eb86c463a 100644 --- a/DataSpec/DNAMP1/ScriptObjects/PointOfInterest.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/PointOfInterest.hpp @@ -15,12 +15,15 @@ struct PointOfInterest : IScriptObject { ScannableParameters scannableParameters; Value pointSize; - void nameIDs(PAKRouter& pakRouter) const { scannableParameters.nameIDs(pakRouter, name + "_scanp"); } + void nameIDs(PAKRouter& pakRouter) const override { + scannableParameters.nameIDs(pakRouter, name + "_scanp"); + } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { scannableParameters.depIDs(lazyOut); } - void gatherScans(std::vector& scansOut) const { scannableParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { scannableParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/PuddleSpore.hpp b/DataSpec/DNAMP1/ScriptObjects/PuddleSpore.hpp index 93794b620..5b842b1da 100644 --- a/DataSpec/DNAMP1/ScriptObjects/PuddleSpore.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/PuddleSpore.hpp @@ -25,11 +25,11 @@ struct PuddleSpore : IScriptObject { UniqueID32 wpsc; DamageInfo damageInfo; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (particle.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle); ent->name = name + "_part"; @@ -42,13 +42,14 @@ struct PuddleSpore : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(particle, pathsOut); g_curSpec->flattenDependencies(wpsc, pathsOut); patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/PuddleToadGamma.hpp b/DataSpec/DNAMP1/ScriptObjects/PuddleToadGamma.hpp index 737bc1776..a0de1d55a 100644 --- a/DataSpec/DNAMP1/ScriptObjects/PuddleToadGamma.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/PuddleToadGamma.hpp @@ -26,11 +26,11 @@ struct PuddleToadGamma : IScriptObject { DamageInfo damageInfo2; UniqueID32 dcln; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (dcln.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(dcln); ent->name = name + "_dcln"; @@ -39,12 +39,13 @@ struct PuddleToadGamma : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(dcln, pathsOut); patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/Puffer.hpp b/DataSpec/DNAMP1/ScriptObjects/Puffer.hpp index 836f9602b..095ffd31c 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Puffer.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Puffer.hpp @@ -25,11 +25,11 @@ struct Puffer : IScriptObject { DamageInfo damageInfo2; Value unknown6; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (particle.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle); ent->name = name + "_part"; @@ -42,13 +42,14 @@ struct Puffer : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(particle, pathsOut); g_curSpec->flattenDependencies(texture, pathsOut); patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/Ridley.hpp b/DataSpec/DNAMP1/ScriptObjects/Ridley.hpp index 7a9ba2afc..a95cf1c7a 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Ridley.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Ridley.hpp @@ -120,11 +120,11 @@ struct Ridley : IScriptObject { /* Trilogy addition */ DamageInfo damageInfo9; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (particle.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle); ent->name = name + "_part"; @@ -202,7 +202,8 @@ struct Ridley : IScriptObject { ridleyStruct1.nameIDs(pakRouter, name + "_ridley1"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(particle, pathsOut); g_curSpec->flattenDependencies(model1, pathsOut); g_curSpec->flattenDependencies(model2, pathsOut); @@ -226,6 +227,6 @@ struct Ridley : IScriptObject { ridleyStruct1.depIDs(pathsOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/Ripper.hpp b/DataSpec/DNAMP1/ScriptObjects/Ripper.hpp index 78102625c..b7675f71a 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Ripper.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Ripper.hpp @@ -17,20 +17,21 @@ struct Ripper : IScriptObject { ActorParameters actorParameters; GrappleParameters grappleParameters; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { patternedInfo.nameIDs(pakRouter, name + "_patterned"); actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/ScriptBeam.hpp b/DataSpec/DNAMP1/ScriptObjects/ScriptBeam.hpp index 9a2a8b398..d86664f0a 100644 --- a/DataSpec/DNAMP1/ScriptObjects/ScriptBeam.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/ScriptBeam.hpp @@ -16,7 +16,7 @@ struct ScriptBeam : IScriptObject { BeamInfo beamInfo; DamageInfo damageInfo; - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (wpsc.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc); ent->name = name + "_wpsc"; @@ -24,7 +24,8 @@ struct ScriptBeam : IScriptObject { beamInfo.nameIDs(pakRouter, name + "_beamInfo"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(wpsc, pathsOut); beamInfo.depIDs(pathsOut); } diff --git a/DataSpec/DNAMP1/ScriptObjects/Seedling.hpp b/DataSpec/DNAMP1/ScriptObjects/Seedling.hpp index ecd52a11f..055fa53f7 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Seedling.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Seedling.hpp @@ -23,11 +23,11 @@ struct Seedling : IScriptObject { Value unknown5; Value unknown6; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (unknown1.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(unknown1); ent->name = name + "_unk1"; @@ -40,13 +40,14 @@ struct Seedling : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(unknown1, pathsOut); g_curSpec->flattenDependencies(unknown2, pathsOut); patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/SnakeWeedSwarm.hpp b/DataSpec/DNAMP1/ScriptObjects/SnakeWeedSwarm.hpp index f448a2257..1ce3bb3fc 100644 --- a/DataSpec/DNAMP1/ScriptObjects/SnakeWeedSwarm.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/SnakeWeedSwarm.hpp @@ -34,20 +34,21 @@ struct SnakeWeedSwarm : IScriptObject { Value unknown18; Value unknown19; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { animationParameters.nameANCS(pakRouter, name + "_animp"); actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { animationParameters.depANCS(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/SpacePirate.hpp b/DataSpec/DNAMP1/ScriptObjects/SpacePirate.hpp index 6eb9a5baa..6f40c4bfa 100644 --- a/DataSpec/DNAMP1/ScriptObjects/SpacePirate.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/SpacePirate.hpp @@ -64,11 +64,11 @@ struct SpacePirate : IScriptObject { Value unknown19; Value AvoidDistance; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (Projectile.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(Projectile); ent->name = name + "_Projectile"; @@ -81,13 +81,14 @@ struct SpacePirate : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(Projectile, pathsOut); g_curSpec->flattenDependencies(KneelAttackShot, pathsOut); patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/SpankWeed.hpp b/DataSpec/DNAMP1/ScriptObjects/SpankWeed.hpp index 1ab374f29..291b20f89 100644 --- a/DataSpec/DNAMP1/ScriptObjects/SpankWeed.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/SpankWeed.hpp @@ -20,20 +20,21 @@ struct SpankWeed : IScriptObject { Value maxSightRange; Value hideTime; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { patternedInfo.nameIDs(pakRouter, name + "_patterned"); actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/Steam.hpp b/DataSpec/DNAMP1/ScriptObjects/Steam.hpp index 8c1fa2244..f8732234d 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Steam.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Steam.hpp @@ -22,14 +22,15 @@ struct Steam : IScriptObject { Value unknown7; Value unknown8; - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (texture.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture); ent->name = name + "_texture"; } } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(texture, lazyOut); } }; diff --git a/DataSpec/DNAMP1/ScriptObjects/Thardus.hpp b/DataSpec/DNAMP1/ScriptObjects/Thardus.hpp index eef501d97..cb4e3537c 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Thardus.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Thardus.hpp @@ -33,11 +33,11 @@ struct Thardus : IScriptObject { Value unknown11; Value unknown12; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (models[0].isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(models[0]); ent->name = name + "_model1"; @@ -146,7 +146,8 @@ struct Thardus : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { for (int i = 0; i < 14; ++i) g_curSpec->flattenDependencies(models[i], pathsOut); for (int i = 0; i < 3; ++i) @@ -160,6 +161,6 @@ struct Thardus : IScriptObject { actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/ThardusRockProjectile.hpp b/DataSpec/DNAMP1/ScriptObjects/ThardusRockProjectile.hpp index a565a2c51..a2cf87ed2 100644 --- a/DataSpec/DNAMP1/ScriptObjects/ThardusRockProjectile.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/ThardusRockProjectile.hpp @@ -20,11 +20,11 @@ struct ThardusRockProjectile : IScriptObject { UniqueID32 model; UniqueID32 stateMachine; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (model.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model); ent->name = name + "_model"; @@ -37,13 +37,14 @@ struct ThardusRockProjectile : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(model, pathsOut); g_curSpec->flattenDependencies(stateMachine, pathsOut); patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/Trigger.hpp b/DataSpec/DNAMP1/ScriptObjects/Trigger.hpp index 09490121c..a4eca7015 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Trigger.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Trigger.hpp @@ -18,7 +18,7 @@ struct Trigger : IScriptObject { Value deactivateOnEntered; Value deactivateOnExited; - zeus::CAABox getVISIAABB(hecl::blender::Token& btok) const { + zeus::CAABox getVISIAABB(hecl::blender::Token& btok) const override { zeus::CVector3f halfExtent = zeus::CVector3f(volume) / 2.f; zeus::CVector3f loc(location); return zeus::CAABox(loc - halfExtent, loc + halfExtent); diff --git a/DataSpec/DNAMP1/ScriptObjects/Tryclops.hpp b/DataSpec/DNAMP1/ScriptObjects/Tryclops.hpp index 03aa40e70..268797254 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Tryclops.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Tryclops.hpp @@ -19,20 +19,21 @@ struct Tryclops : IScriptObject { Value unknown3; Value unknown4; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { patternedInfo.nameIDs(pakRouter, name + "_patterned"); actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/VisorFlare.hpp b/DataSpec/DNAMP1/ScriptObjects/VisorFlare.hpp index e24a53788..7f8ff9dfb 100644 --- a/DataSpec/DNAMP1/ScriptObjects/VisorFlare.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/VisorFlare.hpp @@ -19,7 +19,7 @@ struct VisorFlare : IScriptObject { Value unknown7; FlareDefinition flareDefinitions[5]; - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { flareDefinitions[0].nameIDs(pakRouter, name + "_flare1"); flareDefinitions[1].nameIDs(pakRouter, name + "_flare2"); flareDefinitions[2].nameIDs(pakRouter, name + "_flare3"); @@ -27,7 +27,8 @@ struct VisorFlare : IScriptObject { flareDefinitions[4].nameIDs(pakRouter, name + "_flare5"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { for (int i = 0; i < 5; ++i) flareDefinitions[i].depIDs(pathsOut); } diff --git a/DataSpec/DNAMP1/ScriptObjects/VisorGoo.hpp b/DataSpec/DNAMP1/ScriptObjects/VisorGoo.hpp index d9389c7d9..19453a12e 100644 --- a/DataSpec/DNAMP1/ScriptObjects/VisorGoo.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/VisorGoo.hpp @@ -20,7 +20,7 @@ struct VisorGoo : IScriptObject { Value sfx; Value skipAngleTest; - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (particle.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle); ent->name = name + "_part"; @@ -31,7 +31,8 @@ struct VisorGoo : IScriptObject { } } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(particle, pathsOut); g_curSpec->flattenDependencies(electric, pathsOut); } diff --git a/DataSpec/DNAMP1/ScriptObjects/WallCrawlerSwarm.hpp b/DataSpec/DNAMP1/ScriptObjects/WallCrawlerSwarm.hpp index a47c48391..8115844ab 100644 --- a/DataSpec/DNAMP1/ScriptObjects/WallCrawlerSwarm.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/WallCrawlerSwarm.hpp @@ -48,11 +48,11 @@ struct WallCrawlerSwarm : IScriptObject { Value launchSfx; Value scatterSfx; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (part1.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(part1); ent->name = name + "_part1"; @@ -73,7 +73,8 @@ struct WallCrawlerSwarm : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(part1, pathsOut); g_curSpec->flattenDependencies(part2, pathsOut); g_curSpec->flattenDependencies(part3, pathsOut); @@ -82,6 +83,6 @@ struct WallCrawlerSwarm : IScriptObject { actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/Warwasp.hpp b/DataSpec/DNAMP1/ScriptObjects/Warwasp.hpp index 5bf2bd98b..429020cda 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Warwasp.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Warwasp.hpp @@ -22,11 +22,11 @@ struct Warwasp : IScriptObject { UniqueID32 projectileVisorParticle; Value projectileVisorSfx; - void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const { + void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const override { actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters); } - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (projectileWeapon.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(projectileWeapon); ent->name = name + "_wpsc"; @@ -39,13 +39,14 @@ struct Warwasp : IScriptObject { actorParameters.nameIDs(pakRouter, name + "_actp"); } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(projectileWeapon, pathsOut); g_curSpec->flattenDependencies(projectileVisorParticle, pathsOut); patternedInfo.depIDs(pathsOut); actorParameters.depIDs(pathsOut, lazyOut); } - void gatherScans(std::vector& scansOut) const { actorParameters.scanIDs(scansOut); } + void gatherScans(std::vector& scansOut) const override { actorParameters.scanIDs(scansOut); } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/ScriptObjects/Water.hpp b/DataSpec/DNAMP1/ScriptObjects/Water.hpp index ea76b9648..de643a266 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Water.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Water.hpp @@ -88,7 +88,7 @@ struct Water : IScriptObject { struct UnusedBitset : BigDNA{AT_DECL_EXPLICIT_DNA} unusedBitset; - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (patternMap1.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(patternMap1); ent->name = name + "_patternMap1"; @@ -139,7 +139,8 @@ struct Water : IScriptObject { } } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(patternMap1, pathsOut); g_curSpec->flattenDependencies(patternMap2, pathsOut); g_curSpec->flattenDependencies(colorMap, pathsOut); @@ -154,7 +155,7 @@ struct Water : IScriptObject { g_curSpec->flattenDependencies(unmorphVisorRunoffParticle, pathsOut); } - zeus::CAABox getVISIAABB(hecl::blender::Token& btok) const { + zeus::CAABox getVISIAABB(hecl::blender::Token& btok) const override { zeus::CVector3f halfExtent = zeus::CVector3f(volume) / 2.f; zeus::CVector3f loc(location); return zeus::CAABox(loc - halfExtent, loc + halfExtent); diff --git a/DataSpec/DNAMP1/ScriptObjects/WorldTeleporter.hpp b/DataSpec/DNAMP1/ScriptObjects/WorldTeleporter.hpp index bf3fb5027..c76176d39 100644 --- a/DataSpec/DNAMP1/ScriptObjects/WorldTeleporter.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/WorldTeleporter.hpp @@ -38,7 +38,7 @@ struct WorldTeleporter : IScriptObject { Value unknown15; Value unknown16; - void nameIDs(PAKRouter& pakRouter) const { + void nameIDs(PAKRouter& pakRouter) const override { if (platformModel.isValid()) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(platformModel); ent->name = name + "_model1"; @@ -53,7 +53,8 @@ struct WorldTeleporter : IScriptObject { } } - void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { + void gatherDependencies(std::vector& pathsOut, + std::vector& lazyOut) const override { g_curSpec->flattenDependencies(platformModel, pathsOut); g_curSpec->flattenDependencies(backgroundModel, pathsOut); g_curSpec->flattenDependencies(strg, pathsOut); diff --git a/DataSpec/DNAMP1/Tweaks/CTweakAutoMapper.hpp b/DataSpec/DNAMP1/Tweaks/CTweakAutoMapper.hpp index f76ed4d84..85d8b44d7 100644 --- a/DataSpec/DNAMP1/Tweaks/CTweakAutoMapper.hpp +++ b/DataSpec/DNAMP1/Tweaks/CTweakAutoMapper.hpp @@ -77,60 +77,60 @@ struct CTweakAutoMapper final : public ITweakAutoMapper { CTweakAutoMapper() = default; CTweakAutoMapper(athena::io::IStreamReader& r) { this->read(r); } - bool GetShowOneMiniMapArea() const { return x4_24_showOneMiniMapArea; } - bool GetScaleMoveSpeedWithCamDist() const { return x4_26_scaleMoveSpeedWithCamDist; } - float GetCamDist() const { return x8_camDist; } - float GetMinCamDist() const { return xc_minCamDist; } - float GetMaxCamDist() const { return x10_maxCamDist; } - float GetMinCamRotateX() const { return x14_minCamRotateX; } - float GetMaxCamRotateX() const { return x18_maxCamRotateX; } - float GetCamAngle() const { return x1c_camAngle; } - const zeus::CColor& GetAutomapperWidgetColor() const { return x24_automapperWidgetColor; } - float GetMiniCamDist() const { return x28_miniCamDist; } - float GetMiniCamXAngle() const { return x2c_miniCamXAngle; } - float GetMiniCamAngle() const { return x30_miniCamAngle; } - const zeus::CColor& GetAutomapperWidgetMiniColor() const { return x38_automapperWidgetMiniColor; } - const zeus::CColor& GetSurfaceVisitedColor() const { return x3c_surfColorVisited; } - const zeus::CColor& GetOutlineVisitedColor() const { return x40_outlineColorVisited; } - const zeus::CColor& GetSurfaceUnvisitedColor() const { return x44_surfColorUnvisited; } - const zeus::CColor& GetOutlineUnvisitedColor() const { return x48_outlineColorUnvisited; } - const zeus::CColor& GetSurfaceSelectVisitedColor() const { return x4c_surfaceSelectColorVisited; } - const zeus::CColor& GetOutlineSelectVisitedColor() const { return x50_outlineSelectColorVisited; } - float GetMapSurfaceNormColorLinear() const { return x54_mapSurfaceNormColorLinear; } - float GetMapSurfaceNormColorConstant() const { return x58_mapSurfaceNormColorConstant; } - float GetOpenMapScreenTime() const { return x64_openMapScreenTime; } - float GetCloseMapScreenTime() const { return x68_closeMapScreenTime; } - float GetHintPanTime() const { return x6c_hintPanTime; } - float GetCamZoomUnitsPerFrame() const { return x70_zoomUnitsPerFrame; } - float GetCamRotateDegreesPerFrame() const { return x74_rotateDegPerFrame; } - float GetBaseMapScreenCameraMoveSpeed() const { return x78_baseMapScreenCameraMoveSpeed; } - const zeus::CColor& GetSurfaceSelectUnvisitedColor() const { return x7c_surfaceSelectColorUnvisited; } - const zeus::CColor& GetOutlineSelectUnvisitedColor() const { return x80_outlineSelectColorUnvisited; } - float GetMiniAlphaSurfaceVisited() const { return x84_miniAlphaSurfaceVisited; } - float GetAlphaSurfaceVisited() const { return x88_alphaSurfaceVisited; } - float GetMiniAlphaOutlineVisited() const { return x8c_miniAlphaOutlineVisited; } - float GetAlphaOutlineVisited() const { return x90_alphaOutlineVisited; } - float GetMiniAlphaSurfaceUnvisited() const { return x94_miniAlphaSurfaceUnvisited; } - float GetAlphaSurfaceUnvisited() const { return x98_alphaSurfaceUnvisited; } - float GetMiniAlphaOutlineUnvisited() const { return x9c_miniAlphaOutlineUnvisited; } - float GetAlphaOutlineUnvisited() const { return xa0_alphaOutlineUnvisited; } - const zeus::CVector3f& GetDoorCenter() const { return xa4_doorCenter; } - float GetMiniMapViewportWidth() const { return xb8_miniMapViewportWidth; } - float GetMiniMapViewportHeight() const { return xbc_miniMapViewportHeight; } - float GetMiniMapCamDistScale() const { return xc0_miniMapCamDistScale; } - float GetMapPlaneScaleX() const { return xc4_mapPlaneScaleX; } - float GetMapPlaneScaleZ() const { return xc8_mapPlaneScaleZ; } - float GetUniverseCamDist() const { return xd0_universeCamDist; } - float GetMinUniverseCamDist() const { return xd4_minUniverseCamDist; } - float GetMaxUniverseCamDist() const { return xd8_maxUniverseCamDist; } - float GetSwitchToFromUniverseTime() const { return xdc_switchToFromUniverseTime; } - float GetCamPanUnitsPerFrame() const { return xe0_camPanUnitsPerFrame; } - float GetAutomapperScaleX() const { return xe4_automapperScaleX; } - float GetAutomapperScaleZ() const { return xe8_automapperScaleZ; } - float GetCamVerticalOffset() const { return xec_camVerticalOffset; } - const zeus::CColor& GetMiniMapSamusModColor() const { return xf0_miniMapSamusModColor; } - const zeus::CColor& GetAreaFlashPulseColor() const { return xf4_areaFlashPulseColor; } - const zeus::CColor& GetDoorColor(int idx) const { return x104_doorColors[idx]; } - const zeus::CColor& GetOpenDoorColor() const { return x11c_openDoorColor; } + bool GetShowOneMiniMapArea() const override { return x4_24_showOneMiniMapArea; } + bool GetScaleMoveSpeedWithCamDist() const override { return x4_26_scaleMoveSpeedWithCamDist; } + float GetCamDist() const override { return x8_camDist; } + float GetMinCamDist() const override { return xc_minCamDist; } + float GetMaxCamDist() const override { return x10_maxCamDist; } + float GetMinCamRotateX() const override { return x14_minCamRotateX; } + float GetMaxCamRotateX() const override { return x18_maxCamRotateX; } + float GetCamAngle() const override { return x1c_camAngle; } + const zeus::CColor& GetAutomapperWidgetColor() const override { return x24_automapperWidgetColor; } + float GetMiniCamDist() const override { return x28_miniCamDist; } + float GetMiniCamXAngle() const override { return x2c_miniCamXAngle; } + float GetMiniCamAngle() const override { return x30_miniCamAngle; } + const zeus::CColor& GetAutomapperWidgetMiniColor() const override { return x38_automapperWidgetMiniColor; } + const zeus::CColor& GetSurfaceVisitedColor() const override { return x3c_surfColorVisited; } + const zeus::CColor& GetOutlineVisitedColor() const override { return x40_outlineColorVisited; } + const zeus::CColor& GetSurfaceUnvisitedColor() const override { return x44_surfColorUnvisited; } + const zeus::CColor& GetOutlineUnvisitedColor() const override { return x48_outlineColorUnvisited; } + const zeus::CColor& GetSurfaceSelectVisitedColor() const override { return x4c_surfaceSelectColorVisited; } + const zeus::CColor& GetOutlineSelectVisitedColor() const override { return x50_outlineSelectColorVisited; } + float GetMapSurfaceNormColorLinear() const override { return x54_mapSurfaceNormColorLinear; } + float GetMapSurfaceNormColorConstant() const override { return x58_mapSurfaceNormColorConstant; } + float GetOpenMapScreenTime() const override { return x64_openMapScreenTime; } + float GetCloseMapScreenTime() const override { return x68_closeMapScreenTime; } + float GetHintPanTime() const override { return x6c_hintPanTime; } + float GetCamZoomUnitsPerFrame() const override { return x70_zoomUnitsPerFrame; } + float GetCamRotateDegreesPerFrame() const override { return x74_rotateDegPerFrame; } + float GetBaseMapScreenCameraMoveSpeed() const override { return x78_baseMapScreenCameraMoveSpeed; } + const zeus::CColor& GetSurfaceSelectUnvisitedColor() const override { return x7c_surfaceSelectColorUnvisited; } + const zeus::CColor& GetOutlineSelectUnvisitedColor() const override { return x80_outlineSelectColorUnvisited; } + float GetMiniAlphaSurfaceVisited() const override { return x84_miniAlphaSurfaceVisited; } + float GetAlphaSurfaceVisited() const override { return x88_alphaSurfaceVisited; } + float GetMiniAlphaOutlineVisited() const override { return x8c_miniAlphaOutlineVisited; } + float GetAlphaOutlineVisited() const override { return x90_alphaOutlineVisited; } + float GetMiniAlphaSurfaceUnvisited() const override { return x94_miniAlphaSurfaceUnvisited; } + float GetAlphaSurfaceUnvisited() const override { return x98_alphaSurfaceUnvisited; } + float GetMiniAlphaOutlineUnvisited() const override { return x9c_miniAlphaOutlineUnvisited; } + float GetAlphaOutlineUnvisited() const override { return xa0_alphaOutlineUnvisited; } + const zeus::CVector3f& GetDoorCenter() const override { return xa4_doorCenter; } + float GetMiniMapViewportWidth() const override { return xb8_miniMapViewportWidth; } + float GetMiniMapViewportHeight() const override { return xbc_miniMapViewportHeight; } + float GetMiniMapCamDistScale() const override { return xc0_miniMapCamDistScale; } + float GetMapPlaneScaleX() const override { return xc4_mapPlaneScaleX; } + float GetMapPlaneScaleZ() const override { return xc8_mapPlaneScaleZ; } + float GetUniverseCamDist() const override { return xd0_universeCamDist; } + float GetMinUniverseCamDist() const override { return xd4_minUniverseCamDist; } + float GetMaxUniverseCamDist() const override { return xd8_maxUniverseCamDist; } + float GetSwitchToFromUniverseTime() const override { return xdc_switchToFromUniverseTime; } + float GetCamPanUnitsPerFrame() const override { return xe0_camPanUnitsPerFrame; } + float GetAutomapperScaleX() const override { return xe4_automapperScaleX; } + float GetAutomapperScaleZ() const override { return xe8_automapperScaleZ; } + float GetCamVerticalOffset() const override { return xec_camVerticalOffset; } + const zeus::CColor& GetMiniMapSamusModColor() const override { return xf0_miniMapSamusModColor; } + const zeus::CColor& GetAreaFlashPulseColor() const override { return xf4_areaFlashPulseColor; } + const zeus::CColor& GetDoorColor(int idx) const override { return x104_doorColors[idx]; } + const zeus::CColor& GetOpenDoorColor() const override { return x11c_openDoorColor; } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/Tweaks/CTweakBall.hpp b/DataSpec/DNAMP1/Tweaks/CTweakBall.hpp index 62f941d34..3e0f94be3 100644 --- a/DataSpec/DNAMP1/Tweaks/CTweakBall.hpp +++ b/DataSpec/DNAMP1/Tweaks/CTweakBall.hpp @@ -127,66 +127,70 @@ struct CTweakBall final : public ITweakBall { x1ec_maxLeanAngle = zeus::degToRad(x1ec_maxLeanAngle); } - float GetMaxBallTranslationAcceleration(int s) const { return x4_maxTranslationAcceleration[s]; } - float GetBallTranslationFriction(int s) const { return x24_translationFriction[s]; } - float GetBallTranslationMaxSpeed(int s) const { return x44_translationMaxSpeed[s]; } - float GetBallCameraElevation() const { return 2.736f; } - float GetBallCameraAnglePerSecond() const { return x74_ballCameraAnglePerSecond; } - const zeus::CVector3f& GetBallCameraOffset() const { return x78_ballCameraOffset; } - float GetBallCameraMinSpeedDistance() const { return x84_ballCameraMinSpeedDistance; } - float GetBallCameraMaxSpeedDistance() const { return x88_ballCameraMaxSpeedDistance; } - float GetBallCameraBackwardsDistance() const { return x8c_ballCameraBackwardsDistance; } - float GetBallCameraSpringConstant() const { return x94_ballCameraSpringConstant; } - float GetBallCameraSpringMax() const { return x98_ballCameraSpringMax; } - float GetBallCameraSpringTardis() const { return x9c_ballCameraSpringTardis; } - float GetBallCameraCentroidSpringConstant() const { return xa0_ballCameraCentroidSpringConstant; } - float GetBallCameraCentroidSpringMax() const { return xa4_ballCameraCentroidSpringMax; } - float GetBallCameraCentroidSpringTardis() const { return xa8_ballCameraCentroidSpringTardis; } - float GetBallCameraCentroidDistanceSpringConstant() const { return xac_ballCameraCentroidDistanceSpringConstant; } - float GetBallCameraCentroidDistanceSpringMax() const { return xb0_ballCameraCentroidDistanceSpringMax; } - float GetBallCameraCentroidDistanceSpringTardis() const { return xb4_ballCameraCentroidDistanceSpringTardis; } - float GetBallCameraLookAtSpringConstant() const { return xb8_ballCameraLookAtSpringConstant; } - float GetBallCameraLookAtSpringMax() const { return xbc_ballCameraLookAtSpringMax; } - float GetBallCameraLookAtSpringTardis() const { return xc0_ballCameraLookAtSpringTardis; } - float GetBallForwardBrakingAcceleration(int s) const { return xc4_ballForwardBrakingAcceleration[s]; } - float GetBallGravity() const { return xe4_ballGravity; } - float GetBallWaterGravity() const { return xe8_ballWaterGravity; } - float GetBallSlipFactor(int s) const { return x12c_ballSlipFactor[s]; } - float GetConservativeDoorCameraDistance() const { return x170_conservativeDoorCamDistance; } - float GetBallCameraChaseElevation() const { return x178_ballCameraChaseElevation; } - float GetBallCameraChaseDampenAngle() const { return x17c_ballCameraChaseDampenAngle; } - float GetBallCameraChaseDistance() const { return x180_ballCameraChaseDistance; } - float GetBallCameraChaseYawSpeed() const { return x184_ballCameraChaseYawSpeed; } - float GetBallCameraChaseAnglePerSecond() const { return x188_ballCameraChaseAnglePerSecond; } - const zeus::CVector3f& GetBallCameraChaseLookAtOffset() const { return x18c_ballCameraChaseLookAtOffset; } - float GetBallCameraChaseSpringConstant() const { return x198_ballCameraChaseSpringConstant; } - float GetBallCameraChaseSpringMax() const { return x19c_ballCameraChaseSpringMax; } - float GetBallCameraChaseSpringTardis() const { return x1a0_ballCameraChaseSpringTardis; } - float GetBallCameraBoostElevation() const { return x1a4_ballCameraBoostElevation; } - float GetBallCameraBoostDampenAngle() const { return x1a8_ballCameraBoostDampenAngle; } - float GetBallCameraBoostDistance() const { return x1ac_ballCameraBoostDistance; } - float GetBallCameraBoostYawSpeed() const { return x1b0_ballCameraBoostYawSpeed; } - float GetBallCameraBoostAnglePerSecond() const { return x1b4_ballCameraBoostAnglePerSecond; } - const zeus::CVector3f& GetBallCameraBoostLookAtOffset() const { return x1b8_ballCameraBoostLookAtOffset; } - float GetBallCameraBoostSpringConstant() const { return x1c4_ballCameraBoostSpringConstant; } - float GetBallCameraBoostSpringMax() const { return x1c8_ballCameraBoostSpringMax; } - float GetBallCameraBoostSpringTardis() const { return x1cc_ballCameraBoostSpringTardis; } - float GetBallCameraControlDistance() const { return x1d0_ballCameraControlDistance; } - float GetMinimumAlignmentSpeed() const { return x1dc_minimumAlignmentSpeed; } - float GetTireness() const { return x1e0_tireness; } - float GetMaxLeanAngle() const { return x1ec_maxLeanAngle; } - float GetTireToMarbleThresholdSpeed() const { return x1f0_tireToMarbleThresholdSpeed; } - float GetMarbleToTireThresholdSpeed() const { return x1f4_marbleToTireThresholdSpeed; } - float GetForceToLeanGain() const { return x1f8_forceToLeanGain; } - float GetLeanTrackingGain() const { return x1fc_leanTrackingGain; } - float GetLeftStickDivisor() const { return x1e4_leftStickDivisor; } - float GetRightStickDivisor() const { return x1e8_rightStickDivisor; } - float GetBallTouchRadius() const { return x204_ballTouchRadius; } - float GetBoostBallDrainTime() const { return x20c_boostBallDrainTime; } - float GetBoostBallMaxChargeTime() const { return x210_boostBallMaxChargeTime; } - float GetBoostBallMinChargeTime() const { return x218_boostBallMinChargeTime; } - float GetBoostBallMinRelativeSpeedForDamage() const { return x21c_boostBallMinRelativeSpeedForDamage; } - float GetBoostBallChargeTimeTable(int i) const { + float GetMaxBallTranslationAcceleration(int s) const override { return x4_maxTranslationAcceleration[s]; } + float GetBallTranslationFriction(int s) const override { return x24_translationFriction[s]; } + float GetBallTranslationMaxSpeed(int s) const override { return x44_translationMaxSpeed[s]; } + float GetBallCameraElevation() const override { return 2.736f; } + float GetBallCameraAnglePerSecond() const override { return x74_ballCameraAnglePerSecond; } + const zeus::CVector3f& GetBallCameraOffset() const override { return x78_ballCameraOffset; } + float GetBallCameraMinSpeedDistance() const override { return x84_ballCameraMinSpeedDistance; } + float GetBallCameraMaxSpeedDistance() const override { return x88_ballCameraMaxSpeedDistance; } + float GetBallCameraBackwardsDistance() const override { return x8c_ballCameraBackwardsDistance; } + float GetBallCameraSpringConstant() const override { return x94_ballCameraSpringConstant; } + float GetBallCameraSpringMax() const override { return x98_ballCameraSpringMax; } + float GetBallCameraSpringTardis() const override { return x9c_ballCameraSpringTardis; } + float GetBallCameraCentroidSpringConstant() const override { return xa0_ballCameraCentroidSpringConstant; } + float GetBallCameraCentroidSpringMax() const override { return xa4_ballCameraCentroidSpringMax; } + float GetBallCameraCentroidSpringTardis() const override { return xa8_ballCameraCentroidSpringTardis; } + float GetBallCameraCentroidDistanceSpringConstant() const override { + return xac_ballCameraCentroidDistanceSpringConstant; + } + float GetBallCameraCentroidDistanceSpringMax() const override { return xb0_ballCameraCentroidDistanceSpringMax; } + float GetBallCameraCentroidDistanceSpringTardis() const override { + return xb4_ballCameraCentroidDistanceSpringTardis; + } + float GetBallCameraLookAtSpringConstant() const override { return xb8_ballCameraLookAtSpringConstant; } + float GetBallCameraLookAtSpringMax() const override { return xbc_ballCameraLookAtSpringMax; } + float GetBallCameraLookAtSpringTardis() const override { return xc0_ballCameraLookAtSpringTardis; } + float GetBallForwardBrakingAcceleration(int s) const override { return xc4_ballForwardBrakingAcceleration[s]; } + float GetBallGravity() const override { return xe4_ballGravity; } + float GetBallWaterGravity() const override { return xe8_ballWaterGravity; } + float GetBallSlipFactor(int s) const override { return x12c_ballSlipFactor[s]; } + float GetConservativeDoorCameraDistance() const override { return x170_conservativeDoorCamDistance; } + float GetBallCameraChaseElevation() const override { return x178_ballCameraChaseElevation; } + float GetBallCameraChaseDampenAngle() const override { return x17c_ballCameraChaseDampenAngle; } + float GetBallCameraChaseDistance() const override { return x180_ballCameraChaseDistance; } + float GetBallCameraChaseYawSpeed() const override { return x184_ballCameraChaseYawSpeed; } + float GetBallCameraChaseAnglePerSecond() const override { return x188_ballCameraChaseAnglePerSecond; } + const zeus::CVector3f& GetBallCameraChaseLookAtOffset() const override { return x18c_ballCameraChaseLookAtOffset; } + float GetBallCameraChaseSpringConstant() const override { return x198_ballCameraChaseSpringConstant; } + float GetBallCameraChaseSpringMax() const override { return x19c_ballCameraChaseSpringMax; } + float GetBallCameraChaseSpringTardis() const override { return x1a0_ballCameraChaseSpringTardis; } + float GetBallCameraBoostElevation() const override { return x1a4_ballCameraBoostElevation; } + float GetBallCameraBoostDampenAngle() const override { return x1a8_ballCameraBoostDampenAngle; } + float GetBallCameraBoostDistance() const override { return x1ac_ballCameraBoostDistance; } + float GetBallCameraBoostYawSpeed() const override { return x1b0_ballCameraBoostYawSpeed; } + float GetBallCameraBoostAnglePerSecond() const override { return x1b4_ballCameraBoostAnglePerSecond; } + const zeus::CVector3f& GetBallCameraBoostLookAtOffset() const override { return x1b8_ballCameraBoostLookAtOffset; } + float GetBallCameraBoostSpringConstant() const override { return x1c4_ballCameraBoostSpringConstant; } + float GetBallCameraBoostSpringMax() const override { return x1c8_ballCameraBoostSpringMax; } + float GetBallCameraBoostSpringTardis() const override { return x1cc_ballCameraBoostSpringTardis; } + float GetBallCameraControlDistance() const override { return x1d0_ballCameraControlDistance; } + float GetMinimumAlignmentSpeed() const override { return x1dc_minimumAlignmentSpeed; } + float GetTireness() const override { return x1e0_tireness; } + float GetMaxLeanAngle() const override { return x1ec_maxLeanAngle; } + float GetTireToMarbleThresholdSpeed() const override { return x1f0_tireToMarbleThresholdSpeed; } + float GetMarbleToTireThresholdSpeed() const override { return x1f4_marbleToTireThresholdSpeed; } + float GetForceToLeanGain() const override { return x1f8_forceToLeanGain; } + float GetLeanTrackingGain() const override { return x1fc_leanTrackingGain; } + float GetLeftStickDivisor() const override { return x1e4_leftStickDivisor; } + float GetRightStickDivisor() const override { return x1e8_rightStickDivisor; } + float GetBallTouchRadius() const override { return x204_ballTouchRadius; } + float GetBoostBallDrainTime() const override { return x20c_boostBallDrainTime; } + float GetBoostBallMaxChargeTime() const override { return x210_boostBallMaxChargeTime; } + float GetBoostBallMinChargeTime() const override { return x218_boostBallMinChargeTime; } + float GetBoostBallMinRelativeSpeedForDamage() const override { return x21c_boostBallMinRelativeSpeedForDamage; } + float GetBoostBallChargeTimeTable(int i) const override { switch (i) { default: case 0: @@ -197,7 +201,7 @@ struct CTweakBall final : public ITweakBall { return x228_boostBallChargeTime2; } } - float GetBoostBallIncrementalSpeedTable(int i) const { + float GetBoostBallIncrementalSpeedTable(int i) const override { switch (i) { default: case 0: diff --git a/DataSpec/DNAMP1/Tweaks/CTweakGame.hpp b/DataSpec/DNAMP1/Tweaks/CTweakGame.hpp index 714f7e048..3bc385287 100644 --- a/DataSpec/DNAMP1/Tweaks/CTweakGame.hpp +++ b/DataSpec/DNAMP1/Tweaks/CTweakGame.hpp @@ -29,24 +29,24 @@ struct CTweakGame final : ITweakGame { Value x60_hardmodeDamageMult; Value x64_hardmodeWeaponMult; - std::string_view GetWorldPrefix() const { return x4_worldPrefix; } + std::string_view GetWorldPrefix() const override { return x4_worldPrefix; } std::string_view GetDefaultRoom() const { return x14_defaultRoom; } - bool GetSplashScreensDisabled() const { return x2b_splashScreensDisabled; } - float GetFirstPersonFOV() const { return x24_fov; } - float GetPressStartDelay() const { return x30_pressStartDelay; } - float GetWavecapIntensityNormal() const { return x34_wavecapIntensityNormal; } - float GetWavecapIntensityPoison() const { return x38_wavecapIntensityPoison; } - float GetWavecapIntensityLava() const { return x3c_wavecapIntensityLava; } - float GetRippleIntensityNormal() const { return x40_rippleIntensityNormal; } - float GetRippleIntensityPoison() const { return x44_rippleIntentityPoison; } - float GetRippleIntensityLava() const { return x48_rippleIntensityLava; } - float GetFluidEnvBumpScale() const { return x4c_fluidEnvBumpScale; } - float GetWaterFogDistanceBase() const { return x50_waterFogDistanceBase; } - float GetWaterFogDistanceRange() const { return x54_waterFogDistanceRange; } - float GetGravityWaterFogDistanceBase() const { return x58_gravityWaterFogDistanceBase; } - float GetGravityWaterFogDistanceRange() const { return x5c_gravityWaterFogDistanceRange; } - float GetHardModeDamageMultiplier() const { return x60_hardmodeDamageMult; } - float GetHardModeWeaponMultiplier() const { return x64_hardmodeWeaponMult; } + bool GetSplashScreensDisabled() const override { return x2b_splashScreensDisabled; } + float GetFirstPersonFOV() const override { return x24_fov; } + float GetPressStartDelay() const override { return x30_pressStartDelay; } + float GetWavecapIntensityNormal() const override { return x34_wavecapIntensityNormal; } + float GetWavecapIntensityPoison() const override { return x38_wavecapIntensityPoison; } + float GetWavecapIntensityLava() const override { return x3c_wavecapIntensityLava; } + float GetRippleIntensityNormal() const override { return x40_rippleIntensityNormal; } + float GetRippleIntensityPoison() const override { return x44_rippleIntentityPoison; } + float GetRippleIntensityLava() const override { return x48_rippleIntensityLava; } + float GetFluidEnvBumpScale() const override { return x4c_fluidEnvBumpScale; } + float GetWaterFogDistanceBase() const override { return x50_waterFogDistanceBase; } + float GetWaterFogDistanceRange() const override { return x54_waterFogDistanceRange; } + float GetGravityWaterFogDistanceBase() const override { return x58_gravityWaterFogDistanceBase; } + float GetGravityWaterFogDistanceRange() const override { return x5c_gravityWaterFogDistanceRange; } + float GetHardModeDamageMultiplier() const override { return x60_hardmodeDamageMult; } + float GetHardModeWeaponMultiplier() const override { return x64_hardmodeWeaponMult; } CTweakGame() = default; CTweakGame(athena::io::IStreamReader& in) { this->read(in); @@ -55,6 +55,6 @@ struct CTweakGame final : ITweakGame { #endif } - void initCVars(hecl::CVarManager* mgr); + void initCVars(hecl::CVarManager* mgr) override; }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/Tweaks/CTweakGui.hpp b/DataSpec/DNAMP1/Tweaks/CTweakGui.hpp index b4b181026..109eae1e9 100644 --- a/DataSpec/DNAMP1/Tweaks/CTweakGui.hpp +++ b/DataSpec/DNAMP1/Tweaks/CTweakGui.hpp @@ -187,122 +187,122 @@ struct CTweakGui final : ITweakGui { FixupValues(); } - float GetMapAlphaInterpolant() const { return x8_mapAlphaInterp; } - float GetPauseBlurFactor() const { return xc_pauseBlurFactor; } - float GetRadarXYRadius() const { return x10_radarXYRadius; } - float GetRadarZRadius() const { return x24_radarZRadius; } - float GetRadarZCloseRadius() const { return x28_radarZCloseRadius; } - float GetEnergyBarFilledSpeed() const { return x34_energyBarFilledSpeed; } - float GetEnergyBarShadowSpeed() const { return x38_energyBarShadowSpeed; } - float GetEnergyBarDrainDelay() const { return x3c_energyBarDrainDelay; } - bool GetEnergyBarAlwaysResetDelay() const { return x40_energyBarAlwaysResetDelay; } - float GetHudDamagePracticalsGainConstant() const { return x44_hudDamagePracticalsGainConstant; } - float GetHudDamagePracticalsGainLinear() const { return x48_hudDamagePracticalsGainLinear; } - float GetHudDamagePracticalsInitConstant() const { return x4c_hudDamagePracticalsInitConstant; } - float GetHudDamagePracticalsInitLinear() const { return x50_hudDamagePracticalsInitLinear; } - float GetHudDamageLightSpotAngle() const { return x54_hudDamageLightSpotAngle; } - float GetDamageLightAngleC() const { return x58_damageLightAngleC; } - float GetDamageLightAngleL() const { return x5c_damageLightAngleL; } - float GetDamageLightAngleQ() const { return x60_damageLightAngleQ; } - atVec3f GetDamageLightPreTranslate() const { return x64_damageLightPreTranslate; } - atVec3f GetDamageLightCenterTranslate() const { return x70_damageLightCenterTranslate; } - float GetDamageLightXfXAngle() const { return x7c_damageLightXfXAngle; } - float GetDamageLightXfZAngle() const { return x80_damageLightXfZAngle; } - float GetHudDecoShakeTranslateVelConstant() const { return x84_hudDecoShakeTranslateVelConstant; } - float GetHudDecoShakeTranslateVelLinear() const { return x88_hudDecoShakeTranslateVelLinear; } - float GetMaxDecoDamageShakeTranslate() const { return x8c_maxDecoDamageShakeTranslate; } - float GetDecoDamageShakeDeceleration() const { return x90_decoDamageShakeDeceleration; } - float GetDecoShakeGainConstant() const { return x94_decoShakeGainConstant; } - float GetDecoShakeGainLinear() const { return x98_decoShakeGainLinear; } - float GetDecoShakeInitConstant() const { return x9c_decoShakeInitConstant; } - float GetDecoShakeInitLinear() const { return xa0_decoShakeInitLinear; } - float GetMaxDecoDamageShakeRotate() const { return xa4_maxDecoDamageShakeRotate; } - atUint32 GetHudCamFovTweak() const { return xa8_hudCamFovTweak; } - atUint32 GetHudCamYTweak() const { return xac_hudCamYTweak; } - atUint32 GetHudCamZTweak() const { return xb0_hudCamZTweak; } - float GetBeamVisorMenuAnimTime() const { return xc0_beamVisorMenuAnimTime; } - float GetVisorBeamMenuItemActiveScale() const { return xc4_visorBeamMenuItemActiveScale; } - float GetVisorBeamMenuItemInactiveScale() const { return xc8_visorBeamMenuItemInactiveScale; } - float GetVisorBeamMenuItemTranslate() const { return xcc_visorBeamMenuItemTranslate; } - float GetThreatRange() const { return xe4_threatRange; } - float GetRadarScopeCoordRadius() const { return xe8_radarScopeCoordRadius; } - float GetRadarPlayerPaintRadius() const { return xec_radarPlayerPaintRadius; } - float GetRadarEnemyPaintRadius() const { return xf0_radarEnemyPaintRadius; } - float GetMissileArrowVisTime() const { return xf4_missileArrowVisTime; } - EHudVisMode GetHudVisMode() const { return xf8_hudVisMode; } - EHelmetVisMode GetHelmetVisMode() const { return xfc_helmetVisMode; } - atUint32 GetEnableAutoMapper() const { return x100_enableAutoMapper; } - atUint32 GetEnableTargetingManager() const { return x108_enableTargetingManager; } - atUint32 GetEnablePlayerVisor() const { return x10c_enablePlayerVisor; } - float GetThreatWarningFraction() const { return x110_threatWarningFraction; } - float GetMissileWarningFraction() const { return x114_missileWarningFraction; } - float GetFreeLookFadeTime() const { return x118_freeLookFadeTime; } - float GetFreeLookSfxPitchScale() const { return x12c_freeLookSfxPitchScale; } - bool GetNoAbsoluteFreeLookSfxPitch() const { return x130_noAbsoluteFreeLookSfxPitch; } - float GetFaceReflectionOrthoWidth() const { return x13c_faceReflectionOrthoWidth; } - float GetFaceReflectionOrthoHeight() const { return x140_faceReflectionOrthoHeight; } - float GetFaceReflectionDistance() const { return x144_faceReflectionDistance; } - float GetFaceReflectionHeight() const { return x148_faceReflectionHeight; } - float GetFaceReflectionAspect() const { return x14c_faceReflectionAspect; } - float GetMissileWarningPulseTime() const { return x1a0_missileWarningPulseTime; } - float GetExplosionLightFalloffMultConstant() const { return x1a4_explosionLightFalloffMultConstant; } - float GetExplosionLightFalloffMultLinear() const { return x1a8_explosionLightFalloffMultLinear; } - float GetExplosionLightFalloffMultQuadratic() const { return x1ac_explosionLightFalloffMultQuadratic; } - float GetHudDamagePeakFactor() const { return x1b4_hudDamagePeakFactor; } - float GetHudDamageFilterGainConstant() const { return x1b8_hudDamageFilterGainConstant; } - float GetHudDamageFilterGainLinear() const { return x1bc_hudDamageFilterGainLinear; } - float GetHudDamageFilterInitConstant() const { return x1c0_hudDamageFilterInitConstant; } - float GetHudDamageFilterInitLinear() const { return x1c4_hudDamageFilterInitLinear; } - float GetEnergyDrainModPeriod() const { return x1c8_energyDrainModPeriod; } - bool GetEnergyDrainSinusoidalPulse() const { return x1cc_energyDrainSinusoidalPulse; } - bool GetEnergyDrainFilterAdditive() const { return x1cd_energyDrainFilterAdditive; } - float GetHudDamagePulseDuration() const { return x1d0_hudDamagePulseDuration; } - float GetHudDamageColorGain() const { return x1d4_hudDamageColorGain; } - float GetHudDecoShakeTranslateGain() const { return x1d8_hudDecoShakeTranslateGain; } - float GetHudLagOffsetScale() const { return x1dc_hudLagOffsetScale; } - float GetXrayBlurScaleLinear() const { return x204_xrayBlurScaleLinear; } - float GetXrayBlurScaleQuadratic() const { return x208_xrayBlurScaleQuadratic; } - float GetScanSidesAngle() const { return x210_scanSidesAngle; } - float GetScanSidesXScale() const { return x214_scanSidesXScale; } - float GetScanSidesPositionEnd() const { return x218_scanSidesPositionEnd; } - float GetScanSidesDuration() const { return x220_scanSidesDuration; } - float GetScanSidesStartTime() const { return x224_scanSidesStartTime; } - float GetScanSidesEndTime() const { return x228_scanSidesEndTime; } - float GetScanDataDotRadius() const { return x22c_scanDataDotRadius; } - float GetScanDataDotPosRandMagnitude() const { return x230_scanDataDotPosRandMag; } - float GetScanDataDotSeekDurationMin() const { return x234_scanDataDotSeekDurationMin; } - float GetScanDataDotSeekDurationMax() const { return x238_scanDataDotSeekDurationMax; } - float GetScanDataDotHoldDurationMin() const { return x23c_scanDataDotHoldDurationMin; } - float GetScanDataDotHoldDurationMax() const { return x240_scanDataDotHoldDurationMax; } - float GetScanAppearanceDuration() const { return x244_scanAppearanceDuration; } - float GetScanPaneFlashFactor() const { return x248_scanPaneFlashFactor; } - float GetScanPaneFadeInTime() const { return x24c_scanPaneFadeInTime; } - float GetScanPaneFadeOutTime() const { return x250_scanPaneFadeOutTime; } - float GetBallViewportYReduction() const { return x254_ballViewportYReduction; } - float GetScanWindowIdleWidth() const { return x258_scanWindowIdleW; } - float GetScanWindowIdleHeight() const { return x25c_scanWindowIdleH; } - float GetScanWindowActiveWidth() const { return x260_scanWindowActiveW; } - float GetScanWindowActiveHeight() const { return x264_scanWindowActiveH; } - float GetScanWindowMagnification() const { return x268_scanWindowMagnification; } - float GetScanWindowScanningAspect() const { return x26c_scanWindowScanningAspect; } - float GetScanSidesPositionStart() const { return x270_scanSidesPositionStart; } - bool GetShowAutomapperInMorphball() const { return x274_showAutomapperInMorphball; } - bool GetLatchArticleText() const { return x275_latchArticleText; } - float GetWorldTransManagerCharsPerSfx() const { return x278_wtMgrCharsPerSfx; } - atUint32 GetXRayFogMode() const { return x27c_xrayFogMode; } - float GetXRayFogNearZ() const { return x280_xrayFogNearZ; } - float GetXRayFogFarZ() const { return x284_xrayFogFarZ; } - const zeus::CColor& GetXRayFogColor() const { return x288_xrayFogColor; } - float GetThermalVisorLevel() const { return x28c_thermalVisorLevel; } - const zeus::CColor& GetThermalVisorColor() const { return x290_thermalVisorColor; } - const zeus::CColor& GetVisorHudLightAdd(int v) const { return x294_hudLightAddPerVisor[v]; } - const zeus::CColor& GetVisorHudLightMultiply(int v) const { return x2a4_hudLightMultiplyPerVisor[v]; } - const zeus::CColor& GetHudReflectivityLightColor() const { return x2b4_hudReflectivityLightColor; } - float GetHudLightAttMulConstant() const { return x2b8_hudLightAttMulConstant; } - float GetHudLightAttMulLinear() const { return x2bc_hudLightAttMulLinear; } - float GetHudLightAttMulQuadratic() const { return x2c0_hudLightAttMulQuadratic; } + float GetMapAlphaInterpolant() const override { return x8_mapAlphaInterp; } + float GetPauseBlurFactor() const override { return xc_pauseBlurFactor; } + float GetRadarXYRadius() const override { return x10_radarXYRadius; } + float GetRadarZRadius() const override { return x24_radarZRadius; } + float GetRadarZCloseRadius() const override { return x28_radarZCloseRadius; } + float GetEnergyBarFilledSpeed() const override { return x34_energyBarFilledSpeed; } + float GetEnergyBarShadowSpeed() const override { return x38_energyBarShadowSpeed; } + float GetEnergyBarDrainDelay() const override { return x3c_energyBarDrainDelay; } + bool GetEnergyBarAlwaysResetDelay() const override { return x40_energyBarAlwaysResetDelay; } + float GetHudDamagePracticalsGainConstant() const override { return x44_hudDamagePracticalsGainConstant; } + float GetHudDamagePracticalsGainLinear() const override { return x48_hudDamagePracticalsGainLinear; } + float GetHudDamagePracticalsInitConstant() const override { return x4c_hudDamagePracticalsInitConstant; } + float GetHudDamagePracticalsInitLinear() const override { return x50_hudDamagePracticalsInitLinear; } + float GetHudDamageLightSpotAngle() const override { return x54_hudDamageLightSpotAngle; } + float GetDamageLightAngleC() const override { return x58_damageLightAngleC; } + float GetDamageLightAngleL() const override { return x5c_damageLightAngleL; } + float GetDamageLightAngleQ() const override { return x60_damageLightAngleQ; } + atVec3f GetDamageLightPreTranslate() const override { return x64_damageLightPreTranslate; } + atVec3f GetDamageLightCenterTranslate() const override { return x70_damageLightCenterTranslate; } + float GetDamageLightXfXAngle() const override { return x7c_damageLightXfXAngle; } + float GetDamageLightXfZAngle() const override { return x80_damageLightXfZAngle; } + float GetHudDecoShakeTranslateVelConstant() const override { return x84_hudDecoShakeTranslateVelConstant; } + float GetHudDecoShakeTranslateVelLinear() const override { return x88_hudDecoShakeTranslateVelLinear; } + float GetMaxDecoDamageShakeTranslate() const override { return x8c_maxDecoDamageShakeTranslate; } + float GetDecoDamageShakeDeceleration() const override { return x90_decoDamageShakeDeceleration; } + float GetDecoShakeGainConstant() const override { return x94_decoShakeGainConstant; } + float GetDecoShakeGainLinear() const override { return x98_decoShakeGainLinear; } + float GetDecoShakeInitConstant() const override { return x9c_decoShakeInitConstant; } + float GetDecoShakeInitLinear() const override { return xa0_decoShakeInitLinear; } + float GetMaxDecoDamageShakeRotate() const override { return xa4_maxDecoDamageShakeRotate; } + atUint32 GetHudCamFovTweak() const override { return xa8_hudCamFovTweak; } + atUint32 GetHudCamYTweak() const override { return xac_hudCamYTweak; } + atUint32 GetHudCamZTweak() const override { return xb0_hudCamZTweak; } + float GetBeamVisorMenuAnimTime() const override { return xc0_beamVisorMenuAnimTime; } + float GetVisorBeamMenuItemActiveScale() const override { return xc4_visorBeamMenuItemActiveScale; } + float GetVisorBeamMenuItemInactiveScale() const override { return xc8_visorBeamMenuItemInactiveScale; } + float GetVisorBeamMenuItemTranslate() const override { return xcc_visorBeamMenuItemTranslate; } + float GetThreatRange() const override { return xe4_threatRange; } + float GetRadarScopeCoordRadius() const override { return xe8_radarScopeCoordRadius; } + float GetRadarPlayerPaintRadius() const override { return xec_radarPlayerPaintRadius; } + float GetRadarEnemyPaintRadius() const override { return xf0_radarEnemyPaintRadius; } + float GetMissileArrowVisTime() const override { return xf4_missileArrowVisTime; } + EHudVisMode GetHudVisMode() const override { return xf8_hudVisMode; } + EHelmetVisMode GetHelmetVisMode() const override { return xfc_helmetVisMode; } + atUint32 GetEnableAutoMapper() const override { return x100_enableAutoMapper; } + atUint32 GetEnableTargetingManager() const override { return x108_enableTargetingManager; } + atUint32 GetEnablePlayerVisor() const override { return x10c_enablePlayerVisor; } + float GetThreatWarningFraction() const override { return x110_threatWarningFraction; } + float GetMissileWarningFraction() const override { return x114_missileWarningFraction; } + float GetFreeLookFadeTime() const override { return x118_freeLookFadeTime; } + float GetFreeLookSfxPitchScale() const override { return x12c_freeLookSfxPitchScale; } + bool GetNoAbsoluteFreeLookSfxPitch() const override { return x130_noAbsoluteFreeLookSfxPitch; } + float GetFaceReflectionOrthoWidth() const override { return x13c_faceReflectionOrthoWidth; } + float GetFaceReflectionOrthoHeight() const override { return x140_faceReflectionOrthoHeight; } + float GetFaceReflectionDistance() const override { return x144_faceReflectionDistance; } + float GetFaceReflectionHeight() const override { return x148_faceReflectionHeight; } + float GetFaceReflectionAspect() const override { return x14c_faceReflectionAspect; } + float GetMissileWarningPulseTime() const override { return x1a0_missileWarningPulseTime; } + float GetExplosionLightFalloffMultConstant() const override { return x1a4_explosionLightFalloffMultConstant; } + float GetExplosionLightFalloffMultLinear() const override { return x1a8_explosionLightFalloffMultLinear; } + float GetExplosionLightFalloffMultQuadratic() const override { return x1ac_explosionLightFalloffMultQuadratic; } + float GetHudDamagePeakFactor() const override { return x1b4_hudDamagePeakFactor; } + float GetHudDamageFilterGainConstant() const override { return x1b8_hudDamageFilterGainConstant; } + float GetHudDamageFilterGainLinear() const override { return x1bc_hudDamageFilterGainLinear; } + float GetHudDamageFilterInitConstant() const override { return x1c0_hudDamageFilterInitConstant; } + float GetHudDamageFilterInitLinear() const override { return x1c4_hudDamageFilterInitLinear; } + float GetEnergyDrainModPeriod() const override { return x1c8_energyDrainModPeriod; } + bool GetEnergyDrainSinusoidalPulse() const override { return x1cc_energyDrainSinusoidalPulse; } + bool GetEnergyDrainFilterAdditive() const override { return x1cd_energyDrainFilterAdditive; } + float GetHudDamagePulseDuration() const override { return x1d0_hudDamagePulseDuration; } + float GetHudDamageColorGain() const override { return x1d4_hudDamageColorGain; } + float GetHudDecoShakeTranslateGain() const override { return x1d8_hudDecoShakeTranslateGain; } + float GetHudLagOffsetScale() const override { return x1dc_hudLagOffsetScale; } + float GetXrayBlurScaleLinear() const override { return x204_xrayBlurScaleLinear; } + float GetXrayBlurScaleQuadratic() const override { return x208_xrayBlurScaleQuadratic; } + float GetScanSidesAngle() const override { return x210_scanSidesAngle; } + float GetScanSidesXScale() const override { return x214_scanSidesXScale; } + float GetScanSidesPositionEnd() const override { return x218_scanSidesPositionEnd; } + float GetScanSidesDuration() const override { return x220_scanSidesDuration; } + float GetScanSidesStartTime() const override { return x224_scanSidesStartTime; } + float GetScanSidesEndTime() const override { return x228_scanSidesEndTime; } + float GetScanDataDotRadius() const override { return x22c_scanDataDotRadius; } + float GetScanDataDotPosRandMagnitude() const override { return x230_scanDataDotPosRandMag; } + float GetScanDataDotSeekDurationMin() const override { return x234_scanDataDotSeekDurationMin; } + float GetScanDataDotSeekDurationMax() const override { return x238_scanDataDotSeekDurationMax; } + float GetScanDataDotHoldDurationMin() const override { return x23c_scanDataDotHoldDurationMin; } + float GetScanDataDotHoldDurationMax() const override { return x240_scanDataDotHoldDurationMax; } + float GetScanAppearanceDuration() const override { return x244_scanAppearanceDuration; } + float GetScanPaneFlashFactor() const override { return x248_scanPaneFlashFactor; } + float GetScanPaneFadeInTime() const override { return x24c_scanPaneFadeInTime; } + float GetScanPaneFadeOutTime() const override { return x250_scanPaneFadeOutTime; } + float GetBallViewportYReduction() const override { return x254_ballViewportYReduction; } + float GetScanWindowIdleWidth() const override { return x258_scanWindowIdleW; } + float GetScanWindowIdleHeight() const override { return x25c_scanWindowIdleH; } + float GetScanWindowActiveWidth() const override { return x260_scanWindowActiveW; } + float GetScanWindowActiveHeight() const override { return x264_scanWindowActiveH; } + float GetScanWindowMagnification() const override { return x268_scanWindowMagnification; } + float GetScanWindowScanningAspect() const override { return x26c_scanWindowScanningAspect; } + float GetScanSidesPositionStart() const override { return x270_scanSidesPositionStart; } + bool GetShowAutomapperInMorphball() const override { return x274_showAutomapperInMorphball; } + bool GetLatchArticleText() const override { return x275_latchArticleText; } + float GetWorldTransManagerCharsPerSfx() const override { return x278_wtMgrCharsPerSfx; } + atUint32 GetXRayFogMode() const override { return x27c_xrayFogMode; } + float GetXRayFogNearZ() const override { return x280_xrayFogNearZ; } + float GetXRayFogFarZ() const override { return x284_xrayFogFarZ; } + const zeus::CColor& GetXRayFogColor() const override { return x288_xrayFogColor; } + float GetThermalVisorLevel() const override { return x28c_thermalVisorLevel; } + const zeus::CColor& GetThermalVisorColor() const override { return x290_thermalVisorColor; } + const zeus::CColor& GetVisorHudLightAdd(int v) const override { return x294_hudLightAddPerVisor[v]; } + const zeus::CColor& GetVisorHudLightMultiply(int v) const override { return x2a4_hudLightMultiplyPerVisor[v]; } + const zeus::CColor& GetHudReflectivityLightColor() const override { return x2b4_hudReflectivityLightColor; } + float GetHudLightAttMulConstant() const override { return x2b8_hudLightAttMulConstant; } + float GetHudLightAttMulLinear() const override { return x2bc_hudLightAttMulLinear; } + float GetHudLightAttMulQuadratic() const override { return x2c0_hudLightAttMulQuadratic; } - float GetScanSpeed(int idx) const { + float GetScanSpeed(int idx) const override { if (idx < 0 || size_t(idx) >= x2c4_scanSpeeds.size()) return 0.f; return x2c4_scanSpeeds[idx]; diff --git a/DataSpec/DNAMP1/Tweaks/CTweakGuiColors.hpp b/DataSpec/DNAMP1/Tweaks/CTweakGuiColors.hpp index e7e823668..231a18dd2 100644 --- a/DataSpec/DNAMP1/Tweaks/CTweakGuiColors.hpp +++ b/DataSpec/DNAMP1/Tweaks/CTweakGuiColors.hpp @@ -134,92 +134,92 @@ struct CTweakGuiColors final : public ITweakGuiColors { CTweakGuiColors() = default; CTweakGuiColors(athena::io::IStreamReader& r) { this->read(r); } - const zeus::CColor& GetPauseBlurFilterColor() const { return x4_pauseBlurFilterColor; } - const zeus::CColor& GetRadarStuffColor() const { return x8_radarStuffColor; } - const zeus::CColor& GetRadarPlayerPaintColor() const { return xc_radarPlayerPaintColor; } - const zeus::CColor& GetRadarEnemyPaintColor() const { return x10_radarEnemyPaintColor; } - const zeus::CColor& GetHudMessageFill() const { return x14_hudMessageFill; } - const zeus::CColor& GetHudMessageOutline() const { return x18_hudMessageOutline; } - const zeus::CColor& GetHudFrameColor() const { return x1c_hudFrameColor; } - const zeus::CColor& GetMissileIconColorActive() const { return x28_missileIconColorActive; } - const zeus::CColor& GetVisorBeamMenuItemActive() const { return x2c_visorBeamMenuItemActive; } - const zeus::CColor& GetVisorBeamMenuItemInactive() const { return x30_visorBeamMenuColorInactive; } - const zeus::CColor& GetEnergyBarFilledLowEnergy() const { return x34_energyBarFilledLowEnergy; } - const zeus::CColor& GetEnergyBarShadowLowEnergy() const { return x38_energyBarShadowLowEnergy; } - const zeus::CColor& GetEnergyBarEmptyLowEnergy() const { return x3c_energyBarEmptyLowEnergy; } - const zeus::CColor& GetHudDamageLightColor() const { return x40_hudDamageLightColor; } - const zeus::CColor& GetVisorMenuTextFont() const { return x4c_visorMenuTextFont; } - const zeus::CColor& GetVisorMenuTextOutline() const { return x50_visorMenuTextOutline; } - const zeus::CColor& GetBeamMenuTextFont() const { return x54_beamMenuTextFont; } - const zeus::CColor& GetBeamMenuTextOutline() const { return x58_beamMenuTextOutline; } - const zeus::CColor& GetEnergyWarningFont() const { return x5c_energyWarningFont; } - const zeus::CColor& GetThreatWarningFont() const { return x60_threatWarningFont; } - const zeus::CColor& GetMissileWarningFont() const { return x64_missileWarningFont; } - const zeus::CColor& GetThreatBarFilled() const { return x68_threatBarFilled; } - const zeus::CColor& GetThreatBarShadow() const { return x6c_threatBarShadow; } - const zeus::CColor& GetThreatBarEmpty() const { return x70_threatBarEmpty; } - const zeus::CColor& GetMissileBarFilled() const { return x74_missileBarFilled; } - const zeus::CColor& GetMissileBarShadow() const { return x78_missileBarShadow; } - const zeus::CColor& GetMissileBarEmpty() const { return x7c_missileBarEmpty; } - const zeus::CColor& GetThreatIconColor() const { return x80_threatIconColor; } - const zeus::CColor& GetTickDecoColor() const { return x88_tickDecoColor; } - const zeus::CColor& GetHelmetLightColor() const { return x8c_helmetLightColor; } - const zeus::CColor& GetThreatIconSafeColor() const { return x90_threatIconSafeColor; } - const zeus::CColor& GetMissileIconColorInactive() const { return x94_missileIconColorInactive; } - const zeus::CColor& GetMissileIconColorChargedCanAlt() const { return x98_missileIconColorChargedCanAlt; } - const zeus::CColor& GetMissileIconColorChargedNoAlt() const { return x9c_missileIconColorChargedNoAlt; } - const zeus::CColor& GetMissileIconColorDepleteAlt() const { return xa0_missileIconColorDepleteAlt; } - const zeus::CColor& GetVisorBeamMenuLozColor() const { return xb0_visorBeamMenuLozColor; } - const zeus::CColor& GetEnergyWarningOutline() const { return xb4_energyWarningOutline; } - const zeus::CColor& GetThreatWarningOutline() const { return xb8_threatWarningOutline; } - const zeus::CColor& GetMissileWarningOutline() const { return xbc_missileWarningOutline; } - const zeus::CColor& GetDamageAmbientColor() const { return xc4_damageAmbientColor; } - const zeus::CColor& GetScanFrameInactiveColor() const { return xc8_scanFrameInactiveColor; } - const zeus::CColor& GetScanFrameActiveColor() const { return xcc_scanFrameActiveColor; } - const zeus::CColor& GetScanFrameImpulseColor() const { return xd0_scanFrameImpulseColor; } - const zeus::CColor& GetScanVisorHudLightMultiply() const { return xd4_scanVisorHudLightMultiply; } - const zeus::CColor& GetScanVisorScreenDimColor() const { return xd8_scanVisorScreenDimColor; } - const zeus::CColor& GetThermalVisorHudLightMultiply() const { return xdc_thermalVisorHudLightMultiply; } - const zeus::CColor& GetEnergyDrainFilterColor() const { return xe0_energyDrainFilterColor; } - const zeus::CColor& GetDamageAmbientPulseColor() const { return xe4_damageAmbientPulseColor; } - const zeus::CColor& GetEnergyBarFlashColor() const { return xe8_energyBarFlashColor; } - const zeus::CColor& GetXRayEnergyDecoColor() const { return x100_xrayEnergyDecoColor; } - const zeus::CColor& GetScanDataDotColor() const { return x138_scanDataDotColor; } - const zeus::CColor& GetPowerBombDigitAvailableFont() const { return x13c_powerBombDigitAvailableFont; } - const zeus::CColor& GetPowerBombDigitAvailableOutline() const { return x140_powerBombDigitAvailableOutline; } - const zeus::CColor& GetBallBombFilledColor() const { return x148_ballBombFilled; } - const zeus::CColor& GetBallBombEmptyColor() const { return x14c_ballBombEmpty; } - const zeus::CColor& GetPowerBombIconAvailableColor() const { return x150_powerBombIconAvailable; } - const zeus::CColor& GetBallBombEnergyColor() const { return x158_ballEnergyDeco; } - const zeus::CColor& GetBallBombDecoColor() const { return x15c_ballBombDeco; } - const zeus::CColor& GetPowerBombDigitDelpetedFont() const { return x160_powerBombDigitDepletedFont; } - const zeus::CColor& GetPowerBombDigitDelpetedOutline() const { return x164_powerBombDigitDepletedOutline; } - const zeus::CColor& GetPowerBombIconDepletedColor() const { return x168_powerBombIconUnavailable; } - const zeus::CColor& GetScanDisplayImagePaneColor() const { return x174_scanDisplayImagePaneColor; } - const zeus::CColor& GetThreatIconWarningColor() const { return x17c_threatIconWarningColor; } - const zeus::CColor& GetHudCounterFill() const { return x180_hudCounterFill; } - const zeus::CColor& GetHudCounterOutline() const { return x184_hudCounterOutline; } - const zeus::CColor& GetScanIconCriticalColor() const { return x188_scanIconCriticalColor; } - const zeus::CColor& GetScanIconCriticalDimColor() const { return x18c_scanIconCriticalDimColor; } - const zeus::CColor& GetScanIconNoncriticalColor() const { return x190_scanIconNoncriticalColor; } - const zeus::CColor& GetScanIconNoncriticalDimColor() const { return x194_scanIconNoncriticalDimColor; } - const zeus::CColor& GetScanReticuleColor() const { return x198_scanReticuleColor; } - const zeus::CColor& GetThreatDigitsFont() const { return x19c_threatDigitsFont; } - const zeus::CColor& GetThreatDigitsOutline() const { return x1a0_threatDigitsOutline; } - const zeus::CColor& GetMissileDigitsFont() const { return x1a4_missileDigitsFont; } - const zeus::CColor& GetMissileDigitsOutline() const { return x1a8_missileDigitsOutline; } - const zeus::CColor& GetThermalDecoColor() const { return x1ac_thermalDecoColor; } - const zeus::CColor& GetThermalOutlinesColor() const { return x1b0_thermalOutlinesColor; } - const zeus::CColor& GetThermalLockColor() const { return x1b8_thermalLockColor; } - const zeus::CColor& GetPauseItemAmberColor() const { return x1bc_pauseItemAmber; } - const zeus::CColor& GetPauseItemBlueColor() const { return x1c0_pauseItemBlue; } + const zeus::CColor& GetPauseBlurFilterColor() const override { return x4_pauseBlurFilterColor; } + const zeus::CColor& GetRadarStuffColor() const override { return x8_radarStuffColor; } + const zeus::CColor& GetRadarPlayerPaintColor() const override { return xc_radarPlayerPaintColor; } + const zeus::CColor& GetRadarEnemyPaintColor() const override { return x10_radarEnemyPaintColor; } + const zeus::CColor& GetHudMessageFill() const override { return x14_hudMessageFill; } + const zeus::CColor& GetHudMessageOutline() const override { return x18_hudMessageOutline; } + const zeus::CColor& GetHudFrameColor() const override { return x1c_hudFrameColor; } + const zeus::CColor& GetMissileIconColorActive() const override { return x28_missileIconColorActive; } + const zeus::CColor& GetVisorBeamMenuItemActive() const override { return x2c_visorBeamMenuItemActive; } + const zeus::CColor& GetVisorBeamMenuItemInactive() const override { return x30_visorBeamMenuColorInactive; } + const zeus::CColor& GetEnergyBarFilledLowEnergy() const override { return x34_energyBarFilledLowEnergy; } + const zeus::CColor& GetEnergyBarShadowLowEnergy() const override { return x38_energyBarShadowLowEnergy; } + const zeus::CColor& GetEnergyBarEmptyLowEnergy() const override { return x3c_energyBarEmptyLowEnergy; } + const zeus::CColor& GetHudDamageLightColor() const override { return x40_hudDamageLightColor; } + const zeus::CColor& GetVisorMenuTextFont() const override { return x4c_visorMenuTextFont; } + const zeus::CColor& GetVisorMenuTextOutline() const override { return x50_visorMenuTextOutline; } + const zeus::CColor& GetBeamMenuTextFont() const override { return x54_beamMenuTextFont; } + const zeus::CColor& GetBeamMenuTextOutline() const override { return x58_beamMenuTextOutline; } + const zeus::CColor& GetEnergyWarningFont() const override { return x5c_energyWarningFont; } + const zeus::CColor& GetThreatWarningFont() const override { return x60_threatWarningFont; } + const zeus::CColor& GetMissileWarningFont() const override { return x64_missileWarningFont; } + const zeus::CColor& GetThreatBarFilled() const override { return x68_threatBarFilled; } + const zeus::CColor& GetThreatBarShadow() const override { return x6c_threatBarShadow; } + const zeus::CColor& GetThreatBarEmpty() const override { return x70_threatBarEmpty; } + const zeus::CColor& GetMissileBarFilled() const override { return x74_missileBarFilled; } + const zeus::CColor& GetMissileBarShadow() const override { return x78_missileBarShadow; } + const zeus::CColor& GetMissileBarEmpty() const override { return x7c_missileBarEmpty; } + const zeus::CColor& GetThreatIconColor() const override { return x80_threatIconColor; } + const zeus::CColor& GetTickDecoColor() const override { return x88_tickDecoColor; } + const zeus::CColor& GetHelmetLightColor() const override { return x8c_helmetLightColor; } + const zeus::CColor& GetThreatIconSafeColor() const override { return x90_threatIconSafeColor; } + const zeus::CColor& GetMissileIconColorInactive() const override { return x94_missileIconColorInactive; } + const zeus::CColor& GetMissileIconColorChargedCanAlt() const override { return x98_missileIconColorChargedCanAlt; } + const zeus::CColor& GetMissileIconColorChargedNoAlt() const override { return x9c_missileIconColorChargedNoAlt; } + const zeus::CColor& GetMissileIconColorDepleteAlt() const override { return xa0_missileIconColorDepleteAlt; } + const zeus::CColor& GetVisorBeamMenuLozColor() const override { return xb0_visorBeamMenuLozColor; } + const zeus::CColor& GetEnergyWarningOutline() const override { return xb4_energyWarningOutline; } + const zeus::CColor& GetThreatWarningOutline() const override { return xb8_threatWarningOutline; } + const zeus::CColor& GetMissileWarningOutline() const override { return xbc_missileWarningOutline; } + const zeus::CColor& GetDamageAmbientColor() const override { return xc4_damageAmbientColor; } + const zeus::CColor& GetScanFrameInactiveColor() const override { return xc8_scanFrameInactiveColor; } + const zeus::CColor& GetScanFrameActiveColor() const override { return xcc_scanFrameActiveColor; } + const zeus::CColor& GetScanFrameImpulseColor() const override { return xd0_scanFrameImpulseColor; } + const zeus::CColor& GetScanVisorHudLightMultiply() const override { return xd4_scanVisorHudLightMultiply; } + const zeus::CColor& GetScanVisorScreenDimColor() const override { return xd8_scanVisorScreenDimColor; } + const zeus::CColor& GetThermalVisorHudLightMultiply() const override { return xdc_thermalVisorHudLightMultiply; } + const zeus::CColor& GetEnergyDrainFilterColor() const override { return xe0_energyDrainFilterColor; } + const zeus::CColor& GetDamageAmbientPulseColor() const override { return xe4_damageAmbientPulseColor; } + const zeus::CColor& GetEnergyBarFlashColor() const override { return xe8_energyBarFlashColor; } + const zeus::CColor& GetXRayEnergyDecoColor() const override { return x100_xrayEnergyDecoColor; } + const zeus::CColor& GetScanDataDotColor() const override { return x138_scanDataDotColor; } + const zeus::CColor& GetPowerBombDigitAvailableFont() const override { return x13c_powerBombDigitAvailableFont; } + const zeus::CColor& GetPowerBombDigitAvailableOutline() const override { return x140_powerBombDigitAvailableOutline; } + const zeus::CColor& GetBallBombFilledColor() const override { return x148_ballBombFilled; } + const zeus::CColor& GetBallBombEmptyColor() const override { return x14c_ballBombEmpty; } + const zeus::CColor& GetPowerBombIconAvailableColor() const override { return x150_powerBombIconAvailable; } + const zeus::CColor& GetBallBombEnergyColor() const override { return x158_ballEnergyDeco; } + const zeus::CColor& GetBallBombDecoColor() const override { return x15c_ballBombDeco; } + const zeus::CColor& GetPowerBombDigitDelpetedFont() const override { return x160_powerBombDigitDepletedFont; } + const zeus::CColor& GetPowerBombDigitDelpetedOutline() const override { return x164_powerBombDigitDepletedOutline; } + const zeus::CColor& GetPowerBombIconDepletedColor() const override { return x168_powerBombIconUnavailable; } + const zeus::CColor& GetScanDisplayImagePaneColor() const override { return x174_scanDisplayImagePaneColor; } + const zeus::CColor& GetThreatIconWarningColor() const override { return x17c_threatIconWarningColor; } + const zeus::CColor& GetHudCounterFill() const override { return x180_hudCounterFill; } + const zeus::CColor& GetHudCounterOutline() const override { return x184_hudCounterOutline; } + const zeus::CColor& GetScanIconCriticalColor() const override { return x188_scanIconCriticalColor; } + const zeus::CColor& GetScanIconCriticalDimColor() const override { return x18c_scanIconCriticalDimColor; } + const zeus::CColor& GetScanIconNoncriticalColor() const override { return x190_scanIconNoncriticalColor; } + const zeus::CColor& GetScanIconNoncriticalDimColor() const override { return x194_scanIconNoncriticalDimColor; } + const zeus::CColor& GetScanReticuleColor() const override { return x198_scanReticuleColor; } + const zeus::CColor& GetThreatDigitsFont() const override { return x19c_threatDigitsFont; } + const zeus::CColor& GetThreatDigitsOutline() const override { return x1a0_threatDigitsOutline; } + const zeus::CColor& GetMissileDigitsFont() const override { return x1a4_missileDigitsFont; } + const zeus::CColor& GetMissileDigitsOutline() const override { return x1a8_missileDigitsOutline; } + const zeus::CColor& GetThermalDecoColor() const override { return x1ac_thermalDecoColor; } + const zeus::CColor& GetThermalOutlinesColor() const override { return x1b0_thermalOutlinesColor; } + const zeus::CColor& GetThermalLockColor() const override { return x1b8_thermalLockColor; } + const zeus::CColor& GetPauseItemAmberColor() const override { return x1bc_pauseItemAmber; } + const zeus::CColor& GetPauseItemBlueColor() const override { return x1c0_pauseItemBlue; } - VisorEnergyInitColors GetVisorEnergyInitColors(int idx) const { + VisorEnergyInitColors GetVisorEnergyInitColors(int idx) const override { const PerVisorColors& colors = x1c4_perVisorColors[idx]; return {colors.xc_energyTankFilled, colors.x10_energyTankEmpty, colors.x14_energyDigitsFont, colors.x18_energyDigitsOutline}; } - VisorEnergyBarColors GetVisorEnergyBarColors(int idx) const { + VisorEnergyBarColors GetVisorEnergyBarColors(int idx) const override { const PerVisorColors& colors = x1c4_perVisorColors[idx]; return {colors.x0_energyBarFilled, colors.x4_energyBarEmpty, colors.x8_energyBarShadow}; } diff --git a/DataSpec/DNAMP1/Tweaks/CTweakGunRes.hpp b/DataSpec/DNAMP1/Tweaks/CTweakGunRes.hpp index eec9bd36c..512b2dd8f 100644 --- a/DataSpec/DNAMP1/Tweaks/CTweakGunRes.hpp +++ b/DataSpec/DNAMP1/Tweaks/CTweakGunRes.hpp @@ -58,32 +58,32 @@ struct CTweakGunRes final : ITweakGunRes { String<-1> m_grappleMuzzle; String<-1> m_grappleSwoosh; - const std::string& GetGunMotion() const { return m_gunMotion; } - const std::string& GetGrappleArm() const { return m_grappleArm; } - const std::string& GetRightHand() const { return m_rightHand; } + const std::string& GetGunMotion() const override { return m_gunMotion; } + const std::string& GetGrappleArm() const override { return m_grappleArm; } + const std::string& GetRightHand() const override { return m_rightHand; } - const std::string& GetPowerBeam() const { return m_powerBeam; } - const std::string& GetIceBeam() const { return m_iceBeam; } - const std::string& GetWaveBeam() const { return m_waveBeam; } - const std::string& GetPlasmaBeam() const { return m_plasmaBeam; } - const std::string& GetPhazonBeam() const { return m_phazonBeam; } + const std::string& GetPowerBeam() const override { return m_powerBeam; } + const std::string& GetIceBeam() const override { return m_iceBeam; } + const std::string& GetWaveBeam() const override { return m_waveBeam; } + const std::string& GetPlasmaBeam() const override { return m_plasmaBeam; } + const std::string& GetPhazonBeam() const override { return m_phazonBeam; } - const std::string& GetHoloTransition() const { return m_holoTransition; } + const std::string& GetHoloTransition() const override { return m_holoTransition; } - const std::string& GetBombSet() const { return m_bombSet; } - const std::string& GetBombExplode() const { return m_bombExplode; } - const std::string& GetPowerBombExplode() const { return m_powerBombExplode; } + const std::string& GetBombSet() const override { return m_bombSet; } + const std::string& GetBombExplode() const override { return m_bombExplode; } + const std::string& GetPowerBombExplode() const override { return m_powerBombExplode; } - const std::string& GetWeapon(size_t idx, bool ball) const { return (&m_powerBeamWp)[idx * 2 + ball]; } - const std::string& GetMuzzleParticle(size_t idx) const { return (&m_powerMuzzle)[idx]; } - const std::string& GetChargeParticle(size_t idx) const { return (&m_powerCharge)[idx]; } - const std::string& GetAuxMuzzleParticle(size_t idx) const { return (&m_powerAuxMuzzle)[idx]; } + const std::string& GetWeapon(size_t idx, bool ball) const override { return (&m_powerBeamWp)[idx * 2 + ball]; } + const std::string& GetMuzzleParticle(size_t idx) const override { return (&m_powerMuzzle)[idx]; } + const std::string& GetChargeParticle(size_t idx) const override { return (&m_powerCharge)[idx]; } + const std::string& GetAuxMuzzleParticle(size_t idx) const override { return (&m_powerAuxMuzzle)[idx]; } - const std::string& GetGrappleSegmentParticle() const { return m_grappleSegment; } - const std::string& GetGrappleClawParticle() const { return m_grappleClaw; } - const std::string& GetGrappleHitParticle() const { return m_grappleHit; } - const std::string& GetGrappleMuzzleParticle() const { return m_grappleMuzzle; } - const std::string& GetGrappleSwooshParticle() const { return m_grappleSwoosh; } + const std::string& GetGrappleSegmentParticle() const override { return m_grappleSegment; } + const std::string& GetGrappleClawParticle() const override { return m_grappleClaw; } + const std::string& GetGrappleHitParticle() const override { return m_grappleHit; } + const std::string& GetGrappleMuzzleParticle() const override { return m_grappleMuzzle; } + const std::string& GetGrappleSwooshParticle() const override { return m_grappleSwoosh; } CTweakGunRes() = default; CTweakGunRes(athena::io::IStreamReader& in) { read(in); } diff --git a/DataSpec/DNAMP1/Tweaks/CTweakPlayer.hpp b/DataSpec/DNAMP1/Tweaks/CTweakPlayer.hpp index 5afaa1892..038e1052a 100644 --- a/DataSpec/DNAMP1/Tweaks/CTweakPlayer.hpp +++ b/DataSpec/DNAMP1/Tweaks/CTweakPlayer.hpp @@ -170,139 +170,139 @@ struct CTweakPlayer final : ITweakPlayer { Value x300_variaDamageReduction; Value x304_gravityDamageReduction; Value x308_phazonDamageReduction; - float GetMaxTranslationalAcceleration(int s) const { return x4_maxTranslationalAcceleration[s]; } - float GetMaxRotationalAcceleration(int s) const { return x24_maxRotationalAcceleration[s]; } - float GetPlayerTranslationFriction(int s) const { return x44_translationFriction[s]; } - float GetPlayerRotationFriction(int s) const { return x64_rotationFriction[s]; } - float GetPlayerRotationMaxSpeed(int s) const { return x84_rotationMaxSpeed[s]; } - float GetPlayerTranslationMaxSpeed(int s) const { return xa4_translationMaxSpeed[s]; } - float GetNormalGravAccel() const { return xc4_normalGravAccel; } - float GetFluidGravAccel() const { return xc8_fluidGravAccel; } - float GetVerticalJumpAccel() const { return xcc_verticalJumpAccel; } - float GetHorizontalJumpAccel() const { return xd0_horizontalJumpAccel; } - float GetVerticalDoubleJumpAccel() const { return xd4_verticalDoubleJumpAccel; } - float GetHorizontalDoubleJumpAccel() const { return xd8_horizontalDoubleJumpAccel; } - float GetWaterJumpFactor() const { return xdc_waterJumpFactor; } - float GetWaterBallJumpFactor() const { return xe0_waterBallJumpFactor; } - float GetLavaJumpFactor() const { return xe4_lavaJumpFactor; } - float GetLavaBallJumpFactor() const { return xe8_lavaBallJumpFactor; } - float GetPhazonJumpFactor() const { return xec_phazonJumpFactor; } - float GetPhazonBallJumpFactor() const { return xf0_phazonBallJumpFactor; } - float GetAllowedJumpTime() const { return xf4_allowedJumpTime; } - float GetAllowedDoubleJumpTime() const { return xf8_allowedDoubleJumpTime; } - float GetMinDoubleJumpWindow() const { return xfc_minDoubleJumpWindow; } - float GetMaxDoubleJumpWindow() const { return x100_maxDoubleJumpWindow; } - float GetMinJumpTime() const { return x108_minJumpTime; } - float GetMinDoubleJumpTime() const { return x10c_minDoubleJumpTime; } - float GetAllowedLedgeTime() const { return x110_allowedLedgeTime; } - float GetDoubleJumpImpulse() const { return x114_doubleJumpImpulse; } - float GetBackwardsForceMultiplier() const { return x118_backwardsForceMultiplier; } - float GetBombJumpRadius() const { return x11c_bombJumpRadius; } - float GetBombJumpHeight() const { return x120_bombJumpHeight; } - float GetEyeOffset() const { return x124_eyeOffset; } - float GetTurnSpeedMultiplier() const { return x128_turnSpeedMultiplier; } - float GetFreeLookTurnSpeedMultiplier() const { return x12c_freeLookTurnSpeedMultiplier; } - float GetFreeLookSpeed() const { return x138_freeLookSpeed; } - float GetFreeLookSnapSpeed() const { return x13c_freeLookSnapSpeed; } - float GetFreeLookCenteredThresholdAngle() const { return x144_freeLookCenteredThresholdAngle; } - float GetFreeLookCenteredTime() const { return x148_freeLookCenteredTime; } - float GetOrbitModeTimer() const { return x180_orbitModeTimer; } - float GetOrbitUpperAngle() const { return x188_orbitUpperAngle; } - float GetOrbitLowerAngle() const { return x18c_orbitLowerAngle; } - float GetOrbitHorizAngle() const { return x190_orbitHorizAngle; } - float GetOrbitMaxTargetDistance() const { return x19c_orbitMaxTargetDistance; } - float GetOrbitMaxLockDistance() const { return x1a0_orbitMaxLockDistance; } - float GetOrbitDistanceThreshold() const { return x1a4_orbitDistanceThreshold; } - uint32_t GetOrbitScreenBoxHalfExtentX(int zone) const { return x1a8_orbitScreenBoxHalfExtentX[zone]; } - uint32_t GetOrbitScreenBoxHalfExtentY(int zone) const { return x1b0_orbitScreenBoxHalfExtentY[zone]; } - uint32_t GetOrbitScreenBoxCenterX(int zone) const { return x1b8_orbitScreenBoxCenterX[zone]; } - uint32_t GetOrbitScreenBoxCenterY(int zone) const { return x1c0_orbitScreenBoxCenterY[zone]; } - uint32_t GetOrbitZoneIdealX(int zone) const { return x1c8_orbitZoneIdealX[zone]; } - uint32_t GetOrbitZoneIdealY(int zone) const { return x1d0_orbitZoneIdealY[zone]; } - float GetOrbitNearX() const { return x1d8_orbitNearX; } - float GetOrbitNearZ() const { return x1dc_orbitNearZ; } - float GetOrbitFixedOffsetZDiff() const { return x1e8_orbitFixedOffsetZDiff; } - float GetOrbitZRange() const { return x1ec_orbitZRange; } - bool GetDashEnabled() const { return x200_24_dashEnabled; } - bool GetDashOnButtonRelease() const { return x200_25_dashOnButtonRelease; } - float GetDashButtonHoldCancelTime() const { return x204_dashButtonHoldCancelTime; } - float GetDashStrafeInputThreshold() const { return x208_dashStrafeInputThreshold; } - float GetSidewaysDoubleJumpImpulse() const { return x20c_sidewaysDoubleJumpImpulse; } - float GetSidewaysVerticalDoubleJumpAccel() const { return x210_sidewaysVerticalDoubleJumpAccel; } - float GetSidewaysHorizontalDoubleJumpAccel() const { return x214_sidewaysHorizontalDoubleJumpAccel; } - float GetScanningRange() const { return x218_scanningRange; } - bool GetScanRetention() const { return x21c_24_scanRetention; } - bool GetScanFreezesGame() const { return x21c_25_scanFreezesGame; } - bool GetOrbitWhileScanning() const { return x21c_26_orbitWhileScanning; } - float GetScanMaxTargetDistance() const { return x220_scanMaxTargetDistance; } - float GetScanMaxLockDistance() const { return x224_scanMaxLockDistance; } - bool GetMoveDuringFreeLook() const { return x228_27_moveDuringFreeLook; } - bool GetHoldButtonsForFreeLook() const { return x228_28_holdButtonsForFreeLook; } - bool GetTwoButtonsForFreeLook() const { return x228_29_twoButtonsForFreeLook; } - bool GetAimWhenOrbitingPoint() const { return x229_25_aimWhenOrbitingPoint; } - bool GetStayInFreeLookWhileFiring() const { return x229_26_stayInFreeLookWhileFiring; } - bool GetOrbitFixedOffset() const { return x229_29_orbitFixedOffset; } - bool GetGunButtonTogglesHolster() const { return x229_30_gunButtonTogglesHolster; } - bool GetGunNotFiringHolstersGun() const { return x229_31_gunNotFiringHolstersGun; } - bool GetFallingDoubleJump() const { return x22a_24_fallingDoubleJump; } - bool GetImpulseDoubleJump() const { return x22a_25_impulseDoubleJump; } - bool GetFiringCancelsCameraPitch() const { return x22a_26_firingCancelsCameraPitch; } - bool GetAssistedAimingIgnoreHorizontal() const { return x22a_27_assistedAimingIgnoreHorizontal; } - bool GetAssistedAimingIgnoreVertical() const { return x22a_28_assistedAimingIgnoreVertical; } - float GetAimMaxDistance() const { return x234_aimMaxDistance; } - float GetAimThresholdDistance() const { return x24c_aimThresholdDistance; } - float GetAimBoxWidth() const { return x258_aimBoxWidth; } - float GetAimBoxHeight() const { return x25c_aimBoxHeight; } - float GetAimTargetTimer() const { return x260_aimTargetTimer; } - float GetAimAssistHorizontalAngle() const { return x264_aimAssistHorizontalAngle; } - float GetAimAssistVerticalAngle() const { return x268_aimAssistVerticalAngle; } - float GetPlayerHeight() const { return x26c_playerHeight; } - float GetPlayerXYHalfExtent() const { return x270_playerXYHalfExtent; } - float GetStepUpHeight() const { return x274_stepUpHeight; } - float GetStepDownHeight() const { return x278_stepDownHeight; } - float GetPlayerBallHalfExtent() const { return x27c_playerBallHalfExtent; } - float GetOrbitDistanceMax() const { return x2a0_orbitDistanceMax; } - float GetGrappleSwingLength() const { return x2a4_grappleSwingLength; } - float GetGrappleSwingPeriod() const { return x2a8_grappleSwingPeriod; } - float GetGrapplePullSpeedMin() const { return x2ac_grapplePullSpeedMin; } - float GetMaxGrappleLockedTurnAlignDistance() const { return x2b4_maxGrappleLockedTurnAlignDistance; } - float GetGrapplePullSpeedProportion() const { return x2b8_grapplePullSpeedProportion; } - float GetGrapplePullSpeedMax() const { return x2bc_grapplePullSpeedMax; } - float GetGrappleLookCenterSpeed() const { return x2c0_grappleLookCenterSpeed; } - float GetMaxGrappleTurnSpeed() const { return x2c4_maxGrappleTurnSpeed; } - float GetGrappleJumpForce() const { return x2c8_grappleJumpForce; } - float GetGrappleReleaseTime() const { return x2cc_grappleReleaseTime; } - uint32_t GetGrappleJumpMode() const { return x2d0_grappleJumpMode; } - bool GetOrbitReleaseBreaksGrapple() const { return x2d4_orbitReleaseBreaksGrapple; } - bool GetInvertGrappleTurn() const { return x2d5_invertGrappleTurn; } - float GetGrappleBeamSpeed() const { return x2d8_grappleBeamSpeed; } - float GetGrappleBeamXWaveAmplitude() const { return x2dc_grappleBeamXWaveAmplitude; } - float GetGrappleBeamZWaveAmplitude() const { return x2e0_grappleBeamZWaveAmplitude; } - float GetGrappleBeamAnglePhaseDelta() const { return x2e4_grappleBeamAnglePhaseDelta; } - float GetHorizontalFreeLookAngleVel() const { return x130_horizontalFreeLookAngleVel; } - float GetVerticalFreeLookAngleVel() const { return x134_verticalFreeLookAngleVel; } - float GetOrbitCameraSpeed() const { return x184_orbitCameraSpeed; } - float GetOrbitPreventionTime() const { return x1fc_orbitPreventionTime; } - bool GetFreeLookTurnsPlayer() const { return x228_24_freelookTurnsPlayer; } - float GetJumpCameraPitchDownStart() const { return x288_jumpCameraPitchDownStart; } - float GetJumpCameraPitchDownFull() const { return x28c_jumpCameraPitchDownFull; } - float GetJumpCameraPitchDownAngle() const { return x290_jumpCameraPitchDownAngle; } - float GetFallCameraPitchDownStart() const { return x294_fallCameraPitchDownStart; } - float GetFallCameraPitchDownFull() const { return x298_fallCameraPitchDownFull; } - float GetFallCameraPitchDownAngle() const { return x29c_fallCameraPitchDownAngle; } - float GetFirstPersonCameraSpeed() const { return x280_firstPersonCameraSpeed; } - float GetGrappleCameraSpeed() const { return x2b0_grappleCameraSpeed; } - float GetFreeLookDampenFactor() const { return x14c_freeLookDampenFactor; } - float GetLeftLogicalThreshold() const { return x150_leftDiv; } - float GetRightLogicalThreshold() const { return x154_rightDiv; } - float GetOrbitMinDistance(int type) const { return x158_orbitMinDistance[type]; } - float GetOrbitNormalDistance(int type) const { return x164_orbitNormalDistance[type]; } - float GetOrbitMaxDistance(int type) const { return x170_orbitMaxDistance[type]; } - float GetFrozenTimeout() const { return x2f8_frozenTimeout; } - uint32_t GetIceBreakJumpCount() const { return x2fc_iceBreakJumpCount; } - float GetVariaDamageReduction() const { return x300_variaDamageReduction; } - float GetGravityDamageReduction() const { return x304_gravityDamageReduction; } - float GetPhazonDamageReduction() const { return x308_phazonDamageReduction; } + float GetMaxTranslationalAcceleration(int s) const override { return x4_maxTranslationalAcceleration[s]; } + float GetMaxRotationalAcceleration(int s) const override { return x24_maxRotationalAcceleration[s]; } + float GetPlayerTranslationFriction(int s) const override { return x44_translationFriction[s]; } + float GetPlayerRotationFriction(int s) const override { return x64_rotationFriction[s]; } + float GetPlayerRotationMaxSpeed(int s) const override { return x84_rotationMaxSpeed[s]; } + float GetPlayerTranslationMaxSpeed(int s) const override { return xa4_translationMaxSpeed[s]; } + float GetNormalGravAccel() const override { return xc4_normalGravAccel; } + float GetFluidGravAccel() const override { return xc8_fluidGravAccel; } + float GetVerticalJumpAccel() const override { return xcc_verticalJumpAccel; } + float GetHorizontalJumpAccel() const override { return xd0_horizontalJumpAccel; } + float GetVerticalDoubleJumpAccel() const override { return xd4_verticalDoubleJumpAccel; } + float GetHorizontalDoubleJumpAccel() const override { return xd8_horizontalDoubleJumpAccel; } + float GetWaterJumpFactor() const override { return xdc_waterJumpFactor; } + float GetWaterBallJumpFactor() const override { return xe0_waterBallJumpFactor; } + float GetLavaJumpFactor() const override { return xe4_lavaJumpFactor; } + float GetLavaBallJumpFactor() const override { return xe8_lavaBallJumpFactor; } + float GetPhazonJumpFactor() const override { return xec_phazonJumpFactor; } + float GetPhazonBallJumpFactor() const override { return xf0_phazonBallJumpFactor; } + float GetAllowedJumpTime() const override { return xf4_allowedJumpTime; } + float GetAllowedDoubleJumpTime() const override { return xf8_allowedDoubleJumpTime; } + float GetMinDoubleJumpWindow() const override { return xfc_minDoubleJumpWindow; } + float GetMaxDoubleJumpWindow() const override { return x100_maxDoubleJumpWindow; } + float GetMinJumpTime() const override { return x108_minJumpTime; } + float GetMinDoubleJumpTime() const override { return x10c_minDoubleJumpTime; } + float GetAllowedLedgeTime() const override { return x110_allowedLedgeTime; } + float GetDoubleJumpImpulse() const override { return x114_doubleJumpImpulse; } + float GetBackwardsForceMultiplier() const override { return x118_backwardsForceMultiplier; } + float GetBombJumpRadius() const override { return x11c_bombJumpRadius; } + float GetBombJumpHeight() const override { return x120_bombJumpHeight; } + float GetEyeOffset() const override { return x124_eyeOffset; } + float GetTurnSpeedMultiplier() const override { return x128_turnSpeedMultiplier; } + float GetFreeLookTurnSpeedMultiplier() const override { return x12c_freeLookTurnSpeedMultiplier; } + float GetFreeLookSpeed() const override { return x138_freeLookSpeed; } + float GetFreeLookSnapSpeed() const override { return x13c_freeLookSnapSpeed; } + float GetFreeLookCenteredThresholdAngle() const override { return x144_freeLookCenteredThresholdAngle; } + float GetFreeLookCenteredTime() const override { return x148_freeLookCenteredTime; } + float GetOrbitModeTimer() const override { return x180_orbitModeTimer; } + float GetOrbitUpperAngle() const override { return x188_orbitUpperAngle; } + float GetOrbitLowerAngle() const override { return x18c_orbitLowerAngle; } + float GetOrbitHorizAngle() const override { return x190_orbitHorizAngle; } + float GetOrbitMaxTargetDistance() const override { return x19c_orbitMaxTargetDistance; } + float GetOrbitMaxLockDistance() const override { return x1a0_orbitMaxLockDistance; } + float GetOrbitDistanceThreshold() const override { return x1a4_orbitDistanceThreshold; } + uint32_t GetOrbitScreenBoxHalfExtentX(int zone) const override { return x1a8_orbitScreenBoxHalfExtentX[zone]; } + uint32_t GetOrbitScreenBoxHalfExtentY(int zone) const override { return x1b0_orbitScreenBoxHalfExtentY[zone]; } + uint32_t GetOrbitScreenBoxCenterX(int zone) const override { return x1b8_orbitScreenBoxCenterX[zone]; } + uint32_t GetOrbitScreenBoxCenterY(int zone) const override { return x1c0_orbitScreenBoxCenterY[zone]; } + uint32_t GetOrbitZoneIdealX(int zone) const override { return x1c8_orbitZoneIdealX[zone]; } + uint32_t GetOrbitZoneIdealY(int zone) const override { return x1d0_orbitZoneIdealY[zone]; } + float GetOrbitNearX() const override { return x1d8_orbitNearX; } + float GetOrbitNearZ() const override { return x1dc_orbitNearZ; } + float GetOrbitFixedOffsetZDiff() const override { return x1e8_orbitFixedOffsetZDiff; } + float GetOrbitZRange() const override { return x1ec_orbitZRange; } + bool GetDashEnabled() const override { return x200_24_dashEnabled; } + bool GetDashOnButtonRelease() const override { return x200_25_dashOnButtonRelease; } + float GetDashButtonHoldCancelTime() const override { return x204_dashButtonHoldCancelTime; } + float GetDashStrafeInputThreshold() const override { return x208_dashStrafeInputThreshold; } + float GetSidewaysDoubleJumpImpulse() const override { return x20c_sidewaysDoubleJumpImpulse; } + float GetSidewaysVerticalDoubleJumpAccel() const override { return x210_sidewaysVerticalDoubleJumpAccel; } + float GetSidewaysHorizontalDoubleJumpAccel() const override { return x214_sidewaysHorizontalDoubleJumpAccel; } + float GetScanningRange() const override { return x218_scanningRange; } + bool GetScanRetention() const override { return x21c_24_scanRetention; } + bool GetScanFreezesGame() const override { return x21c_25_scanFreezesGame; } + bool GetOrbitWhileScanning() const override { return x21c_26_orbitWhileScanning; } + float GetScanMaxTargetDistance() const override { return x220_scanMaxTargetDistance; } + float GetScanMaxLockDistance() const override { return x224_scanMaxLockDistance; } + bool GetMoveDuringFreeLook() const override { return x228_27_moveDuringFreeLook; } + bool GetHoldButtonsForFreeLook() const override { return x228_28_holdButtonsForFreeLook; } + bool GetTwoButtonsForFreeLook() const override { return x228_29_twoButtonsForFreeLook; } + bool GetAimWhenOrbitingPoint() const override { return x229_25_aimWhenOrbitingPoint; } + bool GetStayInFreeLookWhileFiring() const override { return x229_26_stayInFreeLookWhileFiring; } + bool GetOrbitFixedOffset() const override { return x229_29_orbitFixedOffset; } + bool GetGunButtonTogglesHolster() const override { return x229_30_gunButtonTogglesHolster; } + bool GetGunNotFiringHolstersGun() const override { return x229_31_gunNotFiringHolstersGun; } + bool GetFallingDoubleJump() const override { return x22a_24_fallingDoubleJump; } + bool GetImpulseDoubleJump() const override { return x22a_25_impulseDoubleJump; } + bool GetFiringCancelsCameraPitch() const override { return x22a_26_firingCancelsCameraPitch; } + bool GetAssistedAimingIgnoreHorizontal() const override { return x22a_27_assistedAimingIgnoreHorizontal; } + bool GetAssistedAimingIgnoreVertical() const override { return x22a_28_assistedAimingIgnoreVertical; } + float GetAimMaxDistance() const override { return x234_aimMaxDistance; } + float GetAimThresholdDistance() const override { return x24c_aimThresholdDistance; } + float GetAimBoxWidth() const override { return x258_aimBoxWidth; } + float GetAimBoxHeight() const override { return x25c_aimBoxHeight; } + float GetAimTargetTimer() const override { return x260_aimTargetTimer; } + float GetAimAssistHorizontalAngle() const override { return x264_aimAssistHorizontalAngle; } + float GetAimAssistVerticalAngle() const override { return x268_aimAssistVerticalAngle; } + float GetPlayerHeight() const override { return x26c_playerHeight; } + float GetPlayerXYHalfExtent() const override { return x270_playerXYHalfExtent; } + float GetStepUpHeight() const override { return x274_stepUpHeight; } + float GetStepDownHeight() const override { return x278_stepDownHeight; } + float GetPlayerBallHalfExtent() const override { return x27c_playerBallHalfExtent; } + float GetOrbitDistanceMax() const override { return x2a0_orbitDistanceMax; } + float GetGrappleSwingLength() const override { return x2a4_grappleSwingLength; } + float GetGrappleSwingPeriod() const override { return x2a8_grappleSwingPeriod; } + float GetGrapplePullSpeedMin() const override { return x2ac_grapplePullSpeedMin; } + float GetMaxGrappleLockedTurnAlignDistance() const override { return x2b4_maxGrappleLockedTurnAlignDistance; } + float GetGrapplePullSpeedProportion() const override { return x2b8_grapplePullSpeedProportion; } + float GetGrapplePullSpeedMax() const override { return x2bc_grapplePullSpeedMax; } + float GetGrappleLookCenterSpeed() const override { return x2c0_grappleLookCenterSpeed; } + float GetMaxGrappleTurnSpeed() const override { return x2c4_maxGrappleTurnSpeed; } + float GetGrappleJumpForce() const override { return x2c8_grappleJumpForce; } + float GetGrappleReleaseTime() const override { return x2cc_grappleReleaseTime; } + uint32_t GetGrappleJumpMode() const override { return x2d0_grappleJumpMode; } + bool GetOrbitReleaseBreaksGrapple() const override { return x2d4_orbitReleaseBreaksGrapple; } + bool GetInvertGrappleTurn() const override { return x2d5_invertGrappleTurn; } + float GetGrappleBeamSpeed() const override { return x2d8_grappleBeamSpeed; } + float GetGrappleBeamXWaveAmplitude() const override { return x2dc_grappleBeamXWaveAmplitude; } + float GetGrappleBeamZWaveAmplitude() const override { return x2e0_grappleBeamZWaveAmplitude; } + float GetGrappleBeamAnglePhaseDelta() const override { return x2e4_grappleBeamAnglePhaseDelta; } + float GetHorizontalFreeLookAngleVel() const override { return x130_horizontalFreeLookAngleVel; } + float GetVerticalFreeLookAngleVel() const override { return x134_verticalFreeLookAngleVel; } + float GetOrbitCameraSpeed() const override { return x184_orbitCameraSpeed; } + float GetOrbitPreventionTime() const override { return x1fc_orbitPreventionTime; } + bool GetFreeLookTurnsPlayer() const override { return x228_24_freelookTurnsPlayer; } + float GetJumpCameraPitchDownStart() const override { return x288_jumpCameraPitchDownStart; } + float GetJumpCameraPitchDownFull() const override { return x28c_jumpCameraPitchDownFull; } + float GetJumpCameraPitchDownAngle() const override { return x290_jumpCameraPitchDownAngle; } + float GetFallCameraPitchDownStart() const override { return x294_fallCameraPitchDownStart; } + float GetFallCameraPitchDownFull() const override { return x298_fallCameraPitchDownFull; } + float GetFallCameraPitchDownAngle() const override { return x29c_fallCameraPitchDownAngle; } + float GetFirstPersonCameraSpeed() const override { return x280_firstPersonCameraSpeed; } + float GetGrappleCameraSpeed() const override { return x2b0_grappleCameraSpeed; } + float GetFreeLookDampenFactor() const override { return x14c_freeLookDampenFactor; } + float GetLeftLogicalThreshold() const override { return x150_leftDiv; } + float GetRightLogicalThreshold() const override { return x154_rightDiv; } + float GetOrbitMinDistance(int type) const override { return x158_orbitMinDistance[type]; } + float GetOrbitNormalDistance(int type) const override { return x164_orbitNormalDistance[type]; } + float GetOrbitMaxDistance(int type) const override { return x170_orbitMaxDistance[type]; } + float GetFrozenTimeout() const override { return x2f8_frozenTimeout; } + uint32_t GetIceBreakJumpCount() const override { return x2fc_iceBreakJumpCount; } + float GetVariaDamageReduction() const override { return x300_variaDamageReduction; } + float GetGravityDamageReduction() const override { return x304_gravityDamageReduction; } + float GetPhazonDamageReduction() const override { return x308_phazonDamageReduction; } CTweakPlayer() = default; CTweakPlayer(athena::io::IStreamReader& reader) { read(reader); diff --git a/DataSpec/DNAMP1/Tweaks/CTweakPlayerControl.hpp b/DataSpec/DNAMP1/Tweaks/CTweakPlayerControl.hpp index 664bc3d78..8488bcaaf 100644 --- a/DataSpec/DNAMP1/Tweaks/CTweakPlayerControl.hpp +++ b/DataSpec/DNAMP1/Tweaks/CTweakPlayerControl.hpp @@ -7,7 +7,7 @@ namespace DataSpec::DNAMP1 { struct CTweakPlayerControl final : ITweakPlayerControl { AT_DECL_DNA_YAML Vector m_mappings; - atUint32 GetMapping(atUint32 command) const { return m_mappings[command]; } + atUint32 GetMapping(atUint32 command) const override { return m_mappings[command]; } CTweakPlayerControl() = default; CTweakPlayerControl(athena::io::IStreamReader& reader) { this->read(reader); } }; diff --git a/DataSpec/DNAMP1/Tweaks/CTweakPlayerGun.hpp b/DataSpec/DNAMP1/Tweaks/CTweakPlayerGun.hpp index e0e66c780..232a9446f 100644 --- a/DataSpec/DNAMP1/Tweaks/CTweakPlayerGun.hpp +++ b/DataSpec/DNAMP1/Tweaks/CTweakPlayerGun.hpp @@ -40,27 +40,27 @@ struct CTweakPlayerGun final : ITweakPlayerGun { x44_fixedVerticalAim = zeus::degToRad(x44_fixedVerticalAim); } - float GetUpLookAngle() const { return x4_upLookAngle; } - float GetDownLookAngle() const { return x8_downLookAngle; } - float GetVerticalSpread() const { return xc_verticalSpread; } - float GetHorizontalSpread() const { return x10_horizontalSpread; } - float GetHighVerticalSpread() const { return x14_highVerticalSpread; } - float GetHighHorizontalSpread() const { return x18_highHorizontalSpread; } - float GetLowVerticalSpread() const { return x1c_lowVerticalSpread; } - float GetLowHorizontalSpread() const { return x20_lowHorizontalSpread; } - float GetAimVerticalSpeed() const { return x24_aimVerticalSpeed; } - float GetAimHorizontalSpeed() const { return x28_aimHorizontalSpeed; } - float GetBombFuseTime() const { return x2c_bombFuseTime; } - float GetBombDropDelayTime() const { return x30_bombDropDelayTime; } - float GetHoloHoldTime() const { return x34_holoHoldTime; } - float GetGunTransformTime() const { return x38_gunTransformTime; } - float GetGunHolsterTime() const { return x3c_gunHolsterTime; } - float GetGunNotFiringTime() const { return x40_gunNotFiringTime; } - float GetFixedVerticalAim() const { return x44_fixedVerticalAim; } - float GetGunExtendDistance() const { return x48_gunExtendDistance; } - const zeus::CVector3f& GetGunPosition() const { return x4c_gunPosition; } - const zeus::CVector3f& GetGrapplingArmPosition() const { return x64_grapplingArmPosition; } - float GetRichochetDamage(atUint32 type) const { + float GetUpLookAngle() const override { return x4_upLookAngle; } + float GetDownLookAngle() const override { return x8_downLookAngle; } + float GetVerticalSpread() const override { return xc_verticalSpread; } + float GetHorizontalSpread() const override { return x10_horizontalSpread; } + float GetHighVerticalSpread() const override { return x14_highVerticalSpread; } + float GetHighHorizontalSpread() const override { return x18_highHorizontalSpread; } + float GetLowVerticalSpread() const override { return x1c_lowVerticalSpread; } + float GetLowHorizontalSpread() const override { return x20_lowHorizontalSpread; } + float GetAimVerticalSpeed() const override { return x24_aimVerticalSpeed; } + float GetAimHorizontalSpeed() const override { return x28_aimHorizontalSpeed; } + float GetBombFuseTime() const override { return x2c_bombFuseTime; } + float GetBombDropDelayTime() const override { return x30_bombDropDelayTime; } + float GetHoloHoldTime() const override { return x34_holoHoldTime; } + float GetGunTransformTime() const override { return x38_gunTransformTime; } + float GetGunHolsterTime() const override { return x3c_gunHolsterTime; } + float GetGunNotFiringTime() const override { return x40_gunNotFiringTime; } + float GetFixedVerticalAim() const override { return x44_fixedVerticalAim; } + float GetGunExtendDistance() const override { return x48_gunExtendDistance; } + const zeus::CVector3f& GetGunPosition() const override { return x4c_gunPosition; } + const zeus::CVector3f& GetGrapplingArmPosition() const override { return x64_grapplingArmPosition; } + float GetRichochetDamage(atUint32 type) const override { switch (type) { case 0: // Power return x280_ricochetData[0]; @@ -88,7 +88,7 @@ struct CTweakPlayerGun final : ITweakPlayerGun { } } - const SWeaponInfo& GetBeamInfo(atInt32 beam) const { + const SWeaponInfo& GetBeamInfo(atInt32 beam) const override { if (beam < 0 || beam > 5) return xa8_beams[0]; return xa8_beams[beam]; @@ -100,8 +100,8 @@ struct CTweakPlayerGun final : ITweakPlayerGun { return x1f0_combos[beam]; } - const SShotParam& GetBombInfo() const { return x70_bomb; } - const SShotParam& GetPowerBombInfo() const { return x8c_powerBomb; } + const SShotParam& GetBombInfo() const override { return x70_bomb; } + const SShotParam& GetPowerBombInfo() const override { return x8c_powerBomb; } const SShotParam& GetMissileInfo() const { return x1d4_missile; } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/Tweaks/CTweakPlayerRes.hpp b/DataSpec/DNAMP1/Tweaks/CTweakPlayerRes.hpp index 43ed66deb..bf0370606 100644 --- a/DataSpec/DNAMP1/Tweaks/CTweakPlayerRes.hpp +++ b/DataSpec/DNAMP1/Tweaks/CTweakPlayerRes.hpp @@ -67,32 +67,32 @@ struct CTweakPlayerRes final : ITweakPlayerRes { Value m_cinematicMoveOutofIntoPlayerDistance; - std::string_view _GetSaveStationIcon() const { return m_saveStationIcon; } - std::string_view _GetMissileStationIcon() const { return m_missileStationIcon; } - std::string_view _GetElevatorIcon() const { return m_elevatorIcon; } + std::string_view _GetSaveStationIcon() const override { return m_saveStationIcon; } + std::string_view _GetMissileStationIcon() const override { return m_missileStationIcon; } + std::string_view _GetElevatorIcon() const override { return m_elevatorIcon; } - std::string_view _GetMinesBreakFirstTopIcon() const { return m_minesBreakFirstTopIcon; } - std::string_view _GetMinesBreakFirstBottomIcon() const { return m_minesBreakFirstBottomIcon; } - std::string_view _GetMinesBreakSecondTopIcon() const { return m_minesBreakSecondTopIcon; } - std::string_view _GetMinesBreakSecondBottomIcon() const { return m_minesBreakSecondBottomIcon; } + std::string_view _GetMinesBreakFirstTopIcon() const override { return m_minesBreakFirstTopIcon; } + std::string_view _GetMinesBreakFirstBottomIcon() const override { return m_minesBreakFirstBottomIcon; } + std::string_view _GetMinesBreakSecondTopIcon() const override { return m_minesBreakSecondTopIcon; } + std::string_view _GetMinesBreakSecondBottomIcon() const override { return m_minesBreakSecondBottomIcon; } - std::string_view _GetLStick(size_t idx) const { return (&m_lStickN)[idx]; } - std::string_view _GetCStick(size_t idx) const { return (&m_cStickN)[idx]; } + std::string_view _GetLStick(size_t idx) const override { return (&m_lStickN)[idx]; } + std::string_view _GetCStick(size_t idx) const override { return (&m_cStickN)[idx]; } - std::string_view _GetLTrigger(size_t idx) const { return (&m_lTriggerOut)[idx]; } - std::string_view _GetRTrigger(size_t idx) const { return (&m_rTriggerOut)[idx]; } - std::string_view _GetStartButton(size_t idx) const { return (&m_startButtonOut)[idx]; } - std::string_view _GetAButton(size_t idx) const { return (&m_aButtonOut)[idx]; } - std::string_view _GetBButton(size_t idx) const { return (&m_bButtonOut)[idx]; } - std::string_view _GetXButton(size_t idx) const { return (&m_xButtonOut)[idx]; } - std::string_view _GetYButton(size_t idx) const { return (&m_yButtonOut)[idx]; } + std::string_view _GetLTrigger(size_t idx) const override { return (&m_lTriggerOut)[idx]; } + std::string_view _GetRTrigger(size_t idx) const override { return (&m_rTriggerOut)[idx]; } + std::string_view _GetStartButton(size_t idx) const override { return (&m_startButtonOut)[idx]; } + std::string_view _GetAButton(size_t idx) const override { return (&m_aButtonOut)[idx]; } + std::string_view _GetBButton(size_t idx) const override { return (&m_bButtonOut)[idx]; } + std::string_view _GetXButton(size_t idx) const override { return (&m_xButtonOut)[idx]; } + std::string_view _GetYButton(size_t idx) const override { return (&m_yButtonOut)[idx]; } - std::string_view _GetBallTransitionsANCS() const { return m_ballTransitionsANCS; } + std::string_view _GetBallTransitionsANCS() const override { return m_ballTransitionsANCS; } - std::string_view _GetBallTransitionBeamRes(size_t idx) const { return (&m_ballTransitionsPower)[idx]; } - std::string_view _GetBeamCineModel(size_t idx) const { return (&m_cinePower)[idx]; } + std::string_view _GetBallTransitionBeamRes(size_t idx) const override { return (&m_ballTransitionsPower)[idx]; } + std::string_view _GetBeamCineModel(size_t idx) const override { return (&m_cinePower)[idx]; } - float _GetCinematicMoveOutofIntoPlayerDistance() const { return m_cinematicMoveOutofIntoPlayerDistance; } + float _GetCinematicMoveOutofIntoPlayerDistance() const override { return m_cinematicMoveOutofIntoPlayerDistance; } CTweakPlayerRes() = default; CTweakPlayerRes(athena::io::IStreamReader& in) { read(in); } diff --git a/DataSpec/DNAMP1/Tweaks/CTweakSlideShow.hpp b/DataSpec/DNAMP1/Tweaks/CTweakSlideShow.hpp index f56130d61..40fa76a98 100644 --- a/DataSpec/DNAMP1/Tweaks/CTweakSlideShow.hpp +++ b/DataSpec/DNAMP1/Tweaks/CTweakSlideShow.hpp @@ -28,11 +28,11 @@ struct CTweakSlideShow final : ITweakSlideShow { CTweakSlideShow() = default; CTweakSlideShow(athena::io::IStreamReader& in) { read(in); } - std::string_view GetFont() const { return x14_fontAssetName; } - const zeus::CColor& GetFontColor() const { return x24_fontColor; } - const zeus::CColor& GetOutlineColor() const { return x28_outlineColor; } - float GetScanPercentInterval() const { return x2c_scanPercentInterval; } - float GetX54() const { return x54_; } + std::string_view GetFont() const override { return x14_fontAssetName; } + const zeus::CColor& GetFontColor() const override { return x24_fontColor; } + const zeus::CColor& GetOutlineColor() const override { return x28_outlineColor; } + float GetScanPercentInterval() const override { return x2c_scanPercentInterval; } + float GetX54() const override { return x54_; } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP1/Tweaks/CTweakTargeting.hpp b/DataSpec/DNAMP1/Tweaks/CTweakTargeting.hpp index 02f65511c..8c4c68db1 100644 --- a/DataSpec/DNAMP1/Tweaks/CTweakTargeting.hpp +++ b/DataSpec/DNAMP1/Tweaks/CTweakTargeting.hpp @@ -147,93 +147,93 @@ struct CTweakTargeting final : public ITweakTargeting { x108_chargeGaugeAngles[i] = zeus::degToRad(x108_chargeGaugeAngles[i]); } - atUint32 GetTargetRadiusMode() const { return x4_targetRadiusMode; } - float GetCurrLockOnExitDuration() const { return x8_currLockOnExitDuration; } - float GetCurrLockOnEnterDuration() const { return xc_currLockOnEnterDuration; } - float GetCurrLockOnSwitchDuration() const { return x10_currLockOnSwitchDuration; } - float GetLockConfirmScale() const { return x14_lockConfirmScale; } - float GetNextLockOnEnterDuration() const { return x18_nextLockOnEnterDuration; } - float GetNextLockOnExitDuration() const { return x1c_nextLockOnExitDuration; } - float GetNextLockOnSwitchDuration() const { return x20_nextLockOnSwitchDuration; } - float GetSeekerScale() const { return x24_seekerScale; } - float GetSeekerAngleSpeed() const { return x28_seekerAngleSpeed; } - float GetXRayRetAngleSpeed() const { return x2c_xrayRetAngleSpeed; } - float GetOrbitPointZOffset() const { return x50_orbitPointZOffset; } - float GetOrbitPointInTime() const { return x54_orbitPointInTime; } - float GetOrbitPointOutTime() const { return x58_orbitPointOutTime; } - const zeus::CColor& GetThermalReticuleColor() const { return xb0_thermalReticuleColor; } - float GetTargetFlowerScale() const { return xb4_targetFlowerScale; } - const zeus::CColor& GetTargetFlowerColor() const { return xb8_targetFlowerColor; } - float GetMissileBracketDuration() const { return xbc_missileBracketDuration; } - float GetMissileBracketScaleStart() const { return xc0_missileBracketScaleStart; } - float GetMissileBracketScaleEnd() const { return xc4_missileBracketScaleEnd; } - float GetMissileBracketScaleDuration() const { return xc8_missileBracketScaleDuration; } - const zeus::CColor& GetMissileBracketColor() const { return xcc_missileBracketColor; } - float GetChargeGaugeOvershootOffset() const { return xe8_chargeGaugeOvershootOffset; } - float GetChargeGaugeOvershootDuration() const { return xec_chargeGaugeOvershootDuration; } - float GetOuterBeamSquaresScale() const { return xf0_outerBeamSquaresScale; } - const zeus::CColor& GetOuterBeamSquareColor() const { return xf4_outerBeamSquareColor; } - float GetLockonDuration() const { return xd0_LockonDuration; } - float GetInnerBeamScale() const { return xd4_innerBeamScale; } - const zeus::CColor& GetInnerBeamColorPower() const { return xd8_innerBeamColorPower; } - const zeus::CColor& GetInnerBeamColorIce() const { return xdc_innerBeamColorIce; } - const zeus::CColor& GetInnerBeamColorWave() const { return xe0_innerBeamColorWave; } - const zeus::CColor& GetInnerBeamColorPlasma() const { return xe4_innerBeamColorPlasma; } - const float* GetOuterBeamSquareAngles(int i) const { return xf8_outerBeamSquareAngles[i].floats.data(); } - float GetChargeGaugeAngle(int i) const { return x108_chargeGaugeAngles[i]; } - float GetChargeGaugeScale() const { return x118_chargeGaugeScale; } - const zeus::CColor& GetChargeGaugeNonFullColor() const { return x11c_chargeGaugeNonFullColor; } - atUint32 GetChargeTickCount() const { return x120_chargeTickCount; } - float GetChargeTickAnglePitch() const { return x124_chargeTickAnglePitch; } - float GetLockFireScale() const { return x128_lockFireScale; } - float GetLockFireDuration() const { return x12c_lockFireDuration; } - const zeus::CColor& GetLockFireColor() const { return x130_lockFireColor; } - float GetLockDaggerScaleStart() const { return x134_lockDaggerScaleStart; } - float GetLockDaggerScaleEnd() const { return x138_lockDaggerScaleEnd; } - const zeus::CColor& GetLockDaggerColor() const { return x13c_lockDaggerColor; } - float GetLockDaggerAngle0() const { return x140_lockDaggerAngle0; } - float GetLockDaggerAngle1() const { return x144_lockDaggerAngle1; } - float GetLockDaggerAngle2() const { return x148_lockDaggerAngle2; } - const zeus::CColor& GetLockConfirmColor() const { return x14c_lockConfirmColor; } - const zeus::CColor& GetSeekerColor() const { return x150_seekerColor; } - float GetLockConfirmClampMin() const { return x154_lockConfirmClampMin; } - float GetLockConfirmClampMax() const { return x158_lockConfirmClampMax; } - float GetTargetFlowerClampMin() const { return x15c_targetFlowerClampMin; } - float GetTargetFlowerClampMax() const { return x160_targetFlowerClampMax; } - float GetSeekerClampMin() const { return x164_seekerClampMin; } - float GetSeekerClampMax() const { return x168_seekerClampMax; } - float GetMissileBracketClampMin() const { return x16c_missileBracketClampMin; } - float GetMissileBracketClampMax() const { return x170_missileBracketClampMax; } - float GetInnerBeamClampMin() const { return x174_innerBeamClampMin; } - float GetInnerBeamClampMax() const { return x178_innerBeamClampMax; } - float GetChargeGaugeClampMin() const { return x17c_chargeGaugeClampMin; } - float GetChargeGaugeClampMax() const { return x180_chargeGaugeClampMax; } - float GetLockFireClampMin() const { return x184_lockFireClampMin; } - float GetLockFireClampMax() const { return x188_lockFireClampMax; } - float GetLockDaggerClampMin() const { return x18c_lockDaggerClampMin; } - float GetLockDaggerClampMax() const { return x190_lockDaggerClampMax; } - float GetGrappleSelectScale() const { return x194_grappleSelectScale; } - float GetGrappleScale() const { return x198_grappleScale; } - float GetGrappleClampMin() const { return x19c_grappleClampMin; } - float GetGrappleClampMax() const { return x1a0_grappleClampMax; } - const zeus::CColor& GetGrapplePointSelectColor() const { return x1a4_grapplePointSelectColor; } - const zeus::CColor& GetGrapplePointColor() const { return x1a8_grapplePointColor; } - const zeus::CColor& GetLockedGrapplePointSelectColor() const { return x1ac_lockedGrapplePointSelectColor; } - float GetGrappleMinClampScale() const { return x1b0_grappleMinClampScale; } - const zeus::CColor& GetChargeGaugePulseColorHigh() const { return x1b4_chargeGaugePulseColorHigh; } - float GetFullChargeFadeDuration() const { return x1b8_fullChargeFadeDuration; } - const zeus::CColor& GetOrbitPointColor() const { return x1bc_orbitPointColor; } - const zeus::CColor& GetCrosshairsColor() const { return x1c0_crosshairsColor; } - float GetCrosshairsScaleDuration() const { return x1c4_crosshairsScaleDur; } - bool DrawOrbitPoint() const { return x1c8_drawOrbitPoint; } - const zeus::CColor& GetChargeGaugePulseColorLow() const { return x1cc_chargeGaugePulseColorLow; } - float GetChargeGaugePulsePeriod() const { return x1d0_chargeGaugePulsePeriod; } - float GetReticuleClampMin() const { return x20c_reticuleClampMin; } - float GetReticuleClampMax() const { return x210_reticuleClampMax; } - const zeus::CColor& GetXRayRetRingColor() const { return x214_xrayRetRingColor; } - float GetReticuleScale() const { return x218_reticuleScale; } - float GetScanTargetClampMin() const { return x21c_scanTargetClampMin; } - float GetScanTargetClampMax() const { return x220_scanTargetClampMax; } - float GetAngularLagSpeed() const { return x224_angularLagSpeed; } + atUint32 GetTargetRadiusMode() const override { return x4_targetRadiusMode; } + float GetCurrLockOnExitDuration() const override { return x8_currLockOnExitDuration; } + float GetCurrLockOnEnterDuration() const override { return xc_currLockOnEnterDuration; } + float GetCurrLockOnSwitchDuration() const override { return x10_currLockOnSwitchDuration; } + float GetLockConfirmScale() const override { return x14_lockConfirmScale; } + float GetNextLockOnEnterDuration() const override { return x18_nextLockOnEnterDuration; } + float GetNextLockOnExitDuration() const override { return x1c_nextLockOnExitDuration; } + float GetNextLockOnSwitchDuration() const override { return x20_nextLockOnSwitchDuration; } + float GetSeekerScale() const override { return x24_seekerScale; } + float GetSeekerAngleSpeed() const override { return x28_seekerAngleSpeed; } + float GetXRayRetAngleSpeed() const override { return x2c_xrayRetAngleSpeed; } + float GetOrbitPointZOffset() const override { return x50_orbitPointZOffset; } + float GetOrbitPointInTime() const override { return x54_orbitPointInTime; } + float GetOrbitPointOutTime() const override { return x58_orbitPointOutTime; } + const zeus::CColor& GetThermalReticuleColor() const override { return xb0_thermalReticuleColor; } + float GetTargetFlowerScale() const override { return xb4_targetFlowerScale; } + const zeus::CColor& GetTargetFlowerColor() const override { return xb8_targetFlowerColor; } + float GetMissileBracketDuration() const override { return xbc_missileBracketDuration; } + float GetMissileBracketScaleStart() const override { return xc0_missileBracketScaleStart; } + float GetMissileBracketScaleEnd() const override { return xc4_missileBracketScaleEnd; } + float GetMissileBracketScaleDuration() const override { return xc8_missileBracketScaleDuration; } + const zeus::CColor& GetMissileBracketColor() const override { return xcc_missileBracketColor; } + float GetChargeGaugeOvershootOffset() const override { return xe8_chargeGaugeOvershootOffset; } + float GetChargeGaugeOvershootDuration() const override { return xec_chargeGaugeOvershootDuration; } + float GetOuterBeamSquaresScale() const override { return xf0_outerBeamSquaresScale; } + const zeus::CColor& GetOuterBeamSquareColor() const override { return xf4_outerBeamSquareColor; } + float GetLockonDuration() const override { return xd0_LockonDuration; } + float GetInnerBeamScale() const override { return xd4_innerBeamScale; } + const zeus::CColor& GetInnerBeamColorPower() const override { return xd8_innerBeamColorPower; } + const zeus::CColor& GetInnerBeamColorIce() const override { return xdc_innerBeamColorIce; } + const zeus::CColor& GetInnerBeamColorWave() const override { return xe0_innerBeamColorWave; } + const zeus::CColor& GetInnerBeamColorPlasma() const override { return xe4_innerBeamColorPlasma; } + const float* GetOuterBeamSquareAngles(int i) const override { return xf8_outerBeamSquareAngles[i].floats.data(); } + float GetChargeGaugeAngle(int i) const override { return x108_chargeGaugeAngles[i]; } + float GetChargeGaugeScale() const override { return x118_chargeGaugeScale; } + const zeus::CColor& GetChargeGaugeNonFullColor() const override { return x11c_chargeGaugeNonFullColor; } + atUint32 GetChargeTickCount() const override { return x120_chargeTickCount; } + float GetChargeTickAnglePitch() const override { return x124_chargeTickAnglePitch; } + float GetLockFireScale() const override { return x128_lockFireScale; } + float GetLockFireDuration() const override { return x12c_lockFireDuration; } + const zeus::CColor& GetLockFireColor() const override { return x130_lockFireColor; } + float GetLockDaggerScaleStart() const override { return x134_lockDaggerScaleStart; } + float GetLockDaggerScaleEnd() const override { return x138_lockDaggerScaleEnd; } + const zeus::CColor& GetLockDaggerColor() const override { return x13c_lockDaggerColor; } + float GetLockDaggerAngle0() const override { return x140_lockDaggerAngle0; } + float GetLockDaggerAngle1() const override { return x144_lockDaggerAngle1; } + float GetLockDaggerAngle2() const override { return x148_lockDaggerAngle2; } + const zeus::CColor& GetLockConfirmColor() const override { return x14c_lockConfirmColor; } + const zeus::CColor& GetSeekerColor() const override { return x150_seekerColor; } + float GetLockConfirmClampMin() const override { return x154_lockConfirmClampMin; } + float GetLockConfirmClampMax() const override { return x158_lockConfirmClampMax; } + float GetTargetFlowerClampMin() const override { return x15c_targetFlowerClampMin; } + float GetTargetFlowerClampMax() const override { return x160_targetFlowerClampMax; } + float GetSeekerClampMin() const override { return x164_seekerClampMin; } + float GetSeekerClampMax() const override { return x168_seekerClampMax; } + float GetMissileBracketClampMin() const override { return x16c_missileBracketClampMin; } + float GetMissileBracketClampMax() const override { return x170_missileBracketClampMax; } + float GetInnerBeamClampMin() const override { return x174_innerBeamClampMin; } + float GetInnerBeamClampMax() const override { return x178_innerBeamClampMax; } + float GetChargeGaugeClampMin() const override { return x17c_chargeGaugeClampMin; } + float GetChargeGaugeClampMax() const override { return x180_chargeGaugeClampMax; } + float GetLockFireClampMin() const override { return x184_lockFireClampMin; } + float GetLockFireClampMax() const override { return x188_lockFireClampMax; } + float GetLockDaggerClampMin() const override { return x18c_lockDaggerClampMin; } + float GetLockDaggerClampMax() const override { return x190_lockDaggerClampMax; } + float GetGrappleSelectScale() const override { return x194_grappleSelectScale; } + float GetGrappleScale() const override { return x198_grappleScale; } + float GetGrappleClampMin() const override { return x19c_grappleClampMin; } + float GetGrappleClampMax() const override { return x1a0_grappleClampMax; } + const zeus::CColor& GetGrapplePointSelectColor() const override { return x1a4_grapplePointSelectColor; } + const zeus::CColor& GetGrapplePointColor() const override { return x1a8_grapplePointColor; } + const zeus::CColor& GetLockedGrapplePointSelectColor() const override { return x1ac_lockedGrapplePointSelectColor; } + float GetGrappleMinClampScale() const override { return x1b0_grappleMinClampScale; } + const zeus::CColor& GetChargeGaugePulseColorHigh() const override { return x1b4_chargeGaugePulseColorHigh; } + float GetFullChargeFadeDuration() const override { return x1b8_fullChargeFadeDuration; } + const zeus::CColor& GetOrbitPointColor() const override { return x1bc_orbitPointColor; } + const zeus::CColor& GetCrosshairsColor() const override { return x1c0_crosshairsColor; } + float GetCrosshairsScaleDuration() const override { return x1c4_crosshairsScaleDur; } + bool DrawOrbitPoint() const override { return x1c8_drawOrbitPoint; } + const zeus::CColor& GetChargeGaugePulseColorLow() const override { return x1cc_chargeGaugePulseColorLow; } + float GetChargeGaugePulsePeriod() const override { return x1d0_chargeGaugePulsePeriod; } + float GetReticuleClampMin() const override { return x20c_reticuleClampMin; } + float GetReticuleClampMax() const override { return x210_reticuleClampMax; } + const zeus::CColor& GetXRayRetRingColor() const override { return x214_xrayRetRingColor; } + float GetReticuleScale() const override { return x218_reticuleScale; } + float GetScanTargetClampMin() const override { return x21c_scanTargetClampMin; } + float GetScanTargetClampMax() const override { return x220_scanTargetClampMax; } + float GetAngularLagSpeed() const override { return x224_angularLagSpeed; } }; } // namespace DataSpec::DNAMP1 diff --git a/DataSpec/DNAMP2/MREA.hpp b/DataSpec/DNAMP2/MREA.hpp index 55923482e..d11a416ca 100644 --- a/DataSpec/DNAMP2/MREA.hpp +++ b/DataSpec/DNAMP2/MREA.hpp @@ -42,10 +42,10 @@ struct MREA { public: StreamReader(athena::io::IStreamReader& source, atUint32 blkCount); - void seek(atInt64 diff, athena::SeekOrigin whence); - atUint64 position() const { return m_pos; } - atUint64 length() const { return m_totalDecompLen; } - atUint64 readUBytesToBuf(void* buf, atUint64 len); + void seek(atInt64 diff, athena::SeekOrigin whence) override; + atUint64 position() const override { return m_pos; } + atUint64 length() const override { return m_totalDecompLen; } + atUint64 readUBytesToBuf(void* buf, atUint64 len) override; void writeDecompInfos(athena::io::IStreamWriter& writer) const; }; diff --git a/DataSpec/DNAMP2/STRG.hpp b/DataSpec/DNAMP2/STRG.hpp index 835a95439..edc2bb99d 100644 --- a/DataSpec/DNAMP2/STRG.hpp +++ b/DataSpec/DNAMP2/STRG.hpp @@ -14,14 +14,14 @@ struct STRG : ISTRG { std::unordered_map*> langMap; std::map names; - int32_t lookupIdx(std::string_view name) const { + int32_t lookupIdx(std::string_view name) const override { auto search = names.find(name.data()); if (search == names.end()) return -1; return search->second; } - size_t count() const { + size_t count() const override { size_t retval = 0; for (const auto& item : langs) { size_t sz = item.second.size(); @@ -30,19 +30,19 @@ struct STRG : ISTRG { } return retval; } - std::string getUTF8(const FourCC& lang, size_t idx) const { + std::string getUTF8(const FourCC& lang, size_t idx) const override { auto search = langMap.find(lang); if (search != langMap.end()) return hecl::Char16ToUTF8(search->second->at(idx)); return std::string(); } - std::u16string getUTF16(const FourCC& lang, size_t idx) const { + std::u16string getUTF16(const FourCC& lang, size_t idx) const override { auto search = langMap.find(lang); if (search != langMap.end()) return search->second->at(idx); return std::u16string(); } - hecl::SystemString getSystemString(const FourCC& lang, size_t idx) const { + hecl::SystemString getSystemString(const FourCC& lang, size_t idx) const override { auto search = langMap.find(lang); if (search != langMap.end()) #if HECL_UCS2 diff --git a/DataSpec/DNAMP3/CHAR.hpp b/DataSpec/DNAMP3/CHAR.hpp index 1c97cd944..655fce35e 100644 --- a/DataSpec/DNAMP3/CHAR.hpp +++ b/DataSpec/DNAMP3/CHAR.hpp @@ -135,7 +135,7 @@ struct CHAR : BigDNA { Value unk1; Value unk2; - void gatherPrimitives(std::map>& out) { + void gatherPrimitives(std::map>& out) override { out[animIdx] = {animName, animId, UniqueID64(), false}; } }; @@ -148,7 +148,7 @@ struct CHAR : BigDNA { Value unkFloat; Value unk; - void gatherPrimitives(std::map>& out) { + void gatherPrimitives(std::map>& out) override { animA.m_anim->gatherPrimitives(out); animB.m_anim->gatherPrimitives(out); } @@ -162,7 +162,7 @@ struct CHAR : BigDNA { Value unkFloat; Value unk; - void gatherPrimitives(std::map>& out) { + void gatherPrimitives(std::map>& out) override { animA.m_anim->gatherPrimitives(out); animB.m_anim->gatherPrimitives(out); } @@ -179,7 +179,7 @@ struct CHAR : BigDNA { }; Vector children; - void gatherPrimitives(std::map>& out) { + void gatherPrimitives(std::map>& out) override { for (const auto& child : children) child.anim.m_anim->gatherPrimitives(out); } @@ -191,7 +191,7 @@ struct CHAR : BigDNA { Value animCount; Vector children; - void gatherPrimitives(std::map>& out) { + void gatherPrimitives(std::map>& out) override { for (const auto& child : children) child.m_anim->gatherPrimitives(out); } diff --git a/DataSpec/DNAMP3/CMDLMaterials.hpp b/DataSpec/DNAMP3/CMDLMaterials.hpp index 2e4f8a4d2..03c15242e 100644 --- a/DataSpec/DNAMP3/CMDLMaterials.hpp +++ b/DataSpec/DNAMP3/CMDLMaterials.hpp @@ -113,7 +113,7 @@ struct MaterialSet : BigDNA { void constructNode(hecl::blender::PyOutStream& out, const PAKRouter& pakRouter, const PAK::Entry& entry, const Material::ISection* prevSection, unsigned idx, - unsigned& texMapIdx, unsigned& texMtxIdx, unsigned& kColorIdx) const; + unsigned& texMapIdx, unsigned& texMtxIdx, unsigned& kColorIdx) const override; }; struct SectionCLR : ISection { SectionCLR() : ISection(ISection::Type::CLR) {} @@ -128,7 +128,7 @@ struct MaterialSet : BigDNA { void constructNode(hecl::blender::PyOutStream& out, const PAKRouter& pakRouter, const PAK::Entry& entry, const Material::ISection* prevSection, unsigned idx, - unsigned& texMapIdx, unsigned& texMtxIdx, unsigned& kColorIdx) const; + unsigned& texMapIdx, unsigned& texMtxIdx, unsigned& kColorIdx) const override; }; struct SectionINT : ISection { SectionINT() : ISection(ISection::Type::INT) {} @@ -149,7 +149,7 @@ struct MaterialSet : BigDNA { void constructNode(hecl::blender::PyOutStream& out, const PAKRouter& pakRouter, const PAK::Entry& entry, const Material::ISection* prevSection, unsigned idx, - unsigned& texMapIdx, unsigned& texMtxIdx, unsigned& kColorIdx) const; + unsigned& texMapIdx, unsigned& texMtxIdx, unsigned& kColorIdx) const override; }; struct SectionFactory : BigDNA { AT_DECL_EXPLICIT_DNA diff --git a/DataSpec/DNAMP3/STRG.hpp b/DataSpec/DNAMP3/STRG.hpp index 88f46881c..80bfc8ae3 100644 --- a/DataSpec/DNAMP3/STRG.hpp +++ b/DataSpec/DNAMP3/STRG.hpp @@ -14,14 +14,14 @@ struct STRG : ISTRG { std::unordered_map*> langMap; std::map names; - int32_t lookupIdx(std::string_view name) const { + int32_t lookupIdx(std::string_view name) const override { auto search = names.find(name.data()); if (search == names.end()) return -1; return search->second; } - size_t count() const { + size_t count() const override { size_t retval = 0; for (const auto& item : langs) { size_t sz = item.second.size(); @@ -30,19 +30,19 @@ struct STRG : ISTRG { } return retval; } - std::string getUTF8(const FourCC& lang, size_t idx) const { + std::string getUTF8(const FourCC& lang, size_t idx) const override { auto search = langMap.find(lang); if (search != langMap.end()) return search->second->at(idx); return std::string(); } - std::u16string getUTF16(const FourCC& lang, size_t idx) const { + std::u16string getUTF16(const FourCC& lang, size_t idx) const override { auto search = langMap.find(lang); if (search != langMap.end()) return hecl::UTF8ToChar16(search->second->at(idx)); return std::u16string(); } - hecl::SystemString getSystemString(const FourCC& lang, size_t idx) const { + hecl::SystemString getSystemString(const FourCC& lang, size_t idx) const override { auto search = langMap.find(lang); if (search != langMap.end()) #if HECL_UCS2 diff --git a/DataSpec/SpecMP1.cpp b/DataSpec/SpecMP1.cpp index 7359e835c..c45746479 100644 --- a/DataSpec/SpecMP1.cpp +++ b/DataSpec/SpecMP1.cpp @@ -196,7 +196,7 @@ struct TextureCache { }; struct SpecMP1 : SpecBase { - bool checkStandaloneID(const char* id) const { return !memcmp(id, "GM8", 3); } + bool checkStandaloneID(const char* id) const override { return !memcmp(id, "GM8", 3); } std::vector m_nonPaks; std::vector m_paks; @@ -212,7 +212,7 @@ struct SpecMP1 : SpecBase { std::unordered_map m_mreaPathToXF; - void setThreadProject() { + void setThreadProject() override { SpecBase::setThreadProject(); UniqueIDBridge::SetIDRestorer(&m_idRestorer); } @@ -292,7 +292,7 @@ struct SpecMP1 : SpecBase { } bool checkFromStandaloneDisc(nod::DiscBase& disc, const hecl::SystemString& regstr, - const std::vector& args, std::vector& reps) { + const std::vector& args, std::vector& reps) override { nod::IPartition* partition = disc.getDataPartition(); m_dolBuf = partition->getDOLBuf(); const char* buildInfo = (char*)memmem(m_dolBuf.get(), partition->getDOLSize(), "MetroidBuildInfo", 16) + 19; @@ -319,7 +319,7 @@ struct SpecMP1 : SpecBase { } bool checkFromTrilogyDisc(nod::DiscBase& disc, const hecl::SystemString& regstr, - const std::vector& args, std::vector& reps) { + const std::vector& args, std::vector& reps) override { std::vector mp1args; bool doExtract = false; if (args.size()) { @@ -378,7 +378,7 @@ struct SpecMP1 : SpecBase { return true; } - bool extractFromDisc(nod::DiscBase& disc, bool force, const hecl::MultiProgressPrinter& progress) { + bool extractFromDisc(nod::DiscBase& disc, bool force, const hecl::MultiProgressPrinter& progress) override { m_project.enableDataSpecs({_SYS_STR("MP1-PC")}); nod::ExtractionContext ctx = {force, nullptr}; @@ -459,17 +459,17 @@ struct SpecMP1 : SpecBase { return true; } - const hecl::Database::DataSpecEntry& getOriginalSpec() const { return SpecEntMP1; } + const hecl::Database::DataSpecEntry& getOriginalSpec() const override { return SpecEntMP1; } - const hecl::Database::DataSpecEntry& getUnmodifiedSpec() const { return SpecEntMP1ORIG; } + const hecl::Database::DataSpecEntry& getUnmodifiedSpec() const override { return SpecEntMP1ORIG; } - hecl::ProjectPath getWorking(class UniqueID32& id) { return m_pakRouter.getWorking(id); } + hecl::ProjectPath getWorking(class UniqueID32& id) override { return m_pakRouter.getWorking(id); } - bool checkPathPrefix(const hecl::ProjectPath& path) const { + bool checkPathPrefix(const hecl::ProjectPath& path) const override { return path.getRelativePath().compare(0, 4, _SYS_STR("MP1/")) == 0; } - bool validateYAMLDNAType(athena::io::IStreamReader& fp) const { + bool validateYAMLDNAType(athena::io::IStreamReader& fp) const override { athena::io::YAMLDocReader reader; yaml_parser_set_input(reader.getParser(), (yaml_read_handler_t*)athena::io::YAMLAthenaReader, &fp); return reader.ClassTypeOperation([](const char* classType) { @@ -543,7 +543,7 @@ struct SpecMP1 : SpecBase { }); } - urde::SObjectTag buildTagFromPath(const hecl::ProjectPath& path) const { + urde::SObjectTag buildTagFromPath(const hecl::ProjectPath& path) const override { if (hecl::StringUtils::EndsWith(path.getAuxInfo(), _SYS_STR(".CINF"))) return {SBIG('CINF'), path.hash().val32()}; else if (hecl::StringUtils::EndsWith(path.getAuxInfo(), _SYS_STR(".CSKR"))) @@ -708,7 +708,7 @@ struct SpecMP1 : SpecBase { return {}; } - void getTagListForFile(const char* pakName, std::vector& out) const { + void getTagListForFile(const char* pakName, std::vector& out) const override { std::string pathPrefix("MP1/"); pathPrefix += pakName; pathPrefix += '/'; @@ -720,7 +720,7 @@ struct SpecMP1 : SpecBase { } void cookMesh(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast, - hecl::blender::Token& btok, FCookProgress progress) { + hecl::blender::Token& btok, FCookProgress progress) override { Mesh mesh = ds.compileMesh(fast ? hecl::HMDLTopology::Triangles : hecl::HMDLTopology::TriStrips, m_pc ? 16 : -1); if (m_pc) @@ -730,21 +730,21 @@ struct SpecMP1 : SpecBase { } void cookColMesh(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast, - hecl::blender::Token& btok, FCookProgress progress) { + hecl::blender::Token& btok, FCookProgress progress) override { std::vector mesh = ds.compileColMeshes(); ds.close(); DNAMP1::DCLN::Cook(out, mesh); } void cookPathMesh(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast, - hecl::blender::Token& btok, FCookProgress progress) { + hecl::blender::Token& btok, FCookProgress progress) override { PathMesh mesh = ds.compilePathMesh(); ds.close(); DNAMP1::PATH::Cook(out, in, mesh, btok); } void cookActor(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast, - hecl::blender::Token& btok, FCookProgress progress) { + hecl::blender::Token& btok, FCookProgress progress) override { if (hecl::StringUtils::EndsWith(in.getAuxInfo(), _SYS_STR(".CINF"))) { Actor actor = ds.compileActorCharacterOnly(); DNAMP1::ANCS::CookCINF(out, in, actor); @@ -796,7 +796,7 @@ struct SpecMP1 : SpecBase { } void cookArea(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast, - hecl::blender::Token& btok, FCookProgress progress) { + hecl::blender::Token& btok, FCookProgress progress) override { std::vector meshes = ds.getMeshList(); std::vector meshCompiles; meshCompiles.reserve(meshes.size()); @@ -832,7 +832,7 @@ struct SpecMP1 : SpecBase { } void cookWorld(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast, - hecl::blender::Token& btok, FCookProgress progress) { + hecl::blender::Token& btok, FCookProgress progress) override { if (hecl::StringUtils::EndsWith(in.getAuxInfo(), _SYS_STR("MAPW"))) { hecl::blender::World world = ds.compileWorld(); ds.close(); @@ -849,7 +849,7 @@ struct SpecMP1 : SpecBase { } void cookGuiFrame(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, - hecl::blender::Token& btok, FCookProgress progress) { + hecl::blender::Token& btok, FCookProgress progress) override { auto data = ds.compileGuiFrame(0); athena::io::MemoryReader r(data.data(), data.size()); DNAMP1::FRME frme; @@ -859,7 +859,7 @@ struct SpecMP1 : SpecBase { } void cookYAML(const hecl::ProjectPath& out, const hecl::ProjectPath& in, athena::io::IStreamReader& fin, - FCookProgress progress) { + FCookProgress progress) override { athena::io::YAMLDocReader reader; if (reader.parse(&fin)) { std::string classStr = reader.readString("DNAType"); @@ -992,7 +992,7 @@ struct SpecMP1 : SpecBase { progress(_SYS_STR("Done")); } - void flattenDependenciesYAML(athena::io::IStreamReader& fin, std::vector& pathsOut) { + void flattenDependenciesYAML(athena::io::IStreamReader& fin, std::vector& pathsOut) override { athena::io::YAMLDocReader reader; if (reader.parse(&fin)) { std::string classStr = reader.readString("DNAType"); @@ -1045,7 +1045,7 @@ struct SpecMP1 : SpecBase { } void flattenDependenciesANCSYAML(athena::io::IStreamReader& fin, std::vector& pathsOut, - int charIdx) { + int charIdx) override { athena::io::YAMLDocReader reader; if (reader.parse(&fin)) { std::string classStr = reader.readString("DNAType"); @@ -1073,7 +1073,8 @@ struct SpecMP1 : SpecBase { void buildWorldPakList(const hecl::ProjectPath& worldPath, const hecl::ProjectPath& worldPathCooked, hecl::blender::Token& btok, athena::io::FileWriter& w, std::vector& listOut, - atUint64& resTableOffset, std::unordered_map>& mlvlData) { + atUint64& resTableOffset, + std::unordered_map>& mlvlData) override { DNAMP1::MLVL mlvl; { athena::io::FileReader r(worldPathCooked.getAbsolutePath()); @@ -1231,7 +1232,7 @@ struct SpecMP1 : SpecBase { } void buildPakList(hecl::blender::Token& btok, athena::io::FileWriter& w, const std::vector& list, - const std::vector>& nameList, atUint64& resTableOffset) { + const std::vector>& nameList, atUint64& resTableOffset) override { w.writeUint32Big(m_pc ? 0x80030005 : 0x00030005); w.writeUint32Big(0); @@ -1259,7 +1260,7 @@ struct SpecMP1 : SpecBase { } void writePakFileIndex(athena::io::FileWriter& w, const std::vector& tags, - const std::vector>& index, atUint64 resTableOffset) { + const std::vector>& index, atUint64 resTableOffset) override { w.seek(resTableOffset, athena::Begin); auto it = tags.begin(); @@ -1276,7 +1277,7 @@ struct SpecMP1 : SpecBase { } std::pair, size_t> compressPakData(const urde::SObjectTag& tag, const uint8_t* data, - size_t len) { + size_t len) override { bool doCompress = false; switch (tag.type.toUint32()) { case SBIG('TXTR'): @@ -1309,18 +1310,18 @@ struct SpecMP1 : SpecBase { return ret; }; - void cookAudioGroup(const hecl::ProjectPath& out, const hecl::ProjectPath& in, FCookProgress progress) { + void cookAudioGroup(const hecl::ProjectPath& out, const hecl::ProjectPath& in, FCookProgress progress) override { DNAMP1::AGSC::Cook(in, out); progress(_SYS_STR("Done")); } - void cookSong(const hecl::ProjectPath& out, const hecl::ProjectPath& in, FCookProgress progress) { + void cookSong(const hecl::ProjectPath& out, const hecl::ProjectPath& in, FCookProgress progress) override { DNAMP1::CSNG::Cook(in, out); progress(_SYS_STR("Done")); } void cookMapArea(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, - hecl::blender::Token& btok, FCookProgress progress) { + hecl::blender::Token& btok, FCookProgress progress) override { hecl::blender::MapArea mapa = ds.compileMapArea(); ds.close(); DNAMP1::MAPA::Cook(mapa, out); @@ -1328,7 +1329,7 @@ struct SpecMP1 : SpecBase { } void cookMapUniverse(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, - hecl::blender::Token& btok, FCookProgress progress) { + hecl::blender::Token& btok, FCookProgress progress) override { hecl::blender::MapUniverse mapu = ds.compileMapUniverse(); ds.close(); DNAMAPU::MAPU::Cook(mapu, out); diff --git a/DataSpec/SpecMP2.cpp b/DataSpec/SpecMP2.cpp index f069befc2..c6316b843 100644 --- a/DataSpec/SpecMP2.cpp +++ b/DataSpec/SpecMP2.cpp @@ -100,7 +100,7 @@ struct OriginalIDs { }; struct SpecMP2 : SpecBase { - bool checkStandaloneID(const char* id) const { + bool checkStandaloneID(const char* id) const override { if (!memcmp(id, "G2M", 3)) return true; return false; @@ -115,7 +115,7 @@ struct SpecMP2 : SpecBase { PAKRouter m_pakRouter; IDRestorer m_idRestorer; - void setThreadProject() { + void setThreadProject() override { SpecBase::setThreadProject(); UniqueIDBridge::SetIDRestorer(&m_idRestorer); } @@ -194,7 +194,7 @@ struct SpecMP2 : SpecBase { } bool checkFromStandaloneDisc(nod::DiscBase& disc, const hecl::SystemString& regstr, - const std::vector& args, std::vector& reps) { + const std::vector& args, std::vector& reps) override { nod::IPartition* partition = disc.getDataPartition(); std::unique_ptr dolBuf = partition->getDOLBuf(); const char* buildInfo = (char*)memmem(dolBuf.get(), partition->getDOLSize(), "MetroidBuildInfo", 16) + 19; @@ -218,7 +218,7 @@ struct SpecMP2 : SpecBase { } bool checkFromTrilogyDisc(nod::DiscBase& disc, const hecl::SystemString& regstr, - const std::vector& args, std::vector& reps) { + const std::vector& args, std::vector& reps) override { std::vector mp2args; bool doExtract = false; if (args.size()) { @@ -277,7 +277,7 @@ struct SpecMP2 : SpecBase { return true; } - bool extractFromDisc(nod::DiscBase& disc, bool force, const hecl::MultiProgressPrinter& progress) { + bool extractFromDisc(nod::DiscBase& disc, bool force, const hecl::MultiProgressPrinter& progress) override { nod::ExtractionContext ctx = {force, nullptr}; m_workPath.makeDir(); @@ -335,17 +335,17 @@ struct SpecMP2 : SpecBase { return true; } - const hecl::Database::DataSpecEntry& getOriginalSpec() const { return SpecEntMP2; } + const hecl::Database::DataSpecEntry& getOriginalSpec() const override { return SpecEntMP2; } - const hecl::Database::DataSpecEntry& getUnmodifiedSpec() const { return SpecEntMP2ORIG; } + const hecl::Database::DataSpecEntry& getUnmodifiedSpec() const override { return SpecEntMP2ORIG; } - hecl::ProjectPath getWorking(class UniqueID32& id) { return m_pakRouter.getWorking(id); } + hecl::ProjectPath getWorking(class UniqueID32& id) override { return m_pakRouter.getWorking(id); } - bool checkPathPrefix(const hecl::ProjectPath& path) const { + bool checkPathPrefix(const hecl::ProjectPath& path) const override { return path.getRelativePath().compare(0, 4, _SYS_STR("MP2/")) == 0; } - bool validateYAMLDNAType(athena::io::IStreamReader& fp) const { + bool validateYAMLDNAType(athena::io::IStreamReader& fp) const override { athena::io::YAMLDocReader reader; yaml_parser_set_input(reader.getParser(), (yaml_read_handler_t*)athena::io::YAMLAthenaReader, &fp); return reader.ClassTypeOperation([](const char* classType) { @@ -359,49 +359,49 @@ struct SpecMP2 : SpecBase { }); } - urde::SObjectTag buildTagFromPath(const hecl::ProjectPath& path) const { return {}; } + urde::SObjectTag buildTagFromPath(const hecl::ProjectPath& path) const override { return {}; } void cookMesh(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast, - hecl::blender::Token& btok, FCookProgress progress) {} + hecl::blender::Token& btok, FCookProgress progress) override {} void cookColMesh(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast, - hecl::blender::Token& btok, FCookProgress progress) {} + hecl::blender::Token& btok, FCookProgress progress) override {} void cookPathMesh(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast, - hecl::blender::Token& btok, FCookProgress progress) {} + hecl::blender::Token& btok, FCookProgress progress) override {} void cookActor(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast, - hecl::blender::Token& btok, FCookProgress progress) {} + hecl::blender::Token& btok, FCookProgress progress) override {} void cookArea(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast, - hecl::blender::Token& btok, FCookProgress progress) {} + hecl::blender::Token& btok, FCookProgress progress) override {} void cookWorld(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast, - hecl::blender::Token& btok, FCookProgress progress) {} + hecl::blender::Token& btok, FCookProgress progress) override {} void cookGuiFrame(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, - hecl::blender::Token& btok, FCookProgress progress) {} + hecl::blender::Token& btok, FCookProgress progress) override {} void cookYAML(const hecl::ProjectPath& out, const hecl::ProjectPath& in, athena::io::IStreamReader& fin, - FCookProgress progress) {} + FCookProgress progress) override {} - void flattenDependenciesYAML(athena::io::IStreamReader& fin, std::vector& pathsOut) {} + void flattenDependenciesYAML(athena::io::IStreamReader& fin, std::vector& pathsOut) override {} void flattenDependenciesANCSYAML(athena::io::IStreamReader& fin, std::vector& pathsOut, - int charIdx) {} + int charIdx) override {} - void cookAudioGroup(const hecl::ProjectPath& out, const hecl::ProjectPath& in, FCookProgress progress) { + void cookAudioGroup(const hecl::ProjectPath& out, const hecl::ProjectPath& in, FCookProgress progress) override { DNAMP2::AGSC::Cook(in, out); progress(_SYS_STR("Done")); } - void cookSong(const hecl::ProjectPath& out, const hecl::ProjectPath& in, FCookProgress progress) { + void cookSong(const hecl::ProjectPath& out, const hecl::ProjectPath& in, FCookProgress progress) override { DNAMP1::CSNG::Cook(in, out); progress(_SYS_STR("Done")); } void cookMapArea(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, - hecl::blender::Token& btok, FCookProgress progress) { + hecl::blender::Token& btok, FCookProgress progress) override { hecl::blender::MapArea mapa = ds.compileMapArea(); ds.close(); DNAMP2::MAPA::Cook(mapa, out); @@ -409,7 +409,7 @@ struct SpecMP2 : SpecBase { } void cookMapUniverse(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, - hecl::blender::Token& btok, FCookProgress progress) { + hecl::blender::Token& btok, FCookProgress progress) override { hecl::blender::MapUniverse mapu = ds.compileMapUniverse(); ds.close(); DNAMAPU::MAPU::Cook(mapu, out); diff --git a/DataSpec/SpecMP3.cpp b/DataSpec/SpecMP3.cpp index 29a267609..01b01dc09 100644 --- a/DataSpec/SpecMP3.cpp +++ b/DataSpec/SpecMP3.cpp @@ -96,7 +96,7 @@ struct OriginalIDs { }; struct SpecMP3 : SpecBase { - bool checkStandaloneID(const char* id) const { + bool checkStandaloneID(const char* id) const override { if (!memcmp(id, "RM3", 3)) return true; return false; @@ -122,7 +122,7 @@ struct SpecMP3 : SpecBase { PAKRouter m_fePakRouter; IDRestorer m_idRestorer; - void setThreadProject() { + void setThreadProject() override { SpecBase::setThreadProject(); UniqueIDBridge::SetIDRestorer(&m_idRestorer); } @@ -233,7 +233,7 @@ struct SpecMP3 : SpecBase { } bool checkFromStandaloneDisc(nod::DiscBase& disc, const hecl::SystemString& regstr, - const std::vector& args, std::vector& reps) { + const std::vector& args, std::vector& reps) override { doMP3 = true; nod::IPartition* partition = disc.getDataPartition(); std::unique_ptr dolBuf = partition->getDOLBuf(); @@ -262,7 +262,7 @@ struct SpecMP3 : SpecBase { } bool checkFromTrilogyDisc(nod::DiscBase& disc, const hecl::SystemString& regstr, - const std::vector& args, std::vector& reps) { + const std::vector& args, std::vector& reps) override { std::vector mp3args; std::vector feargs; if (args.size()) { @@ -382,7 +382,7 @@ struct SpecMP3 : SpecBase { return doMP3 || doMPTFE; } - bool extractFromDisc(nod::DiscBase& disc, bool force, const hecl::MultiProgressPrinter& progress) { + bool extractFromDisc(nod::DiscBase& disc, bool force, const hecl::MultiProgressPrinter& progress) override { hecl::SystemString currentTarget = _SYS_STR(""); size_t nodeCount = 0; int prog = 0; @@ -497,17 +497,17 @@ struct SpecMP3 : SpecBase { return true; } - const hecl::Database::DataSpecEntry& getOriginalSpec() const { return SpecEntMP3; } + const hecl::Database::DataSpecEntry& getOriginalSpec() const override { return SpecEntMP3; } - const hecl::Database::DataSpecEntry& getUnmodifiedSpec() const { return SpecEntMP3ORIG; } + const hecl::Database::DataSpecEntry& getUnmodifiedSpec() const override { return SpecEntMP3ORIG; } - hecl::ProjectPath getWorking(class UniqueID64& id) { return m_pakRouter.getWorking(id); } + hecl::ProjectPath getWorking(class UniqueID64& id) override { return m_pakRouter.getWorking(id); } - bool checkPathPrefix(const hecl::ProjectPath& path) const { + bool checkPathPrefix(const hecl::ProjectPath& path) const override { return path.getRelativePath().compare(0, 4, _SYS_STR("MP3/")) == 0; } - bool validateYAMLDNAType(athena::io::IStreamReader& fp) const { + bool validateYAMLDNAType(athena::io::IStreamReader& fp) const override { if (athena::io::ValidateFromYAMLStream(fp)) return true; if (athena::io::ValidateFromYAMLStream(fp)) @@ -517,43 +517,43 @@ struct SpecMP3 : SpecBase { return false; } - urde::SObjectTag buildTagFromPath(const hecl::ProjectPath& path) const { return {}; } + urde::SObjectTag buildTagFromPath(const hecl::ProjectPath& path) const override { return {}; } void cookMesh(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast, - hecl::blender::Token& btok, FCookProgress progress) {} + hecl::blender::Token& btok, FCookProgress progress) override {} void cookColMesh(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast, - hecl::blender::Token& btok, FCookProgress progress) {} + hecl::blender::Token& btok, FCookProgress progress) override {} void cookPathMesh(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast, - hecl::blender::Token& btok, FCookProgress progress) {} + hecl::blender::Token& btok, FCookProgress progress) override {} void cookActor(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast, - hecl::blender::Token& btok, FCookProgress progress) {} + hecl::blender::Token& btok, FCookProgress progress) override {} void cookArea(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast, - hecl::blender::Token& btok, FCookProgress progress) {} + hecl::blender::Token& btok, FCookProgress progress) override {} void cookWorld(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast, - hecl::blender::Token& btok, FCookProgress progress) {} + hecl::blender::Token& btok, FCookProgress progress) override {} void cookGuiFrame(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, - hecl::blender::Token& btok, FCookProgress progress) {} + hecl::blender::Token& btok, FCookProgress progress) override {} void cookYAML(const hecl::ProjectPath& out, const hecl::ProjectPath& in, athena::io::IStreamReader& fin, - FCookProgress progress) {} + FCookProgress progress) override {} - void flattenDependenciesYAML(athena::io::IStreamReader& fin, std::vector& pathsOut) {} + void flattenDependenciesYAML(athena::io::IStreamReader& fin, std::vector& pathsOut) override {} void flattenDependenciesANCSYAML(athena::io::IStreamReader& fin, std::vector& pathsOut, - int charIdx) {} + int charIdx) override {} - void cookAudioGroup(const hecl::ProjectPath& out, const hecl::ProjectPath& in, FCookProgress progress) {} + void cookAudioGroup(const hecl::ProjectPath& out, const hecl::ProjectPath& in, FCookProgress progress) override {} - void cookSong(const hecl::ProjectPath& out, const hecl::ProjectPath& in, FCookProgress progress) {} + void cookSong(const hecl::ProjectPath& out, const hecl::ProjectPath& in, FCookProgress progress) override {} void cookMapArea(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, - hecl::blender::Token& btok, FCookProgress progress) { + hecl::blender::Token& btok, FCookProgress progress) override { hecl::blender::MapArea mapa = ds.compileMapArea(); ds.close(); DNAMP3::MAPA::Cook(mapa, out); @@ -561,7 +561,7 @@ struct SpecMP3 : SpecBase { } void cookMapUniverse(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, - hecl::blender::Token& btok, FCookProgress progress) {} + hecl::blender::Token& btok, FCookProgress progress) override {} UniqueID64 newToOriginal(urde::CAssetId id) const { UniqueID64 origId = m_idRestorer.newToOriginal({id.Value(), true}); From df663359c7ca9caf932637138a31255508ac65ff Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 10 Aug 2019 05:32:29 -0400 Subject: [PATCH 11/65] Editor/ProjectManager: Remove use of goto We can wrap the behavior into a lambda function and then call it where necessary, removing the need for goto (and allowing non-trivial types in the codepath). --- Editor/ProjectManager.cpp | 63 +++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/Editor/ProjectManager.cpp b/Editor/ProjectManager.cpp index 21d7171bc..b6fae4a91 100644 --- a/Editor/ProjectManager.cpp +++ b/Editor/ProjectManager.cpp @@ -85,52 +85,51 @@ bool ProjectManager::openProject(hecl::SystemStringView path) { return false; } - hecl::ProjectPath urdeSpacesPath(*m_proj, _SYS_STR(".hecl/urde_spaces.yaml")); + athena::io::YAMLDocReader r; + const auto makeProj = [this, &r, &subPath](bool needsSave) { + m_vm.ProjectChanged(*m_proj); + + if (needsSave) + m_vm.SetupEditorView(); + else + m_vm.SetupEditorView(r); + + const bool doRun = hecl::StringUtils::BeginsWith(subPath, _SYS_STR("out")); + if (doRun) { + m_mainMP1.emplace(nullptr, nullptr, m_vm.m_mainBooFactory, m_vm.m_mainCommandQueue, m_vm.m_renderTex); + m_vm.InitMP1(*m_mainMP1); + } + + if (needsSave) + saveProject(); + + m_vm.m_mainWindow->setTitle(fmt::format(fmt(_SYS_STR("{} - URDE [{}]")), + m_proj->getProjectRootPath().getLastComponent(), m_vm.platformName())); + m_vm.DismissSplash(); + m_vm.FadeInEditors(); + m_vm.pushRecentProject(m_proj->getProjectRootPath().getAbsolutePath()); + return true; + }; + + const hecl::ProjectPath urdeSpacesPath(*m_proj, _SYS_STR(".hecl/urde_spaces.yaml")); athena::io::FileReader reader(urdeSpacesPath.getAbsolutePath()); - bool needsSave = false; - athena::io::YAMLDocReader r; if (!reader.isOpen()) { - needsSave = true; - goto makeProj; + return makeProj(true); } yaml_parser_set_input(r.getParser(), (yaml_read_handler_t*)athena::io::YAMLAthenaReader, &reader); if (!r.ValidateClassType("UrdeSpacesState")) { - needsSave = true; - goto makeProj; + return makeProj(true); } r.reset(); reader.seek(0, athena::Begin); if (!r.parse(&reader)) { - needsSave = true; - goto makeProj; + return makeProj(true); } -makeProj: - m_vm.ProjectChanged(*m_proj); - - if (!needsSave) - m_vm.SetupEditorView(r); - else - m_vm.SetupEditorView(); - - bool doRun = hecl::StringUtils::BeginsWith(subPath, _SYS_STR("out")); - if (doRun) { - m_mainMP1.emplace(nullptr, nullptr, m_vm.m_mainBooFactory, m_vm.m_mainCommandQueue, m_vm.m_renderTex); - m_vm.InitMP1(*m_mainMP1); - } - - if (needsSave) - saveProject(); - - m_vm.m_mainWindow->setTitle(fmt::format(fmt(_SYS_STR("{} - URDE [{}]")), - m_proj->getProjectRootPath().getLastComponent(), m_vm.platformName())); - m_vm.DismissSplash(); - m_vm.FadeInEditors(); - m_vm.pushRecentProject(m_proj->getProjectRootPath().getAbsolutePath()); - return true; + return makeProj(false); } bool ProjectManager::extractGame(hecl::SystemStringView path) { return false; } From 43e808ff17f986217da34aad4f6e9f546018bae4 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 10 Aug 2019 05:40:49 -0400 Subject: [PATCH 12/65] Editor/ProjectManager: Remove pointer cast in GetObj() Pointer casting like this is technically undefined behavior, we can just use a lambda and forward the arguments over to the athena read handler. --- Editor/ProjectManager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Editor/ProjectManager.cpp b/Editor/ProjectManager.cpp index b6fae4a91..f9d0602cb 100644 --- a/Editor/ProjectManager.cpp +++ b/Editor/ProjectManager.cpp @@ -118,7 +118,12 @@ bool ProjectManager::openProject(hecl::SystemStringView path) { return makeProj(true); } - yaml_parser_set_input(r.getParser(), (yaml_read_handler_t*)athena::io::YAMLAthenaReader, &reader); + const auto readHandler = [](void* data, unsigned char* buffer, size_t size, size_t* size_read) { + auto* const reader = static_cast(data); + return athena::io::YAMLAthenaReader(reader, buffer, size, size_read); + }; + + yaml_parser_set_input(r.getParser(), readHandler, &reader); if (!r.ValidateClassType("UrdeSpacesState")) { return makeProj(true); } From a65b32892eccc2679f554c997c5789df469d1228 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 10 Aug 2019 05:52:06 -0400 Subject: [PATCH 13/65] Editor/ProjectManager: Make use of std::make_unique Same thing with a more straightforward syntax. --- Editor/ProjectManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Editor/ProjectManager.cpp b/Editor/ProjectManager.cpp index f9d0602cb..cd04bcfb7 100644 --- a/Editor/ProjectManager.cpp +++ b/Editor/ProjectManager.cpp @@ -53,7 +53,7 @@ bool ProjectManager::newProject(hecl::SystemStringView path) { } hecl::MakeDir(path.data()); - m_proj.reset(new hecl::Database::Project(path)); + m_proj = std::make_unique(path); if (!*m_proj) { m_proj.reset(); return false; @@ -79,7 +79,7 @@ bool ProjectManager::openProject(hecl::SystemStringView path) { return false; } - m_proj.reset(new hecl::Database::Project(projPath)); + m_proj = std::make_unique(projPath); if (!*m_proj) { m_proj.reset(); return false; From ad5e395a5127a211aebc5dce9c3730af69f79f53 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 10 Aug 2019 17:49:41 -0700 Subject: [PATCH 14/65] Fixes for `override` modernization --- DataSpec/DNACommon/FONT.hpp | 8 +- DataSpec/DNACommon/FSM2.hpp | 6 +- DataSpec/DNACommon/MAPA.hpp | 5 - DataSpec/DNACommon/ParticleCommon.hpp | 192 +++++++++--------- DataSpec/DNACommon/TXTR.hpp | 6 +- DataSpec/DNAMP1/ANCS.hpp | 24 +-- DataSpec/DNAMP1/ANIM.hpp | 6 +- DataSpec/DNAMP1/FRME.hpp | 28 ++- DataSpec/DNAMP1/STRG.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/AIJumpPoint.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/AIKeyframe.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Actor.hpp | 3 +- .../DNAMP1/ScriptObjects/ActorContraption.hpp | 3 +- .../DNAMP1/ScriptObjects/ActorKeyframe.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/ActorRotate.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/AmbientAI.hpp | 3 +- .../DNAMP1/ScriptObjects/AreaAttributes.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/AtomicAlpha.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/AtomicBeta.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Babygoth.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/BallTrigger.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Beetle.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/BloodFlower.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Burrower.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Camera.hpp | 3 +- .../ScriptObjects/CameraBlurKeyframe.hpp | 3 +- .../ScriptObjects/CameraFilterKeyframe.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/CameraHint.hpp | 3 +- .../ScriptObjects/CameraHintTrigger.hpp | 3 +- .../ScriptObjects/CameraPitchVolume.hpp | 3 +- .../DNAMP1/ScriptObjects/CameraShaker.hpp | 3 +- .../DNAMP1/ScriptObjects/CameraWaypoint.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/ChozoGhost.hpp | 3 +- .../DNAMP1/ScriptObjects/ColorModulate.hpp | 3 +- .../DNAMP1/ScriptObjects/ControllerAction.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Counter.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/CoverPoint.hpp | 3 +- .../ScriptObjects/DamageableTrigger.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Debris.hpp | 3 +- .../DNAMP1/ScriptObjects/DebrisExtended.hpp | 3 +- .../ScriptObjects/DebugCameraWaypoint.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/DistanceFog.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Dock.hpp | 3 +- .../DNAMP1/ScriptObjects/DockAreaChange.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/DoorArea.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Drone.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Effect.hpp | 3 +- .../ScriptObjects/ElectroMagneticPulse.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/ElitePirate.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/EnergyBall.hpp | 3 +- .../ScriptObjects/EnvFxDensityController.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Eyeball.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/FireFlea.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/FishCloud.hpp | 3 +- .../ScriptObjects/FishCloudModifier.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Flaahgra.hpp | 3 +- .../DNAMP1/ScriptObjects/FlaahgraTentacle.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/FlickerBat.hpp | 3 +- .../DNAMP1/ScriptObjects/FlyingPirate.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/FogVolume.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Geemer.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Generator.hpp | 3 +- .../DNAMP1/ScriptObjects/GrapplePoint.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/GunTurret.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/HUDMemo.hpp | 3 +- .../DNAMP1/ScriptObjects/IScriptObject.hpp | 2 +- DataSpec/DNAMP1/ScriptObjects/IceSheegoth.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/IceZoomer.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/JellyZap.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Magdolite.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/MazeNode.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/MemoryRelay.hpp | 3 +- .../DNAMP1/ScriptObjects/MetareeAlpha.hpp | 3 +- .../DNAMP1/ScriptObjects/MetroidAlpha.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/MetroidBeta.hpp | 3 +- .../ScriptObjects/MetroidPrimeStage1.hpp | 3 +- .../ScriptObjects/MetroidPrimeStage2.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Midi.hpp | 3 +- .../DNAMP1/ScriptObjects/NewCameraShaker.hpp | 3 +- .../DNAMP1/ScriptObjects/NewIntroBoss.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Oculus.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/OmegaPirate.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Parasite.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/PathCamera.hpp | 3 +- .../ScriptObjects/PhazonHealingNodule.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/PhazonPool.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Pickup.hpp | 3 +- .../DNAMP1/ScriptObjects/PickupGenerator.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Platform.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/PlayerActor.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/PlayerHint.hpp | 3 +- .../ScriptObjects/PlayerStateChange.hpp | 3 +- .../DNAMP1/ScriptObjects/PointOfInterest.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/PuddleSpore.hpp | 3 +- .../DNAMP1/ScriptObjects/PuddleToadGamma.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Puffer.hpp | 3 +- .../DNAMP1/ScriptObjects/RadialDamage.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/RandomRelay.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Relay.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Repulsor.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Ridley.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Ripper.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Ripple.hpp | 3 +- .../DNAMP1/ScriptObjects/RoomAcoustics.hpp | 3 +- .../DNAMP1/ScriptObjects/RumbleEffect.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/ScriptBeam.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Seedling.hpp | 3 +- .../DNAMP1/ScriptObjects/ShadowProjector.hpp | 3 +- .../DNAMP1/ScriptObjects/SnakeWeedSwarm.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Sound.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/SpacePirate.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/SpankWeed.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/SpawnPoint.hpp | 3 +- .../DNAMP1/ScriptObjects/SpecialFunction.hpp | 3 +- .../SpiderBallAttractionSurface.hpp | 3 +- .../ScriptObjects/SpiderBallWaypoint.hpp | 3 +- .../DNAMP1/ScriptObjects/SpindleCamera.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Steam.hpp | 3 +- .../DNAMP1/ScriptObjects/StreamedAudio.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Switch.hpp | 3 +- .../DNAMP1/ScriptObjects/TargetingPoint.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/TeamAIMgr.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Thardus.hpp | 3 +- .../ScriptObjects/ThardusRockProjectile.hpp | 3 +- .../DNAMP1/ScriptObjects/ThermalHeatFader.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Timer.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Trigger.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Tryclops.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/VisorFlare.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/VisorGoo.hpp | 3 +- .../DNAMP1/ScriptObjects/WallCrawlerSwarm.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Warwasp.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Water.hpp | 3 +- DataSpec/DNAMP1/ScriptObjects/Waypoint.hpp | 3 +- .../DNAMP1/ScriptObjects/WorldLightFader.hpp | 3 +- .../DNAMP1/ScriptObjects/WorldTeleporter.hpp | 3 +- DataSpec/DNAMP1/Tweaks/CTweakPlayerGun.hpp | 2 +- DataSpec/DNAMP2/ANIM.hpp | 6 +- DataSpec/DNAMP2/STRG.hpp | 3 +- DataSpec/DNAMP3/ANIM.hpp | 6 +- DataSpec/DNAMP3/CHAR.hpp | 15 +- DataSpec/DNAMP3/CMDLMaterials.hpp | 3 - DataSpec/DNAMP3/STRG.hpp | 3 +- Editor/GameMode.hpp | 3 +- Editor/InformationCenter.hpp | 3 +- Editor/ModelViewer.hpp | 3 +- Editor/ParticleEditor.hpp | 3 +- Editor/ResourceBrowser.hpp | 3 +- Editor/Space.hpp | 7 +- Runtime/MP1/World/CMakeLists.txt | 3 +- Runtime/World/ScriptLoader.cpp | 25 ++- amuse | 2 +- hecl | 2 +- nod | 2 +- 154 files changed, 303 insertions(+), 449 deletions(-) diff --git a/DataSpec/DNACommon/FONT.hpp b/DataSpec/DNACommon/FONT.hpp index 5ae523942..78664c8e9 100644 --- a/DataSpec/DNACommon/FONT.hpp +++ b/DataSpec/DNACommon/FONT.hpp @@ -12,7 +12,7 @@ struct GlyphRect : BigDNA { Value bottom; }; struct IGlyph : BigDNAVYaml { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV Value m_character; GlyphRect m_glyphRect; @@ -34,8 +34,7 @@ struct IGlyph : BigDNAVYaml { }; struct GlyphMP1 : IGlyph { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV Value m_leftPadding; Value m_advance; Value m_rightPadding; @@ -54,8 +53,7 @@ struct GlyphMP1 : IGlyph { }; struct GlyphMP2 : IGlyph { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV Value m_layer; Value m_leftPadding; Value m_advance; diff --git a/DataSpec/DNACommon/FSM2.hpp b/DataSpec/DNACommon/FSM2.hpp index c04c2705f..e0de55f7e 100644 --- a/DataSpec/DNACommon/FSM2.hpp +++ b/DataSpec/DNACommon/FSM2.hpp @@ -24,8 +24,7 @@ struct AT_SPECIALIZE_PARMS(DataSpec::UniqueID32, DataSpec::UniqueID64) FSM2 : Bi }; struct FSMV1 : IFSM { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV Value stateCount; Value unknown1Count; Value unknown2Count; @@ -68,8 +67,7 @@ struct AT_SPECIALIZE_PARMS(DataSpec::UniqueID32, DataSpec::UniqueID64) FSM2 : Bi }; struct FSMV2 : IFSM { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV Value stateCount; Value unknown1Count; Value unknown2Count; diff --git a/DataSpec/DNACommon/MAPA.hpp b/DataSpec/DNACommon/MAPA.hpp index 064f57eeb..5b8a2ad46 100644 --- a/DataSpec/DNACommon/MAPA.hpp +++ b/DataSpec/DNACommon/MAPA.hpp @@ -17,7 +17,6 @@ struct MAPA : BigDNA { }; struct HeaderMP1 : IMAPAHeader { - AT_DECL_DNA AT_DECL_DNAV Value unknown1 = 0; Value mapVisMode = 0; @@ -32,7 +31,6 @@ struct MAPA : BigDNA { }; struct HeaderMP2 : IMAPAHeader { - AT_DECL_DNA AT_DECL_DNAV Value unknown1 = 0; Value mapVisMode = 0; @@ -50,7 +48,6 @@ struct MAPA : BigDNA { }; struct HeaderMP3 : IMAPAHeader { - AT_DECL_DNA AT_DECL_DNAV Value unknown1 = 0; Value mapVisMode = 0; @@ -102,7 +99,6 @@ struct MAPA : BigDNA { }; struct MappableObjectMP1_2 : IMappableObject { - AT_DECL_DNA AT_DECL_DNAV Value type; Value visMode; @@ -113,7 +109,6 @@ struct MAPA : BigDNA { }; struct MappableObjectMP3 : IMappableObject { - AT_DECL_DNA AT_DECL_DNAV Value type; Value visMode; diff --git a/DataSpec/DNACommon/ParticleCommon.hpp b/DataSpec/DNACommon/ParticleCommon.hpp index 668fa1192..1f5f07f90 100644 --- a/DataSpec/DNACommon/ParticleCommon.hpp +++ b/DataSpec/DNACommon/ParticleCommon.hpp @@ -72,7 +72,7 @@ struct IUVElement : IElement { }; struct BoolHelper : IElement { - AT_DECL_EXPLICIT_DNA_YAML + AT_DECL_EXPLICIT_DNA_YAMLV_NO_TYPE bool value = false; operator bool() const { return value; } BoolHelper& operator=(bool val) { @@ -83,20 +83,20 @@ struct BoolHelper : IElement { }; struct RELifetimeTween : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE RealElementFactory a; RealElementFactory b; const char* ClassID() const override { return "LFTW"; } }; struct REConstant : IRealElement { - AT_DECL_EXPLICIT_DNA_YAML + AT_DECL_EXPLICIT_DNA_YAMLV_NO_TYPE Value val; const char* ClassID() const override { return "CNST"; } }; struct RETimeChain : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE RealElementFactory a; RealElementFactory b; IntElementFactory thresholdFrame; @@ -104,14 +104,14 @@ struct RETimeChain : IRealElement { }; struct REAdd : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE RealElementFactory a; RealElementFactory b; const char* ClassID() const override { return "ADD_"; } }; struct REClamp : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE RealElementFactory min; RealElementFactory max; RealElementFactory val; @@ -119,7 +119,7 @@ struct REClamp : IRealElement { }; struct REKeyframeEmitter : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE Value percentageTween; Value unk1; Value loop; @@ -132,28 +132,28 @@ struct REKeyframeEmitter : IRealElement { }; struct REInitialRandom : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE RealElementFactory a; RealElementFactory b; const char* ClassID() const override { return "IRND"; } }; struct RERandom : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE RealElementFactory a; RealElementFactory b; const char* ClassID() const override { return "RAND"; } }; struct REMultiply : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE RealElementFactory a; RealElementFactory b; const char* ClassID() const override { return "MULT"; } }; struct REPulse : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE IntElementFactory aDuration; IntElementFactory bDuration; RealElementFactory a; @@ -162,19 +162,19 @@ struct REPulse : IRealElement { }; struct RETimeScale : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE RealElementFactory dv; const char* ClassID() const override { return "SCAL"; } }; struct RELifetimePercent : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE RealElementFactory percent; const char* ClassID() const override { return "RLPT"; } }; struct RESineWave : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE RealElementFactory frequency; RealElementFactory amplitude; RealElementFactory phase; @@ -182,14 +182,14 @@ struct RESineWave : IRealElement { }; struct REInitialSwitch : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE RealElementFactory a; RealElementFactory b; const char* ClassID() const override { return "ISWT"; } }; struct RECompareLessThan : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE RealElementFactory ca; RealElementFactory cb; RealElementFactory pass; @@ -198,7 +198,7 @@ struct RECompareLessThan : IRealElement { }; struct RECompareEquals : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE RealElementFactory ca; RealElementFactory cb; RealElementFactory pass; @@ -207,101 +207,101 @@ struct RECompareEquals : IRealElement { }; struct REParticleAdvanceParam1 : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE const char* ClassID() const override { return "PAP1"; } }; struct REParticleAdvanceParam2 : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE const char* ClassID() const override { return "PAP2"; } }; struct REParticleAdvanceParam3 : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE const char* ClassID() const override { return "PAP3"; } }; struct REParticleAdvanceParam4 : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE const char* ClassID() const override { return "PAP4"; } }; struct REParticleAdvanceParam5 : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE const char* ClassID() const override { return "PAP5"; } }; struct REParticleAdvanceParam6 : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE const char* ClassID() const override { return "PAP6"; } }; struct REParticleAdvanceParam7 : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE const char* ClassID() const override { return "PAP7"; } }; struct REParticleAdvanceParam8 : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE const char* ClassID() const override { return "PAP8"; } }; struct REParticleSizeOrLineLength : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE const char* ClassID() const override { return "PSLL"; } }; struct REParticleRotationOrLineWidth : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE const char* ClassID() const override { return "PRLW"; } }; struct RESubtract : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE RealElementFactory a; RealElementFactory b; const char* ClassID() const override { return "SUB_"; } }; struct REVectorMagnitude : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory vec; const char* ClassID() const override { return "VMAG"; } }; struct REVectorXToReal : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory vec; const char* ClassID() const override { return "VXTR"; } }; struct REVectorYToReal : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory vec; const char* ClassID() const override { return "VYTR"; } }; struct REVectorZToReal : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory vec; const char* ClassID() const override { return "VZTR"; } }; struct RECEXT : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE IntElementFactory index; const char* ClassID() const override { return "CEXT"; } }; struct REIntTimesReal : IRealElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE IntElementFactory a; RealElementFactory b; const char* ClassID() const override { return "ITRL"; } }; struct IEKeyframeEmitter : IIntElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE Value percentageTween; Value unk1; Value loop; @@ -314,14 +314,14 @@ struct IEKeyframeEmitter : IIntElement { }; struct IEDeath : IIntElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE IntElementFactory passthrough; IntElementFactory thresholdFrame; const char* ClassID() const override { return "DETH"; } }; struct IEClamp : IIntElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE IntElementFactory min; IntElementFactory max; IntElementFactory val; @@ -329,7 +329,7 @@ struct IEClamp : IIntElement { }; struct IETimeChain : IIntElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE IntElementFactory a; IntElementFactory b; IntElementFactory thresholdFrame; @@ -337,39 +337,39 @@ struct IETimeChain : IIntElement { }; struct IEAdd : IIntElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE IntElementFactory a; IntElementFactory b; const char* ClassID() const override { return "ADD_"; } }; struct IEConstant : IIntElement { - AT_DECL_EXPLICIT_DNA_YAML + AT_DECL_EXPLICIT_DNA_YAMLV_NO_TYPE Value val; const char* ClassID() const override { return "CNST"; } }; struct IEImpulse : IIntElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE IntElementFactory val; const char* ClassID() const override { return "IMPL"; } }; struct IELifetimePercent : IIntElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE IntElementFactory percent; const char* ClassID() const override { return "ILPT"; } }; struct IEInitialRandom : IIntElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE IntElementFactory a; IntElementFactory b; const char* ClassID() const override { return "IRND"; } }; struct IEPulse : IIntElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE IntElementFactory aDuration; IntElementFactory bDuration; IntElementFactory a; @@ -378,14 +378,14 @@ struct IEPulse : IIntElement { }; struct IEMultiply : IIntElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE IntElementFactory a; IntElementFactory b; const char* ClassID() const override { return "MULT"; } }; struct IESampleAndHold : IIntElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE IntElementFactory val; IntElementFactory waitMin; IntElementFactory waitMax; @@ -393,46 +393,46 @@ struct IESampleAndHold : IIntElement { }; struct IERandom : IIntElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE IntElementFactory a; IntElementFactory b; const char* ClassID() const override { return "RAND"; } }; struct IETimeScale : IIntElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE RealElementFactory dv; const char* ClassID() const override { return "TSCL"; } }; struct IEGTCP : IIntElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE const char* ClassID() const override { return "GTCP"; } }; struct IEModulo : IIntElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE IntElementFactory a; IntElementFactory b; const char* ClassID() const override { return "MODU"; } }; struct IESubtract : IIntElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE IntElementFactory direction; IntElementFactory baseRadius; const char* ClassID() const override { return "SUB_"; } }; struct VECone : IVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory a; RealElementFactory b; const char* ClassID() const override { return "CONE"; } }; struct VETimeChain : IVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory a; VectorElementFactory b; IntElementFactory thresholdFrame; @@ -440,7 +440,7 @@ struct VETimeChain : IVectorElement { }; struct VEAngleCone : IVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE RealElementFactory angleXBias; RealElementFactory angleYBias; RealElementFactory angleXRange; @@ -450,14 +450,14 @@ struct VEAngleCone : IVectorElement { }; struct VEAdd : IVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory a; VectorElementFactory b; const char* ClassID() const override { return "ADD_"; } }; struct VECircleCluster : IVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory circleOffset; VectorElementFactory circleNormal; IntElementFactory cycleFrames; @@ -466,13 +466,13 @@ struct VECircleCluster : IVectorElement { }; struct VEConstant : IVectorElement { - AT_DECL_EXPLICIT_DNA_YAML + AT_DECL_EXPLICIT_DNA_YAMLV_NO_TYPE RealElementFactory comps[3]; const char* ClassID() const override { return "CNST"; } }; struct VECircle : IVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory circleOffset; VectorElementFactory circleNormal; RealElementFactory angleConstant; @@ -482,7 +482,7 @@ struct VECircle : IVectorElement { }; struct VEKeyframeEmitter : IVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE Value percentageTween; Value unk1; Value loop; @@ -495,20 +495,20 @@ struct VEKeyframeEmitter : IVectorElement { }; struct VEMultiply : IVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory a; VectorElementFactory b; const char* ClassID() const override { return "MULT"; } }; struct VERealToVector : IVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE RealElementFactory a; const char* ClassID() const override { return "RTOV"; } }; struct VEPulse : IVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE IntElementFactory aDuration; IntElementFactory bDuration; VectorElementFactory a; @@ -517,38 +517,38 @@ struct VEPulse : IVectorElement { }; struct VEParticleVelocity : IVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE const char* ClassID() const override { return "PVEL"; } }; struct VESPOS : IVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory a; const char* ClassID() const override { return "SPOS"; } }; struct VEPLCO : IVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE const char* ClassID() const override { return "PLCO"; } }; struct VEPLOC : IVectorElement { - AT_DECL_DNA_YAML - const char* ClassID() const { return "PLOC"; } + AT_DECL_DNA_YAMLV_NO_TYPE + const char* ClassID() const override { return "PLOC"; } }; struct VEPSOR : IVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE const char* ClassID() const override { return "PSOR"; } }; struct VEPSOF : IVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE const char* ClassID() const override { return "PSOF"; } }; struct CEKeyframeEmitter : IColorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE Value percentageTween; Value unk1; Value loop; @@ -561,13 +561,13 @@ struct CEKeyframeEmitter : IColorElement { }; struct CEConstant : IColorElement { - AT_DECL_EXPLICIT_DNA_YAML + AT_DECL_EXPLICIT_DNA_YAMLV_NO_TYPE RealElementFactory comps[4]; const char* ClassID() const override { return "CNST"; } }; struct CETimeChain : IColorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE ColorElementFactory a; ColorElementFactory b; IntElementFactory thresholdFrame; @@ -575,7 +575,7 @@ struct CETimeChain : IColorElement { }; struct CEFadeEnd : IColorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE ColorElementFactory a; ColorElementFactory b; RealElementFactory startFrame; @@ -584,7 +584,7 @@ struct CEFadeEnd : IColorElement { }; struct CEFade : IColorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE ColorElementFactory a; ColorElementFactory b; RealElementFactory endFrame; @@ -592,7 +592,7 @@ struct CEFade : IColorElement { }; struct CEPulse : IColorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE IntElementFactory aDuration; IntElementFactory bDuration; ColorElementFactory a; @@ -601,7 +601,7 @@ struct CEPulse : IColorElement { }; struct MVEImplosion : IModVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory implodePoint; RealElementFactory velocityScale; RealElementFactory maxRadius; @@ -611,7 +611,7 @@ struct MVEImplosion : IModVectorElement { }; struct MVEExponentialImplosion : IModVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory implodePoint; RealElementFactory velocityScale; RealElementFactory maxRadius; @@ -621,7 +621,7 @@ struct MVEExponentialImplosion : IModVectorElement { }; struct MVETimeChain : IModVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE ModVectorElementFactory a; ModVectorElementFactory b; IntElementFactory thresholdFrame; @@ -629,7 +629,7 @@ struct MVETimeChain : IModVectorElement { }; struct MVEBounce : IModVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory planePoint; VectorElementFactory planeNormal; RealElementFactory friction; @@ -639,32 +639,32 @@ struct MVEBounce : IModVectorElement { }; struct MVEConstant : IModVectorElement { - AT_DECL_EXPLICIT_DNA_YAML + AT_DECL_EXPLICIT_DNA_YAMLV_NO_TYPE RealElementFactory comps[3]; const char* ClassID() const override { return "CNST"; } }; struct MVEGravity : IModVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory acceleration; - const char* ClassID() const { return "GRAV"; } + const char* ClassID() const override { return "GRAV"; } }; struct MVEExplode : IModVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE RealElementFactory impulseMagnitude; RealElementFactory falloffFactor; const char* ClassID() const override { return "EXPL"; } }; struct MVESetPosition : IModVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory position; const char* ClassID() const override { return "SPOS"; } }; struct MVELinearImplosion : IModVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory implodePoint; RealElementFactory velocityScale; RealElementFactory maxRadius; @@ -674,7 +674,7 @@ struct MVELinearImplosion : IModVectorElement { }; struct MVEPulse : IModVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE IntElementFactory aDuration; IntElementFactory bDuration; ModVectorElementFactory a; @@ -683,14 +683,14 @@ struct MVEPulse : IModVectorElement { }; struct MVEWind : IModVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory windVelocity; RealElementFactory factor; const char* ClassID() const override { return "WIND"; } }; struct MVESwirl : IModVectorElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory helixPoint; VectorElementFactory curveBinormal; RealElementFactory filterGain; @@ -699,14 +699,14 @@ struct MVESwirl : IModVectorElement { }; struct EESimpleEmitter : IEmitterElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory position; VectorElementFactory velocity; const char* ClassID() const override { return "SEMR"; } }; struct VESphere : IEmitterElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory sphereOrigin; RealElementFactory sphereRadius; RealElementFactory magnitude; @@ -714,7 +714,7 @@ struct VESphere : IEmitterElement { }; struct VEAngleSphere : IEmitterElement { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV_NO_TYPE VectorElementFactory sphereOrigin; RealElementFactory sphereRadius; RealElementFactory magnitude; @@ -726,25 +726,25 @@ struct VEAngleSphere : IEmitterElement { }; struct EESimpleEmitterTR : EESimpleEmitter { - AT_DECL_EXPLICIT_DNA_YAML + AT_DECL_EXPLICIT_DNA_YAMLV_NO_TYPE const char* ClassID() const override { return "SETR"; } }; template struct UVEConstant : IUVElement { - AT_DECL_EXPLICIT_DNA_YAML + AT_DECL_EXPLICIT_DNA_YAMLV_NO_TYPE AT_SUBDECL_DNA CastIDToZero tex; const char* ClassID() const override { return "CNST"; } - void gatherDependencies(std::vector& pathsOut) const { + void gatherDependencies(std::vector& pathsOut) const override { g_curSpec->flattenDependencies(tex, pathsOut); } }; template struct UVEAnimTexture : IUVElement { - AT_DECL_EXPLICIT_DNA_YAML + AT_DECL_EXPLICIT_DNA_YAMLV_NO_TYPE AT_SUBDECL_DNA CastIDToZero tex; IntElementFactory tileW; @@ -755,7 +755,7 @@ struct UVEAnimTexture : IUVElement { Value loop = false; const char* ClassID() const override { return "ATEX"; } - void gatherDependencies(std::vector& pathsOut) const { + void gatherDependencies(std::vector& pathsOut) const override { g_curSpec->flattenDependencies(tex, pathsOut); } }; diff --git a/DataSpec/DNACommon/TXTR.hpp b/DataSpec/DNACommon/TXTR.hpp index 9619e94cc..664fc9fd1 100644 --- a/DataSpec/DNACommon/TXTR.hpp +++ b/DataSpec/DNACommon/TXTR.hpp @@ -7,15 +7,13 @@ class PAKEntryReadStream; struct TXTR { struct PaletteMeta : BigDNAVYaml { - AT_DECL_EXPLICIT_DNA_YAML - AT_DECL_DNAV + AT_DECL_EXPLICIT_DNA_YAMLV Value format = UINT_MAX; Value elementCount = 0; Value dolphinHash = 0; }; struct Meta : BigDNAVYaml { - AT_DECL_EXPLICIT_DNA_YAML - AT_DECL_DNAV + AT_DECL_EXPLICIT_DNA_YAMLV Value format = UINT_MAX; Value mips = 0; Value width = 0; diff --git a/DataSpec/DNAMP1/ANCS.hpp b/DataSpec/DNAMP1/ANCS.hpp index 290d6439a..f91cda8a7 100644 --- a/DataSpec/DNAMP1/ANCS.hpp +++ b/DataSpec/DNAMP1/ANCS.hpp @@ -145,8 +145,7 @@ struct ANCS : BigDNA { std::unique_ptr m_anim; }; struct MetaAnimPrimitive : IMetaAnim { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV MetaAnimPrimitive() : IMetaAnim(Type::Primitive, "Primitive") {} UniqueID32 animId; @@ -164,8 +163,7 @@ struct ANCS : BigDNA { }; struct MetaAnimBlend : IMetaAnim { MetaAnimBlend() : IMetaAnim(Type::Blend, "Blend") {} - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV MetaAnimFactory animA; MetaAnimFactory animB; Value unkFloat; @@ -187,8 +185,7 @@ struct ANCS : BigDNA { }; struct MetaAnimPhaseBlend : IMetaAnim { MetaAnimPhaseBlend() : IMetaAnim(Type::PhaseBlend, "PhaseBlend") {} - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV MetaAnimFactory animA; MetaAnimFactory animB; Value unkFloat; @@ -210,8 +207,7 @@ struct ANCS : BigDNA { }; struct MetaAnimRandom : IMetaAnim { MetaAnimRandom() : IMetaAnim(Type::Random, "Random") {} - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV Value animCount; struct Child : BigDNA { AT_DECL_DNA @@ -235,8 +231,7 @@ struct ANCS : BigDNA { }; struct MetaAnimSequence : IMetaAnim { MetaAnimSequence() : IMetaAnim(Type::Sequence, "Sequence") {} - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV Value animCount; Vector children; @@ -282,8 +277,7 @@ struct ANCS : BigDNA { }; struct MetaTransMetaAnim : IMetaTrans { MetaTransMetaAnim() : IMetaTrans(Type::MetaAnim, "MetaAnim") {} - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV MetaAnimFactory anim; void gatherPrimitives(PAKRouter* pakRouter, @@ -297,8 +291,7 @@ struct ANCS : BigDNA { }; struct MetaTransTrans : IMetaTrans { MetaTransTrans() : IMetaTrans(Type::Trans, "Trans") {} - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV Value transDurTime; Value transDurTimeMode; Value unk2; @@ -307,8 +300,7 @@ struct ANCS : BigDNA { }; struct MetaTransPhaseTrans : IMetaTrans { MetaTransPhaseTrans() : IMetaTrans(Type::PhaseTrans, "PhaseTrans") {} - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV Value transDurTime; Value transDurTimeMode; Value unk2; diff --git a/DataSpec/DNAMP1/ANIM.hpp b/DataSpec/DNAMP1/ANIM.hpp index dfac28103..7c14efe03 100644 --- a/DataSpec/DNAMP1/ANIM.hpp +++ b/DataSpec/DNAMP1/ANIM.hpp @@ -31,8 +31,7 @@ struct ANIM : BigDNA { }; struct ANIM0 : IANIM { - AT_DECL_EXPLICIT_DNA - AT_DECL_DNAV + AT_DECL_EXPLICIT_DNAV ANIM0() : IANIM(0) {} struct Header : BigDNA { @@ -48,8 +47,7 @@ struct ANIM : BigDNA { }; struct ANIM2 : IANIM { - AT_DECL_EXPLICIT_DNA - AT_DECL_DNAV + AT_DECL_EXPLICIT_DNAV ANIM2(bool pc) : IANIM(pc ? 3 : 2) {} struct Header : BigDNA { diff --git a/DataSpec/DNAMP1/FRME.hpp b/DataSpec/DNAMP1/FRME.hpp index 6afd0ada9..90d34ff29 100644 --- a/DataSpec/DNAMP1/FRME.hpp +++ b/DataSpec/DNAMP1/FRME.hpp @@ -45,19 +45,19 @@ struct FRME : BigDNA { Value unk2; struct BWIGInfo : IWidgetInfo { - AT_DECL_DNA + AT_DECL_DNAV_NO_TYPE const char* DNATypeV() const override { return "FRME::BWIG"; } FourCC fourcc() const override { return FOURCC('BWIG'); } }; struct HWIGInfo : IWidgetInfo { - AT_DECL_DNA + AT_DECL_DNAV_NO_TYPE const char* DNATypeV() const override { return "FRME::HWIG"; } FourCC fourcc() const override { return FOURCC('HWIG'); } }; struct CAMRInfo : IWidgetInfo { - AT_DECL_EXPLICIT_DNA + AT_DECL_EXPLICIT_DNAV_NO_TYPE const char* DNATypeV() const override { return "FRME::CAMR"; } enum class ProjectionType { Perspective, Orthographic }; @@ -69,7 +69,6 @@ struct FRME : BigDNA { }; struct PerspectiveProjection : IProjection { - AT_DECL_DNA AT_DECL_DNAV PerspectiveProjection() : IProjection(ProjectionType::Perspective) {} Value fov; @@ -79,7 +78,6 @@ struct FRME : BigDNA { }; struct OrthographicProjection : IProjection { - AT_DECL_DNA AT_DECL_DNAV OrthographicProjection() : IProjection(ProjectionType::Orthographic) {} Value left; @@ -95,7 +93,7 @@ struct FRME : BigDNA { }; struct MODLInfo : IWidgetInfo { - AT_DECL_DNA + AT_DECL_DNAV_NO_TYPE const char* DNATypeV() const override { return "FRME::MODL"; } UniqueID32 model; enum class BlendMode { Unknown0, Unknown1, Unknown2, Additive }; @@ -107,7 +105,7 @@ struct FRME : BigDNA { }; struct LITEInfo : IWidgetInfo { - AT_DECL_EXPLICIT_DNA + AT_DECL_EXPLICIT_DNAV_NO_TYPE const char* DNATypeV() const override { return "FRME::LITE"; } enum class ELightType : atUint32 { Spot = 0, @@ -131,7 +129,7 @@ struct FRME : BigDNA { }; struct ENRGInfo : IWidgetInfo { - AT_DECL_DNA + AT_DECL_DNAV_NO_TYPE const char* DNATypeV() const override { return "FRME::ENRG"; } UniqueID32 texture; @@ -139,7 +137,7 @@ struct FRME : BigDNA { }; struct METRInfo : IWidgetInfo { - AT_DECL_DNA + AT_DECL_DNAV_NO_TYPE const char* DNATypeV() const override { return "FRME::METR"; } Value unk1; Value noRoundUp; @@ -150,7 +148,7 @@ struct FRME : BigDNA { }; struct GRUPInfo : IWidgetInfo { - AT_DECL_DNA + AT_DECL_DNAV_NO_TYPE const char* DNATypeV() const override { return "FRME::GRUP"; } Value defaultWorker; Value unk3; @@ -159,7 +157,7 @@ struct FRME : BigDNA { }; struct TBGPInfo : IWidgetInfo { - AT_DECL_DNA + AT_DECL_DNAV_NO_TYPE const char* DNATypeV() const override { return "FRME::TBGP"; } Value elementCount; Value unk2; @@ -181,7 +179,7 @@ struct FRME : BigDNA { }; struct SLGPInfo : IWidgetInfo { - AT_DECL_DNA + AT_DECL_DNAV_NO_TYPE const char* DNATypeV() const override { return "FRME::SLGP"; } Value min; Value max; @@ -192,7 +190,7 @@ struct FRME : BigDNA { }; struct PANEInfo : IWidgetInfo { - AT_DECL_DNA + AT_DECL_DNAV_NO_TYPE const char* DNATypeV() const override { return "FRME::PANE"; } Value xDim; Value zDim; @@ -229,7 +227,7 @@ struct FRME : BigDNA { RightMono }; - AT_DECL_EXPLICIT_DNA + AT_DECL_EXPLICIT_DNAV_NO_TYPE atUint32 version = 0; TXPNInfo() {} @@ -253,7 +251,7 @@ struct FRME : BigDNA { }; struct IMGPInfo : IWidgetInfo { - AT_DECL_DNA + AT_DECL_DNAV_NO_TYPE const char* DNATypeV() const override { return "FRME::IMGP"; } UniqueID32 texture; Value unk1; diff --git a/DataSpec/DNAMP1/STRG.hpp b/DataSpec/DNAMP1/STRG.hpp index 093fde9bf..b3aad7702 100644 --- a/DataSpec/DNAMP1/STRG.hpp +++ b/DataSpec/DNAMP1/STRG.hpp @@ -8,8 +8,7 @@ namespace DataSpec::DNAMP1 { struct STRG : ISTRG { - AT_DECL_EXPLICIT_DNA_YAML - AT_DECL_DNAV + AT_DECL_EXPLICIT_DNA_YAMLV void _read(athena::io::IStreamReader& reader); std::vector>> langs; std::unordered_map*> langMap; diff --git a/DataSpec/DNAMP1/ScriptObjects/AIJumpPoint.hpp b/DataSpec/DNAMP1/ScriptObjects/AIJumpPoint.hpp index cc7b39b12..2595fc26c 100644 --- a/DataSpec/DNAMP1/ScriptObjects/AIJumpPoint.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/AIJumpPoint.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct AIJumpPoint : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/AIKeyframe.hpp b/DataSpec/DNAMP1/ScriptObjects/AIKeyframe.hpp index adc89cc47..9d05a3c36 100644 --- a/DataSpec/DNAMP1/ScriptObjects/AIKeyframe.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/AIKeyframe.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct AIKeyframe : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value animationId; Value looping; diff --git a/DataSpec/DNAMP1/ScriptObjects/Actor.hpp b/DataSpec/DNAMP1/ScriptObjects/Actor.hpp index 47d4300ba..d48187394 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Actor.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Actor.hpp @@ -5,8 +5,7 @@ namespace DataSpec::DNAMP1 { struct Actor : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name SO_NAME_SPECPROP(); Value location SO_LOCATION_SPECPROP(); Value orientation SO_ORIENTATION_SPECPROP(); diff --git a/DataSpec/DNAMP1/ScriptObjects/ActorContraption.hpp b/DataSpec/DNAMP1/ScriptObjects/ActorContraption.hpp index 0f14e08fc..b367b9ca2 100644 --- a/DataSpec/DNAMP1/ScriptObjects/ActorContraption.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/ActorContraption.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct ActorContraption : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/ActorKeyframe.hpp b/DataSpec/DNAMP1/ScriptObjects/ActorKeyframe.hpp index 30e6c362f..4fb752caa 100644 --- a/DataSpec/DNAMP1/ScriptObjects/ActorKeyframe.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/ActorKeyframe.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct ActorKeyframe : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value animationId; Value looping; diff --git a/DataSpec/DNAMP1/ScriptObjects/ActorRotate.hpp b/DataSpec/DNAMP1/ScriptObjects/ActorRotate.hpp index f3cea70f2..41f2a4c1f 100644 --- a/DataSpec/DNAMP1/ScriptObjects/ActorRotate.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/ActorRotate.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct ActorRotate : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value rotationOffset; Value timeScale; diff --git a/DataSpec/DNAMP1/ScriptObjects/AmbientAI.hpp b/DataSpec/DNAMP1/ScriptObjects/AmbientAI.hpp index 4c7895367..92eeaf626 100644 --- a/DataSpec/DNAMP1/ScriptObjects/AmbientAI.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/AmbientAI.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct AmbientAI : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/AreaAttributes.hpp b/DataSpec/DNAMP1/ScriptObjects/AreaAttributes.hpp index 93d1bfe65..5ee96ae11 100644 --- a/DataSpec/DNAMP1/ScriptObjects/AreaAttributes.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/AreaAttributes.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct AreaAttributes : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV enum class EWeatherType : atUint32 { None, Snow, Rain }; Value load; /* 0 causes the loader to bail and return null */ diff --git a/DataSpec/DNAMP1/ScriptObjects/AtomicAlpha.hpp b/DataSpec/DNAMP1/ScriptObjects/AtomicAlpha.hpp index e7fb0dc4b..5ea14c195 100644 --- a/DataSpec/DNAMP1/ScriptObjects/AtomicAlpha.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/AtomicAlpha.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct AtomicAlpha : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/AtomicBeta.hpp b/DataSpec/DNAMP1/ScriptObjects/AtomicBeta.hpp index 02904d8cc..e367f683e 100644 --- a/DataSpec/DNAMP1/ScriptObjects/AtomicBeta.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/AtomicBeta.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct AtomicBeta : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/Babygoth.hpp b/DataSpec/DNAMP1/ScriptObjects/Babygoth.hpp index 4ca89aafb..5f7b94c65 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Babygoth.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Babygoth.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Babygoth : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/BallTrigger.hpp b/DataSpec/DNAMP1/ScriptObjects/BallTrigger.hpp index ecb680702..b09627694 100644 --- a/DataSpec/DNAMP1/ScriptObjects/BallTrigger.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/BallTrigger.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct BallTrigger : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value volume; diff --git a/DataSpec/DNAMP1/ScriptObjects/Beetle.hpp b/DataSpec/DNAMP1/ScriptObjects/Beetle.hpp index 2b5459543..2c6c39445 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Beetle.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Beetle.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Beetle : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value flavor; Value location; diff --git a/DataSpec/DNAMP1/ScriptObjects/BloodFlower.hpp b/DataSpec/DNAMP1/ScriptObjects/BloodFlower.hpp index e0dd154e0..69e4d1209 100644 --- a/DataSpec/DNAMP1/ScriptObjects/BloodFlower.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/BloodFlower.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct BloodFlower : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/Burrower.hpp b/DataSpec/DNAMP1/ScriptObjects/Burrower.hpp index e98a58200..38ca9adde 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Burrower.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Burrower.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Burrower : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/Camera.hpp b/DataSpec/DNAMP1/ScriptObjects/Camera.hpp index c827e7abe..1eec64c84 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Camera.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Camera.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Camera : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/CameraBlurKeyframe.hpp b/DataSpec/DNAMP1/ScriptObjects/CameraBlurKeyframe.hpp index 7993f58bb..1565bba1d 100644 --- a/DataSpec/DNAMP1/ScriptObjects/CameraBlurKeyframe.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/CameraBlurKeyframe.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct CameraBlurKeyframe : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value active; Value btype; diff --git a/DataSpec/DNAMP1/ScriptObjects/CameraFilterKeyframe.hpp b/DataSpec/DNAMP1/ScriptObjects/CameraFilterKeyframe.hpp index eb492d1db..db95965b7 100644 --- a/DataSpec/DNAMP1/ScriptObjects/CameraFilterKeyframe.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/CameraFilterKeyframe.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct CameraFilterKeyframe : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value active; Value ftype; diff --git a/DataSpec/DNAMP1/ScriptObjects/CameraHint.hpp b/DataSpec/DNAMP1/ScriptObjects/CameraHint.hpp index 3f1575c2a..31a2e8390 100644 --- a/DataSpec/DNAMP1/ScriptObjects/CameraHint.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/CameraHint.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct CameraHint : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/CameraHintTrigger.hpp b/DataSpec/DNAMP1/ScriptObjects/CameraHintTrigger.hpp index f6730a8ae..37287382e 100644 --- a/DataSpec/DNAMP1/ScriptObjects/CameraHintTrigger.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/CameraHintTrigger.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct CameraHintTrigger : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/CameraPitchVolume.hpp b/DataSpec/DNAMP1/ScriptObjects/CameraPitchVolume.hpp index a0903fdfb..9a8566fb5 100644 --- a/DataSpec/DNAMP1/ScriptObjects/CameraPitchVolume.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/CameraPitchVolume.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct CameraPitchVolume : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/CameraShaker.hpp b/DataSpec/DNAMP1/ScriptObjects/CameraShaker.hpp index 7a304cc31..c953ca45c 100644 --- a/DataSpec/DNAMP1/ScriptObjects/CameraShaker.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/CameraShaker.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct CameraShaker : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value xMag; Value xB; diff --git a/DataSpec/DNAMP1/ScriptObjects/CameraWaypoint.hpp b/DataSpec/DNAMP1/ScriptObjects/CameraWaypoint.hpp index 499e1fb70..24ddd9604 100644 --- a/DataSpec/DNAMP1/ScriptObjects/CameraWaypoint.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/CameraWaypoint.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct CameraWaypoint : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/ChozoGhost.hpp b/DataSpec/DNAMP1/ScriptObjects/ChozoGhost.hpp index b5ccc0829..a4bb949e1 100644 --- a/DataSpec/DNAMP1/ScriptObjects/ChozoGhost.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/ChozoGhost.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct ChozoGhost : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/ColorModulate.hpp b/DataSpec/DNAMP1/ScriptObjects/ColorModulate.hpp index 5ec32626c..a1cc80504 100644 --- a/DataSpec/DNAMP1/ScriptObjects/ColorModulate.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/ColorModulate.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct ColorModulate : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value colorA; Value colorB; diff --git a/DataSpec/DNAMP1/ScriptObjects/ControllerAction.hpp b/DataSpec/DNAMP1/ScriptObjects/ControllerAction.hpp index 60635e0f4..dff78e217 100644 --- a/DataSpec/DNAMP1/ScriptObjects/ControllerAction.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/ControllerAction.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct ControllerAction : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value active; Value command; diff --git a/DataSpec/DNAMP1/ScriptObjects/Counter.hpp b/DataSpec/DNAMP1/ScriptObjects/Counter.hpp index b7ad11cd9..460816cae 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Counter.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Counter.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Counter : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value initial; Value maxValue; diff --git a/DataSpec/DNAMP1/ScriptObjects/CoverPoint.hpp b/DataSpec/DNAMP1/ScriptObjects/CoverPoint.hpp index d78f192f9..040ece63d 100644 --- a/DataSpec/DNAMP1/ScriptObjects/CoverPoint.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/CoverPoint.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct CoverPoint : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/DamageableTrigger.hpp b/DataSpec/DNAMP1/ScriptObjects/DamageableTrigger.hpp index f9c79cac1..ec893629e 100644 --- a/DataSpec/DNAMP1/ScriptObjects/DamageableTrigger.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/DamageableTrigger.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct DamageableTrigger : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value volume; diff --git a/DataSpec/DNAMP1/ScriptObjects/Debris.hpp b/DataSpec/DNAMP1/ScriptObjects/Debris.hpp index ad614fb5d..401c0ad7f 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Debris.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Debris.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Debris : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/DebrisExtended.hpp b/DataSpec/DNAMP1/ScriptObjects/DebrisExtended.hpp index 2210c7b04..002b3d751 100644 --- a/DataSpec/DNAMP1/ScriptObjects/DebrisExtended.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/DebrisExtended.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct DebrisExtended : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/DebugCameraWaypoint.hpp b/DataSpec/DNAMP1/ScriptObjects/DebugCameraWaypoint.hpp index 8894c97ea..aad5f0e39 100644 --- a/DataSpec/DNAMP1/ScriptObjects/DebugCameraWaypoint.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/DebugCameraWaypoint.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct DebugCameraWaypoint : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/DistanceFog.hpp b/DataSpec/DNAMP1/ScriptObjects/DistanceFog.hpp index f8a01ce6d..07813fc15 100644 --- a/DataSpec/DNAMP1/ScriptObjects/DistanceFog.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/DistanceFog.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct DistanceFog : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value fogMode; Value fogColor; // CColor diff --git a/DataSpec/DNAMP1/ScriptObjects/Dock.hpp b/DataSpec/DNAMP1/ScriptObjects/Dock.hpp index 546ac6a2d..1d24e3cb1 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Dock.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Dock.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Dock : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value active; Value location; diff --git a/DataSpec/DNAMP1/ScriptObjects/DockAreaChange.hpp b/DataSpec/DNAMP1/ScriptObjects/DockAreaChange.hpp index 9f9827805..64bb25b9c 100644 --- a/DataSpec/DNAMP1/ScriptObjects/DockAreaChange.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/DockAreaChange.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct DockAreaChange : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value dockReference; Value active; diff --git a/DataSpec/DNAMP1/ScriptObjects/DoorArea.hpp b/DataSpec/DNAMP1/ScriptObjects/DoorArea.hpp index 03ba6ae4f..8cfaacb6b 100644 --- a/DataSpec/DNAMP1/ScriptObjects/DoorArea.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/DoorArea.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct DoorArea : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/Drone.hpp b/DataSpec/DNAMP1/ScriptObjects/Drone.hpp index 20bc158e2..daf8c0665 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Drone.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Drone.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Drone : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value unknown1; Value location; diff --git a/DataSpec/DNAMP1/ScriptObjects/Effect.hpp b/DataSpec/DNAMP1/ScriptObjects/Effect.hpp index 0d1ca2b9c..05ce2153c 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Effect.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Effect.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Effect : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/ElectroMagneticPulse.hpp b/DataSpec/DNAMP1/ScriptObjects/ElectroMagneticPulse.hpp index 518d95f8c..6a3c92685 100644 --- a/DataSpec/DNAMP1/ScriptObjects/ElectroMagneticPulse.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/ElectroMagneticPulse.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct ElectroMagneticPulse : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/ElitePirate.hpp b/DataSpec/DNAMP1/ScriptObjects/ElitePirate.hpp index 1b314082b..1e011506a 100644 --- a/DataSpec/DNAMP1/ScriptObjects/ElitePirate.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/ElitePirate.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct ElitePirate : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/EnergyBall.hpp b/DataSpec/DNAMP1/ScriptObjects/EnergyBall.hpp index d464e2822..65856253f 100644 --- a/DataSpec/DNAMP1/ScriptObjects/EnergyBall.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/EnergyBall.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct EnergyBall : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/EnvFxDensityController.hpp b/DataSpec/DNAMP1/ScriptObjects/EnvFxDensityController.hpp index 6f37607b5..19374dfc7 100644 --- a/DataSpec/DNAMP1/ScriptObjects/EnvFxDensityController.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/EnvFxDensityController.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct EnvFxDensityController : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value active; Value density; diff --git a/DataSpec/DNAMP1/ScriptObjects/Eyeball.hpp b/DataSpec/DNAMP1/ScriptObjects/Eyeball.hpp index 9382b9d8f..aaf296802 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Eyeball.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Eyeball.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Eyeball : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value flavor; Value location; diff --git a/DataSpec/DNAMP1/ScriptObjects/FireFlea.hpp b/DataSpec/DNAMP1/ScriptObjects/FireFlea.hpp index 0906d4b5d..d80f1ae2a 100644 --- a/DataSpec/DNAMP1/ScriptObjects/FireFlea.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/FireFlea.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct FireFlea : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/FishCloud.hpp b/DataSpec/DNAMP1/ScriptObjects/FishCloud.hpp index 16b3b7846..c55be52cf 100644 --- a/DataSpec/DNAMP1/ScriptObjects/FishCloud.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/FishCloud.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct FishCloud : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/FishCloudModifier.hpp b/DataSpec/DNAMP1/ScriptObjects/FishCloudModifier.hpp index 59ff9af04..cf691aac0 100644 --- a/DataSpec/DNAMP1/ScriptObjects/FishCloudModifier.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/FishCloudModifier.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct FishCloudModifier : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value position; Value active; diff --git a/DataSpec/DNAMP1/ScriptObjects/Flaahgra.hpp b/DataSpec/DNAMP1/ScriptObjects/Flaahgra.hpp index bf45839f5..d8208209b 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Flaahgra.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Flaahgra.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Flaahgra : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/FlaahgraTentacle.hpp b/DataSpec/DNAMP1/ScriptObjects/FlaahgraTentacle.hpp index 29f90e441..0922909fe 100644 --- a/DataSpec/DNAMP1/ScriptObjects/FlaahgraTentacle.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/FlaahgraTentacle.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct FlaahgraTentacle : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/FlickerBat.hpp b/DataSpec/DNAMP1/ScriptObjects/FlickerBat.hpp index 452840f7c..ee0d3afcf 100644 --- a/DataSpec/DNAMP1/ScriptObjects/FlickerBat.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/FlickerBat.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct FlickerBat : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value unknown1; Value location; diff --git a/DataSpec/DNAMP1/ScriptObjects/FlyingPirate.hpp b/DataSpec/DNAMP1/ScriptObjects/FlyingPirate.hpp index c6de02341..ff0f3d5cd 100644 --- a/DataSpec/DNAMP1/ScriptObjects/FlyingPirate.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/FlyingPirate.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct FlyingPirate : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/FogVolume.hpp b/DataSpec/DNAMP1/ScriptObjects/FogVolume.hpp index bde877c6b..421614c35 100644 --- a/DataSpec/DNAMP1/ScriptObjects/FogVolume.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/FogVolume.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct FogVolume : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value volume; diff --git a/DataSpec/DNAMP1/ScriptObjects/Geemer.hpp b/DataSpec/DNAMP1/ScriptObjects/Geemer.hpp index ac1b6e874..f60cf648c 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Geemer.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Geemer.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Geemer : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/Generator.hpp b/DataSpec/DNAMP1/ScriptObjects/Generator.hpp index e71b23f34..b8a9f8205 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Generator.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Generator.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Generator : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value spawnCount; Value noReuseFollowers; diff --git a/DataSpec/DNAMP1/ScriptObjects/GrapplePoint.hpp b/DataSpec/DNAMP1/ScriptObjects/GrapplePoint.hpp index 3c6362e76..7090af783 100644 --- a/DataSpec/DNAMP1/ScriptObjects/GrapplePoint.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/GrapplePoint.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct GrapplePoint : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/GunTurret.hpp b/DataSpec/DNAMP1/ScriptObjects/GunTurret.hpp index 99a6b9e1d..851dfa4fd 100644 --- a/DataSpec/DNAMP1/ScriptObjects/GunTurret.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/GunTurret.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct GunTurret : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value unknown1; Value location; diff --git a/DataSpec/DNAMP1/ScriptObjects/HUDMemo.hpp b/DataSpec/DNAMP1/ScriptObjects/HUDMemo.hpp index 23b6d80c4..52356d9c5 100644 --- a/DataSpec/DNAMP1/ScriptObjects/HUDMemo.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/HUDMemo.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct HUDMemo : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value firstMessageTimer; Value unknown1; diff --git a/DataSpec/DNAMP1/ScriptObjects/IScriptObject.hpp b/DataSpec/DNAMP1/ScriptObjects/IScriptObject.hpp index c269ef5d9..fc72b1dd1 100644 --- a/DataSpec/DNAMP1/ScriptObjects/IScriptObject.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/IScriptObject.hpp @@ -21,7 +21,7 @@ zeus::CTransform ConvertEditorEulerToTransform4f(const zeus::CVector3f& scale, c const zeus::CVector3f& position); struct IScriptObject : BigDNAVYaml { - AT_DECL_DNA_YAML + AT_DECL_DNA_YAMLV atUint32 type; Value id; struct Connection : BigDNA { diff --git a/DataSpec/DNAMP1/ScriptObjects/IceSheegoth.hpp b/DataSpec/DNAMP1/ScriptObjects/IceSheegoth.hpp index 59769abc0..1df66c93a 100644 --- a/DataSpec/DNAMP1/ScriptObjects/IceSheegoth.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/IceSheegoth.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct IceSheegoth : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/IceZoomer.hpp b/DataSpec/DNAMP1/ScriptObjects/IceZoomer.hpp index d83612ae2..b768f8b7f 100644 --- a/DataSpec/DNAMP1/ScriptObjects/IceZoomer.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/IceZoomer.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct IceZoomer : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/JellyZap.hpp b/DataSpec/DNAMP1/ScriptObjects/JellyZap.hpp index c6b8f80b4..26dacd35a 100644 --- a/DataSpec/DNAMP1/ScriptObjects/JellyZap.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/JellyZap.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct JellyZap : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/Magdolite.hpp b/DataSpec/DNAMP1/ScriptObjects/Magdolite.hpp index 45a6a365e..450acbea6 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Magdolite.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Magdolite.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Magdolite : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/MazeNode.hpp b/DataSpec/DNAMP1/ScriptObjects/MazeNode.hpp index aae7af705..c6e740f19 100644 --- a/DataSpec/DNAMP1/ScriptObjects/MazeNode.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/MazeNode.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct MazeNode : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/MemoryRelay.hpp b/DataSpec/DNAMP1/ScriptObjects/MemoryRelay.hpp index c2c353d69..6b95a5788 100644 --- a/DataSpec/DNAMP1/ScriptObjects/MemoryRelay.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/MemoryRelay.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct MemoryRelay : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value active; Value skipSendActive; diff --git a/DataSpec/DNAMP1/ScriptObjects/MetareeAlpha.hpp b/DataSpec/DNAMP1/ScriptObjects/MetareeAlpha.hpp index a6dc0a9de..7d96cc102 100644 --- a/DataSpec/DNAMP1/ScriptObjects/MetareeAlpha.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/MetareeAlpha.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct MetareeAlpha : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/MetroidAlpha.hpp b/DataSpec/DNAMP1/ScriptObjects/MetroidAlpha.hpp index cf1b19563..08c2126df 100644 --- a/DataSpec/DNAMP1/ScriptObjects/MetroidAlpha.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/MetroidAlpha.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct MetroidAlpha : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value unknown1; Value location; diff --git a/DataSpec/DNAMP1/ScriptObjects/MetroidBeta.hpp b/DataSpec/DNAMP1/ScriptObjects/MetroidBeta.hpp index 6b092b8a3..0b04c0562 100644 --- a/DataSpec/DNAMP1/ScriptObjects/MetroidBeta.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/MetroidBeta.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct MetroidBeta : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/MetroidPrimeStage1.hpp b/DataSpec/DNAMP1/ScriptObjects/MetroidPrimeStage1.hpp index 0d9f72049..f89f2be46 100644 --- a/DataSpec/DNAMP1/ScriptObjects/MetroidPrimeStage1.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/MetroidPrimeStage1.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct MetroidPrimeStage1 : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV Value version; String<-1> name; Value location; diff --git a/DataSpec/DNAMP1/ScriptObjects/MetroidPrimeStage2.hpp b/DataSpec/DNAMP1/ScriptObjects/MetroidPrimeStage2.hpp index 37c680eb0..5ca1e250d 100644 --- a/DataSpec/DNAMP1/ScriptObjects/MetroidPrimeStage2.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/MetroidPrimeStage2.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct MetroidPrimeStage2 : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/Midi.hpp b/DataSpec/DNAMP1/ScriptObjects/Midi.hpp index 689c19775..99bcb9413 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Midi.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Midi.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Midi : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value active; UniqueID32 song; diff --git a/DataSpec/DNAMP1/ScriptObjects/NewCameraShaker.hpp b/DataSpec/DNAMP1/ScriptObjects/NewCameraShaker.hpp index 8fddb13d5..747ebbe16 100644 --- a/DataSpec/DNAMP1/ScriptObjects/NewCameraShaker.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/NewCameraShaker.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct NewCameraShaker : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value active; diff --git a/DataSpec/DNAMP1/ScriptObjects/NewIntroBoss.hpp b/DataSpec/DNAMP1/ScriptObjects/NewIntroBoss.hpp index 94455e94c..23174930d 100644 --- a/DataSpec/DNAMP1/ScriptObjects/NewIntroBoss.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/NewIntroBoss.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct NewIntroBoss : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/Oculus.hpp b/DataSpec/DNAMP1/ScriptObjects/Oculus.hpp index d7cd5b7a8..ee69e2d5f 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Oculus.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Oculus.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Oculus : IScriptObject { - AT_DECL_EXPLICIT_DNA_YAML - AT_DECL_DNAV + AT_DECL_EXPLICIT_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/OmegaPirate.hpp b/DataSpec/DNAMP1/ScriptObjects/OmegaPirate.hpp index fac6e34b6..19f56bffe 100644 --- a/DataSpec/DNAMP1/ScriptObjects/OmegaPirate.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/OmegaPirate.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct OmegaPirate : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/Parasite.hpp b/DataSpec/DNAMP1/ScriptObjects/Parasite.hpp index e43828a85..e748bd5af 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Parasite.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Parasite.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Parasite : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value flavor; Value location; diff --git a/DataSpec/DNAMP1/ScriptObjects/PathCamera.hpp b/DataSpec/DNAMP1/ScriptObjects/PathCamera.hpp index 9437f8d54..e63b82501 100644 --- a/DataSpec/DNAMP1/ScriptObjects/PathCamera.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/PathCamera.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct PathCamera : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/PhazonHealingNodule.hpp b/DataSpec/DNAMP1/ScriptObjects/PhazonHealingNodule.hpp index 1d758cf44..4106f2525 100644 --- a/DataSpec/DNAMP1/ScriptObjects/PhazonHealingNodule.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/PhazonHealingNodule.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct PhazonHealingNodule : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/PhazonPool.hpp b/DataSpec/DNAMP1/ScriptObjects/PhazonPool.hpp index 9e2ff2177..608be50e2 100644 --- a/DataSpec/DNAMP1/ScriptObjects/PhazonPool.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/PhazonPool.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct PhazonPool : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/Pickup.hpp b/DataSpec/DNAMP1/ScriptObjects/Pickup.hpp index aee593920..fe70a5049 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Pickup.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Pickup.hpp @@ -7,8 +7,7 @@ namespace DataSpec::DNAMP1 { struct Pickup : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/PickupGenerator.hpp b/DataSpec/DNAMP1/ScriptObjects/PickupGenerator.hpp index 5b677d03a..baf4aa9a0 100644 --- a/DataSpec/DNAMP1/ScriptObjects/PickupGenerator.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/PickupGenerator.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct PickupGenerator : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value offset; Value active; diff --git a/DataSpec/DNAMP1/ScriptObjects/Platform.hpp b/DataSpec/DNAMP1/ScriptObjects/Platform.hpp index c4bd05584..ddb88e5f2 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Platform.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Platform.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Platform : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/PlayerActor.hpp b/DataSpec/DNAMP1/ScriptObjects/PlayerActor.hpp index 590ccb630..46081d82b 100644 --- a/DataSpec/DNAMP1/ScriptObjects/PlayerActor.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/PlayerActor.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct PlayerActor : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/PlayerHint.hpp b/DataSpec/DNAMP1/ScriptObjects/PlayerHint.hpp index a492cba05..bb6ff2fb2 100644 --- a/DataSpec/DNAMP1/ScriptObjects/PlayerHint.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/PlayerHint.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct PlayerHint : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/PlayerStateChange.hpp b/DataSpec/DNAMP1/ScriptObjects/PlayerStateChange.hpp index 29493eb6c..ea3ebf4de 100644 --- a/DataSpec/DNAMP1/ScriptObjects/PlayerStateChange.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/PlayerStateChange.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct PlayerStateChange : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value active; Value item; diff --git a/DataSpec/DNAMP1/ScriptObjects/PointOfInterest.hpp b/DataSpec/DNAMP1/ScriptObjects/PointOfInterest.hpp index eb86c463a..59ab42b40 100644 --- a/DataSpec/DNAMP1/ScriptObjects/PointOfInterest.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/PointOfInterest.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct PointOfInterest : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/PuddleSpore.hpp b/DataSpec/DNAMP1/ScriptObjects/PuddleSpore.hpp index 5b842b1da..fb5dc119e 100644 --- a/DataSpec/DNAMP1/ScriptObjects/PuddleSpore.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/PuddleSpore.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct PuddleSpore : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value unknown1; Value location; diff --git a/DataSpec/DNAMP1/ScriptObjects/PuddleToadGamma.hpp b/DataSpec/DNAMP1/ScriptObjects/PuddleToadGamma.hpp index a0de1d55a..ba5a71b6a 100644 --- a/DataSpec/DNAMP1/ScriptObjects/PuddleToadGamma.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/PuddleToadGamma.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct PuddleToadGamma : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value flavor; Value location; diff --git a/DataSpec/DNAMP1/ScriptObjects/Puffer.hpp b/DataSpec/DNAMP1/ScriptObjects/Puffer.hpp index 095ffd31c..0865c51a1 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Puffer.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Puffer.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Puffer : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/RadialDamage.hpp b/DataSpec/DNAMP1/ScriptObjects/RadialDamage.hpp index 9eb595969..942d2a0b6 100644 --- a/DataSpec/DNAMP1/ScriptObjects/RadialDamage.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/RadialDamage.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct RadialDamage : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value active; diff --git a/DataSpec/DNAMP1/ScriptObjects/RandomRelay.hpp b/DataSpec/DNAMP1/ScriptObjects/RandomRelay.hpp index 9738dd2b8..6ad61808d 100644 --- a/DataSpec/DNAMP1/ScriptObjects/RandomRelay.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/RandomRelay.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct RandomRelay : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value sendSetSize; Value sendSetVariance; diff --git a/DataSpec/DNAMP1/ScriptObjects/Relay.hpp b/DataSpec/DNAMP1/ScriptObjects/Relay.hpp index 483bc84b6..6a29f6c9a 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Relay.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Relay.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Relay : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value active; }; diff --git a/DataSpec/DNAMP1/ScriptObjects/Repulsor.hpp b/DataSpec/DNAMP1/ScriptObjects/Repulsor.hpp index 745544033..4b7d4befa 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Repulsor.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Repulsor.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Repulsor : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value active; diff --git a/DataSpec/DNAMP1/ScriptObjects/Ridley.hpp b/DataSpec/DNAMP1/ScriptObjects/Ridley.hpp index a95cf1c7a..5bf6ad001 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Ridley.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Ridley.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Ridley : IScriptObject { - AT_DECL_EXPLICIT_DNA_YAML - AT_DECL_DNAV + AT_DECL_EXPLICIT_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/Ripper.hpp b/DataSpec/DNAMP1/ScriptObjects/Ripper.hpp index b7675f71a..4dd779ddf 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Ripper.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Ripper.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Ripper : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value unknown1; Value location; diff --git a/DataSpec/DNAMP1/ScriptObjects/Ripple.hpp b/DataSpec/DNAMP1/ScriptObjects/Ripple.hpp index 357100aed..ea3b3378b 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Ripple.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Ripple.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Ripple : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value active; diff --git a/DataSpec/DNAMP1/ScriptObjects/RoomAcoustics.hpp b/DataSpec/DNAMP1/ScriptObjects/RoomAcoustics.hpp index ae8c93856..1c4bfe6e8 100644 --- a/DataSpec/DNAMP1/ScriptObjects/RoomAcoustics.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/RoomAcoustics.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct RoomAcoustics : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value active; Value volumeScale; diff --git a/DataSpec/DNAMP1/ScriptObjects/RumbleEffect.hpp b/DataSpec/DNAMP1/ScriptObjects/RumbleEffect.hpp index 7697b6d6d..3dd327406 100644 --- a/DataSpec/DNAMP1/ScriptObjects/RumbleEffect.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/RumbleEffect.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct RumbleEffect : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value unknown1; diff --git a/DataSpec/DNAMP1/ScriptObjects/ScriptBeam.hpp b/DataSpec/DNAMP1/ScriptObjects/ScriptBeam.hpp index d86664f0a..bf2230180 100644 --- a/DataSpec/DNAMP1/ScriptObjects/ScriptBeam.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/ScriptBeam.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct ScriptBeam : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/Seedling.hpp b/DataSpec/DNAMP1/ScriptObjects/Seedling.hpp index 055fa53f7..71250eb37 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Seedling.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Seedling.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Seedling : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/ShadowProjector.hpp b/DataSpec/DNAMP1/ScriptObjects/ShadowProjector.hpp index 9bd131ad4..f3073eb99 100644 --- a/DataSpec/DNAMP1/ScriptObjects/ShadowProjector.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/ShadowProjector.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct ShadowProjector : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value unknown1; diff --git a/DataSpec/DNAMP1/ScriptObjects/SnakeWeedSwarm.hpp b/DataSpec/DNAMP1/ScriptObjects/SnakeWeedSwarm.hpp index 1ce3bb3fc..948d6e116 100644 --- a/DataSpec/DNAMP1/ScriptObjects/SnakeWeedSwarm.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/SnakeWeedSwarm.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct SnakeWeedSwarm : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value volume; diff --git a/DataSpec/DNAMP1/ScriptObjects/Sound.hpp b/DataSpec/DNAMP1/ScriptObjects/Sound.hpp index 16ebee4f3..b7d029c13 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Sound.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Sound.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Sound : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/SpacePirate.hpp b/DataSpec/DNAMP1/ScriptObjects/SpacePirate.hpp index 6f40c4bfa..d1553ecb7 100644 --- a/DataSpec/DNAMP1/ScriptObjects/SpacePirate.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/SpacePirate.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct SpacePirate : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/SpankWeed.hpp b/DataSpec/DNAMP1/ScriptObjects/SpankWeed.hpp index 291b20f89..eba767cd3 100644 --- a/DataSpec/DNAMP1/ScriptObjects/SpankWeed.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/SpankWeed.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct SpankWeed : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/SpawnPoint.hpp b/DataSpec/DNAMP1/ScriptObjects/SpawnPoint.hpp index 7dd5ebcdf..25a955e82 100644 --- a/DataSpec/DNAMP1/ScriptObjects/SpawnPoint.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/SpawnPoint.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct SpawnPoint : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/SpecialFunction.hpp b/DataSpec/DNAMP1/ScriptObjects/SpecialFunction.hpp index 64f6dbb40..e9dabe3b3 100644 --- a/DataSpec/DNAMP1/ScriptObjects/SpecialFunction.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/SpecialFunction.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct SpecialFunction : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/SpiderBallAttractionSurface.hpp b/DataSpec/DNAMP1/ScriptObjects/SpiderBallAttractionSurface.hpp index 26d79440b..1b5205fb6 100644 --- a/DataSpec/DNAMP1/ScriptObjects/SpiderBallAttractionSurface.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/SpiderBallAttractionSurface.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct SpiderBallAttractionSurface : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/SpiderBallWaypoint.hpp b/DataSpec/DNAMP1/ScriptObjects/SpiderBallWaypoint.hpp index dfa903b87..62c2bf7b2 100644 --- a/DataSpec/DNAMP1/ScriptObjects/SpiderBallWaypoint.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/SpiderBallWaypoint.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct SpiderBallWaypoint : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/SpindleCamera.hpp b/DataSpec/DNAMP1/ScriptObjects/SpindleCamera.hpp index d31e62bec..7ea264dcf 100644 --- a/DataSpec/DNAMP1/ScriptObjects/SpindleCamera.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/SpindleCamera.hpp @@ -7,8 +7,7 @@ namespace DataSpec::DNAMP1 { struct SpindleCamera : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/Steam.hpp b/DataSpec/DNAMP1/ScriptObjects/Steam.hpp index f8732234d..bc1ac20f9 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Steam.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Steam.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Steam : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value volume; diff --git a/DataSpec/DNAMP1/ScriptObjects/StreamedAudio.hpp b/DataSpec/DNAMP1/ScriptObjects/StreamedAudio.hpp index e078cf9b3..7a099e5ac 100644 --- a/DataSpec/DNAMP1/ScriptObjects/StreamedAudio.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/StreamedAudio.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct StreamedAudio : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value active; String<-1> fileName; diff --git a/DataSpec/DNAMP1/ScriptObjects/Switch.hpp b/DataSpec/DNAMP1/ScriptObjects/Switch.hpp index 831d1ea12..64baaa7cc 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Switch.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Switch.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Switch : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value active; Value opened; diff --git a/DataSpec/DNAMP1/ScriptObjects/TargetingPoint.hpp b/DataSpec/DNAMP1/ScriptObjects/TargetingPoint.hpp index 9ff9a89d1..596846efd 100644 --- a/DataSpec/DNAMP1/ScriptObjects/TargetingPoint.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/TargetingPoint.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct TargetingPoint : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/TeamAIMgr.hpp b/DataSpec/DNAMP1/ScriptObjects/TeamAIMgr.hpp index e02fffe86..4b77f903b 100644 --- a/DataSpec/DNAMP1/ScriptObjects/TeamAIMgr.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/TeamAIMgr.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct TeamAIMgr : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value aiCount; Value meleeCount; diff --git a/DataSpec/DNAMP1/ScriptObjects/Thardus.hpp b/DataSpec/DNAMP1/ScriptObjects/Thardus.hpp index cb4e3537c..4146bc5ff 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Thardus.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Thardus.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Thardus : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/ThardusRockProjectile.hpp b/DataSpec/DNAMP1/ScriptObjects/ThardusRockProjectile.hpp index a2cf87ed2..5df16cd50 100644 --- a/DataSpec/DNAMP1/ScriptObjects/ThardusRockProjectile.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/ThardusRockProjectile.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct ThardusRockProjectile : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/ThermalHeatFader.hpp b/DataSpec/DNAMP1/ScriptObjects/ThermalHeatFader.hpp index cb96ca03c..1048b7127 100644 --- a/DataSpec/DNAMP1/ScriptObjects/ThermalHeatFader.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/ThermalHeatFader.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct ThermalHeatFader : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value active; Value fadedLevel; diff --git a/DataSpec/DNAMP1/ScriptObjects/Timer.hpp b/DataSpec/DNAMP1/ScriptObjects/Timer.hpp index 2fade1756..fe9c5f67c 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Timer.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Timer.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Timer : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value startTime; Value maxRandomAddition; diff --git a/DataSpec/DNAMP1/ScriptObjects/Trigger.hpp b/DataSpec/DNAMP1/ScriptObjects/Trigger.hpp index a4eca7015..15478e3c3 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Trigger.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Trigger.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Trigger : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value volume; diff --git a/DataSpec/DNAMP1/ScriptObjects/Tryclops.hpp b/DataSpec/DNAMP1/ScriptObjects/Tryclops.hpp index 268797254..4bf127ee8 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Tryclops.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Tryclops.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Tryclops : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/VisorFlare.hpp b/DataSpec/DNAMP1/ScriptObjects/VisorFlare.hpp index 7f8ff9dfb..f617719ce 100644 --- a/DataSpec/DNAMP1/ScriptObjects/VisorFlare.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/VisorFlare.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct VisorFlare : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value unknown1; diff --git a/DataSpec/DNAMP1/ScriptObjects/VisorGoo.hpp b/DataSpec/DNAMP1/ScriptObjects/VisorGoo.hpp index 19453a12e..01ba8e833 100644 --- a/DataSpec/DNAMP1/ScriptObjects/VisorGoo.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/VisorGoo.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct VisorGoo : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value position; UniqueID32 particle; diff --git a/DataSpec/DNAMP1/ScriptObjects/WallCrawlerSwarm.hpp b/DataSpec/DNAMP1/ScriptObjects/WallCrawlerSwarm.hpp index 8115844ab..94c76b4f5 100644 --- a/DataSpec/DNAMP1/ScriptObjects/WallCrawlerSwarm.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/WallCrawlerSwarm.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct WallCrawlerSwarm : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/Warwasp.hpp b/DataSpec/DNAMP1/ScriptObjects/Warwasp.hpp index 429020cda..cf6a692ff 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Warwasp.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Warwasp.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Warwasp : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value flavor; Value location; diff --git a/DataSpec/DNAMP1/ScriptObjects/Water.hpp b/DataSpec/DNAMP1/ScriptObjects/Water.hpp index de643a266..51350be4d 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Water.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Water.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Water : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value volume; diff --git a/DataSpec/DNAMP1/ScriptObjects/Waypoint.hpp b/DataSpec/DNAMP1/ScriptObjects/Waypoint.hpp index e0d4a1af3..db0ec0cd2 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Waypoint.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/Waypoint.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct Waypoint : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value location; Value orientation; diff --git a/DataSpec/DNAMP1/ScriptObjects/WorldLightFader.hpp b/DataSpec/DNAMP1/ScriptObjects/WorldLightFader.hpp index aad57e36e..18eaec3ba 100644 --- a/DataSpec/DNAMP1/ScriptObjects/WorldLightFader.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/WorldLightFader.hpp @@ -6,8 +6,7 @@ namespace DataSpec::DNAMP1 { struct WorldLightFader : IScriptObject { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> name; Value active; Value fadedLevel; diff --git a/DataSpec/DNAMP1/ScriptObjects/WorldTeleporter.hpp b/DataSpec/DNAMP1/ScriptObjects/WorldTeleporter.hpp index c76176d39..559f2e371 100644 --- a/DataSpec/DNAMP1/ScriptObjects/WorldTeleporter.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/WorldTeleporter.hpp @@ -7,8 +7,7 @@ namespace DataSpec::DNAMP1 { struct WorldTeleporter : IScriptObject { - AT_DECL_EXPLICIT_DNA_YAML - AT_DECL_DNAV + AT_DECL_EXPLICIT_DNA_YAMLV String<-1> name; Value active; UniqueID32 mlvl; diff --git a/DataSpec/DNAMP1/Tweaks/CTweakPlayerGun.hpp b/DataSpec/DNAMP1/Tweaks/CTweakPlayerGun.hpp index 232a9446f..d497e34ee 100644 --- a/DataSpec/DNAMP1/Tweaks/CTweakPlayerGun.hpp +++ b/DataSpec/DNAMP1/Tweaks/CTweakPlayerGun.hpp @@ -94,7 +94,7 @@ struct CTweakPlayerGun final : ITweakPlayerGun { return xa8_beams[beam]; } - const SComboShotParam& GetComboShotInfo(atInt32 beam) const { + const SComboShotParam& GetComboShotInfo(atInt32 beam) const override { if (beam < 0 || beam > 5) return x1f0_combos[0]; return x1f0_combos[beam]; diff --git a/DataSpec/DNAMP2/ANIM.hpp b/DataSpec/DNAMP2/ANIM.hpp index 8ca3193cd..df52dd46b 100644 --- a/DataSpec/DNAMP2/ANIM.hpp +++ b/DataSpec/DNAMP2/ANIM.hpp @@ -27,8 +27,7 @@ struct ANIM : BigDNA { }; struct ANIM0 : IANIM { - AT_DECL_EXPLICIT_DNA - AT_DECL_DNAV + AT_DECL_EXPLICIT_DNAV ANIM0() : IANIM(0) {} struct Header : BigDNA { @@ -44,8 +43,7 @@ struct ANIM : BigDNA { }; struct ANIM2 : IANIM { - AT_DECL_EXPLICIT_DNA - AT_DECL_DNAV + AT_DECL_EXPLICIT_DNAV ANIM2() : IANIM(2) {} struct Header : BigDNA { diff --git a/DataSpec/DNAMP2/STRG.hpp b/DataSpec/DNAMP2/STRG.hpp index edc2bb99d..5775a96b9 100644 --- a/DataSpec/DNAMP2/STRG.hpp +++ b/DataSpec/DNAMP2/STRG.hpp @@ -7,8 +7,7 @@ namespace DataSpec::DNAMP2 { struct STRG : ISTRG { - AT_DECL_EXPLICIT_DNA_YAML - AT_DECL_DNAV + AT_DECL_EXPLICIT_DNA_YAMLV void _read(athena::io::IStreamReader& reader); std::vector>> langs; std::unordered_map*> langMap; diff --git a/DataSpec/DNAMP3/ANIM.hpp b/DataSpec/DNAMP3/ANIM.hpp index 1acf10ed8..d7cd97aba 100644 --- a/DataSpec/DNAMP3/ANIM.hpp +++ b/DataSpec/DNAMP3/ANIM.hpp @@ -27,8 +27,7 @@ struct ANIM : BigDNA { }; struct ANIM0 : IANIM { - AT_DECL_EXPLICIT_DNA - AT_DECL_DNAV + AT_DECL_EXPLICIT_DNAV ANIM0() : IANIM(0) {} struct Header : BigDNA { @@ -45,8 +44,7 @@ struct ANIM : BigDNA { }; struct ANIM1 : IANIM { - AT_DECL_EXPLICIT_DNA - AT_DECL_DNAV + AT_DECL_EXPLICIT_DNAV ANIM1() : IANIM(1) {} struct Header : BigDNA { diff --git a/DataSpec/DNAMP3/CHAR.hpp b/DataSpec/DNAMP3/CHAR.hpp index 655fce35e..0ee8b495b 100644 --- a/DataSpec/DNAMP3/CHAR.hpp +++ b/DataSpec/DNAMP3/CHAR.hpp @@ -127,8 +127,7 @@ struct CHAR : BigDNA { }; struct MetaAnimPrimitive : IMetaAnim { MetaAnimPrimitive() : IMetaAnim(Type::Primitive, "Primitive") {} - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV UniqueID64 animId; Value animIdx; String<-1> animName; @@ -141,8 +140,7 @@ struct CHAR : BigDNA { }; struct MetaAnimBlend : IMetaAnim { MetaAnimBlend() : IMetaAnim(Type::Blend, "Blend") {} - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV MetaAnimFactory animA; MetaAnimFactory animB; Value unkFloat; @@ -155,8 +153,7 @@ struct CHAR : BigDNA { }; struct MetaAnimPhaseBlend : IMetaAnim { MetaAnimPhaseBlend() : IMetaAnim(Type::PhaseBlend, "PhaseBlend") {} - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV MetaAnimFactory animA; MetaAnimFactory animB; Value unkFloat; @@ -169,8 +166,7 @@ struct CHAR : BigDNA { }; struct MetaAnimRandom : IMetaAnim { MetaAnimRandom() : IMetaAnim(Type::Random, "Random") {} - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV Value animCount; struct Child : BigDNA { AT_DECL_DNA_YAML @@ -186,8 +182,7 @@ struct CHAR : BigDNA { }; struct MetaAnimSequence : IMetaAnim { MetaAnimSequence() : IMetaAnim(Type::Sequence, "Sequence") {} - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV Value animCount; Vector children; diff --git a/DataSpec/DNAMP3/CMDLMaterials.hpp b/DataSpec/DNAMP3/CMDLMaterials.hpp index 03c15242e..df73b62e0 100644 --- a/DataSpec/DNAMP3/CMDLMaterials.hpp +++ b/DataSpec/DNAMP3/CMDLMaterials.hpp @@ -71,7 +71,6 @@ struct MaterialSet : BigDNA { static SectionPASS* castTo(ISection* sec) { return sec->m_type == Type::PASS ? static_cast(sec) : nullptr; } - AT_DECL_DNA AT_DECL_DNAV Value size; enum class Subtype : atUint32 { @@ -120,7 +119,6 @@ struct MaterialSet : BigDNA { static SectionCLR* castTo(ISection* sec) { return sec->m_type == Type::CLR ? static_cast(sec) : nullptr; } - AT_DECL_DNA AT_DECL_DNAV enum class Subtype : atUint32 { CLR = SBIG('CLR '), DIFB = SBIG('DIFB') }; DNAFourCC subtype; @@ -135,7 +133,6 @@ struct MaterialSet : BigDNA { static SectionINT* castTo(ISection* sec) { return sec->m_type == Type::INT ? static_cast(sec) : nullptr; } - AT_DECL_DNA AT_DECL_DNAV enum class Subtype : atUint32 { OPAC = SBIG('OPAC'), diff --git a/DataSpec/DNAMP3/STRG.hpp b/DataSpec/DNAMP3/STRG.hpp index 80bfc8ae3..c43858955 100644 --- a/DataSpec/DNAMP3/STRG.hpp +++ b/DataSpec/DNAMP3/STRG.hpp @@ -7,8 +7,7 @@ namespace DataSpec::DNAMP3 { struct STRG : ISTRG { - AT_DECL_EXPLICIT_DNA_YAML - AT_DECL_DNAV + AT_DECL_EXPLICIT_DNA_YAMLV void _read(athena::io::IStreamReader& reader); std::vector>> langs; std::unordered_map*> langMap; diff --git a/Editor/GameMode.hpp b/Editor/GameMode.hpp index a283df946..caacf9532 100644 --- a/Editor/GameMode.hpp +++ b/Editor/GameMode.hpp @@ -9,8 +9,7 @@ class GameMode : public ViewerSpace { std::shared_ptr m_main; struct State : Space::State { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV Value showToolbar = true; } m_state; diff --git a/Editor/InformationCenter.hpp b/Editor/InformationCenter.hpp index d11e568f0..11f3fe7f7 100644 --- a/Editor/InformationCenter.hpp +++ b/Editor/InformationCenter.hpp @@ -6,8 +6,7 @@ namespace urde { class InformationCenter : public ViewerSpace { struct State : Space::State { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV Value showLog; } m_state; diff --git a/Editor/ModelViewer.hpp b/Editor/ModelViewer.hpp index a34ba8c90..afdb60c8c 100644 --- a/Editor/ModelViewer.hpp +++ b/Editor/ModelViewer.hpp @@ -7,8 +7,7 @@ namespace urde { class ModelViewer : public ViewerSpace { struct State : Space::State { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV enum class Mode { Solid, Material, Wireframe }; Value renderMode = Mode::Material; diff --git a/Editor/ParticleEditor.hpp b/Editor/ParticleEditor.hpp index 540fe1731..0056178e2 100644 --- a/Editor/ParticleEditor.hpp +++ b/Editor/ParticleEditor.hpp @@ -6,8 +6,7 @@ namespace urde { class EffectEditor : public EditorSpace { struct State : Space::State { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> path; } m_state; const Space::State& spaceState() const { return m_state; } diff --git a/Editor/ResourceBrowser.hpp b/Editor/ResourceBrowser.hpp index 50a4be93d..245c0012a 100644 --- a/Editor/ResourceBrowser.hpp +++ b/Editor/ResourceBrowser.hpp @@ -9,8 +9,7 @@ namespace urde { class ResourceBrowser : public Space, public specter::IPathButtonsBinding { struct State : Space::State { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV String<-1> path; Value columnSplits[3] = {0.0f, 0.7f, 0.9f}; enum class SortColumn { Name, Type, Size }; diff --git a/Editor/Space.hpp b/Editor/Space.hpp index 9fc3b4376..64d52c8d1 100644 --- a/Editor/Space.hpp +++ b/Editor/Space.hpp @@ -159,7 +159,7 @@ class RootSpace : public Space { friend class ViewManager; std::unique_ptr m_rootView; std::unique_ptr m_spaceTree; - struct State : Space::State{AT_DECL_DNA_YAML AT_DECL_DNAV} m_state; + struct State : Space::State{AT_DECL_DNA_YAMLV } m_state; const Space::State& spaceState() const { return m_state; } public: @@ -218,8 +218,7 @@ class SplitSpace : public Space, public specter::ISplitSpaceController { std::unique_ptr m_slots[2]; std::unique_ptr m_splitView; struct State : Space::State { - AT_DECL_DNA_YAML - AT_DECL_DNAV + AT_DECL_DNA_YAMLV Value axis = specter::SplitView::Axis::Horizontal; Value split = 0.5; } m_state; @@ -357,7 +356,7 @@ public: specter::IButtonBinding* binding) : Space(vm, Class::TestSpace, parent), m_contentStr(content), m_buttonStr(button), m_binding(binding) {} - struct State : Space::State{AT_DECL_DNA_YAML AT_DECL_DNAV} m_state; + struct State : Space::State{AT_DECL_DNA_YAMLV} m_state; const Space::State& spaceState() const { return m_state; } bool usesToolbar() const { return true; } diff --git a/Runtime/MP1/World/CMakeLists.txt b/Runtime/MP1/World/CMakeLists.txt index 6d945649d..480558214 100644 --- a/Runtime/MP1/World/CMakeLists.txt +++ b/Runtime/MP1/World/CMakeLists.txt @@ -34,6 +34,7 @@ set(MP1_WORLD_SOURCES CFlaahgraTentacle.hpp CFlaahgraTentacle.cpp CFlaahgraProjectile.hpp CFlaahgraProjectile.cpp CSpankWeed.hpp CSpankWeed.cpp - CPuddleSpore.hpp CPuddleSpore.cpp) + CPuddleSpore.hpp CPuddleSpore.cpp + CRipper.hpp CRipper.cpp) runtime_add_list(World MP1_WORLD_SOURCES) diff --git a/Runtime/World/ScriptLoader.cpp b/Runtime/World/ScriptLoader.cpp index 3e5bfa9e8..59ffb9453 100644 --- a/Runtime/World/ScriptLoader.cpp +++ b/Runtime/World/ScriptLoader.cpp @@ -65,6 +65,7 @@ #include "CFishCloud.hpp" #include "CFishCloudModifier.hpp" #include "CScriptPlayerHint.hpp" +#include "MP1/World/CRipper.hpp" #include "CScriptPlayerStateChange.hpp" #include "CScriptPointOfInterest.hpp" #include "CScriptRandomRelay.hpp" @@ -1923,7 +1924,29 @@ CEntity* ScriptLoader::LoadPlayerHint(CStateManager& mgr, CInputStream& in, int } CEntity* ScriptLoader::LoadRipper(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info) { - return nullptr; + if (!EnsurePropertyCount(propCount, 8, "Ripper")) + return nullptr; + + std::string name = mgr.HashInstanceName(in); + CPatterned::EFlavorType type = CPatterned::EFlavorType(in.readUint32Big()); + zeus::CTransform xf = LoadEditorTransform(in); + zeus::CVector3f scale = zeus::CVector3f::ReadBig(in); + auto pair = CPatternedInfo::HasCorrectParameterCount(in); + if (!pair.first) + return nullptr; + CPatternedInfo pInfo(in, pair.second); + CActorParameters actParms = LoadActorParameters(in); + CGrappleParameters grappleParms = LoadGrappleParameters(in); + + const CAnimationParameters& animParms = pInfo.GetAnimationParameters(); + + if (!animParms.GetACSFile().IsValid()) + return nullptr; + + CModelData mData( + CAnimRes(animParms.GetACSFile(), animParms.GetCharacter(), scale, animParms.GetInitialAnimation(), true)); + return new MP1::CRipper(mgr.AllocateUniqueId(), name, type, info, xf, std::move(mData), pInfo, actParms, + grappleParms); } CEntity* ScriptLoader::LoadPickupGenerator(CStateManager& mgr, CInputStream& in, int propCount, diff --git a/amuse b/amuse index 1e35db90a..529efa72b 160000 --- a/amuse +++ b/amuse @@ -1 +1 @@ -Subproject commit 1e35db90aa9f3a737c66947323e7eabff299d7ab +Subproject commit 529efa72b4136abb77c0e35c587a2ff80a76989a diff --git a/hecl b/hecl index 920fcb3c3..298803aac 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 920fcb3c3d90f3db95f097c235597aff211227bc +Subproject commit 298803aac4d4797c439c97f036ad6ff566de8bd6 diff --git a/nod b/nod index ac6f2a1ed..18b297e31 160000 --- a/nod +++ b/nod @@ -1 +1 @@ -Subproject commit ac6f2a1ed2e1405462bce2eae6da0bb81f6de8e2 +Subproject commit 18b297e3125ff8f3d318a203217f682330a8e4ea From d336e1fc0050bec13833e3befa4149db7c659981 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 10 Aug 2019 03:33:30 -0400 Subject: [PATCH 15/65] Editor: Use override where applicable Continues the override modernization with the Editor code. --- Editor/GameMode.hpp | 14 +++--- Editor/InformationCenter.hpp | 10 ++--- Editor/ModelViewer.hpp | 12 +++--- Editor/ParticleEditor.hpp | 8 ++-- Editor/ProjectManager.hpp | 4 +- Editor/ResourceBrowser.hpp | 52 +++++++++++----------- Editor/Space.hpp | 84 +++++++++++++++++++----------------- Editor/SplashScreen.hpp | 64 ++++++++++++++------------- Editor/ViewManager.hpp | 34 +++++++-------- Editor/main.cpp | 6 +-- 10 files changed, 148 insertions(+), 140 deletions(-) diff --git a/Editor/GameMode.hpp b/Editor/GameMode.hpp index caacf9532..545831ce7 100644 --- a/Editor/GameMode.hpp +++ b/Editor/GameMode.hpp @@ -13,14 +13,14 @@ class GameMode : public ViewerSpace { Value showToolbar = true; } m_state; - const Space::State& spaceState() const { return m_state; } + const Space::State& spaceState() const override { return m_state; } struct View : specter::View { GameMode& m_gMode; View(GameMode& gMode, specter::ViewResources& res) : specter::View(res, gMode.m_vm.rootView()), m_gMode(gMode) {} - void draw(boo::IGraphicsCommandQueue* gfxQ); + void draw(boo::IGraphicsCommandQueue* gfxQ) override; }; std::unique_ptr m_view; @@ -38,17 +38,17 @@ public: reloadState(); } - void reloadState() {} + void reloadState() override {} - virtual specter::View* buildContentView(specter::ViewResources& res) { + specter::View* buildContentView(specter::ViewResources& res) override { m_view.reset(new View(*this, res)); return m_view.get(); } - void think(); + void think() override; - Space* copy(Space* parent) const { return new GameMode(m_vm, parent, *this); } + Space* copy(Space* parent) const override { return new GameMode(m_vm, parent, *this); } - bool usesToolbar() const { return m_state.showToolbar; } + bool usesToolbar() const override { return m_state.showToolbar; } }; } // namespace urde diff --git a/Editor/InformationCenter.hpp b/Editor/InformationCenter.hpp index 11f3fe7f7..a59767c5f 100644 --- a/Editor/InformationCenter.hpp +++ b/Editor/InformationCenter.hpp @@ -10,7 +10,7 @@ class InformationCenter : public ViewerSpace { Value showLog; } m_state; - const Space::State& spaceState() const { return m_state; } + const Space::State& spaceState() const override { return m_state; } struct View : specter::View { InformationCenter& m_ic; @@ -36,15 +36,15 @@ public: reloadState(); } - void reloadState() {} + void reloadState() override {} - virtual specter::View* buildContentView(specter::ViewResources& res) { + specter::View* buildContentView(specter::ViewResources& res) override { m_view.reset(new View(*this, res)); return m_view.get(); } - Space* copy(Space* parent) const { return new InformationCenter(m_vm, parent, *this); } + Space* copy(Space* parent) const override { return new InformationCenter(m_vm, parent, *this); } - bool usesToolbar() const { return true; } + bool usesToolbar() const override { return true; } }; } // namespace urde diff --git a/Editor/ModelViewer.hpp b/Editor/ModelViewer.hpp index afdb60c8c..4d7c3a5be 100644 --- a/Editor/ModelViewer.hpp +++ b/Editor/ModelViewer.hpp @@ -16,7 +16,7 @@ class ModelViewer : public ViewerSpace { } m_state; - const Space::State& spaceState() const { return m_state; } + const Space::State& spaceState() const override { return m_state; } std::unique_ptr m_lineRenderer; struct View : specter::View { ModelViewer& m_mv; @@ -24,7 +24,7 @@ class ModelViewer : public ViewerSpace { View(ModelViewer& mv, specter::ViewResources& res) : specter::View(res, mv.m_vm.rootView()), m_mv(mv) {} - void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub); + void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) override; }; Camera m_camera; @@ -46,19 +46,19 @@ public: reloadState(); } - void reloadState() { + void reloadState() override { m_camera.setPosition(m_state.cameraPosition); m_camera.setOrientation(m_state.cameraOrientation); } - Space* copy(Space* parent) const { return new ModelViewer(m_vm, parent, *this); } + Space* copy(Space* parent) const override { return new ModelViewer(m_vm, parent, *this); } - virtual specter::View* buildContentView(specter::ViewResources& res) { + specter::View* buildContentView(specter::ViewResources& res) override { m_view.reset(new View(*this, res)); return m_view.get(); } - bool usesToolbar() const { return true; } + bool usesToolbar() const override { return true; } }; } // namespace urde diff --git a/Editor/ParticleEditor.hpp b/Editor/ParticleEditor.hpp index 0056178e2..0df827632 100644 --- a/Editor/ParticleEditor.hpp +++ b/Editor/ParticleEditor.hpp @@ -9,13 +9,13 @@ class EffectEditor : public EditorSpace { AT_DECL_DNA_YAMLV String<-1> path; } m_state; - const Space::State& spaceState() const { return m_state; } + const Space::State& spaceState() const override { return m_state; } struct View : specter::View { View(specter::ViewResources& res, specter::View& parent) : specter::View(res, parent) {} }; - specter::View* buildContentView(specter::ViewResources& res) { return nullptr; } + specter::View* buildContentView(specter::ViewResources& res) override { return nullptr; } public: EffectEditor(ViewManager& vm, Space* parent) : EditorSpace(vm, Class::EffectEditor, parent) {} @@ -24,9 +24,9 @@ public: m_state = other.m_state; } - Space* copy(Space* parent) const { return new EffectEditor(m_vm, parent, *this); } + Space* copy(Space* parent) const override { return new EffectEditor(m_vm, parent, *this); } - bool usesToolbar() const { return true; } + bool usesToolbar() const override { return true; } }; } // namespace urde diff --git a/Editor/ProjectManager.hpp b/Editor/ProjectManager.hpp index 6d644bd3d..2b092ba07 100644 --- a/Editor/ProjectManager.hpp +++ b/Editor/ProjectManager.hpp @@ -18,8 +18,8 @@ class ProjectResourcePool : public CSimplePool { public: ProjectResourcePool(IFactory& factory, ProjectManager& parent) : CSimplePool(factory), m_parent(parent) {} - CToken GetObj(std::string_view); - CToken GetObj(std::string_view, const CVParamTransfer&); + CToken GetObj(std::string_view) override; + CToken GetObj(std::string_view, const CVParamTransfer&) override; }; class ProjectManager { diff --git a/Editor/ResourceBrowser.hpp b/Editor/ResourceBrowser.hpp index 245c0012a..d405a9d77 100644 --- a/Editor/ResourceBrowser.hpp +++ b/Editor/ResourceBrowser.hpp @@ -16,12 +16,12 @@ class ResourceBrowser : public Space, public specter::IPathButtonsBinding { Value sortColumn = SortColumn::Name; Value sortDir = specter::SortDirection::Ascending; } m_state; - const Space::State& spaceState() const { return m_state; } + const Space::State& spaceState() const override { return m_state; } hecl::ProjectPath m_path; std::vector m_comps; - void pathButtonActivated(size_t idx); + void pathButtonActivated(size_t idx) override; struct ResListingDataBind : specter::ITableDataBinding, specter::ITableStateBinding { ResourceBrowser& m_rb; @@ -42,10 +42,10 @@ class ResourceBrowser : public Space, public specter::IPathButtonsBinding { std::string m_projStr; std::string m_fileStr; - size_t columnCount() const { return 3; } - size_t rowCount() const { return m_entries.size(); } + size_t columnCount() const override { return 3; } + size_t rowCount() const override { return m_entries.size(); } - std::string_view header(size_t cIdx) const { + std::string_view header(size_t cIdx) const override { switch (cIdx) { case 0: return m_nameCol; @@ -59,7 +59,7 @@ class ResourceBrowser : public Space, public specter::IPathButtonsBinding { return {}; } - std::string_view cell(size_t cIdx, size_t rIdx) const { + std::string_view cell(size_t cIdx, size_t rIdx) const override { switch (cIdx) { case 0: return m_entries.at(rIdx).m_name; @@ -73,11 +73,11 @@ class ResourceBrowser : public Space, public specter::IPathButtonsBinding { return {}; } - bool columnSplitResizeAllowed() const { return true; } + bool columnSplitResizeAllowed() const override { return true; } - float getColumnSplit(size_t cIdx) const { return m_rb.m_state.columnSplits[cIdx]; } + float getColumnSplit(size_t cIdx) const override { return m_rb.m_state.columnSplits[cIdx]; } - void setColumnSplit(size_t cIdx, float split) { m_rb.m_state.columnSplits[cIdx] = split; } + void setColumnSplit(size_t cIdx, float split) override { m_rb.m_state.columnSplits[cIdx] = split; } void updateListing(const hecl::DirectoryEnumerator& dEnum) { m_entries.clear(); @@ -106,22 +106,22 @@ class ResourceBrowser : public Space, public specter::IPathButtonsBinding { bool m_needsUpdate = false; - specter::SortDirection getSort(size_t& cIdx) const { + specter::SortDirection getSort(size_t& cIdx) const override { cIdx = size_t(m_rb.m_state.sortColumn); if (cIdx > 2) cIdx = 0; return m_rb.m_state.sortDir; } - void setSort(size_t cIdx, specter::SortDirection dir) { + void setSort(size_t cIdx, specter::SortDirection dir) override { m_rb.m_state.sortDir = dir; m_rb.m_state.sortColumn = State::SortColumn(cIdx); m_needsUpdate = true; } - void setSelectedRow(size_t rIdx) {} + void setSelectedRow(size_t rIdx) override {} - void rowActivated(size_t rIdx) {} + void rowActivated(size_t rIdx) override {} ResListingDataBind(ResourceBrowser& rb, const specter::IViewManager& vm) : m_rb(rb) { m_nameCol = vm.translate(); @@ -142,13 +142,13 @@ class ResourceBrowser : public Space, public specter::IPathButtonsBinding { m_resListing.m_view.reset(new specter::Table(res, *this, &ro.m_resListingBind, &ro.m_resListingBind, 3)); } - void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey); - void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey); - void mouseMove(const boo::SWindowCoord&); - void mouseLeave(const boo::SWindowCoord&); + void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override; + void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override; + void mouseMove(const boo::SWindowCoord&) override; + void mouseLeave(const boo::SWindowCoord&) override; - void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub); - void draw(boo::IGraphicsCommandQueue* gfxQ); + void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) override; + void draw(boo::IGraphicsCommandQueue* gfxQ) override; }; std::unique_ptr m_view; @@ -168,7 +168,7 @@ public: reloadState(); } - void reloadState() { + void reloadState() override { hecl::ProjectPath pp(*m_vm.project(), m_state.path); if (m_state.path.empty() || pp.isNone()) { m_state.path = m_vm.project()->getProjectWorkingPath().getRelativePathUTF8(); @@ -177,29 +177,29 @@ public: navigateToPath(pp); } - void think() { + void think() override { if (m_resListingBind.m_needsUpdate) reloadState(); } bool navigateToPath(const hecl::ProjectPath& path); - Space* copy(Space* parent) const { return new ResourceBrowser(m_vm, parent, *this); } + Space* copy(Space* parent) const override { return new ResourceBrowser(m_vm, parent, *this); } - void buildToolbarView(specter::ViewResources& res, specter::Toolbar& tb) { + void buildToolbarView(specter::ViewResources& res, specter::Toolbar& tb) override { m_pathButtons.reset(new specter::PathButtons(res, tb, *this, true)); tb.push_back(m_pathButtons.get(), 1); reloadState(); } - specter::View* buildContentView(specter::ViewResources& res) { + specter::View* buildContentView(specter::ViewResources& res) override { m_view.reset(new View(*this, res)); return m_view.get(); } - bool usesToolbar() const { return true; } + bool usesToolbar() const override { return true; } - unsigned toolbarUnits() const { return 2; } + unsigned toolbarUnits() const override { return 2; } }; } // namespace urde diff --git a/Editor/Space.hpp b/Editor/Space.hpp index 64d52c8d1..21065bd7f 100644 --- a/Editor/Space.hpp +++ b/Editor/Space.hpp @@ -54,8 +54,8 @@ public: std::string m_text; specter::Icon& m_icon; zeus::CColor m_color; - const std::string* text() const { return &m_text; } - void activated(const boo::SWindowCoord& coord) {} + const std::string* text() const override { return &m_text; } + void activated(const boo::SWindowCoord& coord) override {} SubNodeData(Class cls, const char* text, specter::Icon& icon, const zeus::CColor& color) : m_cls(cls), m_text(text), m_icon(icon), m_color(color) {} @@ -65,8 +65,8 @@ public: struct SubNode final : specter::IMenuNode { Space& m_space; const SubNodeData& m_data; - const std::string* text() const { return &m_data.m_text; } - void activated(const boo::SWindowCoord& coord); + const std::string* text() const override { return &m_data.m_text; } + void activated(const boo::SWindowCoord& coord) override; SubNode(Space& space, const SubNodeData& data) : m_space(space), m_data(data) {} }; @@ -79,10 +79,10 @@ public: } static std::string s_text; - const std::string* text() const { return &s_text; } + const std::string* text() const override { return &s_text; } - size_t subNodeCount() const { return m_subNodes.size(); } - IMenuNode* subNode(size_t idx) { return &m_subNodes[idx]; } + size_t subNodeCount() const override { return m_subNodes.size(); } + IMenuNode* subNode(size_t idx) override { return &m_subNodes[idx]; } static void InitializeStrings(ViewManager& vm); static const std::string* LookupClassString(Class cls) { @@ -107,10 +107,10 @@ public: struct SpaceSelectBind : specter::IButtonBinding { Space& m_space; - std::string_view name(const specter::Control* control) const { return SpaceMenuNode::s_text; } + std::string_view name(const specter::Control* control) const override { return SpaceMenuNode::s_text; } - MenuStyle menuStyle(const specter::Button* button) const { return MenuStyle::Primary; } - std::unique_ptr buildMenu(const specter::Button* button); + MenuStyle menuStyle(const specter::Button* button) const override { return MenuStyle::Primary; } + std::unique_ptr buildMenu(const specter::Button* button) override; SpaceSelectBind(Space& space) : m_space(space) {} } m_spaceSelectBind; @@ -143,9 +143,9 @@ public: virtual void think() {} virtual Space* copy(Space* parent) const = 0; - bool spaceSplitAllowed() const { return true; } + bool spaceSplitAllowed() const override { return true; } - specter::ISplitSpaceController* spaceSplit(specter::SplitView::Axis axis, int thisSlot); + specter::ISplitSpaceController* spaceSplit(specter::SplitView::Axis axis, int thisSlot) override; virtual std::unique_ptr exchangeSpaceSplitJoin(Space* removeSpace, std::unique_ptr&& keepSpace) { return std::unique_ptr(); } @@ -159,8 +159,9 @@ class RootSpace : public Space { friend class ViewManager; std::unique_ptr m_rootView; std::unique_ptr m_spaceTree; + struct State : Space::State{AT_DECL_DNA_YAMLV } m_state; - const Space::State& spaceState() const { return m_state; } + const Space::State& spaceState() const override { return m_state; } public: RootSpace(ViewManager& vm) : Space(vm, Class::RootSpace, nullptr) {} @@ -170,12 +171,12 @@ public: m_spaceTree.reset(NewSpaceFromConfigStream(vm, this, r)); } - void think() { + void think() override { if (m_spaceTree) m_spaceTree->think(); } - void saveState(athena::io::IStreamWriter& w) const { + void saveState(athena::io::IStreamWriter& w) const override { w.writeUint32Big(atUint32(m_class)); m_state.write(w); @@ -185,7 +186,7 @@ public: w.writeUint32Big(0); } - void saveState(athena::io::YAMLDocWriter& w) const { + void saveState(athena::io::YAMLDocWriter& w) const override { w.writeUint32("class", atUint32(m_class)); m_state.write(w); @@ -202,15 +203,15 @@ public: m_spaceTree->m_parent = this; } - Space* copy(Space* parent) const { return nullptr; } - bool spaceSplitAllowed() const { return false; } + Space* copy(Space* parent) const override { return nullptr; } + bool spaceSplitAllowed() const override { return false; } - specter::View* buildSpaceView(specter::ViewResources& res); - specter::View* buildContentView(specter::ViewResources& res) { return m_spaceTree->buildSpaceView(res); } + specter::View* buildSpaceView(specter::ViewResources& res) override; + specter::View* buildContentView(specter::ViewResources& res) override { return m_spaceTree->buildSpaceView(res); } - std::unique_ptr exchangeSpaceSplitJoin(Space* removeSpace, std::unique_ptr&& keepSpace); + std::unique_ptr exchangeSpaceSplitJoin(Space* removeSpace, std::unique_ptr&& keepSpace) override; - specter::View* basisView(); + specter::View* basisView() override; }; class SplitSpace : public Space, public specter::ISplitSpaceController { @@ -222,7 +223,7 @@ class SplitSpace : public Space, public specter::ISplitSpaceController { Value axis = specter::SplitView::Axis::Horizontal; Value split = 0.5; } m_state; - const Space::State& spaceState() const { return m_state; } + const Space::State& spaceState() const override { return m_state; } public: SplitSpace(ViewManager& vm, Space* parent, specter::SplitView::Axis axis) : Space(vm, Class::SplitSpace, parent) { @@ -239,7 +240,7 @@ public: reloadState(); } - void reloadState() { + void reloadState() override { m_state.split = std::min(1.f, std::max(0.f, m_state.split)); if (m_state.axis != specter::SplitView::Axis::Horizontal && m_state.axis != specter::SplitView::Axis::Vertical) m_state.axis = specter::SplitView::Axis::Horizontal; @@ -249,14 +250,14 @@ public: } } - void think() { + void think() override { if (m_slots[0]) m_slots[0]->think(); if (m_slots[1]) m_slots[1]->think(); } - void saveState(athena::io::IStreamWriter& w) const { + void saveState(athena::io::IStreamWriter& w) const override { w.writeUint32Big(atUint32(m_class)); m_state.write(w); @@ -271,7 +272,7 @@ public: w.writeUint32Big(0); } - void saveState(athena::io::YAMLDocWriter& w) const { + void saveState(athena::io::YAMLDocWriter& w) const override { w.writeUint32("class", atUint32(m_class)); m_state.write(w); @@ -292,11 +293,11 @@ public: void setChildSlot(unsigned slot, std::unique_ptr&& space); - specter::View* buildSpaceView(specter::ViewResources& res) { return buildContentView(res); } - specter::View* buildContentView(specter::ViewResources& res); + specter::View* buildSpaceView(specter::ViewResources& res) override { return buildContentView(res); } + specter::View* buildContentView(specter::ViewResources& res) override; - Space* copy(Space* parent) const { return nullptr; } - bool spaceSplitAllowed() const { return false; } + Space* copy(Space* parent) const override { return nullptr; } + bool spaceSplitAllowed() const override { return false; } ISpaceController* spaceJoin(int keepSlot) { if (m_parent) { @@ -307,11 +308,11 @@ public: return nullptr; } - std::unique_ptr exchangeSpaceSplitJoin(Space* removeSpace, std::unique_ptr&& keepSpace); + std::unique_ptr exchangeSpaceSplitJoin(Space* removeSpace, std::unique_ptr&& keepSpace) override; - specter::SplitView* splitView() { return m_splitView.get(); } - void updateSplit(float split) { m_state.split = split; } - void joinViews(specter::SplitView* thisSplit, int thisSlot, specter::SplitView* otherSplit, int otherSlot); + specter::SplitView* splitView() override { return m_splitView.get(); } + void updateSplit(float split) override { m_state.split = split; } + void joinViews(specter::SplitView* thisSplit, int thisSlot, specter::SplitView* otherSplit, int otherSlot) override; void setAxis(specter::SplitView::Axis axis) { m_state.axis = axis; @@ -321,7 +322,7 @@ public: specter::SplitView::Axis axis() const { return m_state.axis; } float split() const { return m_state.split; } - specter::View* basisView() { return m_splitView.get(); } + specter::View* basisView() override { return m_splitView.get(); } }; inline SplitSpace* Space::castToSplitSpace() { return cls() == Class::SplitSpace ? static_cast(this) : nullptr; @@ -356,16 +357,21 @@ public: specter::IButtonBinding* binding) : Space(vm, Class::TestSpace, parent), m_contentStr(content), m_buttonStr(button), m_binding(binding) {} +<<<<<<< HEAD struct State : Space::State{AT_DECL_DNA_YAMLV} m_state; const Space::State& spaceState() const { return m_state; } +======= + struct State : Space::State{AT_DECL_DNA_YAML AT_DECL_DNAV} m_state; + const Space::State& spaceState() const override { return m_state; } +>>>>>>> Editor: Use override where applicable - bool usesToolbar() const { return true; } - void buildToolbarView(specter::ViewResources& res, specter::Toolbar& tb) { + bool usesToolbar() const override { return true; } + void buildToolbarView(specter::ViewResources& res, specter::Toolbar& tb) override { m_button.reset(new specter::Button(res, tb, m_binding, m_buttonStr)); tb.push_back(m_button.get(), 0); } - specter::View* buildContentView(specter::ViewResources& res) { + specter::View* buildContentView(specter::ViewResources& res) override { m_textView.reset(new specter::MultiLineTextView(res, *m_spaceView, res.m_heading14)); m_textView->setBackground(res.themeData().viewportBackground()); m_textView->typesetGlyphs(m_contentStr, res.themeData().uiText()); diff --git a/Editor/SplashScreen.hpp b/Editor/SplashScreen.hpp index 44737a4de..dcad65705 100644 --- a/Editor/SplashScreen.hpp +++ b/Editor/SplashScreen.hpp @@ -37,9 +37,11 @@ class SplashScreen : public specter::ModalWindow { SplashScreen& m_splash; hecl::SystemString m_deferPath; NewProjBinding(SplashScreen& splash) : m_splash(splash) {} - std::string_view name(const specter::Control* control) const { return m_splash.m_newString.c_str(); } - std::string_view help(const specter::Control* control) const { return "Creates an empty project at selected path"; } - void activated(const specter::Button* button, const boo::SWindowCoord& coord) { + std::string_view name(const specter::Control* control) const override { return m_splash.m_newString.c_str(); } + std::string_view help(const specter::Control* control) const override { + return "Creates an empty project at selected path"; + } + void activated(const specter::Button* button, const boo::SWindowCoord& coord) override { m_splash.m_fileBrowser.m_view.reset(new specter::FileBrowser( m_splash.rootView().viewRes(), m_splash, m_splash.m_newString, specter::FileBrowser::Type::NewHECLProject, [&](bool ok, hecl::SystemStringView path) { @@ -55,11 +57,11 @@ class SplashScreen : public specter::ModalWindow { SplashScreen& m_splash; hecl::SystemString m_deferPath; OpenProjBinding(SplashScreen& splash) : m_splash(splash), m_openRecentMenuRoot(*this) {} - std::string_view name(const specter::Control* control) const { return m_splash.m_openString.c_str(); } - std::string_view help(const specter::Control* control) const { + std::string_view name(const specter::Control* control) const override { return m_splash.m_openString.c_str(); } + std::string_view help(const specter::Control* control) const override { return "Opens an existing project at selected path"; } - void activated(const specter::Button* button, const boo::SWindowCoord& coord) { + void activated(const specter::Button* button, const boo::SWindowCoord& coord) override { m_splash.m_fileBrowser.m_view.reset(new specter::FileBrowser( m_splash.rootView().viewRes(), m_splash, m_splash.m_openString, specter::FileBrowser::Type::OpenHECLProject, [&](bool ok, hecl::SystemStringView path) { @@ -75,7 +77,7 @@ class SplashScreen : public specter::ModalWindow { OpenRecentMenuRoot(OpenProjBinding& openProjBind) : m_openProjBind(openProjBind) {} std::string m_text; - const std::string* text() const { return &m_text; } + const std::string* text() const override { return &m_text; } struct OpenRecentMenuItem final : specter::IMenuNode { OpenRecentMenuRoot& m_parent; @@ -83,8 +85,8 @@ class SplashScreen : public specter::ModalWindow { hecl::SystemString m_path; std::string m_text; - const std::string* text() const { return &m_text; } - void activated(const boo::SWindowCoord& coord) { + const std::string* text() const override { return &m_text; } + void activated(const boo::SWindowCoord& coord) override { m_parent.m_openProjBind.m_deferPath = m_path; m_parent.m_openProjBind.m_splash.m_openButt.m_view->closeMenu(coord); } @@ -98,8 +100,8 @@ class SplashScreen : public specter::ModalWindow { }; std::vector m_items; - size_t subNodeCount() const { return m_items.size(); } - specter::IMenuNode* subNode(size_t idx) { return &m_items[idx]; } + size_t subNodeCount() const override { return m_items.size(); } + specter::IMenuNode* subNode(size_t idx) override { return &m_items[idx]; } void buildNodes(const std::vector* recentProjects) { m_items.clear(); @@ -111,8 +113,8 @@ class SplashScreen : public specter::ModalWindow { } } m_openRecentMenuRoot; - MenuStyle menuStyle(const specter::Button* button) const { return MenuStyle::Auxiliary; } - std::unique_ptr buildMenu(const specter::Button* button) { + MenuStyle menuStyle(const specter::Button* button) const override { return MenuStyle::Auxiliary; } + std::unique_ptr buildMenu(const specter::Button* button) override { m_openRecentMenuRoot.buildNodes(m_splash.m_vm.recentProjects()); return std::unique_ptr(new specter::Menu(m_splash.rootView().viewRes(), m_splash, &m_openRecentMenuRoot)); } @@ -122,11 +124,11 @@ class SplashScreen : public specter::ModalWindow { SplashScreen& m_splash; hecl::SystemString m_deferPath; ExtractProjBinding(SplashScreen& splash) : m_splash(splash) {} - std::string_view name(const specter::Control* control) const { return m_splash.m_extractString.c_str(); } - std::string_view help(const specter::Control* control) const { + std::string_view name(const specter::Control* control) const override { return m_splash.m_extractString.c_str(); } + std::string_view help(const specter::Control* control) const override { return "Extracts game image as project at selected path"; } - void activated(const specter::Button* button, const boo::SWindowCoord& coord) { + void activated(const specter::Button* button, const boo::SWindowCoord& coord) override { m_splash.m_fileBrowser.m_view.reset( new specter::FileBrowser(m_splash.rootView().viewRes(), m_splash, m_splash.m_extractString, specter::FileBrowser::Type::OpenFile, [&](bool ok, hecl::SystemStringView path) { @@ -140,23 +142,23 @@ class SplashScreen : public specter::ModalWindow { public: SplashScreen(ViewManager& vm, specter::ViewResources& res); - void think(); - void updateContentOpacity(float opacity); + void think() override; + void updateContentOpacity(float opacity) override; - void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey); - void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey); - void mouseMove(const boo::SWindowCoord&); - void mouseEnter(const boo::SWindowCoord&); - void mouseLeave(const boo::SWindowCoord&); - void scroll(const boo::SWindowCoord&, const boo::SScrollDelta&); - void touchDown(const boo::STouchCoord&, uintptr_t); - void touchUp(const boo::STouchCoord&, uintptr_t); - void touchMove(const boo::STouchCoord&, uintptr_t); - void charKeyDown(unsigned long, boo::EModifierKey, bool); - void specialKeyDown(boo::ESpecialKey, boo::EModifierKey, bool); + void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override; + void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey) override; + void mouseMove(const boo::SWindowCoord&) override; + void mouseEnter(const boo::SWindowCoord&) override; + void mouseLeave(const boo::SWindowCoord&) override; + void scroll(const boo::SWindowCoord&, const boo::SScrollDelta&) override; + void touchDown(const boo::STouchCoord&, uintptr_t) override; + void touchUp(const boo::STouchCoord&, uintptr_t) override; + void touchMove(const boo::STouchCoord&, uintptr_t) override; + void charKeyDown(unsigned long, boo::EModifierKey, bool) override; + void specialKeyDown(boo::ESpecialKey, boo::EModifierKey, bool) override; - void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub); - void draw(boo::IGraphicsCommandQueue* gfxQ); + void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) override; + void draw(boo::IGraphicsCommandQueue* gfxQ) override; }; } // namespace urde diff --git a/Editor/ViewManager.hpp b/Editor/ViewManager.hpp index f5b75df20..3ca27a896 100644 --- a/Editor/ViewManager.hpp +++ b/Editor/ViewManager.hpp @@ -60,47 +60,47 @@ class ViewManager final : public specter::IViewManager { public: TestGameView(ViewManager& vm, specter::ViewResources& res, specter::View& parent) : View(res, parent), m_vm(vm) {} - void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub); - void draw(boo::IGraphicsCommandQueue* gfxQ); - void think(); + void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) override; + void draw(boo::IGraphicsCommandQueue* gfxQ) override; + void think() override; - void mouseDown(const boo::SWindowCoord& coord, boo::EMouseButton button, boo::EModifierKey mkey) { + void mouseDown(const boo::SWindowCoord& coord, boo::EMouseButton button, boo::EModifierKey mkey) override { if (MP1::CMain* m = m_vm.m_projManager.gameMain()) if (MP1::CGameArchitectureSupport* as = m->GetArchSupport()) as->mouseDown(coord, button, mkey); } - void mouseUp(const boo::SWindowCoord& coord, boo::EMouseButton button, boo::EModifierKey mkey) { + void mouseUp(const boo::SWindowCoord& coord, boo::EMouseButton button, boo::EModifierKey mkey) override { if (MP1::CMain* m = m_vm.m_projManager.gameMain()) if (MP1::CGameArchitectureSupport* as = m->GetArchSupport()) as->mouseUp(coord, button, mkey); } - void mouseMove(const boo::SWindowCoord& coord) { + void mouseMove(const boo::SWindowCoord& coord) override { if (MP1::CMain* m = m_vm.m_projManager.gameMain()) if (MP1::CGameArchitectureSupport* as = m->GetArchSupport()) as->mouseMove(coord); } - void scroll(const boo::SWindowCoord& coord, const boo::SScrollDelta& sd) { + void scroll(const boo::SWindowCoord& coord, const boo::SScrollDelta& sd) override { if (MP1::CMain* m = m_vm.m_projManager.gameMain()) if (MP1::CGameArchitectureSupport* as = m->GetArchSupport()) as->scroll(coord, sd); } - void charKeyDown(unsigned long cc, boo::EModifierKey mkey, bool repeat) { + void charKeyDown(unsigned long cc, boo::EModifierKey mkey, bool repeat) override { if (MP1::CMain* m = m_vm.m_projManager.gameMain()) if (MP1::CGameArchitectureSupport* as = m->GetArchSupport()) as->charKeyDown(cc, mkey, repeat); } - void charKeyUp(unsigned long cc, boo::EModifierKey mkey) { + void charKeyUp(unsigned long cc, boo::EModifierKey mkey) override { if (MP1::CMain* m = m_vm.m_projManager.gameMain()) if (MP1::CGameArchitectureSupport* as = m->GetArchSupport()) as->charKeyUp(cc, mkey); } - void specialKeyDown(boo::ESpecialKey skey, boo::EModifierKey mkey, bool repeat) { + void specialKeyDown(boo::ESpecialKey skey, boo::EModifierKey mkey, bool repeat) override { if (MP1::CMain* m = m_vm.m_projManager.gameMain()) if (MP1::CGameArchitectureSupport* as = m->GetArchSupport()) as->specialKeyDown(skey, mkey, repeat); @@ -109,7 +109,7 @@ class ViewManager final : public specter::IViewManager { m_vm.m_skipWait = true; } - void specialKeyUp(boo::ESpecialKey skey, boo::EModifierKey mkey) { + void specialKeyUp(boo::ESpecialKey skey, boo::EModifierKey mkey) override { if (MP1::CMain* m = m_vm.m_projManager.gameMain()) if (MP1::CGameArchitectureSupport* as = m->GetArchSupport()) as->specialKeyUp(skey, mkey); @@ -166,21 +166,21 @@ public: ProjectManager& projectManager() { return m_projManager; } hecl::Database::Project* project() { return m_projManager.project(); } - locale::ELocale getTranslatorLocale() const { return m_locale; } + locale::ELocale getTranslatorLocale() const override { return m_locale; } void deferSpaceSplit(specter::ISpaceController* split, specter::SplitView::Axis axis, int thisSlot, - const boo::SWindowCoord& coord) { + const boo::SWindowCoord& coord) override { m_deferSplit = static_cast(split); m_deferSplitAxis = axis; m_deferSplitThisSlot = thisSlot; m_deferSplitCoord = coord; } - const std::vector* recentProjects() const { return &m_recentProjects; } - void pushRecentProject(hecl::SystemStringView path); + const std::vector* recentProjects() const override { return &m_recentProjects; } + void pushRecentProject(hecl::SystemStringView path) override; - const std::vector* recentFiles() const { return &m_recentFiles; } - void pushRecentFile(hecl::SystemStringView path); + const std::vector* recentFiles() const override { return &m_recentFiles; } + void pushRecentFile(hecl::SystemStringView path) override; void init(boo::IApplication* app); const boo::SystemChar* platformName() { return m_mainPlatformName; } diff --git a/Editor/main.cpp b/Editor/main.cpp index aefc9fa39..f423d181b 100644 --- a/Editor/main.cpp +++ b/Editor/main.cpp @@ -60,7 +60,7 @@ struct Application : boo::IApplicationCallback { virtual ~Application() = default; - int appMain(boo::IApplication* app) { + int appMain(boo::IApplication* app) override { initialize(app); m_viewManager->init(app); while (m_running.load()) { @@ -73,8 +73,8 @@ struct Application : boo::IApplicationCallback { m_viewManager.reset(); return 0; } - void appQuitting(boo::IApplication*) { m_running.store(false); } - void appFilesOpen(boo::IApplication*, const std::vector& paths) { + void appQuitting(boo::IApplication*) override { m_running.store(false); } + void appFilesOpen(boo::IApplication*, const std::vector& paths) override { for (const auto& path : paths) { hecl::ProjectRootPath projPath = hecl::SearchForProject(path); if (projPath) { From 9905496a796f0f3ee887c89cfa28dfe574009d60 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 10 Aug 2019 19:59:29 -0700 Subject: [PATCH 16/65] Update specter --- specter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specter b/specter index 8c17f7c15..e57aa9f82 160000 --- a/specter +++ b/specter @@ -1 +1 @@ -Subproject commit 8c17f7c154cabf9505818a49700ce5102c169561 +Subproject commit e57aa9f82763eec158aa029dcd125450fa26c2f7 From a572100176db03f2b179afec51b3ef06b58508c7 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 10 Aug 2019 20:02:54 -0700 Subject: [PATCH 17/65] Add CRipper files --- Runtime/MP1/World/CRipper.cpp | 9 +++++++++ Runtime/MP1/World/CRipper.hpp | 14 ++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 Runtime/MP1/World/CRipper.cpp create mode 100644 Runtime/MP1/World/CRipper.hpp diff --git a/Runtime/MP1/World/CRipper.cpp b/Runtime/MP1/World/CRipper.cpp new file mode 100644 index 000000000..6ba8679b6 --- /dev/null +++ b/Runtime/MP1/World/CRipper.cpp @@ -0,0 +1,9 @@ +#include "MP1/World/CRipper.hpp" + +namespace urde::MP1 { +CRipper::CRipper(TUniqueId uid, std::string_view name, EFlavorType type, const CEntityInfo& info, + const zeus::CTransform& xf, CModelData&& mData, const CPatternedInfo& pInfo, const CActorParameters& actParms, + const CGrappleParameters& grappleParms) +: CPatterned(ECharacter::Ripper, uid, name, type, info, xf, std::move(mData), pInfo, EMovementType::Flyer, + EColliderType::One, EBodyType::Flyer, actParms, EKnockBackVariant::Medium) {} +} \ No newline at end of file diff --git a/Runtime/MP1/World/CRipper.hpp b/Runtime/MP1/World/CRipper.hpp new file mode 100644 index 000000000..297a4f938 --- /dev/null +++ b/Runtime/MP1/World/CRipper.hpp @@ -0,0 +1,14 @@ +#pragma once + +#include "World/CPatterned.hpp" +#include "World/CGrappleParameters.hpp" + +namespace urde::MP1 { +class CRipper : public CPatterned { +public: + DEFINE_PATTERNED(Ripper) + CRipper(TUniqueId uid, std::string_view name, EFlavorType type, const CEntityInfo& info, const zeus::CTransform& xf, + CModelData&& mData, const CPatternedInfo& pInfo, const CActorParameters& actParms, + const CGrappleParameters& grappleParms); +}; +} \ No newline at end of file From 380e44148f32b98f1ac603fc053400b67e230adf Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 10 Aug 2019 20:28:19 -0700 Subject: [PATCH 18/65] Fix missed conflict --- Editor/Space.hpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Editor/Space.hpp b/Editor/Space.hpp index 21065bd7f..68d87f096 100644 --- a/Editor/Space.hpp +++ b/Editor/Space.hpp @@ -357,13 +357,8 @@ public: specter::IButtonBinding* binding) : Space(vm, Class::TestSpace, parent), m_contentStr(content), m_buttonStr(button), m_binding(binding) {} -<<<<<<< HEAD struct State : Space::State{AT_DECL_DNA_YAMLV} m_state; - const Space::State& spaceState() const { return m_state; } -======= - struct State : Space::State{AT_DECL_DNA_YAML AT_DECL_DNAV} m_state; const Space::State& spaceState() const override { return m_state; } ->>>>>>> Editor: Use override where applicable bool usesToolbar() const override { return true; } void buildToolbarView(specter::ViewResources& res, specter::Toolbar& tb) override { From ebdcfb6b515209d9f73a326118f094a45b4117ae Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sun, 11 Aug 2019 08:14:52 -0700 Subject: [PATCH 19/65] Initial CMetroidBeta imps --- Runtime/CStateManager.cpp | 32 +-- Runtime/Collision/CCollidableAABox.hpp | 1 + Runtime/Collision/CCollisionResponseData.cpp | 3 +- Runtime/MP1/World/CMetroidBeta.cpp | 242 ++++++++++++++++++- Runtime/MP1/World/CMetroidBeta.hpp | 106 +++++++- Runtime/MP1/World/CRipper.cpp | 141 ++++++++++- Runtime/MP1/World/CRipper.hpp | 34 +++ Runtime/Weapon/CPlayerGun.cpp | 5 +- 8 files changed, 540 insertions(+), 24 deletions(-) diff --git a/Runtime/CStateManager.cpp b/Runtime/CStateManager.cpp index 7d7901eba..d79a994ea 100644 --- a/Runtime/CStateManager.cpp +++ b/Runtime/CStateManager.cpp @@ -876,7 +876,7 @@ void CStateManager::DrawWorld() const { void CStateManager::DrawActorCubeFaces(CActor& actor, int& cubeInst) const { if (!actor.m_reflectionCube || - (!TCastToPtr(actor) && (!actor.GetActive() || !actor.IsDrawEnabled() || actor.xe4_30_outOfFrustum))) + (!TCastToPtr(actor) && (!actor.GetActive() || !actor.IsDrawEnabled() || actor.xe4_30_outOfFrustum))) return; TAreaId visAreaId = actor.GetAreaIdAlways(); @@ -895,23 +895,24 @@ void CStateManager::DrawActorCubeFaces(CActor& actor, int& cubeInst) const { } for (int f = 0; f < 6; ++f) { - SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(fmt("CStateManager::DrawActorCubeFaces [{}] {} {} {}"), - f, actor.GetUniqueId(), actor.GetEditorId(), actor.GetName()).c_str(), zeus::skOrange); + SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(fmt("CStateManager::DrawActorCubeFaces [{}] {} {} {}"), f, + actor.GetUniqueId(), actor.GetEditorId(), actor.GetName()) + .c_str(), + zeus::skOrange); CGraphics::g_BooMainCommandQueue->setRenderTarget(actor.m_reflectionCube, f); SetupViewForCubeFaceDraw(actor.GetRenderBounds().center(), f); CGraphics::g_BooMainCommandQueue->clearTarget(); - std::sort(std::begin(areaArr), std::begin(areaArr) + areaCount, - [visAreaId](const CGameArea* a, const CGameArea* b) { - if (a->x4_selfIdx == b->x4_selfIdx) - return false; - if (visAreaId == a->x4_selfIdx) - return false; - if (visAreaId == b->x4_selfIdx) - return true; - return CGraphics::g_ViewPoint.dot(a->GetAABB().center()) > - CGraphics::g_ViewPoint.dot(b->GetAABB().center()); - }); + std::sort( + std::begin(areaArr), std::begin(areaArr) + areaCount, [visAreaId](const CGameArea* a, const CGameArea* b) { + if (a->x4_selfIdx == b->x4_selfIdx) + return false; + if (visAreaId == a->x4_selfIdx) + return false; + if (visAreaId == b->x4_selfIdx) + return true; + return CGraphics::g_ViewPoint.dot(a->GetAABB().center()) > CGraphics::g_ViewPoint.dot(b->GetAABB().center()); + }); int pvsCount = 0; CPVSVisSet pvsArr[10]; @@ -1656,8 +1657,7 @@ void CStateManager::TestBombHittingWater(const CActor& damager, const zeus::CVec float bombMag = powerBomb ? 2.f : 1.f; if (delta <= -bombMag || delta >= 0.f) return; - CRayCastResult res = - RayStaticIntersection(pos, zeus::skDown, -delta, CMaterialFilter::skPassEverything); + CRayCastResult res = RayStaticIntersection(pos, zeus::skDown, -delta, CMaterialFilter::skPassEverything); if (res.IsInvalid() && x87c_fluidPlaneManager->GetLastRippleDeltaTime(damager.GetUniqueId()) >= 0.15f) { // Not blocked by static geometry float mag = 0.6f * bombMag + 0.4f * bombMag * std::sin(2.f * M_PIF * -delta / bombMag * 0.25f); diff --git a/Runtime/Collision/CCollidableAABox.hpp b/Runtime/Collision/CCollidableAABox.hpp index 4164980ab..f9defa46d 100644 --- a/Runtime/Collision/CCollidableAABox.hpp +++ b/Runtime/Collision/CCollidableAABox.hpp @@ -26,6 +26,7 @@ public: CRayCastResult CastRayInternal(const CInternalRayCastStructure&) const override; const zeus::CAABox& GetBox() const { return x10_aabox; } zeus::CAABox& Box() { return x10_aabox; } + void SetBox(const zeus::CAABox& box) { x10_aabox = box; } static const CCollisionPrimitive::Type& GetType(); static void SetStaticTableIndex(u32 index); diff --git a/Runtime/Collision/CCollisionResponseData.cpp b/Runtime/Collision/CCollisionResponseData.cpp index a84c45abd..50679bc57 100644 --- a/Runtime/Collision/CCollisionResponseData.cpp +++ b/Runtime/Collision/CCollisionResponseData.cpp @@ -223,7 +223,8 @@ bool CCollisionResponseData::ResponseTypeIsEnemySpecial(EWeaponCollisionResponse } bool CCollisionResponseData::ResponseTypeIsEnemyShielded(EWeaponCollisionResponseTypes type) { - return (type >= EWeaponCollisionResponseTypes::Unknown69 && type <= EWeaponCollisionResponseTypes::AtomicAlphaReflect); + return (type >= EWeaponCollisionResponseTypes::Unknown69 && + type <= EWeaponCollisionResponseTypes::AtomicAlphaReflect); } FourCC CCollisionResponseData::UncookedResType() { return SBIG('CRSM'); } diff --git a/Runtime/MP1/World/CMetroidBeta.cpp b/Runtime/MP1/World/CMetroidBeta.cpp index 1b585e14e..dcbf1c0ab 100644 --- a/Runtime/MP1/World/CMetroidBeta.cpp +++ b/Runtime/MP1/World/CMetroidBeta.cpp @@ -1,5 +1,16 @@ #include "CMetroidBeta.hpp" +#include "CSimplePool.hpp" +#include "Collision/CCollisionActorManager.hpp" +#include "Collision/CCollisionActor.hpp" +#include "Particle/CElementGen.hpp" +#include "Particle/CParticleSwoosh.hpp" +#include "Weapon/CGameProjectile.hpp" +#include "World/CPatternedInfo.hpp" +#include "World/CPlayer.hpp" #include "World/ScriptLoader.hpp" +#include "World/CTeamAiMgr.hpp" +#include "CStateManager.hpp" +#include "GameGlobalObjects.hpp" namespace urde::MP1 { @@ -26,9 +37,238 @@ CMetroidBeta::CMetroidBeta(TUniqueId uid, std::string_view name, const CEntityIn CModelData&& mData, const CPatternedInfo& pInfo, const CActorParameters& aParms, const CMetroidBetaData& metroidData) : CPatterned(ECharacter::MetroidBeta, uid, name, EFlavorType::One, info, xf, std::move(mData), pInfo, - EMovementType::Flyer, EColliderType::One, EBodyType::Flyer, aParms, EKnockBackVariant::Large) {} + EMovementType::Flyer, EColliderType::One, EBodyType::Flyer, aParms, EKnockBackVariant::Large) +, x56c_metroidBetaData(metroidData) +, x67c_pathFind(nullptr, 3, pInfo.GetPathfindingIndex(), 1.f, 1.f) +, x768_colPrim(GetBoundingBox(), GetMaterialList()) +, x7b4_(GetModelData()->GetScale()) +, x7c0_(GetModelData()->GetScale()) +, x7cc_(GetModelData()->GetScale()) +, x7e4_(g_SimplePool->GetObj({FOURCC('PART'), metroidData.xf4_})) +, x7f0_(g_SimplePool->GetObj({FOURCC('SWHC'), metroidData.xf8_})) +, x7fc_(g_SimplePool->GetObj({FOURCC('PART'), metroidData.xfc_})) +, x808_(g_SimplePool->GetObj({FOURCC('PART'), metroidData.x100_})) +, x814_(g_SimplePool->GetObj({FOURCC('PART'), metroidData.x104_})) +, x820_(new CElementGen(x7e4_)) +, x824_(new CParticleSwoosh(x7f0_, 0)) +, x828_(new CElementGen(x7fc_)) +, x82c_(new CElementGen(x808_)) +, x830_(new CElementGen(x814_)) { + x820_->SetParticleEmission(false); + x828_->SetParticleEmission(false); + x82c_->SetParticleEmission(false); + x824_->DoElectricWarmup(); + const float scale = 0.75f * GetModelData()->GetScale().y(); + const zeus::CVector3f scaleVec(scale, scale, 2.f * scale); + zeus::CAABox box = {-scaleVec, scaleVec}; + SetBoundingBox(box); + x768_colPrim.SetBox(box); +} + +void CMetroidBeta::Think(float dt, CStateManager& mgr) { + if (CTeamAiMgr::GetTeamAiRole(mgr, x678_teamMgr, GetUniqueId())) { + AddToTeam(mgr); + } + + CPatterned::Think(dt, mgr); + x764_collisionManager->Update(dt, mgr, CCollisionActorManager::EUpdateOptions::ObjectSpace); + // sub801c1928(mgr); + // sub801c0da4(dt, mgr); + // sub801c21b4(dt, mgr); +} +void CMetroidBeta::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) { + CPatterned::AcceptScriptMsg(msg, uid, mgr); + switch (msg) { + case EScriptObjectMessage::Registered: { + x450_bodyController->Activate(mgr); + CreateCollisionActorManager(mgr); + //sub801c13d4(); + x760_ = GetModelData()->GetAnimationData()->GetLocatorSegId("L_Claw_1"sv); + x761_ = GetModelData()->GetAnimationData()->GetLocatorSegId("R_Claw_1"sv); + break; + } + case EScriptObjectMessage::Activate: { + x764_collisionManager->SetActive(mgr, true); + break; + } + case EScriptObjectMessage::Deactivate: { + x764_collisionManager->SetActive(mgr, false); + break; + } + case EScriptObjectMessage::Deleted: { + x764_collisionManager->Destroy(mgr); + RemoveFromTeam(mgr); + break; + } + case EScriptObjectMessage::Damage: + case EScriptObjectMessage::InvulnDamage: { + if (TCastToPtr colAct = mgr.ObjectById(uid)) { + if (TCastToConstPtr proj = mgr.GetObjectById(colAct->GetLastTouchedObject())) { + if (proj->GetOwnerId() != mgr.GetPlayer().GetUniqueId()) + break; + // sub801c14b4(proj->GetDamageInfo().GetDamage(), mgr); + const CDamageInfo& dInfo = proj->GetDamageInfo(); + if (colAct->GetDamageVulnerability()->WeaponHits(dInfo.GetWeaponMode(), false)) { + if (dInfo.GetWeaponMode().IsCharged() || dInfo.GetWeaponMode().IsComboed() || + dInfo.GetWeaponMode().GetType() == EWeaponType::Missile) { + x840_31_ = true; + x83c_ += 1.f; + } + KnockBack(proj->GetTranslation() - proj->GetPreviousPos(), mgr, dInfo, EKnockBackType::Radius, false, + dInfo.GetKnockBackPower()); + } + if (x840_25_) + x83c_ += 0.1f; + x840_26_ = true; + } + } else if (TCastToConstPtr weap = mgr.GetObjectById(uid)) { + CDamageInfo info = weap->GetDamageInfo(); + info.SetRadius(0.f); + mgr.ApplyDamage(uid, x790_, weap->GetOwnerId(), info, + CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Solid}, {}), {}); + } + break; + } + case EScriptObjectMessage::Alert: { + x840_26_ = true; + break; + } + case EScriptObjectMessage::Touched: { + break; + } + case EScriptObjectMessage::InitializedInArea: { + break; + } + case EScriptObjectMessage::SuspendedMove: { + if (x764_collisionManager) + x764_collisionManager->SetMovable(mgr, false); + break; + } + default: + break; + } +} +void CMetroidBeta::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const { + CPatterned::AddToRenderer(frustum, mgr); +} +void CMetroidBeta::Render(const CStateManager& mgr) const { CPatterned::Render(mgr); } +const CDamageVulnerability* CMetroidBeta::GetDamageVulnerability() const { return CAi::GetDamageVulnerability(); } +const CDamageVulnerability* CMetroidBeta::GetDamageVulnerability(const zeus::CVector3f& vec1, + const zeus::CVector3f& vec2, + const CDamageInfo& dInfo) const { + return CActor::GetDamageVulnerability(vec1, vec2, dInfo); +} +void CMetroidBeta::Touch(CActor& act, CStateManager& mgr) { CPatterned::Touch(act, mgr); } +zeus::CVector3f CMetroidBeta::GetAimPosition(const CStateManager& mgr, float dt) const { + return CPatterned::GetAimPosition(mgr, dt); +} +void CMetroidBeta::DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType eType, float dt) { + CPatterned::DoUserAnimEvent(mgr, node, eType, dt); +} +const CCollisionPrimitive* CMetroidBeta::GetCollisionPrimitive() const { + return CPhysicsActor::GetCollisionPrimitive(); +} +void CMetroidBeta::CollidedWith(TUniqueId collidee, const CCollisionInfoList& info, CStateManager& mgr) { + CPatterned::CollidedWith(collidee, info, mgr); +} +zeus::CVector3f CMetroidBeta::GetOrigin(const CStateManager& mgr, const CTeamAiRole& role, + const zeus::CVector3f& aimPos) const { + return CAi::GetOrigin(mgr, role, aimPos); +} +void CMetroidBeta::Patrol(CStateManager& mgr, EStateMsg msg, float arg) { CPatterned::Patrol(mgr, msg, arg); } +void CMetroidBeta::PathFind(CStateManager& mgr, EStateMsg msg, float arg) { CPatterned::PathFind(mgr, msg, arg); } +void CMetroidBeta::SelectTarget(CStateManager& mgr, EStateMsg msg, float arg) { CAi::SelectTarget(mgr, msg, arg); } +void CMetroidBeta::TargetPatrol(CStateManager& mgr, EStateMsg msg, float arg) { + CPatterned::TargetPatrol(mgr, msg, arg); +} +void CMetroidBeta::Generate(CStateManager& mgr, EStateMsg msg, float arg) { CAi::Generate(mgr, msg, arg); } +void CMetroidBeta::Attack(CStateManager& mgr, EStateMsg msg, float arg) { CAi::Attack(mgr, msg, arg); } +void CMetroidBeta::TurnAround(CStateManager& mgr, EStateMsg msg, float arg) { CAi::TurnAround(mgr, msg, arg); } +void CMetroidBeta::TelegraphAttack(CStateManager& mgr, EStateMsg msg, float arg) { + CAi::TelegraphAttack(mgr, msg, arg); +} +void CMetroidBeta::WallHang(CStateManager& mgr, EStateMsg msg, float arg) { CAi::WallHang(mgr, msg, arg); } +void CMetroidBeta::SpecialAttack(CStateManager& mgr, EStateMsg msg, float arg) { CAi::SpecialAttack(mgr, msg, arg); } +bool CMetroidBeta::InAttackPosition(CStateManager& mgr, float arg) { return CAi::InAttackPosition(mgr, arg); } +bool CMetroidBeta::Attacked(CStateManager& mgr, float arg) { return CPatterned::Attacked(mgr, arg); } +bool CMetroidBeta::PathShagged(CStateManager& mgr, float arg) { return CPatterned::PathShagged(mgr, arg); } +bool CMetroidBeta::InDetectionRange(CStateManager& mgr, float arg) { return CPatterned::InDetectionRange(mgr, arg); } +bool CMetroidBeta::AnimOver(CStateManager& mgr, float arg) { return CPatterned::AnimOver(mgr, arg); } +bool CMetroidBeta::ShouldAttack(CStateManager& mgr, float arg) { return CAi::ShouldAttack(mgr, arg); } +bool CMetroidBeta::InPosition(CStateManager& mgr, float arg) { return CPatterned::InPosition(mgr, arg); } +bool CMetroidBeta::ShouldTurn(CStateManager& mgr, float arg) { return CAi::ShouldTurn(mgr, arg); } +bool CMetroidBeta::AttackOver(CStateManager& mgr, float arg) { return CAi::AttackOver(mgr, arg); } +bool CMetroidBeta::ShotAt(CStateManager& mgr, float arg) { return CAi::ShotAt(mgr, arg); } +bool CMetroidBeta::ShouldWallHang(CStateManager& mgr, float arg) { return CAi::ShouldWallHang(mgr, arg); } +bool CMetroidBeta::StartAttack(CStateManager& mgr, float arg) { return CAi::StartAttack(mgr, arg); } +bool CMetroidBeta::BreakAttack(CStateManager& mgr, float arg) { return CAi::BreakAttack(mgr, arg); } +bool CMetroidBeta::ShouldSpecialAttack(CStateManager& mgr, float arg) { return CAi::ShouldSpecialAttack(mgr, arg); } void CMetroidBeta::RenderHitGunEffect() const {} void CMetroidBeta::RenderHitBallEffect() const {} +static SSphereJointInfo skPelvisInfo[1] { + {"Pelvis", 1.5f}, +}; +void CMetroidBeta::CreateCollisionActorManager(CStateManager& mgr) { + std::vector joints; + AddSphereJoints(skPelvisInfo, 1, joints); + + x764_collisionManager.reset(new CCollisionActorManager(mgr, GetUniqueId(), GetAreaIdAlways(), joints, false)); + x764_collisionManager->SetActive(mgr, GetActive()); + + for (u32 i = 0; i < x764_collisionManager->GetNumCollisionActors(); ++i) { + const CJointCollisionDescription& desc = x764_collisionManager->GetCollisionDescFromIndex(i); + if (TCastToPtr(mgr.ObjectById(desc.GetCollisionActorId()))) { + if (desc.GetName() == "Pelvis"sv) + x790_ = desc.GetCollisionActorId(); + } + } + + SetCollisionActorHealthAndVulnerability(mgr); + SetMaterialFilter(CMaterialFilter::MakeIncludeExclude( + {EMaterialTypes::Solid, EMaterialTypes::Wall, EMaterialTypes::Floor, EMaterialTypes::Ceiling}, + {EMaterialTypes::CollisionActor, EMaterialTypes::Player, EMaterialTypes::Character})); + AddMaterial(EMaterialTypes::ProjectilePassthrough, mgr); + x764_collisionManager->AddMaterial(mgr, CMaterialList(EMaterialTypes::AIJoint, EMaterialTypes::CameraPassthrough)); +} + +void CMetroidBeta::AddSphereJoints(SSphereJointInfo* sphereJoints, s32 count, + std::vector& joints) { + + for (u32 i = 0; i < count; ++i) { + CSegId id = GetModelData()->GetAnimationData()->GetLocatorSegId(sphereJoints[i].name); + if (id == 0xFF) + continue; + + joints.push_back( + CJointCollisionDescription::SphereCollision(id, sphereJoints[i].radius, sphereJoints[i].name, 1000.0f)); + } +} +void CMetroidBeta::SetCollisionActorHealthAndVulnerability(CStateManager& mgr) { + CHealthInfo* hInfo = HealthInfo(mgr); + if (TCastToPtr colAct = mgr.ObjectById(x790_)) { + *colAct->HealthInfo(mgr) = *hInfo; + colAct->SetDamageVulnerability(*GetDamageVulnerability()); + } +} +void CMetroidBeta::RemoveFromTeam(CStateManager& mgr) { + if (x678_teamMgr == kInvalidUniqueId) + return; + + if (TCastToPtr teamMgr = mgr.ObjectById(x678_teamMgr)) { + if (teamMgr->IsPartOfTeam(GetUniqueId())) + teamMgr->RemoveTeamAiRole(GetUniqueId()); + } +} +void CMetroidBeta::AddToTeam(CStateManager& mgr) { + if (x678_teamMgr == kInvalidUniqueId) + return; + + if (TCastToPtr teamMgr = mgr.ObjectById(x678_teamMgr)) { + if (!teamMgr->IsPartOfTeam(GetUniqueId())) + teamMgr->AssignTeamAiRole(*this, CTeamAiRole::ETeamAiRole::Ranged, CTeamAiRole::ETeamAiRole::Invalid, + CTeamAiRole::ETeamAiRole::Invalid); + } +} } // namespace urde::MP1 diff --git a/Runtime/MP1/World/CMetroidBeta.hpp b/Runtime/MP1/World/CMetroidBeta.hpp index 9261f1105..7b74f27a7 100644 --- a/Runtime/MP1/World/CMetroidBeta.hpp +++ b/Runtime/MP1/World/CMetroidBeta.hpp @@ -1,11 +1,20 @@ #pragma once +#include +#include "World/CPathFindSearch.hpp" #include "World/CPatterned.hpp" -#include "CMetroid.hpp" +#include "CRandom16.hpp" + +namespace urde { +class CElementGen; +class CParticleSwoosh; +class CCollisionActorManager; +} namespace urde::MP1 { class CMetroidBetaData { + friend class CMetroidBeta; CDamageVulnerability x0_; CDamageVulnerability x68_; float xd0_; @@ -28,11 +37,106 @@ public: CMetroidBetaData(CInputStream&); }; class CMetroidBeta : public CPatterned { + s32 x568_progState = -1; + CMetroidBetaData x56c_metroidBetaData; + TUniqueId x678_teamMgr = kInvalidUniqueId; + CPathFindSearch x67c_pathFind; + u8 x760_ = 0xFF; + u8 x761_ = 0xFF; + std::unique_ptr x764_collisionManager; + CCollidableAABox x768_colPrim; + TUniqueId x790_ = kInvalidUniqueId; + float x794_ = 0.f; + float x798_ = 0.f; + float x79c_ = 0.f; + float x7a0_ = 0.f; + float x7a4_ = 0.f; + zeus::CVector3f x7a8_; + zeus::CVector3f x7b4_; + zeus::CVector3f x7c0_; + zeus::CVector3f x7cc_; + float x7d8_ = 0.f; + float x7dc_ = 0.f; + float x7e0_ = 0.f; + TToken x7e4_; + TToken x7f0_; + TToken x7fc_; + TToken x808_; + TToken x814_; + std::unique_ptr x820_; + std::unique_ptr x824_; + std::unique_ptr x828_; + std::unique_ptr x82c_; + std::unique_ptr x830_; + float x834_ = 0.f; + CRandom16 x838_ = CRandom16(1469); + float x83c_; + union { + struct { + bool x840_24_ : 1; + bool x840_25_ : 1; + bool x840_26_ : 1; + bool x840_27_ : 1; + bool x840_28_ : 1; + bool x840_29_ : 1; + bool x840_30_ : 1; + bool x840_31_ : 1; + }; + u32 _dummy = 0; + }; + + void CreateCollisionActorManager(CStateManager& mgr); + void AddSphereJoints(SSphereJointInfo* sphereJoints, s32 count, std::vector& joints); + void SetCollisionActorHealthAndVulnerability(CStateManager& mgr); + void RemoveFromTeam(CStateManager& mgr); + void AddToTeam(CStateManager& mgr); public: DEFINE_PATTERNED(MetroidBeta) CMetroidBeta(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, CModelData&& mData, const CPatternedInfo& pInfo, const CActorParameters& aParms, const CMetroidBetaData& metroidData); + + void Think(float dt, CStateManager& mgr) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override; + void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const override; + void Render(const CStateManager& mgr) const override; + const CDamageVulnerability* GetDamageVulnerability() const override; + const CDamageVulnerability* GetDamageVulnerability(const zeus::CVector3f& vec1, const zeus::CVector3f& vec2, + const CDamageInfo& dInfo) const override; + void Touch(CActor& act, CStateManager& mgr) override; + zeus::CVector3f GetAimPosition(const CStateManager& mgr, float dt) const override; + void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType eType, float dt) override; + const CCollisionPrimitive* GetCollisionPrimitive() const override; + void CollidedWith(TUniqueId collidee, const CCollisionInfoList& info, CStateManager& mgr) override; + bool IsListening() const override { return true; } + zeus::CVector3f GetOrigin(const CStateManager& mgr, const CTeamAiRole& role, + const zeus::CVector3f& aimPos) const override; + void Patrol(CStateManager& mgr, EStateMsg msg, float arg) override; + void PathFind(CStateManager& mgr, EStateMsg msg, float arg) override; + void SelectTarget(CStateManager& mgr, EStateMsg msg, float arg) override; + void TargetPatrol(CStateManager& mgr, EStateMsg msg, float arg) override; + void Generate(CStateManager& mgr, EStateMsg msg, float arg) override; + void Attack(CStateManager& mgr, EStateMsg msg, float arg) override; + void TurnAround(CStateManager& mgr, EStateMsg msg, float arg) override; + void TelegraphAttack(CStateManager& mgr, EStateMsg msg, float arg) override; + void WallHang(CStateManager& mgr, EStateMsg msg, float arg) override; + void SpecialAttack(CStateManager& mgr, EStateMsg msg, float arg) override; + bool InAttackPosition(CStateManager& mgr, float arg) override; + bool Attacked(CStateManager& mgr, float arg) override; + bool PathShagged(CStateManager& mgr, float arg) override; + bool InDetectionRange(CStateManager& mgr, float arg) override; + bool AnimOver(CStateManager& mgr, float arg) override; + bool ShouldAttack(CStateManager& mgr, float arg) override; + bool InPosition(CStateManager& mgr, float arg) override; + bool ShouldTurn(CStateManager& mgr, float arg) override; + bool AttackOver(CStateManager& mgr, float arg) override; + bool ShotAt(CStateManager& mgr, float arg) override; + bool ShouldWallHang(CStateManager& mgr, float arg) override; + bool StartAttack(CStateManager& mgr, float arg) override; + bool BreakAttack(CStateManager& mgr, float arg) override; + bool ShouldSpecialAttack(CStateManager& mgr, float arg) override; + CPathFindSearch* GetSearchPath() override { return &x67c_pathFind; } + void RenderHitGunEffect() const; void RenderHitBallEffect() const; }; diff --git a/Runtime/MP1/World/CRipper.cpp b/Runtime/MP1/World/CRipper.cpp index 6ba8679b6..775862024 100644 --- a/Runtime/MP1/World/CRipper.cpp +++ b/Runtime/MP1/World/CRipper.cpp @@ -1,9 +1,144 @@ #include "MP1/World/CRipper.hpp" +#include "Collision/CCollidableOBBTreeGroup.hpp" +#include "Weapon/CPlayerGun.hpp" +#include "World/CActorParameters.hpp" +#include "World/CPlayer.hpp" +#include "World/CScriptGrapplePoint.hpp" +#include "CStateManager.hpp" +#include "TCastTo.hpp" namespace urde::MP1 { CRipper::CRipper(TUniqueId uid, std::string_view name, EFlavorType type, const CEntityInfo& info, - const zeus::CTransform& xf, CModelData&& mData, const CPatternedInfo& pInfo, const CActorParameters& actParms, - const CGrappleParameters& grappleParms) + const zeus::CTransform& xf, CModelData&& mData, const CPatternedInfo& pInfo, + const CActorParameters& actParms, const CGrappleParameters& grappleParms) : CPatterned(ECharacter::Ripper, uid, name, type, info, xf, std::move(mData), pInfo, EMovementType::Flyer, - EColliderType::One, EBodyType::Flyer, actParms, EKnockBackVariant::Medium) {} + EColliderType::One, EBodyType::Flyer, actParms, EKnockBackVariant::Medium) +, x568_grappleParams(grappleParms) +, x59c_24_muted(false) { + SetMaterialFilter(CMaterialFilter::MakeIncludeExclude( + {EMaterialTypes::Solid}, + {EMaterialTypes::NoStaticCollision, EMaterialTypes::NoPlatformCollision, EMaterialTypes::Platform})); + x460_knockBackController.SetAutoResetImpulse(false); + x460_knockBackController.SetAnimationStateRange(EKnockBackAnimationState::KnockBack, + EKnockBackAnimationState::Hurled); +} + +void CRipper::Think(float dt, CStateManager& mgr) { + + if (!GetActive()) + return; + + ProcessGrapplePoint(mgr); + const CPlayer& pl = mgr.GetPlayer(); + CGrappleArm::EArmState armState = pl.GetPlayerGun()->GetGrappleArm().GetAnimState(); + if (x598_grapplePoint == kInvalidUniqueId || pl.GetOrbitTargetId() != x598_grapplePoint || + pl.GetGrappleState() == CPlayer::EGrappleState::None) { + CPatterned::Think(dt, mgr); + if (x59c_24_muted) { + SetMuted(false); + x59c_24_muted = false; + } + } else { + if (armState == CGrappleArm::EArmState::FireGrapple) { + CPatterned::Think(dt, mgr); + } else if (armState == CGrappleArm::EArmState::IntoGrappleIdle || armState == CGrappleArm::EArmState::Three) { + Stop(); + if (!x59c_24_muted) { + SetMuted(true); + x59c_24_muted = true; + } + } + } + CPatterned::Think(dt, mgr); +} + +void CRipper::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) { + CPatterned::AcceptScriptMsg(msg, uid, mgr); + + switch (msg) { + case EScriptObjectMessage::Deleted: + case EScriptObjectMessage::Deactivate: { + RemoveGrapplePoint(mgr); + RemovePlatform(mgr); + break; + } + case EScriptObjectMessage::Activate: { + AddGrapplePoint(mgr); + AddPlatform(mgr); + break; + } + case EScriptObjectMessage::Registered: { + x450_bodyController->Activate(mgr); + AddMaterial(EMaterialTypes::Immovable, mgr); + RemoveMaterial(EMaterialTypes::Solid, mgr); + if (x3fc_flavor != EFlavorType::One) { + AddGrapplePoint(mgr); + RemoveMaterial(EMaterialTypes::Orbit, mgr); + } + + AddPlatform(mgr); + break; + } + default: + break; + } +} +void CRipper::KnockBack(const zeus::CVector3f& dir, CStateManager& mgr, const CDamageInfo& dInfo, EKnockBackType kb, + bool inDeferred, float mag) { + CPatterned::KnockBack(dir, mgr, dInfo, kb, inDeferred, mag); +} +void CRipper::Patrol(CStateManager& mgr, EStateMsg msg, float arg) { + x450_bodyController->GetCommandMgr().SetSteeringBlendMode(ESteeringBlendMode::FullSpeed); + x450_bodyController->GetCommandMgr().SetSteeringSpeedRange(1.f, 1.f); + CPatterned::Patrol(mgr, msg, arg); +} + +void CRipper::ProcessGrapplePoint(CStateManager& mgr) { + if (x3fc_flavor == EFlavorType::One || x598_grapplePoint == kInvalidUniqueId) + return; + + if (TCastToPtr gp = mgr.ObjectById(x598_grapplePoint)) { + gp->SetTransform(GetTransform()); + } +} + +void CRipper::AddGrapplePoint(CStateManager& mgr) { + if (x598_grapplePoint != kInvalidUniqueId) + return; + + x598_grapplePoint = mgr.AllocateUniqueId(); + mgr.AddObject(new CScriptGrapplePoint(x59a_platformId, "RipperGrapplePoint"sv, + CEntityInfo(GetAreaIdAlways(), NullConnectionList), GetTransform(), true, x568_grappleParams)); +} + +void CRipper::RemoveGrapplePoint(CStateManager& mgr) { + if (x598_grapplePoint == kInvalidUniqueId) + return; + mgr.FreeScriptObject(x598_grapplePoint); +} + +void CRipper::AddPlatform(CStateManager& mgr) { + if (x59a_platformId != kInvalidUniqueId) + return; + + x59a_platformId = mgr.AllocateUniqueId(); + const zeus::CAABox bounds = GetModelData()->GetBounds(GetTransform().getRotation()); + + mgr.AddObject(new CRipperControlledPlatform(x59a_platformId, GetUniqueId(), "Ripper Controlled Platform"sv, + CEntityInfo(GetAreaIdAlways(), NullConnectionList), GetTransform(), bounds, GetActive(), {})); +} + +void CRipper::RemovePlatform(CStateManager& mgr) { + if (x59a_platformId == kInvalidUniqueId) + return; + mgr.FreeScriptObject(x59a_platformId); + x59a_platformId = kInvalidUniqueId; +} +CRipperControlledPlatform::CRipperControlledPlatform( + TUniqueId uid, TUniqueId owner, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, + const zeus::CAABox& bounds, bool active, const std::optional>& colTree) +: CScriptPlatform(uid, name, info, xf, CModelData::CModelDataNull(), CActorParameters::None(), bounds, 0.f, false, 1.f, + active, CHealthInfo(FLT_MAX, 10.f), CDamageVulnerability::ImmuneVulnerabilty(), colTree, 0, 1, 1) +, x358_owner(owner) +, x35c_yaw(GetYaw()) {} } \ No newline at end of file diff --git a/Runtime/MP1/World/CRipper.hpp b/Runtime/MP1/World/CRipper.hpp index 297a4f938..f928a9fc7 100644 --- a/Runtime/MP1/World/CRipper.hpp +++ b/Runtime/MP1/World/CRipper.hpp @@ -2,13 +2,47 @@ #include "World/CPatterned.hpp" #include "World/CGrappleParameters.hpp" +#include "World/CScriptPlatform.hpp" namespace urde::MP1 { + class CRipper : public CPatterned { + CGrappleParameters x568_grappleParams; + TUniqueId x598_grapplePoint = kInvalidUniqueId; + TUniqueId x59a_platformId = kInvalidUniqueId; + bool x59c_24_muted : 1; + + void ProcessGrapplePoint(CStateManager&); + void AddGrapplePoint(CStateManager&); + void RemoveGrapplePoint(CStateManager&); + void AddPlatform(CStateManager&); + void RemovePlatform(CStateManager&); public: DEFINE_PATTERNED(Ripper) CRipper(TUniqueId uid, std::string_view name, EFlavorType type, const CEntityInfo& info, const zeus::CTransform& xf, CModelData&& mData, const CPatternedInfo& pInfo, const CActorParameters& actParms, const CGrappleParameters& grappleParms); + + void Think(float dt, CStateManager& mgr) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override; + EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&, + const CWeaponMode& wp, EProjectileAttrib) const override { + if (!GetDamageVulnerability()->WeaponHits(wp, false)) + return EWeaponCollisionResponseTypes::Unknown82; + + return EWeaponCollisionResponseTypes::Unknown32; + } + + void KnockBack(const zeus::CVector3f&, CStateManager&, const CDamageInfo&, EKnockBackType, bool, float) override; + void Patrol(CStateManager&, EStateMsg, float) override; + bool PathOver(CStateManager&, float) override { return false; } /* They never give you up, or let you down */ +}; + +class CRipperControlledPlatform : public CScriptPlatform { + TUniqueId x358_owner; + float x35c_yaw; +public: + CRipperControlledPlatform(TUniqueId, TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, + const zeus::CAABox&, bool, const std::optional>&); }; } \ No newline at end of file diff --git a/Runtime/Weapon/CPlayerGun.cpp b/Runtime/Weapon/CPlayerGun.cpp index 49bc27459..080863948 100644 --- a/Runtime/Weapon/CPlayerGun.cpp +++ b/Runtime/Weapon/CPlayerGun.cpp @@ -1,5 +1,6 @@ -#include -#include +#include "MP1/World/CMetroidBeta.hpp" +#include "MP1/World/CMetroid.hpp" +#include "MP1/CSamusHud.hpp" #include "CSimplePool.hpp" #include "Character/CPrimitive.hpp" #include "CEnergyProjectile.hpp" From 7eb3bce499934c58bbb7ab0454be10eb23bfb6c4 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Tue, 13 Aug 2019 14:41:15 -0700 Subject: [PATCH 20/65] Update submodules, more CMetroidBeta imps --- Runtime/MP1/World/CMetroidBeta.cpp | 25 ++++++++++++++++++++++++- hecl | 2 +- kabufuda | 2 +- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/Runtime/MP1/World/CMetroidBeta.cpp b/Runtime/MP1/World/CMetroidBeta.cpp index dcbf1c0ab..3dffdc048 100644 --- a/Runtime/MP1/World/CMetroidBeta.cpp +++ b/Runtime/MP1/World/CMetroidBeta.cpp @@ -5,10 +5,12 @@ #include "Particle/CElementGen.hpp" #include "Particle/CParticleSwoosh.hpp" #include "Weapon/CGameProjectile.hpp" +#include "World/CGameArea.hpp" #include "World/CPatternedInfo.hpp" #include "World/CPlayer.hpp" #include "World/ScriptLoader.hpp" #include "World/CTeamAiMgr.hpp" +#include "World/CWorld.hpp" #include "CStateManager.hpp" #include "GameGlobalObjects.hpp" @@ -134,9 +136,28 @@ void CMetroidBeta::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CSta break; } case EScriptObjectMessage::Touched: { + if (TCastToConstPtr colAct = mgr.GetObjectById(uid)) { + if (HealthInfo(mgr)->GetHP() > 0.f && colAct->GetLastTouchedObject() == mgr.GetPlayer().GetUniqueId() && + x420_curDamageRemTime <= 0.f) { + CDamageInfo dInfo = GetContactDamage(); + dInfo.SetDamage(0.5f * dInfo.GetDamage()); + if (x840_29_ && x840_30_) + dInfo = GetContactDamage(); + + mgr.ApplyDamage(GetUniqueId(), mgr.GetPlayer().GetUniqueId(), GetUniqueId(), dInfo, + CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Solid}, {}), {}); + + x420_curDamageRemTime = x424_damageWaitTime; + x840_30_ = false; + } + } break; } case EScriptObjectMessage::InitializedInArea: { + if (x678_teamMgr == kInvalidUniqueId) + x678_teamMgr = CTeamAiMgr::GetTeamAiMgr(*this, mgr); + + x67c_pathFind.SetArea(mgr.GetWorld()->GetAreaAlways(GetAreaId())->GetPostConstructed()->x10bc_pathArea); break; } case EScriptObjectMessage::SuspendedMove: { @@ -181,7 +202,9 @@ void CMetroidBeta::SelectTarget(CStateManager& mgr, EStateMsg msg, float arg) { void CMetroidBeta::TargetPatrol(CStateManager& mgr, EStateMsg msg, float arg) { CPatterned::TargetPatrol(mgr, msg, arg); } -void CMetroidBeta::Generate(CStateManager& mgr, EStateMsg msg, float arg) { CAi::Generate(mgr, msg, arg); } +void CMetroidBeta::Generate(CStateManager& mgr, EStateMsg msg, float arg) { + CAi::Generate(mgr, msg, arg); +} void CMetroidBeta::Attack(CStateManager& mgr, EStateMsg msg, float arg) { CAi::Attack(mgr, msg, arg); } void CMetroidBeta::TurnAround(CStateManager& mgr, EStateMsg msg, float arg) { CAi::TurnAround(mgr, msg, arg); } void CMetroidBeta::TelegraphAttack(CStateManager& mgr, EStateMsg msg, float arg) { diff --git a/hecl b/hecl index 298803aac..a3b44da04 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 298803aac4d4797c439c97f036ad6ff566de8bd6 +Subproject commit a3b44da040e60a453f82005523810f38dabc3f1e diff --git a/kabufuda b/kabufuda index dc436ffb3..f57d8cf76 160000 --- a/kabufuda +++ b/kabufuda @@ -1 +1 @@ -Subproject commit dc436ffb320b1028b49ef2f6934317f8e409ae78 +Subproject commit f57d8cf76187e0444e232b557e709fca161c64a9 From 09f917a9aa993fcb11db17783830dbe1cd43f54a Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Aug 2019 01:57:13 -0400 Subject: [PATCH 21/65] Runtime/Weapon/CGameProjectile: Fix misnamed virtual function This has a vaguely equivalent name to FluidFXThink (which has an uppercase X). Given this function isn't explicitly called anywhere directly, this is assumed to be a typo. --- Runtime/Weapon/CGameProjectile.cpp | 2 +- Runtime/Weapon/CGameProjectile.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtime/Weapon/CGameProjectile.cpp b/Runtime/Weapon/CGameProjectile.cpp index 9e545cc17..8e34e6d0f 100644 --- a/Runtime/Weapon/CGameProjectile.cpp +++ b/Runtime/Weapon/CGameProjectile.cpp @@ -229,7 +229,7 @@ void CGameProjectile::ApplyDamageToActors(CStateManager& mgr, const CDamageInfo& x2d0_touchResults.clear(); } -void CGameProjectile::FluidFxThink(EFluidState state, CScriptWater& water, CStateManager& mgr) { +void CGameProjectile::FluidFXThink(EFluidState state, CScriptWater& water, CStateManager& mgr) { if (x170_projectile.GetWeaponDescription()->xa6_SWTR) CWeapon::FluidFXThink(state, water, mgr); } diff --git a/Runtime/Weapon/CGameProjectile.hpp b/Runtime/Weapon/CGameProjectile.hpp index 1699b51bd..c62d2b3df 100644 --- a/Runtime/Weapon/CGameProjectile.hpp +++ b/Runtime/Weapon/CGameProjectile.hpp @@ -72,7 +72,7 @@ public: void UpdateProjectileMovement(float dt, CStateManager& mgr); CRayCastResult DoCollisionCheck(TUniqueId& idOut, CStateManager& mgr); void ApplyDamageToActors(CStateManager& mgr, const CDamageInfo& dInfo); - void FluidFxThink(EFluidState state, CScriptWater& water, CStateManager& mgr); + void FluidFXThink(EFluidState state, CScriptWater& water, CStateManager& mgr) override; CRayCastResult RayCollisionCheckWithWorld(TUniqueId& idOut, const zeus::CVector3f& start, const zeus::CVector3f& end, float mag, const rstl::reserved_vector& nearList, CStateManager& mgr); From e9e9de26b27615e7a44a7b8f45744095fa65aaa9 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Aug 2019 02:07:00 -0400 Subject: [PATCH 22/65] Runtime/Input/CFinalInput: Correct return value of AKey, ASpecialKey and AMouseButton The other A-prefixed functions all return a float value, however these are truncating float values to bool. We can amend this to prevent potential compilation warnings. --- Runtime/Input/CFinalInput.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Runtime/Input/CFinalInput.hpp b/Runtime/Input/CFinalInput.hpp index 6de7aee78..bfa49f5a3 100644 --- a/Runtime/Input/CFinalInput.hpp +++ b/Runtime/Input/CFinalInput.hpp @@ -159,9 +159,9 @@ struct CFinalInput { bool DKey(char k) const { return m_kbm && m_kbm->m_charKeys[int(k)]; } bool DSpecialKey(boo::ESpecialKey k) const { return m_kbm && m_kbm->m_specialKeys[int(k)]; } bool DMouseButton(boo::EMouseButton k) const { return m_kbm && m_kbm->m_mouseButtons[int(k)]; } - bool AKey(char k) const { return DKey(k) ? 1.f : 0.f; } - bool ASpecialKey(boo::ESpecialKey k) const { return DSpecialKey(k) ? 1.f : 0.f; } - bool AMouseButton(boo::EMouseButton k) const { return DMouseButton(k) ? 1.f : 0.f; } + float AKey(char k) const { return DKey(k) ? 1.f : 0.f; } + float ASpecialKey(boo::ESpecialKey k) const { return DSpecialKey(k) ? 1.f : 0.f; } + float AMouseButton(boo::EMouseButton k) const { return DMouseButton(k) ? 1.f : 0.f; } const std::optional& GetKBM() const { return m_kbm; } }; From 27a8274e3bcb978b2f1f8e5bdd456d9a02926bab Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Aug 2019 02:10:07 -0400 Subject: [PATCH 23/65] Runtime/Input/CFinalInput: Make comparison operators const While we're at it, we can also provide an inequality operator for logical symmetry. --- Runtime/Input/CFinalInput.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Runtime/Input/CFinalInput.hpp b/Runtime/Input/CFinalInput.hpp index bfa49f5a3..b4f6a3645 100644 --- a/Runtime/Input/CFinalInput.hpp +++ b/Runtime/Input/CFinalInput.hpp @@ -72,8 +72,12 @@ struct CFinalInput { CFinalInput(int cIdx, float dt, const boo::DolphinControllerState& data, const CFinalInput& prevInput, float leftDiv, float rightDiv); CFinalInput(int cIdx, float dt, const CKeyboardMouseControllerData& data, const CFinalInput& prevInput); + CFinalInput& operator|=(const CFinalInput& other); - bool operator==(const CFinalInput& other) { return memcmp(this, &other, sizeof(CFinalInput)) == 0; } + + bool operator==(const CFinalInput& other) const { return memcmp(this, &other, sizeof(CFinalInput)) == 0; } + bool operator!=(const CFinalInput& other) const { return !operator==(other); } + float DeltaTime() const { return x0_dt; } u32 ControllerIdx() const { return x4_controllerIdx; } From acb9ac92e72dd9270dde93fe042d394db126018d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Aug 2019 02:49:40 -0400 Subject: [PATCH 24/65] Runtime/CGameOptions: Use std::array where applicable Makes the data a little more strongly typed; preventing implicit array->pointer decay. It also allows simplifying assignments within the CGameState code. While we're at it, we can also eliminate several instances of magic numbers related to the array sizes throughout the code. --- Runtime/CGameOptions.cpp | 89 ++++++++++++++++++++++--------------- Runtime/CGameOptions.hpp | 12 ++--- Runtime/CGameState.cpp | 4 +- Runtime/MP1/CFrontEndUI.cpp | 6 +-- 4 files changed, 64 insertions(+), 47 deletions(-) diff --git a/Runtime/CGameOptions.cpp b/Runtime/CGameOptions.cpp index e68fccd0b..fc25446cf 100644 --- a/Runtime/CGameOptions.cpp +++ b/Runtime/CGameOptions.cpp @@ -15,42 +15,51 @@ namespace urde { -static const SGameOption VisorOpts[] = { +constexpr std::array VisorOpts{{ {EGameOption::VisorOpacity, 21, 0.f, 255.f, 1.f, EOptionType::Float}, {EGameOption::HelmetOpacity, 22, 0.f, 255.f, 1.f, EOptionType::Float}, {EGameOption::HUDLag, 23, 0.f, 1.f, 1.f, EOptionType::DoubleEnum}, {EGameOption::HintSystem, 24, 0.f, 1.f, 1.f, EOptionType::DoubleEnum}, - {EGameOption::RestoreDefaults, 35, 0.f, 1.f, 1.f, EOptionType::RestoreDefaults}}; + {EGameOption::RestoreDefaults, 35, 0.f, 1.f, 1.f, EOptionType::RestoreDefaults}, +}}; -static const SGameOption DisplayOpts[] = { +constexpr std::array DisplayOpts{{ //{EGameOption::ScreenBrightness, 25, 0.f, 8.f, 1.f, EOptionType::Float}, {EGameOption::ScreenBrightness, 25, -100.f, 100.f, 1.f, EOptionType::Float}, {EGameOption::ScreenOffsetX, 26, -30.f, 30.f, 1.f, EOptionType::Float}, {EGameOption::ScreenOffsetY, 27, -30.f, 30.f, 1.f, EOptionType::Float}, {EGameOption::ScreenStretch, 28, -10.f, 10.f, 1.f, EOptionType::Float}, - {EGameOption::RestoreDefaults, 35, 0.f, 1.f, 1.f, EOptionType::RestoreDefaults}}; + {EGameOption::RestoreDefaults, 35, 0.f, 1.f, 1.f, EOptionType::RestoreDefaults}, +}}; -static const SGameOption SoundOpts[] = { +constexpr std::array SoundOpts{{ {EGameOption::SFXVolume, 29, 0.f, 127.f, 1.f, EOptionType::Float}, {EGameOption::MusicVolume, 30, 0.f, 127.f, 1.f, EOptionType::Float}, {EGameOption::SoundMode, 31, 0.f, 1.f, 1.f, EOptionType::TripleEnum}, - {EGameOption::RestoreDefaults, 35, 0.f, 1.f, 1.f, EOptionType::RestoreDefaults}}; + {EGameOption::RestoreDefaults, 35, 0.f, 1.f, 1.f, EOptionType::RestoreDefaults}, +}}; -static const SGameOption ControllerOpts[] = { +constexpr std::array ControllerOpts{{ {EGameOption::ReverseYAxis, 32, 0.f, 1.f, 1.f, EOptionType::DoubleEnum}, {EGameOption::Rumble, 33, 0.f, 1.f, 1.f, EOptionType::DoubleEnum}, {EGameOption::SwapBeamControls, 34, 0.f, 1.f, 1.f, EOptionType::DoubleEnum}, - {EGameOption::RestoreDefaults, 35, 0.f, 1.f, 1.f, EOptionType::RestoreDefaults}}; + {EGameOption::RestoreDefaults, 35, 0.f, 1.f, 1.f, EOptionType::RestoreDefaults}, +}}; -const std::pair GameOptionsRegistry[] = { - {5, VisorOpts}, {5, DisplayOpts}, {4, SoundOpts}, {4, ControllerOpts}, {0, nullptr}}; +const std::array, 5> GameOptionsRegistry{{ + {VisorOpts.size(), VisorOpts.data()}, + {DisplayOpts.size(), DisplayOpts.data()}, + {SoundOpts.size(), SoundOpts.data()}, + {ControllerOpts.size(), ControllerOpts.data()}, + {0, nullptr}, +}}; CPersistentOptions::CPersistentOptions(CBitStreamReader& stream) { - for (int b = 0; b < 98; ++b) - x0_nesState[b] = stream.ReadEncoded(8); + for (u8& entry : x0_nesState) + entry = stream.ReadEncoded(8); - for (int b = 0; b < 64; ++b) - x68_[b] = stream.ReadEncoded(8); + for (bool& entry : x68_) + entry = stream.ReadEncoded(8); xc0_frozenFpsCount = stream.ReadEncoded(2); xc4_frozenBallCount = stream.ReadEncoded(2); @@ -89,11 +98,11 @@ CPersistentOptions::CPersistentOptions(CBitStreamReader& stream) { } void CPersistentOptions::PutTo(CBitStreamWriter& w) const { - for (int b = 0; b < 98; ++b) - w.WriteEncoded(x0_nesState[b], 8); + for (const u8 entry : x0_nesState) + w.WriteEncoded(entry, 8); - for (int b = 0; b < 64; ++b) - w.WriteEncoded(x68_[b], 8); + for (const bool entry : x68_) + w.WriteEncoded(entry, 8); w.WriteEncoded(xc0_frozenFpsCount, 2); w.WriteEncoded(xc4_frozenBallCount, 2); @@ -138,8 +147,8 @@ void CPersistentOptions::SetCinematicState(CAssetId mlvlId, TEditorId cineId, bo } CGameOptions::CGameOptions(CBitStreamReader& stream) { - for (int b = 0; b < 64; ++b) - x0_[b] = stream.ReadEncoded(8); + for (u8& entry : x0_) + entry = stream.ReadEncoded(8); x44_soundMode = CAudioSys::ESurroundModes(stream.ReadEncoded(2)); x48_screenBrightness = stream.ReadEncoded(4); @@ -179,8 +188,8 @@ void CGameOptions::ResetToDefaults() { } void CGameOptions::PutTo(CBitStreamWriter& writer) const { - for (int b = 0; b < 64; ++b) - writer.WriteEncoded(x0_[b], 8); + for (const u8 entry : x0_) + writer.WriteEncoded(entry, 8); writer.WriteEncoded(u32(x44_soundMode), 2); writer.WriteEncoded(x48_screenBrightness, 4); @@ -311,15 +320,21 @@ void CGameOptions::SetControls(int controls) { ResetControllerAssets(controls); } -static const std::pair CStickToDPadRemap[] = { - {0x2A13C23E, 0xF13452F8}, {0xA91A7703, 0xC042EC91}, {0x12A12131, 0x5F556002}, - {0xA9798329, 0xB306E26F}, {0xCD7B1ACA, 0x8ADA8184}, -}; +const std::array, 5> CStickToDPadRemap{{ + {0x2A13C23E, 0xF13452F8}, + {0xA91A7703, 0xC042EC91}, + {0x12A12131, 0x5F556002}, + {0xA9798329, 0xB306E26F}, + {0xCD7B1ACA, 0x8ADA8184}, +}}; -static const std::pair CStickOutlineToDPadRemap[] = { - {0x1A29C0E6, 0xF13452F8}, {0x5D9F9796, 0xC042EC91}, {0x951546A8, 0x5F556002}, - {0x7946C4C5, 0xB306E26F}, {0x409AA72E, 0x8ADA8184}, -}; +const std::array, 5> CStickOutlineToDPadRemap{{ + {0x1A29C0E6, 0xF13452F8}, + {0x5D9F9796, 0xC042EC91}, + {0x951546A8, 0x5F556002}, + {0x7946C4C5, 0xB306E26F}, + {0x409AA72E, 0x8ADA8184}, +}}; static std::pair TranslatePairToNew(const std::pair& p) { return {g_ResFactory->TranslateOriginalToNew(p.first), g_ResFactory->TranslateOriginalToNew(p.second)}; @@ -331,13 +346,13 @@ void CGameOptions::ResetControllerAssets(int controls) { } else if (x6c_controlTxtrMap.empty()) { x6c_controlTxtrMap.reserve(15); - for (int i = 0; i < 5; ++i) { - x6c_controlTxtrMap.push_back(TranslatePairToNew(CStickToDPadRemap[i])); - x6c_controlTxtrMap.push_back({x6c_controlTxtrMap.back().second, x6c_controlTxtrMap.back().first}); + for (const auto& entry : CStickToDPadRemap) { + const auto& emplaced = x6c_controlTxtrMap.emplace_back(TranslatePairToNew(entry)); + x6c_controlTxtrMap.emplace_back(emplaced.second, emplaced.first); } - for (int i = 0; i < 5; ++i) - x6c_controlTxtrMap.push_back(TranslatePairToNew(CStickOutlineToDPadRemap[i])); + for (const auto& entry : CStickOutlineToDPadRemap) + x6c_controlTxtrMap.emplace_back(TranslatePairToNew(entry)); std::sort(x6c_controlTxtrMap.begin(), x6c_controlTxtrMap.end(), [](const std::pair& a, const std::pair& b) { @@ -365,8 +380,8 @@ void CGameOptions::EnsureSettings() { void CGameOptions::TryRestoreDefaults(const CFinalInput& input, int category, int option, bool frontend, bool forceRestore) { - const std::pair& options = GameOptionsRegistry[category]; - if (!options.first) + const auto& options = GameOptionsRegistry[category]; + if (options.first == 0) return; if (options.second[option].option != EGameOption::RestoreDefaults) diff --git a/Runtime/CGameOptions.hpp b/Runtime/CGameOptions.hpp index 52cd17f3f..6e2ebff13 100644 --- a/Runtime/CGameOptions.hpp +++ b/Runtime/CGameOptions.hpp @@ -1,5 +1,6 @@ #pragma once +#include #include "RetroTypes.hpp" #include "Audio/CAudioSys.hpp" #include "CSaveWorld.hpp" @@ -39,13 +40,13 @@ struct SGameOption { }; /** Static registry of Option UI presentation information */ -extern const std::pair GameOptionsRegistry[]; +extern const std::array, 5> GameOptionsRegistry; /** Options tracked persistently between game sessions */ class CPersistentOptions { friend class CGameState; - u8 x0_nesState[98] = {}; - bool x68_[64] = {}; + std::array x0_nesState{}; + std::array x68_{}; std::vector> xac_cinematicStates; /* (MLVL, Cinematic) */ u32 xbc_autoMapperKeyState = 0; u32 xc0_frozenFpsCount = 0; @@ -96,12 +97,13 @@ public: void PutTo(CBitStreamWriter& w) const; - u8* GetNESState() { return x0_nesState; } + u8* GetNESState() { return x0_nesState.data(); } + const u8* GetNESState() const { return x0_nesState.data(); } }; /** Options tracked per game session */ class CGameOptions { - u8 x0_[64] = {}; + std::array x0_{}; CAudioSys::ESurroundModes x44_soundMode = CAudioSys::ESurroundModes::Stereo; u32 x48_screenBrightness = 4; s32 x4c_screenXOffset = 0; diff --git a/Runtime/CGameState.cpp b/Runtime/CGameState.cpp index 5548d92ee..933a6e5f4 100644 --- a/Runtime/CGameState.cpp +++ b/Runtime/CGameState.cpp @@ -179,7 +179,7 @@ void CGameState::ImportPersistentOptions(const CPersistentOptions& opts) { if (opts.xd0_27_fusionBeat) xa8_systemOptions.xd0_27_fusionBeat = true; if (&opts != &xa8_systemOptions) - memcpy(xa8_systemOptions.x0_nesState, opts.x0_nesState, 98); + xa8_systemOptions.x0_nesState = opts.x0_nesState; xa8_systemOptions.SetLogScanPercent(opts.GetLogScanPercent()); xa8_systemOptions.SetAllItemsCollected(opts.GetAllItemsCollected()); xa8_systemOptions.SetPlayerBeatNormalMode(opts.GetPlayerBeatNormalMode()); @@ -192,7 +192,7 @@ void CGameState::ExportPersistentOptions(CPersistentOptions& opts) const { if (xa8_systemOptions.xd0_27_fusionBeat) opts.xd0_27_fusionBeat = true; if (&opts != &xa8_systemOptions) - memcpy(opts.x0_nesState, xa8_systemOptions.x0_nesState, 98); + opts.x0_nesState = xa8_systemOptions.x0_nesState; opts.SetPlayerFusionSuitActive(xa8_systemOptions.GetPlayerFusionSuitActive()); } diff --git a/Runtime/MP1/CFrontEndUI.cpp b/Runtime/MP1/CFrontEndUI.cpp index 699f06bc0..bbcbecdac 100644 --- a/Runtime/MP1/CFrontEndUI.cpp +++ b/Runtime/MP1/CFrontEndUI.cpp @@ -1502,12 +1502,12 @@ void CFrontEndUI::SOptionsFrontEndFrame::HandleRightSelectionChange() { } void CFrontEndUI::SOptionsFrontEndFrame::SetRightUIText() { - int userSel = x24_tablegroup_leftmenu->GetUserSelection(); - const std::pair& options = GameOptionsRegistry[userSel]; + const int userSel = x24_tablegroup_leftmenu->GetUserSelection(); + const auto& options = GameOptionsRegistry[userSel]; for (int i = 0; i < 5; ++i) { std::string name = fmt::format(fmt("textpane_right{}"), i); - if (i < options.first) { + if (i < static_cast(options.first)) { FindTextPanePair(x1c_loadedFrame, name.c_str()).SetPairText( x20_loadedPauseStrg->GetString(options.second[i].stringId)); x28_tablegroup_rightmenu->GetWorkerWidget(i)->SetIsSelectable(true); From 8b7945e76fe13aab0787cc3f7d747558d8e6caaf Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Aug 2019 03:45:28 -0400 Subject: [PATCH 25/65] MP1: Migrate from std::bind to lambdas Provides a more straightforward means of supplying custom behavior in place. Lambdas also typically optimize better compared to std::bind objects. --- Runtime/MP1/CFrontEndUI.cpp | 52 ++++++++++++++------------------ Runtime/MP1/CGBASupport.cpp | 6 ++-- Runtime/MP1/COptionsScreen.cpp | 6 ++-- Runtime/MP1/CPauseScreen.cpp | 8 ++--- Runtime/MP1/CPauseScreenBase.cpp | 22 ++++++-------- Runtime/MP1/CQuitGameScreen.cpp | 7 ++--- Runtime/MP1/CSaveGameScreen.cpp | 4 +-- Runtime/MP1/MP1.cpp | 42 +++++++++++++++----------- 8 files changed, 70 insertions(+), 77 deletions(-) diff --git a/Runtime/MP1/CFrontEndUI.cpp b/Runtime/MP1/CFrontEndUI.cpp index 699f06bc0..a473c2a85 100644 --- a/Runtime/MP1/CFrontEndUI.cpp +++ b/Runtime/MP1/CFrontEndUI.cpp @@ -97,19 +97,15 @@ void CFrontEndUI::SNewFileSelectFrame::FinishedLoading() { worker->SetIsSelectable(false); worker->SetVisibility(false, ETraversalMode::Children); - x20_tablegroup_fileselect->SetMenuAdvanceCallback( - std::bind(&SNewFileSelectFrame::DoFileMenuAdvance, this, std::placeholders::_1)); + x20_tablegroup_fileselect->SetMenuAdvanceCallback([this](CGuiTableGroup* caller) { DoFileMenuAdvance(caller); }); x20_tablegroup_fileselect->SetMenuSelectionChangeCallback( - std::bind(&SNewFileSelectFrame::DoSelectionChange, this, std::placeholders::_1, std::placeholders::_2)); - x20_tablegroup_fileselect->SetMenuCancelCallback( - std::bind(&SNewFileSelectFrame::DoFileMenuCancel, this, std::placeholders::_1)); + [this](CGuiTableGroup* caller, int oldSel) { DoSelectionChange(caller, oldSel); }); + x20_tablegroup_fileselect->SetMenuCancelCallback([this](CGuiTableGroup* caller) { DoFileMenuCancel(caller); }); - x40_tablegroup_popup->SetMenuAdvanceCallback( - std::bind(&SNewFileSelectFrame::DoPopupAdvance, this, std::placeholders::_1)); + x40_tablegroup_popup->SetMenuAdvanceCallback([this](CGuiTableGroup* caller) { DoPopupAdvance(caller); }); x40_tablegroup_popup->SetMenuSelectionChangeCallback( - std::bind(&SNewFileSelectFrame::DoSelectionChange, this, std::placeholders::_1, std::placeholders::_2)); - x40_tablegroup_popup->SetMenuCancelCallback( - std::bind(&SNewFileSelectFrame::DoPopupCancel, this, std::placeholders::_1)); + [this](CGuiTableGroup* caller, int oldSel) { DoSelectionChange(caller, oldSel); }); + x40_tablegroup_popup->SetMenuCancelCallback([this](CGuiTableGroup* caller) { DoPopupCancel(caller); }); for (int i = 0; i < 3; ++i) x64_fileSelections[i] = FindFileSelectOption(x1c_loadedFrame, i); @@ -868,12 +864,12 @@ void CFrontEndUI::SFusionBonusFrame::FinishedLoading() { SetTableColors(x28_tablegroup_options); SetTableColors(x2c_tablegroup_fusionsuit); - x28_tablegroup_options->SetMenuAdvanceCallback(std::bind(&SFusionBonusFrame::DoAdvance, this, std::placeholders::_1)); + x28_tablegroup_options->SetMenuAdvanceCallback([this](CGuiTableGroup* caller) { DoAdvance(caller); }); x28_tablegroup_options->SetMenuSelectionChangeCallback( - std::bind(&SFusionBonusFrame::DoSelectionChange, this, std::placeholders::_1, std::placeholders::_2)); - x28_tablegroup_options->SetMenuCancelCallback(std::bind(&SFusionBonusFrame::DoCancel, this, std::placeholders::_1)); + [this](CGuiTableGroup* caller, int oldSel) { DoSelectionChange(caller, oldSel); }); + x28_tablegroup_options->SetMenuCancelCallback([this](CGuiTableGroup* caller) { DoCancel(caller); }); x2c_tablegroup_fusionsuit->SetMenuSelectionChangeCallback( - std::bind(&SFusionBonusFrame::DoSelectionChange, this, std::placeholders::_1, std::placeholders::_2)); + [this](CGuiTableGroup* caller, int oldSel) { DoSelectionChange(caller, oldSel); }); } bool CFrontEndUI::SFusionBonusFrame::PumpLoad() { @@ -1112,10 +1108,10 @@ void CFrontEndUI::SFrontEndFrame::FinishedLoading() { if (proceed) proceed->TextSupport().SetText(g_MainStringTable->GetString(85)); - x18_tablegroup_mainmenu->SetMenuAdvanceCallback(std::bind(&SFrontEndFrame::DoAdvance, this, std::placeholders::_1)); + x18_tablegroup_mainmenu->SetMenuAdvanceCallback([this](CGuiTableGroup* caller) { DoAdvance(caller); }); x18_tablegroup_mainmenu->SetMenuSelectionChangeCallback( - std::bind(&SFrontEndFrame::DoSelectionChange, this, std::placeholders::_1, std::placeholders::_2)); - x18_tablegroup_mainmenu->SetMenuCancelCallback(std::bind(&SFrontEndFrame::DoCancel, this, std::placeholders::_1)); + [this](CGuiTableGroup* caller, int oldSel) { DoSelectionChange(caller, oldSel); }); + x18_tablegroup_mainmenu->SetMenuCancelCallback([this](CGuiTableGroup* caller) { DoCancel(caller); }); HandleActiveChange(x18_tablegroup_mainmenu); } @@ -1531,31 +1527,27 @@ void CFrontEndUI::SOptionsFrontEndFrame::FinishedLoading() { x30_tablegroup_triple = static_cast(x1c_loadedFrame->FindWidget("tablegroup_triple")); x34_slidergroup_slider = static_cast(x1c_loadedFrame->FindWidget("slidergroup_slider")); - x24_tablegroup_leftmenu->SetMenuAdvanceCallback( - std::bind(&SOptionsFrontEndFrame::DoLeftMenuAdvance, this, std::placeholders::_1)); + x24_tablegroup_leftmenu->SetMenuAdvanceCallback([this](CGuiTableGroup* caller) { DoLeftMenuAdvance(caller); }); x24_tablegroup_leftmenu->SetMenuSelectionChangeCallback( - std::bind(&SOptionsFrontEndFrame::DoMenuSelectionChange, this, std::placeholders::_1, std::placeholders::_2)); + [this](CGuiTableGroup* caller, int oldSel) { DoMenuSelectionChange(caller, oldSel); }); x38_rowPitch = x24_tablegroup_leftmenu->GetWorkerWidget(1)->GetIdlePosition().z() - x24_tablegroup_leftmenu->GetWorkerWidget(0)->GetIdlePosition().z(); x28_tablegroup_rightmenu->SetMenuSelectionChangeCallback( - std::bind(&SOptionsFrontEndFrame::DoMenuSelectionChange, this, std::placeholders::_1, std::placeholders::_2)); - x28_tablegroup_rightmenu->SetMenuCancelCallback( - std::bind(&SOptionsFrontEndFrame::DoMenuCancel, this, std::placeholders::_1)); + [this](CGuiTableGroup* caller, int oldSel) { DoMenuSelectionChange(caller, oldSel); }); + x28_tablegroup_rightmenu->SetMenuCancelCallback([this](CGuiTableGroup* caller) { DoMenuCancel(caller); }); x2c_tablegroup_double->SetMenuSelectionChangeCallback( - std::bind(&SOptionsFrontEndFrame::DoMenuSelectionChange, this, std::placeholders::_1, std::placeholders::_2)); - x2c_tablegroup_double->SetMenuCancelCallback( - std::bind(&SOptionsFrontEndFrame::DoMenuCancel, this, std::placeholders::_1)); + [this](CGuiTableGroup* caller, int oldSel) { DoMenuSelectionChange(caller, oldSel); }); + x2c_tablegroup_double->SetMenuCancelCallback([this](CGuiTableGroup* caller) { DoMenuCancel(caller); }); x30_tablegroup_triple->SetMenuSelectionChangeCallback( - std::bind(&SOptionsFrontEndFrame::DoMenuSelectionChange, this, std::placeholders::_1, std::placeholders::_2)); - x30_tablegroup_triple->SetMenuCancelCallback( - std::bind(&SOptionsFrontEndFrame::DoMenuCancel, this, std::placeholders::_1)); + [this](CGuiTableGroup* caller, int oldSel) { DoMenuSelectionChange(caller, oldSel); }); + x30_tablegroup_triple->SetMenuCancelCallback([this](CGuiTableGroup* caller) { DoMenuCancel(caller); }); x34_slidergroup_slider->SetSelectionChangedCallback( - std::bind(&SOptionsFrontEndFrame::DoSliderChange, this, std::placeholders::_1, std::placeholders::_2)); + [this](CGuiSliderGroup* caller, float value) { DoSliderChange(caller, value); }); FindTextPanePair(x1c_loadedFrame, "textpane_double0").SetPairText(x20_loadedPauseStrg->GetString(95)); // Off FindTextPanePair(x1c_loadedFrame, "textpane_double1").SetPairText(x20_loadedPauseStrg->GetString(94)); // On diff --git a/Runtime/MP1/CGBASupport.cpp b/Runtime/MP1/CGBASupport.cpp index 6a20636c4..781a82ab6 100644 --- a/Runtime/MP1/CGBASupport.cpp +++ b/Runtime/MP1/CGBASupport.cpp @@ -141,10 +141,10 @@ void CGBASupport::Update(float dt) { case EPhase::StartJoyBusBoot: x34_phase = EPhase::PollJoyBusBoot; - if (!g_JbusEndpoint || g_JbusEndpoint->GBAJoyBootAsync( - x40_siChan * 2, 2, x2c_buffer.get(), x28_fileSize, &x3c_status, - std::bind(JoyBootDone, std::placeholders::_1, std::placeholders::_2)) != jbus::GBA_READY) + if (!g_JbusEndpoint || g_JbusEndpoint->GBAJoyBootAsync(x40_siChan * 2, 2, x2c_buffer.get(), x28_fileSize, + &x3c_status, JoyBootDone) != jbus::GBA_READY) { x34_phase = EPhase::Failed; + } break; case EPhase::PollJoyBusBoot: diff --git a/Runtime/MP1/COptionsScreen.cpp b/Runtime/MP1/COptionsScreen.cpp index 11ef9e6e3..451e4960c 100644 --- a/Runtime/MP1/COptionsScreen.cpp +++ b/Runtime/MP1/COptionsScreen.cpp @@ -207,11 +207,11 @@ void COptionsScreen::VActivate() { .SetText(xc_pauseStrg.GetString(98)); x18c_slidergroup_slider->SetSelectionChangedCallback( - std::bind(&COptionsScreen::OnSliderChanged, this, std::placeholders::_1, std::placeholders::_2)); + [this](CGuiSliderGroup* caller, float value) { OnSliderChanged(caller, value); }); x190_tablegroup_double->SetMenuSelectionChangeCallback( - std::bind(&COptionsScreen::OnEnumChanged, this, std::placeholders::_1, std::placeholders::_2)); + [this](CGuiTableGroup* caller, int oldSel) { OnEnumChanged(caller, oldSel); }); x194_tablegroup_triple->SetMenuSelectionChangeCallback( - std::bind(&COptionsScreen::OnEnumChanged, this, std::placeholders::_1, std::placeholders::_2)); + [this](CGuiTableGroup* caller, int oldSel) { OnEnumChanged(caller, oldSel); }); } void COptionsScreen::RightTableSelectionChanged(int oldSel, int newSel) { UpdateOptionView(); } diff --git a/Runtime/MP1/CPauseScreen.cpp b/Runtime/MP1/CPauseScreen.cpp index 6c4043575..de84e6504 100644 --- a/Runtime/MP1/CPauseScreen.cpp +++ b/Runtime/MP1/CPauseScreen.cpp @@ -79,10 +79,10 @@ void CPauseScreen::InitializeFrameGlue() { deco->SetColor(color); } - x34_loadedPauseScreenInstructions->SetMouseDownCallback(std::bind(&CPauseScreen::OnWidgetMouseDown, this, - std::placeholders::_1, std::placeholders::_2)); - x34_loadedPauseScreenInstructions->SetMouseUpCallback(std::bind(&CPauseScreen::OnWidgetMouseUp, this, - std::placeholders::_1, std::placeholders::_2)); + x34_loadedPauseScreenInstructions->SetMouseDownCallback( + [this](CGuiWidget* caller, bool resume) { OnWidgetMouseDown(caller, resume); }); + x34_loadedPauseScreenInstructions->SetMouseUpCallback( + [this](CGuiWidget* caller, bool cancel) { OnWidgetMouseUp(caller, cancel); }); } bool CPauseScreen::CheckLoadComplete(const CStateManager& mgr) { diff --git a/Runtime/MP1/CPauseScreenBase.cpp b/Runtime/MP1/CPauseScreenBase.cpp index 8318affb5..577af0910 100644 --- a/Runtime/MP1/CPauseScreenBase.cpp +++ b/Runtime/MP1/CPauseScreenBase.cpp @@ -151,25 +151,21 @@ void CPauseScreenBase::InitializeFrameGlue() { x190_tablegroup_double->SetWorkersMouseActive(false); x194_tablegroup_triple->SetWorkersMouseActive(false); - x70_tablegroup_leftlog->SetMenuAdvanceCallback( - std::bind(&CPauseScreenBase::OnLeftTableAdvance, this, std::placeholders::_1)); + x70_tablegroup_leftlog->SetMenuAdvanceCallback([this](CGuiTableGroup* caller) { OnLeftTableAdvance(caller); }); x70_tablegroup_leftlog->SetMenuSelectionChangeCallback( - std::bind(&CPauseScreenBase::OnTableSelectionChange, this, std::placeholders::_1, std::placeholders::_2)); - x84_tablegroup_rightlog->SetMenuAdvanceCallback( - std::bind(&CPauseScreenBase::OnRightTableAdvance, this, std::placeholders::_1)); + [this](CGuiTableGroup* caller, int oldSel) { OnTableSelectionChange(caller, oldSel); }); + x84_tablegroup_rightlog->SetMenuAdvanceCallback([this](CGuiTableGroup* caller) { OnRightTableAdvance(caller); }); x84_tablegroup_rightlog->SetMenuSelectionChangeCallback( - std::bind(&CPauseScreenBase::OnTableSelectionChange, this, std::placeholders::_1, std::placeholders::_2)); - x84_tablegroup_rightlog->SetMenuCancelCallback( - std::bind(&CPauseScreenBase::OnRightTableCancel, this, std::placeholders::_1)); + [this](CGuiTableGroup* caller, int oldSel) { OnTableSelectionChange(caller, oldSel); }); + x84_tablegroup_rightlog->SetMenuCancelCallback([this](CGuiTableGroup* caller) { OnRightTableCancel(caller); }); x18c_slidergroup_slider->SetSelectionChangedCallback({}); x190_tablegroup_double->SetMenuSelectionChangeCallback({}); x194_tablegroup_triple->SetMenuSelectionChangeCallback({}); - x8_frame.SetMouseUpCallback(std::bind(&CPauseScreenBase::OnWidgetMouseUp, this, - std::placeholders::_1, std::placeholders::_2)); - x8_frame.SetMouseScrollCallback(std::bind(&CPauseScreenBase::OnWidgetScroll, this, - std::placeholders::_1, std::placeholders::_2, - std::placeholders::_3, std::placeholders::_4)); + x8_frame.SetMouseUpCallback([this](CGuiWidget* widget, bool cancel) { OnWidgetMouseUp(widget, cancel); }); + x8_frame.SetMouseScrollCallback([this](CGuiWidget* widget, const boo::SScrollDelta& delta, int accumX, int accumY) { + OnWidgetScroll(widget, delta, accumX, accumY); + }); } bool CPauseScreenBase::IsReady() { diff --git a/Runtime/MP1/CQuitGameScreen.cpp b/Runtime/MP1/CQuitGameScreen.cpp index 2cd1e4d48..dddaf0b0c 100644 --- a/Runtime/MP1/CQuitGameScreen.cpp +++ b/Runtime/MP1/CQuitGameScreen.cpp @@ -29,9 +29,9 @@ void CQuitGameScreen::FinishedLoading() { x14_tablegroup_quitgame = static_cast(x10_loadedFrame->FindWidget("tablegroup_quitgame")); x14_tablegroup_quitgame->SetVertical(false); - x14_tablegroup_quitgame->SetMenuAdvanceCallback(std::bind(&CQuitGameScreen::DoAdvance, this, std::placeholders::_1)); + x14_tablegroup_quitgame->SetMenuAdvanceCallback([this](CGuiTableGroup* caller) { DoAdvance(caller); }); x14_tablegroup_quitgame->SetMenuSelectionChangeCallback( - std::bind(&CQuitGameScreen::DoSelectionChange, this, std::placeholders::_1, std::placeholders::_2)); + [this](CGuiTableGroup* caller, int oldSel) { DoSelectionChange(caller, oldSel); }); static_cast(x10_loadedFrame->FindWidget("textpane_title")) ->TextSupport() @@ -46,8 +46,7 @@ void CQuitGameScreen::FinishedLoading() { x14_tablegroup_quitgame->SetUserSelection(DefaultSelections[int(x0_type)]); x14_tablegroup_quitgame->SetWorkersMouseActive(true); - x10_loadedFrame->SetMouseUpCallback(std::bind(&CQuitGameScreen::OnWidgetMouseUp, this, - std::placeholders::_1, std::placeholders::_2)); + x10_loadedFrame->SetMouseUpCallback([this](CGuiWidget* widget, bool cancel) { OnWidgetMouseUp(widget, cancel); }); SetColors(); } diff --git a/Runtime/MP1/CSaveGameScreen.cpp b/Runtime/MP1/CSaveGameScreen.cpp index f836d6629..d8fbcf4a6 100644 --- a/Runtime/MP1/CSaveGameScreen.cpp +++ b/Runtime/MP1/CSaveGameScreen.cpp @@ -101,9 +101,9 @@ bool CSaveGameScreen::PumpLoad() { x64_textpane_choice2 = static_cast(x50_loadedFrame->FindWidget("textpane_choice2")); x68_textpane_choice3 = static_cast(x50_loadedFrame->FindWidget("textpane_choice3")); - x58_tablegroup_choices->SetMenuAdvanceCallback(std::bind(&CSaveGameScreen::DoAdvance, this, std::placeholders::_1)); + x58_tablegroup_choices->SetMenuAdvanceCallback([this](CGuiTableGroup* caller) { DoAdvance(caller); }); x58_tablegroup_choices->SetMenuSelectionChangeCallback( - std::bind(&CSaveGameScreen::DoSelectionChange, this, std::placeholders::_1, std::placeholders::_2)); + [this](CGuiTableGroup* caller, int oldSel) { DoSelectionChange(caller, oldSel); }); if (x0_saveCtx == ESaveContext::InGame) x6c_cardDriver->StartCardProbe(); diff --git a/Runtime/MP1/MP1.cpp b/Runtime/MP1/MP1.cpp index 16821d7e8..eab910b4c 100644 --- a/Runtime/MP1/MP1.cpp +++ b/Runtime/MP1/MP1.cpp @@ -648,27 +648,33 @@ void CMain::Init(const hecl::Runtime::FileStoreManager& storeMgr, hecl::CVarMana m_cvarMgr = cvarMgr; m_console = std::make_unique(m_cvarMgr); m_console->init(window); - m_console->registerCommand("Quit"sv, "Quits the game immediately"sv, ""sv, - std::bind(&CMain::quit, this, std::placeholders::_1, std::placeholders::_2)); - m_console->registerCommand("Give"sv, "Gives the player the specified item, maxing it out"sv, ""sv, - std::bind(&CMain::Give, this, std::placeholders::_1, std::placeholders::_2), - hecl::SConsoleCommand::ECommandFlags::Cheat); - m_console->registerCommand("Remove"sv, "Removes the specified item from the player"sv, ""sv, - std::bind(&CMain::Remove, this, std::placeholders::_1, std::placeholders::_2), - hecl::SConsoleCommand::ECommandFlags::Cheat); + m_console->registerCommand( + "Quit"sv, "Quits the game immediately"sv, ""sv, + [this](hecl::Console* console, const std::vector& args) { quit(console, args); }); + m_console->registerCommand( + "Give"sv, "Gives the player the specified item, maxing it out"sv, ""sv, + [this](hecl::Console* console, const std::vector& args) { Give(console, args); }, + hecl::SConsoleCommand::ECommandFlags::Cheat); + m_console->registerCommand( + "Remove"sv, "Removes the specified item from the player"sv, ""sv, + [this](hecl::Console* console, const std::vector& args) { Remove(console, args); }, + hecl::SConsoleCommand::ECommandFlags::Cheat); m_console->registerCommand( "Teleport"sv, "Teleports the player to the specified coordinates in worldspace"sv, "x y z [dX dY dZ]"sv, - std::bind(&CMain::Teleport, this, std::placeholders::_1, std::placeholders::_2), + [this](hecl::Console* console, const std::vector& args) { Teleport(console, args); }, (hecl::SConsoleCommand::ECommandFlags::Cheat | hecl::SConsoleCommand::ECommandFlags::Developer)); - m_console->registerCommand("God"sv, "Disables damage given by enemies and objects"sv, ""sv, - std::bind(&CMain::God, this, std::placeholders::_1, std::placeholders::_2), - hecl::SConsoleCommand::ECommandFlags::Cheat); - m_console->registerCommand("ListWorlds"sv, "Lists loaded worlds"sv, ""sv, - std::bind(&CMain::ListWorlds, this, std::placeholders::_1, std::placeholders::_2), - hecl::SConsoleCommand::ECommandFlags::Normal); - m_console->registerCommand("Warp"sv, "Warps to a given area and world"sv, "[worldname] areaId"sv, - std::bind(&CMain::Warp, this, std::placeholders::_1, std::placeholders::_2), - hecl::SConsoleCommand::ECommandFlags::Normal); + m_console->registerCommand( + "God"sv, "Disables damage given by enemies and objects"sv, ""sv, + [this](hecl::Console* console, const std::vector& args) { God(console, args); }, + hecl::SConsoleCommand::ECommandFlags::Cheat); + m_console->registerCommand( + "ListWorlds"sv, "Lists loaded worlds"sv, ""sv, + [this](hecl::Console* console, const std::vector& args) { ListWorlds(console, args); }, + hecl::SConsoleCommand::ECommandFlags::Normal); + m_console->registerCommand( + "Warp"sv, "Warps to a given area and world"sv, "[worldname] areaId"sv, + [this](hecl::Console* console, const std::vector& args) { Warp(console, args); }, + hecl::SConsoleCommand::ECommandFlags::Normal); InitializeSubsystems(); x128_globalObjects.PostInitialize(); From 1f8ed5af25717d4f03abb8bd505894d71a8561d8 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Aug 2019 05:15:08 -0400 Subject: [PATCH 26/65] RetroTypes: Make types constexpr where applicable These are generally used as basic tags and ID types, so these can have a constexpr interface. This is particularly beneficial, given some of these types are used in file-static lookup tables. Without being constexpr, these type's constructors in that case are technically runtime static constructors. While most compilers will initialize the type at compile-time, this would be dependent on the optimizer. By marking them constexpr, we allow it outright. It also allows those arrays to be made constexpr as well. --- Runtime/RetroTypes.hpp | 62 ++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/Runtime/RetroTypes.hpp b/Runtime/RetroTypes.hpp index 7b17bdf19..730fbef3e 100644 --- a/Runtime/RetroTypes.hpp +++ b/Runtime/RetroTypes.hpp @@ -27,17 +27,17 @@ class CAssetId { u64 id = UINT64_MAX; public: - CAssetId() = default; - CAssetId(u64 v) { Assign(v); } + constexpr CAssetId() = default; + constexpr CAssetId(u64 v) { Assign(v); } explicit CAssetId(CInputStream& in); - bool IsValid() const { return id != UINT64_MAX; } - u64 Value() const { return id; } - void Assign(u64 v) { id = (v == UINT32_MAX ? UINT64_MAX : (v == 0 ? UINT64_MAX : v)); } - void Reset() { id = UINT64_MAX; } + constexpr bool IsValid() const { return id != UINT64_MAX; } + constexpr u64 Value() const { return id; } + constexpr void Assign(u64 v) { id = (v == UINT32_MAX ? UINT64_MAX : (v == 0 ? UINT64_MAX : v)); } + constexpr void Reset() { id = UINT64_MAX; } void PutTo(COutputStream& out); - bool operator==(const CAssetId& other) const { return id == other.id; } - bool operator!=(const CAssetId& other) const { return id != other.id; } - bool operator<(const CAssetId& other) const { return id < other.id; } + constexpr bool operator==(const CAssetId& other) const { return id == other.id; } + constexpr bool operator!=(const CAssetId& other) const { return !operator==(other); } + constexpr bool operator<(const CAssetId& other) const { return id < other.id; } }; //#define kInvalidAssetId CAssetId() @@ -46,12 +46,12 @@ struct SObjectTag { FourCC type; CAssetId id; - operator bool() const { return id.IsValid(); } - bool operator!=(const SObjectTag& other) const { return id != other.id; } - bool operator==(const SObjectTag& other) const { return id == other.id; } - bool operator<(const SObjectTag& other) const { return id < other.id; } - SObjectTag() = default; - SObjectTag(FourCC tp, CAssetId rid) : type(tp), id(rid) {} + constexpr operator bool() const { return id.IsValid(); } + constexpr bool operator==(const SObjectTag& other) const { return id == other.id; } + constexpr bool operator!=(const SObjectTag& other) const { return !operator==(other); } + constexpr bool operator<(const SObjectTag& other) const { return id < other.id; } + constexpr SObjectTag() = default; + constexpr SObjectTag(FourCC tp, CAssetId rid) : type(tp), id(rid) {} SObjectTag(CInputStream& in) { in.readBytesToBuf(&type, 4); id = CAssetId(in); @@ -63,28 +63,30 @@ struct SObjectTag { }; struct TEditorId { - TEditorId() = default; - TEditorId(u32 idin) : id(idin) {} u32 id = u32(-1); - u8 LayerNum() const { return u8((id >> 26) & 0x3f); } - u16 AreaNum() const { return u16((id >> 16) & 0x3ff); } - u16 Id() const { return u16(id & 0xffff); } - bool operator<(const TEditorId& other) const { return (id & 0x3ffffff) < (other.id & 0x3ffffff); } - bool operator!=(const TEditorId& other) const { return (id & 0x3ffffff) != (other.id & 0x3ffffff); } - bool operator==(const TEditorId& other) const { return (id & 0x3ffffff) == (other.id & 0x3ffffff); } + + constexpr TEditorId() = default; + constexpr TEditorId(u32 idin) : id(idin) {} + constexpr u8 LayerNum() const { return u8((id >> 26) & 0x3f); } + constexpr u16 AreaNum() const { return u16((id >> 16) & 0x3ff); } + constexpr u16 Id() const { return u16(id & 0xffff); } + constexpr bool operator<(const TEditorId& other) const { return (id & 0x3ffffff) < (other.id & 0x3ffffff); } + constexpr bool operator==(const TEditorId& other) const { return (id & 0x3ffffff) == (other.id & 0x3ffffff); } + constexpr bool operator!=(const TEditorId& other) const { return !operator==(other); } }; #define kInvalidEditorId TEditorId() struct TUniqueId { - TUniqueId() = default; - TUniqueId(u16 value, u16 version) : id(value | (version << 10)) {} u16 id = u16(-1); - u16 Version() const { return u16((id >> 10) & 0x3f); } - u16 Value() const { return u16(id & 0x3ff); } - bool operator<(const TUniqueId& other) const { return (id < other.id); } - bool operator!=(const TUniqueId& other) const { return (id != other.id); } - bool operator==(const TUniqueId& other) const { return (id == other.id); } + + constexpr TUniqueId() = default; + constexpr TUniqueId(u16 value, u16 version) : id(value | (version << 10)) {} + constexpr u16 Version() const { return u16((id >> 10) & 0x3f); } + constexpr u16 Value() const { return u16(id & 0x3ff); } + constexpr bool operator<(const TUniqueId& other) const { return id < other.id; } + constexpr bool operator==(const TUniqueId& other) const { return id == other.id; } + constexpr bool operator!=(const TUniqueId& other) const { return !operator==(other); } }; #define kInvalidUniqueId TUniqueId() From d3d629d40562a76f6c604f01844c689e221f4515 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Aug 2019 06:04:11 -0400 Subject: [PATCH 27/65] RuntimeCommon: Use const on member functions where applicable Adds missing const qualifiers on class member functions that don't modify instance state. --- Runtime/AutoMapper/CAutoMapper.cpp | 2 +- Runtime/AutoMapper/CAutoMapper.hpp | 2 +- Runtime/AutoMapper/CMappableObject.cpp | 2 +- Runtime/AutoMapper/CMappableObject.hpp | 2 +- Runtime/CArchitectureQueue.hpp | 2 +- Runtime/CDvdFile.hpp | 2 +- Runtime/CGameState.hpp | 4 +- Runtime/CResLoader.cpp | 6 +-- Runtime/CResLoader.hpp | 6 +-- Runtime/CStateManager.cpp | 2 +- Runtime/CStateManager.hpp | 8 +++- Runtime/Camera/CCameraManager.cpp | 2 +- Runtime/Camera/CCameraManager.hpp | 7 +++- Runtime/Camera/CFirstPersonCamera.cpp | 2 +- Runtime/Camera/CFirstPersonCamera.hpp | 2 +- Runtime/Camera/CGameCamera.cpp | 3 +- Runtime/Camera/CGameCamera.hpp | 2 +- Runtime/Character/CAdditiveBodyState.cpp | 14 +++---- Runtime/Character/CAdditiveBodyState.hpp | 8 ++-- Runtime/Character/CBodyState.cpp | 34 ++++++++-------- Runtime/Character/CBodyState.hpp | 34 ++++++++-------- Runtime/Character/CBodyStateInfo.cpp | 14 +++---- Runtime/Character/CBodyStateInfo.hpp | 14 +++---- Runtime/Character/CFBStreamedCompression.cpp | 8 ++-- Runtime/Character/CFBStreamedCompression.hpp | 8 ++-- Runtime/Character/CModelData.cpp | 2 +- Runtime/Character/CModelData.hpp | 4 +- Runtime/Character/CSegStatementSet.hpp | 1 + Runtime/Collision/CMaterialList.hpp | 2 +- Runtime/Graphics/CBooRenderer.hpp | 10 ++--- Runtime/Graphics/CTexture.hpp | 4 +- Runtime/Graphics/CTextureBoo.cpp | 4 +- Runtime/GuiSys/CGuiFrame.hpp | 2 + Runtime/GuiSys/CGuiGroup.cpp | 2 + Runtime/GuiSys/CGuiGroup.hpp | 1 + Runtime/GuiSys/CGuiSys.hpp | 1 + Runtime/GuiSys/CHudMissileInterface.cpp | 2 +- Runtime/GuiSys/CHudMissileInterface.hpp | 2 +- Runtime/GuiSys/COrbitPointMarker.cpp | 2 +- Runtime/GuiSys/COrbitPointMarker.hpp | 2 +- Runtime/IVParamObj.hpp | 3 +- Runtime/MP1/CMemoryCardDriver.cpp | 4 +- Runtime/MP1/CMemoryCardDriver.hpp | 4 +- Runtime/MP1/CSaveGameScreen.hpp | 2 +- Runtime/MP1/MP1.hpp | 6 +-- Runtime/MP1/World/CBabygoth.cpp | 2 +- Runtime/MP1/World/CBabygoth.hpp | 8 ++-- Runtime/MP1/World/CFlaahgra.cpp | 14 +++---- Runtime/MP1/World/CFlaahgra.hpp | 14 +++---- Runtime/MP1/World/CJellyZap.cpp | 8 ++-- Runtime/MP1/World/CJellyZap.hpp | 2 +- Runtime/MP1/World/CParasite.cpp | 6 +-- Runtime/MP1/World/CParasite.hpp | 2 +- Runtime/MP1/World/CPuddleToadGamma.cpp | 20 ++++----- Runtime/MP1/World/CPuddleToadGamma.hpp | 2 +- Runtime/MP1/World/CSpacePirate.cpp | 18 ++++---- Runtime/MP1/World/CSpacePirate.hpp | 10 ++--- Runtime/MP1/World/CTryclops.cpp | 2 +- Runtime/MP1/World/CTryclops.hpp | 2 +- Runtime/MP1/World/CWarWasp.cpp | 43 ++++++++++---------- Runtime/MP1/World/CWarWasp.hpp | 20 ++++----- Runtime/Particle/CElementGen.cpp | 2 +- Runtime/Particle/CElementGen.hpp | 2 +- Runtime/Weapon/CGrappleArm.hpp | 1 + Runtime/Weapon/CPlayerGun.cpp | 2 +- Runtime/Weapon/CPlayerGun.hpp | 3 +- Runtime/Weapon/CProjectileInfo.cpp | 2 +- Runtime/Weapon/CProjectileInfo.hpp | 2 +- Runtime/World/CFishCloud.cpp | 2 +- Runtime/World/CFishCloud.hpp | 2 +- Runtime/World/CGameArea.cpp | 2 +- Runtime/World/CGameArea.hpp | 2 +- Runtime/World/CPathFindArea.cpp | 2 +- Runtime/World/CPathFindArea.hpp | 2 +- Runtime/World/CPathFindRegion.cpp | 4 +- Runtime/World/CPathFindRegion.hpp | 4 +- Runtime/World/CPatterned.cpp | 2 +- Runtime/World/CPatterned.hpp | 2 +- Runtime/World/CPhysicsActor.cpp | 2 +- Runtime/World/CPhysicsActor.hpp | 4 +- Runtime/World/CPlayer.cpp | 12 +++--- Runtime/World/CPlayer.hpp | 12 +++--- Runtime/World/CPlayerCameraBob.cpp | 4 +- Runtime/World/CPlayerCameraBob.hpp | 4 +- Runtime/World/CScriptDoor.cpp | 4 +- Runtime/World/CScriptDoor.hpp | 4 +- Runtime/World/CScriptEffect.cpp | 2 +- Runtime/World/CScriptEffect.hpp | 2 +- Runtime/World/CStateMachine.hpp | 2 +- Runtime/World/CVisorFlare.hpp | 2 +- Runtime/World/CWorldTransManager.hpp | 2 +- 91 files changed, 269 insertions(+), 248 deletions(-) diff --git a/Runtime/AutoMapper/CAutoMapper.cpp b/Runtime/AutoMapper/CAutoMapper.cpp index 544fbc488..c4d7336ce 100644 --- a/Runtime/AutoMapper/CAutoMapper.cpp +++ b/Runtime/AutoMapper/CAutoMapper.cpp @@ -972,7 +972,7 @@ float CAutoMapper::GetDesiredMiniMapCameraDistance(const CStateManager& mgr) con std::tan(M_PIF / 2.f - 0.5f * 2.f * M_PIF * (xa8_renderStates[0].x1c_camAngle / 360.f)); } -float CAutoMapper::GetClampedMapScreenCameraDistance(float v) { +float CAutoMapper::GetClampedMapScreenCameraDistance(float v) const { if (x1bc_state == EAutoMapperState::MapScreenUniverse) return zeus::clamp(g_tweakAutoMapper->GetMinUniverseCamDist(), v, g_tweakAutoMapper->GetMaxUniverseCamDist()); return zeus::clamp(g_tweakAutoMapper->GetMinCamDist(), v, g_tweakAutoMapper->GetMaxCamDist()); diff --git a/Runtime/AutoMapper/CAutoMapper.hpp b/Runtime/AutoMapper/CAutoMapper.hpp index e0e764962..4acdbf00a 100644 --- a/Runtime/AutoMapper/CAutoMapper.hpp +++ b/Runtime/AutoMapper/CAutoMapper.hpp @@ -202,7 +202,7 @@ private: static float GetMapAreaMiniMapDrawAlphaOutlineUnvisited(const CStateManager&); float GetDesiredMiniMapCameraDistance(const CStateManager&) const; static float GetBaseMapScreenCameraMoveSpeed(); - float GetClampedMapScreenCameraDistance(float); + float GetClampedMapScreenCameraDistance(float) const; float GetFinalMapScreenCameraMoveSpeed() const; void ProcessMapRotateInput(const CFinalInput& input, const CStateManager& mgr); void ProcessMapZoomInput(const CFinalInput& input, const CStateManager& mgr); diff --git a/Runtime/AutoMapper/CMappableObject.cpp b/Runtime/AutoMapper/CMappableObject.cpp index 0cf3ccdbb..79aecf4df 100644 --- a/Runtime/AutoMapper/CMappableObject.cpp +++ b/Runtime/AutoMapper/CMappableObject.cpp @@ -19,7 +19,7 @@ CMappableObject::CMappableObject(const void* buf) { x10_transform.read34RowMajor(r); } -zeus::CTransform CMappableObject::AdjustTransformForType() { +zeus::CTransform CMappableObject::AdjustTransformForType() const { const float doorCenterX = g_tweakAutoMapper->GetDoorCenter().x(); const float doorCenterZ = g_tweakAutoMapper->GetDoorCenter().z(); if (x0_type == EMappableObjectType::BigDoor1) { diff --git a/Runtime/AutoMapper/CMappableObject.hpp b/Runtime/AutoMapper/CMappableObject.hpp index 41334ed28..dde05b877 100644 --- a/Runtime/AutoMapper/CMappableObject.hpp +++ b/Runtime/AutoMapper/CMappableObject.hpp @@ -66,7 +66,7 @@ private: std::optional m_doorSurface; std::optional m_texQuadFilter; - zeus::CTransform AdjustTransformForType(); + zeus::CTransform AdjustTransformForType() const; std::pair GetDoorColors(int idx, const CMapWorldInfo& mwInfo, float alpha) const; public: diff --git a/Runtime/CArchitectureQueue.hpp b/Runtime/CArchitectureQueue.hpp index bceb8c2a5..ee2010b6f 100644 --- a/Runtime/CArchitectureQueue.hpp +++ b/Runtime/CArchitectureQueue.hpp @@ -16,7 +16,7 @@ public: return msg; } void Clear() { m_list.clear(); } - operator bool() { return m_list.size() != 0; } + operator bool() const { return m_list.size() != 0; } }; } // namespace urde diff --git a/Runtime/CDvdFile.hpp b/Runtime/CDvdFile.hpp index 48196ebea..668239c82 100644 --- a/Runtime/CDvdFile.hpp +++ b/Runtime/CDvdFile.hpp @@ -55,7 +55,7 @@ public: return AsyncSeekRead(buf, len, ESeekOrigin::Cur, 0, std::move(cb)); } u32 SyncRead(void* buf, u32 len) { return m_reader->readBytesToBuf(buf, len); } - u64 Length() { return m_reader->length(); } + u64 Length() const { return m_reader->length(); } std::string_view GetPath() const { return x18_path; } }; } // namespace urde diff --git a/Runtime/CGameState.hpp b/Runtime/CGameState.hpp index 760c75f33..2d573b706 100644 --- a/Runtime/CGameState.hpp +++ b/Runtime/CGameState.hpp @@ -90,8 +90,8 @@ public: CGameState(); CGameState(CBitStreamReader& stream, u32 saveIdx); void SetCurrentWorldId(CAssetId id); - std::shared_ptr GetPlayerState() { return x98_playerState; } - std::shared_ptr GetWorldTransitionManager() { return x9c_transManager; } + std::shared_ptr GetPlayerState() const { return x98_playerState; } + std::shared_ptr GetWorldTransitionManager() const { return x9c_transManager; } void SetTotalPlayTime(float time); CPersistentOptions& SystemOptions() { return xa8_systemOptions; } CGameOptions& GameOptions() { return x17c_gameOptions; } diff --git a/Runtime/CResLoader.cpp b/Runtime/CResLoader.cpp index db6d040c5..b4f0580f3 100644 --- a/Runtime/CResLoader.cpp +++ b/Runtime/CResLoader.cpp @@ -118,19 +118,19 @@ void CResLoader::GetTagListForFile(const char* pakName, std::vector& } } -bool CResLoader::GetResourceCompression(const SObjectTag& tag) { +bool CResLoader::GetResourceCompression(const SObjectTag& tag) const { if (FindResource(tag.id)) return x50_cachedResInfo->IsCompressed(); return false; } -u32 CResLoader::ResourceSize(const SObjectTag& tag) { +u32 CResLoader::ResourceSize(const SObjectTag& tag) const { if (FindResource(tag.id)) return x50_cachedResInfo->GetSize(); return 0; } -bool CResLoader::ResourceExists(const SObjectTag& tag) { return FindResource(tag.id); } +bool CResLoader::ResourceExists(const SObjectTag& tag) const { return FindResource(tag.id); } FourCC CResLoader::GetResourceTypeById(CAssetId id) const { if (id.IsValid() && FindResource(id)) diff --git a/Runtime/CResLoader.hpp b/Runtime/CResLoader.hpp index 618cfc884..85837d8f4 100644 --- a/Runtime/CResLoader.hpp +++ b/Runtime/CResLoader.hpp @@ -36,9 +36,9 @@ public: std::unique_ptr LoadResourceSync(const urde::SObjectTag& tag); std::unique_ptr LoadNewResourcePartSync(const urde::SObjectTag& tag, u32 off, u32 size); void GetTagListForFile(const char* pakName, std::vector& out) const; - bool GetResourceCompression(const SObjectTag& tag); - u32 ResourceSize(const SObjectTag& tag); - bool ResourceExists(const SObjectTag& tag); + bool GetResourceCompression(const SObjectTag& tag) const; + u32 ResourceSize(const SObjectTag& tag) const; + bool ResourceExists(const SObjectTag& tag) const; FourCC GetResourceTypeById(CAssetId id) const; const SObjectTag* GetResourceIdByName(std::string_view name) const; bool AreAllPaksLoaded() const; diff --git a/Runtime/CStateManager.cpp b/Runtime/CStateManager.cpp index d79a994ea..a8cdc8629 100644 --- a/Runtime/CStateManager.cpp +++ b/Runtime/CStateManager.cpp @@ -374,7 +374,7 @@ TAreaId CStateManager::GetVisAreaId() const { return curArea; } -s32 CStateManager::GetWeaponIdCount(TUniqueId uid, EWeaponType type) { +s32 CStateManager::GetWeaponIdCount(TUniqueId uid, EWeaponType type) const { return x878_weaponManager->GetNumActive(uid, type); } diff --git a/Runtime/CStateManager.hpp b/Runtime/CStateManager.hpp index 182036884..2a17c02cf 100644 --- a/Runtime/CStateManager.hpp +++ b/Runtime/CStateManager.hpp @@ -220,7 +220,7 @@ public: void AddDrawableActor(const CActor& actor, const zeus::CVector3f& vec, const zeus::CAABox& aabb) const; bool SpecialSkipCinematic(); TAreaId GetVisAreaId() const; - s32 GetWeaponIdCount(TUniqueId, EWeaponType); + s32 GetWeaponIdCount(TUniqueId, EWeaponType) const; void RemoveWeaponId(TUniqueId, EWeaponType); void AddWeaponId(TUniqueId, EWeaponType); void UpdateEscapeSequenceTimer(float); @@ -368,17 +368,23 @@ public: const std::shared_ptr& GetPlayerState() const { return x8b8_playerState; } CRandom16* GetActiveRandom() { return x900_activeRandom; } + const CRandom16* GetActiveRandom() const { return x900_activeRandom; } zeus::CVector3f Random2f(float scaleMin, float scaleMax); void SetActiveRandomToDefault() { x900_activeRandom = &x8fc_random; } void ClearActiveRandom() { x900_activeRandom = nullptr; } CRumbleManager& GetRumbleManager() { return *x88c_rumbleManager; } + const CRumbleManager& GetRumbleManager() const { return *x88c_rumbleManager; } CCameraFilterPassPoly& GetCameraFilterPass(int idx) { return xb84_camFilterPasses[idx]; } + const CCameraFilterPassPoly& GetCameraFilterPass(int idx) const { return xb84_camFilterPasses[idx]; } CCameraBlurPass& GetCameraBlurPass(int idx) { return xd14_camBlurPasses[idx]; } + const CCameraBlurPass& GetCameraBlurPass(int idx) const { return xd14_camBlurPasses[idx]; } CEnvFxManager* GetEnvFxManager() { return x880_envFxManager; } + const CEnvFxManager* GetEnvFxManager() const { return x880_envFxManager; } CWorld* WorldNC() { return x850_world.get(); } const CWorld* GetWorld() const { return x850_world.get(); } CRelayTracker* GetRelayTracker() { return x8bc_relayTracker.get(); } + const CRelayTracker* GetRelayTracker() const { return x8bc_relayTracker.get(); } CCameraManager* GetCameraManager() const { return x870_cameraManager; } CFluidPlaneManager* GetFluidPlaneManager() const { return x87c_fluidPlaneManager; } CActorModelParticles* GetActorModelParticles() const { return x884_actorModelParticles; } diff --git a/Runtime/Camera/CCameraManager.cpp b/Runtime/Camera/CCameraManager.cpp index 9c29dc271..bc9bc6166 100644 --- a/Runtime/Camera/CCameraManager.cpp +++ b/Runtime/Camera/CCameraManager.cpp @@ -533,7 +533,7 @@ void CCameraManager::UpdateListener(CStateManager& mgr) { CSfxManager::UpdateListener(xf.origin, zeus::skZero3f, xf.frontVector(), xf.upVector(), 1.f); } -float CCameraManager::CalculateFogDensity(CStateManager& mgr, const CScriptWater* water) { +float CCameraManager::CalculateFogDensity(CStateManager& mgr, const CScriptWater* water) const { float distanceFactor = 1.f - water->GetFluidPlane().GetAlpha(); float distance = 0; if (mgr.GetPlayerState()->HasPowerUp(CPlayerState::EItemType::GravitySuit)) diff --git a/Runtime/Camera/CCameraManager.hpp b/Runtime/Camera/CCameraManager.hpp index 873919645..7cc081244 100644 --- a/Runtime/Camera/CCameraManager.hpp +++ b/Runtime/Camera/CCameraManager.hpp @@ -116,8 +116,13 @@ public: void SkipCinematic(CStateManager& stateMgr); CFirstPersonCamera* GetFirstPersonCamera() { return x7c_fpCamera; } + const CFirstPersonCamera* GetFirstPersonCamera() const { return x7c_fpCamera; } + CBallCamera* GetBallCamera() { return x80_ballCamera; } + const CBallCamera* GetBallCamera() const { return x80_ballCamera; } + CGameArea::CAreaFog& Fog() { return x3c_fog; } + const CGameArea::CAreaFog& Fog() const { return x3c_fog; } float GetCameraBobMagnitude() const; @@ -127,7 +132,7 @@ public: void UpdateRumble(float dt, CStateManager& mgr); void UpdateListener(CStateManager& mgr); - float CalculateFogDensity(CStateManager&, const CScriptWater*); + float CalculateFogDensity(CStateManager&, const CScriptWater*) const; void SetFogDensity(float, float); void ProcessInput(const CFinalInput& input, CStateManager& stateMgr); diff --git a/Runtime/Camera/CFirstPersonCamera.cpp b/Runtime/Camera/CFirstPersonCamera.cpp index ecb686b96..4787309d9 100644 --- a/Runtime/Camera/CFirstPersonCamera.cpp +++ b/Runtime/Camera/CFirstPersonCamera.cpp @@ -67,7 +67,7 @@ void CFirstPersonCamera::SkipCinematic() { } void CFirstPersonCamera::CalculateGunFollowOrientationAndTransform(zeus::CTransform& gunXf, zeus::CQuaternion& gunQ, - float dt, zeus::CVector3f& rVec) { + float dt, zeus::CVector3f& rVec) const { zeus::CVector3f gunFrontVec = x190_gunFollowXf.frontVector(); gunFrontVec.z() = 0.f; if (gunFrontVec.canBeNormalized()) diff --git a/Runtime/Camera/CFirstPersonCamera.hpp b/Runtime/Camera/CFirstPersonCamera.hpp index 97f92b8d0..8ba630252 100644 --- a/Runtime/Camera/CFirstPersonCamera.hpp +++ b/Runtime/Camera/CFirstPersonCamera.hpp @@ -28,7 +28,7 @@ public: const zeus::CTransform& GetGunFollowTransform() const { return x190_gunFollowXf; } void UpdateTransform(CStateManager& mgr, float dt); void UpdateElevation(CStateManager& mgr); - void CalculateGunFollowOrientationAndTransform(zeus::CTransform&, zeus::CQuaternion&, float, zeus::CVector3f&); + void CalculateGunFollowOrientationAndTransform(zeus::CTransform&, zeus::CQuaternion&, float, zeus::CVector3f&) const; void SetScriptPitchId(TUniqueId uid) { x1c4_pitchId = uid; } void SetLockCamera(bool v) { x18c_lockCamera = v; } void DeferBallTransitionProcessing() { x1c6_24_deferBallTransitionProcessing = true; } diff --git a/Runtime/Camera/CGameCamera.cpp b/Runtime/Camera/CGameCamera.cpp index 67191410d..35db4f56c 100644 --- a/Runtime/Camera/CGameCamera.cpp +++ b/Runtime/Camera/CGameCamera.cpp @@ -63,7 +63,8 @@ zeus::CVector3f CGameCamera::ConvertToScreenSpace(const zeus::CVector3f& v) cons return mtx.multiplyOneOverW(rVec); } -zeus::CTransform CGameCamera::ValidateCameraTransform(const zeus::CTransform& newXf, const zeus::CTransform& oldXf) { +zeus::CTransform CGameCamera::ValidateCameraTransform(const zeus::CTransform& newXf, + const zeus::CTransform& oldXf) const { zeus::CTransform xfCpy(newXf); if (!zeus::close_enough(newXf.rightVector().magnitude(), 1.f) || !zeus::close_enough(newXf.frontVector().magnitude(), 1.f) || diff --git a/Runtime/Camera/CGameCamera.hpp b/Runtime/Camera/CGameCamera.hpp index f98ce69b6..aadd77397 100644 --- a/Runtime/Camera/CGameCamera.hpp +++ b/Runtime/Camera/CGameCamera.hpp @@ -39,7 +39,7 @@ public: zeus::CMatrix4f GetPerspectiveMatrix() const; zeus::CVector3f ConvertToScreenSpace(const zeus::CVector3f&) const; - zeus::CTransform ValidateCameraTransform(const zeus::CTransform&, const zeus::CTransform&); + zeus::CTransform ValidateCameraTransform(const zeus::CTransform&, const zeus::CTransform&) const; float GetNearClipDistance() const { return x160_znear; } float GetFarClipDistance() const { return x164_zfar; } float GetAspectRatio() const { return x168_aspect; } diff --git a/Runtime/Character/CAdditiveBodyState.cpp b/Runtime/Character/CAdditiveBodyState.cpp index 61f09953f..2a4f0cb1d 100644 --- a/Runtime/Character/CAdditiveBodyState.cpp +++ b/Runtime/Character/CAdditiveBodyState.cpp @@ -31,7 +31,7 @@ void CABSAim::Start(CBodyController& bc, CStateManager& mgr) { x4_needsIdle = true; } -pas::EAnimationState CABSAim::GetBodyStateTransition(float dt, CBodyController& bc) { +pas::EAnimationState CABSAim::GetBodyStateTransition(float dt, CBodyController& bc) const { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::AdditiveReaction)) return pas::EAnimationState::AdditiveReaction; if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::AdditiveFlinch)) @@ -42,7 +42,7 @@ pas::EAnimationState CABSAim::GetBodyStateTransition(float dt, CBodyController& } pas::EAnimationState CABSAim::UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) { - pas::EAnimationState st = GetBodyStateTransition(dt, bc); + const pas::EAnimationState st = GetBodyStateTransition(dt, bc); if (st == pas::EAnimationState::Invalid) { const zeus::CVector3f& target = bc.GetCommandMgr().GetAdditiveTargetVector(); if (target.canBeNormalized()) { @@ -106,14 +106,14 @@ void CABSFlinch::Start(CBodyController& bc, CStateManager& mgr) { animData.AddAdditiveAnimation(x8_anim, x4_weight, false, true); } -pas::EAnimationState CABSFlinch::GetBodyStateTransition(float dt, CBodyController& bc) { +pas::EAnimationState CABSFlinch::GetBodyStateTransition(float dt, CBodyController& bc) const { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::AdditiveReaction)) return pas::EAnimationState::AdditiveReaction; return pas::EAnimationState::Invalid; } pas::EAnimationState CABSFlinch::UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) { - pas::EAnimationState st = GetBodyStateTransition(dt, bc); + const pas::EAnimationState st = GetBodyStateTransition(dt, bc); if (st == pas::EAnimationState::Invalid) { CAnimData& animData = *bc.GetOwner().ModelData()->AnimationData(); CCharAnimTime rem = animData.GetAdditiveAnimationTree(x8_anim)->VGetTimeRemaining(); @@ -123,7 +123,7 @@ pas::EAnimationState CABSFlinch::UpdateBody(float dt, CBodyController& bc, CStat return st; } -pas::EAnimationState CABSIdle::GetBodyStateTransition(float dt, CBodyController& bc) { +pas::EAnimationState CABSIdle::GetBodyStateTransition(float dt, CBodyController& bc) const { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::AdditiveReaction)) return pas::EAnimationState::AdditiveReaction; if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::AdditiveFlinch)) @@ -154,14 +154,14 @@ void CABSReaction::Start(CBodyController& bc, CStateManager& mgr) { } } -pas::EAnimationState CABSReaction::GetBodyStateTransition(float dt, CBodyController& bc) { +pas::EAnimationState CABSReaction::GetBodyStateTransition(float dt, CBodyController& bc) const { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::AdditiveReaction) && xc_type == pas::EAdditiveReactionType::IceBreakout) return pas::EAnimationState::AdditiveReaction; return pas::EAnimationState::Invalid; } pas::EAnimationState CABSReaction::UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) { - pas::EAnimationState st = GetBodyStateTransition(dt, bc); + const pas::EAnimationState st = GetBodyStateTransition(dt, bc); if (st == pas::EAnimationState::Invalid) { if (x8_anim == -1) return pas::EAnimationState::AdditiveIdle; diff --git a/Runtime/Character/CAdditiveBodyState.hpp b/Runtime/Character/CAdditiveBodyState.hpp index 1bdb65808..f65db08dd 100644 --- a/Runtime/Character/CAdditiveBodyState.hpp +++ b/Runtime/Character/CAdditiveBodyState.hpp @@ -26,7 +26,7 @@ class CABSAim : public CAdditiveBodyState { float x2c_hWeightVel = 0.f; float x30_vWeight = 0.f; float x34_vWeightVel = 0.f; - pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; public: void Start(CBodyController& bc, CStateManager& mgr) override; @@ -37,7 +37,7 @@ public: class CABSFlinch : public CAdditiveBodyState { float x4_weight = 1.f; u32 x8_anim = 0; - pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; public: void Start(CBodyController& bc, CStateManager& mgr) override; @@ -46,7 +46,7 @@ public: }; class CABSIdle : public CAdditiveBodyState { - pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; public: void Start(CBodyController& bc, CStateManager& mgr) override {} @@ -59,7 +59,7 @@ class CABSReaction : public CAdditiveBodyState { s32 x8_anim = -1; pas::EAdditiveReactionType xc_type = pas::EAdditiveReactionType::Invalid; bool x10_active = false; - pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; void StopAnimation(CBodyController& bc); public: diff --git a/Runtime/Character/CBodyState.cpp b/Runtime/Character/CBodyState.cpp index 0bdea5c66..d5b02ceda 100644 --- a/Runtime/Character/CBodyState.cpp +++ b/Runtime/Character/CBodyState.cpp @@ -242,7 +242,7 @@ void CBSGetup::Start(CBodyController& bc, CStateManager& mgr) { } } -pas::EAnimationState CBSGetup::GetBodyStateTransition(float dt, CBodyController& bc) { +pas::EAnimationState CBSGetup::GetBodyStateTransition(float dt, CBodyController& bc) const { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::Hurled)) return pas::EAnimationState::Hurled; if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::KnockDown)) @@ -289,7 +289,7 @@ void CBSKnockBack::Start(CBodyController& bc, CStateManager& mgr) { x4_curTime = 0.f; } -pas::EAnimationState CBSKnockBack::GetBodyStateTransition(float dt, CBodyController& bc) { +pas::EAnimationState CBSKnockBack::GetBodyStateTransition(float dt, CBodyController& bc) const { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::Hurled)) return pas::EAnimationState::Hurled; if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::KnockDown)) @@ -332,7 +332,7 @@ void CBSLieOnGround::Start(CBodyController& bc, CStateManager& mgr) { } } -pas::EAnimationState CBSLieOnGround::GetBodyStateTransition(float dt, CBodyController& bc) { +pas::EAnimationState CBSLieOnGround::GetBodyStateTransition(float dt, CBodyController& bc) const { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::Die)) return pas::EAnimationState::Death; if (x4_24_hasGroundHit && bc.GetCommandMgr().GetCmd(EBodyStateCmd::KnockBack)) @@ -355,7 +355,7 @@ void CBSStep::Start(CBodyController& bc, CStateManager& mgr) { bc.PlayBestAnimation(parms, *mgr.GetActiveRandom()); } -pas::EAnimationState CBSStep::GetBodyStateTransition(float dt, CBodyController& bc) { +pas::EAnimationState CBSStep::GetBodyStateTransition(float dt, CBodyController& bc) const { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::Hurled)) return pas::EAnimationState::Hurled; if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::KnockDown)) @@ -425,7 +425,7 @@ bool CBSTurn::FacingDest(CBodyController& bc) const { return false; } -pas::EAnimationState CBSTurn::GetBodyStateTransition(float dt, CBodyController& bc) { +pas::EAnimationState CBSTurn::GetBodyStateTransition(float dt, CBodyController& bc) const { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::Hurled)) return pas::EAnimationState::Hurled; if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::KnockDown)) @@ -526,7 +526,7 @@ void CBSLoopAttack::Start(CBodyController& bc, CStateManager& mgr) { } } -pas::EAnimationState CBSLoopAttack::GetBodyStateTransition(float dt, CBodyController& bc) { +pas::EAnimationState CBSLoopAttack::GetBodyStateTransition(float dt, CBodyController& bc) const { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::Hurled)) return pas::EAnimationState::Hurled; if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::KnockDown)) @@ -622,7 +622,7 @@ void CBSLoopReaction::Start(CBodyController& bc, CStateManager& mgr) { } } -pas::EAnimationState CBSLoopReaction::GetBodyStateTransition(float dt, CBodyController& bc) { +pas::EAnimationState CBSLoopReaction::GetBodyStateTransition(float dt, CBodyController& bc) const { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::Hurled)) return pas::EAnimationState::Hurled; if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::KnockDown)) @@ -734,7 +734,7 @@ void CBSGroundHit::Start(CBodyController& bc, CStateManager& mgr) { xc_fallState = pas::EFallState(groundHitState->GetAnimParmData(best.second, 3).GetEnumValue()); } -pas::EAnimationState CBSGroundHit::GetBodyStateTransition(float dt, CBodyController& bc) { +pas::EAnimationState CBSGroundHit::GetBodyStateTransition(float dt, CBodyController& bc) const { if (bc.IsAnimationOver()) { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::Die)) return pas::EAnimationState::Death; @@ -777,7 +777,7 @@ void CBSGenerate::Start(CBodyController& bc, CStateManager& mgr) { } } -pas::EAnimationState CBSGenerate::GetBodyStateTransition(float dt, CBodyController& bc) { +pas::EAnimationState CBSGenerate::GetBodyStateTransition(float dt, CBodyController& bc) const { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::Hurled)) return pas::EAnimationState::Hurled; if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::KnockDown)) @@ -819,7 +819,7 @@ void CBSJump::Start(CBodyController& bc, CStateManager& mgr) { } } -pas::EAnimationState CBSJump::GetBodyStateTransition(float dt, CBodyController& bc) { +pas::EAnimationState CBSJump::GetBodyStateTransition(float dt, CBodyController& bc) const { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::Hurled)) return pas::EAnimationState::Hurled; if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::KnockDown)) @@ -991,7 +991,7 @@ void CBSHurled::Start(CBodyController& bc, CStateManager& mgr) { x2c_24_needsRecover = false; } -pas::EAnimationState CBSHurled::GetBodyStateTransition(float dt, CBodyController& bc) { +pas::EAnimationState CBSHurled::GetBodyStateTransition(float dt, CBodyController& bc) const { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::NextState)) return pas::EAnimationState::LieOnGround; if (x18_curTime > 0.25f) { @@ -1165,7 +1165,7 @@ void CBSSlide::Start(CBodyController& bc, CStateManager& mgr) { } } -pas::EAnimationState CBSSlide::GetBodyStateTransition(float dt, CBodyController& bc) { +pas::EAnimationState CBSSlide::GetBodyStateTransition(float dt, CBodyController& bc) const { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::Hurled)) return pas::EAnimationState::Hurled; if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::KnockDown)) @@ -1195,7 +1195,7 @@ void CBSTaunt::Start(CBodyController& bc, CStateManager& mgr) { bc.PlayBestAnimation(parms, *mgr.GetActiveRandom()); } -pas::EAnimationState CBSTaunt::GetBodyStateTransition(float dt, CBodyController& bc) { +pas::EAnimationState CBSTaunt::GetBodyStateTransition(float dt, CBodyController& bc) const { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::Hurled)) return pas::EAnimationState::Hurled; if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::KnockDown)) @@ -1227,7 +1227,7 @@ void CBSScripted::Start(CBodyController& bc, CStateManager& mgr) { bc.SetCurrentAnimation(playParms, cmd->IsLooped(), false); } -pas::EAnimationState CBSScripted::GetBodyStateTransition(float dt, CBodyController& bc) { +pas::EAnimationState CBSScripted::GetBodyStateTransition(float dt, CBodyController& bc) const { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::Hurled)) return pas::EAnimationState::Hurled; if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::KnockDown)) @@ -1275,7 +1275,7 @@ void CBSCover::Start(CBodyController& bc, CStateManager& mgr) { xc_needsExit = true; } -pas::EAnimationState CBSCover::GetBodyStateTransition(float dt, CBodyController& bc) { +pas::EAnimationState CBSCover::GetBodyStateTransition(float dt, CBodyController& bc) const { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::Hurled)) return pas::EAnimationState::Hurled; if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::KnockDown)) @@ -1342,7 +1342,7 @@ void CBSWallHang::Start(CBodyController& bc, CStateManager& mgr) { bc.PlayBestAnimation(parms, *mgr.GetActiveRandom()); } -pas::EAnimationState CBSWallHang::GetBodyStateTransition(float dt, CBodyController& bc) { +pas::EAnimationState CBSWallHang::GetBodyStateTransition(float dt, CBodyController& bc) const { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::Hurled)) return pas::EAnimationState::Hurled; if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::KnockDown)) @@ -1595,7 +1595,7 @@ bool CBSWallHang::ApplyGravity() const { } } -float CBSLocomotion::GetStartVelocityMagnitude(CBodyController& bc) { +float CBSLocomotion::GetStartVelocityMagnitude(const CBodyController& bc) const { if (TCastToPtr act = bc.GetOwner()) { float maxSpeed = bc.GetBodyStateInfo().GetMaxSpeed(); float ret = 0.f; diff --git a/Runtime/Character/CBodyState.hpp b/Runtime/Character/CBodyState.hpp index fddd68fa9..dc2112efc 100644 --- a/Runtime/Character/CBodyState.hpp +++ b/Runtime/Character/CBodyState.hpp @@ -77,7 +77,7 @@ public: class CBSGetup : public CBodyState { pas::EFallState x4_fallState = pas::EFallState::Invalid; - pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; public: void Start(CBodyController& bc, CStateManager& mgr) override; @@ -89,7 +89,7 @@ class CBSKnockBack : public CBodyState { float x4_curTime = 0.f; float x8_rotateSpeed = 0.f; float xc_remTime = 0.f; - pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; public: bool IsMoving() const override { return true; } @@ -100,7 +100,7 @@ public: class CBSLieOnGround : public CBodyState { bool x4_24_hasGroundHit : 1; - pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; public: CBSLieOnGround(CActor& actor); @@ -110,7 +110,7 @@ public: }; class CBSStep : public CBodyState { - pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; public: bool IsMoving() const override { return true; } @@ -132,7 +132,7 @@ public: void Start(CBodyController& bc, CStateManager& mgr) override; pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; void Shutdown(CBodyController&) override {} - virtual pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); + virtual pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; }; class CBSFlyerTurn : public CBSTurn { @@ -146,7 +146,7 @@ class CBSLoopAttack : public CBodyState { pas::ELoopAttackType x8_loopAttackType = pas::ELoopAttackType::Invalid; bool xc_24_waitForAnimOver : 1; bool xc_25_advance : 1; - pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; public: CBSLoopAttack() { @@ -163,7 +163,7 @@ class CBSLoopReaction : public CBodyState { pas::ELoopState x4_state = pas::ELoopState::Invalid; pas::EReactionType x8_reactionType = pas::EReactionType::Invalid; bool xc_24_loopHit : 1; - pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; bool PlayExitAnimation(CBodyController& bc, CStateManager& mgr) const; public: @@ -177,7 +177,7 @@ class CBSGroundHit : public CBodyState { float x4_rotateSpeed = 0.f; float x8_remTime = 0.f; pas::EFallState xc_fallState = pas::EFallState::Invalid; - pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; public: void Start(CBodyController& bc, CStateManager& mgr) override; @@ -186,7 +186,7 @@ public: }; class CBSGenerate : public CBodyState { - pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; public: void Start(CBodyController& bc, CStateManager& mgr) override; @@ -210,7 +210,7 @@ class CBSJump : public CBodyState { }; u32 _dummy = 0; }; - pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; bool CheckForWallJump(CBodyController& bc, CStateManager& mgr); void CheckForLand(CBodyController& bc, CStateManager& mgr); void PlayJumpLoop(CStateManager& mgr, CBodyController& bc); @@ -236,7 +236,7 @@ class CBSHurled : public CBodyState { mutable zeus::CVector3f x1c_lastTranslation; mutable float x28_landedDur = 0.f; bool x2c_24_needsRecover : 1; - pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; void Recover(CStateManager& mgr, CBodyController& bc, pas::EHurledState state); void PlayStrikeWallAnimation(CBodyController& bc, CStateManager& mgr); void PlayLandAnimation(CBodyController& bc, CStateManager& mgr); @@ -255,7 +255,7 @@ public: class CBSSlide : public CBodyState { float x4_rotateSpeed = 0.f; - pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; public: bool ApplyHeadTracking() const override { return false; } @@ -266,7 +266,7 @@ public: }; class CBSTaunt : public CBodyState { - pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; public: void Start(CBodyController& bc, CStateManager& mgr) override; @@ -283,7 +283,7 @@ class CBSScripted : public CBodyState { u32 _dummy = 0; }; float x8_remTime = 0.f; - pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; public: bool ApplyHeadTracking() const override { return false; } @@ -296,7 +296,7 @@ class CBSCover : public CBodyState { pas::ECoverState x4_state = pas::ECoverState::Invalid; pas::ECoverDirection x8_coverDirection = pas::ECoverDirection::Invalid; bool xc_needsExit = false; - pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; public: bool ApplyHeadTracking() const override { return false; } @@ -318,7 +318,7 @@ class CBSWallHang : public CBodyState { }; u32 _dummy = 0; }; - pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; void FixInPlace(CBodyController& bc); bool CheckForLand(CBodyController& bc, CStateManager& mgr); bool CheckForWall(CBodyController& bc, CStateManager& mgr); @@ -339,7 +339,7 @@ public: class CBSLocomotion : public CBodyState { protected: pas::ELocomotionType x4_locomotionType = pas::ELocomotionType::Invalid; - float GetStartVelocityMagnitude(CBodyController& bc); + float GetStartVelocityMagnitude(const CBodyController& bc) const; void ReStartBodyState(CBodyController& bc, bool maintainVel); float ComputeWeightPercentage(const std::pair& a, const std::pair& b, float f) const; diff --git a/Runtime/Character/CBodyStateInfo.cpp b/Runtime/Character/CBodyStateInfo.cpp index d9fdfb335..a71e46753 100644 --- a/Runtime/Character/CBodyStateInfo.cpp +++ b/Runtime/Character/CBodyStateInfo.cpp @@ -47,7 +47,7 @@ CBodyStateInfo::CBodyStateInfo(CActor& actor, EBodyType type) { x1c_additiveStates.push_back({pas::EAnimationState::AdditiveReaction, std::make_unique()}); } -std::unique_ptr CBodyStateInfo::SetupRestrictedFlyerBodyStates(int stateId, CActor& actor) { +std::unique_ptr CBodyStateInfo::SetupRestrictedFlyerBodyStates(int stateId, CActor& actor) const { switch (stateId) { case 0: return std::make_unique(); @@ -92,7 +92,7 @@ std::unique_ptr CBodyStateInfo::SetupRestrictedFlyerBodyStates(int s } } -std::unique_ptr CBodyStateInfo::SetupNewFlyerBodyStates(int stateId, CActor& actor) { +std::unique_ptr CBodyStateInfo::SetupNewFlyerBodyStates(int stateId, CActor& actor) const { switch (stateId) { case 0: return std::make_unique(); @@ -137,7 +137,7 @@ std::unique_ptr CBodyStateInfo::SetupNewFlyerBodyStates(int stateId, } } -std::unique_ptr CBodyStateInfo::SetupWallWalkerBodyStates(int stateId, CActor& actor) { +std::unique_ptr CBodyStateInfo::SetupWallWalkerBodyStates(int stateId, CActor& actor) const { switch (stateId) { case 0: return std::make_unique(); @@ -182,7 +182,7 @@ std::unique_ptr CBodyStateInfo::SetupWallWalkerBodyStates(int stateI } } -std::unique_ptr CBodyStateInfo::SetupPitchableBodyStates(int stateId, CActor& actor) { +std::unique_ptr CBodyStateInfo::SetupPitchableBodyStates(int stateId, CActor& actor) const { switch (stateId) { case 0: return std::make_unique(); @@ -227,7 +227,7 @@ std::unique_ptr CBodyStateInfo::SetupPitchableBodyStates(int stateId } } -std::unique_ptr CBodyStateInfo::SetupFlyerBodyStates(int stateId, CActor& actor) { +std::unique_ptr CBodyStateInfo::SetupFlyerBodyStates(int stateId, CActor& actor) const { switch (stateId) { case 0: return std::make_unique(); @@ -272,7 +272,7 @@ std::unique_ptr CBodyStateInfo::SetupFlyerBodyStates(int stateId, CA } } -std::unique_ptr CBodyStateInfo::SetupRestrictedBodyStates(int stateId, CActor& actor) { +std::unique_ptr CBodyStateInfo::SetupRestrictedBodyStates(int stateId, CActor& actor) const { switch (stateId) { case 0: return std::make_unique(); @@ -319,7 +319,7 @@ std::unique_ptr CBodyStateInfo::SetupRestrictedBodyStates(int stateI } } -std::unique_ptr CBodyStateInfo::SetupBiPedalBodyStates(int stateId, CActor& actor) { +std::unique_ptr CBodyStateInfo::SetupBiPedalBodyStates(int stateId, CActor& actor) const { switch (stateId) { case 0: return std::make_unique(); diff --git a/Runtime/Character/CBodyStateInfo.hpp b/Runtime/Character/CBodyStateInfo.hpp index fad5e8554..df2bb3333 100644 --- a/Runtime/Character/CBodyStateInfo.hpp +++ b/Runtime/Character/CBodyStateInfo.hpp @@ -17,13 +17,13 @@ class CBodyStateInfo { pas::EAnimationState x2c_additiveState = pas::EAnimationState::AdditiveIdle; float x30_maxPitch = 0.f; bool x34_24_changeLocoAtEndOfAnimOnly; - std::unique_ptr SetupRestrictedFlyerBodyStates(int stateId, CActor& actor); - std::unique_ptr SetupNewFlyerBodyStates(int stateId, CActor& actor); - std::unique_ptr SetupWallWalkerBodyStates(int stateId, CActor& actor); - std::unique_ptr SetupPitchableBodyStates(int stateId, CActor& actor); - std::unique_ptr SetupFlyerBodyStates(int stateId, CActor& actor); - std::unique_ptr SetupRestrictedBodyStates(int stateId, CActor& actor); - std::unique_ptr SetupBiPedalBodyStates(int stateId, CActor& actor); + std::unique_ptr SetupRestrictedFlyerBodyStates(int stateId, CActor& actor) const; + std::unique_ptr SetupNewFlyerBodyStates(int stateId, CActor& actor) const; + std::unique_ptr SetupWallWalkerBodyStates(int stateId, CActor& actor) const; + std::unique_ptr SetupPitchableBodyStates(int stateId, CActor& actor) const; + std::unique_ptr SetupFlyerBodyStates(int stateId, CActor& actor) const; + std::unique_ptr SetupRestrictedBodyStates(int stateId, CActor& actor) const; + std::unique_ptr SetupBiPedalBodyStates(int stateId, CActor& actor) const; public: CBodyStateInfo(CActor& actor, EBodyType type); diff --git a/Runtime/Character/CFBStreamedCompression.cpp b/Runtime/Character/CFBStreamedCompression.cpp index b85a02654..f87bf18b8 100644 --- a/Runtime/Character/CFBStreamedCompression.cpp +++ b/Runtime/Character/CFBStreamedCompression.cpp @@ -54,7 +54,7 @@ const u8* CFBStreamedCompression::GetBitstreamPointer() const { return chans; } -std::unique_ptr CFBStreamedCompression::GetRotationsAndOffsets(u32 words, CInputStream& in) { +std::unique_ptr CFBStreamedCompression::GetRotationsAndOffsets(u32 words, CInputStream& in) const { std::unique_ptr ret(new u32[words]); Header head; @@ -80,7 +80,7 @@ std::unique_ptr CFBStreamedCompression::GetRotationsAndOffsets(u32 words, return ret; } -u8* CFBStreamedCompression::ReadBoneChannelDescriptors(u8* out, CInputStream& in) { +u8* CFBStreamedCompression::ReadBoneChannelDescriptors(u8* out, CInputStream& in) const { u32 boneChanCount = in.readUint32Big(); *reinterpret_cast(out) = boneChanCount; out += 4; @@ -142,7 +142,7 @@ u8* CFBStreamedCompression::ReadBoneChannelDescriptors(u8* out, CInputStream& in return out; } -u32 CFBStreamedCompression::ComputeBitstreamWords(const u8* chans) { +u32 CFBStreamedCompression::ComputeBitstreamWords(const u8* chans) const { u32 boneChanCount = *reinterpret_cast(chans); chans += 4; @@ -188,7 +188,7 @@ u32 CFBStreamedCompression::ComputeBitstreamWords(const u8* chans) { return (totalBits * keyCount + 31) / 32; } -float CFBStreamedCompression::CalculateAverageVelocity(const u8* chans) { +float CFBStreamedCompression::CalculateAverageVelocity(const u8* chans) const { u32 boneChanCount = *reinterpret_cast(chans); chans += 4; diff --git a/Runtime/Character/CFBStreamedCompression.hpp b/Runtime/Character/CFBStreamedCompression.hpp index d24b03337..2e9fa1a06 100644 --- a/Runtime/Character/CFBStreamedCompression.hpp +++ b/Runtime/Character/CFBStreamedCompression.hpp @@ -56,10 +56,10 @@ private: float x10_averageVelocity; zeus::CVector3f x14_rootOffset; - u8* ReadBoneChannelDescriptors(u8* out, CInputStream& in); - u32 ComputeBitstreamWords(const u8* chans); - std::unique_ptr GetRotationsAndOffsets(u32 words, CInputStream& in); - float CalculateAverageVelocity(const u8* chans); + u8* ReadBoneChannelDescriptors(u8* out, CInputStream& in) const; + u32 ComputeBitstreamWords(const u8* chans) const; + std::unique_ptr GetRotationsAndOffsets(u32 words, CInputStream& in) const; + float CalculateAverageVelocity(const u8* chans) const; public: CFBStreamedCompression(CInputStream& in, IObjectStore& objStore, bool pc); diff --git a/Runtime/Character/CModelData.cpp b/Runtime/Character/CModelData.cpp index 1fa97defa..a9a434b08 100644 --- a/Runtime/Character/CModelData.cpp +++ b/Runtime/Character/CModelData.cpp @@ -154,7 +154,7 @@ void CModelData::SetInfraModel(const std::pair& modelSkin) { } } -bool CModelData::IsDefinitelyOpaque(EWhichModel which) { +bool CModelData::IsDefinitelyOpaque(EWhichModel which) const { if (x10_animData) { CSkinnedModel& model = PickAnimatedModel(which); return model.GetModelInst()->IsOpaque(); diff --git a/Runtime/Character/CModelData.hpp b/Runtime/Character/CModelData.hpp index 60bf68e9d..9013317e4 100644 --- a/Runtime/Character/CModelData.hpp +++ b/Runtime/Character/CModelData.hpp @@ -100,7 +100,7 @@ public: const std::unique_ptr& PickStaticModel(EWhichModel which) const; void SetXRayModel(const std::pair& modelSkin); void SetInfraModel(const std::pair& modelSkin); - bool IsDefinitelyOpaque(EWhichModel); + bool IsDefinitelyOpaque(EWhichModel) const; bool GetIsLoop() const; float GetAnimationDuration(int) const; void EnableLooping(bool); @@ -144,7 +144,7 @@ public: void SetScale(const zeus::CVector3f& scale) { x0_scale = scale; } bool HasAnimData() const { return x10_animData != nullptr; } bool HasNormalModel() const { return x1c_normalModel; } - bool HasModel(EWhichModel which) { + bool HasModel(EWhichModel which) const { if (x10_animData) { switch (which) { case EWhichModel::Normal: diff --git a/Runtime/Character/CSegStatementSet.hpp b/Runtime/Character/CSegStatementSet.hpp index 77f96da87..7017de90f 100644 --- a/Runtime/Character/CSegStatementSet.hpp +++ b/Runtime/Character/CSegStatementSet.hpp @@ -15,6 +15,7 @@ public: void Add(const CSegIdList& list, const CCharLayoutInfo& layout, const CSegStatementSet& other, float weight); CAnimPerSegmentData& operator[](const CSegId& idx) { return x4_segData[idx]; } + const CAnimPerSegmentData& operator[](const CSegId& idx) const { return x4_segData[idx]; } }; } // namespace urde diff --git a/Runtime/Collision/CMaterialList.hpp b/Runtime/Collision/CMaterialList.hpp index b6bbbf7e4..863eb5f7b 100644 --- a/Runtime/Collision/CMaterialList.hpp +++ b/Runtime/Collision/CMaterialList.hpp @@ -116,7 +116,7 @@ public: bool HasMaterial(EMaterialTypes type) const { return (x0_list & (1ull << u64(type))) != 0; } - bool SharesMaterials(const CMaterialList& other) { + bool SharesMaterials(const CMaterialList& other) const { for (u32 i = 0; i < 64; i++) { if ((x0_list & (1ull << i)) != 0 && (other.x0_list & (1ull << i)) != 0) return true; diff --git a/Runtime/Graphics/CBooRenderer.hpp b/Runtime/Graphics/CBooRenderer.hpp index 1e73eb524..401b60aec 100644 --- a/Runtime/Graphics/CBooRenderer.hpp +++ b/Runtime/Graphics/CBooRenderer.hpp @@ -279,15 +279,15 @@ public: void ReallyRenderFogVolume(const zeus::CColor& color, const zeus::CAABox& aabb, const CModel* model, const CSkinnedModel* sModel); - const boo::ObjToken& GetThermoPalette() { return x288_thermoPalette; } - const boo::ObjToken& GetFogRampTex() { return x1b8_fogVolumeRamp; } + const boo::ObjToken& GetThermoPalette() const { return x288_thermoPalette; } + const boo::ObjToken& GetFogRampTex() const { return x1b8_fogVolumeRamp; } const boo::ObjToken& GetRandomStaticEntropyTex() const { return m_staticEntropy->GetBooTexture(); } const boo::ObjToken& GetScanLinesEvenVBO() const { return m_scanLinesEvenVBO; } const boo::ObjToken& GetScanLinesOddVBO() const { return m_scanLinesOddVBO; } - const boo::ObjToken& GetClearTexture() { return m_clearTexture; } - const boo::ObjToken& GetBlackTexture() { return m_blackTexture; } - const boo::ObjToken& GetWhiteTexture() { return m_whiteTexture; } + const boo::ObjToken& GetClearTexture() const { return m_clearTexture; } + const boo::ObjToken& GetBlackTexture() const { return m_blackTexture; } + const boo::ObjToken& GetWhiteTexture() const { return m_whiteTexture; } boo::ObjToken GetColorTexture(const zeus::CColor& color); diff --git a/Runtime/Graphics/CTexture.hpp b/Runtime/Graphics/CTexture.hpp index 278caac7c..41596c514 100644 --- a/Runtime/Graphics/CTexture.hpp +++ b/Runtime/Graphics/CTexture.hpp @@ -33,8 +33,8 @@ private: EFontType m_ftype = EFontType::None; std::string m_dolphinName; - size_t ComputeMippedTexelCount(); - size_t ComputeMippedBlockCountDXT1(); + size_t ComputeMippedTexelCount() const; + size_t ComputeMippedBlockCountDXT1() const; void BuildI4FromGCN(CInputStream& in); void BuildI8FromGCN(CInputStream& in); void BuildIA4FromGCN(CInputStream& in); diff --git a/Runtime/Graphics/CTextureBoo.cpp b/Runtime/Graphics/CTextureBoo.cpp index e5382a3c0..ae3f13fb4 100644 --- a/Runtime/Graphics/CTextureBoo.cpp +++ b/Runtime/Graphics/CTextureBoo.cpp @@ -27,7 +27,7 @@ constexpr uint8_t Convert6To8(uint8_t v) { return (v << 2) | (v >> 4); } -size_t CTexture::ComputeMippedTexelCount() { +size_t CTexture::ComputeMippedTexelCount() const { size_t w = x4_w; size_t h = x6_h; size_t ret = w * h; @@ -41,7 +41,7 @@ size_t CTexture::ComputeMippedTexelCount() { return ret; } -size_t CTexture::ComputeMippedBlockCountDXT1() { +size_t CTexture::ComputeMippedBlockCountDXT1() const { size_t w = x4_w / 4; size_t h = x6_h / 4; size_t ret = w * h; diff --git a/Runtime/GuiSys/CGuiFrame.hpp b/Runtime/GuiSys/CGuiFrame.hpp index 0f774e968..091081aca 100644 --- a/Runtime/GuiSys/CGuiFrame.hpp +++ b/Runtime/GuiSys/CGuiFrame.hpp @@ -56,6 +56,7 @@ public: ~CGuiFrame(); CGuiSys& GetGuiSys() { return x8_guiSys; } + const CGuiSys& GetGuiSys() const { return x8_guiSys; } CAssetId GetAssetId() const { return x0_id; } CGuiLight* GetFrameLight(int idx) const { return m_indexedLights[idx]; } @@ -100,6 +101,7 @@ public: void ResetMouseState(); CGuiWidgetIdDB& GetWidgetIdDB() { return x18_idDB; } + const CGuiWidgetIdDB& GetWidgetIdDB() const { return x18_idDB; } static std::unique_ptr CreateFrame(CAssetId frmeId, CGuiSys& sys, CInputStream& in, CSimplePool* sp); }; diff --git a/Runtime/GuiSys/CGuiGroup.cpp b/Runtime/GuiSys/CGuiGroup.cpp index 24b80a424..60c44af16 100644 --- a/Runtime/GuiSys/CGuiGroup.cpp +++ b/Runtime/GuiSys/CGuiGroup.cpp @@ -28,6 +28,8 @@ void CGuiGroup::SelectWorkerWidget(int workerId, bool setActive, bool setVisible CGuiWidget* CGuiGroup::GetSelectedWidget() { return GetWorkerWidget(xbc_selectedWorker); } +const CGuiWidget* CGuiGroup::GetSelectedWidget() const { return GetWorkerWidget(xbc_selectedWorker); } + bool CGuiGroup::AddWorkerWidget(CGuiWidget* worker) { ++xb8_workerCount; return true; diff --git a/Runtime/GuiSys/CGuiGroup.hpp b/Runtime/GuiSys/CGuiGroup.hpp index 93d75d4c9..aec2ed07e 100644 --- a/Runtime/GuiSys/CGuiGroup.hpp +++ b/Runtime/GuiSys/CGuiGroup.hpp @@ -15,6 +15,7 @@ public: void SelectWorkerWidget(int workerId, bool setActive, bool setVisible); CGuiWidget* GetSelectedWidget(); + const CGuiWidget* GetSelectedWidget() const; bool AddWorkerWidget(CGuiWidget* worker) override; void OnActiveChange() override; diff --git a/Runtime/GuiSys/CGuiSys.hpp b/Runtime/GuiSys/CGuiSys.hpp index 3663cf808..d64a84921 100644 --- a/Runtime/GuiSys/CGuiSys.hpp +++ b/Runtime/GuiSys/CGuiSys.hpp @@ -39,6 +39,7 @@ public: CGuiSys(IFactory& resFactory, CSimplePool& resStore, EUsageMode mode); CSimplePool& GetResStore() { return x4_resStore; } + const CSimplePool& GetResStore() const { return x4_resStore; } EUsageMode GetUsageMode() const { return x8_mode; } void OnViewportResize(); diff --git a/Runtime/GuiSys/CHudMissileInterface.cpp b/Runtime/GuiSys/CHudMissileInterface.cpp index b864b1a79..214ca1cb8 100644 --- a/Runtime/GuiSys/CHudMissileInterface.cpp +++ b/Runtime/GuiSys/CHudMissileInterface.cpp @@ -228,7 +228,7 @@ void CHudMissileInterface::SetNumMissiles(int numMissiles, const CStateManager& void CHudMissileInterface::SetMissileCapacity(int missileCapacity) { x4_missileCapacity = missileCapacity; } -CHudMissileInterface::EInventoryStatus CHudMissileInterface::GetMissileInventoryStatus() { +CHudMissileInterface::EInventoryStatus CHudMissileInterface::GetMissileInventoryStatus() const { if (x64_energybart01_missilebar->GetSetEnergy() == 0.f) return EInventoryStatus::Depleted; return EInventoryStatus(x64_energybart01_missilebar->GetActualFraction() < g_tweakGui->GetMissileWarningFraction()); diff --git a/Runtime/GuiSys/CHudMissileInterface.hpp b/Runtime/GuiSys/CHudMissileInterface.hpp index c0a70f35c..7f270eddc 100644 --- a/Runtime/GuiSys/CHudMissileInterface.hpp +++ b/Runtime/GuiSys/CHudMissileInterface.hpp @@ -55,7 +55,7 @@ public: void SetChargeBeamFactor(float t); void SetNumMissiles(int numMissiles, const CStateManager& mgr); void SetMissileCapacity(int missileCapacity); - EInventoryStatus GetMissileInventoryStatus(); + EInventoryStatus GetMissileInventoryStatus() const; static std::pair CombatMissileBarCoordFunc(float t); static std::pair XRayMissileBarCoordFunc(float t); static std::pair ThermalMissileBarCoordFunc(float t); diff --git a/Runtime/GuiSys/COrbitPointMarker.cpp b/Runtime/GuiSys/COrbitPointMarker.cpp index 7e1b00982..765732db4 100644 --- a/Runtime/GuiSys/COrbitPointMarker.cpp +++ b/Runtime/GuiSys/COrbitPointMarker.cpp @@ -14,7 +14,7 @@ COrbitPointMarker::COrbitPointMarker() { x28_orbitPointModel = g_SimplePool->GetObj("CMDL_OrbitPoint"); } -bool COrbitPointMarker::CheckLoadComplete() { return x28_orbitPointModel.IsLoaded(); } +bool COrbitPointMarker::CheckLoadComplete() const { return x28_orbitPointModel.IsLoaded(); } void COrbitPointMarker::Update(float dt, const CStateManager& mgr) { x24_curTime += dt; diff --git a/Runtime/GuiSys/COrbitPointMarker.hpp b/Runtime/GuiSys/COrbitPointMarker.hpp index 426a07f61..2764ea817 100644 --- a/Runtime/GuiSys/COrbitPointMarker.hpp +++ b/Runtime/GuiSys/COrbitPointMarker.hpp @@ -20,7 +20,7 @@ class COrbitPointMarker { public: COrbitPointMarker(); - bool CheckLoadComplete(); + bool CheckLoadComplete() const; void Update(float dt, const CStateManager& mgr); void Draw(const CStateManager& mgr) const; }; diff --git a/Runtime/IVParamObj.hpp b/Runtime/IVParamObj.hpp index 81239514f..424ec9a19 100644 --- a/Runtime/IVParamObj.hpp +++ b/Runtime/IVParamObj.hpp @@ -17,6 +17,7 @@ class TObjOwnerParam : public IVParamObj { public: TObjOwnerParam(T&& obj) : m_param(std::move(obj)) {} T& GetParam() { return m_param; } + const T& GetParam() const { return m_param; } }; class CVParamTransfer { @@ -27,7 +28,7 @@ public: CVParamTransfer(IVParamObj* obj) : m_ref(obj) {} CVParamTransfer(const CVParamTransfer& other) : m_ref(other.m_ref) {} IVParamObj* GetObj() const { return m_ref.get(); } - CVParamTransfer ShareTransferRef() { return CVParamTransfer(*this); } + CVParamTransfer ShareTransferRef() const { return CVParamTransfer(*this); } template T& GetOwnedObj() const { diff --git a/Runtime/MP1/CMemoryCardDriver.cpp b/Runtime/MP1/CMemoryCardDriver.cpp index 83af7e998..ccbc08a4b 100644 --- a/Runtime/MP1/CMemoryCardDriver.cpp +++ b/Runtime/MP1/CMemoryCardDriver.cpp @@ -57,7 +57,7 @@ ECardResult CMemoryCardDriver::SFileInfo::FileRead() { } } -ECardResult CMemoryCardDriver::SFileInfo::GetSaveDataOffset(u32& offOut) { +ECardResult CMemoryCardDriver::SFileInfo::GetSaveDataOffset(u32& offOut) const { CMemoryCardSys::CardStat stat = {}; ECardResult result = CMemoryCardSys::GetStatus(x0_fileInfo.slot, x0_fileInfo.getFileNo(), stat); if (result != ECardResult::READY) { @@ -135,7 +135,7 @@ void CMemoryCardDriver::NoCardFound() { static_cast(g_Main)->SetCardBusy(false); } -const CGameState::GameFileStateInfo* CMemoryCardDriver::GetGameFileStateInfo(int idx) { +const CGameState::GameFileStateInfo* CMemoryCardDriver::GetGameFileStateInfo(int idx) const { SGameFileSlot* slot = xe4_fileSlots[idx].get(); if (!slot) return nullptr; diff --git a/Runtime/MP1/CMemoryCardDriver.hpp b/Runtime/MP1/CMemoryCardDriver.hpp index a88113364..0618e7972 100644 --- a/Runtime/MP1/CMemoryCardDriver.hpp +++ b/Runtime/MP1/CMemoryCardDriver.hpp @@ -78,7 +78,7 @@ private: kabufuda::ECardResult StartRead(); kabufuda::ECardResult TryFileRead(); kabufuda::ECardResult FileRead(); - kabufuda::ECardResult GetSaveDataOffset(u32& offOut); + kabufuda::ECardResult GetSaveDataOffset(u32& offOut) const; }; struct SSaveHeader { @@ -126,7 +126,7 @@ public: bool importPersistent); void NoCardFound(); - const CGameState::GameFileStateInfo* GetGameFileStateInfo(int idx); + const CGameState::GameFileStateInfo* GetGameFileStateInfo(int idx) const; static SSaveHeader LoadSaveHeader(CMemoryInStream& in); static std::unique_ptr LoadSaveFile(CMemoryInStream& in); void ReadFinished(); diff --git a/Runtime/MP1/CSaveGameScreen.hpp b/Runtime/MP1/CSaveGameScreen.hpp index 81f413d79..13445044e 100644 --- a/Runtime/MP1/CSaveGameScreen.hpp +++ b/Runtime/MP1/CSaveGameScreen.hpp @@ -41,7 +41,7 @@ public: SaveReady = 16 }; - bool IsHiddenFromFrontEnd() { + bool IsHiddenFromFrontEnd() const { switch (x10_uiType) { case EUIType::SaveReady: case EUIType::Empty: diff --git a/Runtime/MP1/MP1.hpp b/Runtime/MP1/MP1.hpp index 5a91cede1..416b8feea 100644 --- a/Runtime/MP1/MP1.hpp +++ b/Runtime/MP1/MP1.hpp @@ -172,7 +172,7 @@ public: void Update(); void Draw(); - bool isRectDirty() { return m_rectIsDirty; } + bool isRectDirty() const { return m_rectIsDirty; } const boo::SWindowRect& getWindowRect() { m_rectIsDirty = false; return m_windowRect; @@ -278,8 +278,8 @@ public: void MemoryCardInitializePump(); - bool CheckReset() { return m_doQuit; } - bool CheckTerminate() { return m_doQuit; } + bool CheckReset() const { return m_doQuit; } + bool CheckTerminate() const { return m_doQuit; } void DrawDebugMetrics(double, CStopwatch&) {} void DoPredrawMetrics() {} void FillInAssetIDs(); diff --git a/Runtime/MP1/World/CBabygoth.cpp b/Runtime/MP1/World/CBabygoth.cpp index b924becfa..0894079ce 100644 --- a/Runtime/MP1/World/CBabygoth.cpp +++ b/Runtime/MP1/World/CBabygoth.cpp @@ -1131,7 +1131,7 @@ void CBabygoth::UpdateHealthInfo(CStateManager& mgr) { } } -float CBabygoth::CalculateShellCrackHP(EShellState state) { +float CBabygoth::CalculateShellCrackHP(EShellState state) const { if (state == EShellState::Default) return x570_babyData.GetShellHitPoints(); else if (state == EShellState::CrackOne) diff --git a/Runtime/MP1/World/CBabygoth.hpp b/Runtime/MP1/World/CBabygoth.hpp index 5d05ca855..d3b4cc98a 100644 --- a/Runtime/MP1/World/CBabygoth.hpp +++ b/Runtime/MP1/World/CBabygoth.hpp @@ -50,7 +50,7 @@ public: const CDamageInfo& GetFireBreathDamage() const { return x4c_fireBreathDamage; } const CDamageVulnerability& GetShellDamageVulnerability() const { return xd0_shellVulnerabilities; } float GetShellHitPoints() const { return x140_shellHitPoints; } - s16 GetShellCrackSfx() { return x144_shellCrackSfx; } + s16 GetShellCrackSfx() const { return x144_shellCrackSfx; } }; class CBabygoth final : public CPatterned { @@ -130,9 +130,9 @@ private: void ApplySeparationBehavior(CStateManager&); - bool IsMouthCollisionActor(TUniqueId uid) { return x9f6_mouthCollisionActor == uid; } + bool IsMouthCollisionActor(TUniqueId uid) const { return x9f6_mouthCollisionActor == uid; } - bool IsShell(TUniqueId uid) { + bool IsShell(TUniqueId uid) const { for (TUniqueId shellId : x9f8_shellIds) { if (shellId == uid) return true; @@ -172,7 +172,7 @@ private: void UpdateHealth(CStateManager&); - float CalculateShellCrackHP(EShellState state); + float CalculateShellCrackHP(EShellState state) const; void UpdateAttackTimeLeft(CStateManager& mgr); diff --git a/Runtime/MP1/World/CFlaahgra.cpp b/Runtime/MP1/World/CFlaahgra.cpp index 26fca64fd..70b8e591f 100644 --- a/Runtime/MP1/World/CFlaahgra.cpp +++ b/Runtime/MP1/World/CFlaahgra.cpp @@ -718,9 +718,9 @@ void CFlaahgra::TurnAround(CStateManager& mgr, EStateMsg msg, float) { x6cc_boneTracking->SetActive(false); } } -bool CFlaahgra::IsSphereCollider(TUniqueId uid) { - auto it = std::find(x7fc_sphereColliders.begin(), x7fc_sphereColliders.end(), uid); +bool CFlaahgra::IsSphereCollider(TUniqueId uid) const { + const auto it = std::find(x7fc_sphereColliders.cbegin(), x7fc_sphereColliders.cend(), uid); return it != x7fc_sphereColliders.end(); } @@ -800,7 +800,7 @@ void CFlaahgra::UpdateScale(float t, float min, float max) { ModelData()->SetScale(zeus::skOne3f * scale); } -float CFlaahgra::GetEndActionTime() { +float CFlaahgra::GetEndActionTime() const { CCharAnimTime eventTime = GetModelData()->GetAnimationData()->GetTimeOfUserEvent(EUserEventType::EndAction, CCharAnimTime::Infinity()); if (eventTime == CCharAnimTime::Infinity()) @@ -829,7 +829,7 @@ void CFlaahgra::Generate(CStateManager& mgr, EStateMsg msg, float) { x7c0_ = 11.f; } } -zeus::CVector3f CFlaahgra::GetAttacktargetPos(CStateManager& mgr) const { +zeus::CVector3f CFlaahgra::GetAttacktargetPos(const CStateManager& mgr) const { if (mgr.GetPlayer().GetMorphballTransitionState() == CPlayer::EPlayerMorphBallState::Morphed) return mgr.GetPlayer().GetMorphBall()->GetBallToWorld().origin; @@ -988,7 +988,7 @@ void CFlaahgra::Attack(CStateManager& mgr, EStateMsg msg, float arg) { } } -u32 CFlaahgra::sub801ae828(CStateManager& mgr) { +u32 CFlaahgra::sub801ae828(const CStateManager& mgr) const { const CPlayer& player = mgr.GetPlayer(); if (player.GetMorphballTransitionState() != CPlayer::EPlayerMorphBallState::Morphed) { if (x7cc_ > 0.f || player.GetVelocity().magSquared() < 25.f) @@ -1000,7 +1000,7 @@ u32 CFlaahgra::sub801ae828(CStateManager& mgr) { return 0; } -zeus::CVector3f CFlaahgra::sub801ae754(CStateManager& mgr) { +zeus::CVector3f CFlaahgra::sub801ae754(const CStateManager& mgr) const { float dt = (sub801ae650() && mgr.GetPlayer().GetMorphballTransitionState() != CPlayer::EPlayerMorphBallState::Morphed ? 0.75f : 0.5f); @@ -1170,7 +1170,7 @@ bool CFlaahgra::CoverCheck(CStateManager& mgr, float) { return false; } -TUniqueId CFlaahgra::GetMirrorNearestPlayer(CStateManager& mgr) { +TUniqueId CFlaahgra::GetMirrorNearestPlayer(const CStateManager& mgr) const { zeus::CVector3f playerPos = mgr.GetPlayer().GetTranslation(); TUniqueId nearId = kInvalidUniqueId; diff --git a/Runtime/MP1/World/CFlaahgra.hpp b/Runtime/MP1/World/CFlaahgra.hpp index 37cb7d6c8..f1bcf8cf0 100644 --- a/Runtime/MP1/World/CFlaahgra.hpp +++ b/Runtime/MP1/World/CFlaahgra.hpp @@ -164,23 +164,23 @@ class CFlaahgra : public CPatterned { void SetMaterialProperties(const std::unique_ptr&, CStateManager&); bool sub801ae650() const { return (x7a8_ == 0 || x7a8_ == 1); } bool sub801ae670() const { return (x7a8_ == 2 || x7a8_ == 3 || x7a8_ == 4); } - bool IsSphereCollider(TUniqueId); + bool IsSphereCollider(TUniqueId) const; void SetCollisionActorBounds(CStateManager& mgr, const std::unique_ptr& colMgr, const zeus::CVector3f& extendedBounds); void UpdateScale(float, float, float); - float GetEndActionTime(); + float GetEndActionTime() const; void SetupHealthInfo(CStateManager&); - zeus::CVector3f GetAttacktargetPos(CStateManager&) const; + zeus::CVector3f GetAttacktargetPos(const CStateManager&) const; void RattlePlayer(CStateManager& mgr, const zeus::CVector3f& vec); - bool sub801e4f8() { return x7a8_ == 0 || x7a8_ == 1; } + bool sub801e4f8() const { return x7a8_ == 0 || x7a8_ == 1; } void sub801ade80(); void UpdateHeadDamageVulnerability(CStateManager&, bool); - u32 sub801ae828(CStateManager&); - zeus::CVector3f sub801ae754(CStateManager&); + u32 sub801ae828(const CStateManager&) const; + zeus::CVector3f sub801ae754(const CStateManager&) const; - TUniqueId GetMirrorNearestPlayer(CStateManager&); + TUniqueId GetMirrorNearestPlayer(const CStateManager&) const; public: DEFINE_PATTERNED(Flaahgra); CFlaahgra(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, const CAnimRes&, diff --git a/Runtime/MP1/World/CJellyZap.cpp b/Runtime/MP1/World/CJellyZap.cpp index fb8f7e5a6..332742fab 100644 --- a/Runtime/MP1/World/CJellyZap.cpp +++ b/Runtime/MP1/World/CJellyZap.cpp @@ -164,16 +164,16 @@ void CJellyZap::RemoveSelfFromFishCloud(CStateManager&) {} void CJellyZap::RemoveAllAttractors(CStateManager& mgr) { RemoveSelfFromFishCloud(mgr); } -bool CJellyZap::ClosestToPlayer(CStateManager& mgr) { - zeus::CVector3f playerPos = mgr.GetPlayer().GetTranslation(); - float ourDistance = (playerPos - GetTranslation()).magnitude(); +bool CJellyZap::ClosestToPlayer(const CStateManager& mgr) const { + const zeus::CVector3f playerPos = mgr.GetPlayer().GetTranslation(); + const float ourDistance = (playerPos - GetTranslation()).magnitude(); float closestDistance = ourDistance; for (CEntity* ent : mgr.GetPhysicsActorObjectList()) { if (CJellyZap* zap = CPatterned::CastTo(ent)) { if (zap->GetAreaIdAlways() != GetAreaIdAlways()) continue; - float tmpDist = (playerPos - zap->GetTranslation()).magnitude(); + const float tmpDist = (playerPos - zap->GetTranslation()).magnitude(); if (tmpDist < closestDistance) closestDistance = tmpDist; diff --git a/Runtime/MP1/World/CJellyZap.hpp b/Runtime/MP1/World/CJellyZap.hpp index 601952bf9..ab89025c8 100644 --- a/Runtime/MP1/World/CJellyZap.hpp +++ b/Runtime/MP1/World/CJellyZap.hpp @@ -28,7 +28,7 @@ class CJellyZap : public CPatterned { void AddAttractor(CStateManager&); void RemoveSelfFromFishCloud(CStateManager&); void RemoveAllAttractors(CStateManager&); - bool ClosestToPlayer(CStateManager&); + bool ClosestToPlayer(const CStateManager&) const; public: DEFINE_PATTERNED(JellyZap) diff --git a/Runtime/MP1/World/CParasite.cpp b/Runtime/MP1/World/CParasite.cpp index 87fa9ad50..4c0fda628 100644 --- a/Runtime/MP1/World/CParasite.cpp +++ b/Runtime/MP1/World/CParasite.cpp @@ -785,13 +785,13 @@ bool CParasite::ShouldAttack(CStateManager& mgr, float arg) { return false; } -bool CParasite::CloseToWall(CStateManager& mgr) { +bool CParasite::CloseToWall(const CStateManager& mgr) const { static CMaterialFilter filter = CMaterialFilter::MakeInclude(EMaterialTypes::Solid); zeus::CAABox aabb = CPhysicsActor::GetBoundingBox(); - float margin = x590_colSphere.GetSphere().radius + x5b0_collisionCloseMargin; + const float margin = x590_colSphere.GetSphere().radius + x5b0_collisionCloseMargin; aabb.min -= zeus::CVector3f(margin); aabb.max += zeus::CVector3f(margin); - CCollidableAABox cAABB(aabb, x68_material); + const CCollidableAABox cAABB(aabb, x68_material); return CGameCollision::DetectStaticCollisionBoolean(mgr, cAABB, {}, filter); } diff --git a/Runtime/MP1/World/CParasite.hpp b/Runtime/MP1/World/CParasite.hpp index 379748915..744e0a34a 100644 --- a/Runtime/MP1/World/CParasite.hpp +++ b/Runtime/MP1/World/CParasite.hpp @@ -82,7 +82,7 @@ class CParasite : public CWallWalker { }; u16 _dummy = 0; }; - bool CloseToWall(CStateManager& mgr); + bool CloseToWall(const CStateManager& mgr) const; void FaceTarget(const zeus::CVector3f& target); TUniqueId RecursiveFindClosestWayPoint(CStateManager& mgr, TUniqueId id, float& dist); TUniqueId GetClosestWaypointForState(EScriptObjectState state, CStateManager& mgr); diff --git a/Runtime/MP1/World/CPuddleToadGamma.cpp b/Runtime/MP1/World/CPuddleToadGamma.cpp index 01c725258..6bb14a416 100644 --- a/Runtime/MP1/World/CPuddleToadGamma.cpp +++ b/Runtime/MP1/World/CPuddleToadGamma.cpp @@ -157,20 +157,20 @@ static CMaterialFilter kSolidFilter = CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Solid}, {EMaterialTypes::Character, EMaterialTypes::Player, EMaterialTypes::ProjectilePassthrough}); -bool CPuddleToadGamma::PlayerInVortexArea(const CStateManager& mgr) { - CPlayer& player = mgr.GetPlayer(); - zeus::CTransform xf = GetLctrTransform(mMouthLocatorName); +bool CPuddleToadGamma::PlayerInVortexArea(const CStateManager& mgr) const { + const CPlayer& player = mgr.GetPlayer(); + const zeus::CTransform xf = GetLctrTransform(mMouthLocatorName); - zeus::CVector3f playerOffset = + const zeus::CVector3f playerOffset = player.GetTranslation() + zeus::CVector3f{0.f, 0.f, player.GetMorphBall()->GetBallRadius()}; - zeus::CVector3f rotatedDir = GetTransform().rotate(zeus::skForward); + const zeus::CVector3f rotatedDir = GetTransform().rotate(zeus::skForward); - zeus::CVector3f suckPointToPlayer = (playerOffset - (xf.origin - (1.f * rotatedDir))); - float suckProj = suckPointToPlayer.normalized().dot(rotatedDir); - float playerDist = suckPointToPlayer.magnitude(); - float suckAngleProj = (player.GetTranslation() - (xf.origin - (4.f * rotatedDir))).normalized().dot(rotatedDir); + const zeus::CVector3f suckPointToPlayer = (playerOffset - (xf.origin - (1.f * rotatedDir))); + const float suckProj = suckPointToPlayer.normalized().dot(rotatedDir); + const float playerDist = suckPointToPlayer.magnitude(); + const float suckAngleProj = (player.GetTranslation() - (xf.origin - (4.f * rotatedDir))).normalized().dot(rotatedDir); if (playerDist > 2.f) { - CRayCastResult result = + const CRayCastResult result = mgr.RayStaticIntersection(suckPointToPlayer, 1.f / playerDist * suckPointToPlayer, playerDist - player.GetMorphBall()->GetBallRadius(), kSolidFilter); if (result.IsValid()) diff --git a/Runtime/MP1/World/CPuddleToadGamma.hpp b/Runtime/MP1/World/CPuddleToadGamma.hpp index 932668114..e09e346c4 100644 --- a/Runtime/MP1/World/CPuddleToadGamma.hpp +++ b/Runtime/MP1/World/CPuddleToadGamma.hpp @@ -32,7 +32,7 @@ class CPuddleToadGamma final : public CPatterned { static void CenterPlayer(CStateManager&, const zeus::CVector3f&, float); void ShootPlayer(CStateManager&, float); void SuckPlayer(CStateManager&, float); - bool PlayerInVortexArea(const CStateManager&); + bool PlayerInVortexArea(const CStateManager&) const; void SetPlayerPosition(CStateManager&, const zeus::CVector3f&); public: diff --git a/Runtime/MP1/World/CSpacePirate.cpp b/Runtime/MP1/World/CSpacePirate.cpp index 58ce860d6..432517bfa 100644 --- a/Runtime/MP1/World/CSpacePirate.cpp +++ b/Runtime/MP1/World/CSpacePirate.cpp @@ -516,7 +516,7 @@ void CSpacePirate::SquadRemove(CStateManager& mgr) { } } -bool CSpacePirate::CheckTargetable(CStateManager& mgr) { return GetModelAlphau8(mgr) > 127; } +bool CSpacePirate::CheckTargetable(const CStateManager& mgr) const { return GetModelAlphau8(mgr) > 127; } bool CSpacePirate::FireProjectile(float dt, CStateManager& mgr) { bool ret = false; @@ -619,7 +619,7 @@ void CSpacePirate::UpdateAttacks(float dt, CStateManager& mgr) { xe7_31_targetable = CheckTargetable(mgr); } -zeus::CVector3f CSpacePirate::GetTargetPos(CStateManager& mgr) { +zeus::CVector3f CSpacePirate::GetTargetPos(const CStateManager& mgr) { if (x7c0_targetId != mgr.GetPlayer().GetUniqueId()) { if (TCastToConstPtr act = mgr.GetObjectById(x7c0_targetId)) if (act->GetActive()) @@ -630,7 +630,7 @@ zeus::CVector3f CSpacePirate::GetTargetPos(CStateManager& mgr) { return mgr.GetPlayer().GetTranslation(); } -void CSpacePirate::UpdateAimBodyState(float dt, CStateManager& mgr) { +void CSpacePirate::UpdateAimBodyState(float dt, const CStateManager& mgr) { if (x400_25_alive && x637_25_enableAim && !x637_29_inWallHang && !x450_bodyController->IsFrozen() && !x634_27_melee && !x85c_ragDoll && (!x635_26_seated || x639_28_satUp) && x31c_faceVec.z() <= 0.f) { x8c4_aimDelayTimer = std::max(0.f, x8c4_aimDelayTimer - dt); @@ -1239,8 +1239,8 @@ void CSpacePirate::Dead(CStateManager& mgr, EStateMsg msg, float dt) { } } -bool CSpacePirate::LineOfSightTest(CStateManager& mgr, const zeus::CVector3f& eyePos, const zeus::CVector3f& targetPos, - const CMaterialList& excludeList) const { +bool CSpacePirate::LineOfSightTest(const CStateManager& mgr, const zeus::CVector3f& eyePos, + const zeus::CVector3f& targetPos, const CMaterialList& excludeList) const { return mgr.RayCollideWorld(eyePos, targetPos, CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Solid}, excludeList), this); } @@ -1555,14 +1555,14 @@ void CSpacePirate::Attack(CStateManager& mgr, EStateMsg msg, float dt) { } } -bool CSpacePirate::CantJumpBack(CStateManager& mgr, const zeus::CVector3f& dir, float dist) const { - zeus::CVector3f center = GetBoundingBox().center(); +bool CSpacePirate::CantJumpBack(const CStateManager& mgr, const zeus::CVector3f& dir, float dist) const { + const zeus::CVector3f center = GetBoundingBox().center(); if (!LineOfSightTest(mgr, center, center + dist * dir, {})) return false; - zeus::CVector3f center2 = (dist * 0.5f) * dir + center; + const zeus::CVector3f center2 = (dist * 0.5f) * dir + center; if (LineOfSightTest(mgr, center2, center2 + 5.f * zeus::skDown, {})) return false; - zeus::CVector3f center3 = dist * dir + center; + const zeus::CVector3f center3 = dist * dir + center; if (LineOfSightTest(mgr, center3, center3 + 5.f * zeus::skDown, {})) return false; return true; diff --git a/Runtime/MP1/World/CSpacePirate.hpp b/Runtime/MP1/World/CSpacePirate.hpp index 4fe491e26..9255ea833 100644 --- a/Runtime/MP1/World/CSpacePirate.hpp +++ b/Runtime/MP1/World/CSpacePirate.hpp @@ -225,11 +225,11 @@ private: void SquadReset(CStateManager& mgr); void SquadAdd(CStateManager& mgr); void SquadRemove(CStateManager& mgr); - bool CheckTargetable(CStateManager& mgr); + bool CheckTargetable(const CStateManager& mgr) const; bool FireProjectile(float dt, CStateManager& mgr); void UpdateAttacks(float dt, CStateManager& mgr); - zeus::CVector3f GetTargetPos(CStateManager& mgr); - void UpdateAimBodyState(float dt, CStateManager& mgr); + zeus::CVector3f GetTargetPos(const CStateManager& mgr); + void UpdateAimBodyState(float dt, const CStateManager& mgr); void SetCinematicCollision(CStateManager& mgr); void SetNonCinematicCollision(CStateManager& mgr); void CheckForProjectiles(CStateManager& mgr); @@ -237,11 +237,11 @@ private: void SetVelocityForJump(); void AvoidActors(CStateManager& mgr); void UpdateCantSeePlayer(CStateManager& mgr); - bool LineOfSightTest(CStateManager& mgr, const zeus::CVector3f& eyePos, const zeus::CVector3f& targetPos, + bool LineOfSightTest(const CStateManager& mgr, const zeus::CVector3f& eyePos, const zeus::CVector3f& targetPos, const CMaterialList& excludeList) const; void UpdateHeldPosition(CStateManager& mgr, float dt); void CheckBlade(CStateManager& mgr); - bool CantJumpBack(CStateManager& mgr, const zeus::CVector3f& dir, float dist) const; + bool CantJumpBack(const CStateManager& mgr, const zeus::CVector3f& dir, float dist) const; void UpdateLeashTimer(float dt); pas::EStepDirection GetStrafeDir(CStateManager& mgr, float dist) const; diff --git a/Runtime/MP1/World/CTryclops.cpp b/Runtime/MP1/World/CTryclops.cpp index 40cc03294..3cddfeb70 100644 --- a/Runtime/MP1/World/CTryclops.cpp +++ b/Runtime/MP1/World/CTryclops.cpp @@ -543,7 +543,7 @@ void CTryclops::DragPlayer(CStateManager& mgr, const zeus::CVector3f& locOrig) { player.SetTransform(xf); } -bool CTryclops::InRangeToLocator(const zeus::CVector3f& vec, float arg) { +bool CTryclops::InRangeToLocator(const zeus::CVector3f& vec, float arg) const { return (vec - GetLctrTransform("ballGrab_locator"sv).origin).magSquared() <= arg; } diff --git a/Runtime/MP1/World/CTryclops.hpp b/Runtime/MP1/World/CTryclops.hpp index d831a49b9..8a9801460 100644 --- a/Runtime/MP1/World/CTryclops.hpp +++ b/Runtime/MP1/World/CTryclops.hpp @@ -27,7 +27,7 @@ class CTryclops : public CPatterned { void ApplySeparation(CStateManager&); void GrabBomb(CStateManager& mgr); void DragPlayer(CStateManager& mgr, const zeus::CVector3f& locOrig); - bool InRangeToLocator(const zeus::CVector3f& vec, float); + bool InRangeToLocator(const zeus::CVector3f& vec, float) const; bool sub80260180(const zeus::CVector3f&, const zeus::CVector3f&, const zeus::CAABox&, CStateManager&); void SuckPlayer(CStateManager& mgr, float); void AttractPlayer(CStateManager& mgr, const zeus::CVector3f& dest, float); diff --git a/Runtime/MP1/World/CWarWasp.cpp b/Runtime/MP1/World/CWarWasp.cpp index 55c8d0d3a..9ea9add1f 100644 --- a/Runtime/MP1/World/CWarWasp.cpp +++ b/Runtime/MP1/World/CWarWasp.cpp @@ -124,7 +124,7 @@ std::optional CWarWasp::GetTouchBounds() const { return {x570_cSphere.CalculateAABox(GetTransform())}; } -zeus::CVector3f CWarWasp::GetProjectileAimPos(CStateManager& mgr, float zBias) { +zeus::CVector3f CWarWasp::GetProjectileAimPos(const CStateManager& mgr, float zBias) const { zeus::CVector3f ret = mgr.GetPlayer().GetAimPosition(mgr, 0.f); if (mgr.GetPlayer().GetMorphballTransitionState() != CPlayer::EPlayerMorphBallState::Morphed) ret += zeus::CVector3f(0.f, 0.f, zBias); @@ -353,7 +353,7 @@ void CWarWasp::ApplySeparationBehavior(CStateManager& mgr, float sep) { } } -bool CWarWasp::PathToHiveIsClear(CStateManager& mgr) { +bool CWarWasp::PathToHiveIsClear(CStateManager& mgr) const { zeus::CVector3f delta = x3a0_latestLeashPosition - GetTranslation(); if (GetTransform().basis[1].dot(delta) > 0.f) { zeus::CAABox aabb(GetTranslation() - 10.f, GetTranslation() + 10.f); @@ -652,7 +652,7 @@ void CWarWasp::JumpBack(CStateManager& mgr, EStateMsg msg, float dt) { } } -zeus::CVector3f CWarWasp::CalcShuffleDest(CStateManager& mgr) { +zeus::CVector3f CWarWasp::CalcShuffleDest(const CStateManager& mgr) const { zeus::CVector2f aimPos2d = GetProjectileAimPos(mgr, -1.25f).toVec2f(); zeus::CVector3f playerDir2d = mgr.GetPlayer().GetTransform().basis[1]; playerDir2d.z() = 0.f; @@ -754,7 +754,7 @@ void CWarWasp::ProjectileAttack(CStateManager& mgr, EStateMsg msg, float dt) { } } -s32 CWarWasp::GetAttackTeamSize(CStateManager& mgr, s32 team) { +s32 CWarWasp::GetAttackTeamSize(const CStateManager& mgr, s32 team) const { s32 count = 0; if (TCastToConstPtr aimgr = mgr.GetObjectById(x674_aiMgr)) { if (aimgr->IsPartOfTeam(GetUniqueId())) { @@ -769,21 +769,20 @@ s32 CWarWasp::GetAttackTeamSize(CStateManager& mgr, s32 team) { return count; } -float CWarWasp::CalcTimeToNextAttack(CStateManager& mgr) { +float CWarWasp::CalcTimeToNextAttack(CStateManager& mgr) const { float mul = 1.f; if (TCastToConstPtr aimgr = mgr.GetObjectById(x674_aiMgr)) { - s32 maxCount = (x3fc_flavor == EFlavorType::Two) ? - aimgr->GetMaxRangedAttackerCount() : aimgr->GetMaxMeleeAttackerCount(); - s32 count = (x3fc_flavor == EFlavorType::Two) ? - aimgr->GetNumAssignedOfRole(CTeamAiRole::ETeamAiRole::Ranged) : - aimgr->GetNumAssignedOfRole(CTeamAiRole::ETeamAiRole::Melee); + const s32 maxCount = + (x3fc_flavor == EFlavorType::Two) ? aimgr->GetMaxRangedAttackerCount() : aimgr->GetMaxMeleeAttackerCount(); + const s32 count = (x3fc_flavor == EFlavorType::Two) ? aimgr->GetNumAssignedOfRole(CTeamAiRole::ETeamAiRole::Ranged) + : aimgr->GetNumAssignedOfRole(CTeamAiRole::ETeamAiRole::Melee); if (count <= maxCount) mul *= 0.5f; } return (mgr.GetActiveRandom()->Float() * x308_attackTimeVariation + x304_averageAttackTime) * mul; } -float CWarWasp::CalcOffTotemAngle(CStateManager& mgr) { +float CWarWasp::CalcOffTotemAngle(CStateManager& mgr) const { return mgr.GetActiveRandom()->Float() * zeus::degToRad(80.f) + zeus::degToRad(10.f); } @@ -833,7 +832,7 @@ void CWarWasp::SetUpCircleTelegraphTeam(CStateManager& mgr) { } } -TUniqueId CWarWasp::GetAttackTeamLeader(CStateManager& mgr, s32 team) { +TUniqueId CWarWasp::GetAttackTeamLeader(const CStateManager& mgr, s32 team) const { if (TCastToConstPtr aimgr = mgr.GetObjectById(x674_aiMgr)) { if (aimgr->IsPartOfTeam(GetUniqueId())) { for (const CTeamAiRole& role : aimgr->GetRoles()) { @@ -866,7 +865,7 @@ void CWarWasp::TryCircleTeamMerge(CStateManager& mgr) { } } -float CWarWasp::GetTeamZStratum(s32 team) { +float CWarWasp::GetTeamZStratum(s32 team) const { if (team > 0) { if ((team & 1) == 1) return -3.f - float(team / 2) * 3.f; @@ -878,19 +877,19 @@ float CWarWasp::GetTeamZStratum(s32 team) { static const float Table[] = {0.4f, 0.6f, 1.f}; -float CWarWasp::CalcSeekMagnitude(CStateManager& mgr) { - float ret = ((x708_circleAttackTeam >= 0 && x708_circleAttackTeam < 3) ? Table[x708_circleAttackTeam] : 1.f) * 0.9f; +float CWarWasp::CalcSeekMagnitude(const CStateManager& mgr) const { + const float ret = ((x708_circleAttackTeam >= 0 && x708_circleAttackTeam < 3) ? Table[x708_circleAttackTeam] : 1.f) * 0.9f; if (TCastToConstPtr aimgr = mgr.GetObjectById(x674_aiMgr)) { if (aimgr->IsPartOfTeam(GetUniqueId())) { if (aimgr->GetMaxMeleeAttackerCount() > 1) { if (GetAttackTeamLeader(mgr, x708_circleAttackTeam) != GetUniqueId()) { - zeus::CVector3f fromPlatformCenter = GetTranslation() - x6b0_circleBurstPos; + const zeus::CVector3f fromPlatformCenter = GetTranslation() - x6b0_circleBurstPos; float minAngle = zeus::degToRad(360.f); for (const CTeamAiRole& role : aimgr->GetRoles()) { if (const CWarWasp* other = CPatterned::CastTo(mgr.GetObjectById(role.GetOwnerId()))) { if (x708_circleAttackTeam == other->x708_circleAttackTeam && GetTransform().basis[1].dot(other->GetTranslation() - GetTranslation()) > 0.f) { - float angle = + const float angle = zeus::CVector3f::getAngleDiff(fromPlatformCenter, other->GetTranslation() - x6b0_circleBurstPos); if (angle < minAngle) minAngle = angle; @@ -1155,14 +1154,14 @@ bool CWarWasp::ShouldDodge(CStateManager& mgr, float arg) { return false; } -bool CWarWasp::CheckCircleAttackSpread(CStateManager& mgr, s32 team) { +bool CWarWasp::CheckCircleAttackSpread(const CStateManager& mgr, s32 team) const { if (TCastToConstPtr aimgr = mgr.GetObjectById(x674_aiMgr)) { - s32 teamSize = GetAttackTeamSize(mgr, team); + const s32 teamSize = GetAttackTeamSize(mgr, team); if (teamSize == 1) return true; - TUniqueId leaderId = GetAttackTeamLeader(mgr, team); + const TUniqueId leaderId = GetAttackTeamLeader(mgr, team); if (const CWarWasp* leaderWasp = CPatterned::CastTo(mgr.GetObjectById(leaderId))) { - zeus::CVector3f platformToLeaderWasp = leaderWasp->GetTranslation() - x6b0_circleBurstPos; + const zeus::CVector3f platformToLeaderWasp = leaderWasp->GetTranslation() - x6b0_circleBurstPos; float maxAng = 0.f; for (const CTeamAiRole& role : aimgr->GetRoles()) { if (role.GetOwnerId() == leaderId) @@ -1171,7 +1170,7 @@ bool CWarWasp::CheckCircleAttackSpread(CStateManager& mgr, s32 team) { if (wasp2->x708_circleAttackTeam == team) { if (leaderWasp->GetTransform().basis[1].dot(wasp2->GetTranslation() - leaderWasp->GetTranslation()) > 0.f) return false; - float angle = + const float angle = zeus::CVector3f::getAngleDiff(wasp2->GetTranslation() - x6b0_circleBurstPos, platformToLeaderWasp); if (angle > maxAng) maxAng = angle; diff --git a/Runtime/MP1/World/CWarWasp.hpp b/Runtime/MP1/World/CWarWasp.hpp index ca2e5e1d5..ac6b6bc44 100644 --- a/Runtime/MP1/World/CWarWasp.hpp +++ b/Runtime/MP1/World/CWarWasp.hpp @@ -47,26 +47,26 @@ class CWarWasp : public CPatterned { void SwarmRemove(CStateManager& mgr); void ApplyDamage(CStateManager& mgr); void SetUpCircleBurstWaypoint(CStateManager& mgr); - zeus::CVector3f GetProjectileAimPos(CStateManager& mgr, float zBias); + zeus::CVector3f GetProjectileAimPos(const CStateManager& mgr, float zBias) const; zeus::CVector3f GetCloseInPos(const CStateManager& mgr, const zeus::CVector3f& aimPos) const; float GetCloseInZBasis(const CStateManager& mgr) const; void SetUpPathFindBehavior(CStateManager& mgr); - s32 GetAttackTeamSize(CStateManager& mgr, s32 team); - float CalcTimeToNextAttack(CStateManager& mgr); - float CalcOffTotemAngle(CStateManager& mgr); + s32 GetAttackTeamSize(const CStateManager& mgr, s32 team) const; + float CalcTimeToNextAttack(CStateManager& mgr) const; + float CalcOffTotemAngle(CStateManager& mgr) const; void JoinCircleAttackTeam(s32 unit, CStateManager& mgr); void SetUpCircleTelegraphTeam(CStateManager& mgr); - TUniqueId GetAttackTeamLeader(CStateManager& mgr, s32 team); + TUniqueId GetAttackTeamLeader(const CStateManager& mgr, s32 team) const; void TryCircleTeamMerge(CStateManager& mgr); - float GetTeamZStratum(s32 team); - float CalcSeekMagnitude(CStateManager& mgr); + float GetTeamZStratum(s32 team) const; + float CalcSeekMagnitude(const CStateManager& mgr) const; void UpdateTelegraphMoveSpeed(CStateManager& mgr); - bool CheckCircleAttackSpread(CStateManager& mgr, s32 team); + bool CheckCircleAttackSpread(const CStateManager& mgr, s32 team) const; void ApplyNormalSteering(CStateManager& mgr); void ApplySeparationBehavior(CStateManager& mgr, float sep); - bool PathToHiveIsClear(CStateManager& mgr); + bool PathToHiveIsClear(CStateManager& mgr) const; bool SteerToDeactivatePos(CStateManager& mgr, EStateMsg msg, float dt); - zeus::CVector3f CalcShuffleDest(CStateManager& mgr); + zeus::CVector3f CalcShuffleDest(const CStateManager& mgr) const; public: DEFINE_PATTERNED(WarWasp) diff --git a/Runtime/Particle/CElementGen.cpp b/Runtime/Particle/CElementGen.cpp index e5041bb1e..0923e61c2 100644 --- a/Runtime/Particle/CElementGen.cpp +++ b/Runtime/Particle/CElementGen.cpp @@ -566,7 +566,7 @@ void CElementGen::UpdatePSTranslationAndOrientation() { sepo->GetValue(x74_curFrame, x2c0_SEPO); } -std::unique_ptr CElementGen::ConstructChildParticleSystem(const TToken& desc) { +std::unique_ptr CElementGen::ConstructChildParticleSystem(const TToken& desc) const { CElementGen* ret = new CElementGen(desc, EModelOrientationType::Normal, x26d_27_enableOPTS ? EOptionalSystemFlags::Two : EOptionalSystemFlags::One); ret->x26d_26_modelsUseLights = x26d_26_modelsUseLights; diff --git a/Runtime/Particle/CElementGen.hpp b/Runtime/Particle/CElementGen.hpp index 275b6aad8..1c64ce375 100644 --- a/Runtime/Particle/CElementGen.hpp +++ b/Runtime/Particle/CElementGen.hpp @@ -172,7 +172,7 @@ public: void CreateNewParticles(int); void UpdatePSTranslationAndOrientation(); void UpdateChildParticleSystems(double); - std::unique_ptr ConstructChildParticleSystem(const TToken&); + std::unique_ptr ConstructChildParticleSystem(const TToken&) const; void UpdateLightParameters(); void BuildParticleSystemBounds(); u32 GetEmitterTime() const { return x74_curFrame; } diff --git a/Runtime/Weapon/CGrappleArm.hpp b/Runtime/Weapon/CGrappleArm.hpp index 7a21823b7..4b7378ffe 100644 --- a/Runtime/Weapon/CGrappleArm.hpp +++ b/Runtime/Weapon/CGrappleArm.hpp @@ -133,6 +133,7 @@ public: void EnterComboFire(s32 gunId, CStateManager& mgr); void ReturnToDefault(CStateManager& mgr, float dt, bool setState); CGunController* GunController() { return x328_gunController.get(); } + const CGunController* GunController() const { return x328_gunController.get(); } }; } // namespace urde diff --git a/Runtime/Weapon/CPlayerGun.cpp b/Runtime/Weapon/CPlayerGun.cpp index 080863948..f178a14ab 100644 --- a/Runtime/Weapon/CPlayerGun.cpp +++ b/Runtime/Weapon/CPlayerGun.cpp @@ -811,7 +811,7 @@ void CPlayerGun::ChangeWeapon(const CPlayerState& playerState, CStateManager& mg } void CPlayerGun::GetLctrWithShake(zeus::CTransform& xfOut, const CModelData& mData, std::string_view lctrName, - bool shake, bool dyn) { + bool shake, bool dyn) const { if (dyn) xfOut = mData.GetScaledLocatorTransformDynamic(lctrName, nullptr); else diff --git a/Runtime/Weapon/CPlayerGun.hpp b/Runtime/Weapon/CPlayerGun.hpp index 772709998..870cfadc4 100644 --- a/Runtime/Weapon/CPlayerGun.hpp +++ b/Runtime/Weapon/CPlayerGun.hpp @@ -284,7 +284,7 @@ private: void ReturnToRestPose(); void ChangeWeapon(const CPlayerState& playerState, CStateManager& mgr); void GetLctrWithShake(zeus::CTransform& xfOut, const CModelData& mData, std::string_view lctrName, bool shake, - bool dyn); + bool dyn) const; void UpdateLeftArmTransform(const CModelData& mData, const CStateManager& mgr); void ProcessGunMorph(float dt, CStateManager& mgr); void SetPhazonBeamFeedback(bool active); @@ -338,6 +338,7 @@ public: void SetTransform(const zeus::CTransform& xf) { x3e8_xf = xf; } void SetAssistAimTransform(const zeus::CTransform& xf) { x478_assistAimXf = xf; } CGrappleArm& GetGrappleArm() { return *x740_grappleArm; } + const CGrappleArm& GetGrappleArm() const { return *x740_grappleArm; } void DamageRumble(const zeus::CVector3f& location, float damage, const CStateManager& mgr); void ResetCharge(CStateManager& mgr, bool resetBeam); void HandleBeamChange(const CFinalInput& input, CStateManager& mgr); diff --git a/Runtime/Weapon/CProjectileInfo.cpp b/Runtime/Weapon/CProjectileInfo.cpp index 10edb3e89..01152f8ee 100644 --- a/Runtime/Weapon/CProjectileInfo.cpp +++ b/Runtime/Weapon/CProjectileInfo.cpp @@ -62,7 +62,7 @@ float CProjectileInfo::GetProjectileSpeed() const { } zeus::CVector3f CProjectileInfo::PredictInterceptPos(const zeus::CVector3f& gunPos, const zeus::CVector3f& aimPos, - const CPlayer& player, bool gravity, float dt) { + const CPlayer& player, bool gravity, float dt) const { return PredictInterceptPos(gunPos, aimPos, player, gravity, GetProjectileSpeed(), dt); } diff --git a/Runtime/Weapon/CProjectileInfo.hpp b/Runtime/Weapon/CProjectileInfo.hpp index 530fc424e..6d33ea26e 100644 --- a/Runtime/Weapon/CProjectileInfo.hpp +++ b/Runtime/Weapon/CProjectileInfo.hpp @@ -19,7 +19,7 @@ public: static zeus::CVector3f PredictInterceptPos(const zeus::CVector3f& gunPos, const zeus::CVector3f& aimPos, const CPlayer& player, bool gravity, float speed, float dt); zeus::CVector3f PredictInterceptPos(const zeus::CVector3f& gunPos, const zeus::CVector3f& aimPos, - const CPlayer& player, bool gravity, float dt); + const CPlayer& player, bool gravity, float dt) const; const CDamageInfo& GetDamage() const { return xc_damageInfo; } TToken& Token() { return x0_weaponDescription; } diff --git a/Runtime/World/CFishCloud.cpp b/Runtime/World/CFishCloud.cpp index 2e0f97fd4..7b8ea56e9 100644 --- a/Runtime/World/CFishCloud.cpp +++ b/Runtime/World/CFishCloud.cpp @@ -212,7 +212,7 @@ void CFishCloud::BuildBoidNearPartitionList(const zeus::CVector3f& pos, float ra } } -void CFishCloud::PlaceBoid(CStateManager& mgr, CBoid& boid, const zeus::CAABox& aabb) { +void CFishCloud::PlaceBoid(CStateManager& mgr, CBoid& boid, const zeus::CAABox& aabb) const { auto plane = FindClosestPlane(aabb, boid.x0_pos); boid.x0_pos -= plane.pointToPlaneDist(boid.x0_pos) * plane.normal() + 0.0001f * plane.normal(); boid.xc_vel.y() = mgr.GetActiveRandom()->Float() - 0.5f; diff --git a/Runtime/World/CFishCloud.hpp b/Runtime/World/CFishCloud.hpp index 52033a382..10e571141 100644 --- a/Runtime/World/CFishCloud.hpp +++ b/Runtime/World/CFishCloud.hpp @@ -100,7 +100,7 @@ class CFishCloud : public CActor { void BuildBoidNearList(const zeus::CVector3f& pos, float radius, rstl::reserved_vector& nearList); void BuildBoidNearPartitionList(const zeus::CVector3f& pos, float radius, rstl::reserved_vector& nearList); - void PlaceBoid(CStateManager& mgr, CBoid& boid, const zeus::CAABox& aabb); + void PlaceBoid(CStateManager& mgr, CBoid& boid, const zeus::CAABox& aabb) const; void ApplySeparation(CBoid& boid, const rstl::reserved_vector& nearList) const; void ApplySeparation(CBoid& boid, const zeus::CVector3f& separateFrom, float separationRadius, float separationMagnitude) const; diff --git a/Runtime/World/CGameArea.cpp b/Runtime/World/CGameArea.cpp index 4fe7c7e0a..20d67b559 100644 --- a/Runtime/World/CGameArea.cpp +++ b/Runtime/World/CGameArea.cpp @@ -895,7 +895,7 @@ void CGameArea::LoadScriptObjects(CStateManager& mgr) { mgr.InitScriptObjects(objIds); } -std::pair CGameArea::GetLayerScriptBuffer(int layer) { +std::pair CGameArea::GetLayerScriptBuffer(int layer) const { if (!xf0_24_postConstructed) return {}; return x12c_postConstructed->x110c_layerPtrs[layer]; diff --git a/Runtime/World/CGameArea.hpp b/Runtime/World/CGameArea.hpp index a411c44c4..8cf38094c 100644 --- a/Runtime/World/CGameArea.hpp +++ b/Runtime/World/CGameArea.hpp @@ -315,7 +315,7 @@ public: void StartStreamIn(CStateManager& mgr); void Validate(CStateManager& mgr); void LoadScriptObjects(CStateManager& mgr); - std::pair GetLayerScriptBuffer(int layer); + std::pair GetLayerScriptBuffer(int layer) const; void PostConstructArea(); void FillInStaticGeometry(bool textures = true); void VerifyTokenList(CStateManager& stateMgr); diff --git a/Runtime/World/CPathFindArea.cpp b/Runtime/World/CPathFindArea.cpp index 01444e87d..e2e22a927 100644 --- a/Runtime/World/CPathFindArea.cpp +++ b/Runtime/World/CPathFindArea.cpp @@ -116,7 +116,7 @@ void CPFOpenList::Pop(CPFRegion* reg) { reg->Data()->SetOpenLess(nullptr); } -bool CPFOpenList::Test(CPFRegion* reg) { return x0_bitSet.Test(reg->GetIndex()); } +bool CPFOpenList::Test(const CPFRegion* reg) const { return x0_bitSet.Test(reg->GetIndex()); } CPFArea::CPFArea(std::unique_ptr&& buf, u32 len) { CMemoryInStream r(buf.get(), len); diff --git a/Runtime/World/CPathFindArea.hpp b/Runtime/World/CPathFindArea.hpp index d844566d3..7b3b1dfe3 100644 --- a/Runtime/World/CPathFindArea.hpp +++ b/Runtime/World/CPathFindArea.hpp @@ -53,7 +53,7 @@ public: void Push(CPFRegion* reg); CPFRegion* Pop(); void Pop(CPFRegion* reg); - bool Test(CPFRegion* reg); + bool Test(const CPFRegion* reg) const; }; class CPFArea { diff --git a/Runtime/World/CPathFindRegion.cpp b/Runtime/World/CPathFindRegion.cpp index cfb86be85..93518c335 100644 --- a/Runtime/World/CPathFindRegion.cpp +++ b/Runtime/World/CPathFindRegion.cpp @@ -66,7 +66,7 @@ float CPFRegion::PointHeight(const zeus::CVector3f& point) const { } bool CPFRegion::FindClosestPointOnPolygon(const std::vector& polyPoints, const zeus::CVector3f& normal, - const zeus::CVector3f& point, bool excludePolyPoints) { + const zeus::CVector3f& point, bool excludePolyPoints) const { bool found = false; size_t i; for (i = 0; i < polyPoints.size(); ++i) { @@ -122,7 +122,7 @@ bool CPFRegion::FindClosestPointOnPolygon(const std::vector& po } bool CPFRegion::FindBestPoint(std::vector& polyPoints, const zeus::CVector3f& point, u32 flags, - float paddingSq) { + float paddingSq) const { bool found = false; bool isFlyer = (flags & 0x2) != 0; x4c_regionData->SetBestPointDistanceSquared(paddingSq); diff --git a/Runtime/World/CPathFindRegion.hpp b/Runtime/World/CPathFindRegion.hpp index 8e000435e..ef669cd2d 100644 --- a/Runtime/World/CPathFindRegion.hpp +++ b/Runtime/World/CPathFindRegion.hpp @@ -65,9 +65,9 @@ public: const CPFNode* GetNode(u32 i) const { return x4_startNode + i; } float PointHeight(const zeus::CVector3f& point) const; bool FindClosestPointOnPolygon(const std::vector&, const zeus::CVector3f&, const zeus::CVector3f&, - bool); + bool) const; bool FindBestPoint(std::vector& polyPoints, const zeus::CVector3f& point, u32 flags, - float paddingSq); + float paddingSq) const; void SetLinkTo(s32 idx); void DropToGround(zeus::CVector3f& point) const; zeus::CVector3f GetLinkMidPoint(const CPFLink& link) const; diff --git a/Runtime/World/CPatterned.cpp b/Runtime/World/CPatterned.cpp index a78ec3528..ac3ddf786 100644 --- a/Runtime/World/CPatterned.cpp +++ b/Runtime/World/CPatterned.cpp @@ -1165,7 +1165,7 @@ void CPatterned::UpdateAlphaDelta(float dt, CStateManager& mgr) { x64_modelData->AnimationData()->GetParticleDB().SetModulationColorAllActiveEffects(zeus::CColor(1.f, alpha)); } -float CPatterned::CalcDyingThinkRate() { +float CPatterned::CalcDyingThinkRate() const { float f0 = (x401_28_burning ? (x3f4_burnThinkRateTimer / 1.5f) : 1.f); return zeus::max(0.1f, f0); } diff --git a/Runtime/World/CPatterned.hpp b/Runtime/World/CPatterned.hpp index f546c07f0..767ccfbf3 100644 --- a/Runtime/World/CPatterned.hpp +++ b/Runtime/World/CPatterned.hpp @@ -372,7 +372,7 @@ public: void SetDestPos(const zeus::CVector3f& pos) { x2e0_destPos = pos; } void UpdateAlphaDelta(float dt, CStateManager& mgr); void SetModelAlpha(float a) { x42c_color.a() = a; } - float CalcDyingThinkRate(); + float CalcDyingThinkRate() const; void UpdateDamageColor(float dt); CScriptCoverPoint* GetCoverPoint(CStateManager& mgr, TUniqueId id) const; void SetCoverPoint(CScriptCoverPoint* cp, TUniqueId& id); diff --git a/Runtime/World/CPhysicsActor.cpp b/Runtime/World/CPhysicsActor.cpp index 75b0f159f..3112855e2 100644 --- a/Runtime/World/CPhysicsActor.cpp +++ b/Runtime/World/CPhysicsActor.cpp @@ -218,7 +218,7 @@ void CPhysicsActor::ComputeDerivedQuantities() { x144_angularVelocity = xf4_inertiaTensorRecip * x108_angularMomentum; } -bool CPhysicsActor::WillMove(const CStateManager&) { +bool CPhysicsActor::WillMove(const CStateManager&) const { return !zeus::close_enough(zeus::skZero3f, x138_velocity) || !zeus::close_enough(zeus::skZero3f, x168_impulse) || !zeus::close_enough(zeus::skZero3f, x174_torque) || diff --git a/Runtime/World/CPhysicsActor.hpp b/Runtime/World/CPhysicsActor.hpp index 0db06d62e..0184e2264 100644 --- a/Runtime/World/CPhysicsActor.hpp +++ b/Runtime/World/CPhysicsActor.hpp @@ -150,7 +150,7 @@ public: void SetVelocityWR(const zeus::CVector3f& vel); void SetVelocityOR(const zeus::CVector3f& vel); void SetMomentumWR(const zeus::CVector3f& m) { x150_momentum = m; } - const zeus::CVector3f& GetConstantForce() { return xfc_constantForce; } + const zeus::CVector3f& GetConstantForce() const { return xfc_constantForce; } void SetConstantForce(const zeus::CVector3f& f) { xfc_constantForce = f; } void SetAngularMomentum(const zeus::CAxisAngle& m) { x108_angularMomentum = m; } const zeus::CVector3f& GetMomentum() const { return x150_momentum; } @@ -170,7 +170,7 @@ public: void ClearForcesAndTorques(); void Stop(); void ComputeDerivedQuantities(); - bool WillMove(const CStateManager&); + bool WillMove(const CStateManager&) const; void SetPhysicsState(const CPhysicsState& state); CPhysicsState GetPhysicsState() const; bool IsMovable() const { return xf8_24_movable; } diff --git a/Runtime/World/CPlayer.cpp b/Runtime/World/CPlayer.cpp index 7b39db952..6dfa7851b 100644 --- a/Runtime/World/CPlayer.cpp +++ b/Runtime/World/CPlayer.cpp @@ -915,7 +915,7 @@ void CPlayer::Accept(IVisitor& visitor) { visitor.Visit(this); } CHealthInfo* CPlayer::HealthInfo(CStateManager& mgr) { return &mgr.GetPlayerState()->HealthInfo(); } -bool CPlayer::IsUnderBetaMetroidAttack(CStateManager& mgr) const { +bool CPlayer::IsUnderBetaMetroidAttack(const CStateManager& mgr) const { if (x274_energyDrain.GetEnergyDrainIntensity() > 0.f) { for (const CEnergyDrainSource& source : x274_energyDrain.GetEnergyDrainSources()) if (CPatterned::CastTo(mgr.GetObjectById(source.GetEnergyDrainSourceId()))) @@ -1000,7 +1000,7 @@ void CPlayer::UpdateScanningState(const CFinalInput& input, CStateManager& mgr, } } -bool CPlayer::ValidateScanning(const CFinalInput& input, CStateManager& mgr) { +bool CPlayer::ValidateScanning(const CFinalInput& input, const CStateManager& mgr) const { if (ControlMapper::GetDigitalInput(ControlMapper::ECommands::ScanItem, input)) { if (x304_orbitState == EPlayerOrbitState::OrbitObject) { if (TCastToPtr act = mgr.ObjectById(x310_orbitTargetId)) { @@ -2660,7 +2660,7 @@ void CPlayer::UpdateFootstepSounds(const CFinalInput& input, CStateManager& mgr, } } -u16 CPlayer::GetMaterialSoundUnderPlayer(CStateManager& mgr, const u16* table, u32 length, u16 defId) { +u16 CPlayer::GetMaterialSoundUnderPlayer(const CStateManager& mgr, const u16* table, u32 length, u16 defId) const { u16 ret = defId; zeus::CAABox aabb = GetBoundingBox(); aabb.accumulateBounds(x34_transform.origin + zeus::skDown); @@ -3274,7 +3274,7 @@ void CPlayer::ApplyGrappleForces(const CFinalInput& input, CStateManager& mgr, f SetAngularVelocityOR(newAngVel); } -bool CPlayer::ValidateFPPosition(const zeus::CVector3f& pos, CStateManager& mgr) { +bool CPlayer::ValidateFPPosition(const zeus::CVector3f& pos, const CStateManager& mgr) const { CMaterialFilter solidFilter = CMaterialFilter::MakeInclude({EMaterialTypes::Solid}); zeus::CAABox aabb(x2d8_fpBounds.min - 1.f + pos, x2d8_fpBounds.max + 1.f + pos); rstl::reserved_vector nearList; @@ -3837,7 +3837,7 @@ static zeus::CAABox BuildNearListBox(bool cropBottom, const zeus::CTransform& xf return aabb.getTransformedAABox(xf); } -TUniqueId CPlayer::FindAimTargetId(CStateManager& mgr) { +TUniqueId CPlayer::FindAimTargetId(CStateManager& mgr) const { float dist = g_tweakPlayer->GetAimMaxDistance(); if (x9c6_24_extendTargetDistance) dist *= 5.f; @@ -3917,7 +3917,7 @@ TUniqueId CPlayer::CheckEnemiesAgainstOrbitZone(const rstl::reserved_vector GetTouchBounds() const override; void Touch(CActor& actor, CStateManager& mgr) override; void DoPreThink(float dt, CStateManager& mgr); void DoThink(float dt, CStateManager& mgr); void UpdateScanningState(const CFinalInput& input, CStateManager& mgr, float); - bool ValidateScanning(const CFinalInput& input, CStateManager& mgr); + bool ValidateScanning(const CFinalInput& input, const CStateManager& mgr) const; void FinishNewScan(CStateManager& mgr); void SetScanningState(EPlayerScanState, CStateManager& mgr); void SetSpawnedMorphBallState(EPlayerMorphBallState, CStateManager&); @@ -432,7 +432,7 @@ public: void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override; void SetVisorSteam(float, float, float, CAssetId, bool); void UpdateFootstepSounds(const CFinalInput& input, CStateManager&, float); - u16 GetMaterialSoundUnderPlayer(CStateManager& mgr, const u16*, u32, u16); + u16 GetMaterialSoundUnderPlayer(const CStateManager& mgr, const u16*, u32, u16) const; static u16 SfxIdFromMaterial(const CMaterialList&, const u16*, u32, u16); void UpdateCrosshairsState(const CFinalInput&); void UpdateVisorTransition(float, CStateManager& mgr); @@ -460,7 +460,7 @@ public: void UpdateGrappleArmTransform(const zeus::CVector3f&, CStateManager& mgr, float); float GetGravity() const; void ApplyGrappleForces(const CFinalInput& input, CStateManager& mgr, float); - bool ValidateFPPosition(const zeus::CVector3f& pos, CStateManager& mgr); + bool ValidateFPPosition(const zeus::CVector3f& pos, const CStateManager& mgr) const; void UpdateGrappleState(const CFinalInput& input, CStateManager& mgr); void ApplyGrappleJump(CStateManager& mgr); void BeginGrapple(zeus::CVector3f&, CStateManager& mgr); @@ -482,11 +482,11 @@ public: void UpdateAimTargetTimer(float); bool ValidateAimTargetId(TUniqueId, CStateManager& mgr); bool ValidateObjectForMode(TUniqueId, CStateManager& mgr) const; - TUniqueId FindAimTargetId(CStateManager& mgr); + TUniqueId FindAimTargetId(CStateManager& mgr) const; TUniqueId GetAimTarget() const { return x3f4_aimTarget; } TUniqueId CheckEnemiesAgainstOrbitZone(const rstl::reserved_vector&, EPlayerZoneInfo, EPlayerZoneType, CStateManager& mgr) const; - TUniqueId FindOrbitTargetId(CStateManager& mgr); + TUniqueId FindOrbitTargetId(CStateManager& mgr) const; void UpdateOrbitableObjects(CStateManager& mgr); TUniqueId FindBestOrbitableObject(const std::vector&, EPlayerZoneInfo, CStateManager& mgr) const; void FindOrbitableObjects(const rstl::reserved_vector&, std::vector&, EPlayerZoneInfo, diff --git a/Runtime/World/CPlayerCameraBob.cpp b/Runtime/World/CPlayerCameraBob.cpp index 5fa49b8b6..a00c61b62 100644 --- a/Runtime/World/CPlayerCameraBob.cpp +++ b/Runtime/World/CPlayerCameraBob.cpp @@ -165,13 +165,13 @@ void CPlayerCameraBob::Update(float dt, CStateManager& mgr) { zeus::lookAt(zeus::skZero3f, {0.f, 2.f, x78_camTranslation}, zeus::skUp); } -zeus::CVector3f CPlayerCameraBob::CalculateRandomViewWanderPosition(CStateManager& mgr) { +zeus::CVector3f CPlayerCameraBob::CalculateRandomViewWanderPosition(CStateManager& mgr) const { const float angle = (2.f * (M_PIF * mgr.GetActiveRandom()->Float())); const float bias = kViewWanderRadius * mgr.GetActiveRandom()->Float(); return {(bias * std::sin(angle)), 1.f, (bias * std::cos(angle))}; } -float CPlayerCameraBob::CalculateRandomViewWanderPitch(CStateManager& mgr) { +float CPlayerCameraBob::CalculateRandomViewWanderPitch(CStateManager& mgr) const { return zeus::degToRad((2.f * (mgr.GetActiveRandom()->Float() - 0.5f)) * kViewWanderRollVariation); } diff --git a/Runtime/World/CPlayerCameraBob.hpp b/Runtime/World/CPlayerCameraBob.hpp index a596ce8a5..65b814257 100644 --- a/Runtime/World/CPlayerCameraBob.hpp +++ b/Runtime/World/CPlayerCameraBob.hpp @@ -87,8 +87,8 @@ public: void InitViewWander(CStateManager&); void UpdateViewWander(float, CStateManager&); void Update(float, CStateManager&); - zeus::CVector3f CalculateRandomViewWanderPosition(CStateManager&); - float CalculateRandomViewWanderPitch(CStateManager&); + zeus::CVector3f CalculateRandomViewWanderPosition(CStateManager&) const; + float CalculateRandomViewWanderPitch(CStateManager&) const; void CalculateMovingTranslation(float& x, float& y) const; float CalculateLandingTranslation() const; zeus::CTransform CalculateCameraBobTransformation() const; diff --git a/Runtime/World/CScriptDoor.cpp b/Runtime/World/CScriptDoor.cpp index fdb2c78c0..3e8625660 100644 --- a/Runtime/World/CScriptDoor.cpp +++ b/Runtime/World/CScriptDoor.cpp @@ -223,7 +223,7 @@ void CScriptDoor::ForceClosed(CStateManager& mgr) { } /* ORIGINAL 0-00 OFFSET: 8007E1C4 */ -bool CScriptDoor::IsConnectedToArea(const CStateManager& mgr, TAreaId areaId) { +bool CScriptDoor::IsConnectedToArea(const CStateManager& mgr, TAreaId areaId) const { const CScriptDock* dockEnt = TCastToConstPtr(mgr.GetObjectById(x282_dockId)); if (dockEnt) { if (dockEnt->GetAreaId() == areaId) @@ -286,7 +286,7 @@ void CScriptDoor::OpenDoor(TUniqueId uid, CStateManager& mgr) { } /* ORIGINAL 0-00 OFFSET: 8007ED4C */ -CScriptDoor::EDoorOpenCondition CScriptDoor::GetDoorOpenCondition(CStateManager& mgr) { +CScriptDoor::EDoorOpenCondition CScriptDoor::GetDoorOpenCondition(CStateManager& mgr) const { const TCastToPtr dock = mgr.ObjectById(x282_dockId); if (!dock) return EDoorOpenCondition::Ready; diff --git a/Runtime/World/CScriptDoor.hpp b/Runtime/World/CScriptDoor.hpp index a4d000e82..12551c41c 100644 --- a/Runtime/World/CScriptDoor.hpp +++ b/Runtime/World/CScriptDoor.hpp @@ -49,9 +49,9 @@ public: void AddToRenderer(const zeus::CFrustum&, const CStateManager& mgr) const override; void Render(const CStateManager&) const override {} void ForceClosed(CStateManager&); - bool IsConnectedToArea(const CStateManager& mgr, TAreaId area); + bool IsConnectedToArea(const CStateManager& mgr, TAreaId area) const; void OpenDoor(TUniqueId, CStateManager&); - EDoorOpenCondition GetDoorOpenCondition(CStateManager& mgr); + EDoorOpenCondition GetDoorOpenCondition(CStateManager& mgr) const; void SetDoorAnimation(EDoorAnimType); std::optional GetTouchBounds() const override; std::optional GetProjectileBounds() const; diff --git a/Runtime/World/CScriptEffect.cpp b/Runtime/World/CScriptEffect.cpp index a4fcbe31e..db7dc3fe0 100644 --- a/Runtime/World/CScriptEffect.cpp +++ b/Runtime/World/CScriptEffect.cpp @@ -353,7 +353,7 @@ zeus::CAABox CScriptEffect::GetSortingBounds(const CStateManager& mgr) const { return static_cast(mgr.GetObjectById(x13c_triggerId))->GetTriggerBoundsWR(); } -bool CScriptEffect::AreBothSystemsDeleteable() { +bool CScriptEffect::AreBothSystemsDeleteable() const { bool ret = true; if (x104_particleSystem && !x104_particleSystem->IsSystemDeletable()) ret = false; diff --git a/Runtime/World/CScriptEffect.hpp b/Runtime/World/CScriptEffect.hpp index 1d37e44a7..b8dca4a0c 100644 --- a/Runtime/World/CScriptEffect.hpp +++ b/Runtime/World/CScriptEffect.hpp @@ -65,7 +65,7 @@ public: } void CalculateRenderBounds() override; zeus::CAABox GetSortingBounds(const CStateManager&) const override; - bool AreBothSystemsDeleteable(); + bool AreBothSystemsDeleteable() const; static void ResetParticleCounts() { g_NumParticlesUpdating = 0; g_NumParticlesRendered = 0; diff --git a/Runtime/World/CStateMachine.hpp b/Runtime/World/CStateMachine.hpp index c4e77f2b6..18c81ccf5 100644 --- a/Runtime/World/CStateMachine.hpp +++ b/Runtime/World/CStateMachine.hpp @@ -20,7 +20,7 @@ public: CAiTrigger() = default; CAiTrigger* GetAnd() const { return x10_andTrig; } CAiState* GetState() const { return x14_state; } - bool CallFunc(CStateManager& mgr, CAi& ai) { + bool CallFunc(CStateManager& mgr, CAi& ai) const { if (x0_func) { bool ret = (ai.*x0_func)(mgr, xc_arg); return x18_lNot ? !ret : ret; diff --git a/Runtime/World/CVisorFlare.hpp b/Runtime/World/CVisorFlare.hpp index 54f26f6b4..2af7bd481 100644 --- a/Runtime/World/CVisorFlare.hpp +++ b/Runtime/World/CVisorFlare.hpp @@ -27,7 +27,7 @@ public: } TToken GetTexture() const; - zeus::CColor GetColor() { return x10_color; } + zeus::CColor GetColor() const { return x10_color; } float GetScale() const; float GetPosition() const; }; diff --git a/Runtime/World/CWorldTransManager.hpp b/Runtime/World/CWorldTransManager.hpp index df833b088..38e16740c 100644 --- a/Runtime/World/CWorldTransManager.hpp +++ b/Runtime/World/CWorldTransManager.hpp @@ -111,7 +111,7 @@ public: bool IsTransitionEnabled() const { return x30_type != ETransType::Disabled; } void DisableTransition(); void TouchModels(); - ETransType GetTransType() { return x30_type; } + ETransType GetTransType() const { return x30_type; } void SetSfx(u16 sfx, u8 volume, u8 panning) { x24_sfx = sfx; x2c_volume = volume; From 5980d11df058fea0c1d1bde8e01f507273656504 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Wed, 14 Aug 2019 06:52:46 -0700 Subject: [PATCH 28/65] Update submodules --- hecl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hecl b/hecl index a3b44da04..f35201691 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit a3b44da040e60a453f82005523810f38dabc3f1e +Subproject commit f35201691fb27fed58c38cd749152812876e4790 From 6760f78568bc690b4c331e4e2fc1cc03eca4b87c Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Wed, 14 Aug 2019 07:12:09 -0700 Subject: [PATCH 29/65] Update jbus --- jbus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jbus b/jbus index 8d356cb3d..87cbb52a3 160000 --- a/jbus +++ b/jbus @@ -1 +1 @@ -Subproject commit 8d356cb3da0440402c32485bf3691f98b2063c3f +Subproject commit 87cbb52a332c402107b4f6b73660a4696975df5e From afab3e0327c1845a26bf4c6c72d6eafcbc9b5448 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Aug 2019 10:58:54 -0400 Subject: [PATCH 30/65] Runtime: Make const/non-const getters have the same name Makes for a more consistent interface, as getters won't have different names to remember based off whether or not they're const qualified. --- Editor/ViewManager.cpp | 6 ++--- Runtime/AutoMapper/CMapWorld.cpp | 12 ++++----- Runtime/AutoMapper/CMapWorld.hpp | 2 +- Runtime/CRelayTracker.cpp | 2 +- Runtime/CStateManager.hpp | 6 ++--- Runtime/Character/CAdditiveBodyState.cpp | 14 +++++------ Runtime/Character/CBodyController.cpp | 10 ++++---- Runtime/Character/CModelData.hpp | 2 +- Runtime/Character/CRagDoll.cpp | 2 +- Runtime/MP1/CMFGame.cpp | 2 +- Runtime/MP1/CSamusDoll.cpp | 26 +++++++++---------- Runtime/MP1/CSamusFaceReflection.cpp | 4 +-- Runtime/MP1/World/CBabygoth.cpp | 10 ++++---- Runtime/MP1/World/CBloodFlower.cpp | 4 +-- Runtime/MP1/World/CEyeball.cpp | 6 ++--- Runtime/MP1/World/CFireFlea.cpp | 2 +- Runtime/MP1/World/CFlaahgra.cpp | 10 ++++---- Runtime/MP1/World/CFlaahgraTentacle.cpp | 2 +- Runtime/MP1/World/CNewIntroBoss.cpp | 4 +-- Runtime/MP1/World/CParasite.cpp | 6 ++--- Runtime/MP1/World/CSpacePirate.cpp | 18 ++++++------- Runtime/MP1/World/CSpankWeed.cpp | 2 +- Runtime/Weapon/CGrappleArm.cpp | 22 ++++++++-------- Runtime/Weapon/CGunController.cpp | 30 +++++++++++----------- Runtime/Weapon/CGunMotion.cpp | 10 ++++---- Runtime/Weapon/CGunWeapon.cpp | 14 +++++------ Runtime/Weapon/CPhazonBeam.cpp | 4 +-- Runtime/Weapon/CPlasmaBeam.cpp | 4 +-- Runtime/Weapon/CPlayerGun.cpp | 6 ++--- Runtime/Weapon/CWaveBeam.cpp | 4 +-- Runtime/World/CActor.cpp | 16 ++++++------ Runtime/World/CActor.hpp | 4 +-- Runtime/World/CActorModelParticles.cpp | 4 +-- Runtime/World/CAmbientAI.cpp | 24 +++++++++--------- Runtime/World/CFishCloud.cpp | 10 ++++---- Runtime/World/CGameArea.cpp | 6 ++--- Runtime/World/CGameArea.hpp | 4 +-- Runtime/World/CKnockBackController.cpp | 30 +++++++++++----------- Runtime/World/CMorphBall.cpp | 28 ++++++++++----------- Runtime/World/CPatterned.cpp | 8 +++--- Runtime/World/CPatterned.hpp | 2 +- Runtime/World/CPlayer.cpp | 26 +++++++++---------- Runtime/World/CScriptActorKeyframe.cpp | 14 +++++------ Runtime/World/CScriptAreaAttributes.cpp | 4 +-- Runtime/World/CScriptDistanceFog.cpp | 8 +++--- Runtime/World/CScriptDock.cpp | 32 ++++++++++++------------ Runtime/World/CScriptDoor.cpp | 4 +-- Runtime/World/CScriptGenerator.cpp | 2 +- Runtime/World/CScriptGunTurret.cpp | 20 +++++++-------- Runtime/World/CScriptPickup.cpp | 4 +-- Runtime/World/CScriptPlatform.cpp | 4 +-- Runtime/World/CScriptPlayerActor.cpp | 10 ++++---- Runtime/World/CScriptSound.cpp | 4 +-- Runtime/World/CScriptSpawnPoint.cpp | 6 ++--- Runtime/World/CScriptSpecialFunction.cpp | 6 ++--- Runtime/World/CScriptWorldTeleporter.cpp | 2 +- Runtime/World/CWallCrawlerSwarm.cpp | 26 +++++++++---------- Runtime/World/CWallWalker.cpp | 4 +-- Runtime/World/CWorldTransManager.cpp | 4 +-- Runtime/World/ScriptLoader.cpp | 6 ++--- 60 files changed, 284 insertions(+), 284 deletions(-) diff --git a/Editor/ViewManager.cpp b/Editor/ViewManager.cpp index 8d120499c..c55cd6ae7 100644 --- a/Editor/ViewManager.cpp +++ b/Editor/ViewManager.cpp @@ -102,8 +102,8 @@ void ViewManager::TestGameView::think() { } const urde::TAreaId aId = g_GameState->CurrentWorldState().GetCurrentAreaId(); - if (areaInfo && areaInfo->toBoolean() && g_StateManager->WorldNC() && - g_StateManager->WorldNC()->DoesAreaExist(aId)) { + if (areaInfo && areaInfo->toBoolean() && g_StateManager->GetWorld() && + g_StateManager->GetWorld()->DoesAreaExist(aId)) { const auto& layerStates = g_GameState->CurrentWorldState().GetLayerState(); std::string layerBits; u32 totalActive = 0; @@ -117,7 +117,7 @@ void ViewManager::TestGameView::think() { overlayText += fmt::format(fmt( "Area AssetId: 0x{}, Total Objects: {}\n" "Active Layer bits: {}\n"), - g_StateManager->WorldNC()->GetArea(aId)->GetAreaAssetId(), + g_StateManager->GetWorld()->GetArea(aId)->GetAreaAssetId(), g_StateManager->GetAllObjectList().size(), layerBits); } diff --git a/Runtime/AutoMapper/CMapWorld.cpp b/Runtime/AutoMapper/CMapWorld.cpp index 1d4f2153a..fbe172343 100644 --- a/Runtime/AutoMapper/CMapWorld.cpp +++ b/Runtime/AutoMapper/CMapWorld.cpp @@ -42,7 +42,7 @@ void CMapWorld::SetWhichMapAreasLoaded(const IWorld& wld, int start, int count) for (int i = 0; i < 2; ++i) { for (CMapAreaData* data = x10_listHeads[i]; data;) { - CMapAreaData* nextData = data->NextMapAreaData(); + CMapAreaData* nextData = data->GetNextMapAreaData(); if (!IsMapAreaInBFSInfoVector(data, bfsInfos)) { data->Unlock(); MoveMapAreaToList(data, EMapAreaList::Unloaded); @@ -64,11 +64,11 @@ bool CMapWorld::IsMapAreasStreaming() const { CMapAreaData* data = x10_listHeads[1]; while (data != nullptr) { if (data->IsLoaded()) { - CMapAreaData* next = data->NextMapAreaData(); + CMapAreaData* next = data->GetNextMapAreaData(); const_cast(this)->MoveMapAreaToList(data, EMapAreaList::Loaded); data = next; } else { - data = data->NextMapAreaData(); + data = data->GetNextMapAreaData(); ret = true; } } @@ -78,13 +78,13 @@ bool CMapWorld::IsMapAreasStreaming() const { void CMapWorld::MoveMapAreaToList(CMapWorld::CMapAreaData* data, CMapWorld::EMapAreaList list) { CMapAreaData* last = nullptr; for (CMapAreaData* head = x10_listHeads[int(data->GetContainingList())];; - last = head, head = head->NextMapAreaData()) { + last = head, head = head->GetNextMapAreaData()) { if (head != data) continue; if (!last) - x10_listHeads[int(data->GetContainingList())] = head->NextMapAreaData(); + x10_listHeads[int(data->GetContainingList())] = head->GetNextMapAreaData(); else - last->SetNextMapArea(head->NextMapAreaData()); + last->SetNextMapArea(head->GetNextMapAreaData()); break; } data->SetNextMapArea(x10_listHeads[int(list)]); diff --git a/Runtime/AutoMapper/CMapWorld.hpp b/Runtime/AutoMapper/CMapWorld.hpp index 38a49ab47..2c5c50589 100644 --- a/Runtime/AutoMapper/CMapWorld.hpp +++ b/Runtime/AutoMapper/CMapWorld.hpp @@ -67,9 +67,9 @@ public: void Unlock() { x0_area.Unlock(); } bool IsLoaded() const { return x0_area.IsLoaded(); } const CMapArea* GetMapArea() const { return x0_area.GetObj(); } + CMapAreaData* GetNextMapAreaData() { return x14_next; } const CMapAreaData* GetNextMapAreaData() const { return x14_next; } EMapAreaList GetContainingList() const { return x10_list; } - CMapAreaData* NextMapAreaData() { return x14_next; } void SetContainingList(EMapAreaList list) { x10_list = list; } void SetNextMapArea(CMapAreaData* next) { x14_next = next; } }; diff --git a/Runtime/CRelayTracker.cpp b/Runtime/CRelayTracker.cpp index 03ac77dd7..10695cad0 100644 --- a/Runtime/CRelayTracker.cpp +++ b/Runtime/CRelayTracker.cpp @@ -36,7 +36,7 @@ void CRelayTracker::RemoveRelay(TEditorId id) { } void CRelayTracker::SendMsgs(TAreaId areaId, CStateManager& stateMgr) { - const CWorld* world = stateMgr.WorldNC(); + const CWorld* world = stateMgr.GetWorld(); u32 relayCount = world->GetRelayCount(); bool hasActiveRelays = false; diff --git a/Runtime/CStateManager.hpp b/Runtime/CStateManager.hpp index 2a17c02cf..05b3cffb1 100644 --- a/Runtime/CStateManager.hpp +++ b/Runtime/CStateManager.hpp @@ -381,7 +381,7 @@ public: CEnvFxManager* GetEnvFxManager() { return x880_envFxManager; } const CEnvFxManager* GetEnvFxManager() const { return x880_envFxManager; } - CWorld* WorldNC() { return x850_world.get(); } + CWorld* GetWorld() { return x850_world.get(); } const CWorld* GetWorld() const { return x850_world.get(); } CRelayTracker* GetRelayTracker() { return x8bc_relayTracker.get(); } const CRelayTracker* GetRelayTracker() const { return x8bc_relayTracker.get(); } @@ -391,7 +391,8 @@ public: const std::shared_ptr& MapWorldInfo() const { return x8c0_mapWorldInfo; } const std::shared_ptr& WorldTransManager() const { return x8c4_worldTransManager; } - const std::shared_ptr& LayerState() const { return x8c8_worldLayerState; } + const std::shared_ptr& WorldLayerState() const { return x8c8_worldLayerState; } + std::shared_ptr& WorldLayerState() { return x8c8_worldLayerState; } CPlayer& GetPlayer() const { return *x84c_player; } CPlayer* Player() const { return x84c_player.get(); } @@ -442,7 +443,6 @@ public: void SetPlayerActorHead(TUniqueId id) { xf6c_playerActorHead = id; } std::list& GetActiveFlickerBats() { return xf3c_activeFlickerBats; } std::list& GetActiveParasites() { return xf54_activeParasites; } - std::shared_ptr& WorldLayerStateNC() { return x8c8_worldLayerState; } static float g_EscapeShakeCountdown; static bool g_EscapeShakeCountdownInit; diff --git a/Runtime/Character/CAdditiveBodyState.cpp b/Runtime/Character/CAdditiveBodyState.cpp index 2a4f0cb1d..e504f4f86 100644 --- a/Runtime/Character/CAdditiveBodyState.cpp +++ b/Runtime/Character/CAdditiveBodyState.cpp @@ -46,7 +46,7 @@ pas::EAnimationState CABSAim::UpdateBody(float dt, CBodyController& bc, CStateMa if (st == pas::EAnimationState::Invalid) { const zeus::CVector3f& target = bc.GetCommandMgr().GetAdditiveTargetVector(); if (target.canBeNormalized()) { - CAnimData& animData = *bc.GetOwner().ModelData()->AnimationData(); + CAnimData& animData = *bc.GetOwner().GetModelData()->GetAnimationData(); float hAngle = zeus::clamp(-x18_angles[0], std::atan2(target.x(), target.y()), x18_angles[1]); hAngle *= 0.63661975f; @@ -85,7 +85,7 @@ pas::EAnimationState CABSAim::UpdateBody(float dt, CBodyController& bc, CStateMa } void CABSAim::Shutdown(CBodyController& bc) { - CAnimData& animData = *bc.GetOwner().ModelData()->AnimationData(); + CAnimData& animData = *bc.GetOwner().GetModelData()->GetAnimationData(); if (x28_hWeight != 0.f) animData.DelAdditiveAnimation(x8_anims[x28_hWeight < 0.f ? 0 : 1]); @@ -102,7 +102,7 @@ void CABSFlinch::Start(CBodyController& bc, CStateManager& mgr) { std::pair best = bc.GetPASDatabase().FindBestAnimation(parms, *mgr.GetActiveRandom(), -1); x8_anim = best.second; - CAnimData& animData = *bc.GetOwner().ModelData()->AnimationData(); + CAnimData& animData = *bc.GetOwner().GetModelData()->GetAnimationData(); animData.AddAdditiveAnimation(x8_anim, x4_weight, false, true); } @@ -115,7 +115,7 @@ pas::EAnimationState CABSFlinch::GetBodyStateTransition(float dt, CBodyControlle pas::EAnimationState CABSFlinch::UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) { const pas::EAnimationState st = GetBodyStateTransition(dt, bc); if (st == pas::EAnimationState::Invalid) { - CAnimData& animData = *bc.GetOwner().ModelData()->AnimationData(); + CAnimData& animData = *bc.GetOwner().GetModelData()->GetAnimationData(); CCharAnimTime rem = animData.GetAdditiveAnimationTree(x8_anim)->VGetTimeRemaining(); if (std::fabs(rem.GetSeconds()) < 0.00001f) return pas::EAnimationState::AdditiveIdle; @@ -149,7 +149,7 @@ void CABSReaction::Start(CBodyController& bc, CStateManager& mgr) { x8_anim = best.second; if (x8_anim != -1) { - CAnimData& animData = *bc.GetOwner().ModelData()->AnimationData(); + CAnimData& animData = *bc.GetOwner().GetModelData()->GetAnimationData(); animData.AddAdditiveAnimation(x8_anim, x4_weight, x10_active, false); } } @@ -166,7 +166,7 @@ pas::EAnimationState CABSReaction::UpdateBody(float dt, CBodyController& bc, CSt if (x8_anim == -1) return pas::EAnimationState::AdditiveIdle; - CAnimData& animData = *bc.GetOwner().ModelData()->AnimationData(); + CAnimData& animData = *bc.GetOwner().GetModelData()->GetAnimationData(); if (x10_active) { if (bc.GetCommandMgr().GetCmd(EBodyStateCmd::StopReaction)) { StopAnimation(bc); @@ -190,7 +190,7 @@ pas::EAnimationState CABSReaction::UpdateBody(float dt, CBodyController& bc, CSt void CABSReaction::StopAnimation(CBodyController& bc) { if (x8_anim != -1) { - CAnimData& animData = *bc.GetOwner().ModelData()->AnimationData(); + CAnimData& animData = *bc.GetOwner().GetModelData()->GetAnimationData(); animData.DelAdditiveAnimation(x8_anim); x8_anim = -1; } diff --git a/Runtime/Character/CBodyController.cpp b/Runtime/Character/CBodyController.cpp index 559247485..7e6229ffe 100644 --- a/Runtime/Character/CBodyController.cpp +++ b/Runtime/Character/CBodyController.cpp @@ -15,7 +15,7 @@ CBodyController::CBodyController(CActor& actor, float turnSpeed, EBodyType bodyT x2a4_bodyStateInfo.x18_bodyController = this; } -void CBodyController::EnableAnimation(bool e) { x0_actor.ModelData()->AnimationData()->EnableAnimation(e); } +void CBodyController::EnableAnimation(bool e) { x0_actor.GetModelData()->GetAnimationData()->EnableAnimation(e); } void CBodyController::Activate(CStateManager& mgr) { x300_25_active = true; @@ -77,8 +77,8 @@ void CBodyController::Update(float dt, CStateManager& mgr) { bool CBodyController::HasBodyState(pas::EAnimationState s) const { return GetPASDatabase().HasState(s32(s)); } void CBodyController::SetCurrentAnimation(const CAnimPlaybackParms& parms, bool loop, bool noTrans) { - x0_actor.ModelData()->AnimationData()->SetAnimation(parms, noTrans); - x0_actor.ModelData()->EnableLooping(loop); + x0_actor.GetModelData()->GetAnimationData()->SetAnimation(parms, noTrans); + x0_actor.GetModelData()->EnableLooping(loop); x2f8_curAnim = parms.GetAnimationId(); } @@ -86,13 +86,13 @@ float CBodyController::GetAnimTimeRemaining() const { return x0_actor.GetModelData()->GetAnimationData()->GetAnimTimeRemaining("Whole Body"); } -void CBodyController::SetPlaybackRate(float r) { x0_actor.ModelData()->AnimationData()->SetPlaybackRate(r); } +void CBodyController::SetPlaybackRate(float r) { x0_actor.GetModelData()->GetAnimationData()->SetPlaybackRate(r); } const CPASDatabase& CBodyController::GetPASDatabase() const { return x0_actor.GetModelData()->GetAnimationData()->GetCharacterInfo().GetPASDatabase(); } -void CBodyController::MultiplyPlaybackRate(float r) { x0_actor.ModelData()->AnimationData()->MultiplyPlaybackRate(r); } +void CBodyController::MultiplyPlaybackRate(float r) { x0_actor.GetModelData()->GetAnimationData()->MultiplyPlaybackRate(r); } void CBodyController::FaceDirection(const zeus::CVector3f& v0, float dt) { if (x300_26_frozen) diff --git a/Runtime/Character/CModelData.hpp b/Runtime/Character/CModelData.hpp index 9013317e4..da2b1b0b9 100644 --- a/Runtime/Character/CModelData.hpp +++ b/Runtime/Character/CModelData.hpp @@ -133,7 +133,7 @@ public: void DisintegrateDraw(EWhichModel which, const zeus::CTransform& xf, const CTexture& tex, const zeus::CColor& addColor, float t); - CAnimData* AnimationData() { return x10_animData.get(); } + CAnimData* GetAnimationData() { return x10_animData.get(); } const CAnimData* GetAnimationData() const { return x10_animData.get(); } const TLockedToken& GetNormalModel() const { return x1c_normalModel; } const TLockedToken& GetXRayModel() const { return x2c_xrayModel; } diff --git a/Runtime/Character/CRagDoll.cpp b/Runtime/Character/CRagDoll.cpp index 08a5cc0cf..333c22dcc 100644 --- a/Runtime/Character/CRagDoll.cpp +++ b/Runtime/Character/CRagDoll.cpp @@ -305,7 +305,7 @@ void CRagDoll::Update(CStateManager& mgr, float dt, float waterTop) { void CRagDoll::Prime(CStateManager& mgr, const zeus::CTransform& xf, CModelData& mData) { zeus::CVector3f scale = mData.GetScale(); - CAnimData* aData = mData.AnimationData(); + CAnimData* aData = mData.GetAnimationData(); aData->BuildPose(); for (auto& particle : x4_particles) if (particle.x0_id != 0xff) diff --git a/Runtime/MP1/CMFGame.cpp b/Runtime/MP1/CMFGame.cpp index 585ba8dd3..f9e08ab41 100644 --- a/Runtime/MP1/CMFGame.cpp +++ b/Runtime/MP1/CMFGame.cpp @@ -186,7 +186,7 @@ void CMFGame::Touch() { if (gunVisible) player.GetPlayerGun()->TouchModel(*x14_stateManager); if (samusVisible) - player.ModelData()->Touch(*x14_stateManager, 0); + player.GetModelData()->Touch(*x14_stateManager, 0); if (ballVisible) player.GetMorphBall()->TouchModel(*x14_stateManager); } diff --git a/Runtime/MP1/CSamusDoll.cpp b/Runtime/MP1/CSamusDoll.cpp index 95795abce..82105b920 100644 --- a/Runtime/MP1/CSamusDoll.cpp +++ b/Runtime/MP1/CSamusDoll.cpp @@ -107,7 +107,7 @@ CModelData CSamusDoll::BuildSuitModelData1(CPlayerState::EPlayerSuit suit) { CModelData ret(CAnimRes(g_ResFactory->GetResourceIdByName("ANCS_ItemScreenSamus")->id, Character1Idxs[int(suit)], zeus::skOne3f, 2, true)); CAnimPlaybackParms parms(2, -1, 1.f, true); - ret.AnimationData()->SetAnimation(parms, false); + ret.GetAnimationData()->SetAnimation(parms, false); return ret; } @@ -115,7 +115,7 @@ CModelData CSamusDoll::BuildSuitModelDataBoots(CPlayerState::EPlayerSuit suit) { CModelData ret(CAnimRes(g_ResFactory->GetResourceIdByName("ANCS_ItemScreenSamus")->id, CharacterBootsIdxs[int(suit)], zeus::skOne3f, 2, true)); CAnimPlaybackParms parms(2, -1, 1.f, true); - ret.AnimationData()->SetAnimation(parms, false); + ret.GetAnimationData()->SetAnimation(parms, false); return ret; } @@ -177,8 +177,8 @@ void CSamusDoll::Update(float dt, CRandom16& rand) { if (x54_remTransitionTime == 0.f) { x4c_completedMorphball = x4d_selectedMorphball; if (!x4d_selectedMorphball) { - xc8_suitModel0->AnimationData()->SetAnimation(CAnimPlaybackParms(2, -1, 1.f, true), false); - x134_suitModelBoots->AnimationData()->SetAnimation(CAnimPlaybackParms(2, -1, 1.f, true), false); + xc8_suitModel0->GetAnimationData()->SetAnimation(CAnimPlaybackParms(2, -1, 1.f, true), false); + x134_suitModelBoots->GetAnimationData()->SetAnimation(CAnimPlaybackParms(2, -1, 1.f, true), false); } } } @@ -293,10 +293,10 @@ void CSamusDoll::Draw(const CStateManager& mgr, float alpha) { for (size_t i = 0; i <= x118_suitModel1and2.size(); ++i) { TCachedToken backupModelData = xc8_suitModel0->GetAnimationData()->GetModelData(); if (i < x118_suitModel1and2.size()) - xc8_suitModel0->AnimationData()->SubstituteModelData(x118_suitModel1and2[i]); + xc8_suitModel0->GetAnimationData()->SubstituteModelData(x118_suitModel1and2[i]); xc8_suitModel0->InvSuitDraw(CModelData::EWhichModel::Normal, zeus::CTransform(), x24c_actorLights.get(), zeus::CColor(1.f, alpha), zeus::CColor(1.f, alpha * suitPulse)); - xc8_suitModel0->AnimationData()->SubstituteModelData(backupModelData); + xc8_suitModel0->GetAnimationData()->SubstituteModelData(backupModelData); } x134_suitModelBoots->InvSuitDraw(CModelData::EWhichModel::Normal, zeus::CTransform(), @@ -522,9 +522,9 @@ void CSamusDoll::Draw(const CStateManager& mgr, float alpha) { void CSamusDoll::Touch() { if (!CheckLoadComplete()) return; - xc8_suitModel0->AnimationData()->PreRender(); - x134_suitModelBoots->AnimationData()->PreRender(); - x184_ballModelData->AnimationData()->PreRender(); + xc8_suitModel0->GetAnimationData()->PreRender(); + x134_suitModelBoots->GetAnimationData()->PreRender(); + x184_ballModelData->GetAnimationData()->PreRender(); xc8_suitModel0->Touch(CModelData::EWhichModel::Normal, 0); x134_suitModelBoots->Touch(CModelData::EWhichModel::Normal, 0); x184_ballModelData->Touch(CModelData::EWhichModel::Normal, 0); @@ -547,13 +547,13 @@ void CSamusDoll::SetInMorphball(bool morphball) { void CSamusDoll::SetTransitionAnimation() { if (!x4c_completedMorphball) { /* Into morphball */ - xc8_suitModel0->AnimationData()->SetAnimation(CAnimPlaybackParms{0, -1, 1.f, true}, false); - x134_suitModelBoots->AnimationData()->SetAnimation(CAnimPlaybackParms{0, -1, 1.f, true}, false); + xc8_suitModel0->GetAnimationData()->SetAnimation(CAnimPlaybackParms{0, -1, 1.f, true}, false); + x134_suitModelBoots->GetAnimationData()->SetAnimation(CAnimPlaybackParms{0, -1, 1.f, true}, false); x50_totalTransitionTime = x54_remTransitionTime = xc8_suitModel0->GetAnimationData()->GetAnimationDuration(0); } else if (!x4d_selectedMorphball) { /* Outta morphball */ - xc8_suitModel0->AnimationData()->SetAnimation(CAnimPlaybackParms{1, -1, 1.f, true}, false); - x134_suitModelBoots->AnimationData()->SetAnimation(CAnimPlaybackParms{1, -1, 1.f, true}, false); + xc8_suitModel0->GetAnimationData()->SetAnimation(CAnimPlaybackParms{1, -1, 1.f, true}, false); + x134_suitModelBoots->GetAnimationData()->SetAnimation(CAnimPlaybackParms{1, -1, 1.f, true}, false); x50_totalTransitionTime = x54_remTransitionTime = xc8_suitModel0->GetAnimationData()->GetAnimationDuration(1); } } diff --git a/Runtime/MP1/CSamusFaceReflection.cpp b/Runtime/MP1/CSamusFaceReflection.cpp index b1dfb5945..982521c72 100644 --- a/Runtime/MP1/CSamusFaceReflection.cpp +++ b/Runtime/MP1/CSamusFaceReflection.cpp @@ -15,7 +15,7 @@ CSamusFaceReflection::CSamusFaceReflection(CStateManager& stateMgr) , x4c_lights(std::make_unique(8, zeus::skZero3f, 4, 4, false, false, false, 0.1f)) { x60_lookDir = zeus::skForward; CAnimPlaybackParms parms(0, -1, 1.f, true); - x0_modelData.AnimationData()->SetAnimation(parms, false); + x0_modelData.GetAnimationData()->SetAnimation(parms, false); } void CSamusFaceReflection::PreDraw(const CStateManager& mgr) { @@ -24,7 +24,7 @@ void CSamusFaceReflection::PreDraw(const CStateManager& mgr) { x70_hidden = true; } else { x70_hidden = false; - x0_modelData.AnimationData()->PreRender(); + x0_modelData.GetAnimationData()->PreRender(); } } } diff --git a/Runtime/MP1/World/CBabygoth.cpp b/Runtime/MP1/World/CBabygoth.cpp index 0894079ce..a4a2ca365 100644 --- a/Runtime/MP1/World/CBabygoth.cpp +++ b/Runtime/MP1/World/CBabygoth.cpp @@ -59,7 +59,7 @@ CBabygoth::CBabygoth(TUniqueId uid, std::string_view name, const CEntityInfo& in , x6ec_pathSearch(nullptr, 1, pInfo.GetPathfindingIndex(), 1.f, 1.f) , x7d0_approachPathSearch(nullptr, 1, pInfo.GetPathfindingIndex(), 1.f, 1.f) , x8d0_initialSpeed(x3b4_speed) -, x8f0_boneTracking(*ModelData()->AnimationData(), "Head_1"sv, zeus::degToRad(80.f), zeus::degToRad(180.f), +, x8f0_boneTracking(*GetModelData()->GetAnimationData(), "Head_1"sv, zeus::degToRad(80.f), zeus::degToRad(180.f), EBoneTrackingFlags::None) , x930_aabox(GetBoundingBox(), GetMaterialList()) , x958_iceProjectile(babyData.x8_fireballWeapon, babyData.xc_fireballDamage) @@ -72,7 +72,7 @@ CBabygoth::CBabygoth(TUniqueId uid, std::string_view name, const CEntityInfo& in TLockedToken skin = g_SimplePool->GetObj({SBIG('CSKR'), babyData.x13c_noShellSkin}); xa08_noShellModel = CToken(TObjOwnerDerivedFromIObj::GetNewDerivedObject(std::make_unique( - model, skin, x64_modelData->AnimationData()->GetModelData()->GetLayoutInfo(), 1, 1))); + model, skin, x64_modelData->GetAnimationData()->GetModelData()->GetLayoutInfo(), 1, 1))); xa14_crackOneParticle = g_SimplePool->GetObj({SBIG('PART'), babyData.x14c_crackOneParticle}); xa20_crackTwoParticle = g_SimplePool->GetObj({SBIG('PART'), babyData.x150_crackTwoParticle}); xa2c_destroyShellParticle = g_SimplePool->GetObj({SBIG('PART'), babyData.x154_destroyShellParticle}); @@ -218,9 +218,9 @@ void CBabygoth::Think(float dt, CStateManager& mgr) { if (x450_bodyController->IsElectrocuting()) x8f0_boneTracking.SetActive(false); UpdateTimers(dt); - ModelData()->AnimationData()->PreRender(); + GetModelData()->GetAnimationData()->PreRender(); x8f0_boneTracking.Update(dt); - x8f0_boneTracking.PreRender(mgr, *ModelData()->AnimationData(), GetTransform(), GetModelData()->GetScale(), + x8f0_boneTracking.PreRender(mgr, *GetModelData()->GetAnimationData(), GetTransform(), GetModelData()->GetScale(), *x450_bodyController); x928_colActMgr->Update(dt, mgr, CCollisionActorManager::EUpdateOptions(!xa49_29_objectSpaceCollision)); xa49_29_objectSpaceCollision = true; @@ -1094,7 +1094,7 @@ bool CBabygoth::IsDestinationObstructed(CStateManager& mgr) { } void CBabygoth::DestroyShell(CStateManager& mgr) { - ModelData()->AnimationData()->SubstituteModelData(xa08_noShellModel); + GetModelData()->GetAnimationData()->SubstituteModelData(xa08_noShellModel); for (TUniqueId uid : x9f8_shellIds) { if (TCastToPtr colAct = mgr.ObjectById(uid)) { diff --git a/Runtime/MP1/World/CBloodFlower.cpp b/Runtime/MP1/World/CBloodFlower.cpp index 7e5d20d8e..1d74d743e 100644 --- a/Runtime/MP1/World/CBloodFlower.cpp +++ b/Runtime/MP1/World/CBloodFlower.cpp @@ -79,11 +79,11 @@ static std::string_view sFireEffects[3] = { }; void CBloodFlower::TurnEffectsOn(u32 effect, CStateManager& mgr) { - ModelData()->AnimationData()->SetParticleEffectState(sFireEffects[effect], true, mgr); + GetModelData()->GetAnimationData()->SetParticleEffectState(sFireEffects[effect], true, mgr); } void CBloodFlower::TurnEffectsOff(u32 effect, CStateManager& mgr) { - ModelData()->AnimationData()->SetParticleEffectState(sFireEffects[effect], false, mgr); + GetModelData()->GetAnimationData()->SetParticleEffectState(sFireEffects[effect], false, mgr); } void CBloodFlower::Think(float dt, CStateManager& mgr) { diff --git a/Runtime/MP1/World/CEyeball.cpp b/Runtime/MP1/World/CEyeball.cpp index ec1e67b2c..a0040f1be 100644 --- a/Runtime/MP1/World/CEyeball.cpp +++ b/Runtime/MP1/World/CEyeball.cpp @@ -97,8 +97,8 @@ void CEyeball::Think(float dt, CStateManager& mgr) { x5a8_targetPosition = player.GetTranslation() - (0.5f * player.GetVelocity()); x570_boneTracking.SetTargetPosition(x5a8_targetPosition); x570_boneTracking.Update(dt); - ModelData()->AnimationData()->PreRender(); - x570_boneTracking.PreRender(mgr, *ModelData()->AnimationData(), GetTransform(), GetModelData()->GetScale(), + GetModelData()->GetAnimationData()->PreRender(); + x570_boneTracking.PreRender(mgr, *GetModelData()->GetAnimationData(), GetTransform(), GetModelData()->GetScale(), *x450_bodyController.get()); } else x570_boneTracking.SetActive(false); @@ -232,7 +232,7 @@ void CEyeball::FireBeam(CStateManager& mgr, const zeus::CTransform& xf) { void CEyeball::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) { CPatterned::PreRender(mgr, frustum); - x570_boneTracking.PreRender(mgr, *ModelData()->AnimationData(), GetTransform(), GetModelData()->GetScale(), + x570_boneTracking.PreRender(mgr, *GetModelData()->GetAnimationData(), GetTransform(), GetModelData()->GetScale(), *x450_bodyController); } diff --git a/Runtime/MP1/World/CFireFlea.cpp b/Runtime/MP1/World/CFireFlea.cpp index 31e8a7d46..f0fdb4667 100644 --- a/Runtime/MP1/World/CFireFlea.cpp +++ b/Runtime/MP1/World/CFireFlea.cpp @@ -61,7 +61,7 @@ CFireFlea::CFireFlea(TUniqueId uid, std::string_view name, const CEntityInfo& in filter.ExcludeList().Add(EMaterialTypes::Character); SetMaterialFilter(filter); - ModelData()->AnimationData()->SetParticleLightIdx(sLightIdx); + GetModelData()->GetAnimationData()->SetParticleLightIdx(sLightIdx); ++sLightIdx; } diff --git a/Runtime/MP1/World/CFlaahgra.cpp b/Runtime/MP1/World/CFlaahgra.cpp index 70b8e591f..174f6d0f0 100644 --- a/Runtime/MP1/World/CFlaahgra.cpp +++ b/Runtime/MP1/World/CFlaahgra.cpp @@ -119,7 +119,7 @@ void CFlaahgra::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateM switch (msg) { case EScriptObjectMessage::InitializedInArea: { if (!x8e4_25_loading && !x8e4_24_loaded) { - const_cast(mgr.WorldNC()->GetAreaAlways(GetAreaIdAlways())->GetPostConstructed()) + const_cast(mgr.GetWorld()->GetAreaAlways(GetAreaIdAlways())->GetPostConstructed()) ->x113c_playerActorsLoading++; x8e4_25_loading = true; } @@ -396,7 +396,7 @@ void CFlaahgra::LoadTokens(CStateManager& mgr) { void CFlaahgra::FinalizeLoad(CStateManager& mgr) { x8e4_24_loaded = true; if (x8e4_25_loading) { - const_cast(mgr.WorldNC()->GetAreaAlways(GetAreaIdAlways())->GetPostConstructed()) + const_cast(mgr.GetWorld()->GetAreaAlways(GetAreaIdAlways())->GetPostConstructed()) ->x113c_playerActorsLoading--; x8e4_25_loading = false; } @@ -411,7 +411,7 @@ void CFlaahgra::Think(float dt, CStateManager& mgr) { CPatterned::Think(dt, mgr); x6cc_boneTracking->Update(dt); UpdateCollisionManagers(dt, mgr); - x6cc_boneTracking->PreRender(mgr, *ModelData()->AnimationData(), GetTransform(), GetModelData()->GetScale(), + x6cc_boneTracking->PreRender(mgr, *GetModelData()->GetAnimationData(), GetTransform(), GetModelData()->GetScale(), *x450_bodyController); UpdateSmallScaleReGrowth(dt); UpdateHealthInfo(mgr); @@ -508,7 +508,7 @@ void CFlaahgra::SetupCollisionManagers(CStateManager& mgr) { {EMaterialTypes::CollisionActor, EMaterialTypes::AIPassthrough, EMaterialTypes::Player})); AddMaterial(EMaterialTypes::ProjectilePassthrough, EMaterialTypes::Target, EMaterialTypes::Orbit, mgr); RemoveMaterial(EMaterialTypes::Solid, mgr); - ModelData()->SetScale(oldScale); + GetModelData()->SetScale(oldScale); x7a4_sphereCollision->AddMaterial(mgr, {EMaterialTypes::AIJoint, EMaterialTypes::CameraPassthrough}); x79c_leftArmCollision->AddMaterial(mgr, {EMaterialTypes::AIJoint, EMaterialTypes::CameraPassthrough}); x7a0_rightArmCollision->AddMaterial(mgr, {EMaterialTypes::AIJoint, EMaterialTypes::CameraPassthrough}); @@ -797,7 +797,7 @@ void CFlaahgra::SetCollisionActorBounds(CStateManager& mgr, const std::unique_pt } void CFlaahgra::UpdateScale(float t, float min, float max) { float scale = (t * (max - min) + min); - ModelData()->SetScale(zeus::skOne3f * scale); + GetModelData()->SetScale(zeus::skOne3f * scale); } float CFlaahgra::GetEndActionTime() const { diff --git a/Runtime/MP1/World/CFlaahgraTentacle.cpp b/Runtime/MP1/World/CFlaahgraTentacle.cpp index 49ef424cd..f1b648760 100644 --- a/Runtime/MP1/World/CFlaahgraTentacle.cpp +++ b/Runtime/MP1/World/CFlaahgraTentacle.cpp @@ -12,7 +12,7 @@ CFlaahgraTentacle::CFlaahgraTentacle(TUniqueId uid, std::string_view name, const : CPatterned(ECharacter::FlaahgraTentacle, uid, name, EFlavorType::Zero, info, xf, std::move(mData), pInfo, EMovementType::Flyer, EColliderType::One, EBodyType::Restricted, actParms, EKnockBackVariant::Large) { x58e_24_ = false; - ActorLights()->SetCastShadows(false); + GetActorLights()->SetCastShadows(false); x460_knockBackController.SetAutoResetImpulse(false); CreateShadow(false); } diff --git a/Runtime/MP1/World/CNewIntroBoss.cpp b/Runtime/MP1/World/CNewIntroBoss.cpp index 390e1f26b..26b3c7cb9 100644 --- a/Runtime/MP1/World/CNewIntroBoss.cpp +++ b/Runtime/MP1/World/CNewIntroBoss.cpp @@ -214,10 +214,10 @@ void CNewIntroBoss::Think(float dt, CStateManager& mgr) { if (x63c_attackTime > 0.f) x63c_attackTime -= dt; - ModelData()->AnimationData()->PreRender(); + GetModelData()->GetAnimationData()->PreRender(); if (x400_25_alive) - x574_boneTracking.PreRender(mgr, *ModelData()->AnimationData(), x34_transform, ModelData()->GetScale(), + x574_boneTracking.PreRender(mgr, *GetModelData()->GetAnimationData(), x34_transform, GetModelData()->GetScale(), *x450_bodyController); x5ec_collisionManager->Update(dt, mgr, CCollisionActorManager::EUpdateOptions::ObjectSpace); diff --git a/Runtime/MP1/World/CParasite.cpp b/Runtime/MP1/World/CParasite.cpp index 4c0fda628..2bdd3d560 100644 --- a/Runtime/MP1/World/CParasite.cpp +++ b/Runtime/MP1/World/CParasite.cpp @@ -72,7 +72,7 @@ CParasite::CParasite(TUniqueId uid, std::string_view name, EFlavorType flavor, c TLockedToken skin = g_SimplePool->GetObj({FOURCC('CSKR'), skinRes}); x624_extraModel = CToken(TObjOwnerDerivedFromIObj::GetNewDerivedObject(std::make_unique( - model, skin, x64_modelData->AnimationData()->GetModelData()->GetLayoutInfo(), 1, 1))); + model, skin, x64_modelData->GetAnimationData()->GetModelData()->GetLayoutInfo(), 1, 1))); break; } default: @@ -205,7 +205,7 @@ void CParasite::UpdateCollisionActors(float dt, CStateManager& mgr) { AddMaterial(EMaterialTypes::Solid, mgr); RemoveMaterial(EMaterialTypes::ProjectilePassthrough, mgr); DestroyActorManager(mgr); - x64_modelData->AnimationData()->SubstituteModelData(x624_extraModel); + x64_modelData->GetAnimationData()->SubstituteModelData(x624_extraModel); } } } @@ -219,7 +219,7 @@ void CParasite::Think(float dt, CStateManager& mgr) { UpdateCollisionActors(dt, mgr); x5d6_26_playerObstructed = false; - CGameArea* area = mgr.WorldNC()->GetArea(GetAreaIdAlways()); + CGameArea* area = mgr.GetWorld()->GetArea(GetAreaIdAlways()); CGameArea::EOcclusionState r6 = CGameArea::EOcclusionState::Occluded; if (area->IsPostConstructed()) diff --git a/Runtime/MP1/World/CSpacePirate.cpp b/Runtime/MP1/World/CSpacePirate.cpp index 432517bfa..9c1213618 100644 --- a/Runtime/MP1/World/CSpacePirate.cpp +++ b/Runtime/MP1/World/CSpacePirate.cpp @@ -64,7 +64,7 @@ CPirateRagDoll::CPirateRagDoll(CStateManager& mgr, CSpacePirate* sp, u16 thudSfx SetNumLengthConstraints(47); SetNumJointConstraints(4); zeus::CVector3f scale = x6c_spacePirate->GetModelData()->GetScale(); - CAnimData* aData = x6c_spacePirate->ModelData()->AnimationData(); + CAnimData* aData = x6c_spacePirate->GetModelData()->GetAnimationData(); aData->BuildPose(); zeus::CVector3f center = x6c_spacePirate->GetBoundingBox().center(); for (int i = 0; i < 14; ++i) { @@ -139,7 +139,7 @@ CPirateRagDoll::CPirateRagDoll(CStateManager& mgr, CSpacePirate* sp, u16 thudSfx void CPirateRagDoll::PreRender(const zeus::CVector3f& v, CModelData& mData) { if (!x68_25_over || x68_27_continueSmallMovements) { - CAnimData* aData = mData.AnimationData(); + CAnimData* aData = mData.GetAnimationData(); for (CSegId id : aData->GetCharLayoutInfo().GetSegIdList().GetList()) if (aData->GetCharLayoutInfo().GetRootNode()->GetBoneMap()[id].x10_children.size() > 1) aData->PoseBuilder().GetTreeMap()[id].x4_rotation = zeus::CQuaternion(); @@ -341,7 +341,7 @@ CSpacePirate::CSpacePirate(TUniqueId uid, std::string_view name, const CEntityIn , x568_pirateData(in, propCount) , x660_pathFindSearch(nullptr, 0x1, pInfo.GetPathfindingIndex(), 1.f, 1.f) , x750_initialHP(pInfo.GetHealthInfo().GetHP()) -, x764_boneTracking(*x64_modelData->AnimationData(), "Head_1"sv, 1.22173f, 3.14159f, EBoneTrackingFlags::None) +, x764_boneTracking(*x64_modelData->GetAnimationData(), "Head_1"sv, 1.22173f, 3.14159f, EBoneTrackingFlags::None) , x7c4_burstFire(skBursts, x568_pirateData.xac_firstBurstCount) , x8b8_minCloakAlpha(x568_pirateData.xb0_CloakOpacity) , x8bc_maxCloakAlpha(x568_pirateData.xb4_MaxCloakOpacity) @@ -548,7 +548,7 @@ bool CSpacePirate::FireProjectile(float dt, CStateManager& mgr) { auto bestAnim = x450_bodyController->GetPASDatabase().FindBestAnimation({24, CPASAnimParm::FromEnum(2)}, *mgr.GetActiveRandom(), -1); if (bestAnim.first > 0.f) - x64_modelData->AnimationData()->AddAdditiveAnimation(bestAnim.second, 1.f, false, true); + x64_modelData->GetAnimationData()->AddAdditiveAnimation(bestAnim.second, 1.f, false, true); CSfxManager::AddEmitter(x568_pirateData.x48_Sound_Projectile, GetTranslation(), zeus::skZero3f, true, false, 0x7f, kInvalidAreaId); } @@ -801,9 +801,9 @@ void CSpacePirate::SetEyeParticleActive(CStateManager& mgr, bool active) { if (!x636_24_trooper) { if (!x634_29_onlyAttackInRange || x635_26_seated) { if (!x635_27_shadowPirate) - x64_modelData->AnimationData()->SetParticleEffectState("TwoEyes"sv, active, mgr); + x64_modelData->GetAnimationData()->SetParticleEffectState("TwoEyes"sv, active, mgr); } else { - x64_modelData->AnimationData()->SetParticleEffectState("OneEye"sv, active, mgr); + x64_modelData->GetAnimationData()->SetParticleEffectState("OneEye"sv, active, mgr); } } } @@ -978,9 +978,9 @@ void CSpacePirate::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) x85c_ragDoll->PreRender(GetTranslation(), *x64_modelData); CPatterned::PreRender(mgr, frustum); if (!x85c_ragDoll || !x85c_ragDoll->IsPrimed()) { - x764_boneTracking.PreRender(mgr, *x64_modelData->AnimationData(), x34_transform, x64_modelData->GetScale(), + x764_boneTracking.PreRender(mgr, *x64_modelData->GetAnimationData(), x34_transform, x64_modelData->GetScale(), *x450_bodyController); - x860_ikChain.PreRender(*x64_modelData->AnimationData(), x34_transform, x64_modelData->GetScale()); + x860_ikChain.PreRender(*x64_modelData->GetAnimationData(), x34_transform, x64_modelData->GetScale()); } } @@ -1043,7 +1043,7 @@ void CSpacePirate::DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node CSegId lctrId = x64_modelData->GetAnimationData()->GetLocatorSegId(node.GetLocatorName()); if (lctrId != 3) { zeus::CTransform xf = GetLctrTransform(lctrId); - x860_ikChain.Activate(*x64_modelData->AnimationData(), lctrId, xf); + x860_ikChain.Activate(*x64_modelData->GetAnimationData(), lctrId, xf); x639_28_satUp = true; } } diff --git a/Runtime/MP1/World/CSpankWeed.cpp b/Runtime/MP1/World/CSpankWeed.cpp index 389f40134..ab4a67878 100644 --- a/Runtime/MP1/World/CSpankWeed.cpp +++ b/Runtime/MP1/World/CSpankWeed.cpp @@ -25,7 +25,7 @@ CSpankWeed::CSpankWeed(TUniqueId uid, std::string_view name, const CEntityInfo& if (modelScale.x() != modelScale.y() || modelScale.x() != modelScale.z()) { float scale = modelScale.magnitude() / std::sqrt(3.f); - ModelData()->SetScale(zeus::CVector3f(scale)); + GetModelData()->SetScale(zeus::CVector3f(scale)); SpankLog.report(logvisor::Level::Warning, fmt("WARNING: Non-uniform scale {} applied to Spank Weed" "...changing scale to ({} {} {})\n"), diff --git a/Runtime/Weapon/CGrappleArm.cpp b/Runtime/Weapon/CGrappleArm.cpp index 44c2a9ce2..6e867e57a 100644 --- a/Runtime/Weapon/CGrappleArm.cpp +++ b/Runtime/Weapon/CGrappleArm.cpp @@ -116,42 +116,42 @@ void CGrappleArm::SetAnimState(EArmState state) { if (x334_animState == state) return; - x0_grappleArmModel->AnimationData()->EnableLooping(false); + x0_grappleArmModel->GetAnimationData()->EnableLooping(false); x3b2_28_isGrappling = true; switch (state) { case EArmState::IntoGrapple: { ResetAuxParams(true); CAnimPlaybackParms parms(0, -1, 1.f, true); - x0_grappleArmModel->AnimationData()->SetAnimation(parms, false); + x0_grappleArmModel->GetAnimationData()->SetAnimation(parms, false); x3b2_25_beamActive = false; x3b2_24_active = true; break; } case EArmState::IntoGrappleIdle: { CAnimPlaybackParms parms(1, -1, 1.f, true); - x0_grappleArmModel->AnimationData()->EnableLooping(true); - x0_grappleArmModel->AnimationData()->SetAnimation(parms, false); + x0_grappleArmModel->GetAnimationData()->EnableLooping(true); + x0_grappleArmModel->GetAnimationData()->SetAnimation(parms, false); break; } case EArmState::FireGrapple: { CAnimPlaybackParms parms(2, -1, 1.f, true); - x0_grappleArmModel->AnimationData()->SetAnimation(parms, false); + x0_grappleArmModel->GetAnimationData()->SetAnimation(parms, false); break; } case EArmState::ConnectGrapple: { CAnimPlaybackParms parms(3, -1, 1.f, true); - x0_grappleArmModel->AnimationData()->SetAnimation(parms, false); + x0_grappleArmModel->GetAnimationData()->SetAnimation(parms, false); break; } case EArmState::Connected: { CAnimPlaybackParms parms(3, -1, 1.f, true); - x0_grappleArmModel->AnimationData()->SetAnimation(parms, false); + x0_grappleArmModel->GetAnimationData()->SetAnimation(parms, false); break; } case EArmState::OutOfGrapple: { CAnimPlaybackParms parms(4, -1, 1.f, true); - x0_grappleArmModel->AnimationData()->SetAnimation(parms, false); + x0_grappleArmModel->GetAnimationData()->SetAnimation(parms, false); DisconnectGrappleBeam(); break; } @@ -465,9 +465,9 @@ void CGrappleArm::Update(float grappleSwingT, float dt, CStateManager& mgr) { void CGrappleArm::PreRender(const CStateManager& mgr, const zeus::CFrustum& frustum, const zeus::CVector3f& camPos) { if (x3b2_24_active && !x3b2_29_suitLoading) { - x0_grappleArmModel->AnimationData()->PreRender(); + x0_grappleArmModel->GetAnimationData()->PreRender(); if (x50_grappleArmSkeletonModel) - x50_grappleArmSkeletonModel->AnimationData()->PreRender(); + x50_grappleArmSkeletonModel->GetAnimationData()->PreRender(); } } @@ -478,7 +478,7 @@ void CGrappleArm::RenderXRayModel(const CStateManager& mgr, const zeus::CTransfo // g_Renderer->SetAmbientColor(zeus::skWhite); CSkinnedModel& model = const_cast(*x50_grappleArmSkeletonModel->GetAnimationData()->GetModelData()); model.GetModelInst()->ActivateLights({CLight::BuildLocalAmbient({}, zeus::skWhite)}); - const_cast(this)->x0_grappleArmModel->AnimationData()->Render(model, flags, {}, nullptr); + const_cast(this)->x0_grappleArmModel->GetAnimationData()->Render(model, flags, {}, nullptr); // g_Renderer->SetAmbientColor(zeus::skWhite); // CGraphics::DisableAllLights(); } diff --git a/Runtime/Weapon/CGunController.cpp b/Runtime/Weapon/CGunController.cpp index bd17a1379..cb34e574b 100644 --- a/Runtime/Weapon/CGunController.cpp +++ b/Runtime/Weapon/CGunController.cpp @@ -6,17 +6,17 @@ namespace urde { void CGunController::LoadFidgetAnimAsync(CStateManager& mgr, s32 type, s32 gunId, s32 animSet) { - x30_fidget.LoadAnimAsync(*x0_modelData.AnimationData(), type, gunId, animSet, mgr); + x30_fidget.LoadAnimAsync(*x0_modelData.GetAnimationData(), type, gunId, animSet, mgr); } void CGunController::EnterFidget(CStateManager& mgr, s32 type, s32 gunId, s32 animSet) { - x54_curAnimId = x30_fidget.SetAnim(*x0_modelData.AnimationData(), type, gunId, animSet, mgr); + x54_curAnimId = x30_fidget.SetAnim(*x0_modelData.GetAnimationData(), type, gunId, animSet, mgr); x50_gunState = EGunState::Fidget; } void CGunController::EnterFreeLook(CStateManager& mgr, s32 gunId, s32 setId) { if (x50_gunState != EGunState::ComboFire && !x58_25_enteredComboFire) - x54_curAnimId = x4_freeLook.SetAnim(*x0_modelData.AnimationData(), gunId, setId, 0, mgr, 0.f); + x54_curAnimId = x4_freeLook.SetAnim(*x0_modelData.GetAnimationData(), gunId, setId, 0, mgr, 0.f); else x4_freeLook.SetLoopState(x1c_comboFire.GetLoopState()); x50_gunState = EGunState::FreeLook; @@ -24,7 +24,7 @@ void CGunController::EnterFreeLook(CStateManager& mgr, s32 gunId, s32 setId) { void CGunController::EnterComboFire(CStateManager& mgr, s32 gunId) { if (x50_gunState != EGunState::FreeLook) - x54_curAnimId = x1c_comboFire.SetAnim(*x0_modelData.AnimationData(), gunId, 0, mgr, 0.f); + x54_curAnimId = x1c_comboFire.SetAnim(*x0_modelData.GetAnimationData(), gunId, 0, mgr, 0.f); else x1c_comboFire.SetLoopState(x4_freeLook.GetLoopState()); x50_gunState = EGunState::ComboFire; @@ -46,13 +46,13 @@ void CGunController::EnterStruck(CStateManager& mgr, float angle, bool bigStrike break; } - const CPASDatabase& pasDatabase = x0_modelData.AnimationData()->GetCharacterInfo().GetPASDatabase(); + const CPASDatabase& pasDatabase = x0_modelData.GetAnimationData()->GetCharacterInfo().GetPASDatabase(); CPASAnimParmData parms(2, CPASAnimParm::FromInt32(x4_freeLook.GetGunId()), CPASAnimParm::FromReal32(angle), CPASAnimParm::FromBool(bigStrike), CPASAnimParm::FromBool(b2)); std::pair anim = pasDatabase.FindBestAnimation(parms, *mgr.GetActiveRandom(), -1); - x0_modelData.AnimationData()->EnableLooping(false); + x0_modelData.GetAnimationData()->EnableLooping(false); CAnimPlaybackParms aparms(anim.second, -1, 1.f, true); - x0_modelData.AnimationData()->SetAnimation(aparms, false); + x0_modelData.GetAnimationData()->SetAnimation(aparms, false); x54_curAnimId = anim.second; x58_25_enteredComboFire = false; x50_gunState = bigStrike ? EGunState::BigStrike : EGunState::Strike; @@ -73,19 +73,19 @@ void CGunController::EnterIdle(CStateManager& mgr) { return; } - const CPASDatabase& pasDatabase = x0_modelData.AnimationData()->GetCharacterInfo().GetPASDatabase(); + const CPASDatabase& pasDatabase = x0_modelData.GetAnimationData()->GetCharacterInfo().GetPASDatabase(); CPASAnimParmData parms(5, parm); std::pair anim = pasDatabase.FindBestAnimation(parms, *mgr.GetActiveRandom(), -1); - x0_modelData.AnimationData()->EnableLooping(false); + x0_modelData.GetAnimationData()->EnableLooping(false); CAnimPlaybackParms aparms(anim.second, -1, 1.f, true); - x0_modelData.AnimationData()->SetAnimation(aparms, false); + x0_modelData.GetAnimationData()->SetAnimation(aparms, false); x54_curAnimId = anim.second; x50_gunState = EGunState::Idle; x58_25_enteredComboFire = false; } bool CGunController::Update(float dt, CStateManager& mgr) { - CAnimData& animData = *x0_modelData.AnimationData(); + CAnimData& animData = *x0_modelData.GetAnimationData(); switch (x50_gunState) { case EGunState::FreeLook: { x58_24_animDone = x4_freeLook.Update(animData, dt, mgr); @@ -126,7 +126,7 @@ bool CGunController::Update(float dt, CStateManager& mgr) { } void CGunController::ReturnToDefault(CStateManager& mgr, float dt, bool setState) { - CAnimData& animData = *x0_modelData.AnimationData(); + CAnimData& animData = *x0_modelData.GetAnimationData(); switch (x50_gunState) { case EGunState::Strike: @@ -159,11 +159,11 @@ void CGunController::ReturnToDefault(CStateManager& mgr, float dt, bool setState } void CGunController::ReturnToBasePosition(CStateManager& mgr, float) { - const CPASDatabase& pasDatabase = x0_modelData.AnimationData()->GetCharacterInfo().GetPASDatabase(); + const CPASDatabase& pasDatabase = x0_modelData.GetAnimationData()->GetCharacterInfo().GetPASDatabase(); std::pair anim = pasDatabase.FindBestAnimation(CPASAnimParmData(6), *mgr.GetActiveRandom(), -1); - x0_modelData.AnimationData()->EnableLooping(false); + x0_modelData.GetAnimationData()->EnableLooping(false); CAnimPlaybackParms parms(anim.second, -1, 1.f, true); - x0_modelData.AnimationData()->SetAnimation(parms, false); + x0_modelData.GetAnimationData()->SetAnimation(parms, false); x54_curAnimId = anim.second; x58_25_enteredComboFire = false; } diff --git a/Runtime/Weapon/CGunMotion.cpp b/Runtime/Weapon/CGunMotion.cpp index d9283273e..637b5d2aa 100644 --- a/Runtime/Weapon/CGunMotion.cpp +++ b/Runtime/Weapon/CGunMotion.cpp @@ -12,7 +12,7 @@ CGunMotion::CGunMotion(CAssetId ancsId, const zeus::CVector3f& scale) } void CGunMotion::LoadAnimations() { - NWeaponTypes::get_token_vector(*x0_modelData.AnimationData(), 0, 14, xa8_anims, true); + NWeaponTypes::get_token_vector(*x0_modelData.GetAnimationData(), 0, 14, xa8_anims, true); } bool CGunMotion::PlayPasAnim(SamusGun::EAnimationState state, CStateManager& mgr, float angle, bool bigStrike) { @@ -52,9 +52,9 @@ bool CGunMotion::PlayPasAnim(SamusGun::EAnimationState state, CStateManager& mgr } if (animId != -1) { - x0_modelData.AnimationData()->EnableLooping(loop); + x0_modelData.GetAnimationData()->EnableLooping(loop); CAnimPlaybackParms aparms(animId, -1, 1.f, true); - x0_modelData.AnimationData()->SetAnimation(aparms, false); + x0_modelData.GetAnimationData()->SetAnimation(aparms, false); } return loop; @@ -65,9 +65,9 @@ void CGunMotion::ReturnToDefault(CStateManager& mgr, bool setState) { } void CGunMotion::BasePosition(bool bigStrikeReset) { - x0_modelData.AnimationData()->EnableLooping(false); + x0_modelData.GetAnimationData()->EnableLooping(false); CAnimPlaybackParms aparms(bigStrikeReset ? 6 : 0, -1, 1.f, true); - x0_modelData.AnimationData()->SetAnimation(aparms, false); + x0_modelData.GetAnimationData()->SetAnimation(aparms, false); } void CGunMotion::EnterFidget(CStateManager& mgr, SamusGun::EFidgetType type, s32 parm2) { diff --git a/Runtime/Weapon/CGunWeapon.cpp b/Runtime/Weapon/CGunWeapon.cpp index f08bc3c71..8549822fe 100644 --- a/Runtime/Weapon/CGunWeapon.cpp +++ b/Runtime/Weapon/CGunWeapon.cpp @@ -104,7 +104,7 @@ void CGunWeapon::Reset(CStateManager& mgr) { if (!x218_26_loaded) return; - x10_solidModelData->AnimationData()->EnableLooping(false); + x10_solidModelData->GetAnimationData()->EnableLooping(false); if (x218_25_enableCharge) x218_25_enableCharge = false; else @@ -116,9 +116,9 @@ static const s32 skAnimTypeList[] = {0, 4, 1, 2, 3, 5, 6, 7, 8, 9, 10}; void CGunWeapon::PlayAnim(NWeaponTypes::EGunAnimType type, bool loop) { if (x218_26_loaded && type >= NWeaponTypes::EGunAnimType::BasePosition && type <= NWeaponTypes::EGunAnimType::ToBeam) { - x10_solidModelData->AnimationData()->EnableLooping(loop); + x10_solidModelData->GetAnimationData()->EnableLooping(loop); CAnimPlaybackParms parms(skAnimTypeList[int(type)], -1, 1.f, true); - x10_solidModelData->AnimationData()->SetAnimation(parms, false); + x10_solidModelData->GetAnimationData()->SetAnimation(parms, false); } } @@ -173,9 +173,9 @@ void CGunWeapon::Fire(bool underwater, float dt, EChargeState chargeState, const mgr.GetCameraManager()->AddCameraShaker(CCameraShakeData::skChargedShotCameraShakeData, false); } - x10_solidModelData->AnimationData()->EnableLooping(false); + x10_solidModelData->GetAnimationData()->EnableLooping(false); CAnimPlaybackParms parms(skShootAnim[int(chargeState)], -1, 1.f, true); - x10_solidModelData->AnimationData()->SetAnimation(parms, false); + x10_solidModelData->GetAnimationData()->SetAnimation(parms, false); } void CGunWeapon::EnableFx(bool enable) { @@ -304,7 +304,7 @@ void CGunWeapon::LoadGunModels(CStateManager& mgr) { x10_solidModelData.emplace(CAnimRes(x214_ancsId, 0, x4_scale, defaultAnim, false)); x60_holoModelData.emplace(CAnimRes(x214_ancsId, 1, x4_scale, defaultAnim, false)); CAnimPlaybackParms parms(defaultAnim, -1, 1.f, true); - x10_solidModelData->AnimationData()->SetAnimation(parms, true); + x10_solidModelData->GetAnimationData()->SetAnimation(parms, true); LoadSuitArm(mgr); x10_solidModelData->SetSortThermal(true); x60_holoModelData->SetSortThermal(true); @@ -478,7 +478,7 @@ void CGunWeapon::DrawHologram(const CStateManager& mgr, const zeus::CTransform& // g_Renderer->SetAmbientColor(zeus::skWhite); CSkinnedModel& model = const_cast(*x60_holoModelData->GetAnimationData()->GetModelData()); model.GetModelInst()->ActivateLights({CLight::BuildLocalAmbient({}, zeus::skWhite)}); - const_cast(this)->x10_solidModelData->AnimationData()->Render(model, flags, {}, nullptr); + const_cast(this)->x10_solidModelData->GetAnimationData()->Render(model, flags, {}, nullptr); // g_Renderer->SetAmbientColor(zeus::skWhite); // CGraphics::DisableAllLights(); } diff --git a/Runtime/Weapon/CPhazonBeam.cpp b/Runtime/Weapon/CPhazonBeam.cpp index ab35946d1..abeb6ee5a 100644 --- a/Runtime/Weapon/CPhazonBeam.cpp +++ b/Runtime/Weapon/CPhazonBeam.cpp @@ -28,7 +28,7 @@ CPhazonBeam::CPhazonBeam(CAssetId characterId, EWeaponType type, TUniqueId playe void CPhazonBeam::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr) { TAreaId aid = mgr.GetPlayer().GetAreaIdAlways(); if (msg == EScriptObjectMessage::Deleted && aid != kInvalidAreaId) - mgr.WorldNC()->GetArea(aid)->SetWeaponWorldLighting(4.f, 1.f); + mgr.GetWorld()->GetArea(aid)->SetWeaponWorldLighting(4.f, 1.f); } void CPhazonBeam::StopBeam(CStateManager& mgr, bool b1) { @@ -102,7 +102,7 @@ void CPhazonBeam::Update(float dt, CStateManager& mgr) { x278_fireTime += dt; TAreaId aid = mgr.GetPlayer().GetAreaIdAlways(); if (aid != kInvalidAreaId) { - CGameArea* area = mgr.WorldNC()->GetArea(aid); + CGameArea* area = mgr.GetWorld()->GetArea(aid); if (x278_fireTime > 1.f / 6.f) area->SetWeaponWorldLighting(4.f, 1.f); else diff --git a/Runtime/Weapon/CPlasmaBeam.cpp b/Runtime/Weapon/CPlasmaBeam.cpp index e47d2614c..887625f75 100644 --- a/Runtime/Weapon/CPlasmaBeam.cpp +++ b/Runtime/Weapon/CPlasmaBeam.cpp @@ -21,7 +21,7 @@ void CPlasmaBeam::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CS void CPlasmaBeam::SetWorldLighting(CStateManager& mgr, TAreaId aid, float speed, float target) { if (x22c_25_worldLighingDim && x23c_stateArea != aid && x23c_stateArea != kInvalidAreaId) { - CGameArea* area = mgr.WorldNC()->GetArea(x23c_stateArea); + CGameArea* area = mgr.GetWorld()->GetArea(x23c_stateArea); if (area->IsPostConstructed()) area->SetWeaponWorldLighting(2.f, 1.f); } @@ -30,7 +30,7 @@ void CPlasmaBeam::SetWorldLighting(CStateManager& mgr, TAreaId aid, float speed, x22c_25_worldLighingDim = target != 1.f; if (x23c_stateArea != kInvalidAreaId) { - CGameArea* area = mgr.WorldNC()->GetArea(x23c_stateArea); + CGameArea* area = mgr.GetWorld()->GetArea(x23c_stateArea); if (area->IsPostConstructed()) area->SetWeaponWorldLighting(speed, target); } diff --git a/Runtime/Weapon/CPlayerGun.cpp b/Runtime/Weapon/CPlayerGun.cpp index f178a14ab..612b155e6 100644 --- a/Runtime/Weapon/CPlayerGun.cpp +++ b/Runtime/Weapon/CPlayerGun.cpp @@ -216,7 +216,7 @@ void CPlayerGun::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CSt x72c_currentBeam->SetRainSplashGenerator(x748_rainSplashGenerator.get()); x744_auxWeapon->Load(x310_currentBeam, mgr); CAnimPlaybackParms parms(skBeamAnimIds[int(mgr.GetPlayerState()->GetCurrentBeam())], -1, 1.f, true); - x6e0_rightHandModel.AnimationData()->SetAnimation(parms, false); + x6e0_rightHandModel.GetAnimationData()->SetAnimation(parms, false); break; } case EScriptObjectMessage::Deleted: @@ -489,7 +489,7 @@ void CPlayerGun::ResetBeamParams(CStateManager& mgr, const CPlayerState& playerS if (playerState.ItemEnabled(CPlayerState::EItemType::ChargeBeam)) ResetCharge(mgr, false); CAnimPlaybackParms parms(skBeamAnimIds[int(x314_nextBeam)], -1, 1.f, true); - x6e0_rightHandModel.AnimationData()->SetAnimation(parms, false); + x6e0_rightHandModel.GetAnimationData()->SetAnimation(parms, false); Reset(mgr, false); if (playSelectionSfx) CSfxManager::SfxStart(SFXwpn_morph_out_wipe, 1.f, 0.f, true, 0x7f, false, kInvalidAreaId); @@ -2018,7 +2018,7 @@ void CPlayerGun::PreRender(const CStateManager& mgr, const zeus::CFrustum& frust x740_grappleArm->PreRender(mgr, frustum, camPos); if (x678_morph.GetGunState() != CGunMorph::EGunState::OutWipeDone || activeVisor == CPlayerState::EPlayerVisor::XRay) - x6e0_rightHandModel.AnimationData()->PreRender(); + x6e0_rightHandModel.GetAnimationData()->PreRender(); if (x833_28_phazonBeamActive) g_Renderer->AllocatePhazonSuitMaskTexture(); diff --git a/Runtime/Weapon/CWaveBeam.cpp b/Runtime/Weapon/CWaveBeam.cpp index 4258986fc..5e5d798d5 100644 --- a/Runtime/Weapon/CWaveBeam.cpp +++ b/Runtime/Weapon/CWaveBeam.cpp @@ -76,8 +76,8 @@ void CWaveBeam::Fire(bool underwater, float dt, EChargeState chargeState, const NWeaponTypes::play_sfx(kSoundId[int(chargeState)], underwater, false, 0.165f); CAnimPlaybackParms parms(skShootAnim[int(chargeState)], -1, 1.f, true); - x10_solidModelData->AnimationData()->EnableLooping(false); - x10_solidModelData->AnimationData()->SetAnimation(parms, false); + x10_solidModelData->GetAnimationData()->EnableLooping(false); + x10_solidModelData->GetAnimationData()->SetAnimation(parms, false); } void CWaveBeam::EnableSecondaryFx(ESecondaryFxType type) { diff --git a/Runtime/World/CActor.cpp b/Runtime/World/CActor.cpp index cb38d5d87..490091eac 100644 --- a/Runtime/World/CActor.cpp +++ b/Runtime/World/CActor.cpp @@ -80,7 +80,7 @@ void CActor::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateMana { RemoveEmitter(); if (HasModelData() && !x64_modelData->IsNull()) - if (CAnimData* aData = x64_modelData->AnimationData()) + if (CAnimData* aData = x64_modelData->GetAnimationData()) aData->GetParticleDB().DeleteAllLights(mgr); break; } @@ -91,9 +91,9 @@ void CActor::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateMana else RemoveMaterial(EMaterialTypes::Scannable, mgr); - if (HasModelData() && x64_modelData->AnimationData()) { + if (HasModelData() && x64_modelData->GetAnimationData()) { TAreaId aid = GetAreaId(); - x64_modelData->AnimationData()->InitializeEffects(mgr, aid, x64_modelData->GetScale()); + x64_modelData->GetAnimationData()->InitializeEffects(mgr, aid, x64_modelData->GetScale()); } break; } @@ -161,7 +161,7 @@ void CActor::PreRender(CStateManager& mgr, const zeus::CFrustum& planes) { } if (x64_modelData->HasAnimData()) - x64_modelData->AnimationData()->PreRender(); + x64_modelData->GetAnimationData()->PreRender(); } else { if (xe4_29_actorLightsDirty) { xe4_29_actorLightsDirty = false; @@ -254,7 +254,7 @@ void CActor::Render(const CStateManager& mgr) const { if (x64_modelData && !x64_modelData->IsNull()) { bool renderPrePostParticles = xe6_29_renderParticleDBInside && x64_modelData && x64_modelData->HasAnimData(); if (renderPrePostParticles) - x64_modelData->AnimationData()->GetParticleDB().RenderSystemsToBeDrawnFirst(); + x64_modelData->GetAnimationData()->GetParticleDB().RenderSystemsToBeDrawnFirst(); if (xe7_27_enableRender) { if (xe5_31_pointGeneratorParticles) @@ -274,7 +274,7 @@ void CActor::Render(const CStateManager& mgr) const { } if (renderPrePostParticles) - x64_modelData->AnimationData()->GetParticleDB().RenderSystemsToBeDrawnLast(); + x64_modelData->GetAnimationData()->GetParticleDB().RenderSystemsToBeDrawnLast(); } DrawTouchBounds(); } @@ -289,7 +289,7 @@ bool CActor::CanRenderUnsorted(const CStateManager& mgr) const { } void CActor::CalculateRenderBounds() { - if (x64_modelData && (x64_modelData->AnimationData() || x64_modelData->GetNormalModel())) + if (x64_modelData && (x64_modelData->GetAnimationData() || x64_modelData->GetNormalModel())) x9c_renderBounds = x64_modelData->GetBounds(x34_transform); else x9c_renderBounds = zeus::CAABox(x34_transform.origin, x34_transform.origin); @@ -636,7 +636,7 @@ SAdvancementDeltas CActor::UpdateAnimation(float dt, CStateManager& mgr, bool ad if (poi.GetCharacterIndex() != -1 && x64_modelData->GetAnimationData()->GetCharacterIndex() != poi.GetCharacterIndex()) continue; - x64_modelData->AnimationData()->GetParticleDB().SetParticleEffectState(poi.GetString(), true, mgr); + x64_modelData->GetAnimationData()->GetParticleDB().SetParticleEffectState(poi.GetString(), true, mgr); } } return deltas; diff --git a/Runtime/World/CActor.hpp b/Runtime/World/CActor.hpp index a726ccff0..9e6a5c42b 100644 --- a/Runtime/World/CActor.hpp +++ b/Runtime/World/CActor.hpp @@ -166,7 +166,7 @@ public: float GetPitch() const; float GetYaw() const; const CModelData* GetModelData() const { return x64_modelData.get(); } - CModelData* ModelData() { return x64_modelData.get(); } + CModelData* GetModelData() { return x64_modelData.get(); } void EnsureRendered(const CStateManager&) const; void EnsureRendered(const CStateManager&, const zeus::CVector3f&, const zeus::CAABox&) const; void ProcessSoundEvent(u32 sfxId, float weight, u32 flags, float falloff, float maxDist, float minVol, float maxVol, @@ -175,7 +175,7 @@ public: SAdvancementDeltas UpdateAnimation(float, CStateManager&, bool); void SetActorLights(std::unique_ptr&& lights); const CActorLights* GetActorLights() const { return x90_actorLights.get(); } - CActorLights* ActorLights() { return x90_actorLights.get(); } + CActorLights* GetActorLights() { return x90_actorLights.get(); } bool CanDrawStatic() const; bool IsDrawEnabled() const { return xe7_29_drawEnabled; } void SetWorldLightingDirty(bool b) { xe7_28_worldLightingDirty = b; } diff --git a/Runtime/World/CActorModelParticles.cpp b/Runtime/World/CActorModelParticles.cpp index ff7a9afb4..3289e5975 100644 --- a/Runtime/World/CActorModelParticles.cpp +++ b/Runtime/World/CActorModelParticles.cpp @@ -309,8 +309,8 @@ bool CActorModelParticles::CItem::UpdateIcePop(float dt, CActor* actor, CStateMa bool CActorModelParticles::CItem::Update(float dt, CStateManager& mgr) { CActor* act = static_cast(mgr.ObjectById(x0_id)); - if (act && act->HasModelData() && !act->ModelData()->IsNull()) { - xec_particleOffsetScale = act->ModelData()->GetScale(); + if (act && act->HasModelData() && !act->GetModelData()->IsNull()) { + xec_particleOffsetScale = act->GetModelData()->GetScale(); xf8_iceXf = act->GetTransform(); x4_areaId = act->GetAreaIdAlways(); } else { diff --git a/Runtime/World/CAmbientAI.cpp b/Runtime/World/CAmbientAI.cpp index 4e9543b05..24343ba8a 100644 --- a/Runtime/World/CAmbientAI.cpp +++ b/Runtime/World/CAmbientAI.cpp @@ -18,7 +18,7 @@ CAmbientAI::CAmbientAI(TUniqueId uid, std::string_view name, const CEntityInfo& , x2dc_defaultAnim(GetModelData()->GetAnimationData()->GetDefaultAnimation()) , x2e0_alertAnim(alertAnim) , x2e4_impactAnim(impactAnim) { - ModelData()->AnimationData()->EnableLooping(true); + GetModelData()->GetAnimationData()->EnableLooping(true); } void CAmbientAI::Accept(IVisitor& visitor) { visitor.Visit(this); } @@ -51,8 +51,8 @@ void CAmbientAI::Think(float dt, CStateManager& mgr) { case EAnimationState::Ready: { if (inAlertRange) { x2d0_animState = EAnimationState::Alert; - ModelData()->AnimationData()->SetAnimation(CAnimPlaybackParms(x2e0_alertAnim, -1, 1.f, true), false); - ModelData()->EnableLooping(true); + GetModelData()->GetAnimationData()->SetAnimation(CAnimPlaybackParms(x2e0_alertAnim, -1, 1.f, true), false); + GetModelData()->EnableLooping(true); RandomizePlaybackRate(mgr); } break; @@ -60,8 +60,8 @@ void CAmbientAI::Think(float dt, CStateManager& mgr) { case EAnimationState::Alert: { if (!inAlertRange) { x2d0_animState = EAnimationState::Ready; - ModelData()->AnimationData()->SetAnimation(CAnimPlaybackParms(x2dc_defaultAnim, -1, 1.f, true), false); - ModelData()->EnableLooping(true); + GetModelData()->GetAnimationData()->SetAnimation(CAnimPlaybackParms(x2dc_defaultAnim, -1, 1.f, true), false); + GetModelData()->EnableLooping(true); RandomizePlaybackRate(mgr); } else if (inImpactRange) { SendScriptMsgs(EScriptObjectState::Dead, mgr, EScriptObjectMessage::None); @@ -72,8 +72,8 @@ void CAmbientAI::Think(float dt, CStateManager& mgr) { case EAnimationState::Impact: { if (!x2e8_25_animating) { x2d0_animState = EAnimationState::Ready; - ModelData()->AnimationData()->SetAnimation(CAnimPlaybackParms(x2dc_defaultAnim, -1, 1.f, true), false); - ModelData()->EnableLooping(true); + GetModelData()->GetAnimationData()->SetAnimation(CAnimPlaybackParms(x2dc_defaultAnim, -1, 1.f, true), false); + GetModelData()->EnableLooping(true); RandomizePlaybackRate(mgr); } break; @@ -97,8 +97,8 @@ void CAmbientAI::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CState if (!GetActive()) SetActive(true); x2d0_animState = EAnimationState::Ready; - ModelData()->AnimationData()->SetAnimation(CAnimPlaybackParms(x2dc_defaultAnim, -1, 1.f, true), false); - ModelData()->AnimationData()->EnableLooping(true); + GetModelData()->GetAnimationData()->SetAnimation(CAnimPlaybackParms(x2dc_defaultAnim, -1, 1.f, true), false); + GetModelData()->GetAnimationData()->EnableLooping(true); RandomizePlaybackRate(mgr); x2e8_24_dead = false; x260_healthInfo = x258_initialHealthInfo; @@ -107,8 +107,8 @@ void CAmbientAI::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CState case EScriptObjectMessage::Damage: { if (GetActive()) { x2d0_animState = EAnimationState::Impact; - ModelData()->AnimationData()->SetAnimation(CAnimPlaybackParms(x2e4_impactAnim, -1, 1.f, true), false); - ModelData()->AnimationData()->EnableLooping(false); + GetModelData()->GetAnimationData()->SetAnimation(CAnimPlaybackParms(x2e4_impactAnim, -1, 1.f, true), false); + GetModelData()->GetAnimationData()->EnableLooping(false); RandomizePlaybackRate(mgr); } break; @@ -129,7 +129,7 @@ std::optional CAmbientAI::GetTouchBounds() const { } void CAmbientAI::RandomizePlaybackRate(CStateManager& mgr) { - ModelData()->AnimationData()->MultiplyPlaybackRate(0.4f * mgr.GetActiveRandom()->Float() + 0.8f); + GetModelData()->GetAnimationData()->MultiplyPlaybackRate(0.4f * mgr.GetActiveRandom()->Float() + 0.8f); } } // namespace urde diff --git a/Runtime/World/CFishCloud.cpp b/Runtime/World/CFishCloud.cpp index 7b8ea56e9..8e0c33b13 100644 --- a/Runtime/World/CFishCloud.cpp +++ b/Runtime/World/CFishCloud.cpp @@ -433,7 +433,7 @@ void CFishCloud::Think(float dt, CStateManager& mgr) { } if (x250_27_validModel) { for (auto& m : x1b0_models) { - m->AnimationData()->SetPlaybackRate(1.f); + m->GetAnimationData()->SetPlaybackRate(1.f); m->AdvanceAnimation(dt, mgr, x4_areaId, true); } } @@ -449,7 +449,7 @@ void CFishCloud::AllocateSkinnedModels(CStateManager& mgr, CModelData::EWhichMod for (auto& m : x1b0_models) { m->EnableLooping(true); m->AdvanceAnimation( - m->AnimationData()->GetAnimTimeRemaining("Whole Body"sv) * 0.25f * idx, mgr, x4_areaId, true); + m->GetAnimationData()->GetAnimTimeRemaining("Whole Body"sv) * 0.25f * idx, mgr, x4_areaId, true); ++idx; } x230_whichModel = which; @@ -487,7 +487,7 @@ void CFishCloud::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) { CActor::PreRender(mgr, frustum); if (x250_27_validModel) { for (auto& m : x1b0_models) { - m->AnimationData()->PreRender(); + m->GetAnimationData()->PreRender(); } } xe4_30_outOfFrustum = false; @@ -508,7 +508,7 @@ void CFishCloud::RenderBoid(int idx, const CBoid& boid, u32& drawMask, u32 thisDrawMask = 1u << modelIndex; if (drawMask & thisDrawMask) { drawMask &= ~thisDrawMask; - mData.AnimationData()->BuildPose(); + mData.GetAnimationData()->BuildPose(); } model.GetModelInst()->SetAmbientColor(zeus::skWhite); CGraphics::SetModelMatrix(zeus::lookAt(boid.x0_pos, boid.x0_pos + boid.xc_vel)); @@ -516,7 +516,7 @@ void CFishCloud::RenderBoid(int idx, const CBoid& boid, u32& drawMask, CModelFlags thermFlags(0, 0, 3, zeus::skWhite); mData.RenderThermal(zeus::skWhite, zeus::CColor(0.f, 0.25f), thermFlags); } else { - mData.AnimationData()->Render(model, flags, {}, nullptr); + mData.GetAnimationData()->Render(model, flags, {}, nullptr); } } diff --git a/Runtime/World/CGameArea.cpp b/Runtime/World/CGameArea.cpp index 20d67b559..9d1a732a9 100644 --- a/Runtime/World/CGameArea.cpp +++ b/Runtime/World/CGameArea.cpp @@ -860,7 +860,7 @@ void CGameArea::Validate(CStateManager& mgr) { PostConstructArea(); if (x4_selfIdx != kInvalidAreaId) - mgr.WorldNC()->MoveAreaToAliveChain(x4_selfIdx); + mgr.GetWorld()->MoveAreaToAliveChain(x4_selfIdx); LoadScriptObjects(mgr); @@ -882,7 +882,7 @@ void CGameArea::Validate(CStateManager& mgr) { } void CGameArea::LoadScriptObjects(CStateManager& mgr) { - CWorldLayerState& layerState = *mgr.LayerState(); + CWorldLayerState& layerState = *mgr.WorldLayerState(); u32 layerCount = layerState.GetAreaLayerCount(x4_selfIdx); std::vector objIds; for (u32 i = 0; i < layerCount; ++i) { @@ -1113,7 +1113,7 @@ void CGameArea::VerifyTokenList(CStateManager& stateMgr) { auto end = xac_deps2.end(); for (int lidx = int(xbc_layerDepOffsets.size() - 1); lidx >= 0; --lidx) { auto begin = xac_deps2.begin() + xbc_layerDepOffsets[lidx]; - if (stateMgr.LayerState()->IsLayerActive(x4_selfIdx, lidx)) { + if (stateMgr.WorldLayerState()->IsLayerActive(x4_selfIdx, lidx)) { for (auto it = begin; it != end; ++it) { xdc_tokens.push_back(g_SimplePool->GetObj(*it)); xdc_tokens.back().Lock(); diff --git a/Runtime/World/CGameArea.hpp b/Runtime/World/CGameArea.hpp index 8cf38094c..232475d93 100644 --- a/Runtime/World/CGameArea.hpp +++ b/Runtime/World/CGameArea.hpp @@ -288,7 +288,7 @@ public: CAssetId GetAreaAssetId() const { return x84_mrea; } const CAreaFog* GetAreaFog() const { return GetPostConstructed()->x10c4_areaFog.get(); } - CAreaFog* AreaFog() { return const_cast(GetAreaFog()); } + CAreaFog* GetAreaFog() { return const_cast(GetAreaFog()); } float GetXRayFogDistance() const; EEnvFxType DoesAreaNeedEnvFx() const; bool DoesAreaNeedSkyNow() const; @@ -338,8 +338,8 @@ public: const std::vector& GetDocks() const { return xcc_docks; } const Dock* GetDock(s32 dock) const { return &xcc_docks[dock]; } + Dock* GetDock(s32 dock) { return &xcc_docks[dock]; } s32 GetDockCount() const { return xcc_docks.size(); } - Dock* DockNC(s32 dock) { return &xcc_docks[dock]; } bool IsPostConstructed() const { return xf0_24_postConstructed; } const CPostConstructed* GetPostConstructed() const { diff --git a/Runtime/World/CKnockBackController.cpp b/Runtime/World/CKnockBackController.cpp index 6f2c41981..3dba79bab 100644 --- a/Runtime/World/CKnockBackController.cpp +++ b/Runtime/World/CKnockBackController.cpp @@ -396,7 +396,7 @@ bool CKnockBackController::TickDeferredTimer(float dt) { } EKnockBackCharacterState CKnockBackController::GetKnockBackCharacterState(CPatterned& parent) { - if (parent.BodyController()->IsFrozen()) + if (parent.GetBodyController()->IsFrozen()) return parent.IsAlive() ? EKnockBackCharacterState::FrozenAlive : EKnockBackCharacterState::FrozenDead; return parent.IsAlive() ? EKnockBackCharacterState::Alive : EKnockBackCharacterState::Dead; } @@ -409,23 +409,23 @@ void CKnockBackController::ValidateState(CPatterned& parent) { EKnockBackAnimationState useState = EKnockBackAnimationState::Invalid; if (parent.IsAlive()) { - if (parent.BodyController()->HasBodyState(pas::EAnimationState::Hurled) && x80_availableStates.test(3) && + if (parent.GetBodyController()->HasBodyState(pas::EAnimationState::Hurled) && x80_availableStates.test(3) && x4_activeParms.x0_animState >= EKnockBackAnimationState::Hurled) { useState = EKnockBackAnimationState::Hurled; - } else if (parent.BodyController()->HasBodyState(pas::EAnimationState::KnockBack) && x80_availableStates.test(2) && + } else if (parent.GetBodyController()->HasBodyState(pas::EAnimationState::KnockBack) && x80_availableStates.test(2) && x4_activeParms.x0_animState >= EKnockBackAnimationState::KnockBack) { useState = EKnockBackAnimationState::KnockBack; - } else if (parent.BodyController()->HasBodyState(pas::EAnimationState::AdditiveFlinch) && + } else if (parent.GetBodyController()->HasBodyState(pas::EAnimationState::AdditiveFlinch) && x80_availableStates.test(1) && x4_activeParms.x0_animState >= EKnockBackAnimationState::Flinch) { useState = EKnockBackAnimationState::Flinch; } } else { - if (parent.BodyController()->HasBodyState(pas::EAnimationState::Fall) && x80_availableStates.test(4) && + if (parent.GetBodyController()->HasBodyState(pas::EAnimationState::Fall) && x80_availableStates.test(4) && (x4_activeParms.x0_animState >= EKnockBackAnimationState::Fall || - (!parent.BodyController()->HasBodyState(pas::EAnimationState::Hurled) && + (!parent.GetBodyController()->HasBodyState(pas::EAnimationState::Hurled) && x4_activeParms.x0_animState >= EKnockBackAnimationState::Hurled))) { useState = EKnockBackAnimationState::Fall; - } else if (parent.BodyController()->HasBodyState(pas::EAnimationState::Hurled) && x80_availableStates.test(3) && + } else if (parent.GetBodyController()->HasBodyState(pas::EAnimationState::Hurled) && x80_availableStates.test(3) && x4_activeParms.x0_animState >= EKnockBackAnimationState::Hurled) { useState = EKnockBackAnimationState::Hurled; } @@ -483,26 +483,26 @@ void CKnockBackController::DoKnockBackAnimation(const zeus::CVector3f& backVec, hurlVel = std::sqrt(parent.GetGravityConstant() * 0.5f * hurlVel); zeus::CVector3f backUpVec = backVec + backVec.magnitude() * zeus::skUp; if (backUpVec.canBeNormalized()) { - parent.BodyController()->GetCommandMgr().DeliverCmd(CBCHurledCmd(-backVec, backUpVec.normalized() * hurlVel)); + parent.GetBodyController()->GetCommandMgr().DeliverCmd(CBCHurledCmd(-backVec, backUpVec.normalized() * hurlVel)); parent.SetMomentumWR({0.f, 0.f, parent.GetGravityConstant() * -parent.GetMass()}); } break; } case EKnockBackAnimationState::Fall: { - parent.BodyController()->GetCommandMgr().DeliverCmd(CBCKnockDownCmd(-backVec, x7c_severity)); + parent.GetBodyController()->GetCommandMgr().DeliverCmd(CBCKnockDownCmd(-backVec, x7c_severity)); break; } case EKnockBackAnimationState::KnockBack: { - parent.BodyController()->GetCommandMgr().DeliverCmd(CBCKnockBackCmd(-backVec, x7c_severity)); + parent.GetBodyController()->GetCommandMgr().DeliverCmd(CBCKnockBackCmd(-backVec, x7c_severity)); break; } case EKnockBackAnimationState::Flinch: { std::pair bestAnim = - parent.BodyController()->GetPASDatabase().FindBestAnimation(CPASAnimParmData(23), *mgr.GetActiveRandom(), -1); + parent.GetBodyController()->GetPASDatabase().FindBestAnimation(CPASAnimParmData(23), *mgr.GetActiveRandom(), -1); if (bestAnim.first > 0.f) { - parent.ModelData()->AnimationData()->AddAdditiveAnimation(bestAnim.second, 1.f, false, true); + parent.GetModelData()->GetAnimationData()->AddAdditiveAnimation(bestAnim.second, 1.f, false, true); x64_flinchRemTime = - std::max(parent.ModelData()->AnimationData()->GetAnimationDuration(bestAnim.second), x64_flinchRemTime); + std::max(parent.GetModelData()->GetAnimationData()->GetAnimationDuration(bestAnim.second), x64_flinchRemTime); } break; } @@ -562,8 +562,8 @@ void CKnockBackController::Update(float dt, CStateManager& mgr, CPatterned& pare x64_flinchRemTime -= dt; if (TickDeferredTimer(dt)) DoDeferredKnockBack(mgr, parent); - if (x82_26_locomotionDuringElectrocution && parent.BodyController()->IsElectrocuting()) - parent.BodyController()->GetCommandMgr().DeliverCmd(CBodyStateCmd(EBodyStateCmd::Locomotion)); + if (x82_26_locomotionDuringElectrocution && parent.GetBodyController()->IsElectrocuting()) + parent.GetBodyController()->GetCommandMgr().DeliverCmd(CBodyStateCmd(EBodyStateCmd::Locomotion)); } EKnockBackWeaponType CKnockBackController::GetKnockBackWeaponType(const CDamageInfo& info, EWeaponType wType, diff --git a/Runtime/World/CMorphBall.cpp b/Runtime/World/CMorphBall.cpp index e9a5a9e37..1c2b6eff6 100644 --- a/Runtime/World/CMorphBall.cpp +++ b/Runtime/World/CMorphBall.cpp @@ -985,7 +985,7 @@ void CMorphBall::EnterMorphBallState(CStateManager& mgr) { UpdateEffects(0.f, mgr); x187c_spiderBallState = ESpiderBallState::Inactive; CAnimPlaybackParms parms(0, -1, 1.f, true); - x58_ballModel->AnimationData()->SetAnimation(parms, false); + x58_ballModel->GetAnimationData()->SetAnimation(parms, false); x1e20_ballAnimIdx = 0; StopEffects(); x1c30_boostOverLightFactor = 0.f; @@ -1140,7 +1140,7 @@ void CMorphBall::ComputeBoostBallMovement(const CFinalInput& input, CStateManage x187c_spiderBallState != ESpiderBallState::Active) { if (x1e20_ballAnimIdx == 0) { CAnimPlaybackParms parms(1, -1, 1.f, true); - x58_ballModel->AnimationData()->SetAnimation(parms, false); + x58_ballModel->GetAnimationData()->SetAnimation(parms, false); x1e20_ballAnimIdx = 1; x1e24_boostSfxHandle = CSfxManager::SfxStart(SFXsam_ball_charge_lp, 1.f, 0.f, true, 0x7f, true, kInvalidAreaId); } @@ -1150,7 +1150,7 @@ void CMorphBall::ComputeBoostBallMovement(const CFinalInput& input, CStateManage } else { if (x1e20_ballAnimIdx == 1) { CAnimPlaybackParms parms(0, -1, 1.f, true); - x58_ballModel->AnimationData()->SetAnimation(parms, false); + x58_ballModel->GetAnimationData()->SetAnimation(parms, false); x1e20_ballAnimIdx = 0; CSfxManager::RemoveEmitter(x1e24_boostSfxHandle); if (x1de8_boostChargeTime >= g_tweakBall->GetBoostBallMinChargeTime()) { @@ -1251,7 +1251,7 @@ void CMorphBall::CancelBoosting() { x1df4_boostDrainTime = 0.f; if (x1e20_ballAnimIdx == 1) { CAnimPlaybackParms parms(0, -1, 1.f, true); - x58_ballModel->AnimationData()->SetAnimation(parms, false); + x58_ballModel->GetAnimationData()->SetAnimation(parms, false); x1e20_ballAnimIdx = 0; CSfxManager::SfxStop(x1e24_boostSfxHandle); } @@ -1350,9 +1350,9 @@ void CMorphBall::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) { if (x1c34_boostLightFactor == 1.f) return; - x0_player.ActorLights()->SetFindShadowLight(x1e44_damageEffect < 0.25f); - x0_player.ActorLights()->SetShadowDynamicRangeThreshold(0.05f); - x0_player.ActorLights()->SetDirty(); + x0_player.GetActorLights()->SetFindShadowLight(x1e44_damageEffect < 0.25f); + x0_player.GetActorLights()->SetShadowDynamicRangeThreshold(0.05f); + x0_player.GetActorLights()->SetDirty(); CCollidableSphere sphere = x38_collisionSphere; sphere.SetSphereCenter(zeus::skZero3f); @@ -1361,11 +1361,11 @@ void CMorphBall::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) { if (x0_player.GetAreaIdAlways() != kInvalidAreaId) { const CGameArea* area = mgr.GetWorld()->GetAreaAlways(x0_player.GetAreaIdAlways()); if (area->IsPostConstructed()) - x0_player.ActorLights()->BuildAreaLightList(mgr, *area, ballAABB); + x0_player.GetActorLights()->BuildAreaLightList(mgr, *area, ballAABB); } - x0_player.ActorLights()->BuildDynamicLightList(mgr, ballAABB); - if (x0_player.ActorLights()->HasShadowLight()) { + x0_player.GetActorLights()->BuildDynamicLightList(mgr, ballAABB); + if (x0_player.GetActorLights()->HasShadowLight()) { CCollidableSphere sphere = x38_collisionSphere; sphere.SetSphereCenter(zeus::skZero3f); x1c14_worldShadow->BuildLightShadowTexture(mgr, x0_player.GetAreaIdAlways(), @@ -1375,17 +1375,17 @@ void CMorphBall::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) { x1c14_worldShadow->ResetBlur(); } - zeus::CColor ambColor = x0_player.ActorLights()->GetAmbientColor(); + zeus::CColor ambColor = x0_player.GetActorLights()->GetAmbientColor(); ambColor.a() = 1.f; - x0_player.ActorLights()->SetAmbientColor(zeus::CColor::lerp(ambColor, zeus::skWhite, x1c34_boostLightFactor)); + x0_player.GetActorLights()->SetAmbientColor(zeus::CColor::lerp(ambColor, zeus::skWhite, x1c34_boostLightFactor)); *x1c18_actorLights = *x0_player.GetActorLights(); - ambColor = x0_player.ActorLights()->GetAmbientColor(); + ambColor = x0_player.GetActorLights()->GetAmbientColor(); ambColor.a() = 1.f; x1c18_actorLights->SetAmbientColor( zeus::CColor::lerp(ambColor, zeus::skWhite, std::max(x1c38_spiderLightFactor, x1c34_boostLightFactor))); - if (CAnimData* animData = x58_ballModel->AnimationData()) + if (CAnimData* animData = x58_ballModel->GetAnimationData()) animData->PreRender(); } diff --git a/Runtime/World/CPatterned.cpp b/Runtime/World/CPatterned.cpp index ac3ddf786..4d25a2adb 100644 --- a/Runtime/World/CPatterned.cpp +++ b/Runtime/World/CPatterned.cpp @@ -1162,7 +1162,7 @@ void CPatterned::UpdateAlphaDelta(float dt, CStateManager& mgr) { } x94_simpleShadow->SetUserAlpha(alpha); SetModelAlpha(alpha); - x64_modelData->AnimationData()->GetParticleDB().SetModulationColorAllActiveEffects(zeus::CColor(1.f, alpha)); + x64_modelData->GetAnimationData()->GetParticleDB().SetModulationColorAllActiveEffects(zeus::CColor(1.f, alpha)); } float CPatterned::CalcDyingThinkRate() const { @@ -1566,7 +1566,7 @@ void CPatterned::AddToRenderer(const zeus::CFrustum& frustum, const CStateManage if (x64_modelData && !x64_modelData->IsNull()) { int mask, target; mgr.GetCharacterRenderMaskAndTarget(x402_31_thawed, mask, target); - if (CAnimData* aData = x64_modelData->AnimationData()) + if (CAnimData* aData = x64_modelData->GetAnimationData()) aData->GetParticleDB().AddToRendererClippedMasked(frustum, mask, target); } } @@ -1576,7 +1576,7 @@ void CPatterned::AddToRenderer(const zeus::CFrustum& frustum, const CStateManage void CPatterned::RenderIceModelWithFlags(const CModelFlags& flags) const { CModelFlags useFlags = flags; useFlags.x1_matSetIdx = 0; - CAnimData* animData = x64_modelData->AnimationData(); + CAnimData* animData = x64_modelData->GetAnimationData(); if (CMorphableSkinnedModel* iceModel = animData->IceModel().GetObj()) animData->Render(*iceModel, useFlags, {*x510_vertexMorph}, iceModel->GetMorphMagnitudes()); } @@ -1690,7 +1690,7 @@ void CPatterned::PhazeOut(CStateManager& mgr) { SendScriptMsgs(EScriptObjectState::DeathRattle, mgr, EScriptObjectMessage::None); x401_27_phazingOut = true; x450_bodyController->SetPlaybackRate(0.f); - x64_modelData->AnimationData()->GetParticleDB().SetUpdatesEnabled(false); + x64_modelData->GetAnimationData()->GetParticleDB().SetUpdatesEnabled(false); } bool CPatterned::ApplyBoneTracking() const { diff --git a/Runtime/World/CPatterned.hpp b/Runtime/World/CPatterned.hpp index 767ccfbf3..c78131610 100644 --- a/Runtime/World/CPatterned.hpp +++ b/Runtime/World/CPatterned.hpp @@ -361,7 +361,7 @@ public: void BuildBodyController(EBodyType); const CBodyController* GetBodyController() const { return x450_bodyController.get(); } - CBodyController* BodyController() { return x450_bodyController.get(); } + CBodyController* GetBodyController() { return x450_bodyController.get(); } const CKnockBackController& GetKnockBackController() const { return x460_knockBackController; } void SetupPlayerCollision(bool); void LaunchProjectile(const zeus::CTransform& gunXf, CStateManager& mgr, int maxAllowed, EProjectileAttrib attrib, diff --git a/Runtime/World/CPlayer.cpp b/Runtime/World/CPlayer.cpp index 6dfa7851b..29f72b133 100644 --- a/Runtime/World/CPlayer.cpp +++ b/Runtime/World/CPlayer.cpp @@ -124,7 +124,7 @@ CPlayer::CPlayer(TUniqueId uid, const zeus::CTransform& xf, const zeus::CAABox& void CPlayer::InitializeBallTransition() { if (x64_modelData && x64_modelData->HasAnimData()) - x64_modelData->AnimationData()->SetAnimation(CAnimPlaybackParms(2, -1, 1.f, true), false); + x64_modelData->GetAnimationData()->SetAnimation(CAnimPlaybackParms(2, -1, 1.f, true), false); } bool CPlayer::IsTransparent() const { return x588_alpha < 1.f; } @@ -173,8 +173,8 @@ void CPlayer::TransitionToMorphBallState(float dt, CStateManager& mgr) { x58c_transitionVel = x138_velocity.magnitude(); if (x64_modelData && x64_modelData->HasAnimData()) { CAnimPlaybackParms parms(x584_ballTransitionAnim, -1, 1.f, true); - x64_modelData->AnimationData()->SetAnimation(parms, false); - x64_modelData->AnimationData()->SetAnimDir(CAnimData::EAnimDir::Forward); + x64_modelData->GetAnimationData()->SetAnimation(parms, false); + x64_modelData->GetAnimationData()->SetAnimDir(CAnimData::EAnimDir::Forward); } x64_modelData->EnableLooping(false); x64_modelData->Touch(mgr, 0); @@ -224,8 +224,8 @@ void CPlayer::TransitionFromMorphBallState(CStateManager& mgr) { if (x64_modelData && x64_modelData->HasAnimData()) { CAnimPlaybackParms parms(x584_ballTransitionAnim, -1, 1.f, true); - x64_modelData->AnimationData()->SetAnimation(parms, false); - x64_modelData->AnimationData()->SetAnimDir(CAnimData::EAnimDir::Forward); + x64_modelData->GetAnimationData()->SetAnimation(parms, false); + x64_modelData->GetAnimationData()->SetAnimDir(CAnimData::EAnimDir::Forward); } x64_modelData->EnableLooping(false); @@ -346,8 +346,8 @@ void CPlayer::UpdateMorphBallTransition(float dt, CStateManager& mgr) { x584_ballTransitionAnim = GetNextBallTransitionAnim(dt, loop, mgr); if (x64_modelData && x64_modelData->HasAnimData()) { CAnimPlaybackParms parms(x584_ballTransitionAnim, -1, 1.f, true); - x64_modelData->AnimationData()->SetAnimation(parms, false); - x64_modelData->AnimationData()->EnableLooping(loop); + x64_modelData->GetAnimationData()->SetAnimation(parms, false); + x64_modelData->GetAnimationData()->EnableLooping(loop); } } } else if (x584_ballTransitionAnim != 5 && x584_ballTransitionAnim != 7) @@ -361,8 +361,8 @@ void CPlayer::UpdateMorphBallTransition(float dt, CStateManager& mgr) { x584_ballTransitionAnim != 7) { x584_ballTransitionAnim = nextAnim; CAnimPlaybackParms parms(x584_ballTransitionAnim, -1, 1.f, true); - x64_modelData->AnimationData()->SetAnimation(parms, false); - x64_modelData->AnimationData()->EnableLooping(loop); + x64_modelData->GetAnimationData()->SetAnimation(parms, false); + x64_modelData->GetAnimationData()->EnableLooping(loop); x58c_transitionVel = velMag; } } @@ -1317,7 +1317,7 @@ void CPlayer::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) { } for (auto& model : x730_transitionModels) - model->AnimationData()->PreRender(); + model->GetAnimationData()->PreRender(); if (x2f4_cameraState != EPlayerCameraState::FirstPerson) CActor::PreRender(mgr, frustum); @@ -5323,10 +5323,10 @@ void CPlayer::SetHudDisable(float staticTimer, float outSpeed, float inSpeed) { void CPlayer::SetIntoBallReadyAnimation(CStateManager& mgr) { CAnimPlaybackParms parms(2, -1, 1.f, true); - x64_modelData->AnimationData()->SetAnimation(parms, false); - x64_modelData->AnimationData()->EnableLooping(false); + x64_modelData->GetAnimationData()->SetAnimation(parms, false); + x64_modelData->GetAnimationData()->EnableLooping(false); x64_modelData->AdvanceAnimation(0.f, mgr, kInvalidAreaId, true); - x64_modelData->AnimationData()->EnableAnimation(false); + x64_modelData->GetAnimationData()->EnableAnimation(false); } void CPlayer::LeaveMorphBallState(CStateManager& mgr) { diff --git a/Runtime/World/CScriptActorKeyframe.cpp b/Runtime/World/CScriptActorKeyframe.cpp index 4f1b1fc2d..7a4b5ad5b 100644 --- a/Runtime/World/CScriptActorKeyframe.cpp +++ b/Runtime/World/CScriptActorKeyframe.cpp @@ -68,7 +68,7 @@ void CScriptActorKeyframe::Think(float dt, CStateManager& mgr) { CEntity* ent = mgr.ObjectById(mgr.GetIdForScript(conn.x8_objId)); if (TCastToPtr act = ent) { if (act->HasModelData() && act->GetModelData()->HasAnimData()) { - CAnimData* animData = act->ModelData()->AnimationData(); + CAnimData* animData = act->GetModelData()->GetAnimationData(); if (animData->IsAdditiveAnimation(x34_animationId)) animData->DelAdditiveAnimation(x34_animationId); @@ -76,12 +76,12 @@ void CScriptActorKeyframe::Think(float dt, CStateManager& mgr) { animData->EnableLooping(false); } } else if (TCastToPtr ai = ent) { - CAnimData* animData = ai->ModelData()->AnimationData(); + CAnimData* animData = ai->GetModelData()->GetAnimationData(); if (animData->IsAdditiveAnimation(x34_animationId)) { animData->DelAdditiveAnimation(x34_animationId); } else if (ai->GetBodyController()->GetCurrentStateId() == pas::EAnimationState::Scripted && animData->GetDefaultAnimation() == x34_animationId) { - ai->BodyController()->GetCommandMgr().DeliverCmd(CBodyStateCmd(EBodyStateCmd::ExitState)); + ai->GetBodyController()->GetCommandMgr().DeliverCmd(CBodyStateCmd(EBodyStateCmd::ExitState)); } } } @@ -102,21 +102,21 @@ void CScriptActorKeyframe::UpdateEntity(TUniqueId uid, CStateManager& mgr) { mgr.SendScriptMsg(act, GetUniqueId(), EScriptObjectMessage::Activate); act->SetDrawFlags({0, 0, 3, zeus::skWhite}); if (act->HasModelData() && act->GetModelData()->HasAnimData()) { - CAnimData* animData = act->ModelData()->AnimationData(); + CAnimData* animData = act->GetModelData()->GetAnimationData(); if (animData->IsAdditiveAnimation(x34_animationId)) { animData->AddAdditiveAnimation(x34_animationId, 1.f, x44_24_looping, x44_26_fadeOut); } else { animData->SetAnimation(CAnimPlaybackParms(x34_animationId, -1, 1.f, true), false); - act->ModelData()->EnableLooping(x44_24_looping); + act->GetModelData()->EnableLooping(x44_24_looping); animData->MultiplyPlaybackRate(x3c_playbackRate); } } } else if (TCastToPtr ai = ent) { - CAnimData* animData = ai->ModelData()->AnimationData(); + CAnimData* animData = ai->GetModelData()->GetAnimationData(); if (animData->IsAdditiveAnimation(x34_animationId)) { animData->AddAdditiveAnimation(x34_animationId, 1.f, x44_24_looping, x44_26_fadeOut); } else { - ai->BodyController()->GetCommandMgr().DeliverCmd( + ai->GetBodyController()->GetCommandMgr().DeliverCmd( CBCScriptedCmd(x34_animationId, x44_24_looping, x44_27_timedLoop, x38_initialLifetime)); } } diff --git a/Runtime/World/CScriptAreaAttributes.cpp b/Runtime/World/CScriptAreaAttributes.cpp index b95b71dd2..85868d4a3 100644 --- a/Runtime/World/CScriptAreaAttributes.cpp +++ b/Runtime/World/CScriptAreaAttributes.cpp @@ -27,11 +27,11 @@ void CScriptAreaAttributes::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId return; if (msg == EScriptObjectMessage::InitializedInArea) { - CGameArea* area = stateMgr.WorldNC()->GetArea(x4_areaId); + CGameArea* area = stateMgr.GetWorld()->GetArea(x4_areaId); area->SetAreaAttributes(this); stateMgr.GetEnvFxManager()->SetFxDensity(500, x3c_envFxDensity); } else if (msg == EScriptObjectMessage::Deleted) { - CGameArea* area = stateMgr.WorldNC()->GetArea(x4_areaId); + CGameArea* area = stateMgr.GetWorld()->GetArea(x4_areaId); if (!area->IsPostConstructed()) return; diff --git a/Runtime/World/CScriptDistanceFog.cpp b/Runtime/World/CScriptDistanceFog.cpp index 253196bf5..6d33a9959 100644 --- a/Runtime/World/CScriptDistanceFog.cpp +++ b/Runtime/World/CScriptDistanceFog.cpp @@ -38,7 +38,7 @@ void CScriptDistanceFog::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId obj if (msg == EScriptObjectMessage::InitializedInArea) { if (!x60_explicit) return; - CGameArea::CAreaFog* fog = stateMgr.WorldNC()->GetArea(x4_areaId)->AreaFog(); + CGameArea::CAreaFog* fog = stateMgr.GetWorld()->GetArea(x4_areaId)->GetAreaFog(); if (x34_mode == ERglFogMode::None) fog->DisableFog(); else @@ -47,18 +47,18 @@ void CScriptDistanceFog::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId obj if (!x61_nonZero) return; - CGameArea::CAreaFog* fog = stateMgr.WorldNC()->GetArea(x4_areaId)->AreaFog(); + CGameArea::CAreaFog* fog = stateMgr.GetWorld()->GetArea(x4_areaId)->GetAreaFog(); if (x34_mode == ERglFogMode::None) fog->RollFogOut(x48_rangeDelta.x(), x44_colorDelta, x38_color); else fog->FadeFog(x34_mode, x38_color, x3c_range, x44_colorDelta, x48_rangeDelta); if (zeus::close_enough(x54_thermalSpeed, 0.f) && !zeus::close_enough(x5c_xraySpeed, 0.f)) { - CWorld* world = stateMgr.WorldNC(); + CWorld* world = stateMgr.GetWorld(); CGameArea* area = world->GetArea(x4_areaId); area->SetXRaySpeedAndTarget(x5c_xraySpeed, x58_xrayTarget); } else { - CWorld* world = stateMgr.WorldNC(); + CWorld* world = stateMgr.GetWorld(); CGameArea* area = world->GetArea(x4_areaId); area->SetThermalSpeedAndTarget(x54_thermalSpeed, x50_thermalTarget); } diff --git a/Runtime/World/CScriptDock.cpp b/Runtime/World/CScriptDock.cpp index c41ecf183..231f4f4d3 100644 --- a/Runtime/World/CScriptDock.cpp +++ b/Runtime/World/CScriptDock.cpp @@ -38,10 +38,10 @@ void CScriptDock::Think(float dt, CStateManager& mgr) { x268_24_dockReferenced = false; } - const IGameArea::Dock* gameDock = mgr.WorldNC()->GetArea(x260_area)->GetDock(x25c_dock); + const IGameArea::Dock* gameDock = mgr.GetWorld()->GetArea(x260_area)->GetDock(x25c_dock); TAreaId connArea = gameDock->GetConnectedAreaId(gameDock->GetReferenceCount()); if (connArea != kInvalidAreaId) { - bool connPostConstructed = mgr.WorldNC()->GetArea(connArea)->IsPostConstructed(); + bool connPostConstructed = mgr.GetWorld()->GetArea(connArea)->IsPostConstructed(); if (x268_26_areaPostConstructed != connPostConstructed) { x268_26_areaPostConstructed = connPostConstructed; if (connPostConstructed) @@ -60,13 +60,13 @@ void CScriptDock::Think(float dt, CStateManager& mgr) { else if (x264_dockState == EDockState::EnterNextArea) { CPlayer& player = mgr.GetPlayer(); if (HasPointCrossedDock(mgr, player.GetTranslation())) { - IGameArea::Dock* dock = mgr.WorldNC()->GetArea(mgr.GetNextAreaId())->DockNC(x25c_dock); + IGameArea::Dock* dock = mgr.GetWorld()->GetArea(mgr.GetNextAreaId())->GetDock(x25c_dock); TAreaId aid = dock->GetConnectedAreaId(dock->GetReferenceCount()); - if (aid != kInvalidAreaId && mgr.WorldNC()->GetArea(aid)->GetActive()) { + if (aid != kInvalidAreaId && mgr.GetWorld()->GetArea(aid)->GetActive()) { mgr.SetCurrentAreaId(aid); s32 otherDock = dock->GetOtherDockNumber(dock->GetReferenceCount()); - if (CObjectList* objs = mgr.WorldNC()->GetArea(aid)->GetAreaObjects()) { + if (CObjectList* objs = mgr.GetWorld()->GetArea(aid)->GetAreaObjects()) { for (CEntity* ent : *objs) { TCastToPtr dock(ent); if (dock && dock->GetDockId() == otherDock) @@ -83,10 +83,10 @@ void CScriptDock::Think(float dt, CStateManager& mgr) { void CScriptDock::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) { switch (msg) { case EScriptObjectMessage::Registered: { - CGameArea* area = mgr.WorldNC()->GetArea(x260_area); + CGameArea* area = mgr.GetWorld()->GetArea(x260_area); if (area->GetDockCount() < x25c_dock) return; - IGameArea::Dock* dock = area->DockNC(x25c_dock); + IGameArea::Dock* dock = area->GetDock(x25c_dock); if (!dock->IsReferenced()) dock->SetReferenceCount(x258_dockReferenceCount); } break; @@ -109,8 +109,8 @@ void CScriptDock::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStat SetLoadConnected(mgr, false); - CGameArea* area = mgr.WorldNC()->GetArea(x260_area); - IGameArea::Dock* dock = area->DockNC(x25c_dock); + CGameArea* area = mgr.GetWorld()->GetArea(x260_area); + IGameArea::Dock* dock = area->GetDock(x25c_dock); TAreaId aid = dock->GetConnectedAreaId(dock->GetReferenceCount()); @@ -133,13 +133,13 @@ void CScriptDock::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStat case EScriptObjectMessage::Decrement: { TAreaId aid = x260_area; if (mgr.GetNextAreaId() == x260_area) { - IGameArea::Dock* dock = mgr.WorldNC()->GetArea(x260_area)->DockNC(x25c_dock); + IGameArea::Dock* dock = mgr.GetWorld()->GetArea(x260_area)->GetDock(x25c_dock); aid = dock->GetConnectedAreaId(dock->GetReferenceCount()); } - if (aid >= 0 && aid < mgr.GetWorld()->GetNumAreas() && mgr.WorldNC()->GetArea(aid)->GetActive()) + if (aid >= 0 && aid < mgr.GetWorld()->GetNumAreas() && mgr.GetWorld()->GetArea(aid)->GetActive()) CWorld::PropogateAreaChain(CGameArea::EOcclusionState(msg == EScriptObjectMessage::Increment), - mgr.WorldNC()->GetArea(aid), mgr.WorldNC()); + mgr.GetWorld()->GetArea(aid), mgr.GetWorld()); } break; default: CPhysicsActor::AcceptScriptMsg(msg, uid, mgr); @@ -168,7 +168,7 @@ zeus::CPlane CScriptDock::GetPlane(const CStateManager& mgr) const { } void CScriptDock::SetDockReference(CStateManager& mgr, s32 ref) { - mgr.WorldNC()->GetArea(x260_area)->DockNC(x25c_dock)->SetReferenceCount(ref); + mgr.GetWorld()->GetArea(x260_area)->GetDock(x25c_dock)->SetReferenceCount(ref); x268_24_dockReferenced = true; } @@ -188,7 +188,7 @@ TAreaId CScriptDock::GetCurrentConnectedAreaId(const CStateManager& mgr) const { } void CScriptDock::UpdateAreaActivateFlags(CStateManager& mgr) { - CWorld* world = mgr.WorldNC(); + CWorld* world = mgr.GetWorld(); if (x260_area >= world->GetNumAreas()) return; @@ -197,7 +197,7 @@ void CScriptDock::UpdateAreaActivateFlags(CStateManager& mgr) { if (x25c_dock >= area->GetDockCount()) return; - IGameArea::Dock* dock = area->DockNC(x25c_dock); + IGameArea::Dock* dock = area->GetDock(x25c_dock); for (s32 i = 0; i < dock->GetDockRefs().size(); ++i) { s32 dockRefCount = dock->GetReferenceCount(); @@ -216,7 +216,7 @@ bool CScriptDock::HasPointCrossedDock(const CStateManager& mgr, const zeus::CVec void CScriptDock::AreaLoaded(CStateManager& mgr) { SetLoadConnected(mgr, x268_25_loadConnected); } void CScriptDock::SetLoadConnected(CStateManager& mgr, bool loadOther) { - IGameArea::Dock* dock = mgr.WorldNC()->GetArea(x260_area)->DockNC(x25c_dock); + IGameArea::Dock* dock = mgr.GetWorld()->GetArea(x260_area)->GetDock(x25c_dock); bool cur = dock->GetShouldLoadOther(dock->GetReferenceCount()); if (cur == loadOther) return; diff --git a/Runtime/World/CScriptDoor.cpp b/Runtime/World/CScriptDoor.cpp index 3e8625660..bde14c13b 100644 --- a/Runtime/World/CScriptDoor.cpp +++ b/Runtime/World/CScriptDoor.cpp @@ -358,8 +358,8 @@ CScriptDoor::EDoorOpenCondition CScriptDoor::GetDoorOpenCondition(CStateManager& void CScriptDoor::SetDoorAnimation(CScriptDoor::EDoorAnimType type) { x260_doorAnimState = type; CModelData* modelData = x64_modelData.get(); - if (modelData && modelData->AnimationData()) - modelData->AnimationData()->SetAnimation(CAnimPlaybackParms(s32(type), -1, 1.f, true), false); + if (modelData && modelData->GetAnimationData()) + modelData->GetAnimationData()->SetAnimation(CAnimPlaybackParms(s32(type), -1, 1.f, true), false); } std::optional CScriptDoor::GetTouchBounds() const { diff --git a/Runtime/World/CScriptGenerator.cpp b/Runtime/World/CScriptGenerator.cpp index 80c01e64a..7169857d5 100644 --- a/Runtime/World/CScriptGenerator.cpp +++ b/Runtime/World/CScriptGenerator.cpp @@ -101,7 +101,7 @@ void CScriptGenerator::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sende } float rnd = stateMgr.GetActiveRandom()->Range(x48_minScale, x4c_maxScale); - CModelData* mData = activateActor->ModelData(); + CModelData* mData = activateActor->GetModelData(); if (mData && !mData->IsNull()) mData->SetScale(rnd * mData->GetScale()); diff --git a/Runtime/World/CScriptGunTurret.cpp b/Runtime/World/CScriptGunTurret.cpp index d7cd7c954..e0f2ec0a8 100644 --- a/Runtime/World/CScriptGunTurret.cpp +++ b/Runtime/World/CScriptGunTurret.cpp @@ -145,7 +145,7 @@ CScriptGunTurret::CScriptGunTurret(TUniqueId uid, std::string_view name, ETurret x560_31_frenzyReverse = false; if (comp == ETurretComponent::Base && HasModelData() && GetModelData()->HasAnimData()) - ModelData()->EnableLooping(true); + GetModelData()->EnableLooping(true); x37c_projectileInfo.Token().Lock(); } @@ -403,21 +403,21 @@ void CScriptGunTurret::LaunchProjectile(CStateManager& mgr) { x458_visorEffectDesc, x2d4_data.GetVisorSoundId(), false); mgr.AddObject(proj); auto pair = - x64_modelData->AnimationData()->GetCharacterInfo().GetPASDatabase().FindBestAnimation( + x64_modelData->GetAnimationData()->GetCharacterInfo().GetPASDatabase().FindBestAnimation( CPASAnimParmData(18, CPASAnimParm::FromEnum(1), CPASAnimParm::FromReal32(90.f), CPASAnimParm::FromEnum(skStateToLocoTypeLookup[int(x520_state)])), -1); if (pair.first > 0.f) { x64_modelData->EnableLooping(false); - x64_modelData->AnimationData()->SetAnimation(CAnimPlaybackParms(pair.second, -1, 1.f, true), false); + x64_modelData->GetAnimationData()->SetAnimation(CAnimPlaybackParms(pair.second, -1, 1.f, true), false); } } } void CScriptGunTurret::PlayAdditiveFlinchAnimation(CStateManager& mgr) { - auto pair = ModelData()->AnimationData()->GetCharacterInfo().GetPASDatabase().FindBestAnimation( + auto pair = GetModelData()->GetAnimationData()->GetCharacterInfo().GetPASDatabase().FindBestAnimation( CPASAnimParmData(23), *mgr.GetActiveRandom(), -1); if (pair.first > 0.f) - ModelData()->AnimationData()->AddAdditiveAnimation(pair.second, 1.f, false, true); + GetModelData()->GetAnimationData()->AddAdditiveAnimation(pair.second, 1.f, false, true); } void CScriptGunTurret::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const { @@ -678,8 +678,8 @@ void CScriptGunTurret::UpdateTurretAnimation() { auto pair = GetModelData()->GetAnimationData()->GetCharacterInfo().GetPASDatabase().FindBestAnimation(parmData, -1); if (pair.first > 0.f && pair.second != x540_turretAnim) { - ModelData()->AnimationData()->SetAnimation(CAnimPlaybackParms(pair.second, -1, 1.f, true), false); - ModelData()->AnimationData()->EnableLooping(true); + GetModelData()->GetAnimationData()->SetAnimation(CAnimPlaybackParms(pair.second, -1, 1.f, true), false); + GetModelData()->GetAnimationData()->EnableLooping(true); x540_turretAnim = pair.second; } } @@ -1126,14 +1126,14 @@ void CScriptGunTurret::PlayAdditiveChargingAnimation(CStateManager& mgr) { if (x55c_additiveChargeAnim != -1) return; - auto pair = ModelData()->AnimationData()->GetCharacterInfo().GetPASDatabase().FindBestAnimation( + auto pair = GetModelData()->GetAnimationData()->GetCharacterInfo().GetPASDatabase().FindBestAnimation( CPASAnimParmData(24, CPASAnimParm::FromEnum(2)), *mgr.GetActiveRandom(), -1); if (pair.first > 0.f) { x55c_additiveChargeAnim = pair.second; - ModelData()->AnimationData()->AddAdditiveAnimation(pair.second, 1.f, true, false); + GetModelData()->GetAnimationData()->AddAdditiveAnimation(pair.second, 1.f, true, false); } } else if (x55c_additiveChargeAnim != -1) { - ModelData()->AnimationData()->DelAdditiveAnimation(x55c_additiveChargeAnim); + GetModelData()->GetAnimationData()->DelAdditiveAnimation(x55c_additiveChargeAnim); x55c_additiveChargeAnim = -1; } } diff --git a/Runtime/World/CScriptPickup.cpp b/Runtime/World/CScriptPickup.cpp index 8b5a21b7b..2e7fd3dbe 100644 --- a/Runtime/World/CScriptPickup.cpp +++ b/Runtime/World/CScriptPickup.cpp @@ -32,8 +32,8 @@ CScriptPickup::CScriptPickup(TUniqueId uid, std::string_view name, const CEntity if (pickupEffect.IsValid()) x27c_pickupParticleDesc = g_SimplePool->GetObj({SBIG('PART'), pickupEffect}); - if (x64_modelData && x64_modelData->AnimationData()) - x64_modelData->AnimationData()->SetAnimation(CAnimPlaybackParms(0, -1, 1.f, true), false); + if (x64_modelData && x64_modelData->GetAnimationData()) + x64_modelData->GetAnimationData()->SetAnimation(CAnimPlaybackParms(0, -1, 1.f, true), false); if (x278_delayTimer != 0.f) { xb4_drawFlags = CModelFlags(5, 0, 3, zeus::CColor(1.f, 1.f, 1.f, 0.f)); diff --git a/Runtime/World/CScriptPlatform.cpp b/Runtime/World/CScriptPlatform.cpp index b9316547c..31000b664 100644 --- a/Runtime/World/CScriptPlatform.cpp +++ b/Runtime/World/CScriptPlatform.cpp @@ -51,8 +51,8 @@ CScriptPlatform::CScriptPlatform( CMaterialList(EMaterialTypes::Solid), CMaterialList(EMaterialTypes::NoStaticCollision, EMaterialTypes::NoPlatformCollision, EMaterialTypes::Platform))); xf8_24_movable = false; - if (HasModelData() && ModelData()->HasAnimData()) - ModelData()->AnimationData()->EnableLooping(true); + if (HasModelData() && GetModelData()->HasAnimData()) + GetModelData()->GetAnimationData()->EnableLooping(true); if (x304_treeGroupContainer) x314_treeGroup = std::make_unique(x304_treeGroupContainer->GetObj(), x68_material); } diff --git a/Runtime/World/CScriptPlayerActor.cpp b/Runtime/World/CScriptPlayerActor.cpp index 907fc7eb1..d12696925 100644 --- a/Runtime/World/CScriptPlayerActor.cpp +++ b/Runtime/World/CScriptPlayerActor.cpp @@ -116,7 +116,7 @@ void CScriptPlayerActor::PumpBeamModel(CStateManager& mgr) { return; BuildBeamModelData(); x314_beamModelData->Touch(mgr, 0); - mgr.WorldNC()->CycleLoadPauseState(); + mgr.GetWorld()->CycleLoadPauseState(); x31c_beamModel = TLockedToken(); x354_27_beamModelLoading = false; } @@ -131,7 +131,7 @@ void CScriptPlayerActor::PumpSuitModel(CStateManager& mgr) { return; x320_suitModel->Touch(0); - mgr.WorldNC()->CycleLoadPauseState(); + mgr.GetWorld()->CycleLoadPauseState(); bool didSetup = false; if (x354_26_deferOfflineModelData) { @@ -155,10 +155,10 @@ void CScriptPlayerActor::SetupOfflineModelData() { x2e8_suitRes.SetCharacterNodeId(x310_loadedCharIdx); x318_suitModelData = std::make_unique(x2e8_suitRes); if (!static_cast(*g_Main).GetScreenFading()) { - x328_backupModelData = x64_modelData->AnimationData()->GetModelData(); + x328_backupModelData = x64_modelData->GetAnimationData()->GetModelData(); x348_deallocateBackupCountdown = 2; } - x64_modelData->AnimationData()->SubstituteModelData(x318_suitModelData->AnimationData()->GetModelData()); + x64_modelData->GetAnimationData()->SubstituteModelData(x318_suitModelData->GetAnimationData()->GetModelData()); } void CScriptPlayerActor::SetupOnlineModelData() { @@ -166,7 +166,7 @@ void CScriptPlayerActor::SetupOnlineModelData() { x2e8_suitRes.SetCharacterNodeId(x310_loadedCharIdx); SetModelData(std::make_unique(x2e8_suitRes)); CAnimPlaybackParms parms(x2e8_suitRes.GetDefaultAnim(), -1, 1.f, true); - x64_modelData->AnimationData()->SetAnimation(parms, false); + x64_modelData->GetAnimationData()->SetAnimation(parms, false); if (x354_24_setBoundingBox) SetBoundingBox(x64_modelData->GetBounds(GetTransform().getRotation())); } diff --git a/Runtime/World/CScriptSound.cpp b/Runtime/World/CScriptSound.cpp index 912d069c9..503623981 100644 --- a/Runtime/World/CScriptSound.cpp +++ b/Runtime/World/CScriptSound.cpp @@ -180,7 +180,7 @@ void CScriptSound::PlaySound(CStateManager& mgr) { xec_sfxHandle = CSfxManager::SfxStart(x100_soundId, x10e_vol, x114_pan, x11c_29_acoustics, x112_prio, x11c_25_looped, x11c_30_worldSfx ? kInvalidAreaId : GetAreaIdAlways()); if (x11c_30_worldSfx) - mgr.WorldNC()->AddGlobalSound(xec_sfxHandle); + mgr.GetWorld()->AddGlobalSound(xec_sfxHandle); } } else { float occVol = x11c_28_occlusionTest ? GetOccludedVolumeAmount(GetTranslation(), mgr) : 1.f; @@ -202,7 +202,7 @@ void CScriptSound::PlaySound(CStateManager& mgr) { void CScriptSound::StopSound(CStateManager& mgr) { x11c_24_playRequested = false; if (x11c_30_worldSfx && x11c_26_nonEmitter) { - mgr.WorldNC()->StopGlobalSound(x100_soundId); + mgr.GetWorld()->StopGlobalSound(x100_soundId); xec_sfxHandle.reset(); } else if (xec_sfxHandle) { CSfxManager::RemoveEmitter(xec_sfxHandle); diff --git a/Runtime/World/CScriptSpawnPoint.cpp b/Runtime/World/CScriptSpawnPoint.cpp index 9c9489231..802b80898 100644 --- a/Runtime/World/CScriptSpawnPoint.cpp +++ b/Runtime/World/CScriptSpawnPoint.cpp @@ -49,10 +49,10 @@ void CScriptSpawnPoint::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objI CPlayer* player = stateMgr.Player(); if (x4_areaId != stateMgr.GetNextAreaId()) { - CGameArea* area = stateMgr.WorldNC()->GetArea(x4_areaId); + CGameArea* area = stateMgr.GetWorld()->GetArea(x4_areaId); if (area->IsPostConstructed() && area->GetOcclusionState() == CGameArea::EOcclusionState::Occluded) { /* while (!area->TryTakingOutOfARAM()) {} */ - CWorld::PropogateAreaChain(CGameArea::EOcclusionState::Visible, area, stateMgr.WorldNC()); + CWorld::PropogateAreaChain(CGameArea::EOcclusionState::Visible, area, stateMgr.GetWorld()); } stateMgr.SetCurrentAreaId(x4_areaId); @@ -62,7 +62,7 @@ void CScriptSpawnPoint::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objI if (area->IsPostConstructed() && area->GetOcclusionState() == CGameArea::EOcclusionState::Visible) CWorld::PropogateAreaChain(CGameArea::EOcclusionState::Occluded, - stateMgr.WorldNC()->GetArea(stateMgr.GetNextAreaId()), stateMgr.WorldNC()); + stateMgr.GetWorld()->GetArea(stateMgr.GetNextAreaId()), stateMgr.GetWorld()); } else { player->Teleport(GetTransform(), stateMgr, true); player->SetSpawnedMorphBallState(CPlayer::EPlayerMorphBallState(x10c_25_morphed), stateMgr); diff --git a/Runtime/World/CScriptSpecialFunction.cpp b/Runtime/World/CScriptSpecialFunction.cpp index b52024cb1..05cc0b7d1 100644 --- a/Runtime/World/CScriptSpecialFunction.cpp +++ b/Runtime/World/CScriptSpecialFunction.cpp @@ -181,7 +181,7 @@ void CScriptSpecialFunction::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId case ESpecialFunction::MapStation: { if (msg == EScriptObjectMessage::Action) { mgr.MapWorldInfo()->SetMapStationUsed(true); - const_cast(*mgr.WorldNC()->GetMapWorld()) + const_cast(*mgr.GetWorld()->GetMapWorld()) .RecalculateWorldSphere(*mgr.MapWorldInfo(), *mgr.GetWorld()); } break; @@ -327,7 +327,7 @@ void CScriptSpecialFunction::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId TAreaId aId = mgr.GetWorld()->GetAreaIdForSaveId(x1bc_areaSaveId); std::shared_ptr worldLayerState; if (aId != kInvalidAreaId) - worldLayerState = mgr.WorldLayerStateNC(); + worldLayerState = mgr.WorldLayerState(); else { std::pair worldAreaPair = g_MemoryCardSys->GetAreaAndWorldIdForSaveId(x1bc_areaSaveId); if (worldAreaPair.first.IsValid()) { @@ -763,7 +763,7 @@ void CScriptSpecialFunction::ThinkActorScale(float dt, CStateManager& mgr) { if (conn.x0_state != EScriptObjectState::Play || conn.x4_msg != EScriptObjectMessage::Activate) continue; if (TCastToPtr act = mgr.ObjectById(mgr.GetIdForScript(conn.x8_objId))) { - CModelData* mData = act->ModelData(); + CModelData* mData = act->GetModelData(); if (mData && (mData->HasAnimData() || mData->HasNormalModel())) { zeus::CVector3f scale = mData->GetScale(); diff --git a/Runtime/World/CScriptWorldTeleporter.cpp b/Runtime/World/CScriptWorldTeleporter.cpp index 91c996f82..2eb0fc2da 100644 --- a/Runtime/World/CScriptWorldTeleporter.cpp +++ b/Runtime/World/CScriptWorldTeleporter.cpp @@ -77,7 +77,7 @@ void CScriptWorldTeleporter::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId transMgr->SfxStart(); break; case EScriptObjectMessage::SetToZero: { - const auto& world = mgr.WorldNC(); + const auto& world = mgr.GetWorld(); world->SetLoadPauseState(true); CAssetId currentWorld = g_GameState->CurrentWorldAssetId(); g_GameState->SetCurrentWorldId(x34_worldId); diff --git a/Runtime/World/CWallCrawlerSwarm.cpp b/Runtime/World/CWallCrawlerSwarm.cpp index 7afcd019d..1b0242447 100644 --- a/Runtime/World/CWallCrawlerSwarm.cpp +++ b/Runtime/World/CWallCrawlerSwarm.cpp @@ -120,7 +120,7 @@ void CWallCrawlerSwarm::AllocateSkinnedModels(CStateManager& mgr, CModelData::EW //x430_.push_back(x4b0_[i]->PickAnimatedModel(which).Clone()); x4b0_modelDatas[i]->EnableLooping(true); x4b0_modelDatas[i]->AdvanceAnimation( - x4b0_modelDatas[i]->AnimationData()->GetAnimTimeRemaining("Whole Body"sv) * (i * 0.0625f), + x4b0_modelDatas[i]->GetAnimationData()->GetAnimTimeRemaining("Whole Body"sv) * (i * 0.0625f), mgr, x4_areaId, true); } //x430_.push_back(x4b0_.back()->PickAnimatedModel(which).Clone()); @@ -799,7 +799,7 @@ void CWallCrawlerSwarm::Think(float dt, CStateManager& mgr) { } } - x4b0_modelDatas[8]->AnimationData()->SetPlaybackRate(x160_animPlaybackSpeed); + x4b0_modelDatas[8]->GetAnimationData()->SetPlaybackRate(x160_animPlaybackSpeed); x4b0_modelDatas[8]->AdvanceAnimation(dt, mgr, x4_areaId, true); SAdvancementDeltas deltas1, deltas2; @@ -823,14 +823,14 @@ void CWallCrawlerSwarm::Think(float dt, CStateManager& mgr) { } for (int i = 0; i < 4; ++i) { - x4b0_modelDatas[i]->AnimationData()->SetPlaybackRate(x160_animPlaybackSpeed); + x4b0_modelDatas[i]->GetAnimationData()->SetPlaybackRate(x160_animPlaybackSpeed); deltas1 = x4b0_modelDatas[i]->AdvanceAnimation(dt, mgr, x4_areaId, true); - x4b0_modelDatas[i+4]->AnimationData()->SetPlaybackRate(x160_animPlaybackSpeed); + x4b0_modelDatas[i+4]->GetAnimationData()->SetPlaybackRate(x160_animPlaybackSpeed); deltas2 = x4b0_modelDatas[i+4]->AdvanceAnimation(dt, mgr, x4_areaId, true); if (x4b0_modelDatas[i]->HasAnimData() && _38F4[i]) - UpdateEffects(mgr, *x4b0_modelDatas[i]->AnimationData(), r8 * 44 / x548_numBoids + 0x53); + UpdateEffects(mgr, *x4b0_modelDatas[i]->GetAnimationData(), r8 * 44 / x548_numBoids + 0x53); if (x4b0_modelDatas[i+4]->HasAnimData() && _38F8[i]) - UpdateEffects(mgr, *x4b0_modelDatas[i+4]->AnimationData(), r3 * 44 / x548_numBoids + 0x53); + UpdateEffects(mgr, *x4b0_modelDatas[i+4]->GetAnimationData(), r3 * 44 / x548_numBoids + 0x53); for (int r20 = i; r20 < x108_boids.size(); r20 += 4) { CBoid& b = x108_boids[r20]; if (b.GetActive()) { @@ -885,7 +885,7 @@ void CWallCrawlerSwarm::Think(float dt, CStateManager& mgr) { void CWallCrawlerSwarm::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) { for (int i = 0; i < 5; ++i) - x4b0_modelDatas[i]->AnimationData()->PreRender(); + x4b0_modelDatas[i]->GetAnimationData()->PreRender(); bool activeBoid = false; for (auto& b : x108_boids) { if (b.GetActive()) { @@ -946,7 +946,7 @@ void CWallCrawlerSwarm::HardwareLight(const CStateManager& mgr, const zeus::CAAB lights.BuildDynamicLightList(mgr, aabb); for (auto& m : x4b0_modelDatas) { lights.ActivateLights(*m->PickAnimatedModel(x4dc_whichModel).GetModelInst()); - if (auto iceModel = m->AnimationData()->GetIceModel()) + if (auto iceModel = m->GetAnimationData()->GetIceModel()) lights.ActivateLights(*iceModel->GetModelInst()); } } @@ -966,27 +966,27 @@ void CWallCrawlerSwarm::RenderBoid(const CBoid* boid, u32& drawMask, bool therma u32 thisDrawMask = 1u << modelIndex; if (drawMask & thisDrawMask) { drawMask &= ~thisDrawMask; - mData.AnimationData()->BuildPose(); + mData.GetAnimationData()->BuildPose(); } model.GetModelInst()->SetAmbientColor(boid->x40_ambientLighting); CGraphics::SetModelMatrix(boid->GetTransform()); if (boid->x48_timeToDie > 0.f && !thermalHot) { CModelFlags useFlags(0, 0, 3, zeus::skWhite); - mData.AnimationData()->Render(model, useFlags, {}, nullptr); - if (auto iceModel = mData.AnimationData()->GetIceModel()) { + mData.GetAnimationData()->Render(model, useFlags, {}, nullptr); + if (auto iceModel = mData.GetAnimationData()->GetIceModel()) { if (!iceModel->GetModelInst()->TryLockTextures()) return; iceModel->GetModelInst()->SetAmbientColor(zeus::skWhite); float alpha = 1.f - boid->x48_timeToDie; zeus::CColor color(1.f, alpha > 0.f ? boid->x48_timeToDie : 1.f); CModelFlags iceFlags(5, 0, 3, color); - mData.AnimationData()->Render(*iceModel, iceFlags, {}, nullptr); + mData.GetAnimationData()->Render(*iceModel, iceFlags, {}, nullptr); } } else if (thermalHot) { CModelFlags thermFlags(5, 0, 3, zeus::skWhite); mData.RenderThermal(zeus::skWhite, zeus::CColor(0.f, 0.25f), thermFlags); } else { - mData.AnimationData()->Render(model, flags, {}, nullptr); + mData.GetAnimationData()->Render(model, flags, {}, nullptr); } } diff --git a/Runtime/World/CWallWalker.cpp b/Runtime/World/CWallWalker.cpp index e4d7efa2d..050beb0a1 100644 --- a/Runtime/World/CWallWalker.cpp +++ b/Runtime/World/CWallWalker.cpp @@ -154,10 +154,10 @@ void CWallWalker::Think(float dt, CStateManager& mgr) { return; if (x5c8_bendingHackWeight > 0.0001f) { - ModelData()->AnimationData()->AddAdditiveAnimation(x5cc_bendingHackAnim, x5c8_bendingHackWeight, true, false); + GetModelData()->GetAnimationData()->AddAdditiveAnimation(x5cc_bendingHackAnim, x5c8_bendingHackWeight, true, false); x5d6_29_applyBendingHack = true; } else { - ModelData()->AnimationData()->DelAdditiveAnimation(x5cc_bendingHackAnim); + GetModelData()->GetAnimationData()->DelAdditiveAnimation(x5cc_bendingHackAnim); x5d6_29_applyBendingHack = false; } } diff --git a/Runtime/World/CWorldTransManager.cpp b/Runtime/World/CWorldTransManager.cpp index 44f512c76..624a18ff6 100644 --- a/Runtime/World/CWorldTransManager.cpp +++ b/Runtime/World/CWorldTransManager.cpp @@ -198,7 +198,7 @@ void CWorldTransManager::DrawAllModels(CActorLights* lights) { CModelFlags flags = {}; flags.m_extendedShader = EExtendedShader::LightingCubeReflection; - x4_modelData->x1c_samusModelData.AnimationData()->PreRender(); + x4_modelData->x1c_samusModelData.GetAnimationData()->PreRender(); x4_modelData->x1c_samusModelData.Render(CModelData::EWhichModel::Normal, zeus::CTransform(), lights, flags); @@ -359,7 +359,7 @@ void CWorldTransManager::TouchModels() { x4_modelData->x1c_samusModelData = {animRes, 2}; CAnimPlaybackParms aData(animRes.GetDefaultAnim(), -1, 1.f, true); - x4_modelData->x1c_samusModelData.AnimationData()->SetAnimation(aData, false); + x4_modelData->x1c_samusModelData.GetAnimationData()->SetAnimation(aData, false); } if (!x4_modelData->x1c_samusModelData.IsNull()) diff --git a/Runtime/World/ScriptLoader.cpp b/Runtime/World/ScriptLoader.cpp index 59ffb9453..ac23e00e5 100644 --- a/Runtime/World/ScriptLoader.cpp +++ b/Runtime/World/ScriptLoader.cpp @@ -184,7 +184,7 @@ static SScaledActorHead LoadScaledActorHead(CInputStream& in, CStateManager& sta static zeus::CAABox GetCollisionBox(CStateManager& stateMgr, TAreaId id, const zeus::CVector3f& extent, const zeus::CVector3f& offset) { zeus::CAABox box(-extent * 0.5f + offset, extent * 0.5f + offset); - const zeus::CTransform& rot = stateMgr.WorldNC()->GetGameAreas()[id]->GetTransform().getRotation(); + const zeus::CTransform& rot = stateMgr.GetWorld()->GetGameAreas()[id]->GetTransform().getRotation(); return box.getTransformedAABox(rot); } @@ -533,7 +533,7 @@ CEntity* ScriptLoader::LoadTrigger(CStateManager& mgr, CInputStream& in, int pro zeus::CAABox box(-extent * 0.5f, extent * 0.5f); - const zeus::CTransform& areaXf = mgr.WorldNC()->GetGameAreas()[info.GetAreaId()]->GetTransform(); + const zeus::CTransform& areaXf = mgr.GetWorld()->GetGameAreas()[info.GetAreaId()]->GetTransform(); zeus::CVector3f orientedForce = areaXf.basis * forceVec; return new CScriptTrigger(mgr.AllocateUniqueId(), name, info, position, box, dInfo, orientedForce, flags, active, b2, @@ -1079,7 +1079,7 @@ u32 ClassifyVector(const zeus::CVector3f& dir) { } u32 TransformDamagableTriggerFlags(CStateManager& mgr, TAreaId aId, u32 flags) { - CGameArea* area = mgr.WorldNC()->GetGameAreas().at(u32(aId)).get(); + CGameArea* area = mgr.GetWorld()->GetGameAreas().at(u32(aId)).get(); zeus::CTransform rotation = area->GetTransform().getRotation(); u32 ret = 0; From fa7785d024f8790a9fe501dad375ed7e5d1af211 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Wed, 14 Aug 2019 12:56:46 -0700 Subject: [PATCH 31/65] Fix GetAreaFog --- Runtime/World/CGameArea.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/World/CGameArea.hpp b/Runtime/World/CGameArea.hpp index 232475d93..35dfb8534 100644 --- a/Runtime/World/CGameArea.hpp +++ b/Runtime/World/CGameArea.hpp @@ -288,7 +288,7 @@ public: CAssetId GetAreaAssetId() const { return x84_mrea; } const CAreaFog* GetAreaFog() const { return GetPostConstructed()->x10c4_areaFog.get(); } - CAreaFog* GetAreaFog() { return const_cast(GetAreaFog()); } + CAreaFog* GetAreaFog() { return GetPostConstructed()->x10c4_areaFog.get(); } float GetXRayFogDistance() const; EEnvFxType DoesAreaNeedEnvFx() const; bool DoesAreaNeedSkyNow() const; From 2517fac40429c17b925ad3edaa75e885cd111016 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Aug 2019 22:20:37 -0400 Subject: [PATCH 32/65] RetroDataSpec: Make member functions const where applicable Marks member functions that don't modify instance state as const. --- DataSpec/DNACommon/CMDL.cpp | 2 +- DataSpec/DNACommon/DNACommon.hpp | 2 +- DataSpec/DNAMP1/DCLN.hpp | 2 +- DataSpec/DNAMP1/SCAN.hpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DataSpec/DNACommon/CMDL.cpp b/DataSpec/DNACommon/CMDL.cpp index 4081375bd..7f4cb2ffa 100644 --- a/DataSpec/DNACommon/CMDL.cpp +++ b/DataSpec/DNACommon/CMDL.cpp @@ -208,7 +208,7 @@ public: m_cur = m_dl.get(); } - operator bool() { return ((m_cur - m_dl.get()) < intptr_t(m_dlSize)) && *m_cur; } + explicit operator bool() const { return ((m_cur - m_dl.get()) < intptr_t(m_dlSize)) && *m_cur; } GX::Primitive readPrimitive() { return GX::Primitive(*m_cur++ & 0xf8); } diff --git a/DataSpec/DNACommon/DNACommon.hpp b/DataSpec/DNACommon/DNACommon.hpp index 17809cbb7..4dc5c961a 100644 --- a/DataSpec/DNACommon/DNACommon.hpp +++ b/DataSpec/DNACommon/DNACommon.hpp @@ -396,7 +396,7 @@ public: ++m_idx; return *this; } - bool operator*() { return m_bmp.getBit(m_idx); } + bool operator*() const { return m_bmp.getBit(m_idx); } bool operator!=(const Iterator& other) const { return m_idx != other.m_idx; } }; Iterator begin() const { return Iterator(*this, 0); } diff --git a/DataSpec/DNAMP1/DCLN.hpp b/DataSpec/DNAMP1/DCLN.hpp index 1839b559b..305828698 100644 --- a/DataSpec/DNAMP1/DCLN.hpp +++ b/DataSpec/DNAMP1/DCLN.hpp @@ -74,7 +74,7 @@ struct DCLN : BigDNA { #endif }; Node root; - size_t getMemoryUsage() { return root.getMemoryUsage(); } + size_t getMemoryUsage() const { return root.getMemoryUsage(); } /* Dummy MP2 member */ void insertNoClimb(hecl::blender::PyOutStream&) const {} diff --git a/DataSpec/DNAMP1/SCAN.hpp b/DataSpec/DNAMP1/SCAN.hpp index 6bd76fc9b..701070ddd 100644 --- a/DataSpec/DNAMP1/SCAN.hpp +++ b/DataSpec/DNAMP1/SCAN.hpp @@ -98,7 +98,7 @@ struct SCAN : BigDNA { } } - void gatherDependencies(std::vector& pathsOut) { + void gatherDependencies(std::vector& pathsOut) const { g_curSpec->flattenDependencies(frame, pathsOut); g_curSpec->flattenDependencies(string, pathsOut); for (int i = 0; i < 4; ++i) From 11098374a45da319961712697176cc63e68dc63c Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Aug 2019 22:38:17 -0400 Subject: [PATCH 33/65] RetroDataSpec: Use fmt::print where applicable Replaces uses of fprintf with fmt::print where applicable. For trivial character insertion, we can make use of fputc instead of fprintf. --- DataSpec/DNACommon/ANIM.cpp | 12 ++++++------ DataSpec/SpecBase.cpp | 4 +--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/DataSpec/DNACommon/ANIM.cpp b/DataSpec/DNACommon/ANIM.cpp index c2f5f61e9..1da1e436c 100644 --- a/DataSpec/DNACommon/ANIM.cpp +++ b/DataSpec/DNACommon/ANIM.cpp @@ -163,7 +163,7 @@ std::vector> BitstreamReader::read(const atUint8* data, size_ for (size_t f = 0; f < keyFrameCount; ++f) { #if DUMP_KEYS - fprintf(stderr, "\nFRAME %" PRISize " %u %u\n", f, (m_bitCur / 32) * 4, m_bitCur % 32); + fmt::print(stderr, fmt("\nFRAME {} {} {}\n"), f, (m_bitCur / 32) * 4, m_bitCur % 32); int lastId = -1; #endif auto kit = chanKeys.begin(); @@ -172,7 +172,7 @@ std::vector> BitstreamReader::read(const atUint8* data, size_ #if DUMP_KEYS if (chan.id != lastId) { lastId = chan.id; - fprintf(stderr, "\n"); + std::fputc('\n', stderr); } #endif QuantizedValue& p = *ait; @@ -185,7 +185,7 @@ std::vector> BitstreamReader::read(const atUint8* data, size_ QuantizedRot qr = {{p[0], p[1], p[2]}, wBit}; kit->emplace_back(DequantizeRotation(qr, rotDiv)); #if DUMP_KEYS - fprintf(stderr, "%d R: %d %d %d %d\t", chan.id, wBit, p[0], p[1], p[2]); + fmt::print(stderr, fmt("{} R: {} {} {} {}\t"), chan.id, wBit, p[0], p[1], p[2]); #endif break; } @@ -198,7 +198,7 @@ std::vector> BitstreamReader::read(const atUint8* data, size_ p[2] += val3; kit->push_back({p[0] * transMult, p[1] * transMult, p[2] * transMult}); #if DUMP_KEYS - fprintf(stderr, "%d T: %d %d %d\t", chan.id, p[0], p[1], p[2]); + fmt::print(stderr, fmt("{} T: {} {} {}\t"), chan.id, p[0], p[1], p[2]); #endif break; } @@ -208,7 +208,7 @@ std::vector> BitstreamReader::read(const atUint8* data, size_ p[2] += dequantize(data, chan.q[2]); kit->push_back({p[0] * scaleMult, p[1] * scaleMult, p[2] * scaleMult}); #if DUMP_KEYS - fprintf(stderr, "%d S: %d %d %d\t", chan.id, p[0], p[1], p[2]); + fmt::print(stderr, fmt("{} S: {} {} {}\t"), chan.id, p[0], p[1], p[2]); #endif break; } @@ -236,7 +236,7 @@ std::vector> BitstreamReader::read(const atUint8* data, size_ ++ait; } #if DUMP_KEYS - fprintf(stderr, "\n"); + std::fputc('\n', stderr); #endif } diff --git a/DataSpec/SpecBase.cpp b/DataSpec/SpecBase.cpp index 1b0cf9e87..9093f6fdc 100644 --- a/DataSpec/SpecBase.cpp +++ b/DataSpec/SpecBase.cpp @@ -927,9 +927,7 @@ void SpecBase::readCatalog(const hecl::ProjectPath& catalogPath, athena::io::YAM WriteNameTag(nameWriter, pathTag, p.first); #if 0 - fprintf(stderr, "%s %s %08X\n", - p.first.c_str(), - pathTag.type.toString().c_str(), uint32_t(pathTag.id)); + fmt::print(stderr, fmt("{} {} {:08X}\n"), p.first, pathTag.type.toString(), pathTag.id.Value()); #endif } } From 3cbf5028cd2b55102fe4057e95caadc0d2e67074 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Thu, 15 Aug 2019 07:53:27 -0700 Subject: [PATCH 34/65] Update submodules --- hecl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hecl b/hecl index f35201691..67e992c61 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit f35201691fb27fed58c38cd749152812876e4790 +Subproject commit 67e992c61f79746db4b00faf95ab01319d680dd6 From eaf5ba4b34da3c209777fb8d66dcb179d0e36336 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Thu, 15 Aug 2019 08:41:25 -0700 Subject: [PATCH 35/65] Update submodules --- hecl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hecl b/hecl index 67e992c61..b20397c64 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 67e992c61f79746db4b00faf95ab01319d680dd6 +Subproject commit b20397c64c83d1d83d02f29f93425f828cbb1f30 From 9a922de6c17c00c4496db1d7434ec52b987c36a3 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Thu, 15 Aug 2019 16:09:05 -0700 Subject: [PATCH 36/65] Update submodules --- hecl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hecl b/hecl index b20397c64..dec38232e 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit b20397c64c83d1d83d02f29f93425f828cbb1f30 +Subproject commit dec38232ed0492fb2c622da7a36472959a8dfd42 From 0c3ed33d7471e4b6777db9c01cd6c3719c869222 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Thu, 15 Aug 2019 20:41:47 -0700 Subject: [PATCH 37/65] Update submodules --- hecl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hecl b/hecl index dec38232e..715876a5d 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit dec38232ed0492fb2c622da7a36472959a8dfd42 +Subproject commit 715876a5dc8ff69032612fb0af69823387205951 From 23c718fe18d53522815052f8fdf91b10f064fc7f Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Fri, 16 Aug 2019 18:39:05 -0700 Subject: [PATCH 38/65] Update submodules --- hecl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hecl b/hecl index 715876a5d..4f98c566f 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 715876a5dc8ff69032612fb0af69823387205951 +Subproject commit 4f98c566fad80e9aed5da411795acc9d81b1062c From 44ea9e68ed6e781357c5c2aa6718dc04a2b5dd25 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 17 Aug 2019 23:01:05 -0700 Subject: [PATCH 39/65] Update submodules --- DataSpec/DNAMP1/ANCS.cpp | 6 ++++++ hecl | 2 +- nod | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/DataSpec/DNAMP1/ANCS.cpp b/DataSpec/DNAMP1/ANCS.cpp index 8f698163b..a06313bc8 100644 --- a/DataSpec/DNAMP1/ANCS.cpp +++ b/DataSpec/DNAMP1/ANCS.cpp @@ -660,6 +660,10 @@ void ANCS::AnimationSet::MetaAnimFactory::Enumerate(athena::io if (!type.compare("primitive")) { m_anim.reset(new struct MetaAnimPrimitive); m_anim->read(reader); + if (static_cast(m_anim.get())->animName == "B_outofdig4_garbeetle") { + fmt::print(fmt("{} -> {}\n"), static_cast(m_anim.get())->animName, + static_cast(m_anim.get())->animId); + } } else if (!type.compare("blend")) { m_anim.reset(new struct MetaAnimBlend); m_anim->read(reader); @@ -1059,6 +1063,8 @@ bool ANCS::Cook(const hecl::ProjectPath& outPath, const hecl::ProjectPath& inPat hecl::SystemStringConv sysStr(prim.animName); hecl::ProjectPath pathOut = inPath.ensureAuxInfo(hecl::SystemString(sysStr.sys_str()) + _SYS_STR(".ANIM")); prim.animId = pathOut; + if (prim.animName == "B_outofdig4_garbeetle") + fmt::print(fmt("{}|{}\n"), pathOut.getRelativePathUTF8(), pathOut.getAuxInfoUTF8()); return true; }); diff --git a/hecl b/hecl index 4f98c566f..87c8205a9 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 4f98c566fad80e9aed5da411795acc9d81b1062c +Subproject commit 87c8205a91c748167456e02e1069a1cfc290728d diff --git a/nod b/nod index 18b297e31..c9bf82128 160000 --- a/nod +++ b/nod @@ -1 +1 @@ -Subproject commit 18b297e3125ff8f3d318a203217f682330a8e4ea +Subproject commit c9bf821285202eec382a673bdfa41044e6cbba7f From a41bd828e733b8b418c62d9df0424ebe5500a67f Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sun, 18 Aug 2019 18:49:54 -0700 Subject: [PATCH 40/65] Update submodules --- DataSpec/DNAMP1/ANCS.cpp | 6 ------ Runtime/Graphics/CLineRenderer.cpp | 8 ++++---- hecl | 2 +- specter | 2 +- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/DataSpec/DNAMP1/ANCS.cpp b/DataSpec/DNAMP1/ANCS.cpp index a06313bc8..8f698163b 100644 --- a/DataSpec/DNAMP1/ANCS.cpp +++ b/DataSpec/DNAMP1/ANCS.cpp @@ -660,10 +660,6 @@ void ANCS::AnimationSet::MetaAnimFactory::Enumerate(athena::io if (!type.compare("primitive")) { m_anim.reset(new struct MetaAnimPrimitive); m_anim->read(reader); - if (static_cast(m_anim.get())->animName == "B_outofdig4_garbeetle") { - fmt::print(fmt("{} -> {}\n"), static_cast(m_anim.get())->animName, - static_cast(m_anim.get())->animId); - } } else if (!type.compare("blend")) { m_anim.reset(new struct MetaAnimBlend); m_anim->read(reader); @@ -1063,8 +1059,6 @@ bool ANCS::Cook(const hecl::ProjectPath& outPath, const hecl::ProjectPath& inPat hecl::SystemStringConv sysStr(prim.animName); hecl::ProjectPath pathOut = inPath.ensureAuxInfo(hecl::SystemString(sysStr.sys_str()) + _SYS_STR(".ANIM")); prim.animId = pathOut; - if (prim.animName == "B_outofdig4_garbeetle") - fmt::print(fmt("{}|{}\n"), pathOut.getRelativePathUTF8(), pathOut.getAuxInfoUTF8()); return true; }); diff --git a/Runtime/Graphics/CLineRenderer.cpp b/Runtime/Graphics/CLineRenderer.cpp index 66a07fc7b..3cb4b9356 100644 --- a/Runtime/Graphics/CLineRenderer.cpp +++ b/Runtime/Graphics/CLineRenderer.cpp @@ -24,7 +24,7 @@ CLineRenderer::CLineRenderer(boo::IGraphicsDataFactory::Context& ctx, EPrimitive LineRendererLog.report(logvisor::Fatal, fmt(_SYS_STR("maxVerts < 2, maxVerts = {}")), maxVerts); return; } - m_textured = texture; + m_textured = bool(texture); u32 maxTriVerts; switch (mode) { @@ -37,7 +37,7 @@ CLineRenderer::CLineRenderer(boo::IGraphicsDataFactory::Context& ctx, EPrimitive break; } - if (texture) + if (bool(texture)) m_vertBufTex = s_vertPoolTex.allocateBlock(CGraphics::g_BooFactory, maxTriVerts); else m_vertBufNoTex = s_vertPoolNoTex.allocateBlock(CGraphics::g_BooFactory, maxTriVerts); @@ -54,7 +54,7 @@ CLineRenderer::CLineRenderer(EPrimitiveMode mode, u32 maxVerts, const boo::ObjTo LineRendererLog.report(logvisor::Fatal, fmt(_SYS_STR("maxVerts < 2, maxVerts = {}")), maxVerts); return; } - m_textured = texture; + m_textured = bool(texture); u32 maxTriVerts; switch (mode) { @@ -67,7 +67,7 @@ CLineRenderer::CLineRenderer(EPrimitiveMode mode, u32 maxVerts, const boo::ObjTo break; } - if (texture) + if (bool(texture)) m_vertBufTex = s_vertPoolTex.allocateBlock(CGraphics::g_BooFactory, maxTriVerts); else m_vertBufNoTex = s_vertPoolNoTex.allocateBlock(CGraphics::g_BooFactory, maxTriVerts); diff --git a/hecl b/hecl index 87c8205a9..3508e9d53 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 87c8205a91c748167456e02e1069a1cfc290728d +Subproject commit 3508e9d536a540f51369acaef5b957cb91d53e8e diff --git a/specter b/specter index e57aa9f82..ba31ba180 160000 --- a/specter +++ b/specter @@ -1 +1 @@ -Subproject commit e57aa9f82763eec158aa029dcd125450fa26c2f7 +Subproject commit ba31ba180f3cbc1ba9513befa95a4dbbdbaf38a4 From bbd074abd00ddcb5cddacb36c6d5084dd060cb4d Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Mon, 19 Aug 2019 23:11:28 -0700 Subject: [PATCH 41/65] Update hecl --- hecl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hecl b/hecl index 3508e9d53..d2caca066 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 3508e9d536a540f51369acaef5b957cb91d53e8e +Subproject commit d2caca066165ffa5be71368075c0588143052531 From 69e8a62e8cada73ca2c7f9d582ec26739606db4d Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Tue, 20 Aug 2019 00:34:58 -0700 Subject: [PATCH 42/65] Update submodules --- hecl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hecl b/hecl index d2caca066..45af7c9e9 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit d2caca066165ffa5be71368075c0588143052531 +Subproject commit 45af7c9e9d6ee471e9c48f41db144e944440700b From 0af829c79d78a558d5d27baee312d3f0fb97ab6d Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Tue, 20 Aug 2019 01:08:57 -0700 Subject: [PATCH 43/65] Update submodules --- hecl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hecl b/hecl index 45af7c9e9..de482c8fa 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 45af7c9e9d6ee471e9c48f41db144e944440700b +Subproject commit de482c8facd934f5d0a2a541b292af3f2b833b30 From e855cbd902e7862684de79c5aa9a8a8849f06705 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Tue, 20 Aug 2019 06:58:13 -0700 Subject: [PATCH 44/65] Update hecl, fix CFlickerBat's targetable state being inverted --- Runtime/MP1/World/CFlickerBat.cpp | 8 +++----- hecl | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Runtime/MP1/World/CFlickerBat.cpp b/Runtime/MP1/World/CFlickerBat.cpp index d462ff3cd..1eee4cb4f 100644 --- a/Runtime/MP1/World/CFlickerBat.cpp +++ b/Runtime/MP1/World/CFlickerBat.cpp @@ -88,11 +88,9 @@ void CFlickerBat::Think(float dt, CStateManager& mgr) { x42c_color.a() = alpha; x94_simpleShadow->SetUserAlpha(alpha); - bool targetable = true; - if (mgr.GetPlayerState()->GetCurrentVisor() != CPlayerState::EPlayerVisor::XRay && - (x574_state == EFlickerBatState::Visible || x574_state == EFlickerBatState::FadeIn)) - targetable = false; - xe7_31_targetable = targetable; + xe7_31_targetable = (mgr.GetPlayerState()->GetCurrentVisor() == CPlayerState::EPlayerVisor::XRay + ? true + : x574_state == EFlickerBatState::Visible || x574_state == EFlickerBatState::FadeIn); CPatterned::Think(dt, mgr); } diff --git a/hecl b/hecl index de482c8fa..875a3fc1f 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit de482c8facd934f5d0a2a541b292af3f2b833b30 +Subproject commit 875a3fc1f23d00859f025176ff0c418ba5d5ebf0 From bd97adc5713f1743c9e150c3cf13dd8e336778b2 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Tue, 20 Aug 2019 19:35:37 -0700 Subject: [PATCH 45/65] Update hecl --- hecl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hecl b/hecl index 875a3fc1f..bb9a9df25 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 875a3fc1f23d00859f025176ff0c418ba5d5ebf0 +Subproject commit bb9a9df251c9bd6b8e458cb1b8884fe455900bf5 From 71612509b6e54e43284a01991c4a7c852581293c Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Thu, 22 Aug 2019 00:49:48 -0700 Subject: [PATCH 46/65] Update hecl --- hecl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hecl b/hecl index bb9a9df25..6a7dc19fc 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit bb9a9df251c9bd6b8e458cb1b8884fe455900bf5 +Subproject commit 6a7dc19fccaa20ff7971f677cc2da7e9f0661605 From cbc8c229643fe9897fc024e97cac4b4ccc58c56a Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Thu, 22 Aug 2019 18:36:40 -0700 Subject: [PATCH 47/65] Update jbus --- jbus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jbus b/jbus index 87cbb52a3..876c4dcde 160000 --- a/jbus +++ b/jbus @@ -1 +1 @@ -Subproject commit 87cbb52a332c402107b4f6b73660a4696975df5e +Subproject commit 876c4dcde449ec641b9d9e013e4d030e09fd59be From 7b77e9ace9b5b80d10febb641b4d6912930dad11 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Thu, 22 Aug 2019 18:42:47 -0700 Subject: [PATCH 48/65] Update status, add discord invite link --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9615ff1c8..1e68df19a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ ## URDE -**Status:** Extract Only +**Status:** In-Game with 0-00 (v1.088) only + +**Official Discord Channel:** [https://discord.gg/rYKrYK] ### Download Precompiled builds of the command-line extraction utility (`hecl`) with embedded dataspec libraries are available at https://github.com/AxioDL/urde/releases. This will give you intermediate dumps of original formats as *blender* and *yaml* representations. From 9866bac443dcf3081f1fb05a096cbdeec6506894 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Fri, 23 Aug 2019 01:32:48 -0700 Subject: [PATCH 49/65] Update jbus, initial CEnergyBall stub --- Runtime/MP1/World/CEnergyBall.cpp | 11 ++++++++++ Runtime/MP1/World/CEnergyBall.hpp | 15 +++++++++++++ Runtime/MP1/World/CMakeLists.txt | 1 + Runtime/World/ScriptLoader.cpp | 36 ++++++++++++++++++++++++++++++- jbus | 2 +- 5 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 Runtime/MP1/World/CEnergyBall.cpp create mode 100644 Runtime/MP1/World/CEnergyBall.hpp diff --git a/Runtime/MP1/World/CEnergyBall.cpp b/Runtime/MP1/World/CEnergyBall.cpp new file mode 100644 index 000000000..894cfb1bd --- /dev/null +++ b/Runtime/MP1/World/CEnergyBall.cpp @@ -0,0 +1,11 @@ +#include "MP1/World/CEnergyBall.hpp" + +namespace urde::MP1 { +CEnergyBall::CEnergyBall(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, + CModelData&& mData, const CActorParameters& actParms, const CPatternedInfo& pInfo, s32 w1, + float f1, const CDamageInfo& dInfo1, float f2, const CAssetId& a1, s16 sfxId1, + const CAssetId& a2, const CAssetId& a3, s16 sfxId2, float f3, float f4, const CAssetId& a4, + const CDamageInfo& dInfo2, float f5) +: CPatterned(ECharacter::EnergyBall, uid, name, EFlavorType::Zero, info, xf, std::move(mData), pInfo, + EMovementType::Flyer, EColliderType::One, EBodyType::NewFlyer, actParms, EKnockBackVariant::Medium) {} +} \ No newline at end of file diff --git a/Runtime/MP1/World/CEnergyBall.hpp b/Runtime/MP1/World/CEnergyBall.hpp new file mode 100644 index 000000000..7ac0bbdc1 --- /dev/null +++ b/Runtime/MP1/World/CEnergyBall.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "World/CPatterned.hpp" + +namespace urde::MP1 { +class CEnergyBall : public CPatterned { +public: + DEFINE_PATTERNED(EnergyBall) + CEnergyBall(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, + CModelData&& mData, const CActorParameters& actParms, const CPatternedInfo& pInfo, s32 w1, float f1, + const CDamageInfo& dInfo1, float f2, const CAssetId& a1, s16 sfxId1, const CAssetId& a2, + const CAssetId& a3, s16 sfxId2, float f3, float f4, const CAssetId& a4, const CDamageInfo& dInfo2, + float f5); +}; +} diff --git a/Runtime/MP1/World/CMakeLists.txt b/Runtime/MP1/World/CMakeLists.txt index 480558214..e36821c8f 100644 --- a/Runtime/MP1/World/CMakeLists.txt +++ b/Runtime/MP1/World/CMakeLists.txt @@ -10,6 +10,7 @@ set(MP1_WORLD_SOURCES CBabygoth.hpp CBabygoth.cpp CTryclops.hpp CTryclops.cpp CFireFlea.hpp CFireFlea.cpp + CEnergyBall.hpp CEnergyBall.cpp CEyeball.hpp CEyeball.cpp CAtomicAlpha.hpp CAtomicAlpha.cpp CAtomicBeta.hpp CAtomicBeta.cpp diff --git a/Runtime/World/ScriptLoader.cpp b/Runtime/World/ScriptLoader.cpp index ac23e00e5..80309df05 100644 --- a/Runtime/World/ScriptLoader.cpp +++ b/Runtime/World/ScriptLoader.cpp @@ -117,6 +117,7 @@ #include "MP1/World/CBloodFlower.hpp" #include "MP1/World/CFlickerBat.hpp" #include "Camera/CPathCamera.hpp" +#include "MP1/World/CEnergyBall.hpp" namespace urde { static logvisor::Module Log("urde::ScriptLoader"); @@ -3572,6 +3573,39 @@ CEntity* ScriptLoader::LoadShadowProjector(CStateManager& mgr, CInputStream& in, } CEntity* ScriptLoader::LoadEnergyBall(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info) { - return nullptr; + if (!EnsurePropertyCount(propCount, 16, "EnergyBall")) + return nullptr; + + SScaledActorHead actorHead = LoadScaledActorHead(in, mgr); + const auto pair = CPatternedInfo::HasCorrectParameterCount(in); + if (!pair.first) + return nullptr; + + CPatternedInfo pInfo(in, pair.second); + const CAnimationParameters& animParms = pInfo.GetAnimationParameters(); + if (!animParms.GetACSFile().IsValid()) + return nullptr; + + CActorParameters actParms = LoadActorParameters(in); + u32 w1 = in.readUint32Big(); + float f1 = in.readFloatBig(); + CDamageInfo dInfo1(in); + float f2 = in.readFloatBig(); + CAssetId a1(in); + s16 sfxId1 = CSfxManager::TranslateSFXID(in.readUint32Big()); + CAssetId a2(in); + CAssetId a3(in); + s16 sfxId2 = CSfxManager::TranslateSFXID(in.readUint32Big()); + float f3 = in.readFloatBig(); + float f4 = in.readFloatBig(); + CAssetId a4(in); + + CDamageInfo dInfo2 = propCount >= 19 ? CDamageInfo(in) : CDamageInfo(); + float f5 = propCount >= 20 ? in.readFloatBig() : 3.0f; + + CModelData mData(CAnimRes(animParms.GetACSFile(), animParms.GetCharacter(), actorHead.x40_scale, + animParms.GetInitialAnimation(), true)); + return new MP1::CEnergyBall(mgr.AllocateUniqueId(), actorHead.x0_name, info, actorHead.x10_transform, std::move(mData), + actParms, pInfo, w1, f1, dInfo1, f2, a1, sfxId1, a2, a3, sfxId2, f3, f4, a4, dInfo2, f5); } } // namespace urde diff --git a/jbus b/jbus index 876c4dcde..a79aeacfb 160000 --- a/jbus +++ b/jbus @@ -1 +1 @@ -Subproject commit 876c4dcde449ec641b9d9e013e4d030e09fd59be +Subproject commit a79aeacfb9dbb4fb388d9373402f9967ba6dc17b From b064967de852a0bc463df16f88ea7b749d737fe5 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 23 Aug 2019 14:15:41 -0400 Subject: [PATCH 50/65] DNACommon: Replace platform-specific string conversion functions with standard facilities These can be replaced with std::strtoull and std::wcstoull, eliminating a platform-specific ifdef. --- DataSpec/DNACommon/DNACommon.hpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/DataSpec/DNACommon/DNACommon.hpp b/DataSpec/DNACommon/DNACommon.hpp index 4dc5c961a..4eede33b3 100644 --- a/DataSpec/DNACommon/DNACommon.hpp +++ b/DataSpec/DNACommon/DNACommon.hpp @@ -246,23 +246,15 @@ public: UniqueID64(const hecl::ProjectPath& path) { *this = path; } UniqueID64(const char* hexStr) { char copy[17]; - strncpy(copy, hexStr, 16); + std::strncpy(copy, hexStr, 16); copy[16] = '\0'; -#if _WIN32 - assign(_strtoui64(copy, nullptr, 16)); -#else - assign(strtouq(copy, nullptr, 16)); -#endif + assign(std::strtoull(copy, nullptr, 16)); } UniqueID64(const wchar_t* hexStr) { wchar_t copy[17]; - wcsncpy(copy, hexStr, 16); + std::wcsncpy(copy, hexStr, 16); copy[16] = L'\0'; -#if _WIN32 - assign(_wcstoui64(copy, nullptr, 16)); -#else - assign(wcstoull(copy, nullptr, 16)); -#endif + assign(std::wcstoull(copy, nullptr, 16)); } static constexpr size_t BinarySize() { return 8; } From 2acc5c1fe564b7d25253924b37a7c64fdfc6a98d Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Fri, 23 Aug 2019 16:37:39 -0700 Subject: [PATCH 51/65] Update hecl --- hecl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hecl b/hecl index 6a7dc19fc..b4efa8667 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 6a7dc19fccaa20ff7971f677cc2da7e9f0661605 +Subproject commit b4efa8667f81e9e9384321a9f77df0059b7f8915 From f2b551b89b621ce3b5ee45d9ca9275cfa5bd5135 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Fri, 23 Aug 2019 17:09:11 -0700 Subject: [PATCH 52/65] Minor compile fixes, fix potential undefined behavior in CMDL.cpp --- DataSpec/DNACommon/CMDL.cpp | 8 ++++---- hecl | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DataSpec/DNACommon/CMDL.cpp b/DataSpec/DNACommon/CMDL.cpp index 7f4cb2ffa..e5cbfe34b 100644 --- a/DataSpec/DNACommon/CMDL.cpp +++ b/DataSpec/DNACommon/CMDL.cpp @@ -1634,14 +1634,14 @@ bool WriteMREASecs(std::vector>& secsOut, const hecl::Proje /* Iterate meshes */ auto matIt = surfToGlobalMats.cbegin(); for (const Mesh& mesh : meshes) { - zeus::CTransform meshXf(mesh.sceneXf.val); + zeus::CTransform meshXf(mesh.sceneXf.val.data()); meshXf.basis.transpose(); /* Header */ { MeshHeader meshHeader = {}; meshHeader.visorFlags.setFromBlenderProps(mesh.customProps); - memmove(meshHeader.xfMtx, &mesh.sceneXf, 48); + memmove(meshHeader.xfMtx, mesh.sceneXf.val.data(), 48); zeus::CAABox aabb(zeus::CVector3f(mesh.aabbMin), zeus::CVector3f(mesh.aabbMax)); aabb = aabb.getTransformedAABox(meshXf); @@ -1912,14 +1912,14 @@ bool WriteHMDLMREASecs(std::vector>& secsOut, const hecl::P /* Iterate meshes */ auto matIt = surfToGlobalMats.cbegin(); for (const Mesh& mesh : meshes) { - zeus::CTransform meshXf(mesh.sceneXf.val); + zeus::CTransform meshXf(mesh.sceneXf.val.data()); meshXf.basis.transpose(); /* Header */ { MeshHeader meshHeader = {}; meshHeader.visorFlags.setFromBlenderProps(mesh.customProps); - memmove(meshHeader.xfMtx, &mesh.sceneXf, 48); + memmove(meshHeader.xfMtx, mesh.sceneXf.val.data(), 48); zeus::CAABox aabb(zeus::CVector3f(mesh.aabbMin), zeus::CVector3f(mesh.aabbMax)); aabb = aabb.getTransformedAABox(meshXf); diff --git a/hecl b/hecl index b4efa8667..4725be4d1 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit b4efa8667f81e9e9384321a9f77df0059b7f8915 +Subproject commit 4725be4d1c93263d0f24f4616bce4d30ea0f05da From 7f7a18a7086452ecd736555eae846959be4448bf Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 23 Aug 2019 19:24:04 -0400 Subject: [PATCH 53/65] DataSpec/DNACommon: Resolve indirect includes where applicable Avoids indirect inclusions where applicable and includes the necessary headers as used by the interface. This way, it prevents code from failing to compile due to changes in other header inclusions. --- DataSpec/DNACommon/ANCS.cpp | 9 +++++++-- DataSpec/DNACommon/ANCS.hpp | 20 ++++++++++++++++---- DataSpec/DNACommon/ANIM.cpp | 16 ++++++++++++++-- DataSpec/DNACommon/ANIM.hpp | 7 ++++++- DataSpec/DNACommon/ATBL.cpp | 17 ++++++++++++++++- DataSpec/DNACommon/ATBL.hpp | 9 +++++++-- DataSpec/DNACommon/BabeDead.cpp | 13 ++++++++++--- DataSpec/DNACommon/BabeDead.hpp | 7 ++++--- DataSpec/DNACommon/CMDL.cpp | 25 +++++++++++++++---------- DataSpec/DNACommon/CMDL.hpp | 23 ++++++++++++++++++----- DataSpec/DNACommon/CRSC.cpp | 8 +++++++- DataSpec/DNACommon/CRSC.hpp | 20 ++++++++++++++++---- DataSpec/DNACommon/DGRP.cpp | 11 +++++++---- DataSpec/DNACommon/DGRP.hpp | 6 ++++-- DataSpec/DNACommon/DPSC.cpp | 7 ++++++- DataSpec/DNACommon/DPSC.hpp | 19 ++++++++++++++++--- DataSpec/DNACommon/DeafBabe.cpp | 20 ++++++++++++++------ DataSpec/DNACommon/DeafBabe.hpp | 7 ++++++- DataSpec/DNACommon/EGMC.hpp | 2 +- DataSpec/DNACommon/ELSC.cpp | 4 +++- DataSpec/DNACommon/ELSC.hpp | 13 ++++++++++--- DataSpec/DNACommon/FONT.cpp | 6 +++++- DataSpec/DNACommon/FONT.hpp | 16 ++++++++++++++-- DataSpec/DNACommon/FSM2.cpp | 8 ++++++-- DataSpec/DNACommon/FSM2.hpp | 16 +++++++++++++--- DataSpec/DNACommon/GX.hpp | 5 ++++- DataSpec/DNACommon/MAPA.cpp | 23 +++++++++++++---------- DataSpec/DNACommon/MAPA.hpp | 15 +++++++++++++-- DataSpec/DNACommon/MAPU.cpp | 14 ++++++++------ DataSpec/DNACommon/MAPU.hpp | 13 ++++++++++++- DataSpec/DNACommon/MLVL.cpp | 13 ++++++++----- DataSpec/DNACommon/MLVL.hpp | 15 +++++++++++++-- DataSpec/DNACommon/OBBTreeBuilder.cpp | 16 +++++++++++----- DataSpec/DNACommon/OBBTreeBuilder.hpp | 4 +++- DataSpec/DNACommon/PAK.cpp | 9 +++++---- DataSpec/DNACommon/PAK.hpp | 14 +++++++++++--- DataSpec/DNACommon/PART.cpp | 4 +++- DataSpec/DNACommon/PART.hpp | 16 +++++++++++++--- DataSpec/DNACommon/ParticleCommon.hpp | 7 ++++++- DataSpec/DNACommon/RigInverter.cpp | 6 ++++-- DataSpec/DNACommon/RigInverter.hpp | 10 ++++++---- DataSpec/DNACommon/SAVWCommon.hpp | 5 +++-- DataSpec/DNACommon/STRG.cpp | 11 +++++++---- DataSpec/DNACommon/STRG.hpp | 15 +++++++++++---- DataSpec/DNACommon/SWHC.cpp | 6 +++++- DataSpec/DNACommon/SWHC.hpp | 15 ++++++++++++--- DataSpec/DNACommon/TXTR.cpp | 14 ++++++++++---- DataSpec/DNACommon/TXTR.hpp | 8 +++++++- DataSpec/DNACommon/WPSC.cpp | 6 +++++- DataSpec/DNACommon/WPSC.hpp | 13 ++++++++++--- DataSpec/DNAMP1/DeafBabe.hpp | 1 + 51 files changed, 445 insertions(+), 142 deletions(-) diff --git a/DataSpec/DNACommon/ANCS.cpp b/DataSpec/DNACommon/ANCS.cpp index 91cb73e0a..4ce0e8c36 100644 --- a/DataSpec/DNACommon/ANCS.cpp +++ b/DataSpec/DNACommon/ANCS.cpp @@ -1,11 +1,16 @@ -#include "ANCS.hpp" +#include "DataSpec/DNACommon/ANCS.hpp" + +#include "DataSpec/DNACommon/CMDL.hpp" +#include "DataSpec/DNACommon/DNACommon.hpp" +#include "DataSpec/DNACommon/RigInverter.hpp" #include "DataSpec/DNAMP1/DNAMP1.hpp" #include "DataSpec/DNAMP1/ANCS.hpp" #include "DataSpec/DNAMP2/DNAMP2.hpp" #include "DataSpec/DNAMP2/ANCS.hpp" #include "DataSpec/DNAMP3/DNAMP3.hpp" #include "DataSpec/DNAMP3/CHAR.hpp" -#include "hecl/Blender/Connection.hpp" + +#include namespace DataSpec::DNAANCS { diff --git a/DataSpec/DNACommon/ANCS.hpp b/DataSpec/DNACommon/ANCS.hpp index 8ad77a9cb..fa2eb9e77 100644 --- a/DataSpec/DNACommon/ANCS.hpp +++ b/DataSpec/DNACommon/ANCS.hpp @@ -1,9 +1,21 @@ #pragma once -#include -#include "DNACommon.hpp" -#include "CMDL.hpp" -#include "RigInverter.hpp" +#include +#include +#include +#include + +#include +#include +#include + +namespace DataSpec { +struct SpecBase; +} + +namespace hecl { +class ProjectPath; +} namespace DataSpec::DNAANCS { diff --git a/DataSpec/DNACommon/ANIM.cpp b/DataSpec/DNACommon/ANIM.cpp index 1da1e436c..895de4afe 100644 --- a/DataSpec/DNACommon/ANIM.cpp +++ b/DataSpec/DNACommon/ANIM.cpp @@ -1,8 +1,20 @@ -#include "zeus/Math.hpp" -#include "ANIM.hpp" +#include "DataSpec/DNACommon/ANIM.hpp" + +#include +#include +#include + +#include +#include +#include #define DUMP_KEYS 0 +#if DUMP_KEYS +#include +#include +#endif + namespace DataSpec::DNAANIM { size_t ComputeBitstreamSize(size_t keyFrameCount, const std::vector& channels) { diff --git a/DataSpec/DNACommon/ANIM.hpp b/DataSpec/DNACommon/ANIM.hpp index bbbbccda9..903fda326 100644 --- a/DataSpec/DNACommon/ANIM.hpp +++ b/DataSpec/DNACommon/ANIM.hpp @@ -1,7 +1,12 @@ #pragma once -#include "DNACommon.hpp" +#include #include +#include +#include +#include + +#include namespace DataSpec::DNAANIM { diff --git a/DataSpec/DNACommon/ATBL.cpp b/DataSpec/DNACommon/ATBL.cpp index e22c5f54f..702e2bc5a 100644 --- a/DataSpec/DNACommon/ATBL.cpp +++ b/DataSpec/DNACommon/ATBL.cpp @@ -1,4 +1,19 @@ -#include "ATBL.hpp" +#include "DataSpec/DNACommon/ATBL.hpp" + +#include +#include +#include +#include + +#include "DataSpec/DNACommon/DNACommon.hpp" +#include "DataSpec/DNACommon/PAK.hpp" + +#include +#include +#include +#include + +#include namespace DataSpec::DNAAudio { diff --git a/DataSpec/DNACommon/ATBL.hpp b/DataSpec/DNACommon/ATBL.hpp index 406e3869c..bcd5abef4 100644 --- a/DataSpec/DNACommon/ATBL.hpp +++ b/DataSpec/DNACommon/ATBL.hpp @@ -1,7 +1,12 @@ #pragma once -#include "DNACommon.hpp" -#include "PAK.hpp" +namespace DataSpec { +class PAKEntryReadStream; +} + +namespace hecl { +class ProjectPath; +} namespace DataSpec::DNAAudio { diff --git a/DataSpec/DNACommon/BabeDead.cpp b/DataSpec/DNACommon/BabeDead.cpp index 22a0531b0..2b4d8eed9 100644 --- a/DataSpec/DNACommon/BabeDead.cpp +++ b/DataSpec/DNACommon/BabeDead.cpp @@ -1,8 +1,15 @@ -#include "BabeDead.hpp" +#include "DataSpec/DNACommon/BabeDead.hpp" + #include "DataSpec/DNAMP1/MREA.hpp" #include "DataSpec/DNAMP3/MREA.hpp" -#include "zeus/CTransform.hpp" -#include "hecl/Blender/Connection.hpp" + +#include + +#include +#include +#include + +#include namespace DataSpec { diff --git a/DataSpec/DNACommon/BabeDead.hpp b/DataSpec/DNACommon/BabeDead.hpp index 7ef2662b0..348ea4fe9 100644 --- a/DataSpec/DNACommon/BabeDead.hpp +++ b/DataSpec/DNACommon/BabeDead.hpp @@ -1,8 +1,9 @@ #pragma once -#include "zeus/Math.hpp" -#include "hecl/hecl.hpp" -#include +namespace hecl::blender { +struct Light; +class PyOutStream; +} namespace DataSpec { diff --git a/DataSpec/DNACommon/CMDL.cpp b/DataSpec/DNACommon/CMDL.cpp index 7f4cb2ffa..3577c4b49 100644 --- a/DataSpec/DNACommon/CMDL.cpp +++ b/DataSpec/DNACommon/CMDL.cpp @@ -1,13 +1,18 @@ -#include "CMDL.hpp" -#include "../DNAMP1/CMDLMaterials.hpp" -#include "../DNAMP1/CSKR.hpp" -#include "../DNAMP1/MREA.hpp" -#include "../DNAMP2/CMDLMaterials.hpp" -#include "../DNAMP2/CSKR.hpp" -#include "../DNAMP3/CMDLMaterials.hpp" -#include "../DNAMP3/CSKR.hpp" -#include "zeus/CAABox.hpp" -#include "hecl/Blender/Connection.hpp" +#include "DataSpec/DNACommon/CMDL.hpp" + +#include + +#include "DataSpec/DNAMP1/CMDLMaterials.hpp" +#include "DataSpec/DNAMP1/CSKR.hpp" +#include "DataSpec/DNAMP1/MREA.hpp" +#include "DataSpec/DNAMP2/CMDLMaterials.hpp" +#include "DataSpec/DNAMP2/CSKR.hpp" +#include "DataSpec/DNAMP3/CMDLMaterials.hpp" +#include "DataSpec/DNAMP3/CSKR.hpp" + +#include +#include +#include namespace DataSpec::DNACMDL { diff --git a/DataSpec/DNACommon/CMDL.hpp b/DataSpec/DNACommon/CMDL.hpp index ddd520556..3b305e8be 100644 --- a/DataSpec/DNACommon/CMDL.hpp +++ b/DataSpec/DNACommon/CMDL.hpp @@ -1,10 +1,23 @@ #pragma once -#include "athena/FileWriter.hpp" -#include "PAK.hpp" -#include "GX.hpp" -#include "TXTR.hpp" -#include "zeus/CAABox.hpp" +#include +#include +#include + +#include "DataSpec/DNACommon/GX.hpp" +#include "DataSpec/DNACommon/TXTR.hpp" + +#include +#include +#include + +namespace hecl { +class ProjectPath; +} + +namespace zeus { +class CAABox; +} namespace DataSpec::DNACMDL { diff --git a/DataSpec/DNACommon/CRSC.cpp b/DataSpec/DNACommon/CRSC.cpp index 10a6220a4..0493018f9 100644 --- a/DataSpec/DNACommon/CRSC.cpp +++ b/DataSpec/DNACommon/CRSC.cpp @@ -1,4 +1,10 @@ -#include "CRSC.hpp" +#include "DataSpec/DNACommon/CRSC.hpp" + +#include + +#include "DataSpec/DNACommon/PAK.hpp" + +#include namespace DataSpec::DNAParticle { static const std::vector GeneratorTypes = { diff --git a/DataSpec/DNACommon/CRSC.hpp b/DataSpec/DNACommon/CRSC.hpp index 0f94ded2c..3bc7ff2f1 100644 --- a/DataSpec/DNACommon/CRSC.hpp +++ b/DataSpec/DNACommon/CRSC.hpp @@ -1,9 +1,21 @@ #pragma once -#include "ParticleCommon.hpp" -#include "PAK.hpp" -#include "athena/FileWriter.hpp" -#include +#include +#include +#include + +#include "DataSpec/DNACommon/DNACommon.hpp" +#include "DataSpec/DNACommon/ParticleCommon.hpp" + +#include + +namespace DataSpec { +class PAKEntryReadStream; +} + +namespace hecl { +class ProjectPath; +} namespace DataSpec::DNAParticle { template diff --git a/DataSpec/DNACommon/DGRP.cpp b/DataSpec/DNACommon/DGRP.cpp index 1d14de93c..d39427e1b 100644 --- a/DataSpec/DNACommon/DGRP.cpp +++ b/DataSpec/DNACommon/DGRP.cpp @@ -1,7 +1,10 @@ -#include "athena/IStreamReader.hpp" -#include "athena/IStreamWriter.hpp" -#include "athena/FileWriter.hpp" -#include "DGRP.hpp" +#include "DataSpec/DNACommon/DGRP.hpp" + +#include +#include +#include + +#include namespace DataSpec::DNADGRP { diff --git a/DataSpec/DNACommon/DGRP.hpp b/DataSpec/DNACommon/DGRP.hpp index 38cf8cb60..37850ee6f 100644 --- a/DataSpec/DNACommon/DGRP.hpp +++ b/DataSpec/DNACommon/DGRP.hpp @@ -1,7 +1,9 @@ #pragma once -#include "DNACommon.hpp" -#include "PAK.hpp" +#include + +#include "DataSpec/DNACommon/DNACommon.hpp" +#include "DataSpec/DNACommon/PAK.hpp" namespace DataSpec::DNADGRP { diff --git a/DataSpec/DNACommon/DPSC.cpp b/DataSpec/DNACommon/DPSC.cpp index 8960bf00b..3455743de 100644 --- a/DataSpec/DNACommon/DPSC.cpp +++ b/DataSpec/DNACommon/DPSC.cpp @@ -1,4 +1,9 @@ -#include "DPSC.hpp" +#include "DataSpec/DNACommon/DPSC.hpp" + +#include "DataSpec/DNACommon/PAK.hpp" + +#include +#include namespace DataSpec::DNAParticle { diff --git a/DataSpec/DNACommon/DPSC.hpp b/DataSpec/DNACommon/DPSC.hpp index 5306edf1f..f8feab5eb 100644 --- a/DataSpec/DNACommon/DPSC.hpp +++ b/DataSpec/DNACommon/DPSC.hpp @@ -1,8 +1,21 @@ #pragma once -#include "ParticleCommon.hpp" -#include "PAK.hpp" -#include "athena/FileWriter.hpp" +#include +#include +#include + +#include "DataSpec/DNACommon/DNACommon.hpp" +#include "DataSpec/DNACommon/ParticleCommon.hpp" + +#include + +namespace DataSpec { +class PAKEntryReadStream; +} + +namespace hecl { +class ProjectPath; +} namespace DataSpec::DNAParticle { diff --git a/DataSpec/DNACommon/DeafBabe.cpp b/DataSpec/DNACommon/DeafBabe.cpp index abcac6417..5f93be382 100644 --- a/DataSpec/DNACommon/DeafBabe.cpp +++ b/DataSpec/DNACommon/DeafBabe.cpp @@ -1,10 +1,18 @@ -#include "DeafBabe.hpp" -#include "AROTBuilder.hpp" -#include "DataSpec/DNAMP1/DeafBabe.hpp" -#include "DataSpec/DNAMP2/DeafBabe.hpp" -#include "DataSpec/DNAMP1/DCLN.hpp" -#include "hecl/Blender/Connection.hpp" +#include "DataSpec/DNACommon/DeafBabe.hpp" + #include +#include +#include +#include + +#include "DataSpec/DNACommon/AROTBuilder.hpp" +#include "DataSpec/DNAMP1/DeafBabe.hpp" +#include "DataSpec/DNAMP1/DCLN.hpp" +#include "DataSpec/DNAMP2/DeafBabe.hpp" + +#include +#include +#include namespace DataSpec { diff --git a/DataSpec/DNACommon/DeafBabe.hpp b/DataSpec/DNACommon/DeafBabe.hpp index 99f56f129..230df7a77 100644 --- a/DataSpec/DNACommon/DeafBabe.hpp +++ b/DataSpec/DNACommon/DeafBabe.hpp @@ -1,6 +1,11 @@ #pragma once -#include "DNACommon.hpp" +#include + +namespace hecl::blender { +class PyOutStream; +struct ColMesh; +} // namespace hecl::blender namespace DataSpec { diff --git a/DataSpec/DNACommon/EGMC.hpp b/DataSpec/DNACommon/EGMC.hpp index ce3c3e608..54f7b717b 100644 --- a/DataSpec/DNACommon/EGMC.hpp +++ b/DataSpec/DNACommon/EGMC.hpp @@ -1,6 +1,6 @@ #pragma once -#include "DNACommon.hpp" +#include "DataSpec/DNACommon/DNACommon.hpp" namespace DataSpec::DNACommon { struct EGMC : public BigDNA { diff --git a/DataSpec/DNACommon/ELSC.cpp b/DataSpec/DNACommon/ELSC.cpp index 3bb0e5e58..a4bd8aac9 100644 --- a/DataSpec/DNACommon/ELSC.cpp +++ b/DataSpec/DNACommon/ELSC.cpp @@ -1,4 +1,6 @@ -#include "ELSC.hpp" +#include "DataSpec/DNACommon/ELSC.hpp" + +#include namespace DataSpec::DNAParticle { diff --git a/DataSpec/DNACommon/ELSC.hpp b/DataSpec/DNACommon/ELSC.hpp index 0e441d50a..52ff09e35 100644 --- a/DataSpec/DNACommon/ELSC.hpp +++ b/DataSpec/DNACommon/ELSC.hpp @@ -1,8 +1,15 @@ #pragma once -#include "ParticleCommon.hpp" -#include "PAK.hpp" -#include "athena/FileWriter.hpp" +#include + +#include "DataSpec/DNACommon/ParticleCommon.hpp" +#include "DataSpec/DNACommon/PAK.hpp" + +#include + +namespace hecl { +class ProjectPath; +} namespace DataSpec::DNAParticle { template diff --git a/DataSpec/DNACommon/FONT.cpp b/DataSpec/DNACommon/FONT.cpp index 7e3ebeb42..74051d1b4 100644 --- a/DataSpec/DNACommon/FONT.cpp +++ b/DataSpec/DNACommon/FONT.cpp @@ -1,4 +1,8 @@ -#include "FONT.hpp" +#include "DataSpec/DNACommon/FONT.hpp" + +#include "DataSpec/DNACommon/PAK.hpp" + +#include namespace DataSpec::DNAFont { logvisor::Module LogModule("urde::DNAFont"); diff --git a/DataSpec/DNACommon/FONT.hpp b/DataSpec/DNACommon/FONT.hpp index 78664c8e9..0ebdef68d 100644 --- a/DataSpec/DNACommon/FONT.hpp +++ b/DataSpec/DNACommon/FONT.hpp @@ -1,7 +1,19 @@ #pragma once -#include "PAK.hpp" -#include "athena/FileWriter.hpp" +#include +#include + +#include "DataSpec/DNACommon/DNACommon.hpp" + +#include + +namespace DataSpec { +class PAKEntryReadStream; +} + +namespace hecl { +class ProjectPath; +} namespace DataSpec::DNAFont { struct GlyphRect : BigDNA { diff --git a/DataSpec/DNACommon/FSM2.cpp b/DataSpec/DNACommon/FSM2.cpp index 0c7f95a0e..23438e2b4 100644 --- a/DataSpec/DNACommon/FSM2.cpp +++ b/DataSpec/DNACommon/FSM2.cpp @@ -1,8 +1,12 @@ +#include "DataSpec/DNACommon/FSM2.hpp" + +#include "DataSpec/DNACommon/PAK.hpp" + +#include #include -#include #include -#include "FSM2.hpp" +#include namespace DataSpec::DNAFSM2 { logvisor::Module LogDNAFSM2("urde::DNAFSM2"); diff --git a/DataSpec/DNACommon/FSM2.hpp b/DataSpec/DNACommon/FSM2.hpp index e0de55f7e..163e22243 100644 --- a/DataSpec/DNACommon/FSM2.hpp +++ b/DataSpec/DNACommon/FSM2.hpp @@ -1,8 +1,18 @@ #pragma once -#include "PAK.hpp" -#include "DNACommon.hpp" -#include "athena/FileWriter.hpp" +#include + +#include "DataSpec/DNACommon/DNACommon.hpp" + +#include + +namespace DataSpec { +class PAKEntryReadStream; +} + +namespace hecl { +class ProjectPath; +} namespace DataSpec::DNAFSM2 { struct IFSM : BigDNAVYaml { diff --git a/DataSpec/DNACommon/GX.hpp b/DataSpec/DNACommon/GX.hpp index 9d2e5b813..e9e1a573a 100644 --- a/DataSpec/DNACommon/GX.hpp +++ b/DataSpec/DNACommon/GX.hpp @@ -1,5 +1,8 @@ #pragma once -#include "athena/DNA.hpp" + +#include + +#include namespace GX { enum AttrType { NONE, DIRECT, INDEX8, INDEX16 }; diff --git a/DataSpec/DNACommon/MAPA.cpp b/DataSpec/DNACommon/MAPA.cpp index bdc372680..c76cd8ca9 100644 --- a/DataSpec/DNACommon/MAPA.cpp +++ b/DataSpec/DNACommon/MAPA.cpp @@ -1,13 +1,16 @@ -#include "MAPA.hpp" -#include "../DNAMP1/DNAMP1.hpp" -#include "../DNAMP2/DNAMP2.hpp" -#include "../DNAMP3/DNAMP3.hpp" -#include "../DNAMP1/MAPA.hpp" -#include "../DNAMP2/MAPA.hpp" -#include "../DNAMP3/MAPA.hpp" -#include "zeus/CTransform.hpp" -#include "zeus/CAABox.hpp" -#include "hecl/Blender/Connection.hpp" +#include "DataSpec/DNACommon/MAPA.hpp" + +#include "DataSpec/DNACommon/GX.hpp" +#include "DataSpec/DNAMP1/DNAMP1.hpp" +#include "DataSpec/DNAMP2/DNAMP2.hpp" +#include "DataSpec/DNAMP3/DNAMP3.hpp" +#include "DataSpec/DNAMP1/MAPA.hpp" +#include "DataSpec/DNAMP2/MAPA.hpp" +#include "DataSpec/DNAMP3/MAPA.hpp" + +#include +#include +#include namespace DataSpec::DNAMAPA { diff --git a/DataSpec/DNACommon/MAPA.hpp b/DataSpec/DNACommon/MAPA.hpp index 5b8a2ad46..4d3a470f4 100644 --- a/DataSpec/DNACommon/MAPA.hpp +++ b/DataSpec/DNACommon/MAPA.hpp @@ -1,7 +1,18 @@ #pragma once -#include "DNACommon.hpp" -#include "GX.hpp" +#include +#include + +#include "DataSpec/DNACommon/DNACommon.hpp" + +namespace hecl { +class ProjectPath; +} + +namespace hecl::blender { +class Connection; +struct MapArea; +} // namespace hecl::blender namespace DataSpec::DNAMAPA { struct MAPA : BigDNA { diff --git a/DataSpec/DNACommon/MAPU.cpp b/DataSpec/DNACommon/MAPU.cpp index b7bf6844e..2187e109a 100644 --- a/DataSpec/DNACommon/MAPU.cpp +++ b/DataSpec/DNACommon/MAPU.cpp @@ -1,9 +1,11 @@ -#include "MAPU.hpp" -#include "../DNAMP1/DNAMP1.hpp" -#include "../DNAMP2/DNAMP2.hpp" -#include "../DNAMP3/DNAMP3.hpp" -#include "zeus/CTransform.hpp" -#include "hecl/Blender/Connection.hpp" +#include "DataSpec/DNACommon/MAPU.hpp" + +#include "DataSpec/DNAMP1/DNAMP1.hpp" +#include "DataSpec/DNAMP2/DNAMP2.hpp" +#include "DataSpec/DNAMP3/DNAMP3.hpp" + +#include +#include namespace DataSpec::DNAMAPU { diff --git a/DataSpec/DNACommon/MAPU.hpp b/DataSpec/DNACommon/MAPU.hpp index b101be7bc..88214f8e7 100644 --- a/DataSpec/DNACommon/MAPU.hpp +++ b/DataSpec/DNACommon/MAPU.hpp @@ -1,6 +1,17 @@ #pragma once -#include "DNACommon.hpp" +#include + +#include "DataSpec/DNACommon/DNACommon.hpp" + +namespace hecl { +class ProjectPath; +} + +namespace hecl::blender { +class Connection; +struct MapUniverse; +} // namespce hecl::blender namespace DataSpec::DNAMAPU { struct MAPU : BigDNA { diff --git a/DataSpec/DNACommon/MLVL.cpp b/DataSpec/DNACommon/MLVL.cpp index c7294419f..1db5939b1 100644 --- a/DataSpec/DNACommon/MLVL.cpp +++ b/DataSpec/DNACommon/MLVL.cpp @@ -1,8 +1,11 @@ -#include "MLVL.hpp" -#include "../DNAMP1/MLVL.hpp" -#include "../DNAMP2/MLVL.hpp" -#include "../DNAMP3/MLVL.hpp" -#include "hecl/Blender/Connection.hpp" +#include "DataSpec/DNACommon/MLVL.hpp" + +#include "DataSpec/DNAMP1/MLVL.hpp" +#include "DataSpec/DNAMP2/MLVL.hpp" +#include "DataSpec/DNAMP3/MLVL.hpp" + +#include +#include namespace DataSpec::DNAMLVL { diff --git a/DataSpec/DNACommon/MLVL.hpp b/DataSpec/DNACommon/MLVL.hpp index c2fa0271a..e598662c0 100644 --- a/DataSpec/DNACommon/MLVL.hpp +++ b/DataSpec/DNACommon/MLVL.hpp @@ -1,7 +1,18 @@ #pragma once -#include "DNACommon.hpp" -#include "zeus/CVector3f.hpp" +#include + +#include "DataSpec/DNACommon/DNACommon.hpp" + +#include + +namespace hecl { +class ProjectPath; +} + +namespace hecl::blender { +class Connection; +} namespace DataSpec::DNAMLVL { diff --git a/DataSpec/DNACommon/OBBTreeBuilder.cpp b/DataSpec/DNACommon/OBBTreeBuilder.cpp index bb26977ee..e778d4b5f 100644 --- a/DataSpec/DNACommon/OBBTreeBuilder.cpp +++ b/DataSpec/DNACommon/OBBTreeBuilder.cpp @@ -1,9 +1,15 @@ -#include "athena/Types.hpp" -#include "OBBTreeBuilder.hpp" -#include "zeus/CTransform.hpp" +#include "DataSpec/DNACommon/OBBTreeBuilder.hpp" + +#include +#include +#include + #include "DataSpec/DNAMP1/DCLN.hpp" -#include "gmm/gmm.h" -#include "hecl/Blender/Connection.hpp" + +#include +#include +#include +#include namespace DataSpec { diff --git a/DataSpec/DNACommon/OBBTreeBuilder.hpp b/DataSpec/DNACommon/OBBTreeBuilder.hpp index a8db2f2d7..45085966f 100644 --- a/DataSpec/DNACommon/OBBTreeBuilder.hpp +++ b/DataSpec/DNACommon/OBBTreeBuilder.hpp @@ -1,6 +1,8 @@ #pragma once -#include "DNACommon.hpp" +#include + +#include namespace DataSpec { diff --git a/DataSpec/DNACommon/PAK.cpp b/DataSpec/DNACommon/PAK.cpp index d3bd03b36..b9a0c0306 100644 --- a/DataSpec/DNACommon/PAK.cpp +++ b/DataSpec/DNACommon/PAK.cpp @@ -1,7 +1,8 @@ -#include "PAK.hpp" -#include "../DNAMP1/DNAMP1.hpp" -#include "../DNAMP2/DNAMP2.hpp" -#include "../DNAMP3/DNAMP3.hpp" +#include "DataSpec/DNACommon/PAK.hpp" + +#include "DataSpec/DNAMP1/DNAMP1.hpp" +#include "DataSpec/DNAMP2/DNAMP2.hpp" +#include "DataSpec/DNAMP3/DNAMP3.hpp" namespace DataSpec { diff --git a/DataSpec/DNACommon/PAK.hpp b/DataSpec/DNACommon/PAK.hpp index 2b27f1b98..39d1a6c5e 100644 --- a/DataSpec/DNACommon/PAK.hpp +++ b/DataSpec/DNACommon/PAK.hpp @@ -1,9 +1,17 @@ #pragma once -#include "DNACommon.hpp" -#include "boo/ThreadLocalPtr.hpp" #include -#include "zeus/CMatrix4f.hpp" +#include +#include +#include +#include +#include + +#include "DataSpec/DNACommon/DNACommon.hpp" + +#include +#include +#include namespace DataSpec { diff --git a/DataSpec/DNACommon/PART.cpp b/DataSpec/DNACommon/PART.cpp index 43db33527..4f9cfd260 100644 --- a/DataSpec/DNACommon/PART.cpp +++ b/DataSpec/DNACommon/PART.cpp @@ -1,4 +1,6 @@ -#include "PART.hpp" +#include "DataSpec/DNACommon/PART.hpp" + +#include "DataSpec/DNACommon/PAK.hpp" namespace DataSpec::DNAParticle { diff --git a/DataSpec/DNACommon/PART.hpp b/DataSpec/DNACommon/PART.hpp index 9f2c445cc..0475dc217 100644 --- a/DataSpec/DNACommon/PART.hpp +++ b/DataSpec/DNACommon/PART.hpp @@ -1,8 +1,18 @@ #pragma once -#include "ParticleCommon.hpp" -#include "PAK.hpp" -#include "athena/FileWriter.hpp" +#include +#include + +#include "DataSpec/DNACommon/DNACommon.hpp" +#include "DataSpec/DNACommon/ParticleCommon.hpp" + +namespace DataSpec { +class PAKEntryReadStream; +} + +namespace hecl { +class ProjectPath; +} namespace DataSpec::DNAParticle { diff --git a/DataSpec/DNACommon/ParticleCommon.hpp b/DataSpec/DNACommon/ParticleCommon.hpp index 1f5f07f90..f08e9776c 100644 --- a/DataSpec/DNACommon/ParticleCommon.hpp +++ b/DataSpec/DNACommon/ParticleCommon.hpp @@ -1,6 +1,11 @@ #pragma once -#include "DNACommon.hpp" +#include +#include + +#include "DataSpec/DNACommon/DNACommon.hpp" + +#include namespace DataSpec::DNAParticle { extern logvisor::Module LogModule; diff --git a/DataSpec/DNACommon/RigInverter.cpp b/DataSpec/DNACommon/RigInverter.cpp index a5e0c7639..b8642ac9d 100644 --- a/DataSpec/DNACommon/RigInverter.cpp +++ b/DataSpec/DNACommon/RigInverter.cpp @@ -1,8 +1,10 @@ -#include "RigInverter.hpp" +#include "DataSpec/DNACommon/RigInverter.hpp" + #include "DataSpec/DNAMP1/CINF.hpp" #include "DataSpec/DNAMP2/CINF.hpp" #include "DataSpec/DNAMP3/CINF.hpp" -#include "hecl/Blender/Connection.hpp" + +#include namespace DataSpec::DNAANIM { diff --git a/DataSpec/DNACommon/RigInverter.hpp b/DataSpec/DNACommon/RigInverter.hpp index 237d68ab7..11e644ad3 100644 --- a/DataSpec/DNACommon/RigInverter.hpp +++ b/DataSpec/DNACommon/RigInverter.hpp @@ -1,10 +1,12 @@ #pragma once -#include "zeus/CVector3f.hpp" -#include "zeus/CMatrix3f.hpp" -#include "zeus/CQuaternion.hpp" -#include "hecl/hecl.hpp" +#include #include +#include + +#include +#include +#include namespace DataSpec::DNAANIM { diff --git a/DataSpec/DNACommon/SAVWCommon.hpp b/DataSpec/DNACommon/SAVWCommon.hpp index f51563f28..5258c2ffd 100644 --- a/DataSpec/DNACommon/SAVWCommon.hpp +++ b/DataSpec/DNACommon/SAVWCommon.hpp @@ -1,6 +1,7 @@ #pragma once -#include "DNACommon.hpp" -#include "PAK.hpp" + +#include "DataSpec/DNACommon/DNACommon.hpp" +#include "DataSpec/DNACommon/PAK.hpp" namespace DataSpec::SAVWCommon { enum class EScanCategory { None, Data, Lore, Creature, Research, Artifact }; diff --git a/DataSpec/DNACommon/STRG.cpp b/DataSpec/DNACommon/STRG.cpp index da014cb14..d49339bee 100644 --- a/DataSpec/DNACommon/STRG.cpp +++ b/DataSpec/DNACommon/STRG.cpp @@ -1,7 +1,10 @@ -#include "STRG.hpp" -#include "../DNAMP1/STRG.hpp" -#include "../DNAMP2/STRG.hpp" -#include "../DNAMP3/STRG.hpp" +#include "DataSpec/DNACommon/STRG.hpp" + +#include "DataSpec/DNAMP1/STRG.hpp" +#include "DataSpec/DNAMP2/STRG.hpp" +#include "DataSpec/DNAMP3/STRG.hpp" + +#include namespace DataSpec { diff --git a/DataSpec/DNACommon/STRG.hpp b/DataSpec/DNACommon/STRG.hpp index 8f32d3055..179e28979 100644 --- a/DataSpec/DNACommon/STRG.hpp +++ b/DataSpec/DNACommon/STRG.hpp @@ -1,11 +1,18 @@ #pragma once +#include +#include +#include #include -#include +#include + +#include "DataSpec/DNACommon/DNACommon.hpp" + #include -#include -#include -#include "DNACommon.hpp" + +namespace athena::io { +class IStreamReader; +} namespace DataSpec { struct ISTRG : BigDNAVYaml { diff --git a/DataSpec/DNACommon/SWHC.cpp b/DataSpec/DNACommon/SWHC.cpp index 0143b6c83..6460a6ded 100644 --- a/DataSpec/DNACommon/SWHC.cpp +++ b/DataSpec/DNACommon/SWHC.cpp @@ -1,4 +1,8 @@ -#include "SWHC.hpp" +#include "DataSpec/DNACommon/SWHC.hpp" + +#include "DataSpec/DNACommon/PAK.hpp" + +#include namespace DataSpec::DNAParticle { diff --git a/DataSpec/DNACommon/SWHC.hpp b/DataSpec/DNACommon/SWHC.hpp index c88b7387e..3c81344c0 100644 --- a/DataSpec/DNACommon/SWHC.hpp +++ b/DataSpec/DNACommon/SWHC.hpp @@ -1,8 +1,17 @@ #pragma once -#include "ParticleCommon.hpp" -#include "PAK.hpp" -#include "athena/FileWriter.hpp" +#include + +#include "DataSpec/DNACommon/DNACommon.hpp" +#include "DataSpec/DNACommon/ParticleCommon.hpp" + +namespace DataSpec { +class PAKEntryReadStream; +} + +namespace hecl { +class ProjectPath; +} namespace DataSpec::DNAParticle { diff --git a/DataSpec/DNACommon/TXTR.cpp b/DataSpec/DNACommon/TXTR.cpp index 4947b2ff4..ef0e59962 100644 --- a/DataSpec/DNACommon/TXTR.cpp +++ b/DataSpec/DNACommon/TXTR.cpp @@ -1,9 +1,15 @@ +#include "DataSpec/DNACommon/TXTR.hpp" + +#include +#include + +#include "DataSpec/DNACommon/PAK.hpp" + +#include +#include +#include #include #include -#include "TXTR.hpp" -#include "PAK.hpp" -#include "athena/FileWriter.hpp" -#include "hecl/hecl.hpp" namespace DataSpec { diff --git a/DataSpec/DNACommon/TXTR.hpp b/DataSpec/DNACommon/TXTR.hpp index 664fc9fd1..8a69e6efb 100644 --- a/DataSpec/DNACommon/TXTR.hpp +++ b/DataSpec/DNACommon/TXTR.hpp @@ -1,6 +1,12 @@ #pragma once -#include "DNACommon.hpp" +#include + +#include "DataSpec/DNACommon/DNACommon.hpp" + +namespace hecl { +class ProjectPath; +} namespace DataSpec { class PAKEntryReadStream; diff --git a/DataSpec/DNACommon/WPSC.cpp b/DataSpec/DNACommon/WPSC.cpp index e0b245649..02a0b4bfe 100644 --- a/DataSpec/DNACommon/WPSC.cpp +++ b/DataSpec/DNACommon/WPSC.cpp @@ -1,4 +1,8 @@ -#include "WPSC.hpp" +#include "DataSpec/DNACommon/WPSC.hpp" + +#include "DataSpec/DNACommon/PAK.hpp" + +#include namespace DataSpec::DNAParticle { diff --git a/DataSpec/DNACommon/WPSC.hpp b/DataSpec/DNACommon/WPSC.hpp index 81071ef98..3df67b7bd 100644 --- a/DataSpec/DNACommon/WPSC.hpp +++ b/DataSpec/DNACommon/WPSC.hpp @@ -1,8 +1,15 @@ #pragma once -#include "ParticleCommon.hpp" -#include "PAK.hpp" -#include "athena/FileWriter.hpp" +#include "DataSpec/DNACommon/DNACommon.hpp" +#include "DataSpec/DNACommon/ParticleCommon.hpp" + +namespace DataSpec { +class PAKEntryReadStream; +} + +namespace hecl { +class ProjectPath; +} namespace DataSpec::DNAParticle { template diff --git a/DataSpec/DNAMP1/DeafBabe.hpp b/DataSpec/DNAMP1/DeafBabe.hpp index cd7a3f77b..f573d4625 100644 --- a/DataSpec/DNAMP1/DeafBabe.hpp +++ b/DataSpec/DNAMP1/DeafBabe.hpp @@ -1,6 +1,7 @@ #pragma once #include "DataSpec/DNACommon/DeafBabe.hpp" +#include "DataSpec/DNACommon/DNACommon.hpp" namespace DataSpec::DNAMP1 { From fa608acb068b51af93d66a6ed6e23dad90dc3995 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 23 Aug 2019 22:26:04 -0400 Subject: [PATCH 54/65] CPatterned: Correct use of bool in bitfield This is incremented within PathFind(), however, because the type within this bitfield is a bool, this can trigger compilation warnings (rightly so). So we can make it a uint32_t to make it obvious that the incrementing behavior is intended. --- Runtime/World/CPatterned.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/World/CPatterned.hpp b/Runtime/World/CPatterned.hpp index c78131610..5e01c1944 100644 --- a/Runtime/World/CPatterned.hpp +++ b/Runtime/World/CPatterned.hpp @@ -178,7 +178,7 @@ protected: bool x400_29_pendingMassiveFrozenDeath : 1; bool x400_30_patternShagged : 1; bool x400_31_isFlyer : 1; - bool x401_24_pathOverCount : 2; + uint32_t x401_24_pathOverCount : 2; bool x401_26_disableMove : 1; bool x401_27_phazingOut : 1; bool x401_28_burning : 1; From 8e0802cdc8c368d231860bd2cefc24b507d88013 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 24 Aug 2019 00:49:40 -0700 Subject: [PATCH 55/65] Update submodules --- hecl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hecl b/hecl index 4725be4d1..4c2125fba 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 4725be4d1c93263d0f24f4616bce4d30ea0f05da +Subproject commit 4c2125fba9123419bcbf9bb1308ef164f27836b6 From f89e36de35731eb76a51bf3dcf968b95ca3f3f20 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 24 Aug 2019 14:32:59 -0700 Subject: [PATCH 56/65] Fix discord link (the old one expired even though I set it to never expire, grrr) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1e68df19a..3309b46fc 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ## URDE **Status:** In-Game with 0-00 (v1.088) only -**Official Discord Channel:** [https://discord.gg/rYKrYK] +**Official Discord Channel:** https://discord.gg/AMBVFuf ### Download Precompiled builds of the command-line extraction utility (`hecl`) with embedded dataspec libraries are available at https://github.com/AxioDL/urde/releases. This will give you intermediate dumps of original formats as *blender* and *yaml* representations. From d4e34e977f3a6a1de40a1ab0c7dc819c8839a21c Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 24 Aug 2019 14:46:25 -0700 Subject: [PATCH 57/65] Update submdoules --- hecl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hecl b/hecl index 4c2125fba..8008448c2 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 4c2125fba9123419bcbf9bb1308ef164f27836b6 +Subproject commit 8008448c2a83e979e3bffbac3be5154c60b69fd6 From f96ad00478930c1ad65d4c8c8bf7529314f3b10d Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 24 Aug 2019 17:58:43 -0700 Subject: [PATCH 58/65] Update boo, deprecate OpenGL --- hecl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hecl b/hecl index 8008448c2..15c13163e 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 8008448c2a83e979e3bffbac3be5154c60b69fd6 +Subproject commit 15c13163e8825d343eecd6a334c2042fbbca4814 From 2a60b9fbf40130bd0e1f95ca070cae1114455701 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sun, 25 Aug 2019 18:29:25 -0700 Subject: [PATCH 59/65] Update submodules, minor fixes --- Runtime/CGameState.cpp | 2 +- Runtime/CStateManager.cpp | 5 ++--- amuse | 2 +- hecl | 2 +- hecl-gui | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Runtime/CGameState.cpp b/Runtime/CGameState.cpp index 933a6e5f4..dfce6809d 100644 --- a/Runtime/CGameState.cpp +++ b/Runtime/CGameState.cpp @@ -74,7 +74,7 @@ CWorldState::CWorldState(CAssetId id) : x0_mlvlId(id), x4_areaId(0) { } CWorldState::CWorldState(CBitStreamReader& reader, CAssetId mlvlId, const CSaveWorld& saveWorld) : x0_mlvlId(mlvlId) { - x4_areaId = reader.ReadEncoded(32); + x4_areaId = TAreaId(reader.ReadEncoded(32)); x10_desiredAreaAssetId = u32(reader.ReadEncoded(32)); x8_relayTracker = std::make_shared(reader, saveWorld); xc_mapWorldInfo = std::make_shared(reader, saveWorld, mlvlId); diff --git a/Runtime/CStateManager.cpp b/Runtime/CStateManager.cpp index a8cdc8629..eac8d45c6 100644 --- a/Runtime/CStateManager.cpp +++ b/Runtime/CStateManager.cpp @@ -1188,7 +1188,7 @@ void CStateManager::SendScriptMsgAlways(TUniqueId dest, TUniqueId src, EScriptOb } void CStateManager::SendScriptMsg(TUniqueId src, TEditorId dest, EScriptObjectMessage msg, EScriptObjectState state) { - CEntity* ent = ObjectById(src); + //CEntity* ent = GetObjectById(src); auto search = GetIdListForScript(dest); if (search.first != x890_scriptIdMap.cend()) { for (auto it = search.first; it != search.second; ++it) { @@ -1462,8 +1462,7 @@ void CStateManager::ApplyDamageToWorld(TUniqueId damager, const CActor& actor, c if (bomb && player) { if (player->GetFrozenState()) { g_GameState->SystemOptions().IncrementFrozenBallCount(); - CHUDMemoParms info = {0.f, true, true, true}; - MP1::CSamusHud::DisplayHudMemo(u"", info); + MP1::CSamusHud::DisplayHudMemo(u"", CHUDMemoParms{0.f, true, true, true}); player->UnFreeze(*this); } else { if ((weapon->GetAttribField() & EProjectileAttrib::Bombs) == EProjectileAttrib::Bombs) diff --git a/amuse b/amuse index 529efa72b..ea84a7e35 160000 --- a/amuse +++ b/amuse @@ -1 +1 @@ -Subproject commit 529efa72b4136abb77c0e35c587a2ff80a76989a +Subproject commit ea84a7e35bfca9a14c5f403274e43045f31bc4f1 diff --git a/hecl b/hecl index 15c13163e..e7fa2f259 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 15c13163e8825d343eecd6a334c2042fbbca4814 +Subproject commit e7fa2f25920188ada7ad67c9ec794fe114a1edfb diff --git a/hecl-gui b/hecl-gui index 0ed3cda78..6963baacb 160000 --- a/hecl-gui +++ b/hecl-gui @@ -1 +1 @@ -Subproject commit 0ed3cda78bbf70d79b45167dac8a02860132f650 +Subproject commit 6963baacbc54f52e9e95564b90adf6eb550983c5 From f48ebefa842521f732aac6679e402e741ec9b0d4 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sun, 25 Aug 2019 18:33:23 -0700 Subject: [PATCH 60/65] Update hecl-gui --- hecl-gui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hecl-gui b/hecl-gui index 6963baacb..8800912c7 160000 --- a/hecl-gui +++ b/hecl-gui @@ -1 +1 @@ -Subproject commit 6963baacbc54f52e9e95564b90adf6eb550983c5 +Subproject commit 8800912c78997f800f87e8492e2217fb844b8aca From 1d3062b33f1e0ddee41c511e4c0222f6ca9293c6 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 26 Aug 2019 14:37:19 -0400 Subject: [PATCH 61/65] General: Make use of FopenUnique where applicable Migrates to the hecl Fopen variant that automatically closes its contained file handle if it goes out of scope. --- DataSpec/DNACommon/PAK.cpp | 5 ++--- DataSpec/DNACommon/TXTR.cpp | 42 +++++++++++------------------------ DataSpec/DNAMP1/SCLY.cpp | 4 ++-- DataSpec/SpecBase.cpp | 12 +++++----- DataSpec/SpecMP1.cpp | 10 ++++----- Editor/ViewManager.cpp | 42 ++++++++++++++++++++--------------- Runtime/CMemoryCardSysNix.cpp | 6 ++--- Runtime/CMemoryCardSysOSX.cpp | 6 ++--- Runtime/CMemoryCardSysWin.cpp | 6 ++--- 9 files changed, 60 insertions(+), 73 deletions(-) diff --git a/DataSpec/DNACommon/PAK.cpp b/DataSpec/DNACommon/PAK.cpp index b9a0c0306..1fdb109d1 100644 --- a/DataSpec/DNACommon/PAK.cpp +++ b/DataSpec/DNACommon/PAK.cpp @@ -466,9 +466,8 @@ bool PAKRouter::extractResources(const BRIDGETYPE& pakBridge, bool f if (force || cooked.isNone()) { cooked.makeDirChain(false); PAKEntryReadStream s = entryPtr->beginReadStream(*node); - FILE* fout = hecl::Fopen(cooked.getAbsolutePath().data(), _SYS_STR("wb")); - fwrite(s.data(), 1, s.length(), fout); - fclose(fout); + const auto fout = hecl::FopenUnique(cooked.getAbsolutePath().data(), _SYS_STR("wb")); + std::fwrite(s.data(), 1, s.length(), fout.get()); } if (extractor.func_a) /* Doesn't need PAKRouter access */ diff --git a/DataSpec/DNACommon/TXTR.cpp b/DataSpec/DNACommon/TXTR.cpp index ef0e59962..c33145784 100644 --- a/DataSpec/DNACommon/TXTR.cpp +++ b/DataSpec/DNACommon/TXTR.cpp @@ -812,13 +812,13 @@ bool TXTR::Extract(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath) { uint16_t height = rs.readUint16Big(); uint32_t numMips = rs.readUint32Big(); - FILE* fp = hecl::Fopen(outPath.getAbsolutePath().data(), _SYS_STR("wb")); - if (!fp) { + auto fp = hecl::FopenUnique(outPath.getAbsolutePath().data(), _SYS_STR("wb")); + if (fp == nullptr) { Log.report(logvisor::Error, fmt(_SYS_STR("Unable to open '{}' for writing")), outPath.getAbsolutePath()); return false; } png_structp png = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, PNGErr, PNGWarn); - png_init_io(png, fp); + png_init_io(png, fp.get()); png_infop info = png_create_info_struct(png); png_text textStruct = {}; @@ -862,7 +862,6 @@ bool TXTR::Extract(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath) { png_write_end(png, info); png_write_flush(png); png_destroy_write_struct(&png, &info); - fclose(fp); return true; } @@ -1017,18 +1016,17 @@ static int GetNumPaletteEntriesForGCN(png_structp png, png_infop info) { } bool TXTR::Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPath) { - FILE* inf = hecl::Fopen(inPath.getAbsolutePath().data(), _SYS_STR("rb")); - if (!inf) { + auto inf = hecl::FopenUnique(inPath.getAbsolutePath().data(), _SYS_STR("rb")); + if (inf == nullptr) { Log.report(logvisor::Error, fmt(_SYS_STR("Unable to open '{}' for reading")), inPath.getAbsolutePath()); return false; } /* Validate PNG */ char header[8]; - fread(header, 1, 8, inf); + std::fread(header, 1, sizeof(header), inf.get()); if (png_sig_cmp((png_const_bytep)header, 0, 8)) { Log.report(logvisor::Error, fmt(_SYS_STR("invalid PNG signature in '{}'")), inPath.getAbsolutePath()); - fclose(inf); return false; } @@ -1036,25 +1034,22 @@ bool TXTR::Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPat png_structp pngRead = png_create_read_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!pngRead) { Log.report(logvisor::Error, fmt("unable to initialize libpng")); - fclose(inf); return false; } png_infop info = png_create_info_struct(pngRead); if (!info) { Log.report(logvisor::Error, fmt("unable to initialize libpng info")); - fclose(inf); png_destroy_read_struct(&pngRead, nullptr, nullptr); return false; } if (setjmp(png_jmpbuf(pngRead))) { Log.report(logvisor::Error, fmt(_SYS_STR("unable to initialize libpng I/O for '{}'")), inPath.getAbsolutePath()); - fclose(inf); png_destroy_read_struct(&pngRead, &info, nullptr); return false; } - png_init_io(pngRead, inf); + png_init_io(pngRead, inf.get()); png_set_sig_bytes(pngRead, 8); png_read_info(pngRead, info); @@ -1066,7 +1061,6 @@ bool TXTR::Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPat if (width < 4 || height < 4) { Log.report(logvisor::Error, fmt("image must be 4x4 or larger")); - fclose(inf); png_destroy_read_struct(&pngRead, &info, nullptr); return false; } @@ -1092,7 +1086,6 @@ bool TXTR::Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPat if (bitDepth != 8) { Log.report(logvisor::Error, fmt(_SYS_STR("'{}' is not 8 bits-per-channel")), inPath.getAbsolutePath()); - fclose(inf); png_destroy_read_struct(&pngRead, &info, nullptr); return false; } @@ -1124,7 +1117,6 @@ bool TXTR::Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPat break; default: Log.report(logvisor::Error, fmt(_SYS_STR("unsupported color type in '{}'")), inPath.getAbsolutePath()); - fclose(inf); png_destroy_read_struct(&pngRead, &info, nullptr); return false; } @@ -1145,7 +1137,6 @@ bool TXTR::Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPat if (setjmp(png_jmpbuf(pngRead))) { Log.report(logvisor::Fatal, fmt(_SYS_STR("unable to read image in '{}'")), inPath.getAbsolutePath()); - fclose(inf); png_destroy_read_struct(&pngRead, &info, nullptr); return false; } @@ -1178,7 +1169,7 @@ bool TXTR::Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPat } png_destroy_read_struct(&pngRead, &info, nullptr); - fclose(inf); + inf.reset(); /* Reduce mipmaps to minimum allowed dimensions */ unsigned minDimX, minDimY; @@ -1338,18 +1329,17 @@ bool TXTR::Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPat } bool TXTR::CookPC(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPath) { - FILE* inf = hecl::Fopen(inPath.getAbsolutePath().data(), _SYS_STR("rb")); - if (!inf) { + auto inf = hecl::FopenUnique(inPath.getAbsolutePath().data(), _SYS_STR("rb")); + if (inf == nullptr) { Log.report(logvisor::Error, fmt(_SYS_STR("Unable to open '{}' for reading")), inPath.getAbsolutePath()); return false; } /* Validate PNG */ char header[8]; - fread(header, 1, 8, inf); + std::fread(header, 1, sizeof(header), inf.get()); if (png_sig_cmp((png_const_bytep)header, 0, 8)) { Log.report(logvisor::Error, fmt(_SYS_STR("invalid PNG signature in '{}'")), inPath.getAbsolutePath()); - fclose(inf); return false; } @@ -1357,25 +1347,22 @@ bool TXTR::CookPC(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outP png_structp pngRead = png_create_read_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!pngRead) { Log.report(logvisor::Error, fmt("unable to initialize libpng")); - fclose(inf); return false; } png_infop info = png_create_info_struct(pngRead); if (!info) { Log.report(logvisor::Error, fmt("unable to initialize libpng info")); - fclose(inf); png_destroy_read_struct(&pngRead, nullptr, nullptr); return false; } if (setjmp(png_jmpbuf(pngRead))) { Log.report(logvisor::Error, fmt(_SYS_STR("unable to initialize libpng I/O for '{}'")), inPath.getAbsolutePath()); - fclose(inf); png_destroy_read_struct(&pngRead, &info, nullptr); return false; } - png_init_io(pngRead, inf); + png_init_io(pngRead, inf.get()); png_set_sig_bytes(pngRead, 8); png_read_info(pngRead, info); @@ -1406,7 +1393,6 @@ bool TXTR::CookPC(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outP if (bitDepth != 8) { Log.report(logvisor::Error, fmt(_SYS_STR("'{}' is not 8 bits-per-channel")), inPath.getAbsolutePath()); - fclose(inf); png_destroy_read_struct(&pngRead, &info, nullptr); return false; } @@ -1436,7 +1422,6 @@ bool TXTR::CookPC(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outP break; default: Log.report(logvisor::Error, fmt(_SYS_STR("unsupported color type in '{}'")), inPath.getAbsolutePath()); - fclose(inf); png_destroy_read_struct(&pngRead, &info, nullptr); return false; } @@ -1455,7 +1440,6 @@ bool TXTR::CookPC(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outP if (setjmp(png_jmpbuf(pngRead))) { Log.report(logvisor::Fatal, fmt(_SYS_STR("unable to read image in '{}'")), inPath.getAbsolutePath()); - fclose(inf); png_destroy_read_struct(&pngRead, &info, nullptr); return false; } @@ -1521,7 +1505,7 @@ bool TXTR::CookPC(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outP } png_destroy_read_struct(&pngRead, &info, nullptr); - fclose(inf); + inf.reset(); /* Perform box-filter mipmap */ if (numMips > 1) { diff --git a/DataSpec/DNAMP1/SCLY.cpp b/DataSpec/DNAMP1/SCLY.cpp index 8d8889902..cc56ef7fc 100644 --- a/DataSpec/DNAMP1/SCLY.cpp +++ b/DataSpec/DNAMP1/SCLY.cpp @@ -42,8 +42,8 @@ void SCLY::exportToLayerDirectories(const PAK::Entry& entry, PAKRouter bool { @@ -700,10 +701,9 @@ struct SpecMP1 : SpecBase { return false; })) { resTag.id = path.hash().val32(); - fclose(fp); + fp.reset(); return resTag; } - fclose(fp); } return {}; } diff --git a/Editor/ViewManager.cpp b/Editor/ViewManager.cpp index c55cd6ae7..cb53a63fb 100644 --- a/Editor/ViewManager.cpp +++ b/Editor/ViewManager.cpp @@ -198,28 +198,28 @@ ViewManager::ViewManager(hecl::Runtime::FileStoreManager& fileMgr, hecl::CVarMan char path[2048]; hecl::Sstat theStat; - FILE* fp = hecl::Fopen(m_recentProjectsPath.c_str(), _SYS_STR("r"), hecl::FileLockType::Read); + auto fp = hecl::FopenUnique(m_recentProjectsPath.c_str(), _SYS_STR("r"), hecl::FileLockType::Read); if (fp) { - while (fgets(path, 2048, fp)) { + while (std::fgets(path, std::size(path), fp.get())) { std::string pathStr(path); pathStr.pop_back(); hecl::SystemStringConv pathStrView(pathStr); - if (!hecl::Stat(pathStrView.c_str(), &theStat) && S_ISDIR(theStat.st_mode)) + if (!hecl::Stat(pathStrView.c_str(), &theStat) && S_ISDIR(theStat.st_mode)) { m_recentProjects.emplace_back(pathStrView.sys_str()); + } } - fclose(fp); } - fp = hecl::Fopen(m_recentFilesPath.c_str(), _SYS_STR("r"), hecl::FileLockType::Read); + fp = hecl::FopenUnique(m_recentFilesPath.c_str(), _SYS_STR("r"), hecl::FileLockType::Read); if (fp) { - while (fgets(path, 2048, fp)) { + while (std::fgets(path, std::size(path), fp.get())) { std::string pathStr(path); pathStr.pop_back(); hecl::SystemStringConv pathStrView(pathStr); - if (!hecl::Stat(pathStrView.c_str(), &theStat) && S_ISDIR(theStat.st_mode)) + if (!hecl::Stat(pathStrView.c_str(), &theStat) && S_ISDIR(theStat.st_mode)) { m_recentFiles.emplace_back(pathStrView.sys_str()); + } } - fclose(fp); } } @@ -231,11 +231,14 @@ void ViewManager::pushRecentProject(hecl::SystemStringView path) { return; } m_recentProjects.emplace_back(path); - FILE* fp = hecl::Fopen(m_recentProjectsPath.c_str(), _SYS_STR("w"), hecl::FileLockType::Write); - if (fp) { - for (hecl::SystemString& pPath : m_recentProjects) - fmt::print(fp, fmt("{}\n"), hecl::SystemUTF8Conv(pPath)); - fclose(fp); + + const auto fp = hecl::FopenUnique(m_recentProjectsPath.c_str(), _SYS_STR("w"), hecl::FileLockType::Write); + if (fp == nullptr) { + return; + } + + for (const hecl::SystemString& pPath : m_recentProjects) { + fmt::print(fp.get(), fmt("{}\n"), hecl::SystemUTF8Conv(pPath)); } } @@ -245,11 +248,14 @@ void ViewManager::pushRecentFile(hecl::SystemStringView path) { return; } m_recentFiles.emplace_back(path); - FILE* fp = hecl::Fopen(m_recentFilesPath.c_str(), _SYS_STR("w"), hecl::FileLockType::Write); - if (fp) { - for (hecl::SystemString& pPath : m_recentFiles) - fmt::print(fp, fmt("{}\n"), hecl::SystemUTF8Conv(pPath)); - fclose(fp); + + const auto fp = hecl::FopenUnique(m_recentFilesPath.c_str(), _SYS_STR("w"), hecl::FileLockType::Write); + if (fp == nullptr) { + return; + } + + for (const hecl::SystemString& pPath : m_recentFiles) { + fmt::print(fp.get(), fmt("{}\n"), hecl::SystemUTF8Conv(pPath)); } } diff --git a/Runtime/CMemoryCardSysNix.cpp b/Runtime/CMemoryCardSysNix.cpp index 9b9df6476..8c4921a17 100644 --- a/Runtime/CMemoryCardSysNix.cpp +++ b/Runtime/CMemoryCardSysNix.cpp @@ -39,10 +39,10 @@ kabufuda::SystemString CMemoryCardSys::_CreateDolphinCard(kabufuda::ECardSlot sl return {}; path += fmt::format(fmt("/MemoryCard{:c}.USA.raw"), slot == kabufuda::ECardSlot::SlotA ? 'A' : 'B'); - FILE* fp = hecl::Fopen(path.c_str(), "wb"); - if (!fp) + const auto fp = hecl::FopenUnique(path.c_str(), "wb"); + if (fp == nullptr) { return {}; - fclose(fp); + } return path; } diff --git a/Runtime/CMemoryCardSysOSX.cpp b/Runtime/CMemoryCardSysOSX.cpp index 7b5edbf78..e1e659506 100644 --- a/Runtime/CMemoryCardSysOSX.cpp +++ b/Runtime/CMemoryCardSysOSX.cpp @@ -29,10 +29,10 @@ kabufuda::SystemString CMemoryCardSys::_CreateDolphinCard(kabufuda::ECardSlot sl return {}; path += fmt::format(fmt("/MemoryCard{:c}.USA.raw"), slot == kabufuda::ECardSlot::SlotA ? 'A' : 'B'); - FILE* fp = hecl::Fopen(path.c_str(), "wb"); - if (!fp) + const auto fp = hecl::FopenUnique(path.c_str(), "wb"); + if (fp == nullptr) { return {}; - fclose(fp); + } return path; } diff --git a/Runtime/CMemoryCardSysWin.cpp b/Runtime/CMemoryCardSysWin.cpp index 47a5704cb..e5db4be8e 100644 --- a/Runtime/CMemoryCardSysWin.cpp +++ b/Runtime/CMemoryCardSysWin.cpp @@ -100,10 +100,10 @@ kabufuda::SystemString CMemoryCardSys::_CreateDolphinCard(kabufuda::ECardSlot sl path += fmt::format(fmt(_SYS_STR("/MemoryCard{}.USA.raw")), slot == kabufuda::ECardSlot::SlotA ? _SYS_STR('A') : _SYS_STR('B')); - FILE* fp = hecl::Fopen(path.c_str(), _SYS_STR("wb")); - if (!fp) + const auto fp = hecl::FopenUnique(path.c_str(), _SYS_STR("wb")); + if (fp == nullptr) { return {}; - fclose(fp); + } return path; } From 37c68bc4a6ccffb074bd7ac7086f1159d79cc291 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Mon, 26 Aug 2019 15:58:26 -0700 Subject: [PATCH 62/65] Update submodules --- amuse | 2 +- hecl | 2 +- hecl-gui | 2 +- nod | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/amuse b/amuse index ea84a7e35..80da83eb1 160000 --- a/amuse +++ b/amuse @@ -1 +1 @@ -Subproject commit ea84a7e35bfca9a14c5f403274e43045f31bc4f1 +Subproject commit 80da83eb161c3c2493da522d44580a65eda38ed3 diff --git a/hecl b/hecl index e7fa2f259..09872a703 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit e7fa2f25920188ada7ad67c9ec794fe114a1edfb +Subproject commit 09872a70353533d27eada7b5ca1bbac88089e02b diff --git a/hecl-gui b/hecl-gui index 8800912c7..1ebf7ec12 160000 --- a/hecl-gui +++ b/hecl-gui @@ -1 +1 @@ -Subproject commit 8800912c78997f800f87e8492e2217fb844b8aca +Subproject commit 1ebf7ec1261d13e7921a3f3bafa30688d2d0f5f3 diff --git a/nod b/nod index c9bf82128..df1e45072 160000 --- a/nod +++ b/nod @@ -1 +1 @@ -Subproject commit c9bf821285202eec382a673bdfa41044e6cbba7f +Subproject commit df1e450728c725ab66508caca64b76cff13c354c From 27a47fad5a73cd4cfd94c863798b62b176f3be1e Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Mon, 26 Aug 2019 16:01:18 -0700 Subject: [PATCH 63/65] Update athena --- hecl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hecl b/hecl index 09872a703..af5d10cfe 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 09872a70353533d27eada7b5ca1bbac88089e02b +Subproject commit af5d10cfe91655d2dc48c53df52e564e2b0d6be7 From 3ca09f60db06f2977b9d9a0a699bd7818631ae34 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Mon, 26 Aug 2019 20:02:31 -0700 Subject: [PATCH 64/65] atdna fixes --- DataSpec/DNACommon/FSM2.cpp | 6 +- DataSpec/DNACommon/ParticleCommon.cpp | 8 +- DataSpec/DNACommon/TXTR.cpp | 20 ++-- DataSpec/DNAMP1/CMDLMaterials.cpp | 10 +- DataSpec/DNAMP1/DCLN.hpp | 16 +-- DataSpec/DNAMP1/EVNT.cpp | 18 ++-- DataSpec/DNAMP1/FRME.cpp | 28 ++--- DataSpec/DNAMP1/SCLY.cpp | 4 +- DataSpec/DNAMP1/ScriptObjects/Oculus.cpp | 32 +++--- DataSpec/DNAMP1/ScriptObjects/Ridley.cpp | 100 +++++++++--------- .../DNAMP1/ScriptObjects/WorldTeleporter.cpp | 52 ++++----- DataSpec/DNAMP2/ANCS.cpp | 18 ++-- DataSpec/DNAMP3/CAUD.cpp | 10 +- amuse | 2 +- 14 files changed, 162 insertions(+), 162 deletions(-) diff --git a/DataSpec/DNACommon/FSM2.cpp b/DataSpec/DNACommon/FSM2.cpp index 23438e2b4..7786ed2fb 100644 --- a/DataSpec/DNACommon/FSM2.cpp +++ b/DataSpec/DNACommon/FSM2.cpp @@ -14,7 +14,7 @@ logvisor::Module LogDNAFSM2("urde::DNAFSM2"); template template void FSM2::Enumerate(typename Op::StreamT& s) { - Do({"header"}, header, s); + Do(athena::io::PropId{"header"}, header, s); if (header.magic != SBIG('FSM2')) { LogDNAFSM2.report(logvisor::Fatal, fmt("Invalid FSM2 magic '{}' expected 'FSM2'"), header.magic); return; @@ -23,11 +23,11 @@ void FSM2::Enumerate(typename Op::StreamT& s) { if (header.version == 1) { if (!detail) detail.reset(new FSMV1); - Do({"detail"}, static_cast(*detail), s); + Do(athena::io::PropId{"detail"}, static_cast(*detail), s); } else if (header.version == 2) { if (!detail) detail.reset(new FSMV2); - Do({"detail"}, static_cast(*detail), s); + Do(athena::io::PropId{"detail"}, static_cast(*detail), s); } else { LogDNAFSM2.report(logvisor::Fatal, fmt("Invalid FSM2 version '{}'"), header.version); return; diff --git a/DataSpec/DNACommon/ParticleCommon.cpp b/DataSpec/DNACommon/ParticleCommon.cpp index 3e8e370e8..209e81385 100644 --- a/DataSpec/DNACommon/ParticleCommon.cpp +++ b/DataSpec/DNACommon/ParticleCommon.cpp @@ -1329,10 +1329,10 @@ const char* SpawnSystemKeyframeData::SpawnSystemKeyframeInfo::DNATyp template template void SpawnSystemKeyframeData::SpawnSystemKeyframeInfo::Enumerate(typename Op::StreamT& s) { - Do({"id"}, id, s); - Do({"a"}, a, s); - Do({"b"}, b, s); - Do({"c"}, c, s); + Do(athena::io::PropId{"id"}, id, s); + Do(athena::io::PropId{"a"}, a, s); + Do(athena::io::PropId{"b"}, b, s); + Do(athena::io::PropId{"c"}, c, s); } template <> diff --git a/DataSpec/DNACommon/TXTR.cpp b/DataSpec/DNACommon/TXTR.cpp index c33145784..2eecd5d58 100644 --- a/DataSpec/DNACommon/TXTR.cpp +++ b/DataSpec/DNACommon/TXTR.cpp @@ -1587,9 +1587,9 @@ bool TXTR::CookPC(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outP template void DataSpec::TXTR::PaletteMeta::Enumerate(typename Op::StreamT& s) { - Do({"format"}, format, s); - Do({"elementCount"}, elementCount, s); - Do({"dolphinHash"}, dolphinHash, s); + Do(athena::io::PropId{"format"}, format, s); + Do(athena::io::PropId{"elementCount"}, elementCount, s); + Do(athena::io::PropId{"dolphinHash"}, dolphinHash, s); } AT_SPECIALIZE_DNA_YAML(DataSpec::TXTR::PaletteMeta) @@ -1600,14 +1600,14 @@ const char* DataSpec::TXTR::PaletteMeta::DNAType() { template void DataSpec::TXTR::Meta::Enumerate(typename Op::StreamT& s) { - Do({"format"}, format, s); - Do({"mips"}, mips, s); - Do({"width"}, width, s); - Do({"height"}, height, s); - Do({"dolphinHash"}, dolphinHash, s); - Do({"hasPalette"}, hasPalette, s); + Do(athena::io::PropId{"format"}, format, s); + Do(athena::io::PropId{"mips"}, mips, s); + Do(athena::io::PropId{"width"}, width, s); + Do(athena::io::PropId{"height"}, height, s); + Do(athena::io::PropId{"dolphinHash"}, dolphinHash, s); + Do(athena::io::PropId{"hasPalette"}, hasPalette, s); if (hasPalette) - Do({"palette"}, palette, s); + Do(athena::io::PropId{"palette"}, palette, s); } AT_SPECIALIZE_DNA_YAML(DataSpec::TXTR::Meta) diff --git a/DataSpec/DNAMP1/CMDLMaterials.cpp b/DataSpec/DNAMP1/CMDLMaterials.cpp index a4d1ee65c..748a7c6eb 100644 --- a/DataSpec/DNAMP1/CMDLMaterials.cpp +++ b/DataSpec/DNAMP1/CMDLMaterials.cpp @@ -1070,14 +1070,14 @@ AT_SPECIALIZE_DNA(MaterialSet::Material::UVAnimation) template void HMDLMaterialSet::Material::PASS::Enumerate(typename Op::StreamT& s) { - Do({"type"}, type, s); - Do({"texId"}, texId, s); - Do({"source"}, source, s); - Do({"uvAnimType"}, uvAnimType, s); + Do(athena::io::PropId{"type"}, type, s); + Do(athena::io::PropId{"texId"}, texId, s); + Do(athena::io::PropId{"source"}, source, s); + Do(athena::io::PropId{"uvAnimType"}, uvAnimType, s); size_t uvParmCount = uvAnimParamsCount(); for (size_t i = 0; i < uvParmCount; ++i) Do({}, uvAnimParms[i], s); - Do({"alpha"}, alpha, s); + Do(athena::io::PropId{"alpha"}, alpha, s); } AT_SPECIALIZE_DNA(HMDLMaterialSet::Material::PASS) diff --git a/DataSpec/DNAMP1/DCLN.hpp b/DataSpec/DNAMP1/DCLN.hpp index 305828698..503c72172 100644 --- a/DataSpec/DNAMP1/DCLN.hpp +++ b/DataSpec/DNAMP1/DCLN.hpp @@ -93,22 +93,22 @@ struct DCLN : BigDNA { template void DCLN::Collision::Node::Enumerate(typename Op::StreamT& s) { - Do({"xf[0]"}, xf[0], s); - Do({"xf[1]"}, xf[1], s); - Do({"xf[2]"}, xf[2], s); - Do({"halfExtent"}, halfExtent, s); - Do({"isLeaf"}, isLeaf, s); + Do(athena::io::PropId{"xf[0]"}, xf[0], s); + Do(athena::io::PropId{"xf[1]"}, xf[1], s); + Do(athena::io::PropId{"xf[2]"}, xf[2], s); + Do(athena::io::PropId{"halfExtent"}, halfExtent, s); + Do(athena::io::PropId{"isLeaf"}, isLeaf, s); if (isLeaf) { if (!leafData) leafData.reset(new LeafData); - Do({"leafData"}, *leafData, s); + Do(athena::io::PropId{"leafData"}, *leafData, s); } else { if (!left) left.reset(new Node); - Do({"left"}, *left, s); + Do(athena::io::PropId{"left"}, *left, s); if (!right) right.reset(new Node); - Do({"right"}, *right, s); + Do(athena::io::PropId{"right"}, *right, s); } } diff --git a/DataSpec/DNAMP1/EVNT.cpp b/DataSpec/DNAMP1/EVNT.cpp index ad8f0ee24..fdb200ab8 100644 --- a/DataSpec/DNAMP1/EVNT.cpp +++ b/DataSpec/DNAMP1/EVNT.cpp @@ -4,20 +4,20 @@ namespace DataSpec::DNAMP1 { template void EVNT::Enumerate(typename Op::StreamT& s) { - Do({"version"}, version, s); + Do(athena::io::PropId{"version"}, version, s); - DoSize({"boolPOICount"}, boolPOICount, s); - Do({"boolPOINodes"}, boolPOINodes, boolPOICount, s); + DoSize(athena::io::PropId{"boolPOICount"}, boolPOICount, s); + Do(athena::io::PropId{"boolPOINodes"}, boolPOINodes, boolPOICount, s); - DoSize({"int32POICount"}, int32POICount, s); - Do({"int32POINodes"}, int32POINodes, int32POICount, s); + DoSize(athena::io::PropId{"int32POICount"}, int32POICount, s); + Do(athena::io::PropId{"int32POINodes"}, int32POINodes, int32POICount, s); - DoSize({"particlePOICount"}, particlePOICount, s); - Do({"particlePOINodes"}, particlePOINodes, particlePOICount, s); + DoSize(athena::io::PropId{"particlePOICount"}, particlePOICount, s); + Do(athena::io::PropId{"particlePOINodes"}, particlePOINodes, particlePOICount, s); if (version == 2) { - DoSize({"soundPOICount"}, soundPOICount, s); - Do({"soundPOINodes"}, soundPOINodes, soundPOICount, s); + DoSize(athena::io::PropId{"soundPOICount"}, soundPOICount, s); + Do(athena::io::PropId{"soundPOINodes"}, soundPOINodes, soundPOICount, s); } } diff --git a/DataSpec/DNAMP1/FRME.cpp b/DataSpec/DNAMP1/FRME.cpp index b8dc78b2e..f0e72194d 100644 --- a/DataSpec/DNAMP1/FRME.cpp +++ b/DataSpec/DNAMP1/FRME.cpp @@ -251,21 +251,21 @@ void FRME::Widget::LITEInfo::Enumerate(size_t& __isz) { template void FRME::Widget::TXPNInfo::Enumerate(typename Op::StreamT& s) { - Do({"xDim"}, xDim, s); - Do({"zDim"}, zDim, s); - Do({"scaleCenter"}, scaleCenter, s); - Do({"font"}, font, s); - Do({"wordWrap"}, wordWrap, s); - Do({"horizontal"}, horizontal, s); - Do({"justification"}, justification, s); - Do({"verticalJustification"}, verticalJustification, s); - Do({"fillColor"}, fillColor, s); - Do({"outlineColor"}, outlineColor, s); - Do({"blockExtent"}, blockExtent, s); + Do(athena::io::PropId{"xDim"}, xDim, s); + Do(athena::io::PropId{"zDim"}, zDim, s); + Do(athena::io::PropId{"scaleCenter"}, scaleCenter, s); + Do(athena::io::PropId{"font"}, font, s); + Do(athena::io::PropId{"wordWrap"}, wordWrap, s); + Do(athena::io::PropId{"horizontal"}, horizontal, s); + Do(athena::io::PropId{"justification"}, justification, s); + Do(athena::io::PropId{"verticalJustification"}, verticalJustification, s); + Do(athena::io::PropId{"fillColor"}, fillColor, s); + Do(athena::io::PropId{"outlineColor"}, outlineColor, s); + Do(athena::io::PropId{"blockExtent"}, blockExtent, s); if (version == 1) { - Do({"jpnFont"}, jpnFont, s); - Do({"jpnPointScale[0]"}, jpnPointScale[0], s); - Do({"jpnPointScale[1]"}, jpnPointScale[1], s); + Do(athena::io::PropId{"jpnFont"}, jpnFont, s); + Do(athena::io::PropId{"jpnPointScale[0]"}, jpnPointScale[0], s); + Do(athena::io::PropId{"jpnPointScale[1]"}, jpnPointScale[1], s); } } diff --git a/DataSpec/DNAMP1/SCLY.cpp b/DataSpec/DNAMP1/SCLY.cpp index cc56ef7fc..de0eac02e 100644 --- a/DataSpec/DNAMP1/SCLY.cpp +++ b/DataSpec/DNAMP1/SCLY.cpp @@ -77,7 +77,7 @@ void SCLY::ScriptLayer::nameIDs(PAKRouter& pakRouter) const { template <> void SCLY::Enumerate(athena::io::YAMLDocReader& docin) { - Do({"fourCC"}, fourCC, docin); + Do(athena::io::PropId{"fourCC"}, fourCC, docin); version = docin.readUint32("version"); layerCount = docin.enumerate("layerSizes", layerSizes); docin.enumerate("layers", layers); @@ -85,7 +85,7 @@ void SCLY::Enumerate(athena::io::YAMLDocReader& docin) { template <> void SCLY::Enumerate(athena::io::YAMLDocWriter& docout) { - Do({"fourCC"}, fourCC, docout); + Do(athena::io::PropId{"fourCC"}, fourCC, docout); docout.writeUint32("version", version); docout.enumerate("layerSizes", layerSizes); docout.enumerate("layers", layers); diff --git a/DataSpec/DNAMP1/ScriptObjects/Oculus.cpp b/DataSpec/DNAMP1/ScriptObjects/Oculus.cpp index e437bc2b9..a6cb47f94 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Oculus.cpp +++ b/DataSpec/DNAMP1/ScriptObjects/Oculus.cpp @@ -5,23 +5,23 @@ namespace DataSpec::DNAMP1 { template void Oculus::Enumerate(typename Op::StreamT& s) { IScriptObject::Enumerate(s); - Do({"name"}, name, s); - Do({"location"}, location, s); - Do({"orientation"}, orientation, s); - Do({"scale"}, scale, s); - Do({"patternedInfo"}, patternedInfo, s); - Do({"actorParameters"}, actorParameters, s); - Do({"unknown1"}, unknown1, s); - Do({"unknown2"}, unknown2, s); - Do({"unknown3"}, unknown3, s); - Do({"unknown4"}, unknown4, s); - Do({"unknown5"}, unknown5, s); - Do({"unknown6"}, unknown6, s); - Do({"damageVulnerabilty"}, damageVulnerabilty, s); - Do({"unknown7"}, unknown7, s); - Do({"damageInfo"}, damageInfo, s); + Do(athena::io::PropId{"name"}, name, s); + Do(athena::io::PropId{"location"}, location, s); + Do(athena::io::PropId{"orientation"}, orientation, s); + Do(athena::io::PropId{"scale"}, scale, s); + Do(athena::io::PropId{"patternedInfo"}, patternedInfo, s); + Do(athena::io::PropId{"actorParameters"}, actorParameters, s); + Do(athena::io::PropId{"unknown1"}, unknown1, s); + Do(athena::io::PropId{"unknown2"}, unknown2, s); + Do(athena::io::PropId{"unknown3"}, unknown3, s); + Do(athena::io::PropId{"unknown4"}, unknown4, s); + Do(athena::io::PropId{"unknown5"}, unknown5, s); + Do(athena::io::PropId{"unknown6"}, unknown6, s); + Do(athena::io::PropId{"damageVulnerabilty"}, damageVulnerabilty, s); + Do(athena::io::PropId{"unknown7"}, unknown7, s); + Do(athena::io::PropId{"damageInfo"}, damageInfo, s); if (propertyCount == 16) - Do({"unknown8"}, unknown8, s); + Do(athena::io::PropId{"unknown8"}, unknown8, s); else unknown8 = 0.f; } diff --git a/DataSpec/DNAMP1/ScriptObjects/Ridley.cpp b/DataSpec/DNAMP1/ScriptObjects/Ridley.cpp index b34254990..5fd9d6b0e 100644 --- a/DataSpec/DNAMP1/ScriptObjects/Ridley.cpp +++ b/DataSpec/DNAMP1/ScriptObjects/Ridley.cpp @@ -5,60 +5,60 @@ namespace DataSpec::DNAMP1 { template void Ridley::Enumerate(typename Op::StreamT& s) { IScriptObject::Enumerate(s); - Do({"name"}, name, s); - Do({"location"}, location, s); - Do({"orientation"}, orientation, s); - Do({"scale"}, scale, s); - Do({"patternedInfo"}, patternedInfo, s); - Do({"actorParameters"}, actorParameters, s); - Do({"model1"}, model1, s); - Do({"model2"}, model2, s); + Do(athena::io::PropId{"name"}, name, s); + Do(athena::io::PropId{"location"}, location, s); + Do(athena::io::PropId{"orientation"}, orientation, s); + Do(athena::io::PropId{"scale"}, scale, s); + Do(athena::io::PropId{"patternedInfo"}, patternedInfo, s); + Do(athena::io::PropId{"actorParameters"}, actorParameters, s); + Do(athena::io::PropId{"model1"}, model1, s); + Do(athena::io::PropId{"model2"}, model2, s); if (propertyCount == 48) { - Do({"model3"}, model3, s); - Do({"model4"}, model4, s); - Do({"model5"}, model5, s); - Do({"model6"}, model6, s); - Do({"model7"}, model7, s); - Do({"model8"}, model8, s); - Do({"model9"}, model9, s); - Do({"model10"}, model10, s); - Do({"model11"}, model11, s); - Do({"model12"}, model12, s); + Do(athena::io::PropId{"model3"}, model3, s); + Do(athena::io::PropId{"model4"}, model4, s); + Do(athena::io::PropId{"model5"}, model5, s); + Do(athena::io::PropId{"model6"}, model6, s); + Do(athena::io::PropId{"model7"}, model7, s); + Do(athena::io::PropId{"model8"}, model8, s); + Do(athena::io::PropId{"model9"}, model9, s); + Do(athena::io::PropId{"model10"}, model10, s); + Do(athena::io::PropId{"model11"}, model11, s); + Do(athena::io::PropId{"model12"}, model12, s); } - Do({"particle"}, particle, s); - Do({"unknown1"}, unknown1, s); - Do({"unknown2"}, unknown2, s); - Do({"unknown3"}, unknown3, s); - Do({"unknown4"}, unknown4, s); - Do({"wpsc1"}, wpsc1, s); - Do({"damageInfo1"}, damageInfo1, s); - Do({"ridleyStruct1"}, ridleyStruct1, s); - Do({"soundID1"}, soundID1, s); - Do({"wpsc2"}, wpsc2, s); + Do(athena::io::PropId{"particle"}, particle, s); + Do(athena::io::PropId{"unknown1"}, unknown1, s); + Do(athena::io::PropId{"unknown2"}, unknown2, s); + Do(athena::io::PropId{"unknown3"}, unknown3, s); + Do(athena::io::PropId{"unknown4"}, unknown4, s); + Do(athena::io::PropId{"wpsc1"}, wpsc1, s); + Do(athena::io::PropId{"damageInfo1"}, damageInfo1, s); + Do(athena::io::PropId{"ridleyStruct1"}, ridleyStruct1, s); + Do(athena::io::PropId{"soundID1"}, soundID1, s); + Do(athena::io::PropId{"wpsc2"}, wpsc2, s); if (propertyCount == 40) - Do({"wpsc3"}, wpsc3, s); - Do({"damageInfo2"}, damageInfo2, s); - Do({"ridleyStruct2_1"}, ridleyStruct2_1, s); - Do({"wpsc4"}, wpsc4, s); - Do({"damageInfo3"}, damageInfo3, s); - Do({"ridleyStruct2_2"}, ridleyStruct2_2, s); - Do({"soundID2"}, soundID2, s); - Do({"damageInfo4"}, damageInfo4, s); - Do({"ridleyStruct2_3"}, ridleyStruct2_3, s); - Do({"unknown5"}, unknown5, s); - Do({"unknown6"}, unknown6, s); - Do({"damageInfo5"}, damageInfo5, s); - Do({"unknown7"}, unknown7, s); - Do({"damageInfo6"}, damageInfo6, s); - Do({"unknown8"}, unknown8, s); - Do({"damageInfo7"}, damageInfo7, s); - Do({"unknown9"}, unknown9, s); - Do({"elsc"}, elsc, s); - Do({"unknown10"}, unknown10, s); - Do({"soundID3"}, soundID3, s); - Do({"damageInfo8"}, damageInfo8, s); + Do(athena::io::PropId{"wpsc3"}, wpsc3, s); + Do(athena::io::PropId{"damageInfo2"}, damageInfo2, s); + Do(athena::io::PropId{"ridleyStruct2_1"}, ridleyStruct2_1, s); + Do(athena::io::PropId{"wpsc4"}, wpsc4, s); + Do(athena::io::PropId{"damageInfo3"}, damageInfo3, s); + Do(athena::io::PropId{"ridleyStruct2_2"}, ridleyStruct2_2, s); + Do(athena::io::PropId{"soundID2"}, soundID2, s); + Do(athena::io::PropId{"damageInfo4"}, damageInfo4, s); + Do(athena::io::PropId{"ridleyStruct2_3"}, ridleyStruct2_3, s); + Do(athena::io::PropId{"unknown5"}, unknown5, s); + Do(athena::io::PropId{"unknown6"}, unknown6, s); + Do(athena::io::PropId{"damageInfo5"}, damageInfo5, s); + Do(athena::io::PropId{"unknown7"}, unknown7, s); + Do(athena::io::PropId{"damageInfo6"}, damageInfo6, s); + Do(athena::io::PropId{"unknown8"}, unknown8, s); + Do(athena::io::PropId{"damageInfo7"}, damageInfo7, s); + Do(athena::io::PropId{"unknown9"}, unknown9, s); + Do(athena::io::PropId{"elsc"}, elsc, s); + Do(athena::io::PropId{"unknown10"}, unknown10, s); + Do(athena::io::PropId{"soundID3"}, soundID3, s); + Do(athena::io::PropId{"damageInfo8"}, damageInfo8, s); if (propertyCount == 40) - Do({"damageInfo9"}, damageInfo9, s); + Do(athena::io::PropId{"damageInfo9"}, damageInfo9, s); } const char* Ridley::DNAType() { return "urde::DNAMP1::Ridley"; } diff --git a/DataSpec/DNAMP1/ScriptObjects/WorldTeleporter.cpp b/DataSpec/DNAMP1/ScriptObjects/WorldTeleporter.cpp index f3bb1b190..c97ec48a9 100644 --- a/DataSpec/DNAMP1/ScriptObjects/WorldTeleporter.cpp +++ b/DataSpec/DNAMP1/ScriptObjects/WorldTeleporter.cpp @@ -5,34 +5,34 @@ namespace DataSpec::DNAMP1 { template void WorldTeleporter::Enumerate(typename Op::StreamT& s) { IScriptObject::Enumerate(s); - Do({"name"}, name, s); - Do({"active"}, active, s); - Do({"mlvl"}, mlvl, s); - Do({"mrea"}, mrea, s); - Do({"animationParameters"}, animationParameters, s); - Do({"playerScale"}, playerScale, s); - Do({"platformModel"}, platformModel, s); - Do({"platformScale"}, platformScale, s); - Do({"blackgroundModel"}, backgroundModel, s); - Do({"backgroundScale"}, backgroundScale, s); - Do({"upElevator"}, upElevator, s); - Do({"elevatorSound"}, elevatorSound, s); - Do({"volume"}, volume, s); - Do({"panning"}, panning, s); - Do({"showText"}, showText, s); - Do({"font"}, font, s); - Do({"strg"}, strg, s); - Do({"fadeWhite"}, fadeWhite, s); - Do({"charFadeInTime"}, charFadeInTime, s); - Do({"charsPerSecond"}, charsPerSecond, s); - Do({"showDelay"}, showDelay, s); + Do(athena::io::PropId{"name"}, name, s); + Do(athena::io::PropId{"active"}, active, s); + Do(athena::io::PropId{"mlvl"}, mlvl, s); + Do(athena::io::PropId{"mrea"}, mrea, s); + Do(athena::io::PropId{"animationParameters"}, animationParameters, s); + Do(athena::io::PropId{"playerScale"}, playerScale, s); + Do(athena::io::PropId{"platformModel"}, platformModel, s); + Do(athena::io::PropId{"platformScale"}, platformScale, s); + Do(athena::io::PropId{"blackgroundModel"}, backgroundModel, s); + Do(athena::io::PropId{"backgroundScale"}, backgroundScale, s); + Do(athena::io::PropId{"upElevator"}, upElevator, s); + Do(athena::io::PropId{"elevatorSound"}, elevatorSound, s); + Do(athena::io::PropId{"volume"}, volume, s); + Do(athena::io::PropId{"panning"}, panning, s); + Do(athena::io::PropId{"showText"}, showText, s); + Do(athena::io::PropId{"font"}, font, s); + Do(athena::io::PropId{"strg"}, strg, s); + Do(athena::io::PropId{"fadeWhite"}, fadeWhite, s); + Do(athena::io::PropId{"charFadeInTime"}, charFadeInTime, s); + Do(athena::io::PropId{"charsPerSecond"}, charsPerSecond, s); + Do(athena::io::PropId{"showDelay"}, showDelay, s); if (propertyCount == 26) { - Do({"audioStream"}, audioStream, s); - Do({"unknown13"}, unknown13, s); - Do({"unknown14"}, unknown14, s); - Do({"unknown15"}, unknown15, s); - Do({"unknown16"}, unknown16, s); + Do(athena::io::PropId{"audioStream"}, audioStream, s); + Do(athena::io::PropId{"unknown13"}, unknown13, s); + Do(athena::io::PropId{"unknown14"}, unknown14, s); + Do(athena::io::PropId{"unknown15"}, unknown15, s); + Do(athena::io::PropId{"unknown16"}, unknown16, s); } else { unknown13 = false; unknown14 = 0.0; diff --git a/DataSpec/DNAMP2/ANCS.cpp b/DataSpec/DNAMP2/ANCS.cpp index 8f5ced5e6..a5d6fa45f 100644 --- a/DataSpec/DNAMP2/ANCS.cpp +++ b/DataSpec/DNAMP2/ANCS.cpp @@ -525,17 +525,17 @@ const char* ANCS::AnimationSet::DNAType() { return "urde::DNAMP2::ANCS::Animatio template void ANCS::AnimationSet::EVNT::Enumerate(typename Op::StreamT& s) { - Do({"version"}, version, s); - DoSize({"loopEventCount"}, loopEventCount, s); - Do({"loopEvents"}, loopEvents, loopEventCount, s); + Do(athena::io::PropId{"version"}, version, s); + DoSize(athena::io::PropId{"loopEventCount"}, loopEventCount, s); + Do(athena::io::PropId{"loopEvents"}, loopEvents, loopEventCount, s); if (version == 2) { - DoSize({"uevtEventCount"}, uevtEventCount, s); - Do({"uevtEvents"}, uevtEvents, uevtEventCount, s); + DoSize(athena::io::PropId{"uevtEventCount"}, uevtEventCount, s); + Do(athena::io::PropId{"uevtEvents"}, uevtEvents, uevtEventCount, s); } - DoSize({"effectEventCount"}, effectEventCount, s); - Do({"effectEvents"}, effectEvents, effectEventCount, s); - DoSize({"sfxEventCount"}, sfxEventCount, s); - Do({"sfxEvents"}, sfxEvents, sfxEventCount, s); + DoSize(athena::io::PropId{"effectEventCount"}, effectEventCount, s); + Do(athena::io::PropId{"effectEvents"}, effectEvents, effectEventCount, s); + DoSize(athena::io::PropId{"sfxEventCount"}, sfxEventCount, s); + Do(athena::io::PropId{"sfxEvents"}, sfxEvents, sfxEventCount, s); } AT_SPECIALIZE_DNA(ANCS::AnimationSet::EVNT) diff --git a/DataSpec/DNAMP3/CAUD.cpp b/DataSpec/DNAMP3/CAUD.cpp index 7930a8855..162c8086e 100644 --- a/DataSpec/DNAMP3/CAUD.cpp +++ b/DataSpec/DNAMP3/CAUD.cpp @@ -4,12 +4,12 @@ namespace DataSpec::DNAMP3 { template void CAUD::CSMPInfo::UnknownStruct2::UnknownQuad::Enumerate(typename Op::StreamT& s) { - Do({"unknown1"}, unknown1, s); - Do({"unknown2"}, unknown2, s); - Do({"unknown3"}, unknown3, s); - Do({"unknown4"}, unknown4, s); + Do(athena::io::PropId{"unknown1"}, unknown1, s); + Do(athena::io::PropId{"unknown2"}, unknown2, s); + Do(athena::io::PropId{"unknown3"}, unknown3, s); + Do(athena::io::PropId{"unknown4"}, unknown4, s); if (unknown4 == 5) - Do({"unknown5"}, unknown5, s); + Do(athena::io::PropId{"unknown5"}, unknown5, s); } AT_SPECIALIZE_DNA_YAML(CAUD::CSMPInfo::UnknownStruct2::UnknownQuad) diff --git a/amuse b/amuse index 80da83eb1..107ddeb5a 160000 --- a/amuse +++ b/amuse @@ -1 +1 @@ -Subproject commit 80da83eb161c3c2493da522d44580a65eda38ed3 +Subproject commit 107ddeb5a9dfe3e336c26c285ce0be0b8f0ebd2c From 256994c199a22ca9fb8e276bc3fa27afe6b26217 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 31 Aug 2019 02:02:21 -0700 Subject: [PATCH 65/65] Initial CEnergyBall, update submodules, various fixes --- DataSpec/DNACommon/CMakeLists.txt | 1 + DataSpec/DNACommon/MayaSpline.hpp | 24 ++++++++ DataSpec/DNAMP3/CAUD.cpp | 21 ------- DataSpec/DNAMP3/CAUD.hpp | 84 ++++++++-------------------- DataSpec/DNAMP3/CMakeLists.txt | 1 - DataSpec/DNAMP3/DNAMP3.cpp | 24 ++++---- DataSpec/SpecBase.cpp | 1 + Editor/badging/Badging.cpp | 2 + Runtime/MP1/World/CEnergyBall.cpp | 92 ++++++++++++++++++++++++++++++- Runtime/MP1/World/CEnergyBall.hpp | 28 ++++++++++ Runtime/World/CPatterned.cpp | 4 ++ Runtime/World/CPatterned.hpp | 1 + Runtime/World/CPatternedInfo.hpp | 1 + amuse | 2 +- hecl | 2 +- hecl-gui | 2 +- kabufuda | 2 +- nod | 2 +- specter | 2 +- 19 files changed, 195 insertions(+), 101 deletions(-) create mode 100644 DataSpec/DNACommon/MayaSpline.hpp delete mode 100644 DataSpec/DNAMP3/CAUD.cpp diff --git a/DataSpec/DNACommon/CMakeLists.txt b/DataSpec/DNACommon/CMakeLists.txt index 19fcd9ac4..39a616532 100644 --- a/DataSpec/DNACommon/CMakeLists.txt +++ b/DataSpec/DNACommon/CMakeLists.txt @@ -4,6 +4,7 @@ make_dnalist(CMDL FSM2 MAPA MAPU + MayaSpline EGMC SAVWCommon ParticleCommon diff --git a/DataSpec/DNACommon/MayaSpline.hpp b/DataSpec/DNACommon/MayaSpline.hpp new file mode 100644 index 000000000..00b48fae3 --- /dev/null +++ b/DataSpec/DNACommon/MayaSpline.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "DataSpec/DNACommon/DNACommon.hpp" + +namespace DataSpec { +struct MayaSpline : public BigDNA { + AT_DECL_DNA_YAML + Value preInf; + Value postInf; + Value knotCount; + struct Knot : BigDNA { + AT_DECL_DNA_YAML + Value time; + Value amplitude; + Value unk1; + Value unk2; + }; + + Vector knots; + Value clampMode; + Value minAmp; + Value maxAmp; +}; +} \ No newline at end of file diff --git a/DataSpec/DNAMP3/CAUD.cpp b/DataSpec/DNAMP3/CAUD.cpp deleted file mode 100644 index 162c8086e..000000000 --- a/DataSpec/DNAMP3/CAUD.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "CAUD.hpp" - -namespace DataSpec::DNAMP3 { - -template -void CAUD::CSMPInfo::UnknownStruct2::UnknownQuad::Enumerate(typename Op::StreamT& s) { - Do(athena::io::PropId{"unknown1"}, unknown1, s); - Do(athena::io::PropId{"unknown2"}, unknown2, s); - Do(athena::io::PropId{"unknown3"}, unknown3, s); - Do(athena::io::PropId{"unknown4"}, unknown4, s); - if (unknown4 == 5) - Do(athena::io::PropId{"unknown5"}, unknown5, s); -} - -AT_SPECIALIZE_DNA_YAML(CAUD::CSMPInfo::UnknownStruct2::UnknownQuad) - -const char* CAUD::CSMPInfo::UnknownStruct2::UnknownQuad::DNAType() { - return "DataSpec::DNAMP3::CAUD::CSMPInfo::UnknownStruct2::UnknownQuad"; -} - -} // namespace DataSpec::DNAMP3 diff --git a/DataSpec/DNAMP3/CAUD.hpp b/DataSpec/DNAMP3/CAUD.hpp index 6edb47108..6b9964849 100644 --- a/DataSpec/DNAMP3/CAUD.hpp +++ b/DataSpec/DNAMP3/CAUD.hpp @@ -1,8 +1,8 @@ #pragma once #include "DataSpec/DNACommon/DNACommon.hpp" +#include "DataSpec/DNACommon/MayaSpline.hpp" #include "DataSpec/DNACommon/PAK.hpp" - namespace DataSpec::DNAMP3 { struct CAUD : BigDNA { @@ -10,8 +10,8 @@ struct CAUD : BigDNA { DNAFourCC magic; Value version; String<-1> name; - Value nameCount; - Vector, AT_DNA_COUNT(nameCount)> names; + Value volumeGroupCount; + Vector, AT_DNA_COUNT(volumeGroupCount)> volumeGroups; Value unknown1; Value unknown2; Value unknown3; @@ -24,75 +24,39 @@ struct CAUD : BigDNA { UniqueID64 csmpId; Value unknown1; Value unknown2; - Value unknown3; + Value unknown3; Value unknown4; Value unknown5; Value unknown6; Value unknown7; - Value unknown8; - Value unknown9; + Value unknown8; + Value unknown9; Value unknown10; Value unknown11; Value unknown12; Value unknown13; - Value unknown14[8]; - struct UnknownStruct1 : BigDNA { + Value unknown14; + Value unknown15; + Value unknown16; + Value unknown17; + Value unknown18; + Value unknown19; + MayaSpline spline1; + MayaSpline spline2; + MayaSpline spline3; + MayaSpline spline4; + Value unkStructCount; + struct UnknownStruct : BigDNA { AT_DECL_DNA_YAML Value unknown1; Value unknown2; - Value unknown3; - Value unknown4; }; - Value unknown15; - Vector unknown16; - struct UnknownStruct2 : BigDNA { - AT_DECL_DNA_YAML - Value unknown1; - Vector unknown2; - Value unknown3; - Value unknown4; - Value unknown5; - struct UnknownPair : BigDNA { - AT_DECL_DNA_YAML - Value unknown1; - Value unknown2; - }; - Value unknown6; - Vector unknown7; - struct UnknownQuad : BigDNA { - AT_DECL_EXPLICIT_DNA_YAML - Value unknown1; - Value unknown2; - Value unknown3; - Value unknown4; - Value unknown5[5]; - }; - - Value unknown8; - Vector unknown9; - }; - UnknownStruct2 unknown17[4]; - Value unknown18; - Value unknown19; - Value unknown20; - Value unknown21; - Value unknown22; - Value unknown23; - Value unknown24; - Value unknown25; - Value unknown26; - Value unknown27; - Value unknown28; - struct UnknownStruct3 : BigDNA { - AT_DECL_DNA_YAML - Value unknown1; - Value unknown2; - Value unknown3; - Value unknown4; - }; - Vector unknown29; - Value unknown30; - Value unknown31; + Vector unkStructs; + Value unknown20; + Value unknown21; + Value unknown22; + Value unknown23; + MayaSpline spline5; }; Value infoCount; diff --git a/DataSpec/DNAMP3/CMakeLists.txt b/DataSpec/DNAMP3/CMakeLists.txt index a937e6d87..0c0ea91a6 100644 --- a/DataSpec/DNAMP3/CMakeLists.txt +++ b/DataSpec/DNAMP3/CMakeLists.txt @@ -19,7 +19,6 @@ set(DNAMP3_SOURCES CMDL.hpp CMDL.cpp CMDLMaterials.cpp CSKR.cpp - CAUD.cpp STRG.hpp STRG.cpp MAPA.hpp MREA.cpp) diff --git a/DataSpec/DNAMP3/DNAMP3.cpp b/DataSpec/DNAMP3/DNAMP3.cpp index a43abae56..45acd0d9f 100644 --- a/DataSpec/DNAMP3/DNAMP3.cpp +++ b/DataSpec/DNAMP3/DNAMP3.cpp @@ -226,8 +226,8 @@ void PAKBridge::addMAPATransforms(PAKRouter& pakRouter, ResExtractor PAKBridge::LookupExtractor(const nod::Node& pakNode, const PAK& pak, const PAK::Entry& entry) { switch (entry.type.toUint32()) { - // case SBIG('CAUD'): - // return {CAUD::Extract, {_SYS_STR(".yaml")}}; + case SBIG('CAUD'): + return {CAUD::Extract, {_SYS_STR(".yaml")}}; case SBIG('STRG'): return {STRG::Extract, {_SYS_STR(".yaml")}}; case SBIG('TXTR'): @@ -236,16 +236,16 @@ ResExtractor PAKBridge::LookupExtractor(const nod::Node& pakNode, con return {SAVWCommon::ExtractSAVW, {_SYS_STR(".yaml")}}; case SBIG('HINT'): return {HINT::Extract, {_SYS_STR(".yaml")}}; - case SBIG('CMDL'): - return {CMDL::Extract, {_SYS_STR(".blend")}, 1}; - case SBIG('CHAR'): - return {CHAR::Extract, {_SYS_STR(".yaml"), _SYS_STR(".blend")}, 2}; - case SBIG('MLVL'): - return {MLVL::Extract, {_SYS_STR(".yaml"), _SYS_STR(".blend")}, 3}; - case SBIG('MREA'): - return {MREA::Extract, {_SYS_STR(".blend")}, 4}; - case SBIG('MAPA'): - return {MAPA::Extract, {_SYS_STR(".blend")}, 4}; +// case SBIG('CMDL'): +// return {CMDL::Extract, {_SYS_STR(".blend")}, 1}; +// case SBIG('CHAR'): +// return {CHAR::Extract, {_SYS_STR(".yaml"), _SYS_STR(".blend")}, 2}; +// case SBIG('MLVL'): +// return {MLVL::Extract, {_SYS_STR(".yaml"), _SYS_STR(".blend")}, 3}; +// case SBIG('MREA'): +// return {MREA::Extract, {_SYS_STR(".blend")}, 4}; +// case SBIG('MAPA'): +// return {MAPA::Extract, {_SYS_STR(".blend")}, 4}; case SBIG('FSM2'): return {DNAFSM2::ExtractFSM2, {_SYS_STR(".yaml")}}; case SBIG('FONT'): diff --git a/DataSpec/SpecBase.cpp b/DataSpec/SpecBase.cpp index 84d89dd2c..07e813a64 100644 --- a/DataSpec/SpecBase.cpp +++ b/DataSpec/SpecBase.cpp @@ -9,6 +9,7 @@ #include "DNACommon/TXTR.hpp" #include "AssetNameMap.hpp" #include "hecl/ClientProcess.hpp" +#include "nod/DiscBase.hpp" #include "nod/nod.hpp" #include "hecl/Blender/Connection.hpp" #include "hecl/Blender/SDNARead.hpp" diff --git a/Editor/badging/Badging.cpp b/Editor/badging/Badging.cpp index f54576f56..43b9b9ee6 100644 --- a/Editor/badging/Badging.cpp +++ b/Editor/badging/Badging.cpp @@ -1,5 +1,7 @@ #include "Badging.hpp" #include "athena/MemoryReader.hpp" + +#include #include extern "C" uint8_t URDE_BADGE[]; diff --git a/Runtime/MP1/World/CEnergyBall.cpp b/Runtime/MP1/World/CEnergyBall.cpp index 894cfb1bd..2aeafedfb 100644 --- a/Runtime/MP1/World/CEnergyBall.cpp +++ b/Runtime/MP1/World/CEnergyBall.cpp @@ -1,4 +1,9 @@ +#include "CSimplePool.hpp" +#include "CStateManager.hpp" +#include "GameGlobalObjects.hpp" #include "MP1/World/CEnergyBall.hpp" +#include "World/CPatternedInfo.hpp" +#include "World/CPlayer.hpp" namespace urde::MP1 { CEnergyBall::CEnergyBall(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, @@ -7,5 +12,90 @@ CEnergyBall::CEnergyBall(TUniqueId uid, std::string_view name, const CEntityInfo const CAssetId& a2, const CAssetId& a3, s16 sfxId2, float f3, float f4, const CAssetId& a4, const CDamageInfo& dInfo2, float f5) : CPatterned(ECharacter::EnergyBall, uid, name, EFlavorType::Zero, info, xf, std::move(mData), pInfo, - EMovementType::Flyer, EColliderType::One, EBodyType::NewFlyer, actParms, EKnockBackVariant::Medium) {} + EMovementType::Flyer, EColliderType::One, EBodyType::NewFlyer, actParms, EKnockBackVariant::Medium) +, x570_(w1) +, x574_(f1) +, x578_(dInfo1) +, x594_initialTurnSpeed(pInfo.GetTurnSpeed()) +, x598_(f2) +, x59c_(a1) +, x5a0_(sfxId1) +, x5a4_(a2) +, x5a8_(g_SimplePool->GetObj({FOURCC('ELSC'), a3})) +, x5b4_(sfxId2) +, x5b8_(f3) +, x5bc_(f4) +, x5c0_(g_SimplePool->GetObj({FOURCC('PART'), a4})) +, x5cc_(dInfo2) +, x5e8_(f5) { + x460_knockBackController.SetEnableExplodeDeath(false); + x460_knockBackController.SetAutoResetImpulse(false); + x460_knockBackController.SetEnableBurnDeath(false); + x460_knockBackController.SetX82_24(false); + x460_knockBackController.SetEnableBurn(false); + x460_knockBackController.SetEnableLaggedBurnDeath(false); + x460_knockBackController.SetEnableShock(false); + x460_knockBackController.SetEnableFreeze(false); + x460_knockBackController.SetX81_31(false); +} + +void CEnergyBall::Think(float dt, CStateManager& mgr) { + float newTurnSpeed = x594_initialTurnSpeed * zeus::clamp(0.f, (x56c_ - 2.5f) * 0.125f, 1.f); + x3b8_turnSpeed = newTurnSpeed; + x450_bodyController->SetTurnSpeed(newTurnSpeed); + CPatterned::Think(dt, mgr); + GetModelData()->GetAnimationData()->GetParticleDB().SetModulationColorAllActiveEffects( + zeus::CColor::lerp(zeus::skWhite, zeus::skRed, zeus::clamp(0.f, x428_damageCooldownTimer / 0.33f, 1.f))); + + bool r27 = false; + if (GetActive() && IsAlive()) { + x56c_ -= dt; + if (x56c_ > x574_) + r27 = true; + if (!InMaxRange(mgr, dt)) + r27 = true; + } + + if (!r27) + sub8029f4a8(mgr); +} + +void CEnergyBall::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) { + if (msg == EScriptObjectMessage::Registered) { + SetMaterialFilter(CMaterialFilter::MakeInclude({EMaterialTypes::Player})); + RemoveMaterial(EMaterialTypes::Solid, mgr); + } + CPatterned::AcceptScriptMsg(msg, uid, mgr); +} + +void CEnergyBall::Death(CStateManager& mgr, const zeus::CVector3f& direction, EScriptObjectState /* state */) { + CHealthInfo* hInfo = HealthInfo(mgr); + if (hInfo && hInfo->GetHP() > 0.f) { + CPatterned::Death(mgr, direction, EScriptObjectState::Any); + } else { + CPatterned::Death(mgr, direction, EScriptObjectState::DeathRattle); + } +} + +void CEnergyBall::Generate(CStateManager& mgr, EStateMsg msg, float /*arg*/) { + if (msg == EStateMsg::Activate || msg == EStateMsg::Update) { + if (msg == EStateMsg::Activate) + x32c_animState = EAnimState::Ready; + + TryGenerateDeactivate(mgr, 0); + + if (!x450_bodyController->GetActive()) + x450_bodyController->Activate(mgr); + } else if (msg == EStateMsg::Deactivate) { + x32c_animState = EAnimState::NotReady; + } +} + +void CEnergyBall::Attack(CStateManager& mgr, EStateMsg msg, float arg) { + if (msg == EStateMsg::Update) { + zeus::CVector3f seekPos = x568_steeringBehaviors.Seek(*this, mgr.GetPlayer().GetEyePosition()); + x450_bodyController->FaceDirection3D(seekPos, GetTransform().basis[1], arg); + } +} +void CEnergyBall::sub8029f4a8(CStateManager& mgr) {} } \ No newline at end of file diff --git a/Runtime/MP1/World/CEnergyBall.hpp b/Runtime/MP1/World/CEnergyBall.hpp index 7ac0bbdc1..11e3cd343 100644 --- a/Runtime/MP1/World/CEnergyBall.hpp +++ b/Runtime/MP1/World/CEnergyBall.hpp @@ -1,9 +1,30 @@ #pragma once +#include "Character/CSteeringBehaviors.hpp" +#include "World/CDamageInfo.hpp" #include "World/CPatterned.hpp" namespace urde::MP1 { class CEnergyBall : public CPatterned { + CSteeringBehaviors x568_steeringBehaviors; + float x56c_ = 0.f; + s32 x570_; + float x574_; + CDamageInfo x578_; + float x594_initialTurnSpeed; + float x598_; + CAssetId x59c_; + s16 x5a0_; + CAssetId x5a4_; + TToken x5a8_; // originally an rstl::optional_object + s16 x5b4_; + float x5b8_; + float x5bc_; + TToken x5c0_; + CDamageInfo x5cc_; + float x5e8_; + + void sub8029f4a8(CStateManager& mgr); public: DEFINE_PATTERNED(EnergyBall) CEnergyBall(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, @@ -11,5 +32,12 @@ public: const CDamageInfo& dInfo1, float f2, const CAssetId& a1, s16 sfxId1, const CAssetId& a2, const CAssetId& a3, s16 sfxId2, float f3, float f4, const CAssetId& a4, const CDamageInfo& dInfo2, float f5); + + + void Think(float dt, CStateManager& mgr) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override; + void Death(CStateManager& mgr, const zeus::CVector3f& direction, EScriptObjectState state) override; + void Generate(CStateManager& mgr, EStateMsg msg, float arg) override; + void Attack(CStateManager& mgr, EStateMsg msg, float arg) override; }; } diff --git a/Runtime/World/CPatterned.cpp b/Runtime/World/CPatterned.cpp index 4d25a2adb..7f2d3a127 100644 --- a/Runtime/World/CPatterned.cpp +++ b/Runtime/World/CPatterned.cpp @@ -936,6 +936,10 @@ void CPatterned::TryKnockBack(CStateManager& mgr, int arg) { x450_bodyController->GetCommandMgr().DeliverCmd(CBCKnockBackCmd(GetTranslation(), pas::ESeverity(arg))); } +void CPatterned::TryGenerateDeactivate(urde::CStateManager& mgr, int arg) { + x450_bodyController->GetCommandMgr().DeliverCmd(CBCGenerateCmd(pas::EGenerateType(arg), zeus::skZero3f)); +} + void CPatterned::BuildBodyController(EBodyType bodyType) { if (x450_bodyController) return; diff --git a/Runtime/World/CPatterned.hpp b/Runtime/World/CPatterned.hpp index 5e01c1944..7c1516493 100644 --- a/Runtime/World/CPatterned.hpp +++ b/Runtime/World/CPatterned.hpp @@ -337,6 +337,7 @@ public: void TryCover(CStateManager& mgr, int arg); void TryWallHang(CStateManager& mgr, int arg); void TryKnockBack(CStateManager& mgr, int arg); + void TryGenerateDeactivate(CStateManager& mgr, int arg); virtual bool KnockbackWhenFrozen() const { return true; } virtual void MassiveDeath(CStateManager& mgr); diff --git a/Runtime/World/CPatternedInfo.hpp b/Runtime/World/CPatternedInfo.hpp index f0bbbf8f7..e82f27c0a 100644 --- a/Runtime/World/CPatternedInfo.hpp +++ b/Runtime/World/CPatternedInfo.hpp @@ -57,6 +57,7 @@ public: CPatternedInfo(CInputStream& in, u32 pcount); static std::pair HasCorrectParameterCount(CInputStream& in); + float GetTurnSpeed() const { return x8_turnSpeed; } float GetDetectionHeightRange() const { return x10_detectionHeightRange; } const CHealthInfo& GetHealthInfo() const { return x54_healthInfo; } const CDamageVulnerability& GetDamageVulnerability() const { return x5c_damageVulnerability; } diff --git a/amuse b/amuse index 107ddeb5a..5da58eb1d 160000 --- a/amuse +++ b/amuse @@ -1 +1 @@ -Subproject commit 107ddeb5a9dfe3e336c26c285ce0be0b8f0ebd2c +Subproject commit 5da58eb1da26c83307b324be3fc9c3d496b46d86 diff --git a/hecl b/hecl index af5d10cfe..0eb776c54 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit af5d10cfe91655d2dc48c53df52e564e2b0d6be7 +Subproject commit 0eb776c5406b0c203e81d45edf611da76c6ed7fd diff --git a/hecl-gui b/hecl-gui index 1ebf7ec12..c2101317a 160000 --- a/hecl-gui +++ b/hecl-gui @@ -1 +1 @@ -Subproject commit 1ebf7ec1261d13e7921a3f3bafa30688d2d0f5f3 +Subproject commit c2101317ad3f727f6f284e3285ce425431763203 diff --git a/kabufuda b/kabufuda index f57d8cf76..222fb5c17 160000 --- a/kabufuda +++ b/kabufuda @@ -1 +1 @@ -Subproject commit f57d8cf76187e0444e232b557e709fca161c64a9 +Subproject commit 222fb5c179b2ab1aa302053825321762451e2be5 diff --git a/nod b/nod index df1e45072..55301dd50 160000 --- a/nod +++ b/nod @@ -1 +1 @@ -Subproject commit df1e450728c725ab66508caca64b76cff13c354c +Subproject commit 55301dd505ae38a7ad5ba0dc145eb6a826887fb5 diff --git a/specter b/specter index ba31ba180..73ace3136 160000 --- a/specter +++ b/specter @@ -1 +1 @@ -Subproject commit ba31ba180f3cbc1ba9513befa95a4dbbdbaf38a4 +Subproject commit 73ace31365553b7264bf1de9968b74aec5636d6e