fix crashes reported by Debian Cylab Mayhem Team
[swftools.git] / src / swfc-interpolation.h
blobf29e950e3156ed8ed21e157c0f6420bd7a4a27ed
1 /* swfc- Compiles swf code (.sc) files into .swf files.
3 Part of the swftools package.
5 Copyright (c) 2007 Huub Schaeks <huub@h-schaeks.speedlinq.nl>
6 Copyright (c) 2007 Matthias Kramm <kramm@quiss.org>
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
22 #ifndef __EASE_H
23 #define __EASE_H
25 typedef struct _interpolation {
26 int function;
27 float slope, speed, amplitude, growth, damping;
28 int bounces;
29 } interpolation_t;
31 enum {
32 IF_LINEAR = 1,
33 IF_QUAD_IN = 2,
34 IF_QUAD_OUT = 3,
35 IF_QUAD_IN_OUT = 4,
36 IF_CUBIC_IN = 5,
37 IF_CUBIC_OUT = 6,
38 IF_CUBIC_IN_OUT = 7,
39 IF_QUART_IN = 8,
40 IF_QUART_OUT = 9,
41 IF_QUART_IN_OUT = 10,
42 IF_QUINT_IN = 11,
43 IF_QUINT_OUT = 12,
44 IF_QUINT_IN_OUT = 13,
45 IF_CIRCLE_IN = 14,
46 IF_CIRCLE_OUT = 15,
47 IF_CIRCLE_IN_OUT = 16,
48 IF_EXPONENTIAL_IN = 17,
49 IF_EXPONENTIAL_OUT = 18,
50 IF_EXPONENTIAL_IN_OUT = 19,
51 IF_SINE_IN = 20,
52 IF_SINE_OUT = 21,
53 IF_SINE_IN_OUT = 22,
54 IF_ELASTIC_IN = 23,
55 IF_ELASTIC_OUT = 24,
56 IF_ELASTIC_IN_OUT = 25,
57 IF_BACK_IN = 26,
58 IF_BACK_OUT = 27,
59 IF_BACK_IN_OUT = 28,
60 IF_BOUNCE_IN = 29,
61 IF_BOUNCE_OUT = 30,
62 IF_BOUNCE_IN_OUT = 31,
63 IF_FAST_BOUNCE_IN = 32,
64 IF_FAST_BOUNCE_OUT = 33,
65 IF_FAST_BOUNCE_IN_OUT = 34
68 float linear(float fraction, float start, float delta);
70 float quadIn(float fraction, float start, float delta, float slope);
71 float quadOut(float fraction, float start, float delta, float slope);
72 float quadInOut(float fraction, float start, float delta, float slope);
74 float cubicIn(float fraction, float start, float delta, float slope);
75 float cubicOut(float fraction, float start, float delta, float slope);
76 float cubicInOut(float fraction, float start, float delta, float slope);
78 float quartIn(float fraction, float start, float delta, float slope);
79 float quartOut(float fraction, float start, float delta, float slope);
80 float quartInOut(float fraction, float start, float delta, float slope);
82 float quintIn(float fraction, float start, float delta, float slope);
83 float quintOut(float fraction, float start, float delta, float slope);
84 float quintInOut(float fraction, float start, float delta, float slope);
86 float circleIn(float fraction, float start, float delta, float slope);
87 float circleOut(float fraction, float start, float delta, float slope);
88 float circleInOut(float fraction, float start, float delta, float slope);
90 float exponentialIn(float fraction, float start, float delta);
91 float exponentialOut(float fraction, float start, float delta);
92 float exponentialInOut(float fraction, float start, float delta);
94 float sineIn(float fraction, float start, float delta);
95 float sineOut(float fraction, float start, float delta);
96 float sineInOut(float fraction, float start, float delta);
98 float elasticIn(float fraction, float start, float delta, float amplitude, int bounces, float damping);
99 float elasticOut(float fraction, float start, float delta, float amplitude, int bounces, float damping);
100 float elasticInOut(float fraction, float start, float delta, float amplitude, int bounces, float damping);
102 float backIn(float fraction, float start, float delta, float speed);
103 float backOut(float fraction, float start, float delta, float speed);
104 float backInOut(float fraction, float start, float delta, float speed);
106 float bounceIn(float fraction, float start, float delta, int bounces, float growth, float damping);
107 float bounceOut(float fraction, float start, float delta, int bounces, float growth, float damping);
108 float bounceInOut(float fraction, float start, float delta, int bounces, float growth, float damping);
110 float fastBounceIn(float fraction, float start, float delta, int bounces, float growth, float damping);
111 float fastBounceOut(float fraction, float start, float delta, int bounces, float growth, float damping);
112 float fastBounceInOut(float fraction, float start, float delta, int bounces, float growth, float damping);
114 #endif