[Scummvm-cvs-logs] CVS: scummvm/queen display.h,1.5,1.6 display.cpp,1.8,1.9 xref.txt,1.12,1.13

Gregory Montoir cyx at users.sourceforge.net
Mon Oct 20 03:29:11 CEST 2003


Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv591

Modified Files:
	display.h display.cpp xref.txt 
Log Message:
remaining palette stuff

Index: display.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/display.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- display.h	18 Oct 2003 14:01:43 -0000	1.5
+++ display.h	20 Oct 2003 10:26:56 -0000	1.6
@@ -36,6 +36,12 @@
 };
 
 
+enum JoePalette {
+	JP_CLOTHES = 0,
+	JP_DRESS   = 1
+};
+
+
 struct Dynalum {
 	uint8 msk[50 * 160];
 	int8 lum[8 * 3];
@@ -64,12 +70,14 @@
 
 	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 @@
 	Dynalum _dynalum;
 	OSystem *_system;
 
+	static const uint8 PAL_JOE_CLOTHES[];
+	static const uint8 PAL_JOE_DRESS[];
 };
 
 

Index: display.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/display.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- display.cpp	18 Oct 2003 14:01:43 -0000	1.8
+++ display.cpp	20 Oct 2003 10:26:56 -0000	1.9
@@ -217,6 +217,23 @@
 }
 
 
+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 @@
 	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::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) {
@@ -951,6 +991,26 @@
 	0x66, 0x66, 0x3E, 0x00, 0x0C, 0x18, 0x00, 0x66, 0x66, 0x3C, 
 	0x18, 0x30, 0x60, 0x60, 0x7C, 0x66, 0x66, 0x7C, 0x60, 0x60, 
 	0x00, 0x66, 0x00, 0x66, 0x66, 0x3C, 0x18, 0x30, 0xFF 
+};
+
+
+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
 };
 
 

Index: xref.txt
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/xref.txt,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- xref.txt	18 Oct 2003 12:18:43 -0000	1.12
+++ xref.txt	20 Oct 2003 10:26:56 -0000	1.13
@@ -256,11 +256,12 @@
 
 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





More information about the Scummvm-git-logs mailing list