| 314 | } |
| 315 | |
| 316 | boolean |
| 317 | is_exclusion_zone(xint16 type, coordxy x, coordxy y) |
| 318 | { |
| 319 | struct exclusion_zone *ez = sve.exclusion_zones; |
| 320 | |
| 321 | while (ez) { |
| 322 | if (((type == LR_DOWNTELE |
| 323 | && (ez->zonetype == LR_DOWNTELE || ez->zonetype == LR_TELE)) |
| 324 | || (type == LR_UPTELE |
| 325 | && (ez->zonetype == LR_UPTELE || ez->zonetype == LR_TELE)) |
| 326 | || type == ez->zonetype) |
| 327 | && within_bounded_area(x, y, ez->lx, ez->ly, ez->hx, ez->hy)) |
| 328 | return TRUE; |
| 329 | ez = ez->next; |
| 330 | } |
| 331 | return FALSE; |
| 332 | } |
| 333 | |
| 334 | /* |
| 335 | * Bad if: |
no outgoing calls
no test coverage detected