diff options
author | Denis Kasak | 2009-07-24 05:00:53 +0000 |
---|---|---|
committer | Denis Kasak | 2009-07-24 05:00:53 +0000 |
commit | c1ad0c3926f4d53a9c5fdefefde9344d4abb6f10 (patch) | |
tree | b6927f0a7416aa6148ea023d9bb0a5460fef00cf /engines/draci/game.cpp | |
parent | a2bca06b3fe00379d8accf29e7f442fe0a3cd781 (diff) | |
download | scummvm-rg350-c1ad0c3926f4d53a9c5fdefefde9344d4abb6f10.tar.gz scummvm-rg350-c1ad0c3926f4d53a9c5fdefefde9344d4abb6f10.tar.bz2 scummvm-rg350-c1ad0c3926f4d53a9c5fdefefde9344d4abb6f10.zip |
* Added tracking and deleting animations by index (which represents the order in which they were loaded). This is needed by some GPL commands.
* Added Game::getNumObjects() which returns the number of objects in the game
* Fixed segfault (accessing a null Animation *)
* Added some docs to various things
svn-id: r42683
Diffstat (limited to 'engines/draci/game.cpp')
-rw-r--r-- | engines/draci/game.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp index de925fe11f..e85a1780db 100644 --- a/engines/draci/game.cpp +++ b/engines/draci/game.cpp @@ -448,6 +448,10 @@ GameObject *Game::getObject(uint objNum) { return _objects + objNum; } +uint Game::getNumObjects() { + return _info._numObjects; +} + void Game::loadOverlays() { uint x, y, z, num; @@ -533,6 +537,24 @@ int Game::getIconStatus(int iconID) { return _iconStatus[iconID]; } +/** + * The GPL command Mark sets the animation index (which specifies the order in which + * animations were loaded in) which is then used by the Release command to delete + * all animations that have an index greater than the one marked. + */ + +int Game::getMarkedAnimationIndex() { + return _markedAnimationIndex; +} + +/** + * See Game::getMarkedAnimationIndex(). + */ + +void Game::setMarkedAnimationIndex(int index) { + _markedAnimationIndex = index; +} + Game::~Game() { delete[] _persons; delete[] _variables; |