Mercurial > mm7
comparison Indoor.cpp @ 581:2d4204de7a8c
ExecDraw_d3d
author | Ritor1 |
---|---|
date | Wed, 06 Mar 2013 16:51:31 +0600 |
parents | f54481c85df8 |
children | 55d6b756e03a |
comparison
equal
deleted
inserted
replaced
580:bcae3e06cadb | 581:2d4204de7a8c |
---|---|
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 - ((unsigned __int64)(stru_5C6E00->Cos(pParty->sRotationY) * (signed __int64)pParty->y_rotation_granularity) >> 16); | |
376 v2 = stru_5C6E00->Sin(pParty->sRotationY); | |
377 v3 = (unsigned __int64)(v2 * (signed __int64)pParty->y_rotation_granularity) >> 16; | |
378 _this.field_1C_mb_fov = 65; | 375 _this.field_1C_mb_fov = 65; |
379 _this.vPosition.y = pParty->vPosition.y - v3; | 376 _this.vPosition.x = pParty->vPosition.x - ((stru_5C6E00->Cos(pParty->sRotationY) * (signed __int64)pParty->y_rotation_granularity) >> 16); |
377 _this.vPosition.y = pParty->vPosition.y - ((stru_5C6E00->Sin(pParty->sRotationY) * (signed __int64)pParty->y_rotation_granularity) >> 16); | |
378 _this.vPosition.z = pParty->vPosition.z + pParty->sEyelevel; | |
379 _this.sRotationX = pParty->sRotationX; | |
380 _this.sRotationY = pParty->sRotationY; | 380 _this.sRotationY = pParty->sRotationY; |
381 _this.sRotationX = pParty->sRotationX; | |
382 _this.pRenderTarget = pRenderer->pTargetSurface; | 381 _this.pRenderTarget = pRenderer->pTargetSurface; |
383 _this.uViewportX = pViewport->uScreenX; | 382 _this.uViewportX = pViewport->uScreenX; |
384 _this.uViewportY = pViewport->uScreenY; | 383 _this.uViewportY = pViewport->uScreenY; |
385 _this.uViewportZ = pViewport->uScreenZ; | 384 _this.uViewportZ = pViewport->uScreenZ; |
386 _this.uViewportW = pViewport->uScreenW; | 385 _this.uViewportW = pViewport->uScreenW; |
387 _this.field_3C = pViewport->field_30; | 386 _this.field_3C = pViewport->field_30; |
388 _this.vPosition.z = pParty->vPosition.z + pParty->sEyelevel; | 387 |
389 _this.uTargetWidth = 640; | 388 _this.uTargetWidth = 640; |
390 _this.uTargetHeight = 480; | 389 _this.uTargetHeight = 480; |
391 _this.pTargetZ = pRenderer->pActiveZBuffer; | 390 _this.pTargetZ = pRenderer->pActiveZBuffer; |
392 sub_440BED(&_this); | 391 sub_440BED(&_this); |
393 pParty->uFlags &= ~2; | 392 pParty->uFlags &= ~2; |
505 } | 504 } |
506 | 505 |
507 if (!pVertices || | 506 if (!pVertices || |
508 (pGame->pStru9Instance->_498377(a4, 4u, pVertices, static_vertices_F7C228, &uNumVerticesa), uNumVerticesa) ) | 507 (pGame->pStru9Instance->_498377(a4, 4u, pVertices, static_vertices_F7C228, &uNumVerticesa), uNumVerticesa) ) |
509 { | 508 { |
510 if (pGame->pIndoorCameraD3D->_437285_prolly_colide_vertices_against_frustrum( | 509 if (pGame->pIndoorCameraD3D->_437285_prolly_colide_vertices_against_frustrum(static_vertices_F7C228, &uNumVerticesa, |
511 static_vertices_F7C228, | 510 static_vertices_F7B628, pGame->pIndoorCameraD3D->std__vector_000034_prolly_frustrum, 4, false, 0) != 1 || uNumVerticesa ) |
512 &uNumVerticesa, | |
513 static_vertices_F7B628, | |
514 pGame->pIndoorCameraD3D->std__vector_000034_prolly_frustrum, | |
515 4, | |
516 false, | |
517 0) != 1 | |
518 || uNumVerticesa ) | |
519 { | 511 { |
520 a4a = SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel); | 512 a4a = SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel); |
521 v17 = (248 - 8 * SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel)) | (((248 - 8 * SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel)) | ((248 - 8 * SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel)) << 8)) << 8); | 513 v17 = (248 - 8 * SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel)) | (((248 - 8 * SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel)) | ((248 - 8 * SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel)) << 8)) << 8); |
522 sub_4B0E07(uFaceID); | 514 sub_4B0E07(uFaceID); |
523 pGame->pLightmapBuilder->ApplyLights_IndoorFace(uFaceID); | 515 pGame->pLightmapBuilder->ApplyLights_IndoorFace(uFaceID); |
533 stru_F7B60C.face_plane.vNormal.y = pFace->pFacePlane.vNormal.y; | 525 stru_F7B60C.face_plane.vNormal.y = pFace->pFacePlane.vNormal.y; |
534 stru_F7B60C.face_plane.vNormal.z = pFace->pFacePlane.vNormal.z; | 526 stru_F7B60C.face_plane.vNormal.z = pFace->pFacePlane.vNormal.z; |
535 stru_F7B60C.face_plane.dist = pFace->pFacePlane.dist; | 527 stru_F7B60C.face_plane.dist = pFace->pFacePlane.dist; |
536 } | 528 } |
537 | 529 |
538 if (stru_F8AD28.uNumLightsApplied > 0 && | 530 if (stru_F8AD28.uNumLightsApplied > 0 && !pFace->uAttributes) |
539 !(pFace->uAttributes & 0x400000)) | 531 //!(pFace->uAttributes & 0x400000)) |
540 pGame->pLightmapBuilder->ApplyLights( | 532 pGame->pLightmapBuilder->ApplyLights(&stru_F8AD28, &stru_F7B60C, uNumVerticesa, array_507D30, pVertices, 0); |
541 &stru_F8AD28, | |
542 &stru_F7B60C, | |
543 uNumVerticesa, | |
544 array_507D30, | |
545 pVertices, | |
546 0); | |
547 | 533 |
548 if (pDecalBuilder->uNumDecals > 0) | 534 if (pDecalBuilder->uNumDecals > 0) |
549 pDecalBuilder->ApplyDecals( | 535 pDecalBuilder->ApplyDecals(a4a, 1, &stru_F7B60C, uNumVerticesa, array_507D30, pVertices, 0, pFace->uSectorID); |
550 a4a, | |
551 1, | |
552 &stru_F7B60C, | |
553 uNumVerticesa, | |
554 array_507D30, | |
555 pVertices, | |
556 0, | |
557 pFace->uSectorID); | |
558 | 536 |
559 if (pFace->Animated() && | 537 if (pFace->Animated() && |
560 pFace->uBitmapID == pRenderer->hd_water_tile_id ) | 538 pFace->uBitmapID == pRenderer->hd_water_tile_id ) |
561 { | 539 { |
562 __debugbreak(); | 540 __debugbreak(); |
577 array_507D30[i].v += pBitmaps_LOD->pTextures[pFace->uBitmapID].uHeightMinus1 * cosf(angle); | 555 array_507D30[i].v += pBitmaps_LOD->pTextures[pFace->uBitmapID].uHeightMinus1 * cosf(angle); |
578 | 556 |
579 v23 = pFace->uBitmapID; | 557 v23 = pFace->uBitmapID; |
580 goto LABEL_42; | 558 goto LABEL_42; |
581 } | 559 } |
582 else if (pFace->uAttributes & 0x4000) | 560 else if (pFace->uAttributes)//(pFace->uAttributes & 0x4000) |
583 { | 561 { |
584 v23 = pTextureFrameTable->GetFrameTexture( | 562 v23 = pTextureFrameTable->GetFrameTexture(pFace->uBitmapID, pBLVRenderParams->field_0_timer_); |
585 pFace->uBitmapID, | |
586 pBLVRenderParams->field_0_timer_); | |
587 LABEL_42: | 563 LABEL_42: |
588 v27 = pBitmaps_LOD->pHardwareTextures[v23]; | 564 v27 = pBitmaps_LOD->pHardwareTextures[v23]; |
589 if (pFace->uAttributes & 0x400000) | 565 if (pFace->uAttributes & 0x400000) |
590 _479A53_draw_some_blv_poly(uNumVerticesa, uFaceID); | 566 _479A53_draw_some_blv_poly(uNumVerticesa, uFaceID); |
591 else | 567 else |
592 pRenderer->DrawIndoorPolygon(uNumVerticesa, pFace, v27, v28, 8 * uFaceID | 6, v17, 0); | 568 pRenderer->DrawIndoorPolygon(uNumVerticesa, pFace, v27, v28, 8 * uFaceID | 6, v17, 0); |
593 return; | 569 return; |
594 } | 570 } |
595 } | 571 } |
596 } | 572 } |
597 } | 573 } |
598 } | 574 } |