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

Function FindNeighbor

editor/HRoom.cpp:2042–2055  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2040}
2041
2042int FindNeighbor(room *rp, int facenum, int edgenum) {
2043 face *fp = &rp->faces[facenum];
2044 int v0, v1, f, v;
2045
2046 v0 = fp->face_verts[edgenum];
2047 v1 = fp->face_verts[(edgenum + 1) % fp->num_verts];
2048
2049 for (f = 0, fp = rp->faces; f < rp->num_faces; f++, fp++)
2050 for (v = 0; v < fp->num_verts; v++)
2051 if ((fp->face_verts[v] == v1) && (fp->face_verts[(v + 1) % fp->num_verts] == v0))
2052 return f;
2053
2054 return -1;
2055}
2056
2057void PropagateFromFace(room *rp, int facenum, uint8_t *face_flags, bool matching_faces_only) {
2058 face *fp = &rp->faces[facenum];

Callers 1

PropagateFromFaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected