diff options
| author | yenatch <yenatch@gmail.com> | 2014-09-20 00:57:27 -0400 |
|---|---|---|
| committer | yenatch <yenatch@gmail.com> | 2014-09-20 00:57:27 -0400 |
| commit | dff0cdeb5a2f901dc8d1a05847d09d7faf1654ad (patch) | |
| tree | 3618582f76f4183b6bc22c5d4743b6d171d11128 /engine/overworld/doors.asm | |
| parent | Merge remote-tracking branch 'origin/master' into tentative (diff) | |
| parent | Commented/labelled misc functions (diff) | |
| download | pokeyellow-dff0cdeb5a2f901dc8d1a05847d09d7faf1654ad.tar.gz pokeyellow-dff0cdeb5a2f901dc8d1a05847d09d7faf1654ad.tar.xz pokeyellow-dff0cdeb5a2f901dc8d1a05847d09d7faf1654ad.zip | |
Merge remote-tracking branch 'YamaArashi/master'
Conflicts:
constants/misc_constants.asm
engine/battle/core.asm
engine/menu/pokedex.asm
engine/town_map.asm
home.asm
hram.asm
Diffstat (limited to 'engine/overworld/doors.asm')
| -rwxr-xr-x | engine/overworld/doors.asm | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/engine/overworld/doors.asm b/engine/overworld/doors.asm index 42ebb174..ac345af9 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 tile in carry +IsPlayerStandingOnDoorTile: ; 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 |
