Skip to content

Commit

Permalink
PRINCE: Background animations - update
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaslw committed Aug 5, 2014
1 parent 4933754 commit a3c829a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions engines/prince/script.cpp
Expand Up @@ -250,6 +250,8 @@ int Script::scanMobEventsWithItem(int mobMask, int dataEventOffset, int itemMask

void Script::installSingleBackAnim(Common::Array<BackgroundAnim> &backAnimList, int slot, int roomBackAnimOffset) {

_vm->removeSingleBackAnim(slot);

int offset = roomBackAnimOffset + slot * 4;

BackgroundAnim newBackgroundAnim;
Expand Down Expand Up @@ -788,15 +790,19 @@ void Interpreter::O_GO() {
void Interpreter::O_BACKANIMUPDATEOFF() {
uint16 slotId = readScriptFlagValue();
int currAnim = _vm->_backAnimList[slotId]._seq._currRelative;
_vm->_backAnimList[slotId].backAnims[currAnim]._state = 1;
if (!_vm->_backAnimList[slotId].backAnims.empty()) {
_vm->_backAnimList[slotId].backAnims[currAnim]._state = 1;
}
debugInterpreter("O_BACKANIMUPDATEOFF slotId %d", slotId);
}

void Interpreter::O_BACKANIMUPDATEON() {
uint16 slotId = readScriptFlagValue();
int currAnim = _vm->_backAnimList[slotId]._seq._currRelative;
_vm->_backAnimList[slotId].backAnims[currAnim]._state = 0;
debugInterpreter("O_BACKANIMUPDATEON %d", slotId);
if (!_vm->_backAnimList[slotId].backAnims.empty()) {
_vm->_backAnimList[slotId].backAnims[currAnim]._state = 0;
}
debugInterpreter("O_BACKANIMUPDATEON slotId %d", slotId);
}

void Interpreter::O_CHANGECURSOR() {
Expand Down

0 comments on commit a3c829a

Please sign in to comment.