The current URL is datacrystal.tcrf.net.
Mother 3/Door/hotspot table: Difference between revisions
m (updated main script table entry to bypass redirect) |
Lelegofrog (talk | contribs) m (Lelegofrog moved page MOTHER 3/Door/hotspot table to Mother 3/Door/hotspot table: title consistency with TCRF) |
(One intermediate revision by one other user not shown) | |
(No difference)
|
Latest revision as of 02:03, 20 May 2024
This is a sub-page of Mother 3/Door.
Door/hotspot table | |
Game | MOTHER 3 |
Start Address | 0x111DEB4 |
End Address | 0x112C38F |
# of Entries | 2000 (0x7D0) |
Entry Length | Variable |
Total Length | 58588 bytes (0xE4DC) |
Back to the ROM map |
Overview
The door/hotspot table contains both door and hotspot entries. Each map has one door collection and one hotspot collection. Since there are 1000 maps, and separate door and hotspot collections for each map, then this table has 2000 entries, as expected. There is an offset table at the beginning pointing to each collection of doors/hotspots.
The entries in this table are interleaved; if your map index is X, then
door index = X * 2 hotspot index = (X * 2) + 1
Format
There's no data indicating how many doors or hotspots are in each map. To figure it out, you instead have to keep parsing doors/hotspots sequentially until a null entry occurs.
Doors and hotspots have a similar format. Each one uses 12 (0xC) bytes.
Doors
- 00-01 (02) = Bitfield
- 02-07 (06) = Unclassified data
- 08-09 (02) = Destination
- 0A-0A (01) = X
- 0B-0B (01) = Y
Door bitfield
- 0x0001 = (Not)-null entry flag. This must be set to 1, or else the game will ignore this door and all subsequent doors in the collection.
- 0x00C0 = (Width - 1), in units of 16 pixels
- 0x0300 = (Height - 1), in units of 16 pixels
- 0xFC3E = Unknown
Door destination
This value is an index into the door destination table.
Hotspots
- 00-03 (04) = Bitfield
- 04-07 (04) = Unclassified data
- 08-09 (02) = Destination
- 0A-0A (01) = X
- 0B-0B (01) = Y
Hotspot bitfield
- 0x00000001 = (Not)-null entry flag. This must be set to 1, or else the game will ignore this hotspot and all subsequent hotspots in the collection.
- 0x0003E000 = (Width - 1), in units of 16 pixels
- 0x007C0000 = (Height - 1), in units of 16 pixels
- 0xFF801FFE = Unknown
Hotspot destination
Hotspot destinations correspond to the main script table entry for its respective map area. The game adds 5 to this value before looking up its script.
Location
Both doors and hotspots use the same format for location. X and Y are both in units of 16 pixels.