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

Function VALIDATE_ROOM_PORTAL

Descent3/multisafe.cpp:706–713  ·  view source on GitHub ↗

Returns true if the specified room & portal are valid

Source from the content-addressed store, hash-verified

704}
705// Returns true if the specified room & portal are valid
706bool VALIDATE_ROOM_PORTAL(int roomnum, int portalnum) {
707
708 bool valid = ((roomnum >= 0) && (roomnum <= Highest_room_index) && (Rooms[roomnum].used) && (portalnum >= 0) &&
709 (portalnum < Rooms[roomnum].num_portals));
710 if (!valid)
711 Int3();
712 return valid;
713}
714// Returns an object pointer from a handle. Really just ObjGet() with an mprintf()
715object *VALIDATE_OBJECT(int handle) {
716 object *objp = ObjGet(handle);

Callers 2

msafe_GetValueFunction · 0.85
msafe_CallFunctionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected