update recoil to version 6.1.0
This commit is contained in:
		
							parent
							
								
									77f24ad3a4
								
							
						
					
					
						commit
						1e10da1323
					
				
							
								
								
									
										4
									
								
								3rdparty/Makefile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								3rdparty/Makefile
									
									
									
									
										vendored
									
									
								
							@ -135,14 +135,14 @@ LUAPATCHES = lua-atari-log2.patch \
 | 
				
			|||||||
LATESTLUAVER = $(shell curl -s -S https://www.lua.org/download.html | grep -A1 "current release is" | tail -n1 | sed 's/.*lua-\([0-9.]*\)\.tar.*/\1/' )
 | 
					LATESTLUAVER = $(shell curl -s -S https://www.lua.org/download.html | grep -A1 "current release is" | tail -n1 | sed 's/.*lua-\([0-9.]*\)\.tar.*/\1/' )
 | 
				
			||||||
LATESTLUA53VER = $(shell curl -s -S https://www.lua.org/versions.html |grep 5[.]3[.] | head -n 1 | sed 's/.*\(5[0-9.]*\).*/\1/' )
 | 
					LATESTLUA53VER = $(shell curl -s -S https://www.lua.org/versions.html |grep 5[.]3[.] | head -n 1 | sed 's/.*\(5[0-9.]*\).*/\1/' )
 | 
				
			||||||
# https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-0.6.1.tar.gz
 | 
					# https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-0.6.1.tar.gz
 | 
				
			||||||
RECOILVER=5.1.1
 | 
					RECOILVER=6.1.0
 | 
				
			||||||
LATESTRECOILVER = $(shell curl -s -S -I https://sourceforge.net/projects/recoil/files/latest/download|grep -i "^location:"|sed 's:.*/\([0-9.]*\)/.*:\1:' )
 | 
					LATESTRECOILVER = $(shell curl -s -S -I https://sourceforge.net/projects/recoil/files/latest/download|grep -i "^location:"|sed 's:.*/\([0-9.]*\)/.*:\1:' )
 | 
				
			||||||
RECOIL=recoil-$(RECOILVER)
 | 
					RECOIL=recoil-$(RECOILVER)
 | 
				
			||||||
RECOILARCH=$(RECOIL).tar.gz
 | 
					RECOILARCH=$(RECOIL).tar.gz
 | 
				
			||||||
# https://downloads.sourceforge.net/project/recoil/recoil/4.3.0/recoil-4.3.0.tar.gz
 | 
					# https://downloads.sourceforge.net/project/recoil/recoil/4.3.0/recoil-4.3.0.tar.gz
 | 
				
			||||||
RECOILURL=https://downloads.sourceforge.net/project/recoil/recoil/$(RECOILVER)/$(RECOILARCH)
 | 
					RECOILURL=https://downloads.sourceforge.net/project/recoil/recoil/$(RECOILVER)/$(RECOILARCH)
 | 
				
			||||||
RECOILURLALT=http://nanard.free.fr/grafx2/$(RECOILARCH)
 | 
					RECOILURLALT=http://nanard.free.fr/grafx2/$(RECOILARCH)
 | 
				
			||||||
RECOILSHA256=13ad32d669c73393114da2cc2d1c1af4880fbebcfcc807ca96fc20b181d50db5
 | 
					RECOILSHA256=a10384a69de0ae4cbc6a21b2bf598e6191da9e8b2847f7aeda66ec18d66e27b9
 | 
				
			||||||
#https://github.com/redcode/6502/releases/download/v0.1/6502-v0.1.tar.xz
 | 
					#https://github.com/redcode/6502/releases/download/v0.1/6502-v0.1.tar.xz
 | 
				
			||||||
REDCODE6502=6502-v0.1
 | 
					REDCODE6502=6502-v0.1
 | 
				
			||||||
REDCODE6502ARCH=6502-v0.1.tar.xz
 | 
					REDCODE6502ARCH=6502-v0.1.tar.xz
 | 
				
			||||||
 | 
				
			|||||||
@ -130,7 +130,6 @@ void Load_Recoil_Image(T_IO_Context *context)
 | 
				
			|||||||
      int original_width, original_height;
 | 
					      int original_width, original_height;
 | 
				
			||||||
      int x, y;
 | 
					      int x, y;
 | 
				
			||||||
      int x_ratio, y_ratio;
 | 
					      int x_ratio, y_ratio;
 | 
				
			||||||
      byte * pixels;
 | 
					 | 
				
			||||||
      const int *palette;
 | 
					      const int *palette;
 | 
				
			||||||
      enum PIXEL_RATIO ratio = PIXEL_SIMPLE;
 | 
					      enum PIXEL_RATIO ratio = PIXEL_SIMPLE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -144,69 +143,61 @@ void Load_Recoil_Image(T_IO_Context *context)
 | 
				
			|||||||
        ratio = PIXEL_WIDE;
 | 
					        ratio = PIXEL_WIDE;
 | 
				
			||||||
      else if(x_ratio == 1 && y_ratio > 1)
 | 
					      else if(x_ratio == 1 && y_ratio > 1)
 | 
				
			||||||
        ratio = PIXEL_TALL;
 | 
					        ratio = PIXEL_TALL;
 | 
				
			||||||
      pixels = GFX2_malloc(width * height);
 | 
					      // try to convert to 8bpp image
 | 
				
			||||||
      if (pixels == NULL)
 | 
					      File_error = 0;
 | 
				
			||||||
 | 
					      palette = RECOIL_ToPalette(recoil);
 | 
				
			||||||
 | 
					      if (palette == NULL)
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        File_error = 1;
 | 
					        // 24bits
 | 
				
			||||||
 | 
					        const int * tc_pixels;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Pre_load(context, original_width, original_height, file_length, FORMAT_MISC, ratio, 24);
 | 
				
			||||||
 | 
					        tc_pixels = RECOIL_GetPixels(recoil);
 | 
				
			||||||
 | 
					        for (y = 0; y < original_height; y++)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          for (x = 0; x < original_width; x++)
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            Set_pixel_24b(context, x, y, *tc_pixels >> 16, *tc_pixels >> 8, *tc_pixels);
 | 
				
			||||||
 | 
					            tc_pixels += x_ratio;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          tc_pixels += width * (y_ratio - 1);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      else
 | 
					      else
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        // try to convert to 8bpp image
 | 
					        // 8bits
 | 
				
			||||||
        File_error = 0;
 | 
					        int i;
 | 
				
			||||||
        palette = RECOIL_ToPalette(recoil, pixels);
 | 
					        int bpp;
 | 
				
			||||||
        if (palette == NULL)
 | 
					        int ncolors = RECOIL_GetColors(recoil);
 | 
				
			||||||
        {
 | 
					        const uint8_t * pixels = RECOIL_GetIndexes(recoil);
 | 
				
			||||||
          // 24bits
 | 
					        const byte * p = pixels;
 | 
				
			||||||
          const int * tc_pixels;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
          Pre_load(context, original_width, original_height, file_length, FORMAT_MISC, ratio, 24);
 | 
					        bpp = 8;
 | 
				
			||||||
          tc_pixels = RECOIL_GetPixels(recoil);
 | 
					        while (ncolors <= (1 << (bpp - 1)))
 | 
				
			||||||
          for (y = 0; y < original_height; y++)
 | 
					          bpp--;
 | 
				
			||||||
          {
 | 
					        if (Config.Clear_palette)
 | 
				
			||||||
            for (x = 0; x < original_width; x++)
 | 
					          memset(context->Palette,0,sizeof(T_Palette));
 | 
				
			||||||
            {
 | 
					        for (i = 0; i < ncolors; i++)
 | 
				
			||||||
              Set_pixel_24b(context, x, y, *tc_pixels >> 16, *tc_pixels >> 8, *tc_pixels);
 | 
					 | 
				
			||||||
              tc_pixels += x_ratio;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            tc_pixels += width * (y_ratio - 1);
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        else
 | 
					 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          // 8bits
 | 
					          context->Palette[i].R = (byte)(palette[i] >> 16);
 | 
				
			||||||
          int i;
 | 
					          context->Palette[i].G = (byte)(palette[i] >> 8);
 | 
				
			||||||
          int bpp;
 | 
					          context->Palette[i].B = (byte)(palette[i]);
 | 
				
			||||||
          int ncolors = RECOIL_GetColors(recoil);
 | 
					 | 
				
			||||||
          const byte * p = pixels;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          bpp = 8;
 | 
					 | 
				
			||||||
          while (ncolors <= (1 << (bpp - 1)))
 | 
					 | 
				
			||||||
            bpp--;
 | 
					 | 
				
			||||||
          if (Config.Clear_palette)
 | 
					 | 
				
			||||||
            memset(context->Palette,0,sizeof(T_Palette));
 | 
					 | 
				
			||||||
          for (i = 0; i < ncolors; i++)
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            context->Palette[i].R = (byte)(palette[i] >> 16);
 | 
					 | 
				
			||||||
            context->Palette[i].G = (byte)(palette[i] >> 8);
 | 
					 | 
				
			||||||
            context->Palette[i].B = (byte)(palette[i]);
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
          Pre_load(context, original_width, original_height, file_length, FORMAT_MISC, ratio, bpp);
 | 
					 | 
				
			||||||
          for (y = 0; y < original_height; y++)
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            for (x = 0; x < original_width; x++)
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
              Set_pixel(context, x, y, *p);
 | 
					 | 
				
			||||||
              p += x_ratio;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            p += width * (y_ratio - 1);
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        free(pixels);
 | 
					        Pre_load(context, original_width, original_height, file_length, FORMAT_MISC, ratio, bpp);
 | 
				
			||||||
        if (!File_error)
 | 
					        for (y = 0; y < original_height; y++)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          snprintf(context->Comment, COMMENT_SIZE + 1, "RECOIL: %s %d colors", RECOIL_GetPlatform(recoil), RECOIL_GetColors(recoil));
 | 
					          for (x = 0; x < original_width; x++)
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            Set_pixel(context, x, y, *p);
 | 
				
			||||||
 | 
					            p += x_ratio;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          p += width * (y_ratio - 1);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					      if (!File_error)
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        snprintf(context->Comment, COMMENT_SIZE + 1, "RECOIL: %s %d colors", RECOIL_GetPlatform(recoil), RECOIL_GetColors(recoil));
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    RECOIL_Delete(recoil);
 | 
					    RECOIL_Delete(recoil);
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user