diff options
author | Paul Gilbert | 2014-03-17 21:53:22 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-03-17 21:53:22 -0400 |
commit | 0c8a3a47e28075bd559be43bde910587af35d8ab (patch) | |
tree | 70f5dee3600fd38e1919553f9e44a7b77f7a9a8e /engines/mads/player.cpp | |
parent | d57d4b876e90d1d043bd171c9de46d93c9e014f4 (diff) | |
download | scummvm-rg350-0c8a3a47e28075bd559be43bde910587af35d8ab.tar.gz scummvm-rg350-0c8a3a47e28075bd559be43bde910587af35d8ab.tar.bz2 scummvm-rg350-0c8a3a47e28075bd559be43bde910587af35d8ab.zip |
MADS: Transformed ImageInterEntries to be User Interface UISlots
Diffstat (limited to 'engines/mads/player.cpp')
-rw-r--r-- | engines/mads/player.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/engines/mads/player.cpp b/engines/mads/player.cpp index 44dfc88ede..80343609b9 100644 --- a/engines/mads/player.cpp +++ b/engines/mads/player.cpp @@ -246,7 +246,7 @@ void Player::update() { if (_forceRefresh || (_visible != _priorVisible)) { int slotIndex = getSpriteSlot(); if (slotIndex >= 0) - scene._spriteSlots[slotIndex]._spriteType = ST_EXPIRED; + scene._spriteSlots[slotIndex]._SlotType = ST_EXPIRED; int newDepth = 1; int yp = MAX(_playerPos.y, (int16)(MADS_SCENE_HEIGHT - 1)); @@ -264,7 +264,7 @@ void Player::update() { if (_visible) { // Player sprite needs to be rendered SpriteSlot slot; - slot._spriteType = ST_FOREGROUND; + slot._SlotType = ST_FOREGROUND; slot._seqIndex = PLAYER_SEQ_INDEX; slot._spritesIndex = _spritesStart + _spritesIdx; slot._frameNumber = _frameOffset + _frameNum; @@ -285,7 +285,7 @@ void Player::update() { if (equal) // Undo the prior expiry of the player sprite - s2._spriteType = ST_NONE; + s2._SlotType = ST_NONE; else slotIndex = -1; } @@ -359,6 +359,16 @@ void Player::setDest(const Common::Point &pt, int facing) { } } +void Player::startWalking(const Common::Point &pos, int direction) { + Scene &scene = _vm->_game->_scene; + + reset(); + scene._action._startWalkFlag = true; + scene._action._walkFlag = true; + scene._destPos = pos; + scene._destFacing = direction; +} + void Player::nextFrame() { Scene &scene = _vm->_game->_scene; @@ -528,7 +538,7 @@ int Player::getSpriteSlot() { for (uint idx = 0; idx < spriteSlots.size(); ++idx) { if (spriteSlots[idx]._seqIndex == PLAYER_SEQ_INDEX && - spriteSlots[idx]._spriteType >= ST_NONE) + spriteSlots[idx]._SlotType >= ST_NONE) return idx; } @@ -737,13 +747,4 @@ void Player::startMovement() { _v8452E = -_v84530; } -void Player::sub7E53C(Common::Point pos, int direction) { - Scene &scene = _vm->_game->_scene; - - reset(); - scene._action._startWalkFlag = true; - scene._action._walkFlag = true; - scene._destPos = pos; - scene._destFacing = direction; -} } // End of namespace MADS |