comparison mm7_3.cpp @ 577:7e8f5124056c

m
author Ritor1
date Tue, 05 Mar 2013 10:45:29 +0600
parents 214d9d47cf1f
children fdea951756f9
comparison
equal deleted inserted replaced
576:1bd8758f50b8 577:7e8f5124056c
6168 v36 = (double)(pViewport->uViewportZ - pViewport->uViewportX) * 0.5; 6168 v36 = (double)(pViewport->uViewportZ - pViewport->uViewportX) * 0.5;
6169 v33 = 65536 / (signed int)(v36 / tan(0.6457717418670654) + 0.5); 6169 v33 = 65536 / (signed int)(v36 / tan(0.6457717418670654) + 0.5);
6170 6170
6171 for (int i = 0; i < _this.uNumVertices; ++i) 6171 for (int i = 0; i < _this.uNumVertices; ++i)
6172 { 6172 {
6173 v29 = floorf(array_50AC10[i].vWorldViewProjY + 0.5f); 6173 v29 = floorf(array_50AC10[i].vWorldViewProjY + 0.5f);
6174 v39 = (unsigned __int64)(_this.ptr_38->field_14 * v33 * (v30 - v29)) / 65536; 6174 v39 = (unsigned __int64)(_this.ptr_38->field_14 * v33 * (v30 - v29)) / 65536;
6175 v8 = v39 + _this.ptr_38->field_C; 6175 v8 = v39 + _this.ptr_38->field_C;
6176 6176
6177 v39 = (unsigned __int64)(_this.ptr_38->field_20 * v33 * (v30 - v29)) / 65536; 6177 v39 = (unsigned __int64)(_this.ptr_38->field_20 * v33 * (v30 - v29)) / 65536;
6178 v36 = v39 + _this.ptr_38->field_18; 6178 v36 = v39 + _this.ptr_38->field_18;
6179 6179
6180 v9 = (unsigned __int64)(_this.v_18.z * v33 * (v30 - v29)) / 65536; 6180 v9 = (unsigned __int64)(_this.v_18.z * v33 * (v30 - v29)) / 65536;
6181 v10 = _this.v_18.x + v9; 6181 v10 = _this.v_18.x + v9;
6182 v39 = _this.v_18.x + v9; 6182 v39 = _this.v_18.x + v9;
6183 if ( _this.v_18.x + v9 > 0 ) 6183 if ( _this.v_18.x + v9 > 0 )
6184 { 6184 {
6185 v10 = 0; 6185 v10 = 0;
6186 v39 = 0; 6186 v39 = 0;
6187 } 6187 }
6188 v11 = (signed __int64)array_50AC10[i].vWorldViewProjX; 6188 v11 = (signed __int64)array_50AC10[i].vWorldViewProjX;
6189 v38 = v10; 6189 v38 = v10;
6190 v12 = array_50AC10[i].vWorldViewProjY - 1.0; 6190 v12 = array_50AC10[i].vWorldViewProjY - 1.0;
6191 v13 = v33 * (pViewport->uScreenCenterX - v11); 6191 v13 = v33 * (pViewport->uScreenCenterX - v11);
6192 v34 = -_this.field_24; 6192 v34 = -_this.field_24;
6193 v32 = (signed __int64)v12; 6193 v32 = (signed __int64)v12;
6194 v14 = v33 * (v30 - v32); 6194 v14 = v33 * (v30 - v32);
6195 while ( 1 ) 6195 while ( 1 )
6196 { 6196 {
6197 v40 = v14; 6197 //v40 = v14;
6198 if ( !v10 ) 6198 if ( !v10 )
6199 goto LABEL_12; 6199 {
6200 v37 = abs(v34 >> 14);
6201 v15 = abs(v10);
6202 if ( v37 <= v15 || v32 <= pViewport->uViewportY )
6203 {
6204 if ( v39 <= 0 )
6205 break;
6206 }
6207 v14 = v40;
6208 LABEL_12:
6209 v37 = _this.v_18.z; 6200 v37 = _this.v_18.z;
6210 v16 = (unsigned __int64)(_this.v_18.z * (signed __int64)v14) >> 16; 6201 v16 = (unsigned __int64)(_this.v_18.z * (signed __int64)v14) >> 16;
6211 --v32; 6202 --v32;
6212 v14 += v33; 6203 v14 += v33;
6213 v10 = _this.v_18.x + v16; 6204 v10 = _this.v_18.x + v16;
6214 v39 = _this.v_18.x + v16; 6205 v39 = _this.v_18.x + v16;
6215 v38 = _this.v_18.x + v16; 6206 v38 = _this.v_18.x + v16;
6216 break; 6207 break;
6217 } 6208 }
6218 LODWORD(v17) = v34 << 16; 6209 v37 = abs(v34 >> 14);
6219 HIDWORD(v17) = v34 >> 16; 6210 v15 = abs(v10);
6220 v18 = v17 / v38; 6211 if ( v37 <= v15 || v32 <= pViewport->uViewportY )
6221 if ( v18 < 0 ) 6212 {
6222 v18 = pOutdoorCamera->shading_dist_mist; 6213 if ( v39 <= 0 )
6223 6214 break;
6224 v37 += ((unsigned __int64)(_this.ptr_38->field_10 * v13) >> 16); 6215 }
6225 v36 += ((unsigned __int64)(_this.ptr_38->field_1C * v13) >> 16); 6216 //v14 = v40;
6226 v35 = 224 * pMiscTimer->uTotalGameTimeElapsed + (signed int)((unsigned __int64)(v37 * v18) >> 16) / 8; 6217 v37 = _this.v_18.z;
6227 v36 = 224 * pMiscTimer->uTotalGameTimeElapsed + (signed int)((unsigned __int64)(v36 * v18) >> 16) / 8; 6218 v16 = (unsigned __int64)(_this.v_18.z * v14) >> 16;
6228 6219 --v32;
6229 array_50AC10[i].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist; 6220 v14 += v33;
6230 array_50AC10[i]._rhw = 1.0 / (double)(v17 / 65536); 6221 v10 = _this.v_18.x + v16;
6231 array_50AC10[i].u = (double)v35 / (65536.0 * pBitmaps_LOD->pTextures[pOutdoor->uSky_TextureID].uTextureWidth); 6222 v39 = _this.v_18.x + v16;
6232 array_50AC10[i].v = (double)v36 / (65536.0 * pBitmaps_LOD->pTextures[pOutdoor->uSky_TextureID].uTextureWidth); 6223 v38 = _this.v_18.x + v16;
6233 } 6224 break;
6234 6225 }
6235 float t = (GetTickCount() % 96000) / 96000.0f; 6226 LODWORD(v17) = v34 << 16;
6236 6227 HIDWORD(v17) = v34 >> 16;
6237 array_50AC10[0].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist; 6228 v18 = v17 / v38;
6238 array_50AC10[0]._rhw = 1; 6229 if ( v18 < 0 )
6239 array_50AC10[0].u = 0; 6230 v18 = pOutdoorCamera->shading_dist_mist;
6240 array_50AC10[0].v = 0 + t; 6231
6241 6232 v37 += ((unsigned __int64)(_this.ptr_38->field_10 * v13) >> 16);
6242 array_50AC10[1].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist; 6233 v36 += ((unsigned __int64)(_this.ptr_38->field_1C * v13) >> 16);
6243 array_50AC10[1]._rhw = 1; 6234 v35 = 224 * pMiscTimer->uTotalGameTimeElapsed + (signed int)((unsigned __int64)(v37 * v18) >> 16) / 8;
6244 array_50AC10[1].u = 0; 6235 v36 = 224 * pMiscTimer->uTotalGameTimeElapsed + (signed int)((unsigned __int64)(v36 * v18) >> 16) / 8;
6245 array_50AC10[1].v = 1 + t; 6236
6246 6237 array_50AC10[i].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist;
6247 array_50AC10[2].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist; 6238 array_50AC10[i]._rhw = 1;
6248 array_50AC10[2]._rhw = 1; 6239 //array_50AC10[i].u = (double)v35 / (65536.0 * pBitmaps_LOD->pTextures[pOutdoor->uSky_TextureID].uTextureWidth);
6249 array_50AC10[2].u = 1; 6240 //array_50AC10[i].v = (double)v36 / (65536.0 * pBitmaps_LOD->pTextures[pOutdoor->uSky_TextureID].uTextureWidth);
6250 array_50AC10[2].v = 0 + t; 6241 }
6251 6242 if ( _this.uNumVertices > 0)
6252 array_50AC10[3].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist; 6243 {
6253 array_50AC10[3]._rhw = 1; 6244 float t = (GetTickCount() % 96000) / 96000.0f;
6254 array_50AC10[3].u = 1; 6245
6255 array_50AC10[3].v = 1 + t; 6246 //array_50AC10[0].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist;
6256 pRenderer->DrawStrip(_this.uNumVertices, &_this, 6247 //array_50AC10[0]._rhw = 1;
6257 pBitmaps_LOD->pHardwareTextures[_this.uTileBitmapID]); 6248 array_50AC10[0].u = 0;
6258 return; 6249 array_50AC10[0].v = 0 + t;
6250
6251 //array_50AC10[1].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist;
6252 //array_50AC10[1]._rhw = 1;
6253 array_50AC10[1].u = 0;
6254 array_50AC10[1].v = 1 + t;
6255
6256 //array_50AC10[2].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist;
6257 //array_50AC10[2]._rhw = 1;
6258 array_50AC10[2].u = 1;
6259 array_50AC10[2].v = 0 + t;
6260
6261 //array_50AC10[3].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist;
6262 //array_50AC10[3]._rhw = 1;
6263 array_50AC10[3].u = 1;
6264 array_50AC10[3].v = 1 + t;
6265 pRenderer->DrawStrip(_this.uNumVertices, &_this, pBitmaps_LOD->pHardwareTextures[_this.uTileBitmapID]);
6266 return;
6267 //}
6268 }
6259 } 6269 }
6260 6270
6261 6271
6262 //----- (00479A53) -------------------------------------------------------- 6272 //----- (00479A53) --------------------------------------------------------
6263 void __fastcall _479A53_draw_some_blv_poly(unsigned int uNumVertices, unsigned int uFaceID) 6273 void __fastcall _479A53_draw_some_blv_poly(unsigned int uNumVertices, unsigned int uFaceID)