diff options
author | Cameron Hall <camthesaxman@users.noreply.github.com> | 2017-11-11 15:48:17 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-11 15:48:17 -0600 |
commit | 558bf2f7d0c9be70ec0da4b9ef28c105c5d11622 (patch) | |
tree | 232d44774e91c44ac08b366aa5186593ebe00d62 /src/battle_script_commands.c | |
parent | af197ccd3bd62fab813154dc4311e65f9992a676 (diff) | |
parent | 32c7d4f252acf8cc9dc42d50da046c4b3f0beb16 (diff) |
Merge pull request #104 from DizzyEggg/decompile_battle_7
Decompile battle 7
Diffstat (limited to 'src/battle_script_commands.c')
-rw-r--r-- | src/battle_script_commands.c | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index c6cec7f0d..91be4fd9d 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1068,22 +1068,33 @@ static const u8 sBallCatchBonuses[] = 20, 15, 10, 15 // Ultra, Great, Poke, Safari }; -// could be a 2d array or a struct -const ALIGNED(4) u8 gUnknown_0831C494[] = -{ - 0x3d, 0x44, 0x3d, 0x44, 0x14, 0x2d, 0x54, 0x5c, - 0x46, 0x55, 0x20, 0x5c, 0x26, 0x45, 0x46, 0x55, - 0x14, 0x5a, 0x46, 0x5c, 0x1e, 0x32, 0x20, 0x5a, - 0x38, 0x4e, 0x38, 0x4e, 0x19, 0x28, 0x4b, 0x5a, - 0x45, 0x4b, 0x1c, 0x53, 0x23, 0x2d, 0x1d, 0x23, - 0x3e, 0x48, 0x1e, 0x32, 0x3a, 0x5f, 0x58, 0x5e, - 0x22, 0x2d, 0x1d, 0x28, 0x23, 0x28, 0x23, 0x5f, - 0x38, 0x4e, 0x38, 0x4e, 0x23, 0x50, 0x22, 0x5e, - 0x2c, 0x5e, 0x22, 0x28, 0x38, 0x4e, 0x38, 0x4e, - 0x1e, 0x58, 0x1e, 0x58, 0x1e, 0x2b, 0x1b, 0x21, - 0x28, 0x5a, 0x19, 0x57, 0x12, 0x58, 0x5a, 0x5f, - 0x58, 0x5e, 0x16, 0x2a, 0x2a, 0x5c, 0x2a, 0x2f, - 0x38, 0x4e, 0x38, 0x4e +const ALIGNED(4) u8 gUnknown_0831C494[][4] = +{ + {0x3d, 0x44, 0x3d, 0x44}, + {0x14, 0x2d, 0x54, 0x5c}, + {0x46, 0x55, 0x20, 0x5c}, + {0x26, 0x45, 0x46, 0x55}, + {0x14, 0x5a, 0x46, 0x5c}, + {0x1e, 0x32, 0x20, 0x5a}, + {0x38, 0x4e, 0x38, 0x4e}, + {0x19, 0x28, 0x4b, 0x5a}, + {0x45, 0x4b, 0x1c, 0x53}, + {0x23, 0x2d, 0x1d, 0x23}, + {0x3e, 0x48, 0x1e, 0x32}, + {0x3a, 0x5f, 0x58, 0x5e}, + {0x22, 0x2d, 0x1d, 0x28}, + {0x23, 0x28, 0x23, 0x5f}, + {0x38, 0x4e, 0x38, 0x4e}, + {0x23, 0x50, 0x22, 0x5e}, + {0x2c, 0x5e, 0x22, 0x28}, + {0x38, 0x4e, 0x38, 0x4e}, + {0x1e, 0x58, 0x1e, 0x58}, + {0x1e, 0x2b, 0x1b, 0x21}, + {0x28, 0x5a, 0x19, 0x57}, + {0x12, 0x58, 0x5a, 0x5f}, + {0x58, 0x5e, 0x16, 0x2a}, + {0x2a, 0x5c, 0x2a, 0x2f}, + {0x38, 0x4e, 0x38, 0x4e} }; static const u8 sUnknown_0831C4F8[] = @@ -3533,7 +3544,7 @@ static void atk23_getexp(void) // music change in wild battle after fainting a poke if (!(gBattleTypeFlags & BATTLE_TYPE_TRAINER) && gBattleMons[0].hp && !gBattleStruct->wildVictorySong) { - BattleMusicStop(); + BattleStopLowHpSound(); PlayBGM(0x161); gBattleStruct->wildVictorySong++; } @@ -3628,7 +3639,7 @@ static void atk23_getexp(void) if (gBattleBufferB[gActiveBank][0] == CONTROLLER_TWORETURNVALUES && gBattleBufferB[gActiveBank][1] == RET_VALUE_LEVELLED_UP) { if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && gBattlePartyID[gActiveBank] == gBattleStruct->expGetterId) - sub_805E990(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank); + HandleLowHpMusicChange(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank); PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff1, gActiveBank, gBattleStruct->expGetterId) |