diff options
author | Walter van Niftrik | 2016-04-03 14:12:46 +0200 |
---|---|---|
committer | Walter van Niftrik | 2016-06-06 20:35:49 +0200 |
commit | b4a82370cd21a0ed14c8bd6a44e22c47de39aeea (patch) | |
tree | cd14c5bc90e4cd1e95221ac96f829ba5a56ba20e /engines/adl | |
parent | 09146fba6eaad18a221990fd4362c93da34aaafb (diff) | |
download | scummvm-rg350-b4a82370cd21a0ed14c8bd6a44e22c47de39aeea.tar.gz scummvm-rg350-b4a82370cd21a0ed14c8bd6a44e22c47de39aeea.tar.bz2 scummvm-rg350-b4a82370cd21a0ed14c8bd6a44e22c47de39aeea.zip |
ADL: Partially fix hires2 restarting
Diffstat (limited to 'engines/adl')
-rw-r--r-- | engines/adl/hires1.cpp | 8 | ||||
-rw-r--r-- | engines/adl/hires2.cpp | 4 |
2 files changed, 2 insertions, 10 deletions
diff --git a/engines/adl/hires1.cpp b/engines/adl/hires1.cpp index 07656253ef..1d7e50e123 100644 --- a/engines/adl/hires1.cpp +++ b/engines/adl/hires1.cpp @@ -207,17 +207,12 @@ void HiRes1Engine::init() { } void HiRes1Engine::initState() { - _state.room = 1; - _state.moves = 1; - _state.isDark = false; - - _state.vars.clear(); + _state = State(); _state.vars.resize(IDI_HR1_NUM_VARS); StreamPtr stream(_files->createReadStream(IDS_HR1_EXE_1)); // Load room data from executable - _state.rooms.clear(); _roomDesc.clear(); stream->seek(IDI_HR1_OFS_ROOMS); for (uint i = 0; i < IDI_HR1_NUM_ROOMS; ++i) { @@ -232,7 +227,6 @@ void HiRes1Engine::initState() { } // Load item data from executable - _state.items.clear(); stream->seek(IDI_HR1_OFS_ITEMS); byte id; while ((id = stream->readByte()) != 0xff) { diff --git a/engines/adl/hires2.cpp b/engines/adl/hires2.cpp index 943d7a6894..9a928ff73f 100644 --- a/engines/adl/hires2.cpp +++ b/engines/adl/hires2.cpp @@ -139,12 +139,11 @@ void HiRes2Engine::init() { } void HiRes2Engine::initState() { - _state.vars.clear(); + _state = State(); _state.vars.resize(IDI_HR2_NUM_VARS); StreamPtr stream(_disk->createReadStream(0x21, 0x5, 0x0e, 7)); - _state.rooms.clear(); for (uint i = 0; i < IDI_HR2_NUM_ROOMS; ++i) { Room room; stream->readByte(); // number @@ -159,7 +158,6 @@ void HiRes2Engine::initState() { stream.reset(_disk->createReadStream(0x21, 0x0, 0x00, 2)); - _state.items.clear(); byte id; while ((id = stream->readByte()) != 0xff) { Item item = { }; |