mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 15:47:46 +00:00
Add CPU-based skinning path for vertex manipulation effects
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
#include "CAuxWeapon.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
||||
CAuxWeapon::CAuxWeapon(TUniqueId id)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace urde
|
||||
class CAuxWeapon
|
||||
{
|
||||
public:
|
||||
CAuxWeapon(TUniqueId id);
|
||||
explicit CAuxWeapon(TUniqueId id);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#include "CGunMotion.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
||||
CGunMotion::CGunMotion(CAssetId, const zeus::CVector3f& vec)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ class CGunMotion
|
||||
CModelData x0_modelData;
|
||||
|
||||
public:
|
||||
CGunMotion(u32, const zeus::CVector3f& vec);
|
||||
CGunMotion(CAssetId, const zeus::CVector3f& vec);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -5,21 +5,32 @@
|
||||
namespace urde
|
||||
{
|
||||
|
||||
static const zeus::CVector3f sGunScale(2.f);
|
||||
|
||||
CPlayerGun::CPlayerGun(TUniqueId id)
|
||||
: x0_lights(8, zeus::CVector3f{-30.f, 0.f, 30.f}, 4, 4, 0, 0, 0, 0.1f), x538_thisId(id),
|
||||
x550_camBob(CPlayerCameraBob::ECameraBobType::One,
|
||||
zeus::CVector2f(0.071f, 0.141f), 0.47f),
|
||||
x678_morph(g_tweakPlayerGun->GetX38(), g_tweakPlayerGun->GetX34())
|
||||
zeus::CVector2f(CPlayerCameraBob::kCameraBobExtentX, CPlayerCameraBob::kCameraBobExtentY),
|
||||
CPlayerCameraBob::kCameraBobPeriod),
|
||||
x678_morph(g_tweakPlayerGun->GetGunTransformTime(), g_tweakPlayerGun->GetHoloHoldTime()),
|
||||
x6c8_(zeus::CVector3f(-0.29329199f, 0.f, -0.2481945f),
|
||||
zeus::CVector3f(0.29329199f, 1.292392f, 0.2481945f)),
|
||||
x6e0_rightHandModel(CAnimRes(g_tweakGunRes->xc_rightHand, 0, zeus::CVector3f(3.f), 0, true))
|
||||
{
|
||||
x354_ = g_tweakPlayerGun->GetX2c();
|
||||
x358_ = g_tweakPlayerGun->GetX30();
|
||||
x668_ = g_tweakPlayerGun->GetX24();
|
||||
x66c_ = g_tweakPlayerGun->GetX28();
|
||||
x354_bombFuseTime = g_tweakPlayerGun->GetBombFuseTime();
|
||||
x358_bombDropDelayTime = g_tweakPlayerGun->GetBombDropDelayTime();
|
||||
x668_aimVerticalSpeed = g_tweakPlayerGun->GetAimVerticalSpeed();
|
||||
x66c_aimHorizontalSpeed = g_tweakPlayerGun->GetAimHorizontalSpeed();
|
||||
|
||||
x73c_gunMotion = std::make_unique<CGunMotion>(g_tweakGunRes->x4_gunMotion, sGunScale);
|
||||
x740_grappleArm = std::make_unique<CGrappleArm>(sGunScale);
|
||||
x744_auxWeapon = std::make_unique<CAuxWeapon>(id);
|
||||
|
||||
|
||||
x832_31_ = true;
|
||||
x833_24_isFidgeting = true;
|
||||
x833_30_ = true;
|
||||
x6e0_.SetSortThermal(true);
|
||||
x6e0_rightHandModel.SetSortThermal(true);
|
||||
|
||||
/* TODO: Finish */
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "Character/CModelData.hpp"
|
||||
#include "World/CWorldShadow.hpp"
|
||||
#include "World/ScriptObjectSupport.hpp"
|
||||
#include "Graphics/CModelPointSelector.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
@@ -40,10 +41,10 @@ private:
|
||||
class CGunMorph
|
||||
{
|
||||
float x0_ = 0.f;
|
||||
float x4_;
|
||||
float x4_gunTransformTime;
|
||||
float x8_ = 0.f;
|
||||
float xc_ = 0.1f;
|
||||
float x10_;
|
||||
float x10_holoHoldTime;
|
||||
float x14_ = 2.f;
|
||||
float x18_transitionFactor = 1.f;
|
||||
u32 x1c_ = 2;
|
||||
@@ -60,8 +61,8 @@ private:
|
||||
};
|
||||
|
||||
public:
|
||||
CGunMorph(float a, float b)
|
||||
: x4_(a), x10_(std::fabs(b)) {}
|
||||
CGunMorph(float gunTransformTime, float holoHoldTime)
|
||||
: x4_gunTransformTime(gunTransformTime), x10_holoHoldTime(std::fabs(holoHoldTime)) {}
|
||||
float GetTransitionFactor() const { return x18_transitionFactor; }
|
||||
};
|
||||
|
||||
@@ -100,8 +101,8 @@ private:
|
||||
float x348_ = 0.f;
|
||||
float x34c_ = 0.f;
|
||||
float x350_ = 0.f;
|
||||
float x354_;
|
||||
float x358_;
|
||||
float x354_bombFuseTime;
|
||||
float x358_bombDropDelayTime;
|
||||
float x35c_bombTime = 0.f;
|
||||
float x360_ = 0.f;
|
||||
float x364_ = 0.f;
|
||||
@@ -140,8 +141,8 @@ private:
|
||||
float x65c_ = 0.f;
|
||||
float x660_ = 0.f;
|
||||
float x664_ = 0.f;
|
||||
float x668_;
|
||||
float x66c_;
|
||||
float x668_aimVerticalSpeed;
|
||||
float x66c_aimHorizontalSpeed;
|
||||
TUniqueId x670_ = kInvalidUniqueId;
|
||||
u32 x674_ = 0;
|
||||
CGunMorph x678_morph;
|
||||
@@ -156,7 +157,7 @@ private:
|
||||
u32 x6c0_ = 0;
|
||||
u32 x6c4_ = 0;
|
||||
zeus::CAABox x6c8_;
|
||||
CModelData x6e0_;
|
||||
CModelData x6e0_rightHandModel;
|
||||
CGunWeapon* x72c_currentBeam = nullptr;
|
||||
u32 x730_ = 0;
|
||||
u32 x734_ = 0;
|
||||
@@ -164,6 +165,7 @@ private:
|
||||
std::unique_ptr<CGunMotion> x73c_gunMotion;
|
||||
std::unique_ptr<CGrappleArm> x740_grappleArm;
|
||||
std::unique_ptr<CAuxWeapon> x744_auxWeapon;
|
||||
std::unique_ptr<CModelPointSelector> x748_modelPointSelector;
|
||||
std::unique_ptr<CPowerBeam> x74c_powerBeam;
|
||||
std::unique_ptr<CIceBeam> x750_iceBeam;
|
||||
std::unique_ptr<CWaveBeam> x754_waveBeam;
|
||||
|
||||
Reference in New Issue
Block a user