Oops, my last commit introduced some warnings.

svn-id: r35063
This commit is contained in:
Torbjörn Andersson
2008-11-14 22:20:34 +00:00
parent 5a0556f09c
commit 7d3e9b3d35
+21 -22
View File
@@ -1301,28 +1301,27 @@ void IgorEngine::redrawVerb(uint8 verb, bool highlight) {
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);
}
} 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;
}
++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 @@ void IgorEngine::drawInventory(int start, int mode) {
}
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 @@ void IgorEngine::drawInventory(int start, int mode) {
_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 @@ void IgorEngine::drawInventory(int start, int mode) {
_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;