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

Function PropagateFromFace

editor/HRoom.cpp:2057–2073  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2055}
2056
2057void PropagateFromFace(room *rp, int facenum, uint8_t *face_flags, bool matching_faces_only) {
2058 face *fp = &rp->faces[facenum];
2059
2060 face_flags[facenum] = 1;
2061
2062 for (int v = 0; v < fp->num_verts; v++) {
2063 int t;
2064
2065 t = FindNeighbor(rp, facenum, v);
2066
2067 if ((t != -1) && !face_flags[t])
2068 if (!matching_faces_only || (rp->faces[t].tmap == fp->tmap)) {
2069 HTexturePropagateToFace(rp, t, rp, facenum);
2070 PropagateFromFace(rp, t, face_flags, matching_faces_only);
2071 }
2072 }
2073}
2074
2075// Propagate a texture from one face to all the faces in the room
2076// If matching_faces_only is set, only propagate if the face has the same texture

Callers 1

PropagateToAllFacesFunction · 0.85

Calls 2

FindNeighborFunction · 0.85
HTexturePropagateToFaceFunction · 0.85

Tested by

no test coverage detected