| 2055 | } |
| 2056 | |
| 2057 | void 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 |
no test coverage detected