Labelled and commented mostly sprite-related things

This commit is contained in:
YamaArashi 2014-09-09 20:55:19 -07:00
parent daf4fc87ae
commit 91793015e5
86 changed files with 838 additions and 738 deletions

View file

@ -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