aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
authorKari Salminen2008-01-02 00:35:32 +0000
committerKari Salminen2008-01-02 00:35:32 +0000
commit9db76278efd93a6aec7cea7ce1c59fa993c332e0 (patch)
tree050fbcc114a4a36e814ca8f4ae187afa047ef5cd /engines/agi
parentf72b094c699ef754767dbdb1bbb2fededd4aeba8 (diff)
downloadscummvm-rg350-9db76278efd93a6aec7cea7ce1c59fa993c332e0.tar.gz
scummvm-rg350-9db76278efd93a6aec7cea7ce1c59fa993c332e0.tar.bz2
scummvm-rg350-9db76278efd93a6aec7cea7ce1c59fa993c332e0.zip
Set amount of free memory (v8 i.e. vFreePages) to maximum value (Also when loading a saved game!). Fixes Gold Rush's help screen and bible passage showing.
svn-id: r30136
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/cycle.cpp1
-rw-r--r--engines/agi/saveload.cpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp
index 2d7202c35b..a517b8d847 100644
--- a/engines/agi/cycle.cpp
+++ b/engines/agi/cycle.cpp
@@ -387,6 +387,7 @@ int AgiEngine::runGame() {
break;
}
+ setvar(vFreePages, 255); // Set amount of free memory to the maximum value
setvar(vMaxInputChars, 38);
_game.inputMode = INPUT_NONE;
_game.inputEnabled = 0;
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp
index 2be908d29b..db7bba13e4 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -264,6 +264,8 @@ int AgiEngine::loadGame(const char *fileName, bool checkId) {
for (i = 0; i < MAX_VARS; i++)
_game.vars[i] = in->readByte();
+ setvar(vFreePages, 255); // Set amount of free memory to the maximum value (Overwriting the just loaded value)
+
_game.horizon = in->readSint16BE();
_game.lineStatus = in->readSint16BE();
_game.lineUserInput = in->readSint16BE();