[Scummvm-cvs-logs] SF.net SVN: scummvm:[54676] scummvm/trunk/engines/mohawk
mthreepwood at users.sourceforge.net
mthreepwood at users.sourceforge.net
Tue Nov 30 15:45:33 CET 2010
Revision: 54676
http://scummvm.svn.sourceforge.net/scummvm/?rev=54676&view=rev
Author: mthreepwood
Date: 2010-11-30 14:45:31 +0000 (Tue, 30 Nov 2010)
Log Message:
-----------
MOHAWK: Fix changing the stack via an opcode
Modified Paths:
--------------
scummvm/trunk/engines/mohawk/myst.cpp
scummvm/trunk/engines/mohawk/myst.h
Modified: scummvm/trunk/engines/mohawk/myst.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/myst.cpp 2010-11-30 14:41:27 UTC (rev 54675)
+++ scummvm/trunk/engines/mohawk/myst.cpp 2010-11-30 14:45:31 UTC (rev 54676)
@@ -82,6 +82,8 @@
_cursorHintCount = 0;
_cursorHints = NULL;
+ _prevStack = NULL;
+
_view.conditionalImageCount = 0;
_view.conditionalImages = NULL;
_view.soundList = NULL;
@@ -105,6 +107,7 @@
delete _saveLoad;
delete _loadDialog;
delete _optionsDialog;
+ delete _prevStack;
delete[] _cursorHints;
@@ -365,7 +368,11 @@
_curStack = stack;
- delete _scriptParser;
+ // Delete the previous stack and move the current stack to the previous one
+ // There's probably a better way to do this, but the script classes shouldn't
+ // take up much memory.
+ delete _prevStack;
+ _prevStack = _scriptParser;
switch (_curStack) {
case kSeleniticStack:
Modified: scummvm/trunk/engines/mohawk/myst.h
===================================================================
--- scummvm/trunk/engines/mohawk/myst.h 2010-11-30 14:41:27 UTC (rev 54675)
+++ scummvm/trunk/engines/mohawk/myst.h 2010-11-30 14:45:31 UTC (rev 54676)
@@ -196,6 +196,7 @@
MystConsole *_console;
GUI::SaveLoadChooser *_loadDialog;
MystOptionsDialog *_optionsDialog;
+ MystScriptParser *_prevStack;
ResourceCache _cache;
void cachePreload(uint32 tag, uint16 id);
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