aboutsummaryrefslogtreecommitdiff
path: root/kyra/script_v1.cpp
diff options
context:
space:
mode:
authorOystein Eftevaag2006-02-11 08:31:13 +0000
committerOystein Eftevaag2006-02-11 08:31:13 +0000
commited7a6e900d3526303ecd9c8017948648aeb25c12 (patch)
tree3787c6ebc5652e6db576a88455a5de79f4ee816f /kyra/script_v1.cpp
parent3a419f8b850ad6479a530a3e912c770099f6ad4e (diff)
downloadscummvm-rg350-ed7a6e900d3526303ecd9c8017948648aeb25c12.tar.gz
scummvm-rg350-ed7a6e900d3526303ecd9c8017948648aeb25c12.tar.bz2
scummvm-rg350-ed7a6e900d3526303ecd9c8017948648aeb25c12.zip
Kyra cleanup path step 2
* Moved more code out of kyra.cpp. Specifically moved Kyra1 specific sequence helper functions to sequence.cpp (and updateKyragemFading() from animator.cpp for the same reason), and some generic animation functions to animator.cpp. This is mainly in preparation for Kyra2. * Additionally, cleaned up my last bugfix a little bit :) svn-id: r20493
Diffstat (limited to 'kyra/script_v1.cpp')
-rw-r--r--kyra/script_v1.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/kyra/script_v1.cpp b/kyra/script_v1.cpp
index a2ccd2adb8..08ff4a6d9f 100644
--- a/kyra/script_v1.cpp
+++ b/kyra/script_v1.cpp
@@ -555,11 +555,11 @@ int KyraEngine::cmd_popBrandonIntoScene(ScriptState *script) {
if (changeScaleMode) {
curAnim->x1 = _currentCharacter->x1;
curAnim->y1 = _currentCharacter->y1;
- _brandonScaleY = _scaleTable[_currentCharacter->y1];
- _brandonScaleX = _brandonScaleY;
+ _animator->_brandonScaleY = _scaleTable[_currentCharacter->y1];
+ _animator->_brandonScaleX = _animator->_brandonScaleY;
- int animWidth = fetchAnimWidth(curAnim->sceneAnimPtr, _brandonScaleX) >> 1;
- int animHeight = fetchAnimHeight(curAnim->sceneAnimPtr, _brandonScaleY);
+ int animWidth = _animator->fetchAnimWidth(curAnim->sceneAnimPtr, _animator->_brandonScaleX) >> 1;
+ int animHeight = _animator->fetchAnimHeight(curAnim->sceneAnimPtr, _animator->_brandonScaleY);
animWidth = (xOffset * animWidth) / width;
animHeight = (yOffset * animHeight) / height;
@@ -576,7 +576,7 @@ int KyraEngine::cmd_popBrandonIntoScene(ScriptState *script) {
_scaleMode = 1;
}
- animRefreshNPC(0);
+ _animator->animRefreshNPC(0);
_animator->preserveAllBackgrounds();
_animator->prepDrawAllObjects();
_animator->copyChangedObjectsForward(0);
@@ -662,7 +662,7 @@ int KyraEngine::cmd_changeCharactersFacing(ScriptState *script) {
_characterList[character].currentAnimFrame = newAnimFrame;
}
_characterList[character].facing = facing;
- animRefreshNPC(character);
+ _animator->animRefreshNPC(character);
_animator->preserveAllBackgrounds();
_animator->prepDrawAllObjects();
_animator->copyChangedObjectsForward(0);
@@ -795,7 +795,7 @@ int KyraEngine::cmd_drawCharacterStanding(ScriptState *script) {
if (newFacing != -1) {
_characterList[character].facing = newFacing;
}
- animRefreshNPC(character);
+ _animator->animRefreshNPC(character);
if (updateShapes) {
_animator->updateAllObjectShapes();
}
@@ -1543,7 +1543,7 @@ int KyraEngine::cmd_shrinkBrandonDown(ScriptState *script) {
int scaleEnd = scale >> 1;
for (; scaleEnd <= scale; --scale) {
_scaleTable[_currentCharacter->y1] = scale;
- animRefreshNPC(0);
+ _animator->animRefreshNPC(0);
delayWithTicks(1);
}
delayWithTicks(delayTime); // XXX
@@ -1565,7 +1565,7 @@ int KyraEngine::cmd_growBrandonUp(ScriptState *script) {
_scaleMode = 1;
for (int curScale = scale >> 1; curScale <= scale; ++curScale) {
_scaleTable[_currentCharacter->y1] = curScale;
- animRefreshNPC(0);
+ _animator->animRefreshNPC(0);
delayWithTicks(1);
}
_scaleTable[_currentCharacter->y1] = scaleValue;
@@ -1575,8 +1575,8 @@ int KyraEngine::cmd_growBrandonUp(ScriptState *script) {
int KyraEngine::cmd_setBrandonScaleXAndY(ScriptState *script) {
debug(3, "cmd_setBrandonScaleXAndY(0x%X) (%d, %d)", script, stackPos(0), stackPos(1));
- _brandonScaleX = stackPos(0);
- _brandonScaleY = stackPos(1);
+ _animator->_brandonScaleX = stackPos(0);
+ _animator->_brandonScaleY = stackPos(1);
return 0;
}