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

cyx at users.sourceforge.net cyx at users.sourceforge.net
Sat Nov 11 05:42:45 CET 2006


Revision: 24672
          http://svn.sourceforge.net/scummvm/?rev=24672&view=rev
Author:   cyx
Date:     2006-11-10 20:42:36 -0800 (Fri, 10 Nov 2006)

Log Message:
-----------
various fixes, Touche should now be completable without any major glitches

Modified Paths:
--------------
    scummvm/trunk/engines/touche/midi.cpp
    scummvm/trunk/engines/touche/plugin.cpp
    scummvm/trunk/engines/touche/resource.cpp
    scummvm/trunk/engines/touche/saveload.cpp
    scummvm/trunk/engines/touche/touche.cpp
    scummvm/trunk/engines/touche/touche.h
    scummvm/trunk/engines/touche/ui.cpp

Modified: scummvm/trunk/engines/touche/midi.cpp
===================================================================
--- scummvm/trunk/engines/touche/midi.cpp	2006-11-10 23:16:23 UTC (rev 24671)
+++ scummvm/trunk/engines/touche/midi.cpp	2006-11-11 04:42:36 UTC (rev 24672)
@@ -80,11 +80,13 @@
 
 void MidiPlayer::setVolume(int volume) {
 	_masterVolume = CLIP(volume, 0, 255);
+	_mutex.lock();
 	for (int i = 0; i < NUM_CHANNELS; ++i) {
 		if (_channelsTable[i]) {
 			_channelsTable[i]->volume(_channelsVolume[i] * _masterVolume / 255);
 		}
 	}
+	_mutex.unlock();
 }
 
 int MidiPlayer::open() {

Modified: scummvm/trunk/engines/touche/plugin.cpp
===================================================================
--- scummvm/trunk/engines/touche/plugin.cpp	2006-11-10 23:16:23 UTC (rev 24671)
+++ scummvm/trunk/engines/touche/plugin.cpp	2006-11-11 04:42:36 UTC (rev 24672)
@@ -151,4 +151,4 @@
 	return kNoError;
 }
 
-REGISTER_PLUGIN(TOUCHE, "Touche: The Adventures of the 5th Musketeer", "Touche: The Adventures of the 5th Musketeer (C) US Gold");
+REGISTER_PLUGIN(TOUCHE, "Touche Engine", "Touche: The Adventures of the 5th Musketeer (C) Clipper Software");

Modified: scummvm/trunk/engines/touche/resource.cpp
===================================================================
--- scummvm/trunk/engines/touche/resource.cpp	2006-11-10 23:16:23 UTC (rev 24671)
+++ scummvm/trunk/engines/touche/resource.cpp	2006-11-11 04:42:36 UTC (rev 24672)
@@ -554,7 +554,7 @@
 
 void ToucheEngine::res_loadSound(int priority, int num) {
 	debugC(9, kDebugResource, "ToucheEngine::res_loadSound() num=%d", num);
-	if (priority >= _defaultSoundPriority) {
+	if (priority >= 0) {
 		uint32 size;
 		const uint32 offs = res_getDataOffset(kResourceTypeSound, num, &size);
 		_fData.seek(offs);
@@ -650,7 +650,6 @@
 	debugC(9, kDebugResource, "ToucheEngine::res_stopSpeech()");
 	_mixer->stopHandle(_speechHandle);
 	_speechPlaying = false;
-	_defaultSoundPriority = 0;
 }
 
 } // namespace Touche

Modified: scummvm/trunk/engines/touche/saveload.cpp
===================================================================
--- scummvm/trunk/engines/touche/saveload.cpp	2006-11-10 23:16:23 UTC (rev 24671)
+++ scummvm/trunk/engines/touche/saveload.cpp	2006-11-11 04:42:36 UTC (rev 24672)
@@ -29,7 +29,7 @@
 namespace Touche {
 
 enum {
-	kCurrentGameStateVersion = 5,
+	kCurrentGameStateVersion = 6,
 	kGameStateDescriptionLen = 32
 };
 
@@ -209,6 +209,38 @@
 	saveOrLoad(s, data.priority);
 }
 
+template <class S, class A>
+static void saveOrLoadCommonArray(S &s, A &array);
+
+template <class A>
+static void saveOrLoadCommonArray(Common::WriteStream &stream, A &array) {
+	uint count = array.size();
+	assert(count < 0xFFFF);
+	stream.writeUint16LE(count);
+	for (uint i = 0; i < count; ++i) {
+		saveOrLoad(stream, array[i]);
+	}
+}
+
+template <class A>
+static void saveOrLoadCommonArray(Common::ReadStream &stream, A &array) {
+	uint count = stream.readUint16LE();
+	if (count == array.size()) {
+		for (uint i = 0; i < count; ++i) {
+			saveOrLoad(stream, array[i]);
+		}
+	}
+}
+
+template <class S, class A>
+static void saveOrLoadStaticArray(S &s, A &array, uint count) {
+	for (uint i = 0; i < count; ++i) {
+		saveOrLoad(s, array[i]);
+	}
+}
+
+static const uint32 saveLoadEndMarker = 0x55AA55AA;
+
 void ToucheEngine::saveGameStateData(Common::WriteStream *stream) {
 	setKeyCharMoney();
 	stream->writeUint16LE(_currentEpisodeNum);
@@ -217,48 +249,23 @@
 	stream->writeUint16LE(_flagsTable[614]);
 	stream->writeUint16LE(_flagsTable[615]);
 	stream->writeUint16LE(_disabledInputCounter);
-	for (uint i = 0; i < _programHitBoxTable.size(); ++i) {
-		saveOrLoad(*stream, _programHitBoxTable[i]);
-	}
-	for (uint i = 0; i < _programBackgroundTable.size(); ++i) {
-		saveOrLoad(*stream, _programBackgroundTable[i]);
-	}
-	for (uint i = 0; i < _programAreaTable.size(); ++i) {
-		saveOrLoad(*stream, _programAreaTable[i]);
-	}
-	for (uint i = 0; i < _programWalkTable.size(); ++i) {
-		saveOrLoad(*stream, _programWalkTable[i]);
-	}
-	for (uint i = 0; i < _programPointsTable.size(); ++i) {
-		saveOrLoad(*stream, _programPointsTable[i]);
-	}
+	saveOrLoadCommonArray(*stream, _programHitBoxTable);
+	saveOrLoadCommonArray(*stream, _programBackgroundTable);
+	saveOrLoadCommonArray(*stream, _programAreaTable);
+	saveOrLoadCommonArray(*stream, _programWalkTable);
+	saveOrLoadCommonArray(*stream, _programPointsTable);
 	stream->write(_updatedRoomAreasTable, 200);
-	for (uint i = 0; i < NUM_SEQUENCES; ++i) {
-		saveOrLoad(*stream, _sequenceEntryTable[i]);
-	}
-	for (uint i = 0; i < 1024; ++i) {
-		saveOrLoad(*stream, _flagsTable[i]);
-	}
-	for (uint i = 0; i < 100; ++i) {
-		saveOrLoad(*stream, _inventoryList1[i]);
-	}
-	for (uint i = 0; i < 100; ++i) {
-		saveOrLoad(*stream, _inventoryList2[i]);
-	}
-	for (uint i = 0; i < 6; ++i) {
-		saveOrLoad(*stream, _inventoryList3[i]);
-	}
-	for (uint i = 0; i < NUM_KEYCHARS; ++i) {
-		saveOrLoad(*stream, _keyCharsTable[i]);
-	}
-	for (uint i = 0; i < NUM_INVENTORY_ITEMS; ++i) {
-		saveOrLoad(*stream, _inventoryItemsInfoTable[i]);
-	}
-	for (uint i = 0; i < NUM_TALK_ENTRIES; ++i) {
-		saveOrLoad(*stream, _talkTable[i]);
-	}
+	saveOrLoadStaticArray(*stream, _sequenceEntryTable, NUM_SEQUENCES);
+	saveOrLoadStaticArray(*stream, _flagsTable, 1024);
+	saveOrLoadStaticArray(*stream, _inventoryList1, 100);
+	saveOrLoadStaticArray(*stream, _inventoryList2, 100);
+	saveOrLoadStaticArray(*stream, _inventoryList3, 6);
+	saveOrLoadStaticArray(*stream, _keyCharsTable, NUM_KEYCHARS);
+	saveOrLoadStaticArray(*stream, _inventoryItemsInfoTable, NUM_INVENTORY_ITEMS);
+	saveOrLoadStaticArray(*stream, _talkTable, NUM_TALK_ENTRIES);
 	stream->writeUint16LE(_talkListEnd);
 	stream->writeUint16LE(_talkListCurrent);
+	stream->writeUint32LE(saveLoadEndMarker);
 }
 
 void ToucheEngine::loadGameStateData(Common::ReadStream *stream) {
@@ -276,51 +283,30 @@
 	_disabledInputCounter = stream->readUint16LE();
 	res_loadProgram(_currentEpisodeNum);
 	setupEpisode(-1);
-	for (uint i = 0; i < _programHitBoxTable.size(); ++i) {
-		saveOrLoad(*stream, _programHitBoxTable[i]);
-	}
-	for (uint i = 0; i < _programBackgroundTable.size(); ++i) {
-		saveOrLoad(*stream, _programBackgroundTable[i]);
-	}
-	for (uint i = 0; i < _programAreaTable.size(); ++i) {
-		saveOrLoad(*stream, _programAreaTable[i]);
-	}
-	for (uint i = 0; i < _programWalkTable.size(); ++i) {
-		saveOrLoad(*stream, _programWalkTable[i]);
-	}
-	for (uint i = 0; i < _programPointsTable.size(); ++i) {
-		saveOrLoad(*stream, _programPointsTable[i]);
-	}
+	saveOrLoadCommonArray(*stream, _programHitBoxTable);
+	saveOrLoadCommonArray(*stream, _programBackgroundTable);
+	saveOrLoadCommonArray(*stream, _programAreaTable);
+	saveOrLoadCommonArray(*stream, _programWalkTable);
+	saveOrLoadCommonArray(*stream, _programPointsTable);
 	stream->read(_updatedRoomAreasTable, 200);
 	for (uint i = 1; i <= _updatedRoomAreasTable[0]; ++i) {
 		updateRoomAreas(_updatedRoomAreasTable[i], -1);
 	}
-	for (uint i = 0; i < NUM_SEQUENCES; ++i) {
-		saveOrLoad(*stream, _sequenceEntryTable[i]);
-	}
-	for (uint i = 0; i < 1024; ++i) {
-		saveOrLoad(*stream, _flagsTable[i]);
-	}
-	for (uint i = 0; i < 100; ++i) {
-		saveOrLoad(*stream, _inventoryList1[i]);
-	}
-	for (uint i = 0; i < 100; ++i) {
-		saveOrLoad(*stream, _inventoryList2[i]);
-	}
-	for (uint i = 0; i < 6; ++i) {
-		saveOrLoad(*stream, _inventoryList3[i]);
-	}
-	for (uint i = 0; i < NUM_KEYCHARS; ++i) {
-		saveOrLoad(*stream, _keyCharsTable[i]);
-	}
-	for (uint i = 0; i < NUM_INVENTORY_ITEMS; ++i) {
-		saveOrLoad(*stream, _inventoryItemsInfoTable[i]);
-	}
-	for (uint i = 0; i < NUM_TALK_ENTRIES; ++i) {
-		saveOrLoad(*stream, _talkTable[i]);
-	}
+	saveOrLoadStaticArray(*stream, _sequenceEntryTable, NUM_SEQUENCES);
+	saveOrLoadStaticArray(*stream, _flagsTable, 1024);
+	saveOrLoadStaticArray(*stream, _inventoryList1, 100);
+	saveOrLoadStaticArray(*stream, _inventoryList2, 100);
+	saveOrLoadStaticArray(*stream, _inventoryList3, 6);
+	saveOrLoadStaticArray(*stream, _keyCharsTable, NUM_KEYCHARS);
+	saveOrLoadStaticArray(*stream, _inventoryItemsInfoTable, NUM_INVENTORY_ITEMS);
+	saveOrLoadStaticArray(*stream, _talkTable, NUM_TALK_ENTRIES);
 	_talkListEnd = stream->readUint16LE();
 	_talkListCurrent = stream->readUint16LE();
+	if (stream->readUint32LE() != saveLoadEndMarker) {
+		warning("Corrupted gamestate data");
+		// if that ever happens, exit the game
+		_flagsTable[611] = 1;
+	}
 	_flagsTable[614] = roomOffsX;
 	_flagsTable[615] = roomOffsY;
 	for (uint i = 0; i < NUM_SEQUENCES; ++i) {

Modified: scummvm/trunk/engines/touche/touche.cpp
===================================================================
--- scummvm/trunk/engines/touche/touche.cpp	2006-11-10 23:16:23 UTC (rev 24671)
+++ scummvm/trunk/engines/touche/touche.cpp	2006-11-11 04:42:36 UTC (rev 24672)
@@ -35,8 +35,6 @@
 ToucheEngine::ToucheEngine(OSystem *system, Common::Language language)
 	: Engine(system), _language(language) {
 
-	_talkTextMode = kTalkModeVoiceAndText;
-
 	_saveLoadCurrentPage = 0;
 	_saveLoadCurrentSlot = 0;
 	_hideInventoryTexts = false;
@@ -45,8 +43,6 @@
 	_roomAreaRect = Common::Rect(640, 352);
 	clearDirtyRects();
 
-	_defaultSoundPriority = 0;
-
 	_playSoundCounter = 0;
 
 	_processRandomPaletteCounter = 0;
@@ -91,8 +87,6 @@
 	_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
 	_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume"));
 	_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, Audio::Mixer::kMaxMixerVolume);
-
-	_midiPlayer->setVolume(ConfMan.getInt("music_volume"));
 	return 0;
 }
 
@@ -179,7 +173,7 @@
 	_conversationReplyNum = -1;
 	_conversationEnded = false;
 	_conversationNum = 0;
-	_drawCharacterConversionRepeatCounter = 0;
+	_scrollConversationChoiceOffset = 0;
 	_currentConversation = 0;
 	_disableConversationScript = false;
 	_conversationAreaCleared = false;
@@ -191,6 +185,41 @@
 	}
 }
 
+void ToucheEngine::readConfigurationSettings() {
+	if (ConfMan.getBool("speech_mute")) {
+		_talkTextMode = kTalkModeTextOnly;
+		if (!ConfMan.getBool("subtitles")) {
+			ConfMan.setBool("subtitles", true);
+		}
+	} else {
+		if (ConfMan.getBool("subtitles")) {
+			_talkTextMode = kTalkModeVoiceAndText;
+		} else {
+			_talkTextMode = kTalkModeVoiceOnly;
+		}
+	}
+	_midiPlayer->setVolume(ConfMan.getInt("music_volume"));
+}
+
+void ToucheEngine::writeConfigurationSettings() {
+	switch (_talkTextMode) {
+	case kTalkModeTextOnly:
+		ConfMan.setBool("speech_mute", true);
+		ConfMan.setBool("subtitles", true);
+		break;
+	case kTalkModeVoiceOnly:
+		ConfMan.setBool("speech_mute", false);
+		ConfMan.setBool("subtitles", false);
+		break;
+	case kTalkModeVoiceAndText:
+		ConfMan.setBool("speech_mute", false);
+		ConfMan.setBool("subtitles", true);
+		break;
+	}
+	ConfMan.setInt("music_volume", _midiPlayer->getVolume());
+	ConfMan.flushToDisk();
+}
+
 void ToucheEngine::mainLoop() {
 	restart();
 
@@ -201,6 +230,8 @@
 	_system->warpMouse(_inp_mousePos.x, _inp_mousePos.y);
 	setPalette(0, 255, 0, 0, 0);
 
+	readConfigurationSettings();
+
 	if (ConfMan.hasKey("save_slot")) {
 		loadGameState(ConfMan.getInt("save_slot"));
 		_newEpisodeNum = _currentEpisodeNum;
@@ -209,10 +240,10 @@
 	const int cycleDelay = 1000 / (1193180 / 32768);
 	uint32 frameTimeStamp = _system->getMillis();
 	for (uint32 cycleCounter = 0; _flagsTable[611] == 0; ++cycleCounter) {
-		if ((cycleCounter & 2) == 0) {
+		if ((cycleCounter % 3) == 0) {
 			runCycle();
 		}
-		if ((cycleCounter & 1) == 0) {
+		if ((cycleCounter % 2) == 0) {
 			fadePaletteFromFlags();
  		}
 		int delay = _system->getMillis() - frameTimeStamp;
@@ -223,9 +254,11 @@
 		_system->delayMillis(delay);
 		frameTimeStamp = _system->getMillis();
 	}
+
+	writeConfigurationSettings();
 }
 
-void ToucheEngine::processEvents() {
+void ToucheEngine::processEvents(bool handleKeyEvents) {
 	OSystem::Event event;
 	while (_system->pollEvent(event)) {
 		switch (event.type) {
@@ -233,6 +266,9 @@
 			_flagsTable[611] = 1;
 			break;
 		case OSystem::EVENT_KEYDOWN:
+			if (!handleKeyEvents) {
+				break;
+			}
 			_flagsTable[600] = event.kbd.keycode;
 			if (event.kbd.keycode == 27) { // ESC
 				if (_displayQuitDialog) {
@@ -337,7 +373,6 @@
 	if (_flagsTable[612] != 0) {
 		_flagsTable[613] = getRandomNumber(_flagsTable[612]);
 	}
-	processEvents();
 	sortKeyChars();
 	for (int i = 0; i < NUM_KEYCHARS; ++i) {
 		runKeyCharScript(&_keyCharsTable[i]);
@@ -369,6 +404,7 @@
 	if (_flagsTable[299]) {
 		--_flagsTable[299];
 	}
+	processEvents();
 }
 
 int16 ToucheEngine::getRandomNumber(int max) {
@@ -997,12 +1033,11 @@
 			}
 
 			uint8 *dstCur = dst + copyRegion.r.top * dstPitch + copyRegion.r.left;
-			const int spr_y1 = srcOffsY + copyRegion.srcY;
-			const int spr_x1 = srcOffsX + copyRegion.srcX;
-			const uint8 *srcSpr = spr->ptr + spr_y1 * spr->bitmapWidth + spr_x1;
+			const uint8 *srcSpr = spr->ptr + (srcOffsY + copyRegion.srcY) * spr->bitmapWidth;
+			srcSpr += vflipped ? srcOffsX + spr->w - 1 - copyRegion.srcX : srcOffsX + copyRegion.srcX;
 			for (int h = 0; h < copyRegion.r.height(); ++h) {
 				for (int w = 0; w < copyRegion.r.width(); ++w) {
-					uint8 color = vflipped ? srcSpr[spr->w - 1 - w] : srcSpr[w];
+					uint8 color = vflipped ? srcSpr[-w] : srcSpr[w];
 					if (color != 0) {
 						dstCur[w] = color;
 					}
@@ -1663,9 +1698,9 @@
 				if (_inp_leftMouseButtonPressed) {
 					int replyNum = _inp_mousePos.y - _roomAreaRect.height();
 					if (replyNum < 40) {
-						drawCharacterConversationRepeat();
+						scrollUpConversationChoice();
 					} else {
-						drawCharacterConversationRepeat2();
+						scrollDownConversationChoice();
 					}
 					_inp_leftMouseButtonPressed = false;
 				}
@@ -1718,7 +1753,6 @@
 	if (_speechPlaying) {
 		if (!_mixer->isSoundHandleActive(_speechHandle)) {
 			_speechPlaying = false;
-			_defaultSoundPriority = 0;
 		}
 	}
 }
@@ -1783,7 +1817,7 @@
 	_redrawScreenCounter1 = 2;
 	Common::Rect rect(0, y, 640, y + h);
 	i = -1;
-	while (_inp_rightMouseButtonPressed) {
+	while (_inp_rightMouseButtonPressed && _flagsTable[611] == 0) {
 		if (rect.contains(_inp_mousePos)) {
 			int c = (_inp_mousePos.y - y) / 16;
 			if (c != i) {
@@ -1803,31 +1837,7 @@
 			updateScreenArea(_offscreenBuffer, 640, offs, drawY, offs, drawY, strW, 16);
 			i = -1;
 		}
-
-		OSystem::Event event;
-		while (_system->pollEvent(event)) {
-			switch (event.type) {
-			case OSystem::EVENT_QUIT:
-				_flagsTable[611] = 1;
-				break;
-			case OSystem::EVENT_MOUSEMOVE:
-				_inp_mousePos.x = event.mouse.x;
-				_inp_mousePos.y = event.mouse.y;
-				break;
-			case OSystem::EVENT_RBUTTONDOWN:
-				_inp_mousePos.x = event.mouse.x;
-				_inp_mousePos.y = event.mouse.y;
-				_inp_rightMouseButtonPressed = true;
-				break;
-			case OSystem::EVENT_RBUTTONUP:
-				_inp_mousePos.x = event.mouse.x;
-				_inp_mousePos.y = event.mouse.y;
-				_inp_rightMouseButtonPressed = false;
-				break;
-			default:
-				break;
-			}
-		}
+		processEvents(false);
 		_system->updateScreen();
 		_system->delayMillis(50);
 	}
@@ -2391,19 +2401,19 @@
 		_conversationChoicesTable[i].num = 0;
 		_conversationChoicesTable[i].msg = 0;
 	}
-	_drawCharacterConversionRepeatCounter = 0;
+	_scrollConversationChoiceOffset = 0;
 }
 
-void ToucheEngine::drawCharacterConversationRepeat2() {
-	if (_conversationChoicesTable[4 + _drawCharacterConversionRepeatCounter].msg != 0) {
-		++_drawCharacterConversionRepeatCounter;
+void ToucheEngine::scrollDownConversationChoice() {
+	if (_conversationChoicesTable[4 + _scrollConversationChoiceOffset].msg != 0) {
+		++_scrollConversationChoiceOffset;
 		drawCharacterConversation();
 	}
 }
 
-void ToucheEngine::drawCharacterConversationRepeat() {
-	if (_drawCharacterConversionRepeatCounter != 0) {
-		--_drawCharacterConversionRepeatCounter;
+void ToucheEngine::scrollUpConversationChoice() {
+	if (_scrollConversationChoiceOffset != 0) {
+		--_scrollConversationChoiceOffset;
 		drawCharacterConversation();
 	}
 }
@@ -2422,7 +2432,7 @@
 	}
 	drawConversationPanel();
 	for (int i = 0; i < 4; ++i) {
-		drawString(_offscreenBuffer, 640, 214, 42, 328 + i * 16, _conversationChoicesTable[_drawCharacterConversionRepeatCounter + i].msg);
+		drawString(_offscreenBuffer, 640, 214, 42, 328 + i * 16, _conversationChoicesTable[_scrollConversationChoiceOffset + i].msg);
 	}
 	updateScreenArea(_offscreenBuffer, 640, 0, 320, 0, 320, 640, 80);
 	_conversationAreaCleared = false;
@@ -2430,7 +2440,7 @@
 
 void ToucheEngine::drawConversationString(int num, uint16 color) {
 	const int y = 328 + num * 16;
-	drawString(_offscreenBuffer, 640, color, 42, y, _conversationChoicesTable[num + _drawCharacterConversionRepeatCounter].msg);
+	drawString(_offscreenBuffer, 640, color, 42, y, _conversationChoicesTable[num + _scrollConversationChoiceOffset].msg);
 	updateScreenArea(_offscreenBuffer, 640, 0, y, 0, y, 640, 16);
 }
 
@@ -2443,11 +2453,11 @@
 void ToucheEngine::setupConversationScript(int num) {
 	debugC(9, kDebugEngine, "ToucheEngine::setupConversationScript(%d)", num);
 	if (num < 5 && _conversationChoicesTable[num].msg != 0) {
-		num = _conversationChoicesTable[_drawCharacterConversionRepeatCounter + num].num;
+		num = _conversationChoicesTable[_scrollConversationChoiceOffset + num].num;
 		KeyChar *key = &_keyCharsTable[_currentKeyCharNum];
 		key->scriptDataOffset = _programConversationTable[_currentConversation + num].offset;
 		key->scriptStackPtr = &key->scriptStackTable[39];
-		_drawCharacterConversionRepeatCounter = 0;
+		_scrollConversationChoiceOffset = 0;
 		removeConversationChoice(num);
 		clearConversationArea();
 	}

Modified: scummvm/trunk/engines/touche/touche.h
===================================================================
--- scummvm/trunk/engines/touche/touche.h	2006-11-10 23:16:23 UTC (rev 24671)
+++ scummvm/trunk/engines/touche/touche.h	2006-11-11 04:42:36 UTC (rev 24672)
@@ -343,8 +343,10 @@
 protected:
 
 	void restart();
+	void readConfigurationSettings();
+	void writeConfigurationSettings();
 	void mainLoop();
-	void processEvents();
+	void processEvents(bool handleKeyEvents = true);
 	void runCycle();
 	int16 getRandomNumber(int max);
 	void changePaletteRange();
@@ -432,8 +434,8 @@
 	void runConversationScript(uint16 offset);
 	void findConversationByNum(int16 num);
 	void clearConversationChoices();
-	void drawCharacterConversationRepeat2();
-	void drawCharacterConversationRepeat();
+	void scrollDownConversationChoice();
+	void scrollUpConversationChoice();
 	void drawCharacterConversation();
 	void drawConversationString(int num, uint16 color);
 	void clearConversationArea();
@@ -611,7 +613,6 @@
 	int _saveLoadCurrentPage;
 	int _saveLoadCurrentSlot;
 
-	int _defaultSoundPriority;
 	int _newMusicNum;
 	int _currentMusicNum;
 	int _newSoundNum;
@@ -650,7 +651,7 @@
 	int _conversationReplyNum;
 	bool _conversationEnded;
 	int _conversationNum;
-	int _drawCharacterConversionRepeatCounter;
+	int _scrollConversationChoiceOffset;
 	int _currentConversation;
 	bool _disableConversationScript;
 	bool _conversationAreaCleared;

Modified: scummvm/trunk/engines/touche/ui.cpp
===================================================================
--- scummvm/trunk/engines/touche/ui.cpp	2006-11-10 23:16:23 UTC (rev 24671)
+++ scummvm/trunk/engines/touche/ui.cpp	2006-11-11 04:42:36 UTC (rev 24672)
@@ -493,14 +493,14 @@
 	--dstX;
 	Graphics::copyRect(_offscreenBuffer, 640, dstX, 320, _convKitData, 152, 120, 0, 7, 80);
 	dstX -= 3;
-	if (_drawCharacterConversionRepeatCounter != 0) {
+	if (_scrollConversationChoiceOffset != 0) {
 		drawConversationPanelBorder(320, 72, 0);
 		Graphics::copyRect(_offscreenBuffer, 640, 0, 320, _convKitData, 152, 128, 0, 24, 21);
 		Graphics::copyRect(_offscreenBuffer, 640, dstX, 320, _convKitData, 152, 128, 34, 10, 10);
 	} else {
 		drawConversationPanelBorder(320, 24, 0);
 	}
-	if (_conversationChoicesTable[_drawCharacterConversionRepeatCounter + 4].msg != 0) {
+	if (_conversationChoicesTable[_scrollConversationChoiceOffset + 4].msg != 0) {
 		drawConversationPanelBorder(394, 72, 74);
 		Graphics::copyRect(_offscreenBuffer, 640, 0, 379, _convKitData, 152, 128, 59, 24, 21);
 		Graphics::copyRect(_offscreenBuffer, 640, dstX, 394, _convKitData, 152, 128, 46, 10, 6);


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