aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/gui/gui_gfx.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/sci/gui/gui_gfx.cpp b/engines/sci/gui/gui_gfx.cpp
index 55d9dcedea..18d925e3cf 100644
--- a/engines/sci/gui/gui_gfx.cpp
+++ b/engines/sci/gui/gui_gfx.cpp
@@ -318,14 +318,14 @@ void SciGuiGfx::BitsFree(GuiMemoryHandle memoryHandle) {
}
void SciGuiGfx::drawPicture(GuiResourceId pictureId, int16 animationNr, bool mirroredFlag, bool addToFlag, GuiResourceId paletteId) {
- SciGuiPicture *picture;
+ SciGuiPicture *picture = new SciGuiPicture(_resMan, this, _screen, _palette, pictureId);
- picture = new SciGuiPicture(_resMan, this, _screen, _palette, pictureId);
// do we add to a picture? if not -> clear screen with white
- if (!addToFlag) {
+ if (!addToFlag)
ClearScreen(_screen->_colorWhite);
- }
+
picture->draw(animationNr, mirroredFlag, addToFlag, paletteId);
+ delete picture;
}
// This one is the only one that updates screen!