X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswftools.c;h=a1befc2d9ff4d22267fe5806e7eef55ccb8b119f;hb=41928ecbe79aabb7bdef15078f3dd900a4fd9557;hp=2a6e542ac44d8bd2fc4d8a048512441a1781aabe;hpb=a822c616be5fcdad5a3ef2c8e402571da5facee0;p=swftools.git diff --git a/lib/modules/swftools.c b/lib/modules/swftools.c index 2a6e542..a1befc2 100644 --- a/lib/modules/swftools.c +++ b/lib/modules/swftools.c @@ -86,15 +86,16 @@ U16 swf_GetDefineID(TAG * t) case ST_DEFINEBITSLOSSLESS2: case ST_DEFINEBUTTON: case ST_DEFINEBUTTON2: - case ST_DEFINEBUTTONCXFORM: - case ST_DEFINEBUTTONSOUND: + case ST_DEFINEBUTTONCXFORM: //pseudodefine + case ST_DEFINEBUTTONSOUND: //pseudodefine case ST_DEFINEFONT: case ST_DEFINEFONT2: - case ST_DEFINEFONTINFO: + case ST_DEFINEFONTINFO: //pseudodefine case ST_DEFINETEXT: case ST_DEFINETEXT2: case ST_DEFINESOUND: case ST_DEFINESPRITE: + case ST_NAMECHARACTER: //pseudodefine id = swf_GetU16(t); break; } @@ -172,6 +173,15 @@ static int swf_spritetagids[] = -1 }; +static int swf_pseudodefiningtagids[] = +{ + ST_DEFINEFONTINFO, + ST_DEFINEBUTTONCXFORM, + ST_DEFINEBUTTONSOUND, + ST_NAMECHARACTER, + -1 +}; + U8 swf_isAllowedSpriteTag(TAG * tag) { int id = tag->id; @@ -198,6 +208,19 @@ U8 swf_isDefiningTag(TAG * tag) return 0; } +U8 swf_isPseudoDefiningTag(TAG * tag) +{ + int id = tag->id; + int t=0; + while(swf_pseudodefiningtagids[t]>=0) + { + if(swf_pseudodefiningtagids[t] == id) + return 1; + t++; + } + return 0; +} + U16 swf_GetDepth(TAG * t) // up to SWF 4.0 {