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

athrxx at users.sourceforge.net athrxx at users.sourceforge.net
Wed Sep 30 22:42:58 CEST 2009


Revision: 44498
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44498&view=rev
Author:   athrxx
Date:     2009-09-30 20:42:58 +0000 (Wed, 30 Sep 2009)

Log Message:
-----------
LOL/PC-98: - fix spell effect colors
- fix some font color glitches

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/gui_lol.cpp
    scummvm/trunk/engines/kyra/lol.cpp

Modified: scummvm/trunk/engines/kyra/gui_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui_lol.cpp	2009-09-30 19:44:03 UTC (rev 44497)
+++ scummvm/trunk/engines/kyra/gui_lol.cpp	2009-09-30 20:42:58 UTC (rev 44498)
@@ -266,7 +266,14 @@
 	if (offs)
 		_screen->copyRegion(294, y, 182 + offs, y, 18, 8, 6, _screen->_curPage, Screen::CR_NO_P_CHECK);
 
+	Screen::FontId of;
+	if (_flags.use16ColorMode)
+		of = _screen->setFont(Screen::FID_SJIS_FNT);
+
 	_screen->fprintString("%d", 200 + offs, y, col, 0, _flags.use16ColorMode ? 2 : 6, value);
+
+	if (_flags.use16ColorMode)
+		_screen->setFont(of);
 }
 
 void LoLEngine::gui_changeCharacterStats(int charNum) {
@@ -2465,7 +2472,10 @@
 			int my = d->sy - 1;
 			int mw = (d->w << 3) + 1;
 			int mh = d->h + 1;
-			_screen->drawShadedBox(mx, my, mx + mw, my + mh, 227, 223);
+			if (_vm->gameFlags().use16ColorMode)
+				_screen->drawShadedBox(mx, my, mx + mw, my + mh, 0xdd, 0xff);
+			else
+				_screen->drawShadedBox(mx, my, mx + mw, my + mh, 227, 223);
 			int pg = _screen->setCurPage(0);
 			_vm->_txt->clearDim(8);
 			textCursorTimer = 0;
@@ -2581,7 +2591,13 @@
 }
 
 void GUI_LoL::printMenuText(const char *str, int x, int y, uint8 c0, uint8 c1, uint8 flags, Screen::FontId font) {
-	_screen->fprintString("%s", x, y, c0, c1, _vm->gameFlags().use16ColorMode ? flags & 3 : flags, str);
+	if (_vm->gameFlags().use16ColorMode) {
+		Screen::FontId of = _screen->setFont(Screen::FID_SJIS_FNT);
+		_screen->fprintString("%s", x, y, c0, c1, flags & 3, str);
+		_screen->setFont(of);
+	} else {
+		_screen->fprintString("%s", x, y, c0, c1, flags, str);
+	}	
 }
 
 int GUI_LoL::getMenuCenterStringX(const char *str, int x1, int x2) {

Modified: scummvm/trunk/engines/kyra/lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/lol.cpp	2009-09-30 19:44:03 UTC (rev 44497)
+++ scummvm/trunk/engines/kyra/lol.cpp	2009-09-30 20:42:58 UTC (rev 44498)
@@ -1754,10 +1754,22 @@
 	if (_flags.isTalkie || _loadSuppFilesFlag)
 		return;
 
+	Palette tpal(256);
 	if (_flags.use16ColorMode) {
+		static const uint8 colTbl[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F };
+		uint8 *p = _screen->getPalette(0).getData();
+	
+		tpal.fill(0, 256, 0xff);
+		uint8 *d = tpal.getData();
+		for (int i = 15; i >= 0; i--) {
+			d[colTbl[i] * 3 + 2] = p[i * 3 + 2];
+			d[colTbl[i] * 3 + 1] = p[i * 3 + 1];
+			d[colTbl[i] * 3] = p[i * 3];
+		}
+
+		_screen->generateTruelightTables(colTbl, 16, tpal, tpal,  _trueLightTable1, _trueLightTable2, 80);
 		_screen->loadPalette("lol.nol", _screen->getPalette(0));
 	} else {
-		Palette tpal(256);
 		_screen->loadPalette("fxpal.col", tpal);
 		_screen->loadBitmap("fxpal.shp", 3, 3, 0);
 		const uint8 *shpPal = _screen->getPtrToShape(_screen->getCPagePtr(2), 0) + 11;


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