diff options
author | Martin Kiewitz | 2009-10-06 16:14:40 +0000 |
---|---|---|
committer | Martin Kiewitz | 2009-10-06 16:14:40 +0000 |
commit | 14dfa5d7b01fba21c3da100830febbcdd1532d8c (patch) | |
tree | aaea4035a41e5b979178fa3220aaf5d780a365e9 /engines/sci/gui/gui_helpers.h | |
parent | 855af31757d20ace18f8b96c09d44571aacc049b (diff) | |
download | scummvm-rg350-14dfa5d7b01fba21c3da100830febbcdd1532d8c.tar.gz scummvm-rg350-14dfa5d7b01fba21c3da100830febbcdd1532d8c.tar.bz2 scummvm-rg350-14dfa5d7b01fba21c3da100830febbcdd1532d8c.zip |
SCI/newgui: palette functions from SciGuiGfx now in SciGuiPalette
svn-id: r44698
Diffstat (limited to 'engines/sci/gui/gui_helpers.h')
-rw-r--r-- | engines/sci/gui/gui_helpers.h | 53 |
1 files changed, 6 insertions, 47 deletions
diff --git a/engines/sci/gui/gui_helpers.h b/engines/sci/gui/gui_helpers.h index ed66705976..4f97c73484 100644 --- a/engines/sci/gui/gui_helpers.h +++ b/engines/sci/gui/gui_helpers.h @@ -71,6 +71,12 @@ struct GuiWindow : public GuiPort { } }; +struct GuiAnimateList { + reg_t address; + int16 y; + int16 z; +}; + struct GuiCast { uint16 view; uint16 loop; @@ -108,53 +114,6 @@ enum { GFX_REMOVEVIEW = 0x80 }; -#define SCI_PAL_FORMAT_CONSTANT 1 -#define SCI_PAL_FORMAT_VARIABLE 0 - -static inline void CreatePaletteFromData(byte *data, GuiPalette *paletteOut) { - int palFormat = 0; - int palOffset = 0; - int palColorStart = 0; - int palColorCount = 0; - int colorNo = 0; - - memset(paletteOut, 0, sizeof(GuiPalette)); - // Setup default mapping - for (colorNo = 0; colorNo < 256; colorNo++) { - paletteOut->mapping[colorNo] = colorNo; - } - if (data[0] == 0 && data[1] == 1) { - // SCI0/SCI1 palette - palFormat = SCI_PAL_FORMAT_VARIABLE; // CONSTANT; - palOffset = 260; - palColorStart = 0; palColorCount = 256; - //memcpy(&paletteOut->mapping, data, 256); - } else { - // SCI1.1 palette - palFormat = data[32]; - palOffset = 37; - palColorStart = READ_LE_UINT16(data + 25); palColorCount = READ_LE_UINT16(data + 29); - } - switch (palFormat) { - case SCI_PAL_FORMAT_CONSTANT: - for (colorNo = palColorStart; colorNo < palColorStart + palColorCount; colorNo++) { - paletteOut->colors[colorNo].used = 1; - paletteOut->colors[colorNo].r = data[palOffset++]; - paletteOut->colors[colorNo].g = data[palOffset++]; - paletteOut->colors[colorNo].b = data[palOffset++]; - } - break; - case SCI_PAL_FORMAT_VARIABLE: - for (colorNo = palColorStart; colorNo < palColorStart + palColorCount; colorNo++) { - paletteOut->colors[colorNo].used = data[palOffset++]; - paletteOut->colors[colorNo].r = data[palOffset++]; - paletteOut->colors[colorNo].g = data[palOffset++]; - paletteOut->colors[colorNo].b = data[palOffset++]; - } - break; - } -} - } // End of namespace Sci #endif |