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

Function xCameraRotate

src/SB/Core/x/xCamera.cpp:1353–1391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1351}
1352
1353void xCameraRotate(xCamera* cam, const xMat3x3& m, F32 time, F32 accel, F32 decl)
1354{
1355 xVec3 eu;
1356
1357 cam->flags = cam->flags & ~0xF80 | 0x80;
1358
1359 xMat3x3GetEuler(&m, &eu);
1360
1361 cam->yaw_goal = eu.x;
1362 cam->pitch_goal = eu.y;
1363 cam->roll_goal = eu.z;
1364
1365 if (0.0f == time)
1366 {
1367 cam->yaw_cur = eu.x;
1368 cam->pitch_cur = eu.y;
1369 cam->roll_cur = eu.z;
1370 }
1371
1372 *(xMat3x3*)&cam->mat = m;
1373
1374 if (0.0f == time)
1375 {
1376 *(xMat3x3*)&cam->omat = m;
1377 }
1378
1379 if (0.0f == time)
1380 {
1381 cam->ltm_acc = cam->ltm_dec = cam->ltmr = 0.0f;
1382 }
1383 else
1384 {
1385 cam->ltm_acc = accel;
1386 cam->ltm_dec = decl;
1387 cam->ltmr = time;
1388 }
1389
1390 cam->yaw_epv = cam->pitch_epv = cam->roll_epv = 0.0f;
1391}
1392
1393void xCameraRotate(xCamera* cam, const xVec3& v, F32 roll, F32 time, F32 accel, F32 decl)
1394{

Callers 5

updateMethod · 0.70
apply_turnMethod · 0.50
startMethod · 0.50
updateMethod · 0.50
update_detach_cameraMethod · 0.50

Calls 4

xatan2Function · 0.85
xasinFunction · 0.85
xMat3x3EulerFunction · 0.85
xMat3x3GetEulerFunction · 0.70

Tested by

no test coverage detected