diff options
Diffstat (limited to 'engines/adl/adl.cpp')
-rw-r--r-- | engines/adl/adl.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp index 76f5bac5b5..0d96cb67af 100644 --- a/engines/adl/adl.cpp +++ b/engines/adl/adl.cpp @@ -428,6 +428,20 @@ void AdlEngine::bell(uint count) const { _speaker->bell(count); } +const Region &AdlEngine::getRegion(uint i) const { + if (i < 1 || i > _state.regions.size()) + error("Region %i out of range [1, %i]", i, _state.regions.size()); + + return _state.regions[i - 1]; +} + +Region &AdlEngine::getRegion(uint i) { + if (i < 1 || i > _state.regions.size()) + error("Region %i out of range [1, %i]", i, _state.regions.size()); + + return _state.regions[i - 1]; +} + const Room &AdlEngine::getRoom(uint i) const { if (i < 1 || i > _state.rooms.size()) error("Room %i out of range [1, %i]", i, _state.rooms.size()); @@ -442,6 +456,14 @@ Room &AdlEngine::getRoom(uint i) { return _state.rooms[i - 1]; } +const Region &AdlEngine::getCurRegion() const { + return getRegion(_state.region); +} + +Region &AdlEngine::getCurRegion() { + return getRegion(_state.region); +} + const Room &AdlEngine::getCurRoom() const { return getRoom(_state.room); } |