Mercurial > mm7
comparison Engine/Graphics/Render.cpp @ 2534:1bcadc6dd203
enum SOUND_
author | Ritor1 |
---|---|
date | Mon, 09 Feb 2015 19:17:12 +0600 |
parents | 9ec6b8be16fe |
children | 3a36de426f5f |
comparison
equal
deleted
inserted
replaced
2533:2baaac65d5bf | 2534:1bcadc6dd203 |
---|---|
8639 * (sin((double)pGame->pIndoorCameraD3D->sRotationX * 0.0030664064) | 8639 * (sin((double)pGame->pIndoorCameraD3D->sRotationX * 0.0030664064) |
8640 * (double)-0x2000//(double)pODMRenderParams->shading_dist_mist | 8640 * (double)-0x2000//(double)pODMRenderParams->shading_dist_mist |
8641 - (double)pGame->pIndoorCameraD3D->vPartyPos.z)); | 8641 - (double)pGame->pIndoorCameraD3D->vPartyPos.z)); |
8642 pSkyPolygon.Create_48607B(&stru_8019C8);//заполняется ptr_38 | 8642 pSkyPolygon.Create_48607B(&stru_8019C8);//заполняется ptr_38 |
8643 pSkyPolygon.ptr_38->_48694B_frustum_sky(); | 8643 pSkyPolygon.ptr_38->_48694B_frustum_sky(); |
8644 pSkyPolygon.uTileBitmapID = pOutdoor->sSky_TextureID;//179(original 166) | 8644 |
8645 pSkyPolygon.pTexture = (Texture *)(SLOWORD(pOutdoor->sSky_TextureID) != -1 ? (int)&pBitmaps_LOD->pTextures[SLOWORD(pOutdoor->sSky_TextureID)] : 0); | 8645 //if ( pParty->uCurrentHour > 20 || pParty->uCurrentHour < 5 ) |
8646 //pSkyPolygon.uTileBitmapID = pOutdoor->New_SKY_NIGHT_ID; | |
8647 //else | |
8648 pSkyPolygon.uTileBitmapID = pOutdoor->sSky_TextureID;//179(original 166) | |
8649 pSkyPolygon.pTexture = (Texture *)(pSkyPolygon.uTileBitmapID != -1 ? (int)&pBitmaps_LOD->pTextures[pSkyPolygon.uTileBitmapID] : 0); | |
8646 if ( pSkyPolygon.pTexture ) | 8650 if ( pSkyPolygon.pTexture ) |
8647 { | 8651 { |
8648 pSkyPolygon.dimming_level = 0; | 8652 pSkyPolygon.dimming_level = 0; |
8649 pSkyPolygon.uNumVertices = 4; | 8653 pSkyPolygon.uNumVertices = 4; |
8650 //centering(центруем)----------------------------------------------------------------- | 8654 //centering(центруем)----------------------------------------------------------------- |
10956 float fov_x = 3.141592f * (pODMRenderParams->uCameraFovInDegrees + 0) / 360.0f; | 10960 float fov_x = 3.141592f * (pODMRenderParams->uCameraFovInDegrees + 0) / 360.0f; |
10957 float fov_y = fov_x / aspect; | 10961 float fov_y = fov_x / aspect; |
10958 | 10962 |
10959 float ray_dx = fov_x / (float)pViewport->uScreenWidth, | 10963 float ray_dx = fov_x / (float)pViewport->uScreenWidth, |
10960 ray_dy = fov_y / (float)pViewport->uScreenHeight; | 10964 ray_dy = fov_y / (float)pViewport->uScreenHeight; |
10961 float party_angle_x = 2 * 3.141592653589 * pParty->sRotationX / 2048.0, | 10965 float party_angle_x = 2 * pi_double * pParty->sRotationX / 2048.0, |
10962 party_angle_y = 2 * 3.141592653589 * pParty->sRotationY / 2048.0; | 10966 party_angle_y = 2 * pi_double * pParty->sRotationY / 2048.0; |
10963 for (int y = 0; y < pViewport->uScreenHeight; ++y) | 10967 for (int y = 0; y < pViewport->uScreenHeight; ++y) |
10964 for (int x = 0; x < pViewport->uScreenWidth; ++x) | 10968 for (int x = 0; x < pViewport->uScreenWidth; ++x) |
10965 { | 10969 { |
10966 float angle_x = party_angle_x - (y - pViewport->uScreenHeight / 2) * ray_dy; | 10970 float angle_x = party_angle_x - (y - pViewport->uScreenHeight / 2) * ray_dy; |
10967 float angle_y = party_angle_y - (x - pViewport->uScreenWidth / 2) * ray_dx; | 10971 float angle_y = party_angle_y - (x - pViewport->uScreenWidth / 2) * ray_dx; |