Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37853095
en ru br
ALT Linux repos
S:20.04p16-alt1

Group :: Sciences/Mathematics
RPM: xfractint

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: xfractint-20-fake_lut_palette.patch
Download


diff -ur xfractint-20.04p09/common/cmdfiles.c xfractint-20.04p09.new/common/cmdfiles.c
--- xfractint-20.04p09/common/cmdfiles.c	2010-07-07 13:05:59.000000000 +0000
+++ xfractint-20.04p09.new/common/cmdfiles.c	2010-07-07 14:04:40.711375347 +0000
@@ -2936,7 +2936,7 @@
 
 static int parse_colors(char *value)
 {
-   int i,j,k;
+   int i,j,k,r;
    if (*value == '@') {
       if(merge_pathnames(MAP_name,&value[1],3)<0)
          init_msg(0,"",&value[1],3);
@@ -3000,6 +3000,21 @@
          dacbox[i][0] = dacbox[i][1] = dacbox[i][2] = 40;
          ++i;
          }
+
+      if(fake_lut)
+	for(i=0; i<256; i++) { // fake_lut fails to work with duplicated colors
+	  do {
+	    for(k=r=0; k<i && !(r =
+		  dacbox[i][0] == dacbox[k][0] &&
+		  dacbox[i][1] == dacbox[k][1] &&
+		  dacbox[i][2] == dacbox[k][2]); k++);
+	    if(r)
+	      dacbox[i][(dacbox[i][0]+dacbox[i][1]+dacbox[i][2])%3]=
+		(dacbox[i][(dacbox[i][0]+dacbox[i][1]+dacbox[i][2])%3]+1)%256;
+	  } while(r);
+	}
+
+
       if (colorstate == 2) /* read in map name, but it is rotated */
          colorstate = 3;
       else
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin