All pastes #988960 Raw Edit

Something

public cpp v1 · immutable
#988960 ·published 2008-04-18 00:24 UTC
rendered paste body
Vector3 *__thiscall CDataStore_ReadPackedVector3(CDataStore *dataStore){  Vector3 *result; // eax@1  int packedVector; // [sp+18h] [bp-4h]@1  int tempX; // [sp+Ch] [bp-10h]@1  signed int tempY; // [sp+10h] [bp-Ch]@1  signed int tempZ; // [sp+14h] [bp-8h]@1  CDataStore_ReadInt32(dataStore, &packedVector);  tempX = (packedVector & 0x7FF) << 21 >> 21;  __asm  {    fild    [ebp+tempX]    fld     ds:dbl_8901E8 // 0.25  }  tempY = (signed int)((((unsigned int)packedVector >> 11) & 0x7FF) << 21) >> 21;  __asm  {    fmul    st(1), st    fxch    st(1)    fstp    [ebp+deltaX]  }  tempZ = (signed int)((unsigned int)packedVector >> 22 << 22) >> 22;  __asm { fild    [ebp+tempY] }  result = _ESI;  __asm  {    fmul    st, st(1)    fstp    [ebp+deltaY]    fimul   [ebp+tempZ]    fstp    [ebp+deltaZ]    fld     [edi+Vector3.X]    fsub    [ebp+deltaX]    fstp    [esi+Vector3.X]    fld     [edi+Vector3.Y]    fsub    [ebp+deltaY]    fstp    [esi+Vector3.Y]    fld     [edi+Vector3.Z]    fsub    [ebp+deltaZ]    fstp    [esi+Vector3.Z]  }  return result;}