void exportTo(fr::stream &f, const frGraphExporter &exp) { f.putsU8(params[2].selectv.sel); f.putsU16(params[1].floatv*256); f.putsU8(params[3].selectv.sel); f.putsU16((params[0].tfloatv.a-1)*512); f.putsU16((params[0].tfloatv.b-1)*512); // 8 bytes data+1 byte id+1 byte src+1 byte dest=11 bytes }
void exportTo(fr::stream &f, const frGraphExporter &exp) { sU16 angtemp = fmod(params[0].floatv + 36000.0f, 360.0f) * 65536.0f / 360.0f; f.putsU16(angtemp); sF32 ang = angtemp * 3.1415926535f / 32768.0f; sF32 zoomtemp1 = params[1].tfloatv.a * 65536.0f, zoomtemp2 = params[1].tfloatv.b * 65536.0f; sF32 scrollx = (params[2].tfloatv.a + params[3].pointv.x) * data->w; sF32 scrolly = (params[2].tfloatv.b + params[3].pointv.y) * data->h; sF32 centerx = params[3].pointv.x * data->w * 65536.0f; sF32 centery = params[3].pointv.y * data->h * 65536.0f; sF32 xsx = zoomtemp1 * cos(ang), ysx = zoomtemp2 * sin(ang); sF32 xsy = -zoomtemp1 * sin(ang), ysy = zoomtemp2 * cos(ang); putPackedFloat(f, zoomtemp1); putPackedFloat(f, zoomtemp2); f.putsS32(centerx -scrollx * xsx - scrolly * xsy); f.putsS32(centery -scrollx * ysx - scrolly * ysy); // 13 bytes data+1 byte id+1 byte src+1 byte dst=16 bytes }
void exportTo(fr::stream &f, const frGraphExporter &exp) { f.putsU16(params[0].floatv*1024); // 3 bytes data+1 byte id+1 byte src+1 byte dst=6 bytes }