fixed some warnings

svn-id: r4204
This commit is contained in:
Max Horn 2002-05-05 18:10:29 +00:00
parent f412e7bb57
commit ff376ea8a5
5 changed files with 13 additions and 5 deletions

View File

@ -33,7 +33,8 @@
static char *ltrim(char *t)
{
for (; *t && (*t == ' '); t++);
for (; *t && (*t == ' '); t++)
;
return t;
}

View File

@ -920,6 +920,7 @@ int Scumm::getInventorySlot()
return i;
}
error("Inventory full, %d max items", _maxInventoryItems);
return -1;
}
void Scumm::SamInventoryHack(int obj)
@ -1281,6 +1282,7 @@ int Scumm::findFlObjectSlot()
return i;
}
error("findFlObjectSlot: Out of FLObject slots");
return -1;
}
void Scumm::loadFlObject(uint object, uint room)

View File

@ -162,6 +162,7 @@ int Scumm::getScriptSlot()
return i;
}
error("Too many scripts running, %d max", NUM_SCRIPT_SLOT);
return -1;
}
/* Run script 'script' nested - eg, within the parent script.*/
@ -350,6 +351,7 @@ int Scumm::readVar(uint var)
}
error("Illegal varbits (r)");
return -1;
}
void Scumm::writeVar(uint var, int value)
@ -1055,6 +1057,7 @@ int Scumm::getArrayId()
return i;
}
error("Out of array pointers, %d max", _numArray);
return -1;
}
void Scumm::arrayop_1(int a, byte *ptr)

View File

@ -2056,7 +2056,8 @@ void Scumm::o5_roomOps()
char buf[256], *s;
a = getVarOrDirectByte(0x80);
s = buf;
while ((*s++ = fetchScriptByte()));
while ((*s++ = fetchScriptByte()))
;
warning("roomops:13 save-string(%d,\"%s\") not implemented", a, buf);
break;
}
@ -2064,7 +2065,8 @@ void Scumm::o5_roomOps()
char buf[256], *s;
a = getVarOrDirectByte(0x80);
s = buf;
while ((*s++ = fetchScriptByte()));
while ((*s++ = fetchScriptByte()))
;
warning("roomops:14 load-string(%d,\"%s\") not implemented", a, buf);
break;
case 15: /* palmanip? */

View File

@ -6529,8 +6529,8 @@ void SimonState::o_pathfind(int x,int y,uint var_1,uint var_2) {
if (!p)
continue;
for(j=0; READ_BE_UINT16_UNALIGNED(&p[0]) != 999; j++,p+=2) { /* 0xE703 = byteswapped 999 */
x_diff = abs(READ_BE_UINT16_UNALIGNED(&p[0]) - x);
y_diff = abs(READ_BE_UINT16_UNALIGNED(&p[1]) - 12 - y);
x_diff = abs((int)(READ_BE_UINT16_UNALIGNED(&p[0]) - x));
y_diff = abs((int)(READ_BE_UINT16_UNALIGNED(&p[1]) - 12 - y));
if (x_diff < y_diff) {
x_diff >>= 2;