mirror of https://github.com/AxioDL/metaforce.git
Runtime/World: Replace bitfield unions with constructor initializers
This commit is contained in:
parent
22880abb7e
commit
bb7e94f304
|
@ -34,27 +34,37 @@ CActor::CActor(TUniqueId uid, bool active, std::string_view name, const CEntityI
|
|||
, x34_transform(xf)
|
||||
, x68_material(MakeActorMaterialList(list, params))
|
||||
, x70_materialFilter(CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Solid}, {0ull}))
|
||||
, xc6_nextDrawNode(otherUid) {
|
||||
, xc6_nextDrawNode(otherUid)
|
||||
, xe4_24_nextNonLoopingSfxHandle(0)
|
||||
, xe4_27_notInSortedLists(true)
|
||||
, xe4_28_transformDirty(true)
|
||||
, xe4_29_actorLightsDirty(true)
|
||||
, xe4_30_outOfFrustum(false)
|
||||
, xe4_31_calculateLighting(true)
|
||||
, xe5_24_shadowEnabled(false)
|
||||
, xe5_25_shadowDirty(false)
|
||||
, xe5_26_muted(false)
|
||||
, xe5_27_useInSortedLists(true)
|
||||
, xe5_28_callTouch(true)
|
||||
, xe5_29_globalTimeProvider(params.x58_24_globalTimeProvider)
|
||||
, xe5_30_renderUnsorted(params.x58_26_renderUnsorted)
|
||||
, xe5_31_pointGeneratorParticles(false)
|
||||
, xe6_24_fluidCounter(0)
|
||||
, xe6_27_thermalVisorFlags(u8(params.x58_25_thermalHeat ? 2 : 1))
|
||||
, xe6_29_renderParticleDBInside(true)
|
||||
, xe6_30_enablePitchBend(false)
|
||||
, xe6_31_targetableVisorFlags(params.GetVisorParameters().GetMask())
|
||||
, xe7_27_enableRender(true)
|
||||
, xe7_28_worldLightingDirty(false)
|
||||
, xe7_29_drawEnabled(active)
|
||||
, xe7_30_doTargetDistanceTest(true)
|
||||
, xe7_31_targetable(true) {
|
||||
x90_actorLights = mData.IsNull() ? nullptr : params.x0_lightParms.MakeActorLights();
|
||||
if (mData.x10_animData || mData.x1c_normalModel)
|
||||
x64_modelData = std::make_unique<CModelData>(std::move(mData));
|
||||
xd0_damageMag = params.x64_thermalMag;
|
||||
xd8_nonLoopingSfxHandles.resize(2);
|
||||
xe4_27_notInSortedLists = true;
|
||||
xe4_28_transformDirty = true;
|
||||
xe4_29_actorLightsDirty = true;
|
||||
xe4_31_calculateLighting = true;
|
||||
xe5_27_useInSortedLists = true;
|
||||
xe5_28_callTouch = true;
|
||||
xe5_29_globalTimeProvider = params.x58_24_globalTimeProvider;
|
||||
xe5_30_renderUnsorted = params.x58_26_renderUnsorted;
|
||||
xe6_27_thermalVisorFlags = u8(params.x58_25_thermalHeat ? 2 : 1);
|
||||
xe6_29_renderParticleDBInside = true;
|
||||
xe6_31_targetableVisorFlags = params.GetVisorParameters().GetMask();
|
||||
xe7_27_enableRender = true;
|
||||
xe7_29_drawEnabled = active;
|
||||
xe7_30_doTargetDistanceTest = true;
|
||||
xe7_31_targetable = true;
|
||||
|
||||
if (x64_modelData) {
|
||||
if (params.x44_xrayAssets.first.IsValid())
|
||||
x64_modelData->SetXRayModel(params.x44_xrayAssets);
|
||||
|
|
|
@ -48,8 +48,6 @@ protected:
|
|||
float xd0_damageMag;
|
||||
float xd4_maxVol = 1.f;
|
||||
rstl::reserved_vector<CSfxHandle, 2> xd8_nonLoopingSfxHandles;
|
||||
union {
|
||||
struct {
|
||||
u8 xe4_24_nextNonLoopingSfxHandle : 3;
|
||||
bool xe4_27_notInSortedLists : 1;
|
||||
bool xe4_28_transformDirty : 1;
|
||||
|
@ -74,9 +72,6 @@ protected:
|
|||
bool xe7_29_drawEnabled : 1;
|
||||
bool xe7_30_doTargetDistanceTest : 1;
|
||||
bool xe7_31_targetable : 1;
|
||||
};
|
||||
u32 dummy = 0;
|
||||
};
|
||||
|
||||
boo::ObjToken<boo::ITextureCubeR> m_reflectionCube;
|
||||
|
||||
|
|
|
@ -25,7 +25,12 @@ static bool IsMediumOrLarge(CActor& act) {
|
|||
}
|
||||
|
||||
CActorModelParticles::CItem::CItem(const CEntity& ent, CActorModelParticles& parent)
|
||||
: x0_id(ent.GetUniqueId()), x4_areaId(ent.GetAreaIdAlways()), xdc_ashy(parent.x48_ashy), x128_parent(parent) {
|
||||
: x0_id(ent.GetUniqueId())
|
||||
, x4_areaId(ent.GetAreaIdAlways())
|
||||
, xdc_ashy(parent.x48_ashy)
|
||||
, x128_parent(parent)
|
||||
, x12c_24_thermalCold(false)
|
||||
, x12c_25_thermalHot(false) {
|
||||
x8_onFireGens.resize(8);
|
||||
}
|
||||
|
||||
|
|
|
@ -56,13 +56,8 @@ public:
|
|||
zeus::CVector3f xec_particleOffsetScale = zeus::skOne3f;
|
||||
zeus::CTransform xf8_iceXf;
|
||||
CActorModelParticles& x128_parent;
|
||||
union {
|
||||
struct {
|
||||
bool x12c_24_thermalCold : 1;
|
||||
bool x12c_25_thermalHot : 1;
|
||||
};
|
||||
u16 _dummy = 0;
|
||||
};
|
||||
float x130_remTime = 10.f;
|
||||
mutable u8 x134_lockDeps = 0;
|
||||
bool UpdateOnFire(float dt, CActor* actor, CStateManager& mgr);
|
||||
|
|
|
@ -18,15 +18,10 @@ class CActorParameters {
|
|||
std::pair<CAssetId, CAssetId> x44_xrayAssets = {};
|
||||
std::pair<CAssetId, CAssetId> x4c_thermalAssets = {};
|
||||
CVisorParameters x54_visorParms;
|
||||
union {
|
||||
struct {
|
||||
bool x58_24_globalTimeProvider : 1;
|
||||
bool x58_25_thermalHeat : 1;
|
||||
bool x58_26_renderUnsorted : 1;
|
||||
bool x58_27_noSortThermal : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
float x5c_fadeInTime = 0.f;
|
||||
float x60_fadeOutTime = 0.f;
|
||||
float x64_thermalMag = 0.f;
|
||||
|
|
|
@ -19,7 +19,9 @@ CAmbientAI::CAmbientAI(TUniqueId uid, std::string_view name, const CEntityInfo&
|
|||
, x2d8_impactRange(impactRange)
|
||||
, x2dc_defaultAnim(GetModelData()->GetAnimationData()->GetDefaultAnimation())
|
||||
, x2e0_alertAnim(alertAnim)
|
||||
, x2e4_impactAnim(impactAnim) {
|
||||
, x2e4_impactAnim(impactAnim)
|
||||
, x2e8_24_dead(false)
|
||||
, x2e8_25_animating(false) {
|
||||
GetModelData()->GetAnimationData()->EnableLooping(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,14 +26,8 @@ class CAmbientAI : public CPhysicsActor {
|
|||
s32 x2dc_defaultAnim;
|
||||
s32 x2e0_alertAnim;
|
||||
s32 x2e4_impactAnim;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x2e8_24_dead : 1;
|
||||
bool x2e8_25_animating : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
|
||||
public:
|
||||
CAmbientAI(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, CModelData&&,
|
||||
|
|
|
@ -10,10 +10,11 @@ CEntity::CEntity(TUniqueId uniqueId, const CEntityInfo& info, bool active, std::
|
|||
, x8_uid(uniqueId)
|
||||
, xc_editorId(info.GetEditorId())
|
||||
, x10_name(name)
|
||||
, x20_conns(info.GetConnectionList()) {
|
||||
x30_24_active = active;
|
||||
x30_27_inUse = x4_areaId != kInvalidAreaId;
|
||||
}
|
||||
, x20_conns(info.GetConnectionList())
|
||||
, x30_24_active(active)
|
||||
, x30_25_inGraveyard(false)
|
||||
, x30_26_scriptingBlocked(false)
|
||||
, x30_27_inUse(x4_areaId != kInvalidAreaId) {}
|
||||
|
||||
void CEntity::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) {
|
||||
switch (msg) {
|
||||
|
|
|
@ -21,16 +21,10 @@ protected:
|
|||
TEditorId xc_editorId;
|
||||
std::string x10_name;
|
||||
std::vector<SConnection> x20_conns;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x30_24_active : 1;
|
||||
bool x30_25_inGraveyard : 1;
|
||||
bool x30_26_scriptingBlocked : 1;
|
||||
bool x30_27_inUse : 1;
|
||||
};
|
||||
u8 _dummy = 0;
|
||||
};
|
||||
|
||||
public:
|
||||
static const std::vector<SConnection> NullConnectionList;
|
||||
|
|
|
@ -46,11 +46,16 @@ CFishCloud::CFishCloud(TUniqueId uid, bool active, std::string_view name, const
|
|||
, x16c_color(color)
|
||||
, x170_weaponKillRadius(weaponKillRadius)
|
||||
, x174_containmentRadius(containmentRadius)
|
||||
, x234_deathSfx(deathSfx != 0xffffffff ? CSfxManager::TranslateSFXID(u16(deathSfx & 0xffff)) : u16(0xffff)) {
|
||||
x250_28_killable = killable;
|
||||
x250_29_repelFromThreats = repelFromThreats;
|
||||
, x234_deathSfx(deathSfx != 0xffffffff ? CSfxManager::TranslateSFXID(u16(deathSfx & 0xffff)) : u16(0xffff))
|
||||
, x250_24_randomMovement(false)
|
||||
, x250_25_worldSpace(true) // The result of a close_enough paradox (weird inlined test?)
|
||||
, x250_26_enableWeaponRepelDamping(false)
|
||||
, x250_27_validModel(false)
|
||||
, x250_28_killable(killable)
|
||||
, x250_29_repelFromThreats(repelFromThreats)
|
||||
, x250_30_enablePlayerRepelDamping(false)
|
||||
, x250_31_updateWithoutPartitions(false) {
|
||||
x108_modifierSources.reserve(10);
|
||||
x250_25_worldSpace = true; // The result of a close_enough paradox (weird inlined test?)
|
||||
if (aRes.GetId().IsValid()) {
|
||||
x1b0_models.emplace_back(std::make_unique<CModelData>(aRes));
|
||||
x1b0_models.emplace_back(std::make_unique<CModelData>(aRes));
|
||||
|
|
|
@ -84,8 +84,6 @@ class CFishCloud : public CActor {
|
|||
u16 x234_deathSfx;
|
||||
zeus::CVector3f x238_partitionPitch;
|
||||
zeus::CVector3f x244_ooPartitionPitch;
|
||||
union {
|
||||
struct {
|
||||
bool x250_24_randomMovement : 1;
|
||||
bool x250_25_worldSpace : 1;
|
||||
bool x250_26_enableWeaponRepelDamping : 1;
|
||||
|
@ -94,9 +92,6 @@ class CFishCloud : public CActor {
|
|||
bool x250_29_repelFromThreats : 1;
|
||||
bool x250_30_enablePlayerRepelDamping : 1;
|
||||
bool x250_31_updateWithoutPartitions : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
|
||||
void UpdateParticles(float dt);
|
||||
void UpdatePartitionList();
|
||||
|
|
|
@ -229,8 +229,6 @@ public:
|
|||
// std::vector<CAramToken> x10f0_tokens;
|
||||
u32 x1100_ = 0;
|
||||
u32 x1104_ = 0;
|
||||
union {
|
||||
struct {
|
||||
bool x1108_24_ : 1;
|
||||
bool x1108_25_modelsConstructed : 1;
|
||||
bool x1108_26_ : 1;
|
||||
|
@ -238,9 +236,6 @@ public:
|
|||
bool x1108_28_occlusionPinged : 1;
|
||||
bool x1108_29_pvsHasActors : 1;
|
||||
bool x1108_30_ : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
std::vector<std::pair<const u8*, u32>> x110c_layerPtrs;
|
||||
float x111c_thermalCurrent = 0.f;
|
||||
float x1120_thermalSpeed = 0.f;
|
||||
|
@ -251,6 +246,15 @@ public:
|
|||
float x1134_weaponWorldLightingSpeed = 0.f;
|
||||
float x1138_weaponWorldLightingTarget = 1.f;
|
||||
u32 x113c_playerActorsLoading = 0;
|
||||
|
||||
CPostConstructed()
|
||||
: x1108_24_(false)
|
||||
, x1108_25_modelsConstructed(false)
|
||||
, x1108_26_(false)
|
||||
, x1108_27_(false)
|
||||
, x1108_28_occlusionPinged(false)
|
||||
, x1108_29_pvsHasActors(false)
|
||||
, x1108_30_(false) {}
|
||||
};
|
||||
|
||||
private:
|
||||
|
|
|
@ -357,15 +357,19 @@ static const CKnockBackController::KnockBackParms KnockBackParmsTable[3][19][4]
|
|||
},
|
||||
};
|
||||
|
||||
CKnockBackController::CKnockBackController(EKnockBackVariant variant) : x0_variant(variant) {
|
||||
x81_24_autoResetImpulse = true;
|
||||
x81_25_enableFreeze = true;
|
||||
x81_27_enableBurn = true;
|
||||
x81_28_enableBurnDeath = true;
|
||||
x81_29_enableExplodeDeath = true;
|
||||
x81_30_enableLaggedBurnDeath = true;
|
||||
x81_31_ = true;
|
||||
x82_24_ = true;
|
||||
CKnockBackController::CKnockBackController(EKnockBackVariant variant)
|
||||
: x0_variant(variant)
|
||||
, x81_24_autoResetImpulse(true)
|
||||
, x81_25_enableFreeze(true)
|
||||
, x81_26_enableShock(false)
|
||||
, x81_27_enableBurn(true)
|
||||
, x81_28_enableBurnDeath(true)
|
||||
, x81_29_enableExplodeDeath(true)
|
||||
, x81_30_enableLaggedBurnDeath(true)
|
||||
, x81_31_(true)
|
||||
, x82_24_(true)
|
||||
, x82_25_inDeferredKnockBack(false)
|
||||
, x82_26_locomotionDuringElectrocution(false) {
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
x24_.push_back(std::make_pair(0.f, FLT_MAX));
|
||||
x80_availableStates.set(i);
|
||||
|
|
|
@ -61,16 +61,16 @@ enum class EKnockBackAnimationFollowUp {
|
|||
class CKnockBackController {
|
||||
public:
|
||||
struct KnockBackParms {
|
||||
EKnockBackAnimationState x0_animState;
|
||||
EKnockBackAnimationFollowUp x4_animFollowup;
|
||||
float x8_followupDuration;
|
||||
float xc_intoFreezeDur;
|
||||
EKnockBackAnimationState x0_animState = EKnockBackAnimationState::None;
|
||||
EKnockBackAnimationFollowUp x4_animFollowup = EKnockBackAnimationFollowUp::None;
|
||||
float x8_followupDuration = 0.f;
|
||||
float xc_intoFreezeDur = 0.f;
|
||||
};
|
||||
|
||||
private:
|
||||
friend class CPatterned;
|
||||
EKnockBackVariant x0_variant;
|
||||
KnockBackParms x4_activeParms;
|
||||
KnockBackParms x4_activeParms{};
|
||||
EWeaponType x14_deferWeaponType = EWeaponType::None;
|
||||
EKnockBackAnimationState x18_minAnimState = EKnockBackAnimationState::None;
|
||||
EKnockBackAnimationState x1c_maxAnimState = EKnockBackAnimationState::Fall;
|
||||
|
@ -86,8 +86,6 @@ private:
|
|||
u32 x74_ = 0;
|
||||
pas::ESeverity x7c_severity = pas::ESeverity::One;
|
||||
std::bitset<5> x80_availableStates;
|
||||
union {
|
||||
struct {
|
||||
bool x81_24_autoResetImpulse : 1; // t
|
||||
bool x81_25_enableFreeze : 1; // t
|
||||
bool x81_26_enableShock : 1;
|
||||
|
@ -99,9 +97,6 @@ private:
|
|||
bool x82_24_ : 1; // t
|
||||
bool x82_25_inDeferredKnockBack : 1;
|
||||
bool x82_26_locomotionDuringElectrocution : 1;
|
||||
};
|
||||
u32 dummy = 0;
|
||||
};
|
||||
void ApplyImpulse(float dt, CPatterned& parent);
|
||||
bool TickDeferredTimer(float dt);
|
||||
EKnockBackCharacterState GetKnockBackCharacterState(CPatterned& parent);
|
||||
|
|
|
@ -47,6 +47,15 @@ CPatterned::CPatterned(ECharacter character, TUniqueId uid, std::string_view nam
|
|||
, x300_maxAttackRange(pInfo.x1c_maxAttackRange)
|
||||
, x304_averageAttackTime(pInfo.x20_averageAttackTime)
|
||||
, x308_attackTimeVariation(pInfo.x24_attackTimeVariation)
|
||||
, x328_24_inPosition(false)
|
||||
, x328_25_verticalMovement(moveType == EMovementType::Flyer)
|
||||
, x328_26_solidCollision(false)
|
||||
, x328_27_onGround(moveType != EMovementType::Flyer)
|
||||
, x328_28_prevOnGround(true)
|
||||
, x328_29_noPatternShagging(false)
|
||||
, x328_30_lookAtDeathDir(true)
|
||||
, x328_31_energyAttractor(false)
|
||||
, x329_24_(true)
|
||||
, x34c_character(character)
|
||||
, x388_anim(pInfo.GetAnimationParameters().GetInitialAnimation())
|
||||
, x3b4_speed(pInfo.x4_speed)
|
||||
|
@ -61,18 +70,33 @@ CPatterned::CPatterned(ECharacter character, TUniqueId uid, std::string_view nam
|
|||
, x3dc_frozenXDamageThreshold(pInfo.xe0_frozenXDamage)
|
||||
, x3e0_xDamageDelay(pInfo.xe4_xDamageDelay)
|
||||
, x3fc_flavor(flavor)
|
||||
, x400_24_hitByPlayerProjectile(false)
|
||||
, x400_25_alive(true)
|
||||
, x400_26_(false)
|
||||
, x400_27_fadeToDeath(false)
|
||||
, x400_28_pendingMassiveDeath(false)
|
||||
, x400_29_pendingMassiveFrozenDeath(false)
|
||||
, x400_30_patternShagged(false)
|
||||
, x400_31_isFlyer(moveType == CPatterned::EMovementType::Flyer)
|
||||
, x401_24_pathOverCount(0)
|
||||
, x401_26_disableMove(false)
|
||||
, x401_27_phazingOut(false)
|
||||
, x401_28_burning(false)
|
||||
, x401_29_laggedBurnDeath(false)
|
||||
, x401_30_pendingDeath(false)
|
||||
, x401_31_nextPendingShock(false)
|
||||
, x402_24_pendingShock(false)
|
||||
, x402_25_lostMassiveFrozenHP(false)
|
||||
, x402_26_dieIf80PercFrozen(false)
|
||||
, x402_27_noXrayModel(false)
|
||||
, x402_28_isMakingBigStrike(false)
|
||||
, x402_29_drawParticles(true)
|
||||
, x402_30_updateThermalFrozenState(x402_31_thawed = actorParms.HasThermalHeat())
|
||||
, x402_31_thawed(false)
|
||||
, x403_24_keepThermalVisorState(false)
|
||||
, x403_25_enableStateMachine(true) // t
|
||||
, x403_26_stateControlledMassiveDeath(true)
|
||||
, x460_knockBackController(kbVariant) {
|
||||
x328_25_verticalMovement = moveType == EMovementType::Flyer;
|
||||
x328_27_onGround = moveType != EMovementType::Flyer;
|
||||
x328_28_prevOnGround = true;
|
||||
x328_30_lookAtDeathDir = true;
|
||||
x329_24_ = true;
|
||||
x400_25_alive = true;
|
||||
x400_31_isFlyer = moveType == CPatterned::EMovementType::Flyer;
|
||||
x402_29_drawParticles = true;
|
||||
x402_30_updateThermalFrozenState = x402_31_thawed = actorParms.HasThermalHeat();
|
||||
x403_25_enableStateMachine = true;
|
||||
x403_26_stateControlledMassiveDeath = true;
|
||||
x404_contactDamage = pInfo.x34_contactDamageInfo;
|
||||
x424_damageWaitTime = pInfo.x50_damageWaitTime;
|
||||
x454_deathSfx = pInfo.xe8_deathSfx;
|
||||
|
|
|
@ -125,8 +125,6 @@ protected:
|
|||
EBehaviourOrient x30c_behaviourOrient = EBehaviourOrient::MoveDir;
|
||||
zeus::CVector3f x310_moveVec;
|
||||
zeus::CVector3f x31c_faceVec;
|
||||
union {
|
||||
struct {
|
||||
bool x328_24_inPosition : 1;
|
||||
bool x328_25_verticalMovement : 1;
|
||||
bool x328_26_solidCollision : 1;
|
||||
|
@ -136,10 +134,6 @@ protected:
|
|||
bool x328_30_lookAtDeathDir : 1;
|
||||
bool x328_31_energyAttractor : 1;
|
||||
bool x329_24_ : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
|
||||
EAnimState x32c_animState = EAnimState::NotReady;
|
||||
CStateMachineState x330_stateMachineState;
|
||||
ECharacter x34c_character;
|
||||
|
@ -176,9 +170,6 @@ protected:
|
|||
float x3f4_burnThinkRateTimer = 0.f;
|
||||
EMoveState x3f8_moveState = EMoveState::Zero;
|
||||
EFlavorType x3fc_flavor;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x400_24_hitByPlayerProjectile : 1;
|
||||
bool x400_25_alive : 1; // t
|
||||
bool x400_26_ : 1;
|
||||
|
@ -205,10 +196,6 @@ protected:
|
|||
bool x403_24_keepThermalVisorState : 1;
|
||||
bool x403_25_enableStateMachine : 1; // t
|
||||
bool x403_26_stateControlledMassiveDeath : 1; // t
|
||||
};
|
||||
u32 _dummy2 = 0;
|
||||
};
|
||||
|
||||
CDamageInfo x404_contactDamage;
|
||||
float x420_curDamageRemTime = 0.f;
|
||||
float x424_damageWaitTime;
|
||||
|
|
|
@ -221,17 +221,39 @@ CPlayer::CPlayer(TUniqueId uid, const zeus::CTransform& xf, const zeus::CAABox&
|
|||
stepDown)
|
||||
, x2d8_fpBounds(aabb)
|
||||
, x7d0_animRes(resId, 0, playerScale, 0, true)
|
||||
, x7d8_beamScale(playerScale) {
|
||||
, x7d8_beamScale(playerScale)
|
||||
, x9c4_24_visorChangeRequested(false)
|
||||
, x9c4_25_showCrosshairs(false)
|
||||
, x9c4_26_(true)
|
||||
, x9c4_27_canEnterMorphBall(true)
|
||||
, x9c4_28_canLeaveMorphBall(true)
|
||||
, x9c4_29_spiderBallControlXY(false)
|
||||
, x9c4_30_controlDirOverride(false)
|
||||
, x9c4_31_inWaterMovement(false)
|
||||
, x9c5_24_(false)
|
||||
, x9c5_25_splashUpdated(false)
|
||||
, x9c5_26_(false)
|
||||
, x9c5_27_camSubmerged(false)
|
||||
, x9c5_28_slidingOnWall(false)
|
||||
, x9c5_29_hitWall(false)
|
||||
, x9c5_30_selectFluidBallSound(false)
|
||||
, x9c5_31_stepCameraZBiasDirty(true)
|
||||
, x9c6_24_extendTargetDistance(false)
|
||||
, x9c6_25_interpolatingControlDir(false)
|
||||
, x9c6_26_outOfBallLookAtHint(false)
|
||||
, x9c6_27_aimingAtProjectile(false)
|
||||
, x9c6_28_aligningGrappleSwingTurn(false)
|
||||
, x9c6_29_disableInput(false)
|
||||
, x9c6_30_newScanScanning(false)
|
||||
, x9c6_31_overrideRadarRadius(false)
|
||||
, x9c7_24_noDamageLoopSfx(false)
|
||||
, x9c7_25_outOfBallLookAtHintActor(false) {
|
||||
x490_gun = std::make_unique<CPlayerGun>(uid);
|
||||
x49c_gunHolsterRemTime = g_tweakPlayerGun->GetGunNotFiringTime();
|
||||
x4a0_failsafeTest = std::make_unique<CFailsafeTest>();
|
||||
x76c_cameraBob =
|
||||
std::make_unique<CPlayerCameraBob>(CPlayerCameraBob::ECameraBobType::One, CPlayerCameraBob::GetCameraBobExtent(),
|
||||
CPlayerCameraBob::GetCameraBobPeriod());
|
||||
x9c4_26_ = true;
|
||||
x9c4_27_canEnterMorphBall = true;
|
||||
x9c4_28_canLeaveMorphBall = true;
|
||||
x9c5_31_stepCameraZBiasDirty = true;
|
||||
const CAssetId beamId = g_tweakPlayerRes->GetBeamBallTransitionModel(x7ec_beam);
|
||||
x7f0_ballTransitionBeamModel = std::make_unique<CModelData>(CStaticRes(beamId, playerScale));
|
||||
x730_transitionModels.reserve(3);
|
||||
|
|
|
@ -285,9 +285,6 @@ private:
|
|||
rstl::reserved_vector<std::pair<u32, TUniqueId>, 32> x838_playerHints;
|
||||
rstl::reserved_vector<TUniqueId, 32> x93c_playerHintsToRemove;
|
||||
rstl::reserved_vector<TUniqueId, 32> x980_playerHintsToAdd;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x9c4_24_visorChangeRequested : 1;
|
||||
bool x9c4_25_showCrosshairs : 1;
|
||||
bool x9c4_26_ : 1;
|
||||
|
@ -314,10 +311,6 @@ private:
|
|||
bool x9c6_31_overrideRadarRadius : 1;
|
||||
bool x9c7_24_noDamageLoopSfx : 1;
|
||||
bool x9c7_25_outOfBallLookAtHintActor : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
|
||||
float x9c8_eyeZBias = 0.f;
|
||||
float x9cc_stepCameraZBias = 0.f;
|
||||
u32 x9d0_bombJumpCount = 0;
|
||||
|
|
|
@ -15,14 +15,13 @@ CScriptActorKeyframe::CScriptActorKeyframe(TUniqueId uid, std::string_view name,
|
|||
, x34_animationId(animId)
|
||||
, x38_initialLifetime(lifetime)
|
||||
, x3c_playbackRate(totalPlayback)
|
||||
, x40_lifetime(lifetime) {
|
||||
x44_24_looping = looping;
|
||||
x44_25_isPassive = isPassive;
|
||||
x44_26_fadeOut = fadeOut;
|
||||
x44_27_timedLoop = fadeOut;
|
||||
x44_28_playing = false;
|
||||
x44_29_ = false;
|
||||
}
|
||||
, x40_lifetime(lifetime)
|
||||
, x44_24_looping(looping)
|
||||
, x44_25_isPassive(isPassive)
|
||||
, x44_26_fadeOut(fadeOut != 0u)
|
||||
, x44_27_timedLoop(fadeOut != 0u)
|
||||
, x44_28_playing(false)
|
||||
, x44_29_(false) {}
|
||||
|
||||
void CScriptActorKeyframe::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||
|
||||
|
|
|
@ -12,17 +12,12 @@ private:
|
|||
float x38_initialLifetime;
|
||||
float x3c_playbackRate;
|
||||
float x40_lifetime;
|
||||
union {
|
||||
struct {
|
||||
bool x44_24_looping : 1;
|
||||
bool x44_25_isPassive : 1;
|
||||
bool x44_26_fadeOut : 1;
|
||||
bool x44_27_timedLoop : 1;
|
||||
bool x44_28_playing : 1;
|
||||
bool x44_29_ : 1;
|
||||
};
|
||||
u8 _dummy = 0;
|
||||
};
|
||||
|
||||
public:
|
||||
CScriptActorKeyframe(TUniqueId uid, std::string_view name, const CEntityInfo& info, s32 animId, bool looping,
|
||||
|
|
|
@ -18,16 +18,10 @@ class CScriptActorRotate : public CEntity {
|
|||
float x40_maxTime;
|
||||
float x44_currentTime = 0.f;
|
||||
std::map<TUniqueId, zeus::CTransform> x48_actors;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x58_24_updateRotation : 1;
|
||||
bool x58_25_skipSpiderBallWaypoints : 1;
|
||||
bool x58_26_updateActors : 1;
|
||||
bool x58_27_updateOnCreation : 1;
|
||||
};
|
||||
u32 dummy = 0;
|
||||
};
|
||||
|
||||
void UpdateActors(bool, CStateManager&);
|
||||
void UpdateSpiderBallWaypoints(CStateManager&);
|
||||
|
|
|
@ -12,7 +12,8 @@ CScriptAiJumpPoint::CScriptAiJumpPoint(TUniqueId uid, std::string_view name, con
|
|||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::NoStepLogic),
|
||||
CActorParameters::None(), kInvalidUniqueId)
|
||||
, xe8_apex(apex)
|
||||
, xec_touchBounds(xf.origin, xf.origin) {}
|
||||
, xec_touchBounds(xf.origin, xf.origin)
|
||||
, x108_24(false) {}
|
||||
|
||||
void CScriptAiJumpPoint::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||
|
||||
|
|
|
@ -12,12 +12,7 @@ class CScriptAiJumpPoint : public CActor {
|
|||
private:
|
||||
float xe8_apex;
|
||||
zeus::CAABox xec_touchBounds;
|
||||
union {
|
||||
struct {
|
||||
bool x108_24 : 1;
|
||||
};
|
||||
u8 dummy = 0;
|
||||
};
|
||||
TUniqueId x10a_occupant = kInvalidUniqueId;
|
||||
TUniqueId x10c_currentWaypoint = kInvalidUniqueId;
|
||||
TUniqueId x10e_nextWaypoint = kInvalidUniqueId;
|
||||
|
|
|
@ -14,10 +14,11 @@ CScriptCameraHintTrigger::CScriptCameraHintTrigger(TUniqueId uid, bool active, s
|
|||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Trigger),
|
||||
CActorParameters::None(), kInvalidUniqueId)
|
||||
, xe8_obb(xf, scale)
|
||||
, x124_scale(scale) {
|
||||
x130_24_deactivateOnEnter = deactivateOnEnter;
|
||||
x130_25_deactivateOnExit = deactivateOnExit;
|
||||
}
|
||||
, x124_scale(scale)
|
||||
, x130_24_deactivateOnEnter(deactivateOnEnter)
|
||||
, x130_25_deactivateOnExit(deactivateOnExit)
|
||||
, x130_26_playerInside(false)
|
||||
, x130_27_playerWasInside(false) {}
|
||||
|
||||
void CScriptCameraHintTrigger::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||
|
||||
|
|
|
@ -12,15 +12,10 @@ namespace urde {
|
|||
class CScriptCameraHintTrigger : public CActor {
|
||||
zeus::COBBox xe8_obb;
|
||||
zeus::CVector3f x124_scale;
|
||||
union {
|
||||
struct {
|
||||
bool x130_24_deactivateOnEnter : 1;
|
||||
bool x130_25_deactivateOnExit : 1;
|
||||
bool x130_26_playerInside : 1;
|
||||
bool x130_27_playerWasInside : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
|
||||
public:
|
||||
CScriptCameraHintTrigger(TUniqueId uid, bool active, std::string_view name,
|
||||
|
|
|
@ -22,7 +22,9 @@ CScriptCameraPitchVolume::CScriptCameraPitchVolume(TUniqueId uid, bool active, s
|
|||
, x124_upPitch(upPitch)
|
||||
, x128_downPitch(downPitch)
|
||||
, x12c_scale(scale * skScaleFactor)
|
||||
, x138_maxInterpDistance(maxInterpDistance) {}
|
||||
, x138_maxInterpDistance(maxInterpDistance)
|
||||
, x13c_24_entered(false)
|
||||
, x13c_25_occupied(false) {}
|
||||
|
||||
void CScriptCameraPitchVolume::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||
|
||||
|
|
|
@ -17,14 +17,8 @@ class CScriptCameraPitchVolume : public CActor {
|
|||
zeus::CRelAngle x128_downPitch;
|
||||
zeus::CVector3f x12c_scale;
|
||||
float x138_maxInterpDistance;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x13c_24_entered : 1;
|
||||
bool x13c_25_occupied : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
|
||||
public:
|
||||
CScriptCameraPitchVolume(TUniqueId, bool, std::string_view, const CEntityInfo&, const zeus::CVector3f&,
|
||||
|
|
|
@ -15,17 +15,16 @@ CScriptColorModulate::CScriptColorModulate(TUniqueId uid, std::string_view name,
|
|||
, x44_colorB(colorB)
|
||||
, x48_blendMode(blendMode)
|
||||
, x4c_timeA2B(timeA2B)
|
||||
, x50_timeB2A(timeB2A) {
|
||||
x54_24_doReverse = doReverse;
|
||||
x54_25_resetTargetWhenDone = resetTargetWhenDone;
|
||||
x54_26_depthCompare = depthCompare;
|
||||
x54_27_depthUpdate = depthUpdate;
|
||||
x54_28_depthBackwards = depthBackwards;
|
||||
x54_29_reversing = false;
|
||||
x54_30_enable = false;
|
||||
x54_31_dieOnEnd = false;
|
||||
x55_24_isFadeOutHelper = false;
|
||||
}
|
||||
, x50_timeB2A(timeB2A)
|
||||
, x54_24_doReverse(doReverse)
|
||||
, x54_25_resetTargetWhenDone(resetTargetWhenDone)
|
||||
, x54_26_depthCompare(depthCompare)
|
||||
, x54_27_depthUpdate(depthUpdate)
|
||||
, x54_28_depthBackwards(depthBackwards)
|
||||
, x54_29_reversing(false)
|
||||
, x54_30_enable(false)
|
||||
, x54_31_dieOnEnd(false)
|
||||
, x55_24_isFadeOutHelper(false) {}
|
||||
|
||||
void CScriptColorModulate::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||
|
||||
|
|
|
@ -30,8 +30,6 @@ private:
|
|||
EBlendMode x48_blendMode;
|
||||
float x4c_timeA2B;
|
||||
float x50_timeB2A;
|
||||
union {
|
||||
struct {
|
||||
bool x54_24_doReverse : 1;
|
||||
bool x54_25_resetTargetWhenDone : 1;
|
||||
bool x54_26_depthCompare : 1;
|
||||
|
@ -41,9 +39,6 @@ private:
|
|||
bool x54_30_enable : 1;
|
||||
bool x54_31_dieOnEnd : 1;
|
||||
bool x55_24_isFadeOutHelper : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
|
||||
public:
|
||||
CScriptColorModulate(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CColor& colorA,
|
||||
|
|
|
@ -10,10 +10,12 @@ namespace urde {
|
|||
CScriptControllerAction::CScriptControllerAction(TUniqueId uid, std::string_view name, const CEntityInfo& info,
|
||||
bool active, ControlMapper::ECommands command, bool mapScreenResponse,
|
||||
u32 w1, bool deactivateOnClose)
|
||||
: CEntity(uid, info, active, name), x34_command(command), x38_mapScreenSubaction(w1) {
|
||||
x3c_24_mapScreenResponse = mapScreenResponse;
|
||||
x3c_25_deactivateOnClose = deactivateOnClose;
|
||||
}
|
||||
: CEntity(uid, info, active, name)
|
||||
, x34_command(command)
|
||||
, x38_mapScreenSubaction(w1)
|
||||
, x3c_24_mapScreenResponse(mapScreenResponse)
|
||||
, x3c_25_deactivateOnClose(deactivateOnClose)
|
||||
, x3c_26_pressed(false) {}
|
||||
|
||||
void CScriptControllerAction::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||
|
||||
|
|
|
@ -11,14 +11,9 @@ namespace urde {
|
|||
class CScriptControllerAction : public CEntity {
|
||||
ControlMapper::ECommands x34_command;
|
||||
u32 x38_mapScreenSubaction;
|
||||
union {
|
||||
struct {
|
||||
bool x3c_24_mapScreenResponse : 1;
|
||||
bool x3c_25_deactivateOnClose : 1;
|
||||
bool x3c_26_pressed : 1;
|
||||
};
|
||||
u8 _dummy = 0;
|
||||
};
|
||||
|
||||
public:
|
||||
CScriptControllerAction(TUniqueId uid, std::string_view name, const CEntityInfo& info, bool active,
|
||||
|
|
|
@ -11,9 +11,12 @@ CScriptCoverPoint::CScriptCoverPoint(TUniqueId uid, std::string_view name, const
|
|||
float coverTime)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::NoStepLogic),
|
||||
CActorParameters::None(), kInvalidUniqueId)
|
||||
, xe8_flags(flags)
|
||||
, xf4_coverTime(coverTime) {
|
||||
xf8_24_crouch = crouch;
|
||||
, xe8_26_landHere((flags & 0x20) != 0u)
|
||||
, xe8_27_wallHang((flags & 0x10) != 0u)
|
||||
, xe8_28_stay((flags & 0x8) != 0u)
|
||||
, xf4_coverTime(coverTime)
|
||||
, xf8_24_crouch(crouch)
|
||||
, xf8_25_inUse(false) {
|
||||
xec_cosHorizontalAngle = std::cos(zeus::degToRad(horizontalAngle) * 0.5f);
|
||||
xf0_sinVerticalAngle = std::sin(zeus::degToRad(verticalAngle) * 0.5f);
|
||||
x100_touchBounds.emplace(xf.origin, xf.origin);
|
||||
|
|
|
@ -10,25 +10,14 @@
|
|||
|
||||
namespace urde {
|
||||
class CScriptCoverPoint : public CActor {
|
||||
union {
|
||||
struct {
|
||||
bool xe8_26_landHere : 1;
|
||||
bool xe8_27_wallHang : 1;
|
||||
bool xe8_28_stay : 1;
|
||||
};
|
||||
u32 xe8_flags;
|
||||
};
|
||||
|
||||
float xec_cosHorizontalAngle;
|
||||
float xf0_sinVerticalAngle;
|
||||
float xf4_coverTime;
|
||||
union {
|
||||
struct {
|
||||
bool xf8_24_crouch : 1;
|
||||
bool xf8_25_inUse : 1;
|
||||
};
|
||||
u32 xf8_flags = 0;
|
||||
};
|
||||
TUniqueId xfa_occupant = kInvalidUniqueId;
|
||||
TUniqueId xfc_retreating = kInvalidUniqueId;
|
||||
std::optional<zeus::CAABox> x100_touchBounds;
|
||||
|
|
|
@ -36,8 +36,12 @@ CScriptDamageableTrigger::CScriptDamageableTrigger(TUniqueId uid, std::string_vi
|
|||
, x16c_hInfo(hInfo)
|
||||
, x174_dVuln(dVuln)
|
||||
, x1dc_faceFlag(faceFlag)
|
||||
, x254_fluidPlane(patternTex1, patternTex2, colorTex, 1.f, 2, EFluidType::NormalWater, 1.f, CFluidUVMotion(6.f, 0.f)) {
|
||||
x300_28_canOrbit = canOrbit == ECanOrbit::Orbit;
|
||||
, x254_fluidPlane(patternTex1, patternTex2, colorTex, 1.f, 2, EFluidType::NormalWater, 1.f, CFluidUVMotion(6.f, 0.f))
|
||||
, x300_24_notOccluded(false)
|
||||
, x300_25_alphaOut(false)
|
||||
, x300_26_outOfFrustum(false)
|
||||
, x300_27_invulnerable(false)
|
||||
, x300_28_canOrbit(canOrbit == ECanOrbit::Orbit) {
|
||||
if (x1dc_faceFlag & 0x1) {
|
||||
x244_faceTranslate = zeus::CVector3f(0.f, x14c_bounds.max.y(), 0.f);
|
||||
x1e4_faceDir = zeus::CTransform::RotateX(-M_PIF / 2.f);
|
||||
|
|
|
@ -30,16 +30,12 @@ private:
|
|||
zeus::CVector3f x244_faceTranslate;
|
||||
float x250_alphaTimer = 0.f;
|
||||
CFluidPlaneDoor x254_fluidPlane;
|
||||
union {
|
||||
struct {
|
||||
bool x300_24_notOccluded : 1;
|
||||
bool x300_25_alphaOut : 1;
|
||||
bool x300_26_outOfFrustum : 1;
|
||||
bool x300_27_invulnerable : 1;
|
||||
bool x300_28_canOrbit : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
|
||||
void SetLinkedObjectAlpha(float a, CStateManager& mgr);
|
||||
float GetPuddleAlphaScale() const;
|
||||
|
||||
|
|
|
@ -27,9 +27,17 @@ CScriptDebris::CScriptDebris(TUniqueId uid, std::string_view name, const CEntity
|
|||
, x278_ooDuration(1.f / x274_duration)
|
||||
, x27c_restitution(restitution)
|
||||
, x280_scaleType(scaleType)
|
||||
, x281_24_randomAngImpulse(randomAngImpulse)
|
||||
, x281_25_particle1GlobalTranslation(false)
|
||||
, x281_26_deferDeleteTillParticle1Done(false)
|
||||
, x281_27_particle2GlobalTranslation(false)
|
||||
, x281_28_deferDeleteTillParticle2Done(false)
|
||||
, x281_29_particle3Active(false)
|
||||
, x281_30_debrisExtended(false)
|
||||
, x281_31_dieOnProjectile(false)
|
||||
, x282_24_noBounce(false)
|
||||
, x2b0_scale(mData.GetScale())
|
||||
, x2e0_speedAvg(2.f) {
|
||||
x281_24_randomAngImpulse = randomAngImpulse;
|
||||
if (scaleType == EScaleType::NoScale)
|
||||
x2bc_endScale = mData.GetScale();
|
||||
else if (scaleType == EScaleType::EndsToZero)
|
||||
|
@ -80,6 +88,15 @@ CScriptDebris::CScriptDebris(TUniqueId uid, std::string_view name, const CEntity
|
|||
, x264_color(color)
|
||||
, x268_endsColor(endsColor)
|
||||
, x27c_restitution(restitution)
|
||||
, x281_24_randomAngImpulse(false)
|
||||
, x281_25_particle1GlobalTranslation(particle1GlobalTranslation)
|
||||
, x281_26_deferDeleteTillParticle1Done(deferDeleteTillParticle1Done)
|
||||
, x281_27_particle2GlobalTranslation(particle2GlobalTranslation)
|
||||
, x281_28_deferDeleteTillParticle2Done(deferDeleteTillParticle2Done)
|
||||
, x281_29_particle3Active(false)
|
||||
, x281_30_debrisExtended(true)
|
||||
, x281_31_dieOnProjectile(false)
|
||||
, x282_24_noBounce(noBounce)
|
||||
, x288_linConeAngle(linConeAngle)
|
||||
, x28c_linMinMag(linMinMag)
|
||||
, x290_linMaxMag(linMaxMag)
|
||||
|
@ -93,13 +110,6 @@ CScriptDebris::CScriptDebris(TUniqueId uid, std::string_view name, const CEntity
|
|||
, x2b0_scale(scale)
|
||||
, x2bc_endScale(scale * endScale)
|
||||
, x2e0_speedAvg(2.f) {
|
||||
x281_25_particle1GlobalTranslation = particle1GlobalTranslation;
|
||||
x281_26_deferDeleteTillParticle1Done = deferDeleteTillParticle1Done;
|
||||
x281_27_particle2GlobalTranslation = particle2GlobalTranslation;
|
||||
x281_28_deferDeleteTillParticle2Done = deferDeleteTillParticle2Done;
|
||||
x281_30_debrisExtended = true;
|
||||
x281_31_dieOnProjectile = dieOnProjectile;
|
||||
x282_24_noBounce = noBounce;
|
||||
x283_particleOrs[0] = particle1Or;
|
||||
x283_particleOrs[1] = particle2Or;
|
||||
x283_particleOrs[2] = particle3Or;
|
||||
|
|
|
@ -27,8 +27,6 @@ private:
|
|||
float x278_ooDuration = 0.f;
|
||||
float x27c_restitution;
|
||||
CScriptDebris::EScaleType x280_scaleType = CScriptDebris::EScaleType::NoScale;
|
||||
union {
|
||||
struct {
|
||||
bool x281_24_randomAngImpulse : 1;
|
||||
bool x281_25_particle1GlobalTranslation : 1;
|
||||
bool x281_26_deferDeleteTillParticle1Done : 1;
|
||||
|
@ -38,9 +36,6 @@ private:
|
|||
bool x281_30_debrisExtended : 1;
|
||||
bool x281_31_dieOnProjectile : 1;
|
||||
bool x282_24_noBounce : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
EOrientationType x283_particleOrs[3] = {};
|
||||
float x288_linConeAngle = 0.f;
|
||||
float x28c_linMinMag = 0.f;
|
||||
|
|
|
@ -23,14 +23,15 @@ CMaterialList MakeDockMaterialList() {
|
|||
CScriptDock::CScriptDock(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CVector3f& position,
|
||||
const zeus::CVector3f& extents, s32 dock, TAreaId area, bool active, s32 dockReferenceCount,
|
||||
bool loadConnected)
|
||||
: CPhysicsActor(uid, active, name, info, zeus::CTransform(zeus::CMatrix3f(), position),
|
||||
CModelData::CModelDataNull(), MakeDockMaterialList(), zeus::CAABox(-extents * 0.5f, extents * 0.5f),
|
||||
SMoverData(1.f), CActorParameters::None(), 0.3f, 0.1f)
|
||||
: CPhysicsActor(uid, active, name, info, zeus::CTransform(zeus::CMatrix3f(), position), CModelData::CModelDataNull(),
|
||||
MakeDockMaterialList(), zeus::CAABox(-extents * 0.5f, extents * 0.5f), SMoverData(1.f),
|
||||
CActorParameters::None(), 0.3f, 0.1f)
|
||||
, x258_dockReferenceCount(dockReferenceCount)
|
||||
, x25c_dock(dock)
|
||||
, x260_area(area) {
|
||||
x268_25_loadConnected = loadConnected;
|
||||
}
|
||||
, x260_area(area)
|
||||
, x268_24_dockReferenced(false)
|
||||
, x268_25_loadConnected(loadConnected)
|
||||
, x268_26_areaPostConstructed(false) {}
|
||||
|
||||
void CScriptDock::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||
|
||||
|
|
|
@ -15,14 +15,9 @@ class CScriptDock : public CPhysicsActor {
|
|||
s32 x25c_dock;
|
||||
TAreaId x260_area;
|
||||
EDockState x264_dockState = EDockState::Three;
|
||||
union {
|
||||
struct {
|
||||
bool x268_24_dockReferenced : 1;
|
||||
bool x268_25_loadConnected : 1;
|
||||
bool x268_26_areaPostConstructed : 1;
|
||||
};
|
||||
u8 dummy = 0;
|
||||
};
|
||||
|
||||
public:
|
||||
CScriptDock(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CVector3f& position,
|
||||
|
|
|
@ -32,6 +32,17 @@ CScriptEffect::CScriptEffect(TUniqueId uid, std::string_view name, const CEntity
|
|||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(),
|
||||
CActorParameters::None().HotInThermal(hotInThermal), kInvalidUniqueId)
|
||||
, x10c_partId(partId)
|
||||
, x110_24_enable(active)
|
||||
, x110_25_noTimerUnlessAreaOccluded(noTimerUnlessAreaOccluded)
|
||||
, x110_26_rebuildSystemsOnActivate(rebuildSystemsOnActivate)
|
||||
, x110_27_useRateInverseCamDist(useRateInverseCamDist)
|
||||
, x110_28_combatVisorVisible(combatVisorVisible)
|
||||
, x110_29_thermalVisorVisible(thermalVisorVisible)
|
||||
, x110_30_xrayVisorVisible(xrayVisorVisible)
|
||||
, x110_31_anyVisorVisible(xrayVisorVisible && thermalVisorVisible && combatVisorVisible)
|
||||
, x111_24_useRateCamDistRange(useRateCamDistRange)
|
||||
, x111_25_dieWhenSystemsDone(dieWhenSystemsDone)
|
||||
, x111_26_canRender(false)
|
||||
, x114_rateInverseCamDist(rateInverseCamDist)
|
||||
, x118_rateInverseCamDistSq(rateInverseCamDist * rateInverseCamDist)
|
||||
, x11c_rateInverseCamDistRate(rateInverseCamDistRate)
|
||||
|
@ -42,18 +53,6 @@ CScriptEffect::CScriptEffect(TUniqueId uid, std::string_view name, const CEntity
|
|||
, x130_duration(duration)
|
||||
, x134_durationResetWhileVisible(durationResetWhileVisible)
|
||||
, x138_actorLights(lParms.MakeActorLights()) {
|
||||
x110_24_enable = active;
|
||||
x110_25_noTimerUnlessAreaOccluded = noTimerUnlessAreaOccluded;
|
||||
x110_26_rebuildSystemsOnActivate = rebuildSystemsOnActivate;
|
||||
x110_27_useRateInverseCamDist = useRateInverseCamDist;
|
||||
x110_28_combatVisorVisible = combatVisorVisible;
|
||||
x110_29_thermalVisorVisible = thermalVisorVisible;
|
||||
x110_30_xrayVisorVisible = xrayVisorVisible;
|
||||
x110_31_anyVisorVisible = xrayVisorVisible && thermalVisorVisible && combatVisorVisible;
|
||||
x111_24_useRateCamDistRange = useRateCamDistRange;
|
||||
x111_25_dieWhenSystemsDone = dieWhenSystemsDone;
|
||||
x111_26_canRender = false;
|
||||
|
||||
if (partId.IsValid()) {
|
||||
xf8_particleSystemToken = g_SimplePool->GetObj({FOURCC('PART'), partId});
|
||||
x104_particleSystem = std::make_unique<CElementGen>(xf8_particleSystemToken);
|
||||
|
|
|
@ -19,8 +19,6 @@ class CScriptEffect : public CActor {
|
|||
std::unique_ptr<CElementGen> x104_particleSystem;
|
||||
TUniqueId x108_lightId = kInvalidUniqueId;
|
||||
CAssetId x10c_partId;
|
||||
union {
|
||||
struct {
|
||||
bool x110_24_enable : 1;
|
||||
bool x110_25_noTimerUnlessAreaOccluded : 1;
|
||||
bool x110_26_rebuildSystemsOnActivate : 1;
|
||||
|
@ -32,9 +30,6 @@ class CScriptEffect : public CActor {
|
|||
bool x111_24_useRateCamDistRange : 1;
|
||||
bool x111_25_dieWhenSystemsDone : 1;
|
||||
bool x111_26_canRender : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
float x114_rateInverseCamDist;
|
||||
float x118_rateInverseCamDistSq;
|
||||
float x11c_rateInverseCamDistRate;
|
||||
|
|
|
@ -11,13 +11,8 @@ namespace urde {
|
|||
|
||||
class CScriptGenerator : public CEntity {
|
||||
u32 x34_spawnCount;
|
||||
union {
|
||||
struct {
|
||||
bool x38_24_noReuseFollowers : 1;
|
||||
bool x38_25_noInheritTransform : 1;
|
||||
};
|
||||
u8 dummy1 = 0;
|
||||
};
|
||||
zeus::CVector3f x3c_offset;
|
||||
float x48_minScale;
|
||||
float x4c_maxScale;
|
||||
|
|
|
@ -158,7 +158,15 @@ CScriptGunTurret::CScriptGunTurret(TUniqueId uid, std::string_view name, ETurret
|
|||
, x428_targettingLightDesc(g_SimplePool->GetObj({SBIG('PART'), turretData.GetTargettingLightRes()}))
|
||||
, x434_frozenEffectDesc(g_SimplePool->GetObj({SBIG('PART'), turretData.GetFrozenEffectRes()}))
|
||||
, x440_chargingEffectDesc(g_SimplePool->GetObj({SBIG('PART'), turretData.GetChargingEffectRes()}))
|
||||
, x44c_panningEffectDesc(g_SimplePool->GetObj({SBIG('PART'), turretData.GetPanningEffectRes()})) {
|
||||
, x44c_panningEffectDesc(g_SimplePool->GetObj({SBIG('PART'), turretData.GetPanningEffectRes()}))
|
||||
, x560_24_dead(false)
|
||||
, x560_25_frozen(false)
|
||||
, x560_26_firedWithSetBurst(false)
|
||||
, x560_27_burstSet(false)
|
||||
, x560_28_hasBeenActivated(false)
|
||||
, x560_29_scriptedStart(false)
|
||||
, x560_30_needsStopClankSound(true)
|
||||
, x560_31_frenzyReverse(false) {
|
||||
if (turretData.GetVisorEffectRes().IsValid())
|
||||
x458_visorEffectDesc = g_SimplePool->GetObj({SBIG('PART'), turretData.GetVisorEffectRes()});
|
||||
x468_idleLight = std::make_unique<CElementGen>(x410_idleLightDesc);
|
||||
|
@ -171,14 +179,6 @@ CScriptGunTurret::CScriptGunTurret(TUniqueId uid, std::string_view name, ETurret
|
|||
x514_lastFrontVector = xf.frontVector();
|
||||
x544_originalFrontVec = xf.frontVector();
|
||||
x550_originalRightVec = xf.rightVector();
|
||||
x560_24_dead = false;
|
||||
x560_25_frozen = false;
|
||||
x560_26_firedWithSetBurst = false;
|
||||
x560_27_burstSet = false;
|
||||
x560_28_hasBeenActivated = false;
|
||||
x560_29_scriptedStart = false;
|
||||
x560_30_needsStopClankSound = true;
|
||||
x560_31_frenzyReverse = false;
|
||||
|
||||
if (comp == ETurretComponent::Base && HasModelData() && GetModelData()->HasAnimData())
|
||||
GetModelData()->EnableLooping(true);
|
||||
|
|
|
@ -170,8 +170,6 @@ private:
|
|||
zeus::CVector3f x544_originalFrontVec;
|
||||
zeus::CVector3f x550_originalRightVec;
|
||||
s32 x55c_additiveChargeAnim = -1;
|
||||
union {
|
||||
struct {
|
||||
bool x560_24_dead : 1;
|
||||
bool x560_25_frozen : 1;
|
||||
bool x560_26_firedWithSetBurst : 1;
|
||||
|
@ -180,9 +178,6 @@ private:
|
|||
bool x560_29_scriptedStart : 1;
|
||||
bool x560_30_needsStopClankSound : 1;
|
||||
bool x560_31_frenzyReverse : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
|
||||
private:
|
||||
void SetupCollisionManager(CStateManager&);
|
||||
|
|
|
@ -20,9 +20,10 @@ CScriptMazeNode::CScriptMazeNode(TUniqueId uid, std::string_view name, const CEn
|
|||
, xf0_(w2)
|
||||
, x100_(vec1)
|
||||
, x110_(vec2)
|
||||
, x120_(vec3) {
|
||||
x13c_24_ = true;
|
||||
}
|
||||
, x120_(vec3)
|
||||
, x13c_24_(true)
|
||||
, x13c_25_(false)
|
||||
, x13c_26_(false) {}
|
||||
|
||||
void CScriptMazeNode::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||
|
||||
|
|
|
@ -24,14 +24,9 @@ class CScriptMazeNode : public CActor {
|
|||
s32 x130_ = 0;
|
||||
s32 x134_ = 0;
|
||||
s32 x138_ = 0;
|
||||
union {
|
||||
struct {
|
||||
bool x13c_24_ : 1;
|
||||
bool x13c_25_ : 1;
|
||||
bool x13c_26_ : 1;
|
||||
};
|
||||
u8 dummy = 0;
|
||||
};
|
||||
|
||||
public:
|
||||
CScriptMazeNode(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, bool, s32, s32, s32,
|
||||
|
|
|
@ -7,14 +7,9 @@
|
|||
|
||||
namespace urde {
|
||||
class CScriptMemoryRelay : public CEntity {
|
||||
union {
|
||||
struct {
|
||||
bool x34_24_defaultActive;
|
||||
bool x34_25_skipSendActive;
|
||||
bool x34_26_ignoreMessages;
|
||||
};
|
||||
u8 dummy = 0;
|
||||
};
|
||||
|
||||
public:
|
||||
CScriptMemoryRelay(TUniqueId, std::string_view name, const CEntityInfo&, bool, bool, bool);
|
||||
|
|
|
@ -25,10 +25,16 @@ CScriptPlayerActor::CScriptPlayerActor(TUniqueId uid, std::string_view name, con
|
|||
0, 1.f, false, false, false, false)
|
||||
, x2e8_suitRes(animRes)
|
||||
, x304_beam(beam)
|
||||
, x350_flags(flags) {
|
||||
x354_24_setBoundingBox = setBoundingBox;
|
||||
x354_29_loading = true;
|
||||
x354_30_enableLoading = true;
|
||||
, x350_flags(flags)
|
||||
, x354_24_setBoundingBox(setBoundingBox)
|
||||
, x354_25_deferOnlineModelData(false)
|
||||
, x354_26_deferOfflineModelData(false)
|
||||
, x354_27_beamModelLoading(false)
|
||||
, x354_28_suitModelLoading(false)
|
||||
, x354_29_loading(true)
|
||||
, x354_30_enableLoading(true)
|
||||
, x354_31_deferOnlineLoad(false)
|
||||
, x355_24_areaTrackingLoad(false) {
|
||||
CMaterialList exclude = GetMaterialFilter().GetExcludeList();
|
||||
CMaterialList include = GetMaterialFilter().GetIncludeList();
|
||||
include.Add(EMaterialTypes::Player);
|
||||
|
|
|
@ -25,8 +25,6 @@ class CScriptPlayerActor : public CScriptActor {
|
|||
float x34c_phazonOffsetAngle = 0.f;
|
||||
u32 x350_flags; /* 0x1: suit transition, 0x2: previous suit, 0x4: force reset
|
||||
* 0x8: track in area data, 0x10: keep in state manager */
|
||||
union {
|
||||
struct {
|
||||
bool x354_24_setBoundingBox : 1;
|
||||
bool x354_25_deferOnlineModelData : 1;
|
||||
bool x354_26_deferOfflineModelData : 1;
|
||||
|
@ -36,9 +34,6 @@ class CScriptPlayerActor : public CScriptActor {
|
|||
bool x354_30_enableLoading : 1;
|
||||
bool x354_31_deferOnlineLoad : 1;
|
||||
bool x355_24_areaTrackingLoad : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
TUniqueId x356_nextPlayerActor = kInvalidUniqueId;
|
||||
|
||||
u32 GetSuitCharIdx(const CStateManager& mgr, CPlayerState::EPlayerSuit suit) const;
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace urde {
|
|||
|
||||
CScriptShadowProjector::CScriptShadowProjector(TUniqueId uid, std::string_view name, const CEntityInfo& info,
|
||||
const zeus::CTransform& xf, bool active, const zeus::CVector3f& offset,
|
||||
bool b2, float scale, float f2, float opacity, float opacityQ,
|
||||
bool persistent, float scale, float f2, float opacity, float opacityQ,
|
||||
s32 textureSize)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(), CActorParameters::None(),
|
||||
kInvalidUniqueId)
|
||||
|
@ -19,9 +19,9 @@ CScriptShadowProjector::CScriptShadowProjector(TUniqueId uid, std::string_view n
|
|||
, xf8_zOffsetAdjust(f2)
|
||||
, xfc_opacity(opacity)
|
||||
, x100_opacityRecip(opacity < 0.00001 ? 1.f : opacityQ / opacity)
|
||||
, x10c_textureSize(textureSize) {
|
||||
x110_24_persistent = b2;
|
||||
}
|
||||
, x10c_textureSize(textureSize)
|
||||
, x110_24_persistent(persistent)
|
||||
, x110_25_shadowInvalidated(false) {}
|
||||
|
||||
void CScriptShadowProjector::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||
|
||||
|
|
|
@ -20,14 +20,8 @@ class CScriptShadowProjector : public CActor {
|
|||
TUniqueId x104_target;
|
||||
std::unique_ptr<CProjectedShadow> x108_projectedShadow;
|
||||
u32 x10c_textureSize;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x110_24_persistent : 1;
|
||||
bool x110_25_shadowInvalidated : 1;
|
||||
};
|
||||
u8 x110_dummy = 0;
|
||||
};
|
||||
|
||||
public:
|
||||
CScriptShadowProjector(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, bool,
|
||||
|
|
|
@ -27,14 +27,17 @@ CScriptSound::CScriptSound(TUniqueId uid, std::string_view name, const CEntityIn
|
|||
, x112_prio(s16(prio))
|
||||
, x114_pan(pan / 64.f - 1.f)
|
||||
, x116_(w6)
|
||||
, x118_pitch(pitch / 8192.f) {
|
||||
x11c_25_looped = looped;
|
||||
x11c_26_nonEmitter = nonEmitter;
|
||||
x11c_27_autoStart = autoStart;
|
||||
x11c_28_occlusionTest = occlusionTest;
|
||||
x11c_29_acoustics = acoustics;
|
||||
x11c_30_worldSfx = worldSfx;
|
||||
x11d_24_allowDuplicates = allowDuplicates;
|
||||
, x118_pitch(pitch / 8192.f)
|
||||
, x11c_24_playRequested(false)
|
||||
, x11c_25_looped(looped)
|
||||
, x11c_26_nonEmitter(nonEmitter)
|
||||
, x11c_27_autoStart(autoStart)
|
||||
, x11c_28_occlusionTest(occlusionTest)
|
||||
, x11c_29_acoustics(acoustics)
|
||||
, x11c_30_worldSfx(worldSfx)
|
||||
, x11c_31_selfFree(false)
|
||||
, x11d_24_allowDuplicates(allowDuplicates)
|
||||
, x11d_25_processedThisFrame(false) {
|
||||
if (x11c_30_worldSfx && (!x11c_26_nonEmitter || !x11c_25_looped))
|
||||
x11c_30_worldSfx = false;
|
||||
}
|
||||
|
|
|
@ -28,8 +28,6 @@ class CScriptSound : public CActor {
|
|||
float x114_pan;
|
||||
bool x116_;
|
||||
float x118_pitch;
|
||||
union {
|
||||
struct {
|
||||
bool x11c_24_playRequested : 1;
|
||||
bool x11c_25_looped : 1;
|
||||
bool x11c_26_nonEmitter : 1;
|
||||
|
@ -40,9 +38,6 @@ class CScriptSound : public CActor {
|
|||
bool x11c_31_selfFree : 1;
|
||||
bool x11d_24_allowDuplicates : 1;
|
||||
bool x11d_25_processedThisFrame : 1;
|
||||
};
|
||||
u32 x11c_dummy = 0;
|
||||
};
|
||||
|
||||
static float GetOccludedVolumeAmount(const zeus::CVector3f& pos, const CStateManager& mgr);
|
||||
|
||||
|
|
|
@ -14,13 +14,8 @@ namespace urde {
|
|||
class CScriptSpawnPoint : public CEntity {
|
||||
zeus::CTransform x34_xf;
|
||||
rstl::reserved_vector<u32, int(CPlayerState::EItemType::Max)> x64_itemCounts;
|
||||
union {
|
||||
struct {
|
||||
bool x10c_24_firstSpawn : 1;
|
||||
bool x10c_25_morphed : 1;
|
||||
};
|
||||
u8 _dummy = 0;
|
||||
};
|
||||
|
||||
public:
|
||||
CScriptSpawnPoint(TUniqueId, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
|
||||
|
|
|
@ -45,8 +45,18 @@ CScriptSpecialFunction::CScriptSpecialFunction(TUniqueId uid, std::string_view n
|
|||
, x184_(0.f)
|
||||
, x1bc_areaSaveId(aId1)
|
||||
, x1c0_layerIdx(aId2)
|
||||
, x1c4_item(itemType) {
|
||||
x1e4_26_sfx2Played = true;
|
||||
, x1c4_item(itemType)
|
||||
, x1e4_24_(false)
|
||||
, x1e4_25_spinnerCanMove(false)
|
||||
, x1e4_26_sfx2Played(true)
|
||||
, x1e4_27_sfx3Played(false)
|
||||
, x1e4_28_frustumEntered(false)
|
||||
, x1e4_29_frustumExited(false)
|
||||
, x1e4_30_(false)
|
||||
, x1e4_31_inAreaDamage(false)
|
||||
, x1e5_24_doSave(false)
|
||||
, x1e5_25_playerInArea(false)
|
||||
, x1e5_26_displayBillboard(false) {
|
||||
if (xe8_function == ESpecialFunction::HUDTarget)
|
||||
x1c8_touchBounds = {-1.f, 1.f};
|
||||
}
|
||||
|
|
|
@ -99,8 +99,6 @@ private:
|
|||
s32 x1c0_layerIdx;
|
||||
CPlayerState::EItemType x1c4_item;
|
||||
std::optional<zeus::CAABox> x1c8_touchBounds;
|
||||
union {
|
||||
struct {
|
||||
bool x1e4_24_ : 1;
|
||||
bool x1e4_25_spinnerCanMove : 1;
|
||||
bool x1e4_26_sfx2Played : 1;
|
||||
|
@ -112,9 +110,6 @@ private:
|
|||
bool x1e5_24_doSave : 1;
|
||||
bool x1e5_25_playerInArea : 1;
|
||||
bool x1e5_26_displayBillboard : 1;
|
||||
};
|
||||
u32 x1e4_dummy = 0;
|
||||
};
|
||||
TLockedToken<CTexture> x1e8_; // Used to be optional
|
||||
public:
|
||||
CScriptSpecialFunction(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, ESpecialFunction,
|
||||
|
|
|
@ -9,7 +9,8 @@ namespace urde {
|
|||
CScriptTargetingPoint::CScriptTargetingPoint(TUniqueId uid, std::string_view name, const CEntityInfo& info,
|
||||
const zeus::CTransform& xf, bool active)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::NoStepLogic),
|
||||
CActorParameters::None(), kInvalidUniqueId) {}
|
||||
CActorParameters::None(), kInvalidUniqueId)
|
||||
, xe8_e4_(false) {}
|
||||
|
||||
void CScriptTargetingPoint::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||
|
||||
|
|
|
@ -8,12 +8,7 @@
|
|||
namespace urde {
|
||||
class CScriptTargetingPoint : public CActor {
|
||||
private:
|
||||
union {
|
||||
struct {
|
||||
bool xe8_e4_ : 1;
|
||||
};
|
||||
u8 xe8_dummy = 0;
|
||||
};
|
||||
TUniqueId xea_;
|
||||
float xec_time = 0.f;
|
||||
|
||||
|
|
|
@ -20,13 +20,13 @@ CScriptTrigger::CScriptTrigger(TUniqueId uid, std::string_view name, const CEnti
|
|||
, x11c_forceField(forceField)
|
||||
, x128_forceMagnitude(forceField.magnitude())
|
||||
, x12c_flags(triggerFlags)
|
||||
, x130_bounds(bounds) {
|
||||
x148_24_detectCamera = false;
|
||||
x148_25_camSubmerged = false;
|
||||
x148_26_deactivateOnEntered = deactivateOnEntered;
|
||||
x148_27_deactivateOnExited = deactivateOnExited;
|
||||
x148_28_playerTriggerProc = false;
|
||||
x148_29_didPhazonDamage = false;
|
||||
, x130_bounds(bounds)
|
||||
, x148_24_detectCamera(false)
|
||||
, x148_25_camSubmerged(false)
|
||||
, x148_26_deactivateOnEntered(deactivateOnEntered)
|
||||
, x148_27_deactivateOnExited(deactivateOnExited)
|
||||
, x148_28_playerTriggerProc(false)
|
||||
, x148_29_didPhazonDamage(false) {
|
||||
SetCallTouch(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -54,18 +54,12 @@ protected:
|
|||
float x128_forceMagnitude;
|
||||
ETriggerFlags x12c_flags;
|
||||
zeus::CAABox x130_bounds;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x148_24_detectCamera : 1;
|
||||
bool x148_25_camSubmerged : 1;
|
||||
bool x148_26_deactivateOnEntered : 1;
|
||||
bool x148_27_deactivateOnExited : 1;
|
||||
bool x148_28_playerTriggerProc : 1;
|
||||
bool x148_29_didPhazonDamage : 1;
|
||||
};
|
||||
u8 dummy = 0;
|
||||
};
|
||||
|
||||
public:
|
||||
CScriptTrigger(TUniqueId, std::string_view name, const CEntityInfo& info, const zeus::CVector3f& pos,
|
||||
|
|
|
@ -61,14 +61,18 @@ CScriptWater::CScriptWater(
|
|||
, 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) {
|
||||
, x2c0_tileSize(tileSize)
|
||||
, x2e8_24_b4(b4)
|
||||
, x2e8_25_morphIn(false)
|
||||
, x2e8_26_morphing(false)
|
||||
, x2e8_27_allowRender(allowRender)
|
||||
, x2e8_28_recomputeClipping(true)
|
||||
, x2e8_29_alphaIn(false)
|
||||
, x2e8_30_alphaOut(false) {
|
||||
zeus::CAABox triggerAABB = GetTriggerBoundsWR();
|
||||
x2c4_gridDimX = u32((x2c0_tileSize + triggerAABB.max.x() - triggerAABB.min.x() - 0.01f) / x2c0_tileSize);
|
||||
x2c8_gridDimY = u32((x2c0_tileSize + triggerAABB.max.y() - triggerAABB.min.y() - 0.01f) / x2c0_tileSize);
|
||||
x2cc_gridCellCount = (x2c4_gridDimX + 1) * (x2c8_gridDimY + 1);
|
||||
x2e8_24_b4 = b4;
|
||||
x2e8_27_allowRender = allowRender;
|
||||
x2e8_28_recomputeClipping = true;
|
||||
|
||||
uint32_t maxPatchSize;
|
||||
if (CGraphics::g_BooFactory->isTessellationSupported(maxPatchSize))
|
||||
|
|
|
@ -66,8 +66,6 @@ class CScriptWater : public CScriptTrigger {
|
|||
std::unique_ptr<bool[]> x2dc_vertIntersects;
|
||||
std::unique_ptr<u8[]> x2e0_patchIntersects; // 0: all clear, 1: all intersect, 2: partial intersect
|
||||
int x2e4_computedGridCellCount = 0;
|
||||
union {
|
||||
struct {
|
||||
bool x2e8_24_b4 : 1;
|
||||
bool x2e8_25_morphIn : 1;
|
||||
bool x2e8_26_morphing : 1;
|
||||
|
@ -75,9 +73,7 @@ class CScriptWater : public CScriptTrigger {
|
|||
bool x2e8_28_recomputeClipping : 1;
|
||||
bool x2e8_29_alphaIn : 1;
|
||||
bool x2e8_30_alphaOut : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
|
||||
void SetupGrid(bool recomputeClipping);
|
||||
void SetupGridClipping(CStateManager& mgr, int computeVerts);
|
||||
void UpdateSplashInhabitants(CStateManager& mgr);
|
||||
|
|
|
@ -16,15 +16,9 @@ class CScriptWorldTeleporter : public CEntity {
|
|||
CAssetId x34_worldId;
|
||||
CAssetId x38_areaId;
|
||||
ETeleporterType x3c_type = ETeleporterType::NoTransition;
|
||||
union {
|
||||
struct {
|
||||
bool x40_24_upElevator : 1;
|
||||
bool x40_25_inTransition : 1;
|
||||
bool x40_27_fadeWhite : 1;
|
||||
};
|
||||
u8 _dummy = 0;
|
||||
};
|
||||
|
||||
float x44_charFadeIn = 0.1f;
|
||||
float x48_charsPerSecond = 8.0f;
|
||||
float x4c_showDelay = 0.0f;
|
||||
|
|
|
@ -89,15 +89,10 @@ class CStateMachineState {
|
|||
float xc_random = 0.f;
|
||||
float x10_delay = 0.f;
|
||||
float x14_;
|
||||
union {
|
||||
struct {
|
||||
bool x18_24_codeTrigger : 1;
|
||||
};
|
||||
u32 dummy = 0;
|
||||
};
|
||||
|
||||
public:
|
||||
CStateMachineState() = default;
|
||||
CStateMachineState() : x18_24_codeTrigger(false) {}
|
||||
|
||||
CAiState* GetActorState() const { return x4_state; }
|
||||
|
||||
|
|
|
@ -69,13 +69,13 @@ CWallCrawlerSwarm::CWallCrawlerSwarm(TUniqueId uid, bool active, std::string_vie
|
|||
, x548_numBoids(numBoids)
|
||||
, x54c_maxCreatedBoids(maxCreatedBoids)
|
||||
, x554_maxLaunches(maxLaunches)
|
||||
, x558_flavor(flavor) {
|
||||
, x558_flavor(flavor)
|
||||
, x560_24_enableLighting(true)
|
||||
, x560_25_useSoftwareLight(true)
|
||||
, x560_26_modelAssetDirty(false) {
|
||||
x168_partitionedBoidLists.resize(125);
|
||||
x55c_launchSfx = CSfxManager::TranslateSFXID(launchSfx != -1 ? u16(launchSfx) : u16(0xffff));
|
||||
x55e_scatterSfx = CSfxManager::TranslateSFXID(scatterSfx != -1 ? u16(scatterSfx) : u16(0xffff));
|
||||
x560_24_enableLighting = true;
|
||||
x560_25_useSoftwareLight = true;
|
||||
x560_26_modelAssetDirty = false;
|
||||
CAnimRes attractAnimRes(animRes);
|
||||
attractAnimRes.SetCanLoop(true);
|
||||
attractAnimRes.SetDefaultAnim(attractAnim != -1 ? attractAnim : 0);
|
||||
|
|
|
@ -42,23 +42,23 @@ public:
|
|||
int x7c_framesNotOnSurface : 8;
|
||||
int x7c_idx : 10;
|
||||
int x7c_remainingLaunchNotOnSurfaceFrames : 8;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x80_24_active : 1;
|
||||
bool x80_25_inFrustum : 1;
|
||||
bool x80_26_launched : 1;
|
||||
bool x80_27_scarabExplodeTimerEnabled : 1;
|
||||
bool x80_28_nearPlayer : 1;
|
||||
};
|
||||
u32 x80_ = 0;
|
||||
};
|
||||
|
||||
public:
|
||||
CBoid(const zeus::CTransform& xf, int idx) : x0_xf(xf) {
|
||||
x7c_framesNotOnSurface = 0;
|
||||
x7c_idx = idx;
|
||||
}
|
||||
CBoid(const zeus::CTransform& xf, int idx)
|
||||
: x0_xf(xf)
|
||||
, x7c_framesNotOnSurface(0)
|
||||
, x7c_idx(idx)
|
||||
, x80_24_active(false)
|
||||
, x80_25_inFrustum(false)
|
||||
, x80_26_launched(false)
|
||||
, x80_27_scarabExplodeTimerEnabled(false)
|
||||
, x80_28_nearPlayer(false) {}
|
||||
|
||||
zeus::CTransform& Transform() { return x0_xf; }
|
||||
zeus::CVector3f& Translation() { return x0_xf.origin; }
|
||||
const zeus::CTransform& GetTransform() const { return x0_xf; }
|
||||
|
|
|
@ -184,8 +184,13 @@ std::string CDummyWorld::IGetDefaultAudioTrack() const { return {}; }
|
|||
int CDummyWorld::IGetAreaCount() const { return x18_areas.size(); }
|
||||
|
||||
CWorld::CWorld(IObjectStore& objStore, IFactory& resFactory, CAssetId mlvlId)
|
||||
: x8_mlvlId(mlvlId), x60_objectStore(objStore), x64_resFactory(resFactory) {
|
||||
x70_24_currentAreaNeedsAllocation = true;
|
||||
: x8_mlvlId(mlvlId)
|
||||
, x60_objectStore(objStore)
|
||||
, x64_resFactory(resFactory)
|
||||
, x70_24_currentAreaNeedsAllocation(true)
|
||||
, x70_25_loadPaused(false)
|
||||
, x70_26_skyboxActive(false)
|
||||
, x70_27_skyboxVisible(false) {
|
||||
SObjectTag tag{FOURCC('MLVL'), mlvlId};
|
||||
x44_bufSz = resFactory.ResourceSize(tag);
|
||||
x40_loadBuf.reset(new u8[x44_bufSz]);
|
||||
|
|
|
@ -130,16 +130,10 @@ private:
|
|||
IFactory& x64_resFactory;
|
||||
TAreaId x68_curAreaId = kInvalidAreaId;
|
||||
u32 x6c_loadedAudioGrpCount = 0;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x70_24_currentAreaNeedsAllocation : 1;
|
||||
bool x70_25_loadPaused : 1;
|
||||
bool x70_26_skyboxActive : 1;
|
||||
bool x70_27_skyboxVisible : 1;
|
||||
};
|
||||
u32 dummy = 0;
|
||||
};
|
||||
std::vector<CSoundGroupData> x74_soundGroupData;
|
||||
std::string x84_defAudioTrack;
|
||||
std::optional<TLockedToken<CModel>> x94_skyboxWorld;
|
||||
|
|
|
@ -69,16 +69,11 @@ private:
|
|||
float x38_textStartTime = 0.f;
|
||||
float x3c_sfxInterval;
|
||||
bool x40_strIdx;
|
||||
union {
|
||||
struct {
|
||||
bool x44_24_transFinished : 1;
|
||||
bool x44_25_stopSoon : 1;
|
||||
bool x44_26_goingUp : 1;
|
||||
bool x44_27_fadeWhite : 1;
|
||||
bool x44_28_textDirty : 1;
|
||||
};
|
||||
u8 dummy = 0;
|
||||
};
|
||||
|
||||
CColoredQuadFilter m_fadeToBlack{EFilterType::Blend};
|
||||
CTexturedQuadFilter m_dissolve{EFilterType::Blend, CGraphics::g_SpareTexture.get()};
|
||||
|
@ -101,7 +96,12 @@ private:
|
|||
void DrawText();
|
||||
|
||||
public:
|
||||
CWorldTransManager() { x44_24_transFinished = true; }
|
||||
CWorldTransManager()
|
||||
: x44_24_transFinished(true)
|
||||
, x44_25_stopSoon(false)
|
||||
, x44_26_goingUp(false)
|
||||
, x44_27_fadeWhite(false)
|
||||
, x44_28_textDirty(false) {}
|
||||
|
||||
void Update(float);
|
||||
void Draw();
|
||||
|
|
Loading…
Reference in New Issue