Cry "echo" is actually the upper byte of pitch (now a word).

This commit is contained in:
yenatch 2014-07-18 09:50:31 -07:00
parent 2f99608526
commit ab018a5094
7 changed files with 273 additions and 532 deletions

File diff suppressed because it is too large Load Diff

View File

@ -828,7 +828,7 @@ Functione8466: ; e8466
add hl, bc add hl, bc
bit 4, [hl] bit 4, [hl]
jr z, .vibrato jr z, .vibrato
ld hl, $0027 ld hl, Channel1CryPitch - Channel1
add hl, bc add hl, bc
ld e, [hl] ld e, [hl]
inc hl inc hl
@ -1758,7 +1758,7 @@ MusicE6: ; e88e4
ld hl, Channel1Flags2 - Channel1 ld hl, Channel1Flags2 - Channel1
add hl, bc add hl, bc
set 4, [hl] set 4, [hl]
ld hl, $0028 ld hl, Channel1CryPitch + 1 - Channel1
add hl, bc add hl, bc
call GetMusicByte call GetMusicByte
ld [hld], a ld [hld], a
@ -2367,7 +2367,6 @@ _PlayMusic:: ; e8b30
PlayCry:: ; e8b79 PlayCry:: ; e8b79
; Play cry de using parameters: ; Play cry de using parameters:
; CryPitch ; CryPitch
; CryEcho
; CryLength ; CryLength
call MusicOff call MusicOff
@ -2416,7 +2415,7 @@ PlayCry:: ; e8b79
add hl, bc add hl, bc
ld a, [CryPitch] ld a, [CryPitch]
ld [hli], a ld [hli], a
ld a, [CryEcho] ld a, [CryPitch + 1]
ld [hl], a ld [hl], a
; No tempo for channel 4 ; No tempo for channel 4

View File

@ -1327,15 +1327,15 @@ BattleAnimCmd_E1: ; cc807 (33:4807)
ld b, a ld b, a
push hl push hl
ld hl, CryPitch ; $c2b0 ld hl, CryPitch
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
add hl, bc add hl, bc
ld a, l ld a, l
ld [CryPitch], a ; $c2b0 ld [CryPitch], a
ld a, h ld a, h
ld [CryEcho], a ; $c2b1 ld [CryPitch + 1], a
pop hl pop hl
ld a, [hli] ld a, [hli]
@ -1363,11 +1363,11 @@ BattleAnimCmd_E1: ; cc807 (33:4807)
; cc871 (33:4871) ; cc871 (33:4871)
Datacc871: ; cc871 Datacc871: ; cc871
; +pitch, +echo, +length ; +pitch, +length
db $00, $00, $c0, $00 dw 0, $c0
db $00, $00, $40, $00 dw 0, $40
db $00, $00, $00, $00 dw 0, $00
db $00, $00, $00, $00 dw 0, $00
; cc881 ; cc881

View File

@ -1793,7 +1793,7 @@ Function37f3:: ; 37f3
ld a, [hli] ld a, [hli]
ld [CryPitch], a ld [CryPitch], a
ld a, [hli] ld a, [hli]
ld [CryEcho], a ld [CryPitch + 1], a
ld a, [hli] ld a, [hli]
ld [CryLength], a ld [CryLength], a
ld a, [hl] ld a, [hl]

View File

@ -173,7 +173,7 @@ PlayCryHeader:: ; 3be3
ld a, [hli] ld a, [hli]
ld [CryPitch], a ld [CryPitch], a
ld a, [hli] ld a, [hli]
ld [CryEcho], a ld [CryPitch + 1], a
ld a, [hli] ld a, [hli]
ld [CryLength], a ld [CryLength], a
ld a, [hl] ld a, [hl]

View File

@ -99732,12 +99732,12 @@ Functionfb841: ; fb841
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
ld bc, $fec0 ld bc, -$140
add hl, bc add hl, bc
ld a, l ld a, l
ld [CryPitch], a ld [CryPitch], a
ld a, h ld a, h
ld [CryEcho], a ld [CryPitch + 1], a
ld hl, CryLength ld hl, CryLength
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
@ -99747,7 +99747,7 @@ Functionfb841: ; fb841
ld a, l ld a, l
ld [CryLength], a ld [CryLength], a
ld a, h ld a, h
ld [$c2b3], a ld [CryLength + 1], a
callba PlayCry callba PlayCry
call WaitSFX call WaitSFX

View File

@ -107,8 +107,7 @@ channel_struct: MACRO
ds 1 ; c125 ds 1 ; c125
ds 1 ; c126 ds 1 ; c126
ds 1 ; c127 ds 1 ; c127
\1CryPitch:: db \1CryPitch:: dw
\1CryEcho:: db
ds 4 ds 4
\1NoteLength:: db ; frames per 16th note \1NoteLength:: db ; frames per 16th note
ds 1 ; c12f ds 1 ; c12f
@ -227,9 +226,7 @@ MusicFadeIDHi:: ; c2aa
ds 1 ds 1
ds 5 ds 5
CryPitch:: ; c2b0 CryPitch:: ; c2b0
ds 1 ds 2
CryEcho:: ; c2b1
ds 1
CryLength:: ; c2b2 CryLength:: ; c2b2
ds 2 ds 2
LastVolume:: ; c2b4 LastVolume:: ; c2b4