| 2649 | void CheckError(const char *str, ...); |
| 2650 | uint32_t check_point_to_face(vector *colp, vector *face_normal, int nv, vector **vertex_ptr_list); |
| 2651 | |
| 2652 | void LookForFVICracks() { |
| 2653 | int r, f, v, edgemask, count = 0; |
| 2654 | room *rp; |
| 2655 | face *fp; |
| 2656 | |
| 2657 | error_buf_offset = 0; |
| 2658 | |
| 2659 | for (r = 0, rp = Rooms; r <= Highest_room_index; r++, rp++) { |
| 2660 | if (rp->used) { |
| 2661 | for (f = 0, fp = rp->faces; f < rp->num_faces; f++, fp++) { |
| 2662 | vector *vertex_ptr_list[MAX_VERTS_PER_FACE]; |
| 2663 | for (v = 0; v < fp->num_verts; v++) |
| 2664 | vertex_ptr_list[v] = &rp->verts[fp->face_verts[v]]; |
| 2665 | for (v = 0; v < fp->num_verts; v++) { |
| 2666 | edgemask = check_point_to_face(vertex_ptr_list[v], &fp->normal, fp->num_verts, vertex_ptr_list); |
| 2667 | if (edgemask) { |
| 2668 | CheckError("Vert %d is outside of %d:%d\n", v, r, f); |
| 2669 | count++; |
| 2670 | } |
| 2671 | } |
| 2672 | } |
| 2673 | } |
| 2674 | } |
| 2675 | |
| 2676 | DumpTextToClipboard(error_buf); |
| 2677 | |
| 2678 | OutrageMessageBox("Found %d FVI face cracks.", count); |
| 2679 | } |
| 2680 | |
| 2681 | void MoveEntireMine() { |
nothing calls this directly
no test coverage detected