aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2009-06-06 10:36:38 +0000
committerFilippos Karapetis2009-06-06 10:36:38 +0000
commitbe414833733fb5754b11bb7777f9a8e1a0c168f4 (patch)
tree26797881b1097bb1c8d80e6c345169dd096814f9 /engines/sci
parent8033a391288de399abc80bd23e988d586fb871a5 (diff)
downloadscummvm-rg350-be414833733fb5754b11bb7777f9a8e1a0c168f4.tar.gz
scummvm-rg350-be414833733fb5754b11bb7777f9a8e1a0c168f4.tar.bz2
scummvm-rg350-be414833733fb5754b11bb7777f9a8e1a0c168f4.zip
Moved the fake 1x1 mode structure to gfx_resmgr.cpp (where it's actually used)
svn-id: r41215
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/gfx/gfx_resmgr.cpp16
-rw-r--r--engines/sci/gfx/gfx_resource.cpp11
-rw-r--r--engines/sci/gfx/gfx_resource.h6
3 files changed, 15 insertions, 18 deletions
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)