X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fflash.h;h=e518b73a654fd0a7561582e7421ca6ec1aee9a48;hb=d24ed5e463e559fd245f16856acc34c28c7aaf09;hp=f93d78b4f103f96425fb68a62cbcbe0899f910bd;hpb=e39bfdb2351f876f09c34dbf96b673faf54e0094;p=swftools.git diff --git a/src/flash.h b/src/flash.h index f93d78b..e518b73 100644 --- a/src/flash.h +++ b/src/flash.h @@ -11,6 +11,8 @@ #define __flash_h__ #include "types.h" +#include "../lib/rfxswf.h" +#include "../lib/log.h" #define TAGID_END 0 #define TAGID_SHOWFRAME 1 @@ -64,7 +66,7 @@ struct CLIPACTIONS; struct swf_tag { - u8 id; + u16 id; u32 length; u8*data; u32 fulllength; // includes id @@ -119,7 +121,9 @@ struct CLIPACTIONS readCLIPACTIONS(); void writeRECT(u8**pos, struct RECT*r); -void swf_init(uchar*newdata, int newlength); +void swf_init(struct reader_t*,uchar*newdata, int newlength); +void MATRIX_init(struct MATRIX*m); + struct flash_header { int version; @@ -139,16 +143,16 @@ struct swffile struct swf_tag* tags; }; -struct flash_header swf_read_header(); -struct RGB readRGB(); -struct RGBA readRGBA(); -struct GRADIENT readGRADIENT(int shape); -struct RECT readRECT(); -struct CXFORM readCXFORM(char alpha); -struct MATRIX readMATRIX(); -unsigned char* readSTRING(); -int swf_read_tag(struct swf_tag* swftag); -int swf_count_tags(); +struct flash_header swf_read_header(struct reader_t*); +struct RGB readRGB(struct reader_t*); +struct RGBA readRGBA(struct reader_t*); +struct GRADIENT readGRADIENT(struct reader_t*,int shape); +struct RECT readRECT(struct reader_t*); +struct CXFORM readCXFORM(struct reader_t*,char alpha); +struct MATRIX readMATRIX(struct reader_t*); +unsigned char* readSTRING(struct reader_t*); +int swf_read_tag(struct reader_t*,struct swf_tag* swftag); +int swf_count_tags(struct reader_t*); struct PlaceObject @@ -185,6 +189,7 @@ void placeobject_init (struct PlaceObject*obj, struct swf_tag*tag); void placeobject_write (struct PlaceObject*obj, struct writer_t*w); void placeobject2_init (struct PlaceObject2*obj, struct swf_tag*tag); +void placeobject2_write (struct PlaceObject2*obj, struct writer_t*w); void read_swf(struct swffile*swf, uchar*data, int length); @@ -194,4 +199,6 @@ char is_sprite_tag (int id); char is_defining_tag (int id); struct swf_tag* duptag(struct swf_tag*tag); +void swf_write_header(struct writer_t*w, struct flash_header*head); + #endif //__flash_h__