| 3498 | xVec3 scale = { 0.2f, -0.7f, 1.5f }; |
| 3499 | |
| 3500 | void zSceneSpawnRandomBubbles() |
| 3501 | { |
| 3502 | RwCamera* currentCamera = RwCameraGetCurrentCamera(); |
| 3503 | |
| 3504 | if (!currentCamera || zMenuIsFirstBoot()) |
| 3505 | { |
| 3506 | return; |
| 3507 | } |
| 3508 | |
| 3509 | RwMatrix* mat = RwFrameGetMatrix(RwCameraGetFrame(currentCamera)); |
| 3510 | F32 floatRand = xurand(); |
| 3511 | |
| 3512 | if (floatRand > 0.985f) |
| 3513 | { |
| 3514 | xVec3 pos, var_48; |
| 3515 | F32 r; |
| 3516 | |
| 3517 | pos.x = mat->pos.x; |
| 3518 | pos.y = mat->pos.y; |
| 3519 | pos.z = mat->pos.z; |
| 3520 | |
| 3521 | r = xurand(); |
| 3522 | r *= (((S32)(10000 * floatRand) % 2) ? 1 : -1); |
| 3523 | |
| 3524 | xVec3ScaleC(&var_48, (xVec3*)&mat->right, r, r, r); |
| 3525 | xVec3Add(&pos, &pos, &var_48); |
| 3526 | xVec3ScaleC(&var_48, (xVec3*)&mat->up, scale.y, scale.y, scale.y); |
| 3527 | xVec3Add(&pos, &pos, &var_48); |
| 3528 | xVec3ScaleC(&var_48, (xVec3*)&mat->at, scale.z, scale.z, scale.z); |
| 3529 | xVec3Add(&pos, &pos, &var_48); |
| 3530 | |
| 3531 | zFX_SpawnBubbleMenuTrail(&pos, 1, NULL, NULL); |
| 3532 | } |
| 3533 | } |
| 3534 | |
| 3535 | static void zSceneAutoSave() |
| 3536 | { |
no test coverage detected