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 
130 
139 
144 
151 
158 
165 
172 
173 #ifdef __cplusplus
174 }
175 #endif
176 
177 #endif
byte byte x1
Definition: api.h:72
byte x
Definition: api.h:26
byte byte y
Definition: api.h:26
byte byte byte y1
Definition: api.h:72
long neo_graphics_frame_count(void)
Read the number of vertical blanks since power-on.
void neo_graphics_draw_pixel(uint16_t x, uint16_t y)
Draw a pixel.
uint8_t neo_graphics_read_pixel(uint16_t x, uint16_t y)
Read pixel.
void neo_graphics_set_color(uint8_t idx)
Set the current drawing color.
void neo_graphics_set_draw_size(uint8_t value)
Set the current image/font drawing scale.
void neo_graphics_draw_text(uint16_t x, uint16_t y, const char *text)
Draw a C text string.
void neo_graphics_set_tilemap(const void *src, uint16_t x, uint16_t y)
Set the current tilemap.
void neo_graphics_set_flip_bits(uint8_t value)
Set the flip bits for drawing images.
void neo_graphics_draw_image(uint16_t x, uint16_t y, uint8_t id)
Draw an image.
void neo_graphics_draw_text_p(uint16_t x, uint16_t y, const neo_pstring_t *text)
Draw a Pascal text string.
void neo_graphics_write_pixel(uint16_t x, uint16_t y, uint8_t idx)
Write pixel.
void neo_graphics_reset_palette(void)
Reset palette.
void neo_graphics_draw_ellipse(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
Draw an ellipse.
void neo_graphics_draw_line(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
Draw a line.
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.
void neo_graphics_draw_tilemap(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
Draw the current tilemap.
void neo_graphics_set_palette(uint8_t idx, uint8_t r, uint8_t g, uint8_t b)
Set palette color.
void neo_graphics_draw_rectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
Draw a rectangle.
void neo_graphics_set_solid_flag(uint8_t value)
Set the current solid flag.
const void * src
Definition: memory.h:57
::uint16_t uint16_t
Definition: cstdint:22
::uint8_t uint8_t
Definition: cstdint:21
Definition: types.h:15