changeset 2309:0f8232c2af63

Comments.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 09 Jul 2019 10:26:26 +0300
parents 28701abacc31
children 75216bf67fd2
files tools/lib64gfx.h
diffstat 1 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/tools/lib64gfx.h	Tue Jul 09 09:45:03 2019 +0300
+++ b/tools/lib64gfx.h	Tue Jul 09 10:26:26 2019 +0300
@@ -42,6 +42,8 @@
 #define D64_SPR_WIDTH_UT       (D64_SPR_WIDTH_PX / 8) // bytes
 #define D64_SPR_HEIGHT_UT      D64_SPR_HEIGHT_PX
 #define D64_SPR_SIZE           ((D64_SPR_WIDTH_UT * D64_SPR_HEIGHT_UT) + 1)
+#define D64_MAX_SPRITES        8 // Max sprites per scanline (in simple cases)
+
 
 // Character constants
 #define D64_CHR_WIDTH_PX       8
@@ -53,7 +55,6 @@
 // Etc.
 #define D64_NCOLORS            16
 #define D64_VIDBANK_SIZE       (16*1024)
-#define D64_MAX_SPRITES        1024
 #define D64_MAX_CHARS          256
 
 
@@ -102,11 +103,11 @@
 {
     D64_EI_MODE = 0,       // Actual mode, if the format supports several
 
-    D64_EI_CHAR_CASE,
-    D64_EI_CHAR_CUSTOM,
+    D64_EI_CHAR_CASE,      // [CHAR] 0 = upper case, != lower case
+    D64_EI_CHAR_CUSTOM,    // [CHAR] 0 = ROM charset, != custom charset
 
-    D64_EI_FLI_TYPE,
-    D64_EI_ILACE_TYPE,
+    D64_EI_FLI_TYPE,       // FLI type (see D64_FLI_*)
+    D64_EI_ILACE_TYPE,     // Interlace type (see D64_ILACE_*)
 };
 
 
@@ -193,9 +194,11 @@
 
 typedef struct
 {
+    int xc, yc;  // Sprite coordinates (XXX TODO: borders etc.)
     BOOL multicolor, xexpand, yexpand;
-    int color, xc, yc;
-    Uint8 data[D64_SPR_HEIGHT_UT][D64_SPR_WIDTH_UT];
+    int color;   // Color
+    int sprnum;  // Physical sprite number for priority checking
+    Uint8 *data; // "const" pointer to sprite data, do not deallocate
 } DMC64Sprite;