diff options
author | Bendegúz Nagy | 2016-06-30 15:00:42 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | cd7363f8de93001208f34d43bcb4f656b8514110 (patch) | |
tree | 54e474044a6a1a2203aef86a3fd3d3fe4783aa2d | |
parent | 4f394fc301ed9ae087e6cabbf54607ea89629ffa (diff) | |
download | scummvm-rg350-cd7363f8de93001208f34d43bcb4f656b8514110.tar.gz scummvm-rg350-cd7363f8de93001208f34d43bcb4f656b8514110.tar.bz2 scummvm-rg350-cd7363f8de93001208f34d43bcb4f656b8514110.zip |
DM: Add F0147_DUNGEON_GetGroupDirections
-rw-r--r-- | engines/dm/TODOs/methodtree.txt | 2 | ||||
-rw-r--r-- | engines/dm/group.cpp | 9 | ||||
-rw-r--r-- | engines/dm/group.h | 3 |
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 }; |