diff options
author | Torbjörn Andersson | 2005-05-03 09:00:06 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2005-05-03 09:00:06 +0000 |
commit | f5f9da940b6071df1e921faa42fa56a501e2ab62 (patch) | |
tree | f4ce163f7ed645ed75cae8a98307d8e7a5059101 /sword2/anims.cpp | |
parent | 5f7b3d8cf2bd69b01258b8facdabc9b9de736555 (diff) | |
download | scummvm-rg350-f5f9da940b6071df1e921faa42fa56a501e2ab62.tar.gz scummvm-rg350-f5f9da940b6071df1e921faa42fa56a501e2ab62.tar.bz2 scummvm-rg350-f5f9da940b6071df1e921faa42fa56a501e2ab62.zip |
More cleanup/restructuring: Moved walk-related code from Logic to Router.
(I may have to think up some better name for that class later.)
svn-id: r17901
Diffstat (limited to 'sword2/anims.cpp')
-rw-r--r-- | sword2/anims.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sword2/anims.cpp b/sword2/anims.cpp index 7f4a78b152..d4badbf640 100644 --- a/sword2/anims.cpp +++ b/sword2/anims.cpp @@ -33,7 +33,6 @@ #include "sword2/interpreter.h" #include "sword2/logic.h" #include "sword2/maketext.h" -#include "sword2/memory.h" #include "sword2/resman.h" #include "sword2/sound.h" #include "sword2/driver/animation.h" @@ -45,8 +44,8 @@ int32 Logic::animate(int32 *params, bool reverse) { // 1 pointer to object's graphic structure // 2 resource id of animation file - ObjectLogic *ob_logic = (ObjectLogic *) _vm->_memory->decodePtr(params[0]); - ObjectGraphic *ob_graphic = (ObjectGraphic *) _vm->_memory->decodePtr(params[1]); + ObjectLogic *ob_logic = (ObjectLogic *) decodePtr(params[0]); + ObjectGraphic *ob_graphic = (ObjectGraphic *) decodePtr(params[1]); byte *anim_file; AnimHeader *anim_head; int32 res = params[2]; @@ -166,11 +165,11 @@ int32 Logic::megaTableAnimate(int32 *params, bool reverse) { // If this is the start of the anim, read the anim table to get the // appropriate anim resource - ObjectLogic *ob_logic = (ObjectLogic *) _vm->_memory->decodePtr(params[0]); + ObjectLogic *ob_logic = (ObjectLogic *) decodePtr(params[0]); if (ob_logic->looping == 0) { - ObjectMega *ob_mega = (ObjectMega *) _vm->_memory->decodePtr(params[2]); - uint32 *anim_table = (uint32 *) _vm->_memory->decodePtr(params[3]); + ObjectMega *ob_mega = (ObjectMega *) decodePtr(params[2]); + uint32 *anim_table = (uint32 *) decodePtr(params[3]); // appropriate anim resource is in 'table[direction]' pars[2] = anim_table[ob_mega->current_dir]; @@ -180,14 +179,14 @@ int32 Logic::megaTableAnimate(int32 *params, bool reverse) { } void Logic::setSpriteStatus(uint32 sprite, uint32 type) { - ObjectGraphic *ob_graphic = (ObjectGraphic *) _vm->_memory->decodePtr(sprite); + ObjectGraphic *ob_graphic = (ObjectGraphic *) decodePtr(sprite); // Remove the previous status, but don't affect the shading upper-word ob_graphic->type = (ob_graphic->type & 0xffff0000) | type; } void Logic::setSpriteShading(uint32 sprite, uint32 type) { - ObjectGraphic *ob_graphic = (ObjectGraphic *) _vm->_memory->decodePtr(sprite); + ObjectGraphic *ob_graphic = (ObjectGraphic *) decodePtr(sprite); // Remove the previous shading, but don't affect the status lower-word. // Note that drivers may still shade mega frames automatically, even |