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

Function zEnvRender

src/SB/Game/zEnv.cpp:103–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void zEnvRender(xEnv* env)
104{
105 RpWorld* world = env->geom->world;
106 S32 num = RpWorldGetNumMaterials(world);
107
108 for (S32 i = 0; i < num; i++)
109 {
110 xSurface* sp = zSurfaceGetSurface(i);
111 zSurfaceProps* pp = (zSurfaceProps*)sp->moprops;
112
113 if (pp && pp->asset && pp->texanim_flags & 0x1)
114 {
115 RpMaterial* mp = RpWorldGetMaterial(world, i);
116
117 if (mp)
118 {
119 xGroup* g = (xGroup*)pp->texanim[0].group_ptr;
120
121 if (g)
122 {
123 U32 texid = xGroupGetItem(g, pp->texanim[0].group_idx);
124 RwTexture* texptr = (RwTexture*)xSTFindAsset(texid, NULL);
125
126 if (texptr)
127 {
128 RpMaterialSetTexture(mp, texptr);
129 }
130 }
131 }
132 }
133 }
134
135 xEnvRender(env);
136}
137
138void zEnvSave(_zEnv* ent, xSerial* s)
139{

Callers 1

zSceneRenderPreFXFunction · 0.70

Calls 4

xGroupGetItemFunction · 0.85
xEnvRenderFunction · 0.85
zSurfaceGetSurfaceFunction · 0.70
xSTFindAssetFunction · 0.50

Tested by

no test coverage detected