mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-12-05 19:10:07 +13:00
Add some functions that MoveSprite calls.
hg-commit-id: a5ed1444c203
This commit is contained in:
parent
d0582479df
commit
b9980afa26
40
pokered.asm
40
pokered.asm
|
|
@ -1086,7 +1086,40 @@ TechnicalPrefix:
|
||||||
HiddenPrefix:
|
HiddenPrefix:
|
||||||
db "HM"
|
db "HM"
|
||||||
|
|
||||||
INCBIN "baserom.gbc",$3040,$35BC - $3040
|
INCBIN "baserom.gbc",$3040,$3541 - $3040
|
||||||
|
|
||||||
|
Function3541: ; 3541
|
||||||
|
; XXX what do these three functions do
|
||||||
|
push hl
|
||||||
|
call Function354E
|
||||||
|
ld [hl],$FF
|
||||||
|
call Function3558
|
||||||
|
ld [hl],$FF
|
||||||
|
pop hl
|
||||||
|
ret
|
||||||
|
|
||||||
|
Function354E: ; 354E
|
||||||
|
ld h,$C2
|
||||||
|
ld a,[$FF8C] ; the sprite to move
|
||||||
|
swap a
|
||||||
|
add a,6
|
||||||
|
ld l,a
|
||||||
|
ret
|
||||||
|
|
||||||
|
Function3558: ; 3558
|
||||||
|
push de
|
||||||
|
ld hl,$D4E4
|
||||||
|
ld a,[$FF8C] ; the sprite to move
|
||||||
|
dec a
|
||||||
|
add a
|
||||||
|
ld d,0
|
||||||
|
ld e,a
|
||||||
|
add hl,de
|
||||||
|
pop de
|
||||||
|
ret
|
||||||
|
|
||||||
|
INCBIN "baserom.gbc",$3566,$35BC - $3566
|
||||||
|
|
||||||
BankswitchHome: ; 35BC
|
BankswitchHome: ; 35BC
|
||||||
; switches to bank # in a
|
; switches to bank # in a
|
||||||
; Only use this when in the home bank!
|
; Only use this when in the home bank!
|
||||||
|
|
@ -1127,10 +1160,11 @@ INCBIN "baserom.gbc",$35EC,$363A - $35EC
|
||||||
|
|
||||||
MoveSprite: ; 363A
|
MoveSprite: ; 363A
|
||||||
; move the sprite [$FF8C] with the movement pointed to by de
|
; move the sprite [$FF8C] with the movement pointed to by de
|
||||||
call $3541
|
; actually only copies the movement data to $CC5B for later
|
||||||
|
call Function3541
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
call $354E
|
call Function354E
|
||||||
xor a
|
xor a
|
||||||
ld [hl],a
|
ld [hl],a
|
||||||
ld hl,$CC5B
|
ld hl,$CC5B
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue