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

Function BOA_IsVisible

Descent3/BOA.cpp:525–560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

523 return ((BOA_Array[s_index][e_index] & BOAF_BLOCKAGE) != 0);
524}
525bool BOA_IsVisible(int start_room, int end_room) {
526 int s_index = start_room;
527 int e_index = end_room;
528
529 if (!BOA_vis_valid)
530 return true;
531
532 if (start_room == end_room)
533 return true;
534
535 if (start_room == -1 || end_room == -1) {
536 return false;
537 }
538
539 if ((!ROOMNUM_OUTSIDE(s_index)) && s_index <= Highest_room_index) {
540 if (!Rooms[s_index].used) {
541 return false;
542 }
543 } else if (ROOMNUM_OUTSIDE(s_index)) {
544 s_index = TERRAIN_REGION(start_room) + Highest_room_index + 1;
545 } else {
546 ASSERT(s_index <= Highest_room_index + MAX_BOA_TERRAIN_REGIONS);
547 }
548
549 if ((!ROOMNUM_OUTSIDE(e_index)) && e_index <= Highest_room_index) {
550 if (!Rooms[e_index].used) {
551 return false;
552 }
553 } else if (ROOMNUM_OUTSIDE(e_index)) {
554 e_index = TERRAIN_REGION(end_room) + Highest_room_index + 1;
555 } else {
556 ASSERT(e_index <= Highest_room_index + MAX_BOA_TERRAIN_REGIONS);
557 }
558
559 return ((BOA_Array[s_index][e_index] & BOAF_VIS) != 0);
560}
561
562int BOA_GetNextRoom(int start_room, int end_room) {
563 int s_index = start_room;

Callers 12

OnLButtonDownMethod · 0.85
ShootRayFromPointFunction · 0.85
ProcessTestKeysFunction · 0.85
DoConcussiveForceFunction · 0.85
AINotifyFunction · 0.85
AICheckTargetVisFunction · 0.85
AITargetCheckFunction · 0.85
HomingAquireTargetFunction · 0.85
FindSpawnHomingTargetFunction · 0.85

Calls 1

TERRAIN_REGIONFunction · 0.85

Tested by

no test coverage detected