static int html = 0;
static int xy = 0;
static int showtext = 0;
+static int showshapes = 0;
static int hex = 0;
static int used = 0;
{"f", "frames"},
{"d", "hex"},
{"u", "used"},
+{"s", "shapes"},
{0,0}
};
showtext = 1;
return 0;
}
+ else if(name[0]=='s') {
+ showshapes = 1;
+ return 0;
+ }
else if(name[0]=='e') {
html = 1;
return 0;
return 0;
}
else if(name[0]=='D') {
- action = placements = showtext = 1;
+ action = placements = showtext = showshapes = 1;
return 0;
}
else {
while(tag->data[tag->pos++]);
if(flags & ET_HASTEXT)
- // printf(" text \"%s\"\n", &tag->data[tag->pos])
+ // printf(" text \"%s\"\n", &tag->data[tag->pos]) //TODO
;
}
void printhandlerflags(U32 handlerflags)
void handlePlaceObject(TAG*tag, char*prefix)
{
- /*TODO*/
+ TAG*tag2 = swf_InsertTag(0, ST_PLACEOBJECT2);
+
+ U16 id = swf_GetU16(tag);
+ U16 depth = swf_GetU16(tag);
+ MATRIX matrix; swf_GetMatrix(tag, &matrix);
+ CXFORM cxform; swf_GetCXForm(tag, &cxform, 0);
+
+ swf_SetU8(tag2, 14);
+ swf_SetU16(tag2, depth);
+ swf_SetMatrix(tag2, &matrix);
+ swf_SetCXForm(tag2, &cxform, 1);
+
+ handlePlaceObject2(tag2, prefix);
+}
+void handleShape(TAG*tag, char*prefix)
+{
+ /*TODO*/ return;
+
+ SHAPE2 shape;
+ tag->len = 0;
+ tag->readBit = 0;
+ swf_ParseDefineShape(tag, &shape);
}
void fontcallback1(U16 id,U8 * name)
printf(" places id %04d at depth %04x", swf_GetPlaceID(tag), swf_GetDepth(tag));
if(swf_GetName(tag))
printf(" name \"%s\"",swf_GetName(tag));
- handlePlaceObject(tag, myprefix);
}
else if(tag->id == ST_PLACEOBJECT2) {
if(tag->data[0]&1)
else if(tag->id == ST_DEFINEBUTTON2 && action) {
dumpButton2Actions(tag, myprefix);
}
+ else if(tag->id == ST_PLACEOBJECT) {
+ handlePlaceObject(tag, myprefix);
+ }
else if(tag->id == ST_PLACEOBJECT2) {
handlePlaceObject2(tag, myprefix);
}
+ else if(tag->id == ST_DEFINESHAPE ||
+ tag->id == ST_DEFINESHAPE2 ||
+ tag->id == ST_DEFINESHAPE3) {
+ if(showshapes)
+ handleShape(tag, myprefix);
+ }
if(tag->len && used) {
int num = swf_GetNumUsedIDs(tag);