diff options
author | Strangerke | 2013-09-08 12:46:16 +0200 |
---|---|---|
committer | Strangerke | 2013-09-08 12:47:04 +0200 |
commit | e6956a994b980e81cd83784b67b7feb0d2250a75 (patch) | |
tree | 75ab61127ddc89ef6fbba6b21e8c091188ee2cb2 /engines/avalanche | |
parent | c6183993f2dc0732d5b480f502355f3843c5588c (diff) | |
download | scummvm-rg350-e6956a994b980e81cd83784b67b7feb0d2250a75.tar.gz scummvm-rg350-e6956a994b980e81cd83784b67b7feb0d2250a75.tar.bz2 scummvm-rg350-e6956a994b980e81cd83784b67b7feb0d2250a75.zip |
AVALANCHE: Change type of kSpriteNumbMax to byte
Diffstat (limited to 'engines/avalanche')
-rw-r--r-- | engines/avalanche/acci2.cpp | 2 | ||||
-rw-r--r-- | engines/avalanche/animation.cpp | 14 | ||||
-rw-r--r-- | engines/avalanche/animation.h | 2 | ||||
-rw-r--r-- | engines/avalanche/avalanche.cpp | 4 | ||||
-rw-r--r-- | engines/avalanche/visa2.cpp | 2 |
5 files changed, 12 insertions, 12 deletions
diff --git a/engines/avalanche/acci2.cpp b/engines/avalanche/acci2.cpp index 939f50f712..384d274210 100644 --- a/engines/avalanche/acci2.cpp +++ b/engines/avalanche/acci2.cpp @@ -1277,7 +1277,7 @@ void Acci::personSpeaks() { bool found = false; // The _person we're looking for's code is in _person. - for (int16 i = 0; i < _vm->_animation->kSpriteNumbMax; i++) { + for (byte i = 0; i < _vm->_animation->kSpriteNumbMax; i++) { if (_vm->_animation->_sprites[i]._quick && ((_vm->_animation->_sprites[i]._stat._acciNum + 149) == _person)) { _vm->_scrolls->displayText(Common::String(_vm->_scrolls->kControlRegister) + byte(i + 49) + _vm->_scrolls->kControlToBuffer); found = true; diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp index 15e8bd7cb0..9b51ee8781 100644 --- a/engines/avalanche/animation.cpp +++ b/engines/avalanche/animation.cpp @@ -172,7 +172,7 @@ void AnimationType::appear(int16 wx, int16 wy, byte wf) { * @remarks Originally called 'collision_check' */ bool AnimationType::checkCollision() { - for (int16 i = 0; i < _tr->kSpriteNumbMax; i++) { + for (byte i = 0; i < _tr->kSpriteNumbMax; i++) { if (_tr->_sprites[i]._quick && (_tr->_sprites[i]._id != _id) && ((_x + _info._xLength) > _tr->_sprites[i]._x) && (_x < (_tr->_sprites[i]._x + _tr->_sprites[i]._info._xLength)) && @@ -370,14 +370,14 @@ Animation::Animation(AvalancheEngine *vm) { } Animation::~Animation() { - for (int16 i = 0; i < kSpriteNumbMax; i++) { + for (byte i = 0; i < kSpriteNumbMax; i++) { if (_sprites[i]._quick) _sprites[i].remove(); } } void Animation::loadAnims() { - for (int16 i = 0; i < kSpriteNumbMax; i++) + for (byte i = 0; i < kSpriteNumbMax; i++) _sprites[i].original(); } @@ -1204,7 +1204,7 @@ void Animation::drawSprites() { for (int i = 0; i < 5; i++) order[i] = -1; - for (int16 i = 0; i < kSpriteNumbMax; i++) { + for (byte i = 0; i < kSpriteNumbMax; i++) { if (_sprites[i]._quick && _sprites[i]._visible) order[i] = i; } @@ -1239,14 +1239,14 @@ void Animation::drawSprites() { void Animation::animLink() { if (_vm->_gyro->_dropdownActive | _vm->_gyro->_onToolbar | _vm->_gyro->_seeScroll) return; - for (int16 i = 0; i < kSpriteNumbMax; i++) { + for (byte i = 0; i < kSpriteNumbMax; i++) { if (_sprites[i]._quick && _sprites[i]._visible) _sprites[i].walk(); } drawSprites(); - for (int16 i = 0; i < kSpriteNumbMax; i++) { + for (byte i = 0; i < kSpriteNumbMax; i++) { if (_sprites[i]._quick && _sprites[i]._callEachStepFl) { switch (_sprites[i]._eachStepProc) { case kProcFollowAvvyY : @@ -1336,7 +1336,7 @@ void Animation::flipRoom(byte room, byte ped) { _vm->_lucerna->exitRoom(_vm->_gyro->_dna._room); _vm->_lucerna->dusk(); - for (int16 i = 1; i < kSpriteNumbMax; i++) { + for (byte i = 1; i < kSpriteNumbMax; i++) { if (_sprites[i]._quick) _sprites[i].remove(); } // Deallocate sprite diff --git a/engines/avalanche/animation.h b/engines/avalanche/animation.h index 7b00bc9ec9..1193057c52 100644 --- a/engines/avalanche/animation.h +++ b/engines/avalanche/animation.h @@ -98,7 +98,7 @@ public: kDirStopped }; - static const int16 kSpriteNumbMax = 5; // current max no. of sprites + static const byte kSpriteNumbMax = 5; // current max no. of sprites enum Proc { kProcFollowAvvyY = 1, diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp index d59c18b23e..d2e9a8de9b 100644 --- a/engines/avalanche/avalanche.cpp +++ b/engines/avalanche/avalanche.cpp @@ -282,7 +282,7 @@ void AvalancheEngine::synchronize(Common::Serializer &sz) { byte spriteNum = 0; if (sz.isSaving()) { - for (int16 i = 0; i < _animation->kSpriteNumbMax; i++) { + for (byte i = 0; i < _animation->kSpriteNumbMax; i++) { if (_animation->_sprites[i]._quick) spriteNum++; } @@ -290,7 +290,7 @@ void AvalancheEngine::synchronize(Common::Serializer &sz) { sz.syncAsByte(spriteNum); if (sz.isLoading()) { - for (int16 i = 0; i < _animation->kSpriteNumbMax; i++) { // Deallocate sprites. + for (byte i = 0; i < _animation->kSpriteNumbMax; i++) { // Deallocate sprites. if (_animation->_sprites[i]._quick) _animation->_sprites[i].remove(); } diff --git a/engines/avalanche/visa2.cpp b/engines/avalanche/visa2.cpp index d7e1563fce..81e46712b4 100644 --- a/engines/avalanche/visa2.cpp +++ b/engines/avalanche/visa2.cpp @@ -248,7 +248,7 @@ void Visa::talkTo(byte whom) { whom -= 149; bool noMatches = true; - for (int16 i = 0; i <= _vm->_animation->kSpriteNumbMax; i++) { + for (byte i = 0; i <= _vm->_animation->kSpriteNumbMax; i++) { if (_vm->_animation->_sprites[i]._stat._acciNum == whom) { _vm->_scrolls->displayText(Common::String(_vm->_scrolls->kControlRegister) + (i + 49) + _vm->_scrolls->kControlToBuffer); noMatches = false; |