diff options
author | Littleboy | 2014-06-11 21:04:01 -0400 |
---|---|---|
committer | Littleboy | 2014-06-16 18:46:24 -0400 |
commit | 5aad09213ba5392d5065a04f1547e359e39457a8 (patch) | |
tree | cf870c8cc95f35d46664df5a222134e2649bdc3a /engines | |
parent | 71a703d8bb09cd6e520c40d8db1576687e888292 (diff) | |
download | scummvm-rg350-5aad09213ba5392d5065a04f1547e359e39457a8.tar.gz scummvm-rg350-5aad09213ba5392d5065a04f1547e359e39457a8.tar.bz2 scummvm-rg350-5aad09213ba5392d5065a04f1547e359e39457a8.zip |
LASTEXPRESS: Replace useless checks by asserts. CID 1004086, 1004090
Diffstat (limited to 'engines')
-rw-r--r-- | engines/lastexpress/game/entities.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/engines/lastexpress/game/entities.cpp b/engines/lastexpress/game/entities.cpp index 26a82884b1..b881d34ebe 100644 --- a/engines/lastexpress/game/entities.cpp +++ b/engines/lastexpress/game/entities.cpp @@ -389,7 +389,6 @@ void Entities::resetState(EntityIndex entityIndex) { getLogic()->updateCursor(); } - void Entities::updateFields() const { if (!getFlags()->isGameRunning) return; @@ -897,7 +896,6 @@ void Entities::computeCurrentFrame(EntityIndex entityIndex) const { } break; - case kDirectionLeft: if (data->currentFrame == -1 || data->currentFrame >= (int32)data->sequence->count()) { data->currentFrame = 0; @@ -1772,8 +1770,7 @@ void Entities::enterCompartment(EntityIndex entity, ObjectIndex compartment, boo // Update compartments int index = (compartment < 32 ? compartment - 1 : compartment - 24); - if (index >= 16) - error("[Entities::enterCompartment] Invalid compartment index"); + assert(index < 16); if (useCompartment1) _compartments1[index] |= STORE_VALUE(entity); @@ -1858,8 +1855,7 @@ void Entities::exitCompartment(EntityIndex entity, ObjectIndex compartment, bool // Update compartments int index = (compartment < 32 ? compartment - 1 : compartment - 24); - if (index >= 16) - error("[Entities::exitCompartment] Invalid compartment index"); + assert(index < 16); if (useCompartment1) _compartments1[index] &= ~STORE_VALUE(entity); |