Mercurial > mm7
comparison Vis.cpp @ 2335:6e3ca612f132
int -> uint
author | Ritor1 |
---|---|
date | Wed, 02 Apr 2014 22:05:35 +0600 |
parents | ddb803517a48 |
children | 48dbf99c0f7f e07e297f292d |
comparison
equal
deleted
inserted
replaced
2334:ddb803517a48 | 2335:6e3ca612f132 |
---|---|
132 RenderBillboardD3D* billboard = &pRenderer->pBillboardRenderListD3D[i]; | 132 RenderBillboardD3D* billboard = &pRenderer->pBillboardRenderListD3D[i]; |
133 if (IsPointInsideD3DBillboard(billboard, x, y)) | 133 if (IsPointInsideD3DBillboard(billboard, x, y)) |
134 { | 134 { |
135 if (v13 == -1) | 135 if (v13 == -1) |
136 v13 = i; | 136 v13 = i; |
137 else if ((unsigned int)pBillboardRenderList[billboard->sParentBillboardID].sZValue < | 137 else if (pBillboardRenderList[billboard->sParentBillboardID].sZValue < |
138 pBillboardRenderList[pRenderer->pBillboardRenderListD3D[v13].sParentBillboardID].sZValue) | 138 pBillboardRenderList[pRenderer->pBillboardRenderListD3D[v13].sParentBillboardID].sZValue) |
139 v13 = i; | 139 v13 = i; |
140 } | 140 } |
141 } | 141 } |
142 | 142 |
150 float min_y = FLT_MAX; | 150 float min_y = FLT_MAX; |
151 //a3a = -3.4028235e38; | 151 //a3a = -3.4028235e38; |
152 float max_x = -FLT_MAX; | 152 float max_x = -FLT_MAX; |
153 //thisb = -3.4028235e38; | 153 //thisb = -3.4028235e38; |
154 float max_y = -FLT_MAX; | 154 float max_y = -FLT_MAX; |
155 for (uint i = 0; i < num_vertices; ++i) | 155 for (int i = 0; i < num_vertices; ++i) |
156 { | 156 { |
157 //v9 = a1; | 157 //v9 = a1; |
158 //do | 158 //do |
159 //{ | 159 //{ |
160 RenderVertexSoft* v = &vertices[i]; | 160 RenderVertexSoft* v = &vertices[i]; |
364 void Vis::PickOutdoorFaces_Mouse(float fDepth, RenderVertexSoft *pRay, Vis_SelectionList *list, Vis_SelectionFilter *filter, bool only_reachable) | 364 void Vis::PickOutdoorFaces_Mouse(float fDepth, RenderVertexSoft *pRay, Vis_SelectionList *list, Vis_SelectionFilter *filter, bool only_reachable) |
365 { | 365 { |
366 if (!pOutdoor) | 366 if (!pOutdoor) |
367 return; | 367 return; |
368 | 368 |
369 for (uint i = 0; i < pOutdoor->uNumBModels; ++i) | 369 for (int i = 0; i < pOutdoor->uNumBModels; ++i) |
370 { | 370 { |
371 int reachable; | 371 int reachable; |
372 if (!IsBModelVisible(i, &reachable)) | 372 if (!IsBModelVisible(i, &reachable)) |
373 continue; | 373 continue; |
374 if (!reachable && only_reachable) | 374 if (!reachable && only_reachable) |
375 continue; | 375 continue; |
376 | 376 |
377 BSPModel* bmodel = &pOutdoor->pBModels[i]; | 377 BSPModel* bmodel = &pOutdoor->pBModels[i]; |
378 for (uint j = 0; j < bmodel->uNumFaces; ++j) | 378 for (int j = 0; j < bmodel->uNumFaces; ++j) |
379 { | 379 { |
380 ODMFace* face = &bmodel->pFaces[j]; | 380 ODMFace* face = &bmodel->pFaces[j]; |
381 if (is_part_of_selection(face, filter)) | 381 if (is_part_of_selection(face, filter)) |
382 { | 382 { |
383 BLVFace blv_face; | 383 BLVFace blv_face; |
612 intersect_face_vertex_coords_list_a[v5] = intersect_face_vertex_coords_list_a[0]; | 612 intersect_face_vertex_coords_list_a[v5] = intersect_face_vertex_coords_list_a[0]; |
613 intersect_face_vertex_coords_list_b[v5] = intersect_face_vertex_coords_list_b[0]; | 613 intersect_face_vertex_coords_list_b[v5] = intersect_face_vertex_coords_list_b[0]; |
614 v6 = intersect_face_vertex_coords_list_b[0] >= b; | 614 v6 = intersect_face_vertex_coords_list_b[0] >= b; |
615 if (v5 <= 0) | 615 if (v5 <= 0) |
616 return false; | 616 return false; |
617 for ( uint i = 0; i < v5; ++i ) | 617 for ( int i = 0; i < v5; ++i ) |
618 { | 618 { |
619 if ( v16 >= 2 ) | 619 if ( v16 >= 2 ) |
620 break; | 620 break; |
621 if ( v6 ^ (intersect_face_vertex_coords_list_b[i + 1] >= b) ) | 621 if ( v6 ^ (intersect_face_vertex_coords_list_b[i + 1] >= b) ) |
622 { | 622 { |
1265 } | 1265 } |
1266 | 1266 |
1267 //----- (004C06F8) -------------------------------------------------------- | 1267 //----- (004C06F8) -------------------------------------------------------- |
1268 void Vis::PickBillboards_Keyboard(float pick_depth, Vis_SelectionList *list, Vis_SelectionFilter *filter) | 1268 void Vis::PickBillboards_Keyboard(float pick_depth, Vis_SelectionList *list, Vis_SelectionFilter *filter) |
1269 { | 1269 { |
1270 for (int i = 0; i < pRenderer->uNumBillboardsToDraw; ++i) | 1270 for (uint i = 0; i < pRenderer->uNumBillboardsToDraw; ++i) |
1271 { | 1271 { |
1272 RenderBillboardD3D* d3d_billboard = &pRenderer->pBillboardRenderListD3D[i]; | 1272 RenderBillboardD3D* d3d_billboard = &pRenderer->pBillboardRenderListD3D[i]; |
1273 | 1273 |
1274 if (is_part_of_selection((void *)i, filter)) | 1274 if (is_part_of_selection((void *)i, filter)) |
1275 { | 1275 { |
1570 } | 1570 } |
1571 | 1571 |
1572 //----- (004C0DEA) -------------------------------------------------------- | 1572 //----- (004C0DEA) -------------------------------------------------------- |
1573 void Vis::PickOutdoorFaces_Keyboard(float pick_depth, Vis_SelectionList *list, Vis_SelectionFilter *filter) | 1573 void Vis::PickOutdoorFaces_Keyboard(float pick_depth, Vis_SelectionList *list, Vis_SelectionFilter *filter) |
1574 { | 1574 { |
1575 for (uint i = 0; i < pOutdoor->uNumBModels; ++i) | 1575 for (int i = 0; i < pOutdoor->uNumBModels; ++i) |
1576 { | 1576 { |
1577 int v17; | 1577 int v17; |
1578 if (!IsBModelVisible(i, &v17)) | 1578 if (!IsBModelVisible(i, &v17)) |
1579 continue; | 1579 continue; |
1580 if (!v17) | 1580 if (!v17) |
1581 continue; | 1581 continue; |
1582 | 1582 |
1583 BSPModel* bmodel = &pOutdoor->pBModels[i]; | 1583 BSPModel* bmodel = &pOutdoor->pBModels[i]; |
1584 for (uint j = 0; j < bmodel->uNumFaces; ++j) | 1584 for (int j = 0; j < bmodel->uNumFaces; ++j) |
1585 { | 1585 { |
1586 //ODMFace* face = &bmodel->pFaces[j]; | 1586 //ODMFace* face = &bmodel->pFaces[j]; |
1587 | 1587 |
1588 if (is_part_of_selection(&bmodel->pFaces[j], filter) ) | 1588 if (is_part_of_selection(&bmodel->pFaces[j], filter) ) |
1589 { | 1589 { |