diff options
author | Paul Gilbert | 2014-05-24 18:56:44 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-05-24 18:56:44 -0400 |
commit | 87f7c0cda3a7d3ce46d8ad0cb39ce33a0f40d557 (patch) | |
tree | 83afa8574c27f244fdf57f1730c8a8fd4c3c407b /engines/mads/sequence.cpp | |
parent | 8f9a75a9255fbccb8be3bbe6fc35aafec00a4260 (diff) | |
download | scummvm-rg350-87f7c0cda3a7d3ce46d8ad0cb39ce33a0f40d557.tar.gz scummvm-rg350-87f7c0cda3a7d3ce46d8ad0cb39ce33a0f40d557.tar.bz2 scummvm-rg350-87f7c0cda3a7d3ce46d8ad0cb39ce33a0f40d557.zip |
MADS: Generalize sequence record _msgPos as _position
Diffstat (limited to 'engines/mads/sequence.cpp')
-rw-r--r-- | engines/mads/sequence.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp index a7c6dedb12..e0efc7cf03 100644 --- a/engines/mads/sequence.cpp +++ b/engines/mads/sequence.cpp @@ -123,8 +123,8 @@ int SequenceList::add(int spriteListIndex, bool flipped, int frameIndex, int tri _entries[seqIndex]._depth = depth; _entries[seqIndex]._scale = scale; _entries[seqIndex]._nonFixed = nonFixed; - _entries[seqIndex]._msgPos.x = msgX; - _entries[seqIndex]._msgPos.y = msgY; + _entries[seqIndex]._position.x = msgX; + _entries[seqIndex]._position.y = msgY; _entries[seqIndex]._numTicks = numTicks; _entries[seqIndex]._extraTicks = extraTicks; @@ -192,7 +192,7 @@ void SequenceList::setSpriteSlot(int seqIndex, SpriteSlot &spriteSlot) { spriteSlot._scale = timerEntry._scale; if (!timerEntry._nonFixed) { - spriteSlot._position = timerEntry._msgPos; + spriteSlot._position = timerEntry._position; } else { MSprite *sprite = spriteSet.getFrame(timerEntry._frameIndex - 1); spriteSlot._position = sprite->_offset; @@ -231,14 +231,14 @@ bool SequenceList::loadSprites(int seqIndex) { seqEntry._field20 += seqEntry._field18; if (seqEntry._field20 >= 100) { int v = seqEntry._field20 / 100; - seqEntry._msgPos.x += v * seqEntry._field1C; + seqEntry._position.x += v * seqEntry._field1C; seqEntry._field20 -= v * 100; } seqEntry._field22 += seqEntry._field1A; if (seqEntry._field22 >= 100) { int v = seqEntry._field22 / 100; - seqEntry._msgPos.y += v * seqEntry._field1E; + seqEntry._position.y += v * seqEntry._field1E; seqEntry._field22 -= v * 100; } } @@ -424,8 +424,8 @@ void SequenceList::setDepth(int seqIndex, int depth) { _entries[seqIndex]._depth = depth; } -void SequenceList::setMsgPosition(int seqIndex, const Common::Point &pt) { - _entries[seqIndex]._msgPos = pt; +void SequenceList::setPosition(int seqIndex, const Common::Point &pt) { + _entries[seqIndex]._position = pt; _entries[seqIndex]._nonFixed = false; } @@ -497,7 +497,7 @@ void SequenceList::setScale(int spriteIdx, int scale) { void SequenceList::setMsgLayout(int seqIndex) { Player &player = _vm->_game->_player; int yp = player._playerPos.y + (player._centerOfGravity * player._currentScale) / 100; - setMsgPosition(seqIndex, Common::Point(player._playerPos.x, yp)); + setPosition(seqIndex, Common::Point(player._playerPos.x, yp)); setDepth(seqIndex, player._currentDepth); setScale(seqIndex, player._currentScale); updateTimeout(-1, seqIndex); @@ -508,4 +508,11 @@ void SequenceList::setDone(int seqIndex) { _entries[seqIndex]._timeout = _vm->_game->_player._priorTimer; } +void SequenceList::setMotion(int seqIndex, int flags, int deltaX, int deltaY) { + warning("TODO: setMotion()"); + // HACK: Just offset by the delta for now + _entries[seqIndex]._position.x += deltaX; + _entries[seqIndex]._position.y += deltaY; +} + } // End of namespace |