The current URL is datacrystal.tcrf.net.
Mother 3/Door/hotspot table: Difference between revisions
(Created page with "{{Infobox table|name=Door/hotspot table |game=MOTHER 3 |loc=ROM |start=0x111DEB4 |end=0x112C38F |numentries=2000 (0x7D0) |entrylength=Variable |totallength=58588 bytes (0xE4DC...") |
Lelegofrog (talk | contribs) m (Lelegofrog moved page MOTHER 3/Door/hotspot table to Mother 3/Door/hotspot table: title consistency with TCRF) |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{Infobox table|name=Door/hotspot table | {{subpage|game=MOTHER 3:ROM map}} | ||
{{Infobox table | |||
|name=Door/hotspot table | |||
|game=MOTHER 3 | |game=MOTHER 3 | ||
|loc=ROM | |loc=ROM | ||
Line 30: | Line 32: | ||
====Door bitfield==== | ====Door bitfield==== | ||
* <tt>0x0001</tt> = (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. | |||
* <tt>0x00C0</tt> = (Width - 1), in units of 16 pixels | * <tt>0x00C0</tt> = (Width - 1), in units of 16 pixels | ||
* <tt>0x0300</tt> = (Height - 1), in units of 16 pixels | * <tt>0x0300</tt> = (Height - 1), in units of 16 pixels | ||
* <tt> | * <tt>0xFC3E</tt> = ''Unknown'' | ||
====Door destination==== | ====Door destination==== | ||
Line 44: | Line 47: | ||
* <tt>0B-0B (01)</tt> = [[#Location|Y]] | * <tt>0B-0B (01)</tt> = [[#Location|Y]] | ||
====Hotspot bitfield=== | ====Hotspot bitfield==== | ||
* <tt>0x00000001</tt> = (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. | |||
* <tt>0x0003E000</tt> = (Width - 1), in units of 16 pixels | * <tt>0x0003E000</tt> = (Width - 1), in units of 16 pixels | ||
* <tt>0x007C0000</tt> = (Height - 1), in units of 16 pixels | * <tt>0x007C0000</tt> = (Height - 1), in units of 16 pixels | ||
* <tt> | * <tt>0xFF801FFE</tt> = ''Unknown'' | ||
====Hotspot destination==== | ====Hotspot destination==== | ||
Hotspot destinations correspond to the [[MOTHER 3:Game logic#Scripts|main script table entry]] for its respective map area. '''The game adds 5 to this value before looking up its script.''' | |||
===Location=== | ===Location=== | ||
Both doors and hotspots use the same format for location. X and Y are both in units of 16 pixels. | Both doors and hotspots use the same format for location. X and Y are both in units of 16 pixels. |
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.