ASYLUM: Fix Various GCC Compiler Warnings

This commit is contained in:
D G Turner 2021-06-05 01:51:24 +01:00
parent 1b3501af94
commit a3f1211f42
2 changed files with 4 additions and 4 deletions

View File

@ -64,7 +64,7 @@ static const int inventoryDescriptionIndices[12][11] = {
Inventory::Inventory(AsylumEngine *vm, int32 &multiple) : _vm(vm), _selectedItem(0), _multiple(multiple) {
memset(_items, 0, sizeof(_items));
};
}
void Inventory::load(Common::SeekableReadStream *stream) {
for (int i = 0; i < 8; i++)
@ -112,7 +112,7 @@ void Inventory::remove(uint item, uint multipleDecr) {
if (item > 16)
return;
_multiple = _multiple >= multipleDecr ? _multiple - multipleDecr : 0;
_multiple = (_multiple >= (int32)multipleDecr) ? _multiple - multipleDecr : 0;
if (!multipleDecr || !_multiple) {
int i = find(item);
@ -137,7 +137,7 @@ bool Inventory::contains(uint item, uint multiple) const {
return false;
if (multiple)
return _multiple >= multiple;
return (_multiple >= (int32)multiple);
return true;
}

View File

@ -927,7 +927,7 @@ END_OPCODE
IMPLEMENT_OPCODE(JumpIfInventoryItemNotSelected)
Actor *actor = getScene()->getActor(cmd->param1);
if (actor->inventory.getSelectedItem() != cmd->param2)
if ((int32)actor->inventory.getSelectedItem() != cmd->param2)
_currentQueueEntry->currentLine = cmd->param3;
END_OPCODE