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

athrxx at users.sourceforge.net athrxx at users.sourceforge.net
Fri Oct 9 19:31:01 CEST 2009


Revision: 44834
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44834&view=rev
Author:   athrxx
Date:     2009-10-09 17:31:01 +0000 (Fri, 09 Oct 2009)

Log Message:
-----------
LOL/PC-98: fixed minor bugs in text displayer

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

Modified: scummvm/trunk/engines/kyra/lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/lol.cpp	2009-10-09 17:16:34 UTC (rev 44833)
+++ scummvm/trunk/engines/kyra/lol.cpp	2009-10-09 17:31:01 UTC (rev 44834)
@@ -1579,7 +1579,7 @@
 		} 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);
+			gui_drawBox(1, 130, 318, 69, 136, 251, 252);			
 		}
 
 		_screen->modifyScreenDim(5, 8, 131, 306, 66);
@@ -2510,7 +2510,10 @@
 			int sH = ((fb->progress / 8 + shp[2] + fireBallWH) << 8) / shp[2];
 
 			if (fb->finalize) {
-				_screen->drawShape(_screen->_curPage, shp, fX, fY, 0, 0x1004, _trueLightTable1, _trueLightTable2, sW, sH);
+				if (_flags.use16ColorMode)
+					_screen->drawShape(_screen->_curPage, shp, fX, fY, 0, 4, sW, sH);
+				else
+					_screen->drawShape(_screen->_curPage, shp, fX, fY, 0, 0x1004, _trueLightTable1, _trueLightTable2, sW, sH);
 
 				if (finShpIndex2[fb->finProgress] != -1) {
 					shp = _fireballShapes[finShpIndex2[fb->finProgress]];
@@ -2522,7 +2525,10 @@
 				}
 
 			} else {
-				_screen->drawShape(_screen->_curPage, shp, fX, fY, 0, 0x1004, _trueLightTable1, _trueLightTable2, sW, sH);
+				if (_flags.use16ColorMode)
+					_screen->drawShape(_screen->_curPage, shp, fX, fY, 0, 4, sW, sH);
+				else				
+					_screen->drawShape(_screen->_curPage, shp, fX, fY, 0, 0x1004, _trueLightTable1, _trueLightTable2, sW, sH);
 			}
 
 			if (fb->finalize) {

Modified: scummvm/trunk/engines/kyra/script_tim.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_tim.cpp	2009-10-09 17:16:34 UTC (rev 44833)
+++ scummvm/trunk/engines/kyra/script_tim.cpp	2009-10-09 17:31:01 UTC (rev 44834)
@@ -1274,7 +1274,10 @@
 		_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 - (_vm->gameFlags().use16ColorMode ? 3 : 2), d->sy + d->h - 1, d->unkA);
+		if (_vm->gameFlags().use16ColorMode)
+			_screen->fillRect(d->sx, d->sy, d->sx + d->w - 3, d->sy + d->h - 2, d->unkA);
+		else
+			_screen->fillRect(d->sx, d->sy, d->sx + d->w - 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-10-09 17:16:34 UTC (rev 44833)
+++ scummvm/trunk/engines/kyra/text_lol.cpp	2009-10-09 17:31:01 UTC (rev 44834)
@@ -63,9 +63,22 @@
 
 void TextDisplayer_LoL::setupField(bool mode) {
 	if (_vm->textEnabled()) {
+
+		int y = 142;
+		int h = 37;
+		int stepY = 3;
+		int stepH = 1;
+
+		if (_vm->gameFlags().use16ColorMode) {
+			y = 140;
+			h = 39;
+			stepY = 4;
+			stepH = 2;
+		}
+
 		if (mode) {
 			_screen->copyRegionToBuffer(3, 0, 0, 320, 40, _vm->_pageBuffer1);
-			_screen->copyRegion(80, 142, 0, 0, 240, 37, 0, 3, Screen::CR_NO_P_CHECK);
+			_screen->copyRegion(80, y, 0, 0, 240, h, 0, 3, Screen::CR_NO_P_CHECK);
 			_screen->copyRegionToBuffer(3, 0, 0, 320, 40, _vm->_pageBuffer2);
 			_screen->copyBlockToPage(3, 0, 0, 320, 40, _vm->_pageBuffer1);
 		} else {
@@ -73,11 +86,11 @@
 			int cp = _screen->setCurPage(2);
 			_screen->copyRegionToBuffer(3, 0, 0, 320, 40, _vm->_pageBuffer1);
 			_screen->copyBlockToPage(3, 0, 0, 320, 40, _vm->_pageBuffer2);
-			_screen->copyRegion(0, 0, 80, 142, 240, 37, 3, _screen->_curPage, Screen::CR_NO_P_CHECK);
+			_screen->copyRegion(0, 0, 80, y, 240, h, 3, _screen->_curPage, Screen::CR_NO_P_CHECK);
 
 			for (int i = 177; i > 141; i--) {
 				uint32 endTime = _vm->_system->getMillis() + _vm->_tickLength;
-				_screen->copyRegion(83, i, 83, i - 1, 235, 3, 0, 0, Screen::CR_NO_P_CHECK);
+				_screen->copyRegion(83, i - stepH + 1, 83, i - stepH, 235, stepY, 0, 0, Screen::CR_NO_P_CHECK);
 				_screen->copyRegion(83, i + 1, 83, i + 1, 235, 1, 2, 0, Screen::CR_NO_P_CHECK);
 				_vm->updateInput();
 				_screen->updateScreen();
@@ -105,14 +118,22 @@
 		_vm->_timer->disable(11);
 		_screen->setScreenDim(clearDim(3));
 		_screen->copyRegionToBuffer(3, 0, 0, 320, 10, tmp);
-		if (_vm->gameFlags().use16ColorMode)
-			_screen->copyRegion(83, 139, 0, 0, 235, 4, 0, 2, Screen::CR_NO_P_CHECK);
-		else
-			_screen->copyRegion(83, 140, 0, 0, 235, 3, 0, 2, Screen::CR_NO_P_CHECK);		
 
+		int y = 140;
+		int h = 3;
+		int stepH = 0;
+
+		if (_vm->gameFlags().use16ColorMode) {
+			y = 139;
+			h = 4;
+			stepH = 1;
+		}
+		
+		_screen->copyRegion(83, y, 0, 0, 235, h, 0, 2, Screen::CR_NO_P_CHECK);		
+
 		for (int i = 140; i < 177; i++) {
 			uint32 endTime = _vm->_system->getMillis() + _vm->_tickLength;
-			_screen->copyRegion(0, 0, 83, i, 235, 3, 2, 0, Screen::CR_NO_P_CHECK);
+			_screen->copyRegion(0, 0, 83, i - stepH, 235, h, 2, 0, Screen::CR_NO_P_CHECK);
 			_vm->updateInput();
 			_screen->updateScreen();
 			_vm->delayUntil(endTime);


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