GBDK 2020 Docs 4.4.0 API Documentation for GBDK 2020

drawing.h
Go to the documentation of this file.
1
30 #ifndef __DRAWING_H
31 #define __DRAWING_H
32
33 #include <types.h>
34 #include <stdint.h>
35
37 #define GRAPHICS_WIDTH 160
38 #define GRAPHICS_HEIGHT 144
39
40 #define SOLID 0x00 /* Overwrites the existing pixels */
41 #define OR 0x01 /* Performs a logical OR */
42 #define XOR 0x02 /* Performs a logical XOR */
43 #define AND 0x03 /* Performs a logical AND */
44
46 #define WHITE 0
47 #define LTGREY 1
48 #define DKGREY 2
49 #define BLACK 3
50
52 #define M_NOFILL 0
53 #define M_FILL 1
54
56 #define SIGNED 1
57 #define UNSIGNED 0
58
59 #include <types.h>
60
64 void gprint(char *str) NONBANKED;
65
75 void gprintln(int16_t number, int8_t radix, int8_t signed_value) NONBANKED;
76
81 void gprintn(int8_t number, int8_t radix, int8_t signed_value) NONBANKED;
82
99 int8_t gprintf(char *fmt,...) NONBANKED;
100
102 void plot(uint8_t x, uint8_t y, uint8_t colour, uint8_t mode) OLDCALL;
103
105 void plot_point(uint8_t x, uint8_t y) OLDCALL;
106
110 void switch_data(uint8_t x, uint8_t y, uint8_t *src, uint8_t *dst) OLDCALL;
111
113 void draw_image(uint8_t *data);
114
116 void line(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2) OLDCALL;
117
120 void box(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, uint8_t style) OLDCALL;
121
124 void circle(uint8_t x, uint8_t y, uint8_t radius, uint8_t style) OLDCALL;
125
127 uint8_t getpix(uint8_t x, uint8_t y) OLDCALL;
128
133 void wrtchr(char chr) OLDCALL;
134
139 void gotogxy(uint8_t x, uint8_t y) OLDCALL;
140
156 void color(uint8_t forecolor, uint8_t backcolor, uint8_t mode) OLDCALL;
157
158 #endif /* __DRAWING_H */
OLDCALL
#define OLDCALL
Definition: types.h:21
NONBANKED
#define NONBANKED
Definition: types.h:40
getpix
uint8_t getpix(uint8_t x, uint8_t y) OLDCALL
gotogxy
void gotogxy(uint8_t x, uint8_t y) OLDCALL
plot_point
void plot_point(uint8_t x, uint8_t y) OLDCALL
gprintf
int8_t gprintf(char *fmt,...) NONBANKED
switch_data
void switch_data(uint8_t x, uint8_t y, uint8_t *src, uint8_t *dst) OLDCALL
wrtchr
void wrtchr(char chr) OLDCALL
gprintn
void gprintn(int8_t number, int8_t radix, int8_t signed_value) NONBANKED
color
void color(uint8_t forecolor, uint8_t backcolor, uint8_t mode) OLDCALL
draw_image
void draw_image(uint8_t *data)
plot
void plot(uint8_t x, uint8_t y, uint8_t colour, uint8_t mode) OLDCALL
circle
void circle(uint8_t x, uint8_t y, uint8_t radius, uint8_t style) OLDCALL
box
void box(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, uint8_t style) OLDCALL
gprint
void gprint(char *str) NONBANKED
line
void line(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2) OLDCALL
gprintln
void gprintln(int16_t number, int8_t radix, int8_t signed_value) NONBANKED
mode
void mode(uint8_t m)
stdint.h
int16_t
short int int16_t
Definition: stdint.h:44
uint8_t
unsigned char uint8_t
Definition: stdint.h:51
int8_t
signed char int8_t
Definition: stdint.h:43