Welcome to Data Crystal's new home! Data Crystal is now part of the TCRF family (sort of).
The wiki has recently moved; please report any issues in Discord. Pardon the dust.

Mother 3/Door/hotspot table

From Data Crystal
< Mother 3
Revision as of 04:44, 2 August 2013 by JeffMan (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
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

  • 0x00C0 = (Width - 1), in units of 16 pixels
  • 0x0300 = (Height - 1), in units of 16 pixels
  • 0xFC3F = 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

  • 0x0003E000 = (Width - 1), in units of 16 pixels
  • 0x007C0000 = (Height - 1), in units of 16 pixels
  • 0xFF801FFF = Unknown

Hotspot destination

It's unknown how the hotspot destination is handled.

Location

Both doors and hotspots use the same format for location. X and Y are both in units of 16 pixels.