aboutsummaryrefslogtreecommitdiff
path: root/src/vga.h
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-07-08 22:35:16 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-07-08 22:35:16 +0100
commit8871729a65615df0eab213bbbf942abe75771704 (patch)
tree34a4ab0f412c34383799e14816d1dfe288705085 /src/vga.h
parent5ae0b6490f5fd138f4cbf5c084680bb03b2fff05 (diff)
downloadgold-mine-run-8871729a65615df0eab213bbbf942abe75771704.tar.gz
gold-mine-run-8871729a65615df0eab213bbbf942abe75771704.zip
Avoid drawing the whole screen on each frame
This allows supporting 386DX "just about" (there will be flickering).
Diffstat (limited to 'src/vga.h')
-rw-r--r--src/vga.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/vga.h b/src/vga.h
index 06a69df..2441e24 100644
--- a/src/vga.h
+++ b/src/vga.h
@@ -21,14 +21,20 @@ void wait_frames(uint16_t frames);
/* 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);
+#define TARGET_SCREEN 0
+#define TARGET_BUFFER 1
+
+void blit_target(uint8_t t);
+
void blit(const uint8_t *sprite, const Rect *dst);
/* used for text: skip transparent, ignore 0, replace any other color by c */
void blit_c(const uint8_t *sprite, const Rect *dst, uint8_t c);
/* in src w is sprite width, h is sprite height */
void blitrc(const uint8_t *sprite, const Rect *src, const Rect *dst);
void blit_erase(uint8_t c);
-void blit_update();
-/* read from back buffer into memory */
-void read_buffer(uint8_t *dst, const Rect *src);
+/* copy from back buffer to screen */
+void blit_copy_all();
+void blit_copy(const Rect *dst);
+
#endif /* _VGA_H */