Finds out if we are in a room or outside the mine (-1 if we are outside)
| 631 | |
| 632 | // Finds out if we are in a room or outside the mine (-1 if we are outside) |
| 633 | int FindPointRoom(vector *pnt) { |
| 634 | int i; |
| 635 | |
| 636 | ASSERT(pnt != NULL); |
| 637 | |
| 638 | for (i = 0; i <= Highest_room_index; i++) { |
| 639 | if ((Rooms[i].used) && !(Rooms[i].flags & RF_EXTERNAL)) { |
| 640 | bool f_in_room; |
| 641 | |
| 642 | f_in_room = fvi_QuickRoomCheck(pnt, &Rooms[i]); |
| 643 | |
| 644 | if (f_in_room == true) |
| 645 | return i; |
| 646 | } |
| 647 | } |
| 648 | |
| 649 | return -1; |
| 650 | } |
| 651 | |
| 652 | // Frees a room, deallocating its memory and marking it as unused |
| 653 | void FreeRoom(room *rp) { |
no test coverage detected