diff options
Diffstat (limited to 'src/ppu.h')
-rw-r--r-- | src/ppu.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/ppu.h b/src/ppu.h new file mode 100644 index 0000000..45af70b --- /dev/null +++ b/src/ppu.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | Copyright (c) 2021 Devine Lu Linvega | ||
3 | Copyright (c) 2021 Andrew Alderwick | ||
4 | |||
5 | Permission to use, copy, modify, and distribute this software for any | ||
6 | purpose with or without fee is hereby granted, provided that the above | ||
7 | copyright notice and this permission notice appear in all copies. | ||
8 | |||
9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | WITH REGARD TO THIS SOFTWARE. | ||
11 | */ | ||
12 | |||
13 | typedef unsigned char Uint8; | ||
14 | typedef unsigned short Uint16; | ||
15 | typedef unsigned int Uint32; | ||
16 | |||
17 | typedef struct Ppu { | ||
18 | Uint16 width, height; | ||
19 | Uint8 *pixels; | ||
20 | } Ppu; | ||
21 | |||
22 | int ppu_init(Ppu *p, Uint8 hor, Uint8 ver); | ||
23 | void ppu_pixel(Ppu *p, Uint8 layer, Uint16 x, Uint16 y, Uint8 color); | ||
24 | void ppu_1bpp(Ppu *p, Uint8 layer, Uint16 x, Uint16 y, Uint8 *sprite, Uint8 color, Uint8 flipx, Uint8 flipy); | ||
25 | void ppu_2bpp(Ppu *p, Uint8 layer, Uint16 x, Uint16 y, Uint8 *sprite, Uint8 color, Uint8 flipx, Uint8 flipy); | ||