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

Method update

src/SB/Game/zNPCTypePrawn.cpp:249–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247 }
248
249 void television::update(xModelInstance& model_inst, xLightKit* light_kit)
250 {
251 RwCamera* globalCamera = (RwCamera*)(RwEngineInstance->curCamera);
252 if (globalCamera != NULL)
253 {
254 RwCameraEndUpdate(globalCamera);
255 RwGameCubeCameraTextureFlush(globalCamera->frameBuffer, 0);
256 }
257 if (this->bgraster == NULL)
258 {
259 RwCameraClear(this->cam, &this->bgcolor, rwCAMERACLEARIMAGE | rwCAMERACLEARZ);
260 }
261 else
262 {
263 RwCameraClear(this->cam, &this->bgcolor, rwCAMERACLEARZ);
264 }
265 RwCameraBeginUpdate(this->cam);
266 if (this->bgraster != NULL)
267 {
268 render_background();
269 }
270 zRenderState(SDRS_Default);
271
272 if (light_kit != NULL)
273 {
274 xLightKit_Enable(light_kit, this->world);
275 }
276 xModelInstance* currentInstance = &model_inst;
277
278 while (currentInstance != NULL)
279 {
280 if (currentInstance->Flags & 1)
281 {
282 iModelRender(currentInstance->Data, currentInstance->Mat);
283 }
284 currentInstance = currentInstance->Next;
285 }
286 if (light_kit != NULL)
287 {
288 // Doesn't use light_kit, but does a nullcheck?
289 xLightKit_Enable(NULL, this->world);
290 }
291 render_static();
292 RwCameraEndUpdate(this->cam);
293 RwGameCubeCameraTextureFlush(this->cam->frameBuffer, 0);
294 if (globalCamera != NULL)
295 {
296 RwCameraBeginUpdate(globalCamera);
297 }
298 }
299
300
301 void television::render_static()

Callers

nothing calls this directly

Calls 5

render_backgroundFunction · 0.85
zRenderStateFunction · 0.85
xLightKit_EnableFunction · 0.50
iModelRenderFunction · 0.50
update_ringsFunction · 0.50

Tested by

no test coverage detected