diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/backdrop.cpp | 4 | ||||
-rw-r--r-- | engines/dreamweb/sprite.cpp | 23 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 18 |
3 files changed, 26 insertions, 19 deletions
diff --git a/engines/dreamweb/backdrop.cpp b/engines/dreamweb/backdrop.cpp index 887da70539..1db2663624 100644 --- a/engines/dreamweb/backdrop.cpp +++ b/engines/dreamweb/backdrop.cpp @@ -126,12 +126,10 @@ void DreamWebEngine::makeBackOb(SetObject *objData, uint16 x, uint16 y) { } void DreamWebEngine::showAllObs() { - const unsigned int count = 128; - _setList.clear(); const GraphicsFile &frameBase = _setFrames; - for (size_t i = 0; i < count; ++i) { + for (size_t i = 0; i < 128; ++i) { SetObject *setEntry = &_setDat[i]; uint16 x, y; if (getMapAd(setEntry->mapad, &x, &y) == 0) diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index e662fa6ec3..3ee73d23a3 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -227,20 +227,29 @@ void DreamWebEngine::backObject(Sprite *sprite) { } sprite->delay = objData->delay; - if (objData->type == 6) + switch (objData->type) { + case 6: wideDoor(sprite, objData); - else if (objData->type == 5) + break; + case 5: randomSprite(sprite, objData); - else if (objData->type == 4) + break; + case 4: lockedDoorway(sprite, objData); - else if (objData->type == 3) + break; + case 3: liftSprite(sprite, objData); - else if (objData->type == 2) + break; + case 2: doorway(sprite, objData); - else if (objData->type == 1) + break; + case 1: constant(sprite, objData); - else + break; + default: steady(sprite, objData); + break; + } } void DreamWebEngine::constant(Sprite *sprite, SetObject *objData) { diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index bd9de7a23c..de42f54271 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -1036,13 +1036,6 @@ void DreamWebEngine::lockMon() { } } -void DreamWebEngine::clearAndLoad(uint8 *buf, uint8 c, - unsigned int size, unsigned int maxSize) { - assert(size <= maxSize); - memset(buf, c, maxSize); - readFromFile(buf, size); -} - void DreamWebEngine::startLoading(const Room &room) { _vars._combatCount = 0; _roomsSample = room.roomsSample; @@ -2117,10 +2110,17 @@ void DreamWebEngine::getRidOfAll() { _freeDesc.clear(); } +void DreamWebEngine::clearAndLoad(uint8 *buf, uint8 c, + unsigned int size, unsigned int maxSize) { + assert(size <= maxSize); + memset(buf, c, maxSize); + readFromFile(buf, size); +} + // if skipDat, skip clearing and loading Setdat and Freedat void DreamWebEngine::loadRoomData(const Room &room, bool skipDat) { - const uint16 kSetdatlen = 64*128; - const uint16 kFreedatlen = 16*80; + const uint16 kSetdatlen = 64*128; // == sizeof(_setDat) + const uint16 kFreedatlen = 16*80; // == sizeof(_freeDat) openFile(room.name); |