Jump to content

List of maps by index number (Generation I): Difference between revisions

m
no edit summary
mNo edit summary
Line 526:
The coordinates typically pertain to the exit mats in buildings when the player bumps into the wall to leave the map (the way for instance, leaving a Pokémon Center returns the player to the 'last town'). The exit index is a single byte as an index number.
 
When the game finds it, it is copied into wDestinationWarpID (D42F in R/B and D42E in Y), as well as hWarpDestinationMap (FF8B) and loads relevant data (such as coordinates and wCurrentTileBlockMapViewPointer (D35F-60 in R/B and D35E-F in Y)) pertaining to the new map (while the map number is leftover from wLastMap) that the player is going to enter after they leave the old map. (In order to do this, the game also needs to locate the map header from LoadMapHeader using MapHeaderPointers; this function also loads much of the data pertaining to any map)
 
For example, exit index 0 can be seen as 'position to place the player in the new map #0', index 1 as 'position to place the player in the new map #1' and so on. This is the reason why different exit warps each make the player step down from different buildings, and the cause of [[Safari Zone exit glitch]] when wLastMap is no longer Fuchsia City and wWarpEntries still pertains to the Safari Zone gate.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.