changeset 1426:4c7b456d7f0b

Rename global dmC64Palette to dmDefaultC64Palette.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 15 Nov 2017 07:07:26 +0200
parents f08c4ace528d
children ae1fcae5e622
files tools/gfxconv.c tools/lib64gfx.c tools/lib64gfx.h tools/view64.c
diffstat 4 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/tools/gfxconv.c	Wed Nov 15 07:06:47 2017 +0200
+++ b/tools/gfxconv.c	Wed Nov 15 07:07:26 2017 +0200
@@ -1526,7 +1526,7 @@
         }
 
         outImage->constpal = TRUE;
-        outImage->pal      = dmC64Palette;
+        outImage->pal      = dmDefaultC64Palette;
         outImage->ncolors  = C64_NCOLORS;
         outImage->ctransp  = 255;
 
--- a/tools/lib64gfx.c	Wed Nov 15 07:06:47 2017 +0200
+++ b/tools/lib64gfx.c	Wed Nov 15 07:07:26 2017 +0200
@@ -13,7 +13,7 @@
 
 
 // Based on Pepto's palette, stolen from VICE
-DMColor dmC64Palette[C64_NCOLORS] =
+DMColor dmDefaultC64Palette[C64_NCOLORS] =
 {
     { 0x00, 0x00, 0x00, 0xff },
     { 0xFF, 0xFF, 0xFF, 0xff },
@@ -1511,8 +1511,7 @@
     if ((*pdst = dst = dmImageAlloc(src->width, src->height, DM_IFMT_PALETTE, -1)) == NULL)
         return DMERR_MALLOC;
 
-    // Set palette
-    dst->pal      = (DMColor *) &dmC64Palette;
+    // Set partial palette information
     dst->ncolors  = C64_NCOLORS;
     dst->constpal = TRUE;
 
--- a/tools/lib64gfx.h	Wed Nov 15 07:06:47 2017 +0200
+++ b/tools/lib64gfx.h	Wed Nov 15 07:07:26 2017 +0200
@@ -180,7 +180,7 @@
 } DMC64ImageFormat;
 
 
-extern DMColor           dmC64Palette[C64_NCOLORS];
+extern DMColor           dmDefaultC64Palette[C64_NCOLORS];
 extern const DMC64ImageFormat  dmC64ImageFormats[];
 extern const int         ndmC64ImageFormats;
 
--- a/tools/view64.c	Wed Nov 15 07:06:47 2017 +0200
+++ b/tools/view64.c	Wed Nov 15 07:07:26 2017 +0200
@@ -460,7 +460,7 @@
             }
 
             dmScaledBlitSurface8to8(surf, 0, ypos, optScrWidth, sheight, screen);
-            SDL_SetColors(screen, (SDL_Color *)dmC64Palette, 0, C64_NCOLORS);
+            SDL_SetColors(screen, (SDL_Color *)dmDefaultC64Palette, 0, C64_NCOLORS);
 
             if (SDL_MUSTLOCK(screen) != 0)
                 SDL_UnlockSurface(screen);