From 1ada86cc032306c6e32da8ff6be8ddc0903971a9 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Mon, 21 May 2018 21:51:08 -1000 Subject: [PATCH] Vulkan fixes --- DataSpec/DNAMP1/ScriptObjects/DoorArea.hpp | 2 +- Runtime/World/CScriptDoor.cpp | 8 ++++---- Runtime/World/CScriptDoor.hpp | 4 ++-- Runtime/World/ScriptLoader.cpp | 6 +++--- hecl | 2 +- specter | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/DataSpec/DNAMP1/ScriptObjects/DoorArea.hpp b/DataSpec/DNAMP1/ScriptObjects/DoorArea.hpp index f149feb79..73b7ecc93 100644 --- a/DataSpec/DNAMP1/ScriptObjects/DoorArea.hpp +++ b/DataSpec/DNAMP1/ScriptObjects/DoorArea.hpp @@ -17,7 +17,7 @@ struct DoorArea : IScriptObject Value scale; AnimationParameters animationParameters; ActorParameters actorParameters; - Value unknown1; + Value orbitPos; Value collisionExtent; Value collisionOffset; Value unknown4; diff --git a/Runtime/World/CScriptDoor.cpp b/Runtime/World/CScriptDoor.cpp index 2b598e1ae..9ba65e760 100644 --- a/Runtime/World/CScriptDoor.cpp +++ b/Runtime/World/CScriptDoor.cpp @@ -27,7 +27,7 @@ static CMaterialList MakeDoorMaterialList(bool open) CScriptDoor::CScriptDoor(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, CModelData&& mData, const CActorParameters& actParms, - const zeus::CVector3f& vec, const zeus::CAABox& aabb, bool active, + const zeus::CVector3f& orbitPos, const zeus::CAABox& aabb, bool active, bool open, bool projectilesCollide, float animLen, bool ballDoor) : CPhysicsActor(uid, active, name, info, xf, std::move(mData), MakeDoorMaterialList(open), aabb, SMoverData(1.f), actParms, 0.3f, 0.1f) @@ -42,7 +42,7 @@ CScriptDoor::CScriptDoor(TUniqueId uid, std::string_view name, const CEntityInfo x2a8_30_doClose = false; x264_ = GetBoundingBox(); x284_modelBounds = x64_modelData->GetBounds(xf.getRotation()); - x29c_ = vec; + x29c_orbitPos = orbitPos; xe6_27_thermalVisorFlags = 1; if (open) @@ -59,7 +59,7 @@ void CScriptDoor::Accept(IVisitor& visitor) /* ORIGINAL 0-00 OFFSET: 8007F054 */ zeus::CVector3f CScriptDoor::GetOrbitPosition(const CStateManager& /*mgr*/) const { - return x34_transform.origin + x29c_; + return x34_transform.origin + x29c_orbitPos; } /* ORIGINAL 0-00 OFFSET: 8007E550 */ @@ -123,7 +123,7 @@ void CScriptDoor::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStat return; u32 doorCond = TCastToConstPtr(mgr.GetObjectById(uid)) ? 2 : GetDoorOpenCondition(mgr); - switch(doorCond) + switch (doorCond) { case 1: x2a8_27_conditionsMet = true; diff --git a/Runtime/World/CScriptDoor.hpp b/Runtime/World/CScriptDoor.hpp index a7406cd00..d372e50c7 100644 --- a/Runtime/World/CScriptDoor.hpp +++ b/Runtime/World/CScriptDoor.hpp @@ -17,7 +17,7 @@ public: }; float x258_animLen; - float x25c_animTime; + float x25c_animTime = 0.f; EDoorAnimType x260_doorState = EDoorAnimType::Open; zeus::CAABox x264_; TUniqueId x27c_partner1 = kInvalidUniqueId; @@ -25,7 +25,7 @@ public: TUniqueId x280_prevDoor = kInvalidUniqueId; TUniqueId x282_dockId = kInvalidUniqueId; zeus::CAABox x284_modelBounds; - zeus::CVector3f x29c_; + zeus::CVector3f x29c_orbitPos; bool x2a8_24_closing : 1; bool x2a8_25_wasOpen : 1; diff --git a/Runtime/World/ScriptLoader.cpp b/Runtime/World/ScriptLoader.cpp index 3bbb0145c..1f345c559 100644 --- a/Runtime/World/ScriptLoader.cpp +++ b/Runtime/World/ScriptLoader.cpp @@ -472,8 +472,8 @@ CEntity* ScriptLoader::LoadDoor(CStateManager& mgr, CInputStream& in, int propCo CAnimationParameters aParms = LoadAnimationParameters(in); CActorParameters actParms = LoadActorParameters(in); - zeus::CVector3f v1; - v1.readBig(in); + zeus::CVector3f orbitPos; + orbitPos.readBig(in); zeus::CVector3f collisionExtent; collisionExtent.readBig(in); zeus::CVector3f offset; @@ -504,7 +504,7 @@ CEntity* ScriptLoader::LoadDoor(CStateManager& mgr, CInputStream& in, int propCo isMorphballDoor = in.readBool(); return new CScriptDoor(mgr.AllocateUniqueId(), head.x0_name, info, head.x10_transform, std::move(mData), actParms, - v1, aabb, active, open, b3, animationLength, isMorphballDoor); + orbitPos, aabb, active, open, b3, animationLength, isMorphballDoor); } CEntity* ScriptLoader::LoadTrigger(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info) diff --git a/hecl b/hecl index edaa2d036..52134b89f 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit edaa2d0360409a3f02087ac3d4265c35f4ddee81 +Subproject commit 52134b89fdbd44b569c32ae177ef3bb2e6dd6178 diff --git a/specter b/specter index a709031d3..d3d604f39 160000 --- a/specter +++ b/specter @@ -1 +1 @@ -Subproject commit a709031d36f5556b5ef3646673fba5c984d1d45a +Subproject commit d3d604f390141fdd147bb87c8d2fb8fa68564c3e