Reorganized SpecialStatus struct to minimize padding.

This commit is contained in:
Eduardo Quezada 2022-12-12 00:37:00 -03:00
parent 340278c83b
commit 1290a9411d

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