diff options
author | Paul Gilbert | 2010-05-31 12:10:30 +0000 |
---|---|---|
committer | Paul Gilbert | 2010-05-31 12:10:30 +0000 |
commit | 088e6456ea4d009b8ab0c91176c84dce34a8ea41 (patch) | |
tree | 0789fe834b9a6fd72ff90d276ec9912c4556134f /engines/m4/animation.h | |
parent | 3f4302214c334a590b8428fe7ae32c76e64b6ed5 (diff) | |
download | scummvm-rg350-088e6456ea4d009b8ab0c91176c84dce34a8ea41.tar.gz scummvm-rg350-088e6456ea4d009b8ab0c91176c84dce34a8ea41.tar.bz2 scummvm-rg350-088e6456ea4d009b8ab0c91176c84dce34a8ea41.zip |
In progress work implementing the animation player
svn-id: r49347
Diffstat (limited to 'engines/m4/animation.h')
-rw-r--r-- | engines/m4/animation.h | 107 |
1 files changed, 79 insertions, 28 deletions
diff --git a/engines/m4/animation.h b/engines/m4/animation.h index c8be7f5cb3..b7e88f0871 100644 --- a/engines/m4/animation.h +++ b/engines/m4/animation.h @@ -29,39 +29,90 @@ #include "m4/m4.h" #include "m4/graphics.h" #include "m4/assets.h" +#include "m4/mads_views.h" +#include "common/array.h" namespace M4 { -struct AnimationFrame { - uint16 animFrameIndex; - byte u; - byte seriesIndex; - uint16 seriesFrameIndex; - uint16 x, y; - byte v, w; +class MadsView; +class SpriteSlotSubset; + +class AnimMessage { +public: + char msg[70]; + Common::Point pos; + RGB8 rgb1, rgb2; + int kernelMsgIndex; + + int startFrame, endFrame; +}; + +class AnimFrameEntry { +public: + int frameNumber; + int seqIndex; + SpriteSlotSubset spriteSlot; }; -class Animation { - public: - Animation(MadsM4Engine *vm); - ~Animation(); - - void load(const char *filename); - void loadFullScreen(const char *filename); - void start(); - bool updateAnim(); - void stop(); - - private: - bool _playing; - MadsM4Engine *_vm; - int _seriesCount; - int _frameCount; - int _frameEntryCount; - AnimationFrame *_frameEntries; - Common::String *_spriteSeriesNames; - SpriteAsset *_spriteSeries; - int _curFrame, _curFrameEntry; +class AnimMiscEntry { +public: + int soundNum; + int numTicks; + Common::Point posAdjust; +}; + +#define ANIM_SPRITE_SET_SIZE 50 + +enum MadsAnimationFlags {ANIM_CUSTOM_FONT = 0x20}; + +class MadsAnimation: public Animation { +private: + bool _playing; + MadsView *_view; + + int _spriteListCount; + Common::Array<AnimMessage> _messages; + Common::Array<AnimFrameEntry> _frameEntries; + Common::Array<AnimMiscEntry> _miscEntries; + Font *_font; + + uint8 _flags; + int _animMode; + int _roomNumber; + bool _field12; + int _spriteListIndex; + int _scrollX; + int _scrollY; + Common::String _field24; + Common::String _spriteSetNames[10]; + Common::String _lbmFilename; + Common::String _spritesFilename; + Common::String _soundName; + Common::Array<int> _spriteListIndexes; + + int _currentFrame, _oldFrameEntry; + bool _resetFlag; + int _unk1; + bool _skipLoad; + int _unkIndex; + Common::Point _unkList[2]; + uint32 _nextFrameTimer; + int _messageCtr; + int _abortTimers; + AbortTimerMode _abortMode; + uint16 _actionNouns[3]; + + void load1(int frameNumber); + bool MadsAnimation::proc1(SpriteAsset &spriteSet, const Common::Point &pt, int frameNumber); +public: + MadsAnimation(MadsM4Engine *vm, MadsView *view); + ~MadsAnimation(); + + virtual void load(const Common::String &filename); + virtual void start(); + virtual bool update(); + virtual void stop(); + virtual void setCurrentFrame(int frameNumber); }; } // End of namespace M4 |