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

Function PostRender

Descent3/postrender.cpp:233–264  ·  view source on GitHub ↗

Renders all the objects/viseffects/walls we have in our postrender list

Source from the content-addressed store, hash-verified

231
232// Renders all the objects/viseffects/walls we have in our postrender list
233void PostRender(int roomnum) {
234 g3_GetViewPosition(&Viewer_eye);
235 g3_GetUnscaledMatrix(&Viewer_orient);
236
237 Viewer_roomnum = roomnum;
238
239 int i, index;
240 // Sort the objects
241 SortPostrenders();
242 // qsort(Postrender_list,Num_postrenders,sizeof(*Postrender_list),(int (cdecl *)(const void*,const
243 // void*))Postrender_sort_func);
244
245 for (i = Num_postrenders - 1; i >= 0; i--) {
246
247 if (Postrender_list[i].type == PRT_VISEFFECT) {
248 index = Postrender_list[i].visnum;
249 DrawVisEffect(&VisEffects[index]);
250 } else if (Postrender_list[i].type == PRT_OBJECT) {
251 object *objp = &Objects[Postrender_list[i].objnum];
252
253 if (!OBJECT_OUTSIDE(&Objects[Postrender_list[i].objnum]))
254 SetupPostrenderRoom(&Rooms[Objects[Postrender_list[i].objnum].roomnum]);
255 RenderObject(objp);
256 } else {
257 // Do room face
258 DrawPostrenderFace(Postrender_list[i].roomnum, Postrender_list[i].facenum);
259 }
260 }
261 Num_postrenders = 0;
262 rend_SetFogState(0);
263 RenderLightGlows();
264}

Callers 5

RenderMethod · 0.85
TGWRenderMineMethod · 0.85
OnLButtonDownMethod · 0.85
OnRButtonDownMethod · 0.85
GameRenderWorldFunction · 0.85

Calls 9

g3_GetViewPositionFunction · 0.85
g3_GetUnscaledMatrixFunction · 0.85
SortPostrendersFunction · 0.85
DrawVisEffectFunction · 0.85
SetupPostrenderRoomFunction · 0.85
RenderObjectFunction · 0.85
DrawPostrenderFaceFunction · 0.85
RenderLightGlowsFunction · 0.85
rend_SetFogStateFunction · 0.50

Tested by

no test coverage detected