| 560 | } |
| 561 | |
| 562 | int BOA_GetNextRoom(int start_room, int end_room) { |
| 563 | int s_index = start_room; |
| 564 | int e_index = end_room; |
| 565 | |
| 566 | if (start_room == -1 || end_room == -1) { |
| 567 | return false; |
| 568 | } |
| 569 | |
| 570 | if ((!ROOMNUM_OUTSIDE(s_index)) && s_index <= Highest_room_index) { |
| 571 | if (!Rooms[s_index].used) { |
| 572 | return false; |
| 573 | } |
| 574 | } else if (ROOMNUM_OUTSIDE(s_index)) { |
| 575 | s_index = TERRAIN_REGION(start_room) + Highest_room_index + 1; |
| 576 | } else { |
| 577 | ASSERT(s_index <= Highest_room_index + MAX_BOA_TERRAIN_REGIONS); |
| 578 | } |
| 579 | |
| 580 | if ((!ROOMNUM_OUTSIDE(e_index)) && e_index <= Highest_room_index) { |
| 581 | if (!Rooms[e_index].used) { |
| 582 | return false; |
| 583 | } |
| 584 | } else if (ROOMNUM_OUTSIDE(e_index)) { |
| 585 | e_index = TERRAIN_REGION(end_room) + Highest_room_index + 1; |
| 586 | } else { |
| 587 | ASSERT(e_index <= Highest_room_index + MAX_BOA_TERRAIN_REGIONS); |
| 588 | } |
| 589 | |
| 590 | return ((BOA_Array[s_index][e_index] & BOA_ROOM_MASK)); |
| 591 | } |
| 592 | |
| 593 | void add_mine_room(int room, int mine, char *checked) { |
| 594 | int i; |
no test coverage detected