[Scummvm-cvs-logs] SF.net SVN: scummvm:[41575] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Tue Jun 16 01:11:29 CEST 2009


Revision: 41575
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41575&view=rev
Author:   drmccoy
Date:     2009-06-15 23:11:29 +0000 (Mon, 15 Jun 2009)

Log Message:
-----------
Renamed _inter_resStr to _resultStr

Modified Paths:
--------------
    scummvm/trunk/engines/gob/inter_v1.cpp
    scummvm/trunk/engines/gob/inter_v2.cpp
    scummvm/trunk/engines/gob/inter_v4.cpp
    scummvm/trunk/engines/gob/inter_v5.cpp
    scummvm/trunk/engines/gob/inter_v6.cpp
    scummvm/trunk/engines/gob/parse.cpp
    scummvm/trunk/engines/gob/parse.h

Modified: scummvm/trunk/engines/gob/inter_v1.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v1.cpp	2009-06-15 23:11:08 UTC (rev 41574)
+++ scummvm/trunk/engines/gob/inter_v1.cpp	2009-06-15 23:11:29 UTC (rev 41575)
@@ -1079,7 +1079,7 @@
 void Inter_v1::o1_playCDTrack() {
 	evalExpr(0);
 	_vm->_sound->adlibPlayBgMusic(); // Mac version
-	_vm->_sound->cdPlay(_vm->_parse->_inter_resStr); // PC CD version
+	_vm->_sound->cdPlay(_vm->_parse->_resultStr); // PC CD version
 }
 
 void Inter_v1::o1_getCDTrackPos() {
@@ -1340,7 +1340,7 @@
 		if (srcType == TYPE_IMM_INT16)
 			WRITE_VARO_UINT8(dest, result);
 		else
-			WRITE_VARO_STR(dest, _vm->_parse->_inter_resStr);
+			WRITE_VARO_STR(dest, _vm->_parse->_resultStr);
 		break;
 
 	}
@@ -1425,7 +1425,7 @@
 	if ((*_vm->_global->_inter_execPtr & 0x80) != 0) {
 		_vm->_global->_inter_execPtr++;
 		evalExpr(0);
-		strncpy0(buf, _vm->_parse->_inter_resStr, 15);
+		strncpy0(buf, _vm->_parse->_resultStr, 15);
 	} else {
 		size = (int8) *_vm->_global->_inter_execPtr++;
 		for (int i = 0; i < size; i++)
@@ -2067,13 +2067,13 @@
 
 	evalExpr(0);
 	varOff = _vm->_parse->parseVarIndex();
-	handle = _vm->_dataIO->openData(_vm->_parse->_inter_resStr);
+	handle = _vm->_dataIO->openData(_vm->_parse->_resultStr);
 
 	WRITE_VAR_OFFSET(varOff, handle);
 	if (handle >= 0)
 		_vm->_dataIO->closeData(handle);
 	else
-		warning("File \"%s\" not found", _vm->_parse->_inter_resStr);
+		warning("File \"%s\" not found", _vm->_parse->_resultStr);
 	return false;
 }
 
@@ -2094,7 +2094,7 @@
 	pos = _vm->_parse->parseValExpr();
 
 	char *str = GET_VARO_FSTR(strVar);
-	_vm->_util->insertStr(_vm->_parse->_inter_resStr, str, pos);
+	_vm->_util->insertStr(_vm->_parse->_resultStr, str, pos);
 	return false;
 }
 
@@ -2119,7 +2119,7 @@
 	evalExpr(0);
 	resVar = _vm->_parse->parseVarIndex();
 
-	char *res = strstr(GET_VARO_STR(strVar), _vm->_parse->_inter_resStr);
+	char *res = strstr(GET_VARO_STR(strVar), _vm->_parse->_resultStr);
 	pos = res ? (res - (GET_VARO_STR(strVar))) : -1;
 	WRITE_VAR_OFFSET(resVar, pos);
 	return false;
@@ -2185,7 +2185,7 @@
 		_vm->_dataIO->closeData(_vm->_game->_extHandle);
 
 	_vm->_draw->_fonts[index] =
-		_vm->_util->loadFont(_vm->_parse->_inter_resStr);
+		_vm->_util->loadFont(_vm->_parse->_resultStr);
 
 	if (_vm->_game->_extHandle >= 0)
 		_vm->_game->_extHandle = _vm->_dataIO->openData(_vm->_game->_curExtFile);
@@ -2218,7 +2218,7 @@
 		_vm->_dataIO->closeData(_vm->_game->_extHandle);
 
 	WRITE_VAR(1, 1);
-	handle = _vm->_dataIO->openData(_vm->_parse->_inter_resStr);
+	handle = _vm->_dataIO->openData(_vm->_parse->_resultStr);
 	if (handle >= 0) {
 		DataStream *stream = _vm->_dataIO->openAsStream(handle, true);
 
@@ -2258,7 +2258,7 @@
 	size = _vm->_parse->parseValExpr();
 	offset = _vm->_parse->parseValExpr();
 
-	warning("Attempted to write to file \"%s\"", _vm->_parse->_inter_resStr);
+	warning("Attempted to write to file \"%s\"", _vm->_parse->_resultStr);
 	WRITE_VAR(1, 0);
 
 	return false;
@@ -2267,8 +2267,8 @@
 bool Inter_v1::o1_manageDataFile(OpFuncParams &params) {
 	evalExpr(0);
 
-	if (_vm->_parse->_inter_resStr[0] != 0)
-		_vm->_dataIO->openDataFile(_vm->_parse->_inter_resStr);
+	if (_vm->_parse->_resultStr[0] != 0)
+		_vm->_dataIO->openDataFile(_vm->_parse->_resultStr);
 	else
 		_vm->_dataIO->closeDataFile();
 	return false;

Modified: scummvm/trunk/engines/gob/inter_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v2.cpp	2009-06-15 23:11:08 UTC (rev 41574)
+++ scummvm/trunk/engines/gob/inter_v2.cpp	2009-06-15 23:11:29 UTC (rev 41575)
@@ -1058,7 +1058,7 @@
 		_vm->_draw->blitInvalidated();
 
 	evalExpr(0);
-	_vm->_sound->cdPlay(_vm->_parse->_inter_resStr);
+	_vm->_sound->cdPlay(_vm->_parse->_resultStr);
 }
 
 void Inter_v2::o2_waitCDTrackEnd() {
@@ -1076,7 +1076,7 @@
 	char path[40];
 
 	evalExpr(0);
-	strncpy0(path, _vm->_parse->_inter_resStr, 35);
+	strncpy0(path, _vm->_parse->_resultStr, 35);
 	strcat(path, ".LIC");
 
 	_vm->_sound->cdLoadLIC(path);
@@ -1124,7 +1124,7 @@
 
 	if (length & 0x80) {
 		evalExpr(0);
-		strcpy(totFile, _vm->_parse->_inter_resStr);
+		strcpy(totFile, _vm->_parse->_resultStr);
 	} else {
 		for (i = 0; i < length; i++)
 			totFile[i] = (char) *_vm->_global->_inter_execPtr++;
@@ -1507,8 +1507,8 @@
 	bool close;
 
 	evalExpr(0);
-	_vm->_parse->_inter_resStr[8] = 0;
-	strncpy0(imd, _vm->_parse->_inter_resStr, 127);
+	_vm->_parse->_resultStr[8] = 0;
+	strncpy0(imd, _vm->_parse->_resultStr, 127);
 
 	x = _vm->_parse->parseValExpr();
 	y = _vm->_parse->parseValExpr();
@@ -1521,7 +1521,7 @@
 	palCmd = 1 << (flags & 0x3F);
 
 	debugC(1, kDebugVideo, "Playing video \"%s\" @ %d+%d, frames %d - %d, "
-			"paletteCmd %d (%d - %d), flags %X", _vm->_parse->_inter_resStr, x, y,
+			"paletteCmd %d (%d - %d), flags %X", _vm->_parse->_resultStr, x, y,
 			startFrame, lastFrame, palCmd, palStart, palEnd, flags);
 
 	if ((imd[0] != 0) && !_vm->_vidPlayer->primaryOpen(imd, x, y, flags)) {
@@ -1560,10 +1560,10 @@
 	// WORKAROUND: The nut rolling animation in the administration center
 	// in Woodruff is called "noixroul", but the scripts think it's "noixroule".
 	if ((_vm->getGameType() == kGameTypeWoodruff) &&
-			(!scumm_stricmp(_vm->_parse->_inter_resStr, "noixroule")))
-		strcpy(_vm->_parse->_inter_resStr, "noixroul");
+			(!scumm_stricmp(_vm->_parse->_resultStr, "noixroule")))
+		strcpy(_vm->_parse->_resultStr, "noixroul");
 
-	_vm->_vidPlayer->writeVideoInfo(_vm->_parse->_inter_resStr, varX, varY,
+	_vm->_vidPlayer->writeVideoInfo(_vm->_parse->_resultStr, varX, varY,
 			varFrames, varWidth, varHeight);
 }
 
@@ -1571,7 +1571,7 @@
 	char fileName[32];
 
 	evalExpr(0);
-	strncpy0(fileName, _vm->_parse->_inter_resStr, 27);
+	strncpy0(fileName, _vm->_parse->_resultStr, 27);
 	if (!strchr(fileName, '.'))
 		strcat(fileName, ".ITK");
 
@@ -1628,7 +1628,7 @@
 			if (srcType == TYPE_IMM_INT16)
 				WRITE_VARO_UINT8(dest, result);
 			else
-				WRITE_VARO_STR(dest, _vm->_parse->_inter_resStr);
+				WRITE_VARO_STR(dest, _vm->_parse->_resultStr);
 			break;
 		}
 	}
@@ -1858,17 +1858,17 @@
 	size = -1;
 	handle = 1;
 
-	mode = _vm->_saveLoad->getSaveMode(_vm->_parse->_inter_resStr);
+	mode = _vm->_saveLoad->getSaveMode(_vm->_parse->_resultStr);
 	if (mode == SaveLoad::kSaveModeNone) {
-		handle = _vm->_dataIO->openData(_vm->_parse->_inter_resStr);
+		handle = _vm->_dataIO->openData(_vm->_parse->_resultStr);
 
 		if (handle >= 0) {
 			_vm->_dataIO->closeData(handle);
-			size = _vm->_dataIO->getDataSize(_vm->_parse->_inter_resStr);
+			size = _vm->_dataIO->getDataSize(_vm->_parse->_resultStr);
 		} else
-			warning("File \"%s\" not found", _vm->_parse->_inter_resStr);
+			warning("File \"%s\" not found", _vm->_parse->_resultStr);
 	} else if (mode == SaveLoad::kSaveModeSave)
-		size = _vm->_saveLoad->getSize(_vm->_parse->_inter_resStr);
+		size = _vm->_saveLoad->getSize(_vm->_parse->_resultStr);
 	else if (mode == SaveLoad::kSaveModeExists)
 		size = 23;
 
@@ -1876,7 +1876,7 @@
 		handle = -1;
 
 	debugC(2, kDebugFileIO, "Requested size of file \"%s\": %d",
-			_vm->_parse->_inter_resStr, size);
+			_vm->_parse->_resultStr, size);
 
 	WRITE_VAR_OFFSET(varOff, handle);
 	WRITE_VAR(16, (uint32) size);
@@ -1901,12 +1901,12 @@
 	retSize = 0;
 
 	debugC(2, kDebugFileIO, "Read from file \"%s\" (%d, %d bytes at %d)",
-			_vm->_parse->_inter_resStr, dataVar, size, offset);
+			_vm->_parse->_resultStr, dataVar, size, offset);
 
-	mode = _vm->_saveLoad->getSaveMode(_vm->_parse->_inter_resStr);
+	mode = _vm->_saveLoad->getSaveMode(_vm->_parse->_resultStr);
 	if (mode == SaveLoad::kSaveModeSave) {
 		WRITE_VAR(1, 1);
-		if (_vm->_saveLoad->load(_vm->_parse->_inter_resStr, dataVar, size, offset))
+		if (_vm->_saveLoad->load(_vm->_parse->_resultStr, dataVar, size, offset))
 			WRITE_VAR(1, 0);
 		return false;
 	} else if (mode == SaveLoad::kSaveModeIgnore)
@@ -1914,7 +1914,7 @@
 
 	if (size < 0) {
 		warning("Attempted to read a raw sprite from file \"%s\"",
-				_vm->_parse->_inter_resStr);
+				_vm->_parse->_resultStr);
 		return false ;
 	} else if (size == 0) {
 		dataVar = 0;
@@ -1923,13 +1923,13 @@
 
 	buf = _variables->getAddressOff8(dataVar);
 
-	if (_vm->_parse->_inter_resStr[0] == 0) {
+	if (_vm->_parse->_resultStr[0] == 0) {
 		WRITE_VAR(1, size);
 		return false;
 	}
 
 	WRITE_VAR(1, 1);
-	handle = _vm->_dataIO->openData(_vm->_parse->_inter_resStr);
+	handle = _vm->_dataIO->openData(_vm->_parse->_resultStr);
 
 	if (handle < 0)
 		return false;
@@ -1971,16 +1971,16 @@
 	offset = _vm->_parse->_resultInt;
 
 	debugC(2, kDebugFileIO, "Write to file \"%s\" (%d, %d bytes at %d)",
-			_vm->_parse->_inter_resStr, dataVar, size, offset);
+			_vm->_parse->_resultStr, dataVar, size, offset);
 
 	WRITE_VAR(1, 1);
 
-	mode = _vm->_saveLoad->getSaveMode(_vm->_parse->_inter_resStr);
+	mode = _vm->_saveLoad->getSaveMode(_vm->_parse->_resultStr);
 	if (mode == SaveLoad::kSaveModeSave) {
-		if (_vm->_saveLoad->save(_vm->_parse->_inter_resStr, dataVar, size, offset))
+		if (_vm->_saveLoad->save(_vm->_parse->_resultStr, dataVar, size, offset))
 			WRITE_VAR(1, 0);
 	} else if (mode == SaveLoad::kSaveModeNone)
-		warning("Attempted to write to file \"%s\"", _vm->_parse->_inter_resStr);
+		warning("Attempted to write to file \"%s\"", _vm->_parse->_resultStr);
 
 	return false;
 }

Modified: scummvm/trunk/engines/gob/inter_v4.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v4.cpp	2009-06-15 23:11:08 UTC (rev 41574)
+++ scummvm/trunk/engines/gob/inter_v4.cpp	2009-06-15 23:11:29 UTC (rev 41575)
@@ -810,7 +810,7 @@
 	bool close;
 
 	evalExpr(0);
-	strncpy0(fileName, _vm->_parse->_inter_resStr, 127);
+	strncpy0(fileName, _vm->_parse->_resultStr, 127);
 
 	// WORKAROUND: The nut rolling animation in the administration center
 	// in Woodruff is called "noixroul", but the scripts think it's "noixroule".

Modified: scummvm/trunk/engines/gob/inter_v5.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v5.cpp	2009-06-15 23:11:08 UTC (rev 41574)
+++ scummvm/trunk/engines/gob/inter_v5.cpp	2009-06-15 23:11:29 UTC (rev 41575)
@@ -675,7 +675,7 @@
 void Inter_v5::o5_deleteFile() {
 	evalExpr(0);
 
-	warning("Dynasty Stub: deleteFile \"%s\"", _vm->_parse->_inter_resStr);
+	warning("Dynasty Stub: deleteFile \"%s\"", _vm->_parse->_resultStr);
 }
 
 void Inter_v5::o5_initScreen() {

Modified: scummvm/trunk/engines/gob/inter_v6.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v6.cpp	2009-06-15 23:11:08 UTC (rev 41574)
+++ scummvm/trunk/engines/gob/inter_v6.cpp	2009-06-15 23:11:29 UTC (rev 41575)
@@ -666,7 +666,7 @@
 
 	if (length & 0x80) {
 		evalExpr(0);
-		strcpy(totFile, _vm->_parse->_inter_resStr);
+		strcpy(totFile, _vm->_parse->_resultStr);
 	} else {
 		for (i = 0; i < length; i++)
 			totFile[i] = (char) *_vm->_global->_inter_execPtr++;
@@ -694,7 +694,7 @@
 	bool close;
 
 	evalExpr(0);
-	strncpy0(fileName, _vm->_parse->_inter_resStr, 127);
+	strncpy0(fileName, _vm->_parse->_resultStr, 127);
 
 	x = _vm->_parse->parseValExpr();
 	y = _vm->_parse->parseValExpr();
@@ -760,7 +760,7 @@
 	char fileName[32];
 
 	evalExpr(0);
-	strncpy0(fileName, _vm->_parse->_inter_resStr, 27);
+	strncpy0(fileName, _vm->_parse->_resultStr, 27);
 	if (!strchr(fileName, '.'))
 		strcat(fileName, ".ITK");
 
@@ -912,7 +912,7 @@
 			if (srcType == TYPE_IMM_INT16)
 				WRITE_VARO_UINT8(dest, result);
 			else
-				WRITE_VARO_STR(dest, _vm->_parse->_inter_resStr);
+				WRITE_VARO_STR(dest, _vm->_parse->_resultStr);
 			break;
 		}
 	}

Modified: scummvm/trunk/engines/gob/parse.cpp
===================================================================
--- scummvm/trunk/engines/gob/parse.cpp	2009-06-15 23:11:08 UTC (rev 41574)
+++ scummvm/trunk/engines/gob/parse.cpp	2009-06-15 23:11:29 UTC (rev 41575)
@@ -34,7 +34,7 @@
 namespace Gob {
 
 Parse::Parse(GobEngine *vm) : _vm(vm) {
-	_inter_resStr[0] = 0;
+	_resultStr[0] = 0;
 	_resultInt = 0;
 }
 
@@ -49,7 +49,7 @@
 		offset = ptr - ((byte *) _vm->_inter->_variables->getAddressOff8(0));
 		break;
 	case kResStr:
-		offset = ptr - ((byte *) _vm->_parse->_inter_resStr);
+		offset = ptr - ((byte *) _vm->_parse->_resultStr);
 		break;
 	default:
 		error("Parse::encodePtr(): Unknown pointer type");
@@ -69,7 +69,7 @@
 		ptr = (byte *) _vm->_inter->_variables->getAddressOff8(0);
 		break;
 	case kResStr:
-		ptr = (byte *) _vm->_parse->_inter_resStr;
+		ptr = (byte *) _vm->_parse->_resultStr;
 		break;
 	default:
 		error("Parse::decodePtr(): Unknown pointer type");
@@ -465,11 +465,11 @@
 	if (type == OP_LOAD_IMM_INT16) {
 		cmpTemp = (int)valPtr[-3] - (int)valPtr[-1];
 	} else if (type == OP_LOAD_IMM_STR) {
-		if ((char *)decodePtr(valPtr[-3]) != _vm->_parse->_inter_resStr) {
-			strcpy(_vm->_parse->_inter_resStr, (char *)decodePtr(valPtr[-3]));
-			valPtr[-3] = encodePtr((byte *) _vm->_parse->_inter_resStr, kResStr);
+		if ((char *)decodePtr(valPtr[-3]) != _vm->_parse->_resultStr) {
+			strcpy(_vm->_parse->_resultStr, (char *)decodePtr(valPtr[-3]));
+			valPtr[-3] = encodePtr((byte *) _vm->_parse->_resultStr, kResStr);
 		}
-		cmpTemp = strcmp(_vm->_parse->_inter_resStr, (char *)decodePtr(valPtr[-1]));
+		cmpTemp = strcmp(_vm->_parse->_resultStr, (char *)decodePtr(valPtr[-1]));
 	}
 
 	return cmpTemp;
@@ -773,11 +773,11 @@
 	switch (operPtr[-1]) {
 	case OP_ADD:
 		if (operPtr[-2] == OP_LOAD_IMM_STR) {
-			if ((char *) decodePtr(valPtr[-2]) != _vm->_parse->_inter_resStr) {
-				strcpy(_vm->_parse->_inter_resStr, (char *) decodePtr(valPtr[-2]));
-				valPtr[-2] = encodePtr((byte *) _vm->_parse->_inter_resStr, kResStr);
+			if ((char *) decodePtr(valPtr[-2]) != _vm->_parse->_resultStr) {
+				strcpy(_vm->_parse->_resultStr, (char *) decodePtr(valPtr[-2]));
+				valPtr[-2] = encodePtr((byte *) _vm->_parse->_resultStr, kResStr);
 			}
-			strcat(_vm->_parse->_inter_resStr, (char *) decodePtr(valPtr[0]));
+			strcat(_vm->_parse->_resultStr, (char *) decodePtr(valPtr[0]));
 			stkPos -= 2;
 			operPtr -= 2;
 			valPtr -= 2;
@@ -873,12 +873,12 @@
 		if (operStack[brackStart] == OP_LOAD_IMM_INT16) {
 			values[brackStart] += valPtr[-1];
 		} else if (operStack[brackStart] == OP_LOAD_IMM_STR) {
-			if ((char *) decodePtr(values[brackStart]) != _vm->_parse->_inter_resStr) {
-				strcpy(_vm->_parse->_inter_resStr, (char *) decodePtr(values[brackStart]));
+			if ((char *) decodePtr(values[brackStart]) != _vm->_parse->_resultStr) {
+				strcpy(_vm->_parse->_resultStr, (char *) decodePtr(values[brackStart]));
 				values[brackStart] =
-					encodePtr((byte *) _vm->_parse->_inter_resStr, kResStr);
+					encodePtr((byte *) _vm->_parse->_resultStr, kResStr);
 			}
-			strcat(_vm->_parse->_inter_resStr, (char *) decodePtr(valPtr[-1]));
+			strcat(_vm->_parse->_resultStr, (char *) decodePtr(valPtr[-1]));
 		}
 		stkPos -= 2;
 		operPtr -= 2;
@@ -996,7 +996,7 @@
 	return false;
 }
 
-// Assign the result to the appropriate _inter_res* variable
+// Assign the result to the appropriate _result variable
 void Parse::getResult(byte operation, int32 value, byte *type) {
 	if (type != 0)
 		*type = operation;
@@ -1012,8 +1012,8 @@
 		break;
 
 	case OP_LOAD_IMM_STR:
-		if ((char *) decodePtr(value) != _vm->_parse->_inter_resStr)
-			strcpy(_vm->_parse->_inter_resStr, (char *) decodePtr(value));
+		if ((char *) decodePtr(value) != _vm->_parse->_resultStr)
+			strcpy(_vm->_parse->_resultStr, (char *) decodePtr(value));
 		break;
 
 	case OP_LOAD_VAR_INT32:
@@ -1165,11 +1165,11 @@
 					if (operPtr[-3] == OP_LOAD_IMM_INT16) {
 						valPtr[-3] += valPtr[-1];
 					} else if (operPtr[-3] == OP_LOAD_IMM_STR) {
-						if ((char *) decodePtr(valPtr[-3]) != _vm->_parse->_inter_resStr) {
-							strcpy(_vm->_parse->_inter_resStr, (char *) decodePtr(valPtr[-3]));
-							valPtr[-3] = encodePtr((byte *) _vm->_parse->_inter_resStr, kResStr);
+						if ((char *) decodePtr(valPtr[-3]) != _vm->_parse->_resultStr) {
+							strcpy(_vm->_parse->_resultStr, (char *) decodePtr(valPtr[-3]));
+							valPtr[-3] = encodePtr((byte *) _vm->_parse->_resultStr, kResStr);
 						}
-						strcat(_vm->_parse->_inter_resStr, (char *) decodePtr(valPtr[-1]));
+						strcat(_vm->_parse->_resultStr, (char *) decodePtr(valPtr[-1]));
 					}
 					stkPos -= 2;
 					operPtr -= 2;

Modified: scummvm/trunk/engines/gob/parse.h
===================================================================
--- scummvm/trunk/engines/gob/parse.h	2009-06-15 23:11:08 UTC (rev 41574)
+++ scummvm/trunk/engines/gob/parse.h	2009-06-15 23:11:29 UTC (rev 41575)
@@ -118,7 +118,7 @@
 	Parse(GobEngine *vm);
 	virtual ~Parse() {}
 
-	char _inter_resStr[200];
+	char _resultStr[200];
 	int32 _resultInt;
 
 private:


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