Skip to content

Commit

Permalink
Implemented Custom Battle Music Via Scripting - Anon822
Browse files Browse the repository at this point in the history
  • Loading branch information
laserXdolphin committed Jul 17, 2024
1 parent 0e82eab commit 9537499
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/constants/flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
#define FLAG_UNUSED_0x04C 0x4C // Unused Flag
#define FLAG_UNUSED_0x04D 0x4D // Unused Flag
#define FLAG_UNUSED_0x04E 0x4E // Unused Flag
#define FLAG_UNUSED_0x04F 0x4F // Unused Flag
#define FLAG_SYS_SET_BATTLE_BGM 0x4F // Unused Flag

// Scripts
#define FLAG_HIDE_SKY_PILLAR_TOP_RAYQUAZA_STILL 0x50
Expand Down
4 changes: 4 additions & 0 deletions src/pokemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -5391,6 +5391,10 @@ bool32 IsSpeciesInHoennDex(u16 species)

u16 GetBattleBGM(void)
{
if (FlagGet(FLAG_SYS_SET_BATTLE_BGM)){
FlagClear(FLAG_SYS_SET_BATTLE_BGM);
return VarGet(VAR_TEMP_F);
}
if (gBattleTypeFlags & BATTLE_TYPE_LEGENDARY)
{
switch (GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL))
Expand Down

0 comments on commit 9537499

Please sign in to comment.