[Scummvm-cvs-logs] SF.net SVN: scummvm: [31674] scummvm/trunk/engines/kyra

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Wed Apr 23 21:36:21 CEST 2008


Revision: 31674
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31674&view=rev
Author:   lordhoto
Date:     2008-04-23 12:36:21 -0700 (Wed, 23 Apr 2008)

Log Message:
-----------
Cleanup.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/kyra_v2.cpp
    scummvm/trunk/engines/kyra/kyra_v2.h
    scummvm/trunk/engines/kyra/kyra_v3.cpp

Modified: scummvm/trunk/engines/kyra/kyra_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.cpp	2008-04-23 19:24:02 UTC (rev 31673)
+++ scummvm/trunk/engines/kyra/kyra_v2.cpp	2008-04-23 19:36:21 UTC (rev 31674)
@@ -1250,7 +1250,7 @@
 	_scriptInterpreter->loadScript(filename, &_npcScriptData, &_opcodes);
 }
 
-void KyraEngine_v2::runTemporaryScript(const char *filename, int unk1, int unk2, int newShapes, int shapeUnload) {
+void KyraEngine_v2::runTemporaryScript(const char *filename, int allowSkip, int resetChar, int newShapes, int shapeUnload) {
 	memset(&_temporaryScriptData, 0, sizeof(_temporaryScriptData));
 	memset(&_temporaryScriptState, 0, sizeof(_temporaryScriptState));
 
@@ -1262,19 +1262,19 @@
 
 	_newShapeFlag = -1;
 
+	if (_newShapeFiledata && newShapes) {
+		resetNewShapes(_newShapeCount, _newShapeFiledata);
+		_newShapeFiledata = 0;
+		_newShapeCount = 0;
+	}
+
 	while (_scriptInterpreter->validScript(&_temporaryScriptState))
 		_scriptInterpreter->runScript(&_temporaryScriptState);
 
 	uint8 *fileData = 0;
 
-	if (newShapes) {
-		if (_newShapeFiledata) {
-			resetNewShapes(_newShapeCount, _newShapeFiledata);
-			_newShapeFiledata = 0;
-			_newShapeCount = 0;
-		}
+	if (newShapes)
 		_newShapeFiledata = _res->fileData(_newShapeFilename, 0);
-	}
 
 	fileData = _newShapeFiledata;
 
@@ -1286,7 +1286,7 @@
 	if (newShapes)
 		_newShapeCount = initNewShapes(fileData);
 
-	processNewShapes(unk1, unk2);
+	processNewShapes(allowSkip, resetChar);
 
 	if (shapeUnload) {
 		resetNewShapes(_newShapeCount, fileData);
@@ -1639,7 +1639,7 @@
 	return lastEntry;
 }
 
-void KyraEngine_v2::processNewShapes(int unk1, int unk2) {
+void KyraEngine_v2::processNewShapes(int allowSkip, int resetChar) {
 	setCharacterAnimDim(_newShapeWidth, _newShapeHeight);
 
 	_scriptInterpreter->initScript(&_temporaryScriptState, &_temporaryScriptData);
@@ -1664,7 +1664,7 @@
 
 		uint32 delayEnd = _system->getMillis() + _newShapeDelay * _tickLength;
 
-		while ((!skipFlag() || !unk1) && _system->getMillis() < delayEnd) {
+		while ((!skipFlag() || !allowSkip) && _system->getMillis() < delayEnd) {
 			if (_chatText)
 				updateWithText();
 			else
@@ -1677,7 +1677,7 @@
 			resetSkipFlag();
 	}
 
-	if (unk2) {
+	if (resetChar) {
 		if (_newShapeFlag >= 0) {
 			_mainCharacter.animFrame = _newShapeFlag + 33;
 			updateCharacterAnim(0);

Modified: scummvm/trunk/engines/kyra/kyra_v2.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.h	2008-04-23 19:24:02 UTC (rev 31673)
+++ scummvm/trunk/engines/kyra/kyra_v2.h	2008-04-23 19:36:21 UTC (rev 31674)
@@ -446,7 +446,7 @@
 	int _newShapeDelay;
 
 	int initNewShapes(uint8 *filedata);
-	void processNewShapes(int unk1, int unk2);
+	void processNewShapes(int allowSkip, int resetChar);
 	void resetNewShapes(int count, uint8 *filedata);
 
 	// animator
@@ -1070,7 +1070,7 @@
 	bool _temporaryScriptExecBit;
 	Common::Array<const Opcode*> _opcodesTemporary;
 
-	void runTemporaryScript(const char *filename, int unk1, int unk2, int newShapes, int shapeUnload);
+	void runTemporaryScript(const char *filename, int allowSkip, int resetChar, int newShapes, int shapeUnload);
 
 	// pathfinder
 	int _pathfinderFlag;

Modified: scummvm/trunk/engines/kyra/kyra_v3.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v3.cpp	2008-04-23 19:24:02 UTC (rev 31673)
+++ scummvm/trunk/engines/kyra/kyra_v3.cpp	2008-04-23 19:36:21 UTC (rev 31674)
@@ -1569,19 +1569,19 @@
 
 	_newShapeFlag = -1;
 
+	if (_newShapeFiledata && newShapes) {
+		resetNewShapes(_newShapeCount, _newShapeFiledata);
+		_newShapeFiledata = 0;
+		_newShapeCount = 0;
+	}
+
 	while (_scriptInterpreter->validScript(&_temporaryScriptState))
 		_scriptInterpreter->runScript(&_temporaryScriptState);
 
 	uint8 *fileData = 0;
 
-	if (newShapes) {
-		if (_newShapeFiledata) {
-			resetNewShapes(_newShapeCount, _newShapeFiledata);
-			_newShapeFiledata = 0;
-			_newShapeCount = 0;
-		}
+	if (newShapes)
 		_newShapeFiledata = _res->fileData(_newShapeFilename, 0);
-	}
 
 	fileData = _newShapeFiledata;
 


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