aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/dm/TODOs/methodtree.txt2
-rw-r--r--engines/dm/group.cpp9
-rw-r--r--engines/dm/group.h3
3 files changed, 12 insertions, 2 deletions
diff --git a/engines/dm/TODOs/methodtree.txt b/engines/dm/TODOs/methodtree.txt
index ec7229b057..2b9d6bd309 100644
--- a/engines/dm/TODOs/methodtree.txt
+++ b/engines/dm/TODOs/methodtree.txt
@@ -9,7 +9,7 @@ F0115_DUNGEONVIEW_DrawObjectsCreaturesProjectilesExplosions_CPSEF
F0158_DUNGEON_GetWeaponInfo // done
M66_PROJECTILE_ASPECT_ORDINAL // done
F0176_GROUP_GetCreatureOrdinalInCell
- F0145_DUNGEON_GetGroupCells
+ F0145_DUNGEON_GetGroupCells // done
F0147_DUNGEON_GetGroupDirections
GROUP // done
CreatureType
diff --git a/engines/dm/group.cpp b/engines/dm/group.cpp
index 10edf011a3..4a1a7e1180 100644
--- a/engines/dm/group.cpp
+++ b/engines/dm/group.cpp
@@ -59,4 +59,13 @@ uint16 GroupMan::getGroupCells(Group* group, int16 mapIndex) {
cells = _activeGroups[cells]._cells;
return cells;
}
+
+byte gGroupDirections[4] = {0x00, 0x55, 0xAA, 0xFF}; // @ G0258_auc_Graphic559_GroupDirections
+
+uint16 GroupMan::getGroupDirections(Group* group, int16 mapIndex) {
+ if (mapIndex == _vm->_dungeonMan->_currMap._currPartyMapIndex)
+ return _activeGroups[group->getActiveGroupIndex()]._directions;
+
+ return gGroupDirections[group->getDir()];
+}
}
diff --git a/engines/dm/group.h b/engines/dm/group.h
index 3cd286a132..0ad9cbb545 100644
--- a/engines/dm/group.h
+++ b/engines/dm/group.h
@@ -36,7 +36,7 @@ namespace DM {
class ActiveGroup {
public:
int _groupThingIndex;
- byte _directions;
+ direction _directions;
byte _cells;
byte _lastMoveTime;
byte _delayFleeingFromTarget;
@@ -86,6 +86,7 @@ public:
~GroupMan();
void initActiveGroups(); // @ F0196_GROUP_InitializeActiveGroups
uint16 getGroupCells(Group *group, int16 mapIndex); // @ F0145_DUNGEON_GetGroupCells
+ uint16 getGroupDirections(Group *group, int16 mapIndex); // @ F0147_DUNGEON_GetGroupDirections
};