diff options
author | Filippos Karapetis | 2011-12-26 13:59:20 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-26 13:59:20 +0200 |
commit | d7335d69e351e910f33dbcc3b80a9a5d52bfd4e1 (patch) | |
tree | 29f1c12e74ebbd766a2b164d929b358cf335a0da /engines/dreamweb/newplace.cpp | |
parent | 2ca00bc3c6c2817090372450dbdd835677d3c20e (diff) | |
download | scummvm-rg350-d7335d69e351e910f33dbcc3b80a9a5d52bfd4e1.tar.gz scummvm-rg350-d7335d69e351e910f33dbcc3b80a9a5d52bfd4e1.tar.bz2 scummvm-rg350-d7335d69e351e910f33dbcc3b80a9a5d52bfd4e1.zip |
DREAMWEB: Move the roomsCanGo array out of the data blob
Diffstat (limited to 'engines/dreamweb/newplace.cpp')
-rw-r--r-- | engines/dreamweb/newplace.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/engines/dreamweb/newplace.cpp b/engines/dreamweb/newplace.cpp index 03824aa706..efcffef82a 100644 --- a/engines/dreamweb/newplace.cpp +++ b/engines/dreamweb/newplace.cpp @@ -177,7 +177,7 @@ void DreamBase::nextDest() { data.byte(kDestpos)++; if (data.byte(kDestpos) == 15) data.byte(kDestpos) = 0; // last destination - } while (!data.byte(kRoomscango + data.byte(kDestpos))); + } while (!getLocation(data.byte(kDestpos))); data.byte(kNewtextline) = 1; delTextLine(); @@ -206,7 +206,7 @@ void DreamBase::lastDest() { data.byte(kDestpos)--; if (data.byte(kDestpos) == 0xFF) data.byte(kDestpos) = 15; // first destination - } while (!data.byte(kRoomscango + data.byte(kDestpos))); + } while (!getLocation(data.byte(kDestpos))); data.byte(kNewtextline) = 1; delTextLine(); @@ -235,11 +235,15 @@ void DreamBase::destSelect() { } uint8 DreamBase::getLocation(uint8 index) { - return data.byte(kRoomscango + index); + return _roomsCanGo[index]; } void DreamBase::setLocation(uint8 index) { - data.byte(kRoomscango + index) = 1; + _roomsCanGo[index] = 1; +} + +void DreamBase::clearLocation(uint8 index) { + _roomsCanGo[index] = 0; } void DreamBase::resetLocation(uint8 index) { @@ -264,7 +268,7 @@ void DreamBase::resetLocation(uint8 index) { purgeALocation(29); } - data.byte(kRoomscango + index) = 0; + clearLocation(index); } void DreamBase::readDestIcon() { |