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

Function BNode_GetBNListPtr

Descent3/bnode.cpp:461–483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459}
460
461bn_list *BNode_GetBNListPtr(int roomnum, bool f_in_load_level) {
462 if (roomnum == -1) {
463 return NULL;
464 } else if (roomnum >= 0 && roomnum <= Highest_room_index) {
465 // if(!f_in_load_level)
466 // {
467 // ASSERT(!(Rooms[roomnum].flags & RF_EXTERNAL));
468 // }
469
470 if (!Rooms[roomnum].used) {
471 return NULL;
472 }
473
474 room *rp = &Rooms[roomnum];
475 return &rp->bn_info;
476 } else if (ROOMNUM_OUTSIDE(roomnum)) {
477 return &BNode_terrain_list[TERRAIN_REGION(roomnum)];
478 } else if (roomnum <= Highest_room_index + 8) {
479 return &BNode_terrain_list[roomnum - Highest_room_index - 1];
480 }
481
482 return NULL;
483}
484
485void BNode_ClearBNodeInfo(void) {
486 int i, j;

Callers 15

ResetNodesForComboBoxMethod · 0.85
OnMvtnButtonMethod · 0.85
OnAerButtonMethod · 0.85
EBNode_VerifyGraphFunction · 0.85
EBNode_ClearLevelFunction · 0.85
EBNode_RemoveNodeFunction · 0.85
EBNode_RemoveEdgeFunction · 0.85
EBNode_AddNodeFunction · 0.85
EBNode_InsertNodeOnEdgeFunction · 0.85
EBNode_AutoEdgeNodeFunction · 0.85

Calls 1

TERRAIN_REGIONFunction · 0.85

Tested by

no test coverage detected