shithub: pokered

Download patch

ref: fadac928bccb9be1010e73df3253021312f5a2fb
parent: d266f788b4ba251c5a41f47745c941d81e5d7d88
author: U-Fish-PC\Daniel <corrnondacqb@yahoo.com>
date: Mon Jun 9 12:18:29 EDT 2014

Clean up music bank references

--- a/audio/engine_1.asm
+++ b/audio/engine_1.asm
@@ -1,6 +1,6 @@
 ; The first of three duplicated sound engines.
 
-Func_9103:: ; 0x9103
+Music2_UpdateMusic:: ; 0x9103
 	ld c, CH0
 .loop
 	ld b, $0
--- a/audio/engine_2.asm
+++ b/audio/engine_2.asm
@@ -1,6 +1,6 @@
 ; The second of three duplicated sound engines.
 
-Func_21879:: ; 21879 (8:5879)
+Music8_UpdateMusic:: ; 21879 (8:5879)
 	ld c, CH0
 .loop
 	ld b, $0
--- a/audio/engine_3.asm
+++ b/audio/engine_3.asm
@@ -1,6 +1,6 @@
 ; The third of three duplicated sound engines.
 
-Func_7d177:: ; 7d177 (1f:5177)
+Music1f_UpdateMusic:: ; 7d177 (1f:5177)
 	ld c, CH0
 .loop
 	ld b, $0
--- a/engine/intro.asm
+++ b/engine/intro.asm
@@ -322,7 +322,7 @@
 	ld c, $28
 	call DelayFrames
 .asm_418d0
-	ld a, Bank(Func_7d8ea)
+	ld a, BANK(Music_IntroBattle)
 	ld [wc0ef], a
 	ld [wc0f0], a
 	ld a, MUSIC_INTRO_BATTLE
--- a/engine/overworld/healing_machine.asm
+++ b/engine/overworld/healing_machine.asm
@@ -41,7 +41,7 @@
 	ld a, $ff
 	ld [wc0ee], a
 	call PlaySound
-	ld a, Bank(Func_9876)
+	ld a, BANK(Music_PkmnHealed)
 	ld [wc0ef], a
 .asm_70495
 	ld a, MUSIC_PKMN_HEALED
--- a/engine/overworld/npc_movement.asm
+++ b/engine/overworld/npc_movement.asm
@@ -158,7 +158,7 @@
 	dw Func_1a56b
 
 Func_1a514: ; 1a514 (6:6514)
-	ld a, Bank(Func_9876)
+	ld a, BANK(Music_MuseumGuy)
 	ld [wc0ef], a
 	ld [wc0f0], a
 	ld a, MUSIC_MUSEUM_GUY
@@ -215,7 +215,7 @@
 	dw Func_1a56b
 
 Func_1a581: ; 1a581 (6:6581)
-	ld a, Bank(Func_9876)
+	ld a, BANK(Music_MuseumGuy)
 	ld [wc0ef], a
 	ld [wc0f0], a
 	ld a, MUSIC_MUSEUM_GUY
--- a/engine/titlescreen.asm
+++ b/engine/titlescreen.asm
@@ -17,7 +17,7 @@
 	ld [hli], a
 	ld [hli], a
 	ld [hl], a
-	ld a, Bank(Func_7d8ea)
+	ld a, BANK(Music_TitleScreen)
 	ld [wc0ef], a
 	ld [wc0f0], a
 
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -30,7 +30,7 @@
 	ld b, a
 	ld a, d
 	and a
-	ld a, Bank(Func_7d8ea)
+	ld a, BANK(Music_BikeRiding)
 	jr nz, .asm_233e
 	ld [wc0ef], a
 .asm_233e
@@ -56,19 +56,19 @@
 Func_235f:: ; 235f (0:235f)
 	ld a, [wc0ef]
 	ld b, a
-	cp $2
+	cp BANK(Music2_UpdateMusic)
 	jr nz, .checkForBank08
 .bank02
-	ld hl, Func_9103
+	ld hl, Music2_UpdateMusic
 	jr .asm_2378
 .checkForBank08
-	cp $8
+	cp BANK(Music8_UpdateMusic)
 	jr nz, .bank1F
 .bank08
-	ld hl, Func_21879
+	ld hl, Music8_UpdateMusic
 	jr .asm_2378
 .bank1F
-	ld hl, Func_7d177
+	ld hl, Music1f_UpdateMusic
 .asm_2378
 	ld c, $6
 .asm_237a
@@ -147,7 +147,7 @@
 	ld a, [wc0ef]
 	ld [H_LOADEDROMBANK], a
 	ld [$2000], a
-	cp $2
+	cp BANK(Func_9876)
 	jr nz, .checkForBank08
 .bank02
 	ld a, b
@@ -154,7 +154,7 @@
 	call Func_9876
 	jr .asm_240b
 .checkForBank08
-	cp $8
+	cp BANK(Func_22035)
 	jr nz, .bank1F
 .bank08
 	ld a, b
--- a/home/init.asm
+++ b/home/init.asm
@@ -128,7 +128,7 @@
 
 
 StopAllSounds::
-	ld a, Bank(Func_9876)
+	ld a, BANK(Music2_UpdateMusic)
 	ld [wc0ef], a
 	ld [wc0f0], a
 	xor a
--- a/home/vblank.asm
+++ b/home/vblank.asm
@@ -56,20 +56,20 @@
 	ld [H_LOADEDROMBANK], a
 	ld [MBC3RomBank], a
 
-	cp BANK(Func_9103)
+	cp BANK(Music2_UpdateMusic)
 	jr nz, .notbank2
 .bank2
-	call Func_9103
+	call Music2_UpdateMusic
 	jr .afterMusic
 .notbank2
-	cp 8
+	cp BANK(Music8_UpdateMusic)
 	jr nz, .bank1F
 .bank8
 	call Func_2136e
-	call Func_21879
+	call Music8_UpdateMusic
 	jr .afterMusic
 .bank1F
-	call Func_7d177
+	call Music1f_UpdateMusic
 .afterMusic
 
 	callba Func_18dee ; keep track of time played