diff tools/lib64gfx.h @ 2238:5db6e0b63b35

Change again how the interlace type information is stored. Now store it in DMC64Image::extraInfo[] where it actually makes sense. Also add index for FLI type.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 15 Jun 2019 06:43:36 +0300
parents a36c81c3df85
children adb0480f6ebd
line wrap: on
line diff
--- a/tools/lib64gfx.h	Sat Jun 15 06:26:07 2019 +0300
+++ b/tools/lib64gfx.h	Sat Jun 15 06:43:36 2019 +0300
@@ -17,13 +17,17 @@
 #endif
 
 
+// Max defines
+#define D64_MAX_EXTRA_DATA     16
+#define D64_MAX_EXTRA_INFO     64
+
+
 // Bitmap constants
 #define D64_SCR_WIDTH          320
 #define D64_SCR_HEIGHT         200
 #define D64_SCR_CH_WIDTH       (D64_SCR_WIDTH/8)
 #define D64_SCR_CH_HEIGHT      (D64_SCR_HEIGHT/8)
-#define D64_MAX_EXTRA_DATA     16
-#define D64_MAX_EXTRA_INFO     64
+
 
 // C64 video screen pixel aspect ratio on PAL
 #define D64_SCR_PAR_XY         (0.9365f)
@@ -73,6 +77,13 @@
 };
 
 
+// Different types of interlace
+enum
+{
+    D64_FLI_8            = 8,
+};
+
+
 // Charmode screen memory configuration
 enum
 {
@@ -88,6 +99,9 @@
     D64_EI_CHAR_CASE = 0,
     D64_EI_CHAR_MODE,
     D64_EI_CHAR_CUSTOM,
+
+    D64_EI_FLI_TYPE,
+    D64_EI_ILACE_TYPE,
 };
 
 
@@ -132,7 +146,7 @@
     DS_D023,
     DS_D024,
 
-    DS_ILACE_TYPE,
+    DS_EXTRA_INFO,
 
     DS_LAST
 };
@@ -187,9 +201,7 @@
 typedef struct _DMC64Image
 {
     DMC64ImageCommonFormat *fmt;
-    int laceType,            // Interlace type (D64_ILACE_*)
-        nblocks,             // Number of internal blocks used
-        nbanks;              // Number of videobanks used
+    int nblocks; // Number of internal blocks used
 
     // Bitmaps, color RAM, screen, etc. blocks * nblocks
     // Not all of them may be allocated
@@ -220,7 +232,7 @@
     int    type;     // Operation type (DO_*)
     int    subject;  // Operation "subject" (DS_*)
 
-    size_t offs;     // Offset in "memory"
+    int    offs;     // Offset in "memory"
     int    bank;     // Bank number or extradata index
     size_t size;     // Size of data (0 for "default")
     size_t offs2;    // Offset in data-block