From 30d18fbbe53427135310896abd30dadb10d1f249 Mon Sep 17 00:00:00 2001 From: kramm Date: Wed, 4 Jul 2007 10:04:12 +0000 Subject: [PATCH] added scenedescription tag --- lib/modules/swfdump.c | 2 ++ lib/rfxswf.c | 15 +++++++++++++++ lib/rfxswf.h | 1 + 3 files changed, 18 insertions(+) diff --git a/lib/modules/swfdump.c b/lib/modules/swfdump.c index b6572d8..0773f1f 100644 --- a/lib/modules/swfdump.c +++ b/lib/modules/swfdump.c @@ -247,6 +247,8 @@ char* swf_TagGetName(TAG*tag) return "PLACEOBJECT3"; case ST_METADATA: return "METADATA"; + case ST_SCENEDESCRIPTION: + return "SCENEDESCRIPTION"; case ST_REFLEX: return "REFLEX"; diff --git a/lib/rfxswf.c b/lib/rfxswf.c index 257d41b..e309be6 100644 --- a/lib/rfxswf.c +++ b/lib/rfxswf.c @@ -1293,6 +1293,21 @@ int swf_WriteSWF2(writer_t*writer, SWF * swf) // Writes SWF to file, return } #endif // INSERT_RFX_TAG + + if(swf->fileVersion >= 9) { + if ((!swf->firstTag || swf->firstTag->id != ST_SCENEDESCRIPTION) && + (!swf->firstTag || + !swf->firstTag->next || swf->firstTag->next->id != ST_SCENEDESCRIPTION) && + (!swf->firstTag || + !swf->firstTag->next || + !swf->firstTag->next->next || swf->firstTag->next->next->id != ST_SCENEDESCRIPTION)) + { + TAG*scene = swf_InsertTagBefore(swf, swf->firstTag,ST_SCENEDESCRIPTION); + swf_SetU16(scene, 1); + swf_SetString(scene, "Scene 1"); + swf_SetU8(scene, 0); + } + } if(swf->fileVersion >= 8) { if (swf->firstTag && swf->firstTag->id != ST_FILEATTRIBUTES) diff --git a/lib/rfxswf.h b/lib/rfxswf.h index 21301b5..8884afc 100644 --- a/lib/rfxswf.h +++ b/lib/rfxswf.h @@ -330,6 +330,7 @@ SRECT swf_TurnRect(SRECT r, MATRIX* m); #define ST_DEFINESCALINGGRID 78 /* version 8 */ #define ST_DEFINESHAPE4 83 /* version 8 */ #define ST_DEFINEMORPHSHAPE2 84 /* version 8 */ +#define ST_SCENEDESCRIPTION 86 /* version 9 */ /* custom tags- only valid for swftools */ #define ST_REFLEX 777 /* to identify generator software */ -- 1.7.10.4