matrix - How do fixed point bit values in swf files work? -


the swf file format specification version 19 says scale value in matrix record stored fb, somewhere else in specification says fb 32 bit 16.16 fixed point value, there's value how many bits uses store value , in example 3.16 value , not 16.16 value.

  • how can 32 bit 16.16 value , 19 bit 3.16 value @ same time?
  • how flash player know wheter it's 3.16, 4.15, 5.14, x.x value?
  • what format of fb?

i want know because want insert sprite compiled swf file. succesfully used placeobject tag once in sprite have image has scaled down, done in matrix record too, first didn't need fb because other image @ right scale.

edit: i'm going try if can make new sprites sothink swf quicker tomorrow, if doesn't work i'll try make simple swf file sprite in using adobe flash cs 6 , copy definesprite tag other swf file. if answers i'll first try scale thing hex editor before try sothink swf quicker.

edit2: sothink swf quicker crashes when try import swf file. if copying tag swf file i'm going create doesn't work i'll delete image want place placeobject tag , reinsert scaled down.

edit3: don't know how make flash use definesprite tag, added definebitslossless2 tag image scaled down, i'll using image in sprite. don't need fb anymore, still nice know how work, if know it, please answer.

matrix record begins this:

hasscale    ub[1] nscalebits  if hasscale=1, ub[5] scalex      if hasscale=1, fb[nscalebits] scaley      if hasscale=1, fb[nscalebits] ... 

fb[nscalebits] indeed fixed-point value, not 16.16 - comes down nscalebits (so it's different regular fixed-point number, 16.16).

the number of bits used fixed or specified beforehand, in case matrix, flash player just knows.

for instance, 2.8 if 0x28000 in dex, , nscalebits 19 in case, because need minimum of 3 bits represebt signed number "2" (3 + 16 = 19).

i know old question. still, might stumble upon it, way did.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -