aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBendegúz Nagy2016-06-30 14:54:54 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit4f394fc301ed9ae087e6cabbf54607ea89629ffa (patch)
treeb7b945d69faff5ae81ea428e81be9cea693f3721
parent5bb19fd2611dd28e6187b4d873de3f754a352b74 (diff)
downloadscummvm-rg350-4f394fc301ed9ae087e6cabbf54607ea89629ffa.tar.gz
scummvm-rg350-4f394fc301ed9ae087e6cabbf54607ea89629ffa.tar.bz2
scummvm-rg350-4f394fc301ed9ae087e6cabbf54607ea89629ffa.zip
DM: Add F0145_DUNGEON_GetGroupCells
-rw-r--r--engines/dm/group.cpp8
-rw-r--r--engines/dm/group.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/engines/dm/group.cpp b/engines/dm/group.cpp
index 645d81fa62..10edf011a3 100644
--- a/engines/dm/group.cpp
+++ b/engines/dm/group.cpp
@@ -27,6 +27,7 @@
#include "group.h"
#include "dungeonman.h"
+#include "champion.h"
@@ -51,4 +52,11 @@ void GroupMan::initActiveGroups() {
_activeGroups[i]._groupThingIndex = -1;
}
+uint16 GroupMan::getGroupCells(Group* group, int16 mapIndex) {
+ byte cells;
+ cells = group->_cells;
+ if (mapIndex == _vm->_dungeonMan->_currMap._currPartyMapIndex)
+ cells = _activeGroups[cells]._cells;
+ return cells;
+}
}
diff --git a/engines/dm/group.h b/engines/dm/group.h
index 9e1300ccde..3cd286a132 100644
--- a/engines/dm/group.h
+++ b/engines/dm/group.h
@@ -85,6 +85,7 @@ public:
GroupMan(DMEngine *vm);
~GroupMan();
void initActiveGroups(); // @ F0196_GROUP_InitializeActiveGroups
+ uint16 getGroupCells(Group *group, int16 mapIndex); // @ F0145_DUNGEON_GetGroupCells
};