aboutsummaryrefslogtreecommitdiff
path: root/engines/adl/adl.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-08-27 13:59:08 -0400
committerPaul Gilbert2016-08-27 13:59:08 -0400
commitf5ab3d1cd9eb3a884b0ab5d0b154a4f9cccc74b7 (patch)
tree771a8d2b3fddf96c17a1d81d42cb08dfba09d110 /engines/adl/adl.cpp
parent873d555add9aaf5eb0d021518f5134142e2c2ff6 (diff)
parent5ea32efbb0ecb3e6b8336ad3c2edd3905ea5b89a (diff)
downloadscummvm-rg350-f5ab3d1cd9eb3a884b0ab5d0b154a4f9cccc74b7.tar.gz
scummvm-rg350-f5ab3d1cd9eb3a884b0ab5d0b154a4f9cccc74b7.tar.bz2
scummvm-rg350-f5ab3d1cd9eb3a884b0ab5d0b154a4f9cccc74b7.zip
Merge branch 'master' into xeen
Diffstat (limited to 'engines/adl/adl.cpp')
-rw-r--r--engines/adl/adl.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp
index b6af54962e..19595606e1 100644
--- a/engines/adl/adl.cpp
+++ b/engines/adl/adl.cpp
@@ -520,6 +520,8 @@ void AdlEngine::dropItem(byte noun) {
}
Common::Error AdlEngine::run() {
+ initGraphics(DISPLAY_WIDTH * 2, DISPLAY_HEIGHT * 2, true);
+
_console = new Console(this);
_speaker = new Speaker();
_display = new Display();
@@ -659,6 +661,11 @@ Common::Error AdlEngine::loadGameState(int slot) {
_state.rooms[i].isFirstTime = inFile->readByte();
}
+ // NOTE: _state.curPicture is part of the save state in the original engine. We
+ // reconstruct it instead. This is believed to be safe for at least hires 0-2, but
+ // this may need to be re-evaluated for later games.
+ _state.curPicture = _state.rooms[_state.room].curPicture;
+
size = inFile->readUint32BE();
if (size != _state.items.size())
error("Item count mismatch (expected %i; found %i)", _state.items.size(), size);
@@ -949,7 +956,7 @@ int AdlEngine::o1_isVarEQ(ScriptEnv &e) {
int AdlEngine::o1_isCurPicEQ(ScriptEnv &e) {
OP_DEBUG_1("\t&& GET_CURPIC() == %d", e.arg(1));
- if (getCurRoom().curPicture == e.arg(1))
+ if (_state.curPicture == e.arg(1))
return 1;
return -1;