aboutsummaryrefslogtreecommitdiff
path: root/engines/dm/group.cpp
diff options
context:
space:
mode:
authorBendegúz Nagy2016-08-12 10:20:44 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit0bd785e7eb72b10d58c4de7e82e44dd59fb0dda3 (patch)
tree0101f37bc1d7e677ebe33068c4fd9ff71cf7fbd9 /engines/dm/group.cpp
parentc798b1ca02c248a86958d6b43b92f323bd2326e0 (diff)
downloadscummvm-rg350-0bd785e7eb72b10d58c4de7e82e44dd59fb0dda3.tar.gz
scummvm-rg350-0bd785e7eb72b10d58c4de7e82e44dd59fb0dda3.tar.bz2
scummvm-rg350-0bd785e7eb72b10d58c4de7e82e44dd59fb0dda3.zip
DM: Fix addActiveGroup with groupGenerator
Diffstat (limited to 'engines/dm/group.cpp')
-rw-r--r--engines/dm/group.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/engines/dm/group.cpp b/engines/dm/group.cpp
index 064b30d502..e5c74fed74 100644
--- a/engines/dm/group.cpp
+++ b/engines/dm/group.cpp
@@ -1698,10 +1698,8 @@ void GroupMan::f183_addActiveGroup(Thing thing, int16 mapX, int16 mapY) {
}
_g377_currActiveGroupCount++;
- warning(false, "Code differs from the original in GroupMan::f183_addActiveGroup");
- //L0340_ps_Group = ((Group *)_vm->_dungeonMan->_g284_thingData[k4_GroupThingType]) + (L0341_ps_ActiveGroup->_groupThingIndex = (thing).getType());
- L0341_ps_ActiveGroup->_groupThingIndex = thing.getType();
- L0340_ps_Group = (Group*)_vm->_dungeonMan->f156_getThingData(f175_groupGetThing(mapX, mapY));
+ L0340_ps_Group = (Group *)(_vm->_dungeonMan->_g284_thingData[k4_GroupThingType] +
+ g235_ThingDataWordCount[k4_GroupThingType] * (L0341_ps_ActiveGroup->_groupThingIndex = (thing).getIndex()));
L0341_ps_ActiveGroup->_cells = L0340_ps_Group->_cells;
L0340_ps_Group->getActiveGroupIndex() = L0344_i_ActiveGroupIndex;