Additional CPlayer implementations

This commit is contained in:
Jack Andersen 2017-08-15 19:34:02 -10:00
parent 086ff76474
commit 8e8ce66799
26 changed files with 1684 additions and 668 deletions

View File

@ -10,11 +10,32 @@ namespace DataSpec
struct ITweakPlayer : ITweak
{
virtual float GetMaxTranslationalAcceleration(int s) const=0;
virtual float GetMaxRotationalAcceleration(int s) const=0;
virtual float GetPlayerTranslationFriction(int s) const=0;
virtual float GetPlayerRotationFriction(int s) const=0;
virtual float GetPlayerRotationMaxSpeed(int s) const=0;
virtual float GetPlayerTranslationMaxSpeed(int s) const=0;
virtual float GetNormalGravAccel() const=0;
virtual float GetFluidGravAccel() const=0;
virtual float GetVerticalJumpAccel() const=0;
virtual float GetHorizontalJumpAccel() const=0;
virtual float GetVerticalDoubleJumpAccel() const=0;
virtual float GetHorizontalDoubleJumpAccel() const=0;
virtual float GetWaterJumpFactor() const=0;
virtual float GetLavaJumpFactor() const=0;
virtual float GetPhazonJumpFactor() const=0;
virtual float GetAllowedJumpTime() const=0;
virtual float GetAllowedDoubleJumpTime() const=0;
virtual float GetMinDoubleJumpWindow() const=0;
virtual float GetMaxDoubleJumpWindow() const=0;
virtual float GetMinJumpTime() const=0;
virtual float GetMinDoubleJumpTime() const=0;
virtual float GetAllowedLedgeTime() const=0;
virtual float GetDoubleJumpImpulse() const=0;
virtual float GetBackwardsForceMultiplier() const=0;
virtual float GetEyeOffset() const=0;
virtual float GetTurnSpeedMultiplier() const=0;
virtual float GetFreeLookTurnSpeedMultiplier() const=0;
virtual float GetFreeLookSpeed() const=0;
virtual float GetFreeLookSnapSpeed() const=0;
virtual float GetFreeLookCenteredThresholdAngle() const=0;
@ -33,10 +54,19 @@ struct ITweakPlayer : ITweak
virtual float GetOrbitNearX() const=0;
virtual float GetOrbitNearZ() const=0;
virtual float GetOrbitZRange() const=0;
virtual bool GetDashEnabled() const=0;
virtual bool GetDashOnButtonRelease() const=0;
virtual float GetDashButtonHoldCancelTime() const=0;
virtual float GetDashStrafeInputThreshold() const=0;
virtual float GetSidewaysDoubleJumpImpulse() const=0;
virtual float GetSidewaysVerticalDoubleJumpAccel() const=0;
virtual float GetSidewaysHorizontalDoubleJumpAccel() const=0;
virtual float GetScanningRange() const=0; // x218
virtual bool GetScanRetention() const=0;
virtual bool GetScanFreezesGame() const=0; // x21c_25
virtual bool GetOrbitWhileScanning() const=0;
virtual bool GetFallingDoubleJump() const=0;
virtual bool GetImpulseDoubleJump() const=0;
virtual bool GetFiringCancelsCameraPitch() const=0;
virtual bool GetAssistedAimingIgnoreHorizontal() const=0;
virtual bool GetAssistedAimingIgnoreVertical() const=0;
@ -48,7 +78,8 @@ struct ITweakPlayer : ITweak
virtual float GetAimAssistHorizontalAngle() const=0;
virtual float GetAimAssistVerticalAngle() const=0;
virtual float GetScanningFrameSenseRange() const=0;
virtual bool GetEnableFreeLook() const=0;
virtual bool GetMoveDuringFreeLook() const=0;
virtual bool GetHoldButtonsForFreeLook() const=0;
virtual bool GetTwoButtonsForFreeLook() const=0;
virtual bool GetAimWhenOrbitingPoint() const=0;
virtual bool GetStayInFreeLookWhileFiring() const=0;
@ -57,8 +88,8 @@ struct ITweakPlayer : ITweak
virtual float GetPlayerHeight() const=0; // x26c
virtual float GetPlayerXYHalfExtent() const=0; // x270
virtual bool GetFreeLookTurnsPlayer() const=0; // x228_24
virtual float GetX274() const=0; // x274
virtual float GetX278() const=0; // x278
virtual float GetStepUpHeight() const=0; // x274
virtual float GetStepDownHeight() const=0; // x278
virtual float GetPlayerBallHalfExtent() const=0; // x27c
virtual float GetOrbitDistanceMax() const=0;
virtual float GetGrappleSwingLength() const=0;

View File

@ -67,10 +67,10 @@ struct Water : IScriptObject
UniqueID32 splashParticle1;
UniqueID32 splashParticle2;
UniqueID32 splashParticle3;
UniqueID32 particle4;
UniqueID32 particle5;
Value<atUint32> unkSfx;
UniqueID32 visorRunoffParticle;
UniqueID32 unmorphVisorRunoffParticle;
Value<atUint32> visorRunoffSfx;
Value<atUint32> unmorphVisorRunoffSfx;
Value<atUint32> splashSfx1;
Value<atUint32> splashSfx2;
Value<atUint32> splashSfx3;
@ -163,15 +163,15 @@ struct Water : IScriptObject
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(splashParticle3);
ent->name = name + "_splashParticle3";
}
if (particle4)
if (visorRunoffParticle)
{
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle4);
ent->name = name + "_part4";
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(visorRunoffParticle);
ent->name = name + "_visorRunoffParticle";
}
if (particle5)
if (unmorphVisorRunoffParticle)
{
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle5);
ent->name = name + "_part5";
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(unmorphVisorRunoffParticle);
ent->name = name + "_unmorphVisorRunoffParticle";
}
}
@ -187,8 +187,8 @@ struct Water : IScriptObject
g_curSpec->flattenDependencies(splashParticle1, pathsOut);
g_curSpec->flattenDependencies(splashParticle2, pathsOut);
g_curSpec->flattenDependencies(splashParticle3, pathsOut);
g_curSpec->flattenDependencies(particle4, pathsOut);
g_curSpec->flattenDependencies(particle5, pathsOut);
g_curSpec->flattenDependencies(visorRunoffParticle, pathsOut);
g_curSpec->flattenDependencies(unmorphVisorRunoffParticle, pathsOut);
}
zeus::CAABox getVISIAABB(hecl::BlenderToken& btok) const

File diff suppressed because it is too large Load Diff

View File

@ -12,38 +12,38 @@ struct CTweakPlayer : ITweakPlayer
{
Delete _d;
Value<float> x4_maxTranslationalAcceleration[8];
Value<float> x24_[8];
Value<float> x24_maxRotationalAcceleration[8];
Value<float> x44_translationFriction[8];
Value<float> x64_[8];
Value<float> x84_[8];
Value<float> x64_rotationFriction[8];
Value<float> x84_rotationMaxSpeed[8];
Value<float> xa4_translationMaxSpeed[8];
Value<float> xc4_normalGravAccel;
Value<float> xc8_fluidGravAccel;
Value<float> xcc_;
Value<float> xd0_;
Value<float> xd4_;
Value<float> xd8_;
Value<float> xdc_;
Value<float> xcc_verticalJumpAccel;
Value<float> xd0_horizontalJumpAccel;
Value<float> xd4_verticalDoubleJumpAccel;
Value<float> xd8_horizontalDoubleJumpAccel;
Value<float> xdc_waterJumpFactor;
Value<float> xe0_;
Value<float> xe4_;
Value<float> xe4_lavaJumpFactor;
Value<float> xe8_;
Value<float> xec_;
Value<float> xec_phazonJumpFactor;
Value<float> xf0_;
Value<float> xf4_;
Value<float> xf8_;
Value<float> xfc_;
Value<float> x100_;
Value<float> xf4_allowedJumpTime;
Value<float> xf8_allowedDoubleJumpTime;
Value<float> xfc_minDoubleJumpWindow;
Value<float> x100_maxDoubleJumpWindow;
Value<float> x104_;
Value<float> x108_;
Value<float> x10c_;
Value<float> x110_;
Value<float> x114_;
Value<float> x118_;
Value<float> x108_minJumpTime;
Value<float> x10c_minDoubleJumpTime;
Value<float> x110_allowedLedgeTime;
Value<float> x114_doubleJumpImpulse;
Value<float> x118_backwardsForceMultiplier;
Value<float> x11c_;
Value<float> x120_;
Value<float> x124_eyeOffset;
Value<float> x128_;
Value<float> x12c_;
Value<float> x128_turnSpeedMultiplier;
Value<float> x12c_freeLookTurnSpeedMultiplier;
Value<float> x130_horizontalFreeLookAngleVel;
Value<float> x134_verticalFreeLookAngleVel;
Value<float> x138_freeLookSpeed;
@ -84,13 +84,13 @@ struct CTweakPlayer : ITweakPlayer
Value<float> x1f4_;
Value<float> x1f8_;
Value<float> x1fc_;
Value<bool> x200_24_ : 1;
Value<bool> x200_25_ : 1;
Value<float> x204_;
Value<float> x208_;
Value<float> x20c_;
Value<float> x210_;
Value<float> x214_;
Value<bool> x200_24_dashEnabled : 1;
Value<bool> x200_25_dashOnButtonRelease : 1;
Value<float> x204_dashButtonHoldCancelTime;
Value<float> x208_dashStrafeInputThreshold;
Value<float> x20c_sidewaysDoubleJumpImpulse;
Value<float> x210_sidewaysVerticalDoubleJumpAccel;
Value<float> x214_sidewaysHorizontalDoubleJumpAccel;
Value<float> x218_scanningRange;
Value<bool> x21c_24_scanRetention : 1;
Value<bool> x21c_25_scanFreezesGame : 1;
@ -100,8 +100,8 @@ struct CTweakPlayer : ITweakPlayer
Value<bool> x228_24_freelookTurnsPlayer : 1;
Value<bool> x228_25_ : 1;
Value<bool> x228_26_ : 1;
Value<bool> x228_27_ : 1;
Value<bool> x228_28_enableFreeLook : 1;
Value<bool> x228_27_moveDuringFreeLook : 1;
Value<bool> x228_28_holdButtonsForFreeLook : 1;
Value<bool> x228_29_twoButtonsForFreeLook : 1;
Value<bool> x228_30_ : 1;
Value<bool> x228_31_ : 1;
@ -113,8 +113,8 @@ struct CTweakPlayer : ITweakPlayer
Value<bool> x229_29_ : 1;
Value<bool> x229_30_gunButtonTogglesHolster : 1;
Value<bool> x229_31_gunNotFiringHolstersGun : 1;
Value<bool> x22a_24_ : 1;
Value<bool> x22a_25_ : 1;
Value<bool> x22a_24_fallingDoubleJump : 1;
Value<bool> x22a_25_impulseDoubleJump : 1;
Value<bool> x22a_26_firingCancelsCameraPitch : 1;
Value<bool> x22a_27_assistedAimingIgnoreHorizontal : 1;
Value<bool> x22a_28_assistedAimingIgnoreVertical : 1;
@ -136,8 +136,8 @@ struct CTweakPlayer : ITweakPlayer
Value<float> x268_aimAssistVerticalAngle;
Value<float> x26c_playerHeight;
Value<float> x270_playerXYHalfExtent;
Value<float> x274_;
Value<float> x278_;
Value<float> x274_stepUpHeight;
Value<float> x278_stepDownHeight;
Value<float> x27c_playerBallHalfExtent;
Value<float> x280_;
Value<float> x284_;
@ -176,11 +176,32 @@ struct CTweakPlayer : ITweakPlayer
Value<float> x304_gravityDamageReduction;
Value<float> 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 GetLavaJumpFactor() const { return xe4_lavaJumpFactor; }
float GetPhazonJumpFactor() const { return xec_phazonJumpFactor; }
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 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; }
@ -199,17 +220,27 @@ struct CTweakPlayer : ITweakPlayer
float GetOrbitNearX() const { return x1d8_orbitNearX; }
float GetOrbitNearZ() const { return x1dc_orbitNearZ; }
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 GetScanningFrameSenseRange() const { return x224_scanningFrameSenseRange; }
bool GetEnableFreeLook() const { return x228_28_enableFreeLook; }
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 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; }
@ -222,8 +253,8 @@ struct CTweakPlayer : ITweakPlayer
float GetAimAssistVerticalAngle() const { return x268_aimAssistVerticalAngle; }
float GetPlayerHeight() const { return x26c_playerHeight; }
float GetPlayerXYHalfExtent() const { return x270_playerXYHalfExtent; }
float GetX274() const { return x274_; }
float GetX278() const { return x278_; }
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; }

View File

@ -217,7 +217,7 @@ CPlayerState::EPlayerVisor CPlayerState::GetActiveVisor(const CStateManager& sta
return (cam ? x14_currentVisor : EPlayerVisor::Combat);
}
void CPlayerState::UpdateStaticInterference(CStateManager& stateMgr, const float& dt)
void CPlayerState::UpdateStaticInterference(CStateManager& stateMgr, float dt)
{
x188_staticIntf.Update(stateMgr, dt);
}

View File

@ -145,7 +145,7 @@ public:
EPlayerVisor GetCurrentVisor() const { return x14_currentVisor; }
EPlayerVisor GetTransitioningVisor() const { return x18_transitioningVisor; }
EPlayerVisor GetActiveVisor(const CStateManager& stateMgr) const;
void UpdateStaticInterference(CStateManager& stateMgr, const float& dt);
void UpdateStaticInterference(CStateManager& stateMgr, float dt);
void IncreaseScanTime(u32 time, float val);
void SetScanTime(CAssetId res, float time);
float GetScanTime(CAssetId time) const;

View File

@ -1314,7 +1314,7 @@ void CStateManager::KnockBackPlayer(CPlayer& player, const zeus::CVector3f& pos,
{
usePower = power * 1000.f;
CPlayer::ESurfaceRestraints surface =
player.x2b0_ == 2 ? player.x2ac_surfaceRestraint : CPlayer::ESurfaceRestraints::Four;
player.x2b0_outOfWaterTicks == 2 ? player.x2ac_surfaceRestraint : CPlayer::ESurfaceRestraints::Water;
if (surface != CPlayer::ESurfaceRestraints::Normal &&
player.GetOrbitState() == CPlayer::EPlayerOrbitState::Zero)
usePower /= 7.f;
@ -1331,7 +1331,7 @@ void CStateManager::KnockBackPlayer(CPlayer& player, const zeus::CVector3f& pos,
usePower *= (1.f - 0.5f * zeus::CVector3f::getAngleDiff(pos, negVel) / M_PIF);
player.ApplyImpulseWR(pos * usePower, zeus::CAxisAngle::sIdentity);
player.UseCollisionImpulses();
player.x2d4_ = 0.25f;
player.x2d4_accelerationChangeTimer = 0.25f;
float newVel = player.x138_velocity.magnitude();
if (newVel > maxVel)
@ -2229,16 +2229,16 @@ void CStateManager::CreateStandardGameObjects()
{
float height = g_tweakPlayer->GetPlayerHeight();
float xyHe = g_tweakPlayer->GetPlayerXYHalfExtent();
float unk1 = g_tweakPlayer->GetX274();
float unk2 = g_tweakPlayer->GetX278();
float unk3 = g_tweakPlayer->GetPlayerBallHalfExtent();
float stepUp = g_tweakPlayer->GetStepUpHeight();
float stepDown = g_tweakPlayer->GetStepDownHeight();
float ballRadius = g_tweakPlayer->GetPlayerBallHalfExtent();
zeus::CAABox pBounds = {{-xyHe, -xyHe, 0.f}, {xyHe, xyHe, height}};
auto q = zeus::CQuaternion::fromAxisAngle(zeus::CVector3f{0.f, 0.f, 1.f}, zeus::degToRad(129.6f));
x84c_player.reset(new CPlayer(
AllocateUniqueId(), zeus::CTransform(q), pBounds,
g_tweakPlayerRes->xc4_ballTransitionsANCS,
zeus::CVector3f{1.65f, 1.65f, 1.65f}, 200.f, unk1, unk2,
unk3, CMaterialList(EMaterialTypes::Player,
zeus::CVector3f{1.65f, 1.65f, 1.65f}, 200.f, stepUp, stepDown,
ballRadius, CMaterialList(EMaterialTypes::Player,
EMaterialTypes::Solid, EMaterialTypes::GroundCollider)));
AddObject(*x84c_player);
x870_cameraManager->CreateStandardCameras(*this);

View File

@ -241,7 +241,7 @@ void CCameraManager::ThinkCameras(float dt, CStateManager& mgr)
TUniqueId camId = GetLastCameraId();
const CGameCamera* cam = TCastToConstPtr<CGameCamera>(mgr.GetObjectById(camId));
if (cam)
if (cam != nullptr)
x3bc_curFov = cam->GetFov();
}
@ -294,9 +294,9 @@ void CCameraManager::ProcessInput(const CFinalInput& input, CStateManager& state
{
for (CEntity* ent : stateMgr.GetCameraObjectList())
{
if (!ent)
if (ent == nullptr)
continue;
CGameCamera& cam = static_cast<CGameCamera&>(*ent);
auto& cam = static_cast<CGameCamera&>(*ent);
if (input.ControllerIdx() != cam.x16c_controllerIdx)
continue;
cam.ProcessInput(input, stateMgr);
@ -318,4 +318,11 @@ void CCameraManager::LeaveBallCamera(CStateManager& mgr, TUniqueId newCamId)
{
}
float CCameraManager::GetCameraBobMagnitude() const
{
return 1.f - zeus::clamp(-1.f, zeus::clamp(-1.f,
x7c_fpCamera->GetTransform().basis[1].dot(zeus::CVector3f::skUp), 1.f) /
std::cos(2.f * M_PIF / 12.f), 1.f);
}
}

View File

@ -128,6 +128,7 @@ public:
void SetupBallCamera(CStateManager& mgr);
void LeaveBallCamera(CStateManager& mgr, TUniqueId newCamId);
int GetFluidCounter() const { return x74_fluidCounter; }
float GetCameraBobMagnitude() const;
};
}

View File

@ -12,7 +12,7 @@ u16 CFluidPlaneShader::Cache::MakeCacheKey(const SFluidPlaneShaderInfo& info)
switch (info.m_type)
{
case CFluidPlane::EFluidType::NormalWater:
case CFluidPlane::EFluidType::Three:
case CFluidPlane::EFluidType::PhazonFluid:
case CFluidPlane::EFluidType::Four:
if (info.m_hasLightmap)
{
@ -52,7 +52,7 @@ u16 CFluidPlaneShader::Cache::MakeCacheKey(const SFluidPlaneShaderInfo& info)
break;
case CFluidPlane::EFluidType::Five:
case CFluidPlane::EFluidType::ThickLava:
ret |= 3;
if (info.m_hasBumpMap)

View File

@ -207,7 +207,7 @@ static void _BuildShader(std::string& finalVS, std::string& finalFS, int& nextTe
switch (info.m_type)
{
case CFluidPlane::EFluidType::NormalWater:
case CFluidPlane::EFluidType::Three:
case CFluidPlane::EFluidType::PhazonFluid:
case CFluidPlane::EFluidType::Four:
if (info.m_hasLightmap)
{
@ -415,7 +415,7 @@ static void _BuildShader(std::string& finalVS, std::string& finalFS, int& nextTe
break;
case CFluidPlane::EFluidType::Five:
case CFluidPlane::EFluidType::ThickLava:
// 0: Tex0TCG, Tex0, GX_COLOR0A0
// ZERO, TEX, KONST, RAS
// Output reg prev

View File

@ -211,7 +211,7 @@ CFluidPlaneShader::BuildShader(boo::MetalDataFactory::Context& ctx, const SFluid
switch (info.m_type)
{
case CFluidPlane::EFluidType::NormalWater:
case CFluidPlane::EFluidType::Three:
case CFluidPlane::EFluidType::PhazonFluid:
case CFluidPlane::EFluidType::Four:
if (info.m_hasLightmap)
{
@ -419,7 +419,7 @@ CFluidPlaneShader::BuildShader(boo::MetalDataFactory::Context& ctx, const SFluid
break;
case CFluidPlane::EFluidType::Five:
case CFluidPlane::EFluidType::ThickLava:
// 0: Tex0TCG, Tex0, GX_COLOR0A0
// ZERO, TEX, KONST, RAS
// Output reg prev

View File

@ -620,7 +620,7 @@ void CSamusHud::UpdateVisorAndBeamMenus(float dt, const CStateManager& mgr)
CPlayerGun& gun = *player.GetPlayerGun();
CPlayerState& playerState = *mgr.GetPlayerState();
float beamInterp = zeus::clamp(0.f, gun.GetGunMorph().x18_, 1.f);
float beamInterp = zeus::clamp(0.f, gun.GetHoloTransitionFactor(), 1.f);
float visorInterp = playerState.GetVisorTransitionFactor();
if (x2a8_beamMenu)

View File

@ -134,7 +134,7 @@ public:
{
if (this->size() < N)
{
this->push_back(t);
this->insert(this->begin(), t);
}
else
{

View File

@ -68,6 +68,11 @@ float CPlayerGun::GetBeamVelocity() const
return 10.f;
}
void CPlayerGun::Update(float grappleSwingT, float cameraBobT, float dt, CStateManager& mgr)
{
}
void CPlayerGun::PreRender(const CStateManager& mgr, const zeus::CFrustum& frustum, const zeus::CVector3f& camPos)
{
@ -83,4 +88,9 @@ void CPlayerGun::AddToRenderer(const zeus::CFrustum& frustum, const CStateManage
}
TUniqueId CPlayerGun::DropPowerBomb(CStateManager& mgr)
{
return {};
}
}

View File

@ -32,8 +32,12 @@ public:
Inactive,
Active
};
enum class EBWeapon
{
};
private:
struct CGunMorph
class CGunMorph
{
float x0_ = 0.f;
float x4_;
@ -41,7 +45,7 @@ private:
float xc_ = 0.1f;
float x10_;
float x14_ = 2.f;
float x18_ = 1.f;
float x18_transitionFactor = 1.f;
u32 x1c_ = 2;
u32 x20_ = 1;
@ -52,18 +56,25 @@ private:
bool x24_24_ : 1;
bool x24_25_ : 1;
};
u8 _dummy = 0;
u32 _dummy = 0;
};
public:
CGunMorph(float a, float b)
: x4_(a), x10_(std::fabs(b)) {}
float GetTransitionFactor() const { return x18_transitionFactor; }
};
class CMotionState
{
static const float kGunExtendDistance;
};
CActorLights x0_lights;
u32 x2e0_ = 0;
u32 x2e4_ = 0;
u32 x2e8_ = 0;
u32 x2ec_ = 0;
u32 x2ec_firing = 0;
u32 x2f0_ = 0;
u32 x2f4_ = 0;
u32 x2f8_ = 1;
@ -221,6 +232,7 @@ public:
u32 GetSelectedBeam() const { return x310_selectedBeam; }
u32 GetPendingSelectedBeam() const { return x314_pendingSelectedBeam; }
const CGunMorph& GetGunMorph() const { return x678_morph; }
float GetHoloTransitionFactor() const { return x678_morph.GetTransitionFactor(); }
void SetTransform(const zeus::CTransform& xf) { x3e8_xf = xf; }
void SetAssistAimTransform(const zeus::CTransform& xf) { x478_assistAimXf = xf; }
CGrappleArm& GetGrappleArm() { return *x740_grappleArm; }
@ -229,9 +241,12 @@ public:
void ResetIdle(CStateManager& mgr);
void CancelFiring(CStateManager& mgr);
float GetBeamVelocity() const;
void Update(float grappleSwingT, float cameraBobT, float dt, CStateManager& mgr);
void PreRender(const CStateManager& mgr, const zeus::CFrustum& frustum, const zeus::CVector3f& camPos);
void Render(const CStateManager& mgr, const zeus::CVector3f& pos, const CModelFlags& flags) const;
void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const;
bool GetFiring() const { return x2ec_firing != 0; }
TUniqueId DropPowerBomb(CStateManager& mgr);
};
}

View File

@ -45,11 +45,11 @@ float CFluidPlane::CalculateRippleIntensity(float baseI) const
case EFluidType::Lava:
mul = g_tweakGame->GetRippleIntensityLava();
break;
case EFluidType::Three:
case EFluidType::PhazonFluid:
case EFluidType::Four:
mul = 0.8f;
break;
case EFluidType::Five:
case EFluidType::ThickLava:
mul = 1.f;
break;
}

View File

@ -23,9 +23,9 @@ public:
NormalWater,
PoisonWater,
Lava,
Three,
PhazonFluid,
Four,
Five
ThickLava
};
protected:

View File

@ -1310,7 +1310,7 @@ void CFluidPlaneCPU::Render(const CStateManager& mgr, float alpha, const zeus::C
blueShift = 1;
break;
case EFluidType::Lava:
case EFluidType::Five:
case EFluidType::ThickLava:
wavecapIntensityScale = g_tweakGame->GetWavecapIntensityLava();
blueShift = 8;
greenShift = 8;

View File

@ -159,6 +159,7 @@ public:
bool GetX187c() const { return x187c_; }
void SetDamageTimer(float t) { x191c_damageTimer = t; }
void Stop() {}
void StopSounds() {}
CModelData& GetMorphballModelData() const { return *x58_ballModel; }
u32 GetMorphballModelShader() const { return x5c_ballModelShader; }

File diff suppressed because it is too large Load Diff

View File

@ -125,12 +125,12 @@ public:
enum class ESurfaceRestraints
{
Normal,
One,
InAir,
Ice,
MudSlow,
Four,
Fluid2Or5,
Fluid3,
Water,
Lava,
PhazonFluid,
SnakeWeed
};
@ -210,18 +210,18 @@ private:
CPlayerEnergyDrain x274_energyDrain = CPlayerEnergyDrain(4);
float x288_startingJumpTimeout = 0.f;
float x28c_sjTimer = 0.f;
float x290_ = 0.f;
float x290_minJumpTimeout = 0.f;
float x294_jumpCameraPitchTimer = 0.f;
u32 x298_jumpPresses = 0;
float x29c_spaceJumpCameraPitchTimer = 0.f;
float x2a0_ = 0.f;
bool x2a4_cancelCameraPitch = false;
float x2a8_ = 1000.f;
float x2a8_timeSinceJump = 1000.f;
ESurfaceRestraints x2ac_surfaceRestraint = ESurfaceRestraints::Normal;
u32 x2b0_ = 2;
rstl::reserved_vector<float, 6> x2b4_;
u32 x2d0_ = 3;
float x2d4_ = 0.f;
u32 x2b0_outOfWaterTicks = 2;
rstl::reserved_vector<float, 6> x2b4_accelerationTable;
u32 x2d0_curAcceleration = 3;
float x2d4_accelerationChangeTimer = 0.f;
zeus::CAABox x2d8_fpBounds;
float x2f0_ballTransHeight = 0.f;
EPlayerCameraState x2f4_cameraState = EPlayerCameraState::Zero;
@ -246,16 +246,16 @@ private:
bool x374_orbitLockEstablished = false;
float x378_ = 0.f;
bool x37c_sidewaysDashing = false;
float x380_ = 0.f;
float x384_ = 0.f;
float x388_ = 0.f;
bool x38c_ = false;
float x380_strafeInputAtDash = 0.f;
float x384_dashTimer = 0.f;
float x388_dashButtonHoldTime = 0.f;
bool x38c_doneSidewaysDashing = false;
u32 x390_orbitSource = 2;
bool x394_orbitingEnemy = false;
float x398_ = 1.5f;
bool x39c_ = false;
float x3a0_ = 0.5f;
float x3a4_ = 0.449f;
float x398_dashSpeedMultiplier = 1.5f;
bool x39c_noStrafeDashBlend = false;
float x3a0_dashDuration = 0.5f;
float x3a4_strafeDashBlendDuration = 0.449f;
EPlayerScanState x3a8_scanState = EPlayerScanState::NotScanning;
float x3ac_scanningTime = 0.f;
float x3b0_curScanTime = 0.f;
@ -268,8 +268,8 @@ private:
float x3d4_ = 0.f;
float x3d8_grappleJumpTimeout = 0.f;
bool x3dc_inFreeLook = false;
bool x3dd_freeLookPitchAngleCalculated = false;
bool x3de_lookControlHeld = false;
bool x3dd_lookButtonHeld = false;
bool x3de_lookAnalogHeld = false;
float x3e0_curFreeLookCenteredTime = 0.f;
float x3e4_freeLookYawAngle = 0.f;
float x3e8_horizFreeLookAngleVel = 0.f;
@ -285,7 +285,7 @@ private:
EGunHolsterState x498_gunHolsterState = EGunHolsterState::Drawn;
float x49c_gunHolsterRemTime;
std::unique_ptr<CFailsafeTest> x4a0_failsafeTest;
u32 x4a4_ = 0;
TReservedAverage<float, 20> x4a4_;
float x4f8_ = 0.f;
float x4fc_ = 0.f;
zeus::CVector3f x500_ = x34_transform.basis[1];
@ -305,6 +305,7 @@ private:
float x578_morphDuration = 0.f;
u32 x57c_ = 0;
u32 x580_ = 0;
int x584_ = -1;
float x588_alpha = 1.f;
float x58c_ = 0.f;
bool x590_ = true;
@ -312,9 +313,9 @@ private:
TReservedAverage<zeus::CTransform, 4> x658_transitionModelXfs;
TReservedAverage<float, 4> x71c_transitionModelAlphas;
std::vector<std::unique_ptr<CModelData>> x730_transitionModels;
float x740_ = 0.f;
float x744_ = 0.f;
float x748_ = 0.f;
float x740_staticOutTimer = 0.f;
float x744_staticOutSpeed = 0.f;
float x748_staticInSpeed = 0.f;
float x74c_visorStaticAlpha = 1.f;
float x750_frozenTimeout = 0.f;
s32 x754_iceBreakJumps = 0;
@ -326,20 +327,23 @@ private:
std::unique_ptr<CPlayerCameraBob> x76c_cameraBob;
CSfxHandle x770_damageLoopSfx;
float x774_samusVoiceTimeout = 0.f;
u32 x778_ = 0;
CSfxHandle x778_dashSfx;
CSfxHandle x77c_samusVoiceSfx;
int x780_samusVoicePriority = 0;
float x784_ = 0.f;
u16 x788_damageLoopSfxId = 0;
float x78c_footstepSfxTimer = 0.f;
EFootstepSfx x790_footstepSfxSel = EFootstepSfx::None;
zeus::CVector3f x794_;
zeus::CVector3f x794_lastVelocity;
CVisorSteam x7a0_visorSteam = CVisorSteam(0.f, 0.f, 0.f, CAssetId()/*kInvalidAssetId*/);
CAssetId x7cc_;
CAnimRes x7d0_animRes;
zeus::CVector3f x7d8_beamScale;
bool x7e4_ = true;
u32 x7e8_ = 0;
CPlayerState::EBeamId x7ec_beam = CPlayerState::EBeamId::Power;
std::unique_ptr<CModelData> x7f0_ballTransitionBeamModel;
zeus::CTransform x7f4_;
zeus::CTransform x7f4_gunWorldXf;
float x824_ = 0.f;
float x828_waterLevelOnPlayer = 0.f;
bool x82c_inLava = false;
@ -365,7 +369,7 @@ private:
bool x9c5_24_ : 1;
bool x9c5_25_splashUpdated : 1;
bool x9c5_26_ : 1;
bool x9c5_27_ : 1;
bool x9c5_27_camSubmerged : 1;
bool x9c5_28_slidingOnWall : 1;
bool x9c5_29_hitWall : 1;
bool x9c5_30_ : 1;
@ -394,7 +398,7 @@ private:
float x9f4_deathTime = 0.f;
float x9f8_ = 0.f;
float x9fc_ = 0.f;
TUniqueId xa00_ = kInvalidUniqueId;
TUniqueId xa00_deathPowerBomb = kInvalidUniqueId;
float xa04_ = 0.f;
CAssetId xa08_steamTextureId;
CAssetId xa0c_iceTextureId;
@ -406,7 +410,7 @@ private:
float xa24_radarZRadiusOverride = 1.f;
float xa28_ = 0.f;
u32 xa2c_ = 2;
float xa30_ = 4.f;
float xa30_samusExhaustedVoiceTimer = 4.f;
void StartLandingControlFreeze();
void EndLandingControlFreeze();
@ -414,12 +418,17 @@ private:
bool CheckSubmerged() const;
void UpdateSubmerged(CStateManager& mgr);
void InitializeBallTransition();
float UpdateCameraBob(float dt, CStateManager& mgr);
float GetAcceleration() const;
public:
CPlayer(TUniqueId, const zeus::CTransform&, const zeus::CAABox&, CAssetId w1, const zeus::CVector3f&, float, float,
float, float, const CMaterialList&);
bool IsTransparent() const;
void UpdateMorphBallTransition(float dt, CStateManager& mgr);
void UpdateGunAlpha();
void UpdatePlayerSounds();
void Update(float, CStateManager& mgr);
void PostUpdate(float, CStateManager& mgr);
bool StartSamusVoiceSfx(u16 sfx, float vol, int prio);
@ -472,6 +481,14 @@ public:
void Freeze(CStateManager& stateMgr, CAssetId steamTxtr, u16 sfx, CAssetId iceTxtr);
bool GetFrozenState() const;
void UpdateFrozenState(const CFinalInput& input, CStateManager& mgr);
void UpdateStepCameraZBias(float dt);
void UpdateWaterSurfaceCameraBias(CStateManager& mgr);
void UpdatePhazonCameraShake(float dt, CStateManager& mgr);
void UpdatePhazonDamage(float dt, CStateManager& mgr);
void UpdatePlayerHints(CStateManager& mgr);
void UpdateBombJumpStuff();
void UpdateTransitionFilter(float dt, CStateManager& mgr);
void UpdatePlayerControlDirection(float dt, CStateManager& mgr);
void Think(float, CStateManager&);
void PreThink(float, CStateManager&);
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&);
@ -571,7 +588,12 @@ public:
float TurnInput(const CFinalInput& input) const;
float StrafeInput(const CFinalInput& input) const;
float ForwardInput(const CFinalInput& input, float) const;
void ComputeMovement(const CFinalInput& input, CStateManager& mgr, float);
zeus::CVector3f CalculateLeftStickEdgePosition(float strafeInput, float forwardInput) const;
bool SidewaysDashAllowed(float strafeInput, float forwardInput,
const CFinalInput& input, CStateManager& mgr) const;
void FinishSidewaysDash();
void ComputeDash(const CFinalInput& input, float dt, CStateManager& mgr);
void ComputeMovement(const CFinalInput& input, CStateManager& mgr, float dt);
float GetWeight() const;
zeus::CVector3f GetDampedClampedVelocityWR() const;
const CVisorSteam& GetVisorSteam() const { return x7a0_visorSteam; }
@ -604,7 +626,7 @@ public:
float GetMorphTime() const { return x574_morphTime; }
float GetMorphDuration() const { return x578_morphDuration; }
bool IsInFreeLook() const { return x3dc_inFreeLook; }
bool IsLookControlHeld() const { return x3de_lookControlHeld; }
bool IsLookControlHeld() const { return x3de_lookAnalogHeld; }
CPlayerGun* GetPlayerGun() const { return x490_gun.get(); }
CMorphBall* GetMorphBall() const { return x768_morphball.get(); }
CPlayerCameraBob* GetCameraBob() const { return x76c_cameraBob.get(); }

View File

@ -158,7 +158,7 @@ void CPlayerCameraBob::Update(float dt, CStateManager& mgr)
if (std::fabs(x6c_) < 0.0049f && std::fabs(x70_landingTranslation) < 0.0049f && std::fabs(x78_) < 0.0049f)
{
x28_applyLandingTrans = false;
x28_applyLandingTrans = 0.f;
x70_landingTranslation = 0.f;
x78_ = 0.f;
}
@ -171,7 +171,7 @@ void CPlayerCameraBob::Update(float dt, CStateManager& mgr)
x70_landingTranslation *= f1;
x78_ *= f1;
x104_ *= f1;
if (mgr.GetPlayer().x38c_)
if (mgr.GetPlayer().x38c_doneSidewaysDashing)
{
x70_landingTranslation *= 0.2f;
x78_ *= 0.2f;
@ -217,7 +217,7 @@ void CPlayerCameraBob::CalculateMovingTranslation(float& x, float& y) const
else
x = ((fX / xc_)) * (x14_ * x4_vec.x);
float sY = float(std::sin(std::fmod((M_PI * fX) / xc_, M_PI)));
auto sY = float(std::sin(std::fmod((M_PI * fX) / xc_, M_PI)));
y = (1.f - sY) * (x14_ * x4_vec.y) * 0.5f + (0.5f * -((sY * sY) - 1.f) * (x14_ * x4_vec.y));
}
}

View File

@ -27,20 +27,23 @@ CScriptWater::CScriptWater(CStateManager& mgr, TUniqueId uid, const std::string&
float turbFreqMin, float turbPhaseMax, float turbPhaseMin, float turbAmplitudeMax,
float turbAmplitudeMin, const zeus::CColor& splashColor, const zeus::CColor& unkColor,
CAssetId splashParticle1, CAssetId splashParticle2, CAssetId splashParticle3,
CAssetId particle4, CAssetId particle5, s32 unkSfx, s32 visorRunoffSfx, s32 splashSfx1,
s32 splashSfx2, s32 splashSfx3, float tileSize, u32 tileSubdivisions, float specularMin,
float specularMax, float reflectionSize, float rippleIntensity, float reflectionBlend,
float fogBias, float fogMagnitude, float fogSpeed, const zeus::CColor& fogColor,
CAssetId lightmapId, float unitsPerLightmapTexel, float alphaInTime, float alphaOutTime,
u32, u32, bool, s32, s32, std::unique_ptr<u32[]>&& u32Arr)
CAssetId visorRunoffParticle, CAssetId unmorphVisorRunoffparticle, s32 visorRunoffSfx,
s32 unmorphVisorRunoffSfx, s32 splashSfx1, s32 splashSfx2, s32 splashSfx3, float tileSize,
u32 tileSubdivisions, float specularMin, float specularMax, float reflectionSize,
float rippleIntensity, float reflectionBlend, float fogBias, float fogMagnitude,
float fogSpeed, const zeus::CColor& fogColor, CAssetId lightmapId,
float unitsPerLightmapTexel, float alphaInTime, float alphaOutTime, u32, u32, bool, s32,
s32, std::unique_ptr<u32[]>&& u32Arr)
: CScriptTrigger(uid, name, info, pos, box, dInfo, orientedForce, triggerFlags, active, false, false),
x1b8_positionMorphed(pos), x1c4_extentMorphed(box.max - box.min), x1d0_morphInTime(morphInTime), x1d4_positionOrig(pos),
x1e0_extentOrig(box.max - box.min), x1ec_damageOrig(dInfo.GetDamage()), x1f0_damageMorphed(dInfo.GetDamage()),
x1f4_morphOutTime(morphOutTime), x214_fogBias(fogBias), x218_fogMagnitude(fogMagnitude), x21c_origFogBias(fogBias),
x220_origFogMagnitude(fogMagnitude), x224_fogSpeed(fogSpeed), x228_fogColor(fogColor),
x22c_splashParticle1Id(splashParticle1), x230_splashParticle2Id(splashParticle2),
x234_splashParticle3Id(splashParticle3), x238_particle4Id(particle4), x24c_particle5Id(particle5),
x260_unkSfx(CSfxManager::TranslateSFXID(unkSfx)), x262_visorRunoffSfx(CSfxManager::TranslateSFXID(visorRunoffSfx)),
x234_splashParticle3Id(splashParticle3), x238_visorRunoffParticleId(visorRunoffParticle),
x24c_unmorphVisorRunoffParticleId(unmorphVisorRunoffparticle),
x260_visorRunoffSfx(CSfxManager::TranslateSFXID(visorRunoffSfx)),
x262_unmorphVisorRunoffSfx(CSfxManager::TranslateSFXID(unmorphVisorRunoffSfx)),
x2a4_splashColor(splashColor), x2a8_unkColor(unkColor), x2ac_alphaInTime(alphaInTime), x2b0_alphaOutTime(alphaOutTime),
x2b4_alphaInRecip((alphaInTime != 0.f) ? 1.f / alphaInTime : 0.f),
x2b8_alphaOutRecip((alphaOutTime != 0.f) ? 1.f / alphaOutTime : 0.f), x2bc_alpha(alpha), x2c0_tileSize(tileSize)
@ -69,10 +72,10 @@ CScriptWater::CScriptWater(CStateManager& mgr, TUniqueId uid, const std::string&
x264_splashEffects[1].emplace(g_SimplePool->GetObj({FOURCC('PART'), x230_splashParticle2Id}));
if (x234_splashParticle3Id.IsValid())
x264_splashEffects[2].emplace(g_SimplePool->GetObj({FOURCC('PART'), x234_splashParticle3Id}));
if (x238_particle4Id.IsValid())
x23c_.emplace(g_SimplePool->GetObj({FOURCC('PART'), x238_particle4Id}));
if (x24c_particle5Id.IsValid())
x250_visorRunoffEffect.emplace(g_SimplePool->GetObj({FOURCC('PART'), x24c_particle5Id}));
if (x238_visorRunoffParticleId.IsValid())
x23c_visorRunoffEffect.emplace(g_SimplePool->GetObj({FOURCC('PART'), x238_visorRunoffParticleId}));
if (x24c_unmorphVisorRunoffParticleId.IsValid())
x250_unmorphVisorRunoffEffect.emplace(g_SimplePool->GetObj({FOURCC('PART'), x24c_unmorphVisorRunoffParticleId}));
x298_splashSounds.push_back(CSfxManager::TranslateSFXID(splashSfx1));
x298_splashSounds.push_back(CSfxManager::TranslateSFXID(splashSfx2));
x298_splashSounds.push_back(CSfxManager::TranslateSFXID(splashSfx3));

View File

@ -34,12 +34,12 @@ private:
CAssetId x22c_splashParticle1Id;
CAssetId x230_splashParticle2Id;
CAssetId x234_splashParticle3Id;
CAssetId x238_particle4Id;
std::experimental::optional<TLockedToken<CGenDescription>> x23c_;
CAssetId x24c_particle5Id;
std::experimental::optional<TLockedToken<CGenDescription>> x250_visorRunoffEffect;
u16 x260_unkSfx;
u16 x262_visorRunoffSfx;
CAssetId x238_visorRunoffParticleId;
std::experimental::optional<TLockedToken<CGenDescription>> x23c_visorRunoffEffect;
CAssetId x24c_unmorphVisorRunoffParticleId;
std::experimental::optional<TLockedToken<CGenDescription>> x250_unmorphVisorRunoffEffect;
u16 x260_visorRunoffSfx;
u16 x262_unmorphVisorRunoffSfx;
rstl::reserved_vector<std::experimental::optional<TLockedToken<CGenDescription>>, 3> x264_splashEffects;
rstl::reserved_vector<u16, 3> x298_splashSounds;
zeus::CColor x2a4_splashColor;
@ -88,12 +88,12 @@ public:
float turbFreqMin, float turbPhaseMax, float turbPhaseMin, float turbAmplitudeMax,
float turbAmplitudeMin, const zeus::CColor& splashColor, const zeus::CColor& unkColor,
CAssetId splashParticle1, CAssetId splashParticle2, CAssetId splashParticle3,
CAssetId particle4, CAssetId particle5, s32 unkSfx, s32 visorRunoffSfx, s32 splashSfx1,
s32 splashSfx2, s32 splashSfx3, float tileSize, u32 tileSubdivisions, float specularMin,
float specularMax, float reflectionSize, float rippleIntensity, float reflectionBlend,
float fogBias, float fogMagnitude, float fogSpeed, const zeus::CColor& fogColor,
CAssetId lightmapId, float unitsPerLightmapTexel, float alphaInTime, float alphaOutTime,
u32, u32, bool, s32, s32, std::unique_ptr<u32[]>&& u32Arr);
CAssetId visorRunoffParticle, CAssetId unmorphVisorRunoffparticle, s32 visorRunoffSfx,
s32 unmorphVisorRunoffSfx, s32 splashSfx1, s32 splashSfx2, s32 splashSfx3, float tileSize,
u32 tileSubdivisions, float specularMin, float specularMax, float reflectionSize,
float rippleIntensity, float reflectionBlend, float fogBias, float fogMagnitude, float fogSpeed,
const zeus::CColor& fogColor, CAssetId lightmapId, float unitsPerLightmapTexel, float alphaInTime,
float alphaOutTime, u32, u32, bool, s32, s32, std::unique_ptr<u32[]>&& u32Arr);
void Think(float, CStateManager&);
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&);
@ -121,8 +121,11 @@ public:
const zeus::CFrustum& GetFrustumPlanes() const { return x150_frustum; }
CFluidPlaneCPU& GetFluidPlane() const { return *x1b4_fluidPlane; }
const std::experimental::optional<TLockedToken<CGenDescription>>& GetVisorRunoffEffect() const
{ return x250_visorRunoffEffect; }
u16 GetVisorRunoffSfx() const { return x262_visorRunoffSfx; }
{ return x23c_visorRunoffEffect; }
u16 GetVisorRunoffSfx() const { return x260_visorRunoffSfx; }
const std::experimental::optional<TLockedToken<CGenDescription>>& GetUnmorphVisorRunoffEffect() const
{ return x250_unmorphVisorRunoffEffect; }
u16 GetUnmorphVisorRunoffSfx() const { return x262_unmorphVisorRunoffSfx; }
const CScriptWater* GetNextConnectedWater(const CStateManager& mgr) const;
u8 GetPatchRenderFlags(int x, int y) const { return x2e0_patchIntersects[y * x2d0_patchDimX + x]; }
int GetPatchDimensionX() const { return x2d0_patchDimX; }

View File

@ -1238,10 +1238,10 @@ CEntity* ScriptLoader::LoadWater(CStateManager& mgr, CInputStream& in, int propC
CAssetId splashParticle1 = in.readUint32Big();
CAssetId splashParticle2 = in.readUint32Big();
CAssetId splashParticle3 = in.readUint32Big();
CAssetId particle4 = in.readUint32Big();
CAssetId particle5 = in.readUint32Big();
u32 unkSfx = in.readUint32Big();
CAssetId visorRunoffParticle = in.readUint32Big();
CAssetId unmorphVisorRunoffParticle = in.readUint32Big();
u32 visorRunoffSfx = in.readUint32Big();
u32 unmorphVisorRunoffSfx = in.readUint32Big();
u32 splashSfx1 = in.readUint32Big();
u32 splashSfx2 = in.readUint32Big();
u32 splashSfx3 = in.readUint32Big();
@ -1293,10 +1293,11 @@ CEntity* ScriptLoader::LoadWater(CStateManager& mgr, CInputStream& in, int propC
displaySurface, patternMap1, patternMap2, colorMap, bumpMap, envMap, envBumpMap, {}, bumpLightDir, bumpScale,
morphInTime, morphOutTime, active, fluidType, b4, alpha, uvMotion, turbSpeed, turbDistance, turbFreqMax,
turbFreqMin, turbPhaseMax, turbPhaseMin, turbAmplitudeMax, turbAmplitudeMin, splashColor, unkColor,
splashParticle1, splashParticle2, splashParticle3, particle4, particle5, unkSfx, visorRunoffSfx, splashSfx1,
splashSfx2, splashSfx3, tileSize, tileSubdivisions, specularMin, specularMax, reflectionSize, rippleIntensity,
reflectionBlend, fogBias, fogMagnitude, fogSpeed, fogColor, lightmap, unitsPerLightmapTexel, alphaInTime,
alphaOutTime, w21, w22, b5, bitVal0, bitVal1, std::move(bitset));
splashParticle1, splashParticle2, splashParticle3, visorRunoffParticle, unmorphVisorRunoffParticle,
visorRunoffSfx, unmorphVisorRunoffSfx, splashSfx1, splashSfx2, splashSfx3, tileSize, tileSubdivisions,
specularMin, specularMax, reflectionSize, rippleIntensity, reflectionBlend, fogBias, fogMagnitude, fogSpeed,
fogColor, lightmap, unitsPerLightmapTexel, alphaInTime, alphaOutTime, w21, w22, b5, bitVal0, bitVal1,
std::move(bitset));
}
CEntity* ScriptLoader::LoadWarWasp(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info)