shithub: dpaint

Download patch

ref: fac78acfcad60c41cf0aeaf7650055cbe15a4134
parent: 9840e705a8504a60bef6a80560a1734c59bcc754
author: glenda <glenda@x61t>
date: Mon Jul 10 22:53:15 EDT 2023

r

--- a/dpaint.c
+++ b/dpaint.c
@@ -23,39 +23,39 @@
 int nundo = 0;
 Image *undo[1024];
 
-int c64[] = {		/* arne's 16 color palette */
+int arne[] = {		/* arne's 32 color palette */
 	0x000000,
-	0x9D9D9D,
-	0xFFFFFF,
-	0xBE2633,
-	0xE06F8B,
-	0x493C2B,
-	0xA46422,
-	0xEB8931,
-	0xF7E26B,
-	0x2F484E,
-	0x44891A,
-	0xA3CE27,
-	0x1B2632,
+	0x493c2b,
+	0xbe2633,
+	0xe06f8b,
+	0xa46422,
+	0xeb8931,
+	0xf7e26b,
+	0xffffff,
+	0x9d9d9d,
+	0x2f484e,
+	0x1b2632,
+	0x44891a,
+	0xa3ce27,
 	0x005784,
-	0x31A2F2,
-	0xB2DCEF,
-	0x000000,
-	0xFFFFFF,
-	0x68372B,
-	0x70A4B2,
-	0x6F3D86,
-	0x588D43,
-	0x352879,
-	0xB8C76F,
-	0x6F4F25,
-	0x433900,
-	0x9A6759,
-	0x444444,
-	0x6C6C6C,
-	0x9AD284,
-	0x6C5EB5,
-	0x959595,
+	0x31a2f2,
+	0xb2dcef,
+	0x342a97,
+	0x656d71,
+	0xcccccc,
+	0x732930,
+	0xcb43a7,
+	0x524f40,
+	0xad9d33,
+	0xec4700,
+	0xfab40b,
+	0x115e33,
+	0x14807e,
+	0x15c2a5,
+	0x225af6,
+	0x9964f9,
+	0xf78ed6,
+	0xf4b990,
 };
 
 /*
@@ -558,11 +558,11 @@
 			update(nil);
 			break;
 		case 4:
-			snprint(buf, sizeof(buf), "%06x", c64[i]);
+			snprint(buf, sizeof(buf), "%06x", arne[i]);
 			if(eenter("Hex", buf, sizeof(buf), &m) == 6){
 				c = strtoll(buf, &e, 16);
 				if(*e == 0){
-					c64[i] = c;
+					arne[i] = c;
 					freeimage(pal[i]);
 					pal[i] = allocimage(display, Rect(0, 0, 1, 1), RGB24, 1, c<<8|0xff);
 					drawpal();
@@ -654,7 +654,7 @@
 	/* palette initialization */
 	for(i=0; i<nelem(pal); i++){
 		pal[i] = allocimage(display, Rect(0, 0, 1, 1), RGB24, 1,
-			c64[i % nelem(c64)]<<8 | 0xFF);
+			arne[i % nelem(arne)]<<8 | 0xFF);
 		if(pal[i] == nil)
 			sysfatal("allocimage: %r");
 	}