[Scummvm-cvs-logs] SF.net SVN: scummvm:[35063] scummvm/trunk/engines/igor/igor.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Fri Nov 14 23:20:34 CET 2008


Revision: 35063
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35063&view=rev
Author:   eriktorbjorn
Date:     2008-11-14 22:20:34 +0000 (Fri, 14 Nov 2008)

Log Message:
-----------
Oops, my last commit introduced some warnings.

Modified Paths:
--------------
    scummvm/trunk/engines/igor/igor.cpp

Modified: scummvm/trunk/engines/igor/igor.cpp
===================================================================
--- scummvm/trunk/engines/igor/igor.cpp	2008-11-14 22:08:10 UTC (rev 35062)
+++ scummvm/trunk/engines/igor/igor.cpp	2008-11-14 22:20:34 UTC (rev 35063)
@@ -1301,28 +1301,27 @@
 void IgorEngine::drawInventory(int start, int mode) {
 	loadData(IMG_InventoryPanel, _inventoryPanelBuffer);
 	loadData(IMG_Objects, _inventoryImagesBuffer);
+	int y, i;
 	int end = start + 6;
-	if (start <= end) {
-		int x = 1;
-		for (int y = start; y != end; ++y) {
-			if (_inventoryInfo[y - 1] == 0) {
-				for (int i = 1; i <= 30; ++i) {
-					memset(_inventoryPanelBuffer + x * 40 - 20 + (i - 1) * 320, 0, 40);
-				}
-			} else {
-				for (int i = 1; i <= 30; ++i) {
-					int img = _inventoryInfo[y - 1];
-					assert(img >= 1);
-					memcpy(_inventoryPanelBuffer + x * 40 - 20 + i * 320 - 321, _inventoryImagesBuffer + (i - 1) * 40 + (_inventoryImages[img - 1] - 1) * 1200, 40);
-				}
+	int x = 1;
+	for (y = start; y != end; ++y) {
+		if (_inventoryInfo[y - 1] == 0) {
+			for (i = 1; i <= 30; ++i) {
+				memset(_inventoryPanelBuffer + x * 40 - 20 + (i - 1) * 320, 0, 40);
 			}
-			++x;
+		} else {
+			for (i = 1; i <= 30; ++i) {
+				int img = _inventoryInfo[y - 1];
+				assert(img >= 1);
+				memcpy(_inventoryPanelBuffer + x * 40 - 20 + i * 320 - 321, _inventoryImagesBuffer + (i - 1) * 40 + (_inventoryImages[img - 1] - 1) * 1200, 40);
+			}
 		}
+		++x;
 	}
 	if (_inventoryInfo[72] == 1) {
 		// 'hide' scroll up
-		for (int y = 5; y <= 11; ++y) {
-			for (int x = 4; x <= 12; ++x) {
+		for (y = 5; y <= 11; ++y) {
+			for (x = 4; x <= 12; ++x) {
 				uint8 *p = _inventoryPanelBuffer + y * 320 + x - 321;
 				if (*p == 0xF2) {
 					*p = 0xF3;
@@ -1334,8 +1333,8 @@
 	}
 	if (_inventoryInfo[73] <= _inventoryInfo[72] + 6 || _inventoryInfo[72] >= _inventoryInfo[73] - 6) {
 		// 'hide' scroll down
-		for (int y = 19; y <= 25; ++y) {
-			for (int x = 4; x <= 12; ++x) {
+		for (y = 19; y <= 25; ++y) {
+			for (x = 4; x <= 12; ++x) {
 				uint8 *p = _inventoryPanelBuffer + y * 320 + x - 321;
 				if (*p == 0xF2) {
 					*p = 0xF3;
@@ -1351,8 +1350,8 @@
 		_scrollInventory = false;
 		break;
 	case 1:
-		for (int y = 0;	y <= 11; ++y) {
-			for (int x = 0; x <= 14; ++x) {
+		for (y = 0; y <= 11; ++y) {
+			for (x = 0; x <= 14; ++x) {
 				uint8 *p = _screenVGA + x + y * 320 + 59520;
 				if ((*p & 0x80) != 0) {
 					*p += 8;
@@ -1369,8 +1368,8 @@
 		_scrollInventory = true;
 		break;
 	case 2:
-		for (int y = 0;	y <= 11; ++y) {
-			for (int x = 0; x <= 14; ++x) {
+		for (y = 0; y <= 11; ++y) {
+			for (x = 0; x <= 14; ++x) {
 				uint8 *p = _screenVGA + x + y * 320 + 55040;
 				if ((*p & 0x80) != 0) {
 					*p += 8;


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