MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / FaceIsRenderable

Function FaceIsRenderable

Descent3/render.cpp:214–229  ·  view source on GitHub ↗

UTILITY FUNCS Determines if a face renders Parameters: rp - pointer to room that contains the face fp - pointer to the face in question

Source from the content-addressed store, hash-verified

212// Parameters: rp - pointer to room that contains the face
213// fp - pointer to the face in question
214static 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

Callers 2

RenderRoomSortedFunction · 0.85
RenderRoomUnsortedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected