From d936af724894ad21ab4e058ddd0e228896e82fbe Mon Sep 17 00:00:00 2001 From: tmyqlfpir <80724828+tmyqlfpir@users.noreply.github.com> Date: Tue, 22 Oct 2024 08:03:39 +1000 Subject: [PATCH] Blood: Document aiPlay3DSound() parameters --- source/blood/src/ai.cpp | 12 ++++++------ source/blood/src/ai.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/blood/src/ai.cpp b/source/blood/src/ai.cpp index c16889716e..1305acae81 100644 --- a/source/blood/src/ai.cpp +++ b/source/blood/src/ai.cpp @@ -87,16 +87,16 @@ bool dudeIsPlayingSeq(spritetype *pSprite, int nSeq) return false; } -void aiPlay3DSound(spritetype *pSprite, int a2, AI_SFX_PRIORITY a3, int a4) +void aiPlay3DSound(spritetype *pSprite, int soundId, AI_SFX_PRIORITY nPriority, int chanId) { DUDEEXTRA *pDudeExtra = &gDudeExtra[pSprite->extra]; - if (a3 == AI_SFX_PRIORITY_0) - sfxPlay3DSound(pSprite, a2, a4, 2); - else if (a3 > pDudeExtra->sfx_priority || pDudeExtra->clock <= (int)gFrameClock) + if (nPriority == AI_SFX_PRIORITY_0) + sfxPlay3DSound(pSprite, soundId, chanId, 2); + else if (nPriority > pDudeExtra->sfx_priority || pDudeExtra->clock <= (int)gFrameClock) { sfxKill3DSound(pSprite, -1, -1); - sfxPlay3DSound(pSprite, a2, a4, 0); - pDudeExtra->sfx_priority = a3; + sfxPlay3DSound(pSprite, soundId, chanId, 0); + pDudeExtra->sfx_priority = nPriority; pDudeExtra->clock = (int)gFrameClock+120; } } diff --git a/source/blood/src/ai.h b/source/blood/src/ai.h index 6dee724ebf..ce650b1101 100644 --- a/source/blood/src/ai.h +++ b/source/blood/src/ai.h @@ -79,7 +79,7 @@ extern int gDudeSlope[]; extern int cumulDamage[]; bool dudeIsPlayingSeq(spritetype *pSprite, int nSeq); -void aiPlay3DSound(spritetype *pSprite, int a2, AI_SFX_PRIORITY a3, int a4); +void aiPlay3DSound(spritetype *pSprite, int soundId, AI_SFX_PRIORITY nPriority, int chanId); void aiNewState(spritetype *pSprite, XSPRITE *pXSprite, AISTATE *pAIState); void aiChooseDirection(spritetype *pSprite, XSPRITE *pXSprite, int a3); void aiMoveForward(spritetype *pSprite, XSPRITE *pXSprite);