2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-12 23:26:09 +00:00

CPlayer: Use size_t with SfxIdFromMaterial

Allows passing in sizes without potential truncation from size_t,
allowing nicer use of std::size() to dehardcode some magic values.
This commit is contained in:
Lioncash
2019-09-17 14:45:12 -04:00
parent 5b4580e5bf
commit 45cdc38ac0
3 changed files with 14 additions and 13 deletions

View File

@@ -401,7 +401,7 @@ void CMorphBall::SelectMorphBallSounds(const CMaterialList& mat) {
else
rollSfx = 1481;
} else {
rollSfx = CPlayer::SfxIdFromMaterial(mat, skBallRollSfx.data(), 24, 0xffff);
rollSfx = CPlayer::SfxIdFromMaterial(mat, skBallRollSfx.data(), skBallRollSfx.size(), 0xffff);
}
x0_player.x9c5_30_selectFluidBallSound = false;
@@ -413,7 +413,7 @@ void CMorphBall::SelectMorphBallSounds(const CMaterialList& mat) {
x1e34_rollSfx = rollSfx;
}
x1e36_landSfx = CPlayer::SfxIdFromMaterial(mat, skBallLandSfx.data(), 24, 0xffff);
x1e36_landSfx = CPlayer::SfxIdFromMaterial(mat, skBallLandSfx.data(), skBallLandSfx.size(), 0xffff);
}
void CMorphBall::UpdateMorphBallSounds(float dt) {