Skip to content

Commit

Permalink
Blood: Document aiPlay3DSound() parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
tmyqlfpir committed Oct 21, 2024
1 parent 79aeb5a commit d936af7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions source/blood/src/ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion source/blood/src/ai.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d936af7

Please sign in to comment.