diff options
author | Johannes Schickel | 2006-01-02 22:58:59 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-01-02 22:58:59 +0000 |
commit | bd965cd48388afdd8a85adf93d186db3da325822 (patch) | |
tree | f208a809a1ea109d1915265ad9fbd25d09e9d6aa /kyra/sprites.cpp | |
parent | 978cbb3fd00be5f57a42a58b8ea9447311ac1d98 (diff) | |
download | scummvm-rg350-bd965cd48388afdd8a85adf93d186db3da325822.tar.gz scummvm-rg350-bd965cd48388afdd8a85adf93d186db3da325822.tar.bz2 scummvm-rg350-bd965cd48388afdd8a85adf93d186db3da325822.zip |
More 'cleanup' for kyra.
Moved scene object drawing into its own class (see animator.h and .cpp) (this needs some more cleanup!)
Moved text displaying into its own class (see text.h and .cpp)
Also moved timer code to timers.cpp and button code to gui.cpp.
Also changed wrong (c) information in debugger.h and debugger.cpp
svn-id: r19890
Diffstat (limited to 'kyra/sprites.cpp')
-rw-r--r-- | kyra/sprites.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/kyra/sprites.cpp b/kyra/sprites.cpp index 6115c18c08..f83b53d083 100644 --- a/kyra/sprites.cpp +++ b/kyra/sprites.cpp @@ -27,6 +27,7 @@ #include "kyra/kyra.h" #include "kyra/sprites.h" #include "kyra/resource.h" +#include "kyra/animator.h" namespace Kyra { @@ -339,8 +340,8 @@ void Sprites::updateSceneAnims() { data += 2; debug(6, "func: Update Brandon's sprite"); _engine->animRefreshNPC(0); - _engine->flagAllObjectsForRefresh(); - _engine->updateAllObjectShapes(); + _engine->animator()->flagAllObjectsForRefresh(); + _engine->animator()->updateAllObjectShapes(); break; case 0xFFB0: data += 2; @@ -524,23 +525,24 @@ void Sprites::loadSceneShapes() { void Sprites::refreshSceneAnimObject(uint8 animNum, uint8 shapeNum, uint16 x, uint16 y, bool flipX, bool unkFlag) { debug(9, "Sprites::refreshSceneAnimObject(%i, %i, %i, %i, %i, %i", animNum, shapeNum, x, y, flipX, unkFlag); - _animObjects[animNum].refreshFlag = 1; - _animObjects[animNum].bkgdChangeFlag = 1; + AnimObject &anim = _engine->animator()->sprites()[animNum]; + anim.refreshFlag = 1; + anim.bkgdChangeFlag = 1; if (unkFlag) - _animObjects[animNum].flags |= 0x0200; + anim.flags |= 0x0200; else - _animObjects[animNum].flags &= 0xFD00; + anim.flags &= 0xFD00; if (flipX) - _animObjects[animNum].flags |= 1; + anim.flags |= 1; else - _animObjects[animNum].flags &= 0xFE; + anim.flags &= 0xFE; - _animObjects[animNum].sceneAnimPtr = _sceneShapes[shapeNum]; - _animObjects[animNum].animFrameNumber = -1; - _animObjects[animNum].x1 = x; - _animObjects[animNum].y1 = y; + anim.sceneAnimPtr = _sceneShapes[shapeNum]; + anim.animFrameNumber = -1; + anim.x1 = x; + anim.y1 = y; } int Sprites::getDrawLayer(int y) { |