From 0a62d48df2d73c11ca13e4c3015d3d3abfa20292 Mon Sep 17 00:00:00 2001 From: Rangi Date: Tue, 23 Jun 2020 17:50:50 -0400 Subject: Move more tables from engine/ to data/ This also splits the end of engine/battle/core.asm into engine/battle/effects.asm. --- engine/overworld/player_state.asm | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) (limited to 'engine/overworld/player_state.asm') 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 -- cgit v1.3.1-sl0p