| 524 | } |
| 525 | |
| 526 | bool GetVisibleArea(const float aaGameArea[2][2], const CMapObject &Ob, float aaVisibleArea[2][2]) |
| 527 | { |
| 528 | if(IsInexistent((float *)Ob.m_aaExtendedArea, 4)) |
| 529 | return false; |
| 530 | |
| 531 | if(aaVisibleArea) |
| 532 | SetInexistent((float *)aaVisibleArea, 4); |
| 533 | |
| 534 | float aaInspectedArea[2][2]; |
| 535 | mem_copy(aaInspectedArea, aaGameArea, sizeof(float[2][2])); |
| 536 | |
| 537 | for(int i = 0; i < 2; i++) |
| 538 | { |
| 539 | if(Ob.m_aSpeed[i] == 1) |
| 540 | { |
| 541 | mem_copy(aaInspectedArea[i], Ob.m_aaExtendedArea[i], sizeof(float[2])); |
| 542 | continue; |
| 543 | } |
| 544 | |
| 545 | if(Ob.m_UseClipping && !GetLineIntersection(aaInspectedArea[i], Ob.m_aaClipArea[i], aaInspectedArea[i])) |
| 546 | return false; |
| 547 | |
| 548 | if(!GetLineIntersection(aaInspectedArea[i], Ob.m_aaExtendedArea[i], aaInspectedArea[i])) |
| 549 | return false; |
| 550 | } |
| 551 | |
| 552 | if(aaVisibleArea) |
| 553 | mem_copy(aaVisibleArea, aaInspectedArea, sizeof(float[2][2])); |
| 554 | |
| 555 | return true; |
| 556 | } |
| 557 | |
| 558 | bool GetReplaceableArea(const float aaVisibleArea[2][2], const CMapObject &Ob, float aaReplaceableArea[2][2]) |
| 559 | { |
no test coverage detected