diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/gfx/gfx_res_options.cpp | 23 | ||||
-rw-r--r-- | engines/sci/gfx/gfx_res_options.h | 6 |
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; |