aboutsummaryrefslogtreecommitdiff
path: root/engines/dm
diff options
context:
space:
mode:
authorStrangerke2016-09-04 23:18:11 +0200
committerStrangerke2016-09-04 23:18:11 +0200
commit47741742f52855b47306120e6c1d43cfbb196a2b (patch)
tree44bbe2deee7124f3e213feff0662494f703994b2 /engines/dm
parent91fe53762d4aaa69ec428af89cf6ecc514a8b3f3 (diff)
downloadscummvm-rg350-47741742f52855b47306120e6c1d43cfbb196a2b.tar.gz
scummvm-rg350-47741742f52855b47306120e6c1d43cfbb196a2b.tar.bz2
scummvm-rg350-47741742f52855b47306120e6c1d43cfbb196a2b.zip
DM: Fix typo in the name of isObjectInPartyPossession, get rid of the GOTO
Diffstat (limited to 'engines/dm')
-rw-r--r--engines/dm/movesens.cpp26
-rw-r--r--engines/dm/movesens.h2
2 files changed, 14 insertions, 14 deletions
diff --git a/engines/dm/movesens.cpp b/engines/dm/movesens.cpp
index 3458cdf55e..fe94cb7303 100644
--- a/engines/dm/movesens.cpp
+++ b/engines/dm/movesens.cpp
@@ -809,7 +809,7 @@ void MovesensMan::processThingAdditionOrRemoval(uint16 mapX, uint16 mapY, Thing
case k8_SensorFloorPartyPossession:
if (thingType != kM1_PartyThingType)
goto T0276079;
- triggerSensor = isObjcetInPartyPossession(curSensorData);
+ triggerSensor = isObjectInPartyPossession(curSensorData);
break;
case k9_SensorFloorVersionChecker:
if ((thingType != kM1_PartyThingType) || !addThing || partySquare)
@@ -861,7 +861,7 @@ T0276079:
processRotationEffect();
}
-bool MovesensMan::isObjcetInPartyPossession(int16 objectType) {
+bool MovesensMan::isObjectInPartyPossession(int16 objectType) {
bool leaderHandObjectProcessed = false;
Champion *curChampion = _vm->_championMan->_champions;
int16 championIdx;
@@ -871,14 +871,19 @@ bool MovesensMan::isObjcetInPartyPossession(int16 objectType) {
for (championIdx = k0_ChampionFirst; championIdx < _vm->_championMan->_partyChampionCount; championIdx++, curChampion++) {
if (curChampion->_currHealth) {
curSlotThing = curChampion->_slots;
- for (slotIdx = k0_ChampionSlotReadyHand; (slotIdx < k30_ChampionSlotChest_1) && !leaderHandObjectProcessed; slotIdx++) {
- curThing = *curSlotThing++;
-T0274003:
- int16 objectType = _vm->_objectMan->getObjectType(curThing);
- if (objectType == objectType)
+ for (slotIdx = k0_ChampionSlotReadyHand; (slotIdx < k30_ChampionSlotChest_1) || !leaderHandObjectProcessed; slotIdx++) {
+ if (slotIdx < k30_ChampionSlotChest_1)
+ curThing = *curSlotThing++;
+ else {
+ leaderHandObjectProcessed = true;
+ curThing = _vm->_championMan->_leaderHandObject;
+ }
+
+ int16 curObjectType = _vm->_objectMan->getObjectType(curThing);
+ if (curObjectType == objectType)
return true;
- if (objectType == k144_IconIndiceContainerChestClosed) {
+ if (curObjectType == k144_IconIndiceContainerChestClosed) {
Container *container = (Container *)_vm->_dungeonMan->getThingData(curThing);
curThing = container->getSlot();
while (curThing != Thing::_endOfList) {
@@ -891,11 +896,6 @@ T0274003:
}
}
}
- if (!leaderHandObjectProcessed) {
- leaderHandObjectProcessed = true;
- curThing = _vm->_championMan->_leaderHandObject;
- goto T0274003;
- }
return false;
}
diff --git a/engines/dm/movesens.h b/engines/dm/movesens.h
index ce023bc5c1..7746fcac6c 100644
--- a/engines/dm/movesens.h
+++ b/engines/dm/movesens.h
@@ -60,7 +60,7 @@ public:
int16 getTeleporterRotatedGroupResult(Teleporter *teleporter, Thing thing, uint16 mapIndex);// @ F0262_MOVE_GetTeleporterRotatedGroupResult
Thing getTeleporterRotatedProjectileThing(Teleporter *teleporter, Thing projectileThing); // @ F0263_MOVE_GetTeleporterRotatedProjectileThing
void processThingAdditionOrRemoval(uint16 mapX, uint16 mapY, Thing thing, bool partySquare, bool addThing);// @ F0276_SENSOR_ProcessThingAdditionOrRemoval
- bool isObjcetInPartyPossession(int16 objectType); // @ F0274_SENSOR_IsObjectInPartyPossession
+ bool isObjectInPartyPossession(int16 objectType); // @ F0274_SENSOR_IsObjectInPartyPossession
void triggerEffect(Sensor *sensor, int16 effect, int16 mapX, int16 mapY, uint16 cell); // @ F0272_SENSOR_TriggerEffect
void triggerLocalEffect(int16 localEffect, int16 effX, int16 effY, int16 effCell); // @ F0270_SENSOR_TriggerLocalEffect
void addSkillExperience(int16 skillIndex, uint16 exp, bool leaderOnly); // @ F0269_SENSOR_AddSkillExperience