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