author | zecke <zecke> | 2004-03-14 18:16:15 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-14 18:16:15 (UTC) |
commit | cbd0144d473cd22d565fbe6c07db85548f2d797d (patch) (unidiff) | |
tree | 3c77551b6716f00d62f028bde396d836b62f4754 | |
parent | 105a35c8e6f2ea63a074f9eb94336b6cbe065b04 (diff) | |
download | opie-cbd0144d473cd22d565fbe6c07db85548f2d797d.zip opie-cbd0144d473cd22d565fbe6c07db85548f2d797d.tar.gz opie-cbd0144d473cd22d565fbe6c07db85548f2d797d.tar.bz2 |
Fix compile and right deps
-rw-r--r-- | core/multimedia/opieplayer/libflash/config.in | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/libflash/shape.cc | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/libmad/config.in | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/libmpeg3/config.in | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/modplug/config.in | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/wavplugin/config.in | 2 |
6 files changed, 7 insertions, 5 deletions
diff --git a/core/multimedia/opieplayer/libflash/config.in b/core/multimedia/opieplayer/libflash/config.in index 91a57da..258e8ee 100644 --- a/core/multimedia/opieplayer/libflash/config.in +++ b/core/multimedia/opieplayer/libflash/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | # config #LIBFLASH | 1 | # config #LIBFLASH |
2 | # boolean "libflash" | 2 | # boolean "libflash" |
3 | # default "y" | 3 | # default "y" |
4 | # depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE | 4 | # depends ( LIBQPE || LIBQPE-X11 ) |
diff --git a/core/multimedia/opieplayer/libflash/shape.cc b/core/multimedia/opieplayer/libflash/shape.cc index 0d8df93..4d4ecb8 100644 --- a/core/multimedia/opieplayer/libflash/shape.cc +++ b/core/multimedia/opieplayer/libflash/shape.cc | |||
@@ -1,408 +1,410 @@ | |||
1 | ///////////////////////////////////////////////////////////// | 1 | ///////////////////////////////////////////////////////////// |
2 | // Flash Plugin and Player | 2 | // Flash Plugin and Player |
3 | // Copyright (C) 1998,1999 Olivier Debon | 3 | // Copyright (C) 1998,1999 Olivier Debon |
4 | // | 4 | // |
5 | // This program is free software; you can redistribute it and/or | 5 | // This program is free software; you can redistribute it and/or |
6 | // modify it under the terms of the GNU General Public License | 6 | // modify it under the terms of the GNU General Public License |
7 | // as published by the Free Software Foundation; either version 2 | 7 | // as published by the Free Software Foundation; either version 2 |
8 | // of the License, or (at your option) any later version. | 8 | // of the License, or (at your option) any later version. |
9 | // | 9 | // |
10 | // This program is distributed in the hope that it will be useful, | 10 | // This program is distributed in the hope that it will be useful, |
11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | // GNU General Public License for more details. | 13 | // GNU General Public License for more details. |
14 | // | 14 | // |
15 | // You should have received a copy of the GNU General Public License | 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 | 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. | 17 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | // | 18 | // |
19 | /////////////////////////////////////////////////////////////// | 19 | /////////////////////////////////////////////////////////////// |
20 | // Author : Olivier Debon <odebon@club-internet.fr> | 20 | // Author : Olivier Debon <odebon@club-internet.fr> |
21 | // | 21 | // |
22 | 22 | ||
23 | #include "swf.h" | 23 | #include "swf.h" |
24 | 24 | ||
25 | #include "math.h" | ||
26 | |||
25 | #ifdef RCSID | 27 | #ifdef RCSID |
26 | static char *rcsid = "$Id$"; | 28 | static char *rcsid = "$Id$"; |
27 | #endif | 29 | #endif |
28 | 30 | ||
29 | #define PRINT 0 | 31 | #define PRINT 0 |
30 | 32 | ||
31 | #define ABS(v) ((v) < 0 ? -(v) : (v)) | 33 | #define ABS(v) ((v) < 0 ? -(v) : (v)) |
32 | 34 | ||
33 | static void prepareStyles(GraphicDevice *gd, Matrix *matrix, Cxform *cxform, FillStyleDef *f, long n); | 35 | static void prepareStyles(GraphicDevice *gd, Matrix *matrix, Cxform *cxform, FillStyleDef *f, long n); |
34 | 36 | ||
35 | static void clearStyles(GraphicDevice *gd, FillStyleDef *f, long n); | 37 | static void clearStyles(GraphicDevice *gd, FillStyleDef *f, long n); |
36 | 38 | ||
37 | static void drawShape(GraphicDevice *gd, Matrix *matrix1, Cxform *cxform, Shape *shape, | 39 | static void drawShape(GraphicDevice *gd, Matrix *matrix1, Cxform *cxform, Shape *shape, |
38 | ShapeAction shapeAction, void *id,ScanLineFunc scan_line_func); | 40 | ShapeAction shapeAction, void *id,ScanLineFunc scan_line_func); |
39 | 41 | ||
40 | // Constructor | 42 | // Constructor |
41 | 43 | ||
42 | Shape::Shape(long id, int level) : Character(ShapeType, id) | 44 | Shape::Shape(long id, int level) : Character(ShapeType, id) |
43 | { | 45 | { |
44 | defLevel = level; | 46 | defLevel = level; |
45 | 47 | ||
46 | defaultFillStyle.type = f_Solid; | 48 | defaultFillStyle.type = f_Solid; |
47 | defaultFillStyle.color.red = 0; | 49 | defaultFillStyle.color.red = 0; |
48 | defaultFillStyle.color.green = 0; | 50 | defaultFillStyle.color.green = 0; |
49 | defaultFillStyle.color.blue = 0; | 51 | defaultFillStyle.color.blue = 0; |
50 | defaultFillStyle.color.alpha = ALPHA_OPAQUE; | 52 | defaultFillStyle.color.alpha = ALPHA_OPAQUE; |
51 | 53 | ||
52 | defaultLineStyle.width = 0; | 54 | defaultLineStyle.width = 0; |
53 | 55 | ||
54 | // This is to force a first update | 56 | // This is to force a first update |
55 | lastMat.a = 0; | 57 | lastMat.a = 0; |
56 | lastMat.d = 0; | 58 | lastMat.d = 0; |
57 | shape_size += sizeof(Shape); | 59 | shape_size += sizeof(Shape); |
58 | shape_nb ++; | 60 | shape_nb ++; |
59 | 61 | ||
60 | file_ptr = NULL; | 62 | file_ptr = NULL; |
61 | getStyles = 0; | 63 | getStyles = 0; |
62 | getAlpha = 0; | 64 | getAlpha = 0; |
63 | } | 65 | } |
64 | 66 | ||
65 | Shape::~Shape() | 67 | Shape::~Shape() |
66 | { | 68 | { |
67 | if (file_ptr) { | 69 | if (file_ptr) { |
68 | free(file_ptr); | 70 | free(file_ptr); |
69 | } | 71 | } |
70 | } | 72 | } |
71 | 73 | ||
72 | void | 74 | void |
73 | Shape::setBoundingBox(Rect rect) | 75 | Shape::setBoundingBox(Rect rect) |
74 | { | 76 | { |
75 | boundary = rect; | 77 | boundary = rect; |
76 | } | 78 | } |
77 | 79 | ||
78 | void | 80 | void |
79 | Shape::getBoundingBox(Rect *bb, DisplayListEntry *e) | 81 | Shape::getBoundingBox(Rect *bb, DisplayListEntry *e) |
80 | { | 82 | { |
81 | *bb = boundary; | 83 | *bb = boundary; |
82 | } | 84 | } |
83 | 85 | ||
84 | int | 86 | int |
85 | Shape::execute(GraphicDevice *gd, Matrix *matrix, Cxform *cxform) | 87 | Shape::execute(GraphicDevice *gd, Matrix *matrix, Cxform *cxform) |
86 | { | 88 | { |
87 | //printf("TagId = %d\n", getTagId()); | 89 | //printf("TagId = %d\n", getTagId()); |
88 | //if (getTagId() != 220) return 0; | 90 | //if (getTagId() != 220) return 0; |
89 | 91 | ||
90 | if (cxform) { | 92 | if (cxform) { |
91 | defaultFillStyle.color = cxform->getColor(gd->getForegroundColor()); | 93 | defaultFillStyle.color = cxform->getColor(gd->getForegroundColor()); |
92 | } else { | 94 | } else { |
93 | defaultFillStyle.color = gd->getForegroundColor(); | 95 | defaultFillStyle.color = gd->getForegroundColor(); |
94 | } | 96 | } |
95 | defaultFillStyle.color.pixel = gd->allocColor(defaultFillStyle.color); | 97 | defaultFillStyle.color.pixel = gd->allocColor(defaultFillStyle.color); |
96 | 98 | ||
97 | drawShape(gd, matrix, cxform, this, ShapeDraw, NULL, 0); | 99 | drawShape(gd, matrix, cxform, this, ShapeDraw, NULL, 0); |
98 | return 0; | 100 | return 0; |
99 | } | 101 | } |
100 | 102 | ||
101 | void | 103 | void |
102 | Shape::getRegion(GraphicDevice *gd, Matrix *matrix, void *id, ScanLineFunc scan_line_func) | 104 | Shape::getRegion(GraphicDevice *gd, Matrix *matrix, void *id, ScanLineFunc scan_line_func) |
103 | { | 105 | { |
104 | gd->setClipping(0); | 106 | gd->setClipping(0); |
105 | drawShape(gd,matrix,0,this,ShapeGetRegion,id,scan_line_func); | 107 | drawShape(gd,matrix,0,this,ShapeGetRegion,id,scan_line_func); |
106 | gd->setClipping(1); | 108 | gd->setClipping(1); |
107 | } | 109 | } |
108 | 110 | ||
109 | /************************************************************************/ | 111 | /************************************************************************/ |
110 | 112 | ||
111 | /* create a new path */ | 113 | /* create a new path */ |
112 | 114 | ||
113 | static void newPath(ShapeParser *shape, | 115 | static void newPath(ShapeParser *shape, |
114 | long x, long y) | 116 | long x, long y) |
115 | { | 117 | { |
116 | Path *p; | 118 | Path *p; |
117 | long x1,y1; | 119 | long x1,y1; |
118 | 120 | ||
119 | p=&shape->curPath; | 121 | p=&shape->curPath; |
120 | 122 | ||
121 | x1 = shape->matrix->getX(x, y); | 123 | x1 = shape->matrix->getX(x, y); |
122 | y1 = shape->matrix->getY(x, y); | 124 | y1 = shape->matrix->getY(x, y); |
123 | 125 | ||
124 | p->lastX = x1; | 126 | p->lastX = x1; |
125 | p->lastY = y1; | 127 | p->lastY = y1; |
126 | 128 | ||
127 | p->nb_edges = 0; | 129 | p->nb_edges = 0; |
128 | p->nb_segments = 0; | 130 | p->nb_segments = 0; |
129 | } | 131 | } |
130 | 132 | ||
131 | 133 | ||
132 | static void addSegment1(ShapeParser *shape, | 134 | static void addSegment1(ShapeParser *shape, |
133 | long x, long y, | 135 | long x, long y, |
134 | FillStyleDef *f0, | 136 | FillStyleDef *f0, |
135 | FillStyleDef *f1, | 137 | FillStyleDef *f1, |
136 | LineStyleDef *l) | 138 | LineStyleDef *l) |
137 | { | 139 | { |
138 | Path *p; | 140 | Path *p; |
139 | p=&shape->curPath; | 141 | p=&shape->curPath; |
140 | 142 | ||
141 | if (l) { | 143 | if (l) { |
142 | /* a line is defined ... it will be drawn later */ | 144 | /* a line is defined ... it will be drawn later */ |
143 | LineSegment *ls; | 145 | LineSegment *ls; |
144 | 146 | ||
145 | ls = new LineSegment; | 147 | ls = new LineSegment; |
146 | if (ls != NULL) { | 148 | if (ls != NULL) { |
147 | ls->l = l; | 149 | ls->l = l; |
148 | ls->x1 = p->lastX; | 150 | ls->x1 = p->lastX; |
149 | ls->y1 = p->lastY; | 151 | ls->y1 = p->lastY; |
150 | ls->x2 = x; | 152 | ls->x2 = x; |
151 | ls->y2 = y; | 153 | ls->y2 = y; |
152 | ls->first = (p->nb_segments == 0); | 154 | ls->first = (p->nb_segments == 0); |
153 | ls->next = NULL; | 155 | ls->next = NULL; |
154 | if (shape->last_line == NULL) { | 156 | if (shape->last_line == NULL) { |
155 | shape->first_line = ls; | 157 | shape->first_line = ls; |
156 | } else { | 158 | } else { |
157 | shape->last_line->next = ls; | 159 | shape->last_line->next = ls; |
158 | } | 160 | } |
159 | shape->last_line = ls; | 161 | shape->last_line = ls; |
160 | } | 162 | } |
161 | } | 163 | } |
162 | 164 | ||
163 | /* anti antialiasing not needed if line */ | 165 | /* anti antialiasing not needed if line */ |
164 | if (!shape->reverse) { | 166 | if (!shape->reverse) { |
165 | shape->gd->addSegment(p->lastX,p->lastY,x,y,f0,f1,l ? 0 : 1); | 167 | shape->gd->addSegment(p->lastX,p->lastY,x,y,f0,f1,l ? 0 : 1); |
166 | } else { | 168 | } else { |
167 | shape->gd->addSegment(p->lastX,p->lastY,x,y,f1,f0,l ? 0 : 1); | 169 | shape->gd->addSegment(p->lastX,p->lastY,x,y,f1,f0,l ? 0 : 1); |
168 | } | 170 | } |
169 | 171 | ||
170 | p->lastX = x; | 172 | p->lastX = x; |
171 | p->lastY = y; | 173 | p->lastY = y; |
172 | 174 | ||
173 | p->nb_segments++; | 175 | p->nb_segments++; |
174 | } | 176 | } |
175 | 177 | ||
176 | 178 | ||
177 | static void addLine(ShapeParser *shape, long x, long y, | 179 | static void addLine(ShapeParser *shape, long x, long y, |
178 | FillStyleDef *f0, | 180 | FillStyleDef *f0, |
179 | FillStyleDef *f1, | 181 | FillStyleDef *f1, |
180 | LineStyleDef *l) | 182 | LineStyleDef *l) |
181 | { | 183 | { |
182 | long x1,y1; | 184 | long x1,y1; |
183 | Path *p; | 185 | Path *p; |
184 | 186 | ||
185 | p=&shape->curPath; | 187 | p=&shape->curPath; |
186 | 188 | ||
187 | x1 = shape->matrix->getX(x, y); | 189 | x1 = shape->matrix->getX(x, y); |
188 | y1 = shape->matrix->getY(x, y); | 190 | y1 = shape->matrix->getY(x, y); |
189 | 191 | ||
190 | addSegment1(shape,x1,y1,f0,f1,l); | 192 | addSegment1(shape,x1,y1,f0,f1,l); |
191 | 193 | ||
192 | p->nb_edges++; | 194 | p->nb_edges++; |
193 | } | 195 | } |
194 | 196 | ||
195 | 197 | ||
196 | // This is based on Divide and Conquer algorithm. | 198 | // This is based on Divide and Conquer algorithm. |
197 | 199 | ||
198 | #define BFRAC_BITS 0 | 200 | #define BFRAC_BITS 0 |
199 | #define BFRAC (1 << BFRAC_BITS) | 201 | #define BFRAC (1 << BFRAC_BITS) |
200 | 202 | ||
201 | static void | 203 | static void |
202 | bezierBuildPoints (ShapeParser *s, | 204 | bezierBuildPoints (ShapeParser *s, |
203 | int subdivisions, | 205 | int subdivisions, |
204 | long a1X, long a1Y, | 206 | long a1X, long a1Y, |
205 | long cX, long cY, | 207 | long cX, long cY, |
206 | long a2X, long a2Y) | 208 | long a2X, long a2Y) |
207 | { | 209 | { |
208 | long c1X,c1Y; | 210 | long c1X,c1Y; |
209 | long c2X,c2Y; | 211 | long c2X,c2Y; |
210 | long X,Y; | 212 | long X,Y; |
211 | long xmin,ymin,xmax,ymax; | 213 | long xmin,ymin,xmax,ymax; |
212 | 214 | ||
213 | if (subdivisions != 0) { | 215 | if (subdivisions != 0) { |
214 | 216 | ||
215 | /* find the bounding box */ | 217 | /* find the bounding box */ |
216 | 218 | ||
217 | if (a1X < cX) { | 219 | if (a1X < cX) { |
218 | xmin = a1X; | 220 | xmin = a1X; |
219 | xmax = cX; | 221 | xmax = cX; |
220 | } else { | 222 | } else { |
221 | xmin = cX; | 223 | xmin = cX; |
222 | xmax = a1X; | 224 | xmax = a1X; |
223 | } | 225 | } |
224 | if (a2X < xmin) xmin = a2X; | 226 | if (a2X < xmin) xmin = a2X; |
225 | if (a2X > xmax) xmax = a2X; | 227 | if (a2X > xmax) xmax = a2X; |
226 | 228 | ||
227 | if (a1Y < cY) { | 229 | if (a1Y < cY) { |
228 | ymin = a1Y; | 230 | ymin = a1Y; |
229 | ymax = cY; | 231 | ymax = cY; |
230 | } else { | 232 | } else { |
231 | ymin = cY; | 233 | ymin = cY; |
232 | ymax = a1Y; | 234 | ymax = a1Y; |
233 | } | 235 | } |
234 | if (a2Y < ymin) ymin = a2Y; | 236 | if (a2Y < ymin) ymin = a2Y; |
235 | if (a2Y > ymax) ymax = a2Y; | 237 | if (a2Y > ymax) ymax = a2Y; |
236 | 238 | ||
237 | if (((xmax - xmin) + (ymax - ymin)) >= (BFRAC*FRAC*2)) { | 239 | if (((xmax - xmin) + (ymax - ymin)) >= (BFRAC*FRAC*2)) { |
238 | // Control point 1 | 240 | // Control point 1 |
239 | c1X = (a1X+cX) >> 1; | 241 | c1X = (a1X+cX) >> 1; |
240 | c1Y = (a1Y+cY) >> 1; | 242 | c1Y = (a1Y+cY) >> 1; |
241 | 243 | ||
242 | // Control point 2 | 244 | // Control point 2 |
243 | c2X = (a2X+cX) >> 1; | 245 | c2X = (a2X+cX) >> 1; |
244 | c2Y = (a2Y+cY) >> 1; | 246 | c2Y = (a2Y+cY) >> 1; |
245 | 247 | ||
246 | // New point | 248 | // New point |
247 | X = (c1X+c2X) >> 1; | 249 | X = (c1X+c2X) >> 1; |
248 | Y = (c1Y+c2Y) >> 1; | 250 | Y = (c1Y+c2Y) >> 1; |
249 | 251 | ||
250 | subdivisions--; | 252 | subdivisions--; |
251 | 253 | ||
252 | bezierBuildPoints(s, subdivisions, | 254 | bezierBuildPoints(s, subdivisions, |
253 | a1X, a1Y, c1X, c1Y, X, Y); | 255 | a1X, a1Y, c1X, c1Y, X, Y); |
254 | bezierBuildPoints(s, subdivisions, | 256 | bezierBuildPoints(s, subdivisions, |
255 | X, Y, c2X, c2Y, a2X, a2Y); | 257 | X, Y, c2X, c2Y, a2X, a2Y); |
256 | 258 | ||
257 | return; | 259 | return; |
258 | } | 260 | } |
259 | } | 261 | } |
260 | 262 | ||
261 | addSegment1(s, (a2X+(BFRAC/2)) >> BFRAC_BITS, | 263 | addSegment1(s, (a2X+(BFRAC/2)) >> BFRAC_BITS, |
262 | (a2Y+(BFRAC/2)) >> BFRAC_BITS, s->f0, s->f1, s->l); | 264 | (a2Y+(BFRAC/2)) >> BFRAC_BITS, s->f0, s->f1, s->l); |
263 | } | 265 | } |
264 | 266 | ||
265 | /* this code is broken, but useful to get something */ | 267 | /* this code is broken, but useful to get something */ |
266 | static void flushPaths(ShapeParser *s) | 268 | static void flushPaths(ShapeParser *s) |
267 | { | 269 | { |
268 | LineSegment *ls; | 270 | LineSegment *ls; |
269 | LineStyleDef *l; | 271 | LineStyleDef *l; |
270 | long nx,ny,nn,w; | 272 | long nx,ny,nn,w; |
271 | GraphicDevice *gd = s->gd; | 273 | GraphicDevice *gd = s->gd; |
272 | 274 | ||
273 | /* draw the filled polygon */ | 275 | /* draw the filled polygon */ |
274 | gd->drawPolygon(); | 276 | gd->drawPolygon(); |
275 | 277 | ||
276 | /* draw the lines */ | 278 | /* draw the lines */ |
277 | ls = s->first_line; | 279 | ls = s->first_line; |
278 | if (ls != NULL) { | 280 | if (ls != NULL) { |
279 | do { | 281 | do { |
280 | l = ls->l; | 282 | l = ls->l; |
281 | 283 | ||
282 | #if 0 | 284 | #if 0 |
283 | printf("line %d %d %d %d width=%d\n", | 285 | printf("line %d %d %d %d width=%d\n", |
284 | ls->x1, ls->y1, ls->x2, ls->y2, l->width); | 286 | ls->x1, ls->y1, ls->x2, ls->y2, l->width); |
285 | #endif | 287 | #endif |
286 | 288 | ||
287 | /* XXX: this width is false, but it is difficult (and expensive) | 289 | /* XXX: this width is false, but it is difficult (and expensive) |
288 | to have the correct one */ | 290 | to have the correct one */ |
289 | w = ABS((long)(s->matrix->a * l->width)); | 291 | w = ABS((long)(s->matrix->a * l->width)); |
290 | 292 | ||
291 | if (w <= ((3*FRAC)/2)) { | 293 | if (w <= ((3*FRAC)/2)) { |
292 | w = FRAC; | 294 | w = FRAC; |
293 | } | 295 | } |
294 | #ifdef THIN_LINES | 296 | #ifdef THIN_LINES |
295 | if (w <= ((3*FRAC)/2)) { | 297 | if (w <= ((3*FRAC)/2)) { |
296 | // draw the thin lines only in shapeAction == shapeDraw | 298 | // draw the thin lines only in shapeAction == shapeDraw |
297 | if (gd->scan_line_func == NULL) { | 299 | if (gd->scan_line_func == NULL) { |
298 | gd->setForegroundColor(l->fillstyle.color); | 300 | gd->setForegroundColor(l->fillstyle.color); |
299 | gd->drawLine(ls->x1, ls->y1, ls->x2, ls->y2, w); | 301 | gd->drawLine(ls->x1, ls->y1, ls->x2, ls->y2, w); |
300 | } | 302 | } |
301 | } else { | 303 | } else { |
302 | #else | 304 | #else |
303 | { | 305 | { |
304 | #endif | 306 | #endif |
305 | /* compute the normal vector */ | 307 | /* compute the normal vector */ |
306 | 308 | ||
307 | nx = -(ls->y2 - ls->y1); | 309 | nx = -(ls->y2 - ls->y1); |
308 | ny = (ls->x2 - ls->x1); | 310 | ny = (ls->x2 - ls->x1); |
309 | 311 | ||
310 | /* normalize & width */ | 312 | /* normalize & width */ |
311 | nn = 2 * (long) sqrt(nx * nx + ny * ny); | 313 | nn = 2 * (long) sqrt(nx * nx + ny * ny); |
312 | 314 | ||
313 | #define UL ls->x1 + nx -ny, ls->y1 + ny +nx | 315 | #define UL ls->x1 + nx -ny, ls->y1 + ny +nx |
314 | #define UR ls->x2 + nx +ny, ls->y2 + ny -nx | 316 | #define UR ls->x2 + nx +ny, ls->y2 + ny -nx |
315 | #define LL ls->x1 - nx -ny, ls->y1 - ny +nx | 317 | #define LL ls->x1 - nx -ny, ls->y1 - ny +nx |
316 | #define LR ls->x2 - nx +ny, ls->y2 - ny -nx | 318 | #define LR ls->x2 - nx +ny, ls->y2 - ny -nx |
317 | 319 | ||
318 | if (nn > 0) { | 320 | if (nn > 0) { |
319 | nx = (nx * w) / nn; | 321 | nx = (nx * w) / nn; |
320 | ny = (ny * w) / nn; | 322 | ny = (ny * w) / nn; |
321 | 323 | ||
322 | /* top segment */ | 324 | /* top segment */ |
323 | gd->addSegment(UL, UR, NULL, &l->fillstyle, 1); | 325 | gd->addSegment(UL, UR, NULL, &l->fillstyle, 1); |
324 | 326 | ||
325 | /* bottom segment */ | 327 | /* bottom segment */ |
326 | gd->addSegment(LL, LR, &l->fillstyle, NULL, 1); | 328 | gd->addSegment(LL, LR, &l->fillstyle, NULL, 1); |
327 | 329 | ||
328 | /* right segment */ | 330 | /* right segment */ |
329 | gd->addSegment(UR, LR, &l->fillstyle, NULL, 1); | 331 | gd->addSegment(UR, LR, &l->fillstyle, NULL, 1); |
330 | 332 | ||
331 | /* left segment */ | 333 | /* left segment */ |
332 | gd->addSegment(UL, LL, NULL, &l->fillstyle, 1); | 334 | gd->addSegment(UL, LL, NULL, &l->fillstyle, 1); |
333 | 335 | ||
334 | /* draw the line polygon */ | 336 | /* draw the line polygon */ |
335 | gd->drawPolygon(); | 337 | gd->drawPolygon(); |
336 | } | 338 | } |
337 | } | 339 | } |
338 | 340 | ||
339 | ls = ls->next; | 341 | ls = ls->next; |
340 | } while (ls != NULL); | 342 | } while (ls != NULL); |
341 | 343 | ||
342 | /* delete the line structures */ | 344 | /* delete the line structures */ |
343 | 345 | ||
344 | ls = s->first_line; | 346 | ls = s->first_line; |
345 | while (ls != NULL) { | 347 | while (ls != NULL) { |
346 | LineSegment *ls1; | 348 | LineSegment *ls1; |
347 | ls1 = ls->next; | 349 | ls1 = ls->next; |
348 | delete ls; | 350 | delete ls; |
349 | ls = ls1; | 351 | ls = ls1; |
350 | } | 352 | } |
351 | 353 | ||
352 | /* reset the line pointers */ | 354 | /* reset the line pointers */ |
353 | s->first_line = NULL; | 355 | s->first_line = NULL; |
354 | s->last_line = NULL; | 356 | s->last_line = NULL; |
355 | } | 357 | } |
356 | } | 358 | } |
357 | 359 | ||
358 | 360 | ||
359 | static void addBezier(ShapeParser *shape, | 361 | static void addBezier(ShapeParser *shape, |
360 | long ctrlX1, long ctrlY1, | 362 | long ctrlX1, long ctrlY1, |
361 | long newX1, long newY1, | 363 | long newX1, long newY1, |
362 | FillStyleDef *f0, | 364 | FillStyleDef *f0, |
363 | FillStyleDef *f1, | 365 | FillStyleDef *f1, |
364 | LineStyleDef *l) | 366 | LineStyleDef *l) |
365 | { | 367 | { |
366 | long newX,newY,ctrlX,ctrlY; | 368 | long newX,newY,ctrlX,ctrlY; |
367 | Path *p; | 369 | Path *p; |
368 | 370 | ||
369 | p=&shape->curPath; | 371 | p=&shape->curPath; |
370 | 372 | ||
371 | /* note: we do the matrix multiplication before calculating the | 373 | /* note: we do the matrix multiplication before calculating the |
372 | bezier points (faster !) */ | 374 | bezier points (faster !) */ |
373 | 375 | ||
374 | ctrlX = shape->matrix->getX(ctrlX1, ctrlY1); | 376 | ctrlX = shape->matrix->getX(ctrlX1, ctrlY1); |
375 | ctrlY = shape->matrix->getY(ctrlX1, ctrlY1); | 377 | ctrlY = shape->matrix->getY(ctrlX1, ctrlY1); |
376 | newX = shape->matrix->getX(newX1, newY1); | 378 | newX = shape->matrix->getX(newX1, newY1); |
377 | newY = shape->matrix->getY(newX1, newY1); | 379 | newY = shape->matrix->getY(newX1, newY1); |
378 | 380 | ||
379 | shape->f0 = f0; | 381 | shape->f0 = f0; |
380 | shape->f1 = f1; | 382 | shape->f1 = f1; |
381 | shape->l = l; | 383 | shape->l = l; |
382 | 384 | ||
383 | bezierBuildPoints(shape, 3, | 385 | bezierBuildPoints(shape, 3, |
384 | p->lastX<<BFRAC_BITS,p->lastY<<BFRAC_BITS, | 386 | p->lastX<<BFRAC_BITS,p->lastY<<BFRAC_BITS, |
385 | ctrlX<<BFRAC_BITS,ctrlY<<BFRAC_BITS, | 387 | ctrlX<<BFRAC_BITS,ctrlY<<BFRAC_BITS, |
386 | newX<<BFRAC_BITS,newY<<BFRAC_BITS); | 388 | newX<<BFRAC_BITS,newY<<BFRAC_BITS); |
387 | 389 | ||
388 | p->nb_edges++; | 390 | p->nb_edges++; |
389 | } | 391 | } |
390 | 392 | ||
391 | /***********************************************************************/ | 393 | /***********************************************************************/ |
392 | 394 | ||
393 | 395 | ||
394 | /* bit parser */ | 396 | /* bit parser */ |
395 | 397 | ||
396 | static void InitBitParser(struct BitParser *b,U8 *buf) | 398 | static void InitBitParser(struct BitParser *b,U8 *buf) |
397 | { | 399 | { |
398 | b->ptr = buf; | 400 | b->ptr = buf; |
399 | } | 401 | } |
400 | 402 | ||
401 | static void InitBits(struct BitParser *b) | 403 | static void InitBits(struct BitParser *b) |
402 | { | 404 | { |
403 | // Reset the bit position and buffer. | 405 | // Reset the bit position and buffer. |
404 | b->m_bitPos = 0; | 406 | b->m_bitPos = 0; |
405 | b->m_bitBuf = 0; | 407 | b->m_bitBuf = 0; |
406 | } | 408 | } |
407 | 409 | ||
408 | 410 | ||
diff --git a/core/multimedia/opieplayer/libmad/config.in b/core/multimedia/opieplayer/libmad/config.in index 72249dc..f38e52d 100644 --- a/core/multimedia/opieplayer/libmad/config.in +++ b/core/multimedia/opieplayer/libmad/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config LIBMAD | 1 | config LIBMAD |
2 | boolean "opieplayer1-libmadplugin (plugin with shoutcast/icecast support to play MP3 files)" | 2 | boolean "opieplayer1-libmadplugin (plugin with shoutcast/icecast support to play MP3 files)" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && OPIEPLAYER | 4 | depends ( LIBQPE || LIBQPE-X11 ) && OPIEPLAYER |
diff --git a/core/multimedia/opieplayer/libmpeg3/config.in b/core/multimedia/opieplayer/libmpeg3/config.in index b965a40..d964fb9 100644 --- a/core/multimedia/opieplayer/libmpeg3/config.in +++ b/core/multimedia/opieplayer/libmpeg3/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config LIBMPEG3 | 1 | config LIBMPEG3 |
2 | boolean "opieplayer1-libmpeg3plugin (play MPEG3 video files)" | 2 | boolean "opieplayer1-libmpeg3plugin (play MPEG3 video files)" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && OPIEPLAYER | 4 | depends ( LIBQPE || LIBQPE-X11 ) && OPIEPLAYER |
diff --git a/core/multimedia/opieplayer/modplug/config.in b/core/multimedia/opieplayer/modplug/config.in index 86e4725..d7496b0 100644 --- a/core/multimedia/opieplayer/modplug/config.in +++ b/core/multimedia/opieplayer/modplug/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config MODPLUG | 1 | config MODPLUG |
2 | boolean "opieplayer1-modplugin (play MOD/XM/S3M/IT amiga tracker modules)" | 2 | boolean "opieplayer1-modplugin (play MOD/XM/S3M/IT amiga tracker modules)" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && OPIEPLAYER | 4 | depends ( LIBQPE || LIBQPE-X11 ) && OPIEPLAYER |
diff --git a/core/multimedia/opieplayer/wavplugin/config.in b/core/multimedia/opieplayer/wavplugin/config.in index 56bdfab..b7dddc5 100644 --- a/core/multimedia/opieplayer/wavplugin/config.in +++ b/core/multimedia/opieplayer/wavplugin/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config WAVPLUGIN | 1 | config WAVPLUGIN |
2 | boolean "opieplayer1-wavplugin (play WAV files)" | 2 | boolean "opieplayer1-wavplugin (play WAV files)" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && OPIEPLAYER | 4 | depends ( LIBQPE || LIBQPE-X11 ) && OPIEPLAYER |