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

Function DrawRoomFace

editor/drawworld.cpp:670–688  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

668}
669
670void DrawRoomFace(ddgr_color color, room *rp, int facenum) {
671 face *fp = &rp->faces[facenum];
672 g3Codes cc;
673 int i;
674
675 // Rotate the points in this face
676 cc.cc_and = 0xff;
677 cc.cc_or = 0;
678 for (i = 0; i < fp->num_verts; i++) {
679 int vertnum = fp->face_verts[i];
680 g3_RotatePoint((g3Point *)&World_point_buffer[vertnum], &rp->verts[vertnum]);
681 cc.cc_and &= World_point_buffer[vertnum].p3_codes;
682 cc.cc_or |= World_point_buffer[vertnum].p3_codes;
683 }
684
685 if (!cc.cc_and) // if not all off screen
686 for (i = 0; i < fp->num_verts; i++)
687 DrawLine(color, fp->face_verts[i], fp->face_verts[(i + 1) % fp->num_verts]);
688}
689
690void DrawFaceEdge(ddgr_color color, room *rp, int facenum, int edgenum) {
691 face *fp = &rp->faces[facenum];

Callers 1

DrawWorldFunction · 0.85

Calls 2

g3_RotatePointFunction · 0.85
DrawLineFunction · 0.85

Tested by

no test coverage detected