diff options
author | DizzyEggg <jajkodizzy@wp.pl> | 2018-10-07 15:39:46 +0200 |
---|---|---|
committer | DizzyEggg <jajkodizzy@wp.pl> | 2018-10-07 15:39:46 +0200 |
commit | 61343d50698e035834eb276b48189d4db0a4b9b8 (patch) | |
tree | 034ce8e51608e6e4c5ca23831350326ece449e8f /src/battle_script_commands.c | |
parent | 8c834b9ae8eccaf6a95583e632f2007715271cd9 (diff) |
Decompile battle_anim_80A9C70
Diffstat (limited to 'src/battle_script_commands.c')
-rw-r--r-- | src/battle_script_commands.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 10b432d8e..0422c11e3 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -3,6 +3,7 @@ #include "constants/battle_move_effects.h" #include "constants/battle_script_commands.h" #include "battle_message.h" +#include "battle_anim.h" #include "battle_ai_script_commands.h" #include "battle_scripts.h" #include "constants/moves.h" @@ -4381,16 +4382,16 @@ static void atk47_setgraphicalstatchangevalues(void) switch (GET_STAT_BUFF_VALUE2(gBattleScripting.statChanger)) { case SET_STAT_BUFF_VALUE(1): // +1 - value = 0xF; + value = STAT_ANIM_PLUS1; break; case SET_STAT_BUFF_VALUE(2): // +2 - value = 0x27; + value = STAT_ANIM_PLUS2; break; case SET_STAT_BUFF_VALUE(1) | STAT_BUFF_NEGATIVE: // -1 - value = 0x16; + value = STAT_ANIM_MINUS1; break; case SET_STAT_BUFF_VALUE(2) | STAT_BUFF_NEGATIVE: // -2 - value = 0x2E; + value = STAT_ANIM_MINUS2; break; } gBattleScripting.animArg1 = GET_STAT_BUFF_ID(gBattleScripting.statChanger) + value - 1; @@ -4412,9 +4413,9 @@ static void atk48_playstatchangeanimation(void) { s16 startingStatAnimId; if (gBattlescriptCurrInstr[3] & ATK48_STAT_BY_TWO) - startingStatAnimId = 0x2D; + startingStatAnimId = STAT_ANIM_MINUS2 - 1; else - startingStatAnimId = 0x15; + startingStatAnimId = STAT_ANIM_MINUS1 - 1; while (statsToCheck != 0) { @@ -4447,18 +4448,18 @@ static void atk48_playstatchangeanimation(void) if (changeableStatsCount > 1) // more than one stat, so the color is gray { if (gBattlescriptCurrInstr[3] & ATK48_STAT_BY_TWO) - statAnimId = 0x3A; + statAnimId = STAT_ANIM_MULTIPLE_MINUS2; else - statAnimId = 0x39; + statAnimId = STAT_ANIM_MULTIPLE_MINUS1; } } else // goes up { s16 startingStatAnimId; if (gBattlescriptCurrInstr[3] & ATK48_STAT_BY_TWO) - startingStatAnimId = 0x26; + startingStatAnimId = STAT_ANIM_PLUS2 - 1; else - startingStatAnimId = 0xE; + startingStatAnimId = STAT_ANIM_PLUS1 - 1; while (statsToCheck != 0) { @@ -4473,9 +4474,9 @@ static void atk48_playstatchangeanimation(void) if (changeableStatsCount > 1) // more than one stat, so the color is gray { if (gBattlescriptCurrInstr[3] & ATK48_STAT_BY_TWO) - statAnimId = 0x38; + statAnimId = STAT_ANIM_MULTIPLE_PLUS2; else - statAnimId = 0x37; + statAnimId = STAT_ANIM_MULTIPLE_PLUS1; } } |