Draw a room rotated and placed in space
| 328 | |
| 329 | // Draw a room rotated and placed in space |
| 330 | static void DrawPlacedRoomFace(room *rp, vector *rotpoint, matrix *rotmat, vector *placepoint, int facenum, int color) { |
| 331 | face *fp = &rp->faces[facenum]; |
| 332 | |
| 333 | g3Point p0, p1; |
| 334 | uint8_t c0, c1; |
| 335 | int v; |
| 336 | for (v = 0; v < fp->num_verts; v++) { |
| 337 | vector tv; |
| 338 | |
| 339 | tv = (rp->verts[fp->face_verts[v]] - *rotpoint) * *rotmat + *placepoint; |
| 340 | c0 = g3_RotatePoint(&p0, &tv); |
| 341 | |
| 342 | tv = (rp->verts[fp->face_verts[(v + 1) % fp->num_verts]] - *rotpoint) * *rotmat + *placepoint; |
| 343 | c1 = g3_RotatePoint(&p1, &tv); |
| 344 | |
| 345 | if (!(c0 & c1)) // both not off screen? |
| 346 | g3_DrawLine(color, &p0, &p1); |
| 347 | } |
| 348 | } |
| 349 | #endif // ifdef EDITOR |
| 350 | |
| 351 | struct clip_wnd { |
no test coverage detected