GBDK 2020 Docs  4.3.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 
103 
106 
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 
128 
133 void wrtchr(char chr) OLDCALL;
134 
140 
156 void color(uint8_t forecolor, uint8_t backcolor, uint8_t mode) OLDCALL;
157 
158 #endif /* __DRAWING_H */
#define OLDCALL
Definition: types.h:21
#define NONBANKED
Definition: types.h:40
uint8_t getpix(uint8_t x, uint8_t y) OLDCALL
void gotogxy(uint8_t x, uint8_t y) OLDCALL
void plot_point(uint8_t x, uint8_t y) OLDCALL
int8_t gprintf(char *fmt,...) NONBANKED
void switch_data(uint8_t x, uint8_t y, uint8_t *src, uint8_t *dst) OLDCALL
void wrtchr(char chr) OLDCALL
void gprintn(int8_t number, int8_t radix, int8_t signed_value) NONBANKED
void color(uint8_t forecolor, uint8_t backcolor, uint8_t mode) OLDCALL
void draw_image(uint8_t *data)
void plot(uint8_t x, uint8_t y, uint8_t colour, uint8_t mode) OLDCALL
void circle(uint8_t x, uint8_t y, uint8_t radius, uint8_t style) OLDCALL
void box(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, uint8_t style) OLDCALL
void gprint(char *str) NONBANKED
void line(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2) OLDCALL
void gprintln(int16_t number, int8_t radix, int8_t signed_value) NONBANKED
void mode(uint8_t m)
short int int16_t
Definition: stdint.h:44
unsigned char uint8_t
Definition: stdint.h:51
signed char int8_t
Definition: stdint.h:43