Skip to content

Commit

Permalink
PRINCE: showNormAnims() fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaslw committed Aug 7, 2014
1 parent a85a93f commit 4dbcdd1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 3 additions & 2 deletions engines/prince/prince.cpp
Expand Up @@ -1390,8 +1390,9 @@ void PrinceEngine::showNormAnims() {
} else {
anim._frame++;
}
if (anim._frame < phaseCount - 1) {
anim._showFrame = anim._frame;
anim._showFrame = anim._frame;
if (anim._showFrame >= phaseCount) {
anim._showFrame = phaseCount - 1;
}
showAnim(anim);
}
Expand Down
8 changes: 8 additions & 0 deletions engines/prince/script.cpp
Expand Up @@ -643,6 +643,14 @@ void Interpreter::O_SHOWANIM() {
delete anim._shadowData;
anim._shadowData = nullptr;
}

// WALKAROUND: fix for turning off bard's wife background animation
// in front of bard's house (location 7) after giving her poem (item 33)
// in script: GiveLetter (line 11082)
if (_currentInstruction == kGiveLetterScriptFix) {
_vm->_backAnimList[1].backAnims[0]._state = 1;
}

debugInterpreter("O_SHOWANIM slot %d, animId %d", slot, animId);
}

Expand Down
2 changes: 2 additions & 0 deletions engines/prince/script.h
Expand Up @@ -252,6 +252,8 @@ class Interpreter {
typedef void (Interpreter::*OpcodeFunc)();
static OpcodeFunc _opcodes[];

static const int kGiveLetterScriptFix = 79002;

// Keep opcode handlers names as they are in original code
// it easier to switch back and forth
void O_WAITFOREVER();
Expand Down

0 comments on commit 4dbcdd1

Please sign in to comment.