mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
fixed some warnings
svn-id: r4204
This commit is contained in:
parent
f412e7bb57
commit
ff376ea8a5
@ -33,7 +33,8 @@
|
||||
|
||||
static char *ltrim(char *t)
|
||||
{
|
||||
for (; *t && (*t == ' '); t++);
|
||||
for (; *t && (*t == ' '); t++)
|
||||
;
|
||||
return t;
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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? */
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user