diff tools/lib64gfx.c @ 1457:dcff9ac95d3f

Add function to set DMImage's palette to default C64 palette and use it.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 10 May 2018 19:58:52 +0300
parents 42fb39da7dde
children 361cad3b8445
line wrap: on
line diff
--- a/tools/lib64gfx.c	Thu May 10 18:53:42 2018 +0300
+++ b/tools/lib64gfx.c	Thu May 10 19:58:52 2018 +0300
@@ -34,6 +34,15 @@
 };
 
 
+void dmSetDefaultC64Palette(DMImage *img)
+{
+    img->constpal = TRUE;
+    img->pal      = dmDefaultC64Palette;
+    img->ncolors  = C64_NCOLORS;
+    img->ctransp  = 255;
+}
+
+
 #define DM_GET_ADDR_LO(addr) ((addr) & 0xff)
 #define DM_GET_ADDR_HI(addr) (((addr) >> 8) & 0xff)