diff options
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 = { }; |