[Scummvm-git-logs] scummvm master -> 64ff20acbc24b859ff2c66d0f58be900d302ca43
waltervn
walter at vanniftrik-it.nl
Sun Dec 11 16:51:54 CET 2016
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0b6b5a34b0 ADL: Load hires5 dropped item coords
64ff20acbc ADL: Unify inventory opcodes
Commit: 0b6b5a34b0a9dec0bf71b877e552bbf9f2fa1245
https://github.com/scummvm/scummvm/commit/0b6b5a34b0a9dec0bf71b877e552bbf9f2fa1245
Author: Walter van Niftrik (walter at scummvm.org)
Date: 2016-12-11T16:51:14+01:00
Commit Message:
ADL: Load hires5 dropped item coords
Changed paths:
engines/adl/hires5.cpp
diff --git a/engines/adl/hires5.cpp b/engines/adl/hires5.cpp
index 4d52d28..d33fd8a 100644
--- a/engines/adl/hires5.cpp
+++ b/engines/adl/hires5.cpp
@@ -108,6 +108,9 @@ void HiRes5Engine::init() {
stream.reset(_disk->createReadStream(0xe, 0x1, 0x13, 4));
loadItemDescriptions(*stream, kItems);
+ stream.reset(_disk->createReadStream(0x8, 0xd, 0xfd, 1));
+ loadDroppedItemOffsets(*stream, 16);
+
stream.reset(_disk->createReadStream(0xb, 0xa, 0x05, 1));
loadItemPicIndex(*stream, kItems);
Commit: 64ff20acbc24b859ff2c66d0f58be900d302ca43
https://github.com/scummvm/scummvm/commit/64ff20acbc24b859ff2c66d0f58be900d302ca43
Author: Walter van Niftrik (walter at scummvm.org)
Date: 2016-12-11T16:51:14+01:00
Commit Message:
ADL: Unify inventory opcodes
Changed paths:
engines/adl/adl.cpp
engines/adl/adl_v3.cpp
engines/adl/adl_v3.h
engines/adl/adl_v5.cpp
engines/adl/adl_v5.h
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp
index 63b0937..76f5bac 100644
--- a/engines/adl/adl.cpp
+++ b/engines/adl/adl.cpp
@@ -1009,7 +1009,7 @@ int AdlEngine::o1_listInv(ScriptEnv &e) {
for (item = _state.items.begin(); item != _state.items.end(); ++item)
if (item->room == IDI_ANY)
- printMessage(item->description);
+ printString(getItemDescription(*item));
return 0;
}
diff --git a/engines/adl/adl_v3.cpp b/engines/adl/adl_v3.cpp
index ba9e4a0..46af211 100644
--- a/engines/adl/adl_v3.cpp
+++ b/engines/adl/adl_v3.cpp
@@ -62,8 +62,6 @@ void AdlEngine_v3::setupOpcodeTables() {
AdlEngine_v2::setupOpcodeTables();
delete _condOpcodes[0x04];
_condOpcodes[0x04] = new OpcodeV3(this, &AdlEngine_v3::o3_isNounNotInRoom);
- delete _actOpcodes[0x04];
- _actOpcodes[0x04] = new OpcodeV3(this, &AdlEngine_v3::o3_listInv);
}
int AdlEngine_v3::o3_isNounNotInRoom(ScriptEnv &e) {
@@ -85,16 +83,4 @@ int AdlEngine_v3::o3_isNounNotInRoom(ScriptEnv &e) {
return (isAnItem ? 1 : -1);
}
-int AdlEngine_v3::o3_listInv(ScriptEnv &e) {
- OP_DEBUG_0("\tLIST_INVENTORY()");
-
- Common::List<Item>::const_iterator item;
-
- for (item = _state.items.begin(); item != _state.items.end(); ++item)
- if (item->room == IDI_ANY)
- printString(_itemDesc[item->description - 1]);
-
- return 0;
-}
-
} // End of namespace Adl
diff --git a/engines/adl/adl_v3.h b/engines/adl/adl_v3.h
index b0d40f3..ab56d4e 100644
--- a/engines/adl/adl_v3.h
+++ b/engines/adl/adl_v3.h
@@ -41,7 +41,6 @@ protected:
void loadItemDescriptions(Common::SeekableReadStream &stream, byte count);
int o3_isNounNotInRoom(ScriptEnv &e);
- int o3_listInv(ScriptEnv &e);
Common::Array<Common::String> _itemDesc;
};
diff --git a/engines/adl/adl_v5.cpp b/engines/adl/adl_v5.cpp
index cb416e1..7e7c6e4 100644
--- a/engines/adl/adl_v5.cpp
+++ b/engines/adl/adl_v5.cpp
@@ -94,7 +94,7 @@ void AdlEngine_v5::setupOpcodeTables() {
Opcode(o1_varSub);
Opcode(o1_varSet);
// 0x04
- Opcode(o5_listInv);
+ Opcode(o1_listInv);
Opcode(o5_moveItem);
Opcode(o1_setRoom);
Opcode(o2_setCurPic);
@@ -183,18 +183,6 @@ int AdlEngine_v5::o5_isNounNotInRoom(ScriptEnv &e) {
return 1;
}
-int AdlEngine_v5::o5_listInv(ScriptEnv &e) {
- OP_DEBUG_0("\tLIST_INVENTORY()");
-
- Common::List<Item>::const_iterator item;
-
- for (item = _state.items.begin(); item != _state.items.end(); ++item)
- if (item->room == IDI_ANY)
- printString(_itemDesc[item->id - 1]);
-
- return 0;
-}
-
int AdlEngine_v5::o5_moveItem(ScriptEnv &e) {
OP_DEBUG_2("\tSET_ITEM_ROOM(%s, %s)", itemStr(e.arg(1)).c_str(), itemRoomStr(e.arg(2)).c_str());
diff --git a/engines/adl/adl_v5.h b/engines/adl/adl_v5.h
index 5e5e86d..377fe45 100644
--- a/engines/adl/adl_v5.h
+++ b/engines/adl/adl_v5.h
@@ -58,7 +58,6 @@ protected:
int o5_isItemInRoom(ScriptEnv &e);
int o5_isNounNotInRoom(ScriptEnv &e);
int o5_skipOneCommand(ScriptEnv &e);
- int o5_listInv(ScriptEnv &e);
int o5_moveItem(ScriptEnv &e);
int o5_dummy(ScriptEnv &e);
int o5_setTextMode(ScriptEnv &e);
More information about the Scummvm-git-logs
mailing list