[Scummvm-cvs-logs] SF.net SVN: scummvm:[44431] scummvm/trunk/engines/draci

spalek at users.sourceforge.net spalek at users.sourceforge.net
Mon Sep 28 04:54:38 CEST 2009


Revision: 44431
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44431&view=rev
Author:   spalek
Date:     2009-09-28 02:54:38 +0000 (Mon, 28 Sep 2009)

Log Message:
-----------
get rid of static Common::String's

Modified Paths:
--------------
    scummvm/trunk/engines/draci/script.cpp
    scummvm/trunk/engines/draci/script.h

Modified: scummvm/trunk/engines/draci/script.cpp
===================================================================
--- scummvm/trunk/engines/draci/script.cpp	2009-09-27 23:57:39 UTC (rev 44430)
+++ scummvm/trunk/engines/draci/script.cpp	2009-09-28 02:54:38 UTC (rev 44431)
@@ -847,7 +847,7 @@
 			stk.push(res);
 
 			debugC(4, kDraciBytecodeDebugLevel, "\t\t%d %s %d (res: %d)",
-				arg1, oper._name.c_str(), arg2, res);
+				arg1, oper._name, arg2, res);
 			break;
 
 		case kMathVariable:
@@ -873,7 +873,7 @@
 				stk.push(0);
 
 				debugC(4, kDraciBytecodeDebugLevel, "\t\tcall: %s (not implemented)",
-					func._name.c_str());
+					func._name);
 			} else {
 				arg1 = stk.pop();
 
@@ -884,7 +884,7 @@
 				stk.push(res);
 			
 				debugC(4, kDraciBytecodeDebugLevel, "\t\tcall: %s(%d) (res: %d)",
-					func._name.c_str(), arg1, res);
+					func._name, arg1, res);
 			}
 
 			break;
@@ -1047,7 +1047,7 @@
 			int tmp;
 
 			// Print command name
-			debugC(1, kDraciBytecodeDebugLevel, "%s", cmd->_name.c_str());
+			debugC(1, kDraciBytecodeDebugLevel, "%s", cmd->_name);
 
 			for (int i = 0; i < cmd->_numParams; ++i) {
 				if (cmd->_paramTypes[i] == 4) {
@@ -1075,7 +1075,7 @@
 			(this->*(cmd->_handler))(params);
 		}
 
-	} while (cmd->_name != "gplend" && cmd->_name != "exit" && !_endProgram);
+	} while (cmd->_number != 0 && !_endProgram);	// 0 = gplend and exit
 
 	_endProgram = false;
 	_jump = oldJump;

Modified: scummvm/trunk/engines/draci/script.h
===================================================================
--- scummvm/trunk/engines/draci/script.h	2009-09-27 23:57:39 UTC (rev 44430)
+++ scummvm/trunk/engines/draci/script.h	2009-09-28 02:54:38 UTC (rev 44431)
@@ -56,19 +56,19 @@
 struct GPL2Command { 
 	byte _number; 
 	byte _subNumber; 
-	Common::String _name; 
+	const char *_name; 
 	uint16 _numParams;
 	int _paramTypes[kMaxParams];
 	GPLHandler _handler;
 };
 
 struct GPL2Operator {
-	Common::String _name;
+	const char *_name;
 	GPLOperatorHandler _handler;
 };
 
 struct GPL2Function {
-	Common::String _name;
+	const char *_name;
 	GPLFunctionHandler _handler;
 };
 


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