MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / FindPointRoom

Function FindPointRoom

Descent3/room.cpp:633–650  ·  view source on GitHub ↗

Finds out if we are in a room or outside the mine (-1 if we are outside)

Source from the content-addressed store, hash-verified

631
632// Finds out if we are in a room or outside the mine (-1 if we are outside)
633int 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
653void FreeRoom(room *rp) {

Callers 4

ResetObjectsIntoMineFunction · 0.85
SetViewerFromRoomFaceFunction · 0.85
DoRadiosityForRoomsFunction · 0.85
SlewFrameFunction · 0.85

Calls 1

fvi_QuickRoomCheckFunction · 0.85

Tested by

no test coverage detected