[Scummvm-cvs-logs] SF.net SVN: scummvm:[48015] scummvm/trunk/engines/sci/graphics/menu.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Tue Feb 9 19:24:57 CET 2010


Revision: 48015
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48015&view=rev
Author:   m_kiewitz
Date:     2010-02-09 18:24:54 +0000 (Tue, 09 Feb 2010)

Log Message:
-----------
SCI: also reset some variables inside reset(), so we dont error() out in lsl2 and other games that reset game engine inbetween

Modified Paths:
--------------
    scummvm/trunk/engines/sci/graphics/menu.cpp

Modified: scummvm/trunk/engines/sci/graphics/menu.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/menu.cpp	2010-02-09 15:23:03 UTC (rev 48014)
+++ scummvm/trunk/engines/sci/graphics/menu.cpp	2010-02-09 18:24:54 UTC (rev 48015)
@@ -46,15 +46,11 @@
 GfxMenu::GfxMenu(SciEvent *event, SegManager *segMan, SciGui *gui, GfxPorts *ports, GfxPaint16 *paint16, GfxText16 *text16, GfxScreen *screen, GfxCursor *cursor)
 	: _event(event), _segMan(segMan), _gui(gui), _ports(ports), _paint16(paint16), _text16(text16), _screen(screen), _cursor(cursor) {
 
-	_listCount = 0;
-	// We actually set active item in here and remember last selection of the user
-	//  sierra sci always defaulted to first item every time menu was called via ESC, we dont follow that logic
-	_curMenuId = 1;
-	_curItemId = 1;
-
 	_menuSaveHandle = NULL_REG;
 	_barSaveHandle = NULL_REG;
 	_oldPort = NULL;
+
+	reset();
 }
 
 GfxMenu::~GfxMenu() {
@@ -65,6 +61,12 @@
 void GfxMenu::reset() {
 	_list.clear();
 	_itemList.clear();
+	_listCount = 0;
+
+	// We actually set active item in here and remember last selection of the user
+	//  sierra sci always defaulted to first item every time menu was called via ESC, we dont follow that logic
+	_curMenuId = 1;
+	_curItemId = 1;
 }
 
 void GfxMenu::kernelAddEntry(Common::String title, Common::String content, reg_t contentVmPtr) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list