diff options
author | Simei Yin | 2018-04-15 21:35:19 +0200 |
---|---|---|
committer | Simei Yin | 2018-04-15 22:10:41 +0200 |
commit | 53c79fdde90f9dfa5467e501c3dcfb19a7494793 (patch) | |
tree | d19394eff42d12c7cbb4c7ff9aa207767a3a615d /engines/sludge/builtin.cpp | |
parent | 7c74e81e0ac7f9482c3732cb9305929d9e83a0c4 (diff) | |
download | scummvm-rg350-53c79fdde90f9dfa5467e501c3dcfb19a7494793.tar.gz scummvm-rg350-53c79fdde90f9dfa5467e501c3dcfb19a7494793.tar.bz2 scummvm-rg350-53c79fdde90f9dfa5467e501c3dcfb19a7494793.zip |
SLUDGE: Refactor PersonaAnimation related code in PeopleManager
Diffstat (limited to 'engines/sludge/builtin.cpp')
-rw-r--r-- | engines/sludge/builtin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/sludge/builtin.cpp b/engines/sludge/builtin.cpp index e8e9b87f17..19aa937f64 100644 --- a/engines/sludge/builtin.cpp +++ b/engines/sludge/builtin.cpp @@ -855,7 +855,7 @@ builtIn(anim) { } // First store the frame numbers and take 'em off the stack - PersonaAnimation *ba = g_sludge->_peopleMan->createPersonaAnim(numParams - 1, fun->stack); + PersonaAnimation *ba = new PersonaAnimation(numParams - 1, fun->stack); // Only remaining paramter is the file number int fileNumber; @@ -867,7 +867,7 @@ builtIn(anim) { LoadedSpriteBank *sprBanky = g_sludge->_gfxMan->loadBankForAnim(fileNumber); if (!sprBanky) return BR_ERROR; // File not found, fatal done already - g_sludge->_peopleMan->setBankFile(ba, sprBanky); + ba->theSprites = sprBanky; // Return value newAnimationVariable(fun->reg, ba); @@ -1589,7 +1589,7 @@ builtIn(animate) { return BR_ERROR; trimStack(fun->stack); g_sludge->_peopleMan->animatePerson(obj, pp); - setVariable(fun->reg, SVT_INT, g_sludge->_peopleMan->timeForAnim(pp)); + setVariable(fun->reg, SVT_INT, pp->getTotalTime()); return BR_CONTINUE; } |