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

Function render_fade

src/SB/Game/zEntPlayerOOBState.cpp:214–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212 F32 rcz);
213 static void set_rect_vert(rwGameCube2DVertex&, F32 x, F32 y, F32 z, iColor_tag c, F32 rcz);
214 static void render_fade()
215 {
216 iColor_tag color = {};
217 color.a = 255.0f * (1.0f - shared.fade_alpha) + 0.5f;
218
219 zRenderState(SDRS_OOBFade);
220 RwRenderStateSet(rwRENDERSTATETEXTURERASTER, NULL);
221 F32 nsz = 1.0f / ((RwCamera*)RWSRCGLOBAL(curCamera))->farPlane;
222 F32 rcz = RwIm2DGetFarScreenZ();
223
224 RwIm2DVertex vert[4];
225 set_rect_verts((rwGameCube2DVertex*)vert, 0.0f, 0.0f, 640.0f, 480.0f, color, rcz, nsz);
226 RwIm2DRenderPrimitive(rwPRIMTYPETRISTRIP, (RwIm2DVertex*)vert, 4);
227 }
228
229 static void set_rect_verts(rwGameCube2DVertex* verts, F32 x, F32 y, F32 w, F32 h,
230 iColor_tag c, F32 rcz, F32 nsz)

Callers 1

fx_renderMethod · 0.70

Calls 2

zRenderStateFunction · 0.85
set_rect_vertsFunction · 0.70

Tested by

no test coverage detected