aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2009-03-21 16:42:45 +0000
committerFilippos Karapetis2009-03-21 16:42:45 +0000
commit2ea883adb250c2ddee3d994f86558b6792ca0eb6 (patch)
tree675c1e89d584f7bdc0a802f4f80b8c8a6393c3ad
parenta8672bc492c67ce034d5f59242a7d759380d82db (diff)
downloadscummvm-rg350-2ea883adb250c2ddee3d994f86558b6792ca0eb6.tar.gz
scummvm-rg350-2ea883adb250c2ddee3d994f86558b6792ca0eb6.tar.bz2
scummvm-rg350-2ea883adb250c2ddee3d994f86558b6792ca0eb6.zip
Cleanup
svn-id: r39593
-rw-r--r--engines/sci/gfx/gfx_res_options.cpp23
-rw-r--r--engines/sci/gfx/gfx_res_options.h6
2 files changed, 7 insertions, 22 deletions
diff --git a/engines/sci/gfx/gfx_res_options.cpp b/engines/sci/gfx/gfx_res_options.cpp
index 10bbac591d..733faaf1c7 100644
--- a/engines/sci/gfx/gfx_res_options.cpp
+++ b/engines/sci/gfx/gfx_res_options.cpp
@@ -123,11 +123,8 @@ void apply_mod(gfx_res_mod_t *mod, gfx_pixmap_t *pxm) {
pxm->palette = pal;
}
- switch (mod->type) {
-
- case GFX_RES_MULTIPLY_FIXED: {
- for (i = 0; i < pal_size; i++) {
- int v;
+ for (i = 0; i < pal_size; i++) {
+ int v;
#define UPDATE_COL(nm, idx) \
v = nm; \
@@ -135,19 +132,13 @@ void apply_mod(gfx_res_mod_t *mod, gfx_pixmap_t *pxm) {
v >>= 4; \
nm = (v > 255)? 255 : v;
- PaletteEntry c = pal->getColor(i);
- UPDATE_COL(c.r, 0);
- UPDATE_COL(c.g, 1);
- UPDATE_COL(c.b, 2);
- pal->setColor(i, c.r, c.g, c.b);
+ PaletteEntry c = pal->getColor(i);
+ UPDATE_COL(c.r, 0);
+ UPDATE_COL(c.g, 1);
+ UPDATE_COL(c.b, 2);
+ pal->setColor(i, c.r, c.g, c.b);
#undef UPDATE_COL
- }
- break;
- }
-
- default:
- GFXERROR("Using unexpected visual resource modifier %d\n", mod->type);
}
}
diff --git a/engines/sci/gfx/gfx_res_options.h b/engines/sci/gfx/gfx_res_options.h
index 7cf4071a10..25118f76bd 100644
--- a/engines/sci/gfx/gfx_res_options.h
+++ b/engines/sci/gfx/gfx_res_options.h
@@ -40,8 +40,6 @@ struct gfx_res_pattern_t {
/* GFX resource assignments */
struct gfx_res_assign_t {
- short type; /* GFX_RES_ASSIGN_TYPE_* */
-
union {
struct {
int colors_nr;
@@ -53,11 +51,7 @@ struct gfx_res_assign_t {
/* GFX resource modifications */
-#define GFX_RES_MULTIPLY_FIXED 0 /* Linear palette update */
-
struct gfx_res_mod_t {
- short type; /* GFX_RES_ASSIGN_TYPE_* */
-
union {
byte factor[3]; /* divide by 16 to retrieve factor */
} mod;