Synced sound.c

This commit is contained in:
Eduardo Quezada
2022-07-29 16:17:40 -04:00
parent 78e3780fa4
commit dfe6c6885c
64 changed files with 643 additions and 599 deletions
+1 -1
View File
@@ -145,7 +145,7 @@
.byte 0xff, 0, 0xff, 0 .byte 0xff, 0, 0xff, 0
.endm .endm
.macro cry2 sample:req .macro cry_reverse sample:req
.byte 0x30, 60, 0, 0 .byte 0x30, 60, 0, 0
.4byte \sample .4byte \sample
.byte 0xff, 0, 0xff, 0 .byte 0xff, 0, 0xff, 0
+3 -2
View File
@@ -1,6 +1,7 @@
#include "constants/battle.h" #include "constants/battle.h"
#include "constants/battle_anim.h" #include "constants/battle_anim.h"
#include "constants/songs.h" #include "constants/songs.h"
#include "constants/sound.h"
#include "constants/moves.h" #include "constants/moves.h"
.include "asm/macros.inc" .include "asm/macros.inc"
.include "asm/macros/battle_anim_script.inc" .include "asm/macros/battle_anim_script.inc"
@@ -5068,7 +5069,7 @@ Move_ROAR::
monbg ANIM_ATTACKER monbg ANIM_ATTACKER
monbgprio_28 0 monbgprio_28 0
setalpha 8, 8 setalpha 8, 8
createvisualtask SoundTask_PlayDoubleCry, 2, 0, 2 createvisualtask SoundTask_PlayDoubleCry, 2, 0, DOUBLE_CRY_ROAR
createvisualtask AnimTask_ScaleMonAndRestore, 5, -5, -5, 10, 0, 1 createvisualtask AnimTask_ScaleMonAndRestore, 5, -5, -5, 10, 0, 1
call RoarEffect call RoarEffect
delay 20 delay 20
@@ -5093,7 +5094,7 @@ RoarEffect::
Move_GROWL:: Move_GROWL::
loadspritegfx ANIM_TAG_NOISE_LINE loadspritegfx ANIM_TAG_NOISE_LINE
createvisualtask SoundTask_PlayDoubleCry, 2, 0, 255 createvisualtask SoundTask_PlayDoubleCry, 2, 0, DOUBLE_CRY_GROWL
call RoarEffect call RoarEffect
delay 10 delay 10
createvisualtask AnimTask_ShakeMon2, 2, 1, 1, 0, 9, 1 createvisualtask AnimTask_ShakeMon2, 2, 1, 1, 0, 9, 1
+1
View File
@@ -10,6 +10,7 @@
#include "constants/pokemon.h" #include "constants/pokemon.h"
#include "constants/moves.h" #include "constants/moves.h"
#include "constants/songs.h" #include "constants/songs.h"
#include "constants/sound.h"
#include "constants/species.h" #include "constants/species.h"
#include "constants/vars.h" #include "constants/vars.h"
#include "constants/battle.h" #include "constants/battle.h"
+1 -1
View File
@@ -80,7 +80,7 @@ BirthIsland_Exterior_EventScript_Deoxys::
applymovement LOCALID_DEOXYS, Movement_DeoxysApproach applymovement LOCALID_DEOXYS, Movement_DeoxysApproach
waitmovement 0 waitmovement 0
waitse waitse
playmoncry SPECIES_DEOXYS, 2 playmoncry SPECIES_DEOXYS, CRY_MODE_ENCOUNTER
delay 40 delay 40
waitmoncry waitmoncry
setvar VAR_LAST_TALKED, LOCALID_DEOXYS setvar VAR_LAST_TALKED, LOCALID_DEOXYS
+1 -1
View File
@@ -45,7 +45,7 @@ CeladonCity_EventScript_Poliwrath::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_POLIWRATH, 0 playmoncry SPECIES_POLIWRATH, CRY_MODE_NORMAL
msgbox CeladonCity_Text_Poliwrath msgbox CeladonCity_Text_Poliwrath
closemessage closemessage
waitmoncry waitmoncry
@@ -32,7 +32,7 @@ CeladonCity_Condominiums_1F_EventScript_Meowth::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_MEOWTH, 0 playmoncry SPECIES_MEOWTH, CRY_MODE_NORMAL
msgbox CeladonCity_Condominiums_1F_Text_Meowth msgbox CeladonCity_Condominiums_1F_Text_Meowth
waitmoncry waitmoncry
release release
@@ -42,7 +42,7 @@ CeladonCity_Condominiums_1F_EventScript_Clefairy::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_CLEFAIRY, 0 playmoncry SPECIES_CLEFAIRY, CRY_MODE_NORMAL
msgbox CeladonCity_Condominiums_1F_Text_Clefairy msgbox CeladonCity_Condominiums_1F_Text_Clefairy
waitmoncry waitmoncry
release release
@@ -52,7 +52,7 @@ CeladonCity_Condominiums_1F_EventScript_Nidoran::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_NIDORAN_F, 0 playmoncry SPECIES_NIDORAN_F, CRY_MODE_NORMAL
msgbox CeladonCity_Condominiums_1F_Text_Nidoran msgbox CeladonCity_Condominiums_1F_Text_Nidoran
waitmoncry waitmoncry
release release
+1 -1
View File
@@ -28,7 +28,7 @@ CeruleanCave_B1F_EventScript_Mewtwo::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_MEWTWO, 2 playmoncry SPECIES_MEWTWO, CRY_MODE_ENCOUNTER
message CeruleanCave_B1F_Text_Mew message CeruleanCave_B1F_Text_Mew
waitmessage waitmessage
waitmoncry waitmoncry
@@ -62,7 +62,7 @@ FourIsland_IcefallCave_Back_EventScript_LoreleiRocketsScene::
message FourIsland_IcefallCave_Back_Text_LoreleiWellDeepFreezeYou message FourIsland_IcefallCave_Back_Text_LoreleiWellDeepFreezeYou
waitmessage waitmessage
waitse waitse
playmoncry SPECIES_LAPRAS, 2 playmoncry SPECIES_LAPRAS, CRY_MODE_ENCOUNTER
waitbuttonpress waitbuttonpress
waitmoncry waitmoncry
applymovement LOCALID_ROCKET1, FourIsland_IcefallCave_Back_Movement_Rocket1ReactToThreat applymovement LOCALID_ROCKET1, FourIsland_IcefallCave_Back_Movement_Rocket1ReactToThreat
@@ -36,7 +36,7 @@ FourIsland_PokemonDayCare_GiveMonToRaise::
goto_if_eq FourIsland_PokemonDayCare_OnlyOneAliveMonInParty goto_if_eq FourIsland_PokemonDayCare_OnlyOneAliveMonInParty
specialvar VAR_0x8005, GetSelectedMonNicknameAndSpecies specialvar VAR_0x8005, GetSelectedMonNicknameAndSpecies
waitse waitse
playmoncry VAR_0x8005, 0 playmoncry VAR_0x8005, CRY_MODE_NORMAL
msgbox DayCare_Text_WellRaiseYourMon msgbox DayCare_Text_WellRaiseYourMon
waitmoncry waitmoncry
special StoreSelectedPokemonInDaycare special StoreSelectedPokemonInDaycare
@@ -137,7 +137,7 @@ FourIsland_PokemonDayCare_RetrieveMon::
playse SE_RS_SHOP playse SE_RS_SHOP
msgbox DayCare_Text_HeresYourMon msgbox DayCare_Text_HeresYourMon
waitse waitse
playmoncry VAR_RESULT, 0 playmoncry VAR_RESULT, CRY_MODE_NORMAL
textcolor 3 textcolor 3
msgbox DayCare_Text_TookBackMon msgbox DayCare_Text_TookBackMon
call EventScript_RestorePrevTextColor call EventScript_RestorePrevTextColor
+1 -1
View File
@@ -18,7 +18,7 @@ LavenderTown_House1_EventScript_Cubone::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_CUBONE, 0 playmoncry SPECIES_CUBONE, CRY_MODE_NORMAL
msgbox LavenderTown_House1_Text_Cubone msgbox LavenderTown_House1_Text_Cubone
waitmoncry waitmoncry
release release
@@ -54,7 +54,7 @@ LavenderTown_VolunteerPokemonHouse_EventScript_Nidorino::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_NIDORINO, 0 playmoncry SPECIES_NIDORINO, CRY_MODE_NORMAL
msgbox LavenderTown_VolunteerPokemonHouse_Text_Nidorino msgbox LavenderTown_VolunteerPokemonHouse_Text_Nidorino
waitmoncry waitmoncry
release release
@@ -64,7 +64,7 @@ LavenderTown_VolunteerPokemonHouse_EventScript_Psyduck::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_PSYDUCK, 0 playmoncry SPECIES_PSYDUCK, CRY_MODE_NORMAL
msgbox LavenderTown_VolunteerPokemonHouse_Text_Psyduck msgbox LavenderTown_VolunteerPokemonHouse_Text_Psyduck
waitmoncry waitmoncry
release release
+1 -1
View File
@@ -29,7 +29,7 @@ MtEmber_Summit_EventScript_Moltres::
faceplayer faceplayer
setwildbattle SPECIES_MOLTRES, 50, ITEM_NONE setwildbattle SPECIES_MOLTRES, 50, ITEM_NONE
waitse waitse
playmoncry SPECIES_MOLTRES, 2 playmoncry SPECIES_MOLTRES, CRY_MODE_ENCOUNTER
message Text_Gyaoo message Text_Gyaoo
waitmessage waitmessage
waitmoncry waitmoncry
+1 -1
View File
@@ -53,7 +53,7 @@ NavelRock_Base_EventScript_Lugia::
delay 30 delay 30
delay 50 delay 50
waitse waitse
playmoncry SPECIES_LUGIA, 2 playmoncry SPECIES_LUGIA, CRY_MODE_ENCOUNTER
waitmoncry waitmoncry
delay 20 delay 20
setvar VAR_0x8004, SPECIES_LUGIA setvar VAR_0x8004, SPECIES_LUGIA
+1 -1
View File
@@ -49,7 +49,7 @@ NavelRock_Summit_EventScript_HoOh::
setweather 0 setweather 0
doweather doweather
waitse waitse
playmoncry SPECIES_HO_OH, 2 playmoncry SPECIES_HO_OH, CRY_MODE_ENCOUNTER
delay 30 delay 30
waitmoncry waitmoncry
delay 60 delay 60
+1 -1
View File
@@ -26,7 +26,7 @@ PewterCity_House1_EventScript_Nidoran::
PewterCity_House1_EventScript_DoNidoranCry:: PewterCity_House1_EventScript_DoNidoranCry::
textcolor 3 textcolor 3
waitse waitse
playmoncry SPECIES_NIDORAN_M, 0 playmoncry SPECIES_NIDORAN_M, CRY_MODE_NORMAL
msgbox PewterCity_House1_Text_Nidoran msgbox PewterCity_House1_Text_Nidoran
waitmoncry waitmoncry
call EventScript_RestorePrevTextColor call EventScript_RestorePrevTextColor
+1 -1
View File
@@ -21,7 +21,7 @@ PokemonTower_6F_EventScript_DefeatedMarowakGhost::
message PokemonTower_6F_Text_GhostWasCubonesMother message PokemonTower_6F_Text_GhostWasCubonesMother
waitmessage waitmessage
waitse waitse
playmoncry SPECIES_MAROWAK, 0 playmoncry SPECIES_MAROWAK, CRY_MODE_NORMAL
waitbuttonpress waitbuttonpress
waitmoncry waitmoncry
msgbox PokemonTower_6F_Text_MothersSpiritWasCalmed msgbox PokemonTower_6F_Text_MothersSpiritWasCalmed
+3 -3
View File
@@ -40,7 +40,7 @@ PowerPlant_EventScript_Zapdos::
faceplayer faceplayer
setwildbattle SPECIES_ZAPDOS, 50, ITEM_NONE setwildbattle SPECIES_ZAPDOS, 50, ITEM_NONE
waitse waitse
playmoncry SPECIES_ZAPDOS, 2 playmoncry SPECIES_ZAPDOS, CRY_MODE_ENCOUNTER
message Text_Gyaoo message Text_Gyaoo
waitmessage waitmessage
waitmoncry waitmoncry
@@ -78,7 +78,7 @@ PowerPlant_EventScript_Electrode1::
faceplayer faceplayer
setwildbattle SPECIES_ELECTRODE, 34, ITEM_NONE setwildbattle SPECIES_ELECTRODE, 34, ITEM_NONE
waitse waitse
playmoncry SPECIES_ELECTRODE, 2 playmoncry SPECIES_ELECTRODE, CRY_MODE_ENCOUNTER
delay 40 delay 40
waitmoncry waitmoncry
setflag FLAG_SYS_SPECIAL_WILD_BATTLE setflag FLAG_SYS_SPECIAL_WILD_BATTLE
@@ -107,7 +107,7 @@ PowerPlant_EventScript_Electrode2::
faceplayer faceplayer
setwildbattle SPECIES_ELECTRODE, 34, ITEM_NONE setwildbattle SPECIES_ELECTRODE, 34, ITEM_NONE
waitse waitse
playmoncry SPECIES_ELECTRODE, 2 playmoncry SPECIES_ELECTRODE, CRY_MODE_ENCOUNTER
delay 40 delay 40
waitmoncry waitmoncry
setflag FLAG_SYS_SPECIAL_WILD_BATTLE setflag FLAG_SYS_SPECIAL_WILD_BATTLE
+1 -1
View File
@@ -22,7 +22,7 @@ Route12_EventScript_Snorlax::
call EventScript_AwakenSnorlax call EventScript_AwakenSnorlax
setwildbattle SPECIES_SNORLAX, 30, ITEM_NONE setwildbattle SPECIES_SNORLAX, 30, ITEM_NONE
waitse waitse
playmoncry SPECIES_SNORLAX, 2 playmoncry SPECIES_SNORLAX, CRY_MODE_ENCOUNTER
delay 40 delay 40
waitmoncry waitmoncry
setflag FLAG_HIDE_ROUTE_12_SNORLAX setflag FLAG_HIDE_ROUTE_12_SNORLAX
+1 -1
View File
@@ -41,7 +41,7 @@ Route16_EventScript_Snorlax::
call EventScript_AwakenSnorlax call EventScript_AwakenSnorlax
setwildbattle SPECIES_SNORLAX, 30, ITEM_NONE setwildbattle SPECIES_SNORLAX, 30, ITEM_NONE
waitse waitse
playmoncry SPECIES_SNORLAX, 2 playmoncry SPECIES_SNORLAX, CRY_MODE_ENCOUNTER
delay 40 delay 40
waitmoncry waitmoncry
setflag FLAG_HIDE_ROUTE_16_SNORLAX setflag FLAG_HIDE_ROUTE_16_SNORLAX
+1 -1
View File
@@ -29,7 +29,7 @@ Route16_House_EventScript_Fearow::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_FEAROW, 0 playmoncry SPECIES_FEAROW, CRY_MODE_NORMAL
msgbox Route16_House_Text_Fearow msgbox Route16_House_Text_Fearow
waitmoncry waitmoncry
release release
+1 -1
View File
@@ -13,7 +13,7 @@ SSAnne_1F_Room3_EventScript_Wigglytuff::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_WIGGLYTUFF, 0 playmoncry SPECIES_WIGGLYTUFF, CRY_MODE_NORMAL
msgbox SSAnne_1F_Room3_Text_Wigglytuff msgbox SSAnne_1F_Room3_Text_Wigglytuff
waitmoncry waitmoncry
release release
+1 -1
View File
@@ -9,7 +9,7 @@ SSAnne_B1F_Room5_EventScript_Machoke::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_MACHOKE, 0 playmoncry SPECIES_MACHOKE, CRY_MODE_NORMAL
msgbox SSAnne_B1F_Room5_Text_Machoke msgbox SSAnne_B1F_Room5_Text_Machoke
waitmoncry waitmoncry
release release
+1 -1
View File
@@ -76,7 +76,7 @@ SaffronCity_EventScript_Pidgeot::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_PIDGEOT, 0 playmoncry SPECIES_PIDGEOT, CRY_MODE_NORMAL
msgbox SaffronCity_Text_Pidgeot msgbox SaffronCity_Text_Pidgeot
waitmoncry waitmoncry
release release
@@ -13,7 +13,7 @@ SaffronCity_CopycatsHouse_1F_EventScript_Chansey::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_CHANSEY, 0 playmoncry SPECIES_CHANSEY, CRY_MODE_NORMAL
msgbox SaffronCity_CopycatsHouse_1F_Text_Chansey msgbox SaffronCity_CopycatsHouse_1F_Text_Chansey
waitmoncry waitmoncry
release release
@@ -5,7 +5,7 @@ SaffronCity_CopycatsHouse_2F_EventScript_Doduo::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_DODUO, 0 playmoncry SPECIES_DODUO, CRY_MODE_NORMAL
msgbox SaffronCity_CopycatsHouse_2F_Text_Doduo msgbox SaffronCity_CopycatsHouse_2F_Text_Doduo
waitmoncry waitmoncry
release release
+1 -1
View File
@@ -13,7 +13,7 @@ SaffronCity_House_EventScript_Pidgey::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_PIDGEY, 0 playmoncry SPECIES_PIDGEY, CRY_MODE_NORMAL
msgbox SaffronCity_House_Text_Pidgey msgbox SaffronCity_House_Text_Pidgey
waitmoncry waitmoncry
release release
+1 -1
View File
@@ -164,7 +164,7 @@ SeafoamIslands_B4F_EventScript_Articuno::
faceplayer faceplayer
setwildbattle SPECIES_ARTICUNO, 50, ITEM_NONE setwildbattle SPECIES_ARTICUNO, 50, ITEM_NONE
waitse waitse
playmoncry SPECIES_ARTICUNO, 2 playmoncry SPECIES_ARTICUNO, CRY_MODE_ENCOUNTER
message Text_Gyaoo message Text_Gyaoo
waitmessage waitmessage
waitmoncry waitmoncry
@@ -76,7 +76,7 @@ SevenIsland_SevaultCanyon_House_EventScript_Chansey::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_CHANSEY, 0 playmoncry SPECIES_CHANSEY, CRY_MODE_NORMAL
msgbox SevenIsland_SevaultCanyon_House_Text_Chansey msgbox SevenIsland_SevaultCanyon_House_Text_Chansey
waitmoncry waitmoncry
release release
+1 -1
View File
@@ -404,7 +404,7 @@ ThreeIsland_EventScript_Doduo::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_DODUO, 0 playmoncry SPECIES_DODUO, CRY_MODE_NORMAL
msgbox ThreeIsland_Text_Doduo msgbox ThreeIsland_Text_Doduo
waitmoncry waitmoncry
release release
@@ -21,7 +21,7 @@ ThreeIsland_BerryForest_EventScript_Lostelle::
msgbox ThreeIsland_BerryForest_Text_HereItComesAgain msgbox ThreeIsland_BerryForest_Text_HereItComesAgain
goto_if_questlog EventScript_ReleaseEnd goto_if_questlog EventScript_ReleaseEnd
waitse waitse
playmoncry SPECIES_HYPNO, 2 playmoncry SPECIES_HYPNO, CRY_MODE_ENCOUNTER
waitmoncry waitmoncry
setwildbattle SPECIES_HYPNO, 30, ITEM_NONE setwildbattle SPECIES_HYPNO, 30, ITEM_NONE
dowildbattle dowildbattle
+1 -1
View File
@@ -249,7 +249,7 @@ VermilionCity_EventScript_Machop::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_MACHOP, 0 playmoncry SPECIES_MACHOP, CRY_MODE_NORMAL
msgbox VermilionCity_Text_Machop msgbox VermilionCity_Text_Machop
waitmoncry waitmoncry
msgbox VermilionCity_Text_MachopStompingLandFlat msgbox VermilionCity_Text_MachopStompingLandFlat
+1 -1
View File
@@ -13,7 +13,7 @@ VermilionCity_House3_EventScript_Pidgey::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_PIDGEY, 0 playmoncry SPECIES_PIDGEY, CRY_MODE_NORMAL
msgbox VermilionCity_House3_Text_Pidgey msgbox VermilionCity_House3_Text_Pidgey
waitmoncry waitmoncry
release release
@@ -99,7 +99,7 @@ VermilionCity_PokemonFanClub_EventScript_Pikachu::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_PIKACHU, 0 playmoncry SPECIES_PIKACHU, CRY_MODE_NORMAL
msgbox VermilionCity_PokemonFanClub_Text_Pikachu msgbox VermilionCity_PokemonFanClub_Text_Pikachu
waitmoncry waitmoncry
release release
@@ -109,7 +109,7 @@ VermilionCity_PokemonFanClub_EventScript_Seel::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_SEEL, 0 playmoncry SPECIES_SEEL, CRY_MODE_NORMAL
msgbox VermilionCity_PokemonFanClub_Text_Seel msgbox VermilionCity_PokemonFanClub_Text_Seel
waitmoncry waitmoncry
release release
+1 -1
View File
@@ -13,7 +13,7 @@ ViridianCity_House1_EventScript_Speary::
lock lock
faceplayer faceplayer
waitse waitse
playmoncry SPECIES_SPEAROW, 0 playmoncry SPECIES_SPEAROW, CRY_MODE_NORMAL
msgbox ViridianCity_House1_Text_Speary msgbox ViridianCity_House1_Text_Speary
waitmoncry waitmoncry
release release
+2 -2
View File
@@ -31,7 +31,7 @@ Route5_PokemonDayCare_EventScript_TryGiveMon::
specialvar VAR_0x8005, GetSelectedMonNicknameAndSpecies specialvar VAR_0x8005, GetSelectedMonNicknameAndSpecies
msgbox Route5_PokemonDayCare_Text_LookAfterMonForAWhile msgbox Route5_PokemonDayCare_Text_LookAfterMonForAWhile
waitse waitse
playmoncry VAR_0x8005, 0 playmoncry VAR_0x8005, CRY_MODE_NORMAL
msgbox Route5_PokemonDayCare_Text_ComeSeeMeInAWhile msgbox Route5_PokemonDayCare_Text_ComeSeeMeInAWhile
waitmoncry waitmoncry
special PutMonInRoute5Daycare special PutMonInRoute5Daycare
@@ -100,7 +100,7 @@ Route5_PokemonDayCare_EventScript_RetrieveMon::
msgbox Route5_PokemonDayCare_Text_ThankYouHeresMon msgbox Route5_PokemonDayCare_Text_ThankYouHeresMon
textcolor 3 textcolor 3
waitse waitse
playmoncry VAR_RESULT, 0 playmoncry VAR_RESULT, CRY_MODE_NORMAL
msgbox Route5_PokemonDayCare_Text_PlayerGotMonBack msgbox Route5_PokemonDayCare_Text_PlayerGotMonBack
call EventScript_RestorePrevTextColor call EventScript_RestorePrevTextColor
waitmoncry waitmoncry
-22
View File
@@ -1,22 +0,0 @@
#ifndef GUARD_CONSTANTS_FANFARES_H
#define GUARD_CONSTANTS_FANFARES_H
enum Fanfares
{
FANFARE_00,
FANFARE_01,
FANFARE_02,
FANFARE_03,
FANFARE_04,
FANFARE_05,
FANFARE_06,
FANFARE_07,
FANFARE_08,
FANFARE_09,
FANFARE_10,
FANFARE_POKEFLUTE,
FANFARE_KEY_ITEM,
FANFARE_DEX_EVAL
};
#endif //GUARD_CONSTANTS_FANFARES_H
+2
View File
@@ -353,4 +353,6 @@
#define MUS_SLOW_PALLET 345 // MUS_RG_SLOWMASARA #define MUS_SLOW_PALLET 345 // MUS_RG_SLOWMASARA
#define MUS_TEACHY_TV_MENU 346 // MUS_RG_TVNOIZE #define MUS_TEACHY_TV_MENU 346 // MUS_RG_TVNOIZE
#define MUS_NONE 0xFFFF
#endif // GUARD_CONSTANTS_SONGS_H #endif // GUARD_CONSTANTS_SONGS_H
+44
View File
@@ -0,0 +1,44 @@
#ifndef GUARD_CONSTANTS_SOUND_H
#define GUARD_CONSTANTS_SOUND_H
#define FANFARE_LEVEL_UP 0
#define FANFARE_OBTAIN_ITEM 1
#define FANFARE_EVOLVED 2
#define FANFARE_OBTAIN_TMHM 3
#define FANFARE_HEAL 4
#define FANFARE_OBTAIN_BADGE 5
#define FANFARE_MOVE_DELETED 6
#define FANFARE_OBTAIN_BERRY 7
#define FANFARE_SLOTS_JACKPOT 8
#define FANFARE_SLOTS_WIN 9
#define FANFARE_TOO_BAD 10
#define FANFARE_POKE_FLUTE 11
#define FANFARE_KEY_ITEM 12
#define FANFARE_DEX_EVAL 13
#define CRY_MODE_NORMAL 0 // Default
#define CRY_MODE_DOUBLES 1 // Shortened cry for double battles
#define CRY_MODE_ENCOUNTER 2 // Used when starting a static encounter, or when a Pokémon is "aggressive"
#define CRY_MODE_HIGH_PITCH 3 // Highest pitch mode, used exclusively by the move Howl
#define CRY_MODE_ECHO_START 4 // For 1st half of cry used by the move Hyper Voice. Played in reverse
#define CRY_MODE_FAINT 5 // Used when a Pokémon faints
#define CRY_MODE_ECHO_END 6 // For 2nd half of cry used by the move Hyper Voice
#define CRY_MODE_ROAR_1 7 // For 1st cry used by the move Roar
#define CRY_MODE_ROAR_2 8 // For 2nd cry used by the move Roar
#define CRY_MODE_GROWL_1 9 // For 1st cry used by the move Growl. Played in reverse
#define CRY_MODE_GROWL_2 10 // For 2nd cry used by the move Growl
#define CRY_MODE_WEAK 11 // Used when a Pokémon is unhealthy
#define CRY_MODE_WEAK_DOUBLES 12 // Equivalent to CRY_MODE_DOUBLES for CRY_MODE_WEAK
// Given to SoundTask_PlayDoubleCry to determine which cry mode to use. Values are arbitrary
#define DOUBLE_CRY_ROAR 2
#define DOUBLE_CRY_GROWL 255
#define CRY_PRIORITY_NORMAL 10
#define CRY_PRIORITY_AMBIENT 1
// Cry volume was changed from 125 in R/S to 120 for FRLG/Em, but was (accidentally?) not updated outside of sound.c
#define CRY_VOLUME 120
#define CRY_VOLUME_RS 125
#endif //GUARD_CONSTANTS_SOUND_H
+2
View File
@@ -313,6 +313,8 @@ struct MusicPlayerTrack
#define MAX_MUSICPLAYER_TRACKS 16 #define MAX_MUSICPLAYER_TRACKS 16
#define TRACKS_ALL 0xFFFF
#define TEMPORARY_FADE 0x0001 #define TEMPORARY_FADE 0x0001
#define FADE_IN 0x0002 #define FADE_IN 0x0002
#define FADE_VOL_MAX 64 #define FADE_VOL_MAX 64
+4 -6
View File
@@ -25,12 +25,10 @@ void FadeInBGM(u8 speed);
void FadeOutBGM(u8 speed); void FadeOutBGM(u8 speed);
bool8 IsBGMStopped(void); bool8 IsBGMStopped(void);
void PlayCry_Normal(u16 species, s8 pan); void PlayCry_Normal(u16 species, s8 pan);
void PlayCry2(u16 species, s8 pan, s8 volume, u8 priority); void PlayCry_NormalNoDucking(u16 species, s8 pan, s8 volume, u8 priority);
void PlayCry3(u16 species, s8 pan, u8 mode); void PlayCry_ByMode(u16 species, s8 pan, u8 mode);
void PlayCry4(u16 species, s8 pan, u8 mode); void PlayCry_ReleaseDouble(u16 species, s8 pan, u8 mode);
void PlayCry5(u16 species, u8 mode); void PlayCry_Script(u16 species, u8 mode);
void PlayCry6(u16 species, s8 pan, u8 mode);
void PlayCry7(u16 species, u8 mode);
void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode); void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode);
bool8 IsCryFinished(void); bool8 IsCryFinished(void);
void StopCryAndClearCrySongs(void); void StopCryAndClearCrySongs(void);
+389 -389
View File
@@ -1383,395 +1383,395 @@ gCryTable::
cry Cry_Deoxys cry Cry_Deoxys
cry Cry_Chimecho cry Cry_Chimecho
gCryTable2:: gCryTable_Reverse::
cry2 Cry_Bulbasaur cry_reverse Cry_Bulbasaur
cry2 Cry_Ivysaur cry_reverse Cry_Ivysaur
cry2 Cry_Venusaur cry_reverse Cry_Venusaur
cry2 Cry_Charmander cry_reverse Cry_Charmander
cry2 Cry_Charmeleon cry_reverse Cry_Charmeleon
cry2 Cry_Charizard cry_reverse Cry_Charizard
cry2 Cry_Squirtle cry_reverse Cry_Squirtle
cry2 Cry_Wartortle cry_reverse Cry_Wartortle
cry2 Cry_Blastoise cry_reverse Cry_Blastoise
cry2 Cry_Caterpie cry_reverse Cry_Caterpie
cry2 Cry_Metapod cry_reverse Cry_Metapod
cry2 Cry_Butterfree cry_reverse Cry_Butterfree
cry2 Cry_Weedle cry_reverse Cry_Weedle
cry2 Cry_Kakuna cry_reverse Cry_Kakuna
cry2 Cry_Beedrill cry_reverse Cry_Beedrill
cry2 Cry_Pidgey cry_reverse Cry_Pidgey
cry2 Cry_Pidgeotto cry_reverse Cry_Pidgeotto
cry2 Cry_Pidgeot cry_reverse Cry_Pidgeot
cry2 Cry_Rattata cry_reverse Cry_Rattata
cry2 Cry_Raticate cry_reverse Cry_Raticate
cry2 Cry_Spearow cry_reverse Cry_Spearow
cry2 Cry_Fearow cry_reverse Cry_Fearow
cry2 Cry_Ekans cry_reverse Cry_Ekans
cry2 Cry_Arbok cry_reverse Cry_Arbok
cry2 Cry_Pikachu cry_reverse Cry_Pikachu
cry2 Cry_Raichu cry_reverse Cry_Raichu
cry2 Cry_Sandshrew cry_reverse Cry_Sandshrew
cry2 Cry_Sandslash cry_reverse Cry_Sandslash
cry2 Cry_NidoranF cry_reverse Cry_NidoranF
cry2 Cry_Nidorina cry_reverse Cry_Nidorina
cry2 Cry_Nidoqueen cry_reverse Cry_Nidoqueen
cry2 Cry_NidoranM cry_reverse Cry_NidoranM
cry2 Cry_Nidorino cry_reverse Cry_Nidorino
cry2 Cry_Nidoking cry_reverse Cry_Nidoking
cry2 Cry_Clefairy cry_reverse Cry_Clefairy
cry2 Cry_Clefable cry_reverse Cry_Clefable
cry2 Cry_Vulpix cry_reverse Cry_Vulpix
cry2 Cry_Ninetales cry_reverse Cry_Ninetales
cry2 Cry_Jigglypuff cry_reverse Cry_Jigglypuff
cry2 Cry_Wigglytuff cry_reverse Cry_Wigglytuff
cry2 Cry_Zubat cry_reverse Cry_Zubat
cry2 Cry_Golbat cry_reverse Cry_Golbat
cry2 Cry_Oddish cry_reverse Cry_Oddish
cry2 Cry_Gloom cry_reverse Cry_Gloom
cry2 Cry_Vileplume cry_reverse Cry_Vileplume
cry2 Cry_Paras cry_reverse Cry_Paras
cry2 Cry_Parasect cry_reverse Cry_Parasect
cry2 Cry_Venonat cry_reverse Cry_Venonat
cry2 Cry_Venomoth cry_reverse Cry_Venomoth
cry2 Cry_Diglett cry_reverse Cry_Diglett
cry2 Cry_Dugtrio cry_reverse Cry_Dugtrio
cry2 Cry_Meowth cry_reverse Cry_Meowth
cry2 Cry_Persian cry_reverse Cry_Persian
cry2 Cry_Psyduck cry_reverse Cry_Psyduck
cry2 Cry_Golduck cry_reverse Cry_Golduck
cry2 Cry_Mankey cry_reverse Cry_Mankey
cry2 Cry_Primeape cry_reverse Cry_Primeape
cry2 Cry_Growlithe cry_reverse Cry_Growlithe
cry2 Cry_Arcanine cry_reverse Cry_Arcanine
cry2 Cry_Poliwag cry_reverse Cry_Poliwag
cry2 Cry_Poliwhirl cry_reverse Cry_Poliwhirl
cry2 Cry_Poliwrath cry_reverse Cry_Poliwrath
cry2 Cry_Abra cry_reverse Cry_Abra
cry2 Cry_Kadabra cry_reverse Cry_Kadabra
cry2 Cry_Alakazam cry_reverse Cry_Alakazam
cry2 Cry_Machop cry_reverse Cry_Machop
cry2 Cry_Machoke cry_reverse Cry_Machoke
cry2 Cry_Machamp cry_reverse Cry_Machamp
cry2 Cry_Bellsprout cry_reverse Cry_Bellsprout
cry2 Cry_Weepinbell cry_reverse Cry_Weepinbell
cry2 Cry_Victreebel cry_reverse Cry_Victreebel
cry2 Cry_Tentacool cry_reverse Cry_Tentacool
cry2 Cry_Tentacruel cry_reverse Cry_Tentacruel
cry2 Cry_Geodude cry_reverse Cry_Geodude
cry2 Cry_Graveler cry_reverse Cry_Graveler
cry2 Cry_Golem cry_reverse Cry_Golem
cry2 Cry_Ponyta cry_reverse Cry_Ponyta
cry2 Cry_Rapidash cry_reverse Cry_Rapidash
cry2 Cry_Slowpoke cry_reverse Cry_Slowpoke
cry2 Cry_Slowbro cry_reverse Cry_Slowbro
cry2 Cry_Magnemite cry_reverse Cry_Magnemite
cry2 Cry_Magneton cry_reverse Cry_Magneton
cry2 Cry_Farfetchd cry_reverse Cry_Farfetchd
cry2 Cry_Doduo cry_reverse Cry_Doduo
cry2 Cry_Dodrio cry_reverse Cry_Dodrio
cry2 Cry_Seel cry_reverse Cry_Seel
cry2 Cry_Dewgong cry_reverse Cry_Dewgong
cry2 Cry_Grimer cry_reverse Cry_Grimer
cry2 Cry_Muk cry_reverse Cry_Muk
cry2 Cry_Shellder cry_reverse Cry_Shellder
cry2 Cry_Cloyster cry_reverse Cry_Cloyster
cry2 Cry_Gastly cry_reverse Cry_Gastly
cry2 Cry_Haunter cry_reverse Cry_Haunter
cry2 Cry_Gengar cry_reverse Cry_Gengar
cry2 Cry_Onix cry_reverse Cry_Onix
cry2 Cry_Drowzee cry_reverse Cry_Drowzee
cry2 Cry_Hypno cry_reverse Cry_Hypno
cry2 Cry_Krabby cry_reverse Cry_Krabby
cry2 Cry_Kingler cry_reverse Cry_Kingler
cry2 Cry_Voltorb cry_reverse Cry_Voltorb
cry2 Cry_Electrode cry_reverse Cry_Electrode
cry2 Cry_Exeggcute cry_reverse Cry_Exeggcute
cry2 Cry_Exeggutor cry_reverse Cry_Exeggutor
cry2 Cry_Cubone cry_reverse Cry_Cubone
cry2 Cry_Marowak cry_reverse Cry_Marowak
cry2 Cry_Hitmonlee cry_reverse Cry_Hitmonlee
cry2 Cry_Hitmonchan cry_reverse Cry_Hitmonchan
cry2 Cry_Lickitung cry_reverse Cry_Lickitung
cry2 Cry_Koffing cry_reverse Cry_Koffing
cry2 Cry_Weezing cry_reverse Cry_Weezing
cry2 Cry_Rhyhorn cry_reverse Cry_Rhyhorn
cry2 Cry_Rhydon cry_reverse Cry_Rhydon
cry2 Cry_Chansey cry_reverse Cry_Chansey
cry2 Cry_Tangela cry_reverse Cry_Tangela
cry2 Cry_Kangaskhan cry_reverse Cry_Kangaskhan
cry2 Cry_Horsea cry_reverse Cry_Horsea
cry2 Cry_Seadra cry_reverse Cry_Seadra
cry2 Cry_Goldeen cry_reverse Cry_Goldeen
cry2 Cry_Seaking cry_reverse Cry_Seaking
cry2 Cry_Staryu cry_reverse Cry_Staryu
cry2 Cry_Starmie cry_reverse Cry_Starmie
cry2 Cry_MrMime cry_reverse Cry_MrMime
cry2 Cry_Scyther cry_reverse Cry_Scyther
cry2 Cry_Jynx cry_reverse Cry_Jynx
cry2 Cry_Electabuzz cry_reverse Cry_Electabuzz
cry2 Cry_Magmar cry_reverse Cry_Magmar
cry2 Cry_Pinsir cry_reverse Cry_Pinsir
cry2 Cry_Tauros cry_reverse Cry_Tauros
cry2 Cry_Magikarp cry_reverse Cry_Magikarp
cry2 Cry_Gyarados cry_reverse Cry_Gyarados
cry2 Cry_Lapras cry_reverse Cry_Lapras
cry2 Cry_Ditto cry_reverse Cry_Ditto
cry2 Cry_Eevee cry_reverse Cry_Eevee
cry2 Cry_Vaporeon cry_reverse Cry_Vaporeon
cry2 Cry_Jolteon cry_reverse Cry_Jolteon
cry2 Cry_Flareon cry_reverse Cry_Flareon
cry2 Cry_Porygon cry_reverse Cry_Porygon
cry2 Cry_Omanyte cry_reverse Cry_Omanyte
cry2 Cry_Omastar cry_reverse Cry_Omastar
cry2 Cry_Kabuto cry_reverse Cry_Kabuto
cry2 Cry_Kabutops cry_reverse Cry_Kabutops
cry2 Cry_Aerodactyl cry_reverse Cry_Aerodactyl
cry2 Cry_Snorlax cry_reverse Cry_Snorlax
cry2 Cry_Articuno cry_reverse Cry_Articuno
cry2 Cry_Zapdos cry_reverse Cry_Zapdos
cry2 Cry_Moltres cry_reverse Cry_Moltres
cry2 Cry_Dratini cry_reverse Cry_Dratini
cry2 Cry_Dragonair cry_reverse Cry_Dragonair
cry2 Cry_Dragonite cry_reverse Cry_Dragonite
cry2 Cry_Mewtwo cry_reverse Cry_Mewtwo
cry2 Cry_Mew cry_reverse Cry_Mew
cry2 Cry_Chikorita cry_reverse Cry_Chikorita
cry2 Cry_Bayleef cry_reverse Cry_Bayleef
cry2 Cry_Meganium cry_reverse Cry_Meganium
cry2 Cry_Cyndaquil cry_reverse Cry_Cyndaquil
cry2 Cry_Quilava cry_reverse Cry_Quilava
cry2 Cry_Typhlosion cry_reverse Cry_Typhlosion
cry2 Cry_Totodile cry_reverse Cry_Totodile
cry2 Cry_Croconaw cry_reverse Cry_Croconaw
cry2 Cry_Feraligatr cry_reverse Cry_Feraligatr
cry2 Cry_Sentret cry_reverse Cry_Sentret
cry2 Cry_Furret cry_reverse Cry_Furret
cry2 Cry_Hoothoot cry_reverse Cry_Hoothoot
cry2 Cry_Noctowl cry_reverse Cry_Noctowl
cry2 Cry_Ledyba cry_reverse Cry_Ledyba
cry2 Cry_Ledian cry_reverse Cry_Ledian
cry2 Cry_Spinarak cry_reverse Cry_Spinarak
cry2 Cry_Ariados cry_reverse Cry_Ariados
cry2 Cry_Crobat cry_reverse Cry_Crobat
cry2 Cry_Chinchou cry_reverse Cry_Chinchou
cry2 Cry_Lanturn cry_reverse Cry_Lanturn
cry2 Cry_Pichu cry_reverse Cry_Pichu
cry2 Cry_Cleffa cry_reverse Cry_Cleffa
cry2 Cry_Igglybuff cry_reverse Cry_Igglybuff
cry2 Cry_Togepi cry_reverse Cry_Togepi
cry2 Cry_Togetic cry_reverse Cry_Togetic
cry2 Cry_Natu cry_reverse Cry_Natu
cry2 Cry_Xatu cry_reverse Cry_Xatu
cry2 Cry_Mareep cry_reverse Cry_Mareep
cry2 Cry_Flaaffy cry_reverse Cry_Flaaffy
cry2 Cry_Ampharos cry_reverse Cry_Ampharos
cry2 Cry_Bellossom cry_reverse Cry_Bellossom
cry2 Cry_Marill cry_reverse Cry_Marill
cry2 Cry_Azumarill cry_reverse Cry_Azumarill
cry2 Cry_Sudowoodo cry_reverse Cry_Sudowoodo
cry2 Cry_Politoed cry_reverse Cry_Politoed
cry2 Cry_Hoppip cry_reverse Cry_Hoppip
cry2 Cry_Skiploom cry_reverse Cry_Skiploom
cry2 Cry_Jumpluff cry_reverse Cry_Jumpluff
cry2 Cry_Aipom cry_reverse Cry_Aipom
cry2 Cry_Sunkern cry_reverse Cry_Sunkern
cry2 Cry_Sunflora cry_reverse Cry_Sunflora
cry2 Cry_Yanma cry_reverse Cry_Yanma
cry2 Cry_Wooper cry_reverse Cry_Wooper
cry2 Cry_Quagsire cry_reverse Cry_Quagsire
cry2 Cry_Espeon cry_reverse Cry_Espeon
cry2 Cry_Umbreon cry_reverse Cry_Umbreon
cry2 Cry_Murkrow cry_reverse Cry_Murkrow
cry2 Cry_Slowking cry_reverse Cry_Slowking
cry2 Cry_Misdreavus cry_reverse Cry_Misdreavus
cry2 Cry_Unown cry_reverse Cry_Unown
cry2 Cry_Wobbuffet cry_reverse Cry_Wobbuffet
cry2 Cry_Girafarig cry_reverse Cry_Girafarig
cry2 Cry_Pineco cry_reverse Cry_Pineco
cry2 Cry_Forretress cry_reverse Cry_Forretress
cry2 Cry_Dunsparce cry_reverse Cry_Dunsparce
cry2 Cry_Gligar cry_reverse Cry_Gligar
cry2 Cry_Steelix cry_reverse Cry_Steelix
cry2 Cry_Snubbull cry_reverse Cry_Snubbull
cry2 Cry_Granbull cry_reverse Cry_Granbull
cry2 Cry_Qwilfish cry_reverse Cry_Qwilfish
cry2 Cry_Scizor cry_reverse Cry_Scizor
cry2 Cry_Shuckle cry_reverse Cry_Shuckle
cry2 Cry_Heracross cry_reverse Cry_Heracross
cry2 Cry_Sneasel cry_reverse Cry_Sneasel
cry2 Cry_Teddiursa cry_reverse Cry_Teddiursa
cry2 Cry_Ursaring cry_reverse Cry_Ursaring
cry2 Cry_Slugma cry_reverse Cry_Slugma
cry2 Cry_Magcargo cry_reverse Cry_Magcargo
cry2 Cry_Swinub cry_reverse Cry_Swinub
cry2 Cry_Piloswine cry_reverse Cry_Piloswine
cry2 Cry_Corsola cry_reverse Cry_Corsola
cry2 Cry_Remoraid cry_reverse Cry_Remoraid
cry2 Cry_Octillery cry_reverse Cry_Octillery
cry2 Cry_Delibird cry_reverse Cry_Delibird
cry2 Cry_Mantine cry_reverse Cry_Mantine
cry2 Cry_Skarmory cry_reverse Cry_Skarmory
cry2 Cry_Houndour cry_reverse Cry_Houndour
cry2 Cry_Houndoom cry_reverse Cry_Houndoom
cry2 Cry_Kingdra cry_reverse Cry_Kingdra
cry2 Cry_Phanpy cry_reverse Cry_Phanpy
cry2 Cry_Donphan cry_reverse Cry_Donphan
cry2 Cry_Porygon2 cry_reverse Cry_Porygon2
cry2 Cry_Stantler cry_reverse Cry_Stantler
cry2 Cry_Smeargle cry_reverse Cry_Smeargle
cry2 Cry_Tyrogue cry_reverse Cry_Tyrogue
cry2 Cry_Hitmontop cry_reverse Cry_Hitmontop
cry2 Cry_Smoochum cry_reverse Cry_Smoochum
cry2 Cry_Elekid cry_reverse Cry_Elekid
cry2 Cry_Magby cry_reverse Cry_Magby
cry2 Cry_Miltank cry_reverse Cry_Miltank
cry2 Cry_Blissey cry_reverse Cry_Blissey
cry2 Cry_Raikou cry_reverse Cry_Raikou
cry2 Cry_Entei cry_reverse Cry_Entei
cry2 Cry_Suicune cry_reverse Cry_Suicune
cry2 Cry_Larvitar cry_reverse Cry_Larvitar
cry2 Cry_Pupitar cry_reverse Cry_Pupitar
cry2 Cry_Tyranitar cry_reverse Cry_Tyranitar
cry2 Cry_Lugia cry_reverse Cry_Lugia
cry2 Cry_HoOh cry_reverse Cry_HoOh
cry2 Cry_Celebi cry_reverse Cry_Celebi
cry2 Cry_Kecleon cry_reverse Cry_Kecleon
cry2 Cry_Roselia cry_reverse Cry_Roselia
cry2 Cry_Torkoal cry_reverse Cry_Torkoal
cry2 Cry_Electrike cry_reverse Cry_Electrike
cry2 Cry_Manectric cry_reverse Cry_Manectric
cry2 Cry_Duskull cry_reverse Cry_Duskull
cry2 Cry_Latias cry_reverse Cry_Latias
cry2 Cry_Wynaut cry_reverse Cry_Wynaut
cry2 Cry_Seviper cry_reverse Cry_Seviper
cry2 Cry_Sharpedo cry_reverse Cry_Sharpedo
cry2 Cry_Zangoose cry_reverse Cry_Zangoose
cry2 Cry_Azurill cry_reverse Cry_Azurill
cry2 Cry_Swablu cry_reverse Cry_Swablu
cry2 Cry_Altaria cry_reverse Cry_Altaria
cry2 Cry_Unused265 cry_reverse Cry_Unused265
cry2 Cry_Taillow cry_reverse Cry_Taillow
cry2 Cry_Swellow cry_reverse Cry_Swellow
cry2 Cry_Unused268 cry_reverse Cry_Unused268
cry2 Cry_Spinda cry_reverse Cry_Spinda
cry2 Cry_Torchic cry_reverse Cry_Torchic
cry2 Cry_Combusken cry_reverse Cry_Combusken
cry2 Cry_Blaziken cry_reverse Cry_Blaziken
cry2 Cry_Treecko cry_reverse Cry_Treecko
cry2 Cry_Grovyle cry_reverse Cry_Grovyle
cry2 Cry_Sceptile cry_reverse Cry_Sceptile
cry2 Cry_Mudkip cry_reverse Cry_Mudkip
cry2 Cry_Marshtomp cry_reverse Cry_Marshtomp
cry2 Cry_Swampert cry_reverse Cry_Swampert
cry2 Cry_Pelipper cry_reverse Cry_Pelipper
cry2 Cry_Wingull cry_reverse Cry_Wingull
cry2 Cry_Banette cry_reverse Cry_Banette
cry2 Cry_Shuppet cry_reverse Cry_Shuppet
cry2 Cry_Lotad cry_reverse Cry_Lotad
cry2 Cry_Lombre cry_reverse Cry_Lombre
cry2 Cry_Ludicolo cry_reverse Cry_Ludicolo
cry2 Cry_Seedot cry_reverse Cry_Seedot
cry2 Cry_Nuzleaf cry_reverse Cry_Nuzleaf
cry2 Cry_Shiftry cry_reverse Cry_Shiftry
cry2 Cry_Carvanha cry_reverse Cry_Carvanha
cry2 Cry_Wurmple cry_reverse Cry_Wurmple
cry2 Cry_Silcoon cry_reverse Cry_Silcoon
cry2 Cry_Beautifly cry_reverse Cry_Beautifly
cry2 Cry_Cascoon cry_reverse Cry_Cascoon
cry2 Cry_Dustox cry_reverse Cry_Dustox
cry2 Cry_Ralts cry_reverse Cry_Ralts
cry2 Cry_Kirlia cry_reverse Cry_Kirlia
cry2 Cry_Gardevoir cry_reverse Cry_Gardevoir
cry2 Cry_Slakoth cry_reverse Cry_Slakoth
cry2 Cry_Vigoroth cry_reverse Cry_Vigoroth
cry2 Cry_Slaking cry_reverse Cry_Slaking
cry2 Cry_Nincada cry_reverse Cry_Nincada
cry2 Cry_Ninjask cry_reverse Cry_Ninjask
cry2 Cry_Shedinja cry_reverse Cry_Shedinja
cry2 Cry_Makuhita cry_reverse Cry_Makuhita
cry2 Cry_Hariyama cry_reverse Cry_Hariyama
cry2 Cry_Nosepass cry_reverse Cry_Nosepass
cry2 Cry_Glalie cry_reverse Cry_Glalie
cry2 Cry_Plusle cry_reverse Cry_Plusle
cry2 Cry_Minun cry_reverse Cry_Minun
cry2 Cry_Surskit cry_reverse Cry_Surskit
cry2 Cry_Masquerain cry_reverse Cry_Masquerain
cry2 Cry_Skitty cry_reverse Cry_Skitty
cry2 Cry_Delcatty cry_reverse Cry_Delcatty
cry2 Cry_Gulpin cry_reverse Cry_Gulpin
cry2 Cry_Swalot cry_reverse Cry_Swalot
cry2 Cry_Numel cry_reverse Cry_Numel
cry2 Cry_Camerupt cry_reverse Cry_Camerupt
cry2 Cry_Barboach cry_reverse Cry_Barboach
cry2 Cry_Whiscash cry_reverse Cry_Whiscash
cry2 Cry_Corphish cry_reverse Cry_Corphish
cry2 Cry_Crawdaunt cry_reverse Cry_Crawdaunt
cry2 Cry_Spoink cry_reverse Cry_Spoink
cry2 Cry_Grumpig cry_reverse Cry_Grumpig
cry2 Cry_Trapinch cry_reverse Cry_Trapinch
cry2 Cry_Vibrava cry_reverse Cry_Vibrava
cry2 Cry_Flygon cry_reverse Cry_Flygon
cry2 Cry_Cacnea cry_reverse Cry_Cacnea
cry2 Cry_Cacturne cry_reverse Cry_Cacturne
cry2 Cry_Baltoy cry_reverse Cry_Baltoy
cry2 Cry_Claydol cry_reverse Cry_Claydol
cry2 Cry_Lunatone cry_reverse Cry_Lunatone
cry2 Cry_Solrock cry_reverse Cry_Solrock
cry2 Cry_Feebas cry_reverse Cry_Feebas
cry2 Cry_Milotic cry_reverse Cry_Milotic
cry2 Cry_Absol cry_reverse Cry_Absol
cry2 Cry_Meditite cry_reverse Cry_Meditite
cry2 Cry_Medicham cry_reverse Cry_Medicham
cry2 Cry_Spheal cry_reverse Cry_Spheal
cry2 Cry_Sealeo cry_reverse Cry_Sealeo
cry2 Cry_Walrein cry_reverse Cry_Walrein
cry2 Cry_Clamperl cry_reverse Cry_Clamperl
cry2 Cry_Huntail cry_reverse Cry_Huntail
cry2 Cry_Gorebyss cry_reverse Cry_Gorebyss
cry2 Cry_Lileep cry_reverse Cry_Lileep
cry2 Cry_Cradily cry_reverse Cry_Cradily
cry2 Cry_Anorith cry_reverse Cry_Anorith
cry2 Cry_Armaldo cry_reverse Cry_Armaldo
cry2 Cry_Beldum cry_reverse Cry_Beldum
cry2 Cry_Metang cry_reverse Cry_Metang
cry2 Cry_Metagross cry_reverse Cry_Metagross
cry2 Cry_Bagon cry_reverse Cry_Bagon
cry2 Cry_Shelgon cry_reverse Cry_Shelgon
cry2 Cry_Regirock cry_reverse Cry_Regirock
cry2 Cry_Regice cry_reverse Cry_Regice
cry2 Cry_Registeel cry_reverse Cry_Registeel
cry2 Cry_Castform cry_reverse Cry_Castform
cry2 Cry_Volbeat cry_reverse Cry_Volbeat
cry2 Cry_Illumise cry_reverse Cry_Illumise
cry2 Cry_Poochyena cry_reverse Cry_Poochyena
cry2 Cry_Mightyena cry_reverse Cry_Mightyena
cry2 Cry_Dusclops cry_reverse Cry_Dusclops
cry2 Cry_Sableye cry_reverse Cry_Sableye
cry2 Cry_Mawile cry_reverse Cry_Mawile
cry2 Cry_Aron cry_reverse Cry_Aron
cry2 Cry_Lairon cry_reverse Cry_Lairon
cry2 Cry_Aggron cry_reverse Cry_Aggron
cry2 Cry_Relicanth cry_reverse Cry_Relicanth
cry2 Cry_Luvdisc cry_reverse Cry_Luvdisc
cry2 Cry_Groudon cry_reverse Cry_Groudon
cry2 Cry_Kyogre cry_reverse Cry_Kyogre
cry2 Cry_Rayquaza cry_reverse Cry_Rayquaza
cry2 Cry_Salamence cry_reverse Cry_Salamence
cry2 Cry_Breloom cry_reverse Cry_Breloom
cry2 Cry_Shroomish cry_reverse Cry_Shroomish
cry2 Cry_Linoone cry_reverse Cry_Linoone
cry2 Cry_Tropius cry_reverse Cry_Tropius
cry2 Cry_Wailmer cry_reverse Cry_Wailmer
cry2 Cry_Zigzagoon cry_reverse Cry_Zigzagoon
cry2 Cry_Exploud cry_reverse Cry_Exploud
cry2 Cry_Loudred cry_reverse Cry_Loudred
cry2 Cry_Wailord cry_reverse Cry_Wailord
cry2 Cry_Whismur cry_reverse Cry_Whismur
cry2 Cry_Snorunt cry_reverse Cry_Snorunt
cry2 Cry_Latios cry_reverse Cry_Latios
cry2 Cry_Jirachi cry_reverse Cry_Jirachi
cry2 Cry_Deoxys cry_reverse Cry_Deoxys
cry2 Cry_Chimecho cry_reverse Cry_Chimecho
.align 2 .align 2
voicegroup129:: voicegroup129::
+2 -2
View File
@@ -1857,7 +1857,7 @@ void LaunchBattleAnimation(const u8 *const animsTable[], u16 tableId, bool8 isMo
{ {
if (tableId == gMovesWithQuietBGM[i]) if (tableId == gMovesWithQuietBGM[i])
{ {
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 128); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 128);
break; break;
} }
} }
@@ -2127,7 +2127,7 @@ static void ScriptCmd_end(void)
if (!continuousAnim) if (!continuousAnim)
{ {
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 256); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 256);
ResetSpritePriorityOfAllVisibleBattlers(); ResetSpritePriorityOfAllVisibleBattlers();
UpdateOamPriorityInAllHealthboxes(1); UpdateOamPriorityInAllHealthboxes(1);
gAnimScriptActive = FALSE; gAnimScriptActive = FALSE;
+10 -9
View File
@@ -4,6 +4,7 @@
#include "battle_anim.h" #include "battle_anim.h"
#include "task.h" #include "task.h"
#include "constants/battle_anim.h" #include "constants/battle_anim.h"
#include "constants/sound.h"
static void sub_80DCE78(u8 taskId); static void sub_80DCE78(u8 taskId);
static void sub_80DCEE4(u8 taskId); static void sub_80DCEE4(u8 taskId);
@@ -142,7 +143,7 @@ void SoundTask_PlayCryHighPitch(u8 taskId)
else else
species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES); species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES);
if (species != SPECIES_NONE) if (species != SPECIES_NONE)
PlayCry3(species, pan, 3); PlayCry_ByMode(species, pan, CRY_MODE_HIGH_PITCH);
DestroyAnimVisualTask(taskId); DestroyAnimVisualTask(taskId);
} }
@@ -177,10 +178,10 @@ void SoundTask_PlayDoubleCry(u8 taskId)
gTasks[taskId].data[2] = pan; gTasks[taskId].data[2] = pan;
if (species != SPECIES_NONE) if (species != SPECIES_NONE)
{ {
if (gBattleAnimArgs[1] == TAIL_SENTINEL) if (gBattleAnimArgs[1] == DOUBLE_CRY_GROWL)
PlayCry3(species, pan, 9); PlayCry_ByMode(species, pan, CRY_MODE_GROWL_1);
else else // DOUBLE_CRY_ROAR
PlayCry3(species, pan, 7); PlayCry_ByMode(species, pan, CRY_MODE_ROAR_1);
gTasks[taskId].func = sub_80DD270; gTasks[taskId].func = sub_80DD270;
} }
else else
@@ -202,13 +203,13 @@ static void sub_80DD270(u8 taskId)
{ {
if (!IsCryPlaying()) if (!IsCryPlaying())
{ {
PlayCry3(species, pan, 10); PlayCry_ByMode(species, pan, CRY_MODE_GROWL_2);
DestroyAnimVisualTask(taskId); DestroyAnimVisualTask(taskId);
} }
} }
else if (!IsCryPlaying()) else if (!IsCryPlaying())
{ {
PlayCry3(species, pan, 8); PlayCry_ByMode(species, pan, CRY_MODE_ROAR_2);
DestroyAnimVisualTask(taskId); DestroyAnimVisualTask(taskId);
} }
} }
@@ -232,7 +233,7 @@ void sub_80DD334(u8 taskId)
gTasks[taskId].data[2] = pan; gTasks[taskId].data[2] = pan;
if (species != SPECIES_NONE) if (species != SPECIES_NONE)
{ {
PlayCry3(species, pan, 4); PlayCry_ByMode(species, pan, CRY_MODE_ECHO_START);
gTasks[taskId].func = sub_80DD390; gTasks[taskId].func = sub_80DD390;
} }
else else
@@ -253,7 +254,7 @@ static void sub_80DD390(u8 taskId)
u16 species = gTasks[taskId].data[1]; u16 species = gTasks[taskId].data[1];
s8 pan = gTasks[taskId].data[2]; s8 pan = gTasks[taskId].data[2];
PlayCry3(species, pan, 6); PlayCry_ByMode(species, pan, CRY_MODE_ECHO_END);
DestroyAnimVisualTask(taskId); DestroyAnimVisualTask(taskId);
} }
} }
+4 -3
View File
@@ -13,6 +13,7 @@
#include "battle_message.h" #include "battle_message.h"
#include "constants/battle_anim.h" #include "constants/battle_anim.h"
#include "constants/songs.h" #include "constants/songs.h"
#include "constants/sound.h"
#include "constants/trainers.h" #include "constants/trainers.h"
static void LinkOpponentHandleGetMonData(void); static void LinkOpponentHandleGetMonData(void);
@@ -231,7 +232,7 @@ static void Intro_WaitForShinyAnimAndHealthbox(void)
} }
else else
{ {
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 256); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 256);
} }
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].introEndDelay = 3; gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].introEndDelay = 3;
gBattlerControllerFuncs[gActiveBattler] = Intro_DelayAndEnd; gBattlerControllerFuncs[gActiveBattler] = Intro_DelayAndEnd;
@@ -366,7 +367,7 @@ static void SwitchIn_HandleSoundAndEnd(void)
{ {
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].specialAnimActive && !IsCryPlayingOrClearCrySongs()) if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].specialAnimActive && !IsCryPlayingOrClearCrySongs())
{ {
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100);
LinkOpponentBufferExecCompleted(); LinkOpponentBufferExecCompleted();
} }
} }
@@ -1512,7 +1513,7 @@ static void LinkOpponentHandleFaintingCry(void)
{ {
u16 species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); u16 species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES);
PlayCry3(species, 25, 5); PlayCry_ByMode(species, 25, CRY_MODE_FAINT);
LinkOpponentBufferExecCompleted(); LinkOpponentBufferExecCompleted();
} }
+2 -1
View File
@@ -12,6 +12,7 @@
#include "battle_message.h" #include "battle_message.h"
#include "constants/battle_anim.h" #include "constants/battle_anim.h"
#include "constants/songs.h" #include "constants/songs.h"
#include "constants/sound.h"
static void LinkPartnerHandleGetMonData(void); static void LinkPartnerHandleGetMonData(void);
static void LinkPartnerHandleGetRawMonData(void); static void LinkPartnerHandleGetRawMonData(void);
@@ -1425,7 +1426,7 @@ static void LinkPartnerHandleFaintingCry(void)
{ {
u16 species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); u16 species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES);
PlayCry3(species, -25, 5); PlayCry_ByMode(species, -25, CRY_MODE_FAINT);
LinkPartnerBufferExecCompleted(); LinkPartnerBufferExecCompleted();
} }
+4 -3
View File
@@ -19,6 +19,7 @@
#include "constants/battle_anim.h" #include "constants/battle_anim.h"
#include "constants/moves.h" #include "constants/moves.h"
#include "constants/songs.h" #include "constants/songs.h"
#include "constants/sound.h"
static void OpponentHandleGetMonData(void); static void OpponentHandleGetMonData(void);
static void OpponentHandleGetRawMonData(void); static void OpponentHandleGetRawMonData(void);
@@ -233,7 +234,7 @@ static void Intro_WaitForShinyAnimAndHealthbox(void)
if (gBattleTypeFlags & BATTLE_TYPE_MULTI) if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
m4aMPlayContinue(&gMPlayInfo_BGM); m4aMPlayContinue(&gMPlayInfo_BGM);
else else
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 256); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 256);
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].introEndDelay = 3; gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].introEndDelay = 3;
gBattlerControllerFuncs[gActiveBattler] = Intro_DelayAndEnd; gBattlerControllerFuncs[gActiveBattler] = Intro_DelayAndEnd;
} }
@@ -372,7 +373,7 @@ static void SwitchIn_HandleSoundAndEnd(void)
{ {
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].specialAnimActive && !IsCryPlayingOrClearCrySongs()) if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].specialAnimActive && !IsCryPlayingOrClearCrySongs())
{ {
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100);
OpponentBufferExecCompleted(); OpponentBufferExecCompleted();
} }
} }
@@ -1611,7 +1612,7 @@ static void OpponentHandleFaintingCry(void)
{ {
u16 species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); u16 species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES);
PlayCry3(species, 25, 5); PlayCry_ByMode(species, 25, CRY_MODE_FAINT);
OpponentBufferExecCompleted(); OpponentBufferExecCompleted();
} }
+5 -4
View File
@@ -22,6 +22,7 @@
#include "constants/items.h" #include "constants/items.h"
#include "constants/moves.h" #include "constants/moves.h"
#include "constants/songs.h" #include "constants/songs.h"
#include "constants/sound.h"
static void PlayerHandleGetMonData(void); static void PlayerHandleGetMonData(void);
static void PlayerHandleSetMonData(void); static void PlayerHandleSetMonData(void);
@@ -898,7 +899,7 @@ static void Intro_WaitForShinyAnimAndHealthbox(void)
if (gBattleTypeFlags & BATTLE_TYPE_MULTI) if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
m4aMPlayContinue(&gMPlayInfo_BGM); m4aMPlayContinue(&gMPlayInfo_BGM);
else else
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 256); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 256);
HandleLowHpMusicChange(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], gActiveBattler); HandleLowHpMusicChange(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], gActiveBattler);
if (IsDoubleBattle()) if (IsDoubleBattle())
HandleLowHpMusicChange(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler ^ BIT_FLANK]], gActiveBattler ^ BIT_FLANK); HandleLowHpMusicChange(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler ^ BIT_FLANK]], gActiveBattler ^ BIT_FLANK);
@@ -955,7 +956,7 @@ static void SwitchIn_HandleSoundAndEnd(void)
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].specialAnimActive if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].specialAnimActive
&& !IsCryPlayingOrClearCrySongs()) && !IsCryPlayingOrClearCrySongs())
{ {
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100);
HandleLowHpMusicChange(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], gActiveBattler); HandleLowHpMusicChange(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], gActiveBattler);
PlayerBufferExecCompleted(); PlayerBufferExecCompleted();
} }
@@ -984,7 +985,7 @@ void Task_PlayerController_RestoreBgmAfterCry(u8 taskId)
{ {
if (!IsCryPlayingOrClearCrySongs()) if (!IsCryPlayingOrClearCrySongs())
{ {
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100);
DestroyTask(taskId); DestroyTask(taskId);
} }
} }
@@ -2687,7 +2688,7 @@ static void PlayerHandlePlayFanfare(void)
static void PlayerHandleFaintingCry(void) static void PlayerHandleFaintingCry(void)
{ {
PlayCry3(GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES), -25, 5); PlayCry_ByMode(GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES), -25, CRY_MODE_FAINT);
PlayerBufferExecCompleted(); PlayerBufferExecCompleted();
} }
+1 -3
View File
@@ -3214,9 +3214,7 @@ static void Cmd_getexp(void)
else else
{ {
// music change in wild battle after fainting a poke // music change in wild battle after fainting a poke
if (!(gBattleTypeFlags & (BATTLE_TYPE_TRAINER | BATTLE_TYPE_POKEDUDE)) if (!(gBattleTypeFlags & (BATTLE_TYPE_TRAINER | BATTLE_TYPE_POKEDUDE)) && gBattleMons[0].hp != 0 && !gBattleStruct->wildVictorySong)
&& gBattleMons[0].hp != 0
&& !gBattleStruct->wildVictorySong)
{ {
BattleStopLowHpSound(); BattleStopLowHpSound();
PlayBGM(MUS_VICTORY_WILD); PlayBGM(MUS_VICTORY_WILD);
+2 -1
View File
@@ -14,6 +14,7 @@
#include "quest_log.h" #include "quest_log.h"
#include "constants/maps.h" #include "constants/maps.h"
#include "constants/field_weather.h" #include "constants/field_weather.h"
#include "constants/sound.h"
#if defined(FIRERED) #if defined(FIRERED)
#define TITLE_TEXT gString_PokemonFireRed_Staff #define TITLE_TEXT gString_PokemonFireRed_Staff
@@ -1190,7 +1191,7 @@ static bool32 DoCreditsMonScene(void)
{ {
HideBg(2); HideBg(2);
ShowBg(1); ShowBg(1);
PlayCry2(GetCreditsMonSpecies(sCreditsMgr->whichMon), 0, 125, 10); PlayCry_NormalNoDucking(GetCreditsMonSpecies(sCreditsMgr->whichMon), 0, CRY_VOLUME_RS, CRY_PRIORITY_NORMAL);
sCreditsMgr->creditsMonTimer = 128; sCreditsMgr->creditsMonTimer = 128;
sCreditsMgr->subseqno++; sCreditsMgr->subseqno++;
} }
+2 -2
View File
@@ -8,7 +8,7 @@
#include "scanline_effect.h" #include "scanline_effect.h"
#include "strings.h" #include "strings.h"
#include "task.h" #include "task.h"
#include "constants/fanfares.h" #include "constants/sound.h"
struct Diploma struct Diploma
{ {
@@ -148,7 +148,7 @@ static void Task_DiplomaInit(u8 taskId)
{ {
break; break;
} }
PlayFanfareByFanfareNum(FANFARE_05); PlayFanfareByFanfareNum(FANFARE_OBTAIN_BADGE);
gTasks[taskId].func = Task_WaitForExit; gTasks[taskId].func = Task_WaitForExit;
} }
gDiploma->callbackStep++; gDiploma->callbackStep++;
+3 -3
View File
@@ -13,7 +13,7 @@
#include "task.h" #include "task.h"
#include "text_window.h" #include "text_window.h"
#include "constants/songs.h" #include "constants/songs.h"
#include "constants/fanfares.h" #include "constants/sound.h"
#include "constants/items.h" #include "constants/items.h"
struct DodrioStruct struct DodrioStruct
@@ -1204,7 +1204,7 @@ static void sub_8151D98(void)
} }
else if (gUnknown_203F3E0->unk154 == 1) else if (gUnknown_203F3E0->unk154 == 1)
{ {
PlayFanfareByFanfareNum(FANFARE_10); // MUS_TOO_BAD PlayFanfareByFanfareNum(FANFARE_TOO_BAD);
gUnknown_203F3E0->unk154 = 2; gUnknown_203F3E0->unk154 = 2;
} }
} }
@@ -1262,7 +1262,7 @@ static void sub_8151E94(void)
} }
else if (gUnknown_203F3E0->unk154 == 1) else if (gUnknown_203F3E0->unk154 == 1)
{ {
PlayFanfareByFanfareNum(FANFARE_10); // MUS_TOO_BAD PlayFanfareByFanfareNum(FANFARE_TOO_BAD);
gUnknown_203F3E0->unk154 = 2; gUnknown_203F3E0->unk154 = 2;
} }
} }
+2 -1
View File
@@ -27,6 +27,7 @@
#include "constants/event_object_movement.h" #include "constants/event_object_movement.h"
#include "constants/metatile_behaviors.h" #include "constants/metatile_behaviors.h"
#include "constants/songs.h" #include "constants/songs.h"
#include "constants/sound.h"
extern struct CompressedSpritePalette gMonPaletteTable[]; // Intentionally declared (incorrectly) without const in order to match extern struct CompressedSpritePalette gMonPaletteTable[]; // Intentionally declared (incorrectly) without const in order to match
extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[];
@@ -2935,7 +2936,7 @@ static void SpriteCB_FieldMoveMonSlideOnscreen(struct Sprite * sprite)
sprite->callback = SpriteCB_FieldMoveMonWaitAfterCry; sprite->callback = SpriteCB_FieldMoveMonWaitAfterCry;
if (sprite->data[6]) if (sprite->data[6])
{ {
PlayCry2(sprite->data[0], 0, 0x7d, 0xa); PlayCry_NormalNoDucking(sprite->data[0], 0, CRY_VOLUME_RS, CRY_PRIORITY_NORMAL);
} }
else else
{ {
+2 -2
View File
@@ -907,7 +907,7 @@ static void Task_HofPC_HandleInput(u8 taskId)
if (IsCryPlayingOrClearCrySongs()) if (IsCryPlayingOrClearCrySongs())
{ {
StopCryAndClearCrySongs(); StopCryAndClearCrySongs();
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100);
} }
gTasks[taskId].func = Task_HofPC_HandlePaletteOnExit; gTasks[taskId].func = Task_HofPC_HandlePaletteOnExit;
} }
@@ -917,7 +917,7 @@ static void Task_HofPC_HandleInput(u8 taskId)
if (IsCryPlayingOrClearCrySongs()) if (IsCryPlayingOrClearCrySongs())
{ {
StopCryAndClearCrySongs(); StopCryAndClearCrySongs();
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100);
} }
gTasks[taskId].func = Task_HofPC_HandlePaletteOnExit; gTasks[taskId].func = Task_HofPC_HandlePaletteOnExit;
} }
+2 -2
View File
@@ -60,7 +60,7 @@ u8 RunHelpSystemCallback(void)
m4aMPlayStop(&gMPlayInfo_SE2); m4aMPlayStop(&gMPlayInfo_SE2);
PlaySE(SE_HELP_OPEN); PlaySE(SE_HELP_OPEN);
if (!gDisableHelpSystemVolumeReduce) if (!gDisableHelpSystemVolumeReduce)
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x80); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x80);
SaveCallbacks(); SaveCallbacks();
sInHelpSystem = 1; sInHelpSystem = 1;
sVideoState.state = 1; sVideoState.state = 1;
@@ -122,7 +122,7 @@ u8 RunHelpSystemCallback(void)
break; break;
case 7: case 7:
if (!gDisableHelpSystemVolumeReduce) if (!gDisableHelpSystemVolumeReduce)
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100);
RestoreMapTextColors(); RestoreMapTextColors();
RestoreGPURegs(); RestoreGPURegs();
sVideoState.state = 8; sVideoState.state = 8;
+2 -1
View File
@@ -14,6 +14,7 @@
#include "util.h" #include "util.h"
#include "trig.h" #include "trig.h"
#include "constants/songs.h" #include "constants/songs.h"
#include "constants/sound.h"
struct IntroSequenceData; struct IntroSequenceData;
@@ -2205,7 +2206,7 @@ static void SpriteCB_NidorinoRearsUp(struct Sprite * sprite)
} }
break; break;
case 1: case 1:
PlayCry3(SPECIES_NIDORINO, 0x3F, 1); PlayCry_ByMode(SPECIES_NIDORINO, 0x3F, CRY_MODE_DOUBLES);
sprite->data[1] = 0; sprite->data[1] = 0;
sprite->data[0]++; sprite->data[0]++;
break; break;
+2 -2
View File
@@ -31,7 +31,7 @@
#include "teachy_tv.h" #include "teachy_tv.h"
#include "tm_case.h" #include "tm_case.h"
#include "vs_seeker.h" #include "vs_seeker.h"
#include "constants/fanfares.h" #include "constants/sound.h"
#include "constants/items.h" #include "constants/items.h"
#include "constants/maps.h" #include "constants/maps.h"
#include "constants/moves.h" #include "constants/moves.h"
@@ -386,7 +386,7 @@ void FieldUseFunc_PokeFlute(u8 taskId)
static void sub_80A1648(u8 taskId) static void sub_80A1648(u8 taskId)
{ {
PlayFanfareByFanfareNum(FANFARE_POKEFLUTE); PlayFanfareByFanfareNum(FANFARE_POKE_FLUTE);
gTasks[taskId].func = sub_80A1674; gTasks[taskId].func = sub_80A1674;
} }
+2 -1
View File
@@ -50,6 +50,7 @@
#include "constants/maps.h" #include "constants/maps.h"
#include "constants/region_map_sections.h" #include "constants/region_map_sections.h"
#include "constants/songs.h" #include "constants/songs.h"
#include "constants/sound.h"
#define PLAYER_LINK_STATE_IDLE 0x80 #define PLAYER_LINK_STATE_IDLE 0x80
#define PLAYER_LINK_STATE_BUSY 0x81 #define PLAYER_LINK_STATE_BUSY 0x81
@@ -1141,7 +1142,7 @@ static void PlayAmbientCry(void)
if (gDisableMapMusicChangeOnMapLoad == MUSIC_DISABLE_KEEP) if (gDisableMapMusicChangeOnMapLoad == MUSIC_DISABLE_KEEP)
return; return;
PlayCry2(sAmbientCrySpecies, pan, volume, 1); PlayCry_NormalNoDucking(sAmbientCrySpecies, pan, volume, CRY_PRIORITY_AMBIENT);
} }
void UpdateAmbientCry(s16 *state, u16 *delayCounter) void UpdateAmbientCry(s16 *state, u16 *delayCounter)
+2 -1
View File
@@ -67,6 +67,7 @@
#include "constants/pokemon.h" #include "constants/pokemon.h"
#include "constants/quest_log.h" #include "constants/quest_log.h"
#include "constants/songs.h" #include "constants/songs.h"
#include "constants/sound.h"
#define PARTY_PAL_SELECTED (1 << 0) #define PARTY_PAL_SELECTED (1 << 0)
#define PARTY_PAL_FAINTED (1 << 1) #define PARTY_PAL_FAINTED (1 << 1)
@@ -5083,7 +5084,7 @@ static void ItemUseCB_RareCandyStep(u8 taskId, UNUSED TaskFunc func)
GetMonLevelUpWindowStats(mon, &ptr->data[NUM_STATS]); GetMonLevelUpWindowStats(mon, &ptr->data[NUM_STATS]);
gPartyMenuUseExitCallback = TRUE; gPartyMenuUseExitCallback = TRUE;
ItemUse_SetQuestLogEvent(QL_EVENT_USED_ITEM, mon, gSpecialVar_ItemId, 0xFFFF); ItemUse_SetQuestLogEvent(QL_EVENT_USED_ITEM, mon, gSpecialVar_ItemId, 0xFFFF);
PlayFanfareByFanfareNum(0); PlayFanfareByFanfareNum(FANFARE_LEVEL_UP);
UpdateMonDisplayInfoAfterRareCandy(gPartyMenu.slotId, mon); UpdateMonDisplayInfoAfterRareCandy(gPartyMenu.slotId, mon);
RemoveBagItem(gSpecialVar_ItemId, 1); RemoveBagItem(gSpecialVar_ItemId, 1);
GetMonNickname(mon, gStringVar1); GetMonNickname(mon, gStringVar1);
+8 -7
View File
@@ -12,6 +12,7 @@
#include "link.h" #include "link.h"
#include "battle_gfx_sfx_util.h" #include "battle_gfx_sfx_util.h"
#include "constants/songs.h" #include "constants/songs.h"
#include "constants/sound.h"
#define tFrames data[0] #define tFrames data[0]
#define tPan data[1] #define tPan data[1]
@@ -681,9 +682,9 @@ static void Task_PlayCryWhenReleasedFromBall(u8 taskId)
break; break;
case 1: case 1:
if (ShouldPlayNormalPokeCry(mon) == TRUE) if (ShouldPlayNormalPokeCry(mon) == TRUE)
PlayCry3(species, pan, 0); PlayCry_ByMode(species, pan, CRY_MODE_NORMAL);
else else
PlayCry3(species, pan, 11); PlayCry_ByMode(species, pan, CRY_MODE_WEAK);
DestroyTask(taskId); DestroyTask(taskId);
break; break;
@@ -696,9 +697,9 @@ static void Task_PlayCryWhenReleasedFromBall(u8 taskId)
if (gTasks[taskId].tCryTaskFrames == 0) if (gTasks[taskId].tCryTaskFrames == 0)
{ {
if (ShouldPlayNormalPokeCry(mon) == TRUE) if (ShouldPlayNormalPokeCry(mon) == TRUE)
PlayCry4(species, pan, 1); PlayCry_ReleaseDouble(species, pan, 1);
else else
PlayCry4(species, pan, 12); PlayCry_ReleaseDouble(species, pan, 12);
DestroyTask(taskId); DestroyTask(taskId);
} }
@@ -734,9 +735,9 @@ static void Task_PlayCryWhenReleasedFromBall(u8 taskId)
} }
if (ShouldPlayNormalPokeCry(mon) == TRUE) if (ShouldPlayNormalPokeCry(mon) == TRUE)
PlayCry4(species, pan, 0); PlayCry_ReleaseDouble(species, pan, 0);
else else
PlayCry4(species, pan, 11); PlayCry_ReleaseDouble(species, pan, 11);
DestroyTask(taskId); DestroyTask(taskId);
break; break;
@@ -784,7 +785,7 @@ static void SpriteCB_ReleaseMonFromBall(struct Sprite *sprite)
} }
else else
{ {
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 128); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 128);
} }
} }
+5 -4
View File
@@ -17,6 +17,7 @@
#include "trainer_pokemon_sprites.h" #include "trainer_pokemon_sprites.h"
#include "decompress.h" #include "decompress.h"
#include "constants/songs.h" #include "constants/songs.h"
#include "constants/sound.h"
#include "pokedex_area_markers.h" #include "pokedex_area_markers.h"
#include "field_specials.h" #include "field_specials.h"
@@ -1751,7 +1752,7 @@ static void Task_DexScreen_CategorySubmenu(u8 taskId)
CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(2);
CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(1);
CopyBgTilemapBufferToVram(0); CopyBgTilemapBufferToVram(0);
PlayCry2(sPokedexScreenData->dexSpecies, 0, 125, 10); PlayCry_NormalNoDucking(sPokedexScreenData->dexSpecies, 0, CRY_VOLUME_RS, CRY_PRIORITY_NORMAL);
sPokedexScreenData->data[0] = 0; sPokedexScreenData->data[0] = 0;
sPokedexScreenData->state = 17; sPokedexScreenData->state = 17;
} }
@@ -1927,7 +1928,7 @@ static void Task_DexScreen_ShowMonPage(u8 taskId)
CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(2);
CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(1);
CopyBgTilemapBufferToVram(0); CopyBgTilemapBufferToVram(0);
PlayCry2(sPokedexScreenData->dexSpecies, 0, 125, 10); PlayCry_NormalNoDucking(sPokedexScreenData->dexSpecies, 0, CRY_VOLUME_RS, CRY_PRIORITY_NORMAL);
sPokedexScreenData->state = 4; sPokedexScreenData->state = 4;
break; break;
case 4: case 4:
@@ -3295,7 +3296,7 @@ static u8 DexScreen_PageNumberToRenderablePages(u16 page)
void DexScreen_InputHandler_StartToCry(void) void DexScreen_InputHandler_StartToCry(void)
{ {
if (JOY_NEW(START_BUTTON)) if (JOY_NEW(START_BUTTON))
PlayCry2(sPokedexScreenData->dexSpecies, 0, 125, 10); PlayCry_NormalNoDucking(sPokedexScreenData->dexSpecies, 0, CRY_VOLUME_RS, CRY_PRIORITY_NORMAL);
} }
u8 DexScreen_RegisterMonToPokedex(u16 species) u8 DexScreen_RegisterMonToPokedex(u16 species)
@@ -3413,7 +3414,7 @@ static void Task_DexScreen_RegisterMonToPokedex(u8 taskId)
CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(1);
CopyBgTilemapBufferToVram(0); CopyBgTilemapBufferToVram(0);
PlayCry2(sPokedexScreenData->dexSpecies, 0, 125, 10); PlayCry_NormalNoDucking(sPokedexScreenData->dexSpecies, 0, CRY_VOLUME_RS, CRY_PRIORITY_NORMAL);
sPokedexScreenData->data[0] = 0; sPokedexScreenData->data[0] = 0;
sPokedexScreenData->state = 11; sPokedexScreenData->state = 11;
} }
+3 -2
View File
@@ -33,6 +33,7 @@
#include "battle_interface.h" #include "battle_interface.h"
#include "mon_markings.h" #include "mon_markings.h"
#include "pokemon_storage_system.h" #include "pokemon_storage_system.h"
#include "constants/sound.h"
// needs conflicting header to match (curIndex is s8 in the function, but has to be defined as u8 here) // needs conflicting header to match (curIndex is s8 in the function, but has to be defined as u8 here)
extern s16 SeekToNextMonInBox(struct BoxPokemon * boxMons, u8 curIndex, u8 maxIndex, u8 flags); extern s16 SeekToNextMonInBox(struct BoxPokemon * boxMons, u8 curIndex, u8 maxIndex, u8 flags);
@@ -5181,9 +5182,9 @@ static void PokeSum_TryPlayMonCry(void)
if (!GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_IS_EGG)) if (!GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_IS_EGG))
{ {
if (ShouldPlayNormalPokeCry(&sMonSummaryScreen->currentMon) == TRUE) if (ShouldPlayNormalPokeCry(&sMonSummaryScreen->currentMon) == TRUE)
PlayCry3(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2), 0, 0); PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2), 0, CRY_MODE_NORMAL);
else else
PlayCry3(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2), 0, 11); PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2), 0, CRY_MODE_WEAK);
} }
} }
+2 -2
View File
@@ -40,7 +40,7 @@ bool32 RunSaveFailedScreen(void)
case 0: case 0:
if (!sIsInSaveFailedScreen) if (!sIsInSaveFailedScreen)
return FALSE; return FALSE;
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 128); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 128);
SaveCallbacks(); SaveCallbacks();
sSaveFailedScreenState = 1; sSaveFailedScreenState = 1;
break; break;
@@ -95,7 +95,7 @@ bool32 RunSaveFailedScreen(void)
sSaveFailedScreenState = 8; sSaveFailedScreenState = 8;
break; break;
case 8: case 8:
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 256); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 256);
RestoreMapTextColors(); RestoreMapTextColors();
RestoreGPURegs(); RestoreGPURegs();
RestoreCallbacks(); RestoreCallbacks();
+3 -2
View File
@@ -34,6 +34,7 @@
#include "fieldmap.h" #include "fieldmap.h"
#include "field_door.h" #include "field_door.h"
#include "constants/event_objects.h" #include "constants/event_objects.h"
#include "constants/sound.h"
extern u16 (*const gSpecials[])(void); extern u16 (*const gSpecials[])(void);
extern u16 (*const gSpecialsEnd[])(void); extern u16 (*const gSpecialsEnd[])(void);
@@ -1523,7 +1524,7 @@ bool8 ScrCmd_showmonpic(struct ScriptContext * ctx)
u8 y = ScriptReadByte(ctx); u8 y = ScriptReadByte(ctx);
ScriptMenu_ShowPokemonPic(species, x, y); ScriptMenu_ShowPokemonPic(species, x, y);
PlayCry7(species, 0); PlayCry_Script(species, CRY_MODE_NORMAL);
return FALSE; return FALSE;
} }
@@ -2085,7 +2086,7 @@ bool8 ScrCmd_playmoncry(struct ScriptContext * ctx)
u16 species = VarGet(ScriptReadHalfword(ctx)); u16 species = VarGet(ScriptReadHalfword(ctx));
u16 mode = VarGet(ScriptReadHalfword(ctx)); u16 mode = VarGet(ScriptReadHalfword(ctx));
PlayCry7(species, mode); PlayCry_Script(species, mode);
return FALSE; return FALSE;
} }
+87 -81
View File
@@ -5,7 +5,7 @@
#include "quest_log.h" #include "quest_log.h"
#include "m4a.h" #include "m4a.h"
#include "constants/songs.h" #include "constants/songs.h"
#include "constants/fanfares.h" #include "constants/sound.h"
#include "task.h" #include "task.h"
struct Fanfare struct Fanfare
@@ -38,24 +38,7 @@ extern struct MusicPlayerInfo gMPlayInfo_SE1;
extern struct MusicPlayerInfo gMPlayInfo_SE2; extern struct MusicPlayerInfo gMPlayInfo_SE2;
extern struct MusicPlayerInfo gMPlayInfo_SE3; extern struct MusicPlayerInfo gMPlayInfo_SE3;
extern struct ToneData gCryTable[]; extern struct ToneData gCryTable[];
extern struct ToneData gCryTable2[]; extern struct ToneData gCryTable_Reverse[];
static const struct Fanfare sFanfares[] = {
[FANFARE_00] = { MUS_LEVEL_UP, 80 },
[FANFARE_01] = { MUS_OBTAIN_ITEM, 160 },
[FANFARE_02] = { MUS_EVOLVED, 220 },
[FANFARE_03] = { MUS_OBTAIN_TMHM, 220 },
[FANFARE_04] = { MUS_HEAL, 160 },
[FANFARE_05] = { MUS_OBTAIN_BADGE, 340 },
[FANFARE_06] = { MUS_MOVE_DELETED, 180 },
[FANFARE_07] = { MUS_OBTAIN_BERRY, 120 },
[FANFARE_08] = { MUS_SLOTS_JACKPOT, 250 },
[FANFARE_09] = { MUS_SLOTS_WIN, 150 },
[FANFARE_10] = { MUS_TOO_BAD, 160 },
[FANFARE_POKEFLUTE] = { MUS_POKE_FLUTE, 450 },
[FANFARE_KEY_ITEM] = { MUS_OBTAIN_KEY_ITEM, 170 },
[FANFARE_DEX_EVAL] = { MUS_DEX_RATING, 196 }
};
extern u16 SpeciesToCryId(u16); extern u16 SpeciesToCryId(u16);
@@ -64,7 +47,22 @@ static void CreateFanfareTask(void);
static void Task_DuckBGMForPokemonCry(u8 taskId); static void Task_DuckBGMForPokemonCry(u8 taskId);
static void RestoreBGMVolumeAfterPokemonCry(void); static void RestoreBGMVolumeAfterPokemonCry(void);
#define CRY_VOLUME 120 // was 125 in R/S static const struct Fanfare sFanfares[] = {
[FANFARE_LEVEL_UP] = { MUS_LEVEL_UP, 80 },
[FANFARE_OBTAIN_ITEM] = { MUS_OBTAIN_ITEM, 160 },
[FANFARE_EVOLVED] = { MUS_EVOLVED, 220 },
[FANFARE_OBTAIN_TMHM] = { MUS_OBTAIN_TMHM, 220 },
[FANFARE_HEAL] = { MUS_HEAL, 160 },
[FANFARE_OBTAIN_BADGE] = { MUS_OBTAIN_BADGE, 340 },
[FANFARE_MOVE_DELETED] = { MUS_MOVE_DELETED, 180 },
[FANFARE_OBTAIN_BERRY] = { MUS_OBTAIN_BERRY, 120 },
[FANFARE_SLOTS_JACKPOT] = { MUS_SLOTS_JACKPOT, 250 },
[FANFARE_SLOTS_WIN] = { MUS_SLOTS_WIN, 150 },
[FANFARE_TOO_BAD] = { MUS_TOO_BAD, 160 },
[FANFARE_POKE_FLUTE] = { MUS_POKE_FLUTE, 450 },
[FANFARE_KEY_ITEM] = { MUS_OBTAIN_KEY_ITEM, 170 },
[FANFARE_DEX_EVAL] = { MUS_DEX_RATING, 196 }
};
void InitMapMusic(void) void InitMapMusic(void)
{ {
@@ -168,6 +166,7 @@ void FadeOutAndFadeInNewMapMusic(u16 songNum, u8 fadeOutSpeed, u8 fadeInSpeed)
sMapMusicFadeInSpeed = fadeInSpeed; sMapMusicFadeInSpeed = fadeInSpeed;
} }
// Unused
static void FadeInNewMapMusic(u16 songNum, u8 speed) static void FadeInNewMapMusic(u16 songNum, u8 speed)
{ {
FadeInNewBGM(songNum, speed); FadeInNewBGM(songNum, speed);
@@ -191,7 +190,6 @@ bool8 IsNotWaitingForBGMStop(void)
void PlayFanfareByFanfareNum(u8 fanfareNum) void PlayFanfareByFanfareNum(u8 fanfareNum)
{ {
u16 songNum; u16 songNum;
if(gQuestLogState == QL_STATE_PLAYBACK) if(gQuestLogState == QL_STATE_PLAYBACK)
{ {
sFanfareCounter = 0xFF; sFanfareCounter = 0xFF;
@@ -223,6 +221,7 @@ bool8 WaitFanfare(bool8 stop)
} }
} }
// Unused
void StopFanfareByFanfareNum(u8 fanfareNum) void StopFanfareByFanfareNum(u8 fanfareNum)
{ {
m4aSongNumStop(sFanfares[fanfareNum].songNum); m4aSongNumStop(sFanfares[fanfareNum].songNum);
@@ -231,7 +230,7 @@ void StopFanfareByFanfareNum(u8 fanfareNum)
void PlayFanfare(u16 songNum) void PlayFanfare(u16 songNum)
{ {
s32 i; s32 i;
for (i = 0; (u32)i < 14; i++) for (i = 0; (u32)i < ARRAY_COUNT(sFanfares); i++)
{ {
if (sFanfares[i].songNum == songNum) if (sFanfares[i].songNum == songNum)
{ {
@@ -241,6 +240,8 @@ void PlayFanfare(u16 songNum)
} }
} }
// songNum is not in sFanfares
// Play first fanfare in table instead
PlayFanfareByFanfareNum(0); PlayFanfareByFanfareNum(0);
CreateFanfareTask(); CreateFanfareTask();
} }
@@ -275,11 +276,11 @@ void FadeInNewBGM(u16 songNum, u8 speed)
{ {
if (gDisableMusic) if (gDisableMusic)
songNum = 0; songNum = 0;
if (songNum == 0xFFFF) if (songNum == MUS_NONE)
songNum = 0; songNum = 0;
m4aSongNumStart(songNum); m4aSongNumStart(songNum);
m4aMPlayImmInit(&gMPlayInfo_BGM); m4aMPlayImmInit(&gMPlayInfo_BGM);
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0);
m4aSongNumStop(songNum); m4aSongNumStop(songNum);
m4aMPlayFadeIn(&gMPlayInfo_BGM, speed); m4aMPlayFadeIn(&gMPlayInfo_BGM, speed);
} }
@@ -317,54 +318,54 @@ bool8 IsBGMStopped(void)
void PlayCry_Normal(u16 species, s8 pan) void PlayCry_Normal(u16 species, s8 pan)
{ {
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 85); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 85);
PlayCryInternal(species, pan, CRY_VOLUME, 10, 0); PlayCryInternal(species, pan, CRY_VOLUME, CRY_PRIORITY_NORMAL, CRY_MODE_NORMAL);
gPokemonCryBGMDuckingCounter = 2; gPokemonCryBGMDuckingCounter = 2;
RestoreBGMVolumeAfterPokemonCry(); RestoreBGMVolumeAfterPokemonCry();
} }
void PlayCry2(u16 species, s8 pan, s8 volume, u8 priority) void PlayCry_NormalNoDucking(u16 species, s8 pan, s8 volume, u8 priority)
{ {
PlayCryInternal(species, pan, volume, priority, 0); PlayCryInternal(species, pan, volume, priority, CRY_MODE_NORMAL);
} }
void PlayCry3(u16 species, s8 pan, u8 mode) // Assuming it's not CRY_MODE_DOUBLES, this is equivalent to PlayCry_Normal except it allows other modes.
void PlayCry_ByMode(u16 species, s8 pan, u8 mode)
{ {
if (mode == 1) if (mode == CRY_MODE_DOUBLES)
{ {
PlayCryInternal(species, pan, CRY_VOLUME, 10, 1); PlayCryInternal(species, pan, CRY_VOLUME, CRY_PRIORITY_NORMAL, mode);
} }
else else
{ {
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 85); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 85);
PlayCryInternal(species, pan, CRY_VOLUME, 10, mode); PlayCryInternal(species, pan, CRY_VOLUME, CRY_PRIORITY_NORMAL, mode);
gPokemonCryBGMDuckingCounter = 2; gPokemonCryBGMDuckingCounter = 2;
RestoreBGMVolumeAfterPokemonCry(); RestoreBGMVolumeAfterPokemonCry();
} }
} }
void PlayCry4(u16 species, s8 pan, u8 mode) // Used when releasing multiple Pokémon at once in battle.
void PlayCry_ReleaseDouble(u16 species, s8 pan, u8 mode)
{ {
if (mode == 1) if (mode == CRY_MODE_DOUBLES)
{ {
PlayCryInternal(species, pan, CRY_VOLUME, 10, 1); PlayCryInternal(species, pan, CRY_VOLUME, CRY_PRIORITY_NORMAL, mode);
} }
else else
{ {
if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI)) if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI))
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 85); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 85);
PlayCryInternal(species, pan, CRY_VOLUME, 10, mode); PlayCryInternal(species, pan, CRY_VOLUME, CRY_PRIORITY_NORMAL, mode);
} }
} }
// PlayCry5 and 6 are not in FR/LG. void PlayCry_Script(u16 species, u8 mode)
void PlayCry7(u16 species, u8 mode) // exclusive to FR/LG
{ {
if (!QL_IS_PLAYBACK_STATE) if (!QL_IS_PLAYBACK_STATE) // This check is exclusive to FR/LG
{ {
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 85); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 85);
PlayCryInternal(species, 0, CRY_VOLUME, 10, mode); PlayCryInternal(species, 0, CRY_VOLUME, CRY_PRIORITY_NORMAL, mode);
} }
gPokemonCryBGMDuckingCounter = 2; gPokemonCryBGMDuckingCounter = 2;
RestoreBGMVolumeAfterPokemonCry(); RestoreBGMVolumeAfterPokemonCry();
@@ -372,7 +373,7 @@ void PlayCry7(u16 species, u8 mode) // exclusive to FR/LG
void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode) void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode)
{ {
bool32 v0; bool32 reverse;
u32 release; u32 release;
u32 length; u32 length;
u32 pitch; u32 pitch;
@@ -381,76 +382,80 @@ void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode)
u8 table; u8 table;
species--; species--;
// Set default values
// May be overridden depending on mode.
length = 140; length = 140;
v0 = FALSE; reverse = FALSE;
release = 0; release = 0;
pitch = 15360; pitch = 15360;
chorus = 0; chorus = 0;
switch (mode) switch (mode)
{ {
case 0: case CRY_MODE_NORMAL:
break; break;
case 1: case CRY_MODE_DOUBLES:
length = 20; length = 20;
release = 225; release = 225;
break; break;
case 2: case CRY_MODE_ENCOUNTER:
release = 225; release = 225;
pitch = 15600; pitch = 15600;
chorus = 20; chorus = 20;
volume = 90; volume = 90;
break; break;
case 3: case CRY_MODE_HIGH_PITCH:
length = 50; length = 50;
release = 200; release = 200;
pitch = 15800; pitch = 15800;
chorus = 20; chorus = 20;
volume = 90; volume = 90;
break; break;
case 4: case CRY_MODE_ECHO_START:
length = 25; length = 25;
v0 = TRUE; reverse = TRUE;
release = 100; release = 100;
pitch = 15600; pitch = 15600;
chorus = 192; chorus = 192;
volume = 90; volume = 90;
break; break;
case 5: case CRY_MODE_FAINT:
release = 200; release = 200;
pitch = 14440; pitch = 14440;
break; break;
case 6: // _08072044 case CRY_MODE_ECHO_END:
release = 220; release = 220;
pitch = 15555; pitch = 15555;
chorus = 192; chorus = 192;
volume = 90; // FR/LG changed this from 70 to 90 volume = 90; // FR/LG changed this from 70 to 90
break; break;
case 7: case CRY_MODE_ROAR_1:
length = 10; length = 10;
release = 100; release = 100;
pitch = 14848; pitch = 14848;
break; break;
case 8: case CRY_MODE_ROAR_2:
length = 60; length = 60;
release = 225; release = 225;
pitch = 15616; pitch = 15616;
break; break;
case 9: case CRY_MODE_GROWL_1:
length = 15; length = 15;
v0 = TRUE; reverse = TRUE;
release = 125; release = 125;
pitch = 15200; pitch = 15200;
break; break;
case 10: case CRY_MODE_GROWL_2:
length = 100; length = 100;
release = 225; release = 225;
pitch = 15200; pitch = 15200;
break; break;
case 12: case CRY_MODE_WEAK_DOUBLES:
length = 20; length = 20;
release = 225; release = 225;
case 11: // fallthrough
case CRY_MODE_WEAK:
pitch = 15000; pitch = 15000;
break; break;
} }
@@ -469,28 +474,29 @@ void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode)
// If you wish to expand pokemon, you need to // If you wish to expand pokemon, you need to
// append new cases to the switch. // append new cases to the switch.
species = SpeciesToCryId(species); species = SpeciesToCryId(species);
index = species & 0x7F; index = species % 128;
table = species / 128; table = species / 128;
#define GET_CRY(speciesIndex, tableId, reversed) \
((reversed) ? &gCryTable_Reverse[(128 * (tableId)) + (speciesIndex)] : &gCryTable[(128 * (tableId)) + (speciesIndex)])
switch (table) switch (table)
{ {
case 0: case 0:
gMPlay_PokemonCry = SetPokemonCryTone( gMPlay_PokemonCry = SetPokemonCryTone(GET_CRY(index, 0, reverse));
v0 ? &gCryTable2[(128 * 0) + index] : &gCryTable[(128 * 0) + index]);
break; break;
case 1: case 1:
gMPlay_PokemonCry = SetPokemonCryTone( gMPlay_PokemonCry = SetPokemonCryTone(GET_CRY(index, 1, reverse));
v0 ? &gCryTable2[(128 * 1) + index] : &gCryTable[(128 * 1) + index]);
break; break;
case 2: case 2:
gMPlay_PokemonCry = SetPokemonCryTone( gMPlay_PokemonCry = SetPokemonCryTone(GET_CRY(index, 2, reverse));
v0 ? &gCryTable2[(128 * 2) + index] : &gCryTable[(128 * 2) + index]);
break; break;
case 3: case 3:
gMPlay_PokemonCry = SetPokemonCryTone( gMPlay_PokemonCry = SetPokemonCryTone(GET_CRY(index, 3, reverse));
v0 ? &gCryTable2[(128 * 3) + index] : &gCryTable[(128 * 3) + index]);
break; break;
} }
#undef GET_CRY
} }
bool8 IsCryFinished(void) bool8 IsCryFinished(void)
@@ -548,7 +554,7 @@ static void Task_DuckBGMForPokemonCry(u8 taskId)
if (!IsPokemonCryPlaying(gMPlay_PokemonCry)) if (!IsPokemonCryPlaying(gMPlay_PokemonCry))
{ {
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 256); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 256);
DestroyTask(taskId); DestroyTask(taskId);
} }
} }
@@ -563,14 +569,14 @@ void PlayBGM(u16 songNum)
{ {
if (gDisableMusic) if (gDisableMusic)
songNum = 0; songNum = 0;
if (songNum == 0xFFFF) if (songNum == MUS_NONE)
songNum = 0; songNum = 0;
m4aSongNumStart(songNum); m4aSongNumStart(songNum);
} }
void PlaySE(u16 songNum) void PlaySE(u16 songNum)
{ {
if(gDisableMapMusicChangeOnMapLoad == 0 && gQuestLogState != QL_STATE_PLAYBACK) if (gDisableMapMusicChangeOnMapLoad == 0 && gQuestLogState != QL_STATE_PLAYBACK)
m4aSongNumStart(songNum); m4aSongNumStart(songNum);
} }
@@ -579,28 +585,28 @@ void PlaySE12WithPanning(u16 songNum, s8 pan)
m4aSongNumStart(songNum); m4aSongNumStart(songNum);
m4aMPlayImmInit(&gMPlayInfo_SE1); m4aMPlayImmInit(&gMPlayInfo_SE1);
m4aMPlayImmInit(&gMPlayInfo_SE2); m4aMPlayImmInit(&gMPlayInfo_SE2);
m4aMPlayPanpotControl(&gMPlayInfo_SE1, 0xFFFF, pan); m4aMPlayPanpotControl(&gMPlayInfo_SE1, TRACKS_ALL, pan);
m4aMPlayPanpotControl(&gMPlayInfo_SE2, 0xFFFF, pan); m4aMPlayPanpotControl(&gMPlayInfo_SE2, TRACKS_ALL, pan);
} }
void PlaySE1WithPanning(u16 songNum, s8 pan) void PlaySE1WithPanning(u16 songNum, s8 pan)
{ {
m4aSongNumStart(songNum); m4aSongNumStart(songNum);
m4aMPlayImmInit(&gMPlayInfo_SE1); m4aMPlayImmInit(&gMPlayInfo_SE1);
m4aMPlayPanpotControl(&gMPlayInfo_SE1, 0xFFFF, pan); m4aMPlayPanpotControl(&gMPlayInfo_SE1, TRACKS_ALL, pan);
} }
void PlaySE2WithPanning(u16 songNum, s8 pan) void PlaySE2WithPanning(u16 songNum, s8 pan)
{ {
m4aSongNumStart(songNum); m4aSongNumStart(songNum);
m4aMPlayImmInit(&gMPlayInfo_SE2); m4aMPlayImmInit(&gMPlayInfo_SE2);
m4aMPlayPanpotControl(&gMPlayInfo_SE2, 0xFFFF, pan); m4aMPlayPanpotControl(&gMPlayInfo_SE2, TRACKS_ALL, pan);
} }
void SE12PanpotControl(s8 pan) void SE12PanpotControl(s8 pan)
{ {
m4aMPlayPanpotControl(&gMPlayInfo_SE1, 0xFFFF, pan); m4aMPlayPanpotControl(&gMPlayInfo_SE1, TRACKS_ALL, pan);
m4aMPlayPanpotControl(&gMPlayInfo_SE2, 0xFFFF, pan); m4aMPlayPanpotControl(&gMPlayInfo_SE2, TRACKS_ALL, pan);
} }
bool8 IsSEPlaying(void) bool8 IsSEPlaying(void)
@@ -633,11 +639,11 @@ bool8 IsSpecialSEPlaying(void)
void SetBGMVolume_SuppressHelpSystemReduction(u16 volume) void SetBGMVolume_SuppressHelpSystemReduction(u16 volume)
{ {
gDisableHelpSystemVolumeReduce = TRUE; gDisableHelpSystemVolumeReduce = TRUE;
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, volume); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, volume);
} }
void BGMVolumeMax_EnableHelpSystemReduction(void) void BGMVolumeMax_EnableHelpSystemReduction(void)
{ {
gDisableHelpSystemVolumeReduce = FALSE; gDisableHelpSystemVolumeReduce = FALSE;
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 256); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 256);
} }