comparison Indoor.cpp @ 327:a7f15da53e82

Слияние
author Ritor1
date Wed, 20 Feb 2013 11:27:06 +0600
parents d720a13e2273
children 2f67762d04f6 a4a5996fea5b
comparison
equal deleted inserted replaced
326:ead95219160c 327:a7f15da53e82
190 v3->vPartyPos.y = pParty->vPosition.y; 190 v3->vPartyPos.y = pParty->vPosition.y;
191 v3->uPartySectorID = pIndoor->GetSector(v10, v9, v8); 191 v3->uPartySectorID = pIndoor->GetSector(v10, v9, v8);
192 } 192 }
193 if ( pRenderer->pRenderD3D ) 193 if ( pRenderer->pRenderD3D )
194 { 194 {
195 v3->sCosineY = stru_5C6E00->SinCos(v3->sPartyRotY); 195 v3->sCosineY = stru_5C6E00->Cos(v3->sPartyRotY);
196 v3->sSineY = stru_5C6E00->SinCos(v3->sPartyRotY - stru_5C6E00->uIntegerHalfPi); 196 v3->sSineY = stru_5C6E00->Sin(v3->sPartyRotY);
197 v3->sCosineNegX = stru_5C6E00->SinCos(-v3->sPartyRotX); 197 v3->sCosineNegX = stru_5C6E00->Cos(-v3->sPartyRotX);
198 v3->sSineNegX = stru_5C6E00->SinCos(-v3->sPartyRotX - stru_5C6E00->uIntegerHalfPi); 198 v3->sSineNegX = stru_5C6E00->Sin(-v3->sPartyRotX);
199 v3->fCosineY = cos((3.141592653589793 + 3.141592653589793) * (double)v3->sPartyRotY * 0.00048828125); 199 v3->fCosineY = cos((3.141592653589793 + 3.141592653589793) * (double)v3->sPartyRotY * 0.00048828125);
200 v3->fSineY = sin((3.141592653589793 + 3.141592653589793) * (double)v3->sPartyRotY * 0.00048828125); 200 v3->fSineY = sin((3.141592653589793 + 3.141592653589793) * (double)v3->sPartyRotY * 0.00048828125);
201 v3->fCosineNegX = cos((3.141592653589793 + 3.141592653589793) * (double)-v3->sPartyRotX * 0.00048828125); 201 v3->fCosineNegX = cos((3.141592653589793 + 3.141592653589793) * (double)-v3->sPartyRotX * 0.00048828125);
202 v3->fSineNegX = sin((3.141592653589793 + 3.141592653589793) * (double)-v3->sPartyRotX * 0.00048828125); 202 v3->fSineNegX = sin((3.141592653589793 + 3.141592653589793) * (double)-v3->sPartyRotX * 0.00048828125);
203 v3->field_64 = a2->field_3C; 203 v3->field_64 = a2->field_3C;
212 v3->uViewportCenterX = v14 >> 1; 212 v3->uViewportCenterX = v14 >> 1;
213 v3->uViewportCenterY = (signed int)(v16 + v15) >> 1; 213 v3->uViewportCenterY = (signed int)(v16 + v15) >> 1;
214 } 214 }
215 else 215 else
216 { 216 {
217 v3->sCosineY = stru_5C6E00->SinCos(-v3->sPartyRotY); 217 v3->sCosineY = stru_5C6E00->Cos(-v3->sPartyRotY);
218 v3->sSineY = stru_5C6E00->SinCos(-v3->sPartyRotY - stru_5C6E00->uIntegerHalfPi); 218 v3->sSineY = stru_5C6E00->Sin(-v3->sPartyRotY);
219 v3->sCosineNegX = stru_5C6E00->SinCos(-v3->sPartyRotX); 219 v3->sCosineNegX = stru_5C6E00->Cos(-v3->sPartyRotX);
220 v3->sSineNegX = stru_5C6E00->SinCos(-v3->sPartyRotX - stru_5C6E00->uIntegerHalfPi); 220 v3->sSineNegX = stru_5C6E00->Sin(-v3->sPartyRotX);
221 v17 = cos((double)-v3->sPartyRotY * 0.0030664064); 221 v17 = cos((double)-v3->sPartyRotY * 0.0030664064);
222 v18 = v3->sPartyRotY; 222 v18 = v3->sPartyRotY;
223 v3->fCosineY = v17; 223 v3->fCosineY = v17;
224 v19 = sin((double)-v18 * 0.0030664064); 224 v19 = sin((double)-v18 * 0.0030664064);
225 v20 = v3->sPartyRotX; 225 v20 = v3->sPartyRotX;
370 _this.uFlags |= INDOOR_CAMERA_DRAW_SW_OUTLINES; 370 _this.uFlags |= INDOOR_CAMERA_DRAW_SW_OUTLINES;
371 if (viewparams->draw_d3d_outlines) 371 if (viewparams->draw_d3d_outlines)
372 _this.uFlags |= INDOOR_CAMERA_DRAW_D3D_OUTLINES; 372 _this.uFlags |= INDOOR_CAMERA_DRAW_D3D_OUTLINES;
373 373
374 _this.field_0_timer = pEventTimer->uTotalGameTimeElapsed; 374 _this.field_0_timer = pEventTimer->uTotalGameTimeElapsed;
375 _this.vPosition.x = pParty->vPosition.x 375 _this.vPosition.x = pParty->vPosition.x - ((unsigned __int64)(stru_5C6E00->Cos(pParty->sRotationY) * (signed __int64)pParty->y_rotation_granularity) >> 16);
376 - ((unsigned __int64)(stru_5C6E00->SinCos(pParty->sRotationY) 376 v2 = stru_5C6E00->Sin(pParty->sRotationY);
377 * (signed __int64)pParty->y_rotation_granularity) >> 16);
378 v2 = stru_5C6E00->SinCos(pParty->sRotationY - stru_5C6E00->uIntegerHalfPi);
379 v3 = (unsigned __int64)(v2 * (signed __int64)pParty->y_rotation_granularity) >> 16; 377 v3 = (unsigned __int64)(v2 * (signed __int64)pParty->y_rotation_granularity) >> 16;
380 _this.field_1C_mb_fov = 65; 378 _this.field_1C_mb_fov = 65;
381 _this.vPosition.y = pParty->vPosition.y - v3; 379 _this.vPosition.y = pParty->vPosition.y - v3;
382 _this.sRotationY = pParty->sRotationY; 380 _this.sRotationY = pParty->sRotationY;
383 _this.sRotationX = pParty->sRotationX; 381 _this.sRotationX = pParty->sRotationX;
4028 } 4026 }
4029 if ( pParty->bTurnBasedModeOn == 1 && pTurnEngine->field_4 == 1 ) 4027 if ( pParty->bTurnBasedModeOn == 1 && pTurnEngine->field_4 == 1 )
4030 v6 = (signed __int64)((double)v61 * flt_6BE3AC_debug_recmod1_x_1_6); 4028 v6 = (signed __int64)((double)v61 * flt_6BE3AC_debug_recmod1_x_1_6);
4031 if ( v6 > 1000 ) 4029 if ( v6 > 1000 )
4032 v6 = 1000; 4030 v6 = 1000;
4033 v12 = stru_5C6E00->SinCos(v0->uYawAngle); 4031 v12 = stru_5C6E00->Cos(v0->uYawAngle);
4034 uSectorID = v12; 4032 uSectorID = v12;
4035 v13 = v12 * (signed __int64)v6; 4033 v13 = v12 * (signed __int64)v6;
4036 v61 = v13 >> 16; 4034 v61 = v13 >> 16;
4037 v0->vVelocity.x = WORD1(v13); 4035 v0->vVelocity.x = WORD1(v13);
4038 uSectorID = stru_5C6E00->SinCos(v0->uYawAngle - stru_5C6E00->uIntegerHalfPi); 4036 uSectorID = stru_5C6E00->Sin(v0->uYawAngle);
4039 v61 = (unsigned __int64)(uSectorID * (signed __int64)v6) >> 16; 4037 v61 = (unsigned __int64)(uSectorID * (signed __int64)v6) >> 16;
4040 v7 = v62 == 0; 4038 v7 = v62 == 0;
4041 v0->vVelocity.y = (unsigned int)(uSectorID * v6) >> 16; 4039 v0->vVelocity.y = (unsigned int)(uSectorID * v6) >> 16;
4042 if ( !v7 ) 4040 if ( !v7 )
4043 { 4041 {
4044 v14 = stru_5C6E00->SinCos(v0->uPitchAngle - stru_5C6E00->uIntegerHalfPi); 4042 v14 = stru_5C6E00->Sin(v0->uPitchAngle);
4045 uSectorID = v14; 4043 uSectorID = v14;
4046 v15 = v14 * (signed __int64)v6; 4044 v15 = v14 * (signed __int64)v6;
4047 v61 = v15 >> 16; 4045 v61 = v15 >> 16;
4048 v0->vVelocity.z = WORD1(v15); 4046 v0->vVelocity.z = WORD1(v15);
4049 } 4047 }
4227 { 4225 {
4228 _this = integer_sqrt(v0->vVelocity.x * v0->vVelocity.x + v0->vVelocity.y * v0->vVelocity.y); 4226 _this = integer_sqrt(v0->vVelocity.x * v0->vVelocity.x + v0->vVelocity.y * v0->vVelocity.y);
4229 v45 = stru_5C6E00->Atan2( 4227 v45 = stru_5C6E00->Atan2(
4230 v0->vPosition.x - pLevelDecorations[v37].vPosition.x, 4228 v0->vPosition.x - pLevelDecorations[v37].vPosition.x,
4231 v0->vPosition.y - pLevelDecorations[v37].vPosition.y); 4229 v0->vPosition.y - pLevelDecorations[v37].vPosition.y);
4232 v54 = stru_5C6E00->SinCos(v45); 4230 v54 = stru_5C6E00->Cos(v45);
4233 v56 = (unsigned __int64)(v54 * (signed __int64)(signed int)_this) >> 16; 4231 v56 = (unsigned __int64)(v54 * (signed __int64)(signed int)_this) >> 16;
4234 v46 = v45 - stru_5C6E00->uIntegerHalfPi; 4232 v46 = v45 - stru_5C6E00->uIntegerHalfPi;
4235 v0->vVelocity.x = v54 * _this >> 16; 4233 v0->vVelocity.x = v54 * _this >> 16;
4236 v47 = stru_5C6E00->SinCos(v46); 4234 v47 = stru_5C6E00->Sin(v45);
4237 v54 = v47; 4235 v54 = v47;
4238 v48 = v47 * (signed __int64)(signed int)_this; 4236 v48 = v47 * (signed __int64)(signed int)_this;
4239 v56 = v48 >> 16; 4237 v56 = v48 >> 16;
4240 v0->vVelocity.y = WORD1(v48); 4238 v0->vVelocity.y = WORD1(v48);
4241 goto LABEL_119; 4239 goto LABEL_119;