Deletes a point from a face Parameters: rp,facenum - the face we're deleting the point from vertindex - the vertex to delete
| 1067 | // Parameters: rp,facenum - the face we're deleting the point from |
| 1068 | // vertindex - the vertex to delete |
| 1069 | void DeletePointFromFace(room *rp, int facenum, int vertindex) { |
| 1070 | face *fp = &rp->faces[facenum]; |
| 1071 | int old_verts[MAX_VERTS_PER_FACE]; |
| 1072 | roomUVL old_uvls[MAX_VERTS_PER_FACE]; |
| 1073 | int t; |
| 1074 | |
| 1075 | // Make copy of old verts |
| 1076 | for (t = 0; t < fp->num_verts; t++) { |
| 1077 | old_verts[t] = fp->face_verts[t]; |
| 1078 | old_uvls[t] = fp->face_uvls[t]; |
| 1079 | } |
| 1080 | |
| 1081 | // Allocate for new verts |
| 1082 | ReInitRoomFace(fp, fp->num_verts - 1); |
| 1083 | |
| 1084 | // Copy old verts |
| 1085 | for (t = 0; t < vertindex; t++) { |
| 1086 | fp->face_verts[t] = old_verts[t]; |
| 1087 | fp->face_uvls[t] = old_uvls[t]; |
| 1088 | } |
| 1089 | for (; t < fp->num_verts; t++) { |
| 1090 | fp->face_verts[t] = old_verts[t + 1]; |
| 1091 | fp->face_uvls[t] = old_uvls[t + 1]; |
| 1092 | } |
| 1093 | |
| 1094 | #ifndef NEWEDITOR |
| 1095 | World_changed = 1; |
| 1096 | #endif |
| 1097 | } |
| 1098 | |
| 1099 | // Takes two faces which are going to be made into a portal and makes them match exactly |
| 1100 | // Alternatively, checks if the two faces can be matched |
no test coverage detected