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

Function ObjCamera

TombEngine/Game/camera.cpp:440–461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438}
439
440void ObjCamera(ItemInfo* camSlotId, int camMeshId, ItemInfo* targetItem, int targetMeshId, bool cond)
441{
442 if (ItemCameraOn != cond)
443 Camera.DisableInterpolation = true;
444
445 //camSlotId and targetItem stay the same object until I know how to expand targetItem to another object.
446 //activates code below -> void CalculateCamera().
447 ItemCameraOn = cond;
448
449 UpdateCameraElevation();
450
451 //get mesh 0 coordinates.
452 auto pos = GetJointPosition(camSlotId, camMeshId, Vector3i::Zero);
453 auto dest = Vector3(pos.x, pos.y, pos.z);
454
455 GameVector from = GameVector(dest, camSlotId->RoomNumber);
456 Camera.fixedCamera = true;
457
458 MoveObjCamera(&from, camSlotId, camMeshId, targetItem, targetMeshId);
459 Camera.timer = NO_VALUE;
460 Camera.speed = 1;
461}
462
463void ClearObjCamera()
464{

Callers 2

ResetObjCameraFunction · 0.85
AttachObjCameraMethod · 0.85

Calls 5

UpdateCameraElevationFunction · 0.85
GetJointPositionFunction · 0.85
MoveObjCameraFunction · 0.85
Vector3Function · 0.50
GameVectorClass · 0.50

Tested by

no test coverage detected