Mercurial > mm7
diff Indoor.cpp @ 323:d720a13e2273
Very basic picking & entering houses
author | Nomad |
---|---|
date | Wed, 20 Feb 2013 08:23:12 +0200 |
parents | ce39b96acf5c |
children | 2f67762d04f6 a4a5996fea5b |
line wrap: on
line diff
--- a/Indoor.cpp Wed Feb 20 04:36:14 2013 +0200 +++ b/Indoor.cpp Wed Feb 20 08:23:12 2013 +0200 @@ -192,10 +192,10 @@ } if ( pRenderer->pRenderD3D ) { - v3->sCosineY = stru_5C6E00->SinCos(v3->sPartyRotY); - v3->sSineY = stru_5C6E00->SinCos(v3->sPartyRotY - stru_5C6E00->uIntegerHalfPi); - v3->sCosineNegX = stru_5C6E00->SinCos(-v3->sPartyRotX); - v3->sSineNegX = stru_5C6E00->SinCos(-v3->sPartyRotX - stru_5C6E00->uIntegerHalfPi); + v3->sCosineY = stru_5C6E00->Cos(v3->sPartyRotY); + v3->sSineY = stru_5C6E00->Sin(v3->sPartyRotY); + v3->sCosineNegX = stru_5C6E00->Cos(-v3->sPartyRotX); + v3->sSineNegX = stru_5C6E00->Sin(-v3->sPartyRotX); v3->fCosineY = cos((3.141592653589793 + 3.141592653589793) * (double)v3->sPartyRotY * 0.00048828125); v3->fSineY = sin((3.141592653589793 + 3.141592653589793) * (double)v3->sPartyRotY * 0.00048828125); v3->fCosineNegX = cos((3.141592653589793 + 3.141592653589793) * (double)-v3->sPartyRotX * 0.00048828125); @@ -214,10 +214,10 @@ } else { - v3->sCosineY = stru_5C6E00->SinCos(-v3->sPartyRotY); - v3->sSineY = stru_5C6E00->SinCos(-v3->sPartyRotY - stru_5C6E00->uIntegerHalfPi); - v3->sCosineNegX = stru_5C6E00->SinCos(-v3->sPartyRotX); - v3->sSineNegX = stru_5C6E00->SinCos(-v3->sPartyRotX - stru_5C6E00->uIntegerHalfPi); + v3->sCosineY = stru_5C6E00->Cos(-v3->sPartyRotY); + v3->sSineY = stru_5C6E00->Sin(-v3->sPartyRotY); + v3->sCosineNegX = stru_5C6E00->Cos(-v3->sPartyRotX); + v3->sSineNegX = stru_5C6E00->Sin(-v3->sPartyRotX); v17 = cos((double)-v3->sPartyRotY * 0.0030664064); v18 = v3->sPartyRotY; v3->fCosineY = v17; @@ -372,10 +372,8 @@ _this.uFlags |= INDOOR_CAMERA_DRAW_D3D_OUTLINES; _this.field_0_timer = pEventTimer->uTotalGameTimeElapsed; - _this.vPosition.x = pParty->vPosition.x - - ((unsigned __int64)(stru_5C6E00->SinCos(pParty->sRotationY) - * (signed __int64)pParty->y_rotation_granularity) >> 16); - v2 = stru_5C6E00->SinCos(pParty->sRotationY - stru_5C6E00->uIntegerHalfPi); + _this.vPosition.x = pParty->vPosition.x - ((unsigned __int64)(stru_5C6E00->Cos(pParty->sRotationY) * (signed __int64)pParty->y_rotation_granularity) >> 16); + v2 = stru_5C6E00->Sin(pParty->sRotationY); v3 = (unsigned __int64)(v2 * (signed __int64)pParty->y_rotation_granularity) >> 16; _this.field_1C_mb_fov = 65; _this.vPosition.y = pParty->vPosition.y - v3; @@ -4030,18 +4028,18 @@ v6 = (signed __int64)((double)v61 * flt_6BE3AC_debug_recmod1_x_1_6); if ( v6 > 1000 ) v6 = 1000; - v12 = stru_5C6E00->SinCos(v0->uYawAngle); + v12 = stru_5C6E00->Cos(v0->uYawAngle); uSectorID = v12; v13 = v12 * (signed __int64)v6; v61 = v13 >> 16; v0->vVelocity.x = WORD1(v13); - uSectorID = stru_5C6E00->SinCos(v0->uYawAngle - stru_5C6E00->uIntegerHalfPi); + uSectorID = stru_5C6E00->Sin(v0->uYawAngle); v61 = (unsigned __int64)(uSectorID * (signed __int64)v6) >> 16; v7 = v62 == 0; v0->vVelocity.y = (unsigned int)(uSectorID * v6) >> 16; if ( !v7 ) { - v14 = stru_5C6E00->SinCos(v0->uPitchAngle - stru_5C6E00->uIntegerHalfPi); + v14 = stru_5C6E00->Sin(v0->uPitchAngle); uSectorID = v14; v15 = v14 * (signed __int64)v6; v61 = v15 >> 16; @@ -4229,11 +4227,11 @@ v45 = stru_5C6E00->Atan2( v0->vPosition.x - pLevelDecorations[v37].vPosition.x, v0->vPosition.y - pLevelDecorations[v37].vPosition.y); - v54 = stru_5C6E00->SinCos(v45); + v54 = stru_5C6E00->Cos(v45); v56 = (unsigned __int64)(v54 * (signed __int64)(signed int)_this) >> 16; v46 = v45 - stru_5C6E00->uIntegerHalfPi; v0->vVelocity.x = v54 * _this >> 16; - v47 = stru_5C6E00->SinCos(v46); + v47 = stru_5C6E00->Sin(v45); v54 = v47; v48 = v47 * (signed __int64)(signed int)_this; v56 = v48 >> 16;