Beispiel #1
0
int printButton2ActionCondition(FILE *f, int end)
{
  int offset = readUInt16(f);
  int condition = readUInt16(f);

  println("offset = %i", offset);

  if(condition & 0xfe00) println("condition: keyPress(%c)", (condition&0xfe00)>>9);
  if(condition & 0x100) println("condition: overDownToIdle");
  if(condition & 0x80)  println("condition: idleToOverDown");
  if(condition & 0x40)  println("condition: outDownToIdle");
  if(condition & 0x20)  println("condition: outDownToOverDown");
  if(condition & 0x10)  println("condition: overDownToOutDown");
  if(condition & 0x08)  println("condition: overDownToOverUp");
  if(condition & 0x04)  println("condition: overUpToOverDown");
  if(condition & 0x02)  println("condition: overUpToIdle");
  if(condition & 0x01)  println("condition: idleToOverUp");

  if(offset == 0)
    decompileAction(f, end-fileOffset, 0);
  else
    decompileAction(f, offset-4, 0);

  return offset;
}
Beispiel #2
0
void printPlaceObject2(FILE *f, int length)
{
  int start = fileOffset;
  int flags = readUInt8(f);
  int l;

  println("Depth: %i", readUInt16(f));

  if(flags & PLACE_HASMOVE)
    println("Has move flag");

  if(flags & PLACE_HASCHARACTER)
    println("Character ID: %i", readUInt16(f));

  if(flags & PLACE_HASMATRIX)
  {
    println("Matrix:");
    printMatrix(f);
  }

  if(flags & PLACE_HASCXFORM)
  {
    print("CXForm: ");
    printCXForm(f, true);
    putchar('\n');
  }

  if(flags & PLACE_HASRATIO)
    println("Ratio: %i", readUInt16(f));

  if(flags & PLACE_HASNAME)
    println("Name: %s", readString(f));

  if(flags & PLACE_HASCLIP)
    println("ClipDepth: %i", readUInt16(f));

  if(flags & PLACE_RESERVED)
  {
    println("Mystery number: %04x", readUInt16(f));

    flags = readUInt16(f);
    println("Clip flags: %04x", flags);

    while((flags = readUInt16(f)) != 0)
    {
      println("Flags: %04x", flags);
      l = readUInt32(f);
      decompileAction(f, l, 0);
    }
  }

  dumpBytes(f, length-(fileOffset-start));
}
Beispiel #3
0
int printButton2ActionCondition(FILE *f, int end, int id)
{
  int offset = readUInt16(f);
  int condition = readUInt16(f);
  int notFirst = 0;

  printf("\t$a = new SWF::Action(\"\n");

  if(offset == 0)
    {decompileAction(f, end-fileOffset, 0);}
  else
    {decompileAction(f, offset-4, 0);}

  printf("\");\n");
  printf("\t$s%i->addAction($a, ", id);

  if(condition & 0xfe00)
  {
    printf("SWFBUTTON_KEYPRESS(%c)", (condition&0xfe00)>>9);
    notFirst = 1;
  }
Beispiel #4
0
void printDefineButton(FILE *f, int length)
{
  int offset = fileOffset;

  println("Button id: %i", readUInt16(f));

  ++gIndent;
  while(printButtonRecord(f, 1)) ;

  decompileAction(f, length-(fileOffset-offset), 0);
  --gIndent;
}
Beispiel #5
0
void printDefineButton(FILE *f, int length)
{
  int offset = fileOffset;
  int id = readUInt16(f);

  printf("\n\t### Button %i ###\n", id);
  printf("\t$s%i = new SWF::Button();\n", id);

  while(printButtonRecord(f, 1, id)) ;

  printf("\t$a = new SWF::Action(\"\n");
  decompileAction(f, length-(fileOffset-offset), 0);
  printf("\");\n");
  printf("\t$s%i->setAction($a);\n", id);
}