varstamp=readChar(view,offset+0x0)+readChar(view,offset+0x1)+readChar(view,offset+0x2)+readChar(view,offset+0x3);//should be M_AT, where _ is a 0 character
// there doesn't seem to be any documentation on this so I'm going to take the first step and maybe explain a few things here:
// each material has 5 sets of 16 bit values of the following type:
//
// frames: determines the number of frames worth of transforms of this type are stored
// flags: if >4096 then multiple frames are used instead of inline data. not much else is known
// offset/data: depending on previous flag, either points to an array of data or provides the data for the sole frame. relative to base of this 3dinfoobject
// data2: used for rotation matrix (second value)
//
// order is as follows:
// scaleS, scaleT, rotation, translateS, translateT (all values are signed fixed point 1.3.12)
//
// note: rotation external data has two 16 bit integers instead of one per frame.
//
// also!! rotation matrices work as follows:
//
// | B A |
// | -A B |
//
// kind of like nsbmd pivot
varobj={}
obj.flags=[];//for debug
obj.frames=[];
obj.frameStep={};
for(vari=0;i<5;i++){
obj[prop[i]]=[];
varframes=view.getUint16(offset,true);
varflags=view.getUint16(offset+2,true);
varvalue=view.getUint16(offset+4,true);
vardata2=view.getInt16(offset+6,true)/4096;
//flags research so far:
//bit 13 (8196) - set if inline single frame data, unset if multiple frame data at offset
//bit 14-15 - framestep, aka what to shift frame counters by (eg for half framerate this would be 1, frame>>1, essentially dividing the frame speed by 2.)