* Use vision tables to determine if there is a clear path from * (col1,row1) to (col2,row2). This is used by: * m_cansee() * m_canseeu() * do_light_sources() */
| 1610 | * do_light_sources() |
| 1611 | */ |
| 1612 | boolean |
| 1613 | clear_path(int col1, int row1, int col2, int row2) |
| 1614 | { |
| 1615 | int result; |
| 1616 | |
| 1617 | if (col1 < col2) { |
| 1618 | if (row1 > row2) { |
| 1619 | q1_path(row1, col1, row2, col2, cleardone); |
| 1620 | } else { |
| 1621 | q4_path(row1, col1, row2, col2, cleardone); |
| 1622 | } |
| 1623 | } else { |
| 1624 | if (row1 > row2) { |
| 1625 | q2_path(row1, col1, row2, col2, cleardone); |
| 1626 | } else if (row1 == row2 && col1 == col2) { |
| 1627 | result = 1; |
| 1628 | } else { |
| 1629 | q3_path(row1, col1, row2, col2, cleardone); |
| 1630 | } |
| 1631 | } |
| 1632 | #ifdef MACRO_CPATH |
| 1633 | cleardone: |
| 1634 | #endif |
| 1635 | return (boolean) result; |
| 1636 | } |
| 1637 | |
| 1638 | /*==========================================================================*\ |
| 1639 | GENERAL LINE OF SIGHT |
no outgoing calls
no test coverage detected