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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sat Jun 6 12:36:38 CEST 2009


Revision: 41215
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41215&view=rev
Author:   thebluegr
Date:     2009-06-06 10:36:38 +0000 (Sat, 06 Jun 2009)

Log Message:
-----------
Moved the fake 1x1 mode structure to gfx_resmgr.cpp (where it's actually used)

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

Modified: scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp	2009-06-06 10:21:48 UTC (rev 41214)
+++ scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp	2009-06-06 10:36:38 UTC (rev 41215)
@@ -307,7 +307,21 @@
 }
 #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;
 	IntResMap &resMap = _resourceMaps[GFX_RESOURCE_TYPE_PIC];
@@ -331,7 +345,7 @@
 			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) {

Modified: scummvm/trunk/engines/sci/gfx/gfx_resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_resource.cpp	2009-06-06 10:21:48 UTC (rev 41214)
+++ scummvm/trunk/engines/sci/gfx/gfx_resource.cpp	2009-06-06 10:36:38 UTC (rev 41215)
@@ -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;
 

Modified: scummvm/trunk/engines/sci/gfx/gfx_resource.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_resource.h	2009-06-06 10:21:48 UTC (rev 41214)
+++ scummvm/trunk/engines/sci/gfx/gfx_resource.h	2009-06-06 10:36:38 UTC (rev 41215)
@@ -122,12 +122,6 @@
 	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)


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