Map Interaction Items

From Terranigma Wiki
Jump to navigation Jump to search

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

Relevant addresses are listed in the following table:

Name EN JP G0
Currents Control Script 91BD9E 91B6F7 97E1AD
Currents Table 91BE17 91B770 97E226
Diving Bubbles Script 91BC51 91B5AA 97E060
Diving Bubbles Table 91BD86 91B6DF 97E195

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

(14 bytes per entry, terminated by Map ID = FFFF)

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) or
01 <x> <y> <id> 97E060 82F054 (G0)

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

(4 bytes per entry)