aboutsummaryrefslogtreecommitdiff
path: root/engines/access
diff options
context:
space:
mode:
authorStrangerke2015-02-03 07:32:43 +0100
committerStrangerke2015-02-03 07:32:43 +0100
commitaf664130da2f08c7f71073284a4a91bbefbfbdb6 (patch)
tree91538682d0ea0060e9ff92515f9e420d20a18f2d /engines/access
parent4ab79fa060c3a621c63ce35def837e6d5217cb53 (diff)
downloadscummvm-rg350-af664130da2f08c7f71073284a4a91bbefbfbdb6.tar.gz
scummvm-rg350-af664130da2f08c7f71073284a4a91bbefbfbdb6.tar.bz2
scummvm-rg350-af664130da2f08c7f71073284a4a91bbefbfbdb6.zip
ACCESS: MM - Remove combine item feature and table
Diffstat (limited to 'engines/access')
-rw-r--r--engines/access/inventory.cpp20
-rw-r--r--engines/access/martian/martian_resources.cpp58
-rw-r--r--engines/access/martian/martian_resources.h2
3 files changed, 13 insertions, 67 deletions
diff --git a/engines/access/inventory.cpp b/engines/access/inventory.cpp
index 1d78839606..28a5cc2746 100644
--- a/engines/access/inventory.cpp
+++ b/engines/access/inventory.cpp
@@ -31,10 +31,17 @@ namespace Access {
void InventoryEntry::load(const Common::String &name, const int *data) {
_value = ITEM_NOT_FOUND;
_name = name;
- _otherItem1 = *data++;
- _newItem1 = *data++;
- _otherItem2 = *data++;
- _newItem2 = *data;
+ if (data) {
+ _otherItem1 = *data++;
+ _newItem1 = *data++;
+ _otherItem2 = *data++;
+ _newItem2 = *data;
+ } else {
+ _otherItem1 = -1;
+ _newItem1 = -1;
+ _otherItem2 = -1;
+ _newItem2 = -1;
+ }
}
int InventoryEntry::checkItem(int itemId) {
@@ -69,16 +76,15 @@ InventoryManager::InventoryManager(AccessEngine *vm) : Manager(vm) {
break;
case GType_MartianMemorandum:
names = Martian::INVENTORY_NAMES;
- combineP = &Martian::COMBO_TABLE[0][0];
+ combineP = nullptr;
_inv.resize(55);
break;
default:
error("Unknown game");
}
- for (uint i = 0; i < _inv.size(); ++i, combineP += 4) {
+ for (uint i = 0; i < _inv.size(); ++i, combineP += 4)
_inv[i].load(names[i], combineP);
- }
for (uint i = 0; i < 26; ++i) {
const int *r = INVCOORDS[i];
diff --git a/engines/access/martian/martian_resources.cpp b/engines/access/martian/martian_resources.cpp
index 72156ec52a..9196395756 100644
--- a/engines/access/martian/martian_resources.cpp
+++ b/engines/access/martian/martian_resources.cpp
@@ -712,64 +712,6 @@ const byte *const CHARTBL_MM[] = {
MMCHAR_25, MMCHAR_26, MMCHAR_27
};
-// TODO: Fix that array
-const int COMBO_TABLE[54][4] = {
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 },
- { -1, -1, -1, -1 }
-};
-
const int SIDEOFFR[] = { 4, 0, 7, 10, 3, 1, 2, 13, 0, 0, 0, 0 };
const int SIDEOFFL[] = { 11, 6, 1, 4, 10, 6, 1, 4, 0, 0, 0, 0 };
const int SIDEOFFU[] = { 1, 2, 0, 2, 2, 1, 1, 0, 0, 0, 0, 0 };
diff --git a/engines/access/martian/martian_resources.h b/engines/access/martian/martian_resources.h
index cf74cbbbf0..f416cff16c 100644
--- a/engines/access/martian/martian_resources.h
+++ b/engines/access/martian/martian_resources.h
@@ -49,8 +49,6 @@ extern const int ROOM_NUMB;
extern const byte *const CHARTBL_MM[];
-extern const int COMBO_TABLE[54][4];
-
extern const int SIDEOFFR[];
extern const int SIDEOFFL[];
extern const int SIDEOFFU[];