Player Position

From TLoZ: ALTTP Hacking Resources
Revision as of 12:55, 14 November 2016 by Jkazos (talk | contribs) (Created page with "''See also: Standard Notation'' ''See also: Coordinate Systems'' The game keeps track of the player's pixel position in WRAM as follows. (Note that this is the top-l...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

See also: Standard Notation

See also: Coordinate Systems

The game keeps track of the player's pixel position in WRAM as follows. (Note that this is the top-left corner of the 16x16 box representing the player's collision boundary: The actual sprite draws a few pixels above and to the left of the collision boundary so that it is his feet that appear in the right place.)

$7E0022[$2]
X coordinate of the top-left of player's collision box
$7E0020[$2]
Y coordinate of the top-left of player's collision box

Note that these coordinates are relative to the player's current "dimension": The light world, the dark world, the special overworld area (such as Zora's Domain), and the "underworld" (the combined block of all interior rooms) each have their own (0,0) origin for the player's pixel coordinates.