diff options
author | Gregory Montoir | 2004-01-14 14:34:05 +0000 |
---|---|---|
committer | Gregory Montoir | 2004-01-14 14:34:05 +0000 |
commit | 6c78f2a6b801ae8a8efb7f9db9bf0213ce3eb759 (patch) | |
tree | aaf89d79270a296bb9beab7d563639f20acbf260 /queen/bankman.cpp | |
parent | 9f8caa6889c5504edb279cacc524c142eb5829d1 (diff) | |
download | scummvm-rg350-6c78f2a6b801ae8a8efb7f9db9bf0213ce3eb759.tar.gz scummvm-rg350-6c78f2a6b801ae8a8efb7f9db9bf0213ce3eb759.tar.bz2 scummvm-rg350-6c78f2a6b801ae8a8efb7f9db9bf0213ce3eb759.zip |
- tweaked a bit walking functions to make persons stop walking when a cutaway is canceled
- removed unpack to bob frame 2 (as it is never used)
- changed some error() calls to assert()
- minor cleanups
svn-id: r12385
Diffstat (limited to 'queen/bankman.cpp')
-rw-r--r-- | queen/bankman.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/queen/bankman.cpp b/queen/bankman.cpp index 236573b664..6627cb60bd 100644 --- a/queen/bankman.cpp +++ b/queen/bankman.cpp @@ -103,14 +103,15 @@ void BankManager::close(uint32 bankslot) { BobFrame *BankManager::fetchFrame(uint32 index) { debug(9, "BankManager::fetchFrame(%d)", index); - if (index >= MAX_FRAMES_NUMBER) { - error("BankManager::fetchFrame() invalid frame index = %d", index); - } - return &_frames[index]; + assert(index < MAX_FRAMES_NUMBER); + BobFrame *pbf = &_frames[index]; + assert(pbf->data != 0); + return pbf; } void BankManager::eraseFrame(uint32 index) { debug(9, "BankManager::eraseFrame(%d)", index); + assert(index < MAX_FRAMES_NUMBER); BobFrame *pbf = &_frames[index]; delete[] pbf->data; memset(pbf, 0, sizeof(BobFrame)); |