Mercurial > mm7
diff mm7_5.cpp @ 1054:5520fdca7a74
m
author | Ritor1 |
---|---|
date | Wed, 22 May 2013 22:22:36 +0600 |
parents | 53109a1455fc |
children | 010a844ef4a0 |
line wrap: on
line diff
--- a/mm7_5.cpp Tue May 14 23:16:10 2013 +0600 +++ b/mm7_5.cpp Wed May 22 22:22:36 2013 +0600 @@ -5393,29 +5393,23 @@ //----- (0043AA99) -------------------------------------------------------- void __fastcall Vec3_int_::Rotate(int sDepth, int sRotY, int sRotX, Vec3_int_ v, int *outx, int *outy, int *outz) { -/* int v7; // ebx@1 - int v8; // ST14_4@1 - int v9; // edi@1 int anglea; // [sp+20h] [bp+8h]@1 - v7 = sRotX; - v8 = sDepth; - v9 = sRotY; - anglea = (unsigned __int64)(stru_5C6E00->SinCos(sRotX) * (signed __int64)sDepth) >> 16; - *outx = v.x + ((unsigned __int64)(stru_5C6E00->SinCos(v9) * (signed __int64)anglea) >> 16); - *outy = v.y - + ((unsigned __int64)(stru_5C6E00->SinCos(v9 - stru_5C6E00->uIntegerHalfPi) - * (signed __int64)anglea) >> 16); - *outz = v.z - + ((unsigned __int64)(stru_5C6E00->SinCos(v7 - stru_5C6E00->uIntegerHalfPi) * (signed __int64)v8) >> 16);*/ + +/* anglea = (unsigned __int64)(stru_5C6E00->SinCos(sRotX) * (signed __int64)sDepth) >> 16; + *outx = v.x + ((unsigned __int64)(stru_5C6E00->SinCos(sRotY) * (signed __int64)anglea) >> 16); + *outy = v.y + ((unsigned __int64)(stru_5C6E00->SinCos(sRotY - stru_5C6E00->uIntegerHalfPi) * (signed __int64)anglea) >> 16); + *outz = v.z + ((unsigned __int64)(stru_5C6E00->SinCos(sRotX - stru_5C6E00->uIntegerHalfPi) * (signed __int64)sDepth) >> 16);*/ float cosf_x = cosf(3.14159265f * sRotX / 1024.0f), cosf_y = cosf(3.14159265f * sRotY / 1024.0f), sinf_x = sinf(3.14159265f * sRotX / 1024.0f), sinf_y = sinf(3.14159265f * sRotY / 1024.0f); - *outx = v.x + ((unsigned __int64)((double)sDepth * cosf_y * cosf_x) >> 16); - *outy = v.y + ((unsigned __int64)((double)sDepth * sinf_y * cosf_x) >> 16); - *outz = v.z + ((unsigned __int64)((double)sDepth * sinf_x) >> 16); + sDepth = 14000000; + anglea = (unsigned __int64)(cosf_x * (signed __int64)sDepth) >> 16; + *outx = v.x + (unsigned __int64)(sinf_y * (signed __int64)anglea); + *outy = v.y + (unsigned __int64)(cosf_y * (signed __int64)anglea); + *outz = v.z + ((unsigned __int64)(sinf_x * (signed __int64)sDepth) >> 16); }