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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sun Mar 9 16:24:47 CET 2008


Revision: 31088
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31088&view=rev
Author:   lordhoto
Date:     2008-03-09 08:24:47 -0700 (Sun, 09 Mar 2008)

Log Message:
-----------
- fixed little glitch when putting items in cauldron
- implemented listing of items in cauldron

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/gui_v2.cpp
    scummvm/trunk/engines/kyra/kyra_v2.cpp
    scummvm/trunk/engines/kyra/kyra_v2.h

Modified: scummvm/trunk/engines/kyra/gui_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui_v2.cpp	2008-03-09 14:46:24 UTC (rev 31087)
+++ scummvm/trunk/engines/kyra/gui_v2.cpp	2008-03-09 15:24:47 UTC (rev 31088)
@@ -1018,7 +1018,7 @@
 		return 0;
 	}
 
-	if (!_screen->isMouseVisible() || _handItemSet < 0)
+	if (!_screen->isMouseVisible() || _handItemSet < -1)
 		return 0;
 
 	if (queryGameFlag(0xE4)) {
@@ -1036,7 +1036,7 @@
 	}
 
 	if (_itemInHand == -1) {
-		//sub_33AAE();
+		listItemsInCauldron();
 		return 0;
 	}
 

Modified: scummvm/trunk/engines/kyra/kyra_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.cpp	2008-03-09 14:46:24 UTC (rev 31087)
+++ scummvm/trunk/engines/kyra/kyra_v2.cpp	2008-03-09 15:24:47 UTC (rev 31088)
@@ -1848,6 +1848,7 @@
 			mouseY -= 2;
 		uint32 waitEnd = _system->getMillis() + _tickLength;
 		_system->warpMouse(mouseX, mouseY);
+		_system->updateScreen();
 		delayUntil(waitEnd);
 	}
 
@@ -1858,6 +1859,7 @@
 			mouseX -= 2;
 		uint32 waitEnd = _system->getMillis() + _tickLength;
 		_system->warpMouse(mouseX, mouseY);
+		_system->updateScreen();
 		delayUntil(waitEnd);
 	}
 
@@ -1997,6 +1999,50 @@
 	return false;
 }
 
+void KyraEngine_v2::listItemsInCauldron() {
+	int itemsInCauldron = 0;
+	for (int i = 0; i < 25; ++i) {
+		if (_cauldronTable[i] != -1)
+			++itemsInCauldron;
+		else
+			break;
+	}
+
+	if (!itemsInCauldron) {
+		if (!_cauldronState)
+			objectChat(getTableString(0xF4, _cCodeBuffer, 1), 0, 0x83, 0xF4);
+		else
+			objectChat(getTableString(0xF3, _cCodeBuffer, 1), 0, 0x83, 0xF3);
+	} else {
+		objectChat(getTableString(0xF7, _cCodeBuffer, 1), 0, 0x83, 0xF7);
+
+		char buffer[80];
+		for (int i = 0; i < itemsInCauldron-1; ++i) {
+			char *str = buffer;
+			strcpy(str, getTableString(_cauldronTable[i]+54, _cCodeBuffer, 1));
+			if (_lang == 1) {
+				if (*str == 37)
+					str += 2;
+			}
+			strcpy((char*)_unkBuf500Bytes, "...");
+			strcat((char*)_unkBuf500Bytes, str);
+			strcat((char*)_unkBuf500Bytes, "...");
+			objectChat((const char*)_unkBuf500Bytes, 0, 0x83, _cauldronTable[i]+54);
+		}
+
+		char *str = buffer;
+		strcpy(str, getTableString(_cauldronTable[itemsInCauldron-1]+54, _cCodeBuffer, 1));
+		if (_lang == 1) {
+			if (*str == 37)
+				str += 2;
+		}
+		strcpy((char*)_unkBuf500Bytes, "...");
+		strcat((char*)_unkBuf500Bytes, str);
+		strcat((char*)_unkBuf500Bytes, ".");
+		objectChat((const char*)_unkBuf500Bytes, 0, 0x83, _cauldronTable[itemsInCauldron-1]+54);
+	}
+}
+
 #pragma mark -
 
 void KyraEngine_v2::registerDefaultSettings() {

Modified: scummvm/trunk/engines/kyra/kyra_v2.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.h	2008-03-09 14:46:24 UTC (rev 31087)
+++ scummvm/trunk/engines/kyra/kyra_v2.h	2008-03-09 15:24:47 UTC (rev 31088)
@@ -665,6 +665,7 @@
 	void cauldronItemAnim(int item);
 	void cauldronRndPaletteFade();
 	bool updateCauldron();
+	void listItemsInCauldron();
 
 	// localization
 	void loadCCodeBuffer(const char *file);


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