aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorlukaslw2014-07-23 21:46:50 +0200
committerlukaslw2014-07-23 21:46:50 +0200
commit58cb15e89276106c29f95508b2451915c716b0f7 (patch)
tree28ea992a17dfe6426cf0ccda2a974a3d3b5c4ded /engines
parent35b276397a20a169d4f9301b7bfdbcb252253710 (diff)
downloadscummvm-rg350-58cb15e89276106c29f95508b2451915c716b0f7.tar.gz
scummvm-rg350-58cb15e89276106c29f95508b2451915c716b0f7.tar.bz2
scummvm-rg350-58cb15e89276106c29f95508b2451915c716b0f7.zip
PRINCE: O_CHANGEHEROSET implementation
Diffstat (limited to 'engines')
-rw-r--r--engines/prince/prince.cpp3
-rw-r--r--engines/prince/script.cpp9
2 files changed, 7 insertions, 5 deletions
diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp
index 1fb323b448..8f1710593d 100644
--- a/engines/prince/prince.cpp
+++ b/engines/prince/prince.cpp
@@ -298,9 +298,6 @@ void PrinceEngine::init() {
_secondHero = new Hero(this, _graph);
_secondHero->_maxBoredom = 140;
- _mainHero->loadAnimSet(1);
- _secondHero->loadAnimSet(3);
-
_roomPathBitmap = (byte *)malloc(kPathBitmapLen);
_roomPathBitmapTemp = (byte *)malloc(kPathBitmapLen);
_coordsBuf = (byte *)malloc(kTracePts * 4);
diff --git a/engines/prince/script.cpp b/engines/prince/script.cpp
index a0ee5bd3b4..a2f22427a7 100644
--- a/engines/prince/script.cpp
+++ b/engines/prince/script.cpp
@@ -1390,9 +1390,14 @@ void Interpreter::O_SWAPOBJECTS() {
}
void Interpreter::O_CHANGEHEROSET() {
- uint16 hero = readScriptFlagValue();
+ uint16 heroId = readScriptFlagValue();
uint16 heroSet = readScriptFlagValue();
- debugInterpreter("O_CHANGEHEROSET hero %d, heroSet %d", hero, heroSet);
+ if (!heroId) {
+ _vm->_mainHero->loadAnimSet(heroSet);
+ } else if (heroId == 1) {
+ _vm->_secondHero->loadAnimSet(heroSet);
+ }
+ debugInterpreter("O_CHANGEHEROSET hero %d, heroSet %d", heroId, heroSet);
}
void Interpreter::O_ADDSTRING() {