aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Montoir2003-10-20 10:26:56 +0000
committerGregory Montoir2003-10-20 10:26:56 +0000
commit61a27e1b634ebb9f5cd1526c5816ebe5aa5103f9 (patch)
treea3ca94e7862732bf7499ff90dc2ee09ef688abb1
parent59f5854be2283c1f0bc138f7fa08f753bb47274e (diff)
downloadscummvm-rg350-61a27e1b634ebb9f5cd1526c5816ebe5aa5103f9.tar.gz
scummvm-rg350-61a27e1b634ebb9f5cd1526c5816ebe5aa5103f9.tar.bz2
scummvm-rg350-61a27e1b634ebb9f5cd1526c5816ebe5aa5103f9.zip
remaining palette stuff
svn-id: r10911
-rw-r--r--queen/display.cpp62
-rw-r--r--queen/display.h10
-rw-r--r--queen/xref.txt3
3 files changed, 73 insertions, 2 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
diff --git a/queen/display.h b/queen/display.h
index ee707b8d1b..df668cd4be 100644
--- a/queen/display.h
+++ b/queen/display.h
@@ -36,6 +36,12 @@ enum RenderingBuffer {
};
+enum JoePalette {
+ JP_CLOTHES = 0,
+ JP_DRESS = 1
+};
+
+
struct Dynalum {
uint8 msk[50 * 160];
int8 lum[8 * 3];
@@ -64,12 +70,14 @@ public:
void palConvert(uint8 *outPal, const uint8 *inPal, int start, int end);
void palSet(const uint8 *pal, int start, int end, bool updateScreen = false);
+ void palSetJoe(JoePalette pal); // changejoepal
void palFadeIn(int start, int end, uint16 roomNum);
void palFadeOut(int start, int end, uint16 roomNum);
void palFadePanel();
void palScroll(int start, int end);
void palCustomColors(uint16 roomNum); // check_colors
void palCustomScroll(uint16 roomNum); // check_pal_scroll
+ void palCustomFlash(); // flashspecial()
void screenMode(int comPanel, bool inCutaway);
@@ -132,6 +140,8 @@ private:
Dynalum _dynalum;
OSystem *_system;
+ static const uint8 PAL_JOE_CLOTHES[];
+ static const uint8 PAL_JOE_DRESS[];
};
diff --git a/queen/xref.txt b/queen/xref.txt
index 3f205d03cf..4a41b1b986 100644
--- a/queen/xref.txt
+++ b/queen/xref.txt
@@ -256,11 +256,12 @@ tseek() *not needed*
SCREEN
======
-changejoepal()
+changejoepal() Display::palSetJoe
check_colors() Display::palCustomColors
dynalum() Display::dynalumUpdate
fadein() Display::palFadeIn
fadeout() Display::palFadeOut
+flashspecial() Display::palCustomFlash
palscroll() Display::palScroll
putcharacter() TextRenderer::drawChar
setpal() Display::palSet