{5,"TypeOf", 0x44,""},
{5,"Add2", 0x47,""},
{5,"Less2", 0x48,""},
-{5/*6?*/,"Less3?", 0x67,""},
-{5/*6?*/,"GetMembers?", 0x55,""}
+{6,"Greater", 0x67,""},
+{6,"StringGreater", 0x68,""},
+{6,"Enumerate2", 0x55,""}
+{6,"InstanceOf", 0x54,""}
+{6,"StrictEquals", 0x66,""}
};
static int definedactions = sizeof(actions)/sizeof(struct Action);
n = 0;
while (t)
- { if (swf_GetTagID(t)==ST_DEFINEFONTINFO ||
+ { if (swf_GetTagID(t)==ST_DEFINEFONTINFO || swf_GetTagID(t)==ST_DEFINEFONTINFO2 ||
swf_GetTagID(t)==ST_DEFINEFONT2)
{ n++;
if (FontCallback)
int i;
if(f->version>1) {
- // DefineFont2 doesn't have FontInfo fields
- fprintf(stderr, "fixme: FontInfo field for DefineFont2 encountered\n");
- return -1;
+ /* Especially with Flash MX, DefineFont2 may have FontInfo fields,
+ too. However, they only add little information to what's already
+ inside the DefineFont2 tag */
+ return id;
}
if (l)
if(flags & 32)
f->encoding |= FONT_ENCODING_UNICODE;
+ if(t->id == ST_DEFINEFONTINFO2) {
+ f->language = swf_GetU8();
+ }
+
f->glyph2ascii = (U16*)malloc(sizeof(U16)*f->numchars);
maxcode = 0;
for(i=0; i < f->numchars; i++) {
case ST_DEFINEFONT:
case ST_DEFINEFONT2:
case ST_DEFINEFONTINFO: //pseudodefine
+ case ST_DEFINEFONTINFO2: //pseudodefine
case ST_DEFINETEXT:
case ST_DEFINETEXT2:
case ST_DEFINESOUND:
case ST_DEFINESPRITE:
+ case ST_DEFINEVIDEOSTREAM:
case ST_NAMECHARACTER: //pseudodefine
id = swf_GetU16(t);
break;
ST_DEFINEBUTTON,
ST_DEFINEBUTTON2,
ST_DEFINESOUND,
+ ST_DEFINEVIDEOSTREAM,
-1
};
static int swf_pseudodefiningtagids[] =
{
ST_DEFINEFONTINFO,
+ ST_DEFINEFONTINFO2,
ST_DEFINEBUTTONCXFORM,
ST_DEFINEBUTTONSOUND,
ST_NAMECHARACTER,
+ ST_DOINITACTION,
-1
};
break;
}
case ST_DEFINEFONTINFO:
+ case ST_DEFINEFONTINFO2:
+ case ST_VIDEOFRAME:
+ callback(tag, tag->pos + base, callback_data);
+ break;
+ case ST_DEFINEVIDEOSTREAM:
+ break;
+
+ case ST_DOINITACTION:
callback(tag, tag->pos + base, callback_data);
break;
- case ST_DEFINEMORPHSHAPE: /* disabled for now (doesn't work) */
- case ST_DEFINESHAPE3: // these thingies might have bitmap ids in their fillstyles
+ case ST_DEFINEMORPHSHAPE:
+ case ST_DEFINESHAPE3:
num++; //fallthrough
case ST_DEFINESHAPE2:
num++; //fallthrough
#define ST_EXPORTASSETS 56
#define ST_IMPORTASSETS 57
#define ST_ENABLEDEBUGGER 58
-#define ST_MX0 59 /*(?) Components/InitClip */
-#define ST_MX1 60 /*(?) Sorensen Video*/
-#define ST_MX2 61 /*(?) Sorensen Video*/
-#define ST_MX3 62 /*(?) fontinfo2? */
+#define ST_DOINITACTION 59
+#define ST_DEFINEVIDEOSTREAM 60
+#define ST_VIDEOFRAME 61
+#define ST_DEFINEFONTINFO2 62
#define ST_MX4 63 /*(?) */
#define ST_REFLEX 777 /* to identify generator software */
U16 * glyph2ascii;
int * ascii2glyph;
SWFGLYPH * glyph;
+ U8 language;
} SWFFONT, * LPSWFFONT;
typedef struct _FONTUSAGE
#define ET_HASMAXLENGTH 512
#define ET_HASFONT 256
#define ET_X3 128
-#define ET_X2 64
+#define ET_AUTOSIZE 64 /* MX */
#define ET_HASLAYOUT 32
#define ET_NOSELECT 16
#define ET_BORDER 8
#define ET_X1 4
-#define ET_X0 2
+#define ET_HTML 2 /* MX? */
#define ET_USEOUTLINES 1
typedef struct _EditTextLayout