* The display of action codes does not handle the ActionPush types 3
(undefined) and 9 (Constant16)
* ActionConstantPool should use a U16 type for determinig the number of items
u: url (string)
t: target (string)
l: label (string)
u: url (string)
t: target (string)
l: label (string)
-C: constant pool header (byte)
+C: constant pool header (word)
c: constant pool entry (string)
s: skip (byte) (number of actions)
m: method (byte) swf_GetUrl2:(0=none, 1=get, 2=post)/GotoFrame2:(1=play)
c: constant pool entry (string)
s: skip (byte) (number of actions)
m: method (byte) swf_GetUrl2:(0=none, 1=get, 2=post)/GotoFrame2:(1=play)
return 1+4; //float
} else if (type == 2) {
return 1+0; //NULL
return 1+4; //float
} else if (type == 2) {
return 1+0; //NULL
+ } else if (type == 3) {
+ return 1+0; //Undefined
} else if (type == 4) {
return 1+1; //register
} else if (type == 5) {
} else if (type == 4) {
return 1+1; //register
} else if (type == 5) {
return 1+4; //int
} else if (type == 8) {
return 1+1; //lookup
return 1+4; //int
} else if (type == 8) {
return 1+1; //lookup
+ } else if (type == 9) {
+ return 1+2; //lookup 16
} else return 1;
break;
}
} else return 1;
break;
}
while(atag)
{
char*indent = &spaces[sizeof(spaces)-1-countpos*4];
while(atag)
{
char*indent = &spaces[sizeof(spaces)-1-countpos*4];
for(t=0;t<definedactions;t++)
if(actions[t].op == atag->op)
break;
for(t=0;t<definedactions;t++)
if(actions[t].op == atag->op)
break;
#endif
} break;
case 'C': {
#endif
} break;
case 'C': {
entry = 0;
printf("(%d entries)", poollen);
} break;
entry = 0;
printf("(%d entries)", poollen);
} break;
printf(" Float:%f", *(float*)&f);
} else if (type == 2) {
printf(" NULL");
printf(" Float:%f", *(float*)&f);
} else if (type == 2) {
printf(" NULL");
+ } else if (type == 3) {
+ printf(" Undefined");
} else if (type == 4) {
printf(" register:%d", *value);
} else if (type == 5) {
} else if (type == 4) {
printf(" register:%d", *value);
} else if (type == 5) {
if (lookup[*value])
printf(" (\"%s\")",lookup[*value]);
#endif
if (lookup[*value])
printf(" (\"%s\")",lookup[*value]);
#endif
+ } else if (type == 9) {
+ U32 offset = value[0]+(value[1]<<8);
+ printf(" Lookup16:%d", offset);
+#ifdef MAX_LOOKUP
+ if (lookup[offset])
+ printf(" (\"%s\")",lookup[offset]);
+#endif
} else {
printf(" UNKNOWN[%02x]",type);
}
} else {
printf(" UNKNOWN[%02x]",type);
}
int count = 0;
while(atag)
{
int count = 0;
while(atag)
{
for(t=0;t<definedactions;t++)
if(actions[t].op == atag->op)
break;
for(t=0;t<definedactions;t++)
if(actions[t].op == atag->op)
break;
+ poollen = (*(U16*)data);
} break;
case 'o': {
} break;
} break;
case 'o': {
} break;
*(U8*)atag->tmp = 2; //NULL
return atag;
}
*(U8*)atag->tmp = 2; //NULL
return atag;
}
+ActionTAG* action_PushUndefined(ActionTAG*atag)
+{
+ atag = swf_AddActionTAG(atag, ACTION_PUSH, 0, 1);
+ *(U8*)atag->tmp = 3; //Undefined
+ return atag;
+}
ActionTAG* action_PushBoolean(ActionTAG*atag, char c)
{
atag = swf_AddActionTAG(atag, ACTION_PUSH, 0, 2);
ActionTAG* action_PushBoolean(ActionTAG*atag, char c)
{
atag = swf_AddActionTAG(atag, ACTION_PUSH, 0, 2);
*(U8*)&atag->tmp[1] = index;
return atag;
}
*(U8*)&atag->tmp[1] = index;
return atag;
}
+ActionTAG* action_PushLookup16(ActionTAG*atag, U16 index)
+{
+ atag = swf_AddActionTAG(atag, ACTION_PUSH, 0, 3);
+ *(U8*)atag->tmp = 9; //lookup
+ *(U8*)&atag->tmp[1] = index;
+ *(U8*)&atag->tmp[2] = index>>8;
+ return atag;
+}
ActionTAG* action_PushString(ActionTAG*atag, char*str)
{
int l = strlen(str);
ActionTAG* action_PushString(ActionTAG*atag, char*str)
{
int l = strlen(str);