Mercurial > mm7
comparison mm7_6.cpp @ 323:d720a13e2273
Very basic picking & entering houses
author | Nomad |
---|---|
date | Wed, 20 Feb 2013 08:23:12 +0200 |
parents | 5a66be213cff |
children | 672b83584b0f |
comparison
equal
deleted
inserted
replaced
322:ce39b96acf5c | 323:d720a13e2273 |
---|---|
4511 v154 = pActors[v152].vPosition.z; | 4511 v154 = pActors[v152].vPosition.z; |
4512 LODWORD(v727) = v153; | 4512 LODWORD(v727) = v153; |
4513 } | 4513 } |
4514 else | 4514 else |
4515 { | 4515 { |
4516 v155 = stru_5C6E00->SinCos(pParty->sRotationY); | 4516 v155 = stru_5C6E00->Cos(pParty->sRotationY); |
4517 uRequiredMana = pParty->vPosition.x + sub_42EBBE(2048, v155); | 4517 uRequiredMana = pParty->vPosition.x + sub_42EBBE(2048, v155); |
4518 v156 = stru_5C6E00->_42EBDB(pParty->sRotationY); | 4518 v156 = stru_5C6E00->Sin(pParty->sRotationY); |
4519 LODWORD(v727) = pParty->vPosition.y + sub_42EBBE(2048, v156); | 4519 LODWORD(v727) = pParty->vPosition.y + sub_42EBBE(2048, v156); |
4520 v154 = pParty->vPosition.z; | 4520 v154 = pParty->vPosition.z; |
4521 } | 4521 } |
4522 HIDWORD(v733) = v154; | 4522 HIDWORD(v733) = v154; |
4523 v713 = v154 + 2500; | 4523 v713 = v154 + 2500; |
4915 v211 = pActors[v209].vPosition.z; | 4915 v211 = pActors[v209].vPosition.z; |
4916 v713 = v210; | 4916 v713 = v210; |
4917 } | 4917 } |
4918 else | 4918 else |
4919 { | 4919 { |
4920 v212 = stru_5C6E00->SinCos(pParty->sRotationY); | 4920 v212 = stru_5C6E00->Cos(pParty->sRotationY); |
4921 LODWORD(v718) = pParty->vPosition.x + sub_42EBBE(2048, v212); | 4921 LODWORD(v718) = pParty->vPosition.x + sub_42EBBE(2048, v212); |
4922 v213 = stru_5C6E00->_42EBDB(pParty->sRotationY); | 4922 v213 = stru_5C6E00->Sin(pParty->sRotationY); |
4923 v214 = sub_42EBBE(2048, v213); | 4923 v214 = sub_42EBBE(2048, v213); |
4924 v211 = pParty->vPosition.z; | 4924 v211 = pParty->vPosition.z; |
4925 v713 = pParty->vPosition.y + v214; | 4925 v713 = pParty->vPosition.y + v214; |
4926 v208 = LODWORD(v725); | 4926 v208 = LODWORD(v725); |
4927 } | 4927 } |
7815 return (unsigned __int64)(a2 * (signed __int64)a1) >> 16; | 7815 return (unsigned __int64)(a2 * (signed __int64)a1) >> 16; |
7816 } | 7816 } |
7817 // 42EBBE: using guessed type int __fastcall sub_42EBBE(int, int); | 7817 // 42EBBE: using guessed type int __fastcall sub_42EBBE(int, int); |
7818 | 7818 |
7819 //----- (0042EBDB) -------------------------------------------------------- | 7819 //----- (0042EBDB) -------------------------------------------------------- |
7820 int stru193_math::_42EBDB(int angle) | 7820 int stru193_math::Sin(int angle) |
7821 { | 7821 { |
7822 return SinCos(angle - this->uIntegerHalfPi); | 7822 return Cos(angle - this->uIntegerHalfPi); |
7823 } | 7823 } |
7824 | 7824 |
7825 //----- (0042ECB5) -------------------------------------------------------- | 7825 //----- (0042ECB5) -------------------------------------------------------- |
7826 void _42ECB5_PlayerAttacksActor() | 7826 void _42ECB5_PlayerAttacksActor() |
7827 { | 7827 { |
8398 LABEL_18: | 8398 LABEL_18: |
8399 v11 = a4; | 8399 v11 = a4; |
8400 v12 = 0; | 8400 v12 = 0; |
8401 if ( a4 ) | 8401 if ( a4 ) |
8402 { | 8402 { |
8403 a4a = stru_5C6E00->SinCos(angle); | 8403 a4a = stru_5C6E00->Cos(angle); |
8404 v13 = (unsigned __int64)(a4a * (signed __int64)stru_5C6E00->SinCos(pitch)) >> 16; | 8404 v13 = (unsigned __int64)(a4a * (signed __int64)stru_5C6E00->Cos(pitch)) >> 16; |
8405 a4b = stru_5C6E00->SinCos(angle - stru_5C6E00->uIntegerHalfPi); | 8405 a4b = stru_5C6E00->Sin(angle); |
8406 a5a = (unsigned __int64)(a4b * (signed __int64)stru_5C6E00->SinCos(pitch)) >> 16; | 8406 a5a = (unsigned __int64)(a4b * (signed __int64)stru_5C6E00->Cos(pitch)) >> 16; |
8407 v14 = stru_5C6E00->SinCos(pitch - stru_5C6E00->uIntegerHalfPi); | 8407 v14 = stru_5C6E00->Sin(pitch); |
8408 v9->vVelocity.x = (unsigned int)(v13 * v11) >> 16; | 8408 v9->vVelocity.x = (unsigned int)(v13 * v11) >> 16; |
8409 v9->vVelocity.y = (unsigned int)(a5a * v11) >> 16; | 8409 v9->vVelocity.y = (unsigned int)(a5a * v11) >> 16; |
8410 v12 = (unsigned int)(v14 * v11) >> 16; | 8410 v12 = (unsigned int)(v14 * v11) >> 16; |
8411 } | 8411 } |
8412 else | 8412 else |