MCPcopy Index your code
hub / github.com/assaultcube/AC / box

Function box

source/src/rendergl.cpp:227–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225VARP(oldselstyle, 0, 1, 1); // Make the old (1004) grid/selection style default (render as quads rather than tris)
226
227void box(block &b, float z1, float z2, float z3, float z4)
228{
229 glBegin((oldselstyle ? GL_QUADS : GL_TRIANGLE_STRIP));
230 glVertex3f((float)b.x, (float)b.y, z1);
231 glVertex3f((float)b.x+b.xs, (float)b.y, z2);
232 glVertex3f((float)(oldselstyle ? b.x+b.xs : b.x), (float)b.y+b.ys, (oldselstyle ? z3 : z4));
233 glVertex3f((float)(oldselstyle ? b.x : b.x+b.xs), (float)b.y+b.ys, (oldselstyle ? z4 : z3));
234 glEnd();
235 xtraverts += 4;
236}
237
238void box2d(int x1, int y1, int x2, int y2, int gray)
239{

Callers 1

cursorupdateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected