mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
fix LoadMusicByte naming scheme
This commit is contained in:
parent
91b822ceb8
commit
aae33da95b
@ -2103,7 +2103,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
|
||||||
@ -2324,7 +2324,7 @@ _PlayMusic: ; 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 +2379,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
|
||||||
@ -2544,7 +2544,7 @@ _PlaySFX: ; 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
|
||||||
@ -2597,7 +2597,7 @@ PlayStereoSFX: ; 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 +2674,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 +2693,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 +2745,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
|
||||||
|
Loading…
Reference in New Issue
Block a user