aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Bacca2003-12-20 01:17:02 +0000
committerNicolas Bacca2003-12-20 01:17:02 +0000
commit9e1dda1f682c5e3b3f3c34fccce5caf7095ecbbe (patch)
tree7931ccd3f9fbbf5252fd72e13051d05efa072780
parentc2c250edc1b98b63cd73254a446d84cb12b23527 (diff)
downloadscummvm-rg350-9e1dda1f682c5e3b3f3c34fccce5caf7095ecbbe.tar.gz
scummvm-rg350-9e1dda1f682c5e3b3f3c34fccce5caf7095ecbbe.tar.bz2
scummvm-rg350-9e1dda1f682c5e3b3f3c34fccce5caf7095ecbbe.zip
Make VC6/EVC happier
svn-id: r11764
-rw-r--r--sword2/controls.cpp3
-rw-r--r--sword2/interpreter.cpp3
-rw-r--r--sword2/router.cpp5
3 files changed, 7 insertions, 4 deletions
diff --git a/sword2/controls.cpp b/sword2/controls.cpp
index f05083260e..a2c3c8e684 100644
--- a/sword2/controls.cpp
+++ b/sword2/controls.cpp
@@ -1255,6 +1255,7 @@ public:
int textWidth;
char tmp;
int i;
+ int j;
switch (result) {
case kWheelUp:
@@ -1274,7 +1275,7 @@ public:
if (widget == _slotButton[i])
break;
- for (int j = 0; j < 8; j++) {
+ for (j = 0; j < 8; j++) {
if (j != i) {
_slotButton[j]->setEditable(false);
_slotButton[j]->setState(0);
diff --git a/sword2/interpreter.cpp b/sword2/interpreter.cpp
index 396f09128d..cf292bd0f5 100644
--- a/sword2/interpreter.cpp
+++ b/sword2/interpreter.cpp
@@ -301,6 +301,7 @@ int Logic::runScript(char *scriptData, char *objectData, uint32 *offset) {
int caseCount;
bool foundCase;
int32 ptrval;
+ int i;
curCommand = code[ip++];
@@ -464,7 +465,7 @@ int Logic::runScript(char *scriptData, char *objectData, uint32 *offset) {
// Search the cases
foundCase = false;
- for (int i = 0; i < caseCount && !foundCase; i++) {
+ for (i = 0; i < caseCount && !foundCase; i++) {
if (value == (int32) READ_LE_UINT32(code + ip)) {
// We have found the case, so lets
// jump to it
diff --git a/sword2/router.cpp b/sword2/router.cpp
index f6ca345c35..bc852ff117 100644
--- a/sword2/router.cpp
+++ b/sword2/router.cpp
@@ -2469,16 +2469,17 @@ void Router::clearWalkGridList(void) {
// called from fnAddWalkGrid
void Router::addWalkGrid(int32 gridResource) {
+ int i;
// First, scan the list to see if this grid is already included
- for (int i = 0; i < MAX_WALKGRIDS; i++) {
+ for (i = 0; i < MAX_WALKGRIDS; i++) {
if (_walkGridList[i] == gridResource)
return;
}
// Scan the list for a free slot
- for (int i = 0; i < MAX_WALKGRIDS; i++) {
+ for (i = 0; i < MAX_WALKGRIDS; i++) {
if (_walkGridList[i] == 0) {
_walkGridList[i] = gridResource;
return;