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

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Wed Aug 25 08:55:11 CEST 2010


Revision: 52365
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52365&view=rev
Author:   dreammaster
Date:     2010-08-25 06:55:11 +0000 (Wed, 25 Aug 2010)

Log Message:
-----------
M4: Fixes for compiler errors

Modified Paths:
--------------
    scummvm/trunk/engines/m4/mads_logic.cpp
    scummvm/trunk/engines/m4/mads_scene.cpp
    scummvm/trunk/engines/m4/mads_scene.h

Modified: scummvm/trunk/engines/m4/mads_logic.cpp
===================================================================
--- scummvm/trunk/engines/m4/mads_logic.cpp	2010-08-25 06:42:54 UTC (rev 52364)
+++ scummvm/trunk/engines/m4/mads_logic.cpp	2010-08-25 06:55:11 UTC (rev 52365)
@@ -182,6 +182,7 @@
 	MAP_DATA(&_madsVm->_player._playerPos.y);
 	MAP_DATA(&_madsVm->_player._direction);
 	MAP_DATA(&_madsVm->_player._visible);
+	MAP_DATA(&_madsVm->scene()->_animActive);
 }
 
 DataMap &MadsSceneLogic::dataMap() {
@@ -537,7 +538,7 @@
 		case OP_DSTORE:	{		// Stores data variable
 			param = getParam(scriptOffset, opcode); 
 			ScriptVar v = stack.pop();
-			dataMap().set(param, v.isInt() ? v : 0);
+			dataMap().set(param, v.isInt() ? v.get() : 0);
 			break;
 		}
 		
@@ -876,8 +877,8 @@
 	case 19: {
 		// Action_isAction
 		int verbId = stack.pop();
-		int objectNameId = (verbId == 0) ? 0 : stack.pop();
-		int indirectObjectId = (objectNameId == 0) ? 0 : stack.pop();
+		int objectNameId = (verbId == 0) ? 0 : stack.pop().get();
+		int indirectObjectId = (objectNameId == 0) ? 0 : stack.pop().get();
 
 		stack.push(ScriptVar(_madsVm->scene()->_action.isAction(verbId, objectNameId, indirectObjectId)));
 		break;
@@ -928,4 +929,4 @@
 
 #undef EXTRACT_PARAMS
 
-}
\ No newline at end of file
+}

Modified: scummvm/trunk/engines/m4/mads_scene.cpp
===================================================================
--- scummvm/trunk/engines/m4/mads_scene.cpp	2010-08-25 06:42:54 UTC (rev 52364)
+++ scummvm/trunk/engines/m4/mads_scene.cpp	2010-08-25 06:55:11 UTC (rev 52365)
@@ -62,6 +62,7 @@
 MadsScene::MadsScene(MadsEngine *vm): _sceneResources(), Scene(vm, &_sceneResources), MadsView(this) {
 	_vm = vm;
 	_activeAnimation = NULL;
+	_animActive = false;
 
 	MadsView::_bgSurface = Scene::_backgroundSurface;
 	MadsView::_depthSurface = Scene::_walkSurface;
@@ -216,6 +217,7 @@
 	if (_activeAnimation) {
 		delete _activeAnimation;
 		_activeAnimation = NULL;
+		_animActive = false;
 	}
 
 	Scene::leaveScene();
@@ -384,6 +386,7 @@
 		if (((MadsAnimation *) _activeAnimation)->freeFlag() || freeFlag) {
 			delete _activeAnimation;
 			_activeAnimation = NULL;
+			_animActive = false;
 		}
 	}
 
@@ -455,6 +458,7 @@
 
 	delete _activeAnimation;
 	_activeAnimation = NULL;
+	_animActive = false;
 }
 
 
@@ -574,6 +578,7 @@
 	MadsAnimation *anim = new MadsAnimation(_vm, this);
 	anim->load(animName.c_str(), abortTimers);
 	_activeAnimation = anim;
+	_animActive = true;
 }
 
 bool MadsScene::getDepthHighBit(const Common::Point &pt) {

Modified: scummvm/trunk/engines/m4/mads_scene.h
===================================================================
--- scummvm/trunk/engines/m4/mads_scene.h	2010-08-25 06:42:54 UTC (rev 52364)
+++ scummvm/trunk/engines/m4/mads_scene.h	2010-08-25 06:55:11 UTC (rev 52365)
@@ -108,6 +108,7 @@
 	Common::Point _destPos;
 	int _destFacing;
 	Common::Point _customDest;
+	bool _animActive;
 public:
 	MadsScene(MadsEngine *vm);
 	virtual ~MadsScene();


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