70%
| 1404 | |
| 1405 | // 70% |
| 1406 | void zNPCBPatrick::RenderGlobs() |
| 1407 | { |
| 1408 | /* |
| 1409 | class xMat4x3 globMat; // r29+0xB0 |
| 1410 | signed int i; // r29+0xA0 |
| 1411 | */ |
| 1412 | xMat4x3 globMat; |
| 1413 | S32 i; |
| 1414 | |
| 1415 | iModelSetMaterialAlpha(this->spitModel, 215); |
| 1416 | iModelMaterialMul(this->spitModel, f832, f831, f832); |
| 1417 | |
| 1418 | iModelSetMaterialAlpha(this->splatModel, 215); |
| 1419 | iModelMaterialMul(this->splatModel, f832, f831, f832); |
| 1420 | |
| 1421 | for (i = 0; i < 50; i++) |
| 1422 | { |
| 1423 | bossPatGlob* glob = &this->glob[i]; |
| 1424 | if (glob->flags & 1) |
| 1425 | { |
| 1426 | if (glob->flags & 4) |
| 1427 | { |
| 1428 | xVec3Copy(&globMat.pos, &glob->path.initPos); |
| 1429 | xVec3Copy(&glob->lastPos, &globMat.pos); |
| 1430 | xVec3Init(&globMat.up, f832, f831, f832); |
| 1431 | globMat.at.x = -glob->path.initVel.x; |
| 1432 | globMat.at.y = f832; |
| 1433 | globMat.at.z = -glob->path.initVel.z; |
| 1434 | |
| 1435 | F32 dVar4 = xVec3Length(&globMat.at); |
| 1436 | |
| 1437 | if (dVar4 > f1668) |
| 1438 | { |
| 1439 | xVec3SMulBy(&globMat.at, f831 / dVar4); |
| 1440 | } |
| 1441 | |
| 1442 | xVec3Cross(&globMat.right, &globMat.up, &globMat.at); |
| 1443 | xMat3x3SMul(&globMat, &globMat, f891); |
| 1444 | |
| 1445 | if (!iModelCull(this->splatModel, (RwMatrix*)&globMat)) |
| 1446 | { |
| 1447 | iModelRender(this->splatModel, (RwMatrix*)&globMat); |
| 1448 | } |
| 1449 | } |
| 1450 | else |
| 1451 | { |
| 1452 | xParabolaEvalPos(&glob->path, &globMat.pos, glob->t); |
| 1453 | |
| 1454 | if (this->gooHeight < globMat.pos.y) |
| 1455 | { |
| 1456 | glob->flags = 0; |
| 1457 | this->playSplat(&globMat.pos); |
| 1458 | } |
| 1459 | else |
| 1460 | { |
| 1461 | xVec3Copy(&glob->lastPos, &globMat.pos); |
| 1462 | xParabolaEvalVel(&glob->path, &globMat.at, glob->t); |
| 1463 |
no test coverage detected