comparison mm7_3.cpp @ 897:d3228f46ef68

Слияние
author Ritor1
date Thu, 04 Apr 2013 09:35:58 +0600
parents e2e692684af8 a5456f17ab36
children 8cd0b155bebe
comparison
equal deleted inserted replaced
896:e2e692684af8 897:d3228f46ef68
6021 array_50AC10[2].vWorldViewProjY = v38; 6021 array_50AC10[2].vWorldViewProjY = v38;
6022 6022
6023 array_50AC10[3].vWorldViewProjX = pViewport->uViewportBR_X; 6023 array_50AC10[3].vWorldViewProjX = pViewport->uViewportBR_X;
6024 array_50AC10[3].vWorldViewProjY = pViewport->uViewportTL_Y; 6024 array_50AC10[3].vWorldViewProjY = pViewport->uViewportTL_Y;
6025 6025
6026 /*v36 = (double)(pViewport->uViewportBR_X - pViewport->uViewportTL_X) * 0.5; 6026 //pParty->sRotationY / 2048.0f
6027 v33 = 65536 / (signed int)(v36 / tan(0.6457717418670654) + 0.5);*/ 6027
6028 6028 float t = (GetTickCount() % 96000) / 96000.0f;
6029 for (int i = 0; i < _this.uNumVertices; ++i) 6029 array_50AC10[0].u = t - pParty->sRotationY / 1024.0f;
6030 { 6030 array_50AC10[0].v = t - pParty->sRotationX / 512.0f;
6031 /* v29 = floorf(array_50AC10[i].vWorldViewProjY + 0.5f); 6031
6032 array_50AC10[1].u = t - pParty->sRotationY / 1024.0f;
6033 array_50AC10[1].v = 1 + t - pParty->sRotationX / 512.0f;
6034
6035 array_50AC10[2].u = 1 + t - pParty->sRotationY / 1024.0f;
6036 array_50AC10[2].v = 1 + t - pParty->sRotationX / 512.0f;
6037
6038 array_50AC10[3].u = 1 + t - pParty->sRotationY / 1024.0f;
6039 array_50AC10[3].v = t - pParty->sRotationX / 512.0f;
6040
6041 v36 = (double)(pViewport->uViewportBR_X - pViewport->uViewportTL_X) * 0.5;
6042 v33 = 65536 / (signed int)(v36 / tan(0.6457717418670654) + 0.5);
6043
6044 for (uint i = 0; i < _this.uNumVertices; ++i)
6045 {
6046 v29 = floorf(array_50AC10[i].vWorldViewProjY + 0.5f);
6032 v39 = (unsigned __int64)(_this.ptr_38->field_14 * v33 * (v30 - v29)) / 65536; 6047 v39 = (unsigned __int64)(_this.ptr_38->field_14 * v33 * (v30 - v29)) / 65536;
6033 v8 = v39 + _this.ptr_38->field_C; 6048 v8 = v39 + _this.ptr_38->field_C;
6034 6049
6035 v39 = (unsigned __int64)(_this.ptr_38->field_20 * v33 * (v30 - v29)) / 65536; 6050 v39 = (unsigned __int64)(_this.ptr_38->field_20 * v33 * (v30 - v29)) / 65536;
6036 v36 = v39 + _this.ptr_38->field_18; 6051 v36 = v39 + _this.ptr_38->field_18;
6093 v36 = 224 * pMiscTimer->uTotalGameTimeElapsed + fixpoint_sub0(v36, v18) / 8; 6108 v36 = 224 * pMiscTimer->uTotalGameTimeElapsed + fixpoint_sub0(v36, v18) / 8;
6094 6109
6095 //array_50AC10[i].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist; 6110 //array_50AC10[i].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist;
6096 //array_50AC10[i].vWorldPosition.x = v36 / (_this.pTexture->uTextureHeight * 65536.0); 6111 //array_50AC10[i].vWorldPosition.x = v36 / (_this.pTexture->uTextureHeight * 65536.0);
6097 //array_50AC10[i].vWorldPosition.y = 1.0 / (pOutdoorCamera->shading_dist_mist >> 16); 6112 //array_50AC10[i].vWorldPosition.y = 1.0 / (pOutdoorCamera->shading_dist_mist >> 16);
6098 //array_50AC10[i].vWorldPosition.z = v35 / (_this.pTexture->uTextureWidth * 65536.0);*/ 6113 //array_50AC10[i].vWorldPosition.z = v35 / (_this.pTexture->uTextureWidth * 65536.0);
6099 array_50AC10[i]._rhw = 1.0;// / (pOutdoorCamera->shading_dist_mist >> 16); 6114 //array_50AC10[i]._rhw = 1.0f / (v18 >> 16);
6100 //array_50AC10[i].u = (double)v35 / (65536.0 * _this.pTexture->uTextureWidth); 6115 //array_50AC10[i].u = (double)v35 / (65536.0 * _this.pTexture->uTextureWidth);
6101 //array_50AC10[i].v = (double)v36 / (65536.0 * _this.pTexture->uTextureHeight); 6116 //array_50AC10[i].v = (double)v36 / (65536.0 * _this.pTexture->uTextureHeight);
6102 float t = (GetTickCount() % 96000) / 96000.0f; 6117 //float t = (GetTickCount() % 96000) / 96000.0f;
6103 array_50AC10[i].u += t; 6118 array_50AC10[i]._rhw = 1.0f;
6104 array_50AC10[i].v += t; 6119 //array_50AC10[i].u = t;
6105 if ( i == _this.uNumVertices - 1 ) 6120 //array_50AC10[i].v = t;
6106 { 6121 }
6122 //if ( i == _this.uNumVertices - 1 )
6123 //{
6107 pRenderer->DrawSkyPolygon(_this.uNumVertices, &_this, pBitmaps_LOD->pHardwareTextures[_this.uTileBitmapID]); 6124 pRenderer->DrawSkyPolygon(_this.uNumVertices, &_this, pBitmaps_LOD->pHardwareTextures[_this.uTileBitmapID]);
6108 6125
6109 array_50AC10[0].vWorldViewProjY = v38; 6126 array_50AC10[0].vWorldViewProjY = v38;
6110 array_50AC10[1].vWorldViewProjY = array_50AC10[1].vWorldViewProjY + 30.0; 6127 array_50AC10[1].vWorldViewProjY = array_50AC10[1].vWorldViewProjY + 30.0;
6111 array_50AC10[2].vWorldViewProjY = array_50AC10[2].vWorldViewProjY + 30.0; 6128 array_50AC10[2].vWorldViewProjY = array_50AC10[2].vWorldViewProjY + 30.0;
6112 array_50AC10[3].vWorldViewProjY = v38; 6129 array_50AC10[3].vWorldViewProjY = v38;
6113 6130
6114 pRenderer->DrawSkyPolygon(_this.uNumVertices, &_this, pBitmaps_LOD->pHardwareTextures[_this.uTileBitmapID]); 6131 pRenderer->DrawSkyPolygon(_this.uNumVertices, &_this, pBitmaps_LOD->pHardwareTextures[_this.uTileBitmapID]);
6115 return; 6132 //return;
6116 } 6133 //}
6117 }
6118 } 6134 }
6119 6135
6120 //----- (00479A53) -------------------------------------------------------- 6136 //----- (00479A53) --------------------------------------------------------
6121 void __fastcall _479A53_draw_some_blv_poly(unsigned int uNumVertices, unsigned int uFaceID) 6137 void __fastcall _479A53_draw_some_blv_poly(unsigned int uNumVertices, unsigned int uFaceID)
6122 { 6138 {