[Scummvm-git-logs] scummvm master -> aba467439f08028599b192ff14291936c0a08393
lotharsm
mail at serra.me
Sat Jul 17 06:29:44 UTC 2021
This automated email contains information about 8 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
552813545d MOHAWK: MYST: Add option to simulate CD-ROM loading times during card transition
6c86a4956a MOHAWK: MYST: Change timing for CD-ROM emulation
66fed9f03d MOHAWK: MYST: Reduce calls to ConfMan by introducing state variable for cdromdelay requests
d42f166634 MOHAWK: MYST: Use wider range of possible loading delays
149ffec094 MOHAWK: MYST: Make timing more accurate
e9df365435 MOHAWK: MYST: Remove leftover variables
2e0f983db3 MOHAWK: MYST: Fix formatting in addCdRomDelay related routine
aba467439f MOHAWK: MYST: Greatly simplify addCdRomDelay related configuration checks
Commit: 552813545d8fe40938ab17bd0d0583c8a00647d7
https://github.com/scummvm/scummvm/commit/552813545d8fe40938ab17bd0d0583c8a00647d7
Author: Lothar Serra Mari (mail at serra.me)
Date: 2021-07-17T08:29:38+02:00
Commit Message:
MOHAWK: MYST: Add option to simulate CD-ROM loading times during card transition
Changed paths:
engines/mohawk/dialogs.cpp
engines/mohawk/dialogs.h
engines/mohawk/myst.cpp
engines/mohawk/myst.h
engines/mohawk/myst_metaengine.cpp
diff --git a/engines/mohawk/dialogs.cpp b/engines/mohawk/dialogs.cpp
index 0149e15834..398714fa01 100644
--- a/engines/mohawk/dialogs.cpp
+++ b/engines/mohawk/dialogs.cpp
@@ -100,6 +100,7 @@ MystOptionsWidget::MystOptionsWidget(GuiObject *boss, const Common::String &name
_transitionsCheckbox(nullptr),
_mystFlyByCheckbox(nullptr),
_spaceshipFuzzyLogicCheckbox(nullptr),
+ _addCdromDelayCheckbox(nullptr),
_languagePopUp(nullptr),
_dropPageButton(nullptr),
_showMapButton(nullptr),
@@ -134,6 +135,8 @@ MystOptionsWidget::MystOptionsWidget(GuiObject *boss, const Common::String &name
_spaceshipFuzzyLogicCheckbox = new GUI::CheckboxWidget(widgetsBoss(), "MystGameOptionsDialog.FuzzyMode", _("~F~uzzy Logic in SpaceShip Active"));
}
+ _addCdromDelayCheckbox = new GUI::CheckboxWidget(widgetsBoss(), "MystGameOptionsDialog.CdromDelay", _("Simulate loading times of old CD drives"));
+
if (isInGame()) {
MohawkEngine_Myst *vm = static_cast<MohawkEngine_Myst *>(g_engine);
assert(vm);
@@ -177,6 +180,7 @@ void MystOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common::Stri
.addWidget("Transistions", "Checkbox")
.addWidget("PlayMystFlyBy", "Checkbox")
.addWidget("FuzzyMode", "Checkbox")
+ .addWidget("CdromDelay", "Checkbox")
.addLayout(GUI::ThemeLayout::kLayoutHorizontal)
.addPadding(0, 0, 0, 0)
.addWidget("LanguageDesc", "OptionsLabel")
@@ -213,6 +217,10 @@ void MystOptionsWidget::load() {
_spaceshipFuzzyLogicCheckbox->setState(ConfMan.getBool("fuzzy_logic", _domain));
}
+ if (_addCdromDelayCheckbox) {
+ _addCdromDelayCheckbox->setState(ConfMan.getBool("cdromdelay", _domain));
+ }
+
if (_languagePopUp) {
Common::Language language = Common::parseLanguage(ConfMan.get("language", _domain));
const MystLanguage *languageDesc = MohawkEngine_Myst::getLanguageDesc(language);
@@ -253,6 +261,10 @@ bool MystOptionsWidget::save() {
ConfMan.setBool("fuzzy_logic", _spaceshipFuzzyLogicCheckbox->getState(), _domain);
}
+ if (_addCdromDelayCheckbox) {
+ ConfMan.setBool("cdromdelay", _addCdromDelayCheckbox->getState(), _domain);
+ }
+
if (_languagePopUp) {
MohawkEngine_Myst *vm = static_cast<MohawkEngine_Myst *>(g_engine);
assert(vm);
diff --git a/engines/mohawk/dialogs.h b/engines/mohawk/dialogs.h
index d479dddf94..95e3c7e134 100644
--- a/engines/mohawk/dialogs.h
+++ b/engines/mohawk/dialogs.h
@@ -101,6 +101,7 @@ private:
GUI::CheckboxWidget *_transitionsCheckbox;
GUI::CheckboxWidget *_mystFlyByCheckbox;
GUI::CheckboxWidget *_spaceshipFuzzyLogicCheckbox;
+ GUI::CheckboxWidget *_addCdromDelayCheckbox;
GUI::PopUpWidget *_languagePopUp;
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index 85a6db5939..9d5efee0d6 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -917,6 +917,17 @@ void MohawkEngine_Myst::changeToStack(MystStack stackId, uint16 card, uint16 lin
_cache.clear();
_gfx->clearCache();
+ // Add artificial CD-ROM delay
+ if (ConfMan.getBool("cdromdelay")) {
+ if (_stack->getStackId() != kIntroStack || _stack->getStackId() != kMenuStack) {
+ // Pretty arbitrary delays to mimic a period correct 4x drive
+ // TODO: Since the disc layout of the original CD-ROMs is known,
+ // it should be possible to adapt the delay depending on the
+ // target stack in order to replicate the original loading times.
+ g_system->delayMillis(_rnd->getRandomNumberRng(500,750));
+ }
+ }
+
changeToCard(card, kTransitionCopy);
if (linkDstSound)
@@ -942,6 +953,19 @@ void MohawkEngine_Myst::changeToCard(uint16 card, TransitionType transition) {
_card->leave();
}
+ // Add artificial CD-ROM delay
+ if (ConfMan.getBool("cdromdelay")) {
+ if (_stack->getStackId() != kIntroStack && _stack->getStackId() != kMenuStack) {
+
+ // The original engine disables the mouse cursor when loading new cards.
+ _cursor->hideCursor();
+ _system->updateScreen();
+ // Pretty arbitrary delays to mimic a period correct 4x drive
+ g_system->delayMillis(_rnd->getRandomNumberRng(175,225));
+ _cursor->showCursor();
+ }
+ }
+
_card = MystCardPtr(new MystCard(this, card));
_card->enter();
diff --git a/engines/mohawk/myst.h b/engines/mohawk/myst.h
index c2ac98a729..9c39a59cd2 100644
--- a/engines/mohawk/myst.h
+++ b/engines/mohawk/myst.h
@@ -147,6 +147,9 @@ public:
uint16 getMainCursor() { return _mainCursor; }
void refreshCursor();
bool wait(uint32 duration, bool skippable = false);
+ bool addCdRomDelay;
+ uint minCdRomDelay;
+ uint maxCdRomDelay;
/** Update the game state according to events and update the screen */
void doFrame();
diff --git a/engines/mohawk/myst_metaengine.cpp b/engines/mohawk/myst_metaengine.cpp
index a77b3e8573..210bb1775b 100644
--- a/engines/mohawk/myst_metaengine.cpp
+++ b/engines/mohawk/myst_metaengine.cpp
@@ -27,6 +27,7 @@ void Mohawk::MohawkMetaEngine_Myst::registerDefaultSettings() {
ConfMan.registerDefault("zip_mode", false);
ConfMan.registerDefault("transition_mode", false);
ConfMan.registerDefault("fuzzy_logic", false);
+ ConfMan.registerDefault("cdromdelay", false);
}
const Mohawk::MystLanguage *Mohawk::MohawkMetaEngine_Myst::listLanguages() {
Commit: 6c86a4956a9110afb0735ec9d0713699c2b7b89e
https://github.com/scummvm/scummvm/commit/6c86a4956a9110afb0735ec9d0713699c2b7b89e
Author: Lothar Serra Mari (mail at serra.me)
Date: 2021-07-17T08:29:38+02:00
Commit Message:
MOHAWK: MYST: Change timing for CD-ROM emulation
Changed paths:
engines/mohawk/myst.cpp
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index 9d5efee0d6..b6218e6f11 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -924,7 +924,7 @@ void MohawkEngine_Myst::changeToStack(MystStack stackId, uint16 card, uint16 lin
// TODO: Since the disc layout of the original CD-ROMs is known,
// it should be possible to adapt the delay depending on the
// target stack in order to replicate the original loading times.
- g_system->delayMillis(_rnd->getRandomNumberRng(500,750));
+ g_system->delayMillis(_rnd->getRandomNumberRng(200,500));
}
}
Commit: 66fed9f03d2fad487bcb3425c9ea1fb21e815acf
https://github.com/scummvm/scummvm/commit/66fed9f03d2fad487bcb3425c9ea1fb21e815acf
Author: Lothar Serra Mari (mail at serra.me)
Date: 2021-07-17T08:29:38+02:00
Commit Message:
MOHAWK: MYST: Reduce calls to ConfMan by introducing state variable for cdromdelay requests
Changed paths:
engines/mohawk/myst.cpp
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index b6218e6f11..4437b62668 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -102,6 +102,13 @@ MohawkEngine_Myst::MohawkEngine_Myst(OSystem *syst, const MohawkGameDescription
// and to support the drop page and other actions in the options dialog.
assert(!_mainMenuDialog);
_mainMenuDialog = new MystMenuDialog(this);
+
+ // Enable CD-ROM delay simulation if necessary
+ if (ConfMan.getBool("cdromdelay")) {
+ addCdRomDelay = true;
+ } else {
+ addCdRomDelay = false;
+ }
}
MohawkEngine_Myst::~MohawkEngine_Myst() {
@@ -533,6 +540,13 @@ void MohawkEngine_Myst::applyGameSettings() {
_gfx->loadMenuFont();
changeToStack(_stack->getStackId(), _card->getId(), 0, 0);
}
+
+ // Toggle CD-ROM simulation if necessary
+ if (ConfMan.getBool("cdromdelay")) {
+ addCdRomDelay = true;
+ } else {
+ addCdRomDelay = false;
+ }
}
Common::KeymapArray MohawkEngine_Myst::initKeymaps(const char *target) {
@@ -918,7 +932,7 @@ void MohawkEngine_Myst::changeToStack(MystStack stackId, uint16 card, uint16 lin
_gfx->clearCache();
// Add artificial CD-ROM delay
- if (ConfMan.getBool("cdromdelay")) {
+ if (addCdRomDelay == true) {
if (_stack->getStackId() != kIntroStack || _stack->getStackId() != kMenuStack) {
// Pretty arbitrary delays to mimic a period correct 4x drive
// TODO: Since the disc layout of the original CD-ROMs is known,
@@ -954,7 +968,7 @@ void MohawkEngine_Myst::changeToCard(uint16 card, TransitionType transition) {
}
// Add artificial CD-ROM delay
- if (ConfMan.getBool("cdromdelay")) {
+ if (addCdRomDelay == true) {
if (_stack->getStackId() != kIntroStack && _stack->getStackId() != kMenuStack) {
// The original engine disables the mouse cursor when loading new cards.
Commit: d42f166634c8c468e494f37178708ef37579a6f4
https://github.com/scummvm/scummvm/commit/d42f166634c8c468e494f37178708ef37579a6f4
Author: Lothar Serra Mari (mail at serra.me)
Date: 2021-07-17T08:29:38+02:00
Commit Message:
MOHAWK: MYST: Use wider range of possible loading delays
Changed paths:
engines/mohawk/myst.cpp
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index 4437b62668..8909549ed9 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -933,12 +933,12 @@ void MohawkEngine_Myst::changeToStack(MystStack stackId, uint16 card, uint16 lin
// Add artificial CD-ROM delay
if (addCdRomDelay == true) {
- if (_stack->getStackId() != kIntroStack || _stack->getStackId() != kMenuStack) {
+ if (_stack->getStackId() != kIntroStack && _stack->getStackId() != kMenuStack) {
// Pretty arbitrary delays to mimic a period correct 4x drive
// TODO: Since the disc layout of the original CD-ROMs is known,
// it should be possible to adapt the delay depending on the
// target stack in order to replicate the original loading times.
- g_system->delayMillis(_rnd->getRandomNumberRng(200,500));
+ g_system->delayMillis(_rnd->getRandomNumberRng(1000,1200));
}
}
@@ -974,8 +974,11 @@ void MohawkEngine_Myst::changeToCard(uint16 card, TransitionType transition) {
// The original engine disables the mouse cursor when loading new cards.
_cursor->hideCursor();
_system->updateScreen();
- // Pretty arbitrary delays to mimic a period correct 4x drive
- g_system->delayMillis(_rnd->getRandomNumberRng(175,225));
+
+ // Pretty arbitrary delays to mimic a period correct 2x-4x drive
+ // Note: This is not only based on seeking times (only 80-120ms depending
+ // on the source), but also accounts for loading the next chunk of data.
+ g_system->delayMillis(_rnd->getRandomNumberRng(350,400));
_cursor->showCursor();
}
}
Commit: 149ffec09437498e231b88e3b540007ae10042b5
https://github.com/scummvm/scummvm/commit/149ffec09437498e231b88e3b540007ae10042b5
Author: Lothar Serra Mari (mail at serra.me)
Date: 2021-07-17T08:29:38+02:00
Commit Message:
MOHAWK: MYST: Make timing more accurate
Changed paths:
engines/mohawk/myst.cpp
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index 8909549ed9..6e052aa69e 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -970,7 +970,6 @@ void MohawkEngine_Myst::changeToCard(uint16 card, TransitionType transition) {
// Add artificial CD-ROM delay
if (addCdRomDelay == true) {
if (_stack->getStackId() != kIntroStack && _stack->getStackId() != kMenuStack) {
-
// The original engine disables the mouse cursor when loading new cards.
_cursor->hideCursor();
_system->updateScreen();
@@ -978,7 +977,7 @@ void MohawkEngine_Myst::changeToCard(uint16 card, TransitionType transition) {
// Pretty arbitrary delays to mimic a period correct 2x-4x drive
// Note: This is not only based on seeking times (only 80-120ms depending
// on the source), but also accounts for loading the next chunk of data.
- g_system->delayMillis(_rnd->getRandomNumberRng(350,400));
+ g_system->delayMillis(_rnd->getRandomNumberRng(300,400));
_cursor->showCursor();
}
}
Commit: e9df3654351589b3e05a56dedaed2c39d406cfaf
https://github.com/scummvm/scummvm/commit/e9df3654351589b3e05a56dedaed2c39d406cfaf
Author: Lothar Serra Mari (mail at serra.me)
Date: 2021-07-17T08:29:38+02:00
Commit Message:
MOHAWK: MYST: Remove leftover variables
Changed paths:
engines/mohawk/myst.h
diff --git a/engines/mohawk/myst.h b/engines/mohawk/myst.h
index 9c39a59cd2..8589a1ecb7 100644
--- a/engines/mohawk/myst.h
+++ b/engines/mohawk/myst.h
@@ -148,8 +148,6 @@ public:
void refreshCursor();
bool wait(uint32 duration, bool skippable = false);
bool addCdRomDelay;
- uint minCdRomDelay;
- uint maxCdRomDelay;
/** Update the game state according to events and update the screen */
void doFrame();
Commit: 2e0f983db387d2d2062e5caaf82db86cc7228ae7
https://github.com/scummvm/scummvm/commit/2e0f983db387d2d2062e5caaf82db86cc7228ae7
Author: Lothar Serra Mari (mail at serra.me)
Date: 2021-07-17T08:29:38+02:00
Commit Message:
MOHAWK: MYST: Fix formatting in addCdRomDelay related routine
Changed paths:
engines/mohawk/myst.cpp
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index 6e052aa69e..a5294ba228 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -938,7 +938,7 @@ void MohawkEngine_Myst::changeToStack(MystStack stackId, uint16 card, uint16 lin
// TODO: Since the disc layout of the original CD-ROMs is known,
// it should be possible to adapt the delay depending on the
// target stack in order to replicate the original loading times.
- g_system->delayMillis(_rnd->getRandomNumberRng(1000,1200));
+ g_system->delayMillis(_rnd->getRandomNumberRng(1000, 1200));
}
}
@@ -977,7 +977,7 @@ void MohawkEngine_Myst::changeToCard(uint16 card, TransitionType transition) {
// Pretty arbitrary delays to mimic a period correct 2x-4x drive
// Note: This is not only based on seeking times (only 80-120ms depending
// on the source), but also accounts for loading the next chunk of data.
- g_system->delayMillis(_rnd->getRandomNumberRng(300,400));
+ g_system->delayMillis(_rnd->getRandomNumberRng(300, 400));
_cursor->showCursor();
}
}
Commit: aba467439f08028599b192ff14291936c0a08393
https://github.com/scummvm/scummvm/commit/aba467439f08028599b192ff14291936c0a08393
Author: Lothar Serra Mari (mail at serra.me)
Date: 2021-07-17T08:29:38+02:00
Commit Message:
MOHAWK: MYST: Greatly simplify addCdRomDelay related configuration checks
Changed paths:
engines/mohawk/myst.cpp
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index a5294ba228..c7240f7d8c 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -104,11 +104,7 @@ MohawkEngine_Myst::MohawkEngine_Myst(OSystem *syst, const MohawkGameDescription
_mainMenuDialog = new MystMenuDialog(this);
// Enable CD-ROM delay simulation if necessary
- if (ConfMan.getBool("cdromdelay")) {
- addCdRomDelay = true;
- } else {
- addCdRomDelay = false;
- }
+ addCdRomDelay = ConfMan.getBool("cdromdelay");
}
MohawkEngine_Myst::~MohawkEngine_Myst() {
@@ -542,11 +538,7 @@ void MohawkEngine_Myst::applyGameSettings() {
}
// Toggle CD-ROM simulation if necessary
- if (ConfMan.getBool("cdromdelay")) {
- addCdRomDelay = true;
- } else {
- addCdRomDelay = false;
- }
+ addCdRomDelay = ConfMan.getBool("cdromdelay");
}
Common::KeymapArray MohawkEngine_Myst::initKeymaps(const char *target) {
@@ -932,7 +924,7 @@ void MohawkEngine_Myst::changeToStack(MystStack stackId, uint16 card, uint16 lin
_gfx->clearCache();
// Add artificial CD-ROM delay
- if (addCdRomDelay == true) {
+ if (addCdRomDelay) {
if (_stack->getStackId() != kIntroStack && _stack->getStackId() != kMenuStack) {
// Pretty arbitrary delays to mimic a period correct 4x drive
// TODO: Since the disc layout of the original CD-ROMs is known,
@@ -968,7 +960,7 @@ void MohawkEngine_Myst::changeToCard(uint16 card, TransitionType transition) {
}
// Add artificial CD-ROM delay
- if (addCdRomDelay == true) {
+ if (addCdRomDelay) {
if (_stack->getStackId() != kIntroStack && _stack->getStackId() != kMenuStack) {
// The original engine disables the mouse cursor when loading new cards.
_cursor->hideCursor();
More information about the Scummvm-git-logs
mailing list