diff options
author | Eugene Sandulenko | 2014-01-04 22:23:02 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-01-05 00:53:30 +0200 |
commit | fb234a2d0ce535a01fb564927735ede756a245f6 (patch) | |
tree | 9b28c8d55b12896b911d938975f27739e0496220 | |
parent | 8b78fb5642c3648c34d341edb868525beee040fe (diff) | |
download | scummvm-rg350-fb234a2d0ce535a01fb564927735ede756a245f6.tar.gz scummvm-rg350-fb234a2d0ce535a01fb564927735ede756a245f6.tar.bz2 scummvm-rg350-fb234a2d0ce535a01fb564927735ede756a245f6.zip |
FULLPIPE: Implement Movement::countPhasesWithFlag()
-rw-r--r-- | engines/fullpipe/statics.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 7178538823..d7340324ef 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -1529,9 +1529,22 @@ int Movement::calcDuration() { } int Movement::countPhasesWithFlag(int maxidx, int flag) { - warning("STUB: Movement::countPhasesWithFlag()"); + int res = 0; + int sz; - return 0; + if (_currMovement) + sz = _currMovement->_dynamicPhases.size(); + else + sz = _dynamicPhases.size(); + + if (maxidx < 0) + maxidx = sz; + + for (int i = 0; i < maxidx && i < sz; i++) + if (getDynamicPhaseByIndex(i)->_dynFlags & flag) + res++; + + return res; } void Movement::setDynamicPhaseIndex(int index) { |