Pixel Graphics Functions
From Archaic Pixels
Contents
Pixel Graphics Functions
The Pixel Graphics functions allow the HuC programmer to plot pixels directly to the screen. However, bear in mind that these functions are slow and are not suited for applications where high performance is required.
gfx_setbgpal
void gfx_setbgpal(char bgcolor); [ 3.04+ ] |
---|
Set default BG palette group to bgcolor. Used by gfx_init(). Example: 'gfx_setbgpal(5)' before gfx_init() will cause the gfx_*() functions to use the BG palette entries from $50 through $5F |
gfx_init
void gfx_init(int vaddr); [ 3.04+ ] |
---|
Initialize screen to point to sequential graphics tiles, located
starting at address 'vaddr' in VRAM.
|
gfx_clear
void gfx_clear(int vaddr); [ 3.04+ ] |
---|
Clear graphical screen. Starting at address 'vaddr' in VRAM, this function sets sequential tiles in VRAM to all zeroes, with a size based on the virtual map. |
gfx_plot
void gfx_plot(int x, int y, int color); [ 3.04+ ] |
---|
Set a pixel at (x,y) to color listed. 'color' should be avalue between 0 and 15. |
gfx_point
char gfx_point(int x, int y); [ 3.04+ ] |
---|
Return the color of the pixel at (x,y). |
gfx_line
void gfx_line(int x1, int y1, int x2, int y2, int color); [ 3.11+ ] |
---|
Draw a line from (x1,y1) to (x2,y2) in color listed. 'color' should be avalue between 0 and 15. |