1 /****************************************************************************
2  *
3  *  Copyright (C) 2005-2006 "Stuart R. Anderson" <anderson@netsweng.com>
4  *
5  *  This program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program; if not, write to the Free Software
17  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  *
19  ****************************************************************************/
20 
21 #ifndef _SWFTYPES_H_
22 #define _SWFTYPES_H_
23 typedef signed char	SI8;	/* Signed  8-bit integer value */
24 typedef signed short	SI16;	/* Signed 16-bit integer value */
25 typedef signed long	SI32;	/* Signed 32-bit integer value */
26 typedef unsigned char	UI8;	/* Unsigned  8-bit integer value */
27 typedef unsigned short	UI16;	/* Unsigned 16-bit integer value */
28 typedef unsigned long	UI32;	/* Unsigned 32-bit integer value */
29 typedef unsigned long 	U30;	/* Unsigned 30-bit variable-length encoded integer value */
30 typedef unsigned long 	U32;	/* Unsigned 32-bit variable-length encoded integer value */
31 typedef signed long	S32;	/* Signed 32-bit variable-length encoded integer value */
32 
33 typedef unsigned long	FIXED;	/* 32-bit 16.16 fixed-point number */
34 typedef unsigned short	FIXED8;	/* 16-bit 8.8 fixed-point number */
35 typedef unsigned long	SB32;	/* Signed bit value */
36 typedef unsigned long	UB32;	/* Unsigned bit value */
37 typedef float		FB32;	/* Signed fixed-point bit value */
38 typedef char	*STRING;/* String */
39 
40 typedef UI8 LANGCODE;
41 typedef UI8 BYTE;
42 typedef SI16 WORD;
43 typedef UI8 BOOLEAN;
44 typedef float		FLOAT;	/* 32-bit IEEE single-precision little endian fp value */
45 typedef double		DOUBLE;	/* 64-bit IEEE double-precision little endian double value */
46 typedef float 		FLOAT16; /* 16-bit IEEE double-precision little endian double value */
47 
48 /* Types to represent Actions */
49 
50 struct SWF_ACTIONRECORD {
51 	UI8	ActionCode;
52 	UI16	Length;
53 	UI32	Offset;
54 };
55 
56 /* v3 actions */
57 
58 struct SWF_ACTIONGOTOFRAME {
59 	UI8	ActionCode;
60 	UI16	Length;
61 	UI32	Offset;
62 	WORD	Frame;
63 };
64 
65 struct SWF_ACTIONGETURL {
66 	UI8	ActionCode;
67 	UI16	Length;
68 	UI32	Offset;
69 	STRING	UrlString;
70 	STRING	TargetString;
71 };
72 
73 struct SWF_ACTIONNEXTFRAME {
74 	UI8	ActionCode;
75 };
76 
77 struct SWF_ACTIONPREVIOUSFRAME {
78 	UI8	ActionCode;
79 };
80 
81 struct SWF_ACTIONPLAY {
82 	UI8	ActionCode;
83 };
84 
85 struct SWF_ACTIONSTOP {
86 	UI8	ActionCode;
87 };
88 
89 struct SWF_ACTIONTOGGLEQUALITY {
90 	UI8	ActionCode;
91 };
92 
93 struct SWF_ACTIONSTOPSOUNDS {
94 	UI8	ActionCode;
95 };
96 
97 struct SWF_ACTIONWAITFORFRAME {
98 	UI8	ActionCode;
99 	UI16	Length;
100 	UI32	Offset;
101 	WORD	Frame;
102 	BYTE	SkipCount;
103 };
104 
105 struct SWF_ACTIONSETTARGET {
106 	UI8	ActionCode;
107 	UI16	Length;
108 	UI32	Offset;
109 	STRING	TargetName;
110 };
111 
112 struct SWF_ACTIONGOTOLABEL {
113 	UI8	ActionCode;
114 	UI16	Length;
115 	UI32	Offset;
116 	STRING	FrameLabel;
117 };
118 
119 /* v4 actions */
120 
121 struct SWF_ACTIONPUSHPARAM {
122 	UI8	ActionCode;
123 	UI16	Length;
124 	UI32	Offset;
125 	UI8	Type;
126 	union {
127 		STRING	String;
128 		FLOAT	Float;
129 		int	RegisterNumber;
130 		int	Boolean;
131 		DOUBLE	Double;
132 		SI32	Integer;
133 		UI8	Constant8;
134 		UI16	Constant16;
135 	} p;
136 };
137 
138 struct SWF_ACTIONPUSH {
139 	UI8	ActionCode;
140 	UI16	Length;
141 	UI32	Offset;
142 	UI16	NumParam;
143 	struct SWF_ACTIONPUSHPARAM *Params;
144 };
145 
146 struct SWF_ACTIONPOP {
147 	UI8	ActionCode;
148 };
149 
150 struct SWF_ACTIONADD {
151 	UI8	ActionCode;
152 };
153 
154 struct SWF_ACTIONSUBTRACT {
155 	UI8	ActionCode;
156 };
157 
158 struct SWF_ACTIONMULTIPLY {
159 	UI8	ActionCode;
160 };
161 
162 struct SWF_ACTIONDIVIDE {
163 	UI8	ActionCode;
164 };
165 
166 struct SWF_ACTIONEQUALS {
167 	UI8	ActionCode;
168 };
169 
170 struct SWF_ACTIONLESS {
171 	UI8	ActionCode;
172 };
173 
174 struct SWF_ACTIONAND {
175 	UI8	ActionCode;
176 };
177 
178 struct SWF_ACTIONOR {
179 	UI8	ActionCode;
180 };
181 
182 struct SWF_ACTIONNOT {
183 	UI8	ActionCode;
184 	BOOLEAN	Boolean;
185 };
186 
187 struct SWF_ACTIONSTRINGEQUALS {
188 	UI8	ActionCode;
189 };
190 
191 struct SWF_ACTIONSTRINGLENGTH {
192 	UI8	ActionCode;
193 };
194 
195 struct SWF_ACTIONSTRINGADD {
196 	UI8	ActionCode;
197 };
198 
199 struct SWF_ACTIONSTRINGEXTRACT {
200 	UI8	ActionCode;
201 };
202 
203 struct SWF_ACTIONSTRINGLESS {
204 	UI8	ActionCode;
205 };
206 
207 struct SWF_ACTIONMBSTRINGLEN {
208 	UI8	ActionCode;
209 };
210 
211 struct SWF_ACTIONMBSTRINGEXTRACT {
212 	UI8	ActionCode;
213 };
214 
215 struct SWF_ACTIONTOINTEGER {
216 	UI8	ActionCode;
217 };
218 
219 struct SWF_ACTIONCHARTOASCII {
220 	UI8	ActionCode;
221 };
222 
223 struct SWF_ACTIONASCIITOCHAR {
224 	UI8	ActionCode;
225 };
226 
227 struct SWF_ACTIONMBCHARTOASCII {
228 	UI8	ActionCode;
229 };
230 
231 struct SWF_ACTIONMBASCIITOCHAR {
232 	UI8	ActionCode;
233 };
234 
235 struct SWF_ACTIONJUMP {
236 	UI8	ActionCode;
237 	UI16	Length;
238 	UI32	Offset;
239 	WORD	BranchOffset;
240 };
241 
242 struct SWF_ACTIONIF {
243 	UI8	ActionCode;
244 	UI16	Length;
245 	UI32	Offset;
246 	WORD	BranchOffset;
247 	int	numActions;
248 	union SWF_ACTION *Actions;
249 };
250 
251 struct SWF_ACTIONCALL {
252 	UI8	ActionCode;
253 	UI16	Length;
254 	UI32	Offset;
255 };
256 
257 struct SWF_ACTIONGETVARIABLE {
258 	UI8	ActionCode;
259 };
260 
261 struct SWF_ACTIONSETVARIABLE {
262 	UI8	ActionCode;
263 };
264 
265 struct SWF_ACTIONGETURL2 {
266 	UI8	ActionCode;
267 	UI16	Length;
268 	UI32	Offset;
269 	union {
270 		struct {
271 			UI8	SendVarsMethod:2;
272 			UI8	Reserved:4;
273 			UI8	LoadTargetFlag:1;
274 			UI8	LoadVariableFlag:1;
275 		} FlagBits;
276 		UI8	Flags;
277 	} f;
278 };
279 
280 struct SWF_ACTIONGOTOFRAME2 {
281 	UI8	ActionCode;
282 	UI16	Length;
283 	UI32	Offset;
284 	union {
285 		struct {
286 			UI8	Reserved:6;
287 			UI8	SceneBiasFlag:1;
288 			UI8	PlayFlag:1;
289 		} FlagBits;
290 		UI8	Flags;
291 	} f;
292 	UI16	SceneBias;
293 };
294 
295 struct SWF_ACTIONSETTARGET2 {
296 	UI8	ActionCode;
297 };
298 
299 struct SWF_ACTIONGETPROPERTY {
300 	UI8	ActionCode;
301 };
302 
303 struct SWF_ACTIONSETPROPERTY {
304 	UI8	ActionCode;
305 };
306 
307 struct SWF_ACTIONCLONESPRITE {
308 	UI8	ActionCode;
309 };
310 
311 struct SWF_ACTIONREMOVESPRITE {
312 	UI8	ActionCode;
313 };
314 
315 struct SWF_ACTIONSTARTDRAG {
316 	UI8	ActionCode;
317 };
318 
319 struct SWF_ACTIONENDDRAG {
320 	UI8	ActionCode;
321 };
322 
323 struct SWF_ACTIONWAITFORFRAME2 {
324 	UI8	ActionCode;
325 	UI16	Length;
326 	UI32	Offset;
327 	UI8	SkipCount;
328 };
329 
330 struct SWF_ACTIONTRACE {
331 	UI8	ActionCode;
332 };
333 
334 struct SWF_ACTIONGETTIME {
335 	UI8	ActionCode;
336 };
337 
338 struct SWF_ACTIONRANDOMNUMBER {
339 	UI8	ActionCode;
340 };
341 
342 
343 /* v5 actions */
344 
345 struct SWF_ACTIONCALLFUNCTION {
346 	UI8	ActionCode;
347 };
348 
349 struct SWF_ACTIONCALLMETHOD {
350 	UI8	ActionCode;
351 };
352 
353 struct SWF_ACTIONCONSTANTPOOL {
354 	UI8	ActionCode;
355 	UI16	Length;
356 	UI32	Offset;
357 	UI16	Count;
358 	STRING	*ConstantPool;
359 };
360 
361 struct SWF_ACTIONDEFINEFUNCTION {
362 	UI8	ActionCode;
363 	UI16	Length;
364 	UI32	Offset;
365 	STRING	FunctionName;
366 	WORD	NumParams;
367 	STRING	*Params;
368 	WORD	CodeSize;
369 	int	numActions;
370 	union SWF_ACTION *Actions;
371 };
372 
373 struct SWF_ACTIONWITH {
374 	UI8	ActionCode;
375 	UI16	Length;
376 	UI32	Offset;
377 	UI16	Size;
378 	int	numActions;
379 	union SWF_ACTION *Actions;
380 };
381 
382 struct SWF_ACTIONSTOREREGISTER {
383 	UI8	ActionCode;
384 	UI16	Length;
385 	UI32	Offset;
386 	UI8	Register;
387 };
388 
389 /* v6 actions */
390 struct SWF_ACTIONINSTANCEOF {
391 	UI8	ActionCode;
392 };
393 
394 struct SWF_ACTIONENUMERATE2 {
395 	UI8	ActionCode;
396 };
397 
398 struct SWF_ACTIONSTRICTEQUALS {
399 	UI8	ActionCode;
400 };
401 
402 struct SWF_ACTIONGREATER {
403 	UI8	ActionCode;
404 };
405 
406 struct SWF_ACTIONSTRINGGREATER {
407 	UI8	ActionCode;
408 };
409 
410 /* v7 actions */
411 struct REGISTERPARAM {
412 	UI8	Register;
413 	STRING	ParamName;
414 };
415 
416 struct SWF_ACTIONDEFINEFUNCTION2 {
417 	UI8	ActionCode;
418 	UI16	Length;
419 	UI32	Offset;
420 	STRING	FunctionName;
421 	UI16	NumParams;
422 	UI8	RegisterCount;
423 	UI16	PreloadParentFlag:1;
424 	UI16	PreloadRootFlag:1;
425 	UI16	SuppressSuperFlag:1;
426 	UI16	PreloadSuperFlag:1;
427 	UI16	SuppressArgumentsFlag:1;
428 	UI16	PreloadArgumentsFlag:1;
429 	UI16	SuppressThisFlag:1;
430 	UI16	PreloadThisFlag:1;
431 	UI16	Reserved:7;
432 	UI16	PreloadGlobalFlag:1;
433 	struct REGISTERPARAM	*Params;
434 	UI16	CodeSize;
435 	int	numActions;
436 	union SWF_ACTION *Actions;
437 };
438 
439 struct SWF_ACTIONTRY {
440 	UI8	ActionCode;
441 	UI16	Length;
442 	UI32	Offset;
443 	UI8	Reserved:5;
444 	UI8	CatchInRegisterFlag:1;
445 	UI8	FinallyBlockFlag:1;
446 	UI8	CatchBlockFlag:1;
447 	UI16	TrySize;
448 	UI16	CatchSize;
449 	UI16	FinallySize;
450 	STRING	CatchName;
451 	UI8	CatchRegister;
452 	int	numTryActs;
453 	union SWF_ACTION *TryActs;
454 	int	numCatchActs;
455 	union SWF_ACTION *CatchActs;
456 	int	numFinallyActs;
457 	union SWF_ACTION *FinallyActs;
458 };
459 
460 typedef union SWF_ACTION {
461 	/* v3 actions */
462 	struct SWF_ACTIONRECORD SWF_ACTIONRECORD;
463 	struct SWF_ACTIONGOTOFRAME SWF_ACTIONGOTOFRAME;
464 	struct SWF_ACTIONGETURL SWF_ACTIONGETURL;
465 	struct SWF_ACTIONNEXTFRAME SWF_ACTIONNEXTFRAME;
466 	struct SWF_ACTIONPREVIOUSFRAME SWF_ACTIONPREVIOUSFRAME;
467 	struct SWF_ACTIONPLAY SWF_ACTIONPLAY;
468 	struct SWF_ACTIONSTOP SWF_ACTIONSTOP;
469 	struct SWF_ACTIONTOGGLEQUALITY SWF_ACTIONTOGLEQUALITY;
470 	struct SWF_ACTIONSTOPSOUNDS SWF_ACTIONSTOPSOUNDS;
471 	struct SWF_ACTIONWAITFORFRAME SWF_ACTIONWAITFORFRAME;
472 	struct SWF_ACTIONSETTARGET SWF_ACTIONSETTARGET;
473 	struct SWF_ACTIONGOTOLABEL SWF_ACTIONGOTOLABEL;
474 	/* v4 actions */
475 	struct SWF_ACTIONPUSH SWF_ACTIONPUSH;
476 	struct SWF_ACTIONPOP SWF_ACTIONPOP;
477 	struct SWF_ACTIONADD SWF_ACTIONADD;
478 	struct SWF_ACTIONSUBTRACT SWF_ACTIONSUBTRACT;
479 	struct SWF_ACTIONMULTIPLY SWF_ACTIONMULTIPLY;
480 	struct SWF_ACTIONDIVIDE SWF_ACTIONDIVIDE;
481 	struct SWF_ACTIONEQUALS SWF_ACTIONEQUALS;
482 	struct SWF_ACTIONLESS SWF_ACTIONLESS;
483 	struct SWF_ACTIONAND SWF_ACTIONAND;
484 	struct SWF_ACTIONOR SWF_ACTIONOR;
485 	struct SWF_ACTIONNOT SWF_ACTIONNOT;
486 	struct SWF_ACTIONSTRINGEQUALS SWF_ACTIONSTRINGEQUALS;
487 	struct SWF_ACTIONSTRINGLENGTH SWF_ACTIONSTRINGLENGTH;
488 	struct SWF_ACTIONSTRINGADD SWF_ACTIONSTRINGADD;
489 	struct SWF_ACTIONSTRINGEXTRACT SWF_ACTIONSTRINGEXTRACT;
490 	struct SWF_ACTIONSTRINGLESS SWF_ACTIONSTRINGLESS;
491 	struct SWF_ACTIONMBSTRINGLEN SWF_ACTIONMBSTRINGLEN;
492 	struct SWF_ACTIONMBSTRINGEXTRACT SWF_ACTIONMBSTRINGEXTRACT;
493 	struct SWF_ACTIONTOINTEGER SWF_ACTIONTOINTEGER;
494 	struct SWF_ACTIONCHARTOASCII SWF_ACTIONCHARTOASCII;
495 	struct SWF_ACTIONASCIITOCHAR SWF_ACTIONASCIITOCHAR;
496 	struct SWF_ACTIONMBCHARTOASCII SWF_ACTIONMBCHARTOASCII;
497 	struct SWF_ACTIONMBASCIITOCHAR SWF_ACTIONMBASCIITOCHAR;
498 	struct SWF_ACTIONJUMP SWF_ACTIONJUMP;
499 	struct SWF_ACTIONIF SWF_ACTIONIF;
500 	struct SWF_ACTIONCALL SWF_ACTIONCALL;
501 	struct SWF_ACTIONGETVARIABLE SWF_ACTIONGETVARIABLE;
502 	struct SWF_ACTIONSETVARIABLE SWF_ACTIONSETVARIABLE;
503 	struct SWF_ACTIONGETURL2 SWF_ACTIONGETURL2;
504 	struct SWF_ACTIONGOTOFRAME2 SWF_ACTIONGOTOFRAME2;
505 	struct SWF_ACTIONSETTARGET2 SWF_ACTIONSETTARGET2;
506 	struct SWF_ACTIONGETPROPERTY SWF_ACTIONGETPROPERTY;
507 	struct SWF_ACTIONSETPROPERTY SWF_ACTIONSETPROPERTY;
508 	struct SWF_ACTIONCLONESPRITE SWF_ACTIONCLONESPRITE;
509 	struct SWF_ACTIONREMOVESPRITE SWF_ACTIONREMOVESPRITE;
510 	struct SWF_ACTIONSTARTDRAG SWF_ACTIONSTARTDRAG;
511 	struct SWF_ACTIONENDDRAG SWF_ACTIONENDDRAG;
512 	struct SWF_ACTIONWAITFORFRAME2 SWF_ACTIONWAITFORFRAME2;
513 	struct SWF_ACTIONTRACE SWF_ACTIONTRACE;
514 	struct SWF_ACTIONGETTIME SWF_ACTIONGETTIME;
515 	struct SWF_ACTIONRANDOMNUMBER SWF_ACTIONRANDOMNUMBER;
516 	/* v5 actions */
517 	struct SWF_ACTIONCALLFUNCTION SWF_ACTIONCALLFUNCTION;
518 	struct SWF_ACTIONCALLMETHOD SWF_ACTIONCALLMETHOD;
519 	struct SWF_ACTIONCONSTANTPOOL SWF_ACTIONCONSTANTPOOL;
520 	struct SWF_ACTIONDEFINEFUNCTION SWF_ACTIONDEFINEFUNCTION;
521 	struct SWF_ACTIONWITH SWF_ACTIONWITH;
522 	struct SWF_ACTIONSTOREREGISTER SWF_ACTIONSTOREREGISTER;
523 	/* v6 actions */
524 	struct SWF_ACTIONINSTANCEOF SWF_ACTIONINSTANCEOF;
525 	struct SWF_ACTIONENUMERATE2 SWF_ACTIONENUMERATE2;
526 	struct SWF_ACTIONSTRICTEQUALS SWF_ACTIONSTRICTEQUALS;
527 	struct SWF_ACTIONGREATER SWF_ACTIONGREATER;
528 	struct SWF_ACTIONSTRINGGREATER SWF_ACTIONSTRINGGREATER;
529 	/* v7 actions */
530 	struct SWF_ACTIONDEFINEFUNCTION2 SWF_ACTIONDEFINEFUNCTION2;
531 	struct SWF_ACTIONTRY SWF_ACTIONTRY;
532 } SWF_ACTION;
533 
534 
535 
536 /* Types Flash Types */
537 
538 typedef struct SWF_RGBA {
539 	UI8	red;
540 	UI8	green;
541 	UI8	blue;
542 	UI8	alpha;
543 } SWF_RGBA;
544 
545 typedef struct SWF_RECT {
546 	UI8	Nbits:5;
547 	SB32	Xmin;
548 	SB32	Xmax;
549 	SB32	Ymin;
550 	SB32	Ymax;
551 } SWF_RECT;
552 
553 typedef struct SWF_GRADIENTRECORD {
554 	UI8		Ratio;
555 	SWF_RGBA	Color;
556 } SWF_GRADIENTRECORD;
557 
558 typedef struct SWF_GRADIENT {
559 	UI8	SpreadMode:2;
560 	UI8	InterpolationMode:2;
561 	UI8	NumGradients:4;
562 	SWF_GRADIENTRECORD	GradientRecords[15];
563 } SWF_GRADIENT;
564 
565 typedef struct SWF_FOCALGRADIENT {
566 	UI8     SpreadMode:2;
567 	UI8     InterpolationMode:2;
568 	UI8     NumGradients:4;
569 	SWF_GRADIENTRECORD      GradientRecords[15];
570 	FIXED8 	FocalPoint;
571 } SWF_FOCALGRADIENT;
572 
573 typedef struct SWF_MATRIX {
574 	UI8	HasScale:1;
575 	UI8	NScaleBits:5;
576 	FB32	ScaleX;
577 	FB32	ScaleY;
578 	UI8	HasRotate:1;
579 	UI8	NRotateBits:5;
580 	FB32	RotateSkew0;
581 	FB32	RotateSkew1;
582 	UI8	NTranslateBits:5;
583 	SB32	TranslateX;
584 	SB32	TranslateY;
585 } SWF_MATRIX;
586 
587 typedef struct SWF_CXFORM {
588 	UI8	HasAddTerms:1;
589 	UI8	HasMultTerms:1;
590 	UI8	Nbits:4;
591 	SI32	RedMultTerm;
592 	SI32	GreenMultTerm;
593 	SI32	BlueMultTerm;
594 	SI32	RedAddTerm;
595 	SI32	GreenAddTerm;
596 	SI32	BlueAddTerm;
597 } SWF_CXFORM;
598 
599 typedef struct SWF_CXFORMWITHALPHA {
600 	UI8	HasAddTerms:1;
601 	UI8	HasMultTerms:1;
602 	UI8	Nbits:4;
603 	SI32	RedMultTerm;
604 	SI32	GreenMultTerm;
605 	SI32	BlueMultTerm;
606 	SI32	AlphaMultTerm;
607 	SI32	RedAddTerm;
608 	SI32	GreenAddTerm;
609 	SI32	BlueAddTerm;
610 	SI32	AlphaAddTerm;
611 } SWF_CXFORMWITHALPHA;
612 
613 typedef struct SWF_BLURFILTER {
614 	FIXED	BlurX;
615 	FIXED	BlurY;
616 	UI8	Passes:5;
617 	UI8	Reserved:3;
618 } SWF_BLURFILTER;
619 
620 typedef struct SWF_BEVELFILTER {
621 	SWF_RGBA	ShadowColor;
622 	SWF_RGBA	HighlightColor;
623 	FIXED		BlurX;
624 	FIXED		BlurY;
625 	FIXED		Angle;
626 	FIXED		Distance;
627 	FIXED8		Strength;
628 	UI8		InnerShadow:1;
629 	UI8		Kockout:1;
630 	UI8		CompositeSource:1;
631 	UI8		OnTop:1;
632 	UI8		Passes:4;
633 } SWF_BEVELFILTER;
634 
635 typedef struct SWF_GRADIENTFILTER
636 {
637 	UI8		NumColors;
638 	SWF_RGBA*	GradientColors;
639 	UI8*		GradientRatio;
640 	FIXED		BlurX;
641 	FIXED		BlurY;
642 	FIXED		Angle;
643 	FIXED		Distance;
644 	FIXED8		Strength;
645 	UI8		InnerShadow:1;
646 	UI8		Kockout:1;
647 	UI8		CompositeSource:1;
648 	UI8		OnTop:1;
649 	UI8		Passes:4;
650 } SWF_GRADIENTFILTER;
651 
652 typedef struct SWF_GLOWFILTER {
653 	SWF_RGBA 	GlowColor;
654 	FIXED		BlurX;
655 	FIXED		BlurY;
656 	FIXED8		Strength;
657 	UI8		InnerGlow:1;
658 	UI8		Kockout:1;
659 	UI8		CompositeSource:1;
660 	UI8		Passes:5;
661 } SWF_GLOWFILTER;
662 
663 typedef struct SWF_CONVOLUTIONFILTER {
664 	UI8		MatrixX;
665 	UI8		MatrixY;
666 	FLOAT		Divisor;
667 	FLOAT		Bias;
668 	FLOAT*		Matrix;
669 	SWF_RGBA	DefaultColor;
670 	UI8		Reserved:6;
671 	UI8		Clamp:1;
672 	UI8		PreserveAlpha:1;
673 } SWF_CONVOLUTIONFILTER;
674 
675 typedef struct SWF_COLORMATRIXFILTER
676 {
677 	FLOAT Matrix[20];
678 } SWF_COLORMATRIXFILTER;
679 
680 typedef struct SWF_DROPSHADOWFILTER {
681 	SWF_RGBA	DropShadowColor;
682 	FIXED		BlurX;
683 	FIXED		BlurY;
684 	FIXED		Angle;
685 	FIXED		Distance;
686 	FIXED8		Strength;
687 	UI8		InnerShadow:1;
688 	UI8		Kockout:1;
689 	UI8		CompositeSource:1;
690 	UI8		Passes:5;
691 } SWF_DROPSHADOWFILTER;
692 
693 enum
694 {
695         FILTER_DROPSHADOW,
696         FILTER_BLUR,
697         FILTER_GLOW,
698         FILTER_BEVEL,
699         FILTER_GRADIENTGLOW,
700         FILTER_CONVOLUTION,
701         FILTER_COLORMATRIX,
702         FILTER_GRADIENTBEVEL
703 };
704 
705 typedef struct SWF_FILTER {
706 	UI8 	FilterId;
707 	union {
708 		SWF_DROPSHADOWFILTER dropShadow;
709 		SWF_BLURFILTER blur;
710 		SWF_GLOWFILTER glow;
711 		SWF_BEVELFILTER bevel;
712 		SWF_GRADIENTFILTER gradientGlow;
713 		SWF_CONVOLUTIONFILTER convolution;
714 		SWF_COLORMATRIXFILTER colorMatrix;
715 		SWF_GRADIENTFILTER gradientBevel;
716 	} filter;
717 } SWF_FILTER;
718 
719 typedef struct SWF_FILTERLIST {
720 	UI8 		NumberOfFilters;
721 	SWF_FILTER 	*Filter;
722 } SWF_FILTERLIST;
723 
724 typedef struct SWF_BUTTONRECORD {
725 	UI8	ButtonReserved:2;
726 	UI8	ButtonHasBlendMode:1;
727 	UI8	ButtonHasFilterList:1;
728 	UI8	ButtonStateHitTest:1;
729 	UI8	ButtonStateDown:1;
730 	UI8	ButtonStateOver:1;
731 	UI8	ButtonStateUp:1;
732 	UI16	CharacterId;
733 	UI16	PlaceDepth;
734 	SWF_MATRIX	PlaceMatrix;
735 	SWF_CXFORMWITHALPHA	ColorTransform;
736 	SWF_FILTERLIST	FilterList;
737 	UI8 	BlendMode;
738 } SWF_BUTTONRECORD;
739 
740 typedef struct SWF_BUTTONCONDACTION {
741 	UI16	CondActionSize;
742 	UI16	CondIdleToOverDown:1;
743 	UI16	CondOutDownToIdle:1;
744 	UI16	CondOutDownToOverDown:1;
745 	UI16	CondOverDownToOutDown:1;
746 	UI16	CondOverDownToOverUp:1;
747 	UI16	CondOverUpToOverDown:1;
748 	UI16	CondOverUpToIdle:1;
749 	UI16	CondIdleToOverUp:1;
750 	UI16	CondKeyPress:7;
751 	UI16	CondOverDownToIdle:1;
752 	int	numActions;
753 	SWF_ACTION *Actions;
754 } SWF_BUTTONCONDACTION;
755 
756 typedef struct SWF_CLIPEVENTFLAGS {
757 	UI8	ClipEventKeyUp:1;
758 	UI8	ClipEventKeyDown:1;
759 	UI8	ClipEventMouseUp:1;
760 	UI8	ClipEventMouseDown:1;
761 	UI8	ClipEventMouseMove:1;
762 	UI8	ClipEventUnload:1;
763 	UI8	ClipEventEnterFrame:1;
764 	UI8	ClipEventLoad:1;
765 	UI8	ClipEventDragOver:1;
766 	UI8	ClipEventRollOut:1;
767 	UI8	ClipEventRollOver:1;
768 	UI8	ClipEventReleaseOutside:1;
769 	UI8	ClipEventRelease:1;
770 	UI8	ClipEventPress:1;
771 	UI8	ClipEventInitialize:1;
772 	UI8	ClipEventData:1;
773 	UI8	Reserved:5;
774 	UI8	ClipEventConstruct:1;
775 	UI8	ClipEventKeyPress:1;
776 	UI8	ClipEventDragOut:1;
777 	UI8	Reserved2:8;
778 } SWF_CLIPEVENTFLAGS;
779 
780 typedef struct SWF_CLIPACTIONRECORD {
781 	SWF_CLIPEVENTFLAGS	EventFlag;
782 	UI32	ActionRecordSize;
783 	UI8	KeyCode;
784 	int     numActions;
785 	SWF_ACTION	*Actions;
786 } SWF_CLIPACTIONRECORD;
787 
788 typedef struct SWF_CLIPACTIONS {
789 	UI16	Reserved;
790 	SWF_CLIPEVENTFLAGS	AllEventFlags;
791 	int	NumClipRecords;
792 	SWF_CLIPACTIONRECORD	*ClipActionRecords;
793 	UI32	ClipActionEndFlag;
794 } SWF_CLIPACTIONS;
795 
796 typedef struct SWF_FILLSTYLE {
797 	UI8		FillStyleType;
798 	SWF_RGBA	Color;
799 	SWF_MATRIX	GradientMatrix;
800 	SWF_GRADIENT	Gradient;
801 	SWF_FOCALGRADIENT FocalGradient;
802 	UI16		BitmapId;
803 	SWF_MATRIX	BitmapMatrix;
804 } SWF_FILLSTYLE;
805 
806 typedef struct SWF_FILLSTYLEARRAY {
807 	UI8	FillStyleCount;
808 	UI16	FillStyleCountExtended;
809 	SWF_FILLSTYLE	*FillStyles;
810 } SWF_FILLSTYLEARRAY;
811 
812 typedef struct SWF_LINESTYLE {
813 	UI16		Width;
814 	SWF_RGBA	Color;
815 } SWF_LINESTYLE;
816 
817 typedef struct SWF_LINESTYLE2 {
818 	UI16		Width;
819 	UI8		StartCapStyle:2;
820 	UI8		JoinStyle:2;
821 	UI8		HasFillFlag:1;
822 	UI8		NoHScaleFlag:1;
823 	UI8		NoVScaleFlag:1;
824 	UI8		PixelHintingFlag:1;
825 	UI8		Reserved:5;
826 	UI8		NoClose:1;
827 	UI8		EndCapStyle:2;
828 	UI16		MiterLimitFactor;
829 	SWF_RGBA	Color;
830 	SWF_FILLSTYLE	FillType;
831 } SWF_LINESTYLE2;
832 
833 typedef struct SWF_LINESTYLEARRAY {
834 	UI16	LineStyleCount;
835 	SWF_LINESTYLE	*LineStyles;
836 	SWF_LINESTYLE2	*LineStyles2;
837 } SWF_LINESTYLEARRAY;
838 
839 typedef struct SWF_ENDSHAPERECORD {
840 	UI16	TypeFlag:1;
841 	UI16	EndOfShape:5;
842 } SWF_ENDSHAPERECORD;
843 
844 typedef struct SWF_STYLECHANGERECORD {
845 	UI16	TypeFlag:1;
846 	UI16	StateNewStyles:1;
847 	UI16	StateLineStyle:1;
848 	UI16	StateFillStyle1:1;
849 	UI16	StateFillStyle0:1;
850 	UI16	StateMoveTo:1;
851 	UI16	MoveBits:5;
852 	SB32	MoveDeltaX;
853 	SB32	MoveDeltaY;
854 	UB32	FillStyle0;
855 	UB32	FillStyle1;
856 	UB32	LineStyle;
857 	SWF_FILLSTYLEARRAY	FillStyles;
858 	SWF_LINESTYLEARRAY	LineStyles;
859 	UI8	NumFillBits:4;
860 	UI8	NumLineBits:4;
861 } SWF_STYLECHANGERECORD;
862 
863 typedef struct SWF_CURVEDEDGERECORD {
864 	UI16	TypeFlag:1;
865 	UI16	StraightFlag:1;
866 	UI16	NumBits:4;
867 	SB32	ControlDeltaX;
868 	SB32	ControlDeltaY;
869 	SB32	AnchorDeltaX;
870 	SB32	AnchorDeltaY;
871 } SWF_CURVEDEDGERECORD;
872 
873 typedef struct SWF_STRAIGHTEDGERECORD {
874 	UI16	TypeFlag:1;
875 	UI16	StraightEdge:1;
876 	UI16	NumBits:4;
877 	UI16	GeneralLineFlag:1;
878 	SB32	DeltaX;
879 	SB32	DeltaY;
880 	SI8	VertLineFlag:1;
881 	SB32	VLDeltaX;
882 	SB32	VLDeltaY;
883 } SWF_STRAIGHTEDGERECORD;
884 
885 typedef union SWF_SHAPERECORD {
886 	SWF_ENDSHAPERECORD	EndShape;
887 	SWF_STYLECHANGERECORD	StyleChange;
888 	SWF_STRAIGHTEDGERECORD	StraightEdge;
889 	SWF_CURVEDEDGERECORD	CurvedEdge;
890 } SWF_SHAPERECORD;
891 
892 typedef struct SWF_MORPHGRADIENTRECORD {
893 	UI8		StartRatio;
894 	SWF_RGBA	StartColor;
895 	UI8		EndRatio;
896 	SWF_RGBA	EndColor;
897 } SWF_MORPHGRADIENTRECORD;
898 
899 typedef struct SWF_MORPHGRADIENT {
900 	UI8	NumGradients;
901 	SWF_MORPHGRADIENTRECORD	GradientRecords[8];
902 } SWF_MORPHGRADIENT;
903 
904 typedef struct SWF_MORPHFILLSTYLE {
905 	UI8		FillStyleType;
906 	SWF_RGBA	StartColor;
907 	SWF_RGBA	EndColor;
908 	SWF_MATRIX	StartGradientMatrix;
909 	SWF_MATRIX	EndGradientMatrix;
910 	SWF_MORPHGRADIENT	Gradient;
911 	UI16		BitmapId;
912 	SWF_MATRIX	StartBitmapMatrix;
913 	SWF_MATRIX	EndBitmapMatrix;
914 } SWF_MORPHFILLSTYLE;
915 
916 typedef struct SWF_MORPHFILLSTYLES {
917 	UI8	FillStyleCount;
918 	UI16	FillStyleCountExtended;
919 	SWF_MORPHFILLSTYLE	*FillStyles;
920 } SWF_MORPHFILLSTYLES;
921 
922 
923 typedef struct SWF_MORPHLINESTYLE {
924 	UI16		StartWidth;
925 	UI16		EndWidth;
926 	SWF_RGBA	StartColor;
927 	SWF_RGBA	EndColor;
928 } SWF_MORPHLINESTYLE;
929 
930 typedef struct SWF_MORPHLINESTYLE2 {
931 	UI16		StartWidth;
932 	UI16		EndWidth;
933 	UI16		StartCapStyle:2;
934 	UI16		JoinStyle:2;
935 	UI16		HasFillFlag:2;
936 	UI16		NoHScaleFlag:1;
937 	UI16		NoVScaleFlag:1;
938 	UI16		PixelHintingFlag:1;
939 	UI16		Reserved:5;
940 	UI16		NoClose:1;
941 	UI16		EndCapStyle:2;
942 	UI16		MiterLimitFactor;
943 	SWF_RGBA	StartColor;
944 	SWF_RGBA	EndColor;
945 	SWF_MORPHFILLSTYLE FillType;
946 } SWF_MORPHLINESTYLE2;
947 
948 typedef struct SWF_MORPHLINESTYLES {
949 	UI8	LineStyleCount;
950 	UI16	LineStyleCountExtended;
951 	SWF_MORPHLINESTYLE	*LineStyles;
952 	SWF_MORPHLINESTYLE2	*LineStyles2;
953 } SWF_MORPHLINESTYLES;
954 
955 typedef struct SWF_SHAPE {
956 	UI8	NumFillBits:4;
957 	UI8	NumLineBits:4;
958 	int	NumShapeRecords;
959 	SWF_SHAPERECORD	*ShapeRecords;
960 } SWF_SHAPE;
961 
962 typedef struct SWF_SHAPEWITHSTYLE {
963 	SWF_FILLSTYLEARRAY	FillStyles;
964 	SWF_LINESTYLEARRAY	LineStyles;
965 	UI8	NumFillBits:4;
966 	UI8	NumLineBits:4;
967 	int	NumShapeRecords;
968 	SWF_SHAPERECORD	*ShapeRecords;
969 } SWF_SHAPEWITHSTYLE;
970 
971 typedef struct SWF_GLYPHENTRY {
972 	UI32	*GlyphIndex;
973 	UI32	*GlyphAdvance;
974 } SWF_GLYPHENTRY;
975 
976 typedef struct SWF_TEXTRECORD {
977 	UI8	TextRecordType:1;
978 	UI8	StyleFlagsReserved:3;
979 	UI8	StyleFlagHasFont:1;
980 	UI8	StyleFlagHasColor:1;
981 	UI8	StyleFlagHasYOffset:1;
982 	UI8	StyleFlagHasXOffset:1;
983 	UI16	FontID;
984 	SWF_RGBA	TextColor;
985 	SI16	XOffset;
986 	SI16	YOffset;
987 	UI16	TextHeight;
988 	UI8	GlyphCount;
989 	SWF_GLYPHENTRY *GlyphEntries;
990 } SWF_TEXTRECORD;
991 
992 typedef struct SWF_SOUNDENVELOPE {
993 	UI32	Pos44;
994 	UI16	LeftLevel;
995 	UI16	RightLevel;
996 } SWF_SOUNDENVELOPE;
997 
998 typedef struct SWF_SOUNDINFO {
999 	UI8	Reserved:2;
1000 	UI8	SyncStop:1;
1001 	UI8	SyncNoMultiple:1;
1002 	UI8	HasEnvelope:1;
1003 	UI8	HasLoops:1;
1004 	UI8	HasOutPoint:1;
1005 	UI8	HasInPoint:1;
1006 	UI32	InPoint;
1007 	UI32	OutPoint;
1008 	UI16	LoopCount;
1009 	UI8	EnvPoints;
1010 	SWF_SOUNDENVELOPE *EnvelopeRecords;
1011 } SWF_SOUNDINFO;
1012 
1013 
1014 
1015 /* Types to represent Blocks */
1016 
1017 struct SWF_CHARACTERSET
1018 {
1019   int chid;
1020 };
1021 
1022 struct SWF_DEFINEBITS
1023 {
1024   UI16 CharacterID;
1025   int JPEGDataSize;
1026   UI8 *JPEGData;
1027 };
1028 
1029 struct SWF_DEFINEBITSJPEG2
1030 {
1031   UI16 CharacterID;
1032   int JPEGDataSize;
1033   UI8 *JPEGData;
1034 };
1035 
1036 struct SWF_DEFINEBITSJPEG3
1037 {
1038   UI16 CharacterID;
1039   UI32 AlphaDataOffset;
1040   UI8 *JPEGData;
1041   int AlphaDataSize;
1042   UI8 *BitmapAlphaData;
1043 };
1044 
1045 // XXX: obsolete
1046 struct SWF_DEFINEBITSPTR
1047 {
1048   int chid;
1049 };
1050 
1051 struct SWF_DEFINEBUTTON
1052 {
1053   UI16 ButtonId;
1054   SWF_BUTTONRECORD *Characters;
1055   int numCharacters;
1056   UI8 CharacterEndFlag;
1057   int numActions;
1058   SWF_ACTION *Actions;
1059   UI8 ActionEndFlag;
1060 };
1061 
1062 struct SWF_DEFINEBUTTON2
1063 {
1064   UI16 Buttonid;
1065   UI8 ReservedFlags:7;
1066   UI8 TrackAsMenu:1;
1067   UI16 ActionOffset;
1068   int numCharacters;
1069   SWF_BUTTONRECORD *Characters;
1070   UI8 CharacterEndFlag;
1071   int numActions;
1072   SWF_BUTTONCONDACTION *Actions;
1073 };
1074 
1075 struct SWF_DEFINEBUTTONCXFORM
1076 {
1077   UI16 ButtonId;
1078   SWF_CXFORM ButtonColorTransform;
1079 };
1080 
1081 struct SWF_DEFINEBUTTONSOUND
1082 {
1083   UI16 CharacterID;
1084   UI16 ButtonSoundChar0;
1085   SWF_SOUNDINFO ButtonSoundInfo0;
1086   UI16 ButtonSoundChar1;
1087   SWF_SOUNDINFO ButtonSoundInfo1;
1088   UI16 ButtonSoundChar2;
1089   SWF_SOUNDINFO ButtonSoundInfo2;
1090   UI16 ButtonSoundChar3;
1091   SWF_SOUNDINFO ButtonSoundInfo3;
1092 };
1093 
1094 
1095 // XXX: obsolete ?
1096 struct SWF_DEFINECOMMANDOBJ
1097 {
1098   int chid;
1099 };
1100 
1101 struct SWF_DEFINEEDITTEXT
1102 {
1103   UI16 CharacterID;
1104   SWF_RECT Bounds;
1105   UI8	HasText:1;
1106   UI8	WordWrap:1;
1107   UI8	Multiline:1;
1108   UI8	Password:1;
1109   UI8	ReadOnly:1;
1110   UI8	HasTextColor:1;
1111   UI8	HasMaxLength:1;
1112   UI8	HasFont:1;
1113   UI8	HasFontClass:1;
1114   UI8	AutoSize:1;
1115   UI8	HasLayout:1;
1116   UI8	NoSelect:1;
1117   UI8	Border:1;
1118   UI8	WasStatic:1;
1119   UI8	HTML:1;
1120   UI8	UseOutlines:1;
1121   UI16	FontID;
1122   STRING FontClass;
1123   UI16	FontHeight;
1124   SWF_RGBA	TextColor;
1125   UI16	MaxLength;
1126   UI8	Align;
1127   UI16	LeftMargin;
1128   UI16	RightMargin;
1129   UI16	Indent;
1130   UI16	Leading;
1131   STRING	VariableName;
1132   STRING	InitialText;
1133 };
1134 
1135 struct SWF_DEFINEFONT
1136 {
1137   UI16 FontID;
1138   UI16 NumGlyphs;
1139   UI16 *OffsetTable;
1140   SWF_SHAPE *GlyphShapeTable;
1141 };
1142 
1143 struct SWF_KERNINGRECORD
1144 {
1145   UI16 FontKerningCode1;
1146   UI16 FontKerningCode2;
1147   SI16 FontKerningAdjustment;
1148 };
1149 
1150 struct SWF_DEFINEFONT2
1151 {
1152   UI16 FontID;
1153   UI8 FontFlagsHasLayout:1;
1154   UI8 FontFlagsShiftJis:1;
1155   UI8 FontFlagsSmallText:1;
1156   UI8 FontFlagsFlagANSI:1;
1157   UI8 FontFlagsWideOffsets:1;
1158   UI8 FontFlagsWideCodes:1;
1159   UI8 FontFlagsFlagsItalics:1;
1160   UI8 FontFlagsFlagsBold:1;
1161   LANGCODE LanguageCode;
1162   UI8 FontNameLen;
1163   STRING FontName;
1164   UI16 NumGlyphs;
1165   union {
1166     UI16 *UI16;
1167     UI32 *UI32;
1168   } OffsetTable;
1169   union {
1170     UI16 UI16;
1171     UI32 UI32;
1172   } CodeTableOffset;
1173   SWF_SHAPE *GlyphShapeTable;
1174   int *CodeTable;
1175   SI16 FontAscent;
1176   SI16 FontDecent;
1177   SI16 FontLeading;
1178   SI16 *FontAdvanceTable;
1179   SWF_RECT *FontBoundsTable;
1180   UI16 KerningCount;
1181   struct SWF_KERNINGRECORD *FontKerningTable;
1182 };
1183 
1184 struct SWF_DEFINEFONT3
1185 {
1186   UI16 FontID;
1187   UI8 FontFlagsHasLayout:1;
1188   UI8 FontFlagsShiftJis:1;
1189   UI8 FontFlagsSmallText:1;
1190   UI8 FontFlagsFlagANSI:1;
1191   UI8 FontFlagsWideOffsets:1;
1192   UI8 FontFlagsWideCodes:1;
1193   UI8 FontFlagsFlagsItalics:1;
1194   UI8 FontFlagsFlagsBold:1;
1195   LANGCODE LanguageCode;
1196   UI8 FontNameLen;
1197   STRING FontName;
1198   UI16 NumGlyphs;
1199   union {
1200     UI16 *UI16;
1201     UI32 *UI32;
1202   } OffsetTable;
1203   union {
1204     UI16 UI16;
1205     UI32 UI32;
1206   } CodeTableOffset;
1207   SWF_SHAPE *GlyphShapeTable;
1208   UI16 *CodeTable;
1209   SI16 FontAscent;
1210   SI16 FontDecent;
1211   SI16 FontLeading;
1212   SI16 *FontAdvanceTable;
1213   SWF_RECT *FontBoundsTable;
1214   UI16 KerningCount;
1215   struct SWF_KERNINGRECORD *FontKerningTable;
1216 };
1217 
1218 struct SWF_DEFINEFONTINFO
1219 {
1220   UI16 FontID;
1221   UI8 FontNameLen;
1222   STRING FontName;
1223   UI8 FontFlagsReserved:2;
1224   UI8 FontFlagsSmallText:1;
1225   UI8 FontFlagsShiftJIS:1;
1226   UI8 FontFlagsANSI:1;
1227   UI8 FontFlagsItalic:1;
1228   UI8 FontFlagsBold:1;
1229   UI8 FontFlagsWideCodes:1;
1230   int nGlyph;
1231   UI16 *CodeTable;
1232 };
1233 
1234 struct SWF_DEFINEFONTINFO2
1235 {
1236   UI16 FontID;
1237   UI8 FontNameLen;
1238   STRING FontName;
1239   UI8 FontFlagsReserved:2;
1240   UI8 FontFlagsSmallText:1;
1241   UI8 FontFlagsShiftJIS:1;
1242   UI8 FontFlagsANSI:1;
1243   UI8 FontFlagsItalic:1;
1244   UI8 FontFlagsBold:1;
1245   UI8 FontFlagsWideCodes:1;
1246   LANGCODE LanguageCode;
1247   int nGlyph;
1248   UI16 *CodeTable;
1249 };
1250 
1251 struct SWF_ZONEDATA
1252 {
1253   FLOAT16 AlignmentCoordinate;
1254   FLOAT16 Range;
1255 };
1256 
1257 struct SWF_ZONERECORD
1258 {
1259   UI8 NumZoneData;
1260   struct SWF_ZONEDATA *ZoneData;
1261   UI8 ZoneMaskX:1;
1262   UI8 ZoneMaskY:1;
1263   UI8 Reserved:6;
1264 };
1265 
1266 struct SWF_DEFINEFONTALIGNZONES
1267 {
1268   UI16 FontID;
1269   UI8 CSMTableHint:2;
1270   UI8 Reserved:6;
1271   int GlyphCount;
1272   struct SWF_ZONERECORD *ZoneTable;
1273 };
1274 
1275 struct SWF_CSMTEXTSETTINGS
1276 {
1277   UI16 TextID;
1278   UI8 UseFlashType:2;
1279   UI8 GridFit:3;
1280   UI8 Reserved:3;
1281   FB32 Thickness;
1282   FB32 Sharpness;
1283   UI8 Reserved2;
1284 };
1285 
1286 struct SWF_DEFINEFONTNAME
1287 {
1288   UI16 FontId;
1289   STRING FontName;
1290   STRING FontCopyright;
1291 };
1292 
1293 struct SWF_DEFINELOSSLESS
1294 {
1295   UI16 CharacterID;
1296   UI8  BitmapFormat;
1297   UI16 BitmapWidth;
1298   UI16 BitmapHeight;
1299   UI8  BitmapColorTableSize;
1300   UI8  *ZlibBitmapData;
1301 };
1302 
1303 struct SWF_DEFINELOSSLESS2
1304 {
1305   UI16 CharacterID;
1306   UI8  BitmapFormat;
1307   UI16 BitmapWidth;
1308   UI16 BitmapHeight;
1309   UI8  BitmapColorTableSize;
1310   UI8  *ZlibBitmapData;
1311 };
1312 
1313 struct SWF_DEFINEMORPHSHAPE
1314 {
1315   UI16 CharacterID;
1316   SWF_RECT StartBounds;
1317   SWF_RECT EndBounds;
1318   UI32 Offset;
1319   SWF_MORPHFILLSTYLES MorphFillStyles;
1320   SWF_MORPHLINESTYLES MorphLineStyles;
1321   SWF_SHAPE StartEdges;
1322   SWF_SHAPE EndEdges;
1323 };
1324 
1325 struct SWF_DEFINEMORPHSHAPE2
1326 {
1327   UI16 CharacterID;
1328   SWF_RECT StartBounds;
1329   SWF_RECT EndBounds;
1330   SWF_RECT StartEdgeBounds;
1331   SWF_RECT EndEdgeBounds;
1332   UI8 Reserved:6;
1333   UI8 UsesNonScalingStrokes:1;
1334   UI8 UsesScalingStrokes:1;
1335   UI32 Offset;
1336   SWF_MORPHFILLSTYLES MorphFillStyles;
1337   SWF_MORPHLINESTYLES MorphLineStyles;
1338   SWF_SHAPE StartEdges;
1339   SWF_SHAPE EndEdges;
1340 };
1341 
1342 
1343 struct SWF_DEFINESHAPE
1344 {
1345   UI16 ShapeID;
1346   SWF_RECT ShapeBounds;
1347   SWF_SHAPEWITHSTYLE Shapes;
1348 };
1349 
1350 struct SWF_DEFINESHAPE2
1351 {
1352   UI16 ShapeID;
1353   SWF_RECT ShapeBounds;
1354   SWF_SHAPEWITHSTYLE Shapes;
1355 };
1356 
1357 struct SWF_DEFINESHAPE3
1358 {
1359   UI16 ShapeID;
1360   SWF_RECT ShapeBounds;
1361   SWF_SHAPEWITHSTYLE Shapes;
1362 };
1363 
1364 struct SWF_DEFINESHAPE4
1365 {
1366   UI16 ShapeID;
1367   SWF_RECT ShapeBounds;
1368   SWF_RECT EdgeBounds;
1369   UI8 Reserved:6;
1370   UI8 UsesNonScalingStrokes:1;
1371   UI8 UsesScalingStrokes:1;
1372   SWF_SHAPEWITHSTYLE Shapes;
1373 };
1374 
1375 struct SWF_DEFINESPRITE
1376 {
1377   UI16 SpriteId;
1378   UI16 FrameCount;
1379   UI16 BlockCount;
1380   UI16 *tagTypes;
1381   struct SWF_Parserstruct_s **Tags;
1382 };
1383 
1384 struct SWF_DEFINETEXT
1385 {
1386   UI16 CharacterID;
1387   SWF_RECT TextBounds;
1388   SWF_MATRIX TextMatrix;
1389   UI8	GlyphBits;
1390   UI8	AdvanceBits;
1391   int numTextRecords;
1392   SWF_TEXTRECORD *TextRecords;
1393 };
1394 
1395 struct SWF_DEFINETEXT2
1396 {
1397   UI16 CharacterID;
1398   SWF_RECT TextBounds;
1399   SWF_MATRIX TextMatrix;
1400   UI8	GlyphBits;
1401   UI8	AdvanceBits;
1402   int numTextRecords;
1403   SWF_TEXTRECORD *TextRecords;
1404 };
1405 
1406 // XXX obsolete ?
1407 struct SWF_DEFINETEXTFORMAT
1408 {
1409   int chid;
1410 };
1411 
1412 // XXX obsolete ?
1413 struct SWF_DEFINEVIDEO
1414 {
1415   int chid;
1416 };
1417 
1418 struct SWF_DEFINEVIDEOSTREAM
1419 {
1420   UI16 CharacterID;
1421   UI16 NumFrames;
1422   UI16 Width;
1423   UI16 Height;
1424   UI8 Reserved:5;
1425   UI8 VideoFlagsDeblocking:2;
1426   UI8 VideoFlagsSmoothing:1;
1427   UI8 CodecID;
1428 };
1429 
1430 struct SWF_DOACTION
1431 {
1432   int  numActions;
1433   SWF_ACTION *Actions;
1434 };
1435 
1436 struct SWF_ENABLEDEBUGGER
1437 {
1438   STRING Password;
1439 };
1440 
1441 struct SWF_ENABLEDEBUGGER2
1442 {
1443   UI16 Reserved;
1444   STRING Password;
1445 };
1446 
1447 struct SWF_END
1448 {
1449 #if defined(__SUNPRO_C)
1450 int empty; // See http://bugs.libming.org/show_bug.cgi?id=103
1451 #endif
1452 };
1453 
1454 struct SWF_EXPORTASSETS
1455 {
1456   UI16 Count;
1457   UI16 *Tags;
1458   STRING *Names;
1459 };
1460 
1461 // XXX obsolete ?
1462 struct SWF_FONTREF
1463 {
1464   int chid;
1465 };
1466 
1467 struct SWF_FRAMELABEL
1468 {
1469   STRING	Name;
1470   UI8		IsAnchor;
1471 };
1472 
1473 // XXX obsolete ?
1474 struct SWF_FRAMETAG
1475 {
1476   int chid;
1477 };
1478 
1479 // XXX obsolete ?
1480 struct SWF_FREEALL
1481 {
1482   int chid;
1483 };
1484 
1485 // XXX obsolete ?
1486 struct SWF_FREECHARACTER
1487 {
1488   int chid;
1489 };
1490 
1491 // XXX obsolete ?
1492 struct SWF_GENCOMMAND
1493 {
1494   int chid;
1495 };
1496 
1497 struct SWF_IMPORTASSETS
1498 {
1499   STRING URL;
1500   UI16	Count;
1501   UI16 *Tags;
1502   STRING *Names;
1503 };
1504 
1505 struct SWF_IMPORTASSETS2
1506 {
1507   STRING URL;
1508   UI8 Reserved;
1509   UI8 Reserved2;
1510   UI16	Count;
1511   UI16 *Tags;
1512   STRING *Names;
1513 };
1514 
1515 
1516 struct SWF_JPEGTABLES
1517 {
1518   int JPEGDataSize;
1519   UI8 *JPEGData;
1520 };
1521 
1522 struct SWF_NAMECHARACTER
1523 {
1524   UI16 Id;
1525   STRING Name;
1526 };
1527 
1528 // XXX: obsolete?
1529 struct SWF_PATHSAREPOSTSCRIPT
1530 {
1531   int chid;
1532 };
1533 
1534 struct SWF_PLACEOBJECT
1535 {
1536   UI16 CharacterId;
1537   UI16 Depth;
1538   SWF_MATRIX Matrix;
1539   SWF_CXFORMWITHALPHA ColorTransform;
1540 };
1541 
1542 struct SWF_PLACEOBJECT2
1543 {
1544   UI8 PlaceFlagHasClipActions:1;
1545   UI8 PlaceFlagHasClipDepth:1;
1546   UI8 PlaceFlagHasName:1;
1547   UI8 PlaceFlagHasRatio:1;
1548   UI8 PlaceFlagHasColorTransform:1;
1549   UI8 PlaceFlagHasMatrix:1;
1550   UI8 PlaceFlagHasCharacter:1;
1551   UI8 PlaceFlagMove:1;
1552   UI16 Depth;
1553   UI16 CharacterId;
1554   SWF_MATRIX Matrix;
1555   SWF_CXFORMWITHALPHA ColorTransform;
1556   UI16 Ratio;
1557   STRING Name;
1558   UI16 ClipDepth;
1559   SWF_CLIPACTIONS ClipActions;
1560 };
1561 
1562 struct SWF_PLACEOBJECT3
1563 {
1564   UI8 PlaceFlagHasClipActions:1;
1565   UI8 PlaceFlagHasClipDepth:1;
1566   UI8 PlaceFlagHasName:1;
1567   UI8 PlaceFlagHasRatio:1;
1568   UI8 PlaceFlagHasColorTransform:1;
1569   UI8 PlaceFlagHasMatrix:1;
1570   UI8 PlaceFlagHasCharacter:1;
1571   UI8 PlaceFlagMove:1;
1572   UI8 Reserved:3;
1573   UI8 PlaceFlagHasImage:1;
1574   UI8 PlaceFlagHasClassName:1;
1575   UI8 PlaceFlagHasCacheAsBitmap:1;
1576   UI8 PlaceFlagHasBlendMode:1;
1577   UI8 PlaceFlagHasFilterList:1;
1578   UI16 Depth;
1579   STRING ClassName;
1580   UI16 CharacterId;
1581   SWF_MATRIX Matrix;
1582   SWF_CXFORMWITHALPHA ColorTransform;
1583   UI16 Ratio;
1584   STRING Name;
1585   UI16 ClipDepth;
1586   SWF_FILTERLIST SurfaceFilterList;
1587   UI8 BlendMode;
1588   SWF_CLIPACTIONS ClipActions;
1589 };
1590 
1591 struct SWF_PREBUILT
1592 {
1593   int chid;
1594 };
1595 
1596 struct SWF_PREBUILTCLIP
1597 {
1598   int chid;
1599 };
1600 
1601 struct SWF_PROTECT
1602 {
1603   STRING Password;
1604 };
1605 
1606 struct SWF_REMOVEOBJECT
1607 {
1608   UI16 CharacterId;
1609   UI16 Depth;
1610 };
1611 
1612 struct SWF_REMOVEOBJECT2
1613 {
1614   UI16 Depth;
1615 };
1616 
1617 struct SWF_SERIALNUMBER
1618 {
1619   UI32 Id;
1620   UI32 Edition;
1621   UI8 Major;
1622   UI8 Minor;
1623   UI32 BuildL;
1624   UI32 BuildH;
1625   UI32 TimestampL;
1626   UI32 TimestampH;
1627 };
1628 
1629 struct SWF_SETBACKGROUNDCOLOR
1630 {
1631   SWF_RGBA rgb;
1632 };
1633 
1634 struct SWF_SHOWFRAME
1635 {
1636   int chid;
1637 };
1638 
1639 struct MP3STREAMSOUNDDATA
1640 {
1641   UI16 SampleCount;
1642   SI16 SeekSamples;
1643   UI8 *frames;
1644 };
1645 
1646 struct SWF_SOUNDSTREAMBLOCK
1647 {
1648   union {
1649     struct MP3STREAMSOUNDDATA mp3;
1650     UI8 *data;
1651   } StreamData;
1652 };
1653 
1654 struct SWF_SOUNDSTREAMHEAD
1655 {
1656   UI16	Reserved:4;
1657   UI16	PlaybackSoundRate:2;
1658   UI16	PlaybackSoundSize:1;
1659   UI16	PlaybackSoundType:1;
1660   UI16	StreamSoundCompression:4;
1661   UI16	StreamSoundRate:2;
1662   UI16	StreamSoundSize:1;
1663   UI16	StreamSoundType:1;
1664   UI16	StreamSoundSampleCount;
1665   UI16	LatencySeek;
1666 };
1667 
1668 struct SWF_SOUNDSTREAMHEAD2
1669 {
1670   UI16	Reserved:4;
1671   UI16	PlaybackSoundRate:2;
1672   UI16	PlaybackSoundSize:1;
1673   UI16	PlaybackSoundType:1;
1674   UI16	StreamSoundCompression:4;
1675   UI16	StreamSoundRate:2;
1676   UI16	StreamSoundSize:1;
1677   UI16	StreamSoundType:1;
1678   UI16	StreamSoundSampleCount;
1679   UI16	LatencySeek;
1680 };
1681 
1682 struct SWF_DEFINESOUND
1683 {
1684   UI16 SoundId;
1685   UI8  SoundFormat:4;
1686   UI8  SoundRate:2;
1687   UI8  SoundSize:1;
1688   UI8  SoundType:1;
1689   UI32  SoundSampleCount;
1690   union {
1691     struct MP3STREAMSOUNDDATA mp3;
1692     UI8 *data;
1693   } SoundData;
1694 };
1695 
1696 struct SWF_STARTSOUND
1697 {
1698   UI16 SoundId;
1699   SWF_SOUNDINFO	SoundInfo;
1700 };
1701 
1702 struct SWF_STARTSOUND2
1703 {
1704   STRING SoundClassName;
1705   SWF_SOUNDINFO	SoundInfo;
1706 };
1707 
1708 
1709 // XXX: obsolete?
1710 struct SWF_SYNCFRAME
1711 {
1712   int chid;
1713 };
1714 
1715 struct SWF_INITACTION
1716 {
1717   UI16 SpriteId;
1718   int  numActions;
1719   SWF_ACTION *Actions;
1720 };
1721 
1722 struct SWF_VIDEOFRAME
1723 {
1724   UI16 StreamID;
1725   UI16 FrameNum;
1726   UI8 *VideoData;
1727 };
1728 
1729 struct SWF_REFLEX
1730 {
1731   UI8 rfx[3];
1732 };
1733 
1734 struct SWF_FILEATTRIBUTES
1735 {
1736 	UI8	Reserved:3;
1737 	UI8	HasMetadata:1;
1738 	UI8	ActionScript3:1;
1739 	UI8	Reserved2:2;
1740 	UI8	UseNetwork:1;
1741 	UI16	Reserved3;
1742 	UI8	Reserved4;
1743 };
1744 
1745 struct SWF_METADATA
1746 {
1747 	STRING Metadata;
1748 };
1749 
1750 struct SWF_SCRIPTLIMITS
1751 {
1752 	UI16 MaxRecursionDepth;
1753 	UI16 ScriptTimeoutSeconds;
1754 };
1755 
1756 struct SWF_DEFINESCALINGGRID
1757 {
1758 	UI16 CharacterId;
1759 	SWF_RECT Splitter;
1760 };
1761 
1762 struct SWF_SETTABINDEX
1763 {
1764 	UI16 Depth;
1765 	UI16 TabIndex;
1766 };
1767 
1768 struct ABC_OPTION_DETAIL
1769 {
1770 	U30 Val;
1771 	UI8 Kind;
1772 };
1773 
1774 struct ABC_OPTION_INFO
1775 {
1776 	U30 OptionCount;
1777 	struct ABC_OPTION_DETAIL *Option;
1778 };
1779 
1780 struct ABC_PARAM_INFO
1781 {
1782 	U30 *ParamNames;
1783 };
1784 
1785 struct ABC_METHOD_INFO
1786 {
1787 	U30 ParamCount;
1788 	U30 ReturnType;
1789 	U30 *ParamType;
1790 	U30 Name;
1791 	UI8 Flags;
1792 	struct ABC_OPTION_INFO Options;
1793 	struct ABC_PARAM_INFO ParamNames;
1794 };
1795 
1796 struct ABC_STRING_INFO
1797 {
1798 	U30 Size;
1799 	UI8 *UTF8String;
1800 };
1801 
1802 struct ABC_NS_INFO
1803 {
1804 	UI8 Kind;
1805 	U30 Name;
1806 };
1807 
1808 struct ABC_NS_SET_INFO
1809 {
1810 	U30 Count;
1811 	U30 *NS;
1812 };
1813 
1814 struct ABC_QNAME
1815 {
1816 	U30 NS;
1817 	U30 Name;
1818 };
1819 
1820 struct ABC_RTQNAME
1821 {
1822 	U30 Name;
1823 };
1824 
1825 struct ABC_RTQNAME_L
1826 {
1827 #if defined(__SUNPRO_C)
1828 int empty; // See http://bugs.libming.org/show_bug.cgi?id=103
1829 #endif
1830 };
1831 
1832 struct ABC_MULTINAME
1833 {
1834 	U30 Name;
1835 	U30 NSSet;
1836 };
1837 
1838 struct ABC_MULTINAME_L
1839 {
1840 	U30 NSSet;
1841 };
1842 
1843 struct ABC_MULTINAME_INFO
1844 {
1845 	UI8 Kind;
1846 	union {
1847 		struct ABC_QNAME QName;
1848 		struct ABC_QNAME QNameA;
1849 		struct ABC_RTQNAME RTQName;
1850 		struct ABC_RTQNAME RTQNameA;
1851 		struct ABC_RTQNAME_L RTQNameL;
1852 		struct ABC_RTQNAME_L RTQNameLA;
1853 		struct ABC_MULTINAME Multiname;
1854 		struct ABC_MULTINAME MultinameA;
1855 		struct ABC_MULTINAME_L MultinameL;
1856 		struct ABC_MULTINAME_L MultinameLA;
1857 	} Data;
1858 
1859 };
1860 
1861 struct ABC_CONSTANT_POOL
1862 {
1863 	U30 IntCount;
1864 	S32 *Integers;
1865 	U30 UIntCount;
1866 	U32 *UIntegers;
1867 	U30 DoubleCount;
1868 	DOUBLE *Doubles;
1869 	U30 StringCount;
1870 	struct ABC_STRING_INFO *Strings;
1871 	U30 NamespaceCount;
1872 	struct ABC_NS_INFO *Namespaces;
1873 	U30 NamespaceSetCount;
1874 	struct ABC_NS_SET_INFO *NsSets;
1875 	U30 MultinameCount;
1876 	struct ABC_MULTINAME_INFO *Multinames;
1877 };
1878 
1879 struct ABC_ITEM_INFO
1880 {
1881 	U30 Key;
1882 	U30 Value;
1883 };
1884 
1885 struct ABC_METADATA_INFO
1886 {
1887 	U30 Name;
1888 	U30 ItemCount;
1889 	struct ABC_ITEM_INFO *Items;
1890 };
1891 
1892 
1893 struct ABC_TRAIT_SLOT
1894 {
1895 	U30 SlotId;
1896 	U30 TypeName;
1897 	U30 VIndex;
1898 	UI8 VKind;
1899 
1900 };
1901 
1902 struct ABC_TRAIT_CLASS
1903 {
1904 	U30 SlotId;
1905 	U30 ClassIndex;
1906 };
1907 
1908 struct ABC_TRAIT_FUNCTION
1909 {
1910 	U30 SlotId;
1911 	U30 Function;
1912 };
1913 
1914 struct ABC_TRAIT_METHOD
1915 {
1916 	U30 DispId;
1917 	U30 Method;
1918 };
1919 
1920 struct ABC_TRAITS_INFO
1921 {
1922 	U30 Name;
1923 	UI8 Kind;
1924 	UI8 Attr;
1925 	union {
1926 		struct ABC_TRAIT_SLOT Slot;
1927 		struct ABC_TRAIT_CLASS Class;
1928 		struct ABC_TRAIT_FUNCTION Function;
1929 		struct ABC_TRAIT_METHOD Method;
1930 	} Data;
1931 	U30 MetadataCount;
1932 	U30 *Metadata;
1933 };
1934 
1935 struct ABC_INSTANCE_INFO
1936 {
1937 	U30 Name;
1938 	U30 SuperName;
1939 	UI8 Flags;
1940 	U30 ProtectedNs;
1941 	U30 InterfaceCount;
1942 	U30 *Interfaces;
1943 	U30 IInit;
1944 	U30 TraitCount;
1945 	struct ABC_TRAITS_INFO *Traits;
1946 };
1947 
1948 struct ABC_CLASS_INFO
1949 {
1950 	U30 CInit;
1951 	U30 TraitCount;
1952 	struct ABC_TRAITS_INFO *Traits;
1953 };
1954 
1955 struct ABC_SCRIPT_INFO
1956 {
1957 	U30 Init;
1958 	U30 TraitCount;
1959 	struct ABC_TRAITS_INFO *Traits;
1960 };
1961 
1962 struct ABC_EXCEPTION_INFO
1963 {
1964 	U30 From;
1965 	U30 To;
1966 	U30 Target;
1967 	U30 ExcType;
1968 	U30 VarName;
1969 };
1970 
1971 struct ABC_METHOD_BODY_INFO
1972 {
1973 	U30 Method;
1974 	U30 MaxStack;
1975 	U30 LocalCount;
1976 	U30 InitScopeDepth;
1977 	U30 MaxScopeDepth;
1978 	U30 CodeLength;
1979 	UI8 *Code;
1980 	U30 ExceptionCount;
1981 	struct ABC_EXCEPTION_INFO *Exceptions;
1982 	U30 TraitCount;
1983 	struct ABC_TRAITS_INFO *Traits;
1984 };
1985 
1986 struct ABC_FILE
1987 {
1988 	UI16 Minor;
1989 	UI16 Major;
1990 	struct ABC_CONSTANT_POOL ConstantPool;
1991 	U30 MethodCount;
1992 	struct ABC_METHOD_INFO *Methods;
1993 	U30 MetadataCount;
1994 	struct ABC_METADATA_INFO *Metadata;
1995 	U30 ClassCount;
1996 	struct ABC_INSTANCE_INFO *Instances;
1997 	struct ABC_CLASS_INFO *Classes;
1998 	U30 ScriptCount;
1999 	struct ABC_SCRIPT_INFO *Scripts;
2000 	U30 MethodBodyCount;
2001 	struct ABC_METHOD_BODY_INFO *MethodBodies;
2002 };
2003 
2004 struct SWF_DOABC
2005 {
2006 	UI32 Flags;
2007 	STRING Name;
2008 	struct ABC_FILE AbcFile;
2009 };
2010 
2011 struct AS_SYMBOL
2012 {
2013 	UI16 SymbolId;
2014 	STRING SymbolName;
2015 };
2016 
2017 struct SWF_SYMBOLCLASS
2018 {
2019 	UI16 SymbolCount;
2020 	struct AS_SYMBOL *SymbolList;
2021 };
2022 
2023 struct SWF_DEFINEBINARYDATA
2024 {
2025 	UI32 Reserved;
2026 	int DataLength;
2027 	UI8 *Data;
2028 };
2029 
2030 struct SCENE_DATA
2031 {
2032 	U32 Offset;
2033 	STRING Name;
2034 };
2035 
2036 struct FRAME_DATA
2037 {
2038 	U32 FrameNum;
2039 	STRING FrameLabel;
2040 };
2041 
2042 struct SWF_DEFINESCENEANDFRAMEDATA
2043 {
2044 	U32 SceneCount;
2045 	struct SCENE_DATA *Scenes;
2046 	U32 FrameLabelCount;
2047 	struct FRAME_DATA *Frames;
2048 };
2049 
2050 struct SWF_DEBUGID
2051 {
2052 	UI8* UUID;
2053 };
2054 
2055 struct SWF_UNKNOWNBLOCK
2056 {
2057 	UI8 *Data;
2058 };
2059 
2060 typedef union _inline_SWF_Parserstruct
2061 {
2062   struct SWF_CHARACTERSET SWF_CHARACTERSET;
2063   struct SWF_DEFINEBITS SWF_DEFINEBITS;
2064   struct SWF_DEFINEBITSJPEG2 SWF_DEFINEBITSJPEG2;
2065   struct SWF_DEFINEBITSJPEG3 SWF_DEFINEBITSJPEG3;
2066   struct SWF_DEFINEBITSPTR SWF_DEFINEBITSPTR;
2067   struct SWF_DEFINEBUTTON SWF_DEFINEBUTTON;
2068   struct SWF_DEFINEBUTTON2 SWF_DEFINEBUTTON2;
2069   struct SWF_DEFINEBUTTONCXFORM SWF_DEFINEBUTTONCXFORM;
2070   struct SWF_DEFINEBUTTONSOUND SWF_DEFINEBUTTONSOUND;
2071   struct SWF_DEFINECOMMANDOBJ SWF_DEFINECOMMANDOBJ;
2072   struct SWF_DEFINEEDITTEXT SWF_DEFINEEDITTEXT;
2073   struct SWF_DEFINEFONT SWF_DEFINEFONT;
2074   struct SWF_DEFINEFONT2 SWF_DEFINEFONT2;
2075   struct SWF_DEFINEFONT3 SWF_DEFINEFONT3;
2076   struct SWF_DEFINEFONTINFO SWF_DEFINEFONTINFO;
2077   struct SWF_DEFINEFONTINFO2 SWF_DEFINEFONTINFO2;
2078   struct SWF_DEFINEFONTALIGNZONES SWF_DEFINEFONTALIGNZONES;
2079   struct SWF_CSMTEXTSETTINGS SWF_CSMTEXTSETTINGS;
2080   struct SWF_DEFINEFONTNAME SWF_DEFINEFONTNAME;
2081   struct SWF_DEFINELOSSLESS SWF_DEFINELOSSLESS;
2082   struct SWF_DEFINELOSSLESS2 SWF_DEFINELOSSLESS2;
2083   struct SWF_DEFINEMORPHSHAPE SWF_DEFINEMORPHSHAPE;
2084   struct SWF_DEFINEMORPHSHAPE2 SWF_DEFINEMORPHSHAPE2;
2085   struct SWF_DEFINESHAPE SWF_DEFINESHAPE;
2086   struct SWF_DEFINESHAPE2 SWF_DEFINESHAPE2;
2087   struct SWF_DEFINESHAPE3 SWF_DEFINESHAPE3;
2088   struct SWF_DEFINESHAPE4 SWF_DEFINESHAPE4;
2089   struct SWF_DEFINESOUND SWF_DEFINESOUND;
2090   struct SWF_DEFINESPRITE SWF_DEFINESPRITE;
2091   struct SWF_DEFINETEXT SWF_DEFINETEXT;
2092   struct SWF_DEFINETEXT2 SWF_DEFINETEXT2;
2093   struct SWF_DEFINETEXTFORMAT SWF_DEFINETEXTFORMAT;
2094   struct SWF_DEFINEVIDEO SWF_DEFINEVIDEO;
2095   struct SWF_DEFINEVIDEOSTREAM SWF_DEFINEVIDEOSTREAM;
2096   struct SWF_DOACTION SWF_DOACTION;
2097   struct SWF_ENABLEDEBUGGER SWF_ENABLEDEBUGGER;
2098   struct SWF_ENABLEDEBUGGER2 SWF_ENABLEDEBUGGER2;
2099   struct SWF_END SWF_END;
2100   struct SWF_EXPORTASSETS SWF_EXPORTASSETS;
2101   struct SWF_FONTREF SWF_FONTREF;
2102   struct SWF_FRAMELABEL SWF_FRAMELABEL;
2103   struct SWF_FRAMETAG SWF_FRAMETAG;
2104   struct SWF_FREEALL SWF_FREEALL;
2105   struct SWF_FREECHARACTER SWF_FREECHARACTER;
2106   struct SWF_GENCOMMAND SWF_GENCOMMAND;
2107   struct SWF_IMPORTASSETS SWF_IMPORTASSETS;
2108   struct SWF_IMPORTASSETS2 SWF_IMPORTASSETS2;
2109   struct SWF_JPEGTABLES SWF_JPEGTABLES;
2110   struct SWF_NAMECHARACTER SWF_NAMECHARACTER;
2111   struct SWF_PATHSAREPOSTSCRIPT SWF_PATHSAREPOSTSCRIPT;
2112   struct SWF_PLACEOBJECT SWF_PLACEOBJECT;
2113   struct SWF_PLACEOBJECT2 SWF_PLACEOBJECT2;
2114   struct SWF_PLACEOBJECT3 SWF_PLACEOBJECT3;
2115   struct SWF_PREBUILT SWF_PREBUILT;
2116   struct SWF_PREBUILTCLIP SWF_PREBUILTCLIP;
2117   struct SWF_PROTECT SWF_PROTECT;
2118   struct SWF_REMOVEOBJECT SWF_REMOVEOBJECT;
2119   struct SWF_REMOVEOBJECT2 SWF_REMOVEOBJECT2;
2120   struct SWF_SERIALNUMBER SWF_SERIALNUMBER;
2121   struct SWF_SETBACKGROUNDCOLOR SWF_SETBACKGROUNDCOLOR;
2122   struct SWF_SHOWFRAME SWF_SHOWFRAME;
2123   struct SWF_SOUNDSTREAMBLOCK SWF_SOUNDSTREAMBLOCK;
2124   struct SWF_SOUNDSTREAMHEAD SWF_SOUNDSTREAMHEAD;
2125   struct SWF_SOUNDSTREAMHEAD2 SWF_SOUNDSTREAMHEAD2;
2126   struct SWF_STARTSOUND SWF_STARTSOUND;
2127   struct SWF_STARTSOUND2 SWF_STARTSOUND2;
2128   struct SWF_SYNCFRAME SWF_SYNCFRAME;
2129   struct SWF_INITACTION SWF_INITACTION;
2130   struct SWF_VIDEOFRAME SWF_VIDEOFRAME;
2131   struct SWF_REFLEX SWF_REFLEX;
2132   struct SWF_FILEATTRIBUTES SWF_FILEATTRIBUTES;
2133   struct SWF_METADATA SWF_METADATA;
2134   struct SWF_SCRIPTLIMITS SWF_SCRIPTLIMITS;
2135   struct SWF_DEFINESCALINGGRID SWF_DEFINESCALINGGRID;
2136   struct SWF_SETTABINDEX SWF_SETTABINDEX;
2137   struct SWF_DOABC SWF_DOABC;
2138   struct SWF_SYMBOLCLASS SWF_SYMBOLCLASS;
2139   struct SWF_DEFINEBINARYDATA SWF_DEFINEBINARYDATA;
2140   struct SWF_DEFINESCENEANDFRAMEDATA SWF_DEFINESCENEANDFRAMEDATA;
2141   struct SWF_DEBUGID SWF_DEBUGID;
2142   struct SWF_UNKNOWNBLOCK SWF_UNKNOWNBLOCK;
2143 } _inline_SWF_Parserstruct;
2144 
2145 struct SWF_Parserstruct_s
2146 {
2147 	_inline_SWF_Parserstruct block;
2148 	int offset;
2149 	int length;
2150 };
2151 typedef struct SWF_Parserstruct_s SWF_Parserstruct;
2152 
2153 #endif /* _SWFTYPES_H_ */
2154