Changes the number of verts in a face. Frees and reallocates the face_verts & face_uvls arrays. Leaves all other fields the same
| 1336 | // Changes the number of verts in a face. Frees and reallocates the face_verts & face_uvls arrays. |
| 1337 | // Leaves all other fields the same |
| 1338 | void ReInitRoomFace(face *fp, int nverts) { |
| 1339 | ASSERT(nverts != 0); |
| 1340 | |
| 1341 | fp->num_verts = nverts; |
| 1342 | |
| 1343 | mem_free(fp->face_verts); |
| 1344 | mem_free(fp->face_uvls); |
| 1345 | |
| 1346 | fp->face_verts = (int16_t *)mem_malloc(nverts * sizeof(*fp->face_verts)); |
| 1347 | ASSERT(fp->face_verts != NULL); |
| 1348 | fp->face_uvls = (roomUVL *)mem_malloc(nverts * sizeof(*fp->face_uvls)); |
| 1349 | ASSERT(fp->face_uvls != NULL); |
| 1350 | } |
| 1351 | |
| 1352 | // Determines if two points are close enough together to be considered the same |
| 1353 | // Parameters: v0,v1 - the two points |
no outgoing calls
no test coverage detected