diff options
author | Bendegúz Nagy | 2016-08-20 13:25:37 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | d97a8905cc18ccf9d036f7708d8e2cf8dfba6067 (patch) | |
tree | 335e7a51be994e20af51d92413b7e56c968cbb69 /engines/dm/group.cpp | |
parent | ca267da97c14268f8c650d7dac727182062129d0 (diff) | |
download | scummvm-rg350-d97a8905cc18ccf9d036f7708d8e2cf8dfba6067.tar.gz scummvm-rg350-d97a8905cc18ccf9d036f7708d8e2cf8dfba6067.tar.bz2 scummvm-rg350-d97a8905cc18ccf9d036f7708d8e2cf8dfba6067.zip |
DM: Remove some warnings
Diffstat (limited to 'engines/dm/group.cpp')
-rw-r--r-- | engines/dm/group.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/dm/group.cpp b/engines/dm/group.cpp index a66ca0528f..5bd4539f09 100644 --- a/engines/dm/group.cpp +++ b/engines/dm/group.cpp @@ -63,6 +63,7 @@ GroupMan::GroupMan(DMEngine *vm) : _vm(vm) { _g376_maxActiveGroupCount = 60; _g375_activeGroups = nullptr; _g377_currActiveGroupCount = 0; + _g395_l_TwoHalfSquareSizedCreaturesGroupLastDirectionSetTime = 0; } GroupMan::~GroupMan() { @@ -1342,11 +1343,9 @@ int32 GroupMan::f179_getCreatureAspectUpdateTime(ActiveGroup *activeGroup, int16 void GroupMan::f205_setDirection(ActiveGroup *activeGroup, int16 dir, int16 creatureIndex, bool twoHalfSquareSizedCreatures) { uint16 L0435_ui_GroupDirections; - static int32 G0395_l_TwoHalfSquareSizedCreaturesGroupLastDirectionSetTime; /* These two variables are used to prevent setting direction of half square sized creatures twice at the same game time */ static ActiveGroup *G0396_ps_TwoHalfSquareSizedCreaturesGroupLastDirectionSetActiveGroup; - warning(false, "TODO: Move G0395_l_TwoHalfSquareSizedCreaturesGroupLastDirectionSetTime to GroupMan so it's properly initialized"); - if (twoHalfSquareSizedCreatures && (_vm->_g313_gameTime == G0395_l_TwoHalfSquareSizedCreaturesGroupLastDirectionSetTime) && (activeGroup == G0396_ps_TwoHalfSquareSizedCreaturesGroupLastDirectionSetActiveGroup)) { + if (twoHalfSquareSizedCreatures && (_vm->_g313_gameTime == _g395_l_TwoHalfSquareSizedCreaturesGroupLastDirectionSetTime) && (activeGroup == G0396_ps_TwoHalfSquareSizedCreaturesGroupLastDirectionSetActiveGroup)) { return; } if (M21_normalizeModulo4(M50_getCreatureValue(L0435_ui_GroupDirections = activeGroup->_directions, creatureIndex) - dir) == 2) { /* If current and new direction are opposites then change direction only one step at a time */ @@ -1356,7 +1355,7 @@ void GroupMan::f205_setDirection(ActiveGroup *activeGroup, int16 dir, int16 crea } if (twoHalfSquareSizedCreatures) { L0435_ui_GroupDirections = f178_getGroupValueUpdatedWithCreatureValue(L0435_ui_GroupDirections, creatureIndex ^ 1, dir); /* Set direction of the second half square sized creature */ - G0395_l_TwoHalfSquareSizedCreaturesGroupLastDirectionSetTime = _vm->_g313_gameTime; + _g395_l_TwoHalfSquareSizedCreaturesGroupLastDirectionSetTime = _vm->_g313_gameTime; G0396_ps_TwoHalfSquareSizedCreaturesGroupLastDirectionSetActiveGroup = activeGroup; } activeGroup->_directions = (Direction)L0435_ui_GroupDirections; |