aboutsummaryrefslogtreecommitdiffstats
path: root/src/ppu.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ppu.h')
-rw-r--r--src/ppu.h30
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/*
8Copyright (c) 2021 Devine Lu Linvega
9Copyright (c) 2021 Andrew Alderwick
10Copyright (c) 2021 Bad Diode
11
12Permission to use, copy, modify, and distribute this software for any
13purpose with or without fee is hereby granted, provided that the above
14copyright notice and this permission notice appear in all copies.
15
16THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
17WITH REGARD TO THIS SOFTWARE.
18*/
19
20typedef struct Ppu {
21 u32 *bg, *fg;
22 u16 hor, ver, pad, width, height;
23} Ppu;
24
25int initppu(Ppu *p, u8 hor, u8 ver, u8 pad);
26void putcolors(u8 *addr);
27void putpixel(u32 *layer, u16 x, u16 y, u8 color);
28void puticn(u32 *layer, u16 x, u16 y, u8 *sprite, u8 color, u8 flipx, u8 flipy);
29void putchr(u32 *layer, u16 x, u16 y, u8 *sprite, u8 color, u8 flipx, u8 flipy);
30#endif // UXNGBA_PPU_H