diff options
author | Strangerke | 2014-03-23 11:34:12 +0100 |
---|---|---|
committer | Strangerke | 2014-03-23 11:34:12 +0100 |
commit | 8dd9dab76c2290a33289ffcc1e1a5582c9550bb4 (patch) | |
tree | ffee187232da3f76eb1b459091e381ecc74dc102 | |
parent | 0b351f79d8ad874ce07fed54eb745a277da28edc (diff) | |
download | scummvm-rg350-8dd9dab76c2290a33289ffcc1e1a5582c9550bb4.tar.gz scummvm-rg350-8dd9dab76c2290a33289ffcc1e1a5582c9550bb4.tar.bz2 scummvm-rg350-8dd9dab76c2290a33289ffcc1e1a5582c9550bb4.zip |
MADS: Implement Sequence::setScale and GameNebular::sub71312.
-rw-r--r-- | engines/mads/nebular/game_nebular.cpp | 8 | ||||
-rw-r--r-- | engines/mads/nebular/game_nebular.h | 2 | ||||
-rw-r--r-- | engines/mads/sequence.cpp | 8 | ||||
-rw-r--r-- | engines/mads/sequence.h | 1 |
4 files changed, 17 insertions, 2 deletions
diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp index e5c344b738..52e8913eb3 100644 --- a/engines/mads/nebular/game_nebular.cpp +++ b/engines/mads/nebular/game_nebular.cpp @@ -194,6 +194,14 @@ void GameNebular::checkShowDialog() { } } +void GameNebular::sub71312(int idx) { + int yp = _player._playerPos.y + (_player._yScale * _player._currentScale) / 100; + _scene._sequences.setMsgPosition(idx, Common::Point(_player._playerPos.x, yp)); + _scene._sequences.setDepth(idx, _player._currentDepth); + _scene._sequences.setScale(idx, _player._currentScale); + _scene._sequences.getTimeout(-1, idx); +} + } // End of namespace Nebular } // End of namespace MADS diff --git a/engines/mads/nebular/game_nebular.h b/engines/mads/nebular/game_nebular.h index 685e5c7cd6..0197766b8f 100644 --- a/engines/mads/nebular/game_nebular.h +++ b/engines/mads/nebular/game_nebular.h @@ -65,6 +65,8 @@ protected: public: Globals _globals; StoryMode _storyMode; + + void sub71312(int idx); }; diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp index 453d90b468..53ed02a566 100644 --- a/engines/mads/sequence.cpp +++ b/engines/mads/sequence.cpp @@ -476,14 +476,18 @@ int SequenceList::startReverseCycle(int srcSpriteIndex, bool flipped, int numTic void SequenceList::getTimeout(int spriteIdx, int arg2) { int timeout; if (spriteIdx >= 0) - timeout = _vm->_game->_scene._sequences._entries[spriteIdx]._timeout; + timeout = _entries[spriteIdx]._timeout; else timeout = _vm->_game->_player._priorTimer + _vm->_game->_player._ticksAmount; if (arg2 >= 0) - _vm->_game->_scene._sequences._entries[arg2]._timeout = timeout; + _entries[arg2]._timeout = timeout; else _vm->_game->_player._priorTimer = timeout - _vm->_game->_player._ticksAmount; } + +void SequenceList::setScale(int spriteIdx, int scale) { + _entries[spriteIdx]._scale = scale; +} } // End of namespace diff --git a/engines/mads/sequence.h b/engines/mads/sequence.h index 69059a9ad6..9ff34ab34d 100644 --- a/engines/mads/sequence.h +++ b/engines/mads/sequence.h @@ -119,6 +119,7 @@ public: int startReverseCycle(int srcSpriteIndex, bool flipped, int numTicks, int triggerCountdown, int timeoutTicks, int extraTicks); void getTimeout(int spriteIdx, int arg2); + void setScale(int spriteIdx, int scale); }; } // End of namespace MADS |