[Scummvm-cvs-logs] SF.net SVN: scummvm: [28083] tools/branches/gsoc2007-toolsgui

lightcast at users.sourceforge.net lightcast at users.sourceforge.net
Sun Jul 15 05:23:18 CEST 2007


Revision: 28083
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28083&view=rev
Author:   lightcast
Date:     2007-07-14 20:23:18 -0700 (Sat, 14 Jul 2007)

Log Message:
-----------
Removed unnecessary whitespace.

Modified Paths:
--------------
    tools/branches/gsoc2007-toolsgui/dekyra.cpp
    tools/branches/gsoc2007-toolsgui/dekyra.h
    tools/branches/gsoc2007-toolsgui/dekyra_v1.cpp
    tools/branches/gsoc2007-toolsgui/descumm-common.cpp
    tools/branches/gsoc2007-toolsgui/descumm-tool.cpp
    tools/branches/gsoc2007-toolsgui/descumm.cpp
    tools/branches/gsoc2007-toolsgui/descumm.h
    tools/branches/gsoc2007-toolsgui/descumm6.cpp

Modified: tools/branches/gsoc2007-toolsgui/dekyra.cpp
===================================================================
--- tools/branches/gsoc2007-toolsgui/dekyra.cpp	2007-07-15 03:13:15 UTC (rev 28082)
+++ tools/branches/gsoc2007-toolsgui/dekyra.cpp	2007-07-15 03:23:18 UTC (rev 28083)
@@ -42,15 +42,15 @@
 			   "-e   set engine version (1 for kyra1 (default), 2 for kyra2)\n"
 			   "-o   set optional outputfilename (default: stdout)\n",
 			   argv[0]);
-			   
+
 		return -1;
 	}
-	
+
 	int file = -1;
 	int outputfile = -1;
 	bool displayText = false;
 	int32 engine = 1;
-	
+
 	// search for some parameters
 	for (int param = 1; param < argc; ++param) {
 		if (*argv[param] != '-' && file == -1)
@@ -60,13 +60,13 @@
 				displayText = true;
 			} else if (argv[param][1] == 'e') {
 				engine = atoi(argv[param+1]);
-				++param;				
+				++param;
 			} else if (argv[param][1] == 'o' && outputfile == -1) {
 				outputfile = ++param;
 			}
 		}
 	}
-	
+
 	if (file == -1) {
 		printf("Use:\n"
 			   "%s filename\n"
@@ -74,27 +74,27 @@
 			   "-e   set engine version (1 for kyra1 (default), 2 for kyra2)\n"
 			   "-o   set optional outputfilename (default: stdout)\n",
 			   argv[0]);
-			   
+
 		return -1;
 	} else if (engine != 1 && engine != 2) {
 		printf("-e (engine version) must be set to 1 or 2!\n");
 		return -1;
 	}
-	
+
 	// currently output goes to stdout
 	if (outputfile == -1 || outputfile >= argc) {
 		outputFile = stdout;
 	} else {
 		outputFile = fopen(argv[outputfile], "w");
 	}
-	
+
 	Script myScript;
 	ScriptData scriptData;
 	memset(&scriptData, 0, sizeof(ScriptData));
-	
+
 	OpcodeEntry *opcodes;
 	int opcodesSize;
-	
+
 	if (engine == 1) {
 		getOpcodesV1(opcodes, opcodesSize);
 	} else if (engine == 2) {
@@ -105,7 +105,7 @@
 		printf("ERROR: script loading failed!\n");
 		return -1;
 	}
-	
+
 	myScript.setEngineVersion(engine);
 	if (!displayText) {
 		if (engine == 1) {
@@ -114,10 +114,10 @@
 			// TODO: maybe kyra2 has other commands?
 			setupTraceCommandsV1(&myScript);
 		}
-		
+
 		myScript.processScriptTrace(&scriptData);
 	}
-	
+
 	fprintf(outputFile, "/-----------------------------------\\\n");
 	fprintf(outputFile, "|                                   |\n");
 	fprintf(outputFile, "|  Dekyra output for file:          |\n");
@@ -145,7 +145,7 @@
 	}
 	fprintf(outputFile, "|                                   |\n");
 	fprintf(outputFile, "\\-----------------------------------/\n\n");
-	
+
 	myScript.setEngineVersion(engine);
 	myScript.printTextArea(&scriptData, argv[file]);
 	if (!displayText) {
@@ -160,12 +160,12 @@
 
 		myScript.decodeScript(&scriptData);
 	}
-	
+
 	myScript.unloadScript(&scriptData);
-	
+
 	if (outputFile != stdout)
 		fclose(outputFile);
-	
+
 	return 0;
 }
 
@@ -202,14 +202,14 @@
 	scriptFile = NULL;
 
 	byte *curData = data;
-	
+
 	uint32 formBlockSize = Script::getFORMBlockSize(curData);
 	if (formBlockSize == (uint32)-1) {
 		delete [] data;
 		error("No FORM chunk found in file: '%s'", filename);
 		return false;
 	}
-	
+
 	uint32 chunkSize = Script::getIFFBlockSize(data, curData, size, TEXT_CHUNK);
 	if (chunkSize != (uint32)-1) {
 		scriptData->text = new byte[chunkSize];
@@ -222,7 +222,7 @@
 			error("Couldn't load TEXT chunk from file: '%s'", filename);
 			return false;
 		}
-		
+
 		uint16 minTextOffset = 0xFFFF;
 		for (int i = 0; i < scriptData->textChunkSize / 2; ++i, ++scriptData->numStrings) {
 			if (minTextOffset > READ_BE_UINT16(&((uint16 *)scriptData->text)[i])) {
@@ -232,7 +232,7 @@
 				break;
 		}
 	}
-	
+
 	chunkSize = Script::getIFFBlockSize(data, curData, size, ORDR_CHUNK);
 	if (chunkSize == (uint32)-1) {
 		delete [] data;
@@ -255,7 +255,7 @@
 	while (chunkSize--) {
 		((uint16*)scriptData->ordr)[chunkSize] = READ_BE_UINT16(&((uint16*)scriptData->ordr)[chunkSize]);
 	}
-	
+
 	chunkSize = Script::getIFFBlockSize(data, curData, size, DATA_CHUNK);
 	if (chunkSize == (uint32)-1) {
 		delete [] data;
@@ -273,11 +273,11 @@
 		error("Couldn't load DATA chunk from file: '%s'", filename);
 		return false;
 	}
-	
+
 	scriptData->dataChunkSize = chunkSize;
 	scriptData->opcodes = opcodes;
 	scriptData->opcodeSize = opcodeSize;
-	
+
 	delete [] data;
 	return true;
 }
@@ -339,13 +339,13 @@
 		} else {
 			parameter = 0;
 		}
-		
+
 		if (opcode < _commandsSize) {
 			if (_commands[(uint)opcode])
 				_commands[(uint)opcode](dataPtr, parameter);
 		}
 	}
-	
+
 	// TODO: sort the 'function' list (except for the functions with id != -1) after start address
 }
 
@@ -360,11 +360,11 @@
 		int temp = (dataPtr->functions[i].startOffset < offset) ? dataPtr->functions[i].startOffset : offset;
 		if (temp == offset)
 			continue;
-		
+
 		int temp2 = (bestStartOffset > temp) ? bestStartOffset : temp;
 		if (temp2 == bestStartOffset)
 			continue;
-		
+
 		bestStartOffset = temp2;
 		functionFittingBest = i;
 	}
@@ -409,7 +409,7 @@
 
 void Script::decodeScript(ScriptData *dataPtr) {
 	uint8 *ip = dataPtr->data;
-	
+
 	fprintf(outputFile, "\n");
 	fprintf(outputFile, "---------- scriptfunction list ----------------\n\n");
 	for (int i = 0; i < dataPtr->ordrChunkSize / 2; ++i) {
@@ -418,7 +418,7 @@
 			fprintf(outputFile, "Scriptfunction %d starts at 0x%.04X\n", i, offset << 1);
 	}
 	fprintf(outputFile, "\n");
-	
+
 	fprintf(outputFile, "--------- detected functionchunk list ----------\n\n");
 	outputFunctionInfo(dataPtr, 0, true);
 
@@ -427,7 +427,7 @@
 		uint16 curOffset = (uint16)(ip - dataPtr->data);
 
 		outputFunctionInfo(dataPtr, curOffset);
-		
+
 		fprintf(outputFile, "0x%.04X: ", curOffset);
 
 		int16 parameter = 0;
@@ -444,7 +444,7 @@
 		} else {
 			parameter = 0;
 		}
-		
+
 		fprintf(outputFile, "0x%.02X ", opcode);
 		if (opcode >= _commandsSize) {
 			fprintf(outputFile, "unknown command\n");
@@ -472,7 +472,7 @@
 uint32 Script::getIFFBlockSize(byte *start, byte *&data, uint32 maxSize, const uint32 chunkName) {
 	uint32 size = (uint32)-1;
 	bool special = false;
-	
+
 	if (data == (start + maxSize)) {
 		data = start + 0x0C;
 	}
@@ -498,7 +498,7 @@
 
 bool Script::loadIFFBlock(byte *start, byte *&data, uint32 maxSize, const uint32 chunkName, byte *loadTo, uint32 ptrSize) {
 	bool special = false;
-	
+
 	if (data == (start + maxSize)) {
 		data = start + 0x0C;
 	}

Modified: tools/branches/gsoc2007-toolsgui/dekyra.h
===================================================================
--- tools/branches/gsoc2007-toolsgui/dekyra.h	2007-07-15 03:13:15 UTC (rev 28082)
+++ tools/branches/gsoc2007-toolsgui/dekyra.h	2007-07-15 03:23:18 UTC (rev 28083)
@@ -29,7 +29,7 @@
 typedef unsigned int uint;
 
 struct OpcodeEntry {
-	uint16 opcode;	
+	uint16 opcode;
 	const char *name;
 };
 
@@ -50,23 +50,23 @@
 	byte *text;
 	int numStrings;
 	int textChunkSize;
-	
+
 	byte *data;
 	int dataChunkSize;
-	
+
 	byte *ordr;
 	int validORDRFunctions;
 	int ordrChunkSize;
-	
+
 	OpcodeEntry *opcodes;
 	int opcodeSize;
-	
+
 	// trace information
 	uint16 curOffset;
 
 	int numFunctions;
 	Function functions[MAX_FUNCTIONS];
-	
+
 	Function *getFunction(uint16 startOff) {
 		for (int i = 0; i < numFunctions; ++i) {
 			if (functions[i].startOffset == startOff)
@@ -93,7 +93,7 @@
 
 	bool loadScript(const char *filename, ScriptData *data, OpcodeEntry *opcodes, int opcodeSize);
 	void unloadScript(ScriptData *data);
-	
+
 	void printTextArea(ScriptData *dataPtr, const char *filename);
 	void processScriptTrace(ScriptData *dataPtr);
 	void decodeScript(ScriptData *dataPtr);

Modified: tools/branches/gsoc2007-toolsgui/dekyra_v1.cpp
===================================================================
--- tools/branches/gsoc2007-toolsgui/dekyra_v1.cpp	2007-07-15 03:13:15 UTC (rev 28082)
+++ tools/branches/gsoc2007-toolsgui/dekyra_v1.cpp	2007-07-15 03:23:18 UTC (rev 28083)
@@ -70,7 +70,7 @@
 	case 0:
 	case 1:
 		break;
-	
+
 	default:
 		fprintf(outputFile, "; called with illegal param! breaks execution!");
 		break;
@@ -106,7 +106,7 @@
 	case 0:
 	case 1:
 		break;
-	
+
 	default:
 		fprintf(outputFile, "; called with illegal param! breaks execution!");
 		break;
@@ -153,7 +153,7 @@
 	case 1:
 	case 2:
 		break;
-	
+
 	default:
 		fprintf(outputFile, "; called with illegal param! breaks execution");
 		break;
@@ -163,85 +163,85 @@
 
 void c1_eval(ScriptData *script, int argument) {
 	fprintf(outputFile, "c1_eval %d ; (C syntax): '", argument);
-	
+
 	switch (argument) {
 	case 0:
 		fprintf(outputFile, "(val2 && val1)");
 		break;
-	
+
 	case 1:
 		fprintf(outputFile, "(val2 || val1)");
 		break;
-	
+
 	case 2:
 		fprintf(outputFile, "(val1 == val2)");
 		break;
-	
+
 	case 3:
 		fprintf(outputFile, "(val1 != val2)");
 		break;
-	
+
 	case 4:
 		fprintf(outputFile, "(val1 > val2)");
 		break;
-	
+
 	case 5:
 		fprintf(outputFile, "(val1 >= val2)");
 		break;
-	
+
 	case 6:
 		fprintf(outputFile, "(val1 < val2)");
 		break;
-	
+
 	case 7:
 		fprintf(outputFile, "(val1 <= val2)");
 		break;
-	
+
 	case 8:
 		fprintf(outputFile, "val1 + val2");
 		break;
-	
+
 	case 9:
 		fprintf(outputFile, "val2 - val1");
 		break;
-	
+
 	case 10:
 		fprintf(outputFile, "val1 * val2");
 		break;
-	
+
 	case 11:
 		fprintf(outputFile, "val2 / val1");
 		break;
-	
+
 	case 12:
 		fprintf(outputFile, "val2 >> val1");
 		break;
-	
+
 	case 13:
 		fprintf(outputFile, "val2 << val1");
 		break;
-	
+
 	case 14:
 		fprintf(outputFile, "val1 & val2");
 		break;
-	
+
 	case 15:
 		fprintf(outputFile, "val1 | val2");
 		break;
-	
+
 	case 16:
 		fprintf(outputFile, "val2 %% val1");
 		break;
-	
+
 	case 17:
 		fprintf(outputFile, "val1 ^ val2");
 		break;
-	
+
 	default:
 		fprintf(outputFile, "!error breaking exectution!");
 		break;
 	}
-	
+
 	fprintf(outputFile, "'\n");
 }
 
@@ -271,7 +271,7 @@
 		&c1_eval,
 		&c1_setRetAndJmp
 	};
-	
+
 	myScript->setCommands(commands, ARRAYSIZE(commands));
 }
 
@@ -283,7 +283,7 @@
 			if (call->refOffs[i] == script->curOffset)
 				return;
 		}
-		
+
 		if (call->refs < MAX_REFS) {
 			call->refOffs[call->refs++] = script->curOffset;
 		} else {
@@ -309,7 +309,7 @@
 			if (call->refOffs[i] == script->curOffset)
 				return;
 		}
-		
+
 		if (call->refs < MAX_REFS) {
 			call->refOffs[call->refs++] = script->curOffset;
 		} else {
@@ -350,7 +350,7 @@
 		0,
 		0
 	};
-	
+
 	myScript->setCommands(commands, ARRAYSIZE(commands));
 }
 
@@ -408,7 +408,7 @@
 		{ 0x30 ,"o1_popBrandonIntoScene" },
 		{ 0x31 ,"o1_restoreAllObjectBackgrounds" },
 		{ 0x32 ,"o1_setCustomPaletteRange" },
-		{ 0x33 ,"o1_loadPageFromDisk" },		
+		{ 0x33 ,"o1_loadPageFromDisk" },
 		{ 0x34 ,"o1_customPrintTalkString" },
 		{ 0x35 ,"o1_restoreCustomPrintBackground" },
 		{ 0x36 ,"o1_hideMouse" },
@@ -515,7 +515,7 @@
 		{ 0x9b ,"o1_vocLoad" },
 		{ 0x9c ,"o1_dummy" }
 	};
-	
+
 	opcodes = kyra1OpcodeDesc;
 	opcodesSize = ARRAYSIZE(kyra1OpcodeDesc);
 }

Modified: tools/branches/gsoc2007-toolsgui/descumm-common.cpp
===================================================================
--- tools/branches/gsoc2007-toolsgui/descumm-common.cpp	2007-07-15 03:13:15 UTC (rev 28082)
+++ tools/branches/gsoc2007-toolsgui/descumm-common.cpp	2007-07-15 03:23:18 UTC (rev 28083)
@@ -96,7 +96,7 @@
 		if (!g_options.dontShowOffsets) {
 			printf("[%.4X] ", curoffs);
 		}
-		
+
 		// Show the opcode value
 		if (!g_options.dontShowOpcode) {
 			if (opcode != -1)
@@ -121,16 +121,16 @@
 {
 	Block p;
 	int i;
-	
+
 	if (((to | cur) >> 24) || (to <= cur))
 		return false; // Invalid jump
-	
+
 	for (i = 0; i < g_blockStack.size(); ++i) {
 		if (to > g_blockStack[i].to)
 			return false;
 	}
-	
-	// Try to determine if this is a while loop. For this, first check if we 
+
+	// Try to determine if this is a while loop. For this, first check if we
 	// jump right behind a regular jump, then whether that jump is targeting us.
 	if (g_options.scriptVersion == 8) {
 		p.isWhile = (*(byte*)(g_scriptStart+to-5) == g_jump_opcode);
@@ -139,13 +139,13 @@
 		p.isWhile = (*(byte*)(g_scriptStart+to-3) == g_jump_opcode);
 		i = (int16)READ_LE_UINT16(g_scriptStart+to-2);
 	}
-	
+
 	p.isWhile = p.isWhile && (currentOpcodeBlockStart == (int)to + i);
 	p.from = cur;
 	p.to = to;
-	
+
 	g_blockStack.push(p);
-	
+
 	return true;
 }
 
@@ -200,12 +200,12 @@
 	if (elseto != to) {
 		if (g_scriptStart[k] != g_jump_opcode)
 			return false;							/* Invalid jump */
-	
+
 		if (g_options.scriptVersion == 8)
 			k = to + READ_LE_UINT32(g_scriptStart + k + 1);
 		else
 			k = to + READ_LE_UINT16(g_scriptStart + k + 1);
-	
+
 		if (k != elseto)
 			return false;							/* Not an ifelse */
 	}

Modified: tools/branches/gsoc2007-toolsgui/descumm-tool.cpp
===================================================================
--- tools/branches/gsoc2007-toolsgui/descumm-tool.cpp	2007-07-15 03:13:15 UTC (rev 28082)
+++ tools/branches/gsoc2007-toolsgui/descumm-tool.cpp	2007-07-15 03:23:18 UTC (rev 28083)
@@ -85,7 +85,7 @@
 	int offset = g_options.GF_UNBLOCKED ? 17 : 19;
 	int minOffset = 255;
 	p += offset;
-	
+
 	printf("Events:\n");
 
 	while ((code = *p++) != 0) {
@@ -123,7 +123,7 @@
 	uint32 code;
 	int offset;
 	int minOffset = 255;
-	
+
 	ptr = (uint32 *)p;
 	while ((code = READ_LE_UINT32(ptr++)) != 0) {
 		offset = READ_LE_UINT32(ptr++);
@@ -247,7 +247,7 @@
 			filename = s;
 		}
 	}
-	
+
 	return filename;
 }
 
@@ -269,7 +269,7 @@
 		if (g_scriptSize < (g_options.scriptVersion == 5 ? 8 : 9)) {
 			error("File too small to be a script");
 		}
-	
+
 		switch (READ_BE_UINT32(g_scriptStart)) {
 		case 'LSC2':
 			if (g_scriptSize <= 12) {
@@ -352,7 +352,7 @@
 
 	memset(&g_options, 0, sizeof(g_options));
 	g_options.scriptVersion = 0xff;
-	
+
 	// Parse the arguments
 	filename = parseCommandLine(argc, argv);
 	if (!filename || g_options.scriptVersion == 0xff)
@@ -426,7 +426,7 @@
 	}
 
 	printf("END\n");
-	
+
 /*
 	if (g_options.scriptVersion >= 6 && num_stack != 0) {
 		printf("Stack count: %d\n", num_stack);

Modified: tools/branches/gsoc2007-toolsgui/descumm.cpp
===================================================================
--- tools/branches/gsoc2007-toolsgui/descumm.cpp	2007-07-15 03:13:15 UTC (rev 28082)
+++ tools/branches/gsoc2007-toolsgui/descumm.cpp	2007-07-15 03:23:18 UTC (rev 28083)
@@ -37,14 +37,14 @@
   code, because unlike a "head if/while", we don't know we are inside a loop until its
   end. This means a problem for indention, and when outputing the initial "do {".
   To solve this, we could implement some sort of look ahead; but that would be very
-  complicated, because essentially we have to perform full parsing of the data anyway. 
+  complicated, because essentially we have to perform full parsing of the data anyway.
   Instead of doing multiple look aheads, one could also do a 2 pass descumming:
   In pass 1, we find all jump statement, and identify all jump targets. From this data
   we can work backwards to detect all loops (and also if/else/elsif).
   Yet another approach would be to not emit any lines until we fully descummed the script.
   Instead, we keep each line in a line buffer, with indention but with an associated
   "indention" variable. When we discover a do/while loop, we can then insert a "do {"
-  line and increase the indention of all intermediate lines. However this approach 
+  line and increase the indention of all intermediate lines. However this approach
   needs a lot of memory, and won't output anything until the script is fully descummed,
   which is annoying when debugging descumm.
 
@@ -476,18 +476,18 @@
 		i = get_byte();
 	else
 		i = (uint16)get_word();
-		
+
 	assert(i >= 0);
 
-	if (g_options.scriptVersion >= 5 && 
+	if (g_options.scriptVersion >= 5 &&
 			i < ARRAYSIZE(var_names5) && var_names5[i]) {
 		buf += sprintf(buf, var_names5[i]);
 		return buf;
-	} else if (g_options.scriptVersion >= 4 && 
+	} else if (g_options.scriptVersion >= 4 &&
 			i < ARRAYSIZE(var_names4) && var_names4[i]) {
 		buf += sprintf(buf, var_names4[i]);
 		return buf;
-	} else if (g_options.scriptVersion >= 3 && 
+	} else if (g_options.scriptVersion >= 3 &&
 			i < ARRAYSIZE(var_names3) && var_names3[i]) {
 		buf += sprintf(buf, var_names3[i]);
 		return buf;
@@ -1200,7 +1200,7 @@
 {
 	char	a[256];
 	char	b[256];
-	
+
 	if (g_options.scriptVersion <= 2) {
 		get_var_or_byte(a, (opcode & 0x80));
 		get_var_or_byte(b, (opcode & 0x40));
@@ -1732,7 +1732,7 @@
 		&& ((opcode & 0x7F) == 0x0A
 		 || (opcode & 0x7F) == 0x2A
 		 || (opcode & 0x7F) == 0x6A)) {
-		 
+
 		int i = get_byte();
 		buf += sprintf(buf, "Var[Var[%d]]", i);
 	} else
@@ -1817,7 +1817,7 @@
 	byte opcode = get_byte();
 
 	switch (opcode) {
-	
+
 	case 0x58:
 		do_tok(buf, "beginOverride", 0);
 		break;
@@ -1968,7 +1968,7 @@
 	case 0xEE:
 		//dummy
 		sprintf(buf, "dummy(%.2X)", opcode);
-		
+
 		break;
 
 	case 0x09:
@@ -2007,7 +2007,7 @@
 	case 0x7B:
 	case 0xFB:
 		do_tok(buf, "getActorWalkBox", AVARSTORE | ((opcode & 0x80) ? A1V : A1B));
-		break;	
+		break;
 	case 0x43:
 	case 0xC3:
 		do_tok(buf, "getActorX", AVARSTORE | ((opcode & 0x80) ? A1V : A1B));
@@ -2062,7 +2062,7 @@
 		//ifClassOfIs
 		do_tok(buf, "classOfIs", ((opcode & 0x80) ? A1V : A1W) | ((opcode & 0x40) ? A2V : A2B) | ATO);
 		break;
-		
+
 	case 0x3F:
 	case 0xBF:
 		//ifNotState01
@@ -2089,7 +2089,7 @@
 		//ifState08
 		do_if_state_code(buf, opcode);
 		break;
-		
+
 	case 0x48:
 	case 0xC8:
 		//isEqual
@@ -2178,7 +2178,7 @@
 		do_decodeparsestring_v2(buf, opcode);
 		strcat(buf, "\")");
 		break;
-		
+
 	case 0xCC:
 		// pseudoRoom
 		do_pseudoRoom(buf);
@@ -2259,7 +2259,7 @@
 		//setOwnerOf
 		do_tok(buf, "setOwnerOf", ((opcode & 0x80) ? A1V : A1W) | ((opcode & 0x40) ? A2V : A2B));
 		break;
-		
+
 	case 0x77:
 	case 0xF7:
 		// clearState01
@@ -2335,7 +2335,7 @@
 		//startScript
 		do_tok(buf, "startScript", ((opcode & 0x80) ? A1V : A1B));
 		break;
-		
+
 	case 0x1C:
 	case 0x9C:
 		do_tok(buf, "startSound", ((opcode & 0x80) ? A1V : A1B));
@@ -2352,7 +2352,7 @@
 	case 0xE2:
 		do_tok(buf, "stopScript", ((opcode & 0x80) ? A1V : A1B));
 		break;
-		
+
 	case 0x3C:
 	case 0xBC:
 		do_tok(buf, "stopSound", ((opcode & 0x80) ? A1V : A1B));
@@ -2368,7 +2368,7 @@
 	case 0xBB:
 		do_tok(buf, "waitForActor", ((opcode & 0x80) ? A1V : A1B));
 		break;
-			
+
 	case 0x4C:
 		do_tok(buf, "waitForSentence", 0);
 		break;
@@ -2386,7 +2386,7 @@
 	case 0xFE:
 		do_tok(buf, "walkActorTo",
 					 ((opcode & 0x80) ? A1V : A1B) |
-					 ((opcode & 0x40) ? A2V : A2B) | 
+					 ((opcode & 0x40) ? A2V : A2B) |
 					 ((opcode & 0x20) ? A3V : A3B));
 		break;
 
@@ -2396,7 +2396,7 @@
 	case 0xCD:
 		do_tok(buf, "walkActorToActor",
 					 ((opcode & 0x80) ? A1V : A1B) | ((opcode & 0x40) ? A2V : A2B) | A3B);
-		break;			
+		break;
 	case 0x36:
 	case 0x76:
 	case 0xB6:
@@ -2736,7 +2736,7 @@
 		//ifNotState08;
 		do_if_state_code(buf, opcode);
 		break;
-		
+
 	case 0x48:
 	case 0xC8:
 		//isEqual
@@ -2811,7 +2811,7 @@
 		//panCameraTo
 		do_tok(buf, "panCameraTo", ((opcode & 0x80) ? A1V : A1B));
 		break;
-		
+
 	case 0x01:
 	case 0x21:
 	case 0x41:
@@ -2871,7 +2871,7 @@
 		//setOwnerOf
 		do_tok(buf, "setOwnerOf", ((opcode & 0x80) ? A1V : A1B) | ((opcode & 0x40) ? A2V : A2B));
 		break;
-		
+
 	case 0x02:
 		do_tok(buf, "startMusic", ((opcode & 0x80) ? A1V : A1B));
 		break;
@@ -2880,7 +2880,7 @@
 		//startScript
 		do_tok(buf, "startScript", ((opcode & 0x80) ? A1V : A1B));
 		break;
-		
+
 	case 0x1C:
 	case 0x5C:
 	case 0x9C:
@@ -2899,7 +2899,7 @@
 	case 0xE2:
 		do_tok(buf, "stopScript", ((opcode & 0x80) ? A1V : A1B));
 		break;
-		
+
 	case 0x3C:
 	case 0xBC:
 		do_tok(buf, "stopSound", ((opcode & 0x80) ? A1V : A1B));
@@ -2920,7 +2920,7 @@
 	case 0xFE:
 		do_tok(buf, "walkActorTo",
 					 ((opcode & 0x80) ? A1V : A1B) |
-					 ((opcode & 0x40) ? A2V : A2B) | 
+					 ((opcode & 0x40) ? A2V : A2B) |
 					 ((opcode & 0x20) ? A3V : A3B));
 		break;
 

Modified: tools/branches/gsoc2007-toolsgui/descumm.h
===================================================================
--- tools/branches/gsoc2007-toolsgui/descumm.h	2007-07-15 03:13:15 UTC (rev 28082)
+++ tools/branches/gsoc2007-toolsgui/descumm.h	2007-07-15 03:23:18 UTC (rev 28083)
@@ -118,12 +118,12 @@
 	bool dontShowOpcode;
 	bool dontShowOffsets;
 	bool haltOnError;
-	
+
 	bool HumongousFlag;
 	bool ZakFlag;
 	bool IndyFlag;
 	bool GF_UNBLOCKED;
-		
+
 	//
 	// The SCUMM version used for the script we are descumming.
 	//

Modified: tools/branches/gsoc2007-toolsgui/descumm6.cpp
===================================================================
--- tools/branches/gsoc2007-toolsgui/descumm6.cpp	2007-07-15 03:13:15 UTC (rev 28082)
+++ tools/branches/gsoc2007-toolsgui/descumm6.cpp	2007-07-15 03:23:18 UTC (rev 28083)
@@ -55,7 +55,7 @@
 And of course a push before the first of these. Note that there doesn't have
 to be a jump before each case: after all, "fall through" is possible with C(++)
 switch/case statements, too, so it's possible they used that in Scumm, too.
-  
+
 */
 
 class StackEnt;
@@ -128,7 +128,7 @@
 	virtual ~StackEnt() {}
 	virtual char *asText(char *where, bool wantparens = true) const = 0;
 	virtual StackEnt* dup(char *output);
-	
+
 	virtual int getIntVal() const { error("getIntVal call on StackEnt type %d", type); }
 };
 
@@ -1188,7 +1188,7 @@
 	StackEnt *value;
 
 	value = pop();
-	
+
 	*e++ = '"';
 	if (value->getIntVal() == -1) {
 		if (_stringLength == 1) {
@@ -1268,10 +1268,10 @@
 			while (*fmt++)
 				;
 			e += sprintf(e, "%s.", extstr);
-			
+
 			se = new ListStackEnt(pop());
 			args[numArgs++] = se;
-			
+
 			/* extended thing */
 			se->_size--;
 			extcmd = (byte) se->_list[se->_size]->getIntVal();
@@ -1811,23 +1811,23 @@
 		ext(output, "x" "resourceRoutines\0"
 				"\x64p|loadScript,"
 				"\x65p|loadSound,"
-				"\x66p|loadCostume," 
+				"\x66p|loadCostume,"
 				"\x67p|loadRoom,"
-				"\x68p|nukeScript," 
-				"\x69p|nukeSound," 
+				"\x68p|nukeScript,"
+				"\x69p|nukeSound,"
 				"\x6Ap|nukeCostume,"
-				"\x6Bp|nukeRoom," 
-				"\x6Cp|lockScript," 
-				"\x6Dp|lockSound," 
+				"\x6Bp|nukeRoom,"
+				"\x6Cp|lockScript,"
+				"\x6Dp|lockSound,"
 				"\x6Ep|lockCostume,"
-				"\x6Fp|lockRoom," 
-				"\x70p|unlockScript," 
-				"\x71p|unlockSound," 
+				"\x6Fp|lockRoom,"
+				"\x70p|unlockScript,"
+				"\x71p|unlockSound,"
 				"\x72p|unlockCostume,"
-				"\x73p|unlockRoom," 
-				"\x74|clearHeap," 
-				"\x75p|loadCharset," 
-				"\x76p|nukeCharset," 
+				"\x73p|unlockRoom,"
+				"\x74|clearHeap,"
+				"\x75p|loadCharset,"
+				"\x76p|nukeCharset,"
 				"\x77z|loadFlObject,"
 				"\x78p|queueloadScript,"
 				"\x79p|queueloadSound,"
@@ -2174,14 +2174,14 @@
 		ext(output, "rph|openFile");
 		break;
 	case 0xDB:
-		ext(output, "rx" "readFile\0" 
+		ext(output, "rx" "readFile\0"
 				"\x4p|readByte,"
 				"\x5p|readWord,"
 				"\x6p|readDWord,"
 				"\x8ipp|readArrayFromFile");
 		break;
 	case 0xDC:
-		ext(output, "x" "writeFile\0" 
+		ext(output, "x" "writeFile\0"
 				"\x4pp|writeByte,"
 				"\x5pp|writeWord,"
 				"\x6pp|writeDWord,"
@@ -2197,13 +2197,13 @@
 		ext(output, "hh|renameFile");
 		break;
 	case 0xE0:
-		ext(output, "x" "drawLine\0" 
+		ext(output, "x" "drawLine\0"
 				"\x37pppppp|pixel,"
 				"\x3Fpppppp|actor,"
 				"\x42pppppp|wizImage");
 		break;
 	case 0xE1:
-		ext(output, "rx" "getPixel\0" 
+		ext(output, "rx" "getPixel\0"
 				"\xDApp|background,"
 				"\xDBpp|foreground");
 		break;
@@ -2374,7 +2374,7 @@
 		se_b = pop();
 		push(se_oper(se_b, (code - 0x8) + isEqual, se_a));
 		break;
-		
+
 	case 0x64:
 		jumpif(output, pop(), true);
 		break;
@@ -2787,7 +2787,7 @@
 				"\x20|writeRegistryValue,"
 				"\x21|paletteSetIntensity,"
 				"\x22|queryQuit,"
-				
+
 				"\x6C|buildPaletteShadow,"
 				"\x6D|setPaletteShadow,"
 
@@ -3294,22 +3294,22 @@
 			ext(output, "x" "resourceRoutines\0"
 					"\x64p|loadScript,"
 					"\x65p|loadSound,"
-					"\x66p|loadCostume," 
+					"\x66p|loadCostume,"
 					"\x67p|loadRoom,"
-					"\x68p|nukeScript," 
-					"\x69p|nukeSound," 
+					"\x68p|nukeScript,"
+					"\x69p|nukeSound,"
 					"\x6Ap|nukeCostume,"
-					"\x6Bp|nukeRoom," 
-					"\x6Cp|lockScript," 
-					"\x6Dp|lockSound," 
+					"\x6Bp|nukeRoom,"
+					"\x6Cp|lockScript,"
+					"\x6Dp|lockSound,"
 					"\x6Ep|lockCostume,"
-					"\x6Fp|lockRoom," 
-					"\x70p|unlockScript," 
-					"\x71p|unlockSound," 
+					"\x6Fp|lockRoom,"
+					"\x70p|unlockScript,"
+					"\x71p|unlockSound,"
 					"\x72p|unlockCostume,"
-					"\x73p|unlockRoom," 
-					"\x75p|loadCharset," 
-					"\x76p|nukeCharset," 
+					"\x73p|unlockRoom,"
+					"\x75p|loadCharset,"
+					"\x76p|nukeCharset,"
 					"\x77z|loadFlObject,"
 					"\x78p|queueloadScript,"
 					"\x79p|queueloadSound,"
@@ -3326,22 +3326,22 @@
 			ext(output, "x" "resourceRoutines\0"
 					"\x64p|loadScript,"
 					"\x65p|loadSound,"
-					"\x66p|loadCostume," 
+					"\x66p|loadCostume,"
 					"\x67p|loadRoom,"
-					"\x68p|nukeScript," 
-					"\x69p|nukeSound," 
+					"\x68p|nukeScript,"
+					"\x69p|nukeSound,"
 					"\x6Ap|nukeCostume,"
-					"\x6Bp|nukeRoom," 
-					"\x6Cp|lockScript," 
-					"\x6Dp|lockSound," 
+					"\x6Bp|nukeRoom,"
+					"\x6Cp|lockScript,"
+					"\x6Dp|lockSound,"
 					"\x6Ep|lockCostume,"
-					"\x6Fp|lockRoom," 
-					"\x70p|unlockScript," 
-					"\x71p|unlockSound," 
+					"\x6Fp|lockRoom,"
+					"\x70p|unlockScript,"
+					"\x71p|unlockSound,"
 					"\x72p|unlockCostume,"
-					"\x73p|unlockRoom," 
-					"\x75p|loadCharset," 
-					"\x76p|nukeCharset," 
+					"\x73p|unlockRoom,"
+					"\x75p|loadCharset,"
+					"\x76p|nukeCharset,"
 					"\x77z|loadFlObject");
 		break;
 	case 0x9C:
@@ -3698,7 +3698,7 @@
 				ext(output, "ry" "kernelGetFunctions\0"
 					"\x1|virtScreenSave"
 					);
-		else if (g_options.scriptVersion == 7) 
+		else if (g_options.scriptVersion == 7)
 				ext(output, "ry" "kernelGetFunctions\0"
 					"\x73|getWalkBoxAt,"
 					"\x74|isPointInBox,"
@@ -3713,7 +3713,7 @@
 					"\xD6|getVerbYPos,"
 					"\xD7|getBoxFlags"
 					);
-		else 
+		else
 				ext(output, "ry" "kernelGetFunctions\0"
 					"\x71|getPixel"
 					);
@@ -3723,7 +3723,7 @@
 				ext(output, "ry" "kernelSetFunctions\0"
 					"\x1|virtScreenLoad"
 					);
-		else if (g_options.scriptVersion == 7) 
+		else if (g_options.scriptVersion == 7)
 			ext(output, "y" "kernelSetFunctions\0"
 					"\x4|grabCursor,"
 					"\x6|startVideo,"
@@ -3748,7 +3748,7 @@
 					"\x7C|setSaveSound,"
 					"\xD7|setSubtitles,"
 					);
-		else 
+		else
 			ext(output, "y" "kernelSetFunctions\0"
 					"\x3|dummy,"
 					"\x4|grabCursor,"
@@ -3855,7 +3855,7 @@
 		break;
 	case 0xE0:
 		if (g_options.HumongousFlag)
-			ext(output, "x" "soundOps\0" 
+			ext(output, "x" "soundOps\0"
 				"\xDEp|setMusicVolume,"
 				"\xDF|dummy,"
 				"\xE0p|setSoundFrequency");


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