diff options
author | Gregory Montoir | 2003-10-20 10:26:56 +0000 |
---|---|---|
committer | Gregory Montoir | 2003-10-20 10:26:56 +0000 |
commit | 61a27e1b634ebb9f5cd1526c5816ebe5aa5103f9 (patch) | |
tree | a3ca94e7862732bf7499ff90dc2ee09ef688abb1 /queen/display.cpp | |
parent | 59f5854be2283c1f0bc138f7fa08f753bb47274e (diff) | |
download | scummvm-rg350-61a27e1b634ebb9f5cd1526c5816ebe5aa5103f9.tar.gz scummvm-rg350-61a27e1b634ebb9f5cd1526c5816ebe5aa5103f9.tar.bz2 scummvm-rg350-61a27e1b634ebb9f5cd1526c5816ebe5aa5103f9.zip |
remaining palette stuff
svn-id: r10911
Diffstat (limited to 'queen/display.cpp')
-rw-r--r-- | queen/display.cpp | 62 |
1 files changed, 61 insertions, 1 deletions
diff --git a/queen/display.cpp b/queen/display.cpp index 1dfc554e71..f11efd7fa5 100644 --- a/queen/display.cpp +++ b/queen/display.cpp @@ -217,6 +217,23 @@ void Display::palSet(const uint8 *pal, int start, int end, bool updateScreen) { } +void Display::palSetJoe(JoePalette pal) { + + const uint8 *palJoe = NULL; + switch (pal) { + case JP_CLOTHES: + palJoe = PAL_JOE_CLOTHES; + break; + case JP_DRESS: + palJoe = PAL_JOE_DRESS; + break; + } + memcpy(_pals.room + 144 * 3, palJoe, 16 * 3); + memcpy(_pals.screen + 144 * 3, palJoe, 16 * 3); + palSet(palJoe, 144, 159, true); +} + + void Display::palFadeIn(int start, int end, uint16 roomNum) { debug(9, "Display::palFadeIn(%d, %d)", start, end); @@ -295,7 +312,7 @@ void Display::palScroll(int start, int end) { uint8 g = *palEnd++; uint8 b = *palEnd; - // scroll palette entries to the right + // scroll palette entries to the left int n = (end - start) * 3; while (n--) { *palEnd = *(palEnd - 3); @@ -556,6 +573,29 @@ void Display::palCustomScroll(uint16 roomNum) { } +void Display::palCustomFlash() { + + uint8 tempPal[256 * 3]; + int i = 0; + while (i < 17 * 3) { + tempPal[i] = 255; + ++i; + } + while (i < 84 * 3) { + tempPal[i] = 0; + ++i; + } + while (i < 256 * 3) { + tempPal[i] = 255; + ++i; + } + // set flash palette + palSet(tempPal, 0, 255, true); + // restore original palette + palSet(_pals.screen, 0, 255, true); +} + + void Display::screenMode(int comPanel, bool inCutaway) { if (comPanel == 2 && inCutaway) { @@ -954,4 +994,24 @@ const uint8 TextRenderer::FONT[] = { }; +const uint8 Display::PAL_JOE_CLOTHES[] = { + 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x87, 0x87, 0x87, + 0xB0, 0xB0, 0xB0, 0xDA, 0xDA, 0xDA, 0x43, 0x34, 0x20, + 0x77, 0x33, 0x1F, 0xA3, 0x43, 0x27, 0x80, 0x45, 0x45, + 0x9E, 0x5D, 0x5B, 0xB9, 0x78, 0x75, 0xDF, 0x97, 0x91, + 0x17, 0x27, 0x63, 0x1F, 0x3F, 0x83, 0x27, 0x5B, 0xA7, + 0x98, 0xD4, 0xFF +}; + + +const uint8 Display::PAL_JOE_DRESS[] = { + 0x00, 0x00, 0x00, 0x50, 0x50, 0x50, 0x70, 0x70, 0x70, + 0x90, 0x90, 0x90, 0xC6, 0xC6, 0xC6, 0xFF, 0xFF, 0xFF, + 0x30, 0x30, 0x90, 0x47, 0x49, 0xD0, 0x40, 0x24, 0x00, + 0x79, 0x34, 0x0B, 0xB2, 0x3D, 0x22, 0xED, 0x42, 0x42, + 0x80, 0x45, 0x45, 0xA3, 0x5F, 0x5F, 0xC8, 0x7C, 0x7C, + 0xEC, 0x9C, 0x9C +}; + + } // End of namespace Queen |