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

Function EBNode_Draw

editor/ebnode.cpp:1363–1399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1361}
1362
1363void EBNode_Draw(char draw_type, grViewport *vp, vector *viewer_eye, matrix *viewer_orient, float zoom) {
1364 int i;
1365
1366#ifndef NEWEDITOR
1367 int roomnum = Viewer_object->roomnum;
1368#else
1369 int roomnum = ROOMNUM(theApp.m_pLevelWnd->m_Prim.roomp);
1370#endif
1371
1372 switch (draw_type) {
1373 case EBDRAW_NONE:
1374 break;
1375 case EBDRAW_ROOM_AND_NEXT_ROOMS: {
1376 int i;
1377 int next_rooms[1000];
1378 int num_next_rooms = AIMakeNextRoomList(roomnum, next_rooms, 1000);
1379
1380 for (i = 0; i < num_next_rooms; i++) {
1381 EBNode_DrawRoom(next_rooms[i], vp, viewer_eye, viewer_orient, zoom, false);
1382 }
1383 }
1384 case EBDRAW_ROOM:
1385 EBNode_DrawRoom(roomnum, vp, viewer_eye, viewer_orient, zoom, true);
1386 break;
1387 case EBDRAW_LEVEL:
1388 for (i = 0; i <= Highest_room_index; i++) {
1389 if (Rooms[i].used && !(Rooms[i].flags & RF_EXTERNAL)) {
1390 EBNode_DrawRoom(i, vp, viewer_eye, viewer_orient, zoom, i == roomnum);
1391 }
1392 }
1393 for (i = 0; i < BOA_num_terrain_regions; i++) {
1394 EBNode_DrawRoom(Highest_room_index + i + 1, vp, viewer_eye, viewer_orient, zoom,
1395 ROOMNUM_OUTSIDE(roomnum) && (i == TERRAIN_REGION(roomnum)));
1396 }
1397 break;
1398 }
1399}

Callers 1

RenderMethod · 0.85

Calls 3

AIMakeNextRoomListFunction · 0.85
EBNode_DrawRoomFunction · 0.85
TERRAIN_REGIONFunction · 0.85

Tested by

no test coverage detected