mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-01-23 09:16:20 -08:00
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:
commit
80329c5489
@ -3,12 +3,11 @@
|
||||
; Interfaces are in bank 0.
|
||||
|
||||
; Notable functions:
|
||||
; UpdateSound (called during VBlank)
|
||||
; FadeMusic
|
||||
; PlaySFX
|
||||
; PlayStereoSFX
|
||||
; PlayCry
|
||||
|
||||
SoundRestart: ; e8000
|
||||
_SoundRestart: ; e8000
|
||||
; restart sound operation
|
||||
; clear all relevant hardware registers & wram
|
||||
push hl
|
||||
@ -65,7 +64,7 @@ MusicFadeRestart: ; e803d
|
||||
push af
|
||||
ld a, [MusicFadeIDLo]
|
||||
push af
|
||||
call SoundRestart
|
||||
call _SoundRestart
|
||||
pop af
|
||||
ld [MusicFadeIDLo], a
|
||||
pop af
|
||||
@ -85,7 +84,7 @@ MusicOff: ; e8057
|
||||
ret
|
||||
; e805c
|
||||
|
||||
UpdateSound: ; e805c
|
||||
_UpdateSound: ; e805c
|
||||
; called once per frame
|
||||
; no use updating audio if it's not playing
|
||||
ld a, [MusicPlaying]
|
||||
@ -636,7 +635,7 @@ FadeMusic: ; e8358
|
||||
ld a, [MusicFadeIDHi]
|
||||
ld d, a
|
||||
; load new song
|
||||
call LoadMusic
|
||||
call _PlayMusic
|
||||
.quit
|
||||
; cleanup
|
||||
pop bc
|
||||
@ -658,7 +657,7 @@ FadeMusic: ; e8358
|
||||
ld a, [MusicFadeIDHi]
|
||||
ld d, a
|
||||
; load new song
|
||||
call LoadMusic
|
||||
call _PlayMusic
|
||||
pop bc
|
||||
; fade in
|
||||
ld hl, MusicFade
|
||||
@ -2081,7 +2080,7 @@ MusicEB: ; e8a30
|
||||
call GetMusicByte
|
||||
ld d, a
|
||||
push bc
|
||||
call LoadMusic
|
||||
call _PlayMusic
|
||||
pop bc
|
||||
ret
|
||||
; e8a3e
|
||||
@ -2103,7 +2102,7 @@ GetMusicByte: ; e8a3e
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
; 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
|
||||
; update channeldata address
|
||||
ld hl, Channel1MusicAddress - Channel1
|
||||
@ -2308,7 +2307,7 @@ SetLRTracks: ; e8b1b
|
||||
ret
|
||||
; e8b30
|
||||
|
||||
LoadMusic: ; e8b30
|
||||
_PlayMusic: ; e8b30
|
||||
; load music
|
||||
call MusicOff
|
||||
ld hl, MusicID
|
||||
@ -2324,7 +2323,7 @@ LoadMusic: ; e8b30
|
||||
ld e, [hl]
|
||||
inc hl
|
||||
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
|
||||
and a, $03 ; get number of channels
|
||||
@ -2379,7 +2378,7 @@ PlayCry: ; e8b79
|
||||
ld d, [hl]
|
||||
|
||||
; Read the cry's sound header
|
||||
call FarLoadMusicByte
|
||||
call LoadMusicByte
|
||||
; Top 2 bits contain the number of channels
|
||||
rlca
|
||||
rlca
|
||||
@ -2465,7 +2464,7 @@ PlayCry: ; e8b79
|
||||
ret
|
||||
; e8c04
|
||||
|
||||
LoadSFX: ; e8c04
|
||||
_PlaySFX: ; e8c04
|
||||
; clear channels if they aren't already
|
||||
call MusicOff
|
||||
ld hl, $c1cc ; Channel5Flags
|
||||
@ -2544,7 +2543,7 @@ LoadSFX: ; e8c04
|
||||
inc hl
|
||||
ld d, [hl]
|
||||
; get # channels
|
||||
call FarLoadMusicByte
|
||||
call LoadMusicByte
|
||||
rlca ; top 2
|
||||
rlca ; bits
|
||||
and a, $03
|
||||
@ -2566,7 +2565,7 @@ LoadSFX: ; e8c04
|
||||
; e8ca6
|
||||
|
||||
|
||||
PlaySFX: ; e8ca6
|
||||
PlayStereoSFX: ; e8ca6
|
||||
; play sfx de
|
||||
|
||||
call MusicOff
|
||||
@ -2574,7 +2573,7 @@ PlaySFX: ; e8ca6
|
||||
; standard procedure if stereo's off
|
||||
ld a, [Options]
|
||||
bit 5, a
|
||||
jp z, LoadSFX
|
||||
jp z, _PlaySFX
|
||||
|
||||
; else, let's go ahead with this
|
||||
ld hl, MusicID
|
||||
@ -2597,7 +2596,7 @@ PlaySFX: ; e8ca6
|
||||
ld d, [hl]
|
||||
|
||||
; bit 2-3
|
||||
call FarLoadMusicByte
|
||||
call LoadMusicByte
|
||||
rlca
|
||||
rlca
|
||||
and 3 ; ch1-4
|
||||
@ -2674,7 +2673,7 @@ LoadChannel: ; e8d1b
|
||||
; input:
|
||||
; de:
|
||||
; get pointer to current channel
|
||||
call FarLoadMusicByte
|
||||
call LoadMusicByte
|
||||
inc de
|
||||
and a, $07 ; bit 0-2 (current channel)
|
||||
ld [CurChannel], a
|
||||
@ -2693,10 +2692,10 @@ LoadChannel: ; e8d1b
|
||||
; load music pointer
|
||||
ld hl, Channel1MusicAddress - Channel1
|
||||
add hl, bc
|
||||
call FarLoadMusicByte
|
||||
call LoadMusicByte
|
||||
ld [hli], a
|
||||
inc de
|
||||
call FarLoadMusicByte
|
||||
call LoadMusicByte
|
||||
ld [hl], a
|
||||
inc de
|
||||
; load music id
|
||||
@ -2745,13 +2744,13 @@ ChannelInit: ; e8d5b
|
||||
ret
|
||||
; e8d76
|
||||
|
||||
FarLoadMusicByte: ; e8d76
|
||||
LoadMusicByte: ; e8d76
|
||||
; input:
|
||||
; de = current music address
|
||||
; output:
|
||||
; a = CurMusicByte
|
||||
ld a, [MusicBank]
|
||||
call LoadMusicByte
|
||||
call _LoadMusicByte
|
||||
ld a, [CurMusicByte]
|
||||
ret
|
||||
; e8d80
|
||||
|
@ -8,7 +8,7 @@ PlayTrainerEncounterMusic: ; e900a
|
||||
; play nothing for one frame
|
||||
push de
|
||||
ld de, $0000 ; id: Music_Nothing
|
||||
call StartMusic
|
||||
call PlayMusic
|
||||
call DelayFrame
|
||||
; play new song
|
||||
call MaxVolume
|
||||
@ -17,7 +17,7 @@ PlayTrainerEncounterMusic: ; e900a
|
||||
ld hl, TrainerEncounterMusic
|
||||
add hl, de
|
||||
ld e, [hl]
|
||||
call StartMusic
|
||||
call PlayMusic
|
||||
ret
|
||||
; e9027
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -66,7 +66,7 @@ BattleCommand54: ; 37588
|
||||
jr nz, .failed
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
||||
call GetBattleVarPair
|
||||
call _GetBattleVar
|
||||
bit 1, [hl]
|
||||
jr nz, .failed
|
||||
|
||||
|
@ -7,7 +7,7 @@ BattleCommand5a: ; 3766f
|
||||
ret c
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS1
|
||||
call GetBattleVarPair
|
||||
call _GetBattleVar
|
||||
set SUBSTATUS_ENDURE, [hl]
|
||||
|
||||
call Function0x37e01
|
||||
|
@ -4,7 +4,7 @@ BattleCommand55: ; 37618
|
||||
ret c
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS1
|
||||
call GetBattleVarPair
|
||||
call _GetBattleVar
|
||||
set SUBSTATUS_PROTECT, [hl]
|
||||
|
||||
call Function0x37e01
|
||||
@ -29,7 +29,7 @@ ProtectChance: ; 3762c
|
||||
; Can't have a substitute.
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS4
|
||||
call CleanGetBattleVarPair
|
||||
call GetBattleVar
|
||||
bit SUBSTATUS_SUBSTITUTE, a
|
||||
jr nz, .failed
|
||||
|
||||
|
@ -94,7 +94,7 @@ GetHiddenPower: ; fbced
|
||||
.GotType
|
||||
push af
|
||||
ld a, BATTLE_VARS_MOVE_TYPE
|
||||
call GetBattleVarPair
|
||||
call _GetBattleVar
|
||||
pop af
|
||||
ld [hl], a
|
||||
|
||||
|
@ -223,10 +223,10 @@ ParseCredits: ; 1099aa
|
||||
ld de, MUSIC_CREDITS
|
||||
push de
|
||||
ld de, MUSIC_NONE
|
||||
call StartMusic
|
||||
call PlayMusic
|
||||
call DelayFrame
|
||||
pop de
|
||||
call StartMusic
|
||||
call PlayMusic
|
||||
jp .loop
|
||||
|
||||
.wait2
|
||||
|
@ -588,7 +588,7 @@ Script_specialsound: ; 0x96fe4
|
||||
jr z, .play
|
||||
ld de, SFX_ITEM
|
||||
.play
|
||||
call StartSFX
|
||||
call PlaySFX
|
||||
call WaitSFX
|
||||
ret
|
||||
; 0x96ffe
|
||||
@ -917,7 +917,7 @@ Script_playmusic: ; 0x97189
|
||||
; music_pointer (MultiByteParam)
|
||||
|
||||
ld de, $0000
|
||||
call StartMusic
|
||||
call PlayMusic
|
||||
xor a
|
||||
ld [$c2a7], a
|
||||
call MaxVolume
|
||||
@ -925,7 +925,7 @@ Script_playmusic: ; 0x97189
|
||||
ld e, a
|
||||
call GetScriptByte
|
||||
ld d, a
|
||||
call StartMusic
|
||||
call PlayMusic
|
||||
ret
|
||||
; 0x971a2
|
||||
|
||||
@ -954,7 +954,7 @@ Script_playsound: ; 0x971b7
|
||||
ld e, a
|
||||
call GetScriptByte
|
||||
ld d, a
|
||||
call StartSFX
|
||||
call PlaySFX
|
||||
ret
|
||||
; 0x971c3
|
||||
|
||||
@ -971,7 +971,7 @@ Script_warpsound: ; 0x971c7
|
||||
ld a, $5
|
||||
ld hl, $4a07
|
||||
rst $8
|
||||
call StartSFX
|
||||
call PlaySFX
|
||||
ret
|
||||
; 0x971d1
|
||||
|
||||
|
@ -225,7 +225,7 @@ _TitleScreen: ; 10ed67
|
||||
; Play starting sound effect
|
||||
call SFXChannelsOff
|
||||
ld de, SFX_TITLE_SCREEN_ENTRANCE
|
||||
call StartSFX
|
||||
call PlaySFX
|
||||
|
||||
ret
|
||||
; 10eea7
|
||||
|
BIN
gfx/intro/001.lz
BIN
gfx/intro/001.lz
Binary file not shown.
BIN
gfx/intro/002.lz
BIN
gfx/intro/002.lz
Binary file not shown.
BIN
gfx/intro/003.lz
BIN
gfx/intro/003.lz
Binary file not shown.
BIN
gfx/intro/004.lz
BIN
gfx/intro/004.lz
Binary file not shown.
BIN
gfx/intro/005.lz
BIN
gfx/intro/005.lz
Binary file not shown.
BIN
gfx/intro/006.lz
BIN
gfx/intro/006.lz
Binary file not shown.
BIN
gfx/intro/007.lz
BIN
gfx/intro/007.lz
Binary file not shown.
BIN
gfx/intro/008.lz
BIN
gfx/intro/008.lz
Binary file not shown.
BIN
gfx/intro/009.lz
BIN
gfx/intro/009.lz
Binary file not shown.
BIN
gfx/intro/010.lz
BIN
gfx/intro/010.lz
Binary file not shown.
BIN
gfx/intro/011.lz
BIN
gfx/intro/011.lz
Binary file not shown.
BIN
gfx/intro/012.lz
BIN
gfx/intro/012.lz
Binary file not shown.
BIN
gfx/intro/013.lz
BIN
gfx/intro/013.lz
Binary file not shown.
BIN
gfx/intro/014.lz
BIN
gfx/intro/014.lz
Binary file not shown.
BIN
gfx/intro/015.lz
BIN
gfx/intro/015.lz
Binary file not shown.
BIN
gfx/intro/017.lz
BIN
gfx/intro/017.lz
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.
Binary file not shown.
Binary file not shown.
BIN
gfx/splash/logo.1bpp
Normal file
BIN
gfx/splash/logo.1bpp
Normal file
Binary file not shown.
BIN
gfx/tilesets/roofs/0.2bpp
Normal file
BIN
gfx/tilesets/roofs/0.2bpp
Normal file
Binary file not shown.
BIN
gfx/tilesets/roofs/1.2bpp
Normal file
BIN
gfx/tilesets/roofs/1.2bpp
Normal file
Binary file not shown.
BIN
gfx/tilesets/roofs/2.2bpp
Normal file
BIN
gfx/tilesets/roofs/2.2bpp
Normal file
Binary file not shown.
BIN
gfx/tilesets/roofs/3.2bpp
Normal file
BIN
gfx/tilesets/roofs/3.2bpp
Normal file
Binary file not shown.
BIN
gfx/tilesets/roofs/4.2bpp
Normal file
BIN
gfx/tilesets/roofs/4.2bpp
Normal file
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
Reset: ; 150
|
||||
di
|
||||
call CleanSoundRestart
|
||||
call SoundRestart
|
||||
xor a
|
||||
ld [$ffde], a
|
||||
call ClearPalettes
|
||||
@ -170,7 +170,7 @@ Init: ; 17d
|
||||
ld a, $30
|
||||
call Predef
|
||||
|
||||
call CleanSoundRestart
|
||||
call SoundRestart
|
||||
xor a
|
||||
ld [CurMusic], a
|
||||
jp GameInit
|
||||
|
@ -394,7 +394,7 @@ Functionaaf: ; aaf
|
||||
call Functionac6
|
||||
push de
|
||||
ld de, SFX_READ_TEXT_2
|
||||
call StartSFX
|
||||
call PlaySFX
|
||||
pop de
|
||||
ret
|
||||
|
||||
|
@ -1418,9 +1418,7 @@ Function2821: ; 2821
|
||||
jr .asm_2875
|
||||
|
||||
.asm_286f
|
||||
ld a, $7
|
||||
ld hl, $4000
|
||||
rst FarCall
|
||||
callba LoadMapGroupRoof
|
||||
|
||||
.asm_2875
|
||||
xor a
|
||||
|
@ -532,7 +532,7 @@ Function1ff8: ; 1ff8
|
||||
PlayClickSFX: ; 2009
|
||||
push de
|
||||
ld de, SFX_READ_TEXT_2
|
||||
call StartSFX
|
||||
call PlaySFX
|
||||
pop de
|
||||
ret
|
||||
; 0x2012
|
||||
|
@ -1091,7 +1091,7 @@ Text_PlaySound:: ; 1500
|
||||
ld e, [hl]
|
||||
inc hl
|
||||
ld d, [hl]
|
||||
call StartSFX
|
||||
call PlaySFX
|
||||
call WaitSFX
|
||||
pop de
|
||||
|
||||
|
@ -167,9 +167,9 @@ VBlank0: ; 2b1
|
||||
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 @@ VBlank2: ; 325
|
||||
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 @@ VBlank1: ; 337
|
||||
|
||||
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 @@ VBlank3: ; 396
|
||||
|
||||
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 @@ VBlank4: ; 3df
|
||||
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 @@ VBlank5: ; 400
|
||||
|
||||
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 @@ VBlank6: ; 436
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user