LoginLogin
Might make SBS readonly: thread

Graphics overview

Root / Documentation / [.]

Created:
# Summary There are four GRP pages available for use, each 256 pixels wide by 192 pixels tall, with a color palette capable of displaying 256 unique colors. Each screen can be set to use one of the four pages - both can be the same page, or different ones. # Interface ## Commands |sbs:docs/ptc-gpage{`GPAGE`}|Select the current screen to modify. Also, can change the displayed GRP page.| |sbs:docs/ptc-gprio{`GPRIO`}|Sets the display priority of the GRP page.| |sbs:docs/ptc-gcolor{`GCOLOR`}|Changes the default color used for graphics commands.| |sbs:docs/ptc-gcls{`GCLS`}|Clears the selected page.| |sbs:docs/ptc-gpset{`GPSET`}|Set a single pixel on the selected page.| |sbs:docs/ptc-gline{`GLINE`}|Draw a line on the selected page.| |sbs:docs/ptc-gbox{`GBOX`}|Draw a hollow rectangle on the selected page.| |sbs:docs/ptc-gfill{`GFILL`}|Draw a filled rectangle on the selected page.| |sbs:docs/ptc-gcircle{`GCIRCLE`}|Draw a circle on the selected page.| |sbs:docs/ptc-gcopy{`GCOPY`}|Copies a region of a GRP page to the currently selected page.| |sbs:docs/ptc-gdrawmd{`GDRAWMD`}|Sets the drawing mode.| |sbs:docs/ptc-gputchr{`GPUTCHR`}|Draw a single CHR character to the selected page.| |sbs:docs/ptc-gpaint{`GPAINT`}|Flood fills a region of the selected page.| ## Functions |sbs:docs/ptc-gspoit{`GSPOIT`}|Reads a pixel's color from a GRP page.| ## Resources |`GRP0`-`GRP3`|Graphics page resources. These contain the pixel data, but not the colors.| |`COL2U`|Color palette used for upper screen graphics page.| |`COL2L`|Color palette used for lower screen graphics page.| # Additional Information Note that the graphics pages are shared between both screens, but which are displayed can be changed. The default display uses `GRP0` for the upper screen and `GRP1` for the lower screen. The graphics pages can not be moved, and always fill the screen they are on. The GRP pixel data is broken up into character units and sprite units. A character unit is an 8x8 region of pixels, and a sprite unit is a 64x64 region of pixels composed of those 8x8 character units. The full page is composed of 12 sprite units, ordered from left-to-right and then top-to-bottom.

No posts yet (will you be the first?)