| 1502 | } |
| 1503 | |
| 1504 | uint8_t CodeRadPoint(rad_point *rp) { |
| 1505 | uint8_t code = 0; |
| 1506 | if (rp->pos.x < rad_ClipLeft->x) |
| 1507 | code |= CC_OFF_LEFT; |
| 1508 | if (rp->pos.x > rad_ClipRight->x) |
| 1509 | code |= CC_OFF_RIGHT; |
| 1510 | if (rp->pos.y < rad_ClipBottom->y) |
| 1511 | code |= CC_OFF_BOT; |
| 1512 | if (rp->pos.y > rad_ClipTop->y) |
| 1513 | code |= CC_OFF_TOP; |
| 1514 | rp->code = code; |
| 1515 | |
| 1516 | return code; |
| 1517 | } |
| 1518 | |
| 1519 | void ClipSurfaceElement(vector *surf_verts, rad_element *ep, vector *clip_verts, int nv) { |
| 1520 | rad_point src_verts[50]; |
no outgoing calls
no test coverage detected