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

Function xShadowSimple_Init

src/SB/Core/x/xShadowSimple.cpp:85–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void xShadowSimple_Init()
86{
87 memset(sCollQueue, 0, sizeof(sCollQueue));
88
89 RwTexture* tex = (RwTexture*)xSTFindAsset(xStrHash(""), NULL);
90
91 sShadRaster = (tex) ? tex->raster : NULL;
92
93 memset(sShadVert, 0, sizeof(sShadVert));
94
95 for (u32 i = 0; i < 64; i++)
96 {
97 sShadVert[i*6+1].u = 1.0f;
98 sShadVert[i*6+2].v = 1.0f;
99 sShadVert[i*6+3].u = 1.0f;
100 sShadVert[i*6+4].v = 1.0f;
101 sShadVert[i*6+5].u = 1.0f;
102 sShadVert[i*6+5].v = 1.0f;
103 sShadVert[i*6+0].nx = 0.0f;
104 sShadVert[i*6+0].ny = 1.0f;
105 sShadVert[i*6+0].nz = 0.0f;
106 sShadVert[i*6+1].nx = 0.0f;
107 sShadVert[i*6+1].ny = 1.0f;
108 sShadVert[i*6+1].nz = 0.0f;
109 sShadVert[i*6+2].nx = 0.0f;
110 sShadVert[i*6+2].ny = 1.0f;
111 sShadVert[i*6+2].nz = 0.0f;
112 sShadVert[i*6+3].nx = 0.0f;
113 sShadVert[i*6+3].ny = 1.0f;
114 sShadVert[i*6+3].nz = 0.0f;
115 sShadVert[i*6+4].nx = 0.0f;
116 sShadVert[i*6+4].ny = 1.0f;
117 sShadVert[i*6+4].nz = 0.0f;
118 sShadVert[i*6+5].nx = 0.0f;
119 sShadVert[i*6+5].ny = 1.0f;
120 sShadVert[i*6+5].nz = 0.0f;
121 }
122}
123
124RpCollisionTriangle* shadowRayCB(RpIntersection*, RpWorldSector*, RpCollisionTriangle* tri,
125 F32 dist, void* data)

Callers 1

zMainLoopFunction · 0.50

Calls 3

memsetFunction · 0.85
xSTFindAssetFunction · 0.70
xStrHashFunction · 0.70

Tested by

no test coverage detected