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

Function DrawVertBox

editor/drawworld.cpp:764–776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

762#define CROSS_HEIGHT 8.0
763
764void DrawVertBox(vector *v, ddgr_color color) {
765 // Draw a box at the marked vert
766 g3Point p0;
767 uint8_t c0 = g3_RotatePoint(&p0, v);
768 if (!c0) { // on screen?
769 g3_ProjectPoint(&p0);
770 rend_SetFlatColor(color);
771 rend_DrawLine(p0.p3_sx - CROSS_WIDTH, p0.p3_sy, p0.p3_sx, p0.p3_sy - CROSS_HEIGHT);
772 rend_DrawLine(p0.p3_sx, p0.p3_sy - CROSS_HEIGHT, p0.p3_sx + CROSS_WIDTH, p0.p3_sy);
773 rend_DrawLine(p0.p3_sx + CROSS_WIDTH, p0.p3_sy, p0.p3_sx, p0.p3_sy + CROSS_HEIGHT);
774 rend_DrawLine(p0.p3_sx, p0.p3_sy + CROSS_HEIGHT, p0.p3_sx - CROSS_WIDTH, p0.p3_sy);
775 }
776}
777
778void DrawWorld(grViewport *vp, vector *view_target, matrix *view_orient, float view_dist, int start_room, float rad) {
779 vector viewer_position;

Callers 1

DrawWorldFunction · 0.85

Calls 4

g3_RotatePointFunction · 0.85
g3_ProjectPointFunction · 0.85
rend_SetFlatColorFunction · 0.50
rend_DrawLineFunction · 0.50

Tested by

no test coverage detected