| 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() |
nothing calls this directly
no test coverage detected