diff options
author | Paul Gilbert | 2014-03-07 23:07:36 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-03-07 23:07:36 -0500 |
commit | 3399516c5e4c2931adf76a25944cb3e46f9934ee (patch) | |
tree | 62c4183969cebb52f0d69281bde4600cacb48e90 /engines/mads/interface.cpp | |
parent | 1874ec2111fd944d3e554acde8a0f06c651c95fb (diff) | |
download | scummvm-rg350-3399516c5e4c2931adf76a25944cb3e46f9934ee.tar.gz scummvm-rg350-3399516c5e4c2931adf76a25944cb3e46f9934ee.tar.bz2 scummvm-rg350-3399516c5e4c2931adf76a25944cb3e46f9934ee.zip |
MADS: Implemented remainder of scene 804 setup code and support methods
Diffstat (limited to 'engines/mads/interface.cpp')
-rw-r--r-- | engines/mads/interface.cpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/engines/mads/interface.cpp b/engines/mads/interface.cpp index fa50cbd1be..e3105614ca 100644 --- a/engines/mads/interface.cpp +++ b/engines/mads/interface.cpp @@ -68,6 +68,47 @@ void InterfaceSurface::load(const Common::String &resName) { delete pixelsStream; } +void InterfaceSurface::setup(int id) { + Scene &scene = _vm->_game->_scene; + + if (scene._screenObjects._v832EC != id) { + Common::String resName = _vm->_game->_aaName; + + // Strip off any extension + const char *p = strchr(resName.c_str(), '.'); + if (p) { + resName = Common::String(resName.c_str(), p - 1); + } + + // Add on suffix if necessary + if (id) + resName += "A"; + + resName += ".INT"; + free(); + load(resName); + } + scene._screenObjects._v832EC = id; + + scene._imageInterEntries.clear(); + scene._imageInterEntries.add(-2, 0xff); + _vm->_game->_ticksExpiry = _vm->_events->getFrameCounter(); + scene._v1A = true; + _vm->_game->_objectHiliteVocabIdx = -1; + scene._v1C = -1; + + // Make a copy of the surface + copyTo(&_surface); + + if (_vm->_game->_v1 == 5) + scene._imageInterEntries.call(0); + + scene._action.clear(); + writeText(); + loadElements(); + scene._dynamicHotspots.refresh(); +} + void InterfaceSurface::elementHighlighted() { warning("TODO: InterfaceSurface::elementHighlighted"); } @@ -81,6 +122,10 @@ void InterfaceSurface::setBounds(const Common::Rect &r) { _bounds = r; } +void InterfaceSurface::loadElements() { + warning("TODO: InterfaceSurface::loadElements"); +} + /*------------------------------------------------------------------------*/ |