changeset 2590:0d6aa5cae517

Just syncing some garbage in, no functional changes.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 13 Dec 2022 10:09:40 +0200
parents ba0f55e2f877
children b2c510f851dc
files tools/lib64gfx.h
diffstat 1 files changed, 21 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/tools/lib64gfx.h	Thu Dec 08 17:03:32 2022 +0200
+++ b/tools/lib64gfx.h	Tue Dec 13 10:09:40 2022 +0200
@@ -108,13 +108,8 @@
 
     D64_EI_FLI_TYPE,       // FLI type (see D64_FLI_*)
     D64_EI_ILACE_TYPE,     // Interlace type (see D64_ILACE_*)
-};
 
-
-// Image <-> bitmap conversion dithering
-enum
-{
-    D64_DITH_NONE = 0,     // No dithering
+    D64_EI_SPRBG_PRIORITY, // Sprite/background priority for 8 sprites (like $d01b)
 };
 
 
@@ -189,11 +184,12 @@
     DMPalette *pal;      // Use this palette custom palette if != NULL
     DMC64Palette *cpal;  // If DMC64ImageConvSpec::pal == NULL, use this C64 palette
 
-/*
+    int xoffs, yoffs;    // X/Y offsets in destination image
+    int width, height;   // Destination width/height (0 = use src)
+
     // XXX These are not actually used yet (if ever)
-    int dither;          // Dither mode (D64_DITH_*)
+    bool borders;        // Render borders (overrides width/height & aspect settings)
     bool aspect;         // Render using pixel aspectX/aspectY, false = par=1:1
-*/
 } DMC64ImageConvSpec;
 
 
@@ -215,6 +211,18 @@
 } DMC64Sprite;
 
 
+typedef struct
+{
+    int xc, yc;  // Sprite coordinates (XXX TODO: borders etc.)
+    int flags;   // D64_SPRF_* flags
+    int color;   // Color
+    int sprnum;  // Physical sprite number for priority checking
+
+    int sprindex; // Index in "bank"
+    int bank;	  // "Bank" of extraData where the data resides
+} DMC64SpriteDef;
+
+
 typedef struct _DMC64ImageCommonFormat DMC64ImageCommonFormat;
 typedef struct _DMC64ImageFormat DMC64ImageFormat;
 
@@ -239,6 +247,10 @@
     // for example raster colours might be stored
     DMC64MemBlock extraData[D64_MAX_EXTRA_DATA];
 
+    // Sprites
+    int nsprites;
+    DMC64Sprite *sprites;
+
     // Extra information / settings
     // See D64_EI_* constants.
     int extraInfo[D64_MAX_EXTRA_INFO];