fix(game): trigger warps by their tile behaviour (#93)

* fix(game): use the npc's own region for map and sprite lookups

* fix(game): trigger warps by their tile behaviour

* fix(game): classify every warp metatile behaviour the decomp accepts
This commit is contained in:
Fiereu authored and GitHub committed 2026-08-07 10:57:17 +02:00
1 parent 9866c1b0fb
commit 14fbc05bab
6 files changed
+177 -24

No files matched your search

@@ -12,4 +12,32 @@ enum class TileBehavior {
JUMP_WEST,
JUMP_NORTH,
JUMP_SOUTH,
DOOR,
/** Cave and water doors. They look like doors but warp like a ladders. */
NON_ANIMATED_DOOR,
/** Ladders, escalators and warp pads, which warp as soon as the player steps on them. */
LADDER,
STAIR_WARP_EAST,
STAIR_WARP_WEST,
/** Arrow warps are named after the direction the player walks to use them. */
NORTH_ARROW_WARP,
SOUTH_ARROW_WARP,
EAST_ARROW_WARP,
WEST_ARROW_WARP;
/** The direction the player must walk while standing here to be warped. */
val warpsWhenWalking: Direction?
get() =
when (this) {
STAIR_WARP_EAST,
EAST_ARROW_WARP -> Direction.RIGHT
STAIR_WARP_WEST,
WEST_ARROW_WARP -> Direction.LEFT
NORTH_ARROW_WARP -> Direction.UP
SOUTH_ARROW_WARP -> Direction.DOWN
else -> null
}
val warpsOnStep: Boolean
get() = this == LADDER || this == NON_ANIMATED_DOOR
}