mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Labelled and commented mostly sprite-related things
This commit is contained in:
parent
daf4fc87ae
commit
91793015e5
86 changed files with 838 additions and 738 deletions
|
|
@ -1,26 +1,27 @@
|
|||
HandleDoors: ; 1a609 (6:6609)
|
||||
; returns whether the player is standing on a door in carry
|
||||
IsPlayerStandingOnDoor: ; 1a609 (6:6609)
|
||||
push de
|
||||
ld hl, DoorTileIDPointers ; $662c
|
||||
ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET
|
||||
ld de, $3
|
||||
call IsInArray
|
||||
pop de
|
||||
jr nc, .asm_1a62a
|
||||
jr nc, .notStandingOnDoor
|
||||
inc hl
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
aCoord 8, 9
|
||||
aCoord 8, 9 ; a = lower left background tile under player's sprite
|
||||
ld b, a
|
||||
.asm_1a621
|
||||
.loop
|
||||
ld a, [hli]
|
||||
and a
|
||||
jr z, .asm_1a62a
|
||||
jr z, .notStandingOnDoor
|
||||
cp b
|
||||
jr nz, .asm_1a621
|
||||
jr nz, .loop
|
||||
scf
|
||||
ret
|
||||
.asm_1a62a
|
||||
.notStandingOnDoor
|
||||
and a
|
||||
ret
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue