Differences
This shows you the differences between two versions of the page.
ff3:ff3us:doc:asm:fmt:warp [2016/08/14 19:40] m06 |
ff3:ff3us:doc:asm:fmt:warp [2019/02/12 10:29] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Location Exits ====== | ||
- | aka. Warp Triggers, Entrance Triggers | ||
- | |||
- | ===== Overview ===== | ||
- | |||
- | When the player steps in a specific coordinate on the map, he is transported to a new map with new coordinates. | ||
- | |||
- | ===== Offsets ===== | ||
- | |||
- | ^ Exits (short) | ||
- | ^ Description | ||
- | | Pointers (16-bit) | ||
- | | Nr of Pointers (bytes) | $01A0 ($03A0) | ||
- | | Data Address | ||
- | | Block size | $06 | | ||
- | | Number of blocks | ||
- | | Total size | $0340 | | ||
- | |||
- | ^ Exits (long) | ||
- | ^ Description | ||
- | | Pointers (16-bit) | ||
- | | Nr of Pointers (bytes) | $01A0 ($03A0) | ||
- | | Data Address | ||
- | | Block size | $07 | | ||
- | | Number of blocks | ||
- | | Total size | $0340 | | ||
- | |||
- | The structure is a sequence of two-byte pointers. The index of the pointer is relative to the map number. | ||
- | |||
- | The actual offset of the appointed data is the pointer value plus the pointer offset. | ||
- | |||
- | The game system checks the actual pointer and the next pointer to determinate the amount of data to read. It can include multiple data blocks. | ||
- | |||
- | ===== Data ===== | ||
- | |||
- | ^ Exits (short) | ||
- | ^ Offset | ||
- | | $00 | X position, actual map || | ||
- | | $01 | Y position, actual map || | ||
- | | $02 | new map, low byte || | ||
- | | $03 | $01 | new map, high bit | | ||
- | | ::: | $02 | refresh parent map (from world map) | | ||
- | | ::: | $04 | enter on low Z-level? | ||
- | | ::: | $08 | display location name | | ||
- | | ::: | $30 | direction facing | ||
- | | ::: | $40 | ? | | ||
- | | ::: | $80 | ? | | ||
- | | $04 | X position, new map || | ||
- | | $05 | Y position, new map || | ||
- | |||
- | ^ Exits (long) | ||
- | ^ Offset | ||
- | | $00 | X position, actual map || | ||
- | | $01 | Y position, actual map || | ||
- | | $02 | $7F | Spread Size | | ||
- | | ::: | $80 | Horizontal/ | ||
- | | $03 | new map, low byte || | ||
- | | $04 | $01 | new map, high bit | | ||
- | | ::: | $02 | refresh parent map (from world map) | | ||
- | | ::: | $04 | enter on low Z-level? | ||
- | | ::: | $08 | display location name | | ||
- | | ::: | $30 | direction facing | ||
- | | ::: | $40 | ? | | ||
- | | ::: | $80 | ? | | ||
- | | $05 | X position, new map || | ||
- | | $06 | Y position, new map || | ||
- | |||
- | |||
- | ===== Notes ===== | ||
- | |||
- | The coordinates of the new map must be valid. Otherwise, the player can be stuck in a no-walkable tile and unable to move. Also, the warp system won't work correctly if the new coordinates bypass the new map maximum coordinates. | ||