Mercurial > mm7
changeset 581:2d4204de7a8c
ExecDraw_d3d
author | Ritor1 |
---|---|
date | Wed, 06 Mar 2013 16:51:31 +0600 |
parents | bcae3e06cadb |
children | 88dd54e6e44a |
files | Indoor.cpp |
diffstat | 1 files changed, 19 insertions(+), 43 deletions(-) [+] |
line wrap: on
line diff
--- a/Indoor.cpp Wed Mar 06 09:28:27 2013 +0600 +++ b/Indoor.cpp Wed Mar 06 16:51:31 2013 +0600 @@ -372,20 +372,19 @@ _this.uFlags |= INDOOR_CAMERA_DRAW_D3D_OUTLINES; _this.field_0_timer = pEventTimer->uTotalGameTimeElapsed; - _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; + _this.vPosition.x = pParty->vPosition.x - ((stru_5C6E00->Cos(pParty->sRotationY) * (signed __int64)pParty->y_rotation_granularity) >> 16); + _this.vPosition.y = pParty->vPosition.y - ((stru_5C6E00->Sin(pParty->sRotationY) * (signed __int64)pParty->y_rotation_granularity) >> 16); + _this.vPosition.z = pParty->vPosition.z + pParty->sEyelevel; + _this.sRotationX = pParty->sRotationX; _this.sRotationY = pParty->sRotationY; - _this.sRotationX = pParty->sRotationX; _this.pRenderTarget = pRenderer->pTargetSurface; _this.uViewportX = pViewport->uScreenX; _this.uViewportY = pViewport->uScreenY; _this.uViewportZ = pViewport->uScreenZ; _this.uViewportW = pViewport->uScreenW; _this.field_3C = pViewport->field_30; - _this.vPosition.z = pParty->vPosition.z + pParty->sEyelevel; + _this.uTargetWidth = 640; _this.uTargetHeight = 480; _this.pTargetZ = pRenderer->pActiveZBuffer; @@ -507,15 +506,8 @@ if (!pVertices || (pGame->pStru9Instance->_498377(a4, 4u, pVertices, static_vertices_F7C228, &uNumVerticesa), uNumVerticesa) ) { - if (pGame->pIndoorCameraD3D->_437285_prolly_colide_vertices_against_frustrum( - static_vertices_F7C228, - &uNumVerticesa, - static_vertices_F7B628, - pGame->pIndoorCameraD3D->std__vector_000034_prolly_frustrum, - 4, - false, - 0) != 1 - || uNumVerticesa ) + if (pGame->pIndoorCameraD3D->_437285_prolly_colide_vertices_against_frustrum(static_vertices_F7C228, &uNumVerticesa, + static_vertices_F7B628, pGame->pIndoorCameraD3D->std__vector_000034_prolly_frustrum, 4, false, 0) != 1 || uNumVerticesa ) { a4a = SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel); v17 = (248 - 8 * SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel)) | (((248 - 8 * SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel)) | ((248 - 8 * SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel)) << 8)) << 8); @@ -535,26 +527,12 @@ stru_F7B60C.face_plane.dist = pFace->pFacePlane.dist; } - if (stru_F8AD28.uNumLightsApplied > 0 && - !(pFace->uAttributes & 0x400000)) - pGame->pLightmapBuilder->ApplyLights( - &stru_F8AD28, - &stru_F7B60C, - uNumVerticesa, - array_507D30, - pVertices, - 0); + if (stru_F8AD28.uNumLightsApplied > 0 && !pFace->uAttributes) + //!(pFace->uAttributes & 0x400000)) + pGame->pLightmapBuilder->ApplyLights(&stru_F8AD28, &stru_F7B60C, uNumVerticesa, array_507D30, pVertices, 0); if (pDecalBuilder->uNumDecals > 0) - pDecalBuilder->ApplyDecals( - a4a, - 1, - &stru_F7B60C, - uNumVerticesa, - array_507D30, - pVertices, - 0, - pFace->uSectorID); + pDecalBuilder->ApplyDecals(a4a, 1, &stru_F7B60C, uNumVerticesa, array_507D30, pVertices, 0, pFace->uSectorID); if (pFace->Animated() && pFace->uBitmapID == pRenderer->hd_water_tile_id ) @@ -579,18 +557,16 @@ v23 = pFace->uBitmapID; goto LABEL_42; } - else if (pFace->uAttributes & 0x4000) + else if (pFace->uAttributes)//(pFace->uAttributes & 0x4000) { - v23 = pTextureFrameTable->GetFrameTexture( - pFace->uBitmapID, - pBLVRenderParams->field_0_timer_); + v23 = pTextureFrameTable->GetFrameTexture(pFace->uBitmapID, pBLVRenderParams->field_0_timer_); LABEL_42: - v27 = pBitmaps_LOD->pHardwareTextures[v23]; - if (pFace->uAttributes & 0x400000) - _479A53_draw_some_blv_poly(uNumVerticesa, uFaceID); - else - pRenderer->DrawIndoorPolygon(uNumVerticesa, pFace, v27, v28, 8 * uFaceID | 6, v17, 0); - return; + v27 = pBitmaps_LOD->pHardwareTextures[v23]; + if (pFace->uAttributes & 0x400000) + _479A53_draw_some_blv_poly(uNumVerticesa, uFaceID); + else + pRenderer->DrawIndoorPolygon(uNumVerticesa, pFace, v27, v28, 8 * uFaceID | 6, v17, 0); + return; } } }