llvm-mos-sdk
graphics.h
Go to the documentation of this file.
1 // Copyright 2024 LLVM-MOS Project
2 // Licensed under the Apache License, Version 2.0 with LLVM Exceptions.
3 // See https://github.com/llvm-mos/llvm-mos-sdk/blob/main/LICENSE for license
4 // information.
5 
6 #include <stdint.h>
7 
8 #ifndef _NEO_GRAPHICS_H
9 #define _NEO_GRAPHICS_H
10 
11 #include <neo6502.h>
12 #include "types.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
21 void neo_graphics_set_defaults(uint8_t color_mask, uint8_t color_xor, uint8_t fill, uint8_t extent, uint8_t flip);
22 
32 
42 
52 
60 
69 
77 void neo_graphics_draw_text(uint16_t x, uint16_t y, const char *text);
78 
87 
97 
107 
116 
125 
129 void neo_graphics_reset_palette(void);
130 
138 void neo_graphics_set_tilemap(const void *src, uint16_t x, uint16_t y);
139 
143 long neo_graphics_frame_count(void);
144 
151 
158 
165 
172 
173 #ifdef __cplusplus
174 }
175 #endif
176 
177 #endif
neo_graphics_set_flip_bits
void neo_graphics_set_flip_bits(uint8_t value)
Set the flip bits for drawing images.
neo_graphics_frame_count
long neo_graphics_frame_count(void)
Read the number of vertical blanks since power-on.
std::uint16_t
::uint16_t uint16_t
Definition: cstdint:22
types.h
neo_graphics_draw_ellipse
void neo_graphics_draw_ellipse(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
Draw an ellipse.
neo_graphics_draw_rectangle
void neo_graphics_draw_rectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
Draw a rectangle.
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.
neo_graphics_draw_image
void neo_graphics_draw_image(uint16_t x, uint16_t y, uint8_t id)
Draw an image.
neo_graphics_set_solid_flag
void neo_graphics_set_solid_flag(uint8_t value)
Set the current solid flag.
neo_graphics_reset_palette
void neo_graphics_reset_palette(void)
Reset palette.
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.
neo_graphics_set_draw_size
void neo_graphics_set_draw_size(uint8_t value)
Set the current image/font drawing scale.
std::uint8_t
::uint8_t uint8_t
Definition: cstdint:21
y1
byte byte byte y1
Definition: api.h:72
neo_graphics_read_pixel
uint8_t neo_graphics_read_pixel(uint16_t x, uint16_t y)
Read pixel.
neo_pstring
Definition: types.h:15
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.
src
const void * src
Definition: memory.h:57
x
byte x
Definition: api.h:26
x1
byte byte x1
Definition: api.h:72
y
byte byte y
Definition: api.h:26
neo_graphics_set_palette
void neo_graphics_set_palette(uint8_t idx, uint8_t r, uint8_t g, uint8_t b)
Set palette color.
neo6502.h
neo_graphics_draw_text
void neo_graphics_draw_text(uint16_t x, uint16_t y, const char *text)
Draw a C text string.
neo_graphics_set_color
void neo_graphics_set_color(uint8_t idx)
Set the current drawing color.
neo_graphics_draw_pixel
void neo_graphics_draw_pixel(uint16_t x, uint16_t y)
Draw a pixel.
neo_graphics_write_pixel
void neo_graphics_write_pixel(uint16_t x, uint16_t y, uint8_t idx)
Write pixel.
neo_graphics_set_tilemap
void neo_graphics_set_tilemap(const void *src, uint16_t x, uint16_t y)
Set the current tilemap.
neo_graphics_draw_line
void neo_graphics_draw_line(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
Draw a line.