From f90846d5a7a82573f85a58306c7b866baef95703 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Thu, 8 Jun 2023 08:01:02 +0100 Subject: Use a rectangle struct --- src/vga.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/vga.h') diff --git a/src/vga.h b/src/vga.h index ef183ca..a185974 100644 --- a/src/vga.h +++ b/src/vga.h @@ -4,6 +4,13 @@ /* palette index to be used as transparent color */ #define TRANSPARENT 16 +typedef struct { + uint16_t x; + uint16_t y; + uint16_t w; + uint16_t h; +} Rect; + uint8_t open_framebuffer(); void close_framebuffer(); @@ -13,7 +20,7 @@ void wait_vsync(); /* the palette is expected to be 8 bit per color, and will be converted to VGA's 6 bit per color */ void set_palette(const uint8_t *palette); -void blit(const uint8_t *src, uint16_t x, uint16_t y, uint16_t w, uint16_t h); +void blit(const uint8_t *sprite, const Rect *dst); void blit_erase(uint8_t c); void blit_update(); -- cgit v1.2.3