Mercurial > mm7
comparison mm7_5.cpp @ 147:c70fea5013aa
12.02.13
author | Ritor1 |
---|---|
date | Tue, 12 Feb 2013 09:11:03 +0600 |
parents | 30e731fc0f7a |
children | 77ad59c17864 |
comparison
equal
deleted
inserted
replaced
146:30e731fc0f7a | 147:c70fea5013aa |
---|---|
6163 } | 6163 } |
6164 | 6164 |
6165 //----- (0043AA99) -------------------------------------------------------- | 6165 //----- (0043AA99) -------------------------------------------------------- |
6166 void __fastcall Vec3_int_::Rotate(int sDepth, int sRotY, int sRotX, Vec3_int_ v, int *outx, int *outy, int *outz) | 6166 void __fastcall Vec3_int_::Rotate(int sDepth, int sRotY, int sRotX, Vec3_int_ v, int *outx, int *outy, int *outz) |
6167 { | 6167 { |
6168 int v7; // ebx@1 | 6168 /* int v7; // ebx@1 |
6169 int v8; // ST14_4@1 | 6169 int v8; // ST14_4@1 |
6170 int v9; // edi@1 | 6170 int v9; // edi@1 |
6171 int anglea; // [sp+20h] [bp+8h]@1 | 6171 int anglea; // [sp+20h] [bp+8h]@1 |
6172 | |
6173 v7 = sRotX; | 6172 v7 = sRotX; |
6174 v8 = sDepth; | 6173 v8 = sDepth; |
6175 v9 = sRotY; | 6174 v9 = sRotY; |
6176 anglea = (unsigned __int64)(stru_5C6E00->SinCos(sRotX) * (signed __int64)sDepth) >> 16; | 6175 anglea = (unsigned __int64)(stru_5C6E00->SinCos(sRotX) * (signed __int64)sDepth) >> 16; |
6177 *outx = v.x + ((unsigned __int64)(stru_5C6E00->SinCos(v9) * (signed __int64)anglea) >> 16); | 6176 *outx = v.x + ((unsigned __int64)(stru_5C6E00->SinCos(v9) * (signed __int64)anglea) >> 16); |
6178 *outy = v.y | 6177 *outy = v.y |
6179 + ((unsigned __int64)(stru_5C6E00->SinCos(v9 - stru_5C6E00->uIntegerHalfPi) | 6178 + ((unsigned __int64)(stru_5C6E00->SinCos(v9 - stru_5C6E00->uIntegerHalfPi) |
6180 * (signed __int64)anglea) >> 16); | 6179 * (signed __int64)anglea) >> 16); |
6181 *outz = v.z | 6180 *outz = v.z |
6182 + ((unsigned __int64)(stru_5C6E00->SinCos(v7 - stru_5C6E00->uIntegerHalfPi) * (signed __int64)v8) >> 16); | 6181 + ((unsigned __int64)(stru_5C6E00->SinCos(v7 - stru_5C6E00->uIntegerHalfPi) * (signed __int64)v8) >> 16);*/ |
6182 | |
6183 float cosf_x = cosf(3.14159265f * sRotX / 1024.0f), | |
6184 cosf_y = cosf(3.14159265f * sRotY / 1024.0f), | |
6185 sinf_x = sinf(3.14159265f * sRotX / 1024.0f), | |
6186 sinf_y = sinf(3.14159265f * sRotY / 1024.0f); | |
6187 | |
6188 *outx = v.x + ((unsigned __int64)((double)sDepth * cosf_y * cosf_x) >> 16); | |
6189 *outy = v.y + ((unsigned __int64)((double)sDepth * sinf_y * cosf_x) >> 16); | |
6190 *outz = v.z + ((unsigned __int64)((double)sDepth * sinf_x) >> 16); | |
6191 | |
6183 } | 6192 } |
6184 | 6193 |
6185 //----- (0043AB61) -------------------------------------------------------- | 6194 //----- (0043AB61) -------------------------------------------------------- |
6186 void Vec3_int_::Normalize(int *x, int *y, int *z) | 6195 void Vec3_int_::Normalize(int *x, int *y, int *z) |
6187 { | 6196 { |