2 Header file for flash.c
4 Part of the swftools package.
6 Copyright (c) 2001 Matthias Kramm <kramm@quiss.org>
8 This file is distributed under the GPL, see file COPYING for details */
16 #define TAGID_SHOWFRAME 1
17 #define TAGID_DEFINESHAPE 2
18 #define TAGID_PLACEOBJECT 4
19 #define TAGID_REMOVEOBJECT 5
20 #define TAGID_DEFINEBITS 6
21 #define TAGID_DEFINEBUTTON 7
22 #define TAGID_JPEGTABLES 8
23 #define TAGID_BACKGROUNDCOLOR 9
24 #define TAGID_DEFINEFONT 10
25 #define TAGID_DEFINETEXT 11
26 #define TAGID_DOACTION 12
27 #define TAGID_DEFINEFONTINFO 13
28 #define TAGID_DEFINESOUND 14
29 #define TAGID_STARTSOUND 15
30 #define TAGID_DEFINEBUTTONSOUND 17
31 #define TAGID_SOUNDSTREAMHEAD 18
32 #define TAGID_SOUNDSTREAMHEAD2 18
33 #define TAGID_SOUNDSTREAMBLOCK 19
34 #define TAGID_DEFINEBITSLOSSLESS 20
35 #define TAGID_DEFINEBITSJPEG2 21
36 #define TAGID_DEFINESHAPE2 22
37 #define TAGID_DEFINEBUTTONCXFORM 23
38 #define TAGID_PROTECT 24
39 #define TAGID_PLACEOBJECT2 26
40 #define TAGID_REMOVEOBJECT2 28
41 #define TAGID_DEFINESHAPE3 32
42 #define TAGID_DEFINETEXT2 33
43 #define TAGID_DEFINEBUTTON2 34
44 #define TAGID_DEFINEBITSJPEG3 35
45 #define TAGID_DEFINEBITSLOSSLESS2 36
46 #define TAGID_DEFINEEDITTEXT 37
47 #define TAGID_DEFINEMOVIE 38
48 #define TAGID_DEFINESPRITE 39
49 #define TAGID_FRAMELABEL 43
50 #define TAGID_DEFINEMORPHSHAPE 46
51 #define TAGID_DEFINEFONT2 48
52 #define TAGID_EXPORTASSETS 56
53 #define TAGID_IMPORTASSETS 57
54 #define TAGID_ENABLEDEBUGGER 58
70 u32 fulllength; // includes id
71 u8*fulldata; // likewise
101 float rmult, gmult, bmult, amult;
102 float radd, gadd, badd, aadd;
114 struct RECT readRECT();
115 struct RGB readRGB();
116 struct MATRIX readMATRIX();
117 unsigned char* readSTRING();
118 struct CXFORM readCXFORM();
119 struct CLIPACTIONS readCLIPACTIONS();
121 void writeRECT(u8**pos, struct RECT*r);
123 void swf_init(uchar*newdata, int newlength);
128 struct RECT boundingBox;
138 struct flash_header header;
140 struct swf_tag* tags;
143 struct flash_header swf_read_header();
144 struct RGB readRGB();
145 struct RGBA readRGBA();
146 struct GRADIENT readGRADIENT(int shape);
147 struct RECT readRECT();
148 struct CXFORM readCXFORM();
149 struct MATRIX readMATRIX();
150 unsigned char* readSTRING();
151 int swf_read_tag(struct swf_tag* swftag);
152 int swf_count_tags();
159 struct MATRIX matrix;
160 struct CXFORM cxform;
170 u8 hascolortransform;
177 struct MATRIX matrix;
178 struct CXFORM cxform;
185 void placeobject_init (struct PlaceObject*obj, struct swf_tag*tag);
186 void placeobject_write (struct PlaceObject*obj, struct writer_t*w);
188 void placeobject2_init (struct PlaceObject2*obj, struct swf_tag*tag);
190 void read_swf(struct swffile*swf, uchar*data, int length);
192 int getidfromtag(struct swf_tag* tag);
193 void setidintag(struct swf_tag* tag, int id);
194 char is_sprite_tag (int id);
195 char is_defining_tag (int id);
196 struct swf_tag* duptag(struct swf_tag*tag);