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

Function loveyFloat

src/SB/Game/zNPCTypeTiki.cpp:1354–1381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1352}
1353
1354static void loveyFloat(zNPCTiki* tiki, F32 dt)
1355{
1356 xVec3 up_vec;
1357
1358 xVec3Init(&up_vec, 0.0f, 1.0f, 0.0f);
1359
1360 F32 amplitude = icos(tiki->t1 * 4.0f) * 0.2f;
1361
1362 xVec3Copy((xVec3*)&tiki->model->Mat->pos, &tiki->v1);
1363 xVec3AddScaled((xVec3*)&tiki->model->Mat->pos, &up_vec, amplitude);
1364
1365 tiki->t1 += dt;
1366 if (tiki->t1 > 6.2831855f)
1367 {
1368 tiki->t1 -= 6.2831855f;
1369 }
1370
1371 tiki->t2 += 0.25f;
1372 if (tiki->t2 > 0.2501f)
1373 {
1374 tiki->t2 = -0.25f;
1375 tiki->t3 += 0.25f;
1376 if (tiki->t3 > 0.2501f)
1377 {
1378 tiki->t3 = -0.25f;
1379 }
1380 }
1381}
1382
1383static S32 loveyIdleCB(xGoal* rawgoal, void*, en_trantype* trantype, F32 dt, void*)
1384{

Callers 2

loveyIdleCBFunction · 0.85
loveyPatrolCBFunction · 0.85

Calls 4

xVec3InitFunction · 0.85
icosFunction · 0.85
xVec3CopyFunction · 0.85
xVec3AddScaledFunction · 0.85

Tested by

no test coverage detected