Returns true if the object is outside of our terrain portal
| 956 | } |
| 957 | // Returns true if the object is outside of our terrain portal |
| 958 | int ObjectOutOfPortal(object *obj) { |
| 959 | g3Point pnt1, pnt2; |
| 960 | uint8_t anded = 0xff; |
| 961 | g3_RotatePoint(&pnt1, &obj->min_xyz); |
| 962 | if (pnt1.p3_codes & CC_BEHIND) |
| 963 | return 0; |
| 964 | g3_ProjectPoint(&pnt1); |
| 965 | anded &= CodeTerrainPoint(&pnt1); |
| 966 | g3_RotatePoint(&pnt2, &obj->max_xyz); |
| 967 | if (pnt2.p3_codes & CC_BEHIND) |
| 968 | return 0; |
| 969 | g3_ProjectPoint(&pnt2); |
| 970 | anded &= CodeTerrainPoint(&pnt2); |
| 971 | if (anded) |
| 972 | return 1; |
| 973 | return 0; |
| 974 | } |
| 975 | obj_sort_item objs_to_render[MAX_OBJECTS + MAX_VIS_EFFECTS]; |
| 976 | obj_sort_item rooms_to_render[MAX_ROOMS]; |
| 977 | // Checks to see if this object can even be seen from our current viewpoint |
no test coverage detected