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

Function SetupShadow

src/SB/Core/x/xShadow.cpp:59–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57 shadow_ent_count = 0;
58 ShadowLight = RpLightCreate(1);
59 RpLightSetColor(ShadowLight, &ShadowLightColor);
60 RwFrame* frame = RwFrameCreate();
61 _rwObjectHasFrameSetFrame(ShadowLight, frame);
62}
63
64void xShadowRender(xVec3* a, F32 b, F32 c)
65{
66 xShadowRenderWorld(a, b, c);
67}
68
69static S32 SetupShadow()
70{
71 S32 res = 256;
72
73 // Continuously halve res until it is less than or
74 // equal to either display width or height.
75 // On GCN, this routine normally won't happen,
76 // as we're already below both dimensions.
77 for (; (res > 640) || (res > 480); res >>= 1);
78
79 ShadowCamera = ShadowCameraCreatePersp(res);
80 if (ShadowCamera == NULL)
81 {
82 return 0;
83 }
84 ShadowCameraRaster = ShadowRasterCreate(res);

Callers 1

xShadowCameraCreateFunction · 0.70

Calls 2

ShadowCameraCreatePerspFunction · 0.85
ShadowRasterCreateFunction · 0.85

Tested by

no test coverage detected