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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Tue Mar 31 09:48:44 CEST 2009


Revision: 39771
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39771&view=rev
Author:   thebluegr
Date:     2009-03-31 07:48:44 +0000 (Tue, 31 Mar 2009)

Log Message:
-----------
Got rid of the gfx_res_mod_t struct

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

Modified: scummvm/trunk/engines/sci/gfx/gfx_res_options.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_res_options.cpp	2009-03-31 06:49:44 UTC (rev 39770)
+++ scummvm/trunk/engines/sci/gfx/gfx_res_options.cpp	2009-03-31 07:48:44 UTC (rev 39771)
@@ -112,7 +112,7 @@
 	return NULL;
 }
 
-void apply_mod(gfx_res_mod_t *mod, gfx_pixmap_t *pxm) {
+void apply_mod(byte *factor, gfx_pixmap_t *pxm) {
 	Palette *pal = pxm->palette;
 	int i, pal_size = pal ? pal->size() : 0;
 
@@ -128,7 +128,7 @@
 
 #define UPDATE_COL(nm, idx)                        \
 		v = nm;             \
-		v *= mod->mod.factor[idx]; \
+		v *= factor[idx]; \
 		v >>= 4;                   \
 		nm = (v > 255)? 255 : v;
 
@@ -174,7 +174,7 @@
 	while (conf) {
 		conf = find_match(conf, restype, nr, loop, cel);
 		if (conf) {
-			apply_mod(&(conf->conf.mod), pxm);
+			apply_mod(conf->conf.factor, pxm);
 			conf = conf->next;
 		}
 	}

Modified: scummvm/trunk/engines/sci/gfx/gfx_res_options.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_res_options.h	2009-03-31 06:49:44 UTC (rev 39770)
+++ scummvm/trunk/engines/sci/gfx/gfx_res_options.h	2009-03-31 07:48:44 UTC (rev 39771)
@@ -51,13 +51,6 @@
 
 /* GFX resource modifications */
 
-struct gfx_res_mod_t {
-	union {
-		byte factor[3]; /* divide by 16 to retrieve factor */
-	} mod;
-};
-
-
 struct gfx_res_conf_t {
 	int type; /* Resource type-- only one allowed */
 
@@ -71,7 +64,7 @@
 
 	union {
 		gfx_res_assign_t assign;
-		gfx_res_mod_t mod;
+		byte factor[3]; /* divide by 16 to retrieve factor */
 	} conf; /* The actual configuration */
 
 	gfx_res_conf_t *next;


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