We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS

Widescreen

From SnesLab
Revision as of 22:26, 17 May 2019 by DerKoun (talk | contribs) (Created page with "(''first draft, please point out any mistakes and ask any questions'') == widescreen-specific code == === objects === Objects are up to 64 pixels wide.<br> For their x coordin...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

(first draft, please point out any mistakes and ask any questions)

widescreen-specific code

objects

Objects are up to 64 pixels wide.
For their x coordinates we have a 9 bit unsigned integer,
i.e. values from 0 to 511.
0 to 255 are the visible columns of the screen.
To be able to have objects start off the left side and extend into the screen, the values wrap,
i.e. 449 to 511 is treated as -63 to -1.
256 to 448 place objects outside of the visible area.

For widescreen 16:9 we add 64 pixels to each side.
So the visible columns of the (wide) screen are now -64 to 319,
or technically 448 to 511 and 0 to 319.
So with objects partially off screen to the left the minimal coordinate with visible content is -127 aka 385.

Using that coordinate space you can place objects in the widescreen area quite similar to placing them in the normal screen area.