GBDK 2020 Docs API Documentation for GBDK 2020

cgb.h
Go to the documentation of this file.
1
17 #ifndef _CGB_H
18 #define _CGB_H
19
20 #include <types.h>
21
32 #define RGB(r, g, b) \
33 ((((UINT16)(b) & 0x1f) << 10) | (((UINT16)(g) & 0x1f) << 5) | (((UINT16)(r) & 0x1f) << 0))
34
37 #define RGB_RED RGB(31, 0, 0)
38 #define RGB_DARKRED RGB(15, 0, 0)
39 #define RGB_GREEN RGB( 0, 31, 0)
40 #define RGB_DARKGREEN RGB( 0, 15, 0)
41 #define RGB_BLUE RGB( 0, 0, 31)
42 #define RGB_DARKBLUE RGB( 0, 0, 15)
43 #define RGB_YELLOW RGB(31, 31, 0)
44 #define RGB_DARKYELLOW RGB(21, 21, 0)
45 #define RGB_CYAN RGB( 0, 31, 31)
46 #define RGB_AQUA RGB(28, 5, 22)
47 #define RGB_PINK RGB(11, 0, 31)
48 #define RGB_PURPLE RGB(21, 0, 21)
49 #define RGB_BLACK RGB( 0, 0, 0)
50 #define RGB_DARKGRAY RGB(10, 10, 10)
51 #define RGB_LIGHTGRAY RGB(21, 21, 21)
52 #define RGB_WHITE RGB(31, 31, 31)
53
54 #define RGB_LIGHTFLESH RGB(30, 20, 15)
55 #define RGB_BROWN RGB(10, 10, 0)
56 #define RGB_ORANGE RGB(30, 20, 0)
57 #define RGB_TEAL RGB(15, 15, 0)
58
74 void
75 set_bkg_palette(UINT8 first_palette,
76 UINT8 nb_palettes,
77 UINT16 *rgb_data) NONBANKED;
78
94 void
95 set_sprite_palette(UINT8 first_palette,
96 UINT8 nb_palettes,
97 UINT16 *rgb_data) NONBANKED;
98
108 void
109 set_bkg_palette_entry(UINT8 palette,
110 UINT8 entry,
111 UINT16 rgb_data);
112
121 void
122 set_sprite_palette_entry(UINT8 palette,
123 UINT8 entry,
124 UINT16 rgb_data);
125
136 void cpu_slow(void);
137
150 void cpu_fast(void);
151
160 void cgb_compatibility(void);
161
162 #endif /* _CGB_H */
UINT8
unsigned char UINT8
Definition: types.h:21
UINT16
unsigned int UINT16
Definition: types.h:27
set_sprite_palette_entry
void set_sprite_palette_entry(UINT8 palette, UINT8 entry, UINT16 rgb_data)
set_bkg_palette_entry
void set_bkg_palette_entry(UINT8 palette, UINT8 entry, UINT16 rgb_data)
cpu_slow
void cpu_slow(void)
set_bkg_palette
void set_bkg_palette(UINT8 first_palette, UINT8 nb_palettes, UINT16 *rgb_data) NONBANKED
cgb_compatibility
void cgb_compatibility(void)
cpu_fast
void cpu_fast(void)
NONBANKED
#define NONBANKED
Definition: types.h:11
set_sprite_palette
void set_sprite_palette(UINT8 first_palette, UINT8 nb_palettes, UINT16 *rgb_data) NONBANKED