From be414833733fb5754b11bb7777f9a8e1a0c168f4 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 6 Jun 2009 10:36:38 +0000 Subject: Moved the fake 1x1 mode structure to gfx_resmgr.cpp (where it's actually used) svn-id: r41215 --- engines/sci/gfx/gfx_resmgr.cpp | 16 +++++++++++++++- engines/sci/gfx/gfx_resource.cpp | 11 ----------- engines/sci/gfx/gfx_resource.h | 6 ------ 3 files changed, 15 insertions(+), 18 deletions(-) (limited to 'engines/sci') diff --git a/engines/sci/gfx/gfx_resmgr.cpp b/engines/sci/gfx/gfx_resmgr.cpp index bd880ed3f1..c5269bc544 100644 --- a/engines/sci/gfx/gfx_resmgr.cpp +++ b/engines/sci/gfx/gfx_resmgr.cpp @@ -307,6 +307,20 @@ static gfxr_pic_t *gfxr_pic_xlate_common(gfx_resource_t *res, int maps, int scal } #undef XLATE_AS_APPROPRIATE +/* unscaled color index mode: Used in addition to a scaled mode +** to render the pic resource twice. +*/ +// FIXME: this is an ugly hack. Perhaps we could do it some other way? +gfx_mode_t mode_1x1_color_index = { /* Fake 1x1 mode */ + /* xfact */ 1, /* yfact */ 1, + /* xsize */ 1, /* ysize */ 1, + /* bytespp */ 1, + /* flags */ 0, + /* palette */ NULL, + + /* color masks */ 0, 0, 0, 0, + /* color shifts */ 0, 0, 0, 0 +}; gfxr_pic_t *GfxResManager::getPic(int num, int maps, int flags, int default_palette, bool scaled) { gfxr_pic_t *npic = NULL; @@ -331,7 +345,7 @@ gfxr_pic_t *GfxResManager::getPic(int num, int maps, int flags, int default_pale pic = gfxr_init_pic(_driver->getMode(), GFXR_RES_ID(GFX_RESOURCE_TYPE_PIC, num), _version >= SCI_VERSION_01_VGA); #else need_unscaled = 0; - pic = gfxr_init_pic(&mode_1x1_color_index, GFXR_RES_ID(GFX_RESOURCE_TYPE_PIC, num), _version >= SCI_VERSION_01_VGA); + pic = gfxr_init_pic(_driver->getMode(), GFXR_RES_ID(GFX_RESOURCE_TYPE_PIC, num), _version >= SCI_VERSION_01_VGA); #endif if (!pic) { diff --git a/engines/sci/gfx/gfx_resource.cpp b/engines/sci/gfx/gfx_resource.cpp index 59170ec4fa..4eae7942c5 100644 --- a/engines/sci/gfx/gfx_resource.cpp +++ b/engines/sci/gfx/gfx_resource.cpp @@ -29,17 +29,6 @@ namespace Sci { -gfx_mode_t mode_1x1_color_index = { /* Fake 1x1 mode */ - /* xfact */ 1, /* yfact */ 1, - /* bytespp */ 1, - /* flags */ 0, - /* palette */ NULL, - - /* color masks */ 0, 0, 0, 0, - /* color shifts */ 0, 0, 0, 0 -}; - - static void gfxr_free_loop(gfxr_loop_t *loop) { int i; diff --git a/engines/sci/gfx/gfx_resource.h b/engines/sci/gfx/gfx_resource.h index fb05975dc0..8ce4a8ea83 100644 --- a/engines/sci/gfx/gfx_resource.h +++ b/engines/sci/gfx/gfx_resource.h @@ -122,12 +122,6 @@ struct gfxr_view_t { int translation[GFX_SCI0_IMAGE_COLORS_NR]; }; - -/* unscaled color index mode: Used in addition to a scaled mode -** to render the pic resource twice. See gfxr_remove_artifacts_pic0(). -*/ -extern gfx_mode_t mode_1x1_color_index; - void gfxr_init_static_palette(); /* Initializes the static 256 color palette ** Parameters: (void) -- cgit v1.2.3