aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorlukaslw2014-07-25 02:03:02 +0200
committerlukaslw2014-07-25 02:03:02 +0200
commit92647962885ec85919a79cb1b58e01275206b495 (patch)
treec48b326c481de7a900c9a239d780761e715f7ed4 /engines
parent09570f8dfa6f1ddbee324bc7a8ca30c4233972c5 (diff)
downloadscummvm-rg350-92647962885ec85919a79cb1b58e01275206b495.tar.gz
scummvm-rg350-92647962885ec85919a79cb1b58e01275206b495.tar.bz2
scummvm-rg350-92647962885ec85919a79cb1b58e01275206b495.zip
PRINCE: showHero(), heroMoveGotIt() - frames counting fix
Diffstat (limited to 'engines')
-rw-r--r--engines/prince/animation.cpp2
-rw-r--r--engines/prince/hero.cpp18
2 files changed, 12 insertions, 8 deletions
diff --git a/engines/prince/animation.cpp b/engines/prince/animation.cpp
index adf96b5f00..ac0d0585e1 100644
--- a/engines/prince/animation.cpp
+++ b/engines/prince/animation.cpp
@@ -57,7 +57,7 @@ void Animation::clear() {
}
}
-// AH_ID
+// AH_ID - TODO - if need this fix endianess
bool Animation::testId() const {
char id[2];
id[0] = (char)READ_LE_UINT16(_data);
diff --git a/engines/prince/hero.cpp b/engines/prince/hero.cpp
index 9df795e69c..5edbed5df7 100644
--- a/engines/prince/hero.cpp
+++ b/engines/prince/hero.cpp
@@ -776,7 +776,7 @@ void Hero::showHero() {
if (_moveSet[_turnAnim] != nullptr) {
// only in bear form
_moveSetType = _turnAnim;
- if (_phase < _moveSet[_moveSetType]->getPhaseCount() - 1) {
+ if (_phase < _moveSet[_moveSetType]->getPhaseCount() - 2) {
_phase += 2;
} else {
_state = STAY;
@@ -792,7 +792,7 @@ void Hero::showHero() {
if (_moveSet[_turnAnim] != nullptr) {
// only in bear form
_moveSetType = _turnAnim;
- if (_phase < _moveSet[_moveSetType]->getPhaseCount() - 1) {
+ if (_phase < _moveSet[_moveSetType]->getPhaseCount() - 2) {
_phase += 2;
} else {
_state = MOVE;
@@ -833,7 +833,7 @@ void Hero::showHero() {
if (_moveSet[_turnAnim] != nullptr) {
// only in bear form
_moveSetType = _turnAnim;
- if (_phase < _moveSet[_moveSetType]->getPhaseCount() - 1) {
+ if (_phase < _moveSet[_moveSetType]->getPhaseCount() - 2) {
_phase += 2;
break;
} else {
@@ -931,14 +931,18 @@ void Hero::heroMoveGotIt(int x, int y, int dir) {
break;
}
- if (_phase < _moveSet[_moveSetType]->getPhaseCount() - 1) {
- if (_vm->_flags->getFlagValue(Flags::HEROFAST) || _state == RUN) {
+ if (_vm->_flags->getFlagValue(Flags::HEROFAST) || _state == RUN) {
+ if (_phase < _moveSet[_moveSetType]->getPhaseCount() - 2) {
_phase += 2;
} else {
- _phase++;
+ _phase = 0;
}
} else {
- _phase = 0;
+ if (_phase < _moveSet[_moveSetType]->getPhaseCount() - 1) {
+ _phase++;
+ } else {
+ _phase = 0;
+ }
}
_step = kStepLeftRight;