Mercurial > mm7
comparison mm7_5.cpp @ 1504:ff1867836af5
Cleanup of VectorTypes.
author | yoctozepto |
---|---|
date | Mon, 02 Sep 2013 12:46:32 +0200 |
parents | 9e9a12506d51 |
children | 965af46e8793 |
comparison
equal
deleted
inserted
replaced
1503:4ce525fe9ea9 | 1504:ff1867836af5 |
---|---|
3868 break; | 3868 break; |
3869 } | 3869 } |
3870 } | 3870 } |
3871 } | 3871 } |
3872 | 3872 |
3873 //----- (0043AA99) -------------------------------------------------------- | |
3874 void __fastcall Vec3_int_::Rotate(int sDepth, int sRotY, int sRotX, Vec3_int_ v, int *outx, int *outy, int *outz) | |
3875 { | |
3876 float cosf_x = cosf(3.14159265f * sRotX / 1024.0f), | |
3877 sinf_x = sinf(3.14159265f * sRotX / 1024.0f), | |
3878 cosf_y = cosf(3.14159265f * sRotY / 1024.0f), | |
3879 sinf_y = sinf(3.14159265f * sRotY / 1024.0f); | |
3880 | |
3881 *outx = v.x + ((unsigned __int64)(sinf_y * (signed __int64)((unsigned __int64)(cosf_x * (signed __int64)sDepth)>> 16))); | |
3882 *outy = v.y + ((unsigned __int64)(cosf_y * (signed __int64)((unsigned __int64)(cosf_x * (signed __int64)sDepth)>> 16))); | |
3883 *outz = v.z + ((unsigned __int64)(sinf_x * (signed __int64)sDepth) >> 16); | |
3884 } | |
3885 | |
3886 //----- (0043AB61) -------------------------------------------------------- | |
3887 void Vec3_int_::Normalize(int *x, int *y, int *z) | |
3888 { | |
3889 *x *= 65536 / (integer_sqrt(*y * *y + *z * *z + *x * *x) | 1); | |
3890 *y *= 65536 / (integer_sqrt(*y * *y + *z * *z + *x * *x) | 1); | |
3891 *z *= 65536 / (integer_sqrt(*y * *y + *z * *z + *x * *x) | 1); | |
3892 } | |
3893 | |
3894 //----- (0043AE12) -------------------------------------------------------- | 3873 //----- (0043AE12) -------------------------------------------------------- |
3895 double __fastcall sub_43AE12(signed int a1) | 3874 double __fastcall sub_43AE12(signed int a1) |
3896 { | 3875 { |
3897 signed int v1; // ST00_4@1 | 3876 signed int v1; // ST00_4@1 |
3898 signed int v2; // ecx@1 | 3877 signed int v2; // ecx@1 |