aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2009-03-18 11:25:23 +0000
committerFilippos Karapetis2009-03-18 11:25:23 +0000
commitabc842b677fcc6f34e87af5aca3fc626f1552d16 (patch)
tree5d71a795766e16006b2d7de43f88af4ecde6de68
parentc9eff6e1f87231f63b3cd4a5dce4b04ffac96075 (diff)
downloadscummvm-rg350-abc842b677fcc6f34e87af5aca3fc626f1552d16.tar.gz
scummvm-rg350-abc842b677fcc6f34e87af5aca3fc626f1552d16.tar.bz2
scummvm-rg350-abc842b677fcc6f34e87af5aca3fc626f1552d16.zip
Slight cleanup
svn-id: r39514
-rw-r--r--engines/sci/gfx/gfx_res_options.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/engines/sci/gfx/gfx_res_options.cpp b/engines/sci/gfx/gfx_res_options.cpp
index 54fbc6b637..10bbac591d 100644
--- a/engines/sci/gfx/gfx_res_options.cpp
+++ b/engines/sci/gfx/gfx_res_options.cpp
@@ -112,14 +112,6 @@ static gfx_res_conf_t *find_match(gfx_res_conf_t *conflist, int type, int nr, in
return NULL;
}
-void apply_assign(gfx_res_assign_t *conf, gfx_pixmap_t *pxm) {
- if (pxm->palette)
- pxm->palette->free();
-
- pxm->palette = new Palette(conf->assign.palette.colors, conf->assign.palette.colors_nr);
- pxm->palette->name = "res";
-}
-
void apply_mod(gfx_res_mod_t *mod, gfx_pixmap_t *pxm) {
Palette *pal = pxm->palette;
int i, pal_size = pal ? pal->size() : 0;
@@ -177,8 +169,15 @@ int gfx_get_res_config(gfx_options_t *options, gfx_pixmap_t *pxm) {
conf = find_match(options->res_conf.assign[restype], restype, nr, loop, cel);
- if (conf)
- apply_assign(&(conf->conf.assign), pxm);
+ if (conf) {
+ // Assign palette
+ if (pxm->palette)
+ pxm->palette->free();
+
+ pxm->palette = new Palette(conf->conf.assign.assign.palette.colors,
+ conf->conf.assign.assign.palette.colors_nr);
+ pxm->palette->name = "res";
+ }
conf = options->res_conf.mod[restype];
while (conf) {