Mercurial > mm7
comparison Render.cpp @ 2321:53c9d34024d6
near_clip error
author | Ritor1 |
---|---|
date | Sat, 22 Mar 2014 18:06:41 +0600 |
parents | 847aba0b7f82 |
children | a59892f99d31 |
comparison
equal
deleted
inserted
replaced
2320:847aba0b7f82 | 2321:53c9d34024d6 |
---|---|
274 //6-South(Þ) | 274 //6-South(Þ) |
275 //7-SouthEast(ÞÂ) | 275 //7-SouthEast(ÞÂ) |
276 int Start_X, End_X, Start_Z, End_Z; | 276 int Start_X, End_X, Start_Z, End_Z; |
277 if ( direction >= 0 && direction < 1.0 )//East(B) - NorthEast(CB) | 277 if ( direction >= 0 && direction < 1.0 )//East(B) - NorthEast(CB) |
278 { | 278 { |
279 Start_X = pODMRenderParams->uMapGridCellX, End_X = 127; | 279 Start_X = pODMRenderParams->uMapGridCellX - 2, End_X = 127; |
280 Start_Z = 0, End_Z = 127; | 280 Start_Z = 0, End_Z = 127; |
281 } | 281 } |
282 else if (direction >= 1.0 && direction < 3.0)//NorthEast(CB) - WestNorth(CÇ) | 282 else if (direction >= 1.0 && direction < 3.0)//NorthEast(CB) - WestNorth(CÇ) |
283 { | 283 { |
284 Start_X = 0, End_X = 127; | 284 Start_X = 0, End_X = 127; |
285 Start_Z = 0, End_Z = pODMRenderParams->uMapGridCellZ; | 285 Start_Z = 0, End_Z = pODMRenderParams->uMapGridCellZ + 1; |
286 } | 286 } |
287 else if (direction >= 3.0 && direction < 5.0)//WestNorth(CÇ) - SouthWest(ÞÇ) | 287 else if (direction >= 3.0 && direction < 5.0)//WestNorth(CÇ) - SouthWest(ÞÇ) |
288 { | 288 { |
289 Start_X = 0, End_X = pODMRenderParams->uMapGridCellX + 1; | 289 Start_X = 0, End_X = pODMRenderParams->uMapGridCellX + 1; |
290 Start_Z = 0, End_Z = 127; | 290 Start_Z = 0, End_Z = 127; |
291 } | 291 } |
292 else if ( direction >= 5.0 && direction < 7.0 )//SouthWest(ÞÇ) - //SouthEast(ÞÂ) | 292 else if ( direction >= 5.0 && direction < 7.0 )//SouthWest(ÞÇ) - //SouthEast(ÞÂ) |
293 { | 293 { |
294 Start_X = 0, End_X = 127; | 294 Start_X = 0, End_X = 127; |
295 Start_Z = pODMRenderParams->uMapGridCellZ - 1, End_Z = 127; | 295 Start_Z = pODMRenderParams->uMapGridCellZ - 2, End_Z = 127; |
296 } | 296 } |
297 else//SouthEast(ÞÂ) - East(B) | 297 else//SouthEast(ÞÂ) - East(B) |
298 { | 298 { |
299 Start_X = pODMRenderParams->uMapGridCellX, End_X = 127; | 299 Start_X = pODMRenderParams->uMapGridCellX - 2, End_X = 127; |
300 Start_Z = 0, End_Z = 127; | 300 Start_Z = 0, End_Z = 127; |
301 } | 301 } |
302 for (unsigned int z = Start_Z; z < End_Z; ++z) | 302 for (unsigned int z = Start_Z; z < End_Z; ++z) |
303 { | 303 { |
304 for (unsigned int x = Start_X; x < End_X; ++x) | 304 for (unsigned int x = Start_X; x < End_X; ++x) |
387 || (double)pODMRenderParams->shading_dist_mist < array_73D150[1].vWorldViewPosition.x | 387 || (double)pODMRenderParams->shading_dist_mist < array_73D150[1].vWorldViewPosition.x |
388 || (double)pODMRenderParams->shading_dist_mist < array_73D150[2].vWorldViewPosition.x | 388 || (double)pODMRenderParams->shading_dist_mist < array_73D150[2].vWorldViewPosition.x |
389 || (double)pODMRenderParams->shading_dist_mist < array_73D150[3].vWorldViewPosition.x; | 389 || (double)pODMRenderParams->shading_dist_mist < array_73D150[3].vWorldViewPosition.x; |
390 if ( !byte_4D864C || ~pGame->uFlags & 0x80 ) | 390 if ( !byte_4D864C || ~pGame->uFlags & 0x80 ) |
391 { | 391 { |
392 if ( neer_clip ) | 392 //if ( neer_clip ) //Ritor1: Äà¸ò èñêàæåíèÿ íà ïîäú¸ìå, âîçìîæíî òðåáóåòñÿ ô-öèÿ Áåçüå |
393 { | 393 //{ |
394 pTilePolygon->uNumVertices = ODM_NearClip(pTilePolygon->uNumVertices); | 394 // pTilePolygon->uNumVertices = ODM_NearClip(pTilePolygon->uNumVertices); |
395 ODM_Project(pTilePolygon->uNumVertices); | 395 // ODM_Project(pTilePolygon->uNumVertices); |
396 } | 396 //} |
397 if ( far_clip ) | 397 if ( far_clip ) |
398 { | 398 { |
399 pTilePolygon->uNumVertices = ODM_FarClip(pTilePolygon->uNumVertices); | 399 pTilePolygon->uNumVertices = ODM_FarClip(pTilePolygon->uNumVertices); |
400 ODM_Project(pTilePolygon->uNumVertices); | 400 ODM_Project(pTilePolygon->uNumVertices); |
401 } | 401 } |
8595 } | 8595 } |
8596 current_vertices_flag = next_vertices_flag; | 8596 current_vertices_flag = next_vertices_flag; |
8597 } | 8597 } |
8598 return out_num_vertices >= 3 ? out_num_vertices : 0; | 8598 return out_num_vertices >= 3 ? out_num_vertices : 0; |
8599 } | 8599 } |
8600 | |
8600 //----- (00424EE0) -------------------------------------------------------- | 8601 //----- (00424EE0) -------------------------------------------------------- |
8601 int ODM_FarClip(unsigned int uNumVertices) | 8602 int ODM_FarClip(unsigned int uNumVertices) |
8602 { | 8603 { |
8603 bool current_vertices_flag; // [sp+Ch] [bp-28h]@6 | 8604 bool current_vertices_flag; // [sp+Ch] [bp-28h]@6 |
8604 bool next_vertices_flag; // edi@1 | 8605 bool next_vertices_flag; // edi@1 |