llvm-mos-sdk
Functions
graphics.h File Reference
#include <stdint.h>
#include <neo6502.h>
#include "types.h"
Include dependency graph for graphics.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void neo_graphics_set_defaults (uint8_t color_mask, uint8_t color_xor, uint8_t fill, uint8_t extent, uint8_t flip)
 Reset the global graphics system settings. More...
 
void neo_graphics_draw_line (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
 Draw a line. More...
 
void neo_graphics_draw_rectangle (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
 Draw a rectangle. More...
 
void neo_graphics_draw_ellipse (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
 Draw an ellipse. More...
 
void neo_graphics_draw_pixel (uint16_t x, uint16_t y)
 Draw a pixel. More...
 
void neo_graphics_draw_text_p (uint16_t x, uint16_t y, const neo_pstring_t *text)
 Draw a Pascal text string. More...
 
void neo_graphics_draw_text (uint16_t x, uint16_t y, const char *text)
 Draw a C text string. More...
 
void neo_graphics_draw_image (uint16_t x, uint16_t y, uint8_t id)
 Draw an image. More...
 
void neo_graphics_draw_tilemap (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
 Draw the current tilemap. More...
 
void neo_graphics_set_palette (uint8_t idx, uint8_t r, uint8_t g, uint8_t b)
 Set palette color. More...
 
uint8_t neo_graphics_read_pixel (uint16_t x, uint16_t y)
 Read pixel. More...
 
void neo_graphics_reset_palette (void)
 Reset palette. More...
 
void neo_graphics_set_tilemap (const void *src, uint16_t x, uint16_t y)
 Set the current tilemap. More...
 
long neo_graphics_frame_count (void)
 Read the number of vertical blanks since power-on. More...
 
void neo_graphics_set_color (uint8_t idx)
 Set the current drawing color. More...
 
void neo_graphics_set_solid_flag (uint8_t value)
 Set the current solid flag. More...
 
void neo_graphics_set_draw_size (uint8_t value)
 Set the current image/font drawing scale. More...
 
void neo_graphics_set_flip_bits (uint8_t value)
 Set the flip bits for drawing images. More...
 

Function Documentation

◆ neo_graphics_draw_ellipse()

void neo_graphics_draw_ellipse ( uint16_t  x1,
uint16_t  y1,
uint16_t  x2,
uint16_t  y2 
)

Draw an ellipse.

Parameters
x1Begin X
y1Begin Y
x2End X
y2End Y

◆ neo_graphics_draw_image()

void neo_graphics_draw_image ( uint16_t  x,
uint16_t  y,
uint8_t  id 
)

Draw an image.

Parameters
xX
yY
idImage ID

◆ neo_graphics_draw_line()

void neo_graphics_draw_line ( uint16_t  x1,
uint16_t  y1,
uint16_t  x2,
uint16_t  y2 
)

Draw a line.

Parameters
x1Begin X
y1Begin Y
x2End X
y2End Y

◆ neo_graphics_draw_pixel()

void neo_graphics_draw_pixel ( uint16_t  x,
uint16_t  y 
)

Draw a pixel.

Parameters
xX
yY

◆ neo_graphics_draw_rectangle()

void neo_graphics_draw_rectangle ( uint16_t  x1,
uint16_t  y1,
uint16_t  x2,
uint16_t  y2 
)

Draw a rectangle.

Parameters
x1Begin X
y1Begin Y
x2End X
y2End Y

◆ neo_graphics_draw_text()

void neo_graphics_draw_text ( uint16_t  x,
uint16_t  y,
const char *  text 
)

Draw a C text string.

Parameters
xX
yY
textText string (C).

◆ neo_graphics_draw_text_p()

void neo_graphics_draw_text_p ( uint16_t  x,
uint16_t  y,
const neo_pstring_t text 
)

Draw a Pascal text string.

Parameters
xX
yY
textText string (Pascal).

◆ neo_graphics_draw_tilemap()

void neo_graphics_draw_tilemap ( uint16_t  x1,
uint16_t  y1,
uint16_t  x2,
uint16_t  y2 
)

Draw the current tilemap.

Parameters
x1Begin X
y1Begin Y
x2End X
y2End Y

◆ neo_graphics_frame_count()

long neo_graphics_frame_count ( void  )

Read the number of vertical blanks since power-on.

◆ neo_graphics_read_pixel()

uint8_t neo_graphics_read_pixel ( uint16_t  x,
uint16_t  y 
)

Read pixel.

Parameters
xX
yY
Returns
The pixel palette index.

◆ neo_graphics_reset_palette()

void neo_graphics_reset_palette ( void  )

Reset palette.

◆ neo_graphics_set_color()

void neo_graphics_set_color ( uint8_t  idx)

Set the current drawing color.

Parameters
idxPalette index.

◆ neo_graphics_set_defaults()

void neo_graphics_set_defaults ( uint8_t  color_mask,
uint8_t  color_xor,
uint8_t  fill,
uint8_t  extent,
uint8_t  flip 
)

Reset the global graphics system settings.

◆ neo_graphics_set_draw_size()

void neo_graphics_set_draw_size ( uint8_t  value)

Set the current image/font drawing scale.

Parameters
valueValue.

◆ neo_graphics_set_flip_bits()

void neo_graphics_set_flip_bits ( uint8_t  value)

Set the flip bits for drawing images.

Parameters
valueValue.

◆ neo_graphics_set_palette()

void neo_graphics_set_palette ( uint8_t  idx,
uint8_t  r,
uint8_t  g,
uint8_t  b 
)

Set palette color.

Parameters
idxPalette index.
rRed component.
gGreen component.
bBlue component.

◆ neo_graphics_set_solid_flag()

void neo_graphics_set_solid_flag ( uint8_t  value)

Set the current solid flag.

Parameters
valueValue.

◆ neo_graphics_set_tilemap()

void neo_graphics_set_tilemap ( const void *  src,
uint16_t  x,
uint16_t  y 
)

Set the current tilemap.

Parameters
srcTilemap address.
xX offset into tilemap.
yY offset into tilemap.