aboutsummaryrefslogtreecommitdiffstats
path: root/engine/overworld/doors.asm
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2014-09-09 20:55:19 -0700
committerYamaArashi <shadow962@live.com>2014-09-09 20:55:19 -0700
commit91793015e53dbed09576f825d39e71bc59bf90a5 (patch)
tree2e21a17f28744e759c70bdef4197adaa043fe938 /engine/overworld/doors.asm
parentAdd comments regarding menus and sprites (diff)
downloadpokeyellow-91793015e53dbed09576f825d39e71bc59bf90a5.tar.gz
pokeyellow-91793015e53dbed09576f825d39e71bc59bf90a5.tar.xz
pokeyellow-91793015e53dbed09576f825d39e71bc59bf90a5.zip
Labelled and commented mostly sprite-related things
Diffstat (limited to 'engine/overworld/doors.asm')
-rwxr-xr-xengine/overworld/doors.asm15
1 files changed, 8 insertions, 7 deletions
diff --git a/engine/overworld/doors.asm b/engine/overworld/doors.asm
index 42ebb174..85ff58b2 100755
--- a/engine/overworld/doors.asm
+++ b/engine/overworld/doors.asm
@@ -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