From ca7da4cffc7edacd90df408c441a6eca10cc0e55 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 28 Dec 2011 16:21:30 +0100 Subject: DREAMWEB: Rename a member of SetObject & DynObject to objId SetObject::name and DynObject::id are stored at the exact same offset, and have the exact same meaning (see also objectMatches()). Now they also have the same name, objId. --- engines/dreamweb/monitor.cpp | 2 +- engines/dreamweb/object.cpp | 6 +++--- engines/dreamweb/structs.h | 4 ++-- engines/dreamweb/stubs.cpp | 4 ++-- engines/dreamweb/use.cpp | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index 2464326e7d..256478d09b 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -400,7 +400,7 @@ void DreamWebEngine::loadCart() { uint16 objectIndex = findSetObject("INTF"); uint16 cartridgeIndex = checkInside(objectIndex, 1); if (cartridgeIndex != kNumexobjects) - cartridgeId = getExAd(cartridgeIndex)->id[3] + 1; + cartridgeId = getExAd(cartridgeIndex)->objId[3] + 1; if (cartridgeId == 0) loadTextFile(_textFile3, "DREAMWEB.T20"); // monitor file 20 diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp index 8e6436c100..8d4f9bf84a 100644 --- a/engines/dreamweb/object.cpp +++ b/engines/dreamweb/object.cpp @@ -57,7 +57,7 @@ void DreamWebEngine::fillRyan() { } bool DreamWebEngine::isItWorn(const DynObject *object) { - return (object->id[0] == 'W'-'A') && (object->id[1] == 'E'-'A'); + return (object->objId[0] == 'W'-'A') && (object->objId[1] == 'E'-'A'); } void DreamWebEngine::wornError() { @@ -74,8 +74,8 @@ void DreamWebEngine::wornError() { } void DreamWebEngine::makeWorn(DynObject *object) { - object->id[0] = 'W'-'A'; - object->id[1] = 'E'-'A'; + object->objId[0] = 'W'-'A'; + object->objId[1] = 'E'-'A'; } void DreamWebEngine::obToInv(uint8 index, uint8 flag, uint16 x, uint16 y) { diff --git a/engines/dreamweb/structs.h b/engines/dreamweb/structs.h index b34715addf..18b8b280ab 100644 --- a/engines/dreamweb/structs.h +++ b/engines/dreamweb/structs.h @@ -71,7 +71,7 @@ struct SetObject { uint8 b9; uint8 b10; uint8 b11; - uint8 name[4]; + uint8 objId[4]; uint8 b16; uint8 index; uint8 frames[13]; // Table mapping animFrame to sprite frame number @@ -116,7 +116,7 @@ struct DynObject { uint8 objectSize; // the size of an object uint8 turnedOn; uint8 initialLocation; - uint8 id[4]; + uint8 objId[4]; }; struct ObjPos { diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index fb451893a3..bd9de7a23c 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -3696,7 +3696,7 @@ void DreamWebEngine::purgeAnItem() { const DynObject *extraObjects = _exData; for (size_t i = 0; i < kNumexobjects; ++i) { - if (extraObjects[i].mapad[0] && extraObjects[i].id[0] == 255 && + if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255 && extraObjects[i].initialLocation != _realLocation) { deleteExObject(i); return; @@ -3704,7 +3704,7 @@ void DreamWebEngine::purgeAnItem() { } for (size_t i = 0; i < kNumexobjects; ++i) { - if (extraObjects[i].mapad[0] && extraObjects[i].id[0] == 255) { + if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255) { deleteExObject(i); return; } diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp index 6ab8422075..4259d03657 100644 --- a/engines/dreamweb/use.cpp +++ b/engines/dreamweb/use.cpp @@ -1396,7 +1396,7 @@ void DreamWebEngine::usePipe() { showPuzText(36, 300); putBackObStuff(); DynObject *exObject = getExAd(_withObject); - exObject->id[3] = 'F'-'A'; // CUPE (empty cup) -> CUPF (full cup) + exObject->objId[3] = 'F'-'A'; // CUPE (empty cup) -> CUPF (full cup) return; } else if (compare(_withObject, _withType, "CUPF")) { // Already full @@ -1419,7 +1419,7 @@ void DreamWebEngine::useOpenBox() { _vars._progressPoints++; showPuzText(37, 300); DynObject *exObject = getExAd(_withObject); - exObject->id[3] = 'E'-'A'; // CUPF (full cup) -> CUPE (empty cup) + exObject->objId[3] = 'E'-'A'; // CUPF (full cup) -> CUPE (empty cup) _vars._watchingTime = 140; _vars._reelToWatch = 105; _vars._endWatchReel = 181; @@ -1449,7 +1449,7 @@ void DreamWebEngine::runTap() { if (compare(_withObject, _withType, "CUPE")) { // Fill cup from tap DynObject *exObject = getExAd(_withObject); - exObject->id[3] = 'F'-'A'; // CUPE (empty cup) -> CUPF (full cup) + exObject->objId[3] = 'F'-'A'; // CUPE (empty cup) -> CUPF (full cup) playChannel1(8); showPuzText(57, 300); putBackObStuff(); -- cgit v1.2.3