comparison tools/lib64gfx.c @ 1735:eeb6a82b4654

Oops, left in wrong variable name. :S
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 08 Jun 2018 22:29:49 +0300
parents 07111a60cd4e
children c3b3c23cbd44
comparison
equal deleted inserted replaced
1734:183d503b17a7 1735:eeb6a82b4654
115 } 115 }
116 116
117 117
118 BOOL dmSetMixedColorC64Palette(DMImage *img) 118 BOOL dmSetMixedColorC64Palette(DMImage *img)
119 { 119 {
120 if (!dmImagePaletteAlloc(dst, C64_NCOLORS * C64_NCOLORS, -1)) 120 if (!dmImagePaletteAlloc(img, C64_NCOLORS * C64_NCOLORS, -1))
121 return FALSE; 121 return FALSE;
122 122
123 int n = 0; 123 int n = 0;
124 for (int n1 = 0; n1 < C64_NCOLORS; n1++) 124 for (int n1 = 0; n1 < C64_NCOLORS; n1++)
125 { 125 {
126 const DMColor *col1 = &dmDefaultC64Palette[n1]; 126 const DMColor *col1 = &dmDefaultC64Palette[n1];
127 for (int n2 = 0; n2 < C64_NCOLORS; n2++) 127 for (int n2 = 0; n2 < C64_NCOLORS; n2++)
128 { 128 {
129 const DMColor *col2 = &dmDefaultC64Palette[n2]; 129 const DMColor *col2 = &dmDefaultC64Palette[n2];
130 dst->pal[n].r = (col1->r + col2->r) / 2; 130 img->pal[n].r = (col1->r + col2->r) / 2;
131 dst->pal[n].g = (col1->g + col2->g) / 2; 131 img->pal[n].g = (col1->g + col2->g) / 2;
132 dst->pal[n].b = (col1->b + col2->b) / 2; 132 img->pal[n].b = (col1->b + col2->b) / 2;
133 n++; 133 n++;
134 } 134 }
135 } 135 }
136 136
137 return TRUE; 137 return TRUE;