[Scummvm-cvs-logs] SF.net SVN: scummvm: [31689] scummvm/trunk/engines/kyra
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Thu Apr 24 15:27:05 CEST 2008
Revision: 31689
http://scummvm.svn.sourceforge.net/scummvm/?rev=31689&view=rev
Author: lordhoto
Date: 2008-04-24 06:27:05 -0700 (Thu, 24 Apr 2008)
Log Message:
-----------
Implemented special item string selection for french version of Kyra3.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/items_v3.cpp
scummvm/trunk/engines/kyra/kyra_v3.h
scummvm/trunk/engines/kyra/staticres.cpp
Modified: scummvm/trunk/engines/kyra/items_v3.cpp
===================================================================
--- scummvm/trunk/engines/kyra/items_v3.cpp 2008-04-24 13:16:46 UTC (rev 31688)
+++ scummvm/trunk/engines/kyra/items_v3.cpp 2008-04-24 13:27:05 UTC (rev 31689)
@@ -296,8 +296,8 @@
if (!unk1 && unk2) {
int itemStr = 1;
- //if (_lang == 1)
- // itemStr = getItemCommandStringDrop(item);
+ if (_lang == 1)
+ itemStr = getItemCommandStringDrop(item);
updateItemCommand(item, itemStr, 0xFF);
}
@@ -412,8 +412,8 @@
setMouseCursor(_itemInHand);
int str2 = 0;
- //if (_lang == 1)
- // str2 = getItemCommandStringPickUp(itemId);
+ if (_lang == 1)
+ str2 = getItemCommandStringPickUp(itemId);
updateItemCommand(itemId, str2, 0xFF);
_screen->showMouse();
@@ -440,8 +440,8 @@
setMouseCursor(itemId);
int itemString = 0;
- //if (_lang == 1)
- // itemString = getItemCommandStringPickUp(itemId);
+ if (_lang == 1)
+ itemString = getItemCommandStringPickUp(itemId);
updateItemCommand(itemId, itemString, 0xFF);
_itemInHand = itemId;
@@ -543,5 +543,26 @@
return false;
}
+int KyraEngine_v3::getItemCommandStringDrop(uint16 item) {
+ debugC(9, kDebugLevelMain, "KyraEngine_v3::getItemCommandStringDrop(%u)", item);
+ assert(item < _itemStringMapSize);
+ int stringId = _itemStringMap[item];
+ return _itemStringDrop[stringId];
+}
+
+int KyraEngine_v3::getItemCommandStringPickUp(uint16 item) {
+ debugC(9, kDebugLevelMain, "KyraEngine_v3::getItemCommandStringPickUp(%u)", item);
+ assert(item < _itemStringMapSize);
+ int stringId = _itemStringMap[item];
+ return _itemStringPickUp[stringId];
+}
+
+int KyraEngine_v3::getItemCommandStringInv(uint16 item) {
+ debugC(9, kDebugLevelMain, "KyraEngine_v3::getItemCommandStringInv(%u)", item);
+ assert(item < _itemStringMapSize);
+ int stringId = _itemStringMap[item];
+ return _itemStringInv[stringId];
+}
+
} // end of namespace Kyra
Modified: scummvm/trunk/engines/kyra/kyra_v3.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v3.h 2008-04-24 13:16:46 UTC (rev 31688)
+++ scummvm/trunk/engines/kyra/kyra_v3.h 2008-04-24 13:27:05 UTC (rev 31689)
@@ -327,6 +327,16 @@
static const uint8 _itemMagicTable[];
bool itemListMagic(int handItem, int itemSlot);
+ static const uint8 _itemStringMap[];
+ static const uint _itemStringMapSize;
+ static const uint8 _itemStringPickUp[];
+ static const uint8 _itemStringDrop[];
+ static const uint8 _itemStringInv[];
+
+ int getItemCommandStringPickUp(uint16 item);
+ int getItemCommandStringDrop(uint16 item);
+ int getItemCommandStringInv(uint16 item);
+
// -> hand item
void setMouseCursor(uint16 item);
Modified: scummvm/trunk/engines/kyra/staticres.cpp
===================================================================
--- scummvm/trunk/engines/kyra/staticres.cpp 2008-04-24 13:16:46 UTC (rev 31688)
+++ scummvm/trunk/engines/kyra/staticres.cpp 2008-04-24 13:27:05 UTC (rev 31689)
@@ -2350,7 +2350,31 @@
0xFF, 0xFF, 0xFF, 0xFF
};
-} // End of namespace Kyra
+const uint8 KyraEngine_v3::_itemStringMap[] = {
+ 1, 0, 2, 0, 2, 2, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 0,
+ 0, 0, 0, 0, 0, 0, 3, 1,
+ 2, 0, 2, 2, 0, 0, 0, 0,
+ 0, 0, 1, 2, 0, 2, 0, 2,
+ 0, 0, 2, 0, 0, 0, 0, 1,
+ 1, 0, 2, 2, 0, 0, 2, 0,
+ 0, 2, 0, 2, 2, 0, 0, 2,
+ 0, 0, 0, 0, 2, 0, 0, 2
+};
+const uint KyraEngine_v3::_itemStringMapSize = ARRAYSIZE(KyraEngine_v3::_itemStringMap);
+const uint8 KyraEngine_v3::_itemStringPickUp[] = {
+ 0x4, 0x7, 0x0, 0xA
+};
+const uint8 KyraEngine_v3::_itemStringDrop[] = {
+ 0x5, 0x8, 0x1, 0xB
+};
+
+const uint8 KyraEngine_v3::_itemStringInv[] = {
+ 0x6, 0x9, 0x2, 0xC
+};
+
+} // End of namespace Kyra
+
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