Merge pull request #2511 from AsparagusEduardo/RHH/pr/cleanup/SpecialStatus

Reorganized SpecialStatus struct to minimize padding.
This commit is contained in:
ghoulslash 2022-12-11 22:50:17 -05:00 committed by GitHub
commit 657e0d755b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,6 +155,12 @@ struct ProtectStruct
struct SpecialStatus
{
s32 dmg;
s32 physicalDmg;
s32 specialDmg;
u8 physicalBattlerId;
u8 specialBattlerId;
u8 changedStatsBattlerId; // Battler that was responsible for the latest stat change. Can be self.
u8 statLowered:1;
u8 lightningRodRedirected:1;
u8 restoredBattlerSprite: 1;
@ -162,33 +168,29 @@ struct SpecialStatus
u8 ppNotAffectedByPressure:1;
u8 faintedHasReplacement:1;
u8 focusBanded:1;
// End of byte
u8 focusSashed:1;
// End of byte
u8 sturdied:1;
u8 stormDrainRedirected:1;
u8 switchInAbilityDone:1;
u8 switchInItemDone:1;
u8 instructedChosenTarget:3;
// End of byte
u8 berryReduced:1;
// End of byte
u8 gemParam;
// End of byte
u8 gemBoost:1;
u8 rototillerAffected:1; // to be affected by rototiller
u8 parentalBondState:2;
u8 multiHitOn:1;
// End of byte, two bits unused
u8 gemParam;
u8 damagedMons:4; // Mons that have been damaged directly by using a move, includes substitute.
u8 dancerUsedMove:1;
u8 dancerOriginalTarget:3;
u8 announceNeutralizingGas:1; // See Cmd_switchineffects
u8 neutralizingGasRemoved:1; // See VARIOUS_TRY_END_NEUTRALIZING_GAS
u8 affectionEndured:1;
s32 dmg;
s32 physicalDmg;
s32 specialDmg;
u8 physicalBattlerId;
u8 specialBattlerId;
u8 changedStatsBattlerId; // Battler that was responsible for the latest stat change. Can be self.
// End of byte
u8 damagedMons:4; // Mons that have been damaged directly by using a move, includes substitute.
u8 dancerUsedMove:1;
u8 dancerOriginalTarget:3;
// End of byte
};
struct SideTimer