ref: 001270908a91e6d0413c485ebe1ed46ef00e40a6
parent: 2622824f1bde260c7206ac49461a26238e6271d9
author: yenatch <yenatch@gmail.com>
date: Tue Jan 21 09:06:59 EST 2014
define music constants instead of running around with ((label-$4000)/3)
--- a/audio.asm
+++ b/audio.asm
@@ -5,6 +5,7 @@
AUDIO_3 EQU $1f
INCLUDE "macros.asm"
+INCLUDE "constants/music_constants.asm"
INCLUDE "constants/trainer_constants.asm"
; PC
--- a/constants.asm
+++ b/constants.asm
@@ -26,3 +26,4 @@
INCLUDE "constants/map_dimensions.asm"
INCLUDE "constants/connection_constants.asm"
INCLUDE "constants/credits_constants.asm"
+INCLUDE "constants/music_constants.asm"
--- /dev/null
+++ b/constants/music_constants.asm
@@ -1,0 +1,54 @@
+; Song ids are calculated by address to save space.
+
+music_const: MACRO
+\1 EQUS "((\2 - $4000) / 3)"
+ENDM
+
+ music_const MUSIC_PALLET_TOWN, Music_PalletTown
+ music_const MUSIC_POKECENTER, Music_Pokecenter
+ music_const MUSIC_GYM, Music_Gym
+ music_const MUSIC_CITIES1, Music_Cities1
+ music_const MUSIC_CITIES2, Music_Cities2
+ music_const MUSIC_CELADON, Music_Celadon
+ music_const MUSIC_CINNABAR, Music_Cinnabar
+ music_const MUSIC_VERMILION, Music_Vermilion
+ music_const MUSIC_LAVENDER, Music_Lavender
+ music_const MUSIC_SS_ANNE, Music_SSAnne
+ music_const MUSIC_MEET_PROF_OAK, Music_MeetProfOak
+ music_const MUSIC_MEET_RIVAL, Music_MeetRival
+ music_const MUSIC_MUSEUM_GUY, Music_MuseumGuy
+ music_const MUSIC_SAFARI_ZONE, Music_SafariZone
+ music_const MUSIC_PKMN_HEALED, Music_PkmnHealed
+ music_const MUSIC_ROUTES1, Music_Routes1
+ music_const MUSIC_ROUTES2, Music_Routes2
+ music_const MUSIC_ROUTES3, Music_Routes3
+ music_const MUSIC_ROUTES4, Music_Routes4
+ music_const MUSIC_INDIGO_PLATEAU, Music_IndigoPlateau
+
+ music_const MUSIC_GYM_LEADER_BATTLE, Music_GymLeaderBattle
+ music_const MUSIC_TRAINER_BATTLE, Music_TrainerBattle
+ music_const MUSIC_WILD_BATTLE, Music_WildBattle
+ music_const MUSIC_FINAL_BATTLE, Music_FinalBattle
+ music_const MUSIC_DEFEATED_TRAINER, Music_DefeatedTrainer
+ music_const MUSIC_DEFEATED_WILD_MON, Music_DefeatedWildMon
+ music_const MUSIC_DEFEATED_GYM_LEADER, Music_DefeatedGymLeader
+
+ music_const MUSIC_TITLE_SCREEN, Music_TitleScreen
+ music_const MUSIC_CREDITS, Music_Credits
+ music_const MUSIC_HALL_OF_FAME, Music_HallOfFame
+ music_const MUSIC_OAKS_LAB, Music_OaksLab
+ music_const MUSIC_JIGGLYPUFF_SONG, Music_JigglypuffSong
+ music_const MUSIC_BIKE_RIDING, Music_BikeRiding
+ music_const MUSIC_SURFING, Music_Surfing
+ music_const MUSIC_GAME_CORNER, Music_GameCorner
+ music_const MUSIC_INTRO_BATTLE, Music_IntroBattle
+ music_const MUSIC_DUNGEON1, Music_Dungeon1
+ music_const MUSIC_DUNGEON2, Music_Dungeon2
+ music_const MUSIC_DUNGEON3, Music_Dungeon3
+ music_const MUSIC_CINNABAR_MANSION, Music_CinnabarMansion
+ music_const MUSIC_POKEMON_TOWER, Music_PokemonTower
+ music_const MUSIC_SILPH_CO, Music_SilphCo
+ music_const MUSIC_MEET_EVIL_TRAINER, Music_MeetEvilTrainer
+ music_const MUSIC_MEET_FEMALE_TRAINER, Music_MeetFemaleTrainer
+ music_const MUSIC_MEET_MALE_TRAINER, Music_MeetMaleTrainer
+