[Scummvm-cvs-logs] SF.net SVN: scummvm:[44375] scummvm/trunk/engines/kyra

athrxx at users.sourceforge.net athrxx at users.sourceforge.net
Sat Sep 26 15:17:13 CEST 2009


Revision: 44375
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44375&view=rev
Author:   athrxx
Date:     2009-09-26 13:17:11 +0000 (Sat, 26 Sep 2009)

Log Message:
-----------
LOL/PC-98: start fixing sequences (like broken arms inn and king richard getting poisoned)

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/lol.cpp
    scummvm/trunk/engines/kyra/scene_lol.cpp
    scummvm/trunk/engines/kyra/script_lol.cpp
    scummvm/trunk/engines/kyra/script_tim.cpp
    scummvm/trunk/engines/kyra/staticres.cpp
    scummvm/trunk/engines/kyra/text_lol.cpp

Modified: scummvm/trunk/engines/kyra/lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/lol.cpp	2009-09-26 09:31:05 UTC (rev 44374)
+++ scummvm/trunk/engines/kyra/lol.cpp	2009-09-26 13:17:11 UTC (rev 44375)
@@ -1568,9 +1568,15 @@
 		_fadeText = false;
 		int cp = _screen->setCurPage(pageNum);
 
-		_screen->fillRect(0, 128, 319, 199, 1);
-		gui_drawBox(0, 129, 320, 71, 136, 251, -1);
-		gui_drawBox(1, 130, 318, 69, 136, 251, 252);
+		if (_flags.use16ColorMode) {
+			_screen->fillRect(0, 128, 319, 199, 0x44);
+			gui_drawBox(0, 129, 320, 71, 0xee, 0xcc, -1);
+			gui_drawBox(1, 130, 318, 69, 0xee, 0xcc, 0x11);
+		} else {
+			_screen->fillRect(0, 128, 319, 199, 1);
+			gui_drawBox(0, 129, 320, 71, 136, 251, -1);
+			gui_drawBox(1, 130, 318, 69, 136, 251, 252);
+		}
 
 		_screen->modifyScreenDim(5, 8, 131, 304, 66);
 		_screen->modifyScreenDim(4, 1, 133, 38, 60);

Modified: scummvm/trunk/engines/kyra/scene_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/scene_lol.cpp	2009-09-26 09:31:05 UTC (rev 44374)
+++ scummvm/trunk/engines/kyra/scene_lol.cpp	2009-09-26 13:17:11 UTC (rev 44375)
@@ -1478,7 +1478,10 @@
 			initDialogueSequence(fieldType, 0);
 
 		if (fadeFlag) {
-			_screen->fadePalette(_screen->getPalette(3), 10);
+			if (_flags.use16ColorMode)
+				setPaletteBrightness(_screen->getPalette(0), _brightness, _lampEffect);
+			else
+				_screen->fadePalette(_screen->getPalette(3), 10);
 			_screen->_fadeFlag = 0;
 		}
 

Modified: scummvm/trunk/engines/kyra/script_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_lol.cpp	2009-09-26 09:31:05 UTC (rev 44374)
+++ scummvm/trunk/engines/kyra/script_lol.cpp	2009-09-26 13:17:11 UTC (rev 44375)
@@ -607,7 +607,10 @@
 
 int LoLEngine::olol_fadePalette(EMCState *script) {
 	debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_fadePalette(%p)", (const void *)script);
-	_screen->fadePalette(_screen->getPalette(3), 10);
+	if (_flags.use16ColorMode)
+		setPaletteBrightness(_screen->getPalette(0), _brightness, _lampEffect);
+	else
+		_screen->fadePalette(_screen->getPalette(3), 10);
 	_screen->_fadeFlag = 0;
 	return 1;
 }
@@ -1337,8 +1340,13 @@
 	char *str = getLangString(0x4033);
 	int w = _screen->getTextWidth(str);
 
-	gui_drawBox(x - offs - w, y - 9, w + offs, 9, 136, 251, 252);
-	_screen->printText(str, x - (offs >> 1) - w, y - 7, 144, 0);
+	if (_flags.use16ColorMode) {
+		gui_drawBox(x - offs - w, y - 9, w + offs, 9, 0xee, 0xcc, 0x11);
+		_screen->printText(str, x - (offs >> 1) - w, y - 7, 0xbb, 0);
+	} else {
+		gui_drawBox(x - offs - w, y - 9, w + offs, 9, 136, 251, 252);
+		_screen->printText(str, x - (offs >> 1) - w, y - 7, 144, 0);
+	}
 
 	if (stackPos(1))
 		_screen->drawGridBox(x - offs - w + 1, y - 8, w + offs - 2, 7, 1);

Modified: scummvm/trunk/engines/kyra/script_tim.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_tim.cpp	2009-09-26 09:31:05 UTC (rev 44374)
+++ scummvm/trunk/engines/kyra/script_tim.cpp	2009-09-26 13:17:11 UTC (rev 44375)
@@ -1176,7 +1176,7 @@
 		if (_vm->gameFlags().use16ColorMode) {
 			_vm->gui_drawBox(x, (_dialogueButtonPosY & ~7) - 1, 74, 10, 0xee, 0xcc, -1);
 			_screen->printText(_dialogueButtonString[i], (x + 37 - (_screen->getTextWidth(_dialogueButtonString[i])) / 2) & ~3,
-				(_dialogueButtonPosY & ~7) + 1, _dialogueHighlightedButton == i ? 0xc1 : 0xe1, 0);
+				(_dialogueButtonPosY + 2) & ~7, _dialogueHighlightedButton == i ? 0xc1 : 0xe1, 0);
 		} else {
 			_vm->gui_drawBox(x, _dialogueButtonPosY, 74, 9, 136, 251, -1);
 			_screen->printText(_dialogueButtonString[i], x + 37 - (_screen->getTextWidth(_dialogueButtonString[i])) / 2,
@@ -1193,10 +1193,11 @@
 	int df = _dialogueHighlightedButton;
 	int res = 0;
 	int x = _dialogueButtonPosX;
+	int y = (_vm->gameFlags().use16ColorMode ? (_dialogueButtonPosY & ~7) - 1 : _dialogueButtonPosY);
 
 	for (int i = 0; i < _dialogueNumButtons; i++) {
 		Common::Point p = _vm->getMousePos();
-		if (_vm->posWithinRect(p.x, p.y, x, _dialogueButtonPosY, x + 74, _dialogueButtonPosY + 9)) {
+		if (_vm->posWithinRect(p.x, p.y, x, y, x + 74, y + 9)) {
 			_dialogueHighlightedButton = i;
 			break;
 		}
@@ -1257,7 +1258,7 @@
 
 			for (int i = 0; i < _dialogueNumButtons; i++) {
 				Common::Point p = _vm->getMousePos();
-				if (_vm->posWithinRect(p.x, p.y, x, _dialogueButtonPosY, x + 74, _dialogueButtonPosY + 9)) {
+				if (_vm->posWithinRect(p.x, p.y, x, y, x + 74, y + 9)) {
 					_dialogueHighlightedButton = i;
 					res = _dialogueHighlightedButton + 1;
 					break;

Modified: scummvm/trunk/engines/kyra/staticres.cpp
===================================================================
--- scummvm/trunk/engines/kyra/staticres.cpp	2009-09-26 09:31:05 UTC (rev 44374)
+++ scummvm/trunk/engines/kyra/staticres.cpp	2009-09-26 13:17:11 UTC (rev 44375)
@@ -3299,11 +3299,11 @@
 	{ 0x0B, 0x7B, 0x1C, 0x11, 0x33, 0x11, 0x00, 0x00 },
 	{ 0x0B, 0x7B, 0x1C, 0x2D, 0x33, 0x11, 0x00, 0x00 },
 	{ 0x55, 0x7B, 0xE9, 0x37, 0x33, 0x11, 0x00, 0x00 },
-	{ 0x0B, 0x8C, 0x10, 0x2B, 0x33, 0x44, 0x00, 0x00 },	// Main menu box (4 entries)
-	{ 0x04, 0x59, 0x20, 0x3C, 0x00, 0x00, 0x00, 0x00 },
-	{ 0x05, 0x6E, 0x1E, 0x0C, 0x33, 0x44, 0x00, 0x00 },
-	{ 0x07, 0x19, 0x1A, 0x97, 0x00, 0x00, 0x00, 0x00 },
-	{ 0x03, 0x1E, 0x22, 0x8C, 0x00, 0x00, 0x00, 0x00 },
+	{ 0x0B, 0x92, 0x10, 0x2A, 0x33, 0x44, 0x00, 0x00 },	// Main menu box (4 entries)
+	{ 0x04, 0x58, 0x20, 0x3C, 0x00, 0x00, 0x00, 0x00 },
+	{ 0x05, 0x6C, 0x1E, 0x0D, 0x33, 0x44, 0x00, 0x00 },
+	{ 0x07, 0x20, 0x1A, 0x86, 0x00, 0x00, 0x00, 0x00 },
+	{ 0x03, 0x20, 0x22, 0x8C, 0x00, 0x00, 0x00, 0x00 },
 	{ 0x02, 0x48, 0x24, 0x34, 0x00, 0x00, 0x00, 0x00 },
 	{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
 	{ 0x0E, 0x00, 0x16, 0x78, 0x33, 0x44, 0x00, 0x00 },

Modified: scummvm/trunk/engines/kyra/text_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/text_lol.cpp	2009-09-26 09:31:05 UTC (rev 44374)
+++ scummvm/trunk/engines/kyra/text_lol.cpp	2009-09-26 13:17:11 UTC (rev 44375)
@@ -788,7 +788,12 @@
 void TextDisplayer_LoL::clearCurDim() {
 	int d = _screen->curDimIndex();
 	const ScreenDim *tmp = _screen->getScreenDim(_screen->curDimIndex());
-	_screen->fillRect(tmp->sx << 3, tmp->sy, ((tmp->sx + tmp->w) << 3) - 1, (tmp->sy + tmp->h) - 1, _textDimData[d].color2);
+	if (_vm->gameFlags().use16ColorMode) {
+		_screen->fillRect(tmp->sx << 3, tmp->sy, ((tmp->sx + tmp->w) << 3) - 2, (tmp->sy + tmp->h) - 2, _textDimData[d].color2);
+	} else {
+		_screen->fillRect(tmp->sx << 3, tmp->sy, ((tmp->sx + tmp->w) << 3) - 1, (tmp->sy + tmp->h) - 1, _textDimData[d].color2);
+	}	
+	
 	_lineCount = 0;
 	_textDimData[d].column = _textDimData[d].line = 0;
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list