[Scummvm-cvs-logs] SF.net SVN: scummvm:[49646] scummvm/trunk/engines/m4

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Mon Jun 14 08:33:24 CEST 2010


Revision: 49646
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49646&view=rev
Author:   dreammaster
Date:     2010-06-14 06:33:24 +0000 (Mon, 14 Jun 2010)

Log Message:
-----------
Moved the actionNouns array from the scene to the globals object, since the scene will no longer be active during animation sequences

Modified Paths:
--------------
    scummvm/trunk/engines/m4/animation.cpp
    scummvm/trunk/engines/m4/globals.cpp
    scummvm/trunk/engines/m4/globals.h
    scummvm/trunk/engines/m4/mads_scene.cpp
    scummvm/trunk/engines/m4/mads_scene.h
    scummvm/trunk/engines/m4/mads_views.cpp

Modified: scummvm/trunk/engines/m4/animation.cpp
===================================================================
--- scummvm/trunk/engines/m4/animation.cpp	2010-06-14 05:39:10 UTC (rev 49645)
+++ scummvm/trunk/engines/m4/animation.cpp	2010-06-14 06:33:24 UTC (rev 49646)
@@ -264,7 +264,7 @@
 	_abortMode = _madsVm->scene()->_abortTimersMode2;
 
 	for (int i = 0; i < 3; ++i)
-		_actionNouns[i] = _madsVm->scene()->actionNouns[i];
+		_actionNouns[i] = _madsVm->globals()->actionNouns[i];
 
 	// Initialise kernel message list
 	for (uint i = 0; i < _messages.size(); ++i)
@@ -436,7 +436,7 @@
 			if (_abortMode != ABORTMODE_1) {
 				// Copy the noun list
 				for (int i = 0; i < 3; ++i)
-					_madsVm->scene()->actionNouns[i] = _actionNouns[i];
+					_madsVm->globals()->actionNouns[i] = _actionNouns[i];
 			}
 		}
 	}

Modified: scummvm/trunk/engines/m4/globals.cpp
===================================================================
--- scummvm/trunk/engines/m4/globals.cpp	2010-06-14 05:39:10 UTC (rev 49645)
+++ scummvm/trunk/engines/m4/globals.cpp	2010-06-14 06:33:24 UTC (rev 49646)
@@ -282,6 +282,8 @@
 	playerSpriteChanged = false;
 	dialogType = DIALOG_NONE;
 	sceneNumber = -1;
+	for (int i = 0; i < 3; ++i)
+		actionNouns[i] = 0;
 }
 
 MadsGlobals::~MadsGlobals() {

Modified: scummvm/trunk/engines/m4/globals.h
===================================================================
--- scummvm/trunk/engines/m4/globals.h	2010-06-14 05:39:10 UTC (rev 49645)
+++ scummvm/trunk/engines/m4/globals.h	2010-06-14 06:33:24 UTC (rev 49646)
@@ -249,6 +249,7 @@
 	MadsDialogType dialogType;
 	int sceneNumber;
 	int previousScene;
+	uint16 actionNouns[3];
 
 	void loadMadsVocab();
 	uint32 getVocabSize() { return _madsVocab.size(); }

Modified: scummvm/trunk/engines/m4/mads_scene.cpp
===================================================================
--- scummvm/trunk/engines/m4/mads_scene.cpp	2010-06-14 05:39:10 UTC (rev 49645)
+++ scummvm/trunk/engines/m4/mads_scene.cpp	2010-06-14 06:33:24 UTC (rev 49646)
@@ -55,8 +55,6 @@
 	MadsView::_bgSurface = Scene::_backgroundSurface;
 	MadsView::_depthSurface = Scene::_walkSurface;
 	_interfaceSurface = new MadsInterfaceView(vm);
-	for (int i = 0; i < 3; ++i)
-		actionNouns[i] = 0;
 }
 
 MadsScene::~MadsScene() {

Modified: scummvm/trunk/engines/m4/mads_scene.h
===================================================================
--- scummvm/trunk/engines/m4/mads_scene.h	2010-06-14 05:39:10 UTC (rev 49645)
+++ scummvm/trunk/engines/m4/mads_scene.h	2010-06-14 06:33:24 UTC (rev 49646)
@@ -107,7 +107,6 @@
 	void setAction();
 public:
 	char _aaName[100];
-	uint16 actionNouns[3];
 public:
 	MadsScene(MadsEngine *vm);
 	virtual ~MadsScene();

Modified: scummvm/trunk/engines/m4/mads_views.cpp
===================================================================
--- scummvm/trunk/engines/m4/mads_views.cpp	2010-06-14 05:39:10 UTC (rev 49645)
+++ scummvm/trunk/engines/m4/mads_views.cpp	2010-06-14 06:33:24 UTC (rev 49646)
@@ -404,7 +404,7 @@
 	rec.abortMode = _owner._abortTimersMode2;
 	
 	for (int i = 0; i < 3; ++i)
-		rec.actionNouns[i] = _madsVm->scene()->actionNouns[i];
+		rec.actionNouns[i] = _madsVm->globals()->actionNouns[i];
 
 	if (flags & KMSG_OWNER_TIMEOUT)
 		rec.frameTimer = _owner._ticksAmount + _owner._newTimeout;
@@ -504,7 +504,7 @@
 
 			if (_owner._abortTimersMode != ABORTMODE_1) {
 				for (int i = 0; i < 3; ++i)
-					_madsVm->scene()->actionNouns[i] = msg.actionNouns[i];
+					_madsVm->globals()->actionNouns[i] = msg.actionNouns[i];
 			}
 		}
 	}
@@ -943,7 +943,7 @@
 	_entries[seqIndex].abortMode = _owner._abortTimersMode2;
 
 	for (int i = 0; i < 3; ++i)
-		_entries[seqIndex].actionNouns[i] = _madsVm->scene()->actionNouns[i];
+		_entries[seqIndex].actionNouns[i] = _madsVm->globals()->actionNouns[i];
 
 	return seqIndex;
 }


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