Screen Coordinates

CutterCross

Active member
Where are the screen coordinates stored in memory? As in, which variable could you load into the accumulator to get the coordinates of the current screen?
 

Mugi

Member
you mean the number of the active screen ?
try mapPosX and mapPosY

there's also currentMap, but im not exactly sure if that actually holds the currently active screen number.
 

dale_coop

Moderator
Staff member
You could use "currentScreen" to know the current screen (from: 0 to 255, in your overworld, count starting from top left 0 to bottom right 255). currentMap is the current map (0: overworld / 1: underworld)
 

CutterCross

Active member
dale_coop said:
You could use "currentScreen" to know the current screen (from: 0 to 255, in your overworld, count starting from top left 0 to bottom right 255). currentMap is the current map (0: overworld / 1: underworld)

Dale, you're a lifesaver. I was trying to use currentMap since I thought THAT held the coordinates at first, and I didn't even see a currentScreen in the ZeroPage RAM! That helped a ton!

Really the hard part about programming is just finding where things are/what they do, and there's not a lot of notes for variables/macros. (Would have been nice...)
 

dale_coop

Moderator
Staff member
CutterCross said:
Really the hard part about programming is just finding where things are/what they do, and there's not a lot of notes for variables/macros. (Would have been nice...)

Yeah exactly, spending hours to find what variable, why and when...
(I am doing that all day/night long... )
 
Top Bottom