Z Bridge Format
Jump to navigation
Jump to search
Bridge records supplement the terrain cells of a Z map.
File format
The 312-byte file contains 12 records of 26 bytes (0x1a), loaded to static address 0xff3d4. Multi-byte values below are little-endian.
| Offset | Data type | Name | Description |
|---|---|---|---|
| 0 | UINT16LE | x | Position; 0xffff is a free record. |
| 2 | UINT16LE | y | Position. |
| 4 | BYTE[8] | unknown | Preserve. |
| 0x0c | UINT16LE | orientation selector | Zero/nonzero chooses the neighbouring cell checked during validation. |
| 0x0e | BYTE | unknown | Preserve. |
| 0x0f | BYTE | flags | Bit 2 is cleared by validation. |
| 0x10 | BYTE[2] | unknown | Preserve. |
| 0x12 | UINT8 | timer parameter | 0xff gives an unlimited sentinel; otherwise initialization multiplies by 17*100. |
| 0x13 | BYTE[6] | unknown | Preserve. |
| 0x19 | UINT8 | state | Cleared by initialization. |
Notes
Validation compares terrain codes 0x17 and 0x2b in map plane 1. An inconsistent bridge may be invalidated even if its record is well formed. The derived timer is written outside the disk record array; it is not another on-disk field.
Source code
From re-z, the open-source browser port:
- src/game/levelstate.js – fn2a497, fn2a451 and fn2a30e
- docs/re/NOTES.md – reverse-engineering notes and evidence status
Credits
This file format was reverse engineered by VorticonCmdr. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)