-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswf_movie.h
96 lines (66 loc) · 2.99 KB
/
swf_movie.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
* Copyright (C) 2001 Simon Wistow <[email protected]>
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#include <stdio.h>
#include "swf_types.h"
#include "swf_file.h"
/*
* Have never seen a movie in the wild with a frame rate > 15.
* So set maximum as 25 to be conservative.
*/
#define MAXVER 5
#define MAXSPEED 25
#define TYPICALSPEED 12
#define LINESTYLEMASK 0x20
typedef struct swf_triangle swf_triangle;
/*
* NOTE: There's a lot of stream/file-orientated duplication here.
* Perhaps we should refactor into a stream adaptor shared by the
* generator and parser
*/
/*
* High level for testing serialisation
* (Dancing triangles flash movies, anyone?)
* FIXME: This
*/
struct swf_triangle {
};
void swf_make_header_blank (swf_movie * movie, int * error, int ver, int speed);
void swf_make_header_raw (swf_movie * movie, int * error, swf_rect * rect);
void swf_make_header (swf_movie * movie, int * error, SCOORD x1, SCOORD x2, SCOORD y1, SCOORD y2);
swf_colour * swf_make_colour(int * error, SWF_U8 red, SWF_U8 green, SWF_U8 blue);
void swf_make_finalise(swf_movie * movie, int * error);
swf_movie * swf_make_movie (int * error);
void swf_destroy_movie (swf_movie * movie);
swf_shaperecord * swf_make_shaperecord(int * error, int isEdge);
void swf_add_shaperecord (swf_shaperecord_list * list, int * error, swf_shaperecord * temp);
swf_tagrecord * swf_make_tagrecord (int * error, SWF_U16 myid);
swf_shaperecord_list * swf_make_shaperecords_for_triangle(int * error);
swf_tagrecord * swf_make_triangle(swf_movie * movie, int * error);
/*
void swf_get_raw_shape (swf_parser * swf, int * error, swf_tagrecord * mybuffer);
void swf_get_nth_shape (swf_parser * swf, int * error, int which_shape, swf_tagrecord * mybuffer);
*/
swf_tagrecord * swf_get_raw_shape (swf_parser * swf, int * error);
swf_tagrecord * swf_get_nth_shape (swf_parser * swf, int * error, int which_shape);
void swf_dump_tag (swf_movie * movie, int * error, swf_tagrecord * temp);
swf_linestyle * swf_make_linestyle(int * error);
swf_fillstyle * swf_make_solid_fillstyle(int * error);
swf_fillstyle * swf_make_gradient_fillstyle(int * error, SWF_U8 ncols, SWF_U8 type);
swf_fillstyle * swf_make_bitmap_fillstyle(int * error, SWF_U8 type);
// DEPRECATED. Will go away soon. Use the type-specific ones instead.
swf_fillstyle * swf_make_fillstyle(int * error);