aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-28 15:29:59 -0800
committerFilippos Karapetis2011-12-28 15:29:59 -0800
commit7f977fca7b25a0b5d3104218edc017f32d2886f6 (patch)
tree733a60186249607ec0d842d927c88ab35a60b2de /engines
parentce0c4d31e071663abfe31440780c8ed353906782 (diff)
parent93ee179641122d47cda3483a85e39b3256f5ce92 (diff)
downloadscummvm-rg350-7f977fca7b25a0b5d3104218edc017f32d2886f6.tar.gz
scummvm-rg350-7f977fca7b25a0b5d3104218edc017f32d2886f6.tar.bz2
scummvm-rg350-7f977fca7b25a0b5d3104218edc017f32d2886f6.zip
Merge pull request #159 from fingolfin/dreamweb-cleanup
Dreamweb cleanup
Diffstat (limited to 'engines')
-rw-r--r--engines/dreamweb/dreamweb.cpp2
-rw-r--r--engines/dreamweb/dreamweb.h34
-rw-r--r--engines/dreamweb/keypad.cpp75
-rw-r--r--engines/dreamweb/newplace.cpp22
-rw-r--r--engines/dreamweb/object.cpp11
-rw-r--r--engines/dreamweb/people.cpp6
-rw-r--r--engines/dreamweb/print.cpp4
-rw-r--r--engines/dreamweb/saveload.cpp45
-rw-r--r--engines/dreamweb/stubs.cpp75
-rw-r--r--engines/dreamweb/talk.cpp10
-rw-r--r--engines/dreamweb/use.cpp2
11 files changed, 87 insertions, 199 deletions
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp
index e790baa3e3..67e72ebf7c 100644
--- a/engines/dreamweb/dreamweb.cpp
+++ b/engines/dreamweb/dreamweb.cpp
@@ -181,8 +181,6 @@ DreamWebEngine::DreamWebEngine(OSystem *syst, const DreamWebGameDescription *gam
_symbolBotX = 0;
_symbolBotNum = 0;
_symbolBotDir = 0;
- _dumpX = 0;
- _dumpY = 0;
_walkAndExam = 0;
_walkExamType = 0;
_walkExamNum = 0;
diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h
index a38c08f3d0..7e6ca1ddd7 100644
--- a/engines/dreamweb/dreamweb.h
+++ b/engines/dreamweb/dreamweb.h
@@ -196,6 +196,20 @@ protected:
// from keypad.cpp
uint8 _pressList[6];
+ uint8 _pressed;
+ uint16 _pressPointer;
+ uint8 _graphicPress;
+ uint8 _pressCount;
+ uint8 _lightCount;
+ uint8 _folderPage;
+ uint8 _diaryPage;
+ uint8 _menuCount;
+ uint8 _symbolTopX;
+ uint8 _symbolTopNum;
+ int8 _symbolTopDir;
+ uint8 _symbolBotX;
+ uint8 _symbolBotNum;
+ int8 _symbolBotDir;
// from monitor.cpp
char _inputLine[64];
@@ -393,22 +407,6 @@ public:
uint8 _watchDump;
uint8 _logoNum;
uint8 _oldLogoNum;
- uint8 _pressed;
- uint16 _pressPointer;
- uint8 _graphicPress;
- uint8 _pressCount;
- uint8 _lightCount;
- uint8 _folderPage;
- uint8 _diaryPage;
- uint8 _menuCount;
- uint8 _symbolTopX;
- uint8 _symbolTopNum;
- uint8 _symbolTopDir;
- uint8 _symbolBotX;
- uint8 _symbolBotNum;
- uint8 _symbolBotDir;
- uint16 _dumpX;
- uint16 _dumpY;
uint8 _walkAndExam;
uint8 _walkExamType;
uint8 _walkExamNum;
@@ -489,7 +487,6 @@ public:
void showOuterPad();
void dumpKeypad();
void dumpSymbol();
- void dumpSymBox();
void quitSymbol();
void enterCode(uint8 digit0, uint8 digit1, uint8 digit2, uint8 digit3);
@@ -817,7 +814,9 @@ public:
void roomName();
void showIcon();
void eraseOldObs();
+ void commandOnlyCond(uint8 command, uint8 commandType);
void commandOnly(uint8 command);
+ void commandWithOb(uint8 command, uint8 type, uint8 index);
void blank();
void setTopLeft();
void setTopRight();
@@ -887,7 +886,6 @@ public:
void makeMainScreen();
void showWatchReel();
void watchReel();
- void commandWithOb(uint8 command, uint8 type, uint8 index);
void examineObText();
void blockNameText();
void personNameText();
diff --git a/engines/dreamweb/keypad.cpp b/engines/dreamweb/keypad.cpp
index 30d44d3c73..2a31652ace 100644
--- a/engines/dreamweb/keypad.cpp
+++ b/engines/dreamweb/keypad.cpp
@@ -112,10 +112,7 @@ void DreamWebEngine::loadKeypad() {
}
void DreamWebEngine::quitKey() {
- if (_commandType != 222) {
- _commandType = 222;
- commandOnly(4);
- }
+ commandOnlyCond(4, 222);
if (_mouseButton != _oldButton && (_mouseButton & 1))
_getBack = 1;
@@ -177,11 +174,7 @@ void DreamWebEngine::buttonEnter() {
}
void DreamWebEngine::buttonPress(uint8 buttonId) {
- uint8 commandType = 100 + buttonId;
- if (_commandType != commandType) {
- _commandType = commandType;
- commandOnly(buttonId + 4);
- }
+ commandOnlyCond(buttonId + 4, buttonId + 100);
if ((_mouseButton & 1) && (_mouseButton != _oldButton)) {
_pressed = buttonId;
_graphicPress = buttonId + 21;
@@ -338,10 +331,7 @@ void DreamWebEngine::nextFolder() {
blank();
return;
}
- if (_commandType != 201) {
- _commandType = 201;
- commandOnly(16);
- }
+ commandOnlyCond(16, 201);
if ((_mouseButton == 1) && (_mouseButton != _oldButton)) {
++_folderPage;
folderHints();
@@ -380,10 +370,7 @@ void DreamWebEngine::lastFolder() {
blank();
return;
}
- if (_commandType != 202) {
- _commandType = 202;
- commandOnly(17);
- }
+ commandOnlyCond(17, 202);
if ((_mouseButton == 1) && (_mouseButton != _oldButton)) {
--_folderPage;
@@ -564,10 +551,7 @@ void DreamWebEngine::quitSymbol() {
return;
};
- if (_commandType != 222) {
- _commandType = 222;
- commandOnly(18);
- }
+ commandOnlyCond(18, 222);
if (_mouseButton == _oldButton)
return; // notqs
@@ -584,13 +568,10 @@ void DreamWebEngine::setTopLeft() {
return;
}
- if (_commandType != 210) {
- _commandType = 210;
- commandOnly(19);
- }
+ commandOnlyCond(19, 210);
if (_mouseButton != 0)
- _symbolTopDir = 0xFF;
+ _symbolTopDir = -1;
}
void DreamWebEngine::setTopRight() {
@@ -599,13 +580,10 @@ void DreamWebEngine::setTopRight() {
return;
}
- if (_commandType != 211) {
- _commandType = 211;
- commandOnly(20);
- }
+ commandOnlyCond(20, 211);
if (_mouseButton != 0)
- _symbolTopDir = 1;
+ _symbolTopDir = +1;
}
void DreamWebEngine::setBotLeft() {
@@ -614,13 +592,10 @@ void DreamWebEngine::setBotLeft() {
return;
}
- if (_commandType != 212) {
- _commandType = 212;
- commandOnly(21);
- }
+ commandOnlyCond(21, 212);
if (_mouseButton != 0)
- _symbolBotDir = 0xFF;
+ _symbolBotDir = -1;
}
void DreamWebEngine::setBotRight() {
@@ -629,13 +604,10 @@ void DreamWebEngine::setBotRight() {
return;
}
- if (_commandType != 213) {
- _commandType = 213;
- commandOnly(22);
- }
+ commandOnlyCond(22, 213);
if (_mouseButton != 0)
- _symbolBotDir = 1;
+ _symbolBotDir = +1;
}
void DreamWebEngine::dumpSymbol() {
@@ -672,7 +644,7 @@ void DreamWebEngine::updateSymbolTop() {
if (!_symbolTopDir)
return; // topfinished
- if (_symbolTopDir == (byte)-1) {
+ if (_symbolTopDir == -1) {
// Backward
_symbolTopX--;
if (_symbolTopX != (byte)-1) {
@@ -709,7 +681,7 @@ void DreamWebEngine::updateSymbolBot() {
if (!_symbolBotDir)
return; // botfinished
- if (_symbolBotDir == (byte)-1) {
+ if (_symbolBotDir == -1) {
// Backward
_symbolBotX--;
if (_symbolBotX != (byte)-1) {
@@ -742,13 +714,6 @@ void DreamWebEngine::updateSymbolBot() {
}
}
-void DreamWebEngine::dumpSymBox() {
- if (_dumpX != 0xFFFF) {
- multiDump(_dumpX, _dumpY, 30, 77);
- _dumpX = 0xFFFF;
- }
-}
-
void DreamWebEngine::useDiary() {
getRidOfReels();
loadIntoTemp("DREAMWEB.G14");
@@ -848,10 +813,7 @@ void DreamWebEngine::dumpDiaryKeys() {
}
void DreamWebEngine::diaryKeyP() {
- if (_commandType != 214) {
- _commandType = 214;
- commandOnly(23);
- }
+ commandOnlyCond(23, 214);
if (!_mouseButton ||
_oldButton == _mouseButton ||
@@ -868,10 +830,7 @@ void DreamWebEngine::diaryKeyP() {
}
void DreamWebEngine::diaryKeyN() {
- if (_commandType != 213) {
- _commandType = 213;
- commandOnly(23);
- }
+ commandOnlyCond(23, 213);
if (!_mouseButton ||
_oldButton == _mouseButton ||
diff --git a/engines/dreamweb/newplace.cpp b/engines/dreamweb/newplace.cpp
index 248f04a4d9..8083055da6 100644
--- a/engines/dreamweb/newplace.cpp
+++ b/engines/dreamweb/newplace.cpp
@@ -103,10 +103,7 @@ void DreamWebEngine::showCity() {
}
void DreamWebEngine::lookAtPlace() {
- if (_commandType != 224) {
- _commandType = 224;
- commandOnly(27);
- }
+ commandOnlyCond(27, 224);
if (!(_mouseButton & 1) ||
_mouseButton == _oldButton ||
@@ -154,7 +151,7 @@ void DreamWebEngine::locationPic() {
showFrame(_tempGraphics, 104, 140 + 14, 3, 0); // Currently in this location
const uint8 *string = (const uint8 *)_travelText.getString(_destPos);
- DreamWebEngine::printDirect(string, 50, 20, 241, 241 & 1);
+ printDirect(string, 50, 20, 241, 241 & 1);
}
void DreamWebEngine::showArrows() {
@@ -164,10 +161,7 @@ void DreamWebEngine::showArrows() {
}
void DreamWebEngine::nextDest() {
- if (_commandType != 218) {
- _commandType = 218;
- commandOnly(28);
- }
+ commandOnlyCond(28, 218);
if (!(_mouseButton & 1) || _oldButton == 1)
return; // nodu
@@ -193,10 +187,7 @@ void DreamWebEngine::nextDest() {
}
void DreamWebEngine::lastDest() {
- if (_commandType != 219) {
- _commandType = 219;
- commandOnly(29);
- }
+ commandOnlyCond(29, 219);
if (!(_mouseButton & 1) || _oldButton == 1)
return; // nodd
@@ -222,10 +213,7 @@ void DreamWebEngine::lastDest() {
}
void DreamWebEngine::destSelect() {
- if (_commandType != 222) {
- _commandType = 222;
- commandOnly(30);
- }
+ commandOnlyCond(30, 222);
if (!(_mouseButton & 1) || _oldButton == 1)
return; // notrav
diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp
index 249c275a3f..443366561a 100644
--- a/engines/dreamweb/object.cpp
+++ b/engines/dreamweb/object.cpp
@@ -30,7 +30,7 @@ void DreamWebEngine::showRyanPage() {
}
void DreamWebEngine::findAllRyan() {
- memset(_ryanInvList, 0xff, 60);
+ memset(_ryanInvList, 0xff, sizeof(_ryanInvList));
for (size_t i = 0; i < kNumexobjects; ++i) {
const DynObject *extra = getExAd(i);
if (extra->mapad[0] != kExObjectType)
@@ -218,10 +218,7 @@ void DreamWebEngine::inventory() {
return;
}
- if (_commandType != 239) {
- _commandType = 239;
- commandOnly(32);
- }
+ commandOnlyCond(32, 239);
if (_mouseButton == _oldButton)
return;
@@ -686,12 +683,12 @@ void DreamWebEngine::dropObject() {
return;
}
- if (compare(_itemFrame, 4, "GUNA") || compare(_itemFrame, 4, "SHLD")) {
+ if (compare(_itemFrame, kExObjectType, "GUNA") || compare(_itemFrame, kExObjectType, "SHLD")) {
cantDrop();
return;
}
- _objectType = 4;
+ _objectType = kExObjectType;
DynObject *object = getExAd(_itemFrame);
object->mapad[0] = 0;
object->mapad[1] = ((_ryanX + 4) >> 4) + _mapX;
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 98f36a90cc..0f51adde17 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -343,7 +343,7 @@ void DreamWebEngine::madmansTelly(ReelRoutine &routine) {
void DreamWebEngine::smokeBloke(ReelRoutine &routine) {
if (_vars._rockstarDead == 0) {
if (routine.b7 & 128)
- DreamWebEngine::setLocation(5);
+ setLocation(5);
}
if (checkSpeed(routine)) {
if (routine.reelPointer() == 100) {
@@ -939,7 +939,7 @@ void DreamWebEngine::mugger(ReelRoutine &routine) {
_objectType = kExObjectType;
removeObFromInv();
makeMainScreen();
- DreamWebEngine::setupTimedUse(48, 70, 10, 68 - 32, 54 + 64);
+ setupTimedUse(48, 70, 10, 68 - 32, 54 + 64);
_vars._beenMugged = 1;
}
}
@@ -950,7 +950,7 @@ void DreamWebEngine::businessMan(ReelRoutine &routine) {
_pointerMode = 0;
_vars._watchingTime = 2;
if (routine.reelPointer() == 2)
- DreamWebEngine::setupTimedUse(49, 30, 1, 68, 174); // First
+ setupTimedUse(49, 30, 1, 68, 174); // First
if (routine.reelPointer() == 95) {
// Businessman combat won - end
diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp
index a293aa74f9..24e0183a07 100644
--- a/engines/dreamweb/print.cpp
+++ b/engines/dreamweb/print.cpp
@@ -269,7 +269,7 @@ void DreamWebEngine::rollEndCreditsGameWon() {
uint16 y = 10 - j;
const uint8 *tmp_str = string;
for (int k = 0; k < 18; ++k) {
- DreamWebEngine::printDirect(&tmp_str, 75, &y, 160 + 1, true);
+ printDirect(&tmp_str, 75, &y, 160 + 1, true);
y += linespacing;
}
@@ -308,7 +308,7 @@ void DreamWebEngine::rollEndCreditsGameLost() {
uint16 y = 10 - j;
const uint8 *tmp_str = string;
for (int k = 0; k < 18; ++k) {
- DreamWebEngine::printDirect(&tmp_str, 25, &y, 160 + 1, true);
+ printDirect(&tmp_str, 25, &y, 160 + 1, true);
y += linespacing;
}
diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp
index 29f1b916a4..386319db34 100644
--- a/engines/dreamweb/saveload.cpp
+++ b/engines/dreamweb/saveload.cpp
@@ -107,10 +107,7 @@ void syncGameVars(Common::Serializer &s, GameVars &vars) {
}
void DreamWebEngine::loadGame() {
- if (_commandType != 246) {
- _commandType = 246;
- commandOnly(41);
- }
+ commandOnlyCond(41, 246);
if (_mouseButton == _oldButton)
return; // "noload"
if (_mouseButton == 1)
@@ -204,10 +201,7 @@ void DreamWebEngine::saveGame() {
return;
}
- if (_commandType != 247) {
- _commandType = 247;
- commandOnly(44);
- }
+ commandOnlyCond(44, 247);
if (_mouseButton != 1)
return;
@@ -304,10 +298,7 @@ void DreamWebEngine::saveLoad() {
blank();
return;
}
- if (_commandType != 253) {
- _commandType = 253;
- commandOnly(43);
- }
+ commandOnlyCond(43, 253);
if ((_mouseButton != _oldButton) && (_mouseButton & 1))
doSaveLoad();
}
@@ -384,10 +375,7 @@ void DreamWebEngine::getBackFromOps() {
}
void DreamWebEngine::getBackToOps() {
- if (_commandType != 201) {
- _commandType = 201;
- commandOnly(42);
- }
+ commandOnlyCond(42, 201);
if (_mouseButton != _oldButton) {
if (_mouseButton & 1) {
@@ -411,10 +399,7 @@ void DreamWebEngine::showDiscOps() {
}
void DreamWebEngine::discOps() {
- if (_commandType != 249) {
- _commandType = 249;
- commandOnly(43);
- }
+ commandOnlyCond(43, 249);
if (_mouseButton == _oldButton || !(_mouseButton & 1))
return;
@@ -450,10 +435,7 @@ void DreamWebEngine::discOps() {
}
void DreamWebEngine::actualSave() {
- if (_commandType != 222) {
- _commandType = 222;
- commandOnly(44);
- }
+ commandOnlyCond(44, 222);
if (!(_mouseButton & 1))
return;
@@ -477,10 +459,7 @@ void DreamWebEngine::actualSave() {
}
void DreamWebEngine::actualLoad() {
- if (_commandType != 221) {
- _commandType = 221;
- commandOnly(41);
- }
+ commandOnlyCond(41, 221);
if (_mouseButton == _oldButton || _mouseButton != 1)
return;
@@ -702,10 +681,7 @@ uint DreamWebEngine::scanForNames() {
}
void DreamWebEngine::loadOld() {
- if (_commandType != 252) {
- _commandType = 252;
- commandOnly(48);
- }
+ commandOnlyCond(48, 252);
if (!(_mouseButton & 1))
return;
@@ -793,10 +769,7 @@ void DreamWebEngine::checkInput() {
}
void DreamWebEngine::selectSlot() {
- if (_commandType != 244) {
- _commandType = 244;
- commandOnly(45);
- }
+ commandOnlyCond(45, 244);
if (_mouseButton != 1 || _mouseButton == _oldButton)
return; // noselslot
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index ef10aad0dc..3602558b8b 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -979,10 +979,7 @@ void DreamWebEngine::getTime() {
}
void DreamWebEngine::DOSReturn() {
- if (_commandType != 250) {
- _commandType = 250;
- commandOnly(46);
- }
+ commandOnlyCond(46, 250);
if (_mouseButton & 1) {
_mouseButton = 0;
@@ -1120,6 +1117,13 @@ void DreamWebEngine::delTextLine() {
multiPut(_textUnder, _textAddressX, _textAddressY, kUnderTextSizeX, kUnderTextSizeY);
}
+void DreamWebEngine::commandOnlyCond(uint8 command, uint8 commandType) {
+ if (_commandType != commandType) {
+ _commandType = commandType;
+ commandOnly(command);
+ }
+}
+
void DreamWebEngine::commandOnly(uint8 command) {
delTextLine();
const uint8 *string = (const uint8 *)_commandText.getString(command);
@@ -1181,16 +1185,16 @@ bool DreamWebEngine::checkIfEx(uint8 x, uint8 y) {
}
const uint8 *DreamWebEngine::findObName(uint8 type, uint8 index) {
- if (type == 5) {
- uint16 i = 64 * (index & 127);
- return (const uint8 *)_personText.getString(i);
- } else if (type == 4) {
+ switch (type) {
+ case 5:
+ return (const uint8 *)_personText.getString(64 * (index & 127));
+ case kExObjectType:
return (const uint8 *)_exText.getString(index);
- } else if (type == 2) {
+ case kFreeObjectType:
return (const uint8 *)_freeDesc.getString(index);
- } else if (type == 1) {
+ case kSetObjectType1:
return (const uint8 *)_setDesc.getString(index);
- } else {
+ default:
return (const uint8 *)_blockDesc.getString(index);
}
}
@@ -1768,10 +1772,7 @@ void DreamWebEngine::zoomOnOff() {
return;
}
- if (_commandType != 222) {
- _commandType = 222;
- commandOnly(39);
- }
+ commandOnlyCond(39, 222);
if (!(_mouseButton & 1) || (_mouseButton == _oldButton))
return;
@@ -1965,10 +1966,7 @@ void DreamWebEngine::look() {
blank();
return;
}
- if (_commandType != 241) {
- _commandType = 241;
- commandOnly(25);
- }
+ commandOnlyCond(25, 241);
if ((_mouseButton == 1) && (_mouseButton != _oldButton))
doLook();
}
@@ -2300,10 +2298,7 @@ void DreamWebEngine::readKey() {
}
void DreamWebEngine::newGame() {
- if (_commandType != 251) {
- _commandType = 251;
- commandOnly(47);
- }
+ commandOnlyCond(47, 251);
if (_mouseButton == 1)
_getBack = 3;
@@ -2377,10 +2372,7 @@ void DreamWebEngine::redrawMainScrn() {
}
void DreamWebEngine::blank() {
- if (_commandType != 199) {
- _commandType = 199;
- commandOnly(0);
- }
+ commandOnlyCond(0, 199);
}
void DreamWebEngine::allPointer() {
@@ -2537,10 +2529,7 @@ bool DreamWebEngine::isSetObOnMap(uint8 index) {
}
void DreamWebEngine::examineInventory() {
- if (_commandType != 249) {
- _commandType = 249;
- commandOnly(32);
- }
+ commandOnlyCond(32, 249);
if (!(_mouseButton & 1))
return;
@@ -2663,10 +2652,7 @@ void DreamWebEngine::madmanRun() {
return;
}
- if (_commandType != 211) {
- _commandType = 211;
- commandOnly(52);
- }
+ commandOnlyCond(52, 211);
if (_mouseButton == 1 &&
_mouseButton != _oldButton)
@@ -2789,10 +2775,7 @@ void DreamWebEngine::getBack1() {
}
- if (_commandType != 202) {
- _commandType = 202;
- commandOnly(26);
- }
+ commandOnlyCond(26, 202);
if (_mouseButton == _oldButton)
return;
@@ -2994,7 +2977,7 @@ void DreamWebEngine::clearBuffers() {
}
void DreamWebEngine::clearChanges() {
- memset(_listOfChanges, 0xFF, 4*kNumChanges);
+ memset(_listOfChanges, 0xFF, sizeof(_listOfChanges));
setupInitialReelRoutines();
@@ -3005,13 +2988,14 @@ void DreamWebEngine::clearChanges() {
memset(_exFrames._frames, 0xFF, kFrameBlocksize);
memset(_exFrames._data, 0xFF, kExframeslen);
- memset(_exData, 0xFF, sizeof(DynObject) * kNumexobjects);
+ memset(_exData, 0xFF, sizeof(_exData));
memset(_exText._offsetsLE, 0xFF, 2*(kNumexobjects+2));
memset(_exText._text, 0xFF, kExtextlen);
- const uint8 initialRoomsCanGo[] = { 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ const uint8 initialRoomsCanGo[16] = { 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
- memcpy(_roomsCanGo, initialRoomsCanGo, 16);
+ assert(sizeof(_roomsCanGo) == sizeof(initialRoomsCanGo));
+ memcpy(_roomsCanGo, initialRoomsCanGo, sizeof(initialRoomsCanGo));
}
void DreamWebEngine::setupInitialVars() {
@@ -3105,10 +3089,7 @@ void DreamWebEngine::edensFlatReminders() {
}
void DreamWebEngine::incRyanPage() {
- if (_commandType != 222) {
- _commandType = 222;
- commandOnly(31);
- }
+ commandOnlyCond(31, 222);
if (_mouseButton == _oldButton || !(_mouseButton & 1))
return;
diff --git a/engines/dreamweb/talk.cpp b/engines/dreamweb/talk.cpp
index 9a94f0f68d..0f59cad895 100644
--- a/engines/dreamweb/talk.cpp
+++ b/engines/dreamweb/talk.cpp
@@ -119,10 +119,7 @@ void DreamWebEngine::moreTalk() {
return;
}
- if (_commandType != 215) {
- _commandType = 215;
- commandOnly(49);
- }
+ commandOnlyCond(49, 215);
if (_mouseButton == _oldButton)
return; // nomore
@@ -245,10 +242,7 @@ void DreamWebEngine::redes() {
return;
}
- if (_commandType != 217) {
- _commandType = 217;
- commandOnly(50);
- }
+ commandOnlyCond(50, 217);
if (!(_mouseButton & 1))
return;
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp
index 58210c1d85..fc0398c7b9 100644
--- a/engines/dreamweb/use.cpp
+++ b/engines/dreamweb/use.cpp
@@ -1450,7 +1450,7 @@ void DreamWebEngine::useAltar() {
_vars._endWatchReel = 174;
_vars._watchSpeed = 1;
_vars._speedCount = 1;
- DreamWebEngine::setupTimedUse(47, 32, 98, 52, 76);
+ setupTimedUse(47, 32, 98, 52, 76);
_getBack = 1;
} else {
showPuzText(23, 300);