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

athrxx at users.sourceforge.net athrxx at users.sourceforge.net
Mon Jun 1 15:37:51 CEST 2009


Revision: 41100
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41100&view=rev
Author:   athrxx
Date:     2009-06-01 13:37:51 +0000 (Mon, 01 Jun 2009)

Log Message:
-----------
LOL: - extended text displayer and added one more opcode

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/script_lol.cpp
    scummvm/trunk/engines/kyra/sequences_lol.cpp
    scummvm/trunk/engines/kyra/text_lol.cpp

Modified: scummvm/trunk/engines/kyra/script_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_lol.cpp	2009-06-01 10:17:34 UTC (rev 41099)
+++ scummvm/trunk/engines/kyra/script_lol.cpp	2009-06-01 13:37:51 UTC (rev 41100)
@@ -2722,7 +2722,7 @@
 	Opcode(olol_assignSpecialGuiShape);
 	Opcode(olol_findInventoryItem);
 	Opcode(olol_restoreFadePalette);
-	OpcodeUnImpl();
+	Opcode(olol_calcNewBlockPosition);
 
 	// 0xA8
 	OpcodeUnImpl();

Modified: scummvm/trunk/engines/kyra/sequences_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sequences_lol.cpp	2009-06-01 10:17:34 UTC (rev 41099)
+++ scummvm/trunk/engines/kyra/sequences_lol.cpp	2009-06-01 13:37:51 UTC (rev 41100)
@@ -578,15 +578,16 @@
 void LoLEngine::selectionCharInfoIntro(char *file) {
 	int index = 0;
 	file[4] = '0';
+	bool processAnim = true;
 
 	while (_charSelectionInfoResult == -1 && !shouldQuit()) {
-		if (!_sound->isVoicePresent(file))
+		if (_speechFlag && !_sound->isVoicePresent(file))
 			break;
 
 		_sound->voicePlay(file, &_speechHandle);
 
 		int i = 0;
-		while (_sound->voiceIsPlaying(&_speechHandle) && _charSelectionInfoResult == -1 && !shouldQuit()) {
+		while ((!_speechFlag || (_speechFlag && _sound->voiceIsPlaying(&_speechHandle))) && _charSelectionInfoResult == -1 && !shouldQuit()) {
 			_screen->drawShape(0, _screen->getPtrToShape(_screen->getCPagePtr(9), _charInfoFrameTable[i]), 11, 130, 0, 0);
 			_screen->updateScreen();
 
@@ -596,7 +597,10 @@
 				_system->delayMillis(10);
 			}
 
-			i = (i + 1) % 32;
+			if (_speechFlag || processAnim)
+				i = (i + 1) % 32;
+			if (i == 0)
+				processAnim = false;
 		}
 
 		_sound->voiceStop(&_speechHandle);

Modified: scummvm/trunk/engines/kyra/text_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/text_lol.cpp	2009-06-01 10:17:34 UTC (rev 41099)
+++ scummvm/trunk/engines/kyra/text_lol.cpp	2009-06-01 13:37:51 UTC (rev 41100)
@@ -354,6 +354,8 @@
 	const ScreenDim *sd = _screen->_curDim;
 	int sdx = _screen->curDimIndex();
 
+	uint16 charsPerLine = (sd->w << 3) / (_screen->getFontWidth() + _screen->_charWidth);
+
 	while (c) {
 		char a = tolower(_ctrl[1]);
 
@@ -372,6 +374,8 @@
 			c = parseCommand();
 		}
 
+		uint16 dv = _textDimData[sdx].column / (_screen->getFontWidth() + _screen->_charWidth);
+
 		switch (c - 1) {
 		case 0:
 			printLine(_currentLine);
@@ -390,7 +394,12 @@
 			break;
 
 		case 8:
-			//TODO
+			printLine(_currentLine);
+			dv = _textDimData[sdx].column / (_screen->getFontWidth() + _screen->_charWidth);
+			dv = ((dv + 8) & 0xfff8) - 1;
+			if (dv >= charsPerLine)
+				dv = 0;
+			_textDimData[sdx].column = (_screen->getFontWidth() + _screen->_charWidth) * dv;
 			break;
 
 		case 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