From bdb8bdae2a206e736278321d599ed2d1e3ae8b76 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 6 Nov 2012 01:30:33 +0200 Subject: DREAMWEB: Filter out leftover invalid characters in game texts Thanks to eriktorbjorn for spotting the actual problem --- engines/dreamweb/print.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp index 64b9849980..f5a0ed3c15 100644 --- a/engines/dreamweb/print.cpp +++ b/engines/dreamweb/print.cpp @@ -59,9 +59,13 @@ uint8 DreamWebEngine::getNextWord(const GraphicsFile &charSet, const uint8 *stri } void DreamWebEngine::printChar(const GraphicsFile &charSet, uint16* x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height) { - if (c == 255) + // WORKAROUND: Some texts contain leftover tab characters, which will cause + // OOB memory access when showing a character, as all the printable ones are + // from 32 onwards. We compensate for that here by ignoring all the invalid + // characters (0 - 31). + if (c < 32 || c == 255) return; - + uint8 dummyWidth, dummyHeight; if (width == NULL) width = &dummyWidth; -- cgit v1.2.3 From 06a2ac495de588103f4c42bb03597d965965e8cf Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 6 Nov 2012 01:47:03 +0200 Subject: DREAMWEB: Also filter out invalid characters in getNextWord() Thanks again to eriktorbjorn for spotting this. This one should be the last place where we should filter out invalid characters --- engines/dreamweb/print.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp index f5a0ed3c15..d9350e11e4 100644 --- a/engines/dreamweb/print.cpp +++ b/engines/dreamweb/print.cpp @@ -49,7 +49,9 @@ uint8 DreamWebEngine::getNextWord(const GraphicsFile &charSet, const uint8 *stri return 0; } firstChar = modifyChar(firstChar); - if (firstChar != 255) { + // WORKAROUND: Also filter out invalid characters here (refer to the + // workaround in printChar() below for more info). + if (firstChar >= 32 && firstChar != 255) { uint8 secondChar = *string; uint8 width = charSet._frames[firstChar - 32 + _charShift].width; width = kernChars(firstChar, secondChar, width); -- cgit v1.2.3 From 20afbe95e64b4368d1380a533598fea8aa90dbd5 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 6 Nov 2012 12:08:55 +0200 Subject: DREAMWEB: Fix bug #3582582 - "GUI: "Grid View" Loader Triggers Immediately in Dreamweb" --- engines/dreamweb/saveload.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp index ea9cdc0249..162ad53cde 100644 --- a/engines/dreamweb/saveload.cpp +++ b/engines/dreamweb/saveload.cpp @@ -156,8 +156,16 @@ void DreamWebEngine::doLoad(int savegameId) { } else { if (savegameId == -1) { - // Open dialog to get savegameId + // Wait till both mouse buttons are up. We should wait till the user + // releases the mouse button, otherwise the follow-up mouseup event + // will trigger a load of the save slot under the mouse cursor. Fixes + // bug #3582582. + while (_oldMouseState > 0) { + readMouse(); + g_system->delayMillis(10); + } + // Open dialog to get savegameId GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false); savegameId = dialog->runModalWithCurrentTarget(); delete dialog; @@ -241,6 +249,15 @@ void DreamWebEngine::saveGame() { } return; } else { + // Wait till both mouse buttons are up. We should wait till the user + // releases the mouse button, otherwise the follow-up mouseup event + // will trigger a save into the save slot under the mouse cursor. Fixes + // bug #3582582. + while (_oldMouseState > 0) { + readMouse(); + g_system->delayMillis(10); + } + GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true); int savegameId = dialog->runModalWithCurrentTarget(); Common::String game_description = dialog->getResultString(); -- cgit v1.2.3 From 42b8f3db4d3fbddb2e59db761b8b1f488e279071 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 15 Nov 2012 14:20:53 +0200 Subject: DREAMWEB: Add an extra line showing the available terminal commands This is possible, since the game is freeware now. It is very helpful when playing the game in order to avoid referring to the manual. The extra help text is shown when the player uses the 'help' command inside the game terminal. Also, the list of games where copy protection is skipped has been reordered alphabetically in the README --- engines/dreamweb/dreamweb.cpp | 1 + engines/dreamweb/dreamweb.h | 1 + engines/dreamweb/monitor.cpp | 7 +++++++ 3 files changed, 9 insertions(+) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index 5f5d627553..cc9c9e6f33 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -374,6 +374,7 @@ Common::Error DreamWebEngine::run() { ConfMan.registerDefault("bright_palette", true); _hasSpeech = Common::File::exists(_speechDirName + "/r01c0000.raw") && !ConfMan.getBool("speech_mute"); _brightPalette = ConfMan.getBool("bright_palette"); + _copyProtection = ConfMan.getBool("copy_protection"); _timer->installTimerProc(vSyncInterrupt, 1000000 / 70, this, "dreamwebVSync"); dreamweb(); diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index a4597b1867..8cb903abcd 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -316,6 +316,7 @@ public: uint16 _charShift; uint8 _kerning; bool _brightPalette; + bool _copyProtection; uint8 _roomLoaded; uint8 _didZoom; uint16 _lineSpacing; diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index 1886a80b6a..83563c8005 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -149,6 +149,13 @@ bool DreamWebEngine::execCommand() { return true; case 1: monMessage(6); + // An extra addition in ScummVM: available commands. + // Since the reference to the game manual is a form of copy protection, + // this extra text is wrapped around the common copy protection check, + // to keep it faithful to the original, if requested. + if (!_copyProtection) { + monPrint("VALID COMMANDS ARE EXIT, HELP, LIST, READ, LOGON, KEYS"); + } break; case 2: dirCom(); -- cgit v1.2.3 From bcee44793fe1444bb08fa15e057ee254acae6bb4 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 29 Nov 2012 01:39:08 +0000 Subject: DREAMWEB: Simplify _lastHardKey usage and migrate to Common::KeyCode. This improves readability and should help with dealing with changes to fix bug #3590814 ("DREAMWEB: M key does not work in Network"). --- engines/dreamweb/dreamweb.cpp | 23 +++------ engines/dreamweb/dreamweb.h | 3 +- engines/dreamweb/people.cpp | 2 +- engines/dreamweb/print.cpp | 4 +- engines/dreamweb/stubs.cpp | 4 +- engines/dreamweb/titles.cpp | 114 +++++++++++++++++++++--------------------- 6 files changed, 72 insertions(+), 78 deletions(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index cc9c9e6f33..1bcf6298b3 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -208,7 +208,7 @@ DreamWebEngine::DreamWebEngine(OSystem *syst, const DreamWebGameDescription *gam _addToRed = 0; _addToBlue = 0; _lastSoundReel = 0; - _lastHardKey = 0; + _lastHardKey = Common::KEYCODE_INVALID; _bufferIn = 0; _bufferOut = 0; _blinkFrame = 23; @@ -263,7 +263,7 @@ void DreamWebEngine::waitForVSync() { void DreamWebEngine::quit() { _quitRequested = true; - _lastHardKey = 1; + _lastHardKey = Common::KEYCODE_ESCAPE; } void DreamWebEngine::processEvents() { @@ -274,7 +274,7 @@ void DreamWebEngine::processEvents() { _sound->soundHandler(); Common::Event event; - int softKey, hardKey; + int softKey; while (_eventMan->pollEvent(event)) { switch(event.type) { case Common::EVENT_RTL: @@ -309,28 +309,21 @@ void DreamWebEngine::processEvents() { return; //do not pass ctrl + key to the engine } - // Some parts of the ASM code uses the hardware key - // code directly. We don't have that code, so we fake - // it for the keys where it's needed and assume it's - // 0 (which is actually an invalid value, as far as I - // know) otherwise. - - hardKey = 0; + // Some parts of the code uses the hardware key + // code directly. switch (event.kbd.keycode) { case Common::KEYCODE_ESCAPE: - hardKey = 1; + _lastHardKey = Common::KEYCODE_ESCAPE; break; case Common::KEYCODE_SPACE: - hardKey = 57; + _lastHardKey = Common::KEYCODE_SPACE; break; default: - hardKey = 0; + _lastHardKey = Common::KEYCODE_INVALID; break; } - _lastHardKey = hardKey; - // The rest of the keys are converted to ASCII. This // is fairly restrictive, and eventually we may want // to let through more keys. I think this is mostly to diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index 8cb903abcd..419f20207f 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -25,6 +25,7 @@ #include "common/error.h" #include "common/file.h" +#include "common/keyboard.h" #include "common/random.h" #include "common/rect.h" #include "common/savefile.h" @@ -420,7 +421,7 @@ public: uint8 _addToRed; uint8 _addToBlue; uint16 _lastSoundReel; - uint8 _lastHardKey; + Common::KeyCode _lastHardKey; uint16 _bufferIn; uint16 _bufferOut; uint8 _blinkFrame; diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp index dbb81406cd..53f04d482b 100644 --- a/engines/dreamweb/people.cpp +++ b/engines/dreamweb/people.cpp @@ -194,7 +194,7 @@ void DreamWebEngine::madman(ReelRoutine &routine) { if (newReelPointer == 66) { ++_vars._combatCount; - if (_lastHardKey == 1) // ESC pressed, skip the mad man's speech + if (_lastHardKey == Common::KEYCODE_ESCAPE) // ESC pressed, skip the mad man's speech _vars._combatCount = _speechCount = (hasSpeech() ? 65 : 63); madmanText(); diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp index d9350e11e4..bc75b97e71 100644 --- a/engines/dreamweb/print.cpp +++ b/engines/dreamweb/print.cpp @@ -321,7 +321,7 @@ void DreamWebEngine::rollEndCreditsGameLost() { waitForVSync(); multiDump(25, 20, 160, 160); - if (_lastHardKey == 1) + if (_lastHardKey == Common::KEYCODE_ESCAPE) return; } @@ -331,7 +331,7 @@ void DreamWebEngine::rollEndCreditsGameLost() { c = *string++; } while (c != ':' && c != 0); - if (_lastHardKey == 1) + if (_lastHardKey == Common::KEYCODE_ESCAPE) return; } diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index f235f7c2fd..cf072fa790 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -1056,7 +1056,7 @@ void DreamWebEngine::lockMon() { // key because calling readkey() drains characters from the input // buffer, we we want the user to be able to type ahead while the text // is being printed. - if (_lastHardKey == 57) { + if (_lastHardKey == Common::KEYCODE_SPACE) { // Clear the keyboard buffer. Otherwise the space that caused // the pause will be read immediately unpause the game. do { @@ -1072,7 +1072,7 @@ void DreamWebEngine::lockMon() { } // Forget the last "hard" key, otherwise the space that caused // the unpausing will immediately re-pause the game. - _lastHardKey = 0; + _lastHardKey = Common::KEYCODE_INVALID; lockLightOff(); } } diff --git a/engines/dreamweb/titles.cpp b/engines/dreamweb/titles.cpp index f005279ba0..9a63b276ff 100644 --- a/engines/dreamweb/titles.cpp +++ b/engines/dreamweb/titles.cpp @@ -105,34 +105,34 @@ void DreamWebEngine::bibleQuote() { fadeScreenUps(); hangOne(80); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "biblequotearly" } hangOne(560); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "biblequotearly" } fadeScreenDowns(); hangOne(200); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "biblequotearly" } _sound->cancelCh0(); - _lastHardKey = 0; + _lastHardKey = Common::KEYCODE_INVALID; } void DreamWebEngine::hangOne(uint16 delay) { do { waitForVSync(); - if (_lastHardKey == 1) + if (_lastHardKey == Common::KEYCODE_ESCAPE) return; // "hangonearly" } while (--delay); } @@ -150,8 +150,8 @@ void DreamWebEngine::intro() { fadeScreenUps(); runIntroSeq(); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "introearly" } @@ -160,8 +160,8 @@ void DreamWebEngine::intro() { loadIntroRoom(); runIntroSeq(); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "introearly" } @@ -170,8 +170,8 @@ void DreamWebEngine::intro() { loadIntroRoom(); runIntroSeq(); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "introearly" } @@ -181,15 +181,15 @@ void DreamWebEngine::intro() { loadIntroRoom(); runIntroSeq(); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "introearly" } getRidOfTempText(); clearBeforeLoad(); - _lastHardKey = 0; + _lastHardKey = Common::KEYCODE_INVALID; } void DreamWebEngine::runIntroSeq() { @@ -198,13 +198,13 @@ void DreamWebEngine::runIntroSeq() { do { waitForVSync(); - if (_lastHardKey == 1) + if (_lastHardKey == Common::KEYCODE_ESCAPE) break; spriteUpdate(); waitForVSync(); - if (_lastHardKey == 1) + if (_lastHardKey == Common::KEYCODE_ESCAPE) break; delEverything(); @@ -214,20 +214,20 @@ void DreamWebEngine::runIntroSeq() { useTimedText(); waitForVSync(); - if (_lastHardKey == 1) + if (_lastHardKey == Common::KEYCODE_ESCAPE) break; dumpMap(); dumpTimedText(); waitForVSync(); - if (_lastHardKey == 1) + if (_lastHardKey == Common::KEYCODE_ESCAPE) break; } while (_getBack != 1); - if (_lastHardKey == 1) { + if (_lastHardKey == Common::KEYCODE_ESCAPE) { getRidOfTempText(); clearBeforeLoad(); } @@ -293,24 +293,24 @@ void DreamWebEngine::realCredits() { hangOne(2); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "realcreditsearly" } allPalette(); hangOne(80); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "realcreditsearly" } fadeScreenDowns(); hangOne(256); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "realcreditsearly" } @@ -318,24 +318,24 @@ void DreamWebEngine::realCredits() { _sound->playChannel0(12, 0); hangOne(2); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "realcreditsearly" } allPalette(); hangOne(80); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "realcreditsearly" } fadeScreenDowns(); hangOne(256); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "realcreditsearly" } @@ -343,24 +343,24 @@ void DreamWebEngine::realCredits() { _sound->playChannel0(12, 0); hangOne(2); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "realcreditsearly" } allPalette(); hangOne(80); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "realcreditsearly" } fadeScreenDowns(); hangOne(256); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "realcreditsearly" } @@ -368,24 +368,24 @@ void DreamWebEngine::realCredits() { _sound->playChannel0(12, 0); hangOne(2); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "realcreditsearly" } allPalette(); hangOne(80); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "realcreditsearly" } fadeScreenDowns(); hangOne(256); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "realcreditsearly" } @@ -393,24 +393,24 @@ void DreamWebEngine::realCredits() { _sound->playChannel0(12, 0); hangOne(2); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "realcreditsearly" } allPalette(); hangOne(80); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "realcreditsearly" } fadeScreenDowns(); hangOne(256); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "realcreditsearly" } @@ -418,23 +418,23 @@ void DreamWebEngine::realCredits() { fadeScreenUps(); hangOne(60); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "realcreditsearly" } _sound->playChannel0(13, 0); hangOne(350); - if (_lastHardKey == 1) { - _lastHardKey = 0; + if (_lastHardKey == Common::KEYCODE_ESCAPE) { + _lastHardKey = Common::KEYCODE_INVALID; return; // "realcreditsearly" } fadeScreenDowns(); hangOne(256); - _lastHardKey = 0; + _lastHardKey = Common::KEYCODE_INVALID; } } // End of namespace DreamWeb -- cgit v1.2.3 From a6f2703ec27f83185731942f3d3e7600826a905b Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 29 Nov 2012 03:00:17 +0000 Subject: DREAMWEB: Further cleanup to keyboard input buffer code. Removed the buffer from being a global non-const variable. Also, the code changes should allow the buffer size to be increased by just changing the size of _keyBuffer if needed. --- engines/dreamweb/dreamweb.cpp | 4 ++-- engines/dreamweb/dreamweb.h | 12 ++++++------ engines/dreamweb/stubs.cpp | 8 ++------ 3 files changed, 10 insertions(+), 14 deletions(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index 1bcf6298b3..65df466a7b 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -397,14 +397,14 @@ Common::String DreamWebEngine::getSavegameFilename(int slot) const { void DreamWebEngine::keyPressed(uint16 ascii) { debug(2, "key pressed = %04x", ascii); - uint16 in = (_bufferIn + 1) & 0x0f; + uint16 in = (_bufferIn + 1) % ARRAYSIZE(_keyBuffer); uint16 out = _bufferOut; if (in == out) { warning("keyboard buffer is full"); return; } _bufferIn = in; - DreamWeb::g_keyBuffer[in] = ascii; + _keyBuffer[in] = ascii; } void DreamWebEngine::getPalette(uint8 *data, uint start, uint count) { diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index 419f20207f..dcf6a06b7c 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -89,10 +89,6 @@ const unsigned int kNumRoomTexts = 38; const unsigned int kNumFreeTexts = 82; const unsigned int kNumPersonTexts = 1026; -// Keyboard buffer. data.word(kBufferin) and data.word(kBufferout) are indexes -// into this, making it a ring buffer -extern uint8 g_keyBuffer[16]; - // Engine Debug Flags enum { kDebugAnimation = (1 << 0), @@ -157,6 +153,12 @@ public: const Common::String& getSpeechDirName() { return _speechDirName; } private: + // Keyboard buffer. _bufferIn and _bufferOut are indexes + // into this, making it a ring buffer + uint8 _keyBuffer[16]; + uint16 _bufferIn; + uint16 _bufferOut; + void keyPressed(uint16 ascii); void setSpeed(uint speed); @@ -422,8 +424,6 @@ public: uint8 _addToBlue; uint16 _lastSoundReel; Common::KeyCode _lastHardKey; - uint16 _bufferIn; - uint16 _bufferOut; uint8 _blinkFrame; uint8 _blinkCount; uint8 _reAssesChanges; diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index cf072fa790..de21d8e3af 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -26,10 +26,6 @@ namespace DreamWeb { -// Keyboard buffer. _bufferIn and _bufferOut are indexes -// into this, making it a ring buffer -uint8 g_keyBuffer[16]; - const Room g_roomData[] = { // location 0 { "DREAMWEB.R00", // Ryan's apartment @@ -2208,8 +2204,8 @@ void DreamWebEngine::readKey() { return; } - bufOut = (bufOut + 1) & 15; // The buffer has size 16 - _currentKey = g_keyBuffer[bufOut]; + bufOut = (bufOut + 1) % ARRAYSIZE(_keyBuffer); + _currentKey = _keyBuffer[bufOut]; _bufferOut = bufOut; } -- cgit v1.2.3 From 863bbf2cc507a22700c8f4243074ade6494f8d8c Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 29 Nov 2012 03:26:37 +0000 Subject: DREAMWEB: Correction of minor conversion mistake. --- engines/dreamweb/titles.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/titles.cpp b/engines/dreamweb/titles.cpp index 9a63b276ff..4e4faa75a0 100644 --- a/engines/dreamweb/titles.cpp +++ b/engines/dreamweb/titles.cpp @@ -266,7 +266,7 @@ void DreamWebEngine::loadIntroRoom() { _mapOffsetY = 16; clearSprites(); _vars._throughDoor = 0; - _currentKey = '0'; + _currentKey = 0; _mainMode = 0; clearWork(); _vars._newObs = 1; -- cgit v1.2.3 From 6df53857f94ceab82598529fb6e6ca5db1ebc37e Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 29 Nov 2012 04:07:05 +0000 Subject: DREAMWEB: Add debugging output for keyboard input. --- engines/dreamweb/dreamweb.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index 65df466a7b..d65da8b65c 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -331,8 +331,9 @@ void DreamWebEngine::processEvents() { softKey = 0; + debug(1, "DreamWebEngine::processEvents() KeyDown keycode:%d ascii:0x%02x", event.kbd.keycode, event.kbd.ascii); if (event.kbd.keycode >= Common::KEYCODE_a && event.kbd.keycode <= Common::KEYCODE_z) { - softKey = event.kbd.ascii & ~0x20; + softKey = event.kbd.ascii & ~0x20; // (& ~0x20) forces ascii codes for a-z to map to A-Z } else if (event.kbd.keycode == Common::KEYCODE_MINUS || event.kbd.keycode == Common::KEYCODE_SPACE || (event.kbd.keycode >= Common::KEYCODE_0 && event.kbd.keycode <= Common::KEYCODE_9)) { -- cgit v1.2.3 From bf876a13c62944742684fadc40817ec472a66e62 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Fri, 30 Nov 2012 04:35:54 +0000 Subject: DREAMWEB: Remove dead code functions and minor formatting cleanup. --- engines/dreamweb/dreamweb.h | 2 -- engines/dreamweb/object.cpp | 9 +++------ engines/dreamweb/stubs.cpp | 13 ------------- 3 files changed, 3 insertions(+), 21 deletions(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index dcf6a06b7c..f7c42c0d1e 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -752,7 +752,6 @@ public: void showRyanPage(); void switchRyanOn(); void switchRyanOff(); - void middlePanel(); void showDiary(); void readMouse(); uint16 readMouseState(); @@ -884,7 +883,6 @@ public: void obsThatDoThings(); void describeOb(); void putBackObStuff(); - void reExFromOpen(); void showDiaryPage(); void showDiaryKeys(); void dumpDiaryKeys(); diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp index 1e84aba6bd..5e1f89f967 100644 --- a/engines/dreamweb/object.cpp +++ b/engines/dreamweb/object.cpp @@ -875,7 +875,7 @@ void DreamWebEngine::useOpened() { void DreamWebEngine::outOfOpen() { if (_openedOb == 255) - return; // cannot use opened object + return; // cannot use opened object ObjectRef objectId = findOpenPos(); @@ -892,13 +892,10 @@ void DreamWebEngine::outOfOpen() { } if (_mouseButton == _oldButton) - return; // notletgo4 + return; // notletgo4 - if (_mouseButton != 1) { - if (_mouseButton == 2) - reExFromOpen(); + if (_mouseButton != 1) return; - } delPointer(); _pickUp = 1; diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index de21d8e3af..6ab049744b 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -719,7 +719,6 @@ void DreamWebEngine::dreamweb() { showGun(); fadeScreenDown(); hangOn(100); - } } @@ -961,7 +960,6 @@ void DreamWebEngine::useTimedText() { } void DreamWebEngine::setupTimedTemp(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount) { - if (hasSpeech() && voiceIndex != 0) { _speechLoaded = _sound->loadSpeech('T', voiceIndex, 'T', textIndex); if (_speechLoaded) @@ -2134,7 +2132,6 @@ void DreamWebEngine::workToScreenM() { } void DreamWebEngine::atmospheres() { - const Atmosphere *a = &g_atmosphereList[0]; for (; a->_location != 255; ++a) { @@ -2416,10 +2413,6 @@ void DreamWebEngine::errorMessage3() { delPointer(); } -void DreamWebEngine::reExFromOpen() { - -} - void DreamWebEngine::putBackObStuff() { createPanel(); showPanel(); @@ -2457,9 +2450,6 @@ void DreamWebEngine::examineInventory() { workToScreenM(); } -void DreamWebEngine::middlePanel() { -} - void DreamWebEngine::underTextLine() { if (_foreignRelease) multiGet(_textUnder, _textAddressX, _textAddressY - 3, kUnderTextSizeX_f, kUnderTextSizeY_f); @@ -2571,7 +2561,6 @@ void DreamWebEngine::madmanRun() { _vars._lastWeapon = 8; } - void DreamWebEngine::decide() { setMode(); loadPalFromIFF(); @@ -2687,7 +2676,6 @@ void DreamWebEngine::getBack1() { return; } - commandOnlyCond(26, 202); if (_mouseButton == _oldButton) @@ -3013,7 +3001,6 @@ void DreamWebEngine::incRyanPage() { showPointer(); workToScreen(); delPointer(); - } void DreamWebEngine::emergencyPurge() { -- cgit v1.2.3 From 396f45f551bbfacd3dfd46177d27b68a9bc4ffd0 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Fri, 30 Nov 2012 08:49:23 +0000 Subject: DREAMWEB: Fix usage of defines, rather than values for screen size. --- engines/dreamweb/dreamweb.h | 1 + engines/dreamweb/vgagrafx.cpp | 74 +++++++++++++++++++++++-------------------- 2 files changed, 40 insertions(+), 35 deletions(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index f7c42c0d1e..eb35a73f66 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -64,6 +64,7 @@ const unsigned int kMapHeight = 60; const unsigned int kLengthOfMap = kMapWidth * kMapHeight; const unsigned int kNumExObjects = 114; const unsigned int kScreenwidth = 320; +const unsigned int kScreenheight = 200; const unsigned int kDiaryx = (68+24); const unsigned int kDiaryy = (48+12); const unsigned int kInventx = 80; diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp index d2390fb1fd..94b470bb81 100644 --- a/engines/dreamweb/vgagrafx.cpp +++ b/engines/dreamweb/vgagrafx.cpp @@ -31,14 +31,16 @@ const uint16 kZoomx = 8; const uint16 kZoomy = 132; void DreamWebEngine::multiGet(uint8 *dst, uint16 x, uint16 y, uint8 w, uint8 h) { - assert(x < 320); - assert(y < 200); + assert(x < kScreenwidth); + assert(y < kScreenheight); + const uint8 *src = workspace() + x + y * kScreenwidth; - if (y + h > 200) - h = 200 - y; - if (x + w > 320) - w = 320 - x; - //debug(1, "multiGet %u,%u %ux%u -> segment: %04x->%04x", x, y, w, h, (uint16)ds, (uint16)es); + + if (y + h > kScreenheight) + h = kScreenheight - y; + if (x + w > kScreenwidth) + w = kScreenwidth - x; + for (unsigned l = 0; l < h; ++l) { const uint8 *src_p = src + kScreenwidth * l; uint8 *dst_p = dst + w * l; @@ -47,14 +49,16 @@ void DreamWebEngine::multiGet(uint8 *dst, uint16 x, uint16 y, uint8 w, uint8 h) } void DreamWebEngine::multiPut(const uint8 *src, uint16 x, uint16 y, uint8 w, uint8 h) { - assert(x < 320); - assert(y < 200); + assert(x < kScreenwidth); + assert(y < kScreenheight); + uint8 *dst = workspace() + x + y * kScreenwidth; - if (y + h > 200) - h = 200 - y; - if (x + w > 320) - w = 320 - x; - //debug(1, "multiPut %ux%u -> segment: %04x->%04x", w, h, (uint16)ds, (uint16)es); + + if (y + h > kScreenheight) + h = kScreenheight - y; + if (x + w > kScreenwidth) + w = kScreenwidth - x; + for (unsigned l = 0; l < h; ++l) { const uint8 *src_p = src + w * l; uint8 *dst_p = dst + kScreenwidth * l; @@ -64,12 +68,11 @@ void DreamWebEngine::multiPut(const uint8 *src, uint16 x, uint16 y, uint8 w, uin void DreamWebEngine::multiDump(uint16 x, uint16 y, uint8 width, uint8 height) { unsigned offset = x + y * kScreenwidth; - //debug(1, "multiDump %ux%u(segment: %04x) -> %d,%d(address: %d)", w, h, (uint16)ds, x, y, offset); blit(workspace() + offset, kScreenwidth, x, y, width, height); } void DreamWebEngine::workToScreen() { - blit(workspace(), 320, 0, 0, 320, 200); + blit(workspace(), kScreenwidth, 0, 0, kScreenwidth, kScreenheight); } void DreamWebEngine::frameOutNm(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y) { @@ -147,7 +150,7 @@ void DreamWebEngine::doShake() { void DreamWebEngine::setMode() { waitForVSync(); - initGraphics(320, 200, false); + initGraphics(kScreenwidth, kScreenheight, false); } void DreamWebEngine::showPCX(const Common::String &suffix) { @@ -185,7 +188,7 @@ void DreamWebEngine::showPCX(const Common::String &suffix) { void DreamWebEngine::frameOutV(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, int16 x, int16 y) { // NB : These resilience checks were not in the original engine, but did they result in undefined behaviour // or was something broken during porting to C++? - assert(pitch == 320); + assert(pitch == kScreenwidth); if (x < 0) { assert(width >= -x); @@ -199,15 +202,16 @@ void DreamWebEngine::frameOutV(uint8 *dst, const uint8 *src, uint16 pitch, uint1 src += (-y) * width; y = 0; } - if (x >= 320) + + if ((uint16)x >= kScreenwidth) return; - if (y >= 200) + if ((uint16)y >= kScreenheight) return; - if (x + width > 320) { - width = 320 - x; + if ((uint16)x + width > kScreenwidth) { + width = kScreenwidth - x; } - if (y + height > 200) { - height = 200 - y; + if ((uint16)y + height > kScreenheight) { + height = kScreenheight - y; } uint16 stride = pitch - width; @@ -246,20 +250,20 @@ void DreamWebEngine::showFrameInternal(const uint8 *pSrc, uint16 x, uint16 y, ui //addToPrintList(x - _mapAdX, y - _mapAdY); // NB: Commented in the original asm } if (effectsFlag & 4) { // flippedX - frameOutFx(workspace(), pSrc, 320, width, height, x, y); + frameOutFx(workspace(), pSrc, kScreenwidth, width, height, x, y); return; } if (effectsFlag & 2) { // noMask - frameOutNm(workspace(), pSrc, 320, width, height, x, y); + frameOutNm(workspace(), pSrc, kScreenwidth, width, height, x, y); return; } if (effectsFlag & 32) { - frameOutBh(workspace(), pSrc, 320, width, height, x, y); + frameOutBh(workspace(), pSrc, kScreenwidth, width, height, x, y); return; } } // "noEffects" - frameOutV(workspace(), pSrc, 320, width, height, x, y); + frameOutV(workspace(), pSrc, kScreenwidth, width, height, x, y); } void DreamWebEngine::showFrame(const GraphicsFile &frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height) { @@ -285,7 +289,7 @@ void DreamWebEngine::showFrame(const GraphicsFile &frameData, uint16 x, uint16 y } void DreamWebEngine::clearWork() { - memset(workspace(), 0, 320*200); + memset(workspace(), 0, kScreenwidth*kScreenheight); } void DreamWebEngine::dumpZoom() { @@ -326,8 +330,8 @@ void DreamWebEngine::zoom() { putUnderZoom(); return; } - uint16 srcOffset = (_oldPointerY - 9) * 320 + (_oldPointerX - 11); - uint16 dstOffset = (kZoomy + 4) * 320 + (kZoomx + 5); + uint16 srcOffset = (_oldPointerY - 9) * kScreenwidth + (_oldPointerX - 11); + uint16 dstOffset = (kZoomy + 4) * kScreenwidth + (kZoomx + 5); const uint8 *src = workspace() + srcOffset; uint8 *dst = workspace() + dstOffset; for (size_t i = 0; i < 20; ++i) { @@ -335,11 +339,11 @@ void DreamWebEngine::zoom() { uint8 v = src[j]; dst[2*j+0] = v; dst[2*j+1] = v; - dst[2*j+320] = v; - dst[2*j+321] = v; + dst[2*j+kScreenwidth] = v; + dst[2*j+kScreenwidth+1] = v; } - src += 320; - dst += 320*2; + src += kScreenwidth; + dst += kScreenwidth*2; } crosshair(); _didZoom = 1; -- cgit v1.2.3 From 06cc3b051ae03c0a7eafa52089ae3d9bfa4ba566 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Fri, 30 Nov 2012 10:49:25 +0000 Subject: DREAMWEB: Further migration to screen size constants. --- engines/dreamweb/backdrop.cpp | 14 +++++++------- engines/dreamweb/dreamweb.cpp | 10 +++++----- engines/dreamweb/keypad.cpp | 5 ++--- engines/dreamweb/rain.cpp | 4 ++-- 4 files changed, 16 insertions(+), 17 deletions(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/backdrop.cpp b/engines/dreamweb/backdrop.cpp index 1db2663624..f410ee16cf 100644 --- a/engines/dreamweb/backdrop.cpp +++ b/engines/dreamweb/backdrop.cpp @@ -25,7 +25,7 @@ namespace DreamWeb { void DreamWebEngine::doBlocks() { - uint16 dstOffset = _mapAdY * 320 + _mapAdX; + uint16 dstOffset = _mapAdY * kScreenwidth + _mapAdX; uint16 mapOffset = _mapY * kMapWidth + _mapX; const uint8 *mapData = _mapData + mapOffset; uint8 *dstBuffer = workspace() + dstOffset; @@ -34,26 +34,26 @@ void DreamWebEngine::doBlocks() { for (size_t j = 0; j < 11; ++j) { uint16 blockType = mapData[j]; if (blockType != 0) { - uint8 *dst = dstBuffer + i * 320 * 16 + j * 16; + uint8 *dst = dstBuffer + i * kScreenwidth * 16 + j * 16; const uint8 *block = _backdropBlocks + blockType * 256; for (size_t k = 0; k < 4; ++k) { memcpy(dst, block, 16); block += 16; - dst += 320; + dst += kScreenwidth; } for (size_t k = 0; k < 12; ++k) { memcpy(dst, block, 16); memset(dst + 16, 0xdf, 4); block += 16; - dst += 320; + dst += kScreenwidth; } dst += 4; memset(dst, 0xdf, 16); - dst += 320; + dst += kScreenwidth; memset(dst, 0xdf, 16); - dst += 320; + dst += kScreenwidth; memset(dst, 0xdf, 16); - dst += 320; + dst += kScreenwidth; memset(dst, 0xdf, 16); } } diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index d65da8b65c..f7b291b983 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -416,7 +416,7 @@ void DreamWebEngine::getPalette(uint8 *data, uint start, uint count) { void DreamWebEngine::setPalette(const uint8 *data, uint start, uint count) { assert(start + count <= 256); - uint8 fixed[768]; + uint8 fixed[3*256]; for (uint i = 0; i < count * 3; ++i) { fixed[i] = data[i] << 2; } @@ -424,10 +424,10 @@ void DreamWebEngine::setPalette(const uint8 *data, uint start, uint count) { } void DreamWebEngine::blit(const uint8 *src, int pitch, int x, int y, int w, int h) { - if (y + h > 200) - h = 200 - y; - if (x + w > 320) - w = 320 - x; + if (y + h > (int)kScreenheight) + h = kScreenheight - y; + if (x + w > (int)kScreenwidth) + w = kScreenwidth - x; if (h <= 0 || w <= 0) return; _system->copyRectToScreen(src, pitch, x, y, w, h); diff --git a/engines/dreamweb/keypad.cpp b/engines/dreamweb/keypad.cpp index 3580f8ad52..28d073ec2f 100644 --- a/engines/dreamweb/keypad.cpp +++ b/engines/dreamweb/keypad.cpp @@ -103,7 +103,6 @@ void DreamWebEngine::enterCode(uint8 digit0, uint8 digit1, uint8 digit2, uint8 d // Note: isItRight comes from use.asm, but is only used by enterCode(), // so we place it here. bool DreamWebEngine::isItRight(uint8 digit0, uint8 digit1, uint8 digit2, uint8 digit3) { - return digit0 == _pressList[0] && digit1 == _pressList[1] && digit2 == _pressList[2] && digit3 == _pressList[3]; } @@ -455,12 +454,12 @@ void DreamWebEngine::showLeftPage() { _kerning = 0; _charShift = 0; _lineSpacing = 10; - uint8 *bufferToSwap = workspace() + (48*320)+2; + uint8 *bufferToSwap = workspace() + (48*kScreenwidth)+2; for (size_t i = 0; i < 120; ++i) { for (size_t j = 0; j < 65; ++j) { SWAP(bufferToSwap[j], bufferToSwap[130 - j]); } - bufferToSwap += 320; + bufferToSwap += kScreenwidth; } } diff --git a/engines/dreamweb/rain.cpp b/engines/dreamweb/rain.cpp index 8e42e0c161..b636b7def7 100644 --- a/engines/dreamweb/rain.cpp +++ b/engines/dreamweb/rain.cpp @@ -42,12 +42,12 @@ void DreamWebEngine::showRain() { uint16 offset = (rain.w3 - rain.b5) & 511; rain.w3 = offset; const uint8 *src = frameData + offset; - uint8 *dst = workspace() + y * 320 + x; + uint8 *dst = workspace() + y * kScreenwidth + x; for (uint16 j = 0; j < size; ++j) { uint8 v = src[j]; if (v != 0) *dst = v; - dst += 320-1; // advance diagonally + dst += kScreenwidth-1; // advance diagonally } } -- cgit v1.2.3 From 9dc4542f3cda5aa055419bb0cc25cf06a3cc492a Mon Sep 17 00:00:00 2001 From: D G Turner Date: Fri, 30 Nov 2012 11:21:31 +0000 Subject: DREAMWEB: Migrate object/inventory related functions out of stubs. --- engines/dreamweb/object.cpp | 127 ++++++++++++++++++++++++++++++++++++++++++++ engines/dreamweb/stubs.cpp | 127 -------------------------------------------- 2 files changed, 127 insertions(+), 127 deletions(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp index 5e1f89f967..1af9b036aa 100644 --- a/engines/dreamweb/object.cpp +++ b/engines/dreamweb/object.cpp @@ -1099,4 +1099,131 @@ void DreamWebEngine::pickupConts(uint8 from, uint8 containerEx) { } } +void DreamWebEngine::incRyanPage() { + commandOnlyCond(31, 222); + + if (_mouseButton == _oldButton || !(_mouseButton & 1)) + return; + + _vars._ryanPage = (_mouseX - (kInventx + 167)) / 18; + + delPointer(); + fillRyan(); + readMouse(); + showPointer(); + workToScreen(); + delPointer(); +} + +void DreamWebEngine::emergencyPurge() { + while (true) { + if (_vars._exFramePos + 4000 < kExframeslen) { + // Not near frame end + if (_vars._exTextPos + 400 < kExtextlen) + return; // notneartextend + } + + purgeAnItem(); + } +} + +void DreamWebEngine::purgeAnItem() { + const DynObject *extraObjects = _exData; + + for (size_t i = 0; i < kNumexobjects; ++i) { + if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255 && + extraObjects[i].initialLocation != _realLocation) { + deleteExObject(i); + return; + } + } + + for (size_t i = 0; i < kNumexobjects; ++i) { + if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255) { + deleteExObject(i); + return; + } + } +} + +void DreamWebEngine::dropError() { + _commandType = 255; + delPointer(); + printMessage(76, 21, 56, 240, 240 & 1); + workToScreenM(); + hangOnP(50); + showPanel(); + showMan(); + examIcon(); + _commandType = 255; + workToScreenM(); +} + +void DreamWebEngine::cantDrop() { + _commandType = 255; + delPointer(); + printMessage(76, 21, 24, 240, 240 & 1); + workToScreenM(); + hangOnP(50); + showPanel(); + showMan(); + examIcon(); + _commandType = 255; + workToScreenM(); +} + +void DreamWebEngine::examineInventory() { + commandOnlyCond(32, 249); + + if (!(_mouseButton & 1)) + return; + + createPanel(); + showPanel(); + showMan(); + showExit(); + examIcon(); + _pickUp = 0; + _invOpen = 2; + openInv(); + workToScreenM(); +} + +void DreamWebEngine::openInv() { + _invOpen = 1; + printMessage(80, 58 - 10, 61, 240, (240 & 1)); + fillRyan(); + _commandType = 255; +} + +void DreamWebEngine::pickupOb(uint8 command, uint8 pos) { + _lastInvPos = pos; + _objectType = kFreeObjectType; + _itemFrame = command; + _command = command; + //uint8 dummy; + //getAnyAd(&dummy, &dummy); // was in the original source, seems useless here + transferToEx(command); +} + +void DreamWebEngine::initialInv() { + if (_realLocation != 24) + return; + + pickupOb(11, 5); + pickupOb(12, 6); + pickupOb(13, 7); + pickupOb(14, 8); + pickupOb(18, 0); + pickupOb(19, 1); + pickupOb(20, 9); + pickupOb(16, 2); + _vars._watchMode = 1; + _vars._reelToHold = 0; + _vars._endOfHoldReel = 6; + _vars._watchSpeed = 1; + _vars._speedCount = 1; + switchRyanOff(); +} + } // End of namespace DreamWeb diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 6ab049744b..8eeaf00c7f 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -2213,36 +2213,6 @@ void DreamWebEngine::newGame() { _getBack = 3; } -void DreamWebEngine::pickupOb(uint8 command, uint8 pos) { - _lastInvPos = pos; - _objectType = kFreeObjectType; - _itemFrame = command; - _command = command; - //uint8 dummy; - //getAnyAd(&dummy, &dummy); // was in the original source, seems useless here - transferToEx(command); -} - -void DreamWebEngine::initialInv() { - if (_realLocation != 24) - return; - - pickupOb(11, 5); - pickupOb(12, 6); - pickupOb(13, 7); - pickupOb(14, 8); - pickupOb(18, 0); - pickupOb(19, 1); - pickupOb(20, 9); - pickupOb(16, 2); - _vars._watchMode = 1; - _vars._reelToHold = 0; - _vars._endOfHoldReel = 6; - _vars._watchSpeed = 1; - _vars._speedCount = 1; - switchRyanOff(); -} - void DreamWebEngine::walkIntoRoom() { if (_vars._location == 14 && _mapX == 22) { _destination = 1; @@ -2307,13 +2277,6 @@ void DreamWebEngine::makeMainScreen() { _manIsOffScreen = 0; } -void DreamWebEngine::openInv() { - _invOpen = 1; - printMessage(80, 58 - 10, 61, 240, (240 & 1)); - fillRyan(); - _commandType = 255; -} - void DreamWebEngine::obsThatDoThings() { if (!compare(_command, _objectType, "MEMB")) return; // notlouiscard @@ -2433,23 +2396,6 @@ bool DreamWebEngine::isSetObOnMap(uint8 index) { return (getSetAd(index)->mapad[0] == 0); } -void DreamWebEngine::examineInventory() { - commandOnlyCond(32, 249); - - if (!(_mouseButton & 1)) - return; - - createPanel(); - showPanel(); - showMan(); - showExit(); - examIcon(); - _pickUp = 0; - _invOpen = 2; - openInv(); - workToScreenM(); -} - void DreamWebEngine::underTextLine() { if (_foreignRelease) multiGet(_textUnder, _textAddressX, _textAddressY - 3, kUnderTextSizeX_f, kUnderTextSizeY_f); @@ -2644,32 +2590,6 @@ void DreamWebEngine::showGun() { getRidOfTempText(); } -void DreamWebEngine::dropError() { - _commandType = 255; - delPointer(); - printMessage(76, 21, 56, 240, 240 & 1); - workToScreenM(); - hangOnP(50); - showPanel(); - showMan(); - examIcon(); - _commandType = 255; - workToScreenM(); -} - -void DreamWebEngine::cantDrop() { - _commandType = 255; - delPointer(); - printMessage(76, 21, 24, 240, 240 & 1); - workToScreenM(); - hangOnP(50); - showPanel(); - showMan(); - examIcon(); - _commandType = 255; - workToScreenM(); -} - void DreamWebEngine::getBack1() { if (_pickUp != 0) { blank(); @@ -2987,51 +2907,4 @@ void DreamWebEngine::edensFlatReminders() { _vars._progressPoints++; // got card } -void DreamWebEngine::incRyanPage() { - commandOnlyCond(31, 222); - - if (_mouseButton == _oldButton || !(_mouseButton & 1)) - return; - - _vars._ryanPage = (_mouseX - (kInventx + 167)) / 18; - - delPointer(); - fillRyan(); - readMouse(); - showPointer(); - workToScreen(); - delPointer(); -} - -void DreamWebEngine::emergencyPurge() { - while (true) { - if (_vars._exFramePos + 4000 < kExframeslen) { - // Not near frame end - if (_vars._exTextPos + 400 < kExtextlen) - return; // notneartextend - } - - purgeAnItem(); - } -} - -void DreamWebEngine::purgeAnItem() { - const DynObject *extraObjects = _exData; - - for (size_t i = 0; i < kNumexobjects; ++i) { - if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255 && - extraObjects[i].initialLocation != _realLocation) { - deleteExObject(i); - return; - } - } - - for (size_t i = 0; i < kNumexobjects; ++i) { - if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255) { - deleteExObject(i); - return; - } - } -} - } // End of namespace DreamWeb -- cgit v1.2.3 From 617f6179c1b96a1d2f8209dac8a3bf23da2415de Mon Sep 17 00:00:00 2001 From: D G Turner Date: Fri, 30 Nov 2012 12:08:55 +0000 Subject: DREAMWEB: Change various loop variables to uint, rather than size_t. This is partly for readability and partly to avoid any possible portability issues i.e. though they should be the same, size_t is defined by system headers, whereas uint is defined within our build system. Also, replaced a array size calculation with our ARRAYSIZE macro. --- engines/dreamweb/backdrop.cpp | 26 +++++++++++++------------- engines/dreamweb/keypad.cpp | 12 ++++++------ engines/dreamweb/monitor.cpp | 2 +- engines/dreamweb/object.cpp | 10 +++++----- engines/dreamweb/pathfind.cpp | 2 +- engines/dreamweb/sprite.cpp | 2 +- engines/dreamweb/stubs.cpp | 10 +++++----- engines/dreamweb/use.cpp | 2 +- engines/dreamweb/vgafades.cpp | 10 +++++----- engines/dreamweb/vgagrafx.cpp | 6 +++--- 10 files changed, 41 insertions(+), 41 deletions(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/backdrop.cpp b/engines/dreamweb/backdrop.cpp index f410ee16cf..5ccc68704a 100644 --- a/engines/dreamweb/backdrop.cpp +++ b/engines/dreamweb/backdrop.cpp @@ -30,18 +30,18 @@ void DreamWebEngine::doBlocks() { const uint8 *mapData = _mapData + mapOffset; uint8 *dstBuffer = workspace() + dstOffset; - for (size_t i = 0; i < 10; ++i) { - for (size_t j = 0; j < 11; ++j) { + for (uint i = 0; i < 10; ++i) { + for (uint j = 0; j < 11; ++j) { uint16 blockType = mapData[j]; if (blockType != 0) { uint8 *dst = dstBuffer + i * kScreenwidth * 16 + j * 16; const uint8 *block = _backdropBlocks + blockType * 256; - for (size_t k = 0; k < 4; ++k) { + for (uint k = 0; k < 4; ++k) { memcpy(dst, block, 16); block += 16; dst += kScreenwidth; } - for (size_t k = 0; k < 12; ++k) { + for (uint k = 0; k < 12; ++k) { memcpy(dst, block, 16); memset(dst + 16, 0xdf, 4); block += 16; @@ -129,7 +129,7 @@ void DreamWebEngine::showAllObs() { _setList.clear(); const GraphicsFile &frameBase = _setFrames; - for (size_t i = 0; i < 128; ++i) { + for (uint i = 0; i < 128; ++i) { SetObject *setEntry = &_setDat[i]; uint16 x, y; if (getMapAd(setEntry->mapad, &x, &y) == 0) @@ -154,7 +154,7 @@ void DreamWebEngine::showAllObs() { } static bool addAlong(const MapFlag *mapFlags) { - for (size_t i = 0; i < 11; ++i) { + for (uint i = 0; i < 11; ++i) { if (mapFlags[i]._flag != 0) return true; } @@ -162,7 +162,7 @@ static bool addAlong(const MapFlag *mapFlags) { } static bool addLength(const MapFlag *mapFlags) { - for (size_t i = 0; i < 10; ++i) { + for (uint i = 0; i < 10; ++i) { if (mapFlags[11 * i]._flag != 0) return true; } @@ -205,13 +205,13 @@ void DreamWebEngine::calcMapAd() { } void DreamWebEngine::showAllFree() { - const unsigned int count = 80; + const uint count = 80; _freeList.clear(); const DynObject *freeObjects = _freeDat; const GraphicsFile &frameBase = _freeFrames; - for (size_t i = 0; i < count; ++i) { + for (uint i = 0; i < count; ++i) { uint16 x, y; uint8 mapAd = getMapAd(freeObjects[i].mapad, &x, &y); if (mapAd != 0) { @@ -236,8 +236,8 @@ void DreamWebEngine::drawFlags() { uint16 mapOffset = _mapY * kMapWidth + _mapX; const uint8 *mapData = _mapData + mapOffset; - for (size_t i = 0; i < 10; ++i) { - for (size_t j = 0; j < 11; ++j) { + for (uint i = 0; i < 10; ++i) { + for (uint j = 0; j < 11; ++j) { uint8 tile = mapData[i * kMapWidth + j]; mapFlag->_flag = _backdropFlags[tile]._flag; mapFlag->_flagEx = _backdropFlags[tile]._flagEx; @@ -248,13 +248,13 @@ void DreamWebEngine::drawFlags() { } void DreamWebEngine::showAllEx() { - const unsigned int count = 100; + const uint count = 100; _exList.clear(); DynObject *objects = _exData; const GraphicsFile &frameBase = _exFrames; - for (size_t i = 0; i < count; ++i) { + for (uint i = 0; i < count; ++i) { DynObject *object = objects + i; if (object->mapad[0] == 0xff) continue; diff --git a/engines/dreamweb/keypad.cpp b/engines/dreamweb/keypad.cpp index 28d073ec2f..7bbca2b979 100644 --- a/engines/dreamweb/keypad.cpp +++ b/engines/dreamweb/keypad.cpp @@ -433,7 +433,7 @@ void DreamWebEngine::folderExit() { void DreamWebEngine::showLeftPage() { showFrame(_folderGraphics2, 0, 12, 3, 0); uint16 y = 12+5; - for (size_t i = 0; i < 9; ++i) { + for (uint i = 0; i < 9; ++i) { showFrame(_folderGraphics2, 0, y, 4, 0); y += 16; } @@ -444,7 +444,7 @@ void DreamWebEngine::showLeftPage() { uint8 pageIndex = _folderPage - 2; const uint8 *string = getTextInFile1(pageIndex * 2); y = 48; - for (size_t i = 0; i < 2; ++i) { + for (uint i = 0; i < 2; ++i) { uint8 lastChar; do { lastChar = printDirect(&string, 2, &y, 140, false); @@ -455,8 +455,8 @@ void DreamWebEngine::showLeftPage() { _charShift = 0; _lineSpacing = 10; uint8 *bufferToSwap = workspace() + (48*kScreenwidth)+2; - for (size_t i = 0; i < 120; ++i) { - for (size_t j = 0; j < 65; ++j) { + for (uint i = 0; i < 120; ++i) { + for (uint j = 0; j < 65; ++j) { SWAP(bufferToSwap[j], bufferToSwap[130 - j]); } bufferToSwap += kScreenwidth; @@ -466,7 +466,7 @@ void DreamWebEngine::showLeftPage() { void DreamWebEngine::showRightPage() { showFrame(_folderGraphics2, 143, 12, 0, 0); uint16 y = 12+37; - for (size_t i = 0; i < 7; ++i) { + for (uint i = 0; i < 7; ++i) { showFrame(_folderGraphics2, 143, y, 1, 0); y += 16; } @@ -477,7 +477,7 @@ void DreamWebEngine::showRightPage() { uint8 pageIndex = _folderPage - 1; const uint8 *string = getTextInFile1(pageIndex * 2); y = 48; - for (size_t i = 0; i < 2; ++i) { + for (uint i = 0; i < 2; ++i) { uint8 lastChar; do { lastChar = printDirect(&string, 152, &y, 140, false); diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index 83563c8005..b6922cba51 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -373,7 +373,7 @@ void DreamWebEngine::lockLightOff() { } void DreamWebEngine::turnOnPower() { - for (size_t i = 0; i < 3; ++i) { + for (uint i = 0; i < 3; ++i) { powerLightOn(); hangOn(30); powerLightOff(); diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp index 1af9b036aa..bb9e9677d7 100644 --- a/engines/dreamweb/object.cpp +++ b/engines/dreamweb/object.cpp @@ -31,7 +31,7 @@ void DreamWebEngine::showRyanPage() { void DreamWebEngine::findAllRyan() { memset(_ryanInvList, 0xff, sizeof(_ryanInvList)); - for (size_t i = 0; i < kNumexobjects; ++i) { + for (uint i = 0; i < kNumexobjects; ++i) { const DynObject *extra = getExAd(i); if (extra->mapad[0] != kExObjectType) continue; @@ -47,8 +47,8 @@ void DreamWebEngine::findAllRyan() { void DreamWebEngine::fillRyan() { ObjectRef *inv = &_ryanInvList[_vars._ryanPage * 10]; findAllRyan(); - for (size_t i = 0; i < 2; ++i) { - for (size_t j = 0; j < 5; ++j) { + for (uint i = 0; i < 2; ++i) { + for (uint j = 0; j < 5; ++j) { obToInv(inv->_index, inv->_type, kInventx + j * kItempicsize, kInventy + i * kItempicsize); ++inv; } @@ -1130,7 +1130,7 @@ void DreamWebEngine::emergencyPurge() { void DreamWebEngine::purgeAnItem() { const DynObject *extraObjects = _exData; - for (size_t i = 0; i < kNumexobjects; ++i) { + for (uint i = 0; i < kNumexobjects; ++i) { if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255 && extraObjects[i].initialLocation != _realLocation) { deleteExObject(i); @@ -1138,7 +1138,7 @@ void DreamWebEngine::purgeAnItem() { } } - for (size_t i = 0; i < kNumexobjects; ++i) { + for (uint i = 0; i < kNumexobjects; ++i) { if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255) { deleteExObject(i); return; diff --git a/engines/dreamweb/pathfind.cpp b/engines/dreamweb/pathfind.cpp index c39070532c..64cffde4de 100644 --- a/engines/dreamweb/pathfind.cpp +++ b/engines/dreamweb/pathfind.cpp @@ -110,7 +110,7 @@ void DreamWebEngine::checkDest(const RoomPaths *roomsPaths) { const PathSegment *segments = roomsPaths->segments; const uint8 tmp = _mansPath << 4; uint8 destination = _destination; - for (size_t i = 0; i < 24; ++i) { + for (uint i = 0; i < 24; ++i) { if ((segments[i].b0 & 0xf0) == tmp && (segments[i].b0 & 0x0f) == _destination) { _destination = segments[i].b1 & 0x0f; diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index 01570c907a..1fa2e7d6a4 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -26,7 +26,7 @@ namespace DreamWeb { void DreamWebEngine::printSprites() { - for (size_t priority = 0; priority < 7; ++priority) { + for (uint priority = 0; priority < 7; ++priority) { Common::List::const_iterator i; for (i = _spriteTable.begin(); i != _spriteTable.end(); ++i) { const Sprite &sprite = *i; diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 8eeaf00c7f..d93c2a951c 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -1142,7 +1142,7 @@ void DreamWebEngine::plotReel(uint16 &reelPointer) { reel += 8; } - for (size_t i = 0; i < 8; ++i) { + for (uint i = 0; i < 8; ++i) { if (reel->frame() != 0xffff) showReelFrame(reel); ++reel; @@ -1241,7 +1241,7 @@ const uint8 *DreamWebEngine::findObName(uint8 type, uint8 index) { void DreamWebEngine::copyName(uint8 type, uint8 index, uint8 *dst) { const uint8 *src = findObName(type, index); - size_t i; + uint i; for (i = 0; i < 28; ++i) { char c = src[i]; if (c == ':') @@ -1371,7 +1371,7 @@ void DreamWebEngine::doChange(uint8 index, uint8 value, uint8 type) { } void DreamWebEngine::deleteTaken() { - for (size_t i = 0; i < kNumexobjects; ++i) { + for (uint i = 0; i < kNumexobjects; ++i) { uint8 location = _exData[i].initialLocation; if (location == _realLocation) { uint8 index = _exData[i].index; @@ -1382,7 +1382,7 @@ void DreamWebEngine::deleteTaken() { uint8 DreamWebEngine::getExPos() { DynObject *objects = _exData; - for (size_t i = 0; i < kNumexobjects; ++i) { + for (uint i = 0; i < kNumexobjects; ++i) { if (objects[i].mapad[0] == 0xff) return i; } @@ -1537,7 +1537,7 @@ void DreamWebEngine::printMessage2(uint16 x, uint16 y, uint8 index, uint8 maxWid bool DreamWebEngine::objectMatches(void *object, const char *id) { const char *objId = (const char *)object + 12; // whether it is a DynObject or a SetObject - for (size_t i = 0; i < 4; ++i) { + for (uint i = 0; i < 4; ++i) { if (id[i] != objId[i] + 'A') return false; } diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp index 995eef04cd..476f847c40 100644 --- a/engines/dreamweb/use.cpp +++ b/engines/dreamweb/use.cpp @@ -131,7 +131,7 @@ void DreamWebEngine::useRoutine() { uint8 dummy; void *obj = getAnyAd(&dummy, &dummy); - for (size_t i = 0; i < sizeof(kUseList)/sizeof(UseListEntry); ++i) { + for (uint i = 0; i < ARRAYSIZE(kUseList); ++i) { const UseListEntry &entry = kUseList[i]; if (objectMatches(obj, entry.id)) { (this->*entry.callback)(); diff --git a/engines/dreamweb/vgafades.cpp b/engines/dreamweb/vgafades.cpp index c8f05641b5..d1e2480f70 100644 --- a/engines/dreamweb/vgafades.cpp +++ b/engines/dreamweb/vgafades.cpp @@ -56,8 +56,8 @@ void DreamWebEngine::fadeDOS() { //processEvents will be called from waitForVSync uint8 *dst = _startPal; getPalette(dst, 0, 64); - for (int fade = 0; fade < 64; ++fade) { - for (int c = 0; c < 768; ++c) { //original sources decrement 768 values -> 256 colors + for (uint fade = 0; fade < 64; ++fade) { + for (uint c = 0; c < 768; ++c) { //original sources decrement 768 values -> 256 colors if (dst[c]) { --dst[c]; } @@ -88,7 +88,7 @@ void DreamWebEngine::fadeCalculation() { uint8 *startPal = _startPal; const uint8 *endPal = _endPal; - for (size_t i = 0; i < 256 * 3; ++i) { + for (uint i = 0; i < 256 * 3; ++i) { uint8 s = startPal[i]; uint8 e = endPal[i]; if (s == e) @@ -212,7 +212,7 @@ void DreamWebEngine::fadeScreenDownHalf() { const uint8 *startPal = _startPal; uint8 *endPal = _endPal; - for (int i = 0; i < 256 * 3; ++i) { + for (uint i = 0; i < 256 * 3; ++i) { *endPal >>= 1; endPal++; } @@ -239,7 +239,7 @@ void DreamWebEngine::greyscaleSum() { byte *src = _mainPal; byte *dst = _endPal; - for (int i = 0; i < 256; ++i) { + for (uint i = 0; i < 256; ++i) { const unsigned int r = 20 * *src++; const unsigned int g = 59 * *src++; const unsigned int b = 11 * *src++; diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp index 94b470bb81..d8984d312b 100644 --- a/engines/dreamweb/vgagrafx.cpp +++ b/engines/dreamweb/vgagrafx.cpp @@ -334,8 +334,8 @@ void DreamWebEngine::zoom() { uint16 dstOffset = (kZoomy + 4) * kScreenwidth + (kZoomx + 5); const uint8 *src = workspace() + srcOffset; uint8 *dst = workspace() + dstOffset; - for (size_t i = 0; i < 20; ++i) { - for (size_t j = 0; j < 23; ++j) { + for (uint i = 0; i < 20; ++i) { + for (uint j = 0; j < 23; ++j) { uint8 v = src[j]; dst[2*j+0] = v; dst[2*j+1] = v; @@ -379,7 +379,7 @@ void DreamWebEngine::loadPalFromIFF() { const uint8 *src = buf + 0x30; uint8 *dst = _mainPal; - for (size_t i = 0; i < 256*3; ++i) { + for (uint i = 0; i < 256*3; ++i) { uint8 c = src[i] / 4; if (_brightPalette) { if (c) { -- cgit v1.2.3 From f5dbd23baba645583ffcb9c452f4f88a5f83a412 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 30 Nov 2012 14:19:14 +0100 Subject: DREAMWEB: Fix emergencyPurge checks It could re-delete previously deleted objects, causing ex data (frame/text) corruption. This is the likely cause of bug #3591088. Asm conversion error from eaf87bdfa7ac279f736c03b25af94ac1df3b31ce. --- engines/dreamweb/object.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp index bb9e9677d7..458630753c 100644 --- a/engines/dreamweb/object.cpp +++ b/engines/dreamweb/object.cpp @@ -1131,7 +1131,8 @@ void DreamWebEngine::purgeAnItem() { const DynObject *extraObjects = _exData; for (uint i = 0; i < kNumexobjects; ++i) { - if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255 && + if (extraObjects[i].mapad[0] == 0 && + (extraObjects[i].objId[0] == 255 || extraObjects[i].objId[0] == 2) && extraObjects[i].initialLocation != _realLocation) { deleteExObject(i); return; @@ -1139,7 +1140,7 @@ void DreamWebEngine::purgeAnItem() { } for (uint i = 0; i < kNumexobjects; ++i) { - if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255) { + if (extraObjects[i].mapad[0] == 0 && extraObjects[i].objId[0] == 255) { deleteExObject(i); return; } -- cgit v1.2.3 From f2fe1b775a4e344b51ada17415e125998a582efd Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 30 Nov 2012 16:10:18 +0100 Subject: DREAMWEB: Make frame fixups more specific and add sanity checks This should detect (and trigger asserts on) the kind of ex frame data corruption in bug #3591088. --- engines/dreamweb/object.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp index 458630753c..ecd38f2abe 100644 --- a/engines/dreamweb/object.cpp +++ b/engines/dreamweb/object.cpp @@ -435,10 +435,23 @@ void DreamWebEngine::deleteExFrame(uint8 frameNum) { _vars._exFramePos -= frameSize; // Adjust all frame pointers pointing into the shifted data - for (unsigned int i = 0; i < 3*kNumexobjects; ++i) { - frame = &_exFrames._frames[i]; - if (frame->ptr() >= startOff) - frame->setPtr(frame->ptr() - frameSize); + for (unsigned int i = 0; i < kNumexobjects; ++i) { + if (_exData[i].mapad[0] != 0xff) { + frame = &_exFrames._frames[3*i+0]; + if (frame->ptr() >= startOff) { + frame->setPtr(frame->ptr() - frameSize); + assert(frame->ptr() + frame->width*frame->height <= _vars._exFramePos); + } else { + assert(frame->ptr() + frame->width*frame->height <= startOff); + } + frame = &_exFrames._frames[3*i+1]; + if (frame->ptr() >= startOff) { + frame->setPtr(frame->ptr() - frameSize); + assert(frame->ptr() + frame->width*frame->height <= _vars._exFramePos); + } else { + assert(frame->ptr() + frame->width*frame->height <= startOff); + } + } } } -- cgit v1.2.3 From 89a330cb5d405596236576ca9516d0027c3f899a Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 30 Nov 2012 23:22:00 +0100 Subject: DREAMWEB: Add some debugging output to emergencyPurge --- engines/dreamweb/object.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp index ecd38f2abe..bee3a6d511 100644 --- a/engines/dreamweb/object.cpp +++ b/engines/dreamweb/object.cpp @@ -1129,24 +1129,25 @@ void DreamWebEngine::incRyanPage() { } void DreamWebEngine::emergencyPurge() { - while (true) { - if (_vars._exFramePos + 4000 < kExframeslen) { - // Not near frame end - if (_vars._exTextPos + 400 < kExtextlen) - return; // notneartextend - } + debug(2, "Ex memory: frames %d/%d, text %d/%d", _vars._exFramePos, kExframeslen, _vars._exTextPos, kExtextlen); + while (_vars._exFramePos + 4000 >= kExframeslen || + _vars._exTextPos + 400 >= kExtextlen) + { purgeAnItem(); + debug(2, "Ex memory after purging: frames %d/%d, text %d/%d", _vars._exFramePos, kExframeslen, _vars._exTextPos, kExtextlen); } } void DreamWebEngine::purgeAnItem() { const DynObject *extraObjects = _exData; + for (uint i = 0; i < kNumexobjects; ++i) { if (extraObjects[i].mapad[0] == 0 && (extraObjects[i].objId[0] == 255 || extraObjects[i].objId[0] == 2) && extraObjects[i].initialLocation != _realLocation) { + debug(1, "Purging ex object %d", i); deleteExObject(i); return; } @@ -1154,10 +1155,13 @@ void DreamWebEngine::purgeAnItem() { for (uint i = 0; i < kNumexobjects; ++i) { if (extraObjects[i].mapad[0] == 0 && extraObjects[i].objId[0] == 255) { + debug(1, "Purging ex object %d", i); deleteExObject(i); return; } } + + error("Out of Ex object memory"); } void DreamWebEngine::dropError() { -- cgit v1.2.3 From 02fe2ded354ecbfd87acdc4493be4b41a759d1d9 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sat, 1 Dec 2012 12:29:17 +0100 Subject: DREAMWEB: Check for exFrame data corruption on load This provides earlier detection for corrupted savegames caused by bug #3591088 --- engines/dreamweb/saveload.cpp | 44 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp index 162ad53cde..8a0791d19b 100644 --- a/engines/dreamweb/saveload.cpp +++ b/engines/dreamweb/saveload.cpp @@ -574,6 +574,14 @@ void DreamWebEngine::savePosition(unsigned int slot, const char *descbuf) { delete outSaveFile; } + +// Utility struct for a savegame sanity check in loadPosition +struct FrameExtent { + uint16 start; + uint16 length; + bool operator<(const struct FrameExtent& other) const { return start flist; + for (unsigned int i = 0; i < kNumexobjects; ++i) { + if (_exData[i].mapad[0] != 0xff) { + FrameExtent fe; + Frame *frame = &_exFrames._frames[3*i+0]; + fe.start = frame->ptr(); + fe.length = frame->width * frame->height; + flist.push_back(fe); + + frame = &_exFrames._frames[3*i+1]; + fe.start = frame->ptr(); + fe.length = frame->width * frame->height; + flist.push_back(fe); + } + } + // ...and check if the frames overlap. + Common::sort(flist.begin(), flist.end(), Common::Less()); + Common::List::const_iterator iter; + uint16 curEnd = 0; + for (iter = flist.begin(); iter != flist.end(); ++iter) { + if (iter->start < curEnd) + error("exFrames data corruption in savegame"); + curEnd = iter->start + iter->length; + } + if (curEnd > _vars._exFramePos) { + if (curEnd > kExframeslen) + error("exFrames data corruption in savegame"); + warning("Fixing up exFramePos"); + _vars._exFramePos = curEnd; + } + // (end of sanity check) } // Count number of save files, and load their descriptions into _saveNames -- cgit v1.2.3 From 674c625209a8a3e684ae238a3af676110f6e5254 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 2 Dec 2012 14:41:03 +0000 Subject: DREAMWEB: Fix key handling for non-QWERTY layouts This fixes bug #3590814. The case for KP0-KP9 can probably be removed as it should be handled by the case above. But I don't have a keyboard with keypad to test. So I am leaving it for now. --- engines/dreamweb/dreamweb.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index f7b291b983..c3ede46df2 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -332,11 +332,12 @@ void DreamWebEngine::processEvents() { softKey = 0; debug(1, "DreamWebEngine::processEvents() KeyDown keycode:%d ascii:0x%02x", event.kbd.keycode, event.kbd.ascii); - if (event.kbd.keycode >= Common::KEYCODE_a && event.kbd.keycode <= Common::KEYCODE_z) { + if ((event.kbd.ascii >= 'a' && event.kbd.ascii <= 'z') || + (event.kbd.ascii >= 'A' && event.kbd.ascii <= 'Z')) { softKey = event.kbd.ascii & ~0x20; // (& ~0x20) forces ascii codes for a-z to map to A-Z - } else if (event.kbd.keycode == Common::KEYCODE_MINUS || - event.kbd.keycode == Common::KEYCODE_SPACE || - (event.kbd.keycode >= Common::KEYCODE_0 && event.kbd.keycode <= Common::KEYCODE_9)) { + } else if (event.kbd.ascii == '-' || + event.kbd.ascii == ' ' || + (event.kbd.ascii >= '0' && event.kbd.ascii <= '9')) { softKey = event.kbd.ascii; } else if (event.kbd.keycode >= Common::KEYCODE_KP0 && event.kbd.keycode <= Common::KEYCODE_KP9) { softKey = event.kbd.keycode - Common::KEYCODE_KP0 + '0'; -- cgit v1.2.3 From 4530dd23a58c4a9b6a2a598d2398550efe0f993c Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 24 Feb 2013 21:51:46 +0000 Subject: DREAMWEB: Add localised commands in the network terminal The original interpreter only used english commands in the terminal even when playing one of the localised version (and even though everything else in the terminal was localised). This adds the possibility to either use the English commands or the localised ones. Localized commands have been added for French, German (thanks to SimSaw, who also proposed that idea) and Italian (thanks to Maff). --- engines/dreamweb/dreamweb.h | 1 + engines/dreamweb/monitor.cpp | 105 ++++++++++++++++++++++++++++++++++--------- 2 files changed, 84 insertions(+), 22 deletions(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index eb35a73f66..c13a6995bf 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -513,6 +513,7 @@ public: void dirCom(); void useMon(); bool execCommand(); + int findCommand(const char* cmdList[]); // from newplace.cpp void getUnderCentre(); diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index b6922cba51..3bcb38d074 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -104,6 +104,26 @@ void DreamWebEngine::useMon() { redrawMainScrn(); workToScreenM(); } + +int DreamWebEngine::findCommand(const char* cmdList[]) { + // Loop over all commands in the list and see if we get a match + int cmd = 0; + while (cmdList[cmd] != NULL) { + const char *cmdStr = cmdList[cmd]; + const char *inputStr = _inputLine; + // Compare the command, char by char, to see if we get a match. + // We only care about the prefix matching, though. + char inputChar, cmdChar; + do { + inputChar = *inputStr; inputStr += 2; + cmdChar = *cmdStr++; + if (cmdChar == 0) + return cmd; + } while (inputChar == cmdChar); + ++cmd; + } + return -1; +} bool DreamWebEngine::execCommand() { static const char *comlist[] = { @@ -112,7 +132,38 @@ bool DreamWebEngine::execCommand() { "LIST", "READ", "LOGON", - "KEYS" + "KEYS", + NULL + }; + + static const char *comlistFR[] = { + "SORTIR", + "AIDE", + "LISTE", + "LIRE", + "CONNEXION", + "TOUCHES", // should be CLES but it is translated as TOUCHES in the game... + NULL + }; + + static const char *comlistDE[] = { + "ENDE", + "HILFE", + "LISTE", + "LIES", + "ZUGRIFF", + "DATEN", + NULL + }; + + static const char *comlistIT[] = { + "ESCI", + "AIUTO", + "ELENCA", + "LEGGI", + "ACCEDI", + "CHIAVI", + NULL }; if (_inputLine[0] == 0) { @@ -121,26 +172,23 @@ bool DreamWebEngine::execCommand() { return false; } - int cmd; - bool done = false; - // Loop over all commands in the list and see if we get a match - for (cmd = 0; cmd < ARRAYSIZE(comlist); ++cmd) { - const char *cmdStr = comlist[cmd]; - const char *inputStr = _inputLine; - // Compare the command, char by char, to see if we get a match. - // We only care about the prefix matching, though. - char inputChar, cmdChar; - do { - inputChar = *inputStr; inputStr += 2; - cmdChar = *cmdStr++; - if (cmdChar == 0) { - done = true; - break; - } - } while (inputChar == cmdChar); - - if (done) + int cmd = findCommand(comlist); + if (cmd == -1) { + // This did not match an english command. Try to find a localized one. + switch (getLanguage()) { + case Common::FR_FRA: + cmd = findCommand(comlistFR); + break; + case Common::DE_DEU: + cmd = findCommand(comlistDE); break; + case Common::IT_ITA: + cmd = findCommand(comlistIT); + break; + case Common::ES_ESP: + default: + break; + } } // Execute the selected command @@ -154,7 +202,21 @@ bool DreamWebEngine::execCommand() { // this extra text is wrapped around the common copy protection check, // to keep it faithful to the original, if requested. if (!_copyProtection) { - monPrint("VALID COMMANDS ARE EXIT, HELP, LIST, READ, LOGON, KEYS"); + switch (getLanguage()) { + case Common::FR_FRA: + monPrint("LES COMMANDES VALIDES SONT SORTIR, AIDE, LISTE, LIRE, CONNEXION, TOUCHES"); + break; + case Common::DE_DEU: + monPrint("G\232LTIGE BEFEHLE SIND ENDE, HILFE, LISTE, LIES, ZUGRIFF, DATEN"); + break; + case Common::IT_ITA: + monPrint("I COMANDI VALIDI SONO ESCI, AIUTO, ELENCA, LEGGI, ACCEDI, CHIAVI"); + break; + case Common::ES_ESP: + default: + monPrint("VALID COMMANDS ARE EXIT, HELP, LIST, READ, LOGON, KEYS"); + break; + } } break; case 2: @@ -177,7 +239,6 @@ bool DreamWebEngine::execCommand() { } - void DreamWebEngine::monitorLogo() { if (_logoNum != _oldLogoNum) { _oldLogoNum = _logoNum; -- cgit v1.2.3 From 88c216e086ca181191a353745c1959b8774352eb Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Tue, 26 Feb 2013 22:41:13 +0000 Subject: DREAMWEB: Make some static arrays const --- engines/dreamweb/dreamweb.h | 2 +- engines/dreamweb/monitor.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index c13a6995bf..5746568e4e 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -513,7 +513,7 @@ public: void dirCom(); void useMon(); bool execCommand(); - int findCommand(const char* cmdList[]); + int findCommand(const char *const cmdList[]); // from newplace.cpp void getUnderCentre(); diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index 3bcb38d074..8dba506ca6 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -105,7 +105,7 @@ void DreamWebEngine::useMon() { workToScreenM(); } -int DreamWebEngine::findCommand(const char* cmdList[]) { +int DreamWebEngine::findCommand(const char *const cmdList[]) { // Loop over all commands in the list and see if we get a match int cmd = 0; while (cmdList[cmd] != NULL) { @@ -126,7 +126,7 @@ int DreamWebEngine::findCommand(const char* cmdList[]) { } bool DreamWebEngine::execCommand() { - static const char *comlist[] = { + static const char *const comlist[] = { "EXIT", "HELP", "LIST", @@ -136,7 +136,7 @@ bool DreamWebEngine::execCommand() { NULL }; - static const char *comlistFR[] = { + static const char *const comlistFR[] = { "SORTIR", "AIDE", "LISTE", @@ -146,7 +146,7 @@ bool DreamWebEngine::execCommand() { NULL }; - static const char *comlistDE[] = { + static const char *const comlistDE[] = { "ENDE", "HILFE", "LISTE", @@ -155,8 +155,8 @@ bool DreamWebEngine::execCommand() { "DATEN", NULL }; - - static const char *comlistIT[] = { + + static const char *const comlistIT[] = { "ESCI", "AIUTO", "ELENCA", -- cgit v1.2.3 From 6d988c18535958b432147f77b484c9284899e143 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Wed, 20 Mar 2013 21:24:27 +0000 Subject: DREAMWEB: Change Italian translation of terminal LOGON command SimSaw found the Italian user manual and it uses REGISTRA. So I changed the translation in-game to use the same. --- engines/dreamweb/monitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index 8dba506ca6..28dd58c7b4 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -161,7 +161,7 @@ bool DreamWebEngine::execCommand() { "AIUTO", "ELENCA", "LEGGI", - "ACCEDI", + "REGISTRA", "CHIAVI", NULL }; -- cgit v1.2.3 From 1ef6ee26cc179a0c076f9abf2390a31629ff76e3 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Thu, 21 Mar 2013 08:59:20 +0000 Subject: DREAMWEB: Also update LOGON Italian translation in help string --- engines/dreamweb/monitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index 28dd58c7b4..b07fbf54fc 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -210,7 +210,7 @@ bool DreamWebEngine::execCommand() { monPrint("G\232LTIGE BEFEHLE SIND ENDE, HILFE, LISTE, LIES, ZUGRIFF, DATEN"); break; case Common::IT_ITA: - monPrint("I COMANDI VALIDI SONO ESCI, AIUTO, ELENCA, LEGGI, ACCEDI, CHIAVI"); + monPrint("I COMANDI VALIDI SONO ESCI, AIUTO, ELENCA, LEGGI, REGISTRA, CHIAVI"); break; case Common::ES_ESP: default: -- cgit v1.2.3 From ff33c5c367e15df32862887fc8c2c53817e4713f Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 17 Apr 2013 21:14:04 +0200 Subject: DREAMWEB: Make location array sizes more consistent While location 15 doesn't actually exist, this makes roomPics more consistent with the roomsCanGo array. --- engines/dreamweb/newplace.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/newplace.cpp b/engines/dreamweb/newplace.cpp index 5b4b0260f5..6b1f9d097b 100644 --- a/engines/dreamweb/newplace.cpp +++ b/engines/dreamweb/newplace.cpp @@ -140,7 +140,7 @@ void DreamWebEngine::putUnderCentre() { } void DreamWebEngine::locationPic() { - const int roomPics[] = { 5, 0, 3, 2, 4, 1, 10, 9, 8, 6, 11, 4, 7, 7, 0 }; + const int roomPics[] = { 5, 0, 3, 2, 4, 1, 10, 9, 8, 6, 11, 4, 7, 7, 0, 0 }; byte picture = roomPics[_destPos]; if (picture >= 6) -- cgit v1.2.3 From cdfd5f85c888525c274f309a4b313f8aa2fa6636 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 18 Apr 2013 20:10:33 +0200 Subject: ENGINES: Silence clang warning about unused private member _vm This affects the Console / debugger classes of multiple engines. An alternative solution would have been to remove the unused _vm member vars. However, it seems likely that in the future, the _vm member could be useful for methods added to the console. So instead, we add a simple assert(_vm) to silence the clang warning. --- engines/dreamweb/console.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/console.cpp b/engines/dreamweb/console.cpp index d415089a48..532bf815ef 100644 --- a/engines/dreamweb/console.cpp +++ b/engines/dreamweb/console.cpp @@ -25,6 +25,7 @@ namespace DreamWeb { DreamWebConsole::DreamWebConsole(DreamWebEngine *vm) : GUI::Debugger(), _vm(vm) { + assert(_vm); } DreamWebConsole::~DreamWebConsole() { -- cgit v1.2.3 From 54640a731744d2159f7d59e211c8c8d185df9e35 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Fri, 26 Apr 2013 22:45:52 +0100 Subject: I18N: Workaround to fix spelling in French command 3 --- engines/dreamweb/stubs.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index d93c2a951c..057a0c847a 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -1259,6 +1259,10 @@ void DreamWebEngine::commandWithOb(uint8 command, uint8 type, uint8 index) { uint8 textLen = _textLen; const uint8 *string = (const uint8 *)_commandText.getString(command); + // Fix spelling in command 3 FR: "Aller ver" => "Aller vers" + const char *command3Fr = "Aller vers"; + if (command == 3 && getLanguage() == Common::FR_FRA) + string = (const uint8 *)command3Fr; printDirect(string, _textAddressX, _textAddressY, textLen, (bool)(textLen & 1)); copyName(type, index, commandLine); -- cgit v1.2.3 From 6936f830ea397bb29ca6ef58e983e33c9467af2d Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Mon, 29 Apr 2013 22:34:30 +0100 Subject: DREAMWEB: Add commands in Spanish for the Network Terminal Also changed the German HELP command to HILF at the translator request (which means both HILF and HILFE work since the parser only matches the start of the string). --- engines/dreamweb/monitor.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index b07fbf54fc..2ac8ddc70a 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -148,7 +148,7 @@ bool DreamWebEngine::execCommand() { static const char *const comlistDE[] = { "ENDE", - "HILFE", + "HILF", "LISTE", "LIES", "ZUGRIFF", @@ -165,6 +165,16 @@ bool DreamWebEngine::execCommand() { "CHIAVI", NULL }; + + static const char *const comlistES[] = { + "SALIR", + "AYUDA", + "LISTA", + "LEER", + "IDENTIFICARSE", + "CLAVES", + NULL + }; if (_inputLine[0] == 0) { // No input @@ -186,6 +196,8 @@ bool DreamWebEngine::execCommand() { cmd = findCommand(comlistIT); break; case Common::ES_ESP: + cmd = findCommand(comlistES); + break; default: break; } -- cgit v1.2.3 From 8942a96bafaa8541383347318c19392ce949248a Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Thu, 2 May 2013 21:37:52 +0100 Subject: DREAMWEB: Change Spanish LOGON command to ACCESO --- engines/dreamweb/monitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index 2ac8ddc70a..0c9b8c29dd 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -171,7 +171,7 @@ bool DreamWebEngine::execCommand() { "AYUDA", "LISTA", "LEER", - "IDENTIFICARSE", + "ACCESO", "CLAVES", NULL }; -- cgit v1.2.3 From 0031c41db855ac4bebd05ca1b2c1fa6694242979 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 2 May 2013 18:26:58 -0400 Subject: COMMON: Change kPlatformPC to kPlatformDOS "PC" was very ambiguous and now it matches what we show in the GUI. This also corrects sword2's platform to Windows. --- engines/dreamweb/detection_tables.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/detection_tables.h b/engines/dreamweb/detection_tables.h index 8a2f94f99b..ec54484d28 100644 --- a/engines/dreamweb/detection_tables.h +++ b/engines/dreamweb/detection_tables.h @@ -45,7 +45,7 @@ static const DreamWebGameDescription gameDescriptions[] = { AD_LISTEND }, Common::EN_ANY, - Common::kPlatformPC, + Common::kPlatformDOS, 0, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, @@ -62,7 +62,7 @@ static const DreamWebGameDescription gameDescriptions[] = { AD_LISTEND }, Common::EN_ANY, - Common::kPlatformPC, + Common::kPlatformDOS, ADGF_CD, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, @@ -83,7 +83,7 @@ static const DreamWebGameDescription gameDescriptions[] = { AD_LISTEND }, Common::EN_GRB, - Common::kPlatformPC, + Common::kPlatformDOS, ADGF_CD, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, @@ -100,7 +100,7 @@ static const DreamWebGameDescription gameDescriptions[] = { AD_LISTEND }, Common::EN_USA, - Common::kPlatformPC, + Common::kPlatformDOS, ADGF_CD, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, @@ -117,7 +117,7 @@ static const DreamWebGameDescription gameDescriptions[] = { AD_LISTEND }, Common::FR_FRA, - Common::kPlatformPC, + Common::kPlatformDOS, ADGF_CD, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, @@ -135,7 +135,7 @@ static const DreamWebGameDescription gameDescriptions[] = { AD_LISTEND }, Common::FR_FRA, - Common::kPlatformPC, + Common::kPlatformDOS, ADGF_CD, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, @@ -152,7 +152,7 @@ static const DreamWebGameDescription gameDescriptions[] = { AD_LISTEND }, Common::DE_DEU, - Common::kPlatformPC, + Common::kPlatformDOS, 0, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, @@ -169,7 +169,7 @@ static const DreamWebGameDescription gameDescriptions[] = { AD_LISTEND }, Common::DE_DEU, - Common::kPlatformPC, + Common::kPlatformDOS, ADGF_CD, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, @@ -186,7 +186,7 @@ static const DreamWebGameDescription gameDescriptions[] = { AD_LISTEND }, Common::ES_ESP, - Common::kPlatformPC, + Common::kPlatformDOS, 0, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, @@ -203,7 +203,7 @@ static const DreamWebGameDescription gameDescriptions[] = { AD_LISTEND }, Common::ES_ESP, - Common::kPlatformPC, + Common::kPlatformDOS, ADGF_CD, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, @@ -221,7 +221,7 @@ static const DreamWebGameDescription gameDescriptions[] = { AD_LISTEND }, Common::ES_ESP, - Common::kPlatformPC, + Common::kPlatformDOS, ADGF_CD, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, @@ -238,7 +238,7 @@ static const DreamWebGameDescription gameDescriptions[] = { AD_LISTEND }, Common::IT_ITA, - Common::kPlatformPC, + Common::kPlatformDOS, 0, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, -- cgit v1.2.3 From 7f3cbdba6b80551530a1f6f2d36381b11bb3ae07 Mon Sep 17 00:00:00 2001 From: Simon Sawatzki Date: Sat, 4 May 2013 22:13:53 +0200 Subject: DREAMWEB: Changed Italian LOGON command Changed REGISTRA to ACCEDI for better user convenience. --- engines/dreamweb/monitor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index 0c9b8c29dd..1f9fa8d24f 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -161,7 +161,7 @@ bool DreamWebEngine::execCommand() { "AIUTO", "ELENCA", "LEGGI", - "REGISTRA", + "ACCEDI", "CHIAVI", NULL }; @@ -222,7 +222,7 @@ bool DreamWebEngine::execCommand() { monPrint("G\232LTIGE BEFEHLE SIND ENDE, HILFE, LISTE, LIES, ZUGRIFF, DATEN"); break; case Common::IT_ITA: - monPrint("I COMANDI VALIDI SONO ESCI, AIUTO, ELENCA, LEGGI, REGISTRA, CHIAVI"); + monPrint("I COMANDI VALIDI SONO ESCI, AIUTO, ELENCA, LEGGI, ACCEDI, CHIAVI"); break; case Common::ES_ESP: default: -- cgit v1.2.3