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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Jun 10 13:43:20 CEST 2010


Revision: 49570
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49570&view=rev
Author:   thebluegr
Date:     2010-06-10 11:43:20 +0000 (Thu, 10 Jun 2010)

Log Message:
-----------
camelCase changes

Modified Paths:
--------------
    scummvm/trunk/engines/sci/console.cpp
    scummvm/trunk/engines/sci/engine/kmisc.cpp
    scummvm/trunk/engines/sci/engine/savegame.cpp
    scummvm/trunk/engines/sci/engine/state.cpp
    scummvm/trunk/engines/sci/engine/state.h
    scummvm/trunk/engines/sci/engine/vm.cpp
    scummvm/trunk/engines/sci/sci.cpp

Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp	2010-06-10 11:35:15 UTC (rev 49569)
+++ scummvm/trunk/engines/sci/console.cpp	2010-06-10 11:43:20 UTC (rev 49570)
@@ -1771,9 +1771,9 @@
 	DebugPrintf("Addresses of variables in the VM:\n");
 
 	for (int i = 0; i < 4; i++) {
-		DebugPrintf("%s vars at %04x:%04x ", varnames[i], PRINT_REG(make_reg(s->variables_seg[i], s->variables[i] - s->variables_base[i])));
-		if (s->variables_max)
-			DebugPrintf("  total %d", s->variables_max[i]);
+		DebugPrintf("%s vars at %04x:%04x ", varnames[i], PRINT_REG(make_reg(s->variablesSegment[i], s->variables[i] - s->variablesBase[i])));
+		if (s->variablesMax)
+			DebugPrintf("  total %d", s->variablesMax[i]);
 		DebugPrintf("\n");
 	}
 
@@ -1830,8 +1830,8 @@
 		return true;
 	}
 
-	if ((s->variables_max) && (s->variables_max[vartype] <= idx)) {
-		DebugPrintf("Max. index is %d (0x%x)\n", s->variables_max[vartype], s->variables_max[vartype]);
+	if ((s->variablesMax) && (s->variablesMax[vartype] <= idx)) {
+		DebugPrintf("Max. index is %d (0x%x)\n", s->variablesMax[vartype], s->variablesMax[vartype]);
 		return true;
 	}
 

Modified: scummvm/trunk/engines/sci/engine/kmisc.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmisc.cpp	2010-06-10 11:35:15 UTC (rev 49569)
+++ scummvm/trunk/engines/sci/engine/kmisc.cpp	2010-06-10 11:43:20 UTC (rev 49570)
@@ -188,7 +188,7 @@
 	int retval = 0; // Avoid spurious warning
 
 	g_system->getTimeAndDate(loc_time);
-	elapsedTime = g_system->getMillis() - s->game_start_time;
+	elapsedTime = g_system->getMillis() - s->gameStartTime;
 
 	int mode = (argc > 0) ? argv[0].toUint16() : 0;
 

Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp	2010-06-10 11:35:15 UTC (rev 49569)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp	2010-06-10 11:43:20 UTC (rev 49570)
@@ -872,11 +872,11 @@
 	s->_segMan->reconstructScripts(s);
 	s->_segMan->reconstructClones();
 	s->initGlobals();
-	s->gc_countdown = GC_INTERVAL - 1;
+	s->gcCountDown = GC_INTERVAL - 1;
 
 	// Time state:
 	s->lastWaitTime = g_system->getMillis();
-	s->game_start_time = g_system->getMillis();
+	s->gameStartTime = g_system->getMillis();
 
 #ifdef USE_OLD_MUSIC_FUNCTIONS
 	s->_sound._it = NULL;

Modified: scummvm/trunk/engines/sci/engine/state.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/state.cpp	2010-06-10 11:35:15 UTC (rev 49569)
+++ scummvm/trunk/engines/sci/engine/state.cpp	2010-06-10 11:43:20 UTC (rev 49570)
@@ -105,7 +105,7 @@
 
 	lastWaitTime = 0;
 
-	gc_countdown = 0;
+	gcCountDown = 0;
 
 	_throttleCounter = 0;
 	_throttleLastTime = 0;
@@ -130,9 +130,9 @@
 	if (!script_000->_localsBlock)
 		error("Script 0 has no locals block");
 
-	variables_seg[VAR_GLOBAL] = script_000->_localsSegment;
-	variables_base[VAR_GLOBAL] = variables[VAR_GLOBAL] = script_000->_localsBlock->_locals.begin();
-	variables_max[VAR_GLOBAL] = script_000->_localsBlock->_locals.size();
+	variablesSegment[VAR_GLOBAL] = script_000->_localsSegment;
+	variablesBase[VAR_GLOBAL] = variables[VAR_GLOBAL] = script_000->_localsBlock->_locals.begin();
+	variablesMax[VAR_GLOBAL] = script_000->_localsBlock->_locals.size();
 }
 
 uint16 EngineState::currentRoomNumber() const {

Modified: scummvm/trunk/engines/sci/engine/state.h
===================================================================
--- scummvm/trunk/engines/sci/engine/state.h	2010-06-10 11:35:15 UTC (rev 49569)
+++ scummvm/trunk/engines/sci/engine/state.h	2010-06-10 11:43:20 UTC (rev 49570)
@@ -111,7 +111,7 @@
 #endif
 	SoundCommandParser *_soundCmd;
 
-	uint32 game_start_time; /**< The time at which the interpreter was started */
+	uint32 gameStartTime; /**< The time at which the interpreter was started */
 	uint32 lastWaitTime; /**< The last time the game invoked Wait() */
 
 	void wait(int16 ticks);
@@ -147,9 +147,9 @@
 	// Script state
 	ExecStack *xs;
 	reg_t *variables[4];		///< global, local, temp, param, as immediate pointers
-	reg_t *variables_base[4];	///< Used for referencing VM ops
-	SegmentId variables_seg[4];	///< Same as above, contains segment IDs
-	int variables_max[4];		///< Max. values for all variables
+	reg_t *variablesBase[4];	///< Used for referencing VM ops
+	SegmentId variablesSegment[4];	///< Same as above, contains segment IDs
+	int variablesMax[4];		///< Max. values for all variables
 
 	int loadFromLauncher;
 
@@ -173,7 +173,7 @@
 	 */
 	void shrinkStackToBase();
 
-	int gc_countdown; /**< Number of kernel calls until next gc */
+	int gcCountDown; /**< Number of kernel calls until next gc */
 
 public:
 	MessageState *_msgState;

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2010-06-10 11:35:15 UTC (rev 49569)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2010-06-10 11:43:20 UTC (rev 49570)
@@ -230,8 +230,8 @@
 
 #endif
 
-#define READ_VAR(type, index, def) validate_read_var(s->variables[type], s->stack_base, type, s->variables_max[type], index, __LINE__, def)
-#define WRITE_VAR(type, index, value) validate_write_var(s->variables[type], s->stack_base, type, s->variables_max[type], index, __LINE__, value, s->_segMan, g_sci->getKernel())
+#define READ_VAR(type, index, def) validate_read_var(s->variables[type], s->stack_base, type, s->variablesMax[type], index, __LINE__, def)
+#define WRITE_VAR(type, index, value) validate_write_var(s->variables[type], s->stack_base, type, s->variablesMax[type], index, __LINE__, value, s->_segMan, g_sci->getKernel())
 #define WRITE_VAR16(type, index, value) WRITE_VAR(type, index, make_reg(0, value));
 
 #define ACC_ARITHMETIC_L(op) make_reg(0, (op validate_arithmetic(s->r_acc)))
@@ -629,9 +629,9 @@
 	}
 }
 
-static void gc_countdown(EngineState *s) {
-	if (s->gc_countdown-- <= 0) {
-		s->gc_countdown = s->scriptGCInterval;
+static void gcCountDown(EngineState *s) {
+	if (s->gcCountDown-- <= 0) {
+		s->gcCountDown = s->scriptGCInterval;
 		run_gc(s);
 	}
 }
@@ -737,8 +737,8 @@
 	if (!restoring)
 		s->executionStackBase = s->_executionStack.size() - 1;
 
-	s->variables_seg[VAR_TEMP] = s->variables_seg[VAR_PARAM] = s->_segMan->findSegmentByType(SEG_TYPE_STACK);
-	s->variables_base[VAR_TEMP] = s->variables_base[VAR_PARAM] = s->stack_base;
+	s->variablesSegment[VAR_TEMP] = s->variablesSegment[VAR_PARAM] = s->_segMan->findSegmentByType(SEG_TYPE_STACK);
+	s->variablesBase[VAR_TEMP] = s->variablesBase[VAR_PARAM] = s->stack_base;
 
 	s->_executionStackPosChanged = true; // Force initialization
 
@@ -776,24 +776,24 @@
 				if (!local_script) {
 					warning("Could not find local script from segment %x", s->xs->local_segment);
 					local_script = NULL;
-					s->variables_base[VAR_LOCAL] = s->variables[VAR_LOCAL] = NULL;
+					s->variablesBase[VAR_LOCAL] = s->variables[VAR_LOCAL] = NULL;
 #ifndef DISABLE_VALIDATIONS
-					s->variables_max[VAR_LOCAL] = 0;
+					s->variablesMax[VAR_LOCAL] = 0;
 #endif
 				} else {
 
-					s->variables_seg[VAR_LOCAL] = local_script->_localsSegment;
+					s->variablesSegment[VAR_LOCAL] = local_script->_localsSegment;
 					if (local_script->_localsBlock)
-						s->variables_base[VAR_LOCAL] = s->variables[VAR_LOCAL] = local_script->_localsBlock->_locals.begin();
+						s->variablesBase[VAR_LOCAL] = s->variables[VAR_LOCAL] = local_script->_localsBlock->_locals.begin();
 					else
-						s->variables_base[VAR_LOCAL] = s->variables[VAR_LOCAL] = NULL;
+						s->variablesBase[VAR_LOCAL] = s->variables[VAR_LOCAL] = NULL;
 #ifndef DISABLE_VALIDATIONS
 					if (local_script->_localsBlock)
-						s->variables_max[VAR_LOCAL] = local_script->_localsBlock->_locals.size();
+						s->variablesMax[VAR_LOCAL] = local_script->_localsBlock->_locals.size();
 					else
-						s->variables_max[VAR_LOCAL] = 0;
-					s->variables_max[VAR_TEMP] = s->xs->sp - s->xs->fp;
-					s->variables_max[VAR_PARAM] = s->xs->argc + 1;
+						s->variablesMax[VAR_LOCAL] = 0;
+					s->variablesMax[VAR_TEMP] = s->xs->sp - s->xs->fp;
+					s->variablesMax[VAR_PARAM] = s->xs->argc + 1;
 #endif
 				}
 				s->variables[VAR_TEMP] = s->xs->fp;
@@ -821,7 +821,7 @@
 			error("run_vm(): stack underflow, sp: %04x:%04x, fp: %04x:%04x", 
 			PRINT_REG(*s->xs->sp), PRINT_REG(*s->xs->fp));
 
-		s->variables_max[VAR_TEMP] = s->xs->sp - s->xs->fp;
+		s->variablesMax[VAR_TEMP] = s->xs->sp - s->xs->fp;
 
 		if (s->xs->addr.pc.offset >= code_buf_size)
 			error("run_vm(): program counter gone astray, addr: %d, code buffer size: %d", 
@@ -1120,7 +1120,7 @@
 		}
 
 		case op_callk: { // 0x21 (33)
-			gc_countdown(s);
+			gcCountDown(s);
 
 			s->xs->sp -= (opparams[1] >> 1) + 1;
 
@@ -1295,8 +1295,8 @@
 			var_number = temp & 0x03; // Get variable type
 
 			// Get variable block offset
-			r_temp.segment = s->variables_seg[var_number];
-			r_temp.offset = s->variables[var_number] - s->variables_base[var_number];
+			r_temp.segment = s->variablesSegment[var_number];
+			r_temp.offset = s->variables[var_number] - s->variablesBase[var_number];
 
 			if (temp & 0x08)  // Add accumulator offset if requested
 				r_temp.offset += signed_validate_arithmetic(s->r_acc);

Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp	2010-06-10 11:35:15 UTC (rev 49569)
+++ scummvm/trunk/engines/sci/sci.cpp	2010-06-10 11:43:20 UTC (rev 49570)
@@ -286,7 +286,7 @@
 	DataStack *stack = _gamestate->_segMan->allocateStack(VM_STACK_SIZE, NULL);
 
 	_gamestate->_msgState = new MessageState(_gamestate->_segMan);
-	_gamestate->gc_countdown = GC_INTERVAL - 1;
+	_gamestate->gcCountDown = GC_INTERVAL - 1;
 
 	// Script 0 should always be at segment 1
 	if (script0Segment != 1) {
@@ -325,7 +325,7 @@
 		_vocabulary->parser_base = make_reg(_gamestate->_segMan->getSysStringsSegment(), SYS_STRING_PARSER_BASE);
 	}
 
-	_gamestate->game_start_time = _gamestate->lastWaitTime = g_system->getMillis();
+	_gamestate->gameStartTime = _gamestate->lastWaitTime = g_system->getMillis();
 
 	srand(g_system->getMillis()); // Initialize random number generator
 


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