#ifndef UXNGBA_PPU_H #define UXNGBA_PPU_H #include #include /* Copyright (c) 2021 Devine Lu Linvega Copyright (c) 2021 Andrew Alderwick Copyright (c) 2021 Bad Diode Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE. */ typedef struct Ppu { u32 *bg, *fg; u16 hor, ver, pad, width, height; } Ppu; int initppu(Ppu *p, u8 hor, u8 ver, u8 pad); void putcolors(u8 *addr); void ppu_pixel(u32 *layer, u16 x, u16 y, u8 color); void ppu_1bpp(u32 *layer, u16 x, u16 y, u8 *sprite, u8 color, u8 flipx, u8 flipy); void ppu_2bpp(u32 *layer, u16 x, u16 y, u8 *sprite, u8 color, u8 flipx, u8 flipy); #endif // UXNGBA_PPU_H