Command Type Size Var. Name Description
2Act file header
char1versionAct file version
short2nanimationsNumber of animations encoded in this file
repeat nanimations
int4nframesNumber of frames in current animation
repeat nframes
32Perhaps had meaning in previous versions of ro client but from now it's useless bytes
int4nsubframesNumber of distinct images taken from spr file in this frame (denoted as subframes in this document)
repeat nsubframes
int4offsetXOffset of the subframe in the frame along the first axis. (0, 0) is the center of the frame
int4offsetYId but for the other axis
int4imageNumber of the image in the image array produced by parsing spr file
int4directionIf non zero the image has to be mirrored along the vertical axis
bytes4colorThe color in RGBA format of the subframe (can be used to make blending effects)
if version>=2
float4scaleXThe scale along the first axis in the range [0.0, 1.0], has to be used directly by OpenGL or DirectX but you should adapt it to an integer for making direct interpreting as a gif maker. The formula is : newsizeX=int(scaleX*(float)sizeX)
end if
if version>=4
float4scaleYId but for the other axis
else scaleY=scaleX
end if
if version>=2
if not dontjump
end if
if version>=5
int4sizeXThe width of the portion of image taken from the original image in pixels
int4sizeYId for height
end if
end repeat
if version>=2
int4extrainfoAn int boolean to tell if there's extra info attached to this frame. Extra infos helps placement of heads or weapons in player sprites, as they have their own act files we have to keep this value and use it in this way : if it's the body sprite, extrainfo doesn't count, if head or headgear or an equipment of version>=5, then the offset of the sprite is offsetX+bodyextraX-extraX, offsetY+bodyextraY-extraY, if an equipment offsetX-extraX, offsetY-extraY ie absolute positionning. If it's unclear tell me and I'll make a picture.
if extrainfo
int4extraXRead up
end repeat
end repeat