shithub: pokecrystal

Download patch

ref: 52a6b7da8ebebe2adefc03b43bcc5800ddec2835
parent: 9e81c46cbfa09805eb5503ee6e32b3d4a9eeb6a0
parent: 946a213f09db39243c883ad677a22de738977836
author: yenatch <[email protected]>
date: Fri Oct 25 13:54:04 EDT 2013

Merge commit '946a213f' into merge-mrwint

--- a/audio/engine.asm
+++ b/audio/engine.asm
@@ -3,12 +3,11 @@
 ; Interfaces are in bank 0.
 
 ; Notable functions:
-; 	UpdateSound (called during VBlank)
 ; 	FadeMusic
 ; 	PlayStereoSFX
 ; 	PlayCry
 
-SoundRestart: ; e8000
+_SoundRestart: ; e8000
 ; restart sound operation
 ; clear all relevant hardware registers & wram
 	push hl
@@ -65,7 +64,7 @@
 	push af
 	ld a, [MusicFadeIDLo]
 	push af
-	call SoundRestart
+	call _SoundRestart
 	pop af
 	ld [MusicFadeIDLo], a
 	pop af
@@ -85,7 +84,7 @@
 	ret
 ; e805c
 
-UpdateSound: ; e805c
+_UpdateSound: ; e805c
 ; called once per frame
 	; no use updating audio if it's not playing
 	ld a, [MusicPlaying]
--- a/home/init.asm
+++ b/home/init.asm
@@ -1,6 +1,6 @@
 Reset: ; 150
 	di
-	call CleanSoundRestart
+	call SoundRestart
 	xor a
 	ld [$ffde], a
 	call ClearPalettes
@@ -170,7 +170,7 @@
 	ld a, $30
 	call Predef
 
-	call CleanSoundRestart
+	call SoundRestart
 	xor a
 	ld [CurMusic], a
 	jp GameInit
--- a/home/vblank.asm
+++ b/home/vblank.asm
@@ -167,9 +167,9 @@
 	call Joypad
 	
 ; update sound
-	ld a, BANK(UpdateSound)
+	ld a, BANK(_UpdateSound)
 	rst Bankswitch ; bankswitch
-	call UpdateSound
+	call _UpdateSound
 	ld a, [$ff8a]
 	rst Bankswitch ; restore bank
 	
@@ -189,9 +189,9 @@
 	ld [$ff8a], a
 	
 ; update sound
-	ld a, BANK(UpdateSound)
+	ld a, BANK(_UpdateSound)
 	rst Bankswitch ; bankswitch
-	call UpdateSound
+	call _UpdateSound
 	
 ; restore bank
 	ld a, [$ff8a]
@@ -265,9 +265,9 @@
 	
 	ei
 ; update sound
-	ld a, BANK(UpdateSound)
+	ld a, BANK(_UpdateSound)
 	rst Bankswitch ; bankswitch
-	call UpdateSound
+	call _UpdateSound
 ; restore bank
 	ld a, [$ff8a]
 	rst Bankswitch
@@ -369,9 +369,9 @@
 	
 	ei
 ; update sound
-	ld a, BANK(UpdateSound)
+	ld a, BANK(_UpdateSound)
 	rst Bankswitch ; bankswitch
-	call UpdateSound
+	call _UpdateSound
 ; restore bank
 	ld a, [$ff8a]
 	rst Bankswitch
@@ -434,9 +434,9 @@
 	call AskSerial
 	
 ; update sound
-	ld a, BANK(UpdateSound)
+	ld a, BANK(_UpdateSound)
 	rst Bankswitch ; bankswitch
-	call UpdateSound
+	call _UpdateSound
 ; restore bank
 	ld a, [$ff8a]
 	rst Bankswitch
@@ -486,9 +486,9 @@
 	
 	ei
 ; update sound
-	ld a, BANK(UpdateSound)
+	ld a, BANK(_UpdateSound)
 	rst Bankswitch ; bankswitch
-	call UpdateSound
+	call _UpdateSound
 ; restore bank
 	ld a, [$ff8a]
 	rst Bankswitch
@@ -531,9 +531,9 @@
 	ld [VBlankOccurred], a
 	
 ; update sound
-	ld a, BANK(UpdateSound)
+	ld a, BANK(_UpdateSound)
 	rst Bankswitch ; bankswitch
-	call UpdateSound
+	call _UpdateSound
 ; restore bank
 	ld a, [$ff8a]
 	rst Bankswitch
--- a/main.asm
+++ b/main.asm
@@ -2975,7 +2975,7 @@
 ; 3b4e
 
 
-CleanSoundRestart: ; 3b4e
+SoundRestart: ; 3b4e
 
 	push hl
 	push de
@@ -2984,11 +2984,11 @@
 
 	ld a, [hROMBank]
 	push af
-	ld a, BANK(SoundRestart)
+	ld a, BANK(_SoundRestart)
 	ld [hROMBank], a
 	ld [MBC3RomBank], a
 
-	call SoundRestart
+	call _SoundRestart
 
 	pop af
 	ld [hROMBank], a
@@ -3002,7 +3002,7 @@
 ; 3b6a
 
 
-CleanUpdateSound: ; 3b6a
+UpdateSound: ; 3b6a
 
 	push hl
 	push de
@@ -3011,11 +3011,11 @@
 
 	ld a, [hROMBank]
 	push af
-	ld a, BANK(UpdateSound)
+	ld a, BANK(_UpdateSound)
 	ld [hROMBank], a
 	ld [MBC3RomBank], a
 
-	call UpdateSound
+	call _UpdateSound
 
 	pop af
 	ld [hROMBank], a
@@ -3055,7 +3055,7 @@
 
 	ld a, [hROMBank]
 	push af
-	ld a, BANK(_PlayMusic) ; and BANK(SoundRestart)
+	ld a, BANK(_PlayMusic) ; and BANK(_SoundRestart)
 	ld [hROMBank], a
 	ld [MBC3RomBank], a
 
@@ -3067,7 +3067,7 @@
 	jr .end
 
 .nomusic
-	call SoundRestart
+	call _SoundRestart
 
 .end
 	pop af
@@ -3306,7 +3306,7 @@
 	and a
 	ret z
 	dec a
-	call CleanUpdateSound
+	call UpdateSound
 	jr .asm_3cb4
 ; 3cbc