mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 21:07:42 +00:00
Runtime/World: Replace bitfield unions with constructor initializers
This commit is contained in:
@@ -61,16 +61,16 @@ enum class EKnockBackAnimationFollowUp {
|
||||
class CKnockBackController {
|
||||
public:
|
||||
struct KnockBackParms {
|
||||
EKnockBackAnimationState x0_animState;
|
||||
EKnockBackAnimationFollowUp x4_animFollowup;
|
||||
float x8_followupDuration;
|
||||
float xc_intoFreezeDur;
|
||||
EKnockBackAnimationState x0_animState = EKnockBackAnimationState::None;
|
||||
EKnockBackAnimationFollowUp x4_animFollowup = EKnockBackAnimationFollowUp::None;
|
||||
float x8_followupDuration = 0.f;
|
||||
float xc_intoFreezeDur = 0.f;
|
||||
};
|
||||
|
||||
private:
|
||||
friend class CPatterned;
|
||||
EKnockBackVariant x0_variant;
|
||||
KnockBackParms x4_activeParms;
|
||||
KnockBackParms x4_activeParms{};
|
||||
EWeaponType x14_deferWeaponType = EWeaponType::None;
|
||||
EKnockBackAnimationState x18_minAnimState = EKnockBackAnimationState::None;
|
||||
EKnockBackAnimationState x1c_maxAnimState = EKnockBackAnimationState::Fall;
|
||||
@@ -86,22 +86,17 @@ private:
|
||||
u32 x74_ = 0;
|
||||
pas::ESeverity x7c_severity = pas::ESeverity::One;
|
||||
std::bitset<5> x80_availableStates;
|
||||
union {
|
||||
struct {
|
||||
bool x81_24_autoResetImpulse : 1; // t
|
||||
bool x81_25_enableFreeze : 1; // t
|
||||
bool x81_26_enableShock : 1;
|
||||
bool x81_27_enableBurn : 1; // t
|
||||
bool x81_28_enableBurnDeath : 1; // t
|
||||
bool x81_29_enableExplodeDeath : 1; // t
|
||||
bool x81_30_enableLaggedBurnDeath : 1; // t
|
||||
bool x81_31_ : 1; // t
|
||||
bool x82_24_ : 1; // t
|
||||
bool x82_25_inDeferredKnockBack : 1;
|
||||
bool x82_26_locomotionDuringElectrocution : 1;
|
||||
};
|
||||
u32 dummy = 0;
|
||||
};
|
||||
bool x81_24_autoResetImpulse : 1; // t
|
||||
bool x81_25_enableFreeze : 1; // t
|
||||
bool x81_26_enableShock : 1;
|
||||
bool x81_27_enableBurn : 1; // t
|
||||
bool x81_28_enableBurnDeath : 1; // t
|
||||
bool x81_29_enableExplodeDeath : 1; // t
|
||||
bool x81_30_enableLaggedBurnDeath : 1; // t
|
||||
bool x81_31_ : 1; // t
|
||||
bool x82_24_ : 1; // t
|
||||
bool x82_25_inDeferredKnockBack : 1;
|
||||
bool x82_26_locomotionDuringElectrocution : 1;
|
||||
void ApplyImpulse(float dt, CPatterned& parent);
|
||||
bool TickDeferredTimer(float dt);
|
||||
EKnockBackCharacterState GetKnockBackCharacterState(CPatterned& parent);
|
||||
|
||||
Reference in New Issue
Block a user