aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Kasak2009-07-13 19:24:22 +0000
committerDenis Kasak2009-07-13 19:24:22 +0000
commitf8c20b9e9c68dc670ddb0179abed6dc12509c244 (patch)
tree436ff0df1a6204229727778dc984c54e08fcf62d
parentf655999c1581f4600e0c4abca1cc67591631126c (diff)
downloadscummvm-rg350-f8c20b9e9c68dc670ddb0179abed6dc12509c244.tar.gz
scummvm-rg350-f8c20b9e9c68dc670ddb0179abed6dc12509c244.tar.bz2
scummvm-rg350-f8c20b9e9c68dc670ddb0179abed6dc12509c244.zip
Renamed Game::_itemStatus to _iconStatus. Added an assert to check if the number of icons is correct.
svn-id: r42449
-rw-r--r--engines/draci/game.cpp12
-rw-r--r--engines/draci/game.h2
2 files changed, 8 insertions, 6 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp
index 2fbb65b829..4d6c77a169 100644
--- a/engines/draci/game.cpp
+++ b/engines/draci/game.cpp
@@ -103,11 +103,12 @@ Game::Game(DraciEngine *vm) : _vm(vm) {
_variables[i] = variableData.readUint16LE();
}
- // Read in item status
+ // Read in item icon status
file = initArchive.getFile(1);
- _itemStatus = new byte[file->_length];
- memcpy(_itemStatus, file->_data, file->_length);
+ _iconStatus = new byte[file->_length];
+ memcpy(_iconStatus, file->_data, file->_length);
+ uint numIcons = file->_length;
// Read in object status
@@ -130,7 +131,8 @@ Game::Game(DraciEngine *vm) : _vm(vm) {
assert(numDialogs == _info->_numDialogs);
assert(numPersons == _info->_numPersons);
assert(numVariables == _info->_numVariables);
- assert(numObjects == _info->_numObjects);
+ assert(numObjects == _info->_numObjects);
+ assert(numIcons == _info->_numIcons);
}
void Game::init() {
@@ -358,7 +360,7 @@ Game::~Game() {
delete[] _persons;
delete[] _variables;
delete[] _dialogOffsets;
- delete[] _itemStatus;
+ delete[] _iconStatus;
delete[] _objects;
delete _info;
}
diff --git a/engines/draci/game.h b/engines/draci/game.h
index e6eee9e041..da12771fc7 100644
--- a/engines/draci/game.h
+++ b/engines/draci/game.h
@@ -148,7 +148,7 @@ private:
GameInfo *_info;
Person *_persons;
uint16 *_dialogOffsets;
- byte *_itemStatus;
+ byte *_iconStatus;
GameObject *_objects;
Room _currentRoom;
};