MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / render_ghost

Function render_ghost

src/SB/Game/zEntPlayerOOBState.cpp:250–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248 }
249
250 static void render_ghost()
251 {
252 xEnt& ent = globals.player.ent;
253
254 iDrawSetFBMSK(-1);
255 zRenderState(SDRS_OOBPlayerZ);
256
257 xModelInstance* xm = ent.model;
258 while (xm != NULL)
259 {
260 RpAtomic& model = *xm->Data;
261
262 if (xm->Flags & 0x1)
263 {
264 iModelRender(&model, xm->Mat);
265 }
266
267 xm = xm->Next;
268 }
269
270 iDrawSetFBMSK(0);
271 zRenderState(SDRS_OOBPlayerAlpha);
272 xLightKit_Enable(ent.lightKit, globals.currWorld);
273
274 U8 alpha = 255.0f * (1.0f - shared.fade_alpha) + 0.5f;
275 alpha &= 0xFF;
276
277 xm = ent.model;
278 while (xm != NULL)
279 {
280 RpAtomic& model = *xm->Data;
281
282 if (xm->Flags & 0x1)
283 {
284 iModelSetMaterialAlpha(&model, alpha);
285 iModelRender(&model, xm->Mat);
286 iModelResetMaterial(&model);
287 }
288
289 xm = xm->Next;
290 }
291
292 xLightKit_Enable(NULL, globals.currWorld);
293 }
294
295 static void render_hand()
296 {

Callers 1

fx_renderMethod · 0.70

Calls 6

zRenderStateFunction · 0.85
iDrawSetFBMSKFunction · 0.50
iModelRenderFunction · 0.50
xLightKit_EnableFunction · 0.50
iModelSetMaterialAlphaFunction · 0.50
iModelResetMaterialFunction · 0.50

Tested by

no test coverage detected