aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/gui.cpp6
-rw-r--r--engines/sci/graphics/gui.h1
-rw-r--r--engines/sci/graphics/menu.cpp6
3 files changed, 6 insertions, 7 deletions
diff --git a/engines/sci/graphics/gui.cpp b/engines/sci/graphics/gui.cpp
index c1ccd48264..937f0d8371 100644
--- a/engines/sci/graphics/gui.cpp
+++ b/engines/sci/graphics/gui.cpp
@@ -276,12 +276,6 @@ void SciGui::drawMenuBar(bool clear) {
}
}
-void SciGui::menuReset() {
- delete _menu;
- _menu = new GfxMenu(_s->_event, _s->_segMan, this, _ports, _paint16, _text16, _screen, _cursor);
- _s->_gfxMenu = _menu;
-}
-
void SciGui::drawPicture(GuiResourceId pictureId, int16 animationNr, bool animationBlackoutFlag, bool mirroredFlag, bool addToFlag, int16 EGApaletteNo) {
Port *oldPort = _ports->setPort((Port *)_ports->_picWind);
diff --git a/engines/sci/graphics/gui.h b/engines/sci/graphics/gui.h
index 7c461de19b..35caf41457 100644
--- a/engines/sci/graphics/gui.h
+++ b/engines/sci/graphics/gui.h
@@ -75,7 +75,6 @@ public:
virtual void drawStatus(const char *text, int16 colorPen, int16 colorBack);
virtual void drawMenuBar(bool clear);
- virtual void menuReset();
virtual void drawPicture(GuiResourceId pictureId, int16 animationNr, bool animationBlackoutFlag, bool mirroredFlag, bool addToFlag, int16 EGApaletteNo);
virtual void drawCel(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo, bool hiresMode = false, reg_t upscaledHiresHandle = NULL_REG);
diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp
index 7f5bd969af..cff22eaefb 100644
--- a/engines/sci/graphics/menu.cpp
+++ b/engines/sci/graphics/menu.cpp
@@ -59,6 +59,12 @@ GfxMenu::GfxMenu(SciEvent *event, SegManager *segMan, SciGui *gui, GfxPorts *por
GfxMenu::~GfxMenu() {
// TODO: deallocate _list and _itemList
+ reset();
+}
+
+void GfxMenu::reset() {
+ _list.clear();
+ _itemList.clear();
}
void GfxMenu::kernelAddEntry(Common::String title, Common::String content, reg_t contentVmPtr) {