summaryrefslogtreecommitdiff
path: root/engine/overworld/player_state.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/overworld/player_state.asm')
-rw-r--r--engine/overworld/player_state.asm28
1 files changed, 6 insertions, 22 deletions
diff --git a/engine/overworld/player_state.asm b/engine/overworld/player_state.asm
index 73c55da2..ba47f7eb 100644
--- a/engine/overworld/player_state.asm
+++ b/engine/overworld/player_state.asm
@@ -157,12 +157,12 @@ IsWarpTileInFrontOfPlayer:
call _GetTileAndCoordsInFrontOfPlayer
ld a, [wCurMap]
cp SS_ANNE_BOW
- jr z, .ssAnne5
+ jr z, IsSSAnneBowWarpTileInFrontOfPlayer
ld a, [wSpriteStateData1 + 9] ; player sprite's facing direction
srl a
ld c, a
ld b, 0
- ld hl, .warpTileListPointers
+ ld hl, WarpTileListPointers
add hl, bc
ld a, [hli]
ld h, [hl]
@@ -176,33 +176,17 @@ IsWarpTileInFrontOfPlayer:
pop hl
ret
-.warpTileListPointers:
- dw .facingDownWarpTiles
- dw .facingUpWarpTiles
- dw .facingLeftWarpTiles
- dw .facingRightWarpTiles
+INCLUDE "data/warp_carpet_tile_ids.asm"
-.facingDownWarpTiles
- db $01,$12,$17,$3D,$04,$18,$33,$FF
-
-.facingUpWarpTiles
- db $01,$5C,$FF
-
-.facingLeftWarpTiles
- db $1A,$4B,$FF
-
-.facingRightWarpTiles
- db $0F,$4E,$FF
-
-.ssAnne5
+IsSSAnneBowWarpTileInFrontOfPlayer:
ld a, [wTileInFrontOfPlayer]
cp $15
jr nz, .notSSAnne5Warp
scf
- jr .done
+ jr IsWarpTileInFrontOfPlayer.done
.notSSAnne5Warp
and a
- jr .done
+ jr IsWarpTileInFrontOfPlayer.done
IsPlayerStandingOnDoorTileOrWarpTile:
push hl