aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2009-03-31 07:48:44 +0000
committerFilippos Karapetis2009-03-31 07:48:44 +0000
commit66de3bb9059a96485e877135f06c3ed8d574d825 (patch)
tree637fae47b6235fdc62ce55ea6db9d6d2582a7196 /engines
parentb08b0f64afbc6c697d3334f17284f132cef8cb51 (diff)
downloadscummvm-rg350-66de3bb9059a96485e877135f06c3ed8d574d825.tar.gz
scummvm-rg350-66de3bb9059a96485e877135f06c3ed8d574d825.tar.bz2
scummvm-rg350-66de3bb9059a96485e877135f06c3ed8d574d825.zip
Got rid of the gfx_res_mod_t struct
svn-id: r39771
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/gfx/gfx_res_options.cpp6
-rw-r--r--engines/sci/gfx/gfx_res_options.h9
2 files changed, 4 insertions, 11 deletions
diff --git a/engines/sci/gfx/gfx_res_options.cpp b/engines/sci/gfx/gfx_res_options.cpp
index 733faaf1c7..a1b96c6dc0 100644
--- a/engines/sci/gfx/gfx_res_options.cpp
+++ b/engines/sci/gfx/gfx_res_options.cpp
@@ -112,7 +112,7 @@ static gfx_res_conf_t *find_match(gfx_res_conf_t *conflist, int type, int nr, in
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 @@ void apply_mod(gfx_res_mod_t *mod, gfx_pixmap_t *pxm) {
#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 @@ int gfx_get_res_config(gfx_options_t *options, gfx_pixmap_t *pxm) {
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;
}
}
diff --git a/engines/sci/gfx/gfx_res_options.h b/engines/sci/gfx/gfx_res_options.h
index 25118f76bd..cc2979440e 100644
--- a/engines/sci/gfx/gfx_res_options.h
+++ b/engines/sci/gfx/gfx_res_options.h
@@ -51,13 +51,6 @@ struct gfx_res_assign_t {
/* 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 @@ struct gfx_res_conf_t {
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;