aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/riven_vars.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mohawk/riven_vars.cpp')
-rw-r--r--engines/mohawk/riven_vars.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/mohawk/riven_vars.cpp b/engines/mohawk/riven_vars.cpp
index 946e2e0496..ba5c343e07 100644
--- a/engines/mohawk/riven_vars.cpp
+++ b/engines/mohawk/riven_vars.cpp
@@ -268,7 +268,12 @@ static const char *variableNames[] = {
};
uint32 &MohawkEngine_Riven::getStackVar(uint32 index) {
- return _vars[getName(VariableNames, index)];
+ Common::String name = getName(VariableNames, index);
+
+ if (!_vars.contains(name))
+ error("Could not find variable '%s' (stack variable %d)", name.c_str(), index);
+
+ return _vars[name];
}
void MohawkEngine_Riven::initVars() {
@@ -299,6 +304,7 @@ void MohawkEngine_Riven::initVars() {
_vars["bmagcar"] = 1;
_vars["gnmagcar"] = 1;
_vars["omusicplayer"] = 1;
+ _vars["transitionmode"] = kRivenTransitionSpeedFastest;
// Randomize the telescope combination
uint32 &teleCombo = _vars["tcorrectorder"];