Map Interaction Items

From Terranigma Wiki
Revision as of 17:34, 2 October 2018 by Nethraz (talk | contribs) (Added Diving Bubbles)
Jump to navigation Jump to search

Several items (Rock Spear, Turbo Boots, Magic Anchor, ...) interact with the map and thereby open new paths.

Relevant Offsets are listed in the following table:

Name Pointer: EN JP
Currents Control Script 91BD9E 91B6F7
Currents Table 91BE17 91B770
Diving Bubbles Script 91BC51 91B5AA
Diving Bubbles Table 91BD86 91B6DF

Currents (Magic Anchor)

The Currents Control Script operates the currents on any map it is paced on. It checks the Currents Table, which is shared for all maps, to decide if and where to apply currents. Currents can be avoided if the player has the Magic Anchor (item 0x49) in his inventory, in which case the script does nothing.

Currents Table

Offset Length Description
0 2 Map ID (the current entry only applies to that map)
2 2 region left
4 2 region top
6 2 region right
8 2 region bottom
10 2 forced X-movement
12 2 forced Y-movement

Diving Bubbles (Air Herb)

Diving Bubbles are added to maps as sprites with the following declaration:

01 <x> <y> <id> 91B5AA 82F0D2 (JP) or
01 <x> <y> <id> 91BC51 82F05F (EN)

The id is used as index in the Diving Bubbles Table, which controls the target of each tunnel:

Offset Size Description
0 2 x
2 2 y