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/user_interface.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/user_interface.cpp')
-rw-r--r-- | engines/mads/user_interface.cpp | 69 |
1 files changed, 61 insertions, 8 deletions
diff --git a/engines/mads/user_interface.cpp b/engines/mads/user_interface.cpp index 5ab0b0f356..fd9f4c0153 100644 --- a/engines/mads/user_interface.cpp +++ b/engines/mads/user_interface.cpp @@ -27,16 +27,47 @@ namespace MADS { -void SceneNode::load(Common::SeekableReadStream *f) { - _walkPos.x = f->readSint16LE(); - _walkPos.y = f->readSint16LE(); - for (int i = 0; i < MAX_ROUTE_NODES; ++i) - _indexes[i] = f->readUint16LE(); +UISlot::UISlot() { + _slotType = ST_NONE; + _field2 = 0; + _field3 = 0; + _field4 = 0; + _field6 = 0; + _field8 = 0; +} + +/*------------------------------------------------------------------------*/ + +void UISlots::fullRefresh() { + UISlot slot; + slot._slotType = ST_FULL_SCREEN_REFRESH; + slot._field2 = -1; + + push_back(slot); +} + +void UISlots::add(int v1, int v2, int v3, int v4) { + assert(size() < 50); + + UISlot ie; + ie._slotType = -3; + ie._field2 = 201; + ie._field6 = v1; + ie._field8 = v2; + ie._field4 = v3; + ie._field3 = v4; + + push_back(ie); +} + +void UISlots::call(int v1, int v2) { + debug("TODO: UISlots::call"); } /*------------------------------------------------------------------------*/ UserInterface::UserInterface(MADSEngine *vm) : _vm(vm) { + _invSpritesIndex = -1; _category = CAT_NONE; _screenObjectsCount = 0; _inventoryTopIndex = 0; @@ -99,8 +130,8 @@ void UserInterface::setup(int id) { } scene._screenObjects._v832EC = id; - scene._imageInterEntries.clear(); - scene._imageInterEntries.add(-2, 0xff); + scene._userInterface._uiSlots.clear(); + scene._userInterface._uiSlots.fullRefresh(); _vm->_game->_ticksExpiry = _vm->_events->getFrameCounter(); _v1A = -1; _v1E = -1; @@ -110,7 +141,7 @@ void UserInterface::setup(int id) { copyTo(&_surface); if (_vm->_game->_v1 == 5) - scene._imageInterEntries.call(0, 0); + scene._userInterface._uiSlots.call(0, 0); scene._action.clear(); drawTextElements(); @@ -400,5 +431,27 @@ void UserInterface::drawTalkList() { warning("TODO: drawTalkList"); } +void UserInterface::loadInventoryAnim(int objectId) { + +} + +void UserInterface::noInventoryAnim() { + Scene &scene = _vm->_game->_scene; + + if (_invSpritesIndex >= 0) { + scene._sprites.remove(_invSpritesIndex); + _vm->_game->_ticksExpiry = _vm->_events->getFrameCounter(); + _invSpritesIndex = -1; + } + + if (!scene._screenObjects._v832EC) + refresh(); +} + +void UserInterface::refresh() { + Scene &scene = _vm->_game->_scene; + scene._userInterface._uiSlots.clear(); +// scene._userInterface._uiSlots.new() +} } // End of namespace MADS |