aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/assets.h
diff options
context:
space:
mode:
authorPaul Gilbert2014-03-03 20:53:27 -0500
committerPaul Gilbert2014-03-03 20:53:27 -0500
commit3a3a295758a87817e9d66d3c06df56859ef55529 (patch)
tree429deeae20d459baabe3d0b3aa302f9706baff9b /engines/mads/assets.h
parentd8026b9ef72d7ca22721486244309ccd4a003cae (diff)
downloadscummvm-rg350-3a3a295758a87817e9d66d3c06df56859ef55529.tar.gz
scummvm-rg350-3a3a295758a87817e9d66d3c06df56859ef55529.tar.bz2
scummvm-rg350-3a3a295758a87817e9d66d3c06df56859ef55529.zip
MADS: Implemented sequence list, improvements for sprite assets
Diffstat (limited to 'engines/mads/assets.h')
-rw-r--r--engines/mads/assets.h43
1 files changed, 39 insertions, 4 deletions
diff --git a/engines/mads/assets.h b/engines/mads/assets.h
index 5964036789..7a6939b222 100644
--- a/engines/mads/assets.h
+++ b/engines/mads/assets.h
@@ -31,11 +31,27 @@
namespace MADS {
+#define SPRITE_SET_CHAR_INFO 4
+
struct SpriteAssetFrame {
- uint32 stream;
- int x, y, w, h;
- uint32 comp;
- MSprite *frame;
+ uint32 _stream;
+ Common::Rect _bounds;
+ uint32 _comp;
+ MSprite *_frame;
+};
+
+class SpriteSetCharInfo {
+public:
+ SpriteSetCharInfo(Common::SeekableReadStream *s);
+
+ int _totalFrames;
+ int _numEntries;
+ int _frameList2[16];
+ int _frameList[16];
+ int _ticksList[16];
+ int _unk1;
+ int _ticksAmount;
+ int _yScale;
};
class SpriteAsset {
@@ -50,8 +66,26 @@ private:
Common::Array<uint32> _frameOffsets;
Common::Array<SpriteAssetFrame> _frames;
uint32 _frameStartOffset;
+ uint8 _mode;
+ bool _isBackground;
+
+ /**
+ * Load the data for the asset
+ */
+ void load(Common::SeekableReadStream *stream, int flags);
+public:
+ SpriteSetCharInfo *_charInfo;
public:
+ /**
+ * Constructor
+ */
SpriteAsset(MADSEngine *vm, const Common::String &resourceName, int flags);
+
+ /**
+ * Constructor
+ */
+ SpriteAsset(MADSEngine *vm, Common::SeekableReadStream *stream, int flags);
+
int getCount() { return _frameCount; }
int getFrameRate() const { return _frameRate; }
int getPixelSpeed() const { return _pixelSpeed; }
@@ -62,6 +96,7 @@ public:
MSprite *getFrame(int frameIndex);
byte *getPalette() { return _palette; }
int getColorCount() { return _colorCount; }
+ bool isBackground() const { return _isBackground; }
void drawScaled(int frameNumber, MSurface &depthSurface, MSurface &destSurface,
int scale, int depth, const Common::Point &pos);