| 389 | } |
| 390 | |
| 391 | void zCutsceneMgrUpdate(xBase* to, xScene* sc, F32 dt) |
| 392 | { |
| 393 | zCutsceneMgr* t = (zCutsceneMgr*)to; |
| 394 | if (t->csn->ShutDownWait) |
| 395 | { |
| 396 | if (donpcfx) |
| 397 | { |
| 398 | zNPCFXCutsceneDone(sc, dt, t); |
| 399 | } |
| 400 | donpcfx = 0; |
| 401 | if (xCutscene_Destroy(t->csn)) |
| 402 | { |
| 403 | zCutsceneMgrKillFX(t); |
| 404 | t->csn = NULL; |
| 405 | globals.cmgr = NULL; |
| 406 | xCameraSetFOV(&globals.camera, t->oldfov); |
| 407 | } |
| 408 | } |
| 409 | else |
| 410 | { |
| 411 | if (t->csn->Ready) |
| 412 | { |
| 413 | if (!donpcfx) |
| 414 | { |
| 415 | donpcfx = zNPCFXCutscenePrep(sc, dt, t); |
| 416 | } |
| 417 | if (donpcfx) |
| 418 | { |
| 419 | zNPCFXCutscene(sc, dt, t); |
| 420 | } |
| 421 | |
| 422 | zCutsceneMgrUpdateFX(t, dt); |
| 423 | if (t->stop || !xCutscene_Update(t->csn, dt)) |
| 424 | { |
| 425 | if (!t->stop) |
| 426 | { |
| 427 | zEntEvent(to, to, 0x13); |
| 428 | } |
| 429 | |
| 430 | t->csn->PlaybackSpeed = 0.0f; |
| 431 | zEntEvent(&globals.player.ent, 9); |
| 432 | zEntEvent(&globals.player.ent, 3); |
| 433 | zEntEvent(to, to, 0xbf); |
| 434 | iCameraSetNearFarClip(0.0f, 0.0f); |
| 435 | |
| 436 | if ((globals.sceneCur->pendingPortal)) |
| 437 | { |
| 438 | zEntEvent(&globals.player.ent, 8); |
| 439 | zEntEvent(&globals.player.ent, 4); |
| 440 | xSndStopAll(0xffff); |
| 441 | return; |
| 442 | } |
| 443 | |
| 444 | if (donpcfx) |
| 445 | { |
| 446 | zNPCFXCutsceneDone(sc, dt, t); |
| 447 | } |
| 448 | donpcfx = 0; |
no test coverage detected