aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise/mainDraw.cpp
diff options
context:
space:
mode:
authorStrangerke2014-06-01 01:21:32 +0200
committerStrangerke2014-06-01 01:21:32 +0200
commit1dbcd7498804f4b59280e3599e2d1c7f864a5228 (patch)
tree0ace66f0cc1b65026e4ae0c9b9779168293ecaf4 /engines/cruise/mainDraw.cpp
parent7d24e1471c445fbf49b3efbb8d046eb26db849cd (diff)
downloadscummvm-rg350-1dbcd7498804f4b59280e3599e2d1c7f864a5228.tar.gz
scummvm-rg350-1dbcd7498804f4b59280e3599e2d1c7f864a5228.tar.bz2
scummvm-rg350-1dbcd7498804f4b59280e3599e2d1c7f864a5228.zip
CRUISE: Reduce the scope of variables used in the for loops
Diffstat (limited to 'engines/cruise/mainDraw.cpp')
-rw-r--r--engines/cruise/mainDraw.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/engines/cruise/mainDraw.cpp b/engines/cruise/mainDraw.cpp
index 0863a2a84e..0e39740822 100644
--- a/engines/cruise/mainDraw.cpp
+++ b/engines/cruise/mainDraw.cpp
@@ -1255,18 +1255,15 @@ void drawSprite(int width, int height, cellStruct *currentObjPtr, const uint8 *d
#ifdef _DEBUG
void drawCtp() {
- /* int i;
-
- if (ctp_walkboxTable) {
- for (i = 0; i < 15; i++) {
+ /* if (ctp_walkboxTable) {
+ for (int i = 0; i < 15; i++) {
uint16 *dataPtr = &ctp_walkboxTable[i * 40];
int type = walkboxColor[i]; // show different types in different colors
if (*dataPtr) {
- int j;
fillpoly((short *)dataPtr + 1, *dataPtr, type);
- for (j = 0; j < (*dataPtr - 1); j++) {
+ for (int j = 0; j < (*dataPtr - 1); j++) {
line(dataPtr[1 + j * 2],
dataPtr[1 + j * 2 + 1],
dataPtr[1 + (j + 1) * 2],