diff options
author | Willem Jan Palenstijn | 2009-05-27 22:41:14 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2009-05-27 22:41:14 +0000 |
commit | 0b8412bcfe1f8089a34d0293d466e40f2976a896 (patch) | |
tree | 03c1f985356e4330e20786a757f2a51e8f36aaf4 /engines | |
parent | 1dde062e2a62a6f4a173d2e4fe840d09400a4b4f (diff) | |
download | scummvm-rg350-0b8412bcfe1f8089a34d0293d466e40f2976a896.tar.gz scummvm-rg350-0b8412bcfe1f8089a34d0293d466e40f2976a896.tar.bz2 scummvm-rg350-0b8412bcfe1f8089a34d0293d466e40f2976a896.zip |
SCI: Make standard EGA palette a part of gfx_sci0_pic_colors.
This fixes regressions in at least SQ3 and Iceman from r40870
svn-id: r40952
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/gfx/res_pic.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/sci/gfx/res_pic.cpp b/engines/sci/gfx/res_pic.cpp index d72afc9700..274cd68754 100644 --- a/engines/sci/gfx/res_pic.cpp +++ b/engines/sci/gfx/res_pic.cpp @@ -123,7 +123,13 @@ void gfxr_init_static_palette() { if (!gfx_sci0_pic_colors) { gfx_sci0_pic_colors = new Palette(256); gfx_sci0_pic_colors->name = "gfx_sci0_pic_colors"; - for (int i = 0; i < 256; i++) { + // TODO: Discover the exact purpose of gfx_sci0_pic_colors + // For now, we set the first 16 colours to the standard EGA palette, + // and fill the remaining entries with slight variations + for (int i = 0; i < 16; i++) { + gfx_sci0_pic_colors->setColor(i,gfx_sci0_image_colors[0][i].r, gfx_sci0_image_colors[0][i].g, gfx_sci0_image_colors[0][i].b); + } + for (int i = 16; i < 256; i++) { byte r = INTERCOL(gfx_sci0_image_colors[sci0_palette][i & 0xf].r, gfx_sci0_image_colors[sci0_palette][i >> 4].r); byte g = INTERCOL(gfx_sci0_image_colors[sci0_palette][i & 0xf].g, |