Merge pull request #210 from yenatch/master

contest mons, fixed dumb labels, fixed more lz dumps, game freak logo, roofs
This commit is contained in:
Bryan Bishop
2013-10-14 11:53:12 -07:00
50 changed files with 565 additions and 552 deletions

View File

@@ -3,12 +3,11 @@
; Interfaces are in bank 0. ; Interfaces are in bank 0.
; Notable functions: ; Notable functions:
; UpdateSound (called during VBlank)
; FadeMusic ; FadeMusic
; PlaySFX ; PlayStereoSFX
; PlayCry ; PlayCry
SoundRestart: ; e8000 _SoundRestart: ; e8000
; restart sound operation ; restart sound operation
; clear all relevant hardware registers & wram ; clear all relevant hardware registers & wram
push hl push hl
@@ -65,7 +64,7 @@ MusicFadeRestart: ; e803d
push af push af
ld a, [MusicFadeIDLo] ld a, [MusicFadeIDLo]
push af push af
call SoundRestart call _SoundRestart
pop af pop af
ld [MusicFadeIDLo], a ld [MusicFadeIDLo], a
pop af pop af
@@ -85,7 +84,7 @@ MusicOff: ; e8057
ret ret
; e805c ; e805c
UpdateSound: ; e805c _UpdateSound: ; e805c
; called once per frame ; called once per frame
; no use updating audio if it's not playing ; no use updating audio if it's not playing
ld a, [MusicPlaying] ld a, [MusicPlaying]
@@ -636,7 +635,7 @@ FadeMusic: ; e8358
ld a, [MusicFadeIDHi] ld a, [MusicFadeIDHi]
ld d, a ld d, a
; load new song ; load new song
call LoadMusic call _PlayMusic
.quit .quit
; cleanup ; cleanup
pop bc pop bc
@@ -658,7 +657,7 @@ FadeMusic: ; e8358
ld a, [MusicFadeIDHi] ld a, [MusicFadeIDHi]
ld d, a ld d, a
; load new song ; load new song
call LoadMusic call _PlayMusic
pop bc pop bc
; fade in ; fade in
ld hl, MusicFade ld hl, MusicFade
@@ -2081,7 +2080,7 @@ MusicEB: ; e8a30
call GetMusicByte call GetMusicByte
ld d, a ld d, a
push bc push bc
call LoadMusic call _PlayMusic
pop bc pop bc
ret ret
; e8a3e ; e8a3e
@@ -2103,7 +2102,7 @@ GetMusicByte: ; e8a3e
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
; get byte ; get byte
call LoadMusicByte ; load data into CurMusicByte call _LoadMusicByte ; load data into CurMusicByte
inc de ; advance to next byte for next time this is called inc de ; advance to next byte for next time this is called
; update channeldata address ; update channeldata address
ld hl, Channel1MusicAddress - Channel1 ld hl, Channel1MusicAddress - Channel1
@@ -2308,7 +2307,7 @@ SetLRTracks: ; e8b1b
ret ret
; e8b30 ; e8b30
LoadMusic: ; e8b30 _PlayMusic: ; e8b30
; load music ; load music
call MusicOff call MusicOff
ld hl, MusicID ld hl, MusicID
@@ -2324,7 +2323,7 @@ LoadMusic: ; e8b30
ld e, [hl] ld e, [hl]
inc hl inc hl
ld d, [hl] ; music header address ld d, [hl] ; music header address
call FarLoadMusicByte ; store first byte of music header in a call LoadMusicByte ; store first byte of music header in a
rlca rlca
rlca rlca
and a, $03 ; get number of channels and a, $03 ; get number of channels
@@ -2379,7 +2378,7 @@ PlayCry: ; e8b79
ld d, [hl] ld d, [hl]
; Read the cry's sound header ; Read the cry's sound header
call FarLoadMusicByte call LoadMusicByte
; Top 2 bits contain the number of channels ; Top 2 bits contain the number of channels
rlca rlca
rlca rlca
@@ -2465,7 +2464,7 @@ PlayCry: ; e8b79
ret ret
; e8c04 ; e8c04
LoadSFX: ; e8c04 _PlaySFX: ; e8c04
; clear channels if they aren't already ; clear channels if they aren't already
call MusicOff call MusicOff
ld hl, $c1cc ; Channel5Flags ld hl, $c1cc ; Channel5Flags
@@ -2544,7 +2543,7 @@ LoadSFX: ; e8c04
inc hl inc hl
ld d, [hl] ld d, [hl]
; get # channels ; get # channels
call FarLoadMusicByte call LoadMusicByte
rlca ; top 2 rlca ; top 2
rlca ; bits rlca ; bits
and a, $03 and a, $03
@@ -2566,7 +2565,7 @@ LoadSFX: ; e8c04
; e8ca6 ; e8ca6
PlaySFX: ; e8ca6 PlayStereoSFX: ; e8ca6
; play sfx de ; play sfx de
call MusicOff call MusicOff
@@ -2574,7 +2573,7 @@ PlaySFX: ; e8ca6
; standard procedure if stereo's off ; standard procedure if stereo's off
ld a, [Options] ld a, [Options]
bit 5, a bit 5, a
jp z, LoadSFX jp z, _PlaySFX
; else, let's go ahead with this ; else, let's go ahead with this
ld hl, MusicID ld hl, MusicID
@@ -2597,7 +2596,7 @@ PlaySFX: ; e8ca6
ld d, [hl] ld d, [hl]
; bit 2-3 ; bit 2-3
call FarLoadMusicByte call LoadMusicByte
rlca rlca
rlca rlca
and 3 ; ch1-4 and 3 ; ch1-4
@@ -2674,7 +2673,7 @@ LoadChannel: ; e8d1b
; input: ; input:
; de: ; de:
; get pointer to current channel ; get pointer to current channel
call FarLoadMusicByte call LoadMusicByte
inc de inc de
and a, $07 ; bit 0-2 (current channel) and a, $07 ; bit 0-2 (current channel)
ld [CurChannel], a ld [CurChannel], a
@@ -2693,10 +2692,10 @@ LoadChannel: ; e8d1b
; load music pointer ; load music pointer
ld hl, Channel1MusicAddress - Channel1 ld hl, Channel1MusicAddress - Channel1
add hl, bc add hl, bc
call FarLoadMusicByte call LoadMusicByte
ld [hli], a ld [hli], a
inc de inc de
call FarLoadMusicByte call LoadMusicByte
ld [hl], a ld [hl], a
inc de inc de
; load music id ; load music id
@@ -2745,13 +2744,13 @@ ChannelInit: ; e8d5b
ret ret
; e8d76 ; e8d76
FarLoadMusicByte: ; e8d76 LoadMusicByte: ; e8d76
; input: ; input:
; de = current music address ; de = current music address
; output: ; output:
; a = CurMusicByte ; a = CurMusicByte
ld a, [MusicBank] ld a, [MusicBank]
call LoadMusicByte call _LoadMusicByte
ld a, [CurMusicByte] ld a, [CurMusicByte]
ret ret
; e8d80 ; e8d80

View File

@@ -8,7 +8,7 @@ PlayTrainerEncounterMusic: ; e900a
; play nothing for one frame ; play nothing for one frame
push de push de
ld de, $0000 ; id: Music_Nothing ld de, $0000 ; id: Music_Nothing
call StartMusic call PlayMusic
call DelayFrame call DelayFrame
; play new song ; play new song
call MaxVolume call MaxVolume
@@ -17,7 +17,7 @@ PlayTrainerEncounterMusic: ; e900a
ld hl, TrainerEncounterMusic ld hl, TrainerEncounterMusic
add hl, de add hl, de
ld e, [hl] ld e, [hl]
call StartMusic call PlayMusic
ret ret
; e9027 ; e9027

File diff suppressed because it is too large Load Diff

View File

@@ -66,7 +66,7 @@ BattleCommand54: ; 37588
jr nz, .failed jr nz, .failed
ld a, BATTLE_VARS_SUBSTATUS1_OPP ld a, BATTLE_VARS_SUBSTATUS1_OPP
call GetBattleVarPair call _GetBattleVar
bit 1, [hl] bit 1, [hl]
jr nz, .failed jr nz, .failed

View File

@@ -7,7 +7,7 @@ BattleCommand5a: ; 3766f
ret c ret c
ld a, BATTLE_VARS_SUBSTATUS1 ld a, BATTLE_VARS_SUBSTATUS1
call GetBattleVarPair call _GetBattleVar
set SUBSTATUS_ENDURE, [hl] set SUBSTATUS_ENDURE, [hl]
call Function0x37e01 call Function0x37e01

View File

@@ -4,7 +4,7 @@ BattleCommand55: ; 37618
ret c ret c
ld a, BATTLE_VARS_SUBSTATUS1 ld a, BATTLE_VARS_SUBSTATUS1
call GetBattleVarPair call _GetBattleVar
set SUBSTATUS_PROTECT, [hl] set SUBSTATUS_PROTECT, [hl]
call Function0x37e01 call Function0x37e01
@@ -29,7 +29,7 @@ ProtectChance: ; 3762c
; Can't have a substitute. ; Can't have a substitute.
ld a, BATTLE_VARS_SUBSTATUS4 ld a, BATTLE_VARS_SUBSTATUS4
call CleanGetBattleVarPair call GetBattleVar
bit SUBSTATUS_SUBSTITUTE, a bit SUBSTATUS_SUBSTITUTE, a
jr nz, .failed jr nz, .failed

View File

@@ -94,7 +94,7 @@ GetHiddenPower: ; fbced
.GotType .GotType
push af push af
ld a, BATTLE_VARS_MOVE_TYPE ld a, BATTLE_VARS_MOVE_TYPE
call GetBattleVarPair call _GetBattleVar
pop af pop af
ld [hl], a ld [hl], a

View File

@@ -223,10 +223,10 @@ ParseCredits: ; 1099aa
ld de, MUSIC_CREDITS ld de, MUSIC_CREDITS
push de push de
ld de, MUSIC_NONE ld de, MUSIC_NONE
call StartMusic call PlayMusic
call DelayFrame call DelayFrame
pop de pop de
call StartMusic call PlayMusic
jp .loop jp .loop
.wait2 .wait2

View File

@@ -588,7 +588,7 @@ Script_specialsound: ; 0x96fe4
jr z, .play jr z, .play
ld de, SFX_ITEM ld de, SFX_ITEM
.play .play
call StartSFX call PlaySFX
call WaitSFX call WaitSFX
ret ret
; 0x96ffe ; 0x96ffe
@@ -917,7 +917,7 @@ Script_playmusic: ; 0x97189
; music_pointer (MultiByteParam) ; music_pointer (MultiByteParam)
ld de, $0000 ld de, $0000
call StartMusic call PlayMusic
xor a xor a
ld [$c2a7], a ld [$c2a7], a
call MaxVolume call MaxVolume
@@ -925,7 +925,7 @@ Script_playmusic: ; 0x97189
ld e, a ld e, a
call GetScriptByte call GetScriptByte
ld d, a ld d, a
call StartMusic call PlayMusic
ret ret
; 0x971a2 ; 0x971a2
@@ -954,7 +954,7 @@ Script_playsound: ; 0x971b7
ld e, a ld e, a
call GetScriptByte call GetScriptByte
ld d, a ld d, a
call StartSFX call PlaySFX
ret ret
; 0x971c3 ; 0x971c3
@@ -971,7 +971,7 @@ Script_warpsound: ; 0x971c7
ld a, $5 ld a, $5
ld hl, $4a07 ld hl, $4a07
rst $8 rst $8
call StartSFX call PlaySFX
ret ret
; 0x971d1 ; 0x971d1

View File

@@ -225,7 +225,7 @@ _TitleScreen: ; 10ed67
; Play starting sound effect ; Play starting sound effect
call SFXChannelsOff call SFXChannelsOff
ld de, SFX_TITLE_SCREEN_ENTRANCE ld de, SFX_TITLE_SCREEN_ENTRANCE
call StartSFX call PlaySFX
ret ret
; 10eea7 ; 10eea7

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More