1 /* 2 Ming, an SWF output library 3 Copyright (C) 2001 Opaque Industries - http://www.opaque.net/ 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Lesser General Public 7 License as published by the Free Software Foundation; either 8 version 2.1 of the License, or (at your option) any later version. 9 10 This library 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 GNU 13 Lesser General Public License for more details. 14 15 You should have received a copy of the GNU Lesser General Public 16 License along with this library; if not, write to the Free Software 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 */ 19 #if 0 20 #ifndef SWF_H_INCLUDED 21 #define SWF_H_INCLUDED 22 23 #include <stdio.h> 24 25 #include "blocktypes.h" 26 27 typedef unsigned char byte; 28 29 extern void (*SWF_warn)(const char *msg, ...); 30 extern void (*SWF_error)(const char *msg, ...); 31 32 void setSWFWarnFunction(void (*error)(const char *msg, ...)); 33 void setSWFErrorFunction(void (*error)(const char *msg, ...)); 34 35 void SWF_assert(int c); 36 37 38 /* a generic output method. specific instances dump output to file, 39 send to stdout, etc. */ 40 41 typedef void (*SWFByteOutputMethod)(byte b, void *data); 42 43 void methodWriteUInt16(int i, SWFByteOutputMethod method, void *data); 44 void methodWriteUInt32(int i, SWFByteOutputMethod method, void *data); 45 46 void fileOutputMethod(byte b, void *data); 47 48 49 /* we dig opaque types */ 50 51 52 /* SWFBlock is the parent for all classes in this directory */ 53 54 typedef struct SWFBlock_s* SWFBlock; 55 56 int completeSWFBlock(SWFBlock block); 57 void destroySWFBlock(SWFBlock block); 58 int writeSWFBlockToMethod(SWFBlock block, 59 SWFByteOutputMethod method, void *data); 60 61 void SWFBlock_setDefined(SWFBlock block); 62 byte SWFBlock_isDefined(SWFBlock block); 63 64 SWFBlocktype SWFBlock_getType(SWFBlock block); 65 66 67 /* SWFInput */ 68 69 typedef struct SWFInput_s *SWFInput; 70 71 int SWFInput_length(SWFInput input); 72 void SWFInput_rewind(SWFInput input); 73 int SWFInput_tell(SWFInput input); 74 void SWFInput_seek(SWFInput input, long offset, int whence); 75 int SWFInput_eof(SWFInput input); 76 77 SWFInput newSWFInput_file(FILE *f); 78 SWFInput newSWFInput_stream(FILE *f); 79 SWFInput newSWFInput_buffer(unsigned char *buffer, int length); 80 SWFInput newSWFInput_allocedBuffer(unsigned char *buffer, int length); 81 82 83 /* SWFOutput */ 84 85 typedef struct SWFOutput_s * SWFOutput; 86 87 SWFOutput newSWFOutput(); 88 SWFOutput newSizedSWFOutput(int size); 89 void destroySWFOutput(SWFOutput out); 90 91 int SWFOutput_length(SWFOutput out); 92 void SWFOutput_byteAlign(SWFOutput out); 93 void SWFOutput_writeUInt16(SWFOutput out, int data); 94 void SWFOutput_writeToMethod(SWFOutput out, 95 SWFByteOutputMethod method, void *data); 96 97 98 /* SWFRect */ 99 100 typedef struct SWFRect_s * SWFRect; 101 102 SWFRect newSWFRect(int minX, int maxX, int minY, int maxY); 103 void destroySWFRect(SWFRect rect); 104 void SWFOutput_writeRect(SWFOutput output, SWFRect rect); 105 106 int SWFRect_getWidth(SWFRect r); 107 int SWFRect_getHeight(SWFRect r); 108 109 110 /* SWFCharacter */ 111 112 /* everything with a character ID is an SWFCharacter */ 113 114 typedef struct SWFCharacter_s * SWFCharacter; 115 116 /* this is a silly hack to track blocks which are dependent on others. 117 Would be nice to have this in the ming layer above instead */ 118 119 void SWFCharacter_addDependency(SWFCharacter character, SWFBlock dependency); 120 SWFBlock *SWFCharacter_getDependencies(SWFCharacter character); 121 int SWFCharacter_getNDependencies(SWFCharacter character); 122 void SWFCharacter_clearDependencies(SWFCharacter character); 123 124 int SWFCharacter_getScaledWidth(SWFCharacter character); 125 int SWFCharacter_getScaledHeight(SWFCharacter character); 126 127 int SWFBlock_isCharacter(SWFBlock block); 128 129 130 /* SWFBitmap */ 131 132 typedef struct SWFBitmap_s *SWFBitmap; 133 134 void destroySWFBitmap(SWFBlock block); 135 int SWFBitmap_getWidth(SWFBitmap b); 136 int SWFBitmap_getHeight(SWFBitmap b); 137 138 SWFBitmap newSWFBitmap_fromInput(SWFInput input); 139 140 141 /* SWFDBLBitmap */ 142 143 typedef struct SWFDBLBitmap_s *SWFDBLBitmap; 144 145 SWFDBLBitmap newSWFDBLBitmap(FILE *f); 146 SWFDBLBitmap newSWFDBLBitmap_fromInput(SWFInput input); 147 148 149 /* SWFJpegBitmap */ 150 151 typedef struct SWFJpegBitmap_s *SWFJpegBitmap; 152 typedef struct SWFJpegWithAlpha_s *SWFJpegWithAlpha; 153 154 SWFJpegBitmap newSWFJpegBitmap(FILE *f); 155 SWFJpegBitmap newSWFJpegBitmap_fromInput(SWFInput input); 156 SWFJpegWithAlpha newSWFJpegWithAlpha(FILE *f, FILE *alpha); 157 SWFJpegWithAlpha newSWFJpegWithAlpha_fromInput(SWFInput input, SWFInput alpha); 158 159 160 /* SWFGradient */ 161 162 typedef struct SWFGradient_s *SWFGradient; 163 164 SWFGradient newSWFGradient(); 165 void destroySWFGradient(SWFGradient gradient); 166 void SWFGradient_addEntry(SWFGradient gradient, 167 float ratio, byte r, byte g, byte b, byte a); 168 169 170 /* SWFMatrix */ 171 172 typedef struct SWFMatrix_s *SWFMatrix; 173 174 SWFMatrix newSWFMatrix(float a, float b, float c, float d, int x, int y); 175 void destroySWFMatrix(SWFMatrix matrix); 176 177 SWFMatrix SWFMatrix_set(SWFMatrix m, 178 float a, float b, float c, float d, int x, int y); 179 void SWFMatrix_clearTranslate(SWFMatrix m); 180 void SWFMatrix_clearTransform(SWFMatrix m); 181 182 float SWFMatrix_getScaleX(SWFMatrix m); 183 float SWFMatrix_getRotate0(SWFMatrix m); 184 float SWFMatrix_getRotate1(SWFMatrix m); 185 float SWFMatrix_getScaleY(SWFMatrix m); 186 int SWFMatrix_getTranslateX(SWFMatrix m); 187 int SWFMatrix_getTranslateY(SWFMatrix m); 188 189 /* SWFFont */ 190 191 typedef struct SWFFont_s *SWFFont; 192 193 SWFFont newSWFFont(); 194 SWFFont loadSWFFontFromFile(FILE *file); 195 void destroySWFFont(SWFBlock block); 196 197 int SWFFont_getScaledStringWidth(SWFFont font, const unsigned char *string); 198 199 short SWFFont_getScaledAscent(SWFFont font); 200 short SWFFont_getScaledDescent(SWFFont font); 201 short SWFFont_getScaledLeading(SWFFont font); 202 203 204 /* SWFText */ 205 206 typedef struct SWFText_s *SWFText; 207 208 SWFText newSWFText(); 209 SWFText newSWFText2(); 210 void destroySWFText(SWFBlock block); 211 212 void SWFText_setFont(SWFText text, SWFBlock font); 213 void SWFText_setScaledHeight(SWFText text, int height); 214 void SWFText_scaledMoveTo(SWFText text, int x, int y); 215 void SWFText_setColor(SWFText text, byte r, byte g, byte b, byte a); 216 void SWFText_addString(SWFText text, const char *string, int *advance); 217 void SWFText_addUTF8String(SWFText text, const char *string, int *advance); 218 void SWFText_setSpacing(SWFText text, float spacing); 219 220 int SWFText_getScaledStringWidth(SWFText text, const char *string); 221 int SWFText_getScaledUTF8StringWidth(SWFText text, const char *string); 222 223 short SWFText_getScaledAscent(SWFText text); 224 short SWFText_getScaledDescent(SWFText text); 225 short SWFText_getScaledLeading(SWFText text); 226 227 228 /* deprecated: */ 229 #define SWFText_setXY(t,x,y) SWFText_moveTo((t),(x),(y)) 230 231 232 /* SWFBrowserFont */ 233 234 typedef struct SWFBrowserFont_s *SWFBrowserFont; 235 236 SWFBrowserFont newSWFBrowserFont(char *name); 237 void destroySWFBrowserFont(SWFBlock block); 238 239 240 /* SWFTextField */ 241 242 typedef struct SWFTextField_s *SWFTextField; 243 244 #define SWFTEXTFIELD_ONMASK 0x2085 /* on bits */ 245 #define SWFTEXTFIELD_OFFMASK 0x7BFF /* off bits */ 246 247 #define SWFTEXTFIELD_HASFONT (1<<0) /* font and size given */ 248 #define SWFTEXTFIELD_HASLENGTH (1<<1) 249 #define SWFTEXTFIELD_HASCOLOR (1<<2) 250 #define SWFTEXTFIELD_NOEDIT (1<<3) 251 #define SWFTEXTFIELD_PASSWORD (1<<4) 252 #define SWFTEXTFIELD_MULTILINE (1<<5) 253 #define SWFTEXTFIELD_WORDWRAP (1<<6) 254 #define SWFTEXTFIELD_HASTEXT (1<<7) /* initial text present */ 255 #define SWFTEXTFIELD_USEFONT (1<<8) 256 #define SWFTEXTFIELD_HTML (1<<9) 257 #define SWFTEXTFIELD_DRAWBOX (1<<11) 258 #define SWFTEXTFIELD_NOSELECT (1<<12) 259 #define SWFTEXTFIELD_HASLAYOUT (1<<13) /* align, margin, lspace, indent */ 260 #define SWFTEXTFIELD_AUTOSIZE (1<<14) /* SWF6 */ 261 262 typedef enum 263 { 264 SWFTEXTFIELD_ALIGN_LEFT = 0, 265 SWFTEXTFIELD_ALIGN_RIGHT = 1, 266 SWFTEXTFIELD_ALIGN_CENTER = 2, 267 SWFTEXTFIELD_ALIGN_JUSTIFY = 3 268 } SWFTextFieldAlignment; 269 270 SWFTextField newSWFTextField(); 271 void destroySWFTextField(SWFBlock block); 272 273 void SWFTextField_setFont(SWFTextField field, SWFBlock font); 274 void SWFTextField_setScaledBounds(SWFTextField field, int width, int height); 275 void SWFTextField_setFlags(SWFTextField field, int flags); 276 void SWFTextField_setColor(SWFTextField field, byte r, byte g, byte b, byte a); 277 void SWFTextField_setVariableName(SWFTextField field, const char *name); 278 void SWFTextField_addString(SWFTextField field, const char *string); 279 void SWFTextField_addUTF8String(SWFTextField field, const char *string); 280 281 void SWFTextField_setScaledFontHeight(SWFTextField field, int height); 282 void SWFTextField_setScaledFieldHeight(SWFTextField field, int height); 283 void SWFTextField_setScaledLeftMargin(SWFTextField field, int leftMargin); 284 void SWFTextField_setScaledRightMargin(SWFTextField field, int rightMargin); 285 void SWFTextField_setScaledIndentation(SWFTextField field, int indentation); 286 void SWFTextField_setScaledLineSpacing(SWFTextField field, int lineSpacing); 287 void SWFTextField_setScaledpadding(SWFTextField field, int padding); 288 void SWFTextField_setAlignment(SWFTextField field, 289 SWFTextFieldAlignment alignment); 290 void SWFTextField_setLength(SWFTextField field, int length); 291 292 293 /* SWFFillStyle */ 294 295 typedef void *SWFFillStyle; 296 297 #define SWFFILL_SOLID 0x00 298 #define SWFFILL_GRADIENT 0x10 299 #define SWFFILL_LINEAR_GRADIENT 0x10 300 #define SWFFILL_RADIAL_GRADIENT 0x12 301 #define SWFFILL_BITMAP 0x40 302 #define SWFFILL_TILED_BITMAP 0x40 303 #define SWFFILL_CLIPPED_BITMAP 0x41 304 305 SWFFillStyle newSWFSolidFillStyle(byte r, byte g, byte b, byte a); 306 SWFFillStyle newSWFGradientFillStyle(SWFGradient gradient, byte radial); 307 SWFFillStyle newSWFBitmapFillStyle(SWFCharacter bitmap, byte flags); 308 309 SWFMatrix SWFFillStyle_getMatrix(SWFFillStyle fill); 310 311 312 /* SWFLineStyle */ 313 314 typedef void *SWFLineStyle; 315 316 SWFLineStyle newSWFLineStyle(unsigned short width, byte r, byte g, byte b, byte a); 317 byte SWFLineStyle_equals(SWFLineStyle line, unsigned short width, byte r, byte g, byte b, byte a); 318 319 320 /* SWFShape */ 321 322 typedef struct SWFShape_s *SWFShape; 323 324 SWFShape newSWFShape(); 325 void destroySWFShape(SWFBlock block); 326 327 int SWFShape_getScaledPenX(SWFShape shape); 328 int SWFShape_getScaledPenY(SWFShape shape); 329 330 void SWFShape_moveScaledPenTo(SWFShape shape, int x, int y); 331 void SWFShape_moveScaledPen(SWFShape shape, int x, int y); 332 333 void SWFShape_drawScaledLineTo(SWFShape shape, int x, int y); 334 void SWFShape_drawScaledLine(SWFShape shape, int dx, int dy); 335 void SWFShape_drawScaledCurveTo(SWFShape shape, int controlx, int controly, 336 int anchorx, int anchory); 337 void SWFShape_drawScaledCurve(SWFShape shape, int controldx, int controldy, 338 int anchordx, int anchordy); 339 340 void SWFShape_drawScaledGlyph(SWFShape shape, 341 SWFFont font, unsigned short c, int size); 342 343 344 /* deprecated: */ 345 346 #define SWFShape_moveTo SWFShape_moveScaledPenTo 347 #define SWFShape_moveToRelative SWFShape_moveScaledPen 348 #define SWFShape_lineTo SWFShape_drawScaledLineTo 349 #define SWFShape_lineToRelative SWFShape_drawScaledLine 350 #define SWFShape_curveTo SWFShape_drawScaledCurveTo 351 #define SWFShape_curveToRelative SWFShape_drawScaledCurve 352 353 void SWFShape_end(SWFShape shape); 354 355 int SWFShape_setLineStyle(SWFShape shape, unsigned short width, 356 byte r, byte g, byte b, byte a); 357 358 SWFFillStyle SWFShape_addSolidFillStyle(SWFShape shape, 359 byte r, byte g, byte b, byte a); 360 361 SWFFillStyle SWFShape_addGradientFillStyle(SWFShape shape, 362 SWFGradient gradient, byte flags); 363 364 SWFFillStyle SWFShape_addBitmapFillStyle(SWFShape shape, 365 SWFBitmap bitmap, byte flags); 366 367 void SWFShape_setLeftFillStyle(SWFShape shape, SWFFillStyle fill); 368 void SWFShape_setRightFillStyle(SWFShape shape, SWFFillStyle fill); 369 370 371 /* SWFMorph */ 372 373 typedef struct SWFMorph_s *SWFMorph; 374 375 SWFMorph newSWFMorphShape(); 376 void destroySWFMorph(SWFBlock block); 377 SWFShape SWFMorph_getShape1(SWFMorph morph); 378 SWFShape SWFMorph_getShape2(SWFMorph morph); 379 380 381 /* sound - only mp3 streaming implemented */ 382 383 typedef struct SWFSound_s *SWFSound; 384 385 #define SWF_SOUND_COMPRESSION 0xf0 386 #define SWF_SOUND_NOT_COMPRESSED (0<<4) 387 #define SWF_SOUND_ADPCM_COMPRESSED (1<<4) 388 389 #define SWF_SOUND_RATE 0x0c 390 #define SWF_SOUND_5KHZ (0<<2) 391 #define SWF_SOUND_11KHZ (1<<2) 392 #define SWF_SOUND_22KHZ (2<<2) 393 #define SWF_SOUND_44KHZ (3<<2) 394 395 #define SWF_SOUND_BITS 0x02 396 #define SWF_SOUND_8BIT (0<<1) 397 #define SWF_SOUND_16BIT (1<<1) 398 399 #define SWF_SOUND_CHANNELS 0x01 400 #define SWF_SOUND_MONO (0<<0) 401 #define SWF_SOUND_STEREO (1<<0) 402 403 SWFSound newSWFSound(FILE *file); 404 SWFSound newSWFSound_fromInput(SWFInput input); 405 void destroySWFSound(SWFSound sound); 406 407 SWFBlock SWFSound_getStreamHead(SWFSound sound, float frameRate); 408 SWFBlock SWFSound_getStreamBlock(SWFSound sound); 409 void SWFSound_rewind(SWFSound sound); 410 411 412 /* SWFCXform */ 413 414 typedef struct SWFCXform_s *SWFCXform; 415 416 SWFCXform newSWFCXform(int rAdd, int gAdd, int bAdd, int aAdd, 417 float rMult, float gMult, float bMult, float aMult); 418 419 SWFCXform newSWFAddCXform(int rAdd, int gAdd, int bAdd, int aAdd); 420 421 SWFCXform newSWFMultCXform(float rMult, float gMult, float bMult, float aMult); 422 423 void SWFCXform_setColorAdd(SWFCXform cXform, 424 int rAdd, int gAdd, int bAdd, int aAdd); 425 426 void SWFCXform_setColorMult(SWFCXform cXform, 427 float rMult, float gMult, float bMult, float aMult); 428 429 void destroySWFCXform(SWFCXform cXform); 430 431 432 /* SWFAction */ 433 434 typedef struct SWFAction_s *SWFAction; 435 436 SWFAction compileSWFActionCode(const char *script); 437 void destroySWFAction(SWFAction action); 438 439 440 /* placeobject.h */ 441 442 typedef struct SWFPlaceObject2Block_s *SWFPlaceObject2Block; 443 444 #define SWF_PLACEACTION_ONLOAD (1<<0) 445 #define SWF_PLACEACTION_ENTERFRAME (1<<1) 446 #define SWF_PLACEACTION_UNLOAD (1<<2) 447 #define SWF_PLACEACTION_MOUSEMOVE (1<<3) 448 #define SWF_PLACEACTION_MOUSEDOWN (1<<4) 449 #define SWF_PLACEACTION_MOUSEUP (1<<5) 450 #define SWF_PLACEACTION_KEYDOWN (1<<6) 451 #define SWF_PLACEACTION_KEYUP (1<<7) 452 #define SWF_PLACEACTION_DATA (1<<8) 453 454 SWFPlaceObject2Block newSWFPlaceObject2Block(int depth); 455 456 void SWFPlaceObject2Block_setDepth(SWFPlaceObject2Block block, int depth); 457 void SWFPlaceObject2Block_setName(SWFPlaceObject2Block block, 458 const char *name); 459 void SWFPlaceObject2Block_setRatio(SWFPlaceObject2Block block, int ratio); 460 void SWFPlaceObject2Block_setMaskLevel(SWFPlaceObject2Block block, 461 int masklevel); 462 void SWFPlaceObject2Block_setCXform(SWFPlaceObject2Block block, 463 SWFCXform cXform); 464 void SWFPlaceObject2Block_setColorAdd(SWFPlaceObject2Block block, 465 int r, int g, int b, int a); 466 void SWFPlaceObject2Block_setColorMult(SWFPlaceObject2Block block, 467 float r, float g, float b, float a); 468 void SWFPlaceObject2Block_setMatrix(SWFPlaceObject2Block block, 469 SWFMatrix matrix); 470 void SWFPlaceObject2Block_setCharacter(SWFPlaceObject2Block block, 471 SWFCharacter character); 472 void SWFPlaceObject2Block_setMove(SWFPlaceObject2Block block); 473 void SWFPlaceObject2Block_addAction(SWFPlaceObject2Block block, 474 SWFAction action, int flags); 475 476 477 /* random blocks */ 478 479 typedef struct SWFOutputBlock_s *SWFOutputBlock; 480 typedef struct SWFExports_s *SWFExports; 481 482 SWFBlock newSWFPlaceObjectBlock(SWFCharacter character, int depth, 483 SWFMatrix matrix, SWFCXform cXform); 484 485 SWFOutputBlock newSWFRemoveObjectBlock(SWFCharacter character, int depth); 486 SWFOutputBlock newSWFRemoveObject2Block(int depth); 487 SWFOutputBlock newSWFFrameLabelBlock(const char *string); 488 SWFBlock newSWFSetBackgroundBlock(byte r, byte g, byte b); 489 SWFBlock newSWFShowFrameBlock(); 490 SWFBlock newSWFEndBlock(); 491 SWFOutputBlock newSWFExportBlock(SWFExports exports, int nExports); 492 493 /* SWFProtect */ 494 495 SWFBlock newSWFProtect(char *); 496 497 /* SWFButton */ 498 499 typedef struct SWFButton_s *SWFButton; 500 501 #define SWFBUTTON_HIT (1<<3) 502 #define SWFBUTTON_DOWN (1<<2) 503 #define SWFBUTTON_OVER (1<<1) 504 #define SWFBUTTON_UP (1<<0) 505 506 /* deprecated: */ 507 508 #define SWFBUTTONRECORD_HITSTATE (1<<3) 509 #define SWFBUTTONRECORD_DOWNSTATE (1<<2) 510 #define SWFBUTTONRECORD_OVERSTATE (1<<1) 511 #define SWFBUTTONRECORD_UPSTATE (1<<0) 512 513 514 #define SWFBUTTON_KEYPRESS(c) (((c)&0x7f)<<9) 515 #define SWFBUTTON_ONKEYPRESS(c) (((c)&0x7f)<<9) 516 517 #define SWFBUTTON_OVERDOWNTOIDLE (1<<8) 518 #define SWFBUTTON_IDLETOOVERDOWN (1<<7) 519 #define SWFBUTTON_OUTDOWNTOIDLE (1<<6) 520 #define SWFBUTTON_OUTDOWNTOOVERDOWN (1<<5) 521 #define SWFBUTTON_OVERDOWNTOOUTDOWN (1<<4) 522 #define SWFBUTTON_OVERDOWNTOOVERUP (1<<3) 523 #define SWFBUTTON_OVERUPTOOVERDOWN (1<<2) 524 #define SWFBUTTON_OVERUPTOIDLE (1<<1) 525 #define SWFBUTTON_IDLETOOVERUP (1<<0) 526 527 /* easier to remember: */ 528 #define SWFBUTTON_MOUSEUPOUTSIDE SWFBUTTON_OUTDOWNTOIDLE 529 #define SWFBUTTON_DRAGOVER (SWFBUTTON_OUTDOWNTOOVERDOWN | SWFBUTTON_IDLETOOVERDOWN) 530 #define SWFBUTTON_DRAGOUT (SWFBUTTON_OVERDOWNTOOUTDOWN | SWFBUTTON_OVERDOWNTOIDLE) 531 #define SWFBUTTON_MOUSEUP SWFBUTTON_OVERDOWNTOOVERUP 532 #define SWFBUTTON_MOUSEDOWN SWFBUTTON_OVERUPTOOVERDOWN 533 #define SWFBUTTON_MOUSEOUT SWFBUTTON_OVERUPTOIDLE 534 #define SWFBUTTON_MOUSEOVER SWFBUTTON_IDLETOOVERUP 535 536 537 SWFButton newSWFButton(); 538 void destroySWFButton(SWFBlock block); 539 540 void SWFButton_addShape(SWFButton button, SWFCharacter character, byte flags); 541 void SWFButton_addAction(SWFButton button, SWFAction action, int flags); 542 void SWFButton_setMenu(SWFButton button, int flag); 543 544 SWFBlock newSWFButtonCXform(SWFButton button, SWFCXform *cXforms); 545 SWFBlock newSWFButtonSound(SWFButton button, SWFSound sound); 546 547 548 /* SWFSprite */ 549 550 typedef struct SWFSprite_s *SWFSprite; 551 552 SWFSprite newSWFSprite(); 553 void destroySWFSprite(SWFBlock block); 554 555 void SWFSprite_setNumberOfFrames(SWFSprite sprite, int totalFrames); 556 557 void SWFSprite_setBlocks(SWFSprite sprite, SWFBlock *blocks, int nBlocks); 558 void SWFSprite_addBlock(SWFSprite sprite, SWFBlock block); 559 560 #endif /* SWF_H_INCLUDED */ 561 #endif 562