From e27975afaae8604ce397f09b6a75185cc2c84342 Mon Sep 17 00:00:00 2001 From: PokeCodec Date: Sun, 16 Aug 2020 13:14:35 -0400 Subject: Match battle script commands by correcting a function and the pokemon struct --- include/battle.h | 22 +++++++++++----------- include/constants/battle.h | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/battle.h b/include/battle.h index 7da040188..78e7b809a 100644 --- a/include/battle.h +++ b/include/battle.h @@ -124,22 +124,22 @@ struct ProtectStruct u32 flinchImmobility:1; u32 notFirstStrike:1; u32 palaceUnableToUseMove:1; - u32 physicalDmg; - u32 specialDmg; + s32 physicalDmg; + s32 specialDmg; u8 physicalBattlerId; u8 specialBattlerId; }; struct SpecialStatus { - u8 statLowered:1; - u8 lightningRodRedirected:1; - u8 restoredBattlerSprite: 1; - u8 intimidatedMon:1; - u8 traced:1; - u8 ppNotAffectedByPressure:1; - u8 flag40:1; - u8 focusBanded:1; + u32 statLowered:1; + u32 lightningRodRedirected:1; + u32 restoredBattlerSprite: 1; + u32 intimidatedMon:1; + u32 traced:1; + u32 ppNotAffectedByPressure:1; + u32 flag40:1; + u32 focusBanded:1; s32 dmg; s32 physicalDmg; s32 specialDmg; @@ -254,7 +254,7 @@ struct BattleResults u16 playerMon2Species; // 0x26 u16 caughtMonSpecies; // 0x28 u8 caughtMonNick[POKEMON_NAME_LENGTH + 1]; // 0x2A - u8 filler35[1]; // 0x35 + u8 filler35; // 0x35 u8 catchAttempts[11]; // 0x36 }; diff --git a/include/constants/battle.h b/include/constants/battle.h index 8b860e384..fa8f422c4 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -186,7 +186,7 @@ #define HITMARKER_x4000000 (1 << 26) #define HITMARKER_CHARGING (1 << 27) #define HITMARKER_FAINTED(battler) (gBitTable[battler] << 28) -#define HITMARKER_FAINTED2(battler) (1 << (28 + battler)) +#define HITMARKER_FAINTED2(battler) ((1 << 28) << battler) // Per-side statuses that affect an entire party #define SIDE_STATUS_REFLECT (1 << 0) -- cgit v1.2.3