Mercurial > mm7
diff mm7_5.cpp @ 147:c70fea5013aa
12.02.13
author | Ritor1 |
---|---|
date | Tue, 12 Feb 2013 09:11:03 +0600 |
parents | 30e731fc0f7a |
children | 77ad59c17864 |
line wrap: on
line diff
--- a/mm7_5.cpp Mon Feb 11 09:08:00 2013 +0600 +++ b/mm7_5.cpp Tue Feb 12 09:11:03 2013 +0600 @@ -6165,11 +6165,10 @@ //----- (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 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; @@ -6179,7 +6178,17 @@ + ((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); + + ((unsigned __int64)(stru_5C6E00->SinCos(v7 - stru_5C6E00->uIntegerHalfPi) * (signed __int64)v8) >> 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); + } //----- (0043AB61) --------------------------------------------------------