[Scummvm-cvs-logs] SF.net SVN: scummvm: [24724] scummvm/trunk/engines/touche

cyx at users.sourceforge.net cyx at users.sourceforge.net
Wed Nov 15 23:35:45 CET 2006


Revision: 24724
          http://svn.sourceforge.net/scummvm/?rev=24724&view=rev
Author:   cyx
Date:     2006-11-15 14:35:45 -0800 (Wed, 15 Nov 2006)

Log Message:
-----------
added handler for flag 618 (cursor display on/off) and workaround a palette glitch

Modified Paths:
--------------
    scummvm/trunk/engines/touche/midi.cpp
    scummvm/trunk/engines/touche/opcodes.cpp
    scummvm/trunk/engines/touche/resource.cpp
    scummvm/trunk/engines/touche/touche.cpp
    scummvm/trunk/engines/touche/touche.h

Modified: scummvm/trunk/engines/touche/midi.cpp
===================================================================
--- scummvm/trunk/engines/touche/midi.cpp	2006-11-15 13:11:53 UTC (rev 24723)
+++ scummvm/trunk/engines/touche/midi.cpp	2006-11-15 22:35:45 UTC (rev 24724)
@@ -105,10 +105,12 @@
 	_driver->setTimerCallback(NULL, NULL);
 	_mutex.unlock();
 	stop();
+	_mutex.lock();
+	_driver->close();
+	_driver = 0;
 	_parser->setMidiDriver(NULL);
 	delete _parser;
-	_driver->close();
-	_driver = 0;
+	_mutex.unlock();
 }
 
 void MidiPlayer::send(uint32 b) {

Modified: scummvm/trunk/engines/touche/opcodes.cpp
===================================================================
--- scummvm/trunk/engines/touche/opcodes.cpp	2006-11-15 13:11:53 UTC (rev 24723)
+++ scummvm/trunk/engines/touche/opcodes.cpp	2006-11-15 22:35:45 UTC (rev 24724)
@@ -411,6 +411,9 @@
 	case 615:
 		_fullRedrawCounter = 1;
 		break;
+	case 618:
+		showCursor(val == 0);
+		break;
 	default:
 		break;
 	}
@@ -479,6 +482,18 @@
 		//
 		_flagsTable[115] = 1;
 	}
+	if (_currentEpisodeNum == 100 && num == 1 && _currentRoomNum == 2) {
+		//
+		// Same problem in script 100...
+		//
+		//  [021F] (34) LOAD_ROOM(1)
+		//  [xxxx] ...
+		//  [023D] (13) ST[0] = 1
+		//  [0240] (1E) FLAGS[604] = ST[0]
+		//  [0243] (84) START_PALETTE_FADE_IN(2)
+		//
+		_flagsTable[115] = 1;
+	}
 	res_loadRoom(num);
 }
 

Modified: scummvm/trunk/engines/touche/resource.cpp
===================================================================
--- scummvm/trunk/engines/touche/resource.cpp	2006-11-15 13:11:53 UTC (rev 24723)
+++ scummvm/trunk/engines/touche/resource.cpp	2006-11-15 22:35:45 UTC (rev 24724)
@@ -411,9 +411,9 @@
 
 	const uint32 offsInfo = res_getDataOffset(kResourceTypeRoomInfo, num);
 	_fData.seek(offsInfo);
-	_fData.readUint16LE();
+	_fData.skip(2);
 	const int roomImageNum = _fData.readUint16LE();
-	_fData.readUint16LE();
+	_fData.skip(2);
 	for (int i = 0; i < 256; ++i) {
 		_fData.read(&_paletteBuffer[i * 4], 3);
 		_paletteBuffer[i * 4 + 3] = 0;

Modified: scummvm/trunk/engines/touche/touche.cpp
===================================================================
--- scummvm/trunk/engines/touche/touche.cpp	2006-11-15 13:11:53 UTC (rev 24723)
+++ scummvm/trunk/engines/touche/touche.cpp	2006-11-15 22:35:45 UTC (rev 24724)
@@ -227,11 +227,10 @@
 void ToucheEngine::mainLoop() {
 	restart();
 
-	_inp_mousePos.x = 640 / 2;
-	_inp_mousePos.y = 352 / 2;
 	_inp_leftMouseButtonPressed = false;
 	_inp_rightMouseButtonPressed = false;
-	_system->warpMouse(_inp_mousePos.x, _inp_mousePos.y);
+	showCursor(false);
+
 	setPalette(0, 255, 0, 0, 0);
 
 	readConfigurationSettings();
@@ -1381,6 +1380,11 @@
 	}
 }
 
+void ToucheEngine::showCursor(bool show) {
+	debugC(9, kDebugEngine, "ToucheEngine::showCursor()");
+	_system->showMouse(show);
+}
+
 void ToucheEngine::setCursor(int num) {
 	debugC(9, kDebugEngine, "ToucheEngine::setCursor(%d)", num);
 	_currentCursorObject = num;
@@ -1388,7 +1392,6 @@
 	const int cursorH = 42;
 	res_loadImage(num, _mouseData);
 	_system->setMouseCursor(_mouseData, cursorW, cursorH, cursorW / 2, cursorH / 2, 0);
-	_system->showMouse(true);
 }
 
 void ToucheEngine::setDefaultCursor(int num) {

Modified: scummvm/trunk/engines/touche/touche.h
===================================================================
--- scummvm/trunk/engines/touche/touche.h	2006-11-15 13:11:53 UTC (rev 24723)
+++ scummvm/trunk/engines/touche/touche.h	2006-11-15 22:35:45 UTC (rev 24724)
@@ -389,6 +389,7 @@
 	void setKeyCharTalkingFrame(int keyChar);
 	void lockUnlockHitBox(int num, int lock);
 	void drawHitBoxes();
+	void showCursor(bool show);
 	void setCursor(int num);
 	void setDefaultCursor(int num);
 	void handleLeftMouseButtonClickOnInventory();
@@ -773,6 +774,7 @@
 	615 : room scroll y offset
 	616 : disable room scrolling
 	617 : current speech file number
+	618 : hide mouse cursor
 	621 : enable french version "features"
 	902 : debug/draw walk boxes
 	911 : load scripts/programs from external files


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