diff options
author | Paul Gilbert | 2014-03-02 11:38:56 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-03-02 11:38:56 -0500 |
commit | 7912f81f2cef0a3dfad86d1a87d68771c13f7744 (patch) | |
tree | b26a8607a83113833d841f279f2c1a73cd0a3c6e | |
parent | 4bd1217dafbc2c28b731bd58d4ebd7b0b16a712e (diff) | |
download | scummvm-rg350-7912f81f2cef0a3dfad86d1a87d68771c13f7744.tar.gz scummvm-rg350-7912f81f2cef0a3dfad86d1a87d68771c13f7744.tar.bz2 scummvm-rg350-7912f81f2cef0a3dfad86d1a87d68771c13f7744.zip |
MADS: Added skeleton file for animation class
-rw-r--r-- | engines/mads/module.mk | 1 | ||||
-rw-r--r-- | engines/mads/palette.cpp | 6 | ||||
-rw-r--r-- | engines/mads/scene.cpp | 3 | ||||
-rw-r--r-- | engines/mads/scene.h | 3 | ||||
-rw-r--r-- | engines/mads/scene_data.h | 20 |
5 files changed, 25 insertions, 8 deletions
diff --git a/engines/mads/module.mk b/engines/mads/module.mk index 62441ab3c9..94c231e206 100644 --- a/engines/mads/module.mk +++ b/engines/mads/module.mk @@ -6,6 +6,7 @@ MODULE_OBJS := \ nebular/sound_nebular.o \ nebular/nebular_scenes.o \ nebular/nebular_scenes8.o \ + animation.o \ assets.o \ compression.o \ debugger.o \ diff --git a/engines/mads/palette.cpp b/engines/mads/palette.cpp index b26329a65c..aca1298a23 100644 --- a/engines/mads/palette.cpp +++ b/engines/mads/palette.cpp @@ -68,11 +68,9 @@ void PaletteUsage::load(int count, ...) { va_list va; va_start(va, count); - if (count > (int)_data.size()) - _data.resize(count); - + _data.clear(); for (int i = 0; i < count; ++i) - _data[i] = va_arg(va, int); + _data.push_back(va_arg(va, int)); va_end(va); } diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp index af53710c34..eaa1cab7fa 100644 --- a/engines/mads/scene.cpp +++ b/engines/mads/scene.cpp @@ -148,7 +148,8 @@ void Scene::loadScene(int sceneId, const Common::String &prefix, bool palFlag) { int flags = _vm->_game->_v2 ? 0x4101 : 0x4100; if (!_vm->_textWindowStill) flags |= 0x200; - // TODO + _animation = Animation::init(_vm, this); + } void Scene::loadHotspots() { diff --git a/engines/mads/scene.h b/engines/mads/scene.h index 6bbab0fbbd..7a7959e917 100644 --- a/engines/mads/scene.h +++ b/engines/mads/scene.h @@ -29,6 +29,7 @@ #include "mads/assets.h" #include "mads/msurface.h" #include "mads/scene_data.h" +#include "mads/animation.h" namespace MADS { @@ -79,6 +80,7 @@ public: SceneInfo *_sceneInfo; MSurface _backgroundSurface; MSurface _depthSurface; + MSurface _interfaceSurface; bool _animFlag; int _animVal1; int _animCount; @@ -86,6 +88,7 @@ public: Common::Array<RGB4> _animPalData; SceneNodeList _nodes; Common::StringArray _vocabStrings; + Animation *_animation; /** * Constructor diff --git a/engines/mads/scene_data.h b/engines/mads/scene_data.h index 2fe5c849c1..c646215bbf 100644 --- a/engines/mads/scene_data.h +++ b/engines/mads/scene_data.h @@ -50,9 +50,19 @@ enum { VERB_WALKTO = 13 }; +enum MadsActionMode { ACTMODE_NONE = 0, ACTMODE_VERB = 1, ACTMODE_OBJECT = 3, ACTMODE_TALK = 6 }; +enum MadsActionMode2 { ACTMODE2_0 = 0, ACTMODE2_2 = 2, ACTMODE2_4 = 4, ACTMODE2_5 = 5 }; +enum AbortTimerMode { ABORTMODE_0 = 0, ABORTMODE_1 = 1, ABORTMODE_2 = 2 }; + #define DEPTH_BANDS_SIZE 15 #define MAX_ROUTE_NODES 22 +struct ActionDetails { + int verbId; + int objectNameId; + int indirectObjectId; +}; + class VerbInit { public: int _id; @@ -75,15 +85,19 @@ enum SpriteType { ST_FULL_SCREEN_REFRESH = -2, ST_EXPIRED = -1 }; -class SpriteSlot { +class SpriteSlotSubset { public: - SpriteType _spriteType; - int _seqIndex; int _spritesIndex; int _frameNumber; Common::Point _position; int _depth; int _scale; +}; + +class SpriteSlot: public SpriteSlotSubset { +public: + SpriteType _spriteType; + int _seqIndex; public: SpriteSlot(); SpriteSlot(SpriteType type, int seqIndex); |