aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2010-06-10 11:43:20 +0000
committerFilippos Karapetis2010-06-10 11:43:20 +0000
commit711f679b7ffa9b51c2d6a07dab0a1dd7799f155d (patch)
tree80786b89f7db13d2cd1c385e29671859977de9ee /engines/sci
parent944b511633e793f149e787b3f9cd1502b14d9993 (diff)
downloadscummvm-rg350-711f679b7ffa9b51c2d6a07dab0a1dd7799f155d.tar.gz
scummvm-rg350-711f679b7ffa9b51c2d6a07dab0a1dd7799f155d.tar.bz2
scummvm-rg350-711f679b7ffa9b51c2d6a07dab0a1dd7799f155d.zip
camelCase changes
svn-id: r49570
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/console.cpp10
-rw-r--r--engines/sci/engine/kmisc.cpp2
-rw-r--r--engines/sci/engine/savegame.cpp4
-rw-r--r--engines/sci/engine/state.cpp8
-rw-r--r--engines/sci/engine/state.h10
-rw-r--r--engines/sci/engine/vm.cpp40
-rw-r--r--engines/sci/sci.cpp4
7 files changed, 39 insertions, 39 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 098d83a2d3..3f123fa41b 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -1771,9 +1771,9 @@ bool Console::cmdVMVarlist(int argc, const char **argv) {
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 @@ bool Console::cmdVMVars(int argc, const char **argv) {
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;
}
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index 25fb11d62f..f3d4c8a732 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -188,7 +188,7 @@ reg_t kGetTime(EngineState *s, int argc, reg_t *argv) {
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;
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 3cd444d4d7..9c2ff76088 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -872,11 +872,11 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
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;
diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp
index 8e4a5200c8..68e7eea4a0 100644
--- a/engines/sci/engine/state.cpp
+++ b/engines/sci/engine/state.cpp
@@ -105,7 +105,7 @@ void EngineState::reset(bool isRestoring) {
lastWaitTime = 0;
- gc_countdown = 0;
+ gcCountDown = 0;
_throttleCounter = 0;
_throttleLastTime = 0;
@@ -130,9 +130,9 @@ void EngineState::initGlobals() {
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 {
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index fd2380667b..1b1a1fa86c 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -111,7 +111,7 @@ public:
#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 @@ public:
// 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 @@ public:
*/
void shrinkStackToBase();
- int gc_countdown; /**< Number of kernel calls until next gc */
+ int gcCountDown; /**< Number of kernel calls until next gc */
public:
MessageState *_msgState;
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index a203352dcd..1db9649a54 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -230,8 +230,8 @@ static void validate_write_var(reg_t *r, reg_t *stack_base, int type, int max, i
#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 callKernelFunc(EngineState *s, int kernelFuncNum, int argc) {
}
}
-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 @@ void run_vm(EngineState *s, bool restoring) {
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 @@ void run_vm(EngineState *s, bool restoring) {
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 @@ void run_vm(EngineState *s, bool restoring) {
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 @@ void run_vm(EngineState *s, bool restoring) {
}
case op_callk: { // 0x21 (33)
- gc_countdown(s);
+ gcCountDown(s);
s->xs->sp -= (opparams[1] >> 1) + 1;
@@ -1295,8 +1295,8 @@ void run_vm(EngineState *s, bool restoring) {
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);
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 2b3194830d..9e928b82d9 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -286,7 +286,7 @@ bool SciEngine::initGame() {
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 @@ bool SciEngine::initGame() {
_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