Plot

From WikiPrizm
Revision as of 21:46, 17 April 2014 by ProgrammerNerd (talk | contribs) (Created page with "== Synopsis == Plots a point at (x,y) on the screen with a specified color == Source code == <nowiki>void plot(unsigned x,unsigned y,unsigned short color){ unsigned short*s=...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Synopsis

Plots a point at (x,y) on the screen with a specified color

Source code

void plot(unsigned x,unsigned y,unsigned short color){
	unsigned short*s=(unsigned short*)0xA8000000;
	s+=(y*384)+x;
	*s=color;
}

Inputs

x - Specifies the x coordinate of the pixel in range of [0,383] y - Specifies the y coordinate of the pixel in range of [0,215] color - Specifies what color the plotted pixel will be. It is in RGB 565 format.

Comments

Function written by ProgrammerNerd