[Scummvm-cvs-logs] SF.net SVN: scummvm:[43901] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Tue Sep 1 23:24:09 CEST 2009


Revision: 43901
          http://scummvm.svn.sourceforge.net/scummvm/?rev=43901&view=rev
Author:   thebluegr
Date:     2009-09-01 21:24:09 +0000 (Tue, 01 Sep 2009)

Log Message:
-----------
Disabled the FreeSCI PIC0 palette dithering code, for now. It doesn't really make sense to dither, as Sierra games use up to 256 colors (even the later SVGA ones), and it messes up the result of the FreeSCI graphics filters. Plus, the resulting image looks worse than the original one

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gfx/gfx_options.h
    scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp
    scummvm/trunk/engines/sci/gfx/gfx_resource.h
    scummvm/trunk/engines/sci/gfx/res_pic.cpp
    scummvm/trunk/engines/sci/sci.cpp

Modified: scummvm/trunk/engines/sci/gfx/gfx_options.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_options.h	2009-09-01 21:16:12 UTC (rev 43900)
+++ scummvm/trunk/engines/sci/gfx/gfx_options.h	2009-09-01 21:24:09 UTC (rev 43901)
@@ -58,8 +58,10 @@
 	/* SCI0 pic resource options */
 	int pic0_unscaled; /* Don't draw scaled SCI0 pics */
 
+#if 0
 	int pic0_dither_mode; /* Mode to use for pic0 dithering, defined in gfx_resource.h */
 	int pic0_dither_pattern; /* Pattern to use for pic0 dithering, defined in gfx_resource.h */
+#endif
 
 	gfx_brush_mode_t pic0_brush_mode;
 	gfx_line_mode_t pic0_line_mode;

Modified: scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp	2009-09-01 21:16:12 UTC (rev 43900)
+++ scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp	2009-09-01 21:24:09 UTC (rev 43901)
@@ -119,11 +119,13 @@
 
 		memcpy(scaled_pic->undithered_buffer, scaled_pic->visual_map->index_data, scaled_pic->undithered_buffer_size);
 
+#if 0
 #ifdef CUSTOM_GRAPHICS_OPTIONS
 		gfxr_dither_pic0(scaled_pic, _options->pic0_dither_mode, _options->pic0_dither_pattern);
 #else
 		gfxr_dither_pic0(scaled_pic, GFXR_DITHER_MODE_D256, GFXR_DITHER_PATTERN_SCALED);
 #endif
+#endif
 	}
 
 	// Mark default palettes
@@ -149,15 +151,23 @@
 			// generated options hash anyway
 			return 10;
 		else
-			return (_options->pic0_unscaled) ? 0x10000 : (_options->pic0_dither_mode << 12)
-			       | (_options->pic0_dither_pattern << 8) | (_options->pic0_brush_mode << 4)
-				   | (_options->pic0_line_mode);
+			return (_options->pic0_unscaled) ? 0x10000 : 
+#if 0
+					 (_options->pic0_dither_mode << 12) |
+			         (_options->pic0_dither_pattern << 8) |
+#endif
+					 (_options->pic0_brush_mode << 4) |
+				     (_options->pic0_line_mode);
 #else
 		if (_resourceManager->isVGA())
 			return 10;
 		else
+#if 0
 			return 0x10000 | (GFXR_DITHER_PATTERN_SCALED << 8) | (GFX_BRUSH_MODE_RANDOM_ELLIPSES << 4) | GFX_LINE_MODE_CORRECT;
+#else
+			return 0x10000 | (GFX_BRUSH_MODE_RANDOM_ELLIPSES << 4) | GFX_LINE_MODE_CORRECT;
 #endif
+#endif
 
 	case GFX_RESOURCE_TYPE_FONT:
 	case GFX_RESOURCE_TYPE_CURSOR:

Modified: scummvm/trunk/engines/sci/gfx/gfx_resource.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_resource.h	2009-09-01 21:16:12 UTC (rev 43900)
+++ scummvm/trunk/engines/sci/gfx/gfx_resource.h	2009-09-01 21:24:09 UTC (rev 43901)
@@ -42,6 +42,8 @@
 namespace Sci {
 
 /*** Styles for pic0 drawing ***/
+// These are used for the now-disabled dithering code. Is it even used anywhere?
+#if 0
 /* Dithering modes */
 #define GFXR_DITHER_MODE_D16 0  /* Sierra SCI style */
 #define GFXR_DITHER_MODE_F256 1 /* Flat color interpolation */
@@ -50,6 +52,7 @@
 /* Dithering patterns */
 #define GFXR_DITHER_PATTERN_SCALED 0 /* Dither per pixel on the 320x200 grid */
 #define GFXR_DITHER_PATTERN_1 1      /* Dither per pixel on the target */
+#endif
 
 #define SCI_TITLEBAR_SIZE 10
 
@@ -244,6 +247,7 @@
  */
 void gfxr_remove_artifacts_pic0(gfxr_pic_t *dest, gfxr_pic_t *src);
 
+#if 0
 /**
  * Dithers a gfxr_visual_map.
  *
@@ -252,6 +256,7 @@
  * @param[in] pattern	One of GFXR_DITHER_PATTERN
  */
 void gfxr_dither_pic0(gfxr_pic_t *pic, int mode, int pattern);
+#endif
 
 /**
  * Calculates an EGA view.

Modified: scummvm/trunk/engines/sci/gfx/res_pic.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/res_pic.cpp	2009-09-01 21:16:12 UTC (rev 43900)
+++ scummvm/trunk/engines/sci/gfx/res_pic.cpp	2009-09-01 21:24:09 UTC (rev 43901)
@@ -1684,6 +1684,7 @@
 	gfxr_draw_pic01(pic, flags, default_palette, size - vector_data_ptr, resource + vector_data_ptr, style, resid, kViewVga11, static_pal, portBounds);
 }
 
+#if 0
 void gfxr_dither_pic0(gfxr_pic_t *pic, int dmode, int pattern) {
 	int xl = pic->visual_map->index_width;
 	int yl = pic->visual_map->index_height;
@@ -1736,5 +1737,6 @@
 		}
 	}
 }
+#endif
 
 } // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp	2009-09-01 21:16:12 UTC (rev 43900)
+++ scummvm/trunk/engines/sci/sci.cpp	2009-09-01 21:24:09 UTC (rev 43901)
@@ -171,8 +171,10 @@
 #ifdef CUSTOM_GRAPHICS_OPTIONS
 	gfx_options.buffer_pics_nr = 0;
 	gfx_options.pic0_unscaled = 1;
+#if 0
 	gfx_options.pic0_dither_mode = GFXR_DITHER_MODE_F256;
 	gfx_options.pic0_dither_pattern = GFXR_DITHER_PATTERN_SCALED;
+#endif
 	gfx_options.pic0_brush_mode = GFX_BRUSH_MODE_RANDOM_ELLIPSES;
 	gfx_options.pic0_line_mode = GFX_LINE_MODE_CORRECT;
 	gfx_options.cursor_xlate_filter = (gfx_xlate_filter_t)ConfMan.getInt("cursor_filter");


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list