comparison mm7_5.cpp @ 1054:5520fdca7a74

m
author Ritor1
date Wed, 22 May 2013 22:22:36 +0600
parents 53109a1455fc
children 010a844ef4a0
comparison
equal deleted inserted replaced
1003:9318dd3f3711 1054:5520fdca7a74
5391 } 5391 }
5392 5392
5393 //----- (0043AA99) -------------------------------------------------------- 5393 //----- (0043AA99) --------------------------------------------------------
5394 void __fastcall Vec3_int_::Rotate(int sDepth, int sRotY, int sRotX, Vec3_int_ v, int *outx, int *outy, int *outz) 5394 void __fastcall Vec3_int_::Rotate(int sDepth, int sRotY, int sRotX, Vec3_int_ v, int *outx, int *outy, int *outz)
5395 { 5395 {
5396 /* int v7; // ebx@1
5397 int v8; // ST14_4@1
5398 int v9; // edi@1
5399 int anglea; // [sp+20h] [bp+8h]@1 5396 int anglea; // [sp+20h] [bp+8h]@1
5400 v7 = sRotX; 5397
5401 v8 = sDepth; 5398 /* anglea = (unsigned __int64)(stru_5C6E00->SinCos(sRotX) * (signed __int64)sDepth) >> 16;
5402 v9 = sRotY; 5399 *outx = v.x + ((unsigned __int64)(stru_5C6E00->SinCos(sRotY) * (signed __int64)anglea) >> 16);
5403 anglea = (unsigned __int64)(stru_5C6E00->SinCos(sRotX) * (signed __int64)sDepth) >> 16; 5400 *outy = v.y + ((unsigned __int64)(stru_5C6E00->SinCos(sRotY - stru_5C6E00->uIntegerHalfPi) * (signed __int64)anglea) >> 16);
5404 *outx = v.x + ((unsigned __int64)(stru_5C6E00->SinCos(v9) * (signed __int64)anglea) >> 16); 5401 *outz = v.z + ((unsigned __int64)(stru_5C6E00->SinCos(sRotX - stru_5C6E00->uIntegerHalfPi) * (signed __int64)sDepth) >> 16);*/
5405 *outy = v.y
5406 + ((unsigned __int64)(stru_5C6E00->SinCos(v9 - stru_5C6E00->uIntegerHalfPi)
5407 * (signed __int64)anglea) >> 16);
5408 *outz = v.z
5409 + ((unsigned __int64)(stru_5C6E00->SinCos(v7 - stru_5C6E00->uIntegerHalfPi) * (signed __int64)v8) >> 16);*/
5410 5402
5411 float cosf_x = cosf(3.14159265f * sRotX / 1024.0f), 5403 float cosf_x = cosf(3.14159265f * sRotX / 1024.0f),
5412 cosf_y = cosf(3.14159265f * sRotY / 1024.0f), 5404 cosf_y = cosf(3.14159265f * sRotY / 1024.0f),
5413 sinf_x = sinf(3.14159265f * sRotX / 1024.0f), 5405 sinf_x = sinf(3.14159265f * sRotX / 1024.0f),
5414 sinf_y = sinf(3.14159265f * sRotY / 1024.0f); 5406 sinf_y = sinf(3.14159265f * sRotY / 1024.0f);
5415 5407
5416 *outx = v.x + ((unsigned __int64)((double)sDepth * cosf_y * cosf_x) >> 16); 5408 sDepth = 14000000;
5417 *outy = v.y + ((unsigned __int64)((double)sDepth * sinf_y * cosf_x) >> 16); 5409 anglea = (unsigned __int64)(cosf_x * (signed __int64)sDepth) >> 16;
5418 *outz = v.z + ((unsigned __int64)((double)sDepth * sinf_x) >> 16); 5410 *outx = v.x + (unsigned __int64)(sinf_y * (signed __int64)anglea);
5411 *outy = v.y + (unsigned __int64)(cosf_y * (signed __int64)anglea);
5412 *outz = v.z + ((unsigned __int64)(sinf_x * (signed __int64)sDepth) >> 16);
5419 5413
5420 } 5414 }
5421 5415
5422 //----- (0043AB61) -------------------------------------------------------- 5416 //----- (0043AB61) --------------------------------------------------------
5423 void Vec3_int_::Normalize(int *x, int *y, int *z) 5417 void Vec3_int_::Normalize(int *x, int *y, int *z)