aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gfx
diff options
context:
space:
mode:
authorFilippos Karapetis2009-09-01 21:24:09 +0000
committerFilippos Karapetis2009-09-01 21:24:09 +0000
commitaace86a6eb701cc3d075bbaa066662a5c1395f53 (patch)
treebfa76b659073248679273c543d8ac570bcc9233a /engines/sci/gfx
parent20d93e494a15286e9f1b19f7e6814c7467b2d781 (diff)
downloadscummvm-rg350-aace86a6eb701cc3d075bbaa066662a5c1395f53.tar.gz
scummvm-rg350-aace86a6eb701cc3d075bbaa066662a5c1395f53.tar.bz2
scummvm-rg350-aace86a6eb701cc3d075bbaa066662a5c1395f53.zip
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
svn-id: r43901
Diffstat (limited to 'engines/sci/gfx')
-rw-r--r--engines/sci/gfx/gfx_options.h2
-rw-r--r--engines/sci/gfx/gfx_resmgr.cpp16
-rw-r--r--engines/sci/gfx/gfx_resource.h5
-rw-r--r--engines/sci/gfx/res_pic.cpp2
4 files changed, 22 insertions, 3 deletions
diff --git a/engines/sci/gfx/gfx_options.h b/engines/sci/gfx/gfx_options.h
index babd9654e3..ac8e700e5e 100644
--- a/engines/sci/gfx/gfx_options.h
+++ b/engines/sci/gfx/gfx_options.h
@@ -58,8 +58,10 @@ struct gfx_options_t {
/* 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;
diff --git a/engines/sci/gfx/gfx_resmgr.cpp b/engines/sci/gfx/gfx_resmgr.cpp
index e565543245..b6e13e2bd0 100644
--- a/engines/sci/gfx/gfx_resmgr.cpp
+++ b/engines/sci/gfx/gfx_resmgr.cpp
@@ -119,11 +119,13 @@ int GfxResManager::calculatePic(gfxr_pic_t *scaled_pic, gfxr_pic_t *unscaled_pic
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,14 +151,22 @@ int GfxResManager::getOptionsHash(gfx_resource_type_t type) {
// 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:
diff --git a/engines/sci/gfx/gfx_resource.h b/engines/sci/gfx/gfx_resource.h
index 35d7ef58d6..79fa955666 100644
--- a/engines/sci/gfx/gfx_resource.h
+++ b/engines/sci/gfx/gfx_resource.h
@@ -42,6 +42,8 @@ namespace Common {
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 @@ namespace Sci {
/* 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_draw_pic11(gfxr_pic_t *pic, int fill_normally,
*/
void gfxr_remove_artifacts_pic0(gfxr_pic_t *dest, gfxr_pic_t *src);
+#if 0
/**
* Dithers a gfxr_visual_map.
*
@@ -252,6 +256,7 @@ void gfxr_remove_artifacts_pic0(gfxr_pic_t *dest, gfxr_pic_t *src);
* @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.
diff --git a/engines/sci/gfx/res_pic.cpp b/engines/sci/gfx/res_pic.cpp
index 09b98d12aa..90f100a901 100644
--- a/engines/sci/gfx/res_pic.cpp
+++ b/engines/sci/gfx/res_pic.cpp
@@ -1684,6 +1684,7 @@ void gfxr_draw_pic11(gfxr_pic_t *pic, int flags, int default_palette, int size,
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 @@ void gfxr_dither_pic0(gfxr_pic_t *pic, int dmode, int pattern) {
}
}
}
+#endif
} // End of namespace Sci