[Scummvm-cvs-logs] SF.net SVN: scummvm:[47825] scummvm/trunk/engines/sci/console.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Tue Feb 2 23:53:33 CET 2010


Revision: 47825
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47825&view=rev
Author:   fingolfin
Date:     2010-02-02 22:53:33 +0000 (Tue, 02 Feb 2010)

Log Message:
-----------
SCI: cleanup

Modified Paths:
--------------
    scummvm/trunk/engines/sci/console.cpp

Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp	2010-02-02 22:52:41 UTC (rev 47824)
+++ scummvm/trunk/engines/sci/console.cpp	2010-02-02 22:53:33 UTC (rev 47825)
@@ -433,7 +433,7 @@
 
 bool Console::cmdOpcodes(int argc, const char **argv) {
 	// Load the opcode table from vocab.998 if it exists, to obtain the opcode names
-	Resource* r = _vm->getResourceManager()->findResource(ResourceId(kResourceTypeVocab, 998), 0);
+	Resource *r = _vm->getResourceManager()->findResource(ResourceId(kResourceTypeVocab, 998), 0);
 
 	// If the resource couldn't be loaded, leave
 	if (!r) {
@@ -450,7 +450,7 @@
 		int len = READ_LE_UINT16(r->data + offset) - 2;
 		int type = READ_LE_UINT16(r->data + offset + 2);
 		// QFG3 has empty opcodes
-		Common::String name = len > 0 ? Common::String((char *)r->data + offset + 4, len) : "Dummy";
+		Common::String name = len > 0 ? Common::String((const char *)r->data + offset + 4, len) : "Dummy";
 		DebugPrintf("%03x: %03x %20s | ", i, type, name.c_str());
 		if ((i % 3) == 2)
 			DebugPrintf("\n");
@@ -769,7 +769,8 @@
 	}
 
 	for (; resNumber <= resMax; resNumber++) {
-		if ((script = _vm->getResourceManager()->findResource(ResourceId(restype, resNumber), 0))) {
+		script = _vm->getResourceManager()->findResource(ResourceId(restype, resNumber), 0);
+		if (script) {
 			unsigned int seeker = 0, seekerold = 0;
 			uint32 comppos = 0;
 			int output_script_name = 0;
@@ -1571,7 +1572,8 @@
 		return true;
 	}
 
-	if ((data = songit->getAudioStream())) {
+	data = songit->getAudioStream();
+	if (data) {
 		// TODO
 /*
 		DebugPrintf("\nIs sample (encoding %dHz/%s/%04x)", data->conf.rate, (data->conf.stereo) ?


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