aboutsummaryrefslogtreecommitdiff
path: root/saga/animation.h
diff options
context:
space:
mode:
authorJonathan Gray2004-07-31 13:34:43 +0000
committerJonathan Gray2004-07-31 13:34:43 +0000
commit59c88e428b044914fefc48fa6c7bc1e3ac569de7 (patch)
tree5ff5ddc47984d602a02ac40a8e22d8221f8e9f1c /saga/animation.h
parentd53a852c16c45bc75861ce793171cd37436e3ad2 (diff)
downloadscummvm-rg350-59c88e428b044914fefc48fa6c7bc1e3ac569de7.tar.gz
scummvm-rg350-59c88e428b044914fefc48fa6c7bc1e3ac569de7.tar.bz2
scummvm-rg350-59c88e428b044914fefc48fa6c7bc1e3ac569de7.zip
merge animation.h and animation_mod.h into a class
svn-id: r14388
Diffstat (limited to 'saga/animation.h')
-rw-r--r--saga/animation.h28
1 files changed, 24 insertions, 4 deletions
diff --git a/saga/animation.h b/saga/animation.h
index 9cb0f95adb..2f92ff67fa 100644
--- a/saga/animation.h
+++ b/saga/animation.h
@@ -93,11 +93,31 @@ struct R_ANIMINFO {
R_ANIMATION *anim_tbl[R_MAX_ANIMATIONS];
};
-int ANIM_GetNumFrames(const byte *anim_resource, size_t anim_resource_len, uint16 *n_frames);
-int ITE_DecodeFrame(const byte *anim_resource, size_t anim_resource_len, size_t frame_offset, byte *buf, size_t buf_len);
-int IHNM_DecodeFrame(byte *decode_buf, size_t decode_buf_len, const byte *thisf_p,
+enum ANIM_FLAGS {
+ ANIM_LOOP = 0x01,
+ ANIM_ENDSCENE = 0x80 // When animation ends, dispatch scene end event
+};
+
+class Anim {
+public:
+ int reg(void);
+ Anim(void);
+ ~Anim(void);
+ int load(const byte *anim_resdata, size_t anim_resdata_len, uint16 *anim_id_p);
+ int freeId(uint16 anim_id);
+ int play(uint16 anim_id, int vector_time);
+ int link(uint16 anim_id1, uint16 anim_id2);
+ int setFlag(uint16 anim_id, uint16 flag);
+ int setFrameTime(uint16 anim_id, int time);
+ int reset(void);
+private:
+ int getNumFrames(const byte *anim_resource, size_t anim_resource_len, uint16 *n_frames);
+ int ITE_DecodeFrame(const byte *anim_resource, size_t anim_resource_len, size_t frame_offset, byte *buf, size_t buf_len);
+ int IHNM_DecodeFrame(byte *decode_buf, size_t decode_buf_len, const byte *thisf_p,
size_t thisf_len, const byte **nextf_p, size_t *nextf_len);
-int ANIM_GetFrameOffset(const byte *anim_resource, size_t anim_resource_len, uint16 find_frame, size_t *frame_offset);
+ int getFrameOffset(const byte *anim_resource, size_t anim_resource_len, uint16 find_frame, size_t *frame_offset);
+};
+
static void CF_anim_info(int argc, char *argv[]);
} // End of namespace Saga