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

athrxx at users.sourceforge.net athrxx at users.sourceforge.net
Sat Sep 26 20:25:38 CEST 2009


Revision: 44380
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44380&view=rev
Author:   athrxx
Date:     2009-09-26 18:25:36 +0000 (Sat, 26 Sep 2009)

Log Message:
-----------
LOL/PC-98: more fixes for text displayer and character inventory

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/gui_lol.cpp
    scummvm/trunk/engines/kyra/lol.cpp
    scummvm/trunk/engines/kyra/screen_lol.cpp
    scummvm/trunk/engines/kyra/script_lol.cpp
    scummvm/trunk/engines/kyra/script_tim.cpp
    scummvm/trunk/engines/kyra/text_lol.cpp

Modified: scummvm/trunk/engines/kyra/gui_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui_lol.cpp	2009-09-26 16:03:16 UTC (rev 44379)
+++ scummvm/trunk/engines/kyra/gui_lol.cpp	2009-09-26 18:25:36 UTC (rev 44380)
@@ -165,14 +165,17 @@
 	_screen->copyRegion(80, 143, 80, 143, 232, 35, 0, 2);
 	gui_drawAllCharPortraitsWithStats();
 
-	_screen->fprintString("%s", 157, 9, 254, 0, 5, l->name);
+	if (_flags.use16ColorMode)
+		_screen->fprintString("%s", 156, 8, 0xe1, 0, 1, l->name);
+	else
+		_screen->fprintString("%s", 157, 9, 254, 0, 5, l->name);
 
 	gui_printCharInventoryStats(charNum);
 
 	for (int i = 0; i < 11; i++)
 		gui_drawCharInventoryItem(i);
 
-	_screen->fprintString("%s", 182, 103, 172, 0, 5, getLangString(0x4033));
+	_screen->fprintString("%s", 182, 103, _flags.use16ColorMode ? 0xbb : 172, 0, 5, getLangString(0x4033));
 
 	static const uint16 statusFlags[] = { 0x0080, 0x0000, 0x1000, 0x0002, 0x100, 0x0001, 0x0000, 0x0000 };
 
@@ -203,8 +206,11 @@
 			if (c && !b)
 				b = 1;
 		}
-
-		gui_drawBarGraph(154, 64 + i * 10, 34, 5, b, e, 132, 0);
+		
+		if (_flags.use16ColorMode)
+			gui_drawBarGraph(154, 66 + i * 8, 34, 5, b, e, 0x88, 0);
+		else
+			gui_drawBarGraph(154, 64 + i * 10, 34, 5, b, e, 132, 0);
 	}
 
 	_screen->drawClippedLine(14, 120, 194, 120, 1);
@@ -229,23 +235,38 @@
 	if (index < 2) {
 		// might
 		// protection
-		y = index * 10 + 22;
-		col = 158;
-		if (redraw)
-			_screen->fprintString("%s", offs + 108, y, col, 0, 4, getLangString(0x4014 + index));
+		if (_flags.use16ColorMode) {
+			y = (index + 2) << 3;
+			col = 0xa1;
+			if (redraw)
+				_screen->fprintString("%s", offs + 108, y, col, 0, 0, getLangString(0x4014 + index));
+		} else {
+			y = index * 10 + 22;
+			col = 158;
+			if (redraw)
+				_screen->fprintString("%s", offs + 108, y, col, 0, 4, getLangString(0x4014 + index));
+		}		
 	} else {
 		//skills
 		int s = index - 2;
 		y = s * 10 + 62;
-		col = _characters[_selectedCharacter].flags & (0x200 << s) ? 254 : 180;
-		if (redraw)
-			_screen->fprintString("%s", offs + 108, y, col, 0, 4, getLangString(0x4014 + index));
+		if (_flags.use16ColorMode) {
+			y = (s + 8) << 3;
+			col = _characters[_selectedCharacter].flags & (0x200 << s) ? 0xe1 : 0x81;
+			if (redraw)
+				_screen->fprintString("%s", offs + 108, y, col, 0, 0, getLangString(0x4014 + index));
+		} else {
+			y = s * 10 + 62;
+			col = _characters[_selectedCharacter].flags & (0x200 << s) ? 254 : 180;
+			if (redraw)
+				_screen->fprintString("%s", offs + 108, y, col, 0, 4, getLangString(0x4014 + index));
+		}
 	}
 
 	if (offs)
 		_screen->copyRegion(294, y, 182 + offs, y, 18, 8, 6, _screen->_curPage, Screen::CR_NO_P_CHECK);
 
-	_screen->fprintString("%d", 200 + offs, y, col, 0, 6, value);
+	_screen->fprintString("%d", 200 + offs, y, col, 0, _flags.use16ColorMode ? 2 : 6, value);
 }
 
 void LoLEngine::gui_changeCharacterStats(int charNum) {

Modified: scummvm/trunk/engines/kyra/lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/lol.cpp	2009-09-26 16:03:16 UTC (rev 44379)
+++ scummvm/trunk/engines/kyra/lol.cpp	2009-09-26 18:25:36 UTC (rev 44380)
@@ -1578,7 +1578,7 @@
 			gui_drawBox(1, 130, 318, 69, 136, 251, 252);
 		}
 
-		_screen->modifyScreenDim(5, 8, 131, 304, 66);
+		_screen->modifyScreenDim(5, 8, 131, 306, 66);
 		_screen->modifyScreenDim(4, 1, 133, 38, 60);
 		_txt->clearDim(4);
 
@@ -1623,7 +1623,7 @@
 		_updateFlags &= 0xfffd;
 	} else {
 		const ScreenDim *d = _screen->getScreenDim(5);
-		_screen->fillRect(d->sx, d->sy, d->sx + d->w - 2, d->sy + d->h - 2, d->unkA);
+		_screen->fillRect(d->sx, d->sy, d->sx + d->w - (_flags.use16ColorMode ? 3 : 2), d->sy + d->h - 2, d->unkA);
 		_txt->clearDim(4);
 		_txt->setupField(false);
 	}

Modified: scummvm/trunk/engines/kyra/screen_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen_lol.cpp	2009-09-26 16:03:16 UTC (rev 44379)
+++ scummvm/trunk/engines/kyra/screen_lol.cpp	2009-09-26 18:25:36 UTC (rev 44380)
@@ -108,14 +108,21 @@
 	if (flags & 2)
 		x -= getTextWidth(string);
 
-	if (flags & 4) {
-		printText(string, x - 1, y, 1, col2);
-		printText(string, x, y + 1, 1, col2);
-	}
+	if (_use16ColorMode) {
+		if (flags & 12) {
+			printText(string, x - 1, y, 0x44, col2);
+			printText(string, x, y + 1, 0x44, col2);
+		}
+	} else {
+		if (flags & 4) {
+			printText(string, x - 1, y, 1, col2);
+			printText(string, x, y + 1, 1, col2);
+		}
 
-	if (flags & 8) {
-		printText(string, x - 1, y, 227, col2);
-		printText(string, x, y + 1, 227, col2);
+		if (flags & 8) {
+			printText(string, x - 1, y, 227, col2);
+			printText(string, x, y + 1, 227, col2);
+		}
 	}
 
 	printText(string, x, y, col1, col2);

Modified: scummvm/trunk/engines/kyra/script_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_lol.cpp	2009-09-26 16:03:16 UTC (rev 44379)
+++ scummvm/trunk/engines/kyra/script_lol.cpp	2009-09-26 18:25:36 UTC (rev 44380)
@@ -580,7 +580,7 @@
 
 	_screen->setScreenDim(5);
 	const ScreenDim *d = _screen->getScreenDim(5);
-	_screen->fillRect(d->sx, d->sy, d->sx + d->w - 2, d->sy + d->h - 2, d->unkA);
+	_screen->fillRect(d->sx, d->sy, d->sx + d->w - (_flags.use16ColorMode ? 3 : 2), d->sy + d->h - 2, d->unkA);
 	_txt->clearDim(4);
 	_txt->resetDimTextPositions(4);
 
@@ -616,7 +616,7 @@
 }
 
 int LoLEngine::olol_loadBitmap(EMCState *script) {
-	debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_clearDialogueField(%p) (%s, %d)", (const void *)script, stackPosString(0), stackPos(1));
+	debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_loadBitmap(%p) (%s, %d)", (const void *)script, stackPosString(0), stackPos(1));
 	_screen->loadBitmap(stackPosString(0), 3, 3, &_screen->getPalette(3));
 	if (stackPos(1) != 2)
 		_screen->copyPage(3, stackPos(1));
@@ -2540,7 +2540,7 @@
 		return 1;
 	_screen->setScreenDim(5);
 	const ScreenDim *d = _screen->_curDim;
-	_screen->fillRect(d->sx, d->sy, d->sx + d->w - 2, d->sy + d->h - 2, d->unkA);
+	_screen->fillRect(d->sx, d->sy, d->sx + d->w - (_flags.use16ColorMode ? 3 : 2), d->sy + d->h - 2, d->unkA);
 	_txt->clearDim(4);
 	_txt->resetDimTextPositions(4);
 	return 1;

Modified: scummvm/trunk/engines/kyra/script_tim.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_tim.cpp	2009-09-26 16:03:16 UTC (rev 44379)
+++ scummvm/trunk/engines/kyra/script_tim.cpp	2009-09-26 18:25:36 UTC (rev 44380)
@@ -1288,7 +1288,7 @@
 		_screen->fillRect(d->sx, d->sy + d->h - 9, d->sx + d->w - 1, d->sy + d->h - 1, d->unkA);
 	} else {
 		const ScreenDim *d = _screen->_curDim;
-		_screen->fillRect(d->sx, d->sy, d->sx + d->w - 2, d->sy + d->h - 1, d->unkA);
+		_screen->fillRect(d->sx, d->sy, d->sx + d->w - (_vm->gameFlags().use16ColorMode ? 3 : 2), d->sy + d->h - 1, d->unkA);
 		_vm->_txt->clearDim(4);
 		_vm->_txt->resetDimTextPositions(4);
 	}

Modified: scummvm/trunk/engines/kyra/text_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/text_lol.cpp	2009-09-26 16:03:16 UTC (rev 44379)
+++ scummvm/trunk/engines/kyra/text_lol.cpp	2009-09-26 18:25:36 UTC (rev 44380)
@@ -787,12 +787,11 @@
 
 void TextDisplayer_LoL::clearCurDim() {
 	int d = _screen->curDimIndex();
-	const ScreenDim *tmp = _screen->getScreenDim(_screen->curDimIndex());
+	const ScreenDim *tmp = _screen->getScreenDim(d);
 	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 {
+	} 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