diff options
Diffstat (limited to 'src/ppu.h')
-rw-r--r-- | src/ppu.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/ppu.h b/src/ppu.h new file mode 100644 index 0000000..0356b63 --- /dev/null +++ b/src/ppu.h | |||
@@ -0,0 +1,30 @@ | |||
1 | #ifndef UXNGBA_PPU_H | ||
2 | #define UXNGBA_PPU_H | ||
3 | |||
4 | #include <stdio.h> | ||
5 | #include <stdlib.h> | ||
6 | |||
7 | /* | ||
8 | Copyright (c) 2021 Devine Lu Linvega | ||
9 | Copyright (c) 2021 Andrew Alderwick | ||
10 | Copyright (c) 2021 Bad Diode | ||
11 | |||
12 | Permission to use, copy, modify, and distribute this software for any | ||
13 | purpose with or without fee is hereby granted, provided that the above | ||
14 | copyright notice and this permission notice appear in all copies. | ||
15 | |||
16 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
17 | WITH REGARD TO THIS SOFTWARE. | ||
18 | */ | ||
19 | |||
20 | typedef struct Ppu { | ||
21 | u32 *bg, *fg; | ||
22 | u16 hor, ver, pad, width, height; | ||
23 | } Ppu; | ||
24 | |||
25 | int initppu(Ppu *p, u8 hor, u8 ver, u8 pad); | ||
26 | void putcolors(u8 *addr); | ||
27 | void putpixel(u32 *layer, u16 x, u16 y, u8 color); | ||
28 | void puticn(u32 *layer, u16 x, u16 y, u8 *sprite, u8 color, u8 flipx, u8 flipy); | ||
29 | void putchr(u32 *layer, u16 x, u16 y, u8 *sprite, u8 color, u8 flipx, u8 flipy); | ||
30 | #endif // UXNGBA_PPU_H | ||