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