UTILITY FUNCS Determines if a face renders Parameters: rp - pointer to room that contains the face fp - pointer to the face in question
| 212 | // Parameters: rp - pointer to room that contains the face |
| 213 | // fp - pointer to the face in question |
| 214 | static inline bool FaceIsRenderable(room *rp, face *fp) { |
| 215 | // Check for a floating trigger, which doesn't get rendered |
| 216 | if ((fp->flags & FF_FLOATING_TRIG) && (!In_editor_mode || !Render_floating_triggers)) |
| 217 | return 0; |
| 218 | // Check for face that's part of a portal |
| 219 | if (fp->portal_num != -1) { |
| 220 | if (rp->portals[fp->portal_num].flags & PF_RENDER_FACES) |
| 221 | return 1; |
| 222 | if (rp->flags & RF_FOG && !In_editor_mode) |
| 223 | return 1; |
| 224 | return 0; |
| 225 | } |
| 226 | |
| 227 | // Nothing special, so face renders |
| 228 | return 1; |
| 229 | } |
| 230 | // Flags for GetFaceAlpha() |
| 231 | #define FA_CONSTANT 1 // face has a constant alpha for the whole face |
| 232 | #define FA_VERTEX 2 // face has different alpha per vertex |
no outgoing calls
no test coverage detected