Files used (and contents thereof): lightningbeam.org/Flash_tests.zip
The sequence 0xFF 0xFE 0xFF reccurs a lot.
- According to Benjamin, this is the separator - that would explain it.
Convention: All strings given in quotes have each character separated by 0x00.
(i.e, "string" = s 00 t 00 r 00 i 00 n 00 g 00)
Strings given literally (like CPicFrame) have no separator.
All CPic* sections are preceded by 0xFF 0xFF 0x01 0x00 0x09 0x00 except
the first one (CPicPage).
Added curve to rectangle; this removed the CPicShape section.
- Initial analysis of CPicShape:
53 bytes long (counting '0xFF 0xFF 0x01 0x00 0x09 0x00 CPicShape')
Ends in 0xFF 0xFF - I think this is a separator sequence. (Yes - see note 1.)
Changed color of shape to 0DEADF. Searched in binary file.
- Initial analysis of CPicFrame:
Color identifier (0x0D 0xEA 0xDF 0xFF) after 32 bytes past 'CPicFrame'.
I am going to stop explicitly putting 0x before each byte, I think it's clear enough.
Moved one vertex along X axis. Changed 4 bytes: 70 0F -> A0 14, and farther
along 00 00 -> D8 FA.
Taken in context: 30 70 0F 00 | 00 30 00 00 -> 30 A0 14 00 | 00 30 D8 FA.
By vgrep they are the only changed bytes, so they must encode the position of
the vertex. I don't know what the precision is, let me see.
After a small-as-possible movement, they are 30 28 14 00 | 00 30 50 FB. I am
guessing the first is a float for the width; but I don't know what format it's in
(IEEE 754 gives crazy values that are in the range of 0.00001 -
0.0000000000000000000000000000001 depending on which bytes I use).
I moved the vertex again mostly along the Y axis this time. All of a sudden there is a whole lot
of change; the file itself is 4 bytes shorter. The change starts 8 bytes after the color, 1
byte before a word boundary. Hold on.
Well, I still haven't sorted out the number format, but everything starts 1 byte before a
word boundary. And the only change in the files is between the 8-byte point and
the previously changing bytes.
Contents starts with 16 bytes, followed by CDocumentPage, followed by two bytes
(17 06), followed by "Page 1", followed by 4 bytes (FF FE FF 07), followed by
"Scene 1". Following that are 22 bytes, and then "GO".
Quite a lot changes when a symbol is added. Including the following XML:
<component metaDataFetched='true' schemaUrl='' schemaOperation='' sceneRootLabel='Scene 1' oldCopiedComponentPath='1'>
Also, the CPicData section is followed immediately by FF FF 01 00 "\n" CPicSprite.
I believe the XML is in the CPicSprite section.
- Established that FF FE FF is the separator.