MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / UpdateCamera

Function UpdateCamera

TombEngine/Game/camera.cpp:1581–1605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1579}
1580
1581void UpdateCamera()
1582{
1583 // HACK: Disable interpolation when switching to/from flyby camera.
1584 // When camera structs are converted to a class, this should go to getter/setter. -- Lwmte, 29.10.2024
1585 if (UseSpotCam != SpotcamSwitched)
1586 {
1587 Camera.DisableInterpolation = true;
1588 SpotcamSwitched = UseSpotCam;
1589 }
1590
1591 if (UseSpotCam)
1592 {
1593 // Draw flyby cameras.
1594 CalculateSpotCameras();
1595 }
1596 else
1597 {
1598 // Do the standard camera.
1599 TrackCameraInit = false;
1600 CalculateCamera(LaraCollision);
1601 }
1602
1603 // Update cameras matrices there, after having done all the possible camera logic.
1604 g_Renderer.UpdateCameraMatrices(&Camera, BLOCK(g_GameFlow->GetLevel(CurrentLevel)->GetFarView()));
1605}
1606
1607void UpdateMikePos(const ItemInfo& item)
1608{

Callers 2

GamePhaseFunction · 0.85
FreezePhaseFunction · 0.85

Calls 5

CalculateSpotCamerasFunction · 0.85
CalculateCameraFunction · 0.85
UpdateCameraMatricesMethod · 0.80
GetFarViewMethod · 0.80
GetLevelMethod · 0.80

Tested by

no test coverage detected