diff options
author | Paul Gilbert | 2014-03-18 23:13:13 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-03-18 23:13:13 -0400 |
commit | 53eac0d7c045c734e897df1c0246cab185af0463 (patch) | |
tree | 542501349bea6e7e8246f6134f99b7c5d610c41c /engines/mads/user_interface.cpp | |
parent | 5b4b7a5ca972f533c7a6129e84fd5d26e3b2ebb6 (diff) | |
download | scummvm-rg350-53eac0d7c045c734e897df1c0246cab185af0463.tar.gz scummvm-rg350-53eac0d7c045c734e897df1c0246cab185af0463.tar.bz2 scummvm-rg350-53eac0d7c045c734e897df1c0246cab185af0463.zip |
MADS: Fixes for scene background loading
Diffstat (limited to 'engines/mads/user_interface.cpp')
-rw-r--r-- | engines/mads/user_interface.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/engines/mads/user_interface.cpp b/engines/mads/user_interface.cpp index d11c1220df..a117ae0d01 100644 --- a/engines/mads/user_interface.cpp +++ b/engines/mads/user_interface.cpp @@ -83,7 +83,7 @@ void UISlots::draw(bool updateFlag, bool delFlag) { if (dirtyAreaPtr) dirtyAreaPtr->_active = true; - // Main draw loop + // Copy parts of the user interface background that are going to have sprites drawn for (uint idx = 0; idx < size(); ++idx) { DirtyArea &dirtyArea = userInterface._dirtyAreas[idx]; UISlot &slot = (*this)[idx]; @@ -205,6 +205,8 @@ UserInterface::UserInterface(MADSEngine *vm) : _vm(vm), _dirtyAreas(vm), // Map the user interface to the bottom of the game's screen surface byte *pData = _vm->_screen.getBasePtr(0, MADS_SCENE_HEIGHT); setPixels(pData, MADS_SCREEN_WIDTH, MADS_INTERFACE_HEIGHT); + + _surface.setSize(MADS_SCREEN_WIDTH, MADS_INTERFACE_HEIGHT); } void UserInterface::load(const Common::String &resName) { @@ -228,7 +230,6 @@ void UserInterface::load(const Common::String &resName) { // Read in the surface data Common::SeekableReadStream *pixelsStream = madsPack.getItemStream(1); - _surface.setSize(MADS_SCREEN_WIDTH, MADS_INTERFACE_HEIGHT); pixelsStream->read(_surface.getData(), MADS_SCREEN_WIDTH * MADS_INTERFACE_HEIGHT); delete pixelsStream; } @@ -263,9 +264,6 @@ void UserInterface::setup(int id) { _v1E = -1; _v1C = -1; - // Make a copy of the surface - copyTo(&_surface); - if (_vm->_game->_v1 == 5) scene._userInterface._uiSlots.draw(false, false); |