Skip to content

Commit

Permalink
ACCESS: MM - Remove combine item feature and table
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Feb 3, 2015
1 parent 4ab79fa commit af66413
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 67 deletions.
20 changes: 13 additions & 7 deletions engines/access/inventory.cpp
Expand Up @@ -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) {
Expand Down Expand Up @@ -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];
Expand Down
58 changes: 0 additions & 58 deletions engines/access/martian/martian_resources.cpp
Expand Up @@ -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 };
Expand Down
2 changes: 0 additions & 2 deletions engines/access/martian/martian_resources.h
Expand Up @@ -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[];
Expand Down

0 comments on commit af66413

Please sign in to comment.