- cleaned up the sound system interface to have consistent naming and no aliases.

This commit is contained in:
Christoph Oelckers 2020-07-25 09:32:54 +02:00
parent 30a0fcfe46
commit a0cc798c9c
18 changed files with 660 additions and 670 deletions

View file

@ -671,7 +671,7 @@ public:
DDukeMultiplayerBonusScreen(int pws) : DScreenJob(fadein|fadeout) DDukeMultiplayerBonusScreen(int pws) : DScreenJob(fadein|fadeout)
{ {
playerswhenstarted = pws; playerswhenstarted = pws;
PlayBonusMusic(); S_PlayBonusMusic();
} }
int Frame(uint64_t clock, bool skiprequest) int Frame(uint64_t clock, bool skiprequest)
@ -779,7 +779,7 @@ public:
int vol = volfromlevelnum(currentLevel->levelNumber); int vol = volfromlevelnum(currentLevel->levelNumber);
gfx_offset = BONUSSCREEN + ((vol == 1) ? 5 : 0); gfx_offset = BONUSSCREEN + ((vol == 1) ? 5 : 0);
lastmapname = currentLevel->DisplayName(); lastmapname = currentLevel->DisplayName();
PlayBonusMusic(); S_PlayBonusMusic();
} }
void FormatTime(int time, char* tempbuf) void FormatTime(int time, char* tempbuf)

View file

@ -262,7 +262,7 @@ public:
DRRMultiplayerBonusScreen(int pws) : DScreenJob(fadein | fadeout) DRRMultiplayerBonusScreen(int pws) : DScreenJob(fadein | fadeout)
{ {
playerswhenstarted = pws; playerswhenstarted = pws;
PlayBonusMusic(); S_PlayBonusMusic();
} }
int Frame(uint64_t clock, bool skiprequest) int Frame(uint64_t clock, bool skiprequest)
@ -366,7 +366,7 @@ class DRRLevelSummaryScreen : public DScreenJob
public: public:
DRRLevelSummaryScreen(bool dofadeout = true) : DScreenJob(dofadeout? (fadein | fadeout) : fadein) DRRLevelSummaryScreen(bool dofadeout = true) : DScreenJob(dofadeout? (fadein | fadeout) : fadein)
{ {
PlayBonusMusic(); S_PlayBonusMusic();
if (currentLevel->flags & MI_USERMAP) if (currentLevel->flags & MI_USERMAP)
gfx_offset = RRTILE403; gfx_offset = RRTILE403;
else if (!isRRRA()) else if (!isRRRA())

View file

@ -72,7 +72,7 @@ void RANDOMSCRAP(spritetype *s, int i)
void deletesprite(int num) void deletesprite(int num)
{ {
if (sprite[num].picnum == MUSICANDSFX && hittype[num].temp_data[0] == 1) if (sprite[num].picnum == MUSICANDSFX && hittype[num].temp_data[0] == 1)
S_StopEnvSound(sprite[num].lotag, num); S_StopSound(sprite[num].lotag, num);
::deletesprite(num); ::deletesprite(num);
} }
@ -636,13 +636,13 @@ void movefx(void)
if (x < ht && hittype[i].temp_data[0] == 0) if (x < ht && hittype[i].temp_data[0] == 0)
{ {
// Start playing an ambience sound. // Start playing an ambience sound.
A_PlaySound(s->lotag, i, CHAN_AUTO, CHANF_LOOP); S_PlayActorSound(s->lotag, i, CHAN_AUTO, CHANF_LOOP);
hittype[i].temp_data[0] = 1; // AMBIENT_SFX_PLAYING hittype[i].temp_data[0] = 1; // AMBIENT_SFX_PLAYING
} }
else if (x >= ht && hittype[i].temp_data[0] == 1) else if (x >= ht && hittype[i].temp_data[0] == 1)
{ {
// Stop playing ambience sound because we're out of its range. // Stop playing ambience sound because we're out of its range.
S_StopEnvSound(s->lotag, i); S_StopSound(s->lotag, i);
} }
} }
@ -737,7 +737,7 @@ void movecrane(int i, int crane)
if (s->owner == -2) if (s->owner == -2)
{ {
auto p = findplayer(s, &x); auto p = findplayer(s, &x);
spritesound(isRR() ? 390 : DUKE_GRUNT, ps[p].i); S_PlayActorSound(isRR() ? 390 : DUKE_GRUNT, ps[p].i);
if (ps[p].on_crane == i) if (ps[p].on_crane == i)
ps[p].on_crane = -1; ps[p].on_crane = -1;
} }
@ -757,7 +757,7 @@ void movecrane(int i, int crane)
{ {
s->owner = -2; s->owner = -2;
ps[p].on_crane = i; ps[p].on_crane = i;
spritesound(isRR() ? 390 : DUKE_GRUNT, ps[p].i); S_PlayActorSound(isRR() ? 390 : DUKE_GRUNT, ps[p].i);
ps[p].setang(s->ang + 1024, true); ps[p].setang(s->ang + 1024, true);
} }
else else
@ -986,7 +986,7 @@ void detonate(int i, int explosion)
int x = s->extra; int x = s->extra;
fi.spawn(i, explosion); fi.spawn(i, explosion);
fi.hitradius(i, seenineblastradius, x >> 2, x - (x >> 1), x - (x >> 2), x); fi.hitradius(i, seenineblastradius, x >> 2, x - (x >> 1), x - (x >> 2), x);
spritesound(PIPEBOMB_EXPLODE, i); S_PlayActorSound(PIPEBOMB_EXPLODE, i);
} }
if (s->xrepeat) if (s->xrepeat)
@ -1095,7 +1095,7 @@ void movewaterdrip(int i, int drip)
s->cstat |= 32768; s->cstat |= 32768;
if (s->pal != 2 && (isRR() || s->hitag == 0)) if (s->pal != 2 && (isRR() || s->hitag == 0))
spritesound(SOMETHING_DRIPPING, i); S_PlayActorSound(SOMETHING_DRIPPING, i);
if (sprite[s->owner].picnum != drip) if (sprite[s->owner].picnum != drip)
{ {
@ -1305,7 +1305,7 @@ void movecanwithsomething(int i)
int j = fi.ifhitbyweapon(i); int j = fi.ifhitbyweapon(i);
if (j >= 0) if (j >= 0)
{ {
spritesound(VENT_BUST, i); S_PlayActorSound(VENT_BUST, i);
for (j = 0; j < 10; j++) for (j = 0; j < 10; j++)
RANDOMSCRAP(s, i); RANDOMSCRAP(s, i);
@ -1445,7 +1445,7 @@ bool rat(int i, bool makesound)
makeitfall(i); makeitfall(i);
if (ssp(i, CLIPMASK0)) if (ssp(i, CLIPMASK0))
{ {
if (makesound && (krand() & 255) == 0) spritesound(RATTY, i); if (makesound && (krand() & 255) == 0) S_PlayActorSound(RATTY, i);
s->ang += (krand() & 31) - 15 + (sintable[(hittype[i].temp_data[0] << 8) & 2047] >> 11); s->ang += (krand() & 31) - 15 + (sintable[(hittype[i].temp_data[0] << 8) & 2047] >> 11);
} }
else else
@ -1660,7 +1660,7 @@ void recon(int i, int explosion, int firelaser, int attacksnd, int painsnd, int
t[0] = -1; t[0] = -1;
s->extra = 0; s->extra = 0;
} }
if (painsnd >= 0) spritesound(painsnd, i); if (painsnd >= 0) S_PlayActorSound(painsnd, i);
RANDOMSCRAP(s, i); RANDOMSCRAP(s, i);
} }
@ -1677,7 +1677,7 @@ void recon(int i, int explosion, int firelaser, int attacksnd, int painsnd, int
{ {
for (int l = 0; l < 16; l++) for (int l = 0; l < 16; l++)
RANDOMSCRAP(s, i); RANDOMSCRAP(s, i);
spritesound(LASERTRIP_EXPLODE, i); S_PlayActorSound(LASERTRIP_EXPLODE, i);
int sp = getspawn(i); int sp = getspawn(i);
if (sp >= 0) fi.spawn(i, sp); if (sp >= 0) fi.spawn(i, sp);
ps[myconnectindex].actors_killed++; ps[myconnectindex].actors_killed++;
@ -1704,7 +1704,7 @@ void recon(int i, int explosion, int firelaser, int attacksnd, int painsnd, int
{ {
a = s->ang; a = s->ang;
s->ang = hittype[i].tempang; s->ang = hittype[i].tempang;
if (attacksnd >= 0) spritesound(attacksnd, i); if (attacksnd >= 0) S_PlayActorSound(attacksnd, i);
fi.shoot(i, firelaser); fi.shoot(i, firelaser);
s->ang = a; s->ang = a;
} }
@ -1738,7 +1738,7 @@ void recon(int i, int explosion, int firelaser, int attacksnd, int painsnd, int
} }
else if ((t[2] & 15) == 0 && attacksnd >= 0) else if ((t[2] & 15) == 0 && attacksnd >= 0)
{ {
spritesound(attacksnd, i); S_PlayActorSound(attacksnd, i);
fi.shoot(i, firelaser); fi.shoot(i, firelaser);
} }
} }
@ -1810,7 +1810,7 @@ void recon(int i, int explosion, int firelaser, int attacksnd, int painsnd, int
} }
if (roamsnd >= 0 && S_CheckSoundPlaying(roamsnd) < 2) if (roamsnd >= 0 && S_CheckSoundPlaying(roamsnd) < 2)
A_PlaySound(roamsnd, i); S_PlayActorSound(roamsnd, i);
ssp(i, CLIPMASK0); ssp(i, CLIPMASK0);
} }
@ -1897,9 +1897,9 @@ void reactor(int i, int REACTOR, int REACTOR2, int REACTORBURNT, int REACTOR2BUR
if ((krand() & 255) < 16) if ((krand() & 255) < 16)
{ {
if (!S_CheckSoundPlaying(DUKE_LONGTERM_PAIN)) if (!S_CheckSoundPlaying(DUKE_LONGTERM_PAIN))
spritesound(DUKE_LONGTERM_PAIN, ps[p].i); S_PlayActorSound(DUKE_LONGTERM_PAIN, ps[p].i);
spritesound(SHORT_CIRCUIT, i); S_PlayActorSound(SHORT_CIRCUIT, i);
sprite[ps[p].i].extra--; sprite[ps[p].i].extra--;
SetPlayerPal(&ps[p], PalEntry(32, 32, 0, 0)); SetPlayerPal(&ps[p], PalEntry(32, 32, 0, 0));
@ -2090,7 +2090,7 @@ void watersplash2(int i)
return; return;
} }
if (!S_CheckSoundPlaying(ITEM_SPLASH)) if (!S_CheckSoundPlaying(ITEM_SPLASH))
spritesound(ITEM_SPLASH, i); S_PlayActorSound(ITEM_SPLASH, i);
} }
if (t[0] == 3) if (t[0] == 3)
{ {
@ -2373,7 +2373,7 @@ bool bloodpool(int i, bool puke, int TIRE)
else else
{ {
if (!S_CheckSoundPlaying(DUKE_LONGTERM_PAIN)) if (!S_CheckSoundPlaying(DUKE_LONGTERM_PAIN))
spritesound(DUKE_LONGTERM_PAIN, ps[p].i); S_PlayActorSound(DUKE_LONGTERM_PAIN, ps[p].i);
sprite[ps[p].i].extra--; sprite[ps[p].i].extra--;
SetPlayerPal(&ps[p], PalEntry(32, 16, 0, 0)); SetPlayerPal(&ps[p], PalEntry(32, 16, 0, 0));
} }
@ -2814,7 +2814,7 @@ void handle_se14(int i, bool checkstat, int RPG, int JIBS6)
if (statstate) if (statstate)
{ {
if (!S_CheckSoundPlaying(hittype[i].lastvx)) if (!S_CheckSoundPlaying(hittype[i].lastvx))
spritesound(hittype[i].lastvx, i); S_PlayActorSound(hittype[i].lastvx, i);
} }
if ((!checkstat || !statstate) && (ud.monsters_off == 0 && sc->floorpal == 0 && (sc->floorstat & 1) && rnd(8))) if ((!checkstat || !statstate) && (ud.monsters_off == 0 && sc->floorpal == 0 && (sc->floorstat & 1) && rnd(8)))
{ {
@ -2830,7 +2830,7 @@ void handle_se14(int i, bool checkstat, int RPG, int JIBS6)
} }
if (s->xvel <= 64 && statstate) if (s->xvel <= 64 && statstate)
S_StopEnvSound(hittype[i].lastvx, i); S_StopSound(hittype[i].lastvx, i);
if ((sc->floorz - sc->ceilingz) < (108 << 8)) if ((sc->floorz - sc->ceilingz) < (108 << 8))
{ {
@ -2944,7 +2944,7 @@ void handle_se14(int i, bool checkstat, int RPG, int JIBS6)
if (sprite[j].extra >= 0 && k == s->sectnum) if (sprite[j].extra >= 0 && k == s->sectnum)
{ {
fi.gutsdir(&sprite[j], JIBS6, 72, myconnectindex); fi.gutsdir(&sprite[j], JIBS6, 72, myconnectindex);
spritesound(SQUISHED, i); S_PlayActorSound(SQUISHED, i);
deletesprite(j); deletesprite(j);
} }
} }
@ -3130,7 +3130,7 @@ void handle_se30(int i, int JIBS6)
if (sprite[j].extra >= 0 && k == s->sectnum) if (sprite[j].extra >= 0 && k == s->sectnum)
{ {
fi.gutsdir(&sprite[j], JIBS6, 24, myconnectindex); fi.gutsdir(&sprite[j], JIBS6, 24, myconnectindex);
spritesound(SQUISHED, j); S_PlayActorSound(SQUISHED, j);
deletesprite(j); deletesprite(j);
} }
} }
@ -3181,7 +3181,7 @@ void handle_se02(int i)
if ((t[0] & 31) == 8) if ((t[0] & 31) == 8)
{ {
earthquaketime = 48; earthquaketime = 48;
spritesound(EARTHQUAKE, ps[screenpeek].i); S_PlayActorSound(EARTHQUAKE, ps[screenpeek].i);
} }
if (abs(sc->floorheinum - t[5]) < 8) if (abs(sc->floorheinum - t[5]) < 8)
@ -5052,12 +5052,12 @@ void fall_common(int g_i, int g_p, int JIBS6, int DRONE, int BLOODPOOL, int SHOT
if (sphit) if (sphit)
{ {
fi.guts(g_sp, JIBS6, 5, g_p); fi.guts(g_sp, JIBS6, 5, g_p);
spritesound(squished, g_i); S_PlayActorSound(squished, g_i);
} }
else else
{ {
fi.guts(g_sp, JIBS6, 15, g_p); fi.guts(g_sp, JIBS6, 15, g_p);
spritesound(squished, g_i); S_PlayActorSound(squished, g_i);
fi.spawn(g_i, BLOODPOOL); fi.spawn(g_i, BLOODPOOL);
} }
} }
@ -5078,7 +5078,7 @@ void fall_common(int g_i, int g_p, int JIBS6, int DRONE, int BLOODPOOL, int SHOT
if (j != g_sp->sectnum && j >= 0 && j < MAXSECTORS) if (j != g_sp->sectnum && j >= 0 && j < MAXSECTORS)
changespritesect(g_i, j); changespritesect(g_i, j);
spritesound(thud, g_i); S_PlayActorSound(thud, g_i);
} }
} }
if (sector[g_sp->sectnum].lotag == 1) if (sector[g_sp->sectnum].lotag == 1)

View file

@ -154,56 +154,56 @@ void check_fta_sounds_d(int i)
case LIZTROOPDUCKING: case LIZTROOPDUCKING:
case LIZTROOPRUNNING: case LIZTROOPRUNNING:
case LIZTROOP: case LIZTROOP:
spritesound(PRED_RECOG, i); S_PlayActorSound(PRED_RECOG, i);
break; break;
case LIZMAN: case LIZMAN:
case LIZMANSPITTING: case LIZMANSPITTING:
case LIZMANFEEDING: case LIZMANFEEDING:
case LIZMANJUMP: case LIZMANJUMP:
spritesound(CAPT_RECOG, i); S_PlayActorSound(CAPT_RECOG, i);
break; break;
case PIGCOP: case PIGCOP:
case PIGCOPDIVE: case PIGCOPDIVE:
spritesound(PIG_RECOG, i); S_PlayActorSound(PIG_RECOG, i);
break; break;
case RECON: case RECON:
spritesound(RECO_RECOG, i); S_PlayActorSound(RECO_RECOG, i);
break; break;
case DRONE: case DRONE:
spritesound(DRON_RECOG, i); S_PlayActorSound(DRON_RECOG, i);
break; break;
case COMMANDER: case COMMANDER:
case COMMANDERSTAYPUT: case COMMANDERSTAYPUT:
spritesound(COMM_RECOG, i); S_PlayActorSound(COMM_RECOG, i);
break; break;
case ORGANTIC: case ORGANTIC:
spritesound(TURR_RECOG, i); S_PlayActorSound(TURR_RECOG, i);
break; break;
case OCTABRAIN: case OCTABRAIN:
case OCTABRAINSTAYPUT: case OCTABRAINSTAYPUT:
spritesound(OCTA_RECOG, i); S_PlayActorSound(OCTA_RECOG, i);
break; break;
case BOSS1: case BOSS1:
sound(BOS1_RECOG); S_PlaySound(BOS1_RECOG);
break; break;
case BOSS2: case BOSS2:
if (sprite[i].pal == 1) if (sprite[i].pal == 1)
sound(BOS2_RECOG); S_PlaySound(BOS2_RECOG);
else sound(WHIPYOURASS); else S_PlaySound(WHIPYOURASS);
break; break;
case BOSS3: case BOSS3:
if (sprite[i].pal == 1) if (sprite[i].pal == 1)
sound(BOS3_RECOG); S_PlaySound(BOS3_RECOG);
else sound(RIPHEADNECK); else S_PlaySound(RIPHEADNECK);
break; break;
case BOSS4: case BOSS4:
case BOSS4STAYPUT: case BOSS4STAYPUT:
if (sprite[i].pal == 1) if (sprite[i].pal == 1)
sound(BOS4_RECOG); S_PlaySound(BOS4_RECOG);
sound(BOSS4_FIRSTSEE); S_PlaySound(BOSS4_FIRSTSEE);
break; break;
case GREENSLIME: case GREENSLIME:
spritesound(SLIM_RECOG, i); S_PlayActorSound(SLIM_RECOG, i);
break; break;
} }
} }
@ -273,13 +273,13 @@ void addweapon_d(struct player_struct *p, int weapon)
case HANDBOMB_WEAPON: case HANDBOMB_WEAPON:
break; break;
case SHOTGUN_WEAPON: case SHOTGUN_WEAPON:
spritesound(SHOTGUN_COCK, p->i); S_PlayActorSound(SHOTGUN_COCK, p->i);
break; break;
case PISTOL_WEAPON: case PISTOL_WEAPON:
spritesound(INSERT_CLIP, p->i); S_PlayActorSound(INSERT_CLIP, p->i);
break; break;
default: default:
spritesound(SELECT_WEAPON, p->i); S_PlayActorSound(SELECT_WEAPON, p->i);
break; break;
} }
} }
@ -1111,7 +1111,7 @@ static void movetripbomb(int i)
if (s->extra == 0) if (s->extra == 0)
{ {
hittype[i].temp_data[2] = 16; hittype[i].temp_data[2] = 16;
spritesound(LASERTRIP_ARMING, i); S_PlayActorSound(LASERTRIP_ARMING, i);
} }
} }
} }
@ -1120,7 +1120,7 @@ static void movetripbomb(int i)
hittype[i].temp_data[2]--; hittype[i].temp_data[2]--;
if (hittype[i].temp_data[2] == 8) if (hittype[i].temp_data[2] == 8)
{ {
spritesound(LASERTRIP_EXPLODE, i); S_PlayActorSound(LASERTRIP_EXPLODE, i);
for (j = 0; j < 5; j++) RANDOMSCRAP(s, i); for (j = 0; j < 5; j++) RANDOMSCRAP(s, i);
x = s->extra; x = s->extra;
fi.hitradius(i, tripbombblastradius, x >> 2, x >> 1, x - (x >> 2), x); fi.hitradius(i, tripbombblastradius, x >> 2, x >> 1, x - (x >> 2), x);
@ -1211,7 +1211,7 @@ static void movetripbomb(int i)
if (m >= 0 && lTripBombControl & TRIPBOMB_TRIPWIRE) if (m >= 0 && lTripBombControl & TRIPBOMB_TRIPWIRE)
{ {
hittype[i].temp_data[2] = 13; hittype[i].temp_data[2] = 13;
spritesound(LASERTRIP_ARMING, i); S_PlayActorSound(LASERTRIP_ARMING, i);
} }
else hittype[i].temp_data[2] = 0; else hittype[i].temp_data[2] = 0;
} }
@ -1236,7 +1236,7 @@ static void movetripbomb(int i)
if (hittype[i].lastvx != x && lTripBombControl & TRIPBOMB_TRIPWIRE) if (hittype[i].lastvx != x && lTripBombControl & TRIPBOMB_TRIPWIRE)
{ {
hittype[i].temp_data[2] = 13; hittype[i].temp_data[2] = 13;
spritesound(LASERTRIP_ARMING, i); S_PlayActorSound(LASERTRIP_ARMING, i);
} }
} }
} }
@ -1298,8 +1298,8 @@ static void movefireext(int i)
} }
fi.spawn(i, EXPLOSION2); fi.spawn(i, EXPLOSION2);
spritesound(PIPEBOMB_EXPLODE, i); S_PlayActorSound(PIPEBOMB_EXPLODE, i);
spritesound(GLASS_HEAVYBREAK, i); S_PlayActorSound(GLASS_HEAVYBREAK, i);
if (s->hitag > 0) if (s->hitag > 0)
{ {
@ -1315,7 +1315,7 @@ static void movefireext(int i)
int x = s->extra; int x = s->extra;
fi.spawn(i, EXPLOSION2); fi.spawn(i, EXPLOSION2);
fi.hitradius(i, pipebombblastradius, x >> 2, x - (x >> 1), x - (x >> 2), x); fi.hitradius(i, pipebombblastradius, x >> 2, x - (x >> 1), x - (x >> 2), x);
spritesound(PIPEBOMB_EXPLODE, i); S_PlayActorSound(PIPEBOMB_EXPLODE, i);
detonate(i, EXPLOSION2); detonate(i, EXPLOSION2);
} }
else else
@ -1399,7 +1399,7 @@ CLEAR_THE_BOLT2:
#endif #endif
if ((krand() & 1) && sector[sect].floorpicnum == HURTRAIL) if ((krand() & 1) && sector[sect].floorpicnum == HURTRAIL)
spritesound(SHORT_CIRCUIT, i); S_PlayActorSound(SHORT_CIRCUIT, i);
if (s->picnum == SIDEBOLT1 + 4) s->picnum = SIDEBOLT1; if (s->picnum == SIDEBOLT1 + 4) s->picnum = SIDEBOLT1;
} }
@ -1452,7 +1452,7 @@ CLEAR_THE_BOLT:
if (l & 1) s->cstat ^= 2; if (l & 1) s->cstat ^= 2;
if (s->picnum == (BOLT1+1) && (krand()&7) == 0 && sector[sect].floorpicnum == HURTRAIL) if (s->picnum == (BOLT1+1) && (krand()&7) == 0 && sector[sect].floorpicnum == HURTRAIL)
spritesound(SHORT_CIRCUIT,i); S_PlayActorSound(SHORT_CIRCUIT,i);
if (s->picnum==BOLT1+4) s->picnum=BOLT1; if (s->picnum==BOLT1+4) s->picnum=BOLT1;
@ -1659,7 +1659,7 @@ void moveweapons_d(void)
if (s->picnum == COOLEXPLOSION1) if (s->picnum == COOLEXPLOSION1)
if (!S_CheckSoundPlaying(i, WIERDSHOT_FLY)) if (!S_CheckSoundPlaying(i, WIERDSHOT_FLY))
A_PlaySound(WIERDSHOT_FLY, i); S_PlayActorSound(WIERDSHOT_FLY, i);
p = -1; p = -1;
@ -1829,7 +1829,7 @@ void moveweapons_d(void)
ps[p].numloogs = -1 - sprite[i].yvel; ps[p].numloogs = -1 - sprite[i].yvel;
} }
spritesound(PISTOL_BODYHIT,j); S_PlayActorSound(PISTOL_BODYHIT,j);
if (s->picnum == SPIT) if (s->picnum == SPIT)
{ {
@ -1838,8 +1838,8 @@ void moveweapons_d(void)
if (ps[p].loogcnt == 0) if (ps[p].loogcnt == 0)
{ {
if (!A_CheckSoundPlaying(ps[p].i, DUKE_LONGTERM_PAIN)) if (!S_CheckActorSoundPlaying(ps[p].i, DUKE_LONGTERM_PAIN))
A_PlaySound(DUKE_LONGTERM_PAIN, ps[p].i); S_PlayActorSound(DUKE_LONGTERM_PAIN, ps[p].i);
j = 3+(krand()&3); j = 3+(krand()&3);
ps[p].numloogs = j; ps[p].numloogs = j;
@ -1955,7 +1955,7 @@ void moveweapons_d(void)
else if (s->picnum == SHRINKSPARK) else if (s->picnum == SHRINKSPARK)
{ {
fi.spawn(i,SHRINKEREXPLOSION); fi.spawn(i,SHRINKEREXPLOSION);
spritesound(SHRINKER_HIT,i); S_PlayActorSound(SHRINKER_HIT,i);
fi.hitradius(i,shrinkerblastradius,0,0,0,0); fi.hitradius(i,shrinkerblastradius,0,0,0,0);
} }
else if (s->picnum != COOLEXPLOSION1 && s->picnum != FREEZEBLAST && s->picnum != FIRELASER && (!isWorldTour() || s->picnum != FIREBALL)) else if (s->picnum != COOLEXPLOSION1 && s->picnum != FREEZEBLAST && s->picnum != FIRELASER && (!isWorldTour() || s->picnum != FIREBALL))
@ -1972,7 +1972,7 @@ void moveweapons_d(void)
} }
if (s->picnum == RPG) if (s->picnum == RPG)
{ {
spritesound(RPG_EXPLODE,i); S_PlayActorSound(RPG_EXPLODE,i);
if (s->xrepeat >= 10) if (s->xrepeat >= 10)
{ {
@ -2069,7 +2069,7 @@ void movetransports_d(void)
if (sprite[i].pal == 0) if (sprite[i].pal == 0)
{ {
fi.spawn(i, TRANSPORTERBEAM); fi.spawn(i, TRANSPORTERBEAM);
spritesound(TELEPORTER, i); S_PlayActorSound(TELEPORTER, i);
} }
for (k = connecthead; k >= 0; k = connectpoint2[k]) for (k = connecthead; k >= 0; k = connectpoint2[k])
@ -2098,7 +2098,7 @@ void movetransports_d(void)
if (sprite[i].pal == 0) if (sprite[i].pal == 0)
{ {
k = fi.spawn(sprite[i].owner, TRANSPORTERBEAM); k = fi.spawn(sprite[i].owner, TRANSPORTERBEAM);
spritesound(TELEPORTER, k); S_PlayActorSound(TELEPORTER, k);
} }
break; break;
@ -2139,7 +2139,7 @@ void movetransports_d(void)
FX_StopAllSounds(); FX_StopAllSounds();
} }
if (sprite[ps[p].i].extra > 0) if (sprite[ps[p].i].extra > 0)
spritesound(DUKE_UNDERWATER, j); S_PlayActorSound(DUKE_UNDERWATER, j);
ps[p].oposz = ps[p].posz = ps[p].oposz = ps[p].posz =
sector[sprite[sprite[i].owner].sectnum].ceilingz + (7 << 8); sector[sprite[sprite[i].owner].sectnum].ceilingz + (7 << 8);
@ -2156,7 +2156,7 @@ void movetransports_d(void)
{ {
FX_StopAllSounds(); FX_StopAllSounds();
} }
spritesound(DUKE_GASP, j); S_PlayActorSound(DUKE_GASP, j);
ps[p].oposz = ps[p].posz = ps[p].oposz = ps[p].posz =
sector[sprite[sprite[i].owner].sectnum].floorz - (7 << 8); sector[sprite[sprite[i].owner].sectnum].floorz - (7 << 8);
@ -2292,10 +2292,10 @@ void movetransports_d(void)
if (sprite[i].pal == 0) if (sprite[i].pal == 0)
{ {
k = fi.spawn(i, TRANSPORTERBEAM); k = fi.spawn(i, TRANSPORTERBEAM);
spritesound(TELEPORTER, k); S_PlayActorSound(TELEPORTER, k);
k = fi.spawn(sprite[i].owner, TRANSPORTERBEAM); k = fi.spawn(sprite[i].owner, TRANSPORTERBEAM);
spritesound(TELEPORTER, k); S_PlayActorSound(TELEPORTER, k);
} }
if (sprite[sprite[i].owner].owner != sprite[i].owner) if (sprite[sprite[i].owner].owner != sprite[i].owner)
@ -2429,7 +2429,7 @@ static void greenslime(int i)
int k = EGS(sprite[i].sectnum, sprite[i].x, sprite[i].y, sprite[i].z, GLASSPIECES + (j % 3), -32, 36, 36, krand() & 2047, 32 + (krand() & 63), 1024 - (krand() & 1023), i, 5); int k = EGS(sprite[i].sectnum, sprite[i].x, sprite[i].y, sprite[i].z, GLASSPIECES + (j % 3), -32, 36, 36, krand() & 2047, 32 + (krand() & 63), 1024 - (krand() & 1023), i, 5);
sprite[k].pal = 1; sprite[k].pal = 1;
} }
spritesound(GLASS_BREAKING, i); S_PlayActorSound(GLASS_BREAKING, i);
deletesprite(i); deletesprite(i);
} }
else if (x < 1024 && ps[p].quick_kick == 0) else if (x < 1024 && ps[p].quick_kick == 0)
@ -2467,8 +2467,8 @@ static void greenslime(int i)
sprite[j].pal = 6; sprite[j].pal = 6;
} }
spritesound(SLIM_DYING, i); S_PlayActorSound(SLIM_DYING, i);
spritesound(SQUISHED, i); S_PlayActorSound(SQUISHED, i);
if ((krand() & 255) < 32) if ((krand() & 255) < 32)
{ {
j = fi.spawn(i, BLOODPOOL); j = fi.spawn(i, BLOODPOOL);
@ -2520,7 +2520,7 @@ static void greenslime(int i)
if (t[3] == 5) if (t[3] == 5)
{ {
sprite[ps[p].i].extra += -(5 + (krand() & 3)); sprite[ps[p].i].extra += -(5 + (krand() & 3));
spritesound(SLIM_ATTACK, i); S_PlayActorSound(SLIM_ATTACK, i);
} }
if (t[3] < 7) t[3]++; if (t[3] < 7) t[3]++;
@ -2557,7 +2557,7 @@ static void greenslime(int i)
j = fi.ifhitbyweapon(i); if (j >= 0) j = fi.ifhitbyweapon(i); if (j >= 0)
{ {
spritesound(SLIM_DYING, i); S_PlayActorSound(SLIM_DYING, i);
ps[p].actors_killed++; ps[p].actors_killed++;
if (ps[p].somethingonplayer == i) if (ps[p].somethingonplayer == i)
@ -2565,7 +2565,7 @@ static void greenslime(int i)
if (j == FREEZEBLAST) if (j == FREEZEBLAST)
{ {
spritesound(SOMETHINGFROZE, i); t[0] = -5; t[3] = 0; S_PlayActorSound(SOMETHINGFROZE, i); t[0] = -5; t[3] = 0;
return; return;
} }
@ -2674,7 +2674,7 @@ static void greenslime(int i)
s->picnum = GREENSLIME; s->picnum = GREENSLIME;
if ((krand() & 511) == 0) if ((krand() & 511) == 0)
spritesound(SLIM_ROAM, i); S_PlayActorSound(SLIM_ROAM, i);
if (t[0] == 2) if (t[0] == 2)
{ {
@ -2839,7 +2839,7 @@ static void flamethrowerflame(int i)
j &= (MAXSPRITES - 1); j &= (MAXSPRITES - 1);
fi.checkhitsprite((short)j, i); fi.checkhitsprite((short)j, i);
if (sprite[j].picnum == APLAYER) if (sprite[j].picnum == APLAYER)
spritesound(j, PISTOL_BODYHIT); S_PlayActorSound(j, PISTOL_BODYHIT);
} }
else if ((j & kHitTypeMask) == kHitWall) else if ((j & kHitTypeMask) == kHitWall)
{ {
@ -2885,7 +2885,7 @@ static void heavyhbomb(int i)
t[2]--; t[2]--;
if (t[2] <= 0) if (t[2] <= 0)
{ {
spritesound(TELEPORTER, i); S_PlayActorSound(TELEPORTER, i);
fi.spawn(i, TRANSPORTERSTAR); fi.spawn(i, TRANSPORTERSTAR);
s->cstat = 257; s->cstat = 257;
} }
@ -2917,7 +2917,7 @@ static void heavyhbomb(int i)
if (sector[sect].lotag != 1 && s->z >= hittype[i].floorz - (FOURSLEIGHT) && s->yvel < 3) if (sector[sect].lotag != 1 && s->z >= hittype[i].floorz - (FOURSLEIGHT) && s->yvel < 3)
{ {
if (s->yvel > 0 || (s->yvel == 0 && hittype[i].floorz == sector[sect].floorz)) if (s->yvel > 0 || (s->yvel == 0 && hittype[i].floorz == sector[sect].floorz))
spritesound(PIPEBOMB_BOUNCE, i); S_PlayActorSound(PIPEBOMB_BOUNCE, i);
s->zvel = -((4 - s->yvel) << 8); s->zvel = -((4 - s->yvel) << 8);
if (sector[s->sectnum].lotag == 2) if (sector[s->sectnum].lotag == 2)
s->zvel >>= 2; s->zvel >>= 2;
@ -3014,7 +3014,7 @@ DETONATEB:
fi.spawn(i, EXPLOSION2); fi.spawn(i, EXPLOSION2);
if (s->zvel == 0) if (s->zvel == 0)
fi.spawn(i, EXPLOSION2BOT); fi.spawn(i, EXPLOSION2BOT);
spritesound(PIPEBOMB_EXPLODE, i); S_PlayActorSound(PIPEBOMB_EXPLODE, i);
for (x = 0; x < 8; x++) for (x = 0; x < 8; x++)
RANDOMSCRAP(s, i); RANDOMSCRAP(s, i);
} }
@ -3057,7 +3057,7 @@ DETONATEB:
} }
addammo(HANDBOMB_WEAPON, &ps[p], 1); addammo(HANDBOMB_WEAPON, &ps[p], 1);
spritesound(DUKE_GET, ps[p].i); S_PlayActorSound(DUKE_GET, ps[p].i);
if (ps[p].gotweapon[HANDBOMB_WEAPON] == 0 || s->owner == ps[p].i) if (ps[p].gotweapon[HANDBOMB_WEAPON] == 0 || s->owner == ps[p].i)
fi.addweapon(&ps[p], HANDBOMB_WEAPON); fi.addweapon(&ps[p], HANDBOMB_WEAPON);
@ -3187,11 +3187,11 @@ void moveactors_d(void)
s->z += s->zvel; s->z += s->zvel;
t[0]++; t[0]++;
if (t[0] == 4) spritesound(WAR_AMBIENCE2, i); if (t[0] == 4) S_PlayActorSound(WAR_AMBIENCE2, i);
if (t[0] > (26 * 8)) if (t[0] > (26 * 8))
{ {
sound(RPG_EXPLODE); S_PlaySound(RPG_EXPLODE);
for (j = 0; j < 32; j++) for (j = 0; j < 32; j++)
RANDOMSCRAP(s, i); RANDOMSCRAP(s, i);
earthquaketime = 16; earthquaketime = 16;
@ -3829,9 +3829,9 @@ void moveeffectors_d(void) //STATNUM 3
break; break;
} }
else if (hittype[i].temp_data[2] == (hittype[i].temp_data[1] >> 1)) else if (hittype[i].temp_data[2] == (hittype[i].temp_data[1] >> 1))
spritesound(THUNDER, i); S_PlayActorSound(THUNDER, i);
else if (hittype[i].temp_data[2] == (hittype[i].temp_data[1] >> 3)) else if (hittype[i].temp_data[2] == (hittype[i].temp_data[1] >> 3))
spritesound(LIGHTNING_SLAP, i); S_PlayActorSound(LIGHTNING_SLAP, i);
else if (hittype[i].temp_data[2] == (hittype[i].temp_data[1] >> 2)) else if (hittype[i].temp_data[2] == (hittype[i].temp_data[1] >> 2))
{ {
j = headspritestat[0]; j = headspritestat[0];
@ -3871,8 +3871,8 @@ void moveeffectors_d(void) //STATNUM 3
if (x < 768) if (x < 768)
{ {
if (S_CheckSoundPlaying(ps[p].i, DUKE_LONGTERM_PAIN) < 1) if (S_CheckSoundPlaying(ps[p].i, DUKE_LONGTERM_PAIN) < 1)
spritesound(DUKE_LONGTERM_PAIN, ps[p].i); S_PlayActorSound(DUKE_LONGTERM_PAIN, ps[p].i);
spritesound(SHORT_CIRCUIT, ps[p].i); S_PlayActorSound(SHORT_CIRCUIT, ps[p].i);
sprite[ps[p].i].extra -= 8 + (krand() & 7); sprite[ps[p].i].extra -= 8 + (krand() & 7);
SetPlayerPal(&ps[p], PalEntry(32, 16, 0, 0)); SetPlayerPal(&ps[p], PalEntry(32, 16, 0, 0));
} }

View file

@ -536,14 +536,14 @@ void operatejaildoors(int hitag)
jaildooropen[i] = 1; jaildooropen[i] = 1;
jaildoordrag[i] = jaildoordist[i]; jaildoordrag[i] = jaildoordist[i];
if (!isRRRA() || jaildoorsound[i] != 0) if (!isRRRA() || jaildoorsound[i] != 0)
spritesound(jaildoorsound[i], ps[screenpeek].i); S_PlayActorSound(jaildoorsound[i], ps[screenpeek].i);
} }
if (jaildooropen[i] == 2) if (jaildooropen[i] == 2)
{ {
jaildooropen[i] = 3; jaildooropen[i] = 3;
jaildoordrag[i] = jaildoordist[i]; jaildoordrag[i] = jaildoordist[i];
if (!isRRRA() || jaildoorsound[i] != 0) if (!isRRRA() || jaildoorsound[i] != 0)
spritesound(jaildoorsound[i], ps[screenpeek].i); S_PlayActorSound(jaildoorsound[i], ps[screenpeek].i);
} }
} }
} }
@ -568,7 +568,7 @@ void thunder(void)
{ {
thunderflash = 1; thunderflash = 1;
thundertime = 256; thundertime = 256;
sound(351 + (rand() % 3)); S_PlaySound(351 + (rand() % 3));
} }
} }
else else
@ -597,7 +597,7 @@ void thunder(void)
{ {
winderflash = 1; winderflash = 1;
windertime = 128; windertime = 128;
sound(351 + (rand() % 3)); S_PlaySound(351 + (rand() % 3));
} }
} }
} }

View file

@ -97,12 +97,12 @@ void check_fta_sounds_r(int i)
{ {
case COOT: // LIZTROOP case COOT: // LIZTROOP
if (!isRRRA() && (krand() & 3) == 2) if (!isRRRA() && (krand() & 3) == 2)
spritesound(PRED_RECOG, i); S_PlayActorSound(PRED_RECOG, i);
break; break;
case BILLYCOCK: case BILLYCOCK:
case BILLYRAY: case BILLYRAY:
case BRAYSNIPER: // PIGCOP case BRAYSNIPER: // PIGCOP
spritesound(PIG_RECOG, i); S_PlayActorSound(PIG_RECOG, i);
break; break;
} }
} }
@ -191,13 +191,13 @@ void addweapon_r(struct player_struct* p, int weapon)
case THROWINGDYNAMITE_WEAPON: case THROWINGDYNAMITE_WEAPON:
break; break;
case SHOTGUN_WEAPON: case SHOTGUN_WEAPON:
spritesound(SHOTGUN_COCK, p->i); S_PlayActorSound(SHOTGUN_COCK, p->i);
break; break;
case PISTOL_WEAPON: case PISTOL_WEAPON:
spritesound(INSERT_CLIP, p->i); S_PlayActorSound(INSERT_CLIP, p->i);
break; break;
default: default:
spritesound(EJECT_CLIP, p->i); S_PlayActorSound(EJECT_CLIP, p->i);
break; break;
} }
} }
@ -1026,7 +1026,7 @@ CLEAR_THE_BOLT:
if (l & 1) s->cstat ^= 2; if (l & 1) s->cstat ^= 2;
if (s->picnum == (BOLT1 + 1) && (krand() & 1) && sector[sect].floorpicnum == HURTRAIL) if (s->picnum == (BOLT1 + 1) && (krand() & 1) && sector[sect].floorpicnum == HURTRAIL)
spritesound(SHORT_CIRCUIT, i); S_PlayActorSound(SHORT_CIRCUIT, i);
if (s->picnum == BOLT1 + 4) s->picnum = BOLT1; if (s->picnum == BOLT1 + 4) s->picnum = BOLT1;
@ -1363,7 +1363,7 @@ void moveweapons_r(void)
&& (s->picnum == RPG || s->picnum == RPG2) && (s->picnum == RPG || s->picnum == RPG2)
&& sprite[j].pal == 19) && sprite[j].pal == 19)
{ {
spritesound(RPG_EXPLODE, i); S_PlayActorSound(RPG_EXPLODE, i);
k = fi.spawn(i, EXPLOSION2); k = fi.spawn(i, EXPLOSION2);
sprite[k].x = dax; sprite[k].x = dax;
sprite[k].y = day; sprite[k].y = day;
@ -1388,7 +1388,7 @@ void moveweapons_r(void)
if (sprite[j].picnum == APLAYER) if (sprite[j].picnum == APLAYER)
{ {
p = sprite[j].yvel; p = sprite[j].yvel;
spritesound(PISTOL_BODYHIT,j); S_PlayActorSound(PISTOL_BODYHIT,j);
if (s->picnum == SPIT) if (s->picnum == SPIT)
{ {
@ -1403,8 +1403,8 @@ void moveweapons_r(void)
if (ps[p].loogcnt == 0) if (ps[p].loogcnt == 0)
{ {
if (!A_CheckSoundPlaying(ps[p].i, DUKE_LONGTERM_PAIN)) if (!S_CheckActorSoundPlaying(ps[p].i, DUKE_LONGTERM_PAIN))
A_PlaySound(DUKE_LONGTERM_PAIN, ps[p].i); S_PlayActorSound(DUKE_LONGTERM_PAIN, ps[p].i);
j = 3 + (krand() & 3); j = 3 + (krand() & 3);
ps[p].numloogs = j; ps[p].numloogs = j;
@ -1606,7 +1606,7 @@ void moveweapons_r(void)
} }
if (s->picnum == RPG) if (s->picnum == RPG)
{ {
spritesound(RPG_EXPLODE, i); S_PlayActorSound(RPG_EXPLODE, i);
if (s->xrepeat >= 10) if (s->xrepeat >= 10)
{ {
@ -1622,7 +1622,7 @@ void moveweapons_r(void)
else if (isRRRA() && s->picnum == RPG2) else if (isRRRA() && s->picnum == RPG2)
{ {
s->extra = 150; s->extra = 150;
spritesound(247, i); S_PlayActorSound(247, i);
if (s->xrepeat >= 10) if (s->xrepeat >= 10)
{ {
@ -1638,7 +1638,7 @@ void moveweapons_r(void)
else if (isRRRA() && s->picnum == RRTILE1790) else if (isRRRA() && s->picnum == RRTILE1790)
{ {
s->extra = 160; s->extra = 160;
spritesound(RPG_EXPLODE, i); S_PlayActorSound(RPG_EXPLODE, i);
if (s->xrepeat >= 10) if (s->xrepeat >= 10)
{ {
@ -1722,7 +1722,7 @@ void movetransports_r(void)
if (ps[p].on_ground && sectlotag == 0 && onfloorz && ps[p].jetpack_on == 0) if (ps[p].on_ground && sectlotag == 0 && onfloorz && ps[p].jetpack_on == 0)
{ {
fi.spawn(i, TRANSPORTERBEAM); fi.spawn(i, TRANSPORTERBEAM);
spritesound(TELEPORTER, i); S_PlayActorSound(TELEPORTER, i);
for (k = connecthead; k >= 0; k = connectpoint2[k])// connectpoinhittype[i].temp_data[1][k]) for (k = connecthead; k >= 0; k = connectpoint2[k])// connectpoinhittype[i].temp_data[1][k])
if (ps[k].cursectnum == sprite[OW].sectnum) if (ps[k].cursectnum == sprite[OW].sectnum)
@ -1748,7 +1748,7 @@ void movetransports_r(void)
ps[p].cursectnum = sprite[j].sectnum; ps[p].cursectnum = sprite[j].sectnum;
k = fi.spawn(OW, TRANSPORTERBEAM); k = fi.spawn(OW, TRANSPORTERBEAM);
spritesound(TELEPORTER, k); S_PlayActorSound(TELEPORTER, k);
break; break;
} }
@ -1802,7 +1802,7 @@ void movetransports_r(void)
{ {
FX_StopAllSounds(); FX_StopAllSounds();
} }
spritesound(DUKE_UNDERWATER, ps[p].i); S_PlayActorSound(DUKE_UNDERWATER, ps[p].i);
ps[p].oposz = ps[p].posz = ps[p].oposz = ps[p].posz =
sector[sprite[OW].sectnum].ceilingz + (7 << 8); sector[sprite[OW].sectnum].ceilingz + (7 << 8);
if (ps[p].OnMotorcycle) if (ps[p].OnMotorcycle)
@ -1817,7 +1817,7 @@ void movetransports_r(void)
{ {
FX_StopAllSounds(); FX_StopAllSounds();
} }
spritesound(DUKE_GASP, ps[p].i); S_PlayActorSound(DUKE_GASP, ps[p].i);
ps[p].oposz = ps[p].posz = ps[p].oposz = ps[p].posz =
sector[sprite[OW].sectnum].floorz - (7 << 8); sector[sprite[OW].sectnum].floorz - (7 << 8);
@ -1965,10 +1965,10 @@ void movetransports_r(void)
hittype[j].bposz = sprite[j].z; hittype[j].bposz = sprite[j].z;
k = fi.spawn(i, TRANSPORTERBEAM); k = fi.spawn(i, TRANSPORTERBEAM);
spritesound(TELEPORTER, k); S_PlayActorSound(TELEPORTER, k);
k = fi.spawn(OW, TRANSPORTERBEAM); k = fi.spawn(OW, TRANSPORTERBEAM);
spritesound(TELEPORTER, k); S_PlayActorSound(TELEPORTER, k);
if (sprite[OW].owner != OW) if (sprite[OW].owner != OW)
{ {
@ -2261,7 +2261,7 @@ static void rrra_specialstats()
if (sprite[i].extra) if (sprite[i].extra)
{ {
if (sprite[i].extra == sprite[i].lotag) if (sprite[i].extra == sprite[i].lotag)
sound(183); S_PlaySound(183);
sprite[i].extra--; sprite[i].extra--;
j = fi.movesprite(i, j = fi.movesprite(i,
(sprite[i].hitag * sintable[(sprite[i].ang + 512) & 2047]) >> 14, (sprite[i].hitag * sintable[(sprite[i].ang + 512) & 2047]) >> 14,
@ -2269,12 +2269,12 @@ static void rrra_specialstats()
sprite[i].hitag << 1, CLIPMASK0); sprite[i].hitag << 1, CLIPMASK0);
if (j > 0) if (j > 0)
{ {
spritesound(PIPEBOMB_EXPLODE, i); S_PlayActorSound(PIPEBOMB_EXPLODE, i);
deletesprite(i); deletesprite(i);
} }
if (sprite[i].extra == 0) if (sprite[i].extra == 0)
{ {
sound(215); S_PlaySound(215);
deletesprite(i); deletesprite(i);
earthquaketime = 32; earthquaketime = 32;
SetPlayerPal(&ps[myconnectindex], PalEntry(32, 32, 32, 48)); SetPlayerPal(&ps[myconnectindex], PalEntry(32, 32, 32, 48));
@ -2311,7 +2311,7 @@ static void rrra_specialstats()
sprite[i].picnum = RRTILE8162 + 2; sprite[i].picnum = RRTILE8162 + 2;
fi.spawn(i, BATTERYAMMO); fi.spawn(i, BATTERYAMMO);
ps[screenpeek].SlotWin |= 1; ps[screenpeek].SlotWin |= 1;
spritesound(52, i); S_PlayActorSound(52, i);
} }
} }
else if (rvar < 120) else if (rvar < 120)
@ -2325,7 +2325,7 @@ static void rrra_specialstats()
sprite[i].picnum = RRTILE8162 + 6; sprite[i].picnum = RRTILE8162 + 6;
fi.spawn(i, HEAVYHBOMB); fi.spawn(i, HEAVYHBOMB);
ps[screenpeek].SlotWin |= 2; ps[screenpeek].SlotWin |= 2;
spritesound(52, i); S_PlayActorSound(52, i);
} }
} }
else if (rvar < 126) else if (rvar < 126)
@ -2339,7 +2339,7 @@ static void rrra_specialstats()
sprite[i].picnum = RRTILE8162 + 5; sprite[i].picnum = RRTILE8162 + 5;
fi.spawn(i, SIXPAK); fi.spawn(i, SIXPAK);
ps[screenpeek].SlotWin |= 4; ps[screenpeek].SlotWin |= 4;
spritesound(52, i); S_PlayActorSound(52, i);
} }
} }
else else
@ -2353,7 +2353,7 @@ static void rrra_specialstats()
sprite[i].picnum = RRTILE8162 + 4; sprite[i].picnum = RRTILE8162 + 4;
fi.spawn(i, ATOMICHEALTH); fi.spawn(i, ATOMICHEALTH);
ps[screenpeek].SlotWin |= 8; ps[screenpeek].SlotWin |= 8;
spritesound(52, i); S_PlayActorSound(52, i);
} }
} }
} }
@ -2389,7 +2389,7 @@ static void rrra_specialstats()
sprite[i].picnum = RRTILE8589 + 5; sprite[i].picnum = RRTILE8589 + 5;
fi.spawn(i, BATTERYAMMO); fi.spawn(i, BATTERYAMMO);
ps[screenpeek].SlotWin |= 1; ps[screenpeek].SlotWin |= 1;
spritesound(342, i); S_PlayActorSound(342, i);
} }
} }
else if (rvar < 120) else if (rvar < 120)
@ -2403,7 +2403,7 @@ static void rrra_specialstats()
sprite[i].picnum = RRTILE8589 + 6; sprite[i].picnum = RRTILE8589 + 6;
fi.spawn(i, HEAVYHBOMB); fi.spawn(i, HEAVYHBOMB);
ps[screenpeek].SlotWin |= 2; ps[screenpeek].SlotWin |= 2;
spritesound(342, i); S_PlayActorSound(342, i);
} }
} }
else if (rvar < 126) else if (rvar < 126)
@ -2417,7 +2417,7 @@ static void rrra_specialstats()
sprite[i].picnum = RRTILE8589 + 2; sprite[i].picnum = RRTILE8589 + 2;
fi.spawn(i, SIXPAK); fi.spawn(i, SIXPAK);
ps[screenpeek].SlotWin |= 4; ps[screenpeek].SlotWin |= 4;
spritesound(342, i); S_PlayActorSound(342, i);
} }
} }
else else
@ -2431,7 +2431,7 @@ static void rrra_specialstats()
sprite[i].picnum = RRTILE8589 + 3; sprite[i].picnum = RRTILE8589 + 3;
fi.spawn(i, ATOMICHEALTH); fi.spawn(i, ATOMICHEALTH);
ps[screenpeek].SlotWin |= 8; ps[screenpeek].SlotWin |= 8;
spritesound(342, i); S_PlayActorSound(342, i);
} }
} }
} }
@ -2445,7 +2445,7 @@ static void rrra_specialstats()
nexti = nextspritestat[i]; nexti = nextspritestat[i];
if (sprite[i].lotag == 5) if (sprite[i].lotag == 5)
if (!S_CheckSoundPlaying(330)) if (!S_CheckSoundPlaying(330))
spritesound(330, i); S_PlayActorSound(330, i);
i = nexti; i = nexti;
} }
} }
@ -2538,7 +2538,7 @@ void rr_specialstats()
{ {
j = fi.spawn(i, RRTILE3132); j = fi.spawn(i, RRTILE3132);
sprite[i].lotag = 96; sprite[i].lotag = 96;
if (!isRRRA()) spritesound(472, j); if (!isRRRA()) S_PlayActorSound(472, j);
} }
break; break;
case RRTILE289: case RRTILE289:
@ -2646,7 +2646,7 @@ void rr_specialstats()
pi = ps[p].i; pi = ps[p].i;
changespritesect(pi, sprite[j].sectnum); changespritesect(pi, sprite[j].sectnum);
ps[p].cursectnum = sprite[pi].sectnum; ps[p].cursectnum = sprite[pi].sectnum;
spritesound(70, j); S_PlayActorSound(70, j);
deletesprite(j); deletesprite(j);
} }
j = nextj; j = nextj;
@ -2675,7 +2675,7 @@ static void heavyhbomb(int i)
t[2]--; t[2]--;
if (t[2] <= 0) if (t[2] <= 0)
{ {
spritesound(TELEPORTER, i); S_PlayActorSound(TELEPORTER, i);
fi.spawn(i, TRANSPORTERSTAR); fi.spawn(i, TRANSPORTERSTAR);
s->cstat = 257; s->cstat = 257;
} }
@ -2707,7 +2707,7 @@ static void heavyhbomb(int i)
if (s->yvel > 0 || (s->yvel == 0 && hittype[i].floorz == sector[sect].floorz)) if (s->yvel > 0 || (s->yvel == 0 && hittype[i].floorz == sector[sect].floorz))
{ {
if (s->picnum != CHEERBOMB) if (s->picnum != CHEERBOMB)
spritesound(PIPEBOMB_BOUNCE, i); S_PlayActorSound(PIPEBOMB_BOUNCE, i);
else else
{ {
t[3] = 1; t[3] = 1;
@ -2825,7 +2825,7 @@ DETONATEB:
fi.spawn(i, EXPLOSION2); fi.spawn(i, EXPLOSION2);
if (s->picnum == CHEERBOMB) if (s->picnum == CHEERBOMB)
fi.spawn(i, BURNING); fi.spawn(i, BURNING);
spritesound(PIPEBOMB_EXPLODE, i); S_PlayActorSound(PIPEBOMB_EXPLODE, i);
for (x = 0; x < 8; x++) for (x = 0; x < 8; x++)
RANDOMSCRAP(s, i); RANDOMSCRAP(s, i);
} }
@ -2866,7 +2866,7 @@ DETONATEB:
addammo(DYNAMITE_WEAPON, &ps[p], 1); addammo(DYNAMITE_WEAPON, &ps[p], 1);
addammo(CROSSBOW_WEAPON, &ps[p], 1); addammo(CROSSBOW_WEAPON, &ps[p], 1);
spritesound(DUKE_GET, ps[p].i); S_PlayActorSound(DUKE_GET, ps[p].i);
if (ps[p].gotweapon[DYNAMITE_WEAPON] == 0 || s->owner == ps[p].i) if (ps[p].gotweapon[DYNAMITE_WEAPON] == 0 || s->owner == ps[p].i)
fi.addweapon(&ps[p], DYNAMITE_WEAPON); fi.addweapon(&ps[p], DYNAMITE_WEAPON);
@ -3139,7 +3139,7 @@ void moveactors_r(void)
if (s->xvel) if (s->xvel)
{ {
if(!S_CheckSoundPlaying(356)) if(!S_CheckSoundPlaying(356))
spritesound(356,i); S_PlayActorSound(356,i);
} }
else else
{ {
@ -3149,7 +3149,7 @@ void moveactors_r(void)
} }
if (sector[s->sectnum].lotag == 900) if (sector[s->sectnum].lotag == 900)
{ {
S_StopEnvSound(356, -1); S_StopSound(356, -1);
} }
case RRTILE3440: case RRTILE3440:
case RRTILE3440+1: case RRTILE3440+1:
@ -3348,7 +3348,7 @@ void moveexplosions_r(void) // STATNUM 5
continue; continue;
} }
if (S_CheckSoundPlaying(22)) if (S_CheckSoundPlaying(22))
spritesound(22, i); S_PlayActorSound(22, i);
} }
if (t[0] == 3) if (t[0] == 3)
{ {
@ -3841,7 +3841,7 @@ void moveeffectors_r(void) //STATNUM 3
{ {
sc->ceilingz = sc->floorz; sc->ceilingz = sc->floorz;
if (isRRRA() && pistonsound) if (isRRRA() && pistonsound)
spritesound(371, i); S_PlayActorSound(371, i);
} }
} }
else else
@ -3851,7 +3851,7 @@ void moveeffectors_r(void) //STATNUM 3
{ {
sc->ceilingz = t[4]; sc->ceilingz = t[4];
if (isRRRA() && pistonsound) if (isRRRA() && pistonsound)
spritesound(167, i); S_PlayActorSound(167, i);
} }
} }
@ -4413,7 +4413,7 @@ static int fallspecial(int g_i, int g_p)
if (g_sp->picnum != APLAYER && badguy(g_sp) && g_sp->z == hittype[g_i].floorz - FOURSLEIGHT) if (g_sp->picnum != APLAYER && badguy(g_sp) && g_sp->z == hittype[g_i].floorz - FOURSLEIGHT)
{ {
fi.guts(g_sp, JIBS6, 5, g_p); fi.guts(g_sp, JIBS6, 5, g_p);
spritesound(SQUISHED, g_i); S_PlayActorSound(SQUISHED, g_i);
addspritetodelete(g_i); addspritetodelete(g_i);
} }
return 0; return 0;

View file

@ -403,15 +403,15 @@ int ParseState::parse(void)
{ {
banjosound = 273; banjosound = 273;
} }
A_PlaySound(banjosound, g_i, CHAN_WEAPON); S_PlayActorSound(banjosound, g_i, CHAN_WEAPON);
} }
else if (!S_CheckSoundPlaying(g_i, banjosound)) else if (!S_CheckSoundPlaying(g_i, banjosound))
A_PlaySound(banjosound, g_i, CHAN_WEAPON); S_PlayActorSound(banjosound, g_i, CHAN_WEAPON);
insptr++; insptr++;
break; break;
case concmd_motoloopsnd: case concmd_motoloopsnd:
if (!S_CheckSoundPlaying(g_i, 411)) if (!S_CheckSoundPlaying(g_i, 411))
A_PlaySound(411, g_i, CHAN_VOICE); S_PlayActorSound(411, g_i, CHAN_VOICE);
insptr++; insptr++;
break; break;
case concmd_ifgotweaponce: case concmd_ifgotweaponce:
@ -452,7 +452,7 @@ int ParseState::parse(void)
case concmd_mikesnd: case concmd_mikesnd:
insptr++; insptr++;
if (!S_CheckSoundPlaying(g_i, g_sp->yvel)) if (!S_CheckSoundPlaying(g_i, g_sp->yvel))
A_PlaySound(g_sp->yvel, g_i, CHAN_VOICE); S_PlayActorSound(g_sp->yvel, g_i, CHAN_VOICE);
break; break;
case concmd_pkick: case concmd_pkick:
insptr++; insptr++;
@ -512,17 +512,17 @@ int ParseState::parse(void)
break; break;
case concmd_soundtag: case concmd_soundtag:
insptr++; insptr++;
spritesound(ambientlotag[g_sp->ang], g_i); S_PlayActorSound(ambientlotag[g_sp->ang], g_i);
break; break;
case concmd_soundtagonce: case concmd_soundtagonce:
insptr++; insptr++;
if (!S_CheckSoundPlaying(g_i, ambientlotag[g_sp->ang])) if (!S_CheckSoundPlaying(g_i, ambientlotag[g_sp->ang]))
A_PlaySound(ambientlotag[g_sp->ang], g_i); S_PlayActorSound(ambientlotag[g_sp->ang], g_i);
break; break;
case concmd_soundonce: case concmd_soundonce:
insptr++; insptr++;
if (!S_CheckSoundPlaying(g_i, *insptr++)) if (!S_CheckSoundPlaying(g_i, *insptr++))
A_PlaySound(*(insptr - 1), g_i); S_PlayActorSound(*(insptr - 1), g_i);
break; break;
case concmd_stopsound: case concmd_stopsound:
insptr++; insptr++;
@ -533,7 +533,7 @@ int ParseState::parse(void)
case concmd_globalsound: case concmd_globalsound:
insptr++; insptr++;
if (g_p == screenpeek || ud.coop == 1) if (g_p == screenpeek || ud.coop == 1)
spritesound((int)*insptr, ps[screenpeek].i); S_PlayActorSound((int)*insptr, ps[screenpeek].i);
insptr++; insptr++;
break; break;
case concmd_smackbubba: case concmd_smackbubba:
@ -558,7 +558,7 @@ int ParseState::parse(void)
break; break;
case concmd_sound: case concmd_sound:
insptr++; insptr++;
spritesound((short) *insptr,g_i); S_PlayActorSound((short) *insptr,g_i);
insptr++; insptr++;
break; break;
case concmd_tip: case concmd_tip:
@ -693,7 +693,7 @@ int ParseState::parse(void)
{ {
if ((j - *insptr) < (max_player_health >> 2) && if ((j - *insptr) < (max_player_health >> 2) &&
j >= (max_player_health >> 2)) j >= (max_player_health >> 2))
spritesound(DUKE_GOTHEALTHATLOW, ps[g_p].i); S_PlayActorSound(DUKE_GOTHEALTHATLOW, ps[g_p].i);
ps[g_p].last_extra = j; ps[g_p].last_extra = j;
} }
@ -769,7 +769,7 @@ int ParseState::parse(void)
{ {
if ((j - *insptr) < (max_player_health >> 2) && if ((j - *insptr) < (max_player_health >> 2) &&
j >= (max_player_health >> 2)) j >= (max_player_health >> 2))
spritesound(229, ps[g_p].i); S_PlayActorSound(229, ps[g_p].i);
ps[g_p].last_extra = j; ps[g_p].last_extra = j;
} }
@ -835,7 +835,7 @@ int ParseState::parse(void)
{ {
if( ( j - *insptr ) < (max_player_health>>2) && if( ( j - *insptr ) < (max_player_health>>2) &&
j >= (max_player_health>>2) ) j >= (max_player_health>>2) )
spritesound(isRR()? 229 : DUKE_GOTHEALTHATLOW,ps[g_p].i); S_PlayActorSound(isRR()? 229 : DUKE_GOTHEALTHATLOW,ps[g_p].i);
ps[g_p].last_extra = j; ps[g_p].last_extra = j;
} }
@ -1580,7 +1580,7 @@ int ParseState::parse(void)
break; break;
case concmd_ifnosounds: case concmd_ifnosounds:
parseifelse(!A_CheckAnySoundPlaying(g_i) ); parseifelse(!S_CheckAnyActorSoundPlaying(g_i) );
break; break;
case concmd_ifplaybackon: //Twentieth Anniversary World Tour case concmd_ifplaybackon: //Twentieth Anniversary World Tour

View file

@ -471,7 +471,7 @@ void displayweapon_r(int snum)
} }
else if ((krand() & 15) == 5) else if ((krand() & 15) == 5)
{ {
spritesound(327, p->i); S_PlayActorSound(327, p->i);
rdmyospal((weapon_xoffset + 210) - (p->getlookang() >> 1), rdmyospal((weapon_xoffset + 210) - (p->getlookang() >> 1),
looking_arc + 222 - gun_pos, RPGGUN2 + 7, gs, o | pin, pal); looking_arc + 222 - gun_pos, RPGGUN2 + 7, gs, o | pin, pal);
chickenphase = 6; chickenphase = 6;

View file

@ -271,7 +271,7 @@ void hud_input(int snum)
{ {
p->last_pissed_time = 4000; p->last_pissed_time = 4000;
if (!adult_lockout) if (!adult_lockout)
spritesound(437, p->i); S_PlayActorSound(437, p->i);
if (sprite[p->i].extra <= max_player_health - max_player_health / 10) if (sprite[p->i].extra <= max_player_health - max_player_health / 10)
{ {
sprite[p->i].extra += 2; sprite[p->i].extra += 2;
@ -334,7 +334,7 @@ void hud_input(int snum)
p->heat_on = !p->heat_on; p->heat_on = !p->heat_on;
setpal(p); setpal(p);
p->inven_icon = 5; p->inven_icon = 5;
spritesound(NITEVISION_ONOFF, p->i); S_PlayActorSound(NITEVISION_ONOFF, p->i);
FTA(106 + (!p->heat_on), p); FTA(106 + (!p->heat_on), p);
} }
} }
@ -348,7 +348,7 @@ void hud_input(int snum)
if (p->steroids_amount == 400) if (p->steroids_amount == 400)
{ {
p->steroids_amount--; p->steroids_amount--;
spritesound(DUKE_TAKEPILLS, p->i); S_PlayActorSound(DUKE_TAKEPILLS, p->i);
p->inven_icon = ICON_STEROIDS; p->inven_icon = ICON_STEROIDS;
FTA(12, p); FTA(12, p);
} }
@ -495,12 +495,12 @@ void hud_input(int snum)
FTA(47, p); FTA(47, p);
} }
else FTA(QUOTE_HOLODUKE_ON, p); else FTA(QUOTE_HOLODUKE_ON, p);
spritesound(TELEPORTER, p->holoduke_on); S_PlayActorSound(TELEPORTER, p->holoduke_on);
} }
else else
{ {
spritesound(TELEPORTER, p->holoduke_on); S_PlayActorSound(TELEPORTER, p->holoduke_on);
p->holoduke_on = -1; p->holoduke_on = -1;
FTA(QUOTE_HOLODUKE_NOT_FOUND, p); FTA(QUOTE_HOLODUKE_NOT_FOUND, p);
} }
@ -519,8 +519,8 @@ void hud_input(int snum)
if (p->holoduke_amount == 0) if (p->holoduke_amount == 0)
checkavailinven(p); checkavailinven(p);
if (p->drink_amt < 99 && !A_CheckSoundPlaying(p->i, 425)) if (p->drink_amt < 99 && !S_CheckActorSoundPlaying(p->i, 425))
spritesound(425, p->i); S_PlayActorSound(425, p->i);
} }
} }
} }
@ -535,7 +535,7 @@ void hud_input(int snum)
if (p->yehaa_timer == 0) if (p->yehaa_timer == 0)
{ {
p->yehaa_timer = 126; p->yehaa_timer = 126;
spritesound(390, p->i); S_PlayActorSound(390, p->i);
p->noise_radius = 16384; p->noise_radius = 16384;
madenoise(snum); madenoise(snum);
if (sector[p->cursectnum].lotag == 857) if (sector[p->cursectnum].lotag == 857)
@ -582,7 +582,7 @@ void hud_input(int snum)
p->firstaid_amount = 0; p->firstaid_amount = 0;
checkavailinven(p); checkavailinven(p);
} }
spritesound(DUKE_USEMEDKIT, p->i); S_PlayActorSound(DUKE_USEMEDKIT, p->i);
} }
else else
{ {
@ -604,8 +604,8 @@ void hud_input(int snum)
if (sprite[p->i].extra > max_player_health) if (sprite[p->i].extra > max_player_health)
sprite[p->i].extra = max_player_health; sprite[p->i].extra = max_player_health;
p->drink_amt += 10; p->drink_amt += 10;
if (p->drink_amt <= 100 && !A_CheckSoundPlaying(p->i, DUKE_USEMEDKIT)) if (p->drink_amt <= 100 && !S_CheckActorSoundPlaying(p->i, DUKE_USEMEDKIT))
spritesound(DUKE_USEMEDKIT, p->i); S_PlayActorSound(DUKE_USEMEDKIT, p->i);
} }
} }
} }
@ -626,17 +626,17 @@ void hud_input(int snum)
{ {
p->inven_icon = 4; p->inven_icon = 4;
S_StopEnvSound(-1, p->i, CHAN_VOICE); // this will stop the falling scream S_StopSound(-1, p->i, CHAN_VOICE); // this will stop the falling scream
A_PlaySound(DUKE_JETPACK_ON, p->i); S_PlayActorSound(DUKE_JETPACK_ON, p->i);
FTA(QUOTE_JETPACK_ON, p); FTA(QUOTE_JETPACK_ON, p);
} }
else else
{ {
p->hard_landing = 0; p->hard_landing = 0;
p->poszv = 0; p->poszv = 0;
spritesound(DUKE_JETPACK_OFF, p->i); S_PlayActorSound(DUKE_JETPACK_OFF, p->i);
S_StopEnvSound(DUKE_JETPACK_IDLE, p->i); S_StopSound(DUKE_JETPACK_IDLE, p->i);
S_StopEnvSound(DUKE_JETPACK_ON, p->i); S_StopSound(DUKE_JETPACK_ON, p->i);
FTA(QUOTE_JETPACK_OFF, p); FTA(QUOTE_JETPACK_OFF, p);
} }
} }
@ -647,8 +647,8 @@ void hud_input(int snum)
// eat cow pie // eat cow pie
if (p->jetpack_amount > 0 && sprite[p->i].extra < max_player_health) if (p->jetpack_amount > 0 && sprite[p->i].extra < max_player_health)
{ {
if (!A_CheckSoundPlaying(p->i, 429)) if (!S_CheckActorSoundPlaying(p->i, 429))
A_PlaySound(429, p->i); S_PlayActorSound(429, p->i);
p->jetpack_amount -= 100; p->jetpack_amount -= 100;
if (p->drink_amt > 0) if (p->drink_amt > 0)

View file

@ -401,7 +401,7 @@ void dokneeattack(int snum, int pi, const std::initializer_list<int> & respawnli
{ {
fi.guts(&sprite[p->actorsqu], TILE_JIBS6, 7, myconnectindex); fi.guts(&sprite[p->actorsqu], TILE_JIBS6, 7, myconnectindex);
fi.spawn(p->actorsqu, TILE_BLOODPOOL); fi.spawn(p->actorsqu, TILE_BLOODPOOL);
spritesound(SQUISHED, p->actorsqu); S_PlayActorSound(SQUISHED, p->actorsqu);
if (isIn(sprite[p->actorsqu].picnum, respawnlist)) if (isIn(sprite[p->actorsqu].picnum, respawnlist))
{ {
if (sprite[p->actorsqu].yvel) if (sprite[p->actorsqu].yvel)
@ -448,12 +448,12 @@ int makepainsounds(int snum, int type)
k = 1; k = 1;
else else
{ {
if (!A_CheckSoundPlaying(pi, DUKE_LONGTERM_PAIN)) if (!S_CheckActorSoundPlaying(pi, DUKE_LONGTERM_PAIN))
spritesound(DUKE_LONGTERM_PAIN, pi); S_PlayActorSound(DUKE_LONGTERM_PAIN, pi);
SetPlayerPal(p, PalEntry(32, 64, 64, 64)); SetPlayerPal(p, PalEntry(32, 64, 64, 64));
s->extra -= 1 + (krand() & 3); s->extra -= 1 + (krand() & 3);
if (!A_CheckSoundPlaying(pi, SHORT_CIRCUIT)) if (!S_CheckActorSoundPlaying(pi, SHORT_CIRCUIT))
spritesound(SHORT_CIRCUIT, pi); S_PlayActorSound(SHORT_CIRCUIT, pi);
} }
} }
break; break;
@ -464,8 +464,8 @@ int makepainsounds(int snum, int type)
k = 1; k = 1;
else else
{ {
if (!A_CheckSoundPlaying(pi, DUKE_LONGTERM_PAIN)) if (!S_CheckActorSoundPlaying(pi, DUKE_LONGTERM_PAIN))
spritesound(DUKE_LONGTERM_PAIN, pi); S_PlayActorSound(DUKE_LONGTERM_PAIN, pi);
SetPlayerPal(p, PalEntry(32, 0, 8, 0)); SetPlayerPal(p, PalEntry(32, 0, 8, 0));
s->extra -= 1 + (krand() & 3); s->extra -= 1 + (krand() & 3);
} }
@ -478,8 +478,8 @@ int makepainsounds(int snum, int type)
k = 1; k = 1;
else else
{ {
if (!A_CheckSoundPlaying(pi, DUKE_LONGTERM_PAIN)) if (!S_CheckActorSoundPlaying(pi, DUKE_LONGTERM_PAIN))
spritesound(DUKE_LONGTERM_PAIN, pi); S_PlayActorSound(DUKE_LONGTERM_PAIN, pi);
SetPlayerPal(p, PalEntry(32, 8, 0, 0)); SetPlayerPal(p, PalEntry(32, 8, 0, 0));
s->extra -= 1 + (krand() & 3); s->extra -= 1 + (krand() & 3);
} }
@ -493,7 +493,7 @@ int makepainsounds(int snum, int type)
s->extra -= 2; s->extra -= 2;
else else
s->extra -= 4; s->extra -= 4;
spritesound(DUKE_LONGTERM_PAIN, pi); S_PlayActorSound(DUKE_LONGTERM_PAIN, pi);
} }
break; break;
} }
@ -572,8 +572,8 @@ void playerisdead(int snum, int psectlotag, int fz, int cz)
p->jetpack_on = 0; p->jetpack_on = 0;
p->holoduke_on = -1; p->holoduke_on = -1;
if (!isRR())S_StopEnvSound(DUKE_JETPACK_IDLE, pi); if (!isRR())S_StopSound(DUKE_JETPACK_IDLE, pi);
S_StopEnvSound(-1, pi, CHAN_VOICE); S_StopSound(-1, pi, CHAN_VOICE);
if (s->pal != 1 && (s->cstat & 32768) == 0) s->cstat = 0; if (s->pal != 1 && (s->cstat & 32768) == 0) s->cstat = 0;
@ -667,7 +667,7 @@ int endoflevel(int snum)
#if 0 #if 0
if (ud.recstat == 1) closedemowrite(); if (ud.recstat == 1) closedemowrite();
#endif #endif
sound(PIPEBOMB_EXPLODE); S_PlaySound(PIPEBOMB_EXPLODE);
SetPlayerPal(p, PalEntry(48, 64, 64, 64)); SetPlayerPal(p, PalEntry(48, 64, 64, 64));
} }
if (p->fist_incs > 42) if (p->fist_incs > 42)
@ -693,7 +693,7 @@ int timedexit(int snum)
FX_StopAllSounds(); FX_StopAllSounds();
if (p->customexitsound >= 0) if (p->customexitsound >= 0)
{ {
sound(p->customexitsound); S_PlaySound(p->customexitsound);
FTA(102, p); FTA(102, p);
} }
} }

View file

@ -364,7 +364,7 @@ void shoot_d(int i, int atwith)
{ {
k = fi.spawn(j, SMALLSMOKE); k = fi.spawn(j, SMALLSMOKE);
sprite[k].z -= (8 << 8); sprite[k].z -= (8 << 8);
spritesound(KICK_HIT, j); S_PlayActorSound(KICK_HIT, j);
} }
if (p >= 0 && ps[p].steroids_amount > 0 && ps[p].steroids_amount < 400) if (p >= 0 && ps[p].steroids_amount > 0 && ps[p].steroids_amount < 400)
@ -767,7 +767,7 @@ void shoot_d(int i, int atwith)
} }
else zvel = (100 - ps[p].gethorizsum()) * 81; else zvel = (100 - ps[p].gethorizsum()) * 81;
if (atwith == RPG) if (atwith == RPG)
spritesound(RPG_SHOOT, i); S_PlayActorSound(RPG_SHOOT, i);
} }
else else
@ -934,7 +934,7 @@ void shoot_d(int i, int atwith)
} }
sprite[k].hitag = k; sprite[k].hitag = k;
spritesound(LASERTRIP_ONWALL, k); S_PlayActorSound(LASERTRIP_ONWALL, k);
sprite[k].xvel = -20; sprite[k].xvel = -20;
ssp(k, CLIPMASK0); ssp(k, CLIPMASK0);
sprite[k].cstat = 16; sprite[k].cstat = 16;
@ -1334,9 +1334,9 @@ int doincrements_d(struct player_struct* p)
if (p->last_pissed_time == (26 * 219)) if (p->last_pissed_time == (26 * 219))
{ {
spritesound(FLUSH_TOILET, p->i); S_PlayActorSound(FLUSH_TOILET, p->i);
if (snum == screenpeek || ud.coop == 1) if (snum == screenpeek || ud.coop == 1)
spritesound(DUKE_PISSRELIEF, p->i); S_PlayActorSound(DUKE_PISSRELIEF, p->i);
} }
if (p->last_pissed_time == (26 * 218)) if (p->last_pissed_time == (26 * 218))
@ -1363,7 +1363,7 @@ int doincrements_d(struct player_struct* p)
checkavailinven(p); checkavailinven(p);
if (!(p->steroids_amount & 7)) if (!(p->steroids_amount & 7))
if (snum == screenpeek || ud.coop == 1) if (snum == screenpeek || ud.coop == 1)
spritesound(DUKE_HARTBEAT, p->i); S_PlayActorSound(DUKE_HARTBEAT, p->i);
} }
if (p->heat_on && p->heat_amount > 0) if (p->heat_on && p->heat_amount > 0)
@ -1373,7 +1373,7 @@ int doincrements_d(struct player_struct* p)
{ {
p->heat_on = 0; p->heat_on = 0;
checkavailinven(p); checkavailinven(p);
spritesound(NITEVISION_ONOFF, p->i); S_PlayActorSound(NITEVISION_ONOFF, p->i);
setpal(p); setpal(p);
} }
} }
@ -1383,7 +1383,7 @@ int doincrements_d(struct player_struct* p)
p->holoduke_amount--; p->holoduke_amount--;
if (p->holoduke_amount <= 0) if (p->holoduke_amount <= 0)
{ {
spritesound(TELEPORTER, p->i); S_PlayActorSound(TELEPORTER, p->i);
p->holoduke_on = -1; p->holoduke_on = -1;
checkavailinven(p); checkavailinven(p);
} }
@ -1396,9 +1396,9 @@ int doincrements_d(struct player_struct* p)
{ {
p->jetpack_on = 0; p->jetpack_on = 0;
checkavailinven(p); checkavailinven(p);
spritesound(DUKE_JETPACK_OFF, p->i); S_PlayActorSound(DUKE_JETPACK_OFF, p->i);
S_StopEnvSound(DUKE_JETPACK_IDLE, p->i); S_StopSound(DUKE_JETPACK_IDLE, p->i);
S_StopEnvSound(DUKE_JETPACK_ON, p->i); S_StopSound(DUKE_JETPACK_ON, p->i);
} }
} }
@ -1463,7 +1463,7 @@ int doincrements_d(struct player_struct* p)
{ {
p->extra_extra8 += 32; p->extra_extra8 += 32;
if (p->last_extra < (max_player_health >> 1) && (p->last_extra & 3) == 0) if (p->last_extra < (max_player_health >> 1) && (p->last_extra & 3) == 0)
spritesound(DUKE_LONGTERM_PAIN, p->i); S_PlayActorSound(DUKE_LONGTERM_PAIN, p->i);
} }
} }
} }
@ -1486,10 +1486,10 @@ int doincrements_d(struct player_struct* p)
if (snum == screenpeek || ud.coop == 1) if (snum == screenpeek || ud.coop == 1)
{ {
if (rand() & 1) if (rand() & 1)
spritesound(DUKE_CRACK, p->i); S_PlayActorSound(DUKE_CRACK, p->i);
else spritesound(DUKE_CRACK2, p->i); else S_PlayActorSound(DUKE_CRACK2, p->i);
} }
spritesound(DUKE_CRACK_FIRST, p->i); S_PlayActorSound(DUKE_CRACK_FIRST, p->i);
} }
else if (p->knuckle_incs == 22 || PlayerInput(snum, SKB_FIRE)) else if (p->knuckle_incs == 22 || PlayerInput(snum, SKB_FIRE))
p->knuckle_incs = 0; p->knuckle_incs = 0;
@ -1564,8 +1564,8 @@ static void operateJetpack(int snum, ESyncBits sb_snum, int psectlotag, int fz,
p->jetpack_on++; p->jetpack_on++;
p->posz -= (p->jetpack_on << 7); //Goin up p->posz -= (p->jetpack_on << 7); //Goin up
} }
else if (p->jetpack_on == 11 && !A_CheckSoundPlaying(pi, DUKE_JETPACK_IDLE)) else if (p->jetpack_on == 11 && !S_CheckActorSoundPlaying(pi, DUKE_JETPACK_IDLE))
spritesound(DUKE_JETPACK_IDLE, pi); S_PlayActorSound(DUKE_JETPACK_IDLE, pi);
if (shrunk) j = 512; if (shrunk) j = 512;
else j = 2048; else j = 2048;
@ -1677,7 +1677,7 @@ static void movement(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int
{ {
p->falling_counter++; p->falling_counter++;
if (p->falling_counter == 38) if (p->falling_counter == 38)
p->scream_voice = spritesound(DUKE_SCREAM, pi); p->scream_voice = S_PlayActorSound(DUKE_SCREAM, pi);
} }
if ((p->posz + p->poszv) >= (fz - (i << 8))) // hit the ground if ((p->posz + p->poszv) >= (fz - (i << 8))) // hit the ground
@ -1691,18 +1691,18 @@ static void movement(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int
sprite[pi].extra -= j - (krand() & 3); sprite[pi].extra -= j - (krand() & 3);
if (sprite[pi].extra <= 0) if (sprite[pi].extra <= 0)
{ {
spritesound(SQUISHED, pi); S_PlayActorSound(SQUISHED, pi);
SetPlayerPal(p, PalEntry(63, 63, 0, 0)); SetPlayerPal(p, PalEntry(63, 63, 0, 0));
} }
else else
{ {
spritesound(DUKE_LAND, pi); S_PlayActorSound(DUKE_LAND, pi);
spritesound(DUKE_LAND_HURT, pi); S_PlayActorSound(DUKE_LAND_HURT, pi);
} }
SetPlayerPal(p, PalEntry(32, 16, 0, 0)); SetPlayerPal(p, PalEntry(32, 16, 0, 0));
} }
else if (p->poszv > 2048) spritesound(DUKE_LAND, pi); else if (p->poszv > 2048) S_PlayActorSound(DUKE_LAND, pi);
} }
} }
} }
@ -1710,7 +1710,7 @@ static void movement(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int
else else
{ {
p->falling_counter = 0; p->falling_counter = 0;
S_StopEnvSound(-1, pi, CHAN_VOICE); S_StopSound(-1, pi, CHAN_VOICE);
if (psectlotag != 1 && psectlotag != 2 && p->on_ground == 0 && p->poszv > (6144 >> 1)) if (psectlotag != 1 && psectlotag != 2 && p->on_ground == 0 && p->poszv > (6144 >> 1))
p->hard_landing = p->poszv >> 10; p->hard_landing = p->poszv >> 10;
@ -1815,8 +1815,8 @@ static void underwater(int snum, ESyncBits sb_snum, int psect, int fz, int cz)
p->pycount &= 2047; p->pycount &= 2047;
p->pyoff = sintable[p->pycount] >> 7; p->pyoff = sintable[p->pycount] >> 7;
if (!A_CheckSoundPlaying(pi, DUKE_UNDERWATER)) if (!S_CheckActorSoundPlaying(pi, DUKE_UNDERWATER))
A_PlaySound(DUKE_UNDERWATER, pi); S_PlayActorSound(DUKE_UNDERWATER, pi);
if (sb_snum & SKB_JUMP) if (sb_snum & SKB_JUMP)
{ {
@ -1993,13 +1993,13 @@ static void fireweapon(int snum)
if (p->ammo_amount[GROW_WEAPON] > 0) if (p->ammo_amount[GROW_WEAPON] > 0)
{ {
p->kickback_pic = 1; p->kickback_pic = 1;
spritesound(EXPANDERSHOOT, pi); S_PlayActorSound(EXPANDERSHOOT, pi);
} }
} }
else if (p->ammo_amount[SHRINKER_WEAPON] > 0) else if (p->ammo_amount[SHRINKER_WEAPON] > 0)
{ {
p->kickback_pic = 1; p->kickback_pic = 1;
spritesound(SHRINKER_FIRE, pi); S_PlayActorSound(SHRINKER_FIRE, pi);
} }
break; break;
@ -2007,7 +2007,7 @@ static void fireweapon(int snum)
if (p->ammo_amount[FREEZE_WEAPON] > 0) if (p->ammo_amount[FREEZE_WEAPON] > 0)
{ {
p->kickback_pic = 1; p->kickback_pic = 1;
spritesound(CAT_FIRE, pi); S_PlayActorSound(CAT_FIRE, pi);
} }
break; break;
case DEVISTATOR_WEAPON: case DEVISTATOR_WEAPON:
@ -2015,7 +2015,7 @@ static void fireweapon(int snum)
{ {
p->kickback_pic = 1; p->kickback_pic = 1;
p->hbomb_hold_delay = !p->hbomb_hold_delay; p->hbomb_hold_delay = !p->hbomb_hold_delay;
spritesound(CAT_FIRE, pi); S_PlayActorSound(CAT_FIRE, pi);
} }
break; break;
@ -2031,7 +2031,7 @@ static void fireweapon(int snum)
{ {
p->kickback_pic = 1; p->kickback_pic = 1;
if (sector[p->cursectnum].lotag != 2) if (sector[p->cursectnum].lotag != 2)
spritesound(FLAMETHROWER_INTRO, pi); S_PlayActorSound(FLAMETHROWER_INTRO, pi);
} }
break; break;
@ -2153,7 +2153,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
if (p->kickback_pic == 1) if (p->kickback_pic == 1)
{ {
fi.shoot(pi, SHOTSPARK1); fi.shoot(pi, SHOTSPARK1);
spritesound(PISTOL_FIRE, pi); S_PlayActorSound(PISTOL_FIRE, pi);
lastvisinc = (int)totalclock + 32; lastvisinc = (int)totalclock + 32;
p->visibility = 0; p->visibility = 0;
} }
@ -2175,14 +2175,14 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
switch (p->kickback_pic) switch (p->kickback_pic)
{ {
case 5: case 5:
spritesound(EJECT_CLIP, pi); S_PlayActorSound(EJECT_CLIP, pi);
break; break;
//#ifdef NAM //#ifdef NAM
// case WEAPON2_RELOAD_TIME - 15: // case WEAPON2_RELOAD_TIME - 15:
//#else //#else
case 8: case 8:
//#endif //#endif
spritesound(INSERT_CLIP, pi); S_PlayActorSound(INSERT_CLIP, pi);
break; break;
} }
} }
@ -2211,7 +2211,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
fi.shoot(pi, SHOTGUN); fi.shoot(pi, SHOTGUN);
p->ammo_amount[SHOTGUN_WEAPON]--; p->ammo_amount[SHOTGUN_WEAPON]--;
spritesound(SHOTGUN_FIRE, pi); S_PlayActorSound(SHOTGUN_FIRE, pi);
lastvisinc = (int)totalclock + 32; lastvisinc = (int)totalclock + 32;
p->visibility = 0; p->visibility = 0;
@ -2224,7 +2224,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
checkavailweapon(p); checkavailweapon(p);
break; break;
case 15: case 15:
spritesound(SHOTGUN_COCK, pi); S_PlayActorSound(SHOTGUN_COCK, pi);
break; break;
case 17: case 17:
case 20: case 20:
@ -2264,7 +2264,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
ssp(j, CLIPMASK0); ssp(j, CLIPMASK0);
} }
spritesound(CHAINGUN_FIRE, pi); S_PlayActorSound(CHAINGUN_FIRE, pi);
fi.shoot(pi, CHAINGUN); fi.shoot(pi, CHAINGUN);
lastvisinc = (int)totalclock + 32; lastvisinc = (int)totalclock + 32;
p->visibility = 0; p->visibility = 0;
@ -2413,7 +2413,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
if (sb_snum & SKB_FIRE) if (sb_snum & SKB_FIRE)
{ {
p->kickback_pic = 1; p->kickback_pic = 1;
spritesound(CAT_FIRE, pi); S_PlayActorSound(CAT_FIRE, pi);
} }
else p->kickback_pic = 0; else p->kickback_pic = 0;
} }
@ -2439,7 +2439,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
if ((sb_snum & SKB_FIRE) != 0) if ((sb_snum & SKB_FIRE) != 0)
{ {
p->kickback_pic = 1; p->kickback_pic = 1;
spritesound(FLAMETHROWER_INTRO, pi); S_PlayActorSound(FLAMETHROWER_INTRO, pi);
} }
else else
p->kickback_pic = 0; p->kickback_pic = 0;
@ -2611,7 +2611,7 @@ void processinput_d(int snum)
if (s->extra > 0 && ud.clipping == 0) if (s->extra > 0 && ud.clipping == 0)
{ {
quickkill(p); quickkill(p);
spritesound(SQUISHED, pi); S_PlayActorSound(SQUISHED, pi);
} }
psect = 0; psect = 0;
} }
@ -2824,8 +2824,8 @@ void processinput_d(int snum)
} }
else else
{ {
if (!A_CheckSoundPlaying(p->i, DUKE_LONGTERM_PAIN)) if (!S_CheckActorSoundPlaying(p->i, DUKE_LONGTERM_PAIN))
A_PlaySound(DUKE_LONGTERM_PAIN, p->i); S_PlayActorSound(DUKE_LONGTERM_PAIN, p->i);
SetPlayerPal(p, PalEntry(32, 0, 8, 0)); SetPlayerPal(p, PalEntry(32, 0, 8, 0));
s->extra--; s->extra--;
} }
@ -2870,14 +2870,14 @@ void processinput_d(int snum)
{ {
case PANNEL1: case PANNEL1:
case PANNEL2: case PANNEL2:
spritesound(DUKE_WALKINDUCTS, pi); S_PlayActorSound(DUKE_WALKINDUCTS, pi);
p->walking_snd_toggle = 1; p->walking_snd_toggle = 1;
break; break;
} }
break; break;
case 1: case 1:
if ((krand() & 1) == 0) if ((krand() & 1) == 0)
spritesound(DUKE_ONWATER, pi); S_PlayActorSound(DUKE_ONWATER, pi);
p->walking_snd_toggle = 1; p->walking_snd_toggle = 1;
break; break;
} }
@ -2987,8 +2987,8 @@ HORIZONLY:
} }
if (truefdist < PHEIGHT && p->on_ground && psectlotag != 1 && shrunk == 0 && sector[p->cursectnum].lotag == 1) if (truefdist < PHEIGHT && p->on_ground && psectlotag != 1 && shrunk == 0 && sector[p->cursectnum].lotag == 1)
if (!A_CheckSoundPlaying(pi, DUKE_ONWATER)) if (!S_CheckActorSoundPlaying(pi, DUKE_ONWATER))
spritesound(DUKE_ONWATER, pi); S_PlayActorSound(DUKE_ONWATER, pi);
if (p->cursectnum != s->sectnum) if (p->cursectnum != s->sectnum)
changespritesect(pi, p->cursectnum); changespritesect(pi, p->cursectnum);

View file

@ -262,9 +262,9 @@ void shoot_r(int i, int atwith)
k = fi.spawn(j, SMALLSMOKE); k = fi.spawn(j, SMALLSMOKE);
sprite[k].z -= (8 << 8); sprite[k].z -= (8 << 8);
if (atwith == KNEE) if (atwith == KNEE)
spritesound(KICK_HIT, j); S_PlayActorSound(KICK_HIT, j);
else if (isRRRA() && atwith == SLINGBLADE) else if (isRRRA() && atwith == SLINGBLADE)
spritesound(260, j); S_PlayActorSound(260, j);
} }
if (p >= 0 && ps[p].steroids_amount > 0 && ps[p].steroids_amount < 400) if (p >= 0 && ps[p].steroids_amount > 0 && ps[p].steroids_amount < 400)
@ -798,13 +798,13 @@ void shoot_r(int i, int atwith)
} }
else zvel = (100 - ps[p].gethorizsum()) * 81; else zvel = (100 - ps[p].gethorizsum()) * 81;
if (atwith == RPG) if (atwith == RPG)
spritesound(RPG_SHOOT, i); S_PlayActorSound(RPG_SHOOT, i);
else if (isRRRA()) else if (isRRRA())
{ {
if (atwith == RPG2) if (atwith == RPG2)
spritesound(244, i); S_PlayActorSound(244, i);
else if (atwith == RRTILE1790) else if (atwith == RRTILE1790)
spritesound(94, i); S_PlayActorSound(94, i);
} }
} }
@ -1074,7 +1074,7 @@ void selectweapon_r(int snum, int j)
case SLINGBLADE_WEAPON: case SLINGBLADE_WEAPON:
if (isRRRA()) if (isRRRA())
{ {
spritesound(496, ps[screenpeek].i); S_PlayActorSound(496, ps[screenpeek].i);
fi.addweapon(p, j); fi.addweapon(p, j);
} }
break; break;
@ -1205,8 +1205,8 @@ int doincrements_r(struct player_struct* p)
} }
if (p->drink_amt >= 100) if (p->drink_amt >= 100)
{ {
if (!A_CheckSoundPlaying(p->i, 420)) if (!S_CheckActorSoundPlaying(p->i, 420))
spritesound(420, p->i); S_PlayActorSound(420, p->i);
p->drink_amt -= 9; p->drink_amt -= 9;
p->eat >>= 1; p->eat >>= 1;
} }
@ -1220,16 +1220,16 @@ int doincrements_r(struct player_struct* p)
switch (krand() & 3) switch (krand() & 3)
{ {
case 0: case 0:
spritesound(404, p->i); S_PlayActorSound(404, p->i);
break; break;
case 1: case 1:
spritesound(422, p->i); S_PlayActorSound(422, p->i);
break; break;
case 2: case 2:
spritesound(423, p->i); S_PlayActorSound(423, p->i);
break; break;
case 3: case 3:
spritesound(424, p->i); S_PlayActorSound(424, p->i);
break; break;
} }
if (numplayers < 2) if (numplayers < 2)
@ -1259,17 +1259,17 @@ int doincrements_r(struct player_struct* p)
if (adult_lockout == 0) if (adult_lockout == 0)
{ {
if (p->last_pissed_time == 5662) if (p->last_pissed_time == 5662)
spritesound(434, p->i); S_PlayActorSound(434, p->i);
else if (p->last_pissed_time == 5567) else if (p->last_pissed_time == 5567)
spritesound(434, p->i); S_PlayActorSound(434, p->i);
else if (p->last_pissed_time == 5472) else if (p->last_pissed_time == 5472)
spritesound(433, p->i); S_PlayActorSound(433, p->i);
else if (p->last_pissed_time == 5072) else if (p->last_pissed_time == 5072)
spritesound(435, p->i); S_PlayActorSound(435, p->i);
else if (p->last_pissed_time == 5014) else if (p->last_pissed_time == 5014)
spritesound(434, p->i); S_PlayActorSound(434, p->i);
else if (p->last_pissed_time == 4919) else if (p->last_pissed_time == 4919)
spritesound(433, p->i); S_PlayActorSound(433, p->i);
} }
if (p->last_pissed_time == 5668) if (p->last_pissed_time == 5668)
@ -1300,7 +1300,7 @@ int doincrements_r(struct player_struct* p)
} }
if (!(p->steroids_amount & 14)) if (!(p->steroids_amount & 14))
if (snum == screenpeek || ud.coop == 1) if (snum == screenpeek || ud.coop == 1)
spritesound(DUKE_TAKEPILLS, p->i); S_PlayActorSound(DUKE_TAKEPILLS, p->i);
} }
if (p->access_incs && sprite[p->i].pal != 1) if (p->access_incs && sprite[p->i].pal != 1)
@ -1357,7 +1357,7 @@ int doincrements_r(struct player_struct* p)
{ {
p->extra_extra8 += 32; p->extra_extra8 += 32;
if (p->last_extra < (max_player_health >> 1) && (p->last_extra & 3) == 0) if (p->last_extra < (max_player_health >> 1) && (p->last_extra & 3) == 0)
spritesound(DUKE_LONGTERM_PAIN, p->i); S_PlayActorSound(DUKE_LONGTERM_PAIN, p->i);
} }
} }
} }
@ -1398,14 +1398,14 @@ int doincrements_r(struct player_struct* p)
case levelnum(1, 5): snd = 255; break; case levelnum(1, 5): snd = 255; break;
case levelnum(1, 6): snd = 283; break; case levelnum(1, 6): snd = 283; break;
} }
spritesound(snd, p->i); S_PlayActorSound(snd, p->i);
} }
else if (totalclock > 1024) else if (totalclock > 1024)
if (snum == screenpeek || ud.coop == 1) if (snum == screenpeek || ud.coop == 1)
{ {
if (rand() & 1) if (rand() & 1)
spritesound(DUKE_CRACK, p->i); S_PlayActorSound(DUKE_CRACK, p->i);
else spritesound(DUKE_CRACK2, p->i); else S_PlayActorSound(DUKE_CRACK2, p->i);
} }
} }
else if (p->knuckle_incs == 22 || PlayerInput(snum, SKB_FIRE)) else if (p->knuckle_incs == 22 || PlayerInput(snum, SKB_FIRE))
@ -1536,42 +1536,42 @@ static void onMotorcycle(int snum, ESyncBits &sb_snum)
{ {
if (p->MotoSpeed == 0 && var64) if (p->MotoSpeed == 0 && var64)
{ {
if (!A_CheckSoundPlaying(pi, 187)) if (!S_CheckActorSoundPlaying(pi, 187))
spritesound(187, pi); S_PlayActorSound(187, pi);
} }
else if (p->MotoSpeed == 0 && !A_CheckSoundPlaying(pi, 214)) else if (p->MotoSpeed == 0 && !S_CheckActorSoundPlaying(pi, 214))
{ {
if (A_CheckSoundPlaying(pi, 187)) if (S_CheckActorSoundPlaying(pi, 187))
S_StopEnvSound(187, pi); S_StopSound(187, pi);
spritesound(214, pi); S_PlayActorSound(214, pi);
} }
else if (p->MotoSpeed >= 50 && !A_CheckSoundPlaying(pi, 188)) else if (p->MotoSpeed >= 50 && !S_CheckActorSoundPlaying(pi, 188))
{ {
A_PlaySound(188, pi); S_PlayActorSound(188, pi);
} }
else if (!A_CheckSoundPlaying(pi, 188) && !A_CheckSoundPlaying(pi, 214)) else if (!S_CheckActorSoundPlaying(pi, 188) && !S_CheckActorSoundPlaying(pi, 214))
{ {
A_PlaySound(188, pi); S_PlayActorSound(188, pi);
} }
} }
} }
else else
{ {
var68 = 0; var68 = 0;
if (A_CheckSoundPlaying(pi, 214)) if (S_CheckActorSoundPlaying(pi, 214))
{ {
S_StopEnvSound(214, pi); S_StopSound(214, pi);
if (!A_CheckSoundPlaying(pi, 189)) if (!S_CheckActorSoundPlaying(pi, 189))
A_PlaySound(189, pi); S_PlayActorSound(189, pi);
} }
if (A_CheckSoundPlaying(pi, 188)) if (S_CheckActorSoundPlaying(pi, 188))
{ {
S_StopEnvSound(188, pi); S_StopSound(188, pi);
if (!A_CheckSoundPlaying(pi, 189)) if (!S_CheckActorSoundPlaying(pi, 189))
A_PlaySound(189, pi); S_PlayActorSound(189, pi);
} }
if (!A_CheckSoundPlaying(pi, 189) && !A_CheckSoundPlaying(pi, 187)) if (!S_CheckActorSoundPlaying(pi, 189) && !S_CheckActorSoundPlaying(pi, 187))
A_PlaySound(187, pi); S_PlayActorSound(187, pi);
} }
if (sb_snum & SKB_AIM_UP) if (sb_snum & SKB_AIM_UP)
{ {
@ -1761,8 +1761,8 @@ static void onMotorcycle(int snum, ESyncBits &sb_snum)
p->posxv += (var8c >> 5) * (sintable[(var94 * -51 + var90 + 512) & 2047] << 4); p->posxv += (var8c >> 5) * (sintable[(var94 * -51 + var90 + 512) & 2047] << 4);
p->posyv += (var8c >> 5) * (sintable[(var94 * -51 + var90) & 2047] << 4); p->posyv += (var8c >> 5) * (sintable[(var94 * -51 + var90) & 2047] << 4);
p->setang((var90 - (var98 >> 4)) & 2047); p->setang((var90 - (var98 >> 4)) & 2047);
if (!A_CheckSoundPlaying(pi, 220)) if (!S_CheckActorSoundPlaying(pi, 220))
A_PlaySound(220, pi); S_PlayActorSound(220, pi);
} }
else else
{ {
@ -1811,13 +1811,13 @@ static void onBoat(int snum, ESyncBits& sb_snum)
{ {
if (p->MotoSpeed > 0) if (p->MotoSpeed > 0)
{ {
if (!A_CheckSoundPlaying(pi, 88)) if (!S_CheckActorSoundPlaying(pi, 88))
A_PlaySound(88, pi); S_PlayActorSound(88, pi);
} }
else else
{ {
if (!A_CheckSoundPlaying(pi, 87)) if (!S_CheckActorSoundPlaying(pi, 87))
A_PlaySound(87, pi); S_PlayActorSound(87, pi);
} }
} }
if (p->MotoSpeed < 0) if (p->MotoSpeed < 0)
@ -1835,34 +1835,34 @@ static void onBoat(int snum, ESyncBits& sb_snum)
{ {
varac = 1; varac = 1;
sb_snum &= ~SKB_JUMP; sb_snum &= ~SKB_JUMP;
if (p->MotoSpeed == 0 && !A_CheckSoundPlaying(pi, 89)) if (p->MotoSpeed == 0 && !S_CheckActorSoundPlaying(pi, 89))
{ {
if (A_CheckSoundPlaying(pi, 87)) if (S_CheckActorSoundPlaying(pi, 87))
S_StopEnvSound(pi, 87); S_StopSound(pi, 87);
A_PlaySound(89, pi); S_PlayActorSound(89, pi);
} }
else if (p->MotoSpeed >= 50 && !A_CheckSoundPlaying(pi, 88)) else if (p->MotoSpeed >= 50 && !S_CheckActorSoundPlaying(pi, 88))
A_PlaySound(88, pi); S_PlayActorSound(88, pi);
else if (!A_CheckSoundPlaying(pi, 88) && !A_CheckSoundPlaying(pi, 89)) else if (!S_CheckActorSoundPlaying(pi, 88) && !S_CheckActorSoundPlaying(pi, 89))
A_PlaySound(88, pi); S_PlayActorSound(88, pi);
} }
else else
{ {
varac = 0; varac = 0;
if (A_CheckSoundPlaying(pi, 89)) if (S_CheckActorSoundPlaying(pi, 89))
{ {
S_StopEnvSound(pi, 89); S_StopSound(pi, 89);
if (!A_CheckSoundPlaying(pi, 90)) if (!S_CheckActorSoundPlaying(pi, 90))
A_PlaySound(90, pi); S_PlayActorSound(90, pi);
} }
if (A_CheckSoundPlaying(pi, 88)) if (S_CheckActorSoundPlaying(pi, 88))
{ {
S_StopEnvSound(pi, 88); S_StopSound(pi, 88);
if (!A_CheckSoundPlaying(pi, 90)) if (!S_CheckActorSoundPlaying(pi, 90))
A_PlaySound(90, pi); S_PlayActorSound(90, pi);
} }
if (!A_CheckSoundPlaying(pi, 90) && !A_CheckSoundPlaying(pi, 87)) if (!S_CheckActorSoundPlaying(pi, 90) && !S_CheckActorSoundPlaying(pi, 87))
A_PlaySound(87, pi); S_PlayActorSound(87, pi);
} }
if (sb_snum & SKB_CROUCH) if (sb_snum & SKB_CROUCH)
@ -1883,8 +1883,8 @@ static void onBoat(int snum, ESyncBits& sb_snum)
varb8 = 1; varb8 = 1;
varbc = 1; varbc = 1;
sb_snum &= ~SKB_AIM_DOWN; sb_snum &= ~SKB_AIM_DOWN;
if (!A_CheckSoundPlaying(pi, 91) && p->MotoSpeed > 30 && !p->NotOnWater) if (!S_CheckActorSoundPlaying(pi, 91) && p->MotoSpeed > 30 && !p->NotOnWater)
A_PlaySound(91, pi); S_PlayActorSound(91, pi);
} }
else else
{ {
@ -1896,8 +1896,8 @@ static void onBoat(int snum, ESyncBits& sb_snum)
varc0 = 1; varc0 = 1;
varc4 = 1; varc4 = 1;
sb_snum &= ~SKB_LOOK_LEFT; sb_snum &= ~SKB_LOOK_LEFT;
if (!A_CheckSoundPlaying(pi, 91) && p->MotoSpeed > 30 && !p->NotOnWater) if (!S_CheckActorSoundPlaying(pi, 91) && p->MotoSpeed > 30 && !p->NotOnWater)
A_PlaySound(91, pi); S_PlayActorSound(91, pi);
} }
else else
{ {
@ -1931,8 +1931,8 @@ static void onBoat(int snum, ESyncBits& sb_snum)
if (p->MotoSpeed <= 25) if (p->MotoSpeed <= 25)
{ {
p->MotoSpeed++; p->MotoSpeed++;
if (!A_CheckSoundPlaying(pi, 182)) if (!S_CheckActorSoundPlaying(pi, 182))
A_PlaySound(182, pi); S_PlayActorSound(182, pi);
} }
else else
{ {
@ -2152,15 +2152,15 @@ static void movement(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int
p->moto_bump_fast = 1; p->moto_bump_fast = 1;
p->poszv -= gc * (p->MotoSpeed >> 4); p->poszv -= gc * (p->MotoSpeed >> 4);
p->MotoOnGround = 0; p->MotoOnGround = 0;
if (A_CheckSoundPlaying(pi, 188)) if (S_CheckActorSoundPlaying(pi, 188))
S_StopEnvSound(188, pi); S_StopSound(188, pi);
spritesound(189, pi); S_PlayActorSound(189, pi);
} }
else else
{ {
p->poszv += gc - 80 + (120 - p->MotoSpeed); p->poszv += gc - 80 + (120 - p->MotoSpeed);
if (!A_CheckSoundPlaying(pi, 189) && !A_CheckSoundPlaying(pi, 190)) if (!S_CheckActorSoundPlaying(pi, 189) && !S_CheckActorSoundPlaying(pi, 190))
A_PlaySound(190, pi); S_PlayActorSound(190, pi);
} }
} }
else else
@ -2171,7 +2171,7 @@ static void movement(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int
{ {
p->falling_counter++; p->falling_counter++;
if (p->falling_counter == 38) if (p->falling_counter == 38)
p->scream_voice = spritesound(DUKE_SCREAM, pi); p->scream_voice = S_PlayActorSound(DUKE_SCREAM, pi);
} }
if ((p->posz + p->poszv) >= (fz - (i << 8))) // hit the ground if ((p->posz + p->poszv) >= (fz - (i << 8))) // hit the ground
@ -2187,12 +2187,12 @@ static void movement(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int
s->extra -= j - (krand() & 3); s->extra -= j - (krand() & 3);
if (s->extra <= 0) if (s->extra <= 0)
{ {
spritesound(SQUISHED, pi); S_PlayActorSound(SQUISHED, pi);
} }
else else
{ {
spritesound(DUKE_LAND, pi); S_PlayActorSound(DUKE_LAND, pi);
spritesound(DUKE_LAND_HURT, pi); S_PlayActorSound(DUKE_LAND_HURT, pi);
} }
SetPlayerPal(p, PalEntry(32, 16, 0, 0)); SetPlayerPal(p, PalEntry(32, 16, 0, 0));
@ -2201,16 +2201,16 @@ static void movement(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int
{ {
if (p->OnMotorcycle) if (p->OnMotorcycle)
{ {
if (A_CheckSoundPlaying(pi, 190)) if (S_CheckActorSoundPlaying(pi, 190))
S_StopEnvSound(pi, 190); S_StopSound(pi, 190);
spritesound(191, pi); S_PlayActorSound(191, pi);
p->TurbCount = 12; p->TurbCount = 12;
} }
else spritesound(DUKE_LAND, pi); else S_PlayActorSound(DUKE_LAND, pi);
} }
else if (p->poszv > 1024 && p->OnMotorcycle) else if (p->poszv > 1024 && p->OnMotorcycle)
{ {
spritesound(DUKE_LAND, pi); S_PlayActorSound(DUKE_LAND, pi);
p->TurbCount = 12; p->TurbCount = 12;
} }
} }
@ -2220,7 +2220,7 @@ static void movement(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int
else else
{ {
p->falling_counter = 0; p->falling_counter = 0;
S_StopEnvSound(-1, pi, CHAN_VOICE); S_StopSound(-1, pi, CHAN_VOICE);
if (psectlotag != ST_1_ABOVE_WATER && psectlotag != ST_2_UNDERWATER && p->on_ground == 0 && p->poszv > (6144 >> 1)) if (psectlotag != ST_1_ABOVE_WATER && psectlotag != ST_2_UNDERWATER && p->on_ground == 0 && p->poszv > (6144 >> 1))
p->hard_landing = p->poszv >> 10; p->hard_landing = p->poszv >> 10;
@ -2320,8 +2320,8 @@ static void underwater(int snum, ESyncBits sb_snum, int psect, int fz, int cz)
p->pycount &= 2047; p->pycount &= 2047;
p->pyoff = sintable[p->pycount] >> 7; p->pyoff = sintable[p->pycount] >> 7;
if (!A_CheckSoundPlaying(pi, DUKE_UNDERWATER)) if (!S_CheckActorSoundPlaying(pi, DUKE_UNDERWATER))
A_PlaySound(DUKE_UNDERWATER, pi); S_PlayActorSound(DUKE_UNDERWATER, pi);
if ((sb_snum & SKB_JUMP) && !p->OnMotorcycle) if ((sb_snum & SKB_JUMP) && !p->OnMotorcycle)
{ {
@ -2410,38 +2410,38 @@ void onMotorcycleMove(int snum, int psect, int j)
{ {
var104 = (p->MotoSpeed * p->MotoSpeed) >> 8; var104 = (p->MotoSpeed * p->MotoSpeed) >> 8;
p->MotoSpeed = 0; p->MotoSpeed = 0;
if (A_CheckSoundPlaying(pi, 238) == 0) if (S_CheckActorSoundPlaying(pi, 238) == 0)
A_PlaySound(238, pi); S_PlayActorSound(238, pi);
} }
else if (var10c >= 311 && var10c <= 711) else if (var10c >= 311 && var10c <= 711)
{ {
var104 = (p->MotoSpeed * p->MotoSpeed) >> 11; var104 = (p->MotoSpeed * p->MotoSpeed) >> 11;
p->MotoSpeed -= (p->MotoSpeed >> 1) + (p->MotoSpeed >> 2); p->MotoSpeed -= (p->MotoSpeed >> 1) + (p->MotoSpeed >> 2);
if (A_CheckSoundPlaying(pi, 238) == 0) if (S_CheckActorSoundPlaying(pi, 238) == 0)
A_PlaySound(238, pi); S_PlayActorSound(238, pi);
} }
else if (var10c >= 111 && var10c <= 911) else if (var10c >= 111 && var10c <= 911)
{ {
var104 = (p->MotoSpeed * p->MotoSpeed) >> 14; var104 = (p->MotoSpeed * p->MotoSpeed) >> 14;
p->MotoSpeed -= (p->MotoSpeed >> 1); p->MotoSpeed -= (p->MotoSpeed >> 1);
if (A_CheckSoundPlaying(pi, 239) == 0) if (S_CheckActorSoundPlaying(pi, 239) == 0)
A_PlaySound(239, pi); S_PlayActorSound(239, pi);
} }
else else
{ {
var104 = (p->MotoSpeed * p->MotoSpeed) >> 15; var104 = (p->MotoSpeed * p->MotoSpeed) >> 15;
p->MotoSpeed -= (p->MotoSpeed >> 3); p->MotoSpeed -= (p->MotoSpeed >> 3);
if (A_CheckSoundPlaying(pi, 240) == 0) if (S_CheckActorSoundPlaying(pi, 240) == 0)
A_PlaySound(240, pi); S_PlayActorSound(240, pi);
} }
s->extra -= var104; s->extra -= var104;
if (s->extra <= 0) if (s->extra <= 0)
{ {
spritesound(SQUISHED, pi); S_PlayActorSound(SQUISHED, pi);
SetPlayerPal(p, PalEntry(63, 63, 0, 0)); SetPlayerPal(p, PalEntry(63, 63, 0, 0));
} }
else if (var104) else if (var104)
spritesound(DUKE_LAND_HURT, pi); S_PlayActorSound(DUKE_LAND_HURT, pi);
} }
@ -2475,29 +2475,29 @@ void onBoatMove(int snum, int psect, int j)
{ {
p->MotoSpeed = ((p->MotoSpeed >> 1) + (p->MotoSpeed >> 2)) >> 2; p->MotoSpeed = ((p->MotoSpeed >> 1) + (p->MotoSpeed >> 2)) >> 2;
if (psectlotag == 1) if (psectlotag == 1)
if (A_CheckSoundPlaying(pi, 178) == 0) if (S_CheckActorSoundPlaying(pi, 178) == 0)
A_PlaySound(178, pi); S_PlayActorSound(178, pi);
} }
else if (var118 >= 311 && var118 <= 711) else if (var118 >= 311 && var118 <= 711)
{ {
p->MotoSpeed -= ((p->MotoSpeed >> 1) + (p->MotoSpeed >> 2)) >> 3; p->MotoSpeed -= ((p->MotoSpeed >> 1) + (p->MotoSpeed >> 2)) >> 3;
if (psectlotag == 1) if (psectlotag == 1)
if (A_CheckSoundPlaying(pi, 179) == 0) if (S_CheckActorSoundPlaying(pi, 179) == 0)
A_PlaySound(179, pi); S_PlayActorSound(179, pi);
} }
else if (var118 >= 111 && var118 <= 911) else if (var118 >= 111 && var118 <= 911)
{ {
p->MotoSpeed -= (p->MotoSpeed >> 4); p->MotoSpeed -= (p->MotoSpeed >> 4);
if (psectlotag == 1) if (psectlotag == 1)
if (A_CheckSoundPlaying(pi, 180) == 0) if (S_CheckActorSoundPlaying(pi, 180) == 0)
A_PlaySound(180, pi); S_PlayActorSound(180, pi);
} }
else else
{ {
p->MotoSpeed -= (p->MotoSpeed >> 6); p->MotoSpeed -= (p->MotoSpeed >> 6);
if (psectlotag == 1) if (psectlotag == 1)
if (A_CheckSoundPlaying(pi, 181) == 0) if (S_CheckActorSoundPlaying(pi, 181) == 0)
A_PlaySound(181, pi); S_PlayActorSound(181, pi);
} }
} }
@ -2532,7 +2532,7 @@ void onMotorcycleHit(int snum, int var60)
else if ((sprite[var60].picnum == RRTILE2431 || sprite[var60].picnum == RRTILE2443 || sprite[var60].picnum == RRTILE2451 || sprite[var60].picnum == RRTILE2455) else if ((sprite[var60].picnum == RRTILE2431 || sprite[var60].picnum == RRTILE2443 || sprite[var60].picnum == RRTILE2451 || sprite[var60].picnum == RRTILE2455)
&& sprite[var60].picnum != ACTIVATORLOCKED && p->MotoSpeed > 45) && sprite[var60].picnum != ACTIVATORLOCKED && p->MotoSpeed > 45)
{ {
spritesound(SQUISHED, var60); S_PlayActorSound(SQUISHED, var60);
if (sprite[var60].picnum == RRTILE2431 || sprite[var60].picnum == RRTILE2451) if (sprite[var60].picnum == RRTILE2431 || sprite[var60].picnum == RRTILE2451)
{ {
if (sprite[var60].lotag != 0) if (sprite[var60].lotag != 0)
@ -2659,13 +2659,13 @@ static void fireweapon(int snum)
if (p->ammo_amount[BUZZSAW_WEAPON] > 0) if (p->ammo_amount[BUZZSAW_WEAPON] > 0)
{ {
p->kickback_pic = 1; p->kickback_pic = 1;
spritesound(431, pi); S_PlayActorSound(431, pi);
} }
} }
else if (p->ammo_amount[THROWSAW_WEAPON] > 0) else if (p->ammo_amount[THROWSAW_WEAPON] > 0)
{ {
p->kickback_pic = 1; p->kickback_pic = 1;
spritesound(SHRINKER_FIRE, pi); S_PlayActorSound(SHRINKER_FIRE, pi);
} }
break; break;
@ -2740,7 +2740,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
case DYNAMITE_WEAPON: case DYNAMITE_WEAPON:
if (p->kickback_pic == 1) if (p->kickback_pic == 1)
sound(401); S_PlaySound(401);
if (p->kickback_pic == 6 && (sb_snum & SKB_FIRE)) if (p->kickback_pic == 6 && (sb_snum & SKB_FIRE))
p->rapid_fire_hold = 1; p->rapid_fire_hold = 1;
p->kickback_pic++; p->kickback_pic++;
@ -2752,7 +2752,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
p->weapon_pos = 10; p->weapon_pos = 10;
p->detonate_time = 45; p->detonate_time = 45;
p->detonate_count = 1; p->detonate_count = 1;
sound(402); S_PlaySound(402);
} }
break; break;
@ -2834,7 +2834,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
if (p->kickback_pic == 1) if (p->kickback_pic == 1)
{ {
fi.shoot(pi, SHOTSPARK1); fi.shoot(pi, SHOTSPARK1);
spritesound(PISTOL_FIRE, pi); S_PlayActorSound(PISTOL_FIRE, pi);
p->noise_radius = 8192; p->noise_radius = 8192;
madenoise(snum); madenoise(snum);
@ -2868,10 +2868,10 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
switch (p->kickback_pic) switch (p->kickback_pic)
{ {
case 24: case 24:
spritesound(EJECT_CLIP, pi); S_PlayActorSound(EJECT_CLIP, pi);
break; break;
case 30: case 30:
spritesound(INSERT_CLIP, pi); S_PlayActorSound(INSERT_CLIP, pi);
break; break;
} }
} }
@ -2912,7 +2912,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
p->ammo_amount[SHOTGUN_WEAPON]--; p->ammo_amount[SHOTGUN_WEAPON]--;
spritesound(SHOTGUN_FIRE, pi); S_PlayActorSound(SHOTGUN_FIRE, pi);
p->noise_radius = 8192; p->noise_radius = 8192;
madenoise(snum); madenoise(snum);
@ -2938,7 +2938,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
p->ammo_amount[SHOTGUN_WEAPON]--; p->ammo_amount[SHOTGUN_WEAPON]--;
spritesound(SHOTGUN_FIRE, pi); S_PlayActorSound(SHOTGUN_FIRE, pi);
if (psectlotag != 857) if (psectlotag != 857)
{ {
@ -2961,7 +2961,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
checkavailweapon(p); checkavailweapon(p);
break; break;
case 17: case 17:
spritesound(SHOTGUN_COCK, pi); S_PlayActorSound(SHOTGUN_COCK, pi);
break; break;
case 28: case 28:
p->kickback_pic = 0; p->kickback_pic = 0;
@ -2978,7 +2978,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
checkavailweapon(p); checkavailweapon(p);
break; break;
case 27: case 27:
spritesound(SHOTGUN_COCK, pi); S_PlayActorSound(SHOTGUN_COCK, pi);
break; break;
case 38: case 38:
p->kickback_pic = 0; p->kickback_pic = 0;
@ -3024,7 +3024,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
ssp(j, CLIPMASK0); ssp(j, CLIPMASK0);
} }
spritesound(CHAINGUN_FIRE, pi); S_PlayActorSound(CHAINGUN_FIRE, pi);
fi.shoot(pi, CHAINGUN); fi.shoot(pi, CHAINGUN);
p->noise_radius = 8192; p->noise_radius = 8192;
madenoise(snum); madenoise(snum);
@ -3085,7 +3085,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
{ {
p->visibility = 0; p->visibility = 0;
lastvisinc = (int)totalclock + 32; lastvisinc = (int)totalclock + 32;
spritesound(CHAINGUN_FIRE, pi); S_PlayActorSound(CHAINGUN_FIRE, pi);
fi.shoot(pi, SHOTSPARK1); fi.shoot(pi, SHOTSPARK1);
p->noise_radius = 16384; p->noise_radius = 16384;
madenoise(snum); madenoise(snum);
@ -3112,7 +3112,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
{ {
p->visibility = 0; p->visibility = 0;
lastvisinc = (int)totalclock + 32; lastvisinc = (int)totalclock + 32;
spritesound(CHAINGUN_FIRE, pi); S_PlayActorSound(CHAINGUN_FIRE, pi);
fi.shoot(pi, CHAINGUN); fi.shoot(pi, CHAINGUN);
p->noise_radius = 16384; p->noise_radius = 16384;
madenoise(snum); madenoise(snum);
@ -3161,7 +3161,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
if (p->kickback_pic == 5) if (p->kickback_pic == 5)
{ {
spritesound(CAT_FIRE, pi); S_PlayActorSound(CAT_FIRE, pi);
p->noise_radius = 2048; p->noise_radius = 2048;
madenoise(snum); madenoise(snum);
} }
@ -3217,7 +3217,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
if (p->kickback_pic == 30) if (p->kickback_pic == 30)
{ {
p->ammo_amount[BOWLING_WEAPON]--; p->ammo_amount[BOWLING_WEAPON]--;
spritesound(354, pi); S_PlayActorSound(354, pi);
fi.shoot(pi, BOWLINGBALL); fi.shoot(pi, BOWLINGBALL);
p->noise_radius = 1024; p->noise_radius = 1024;
madenoise(snum); madenoise(snum);
@ -3239,7 +3239,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
case KNEE_WEAPON: case KNEE_WEAPON:
p->kickback_pic++; p->kickback_pic++;
if (p->kickback_pic == 3) if (p->kickback_pic == 3)
spritesound(426, pi); S_PlayActorSound(426, pi);
if (p->kickback_pic == 12) if (p->kickback_pic == 12)
{ {
fi.shoot(pi, KNEE); fi.shoot(pi, KNEE);
@ -3257,7 +3257,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
case SLINGBLADE_WEAPON: case SLINGBLADE_WEAPON:
p->kickback_pic++; p->kickback_pic++;
if (p->kickback_pic == 3) if (p->kickback_pic == 3)
spritesound(252, pi); S_PlayActorSound(252, pi);
if (p->kickback_pic == 8) if (p->kickback_pic == 8)
{ {
fi.shoot(pi, SLINGBLADE); fi.shoot(pi, SLINGBLADE);
@ -3286,7 +3286,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
checkavailweapon(p); checkavailweapon(p);
} }
else if (p->kickback_pic == 16) else if (p->kickback_pic == 16)
spritesound(450, pi); S_PlayActorSound(450, pi);
else if (p->kickback_pic == 34) else if (p->kickback_pic == 34)
p->kickback_pic = 0; p->kickback_pic = 0;
break; break;
@ -3304,7 +3304,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
checkavailweapon(p); checkavailweapon(p);
} }
else if (p->kickback_pic == 16) else if (p->kickback_pic == 16)
spritesound(450, pi); S_PlayActorSound(450, pi);
else if (p->kickback_pic == 34) else if (p->kickback_pic == 34)
p->kickback_pic = 0; p->kickback_pic = 0;
break; break;
@ -3340,7 +3340,7 @@ static void processweapon(int snum, ESyncBits sb_snum, int psect)
} }
else if (p->detonate_time <= 0 && p->kickback_pic < 5) else if (p->detonate_time <= 0 && p->kickback_pic < 5)
{ {
sound(14); S_PlaySound(14);
quickkill(p); quickkill(p);
} }
} }
@ -3416,7 +3416,7 @@ void processinput_r(int snum)
if (s->extra > 0 && ud.clipping == 0) if (s->extra > 0 && ud.clipping == 0)
{ {
quickkill(p); quickkill(p);
spritesound(SQUISHED, pi); S_PlayActorSound(SQUISHED, pi);
} }
psect = 0; psect = 0;
} }
@ -3558,7 +3558,7 @@ void processinput_r(int snum)
if ((sb_snum & SKB_CROUCH) && !p->OnMotorcycle) if ((sb_snum & SKB_CROUCH) && !p->OnMotorcycle)
//if (Sound[436].num == 0) //if (Sound[436].num == 0)
{ {
spritesound(436, p->i); S_PlayActorSound(436, p->i);
p->last_pissed_time = 4000; p->last_pissed_time = 4000;
p->eat = 0; p->eat = 0;
} }
@ -3670,10 +3670,10 @@ void processinput_r(int snum)
if (tmp >= 0) if (tmp >= 0)
{ {
if (!S_CheckSoundPlaying(p->i, 432)) if (!S_CheckSoundPlaying(p->i, 432))
spritesound(432, pi); S_PlayActorSound(432, pi);
} }
else else
stopsound(432); S_StopSound(432);
} }
if (isRRRA() && p->sea_sick_stat) if (isRRRA() && p->sea_sick_stat)
{ {
@ -3777,7 +3777,7 @@ void processinput_r(int snum)
case 1: case 1:
if ((krand() & 1) == 0) if ((krand() & 1) == 0)
if (!isRRRA() || (!p->OnBoat && !p->OnMotorcycle && sector[p->cursectnum].hitag != 321)) if (!isRRRA() || (!p->OnBoat && !p->OnMotorcycle && sector[p->cursectnum].hitag != 321))
spritesound(DUKE_ONWATER, pi); S_PlayActorSound(DUKE_ONWATER, pi);
p->walking_snd_toggle = 1; p->walking_snd_toggle = 1;
break; break;
} }
@ -3941,7 +3941,7 @@ HORIZONLY:
{ {
hittype[var60].timetosleep = 0; hittype[var60].timetosleep = 0;
if (sprite[var60].picnum == BILLYRAY) if (sprite[var60].picnum == BILLYRAY)
spritesound(404, var60); S_PlayActorSound(404, var60);
else else
fi.check_fta_sounds(var60); fi.check_fta_sounds(var60);
changespritestat(var60, 1); changespritestat(var60, 1);
@ -3951,7 +3951,7 @@ HORIZONLY:
if (sprite[var60].picnum == RRTILE3410) if (sprite[var60].picnum == RRTILE3410)
{ {
quickkill(p); quickkill(p);
spritesound(446, pi); S_PlayActorSound(446, pi);
} }
else if (isRRRA() && sprite[var60].picnum == RRTILE2443 && sprite[var60].pal == 19) else if (isRRRA() && sprite[var60].picnum == RRTILE2443 && sprite[var60].pal == 19)
{ {
@ -4002,9 +4002,9 @@ HORIZONLY:
} }
if (truefdist < PHEIGHT && p->on_ground && psectlotag != 1 && shrunk == 0 && sector[p->cursectnum].lotag == 1) if (truefdist < PHEIGHT && p->on_ground && psectlotag != 1 && shrunk == 0 && sector[p->cursectnum].lotag == 1)
if (!A_CheckSoundPlaying(pi, DUKE_ONWATER)) if (!S_CheckActorSoundPlaying(pi, DUKE_ONWATER))
if (!isRRRA() || (!p->OnBoat && !p->OnMotorcycle && sector[p->cursectnum].hitag != 321)) if (!isRRRA() || (!p->OnBoat && !p->OnMotorcycle && sector[p->cursectnum].hitag != 321))
spritesound(DUKE_ONWATER, pi); S_PlayActorSound(DUKE_ONWATER, pi);
if (p->cursectnum != s->sectnum) if (p->cursectnum != s->sectnum)
changespritesect(pi, p->cursectnum); changespritesect(pi, p->cursectnum);
@ -4172,8 +4172,8 @@ void OnMotorcycle(struct player_struct *p, int motosprite)
p->posyv = 0; p->posyv = 0;
p->sethoriz(100); p->sethoriz(100);
} }
if (!A_CheckSoundPlaying(p->i,186)) if (!S_CheckActorSoundPlaying(p->i,186))
A_PlaySound(186, p->i); S_PlayActorSound(186, p->i);
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -4187,16 +4187,16 @@ void OffMotorcycle(struct player_struct *p)
short j; short j;
if (p->OnMotorcycle) if (p->OnMotorcycle)
{ {
if (A_CheckSoundPlaying(p->i,188)) if (S_CheckActorSoundPlaying(p->i,188))
S_StopEnvSound(188,p->i); S_StopSound(188,p->i);
if (A_CheckSoundPlaying(p->i,187)) if (S_CheckActorSoundPlaying(p->i,187))
S_StopEnvSound(187,p->i); S_StopSound(187,p->i);
if (A_CheckSoundPlaying(p->i,186)) if (S_CheckActorSoundPlaying(p->i,186))
S_StopEnvSound(186,p->i); S_StopSound(186,p->i);
if (A_CheckSoundPlaying(p->i,214)) if (S_CheckActorSoundPlaying(p->i,214))
S_StopEnvSound(214,p->i); S_StopSound(214,p->i);
if (!A_CheckSoundPlaying(p->i,42)) if (!S_CheckActorSoundPlaying(p->i,42))
A_PlaySound(42, p->i); S_PlayActorSound(42, p->i);
p->OnMotorcycle = 0; p->OnMotorcycle = 0;
p->gotweapon.Clear(MOTORCYCLE_WEAPON); p->gotweapon.Clear(MOTORCYCLE_WEAPON);
p->curr_weapon = p->last_full_weapon; p->curr_weapon = p->last_full_weapon;

View file

@ -59,7 +59,7 @@ void DoFire(struct player_struct *p, short snum)
if(aplWeaponFireSound[p->curr_weapon][snum]) if(aplWeaponFireSound[p->curr_weapon][snum])
{ {
spritesound(aplWeaponFireSound[p->curr_weapon][snum],p->i); S_PlayActorSound(aplWeaponFireSound[p->curr_weapon][snum],p->i);
} }
SetGameVarID(g_iWeaponVarID,p->curr_weapon,p->i,snum); SetGameVarID(g_iWeaponVarID,p->curr_weapon,p->i,snum);
@ -172,7 +172,7 @@ void fireweapon_ww(int snum)
p->kickback_pic = 1; p->kickback_pic = 1;
if (aplWeaponInitialSound[p->curr_weapon][snum]) if (aplWeaponInitialSound[p->curr_weapon][snum])
{ {
spritesound(aplWeaponInitialSound[p->curr_weapon][snum], pi); S_PlayActorSound(aplWeaponInitialSound[p->curr_weapon][snum], pi);
} }
} }
break; break;
@ -181,7 +181,7 @@ void fireweapon_ww(int snum)
p->kickback_pic = 1; p->kickback_pic = 1;
if (aplWeaponInitialSound[p->curr_weapon][snum]) if (aplWeaponInitialSound[p->curr_weapon][snum])
{ {
spritesound(aplWeaponInitialSound[p->curr_weapon][snum], pi); S_PlayActorSound(aplWeaponInitialSound[p->curr_weapon][snum], pi);
} }
break; break;
@ -192,7 +192,7 @@ void fireweapon_ww(int snum)
p->kickback_pic = 1; p->kickback_pic = 1;
if (aplWeaponInitialSound[p->curr_weapon][snum]) if (aplWeaponInitialSound[p->curr_weapon][snum])
{ {
spritesound(aplWeaponInitialSound[p->curr_weapon][snum], pi); S_PlayActorSound(aplWeaponInitialSound[p->curr_weapon][snum], pi);
} }
} }
break; break;
@ -204,7 +204,7 @@ void fireweapon_ww(int snum)
p->kickback_pic = 1; p->kickback_pic = 1;
if (aplWeaponInitialSound[p->curr_weapon][snum]) if (aplWeaponInitialSound[p->curr_weapon][snum])
{ {
spritesound(aplWeaponInitialSound[p->curr_weapon][snum], pi); S_PlayActorSound(aplWeaponInitialSound[p->curr_weapon][snum], pi);
} }
} }
break; break;
@ -215,7 +215,7 @@ void fireweapon_ww(int snum)
p->kickback_pic = 1; p->kickback_pic = 1;
if (aplWeaponInitialSound[p->curr_weapon][snum]) if (aplWeaponInitialSound[p->curr_weapon][snum])
{ {
spritesound(aplWeaponInitialSound[p->curr_weapon][snum], pi); S_PlayActorSound(aplWeaponInitialSound[p->curr_weapon][snum], pi);
} }
} }
break; break;
@ -225,7 +225,7 @@ void fireweapon_ww(int snum)
p->kickback_pic = 1; p->kickback_pic = 1;
if (aplWeaponInitialSound[p->curr_weapon][snum]) if (aplWeaponInitialSound[p->curr_weapon][snum])
{ {
spritesound(aplWeaponInitialSound[p->curr_weapon][snum], pi); S_PlayActorSound(aplWeaponInitialSound[p->curr_weapon][snum], pi);
} }
} }
break; break;
@ -236,7 +236,7 @@ void fireweapon_ww(int snum)
p->kickback_pic = 1; p->kickback_pic = 1;
if (aplWeaponInitialSound[p->curr_weapon][snum]) if (aplWeaponInitialSound[p->curr_weapon][snum])
{ {
spritesound(aplWeaponInitialSound[p->curr_weapon][snum], pi); S_PlayActorSound(aplWeaponInitialSound[p->curr_weapon][snum], pi);
} }
} }
break; break;
@ -247,7 +247,7 @@ void fireweapon_ww(int snum)
p->kickback_pic = 1; p->kickback_pic = 1;
if (aplWeaponInitialSound[p->curr_weapon][snum]) if (aplWeaponInitialSound[p->curr_weapon][snum])
{ {
spritesound(aplWeaponInitialSound[p->curr_weapon][snum], pi); S_PlayActorSound(aplWeaponInitialSound[p->curr_weapon][snum], pi);
} }
} }
break; break;
@ -258,7 +258,7 @@ void fireweapon_ww(int snum)
p->kickback_pic = 1; p->kickback_pic = 1;
if (aplWeaponInitialSound[p->curr_weapon][snum]) if (aplWeaponInitialSound[p->curr_weapon][snum])
{ {
spritesound(aplWeaponInitialSound[p->curr_weapon][snum], pi); S_PlayActorSound(aplWeaponInitialSound[p->curr_weapon][snum], pi);
} }
} }
break; break;
@ -269,7 +269,7 @@ void fireweapon_ww(int snum)
p->hbomb_hold_delay = !p->hbomb_hold_delay; p->hbomb_hold_delay = !p->hbomb_hold_delay;
if (aplWeaponInitialSound[p->curr_weapon][snum]) if (aplWeaponInitialSound[p->curr_weapon][snum])
{ {
spritesound(aplWeaponInitialSound[p->curr_weapon][snum], pi); S_PlayActorSound(aplWeaponInitialSound[p->curr_weapon][snum], pi);
} }
} }
break; break;
@ -280,7 +280,7 @@ void fireweapon_ww(int snum)
p->kickback_pic = 1; p->kickback_pic = 1;
if (aplWeaponInitialSound[p->curr_weapon][snum]) if (aplWeaponInitialSound[p->curr_weapon][snum])
{ {
spritesound(aplWeaponInitialSound[p->curr_weapon][snum], pi); S_PlayActorSound(aplWeaponInitialSound[p->curr_weapon][snum], pi);
} }
} }
break; break;
@ -291,7 +291,7 @@ void fireweapon_ww(int snum)
p->kickback_pic = 1; p->kickback_pic = 1;
if (aplWeaponInitialSound[p->curr_weapon][snum]) if (aplWeaponInitialSound[p->curr_weapon][snum])
{ {
spritesound(aplWeaponInitialSound[p->curr_weapon][snum], pi); S_PlayActorSound(aplWeaponInitialSound[p->curr_weapon][snum], pi);
} }
} }
break; break;
@ -443,7 +443,7 @@ void operateweapon_ww(int snum, ESyncBits sb_snum, int psect)
{ {
if (aplWeaponSound2Sound[p->curr_weapon][snum]) if (aplWeaponSound2Sound[p->curr_weapon][snum])
{ {
spritesound(aplWeaponSound2Sound[p->curr_weapon][snum], pi); S_PlayActorSound(aplWeaponSound2Sound[p->curr_weapon][snum], pi);
} }
} }
if (p->kickback_pic == aplWeaponSpawnTime[p->curr_weapon][snum]) if (p->kickback_pic == aplWeaponSpawnTime[p->curr_weapon][snum])
@ -500,12 +500,12 @@ void operateweapon_ww(int snum, ESyncBits sb_snum, int psect)
if (p->kickback_pic == (aplWeaponTotalTime[p->curr_weapon][snum] + 1)) if (p->kickback_pic == (aplWeaponTotalTime[p->curr_weapon][snum] + 1))
{ // eject shortly after 'total time' { // eject shortly after 'total time'
spritesound(EJECT_CLIP, pi); S_PlayActorSound(EJECT_CLIP, pi);
} }
else if (p->kickback_pic == (aplWeaponReload[p->curr_weapon][snum] - (i / 3))) else if (p->kickback_pic == (aplWeaponReload[p->curr_weapon][snum] - (i / 3)))
{ {
// insert occurs 2/3 of way through reload delay // insert occurs 2/3 of way through reload delay
spritesound(INSERT_CLIP, pi); S_PlayActorSound(INSERT_CLIP, pi);
} }
if (p->kickback_pic >= (aplWeaponReload[p->curr_weapon][snum])) if (p->kickback_pic >= (aplWeaponReload[p->curr_weapon][snum]))

View file

@ -73,8 +73,8 @@ int callsound(int sn, int whatsprite)
if (snum) if (snum)
{ {
if (sprite[i].hitag && snum != sprite[i].hitag) if (sprite[i].hitag && snum != sprite[i].hitag)
S_StopEnvSound(sprite[i].hitag, hittype[i].temp_data[5]); // changed to only stop the sound on the same actor, not all of them. S_StopSound(sprite[i].hitag, hittype[i].temp_data[5]); // changed to only stop the sound on the same actor, not all of them.
spritesound(snum, whatsprite); S_PlayActorSound(snum, whatsprite);
hittype[i].temp_data[5] = whatsprite; hittype[i].temp_data[5] = whatsprite;
} }
@ -85,8 +85,8 @@ int callsound(int sn, int whatsprite)
else if (S_IsSoundValid(sprite[i].hitag)) else if (S_IsSoundValid(sprite[i].hitag))
{ {
if ((flags & SF_LOOP) || (sprite[i].hitag && sprite[i].hitag != sprite[i].lotag)) if ((flags & SF_LOOP) || (sprite[i].hitag && sprite[i].hitag != sprite[i].lotag))
S_StopEnvSound(sprite[i].lotag, hittype[i].temp_data[5]); // changed to only stop the sound on the same actor, not all of them. S_StopSound(sprite[i].lotag, hittype[i].temp_data[5]); // changed to only stop the sound on the same actor, not all of them.
if (sprite[i].hitag) spritesound(sprite[i].hitag, whatsprite); if (sprite[i].hitag) S_PlayActorSound(sprite[i].hitag, whatsprite);
hittype[i].temp_data[0] = 0; hittype[i].temp_data[0] = 0;
hittype[i].temp_data[5] = whatsprite; hittype[i].temp_data[5] = whatsprite;
} }
@ -451,8 +451,8 @@ bool activatewarpelevators(int s, int d) //Parm = sectoreffectornum
else else
{ {
if (d == 0) if (d == 0)
spritesound(ELEVATOR_OFF, s); S_PlayActorSound(ELEVATOR_OFF, s);
else spritesound(ELEVATOR_ON, s); else S_PlayActorSound(ELEVATOR_ON, s);
} }
@ -1087,8 +1087,8 @@ void operateforcefields_common(int s, int low, const std::initializer_list<int>
void breakwall(short newpn, short spr, short dawallnum) void breakwall(short newpn, short spr, short dawallnum)
{ {
wall[dawallnum].picnum = newpn; wall[dawallnum].picnum = newpn;
spritesound(VENT_BUST, spr); S_PlayActorSound(VENT_BUST, spr);
spritesound(GLASS_HEAVYBREAK, spr); S_PlayActorSound(GLASS_HEAVYBREAK, spr);
lotsofglass(spr, dawallnum, 10); lotsofglass(spr, dawallnum, 10);
} }

View file

@ -600,7 +600,7 @@ bool checkhitswitch_d(int snum, int w, int switchtype)
if (switchtype == SWITCH_SPRITE && (flags & SF_TALK) == 0) if (switchtype == SWITCH_SPRITE && (flags & SF_TALK) == 0)
S_PlaySound3D(hitag, w, &v); S_PlaySound3D(hitag, w, &v);
else else
A_PlaySound(hitag, ps[snum].i); S_PlayActorSound(hitag, ps[snum].i);
} }
return 1; return 1;
@ -663,7 +663,7 @@ void checkhitwall_d(int spr, int dawallnum, int x, int y, int z, int atwith)
lotsofglass(spr, dawallnum, 70); lotsofglass(spr, dawallnum, 70);
wal->cstat &= ~16; wal->cstat &= ~16;
wal->overpicnum = MIRRORBROKE; wal->overpicnum = MIRRORBROKE;
spritesound(GLASS_HEAVYBREAK, spr); S_PlayActorSound(GLASS_HEAVYBREAK, spr);
return; return;
} }
} }
@ -694,7 +694,7 @@ void checkhitwall_d(int spr, int dawallnum, int x, int y, int z, int atwith)
sprite[i].ang = getangle(wal->x - wall[wal->point2].x, sprite[i].ang = getangle(wal->x - wall[wal->point2].x,
wal->y - wall[wal->point2].y) - 512; wal->y - wall[wal->point2].y) - 512;
spritesound(SOMETHINGHITFORCE, i); S_PlayActorSound(SOMETHINGHITFORCE, i);
return; return;
@ -706,8 +706,8 @@ void checkhitwall_d(int spr, int dawallnum, int x, int y, int z, int atwith)
wall[wal->nextwall].overpicnum = FANSPRITEBROKE; wall[wal->nextwall].overpicnum = FANSPRITEBROKE;
wall[wal->nextwall].cstat &= 65535 - 65; wall[wal->nextwall].cstat &= 65535 - 65;
} }
spritesound(VENT_BUST, spr); S_PlayActorSound(VENT_BUST, spr);
spritesound(GLASS_BREAKING, spr); S_PlayActorSound(GLASS_BREAKING, spr);
return; return;
case GLASS: case GLASS:
@ -721,7 +721,7 @@ void checkhitwall_d(int spr, int dawallnum, int x, int y, int z, int atwith)
i = EGS(sn, x, y, z, SECTOREFFECTOR, 0, 0, 0, ps[0].getang(), 0, 0, spr, 3); i = EGS(sn, x, y, z, SECTOREFFECTOR, 0, 0, 0, ps[0].getang(), 0, 0, spr, 3);
sprite[i].lotag = 128; hittype[i].temp_data[1] = 5; hittype[i].temp_data[2] = dawallnum; sprite[i].lotag = 128; hittype[i].temp_data[1] = 5; hittype[i].temp_data[2] = dawallnum;
spritesound(GLASS_BREAKING, i); S_PlayActorSound(GLASS_BREAKING, i);
return; return;
case STAINGLASS1: case STAINGLASS1:
updatesector(x, y, &sn); if (sn < 0) return; updatesector(x, y, &sn); if (sn < 0) return;
@ -729,8 +729,8 @@ void checkhitwall_d(int spr, int dawallnum, int x, int y, int z, int atwith)
wal->cstat = 0; wal->cstat = 0;
if (wal->nextwall >= 0) if (wal->nextwall >= 0)
wall[wal->nextwall].cstat = 0; wall[wal->nextwall].cstat = 0;
spritesound(VENT_BUST, spr); S_PlayActorSound(VENT_BUST, spr);
spritesound(GLASS_BREAKING, spr); S_PlayActorSound(GLASS_BREAKING, spr);
return; return;
} }
@ -739,7 +739,7 @@ void checkhitwall_d(int spr, int dawallnum, int x, int y, int z, int atwith)
case COLAMACHINE: case COLAMACHINE:
case VENDMACHINE: case VENDMACHINE:
breakwall(wal->picnum + 2, spr, dawallnum); breakwall(wal->picnum + 2, spr, dawallnum);
spritesound(VENT_BUST, spr); S_PlayActorSound(VENT_BUST, spr);
return; return;
case OJ: case OJ:
@ -771,7 +771,7 @@ void checkhitwall_d(int spr, int dawallnum, int x, int y, int z, int atwith)
lotsofglass(spr, dawallnum, 30); lotsofglass(spr, dawallnum, 30);
wal->picnum = W_SCREENBREAK + (krand() % 3); wal->picnum = W_SCREENBREAK + (krand() % 3);
spritesound(GLASS_HEAVYBREAK, spr); S_PlayActorSound(GLASS_HEAVYBREAK, spr);
return; return;
case W_TECHWALL5: case W_TECHWALL5:
@ -820,7 +820,7 @@ void checkhitwall_d(int spr, int dawallnum, int x, int y, int z, int atwith)
case ATM: case ATM:
wal->picnum = ATMBROKE; wal->picnum = ATMBROKE;
fi.lotsofmoney(&sprite[spr], 1 + (krand() & 7)); fi.lotsofmoney(&sprite[spr], 1 + (krand() & 7));
spritesound(GLASS_HEAVYBREAK, spr); S_PlayActorSound(GLASS_HEAVYBREAK, spr);
break; break;
case WALLLIGHT1: case WALLLIGHT1:
@ -831,8 +831,8 @@ void checkhitwall_d(int spr, int dawallnum, int x, int y, int z, int atwith)
case TECHLIGHT4: case TECHLIGHT4:
if (rnd(128)) if (rnd(128))
spritesound(GLASS_HEAVYBREAK, spr); S_PlayActorSound(GLASS_HEAVYBREAK, spr);
else spritesound(GLASS_BREAKING, spr); else S_PlayActorSound(GLASS_BREAKING, spr);
lotsofglass(spr, dawallnum, 30); lotsofglass(spr, dawallnum, 30);
if (wal->picnum == WALLLIGHT1) if (wal->picnum == WALLLIGHT1)
@ -900,7 +900,7 @@ void checkplayerhurt_d(struct player_struct* p, int j)
sprite[p->i].extra -= 5; sprite[p->i].extra -= 5;
p->hurt_delay = 16; p->hurt_delay = 16;
SetPlayerPal(p, PalEntry(32, 32, 0, 0)); SetPlayerPal(p, PalEntry(32, 32, 0, 0));
spritesound(DUKE_LONGTERM_PAIN, p->i); S_PlayActorSound(DUKE_LONGTERM_PAIN, p->i);
} }
break; break;
} }
@ -923,7 +923,7 @@ void checkplayerhurt_d(struct player_struct* p, int j)
p->posxv = -(sintable[(p->getang() + 512) & 2047] << 8); p->posxv = -(sintable[(p->getang() + 512) & 2047] << 8);
p->posyv = -(sintable[(p->getang()) & 2047] << 8); p->posyv = -(sintable[(p->getang()) & 2047] << 8);
spritesound(DUKE_LONGTERM_PAIN, p->i); S_PlayActorSound(DUKE_LONGTERM_PAIN, p->i);
fi.checkhitwall(p->i, j, fi.checkhitwall(p->i, j,
p->posx + (sintable[(p->getang() + 512) & 2047] >> 9), p->posx + (sintable[(p->getang() + 512) & 2047] >> 9),
@ -963,7 +963,7 @@ bool checkhitceiling_d(int sn)
case TECHLIGHT4: case TECHLIGHT4:
ceilingglass(ps[myconnectindex].i, sn, 10); ceilingglass(ps[myconnectindex].i, sn, 10);
spritesound(GLASS_BREAKING, ps[screenpeek].i); S_PlayActorSound(GLASS_BREAKING, ps[screenpeek].i);
if (sector[sn].ceilingpicnum == WALLLIGHT1) if (sector[sn].ceilingpicnum == WALLLIGHT1)
sector[sn].ceilingpicnum = WALLLIGHTBUST1; sector[sn].ceilingpicnum = WALLLIGHTBUST1;
@ -1041,7 +1041,7 @@ void checkhitsprite_d(int i, int sn)
case WTGLASS2: case WTGLASS2:
if (!isWorldTour()) if (!isWorldTour())
break; break;
A_PlaySound(GLASS_BREAKING, i); S_PlayActorSound(GLASS_BREAKING, i);
lotsofglass(i, -1, 10); lotsofglass(i, -1, 10);
deletesprite(i); deletesprite(i);
return; return;
@ -1062,7 +1062,7 @@ void checkhitsprite_d(int i, int sn)
sprite[sn].ang -= (sprite[i].ang << 1) + 1024; sprite[sn].ang -= (sprite[i].ang << 1) + 1024;
sprite[i].ang = getangle(sprite[i].x - sprite[sn].x, sprite[i].y - sprite[sn].y) - 512; sprite[i].ang = getangle(sprite[i].x - sprite[sn].x, sprite[i].y - sprite[sn].y) - 512;
if (S_CheckSoundPlaying(POOLBALLHIT) < 2) if (S_CheckSoundPlaying(POOLBALLHIT) < 2)
spritesound(POOLBALLHIT, i); S_PlayActorSound(POOLBALLHIT, i);
} }
else else
{ {
@ -1126,7 +1126,7 @@ void checkhitsprite_d(int i, int sn)
case GENERICPOLE2: case GENERICPOLE2:
for (k = 0; k < 6; k++) for (k = 0; k < 6; k++)
EGS(sprite[i].sectnum, sprite[i].x, sprite[i].y, sprite[i].z - (8 << 8), SCRAP1 + (krand() & 15), -8, 48, 48, krand() & 2047, (krand() & 63) + 64, -(krand() & 4095) - (sprite[i].zvel >> 2), i, 5); EGS(sprite[i].sectnum, sprite[i].x, sprite[i].y, sprite[i].z - (8 << 8), SCRAP1 + (krand() & 15), -8, 48, 48, krand() & 2047, (krand() & 63) + 64, -(krand() & 4095) - (sprite[i].zvel >> 2), i, 5);
spritesound(GLASS_HEAVYBREAK, i); S_PlayActorSound(GLASS_HEAVYBREAK, i);
deletesprite(i); deletesprite(i);
break; break;
@ -1137,7 +1137,7 @@ void checkhitsprite_d(int i, int sn)
if (sector[sprite[i].sectnum].floorpicnum == FANSHADOW) if (sector[sprite[i].sectnum].floorpicnum == FANSHADOW)
sector[sprite[i].sectnum].floorpicnum = FANSHADOWBROKE; sector[sprite[i].sectnum].floorpicnum = FANSHADOWBROKE;
spritesound(GLASS_HEAVYBREAK, i); S_PlayActorSound(GLASS_HEAVYBREAK, i);
s = &sprite[i]; s = &sprite[i];
for (j = 0; j < 16; j++) RANDOMSCRAP(s, i); for (j = 0; j < 16; j++) RANDOMSCRAP(s, i);
@ -1195,19 +1195,19 @@ void checkhitsprite_d(int i, int sn)
else if (sprite[i].picnum == STATUE || sprite[i].picnum == STATUEFLASH) else if (sprite[i].picnum == STATUE || sprite[i].picnum == STATUEFLASH)
{ {
lotsofcolourglass(i, -1, 40); lotsofcolourglass(i, -1, 40);
spritesound(GLASS_HEAVYBREAK, i); S_PlayActorSound(GLASS_HEAVYBREAK, i);
} }
else if (sprite[i].picnum == VASE) else if (sprite[i].picnum == VASE)
lotsofglass(i, -1, 40); lotsofglass(i, -1, 40);
spritesound(GLASS_BREAKING, i); S_PlayActorSound(GLASS_BREAKING, i);
sprite[i].ang = krand() & 2047; sprite[i].ang = krand() & 2047;
lotsofglass(i, -1, 8); lotsofglass(i, -1, 8);
deletesprite(i); deletesprite(i);
break; break;
case FETUS: case FETUS:
sprite[i].picnum = FETUSBROKE; sprite[i].picnum = FETUSBROKE;
spritesound(GLASS_BREAKING, i); S_PlayActorSound(GLASS_BREAKING, i);
lotsofglass(i, -1, 10); lotsofglass(i, -1, 10);
break; break;
case FETUSBROKE: case FETUSBROKE:
@ -1216,16 +1216,16 @@ void checkhitsprite_d(int i, int sn)
fi.shoot(i, BLOODSPLAT1); fi.shoot(i, BLOODSPLAT1);
sprite[i].ang += 333; sprite[i].ang += 333;
} }
spritesound(GLASS_HEAVYBREAK, i); S_PlayActorSound(GLASS_HEAVYBREAK, i);
spritesound(SQUISHED, i); S_PlayActorSound(SQUISHED, i);
case BOTTLE7: case BOTTLE7:
spritesound(GLASS_BREAKING, i); S_PlayActorSound(GLASS_BREAKING, i);
lotsofglass(i, -1, 10); lotsofglass(i, -1, 10);
deletesprite(i); deletesprite(i);
break; break;
case HYDROPLANT: case HYDROPLANT:
sprite[i].picnum = BROKEHYDROPLANT; sprite[i].picnum = BROKEHYDROPLANT;
spritesound(GLASS_BREAKING, i); S_PlayActorSound(GLASS_BREAKING, i);
lotsofglass(i, -1, 10); lotsofglass(i, -1, 10);
break; break;
@ -1240,7 +1240,7 @@ void checkhitsprite_d(int i, int sn)
case BROKEHYDROPLANT: case BROKEHYDROPLANT:
if (sprite[i].cstat & 1) if (sprite[i].cstat & 1)
{ {
spritesound(GLASS_BREAKING, i); S_PlayActorSound(GLASS_BREAKING, i);
sprite[i].z += 16 << 8; sprite[i].z += 16 << 8;
sprite[i].cstat = 0; sprite[i].cstat = 0;
lotsofglass(i, -1, 5); lotsofglass(i, -1, 5);
@ -1252,7 +1252,7 @@ void checkhitsprite_d(int i, int sn)
sprite[i].cstat |= (krand() & 1) << 2; sprite[i].cstat |= (krand() & 1) << 2;
sprite[i].cstat &= ~257; sprite[i].cstat &= ~257;
fi.spawn(i, TOILETWATER); fi.spawn(i, TOILETWATER);
spritesound(GLASS_BREAKING, i); S_PlayActorSound(GLASS_BREAKING, i);
break; break;
case STALL: case STALL:
@ -1260,7 +1260,7 @@ void checkhitsprite_d(int i, int sn)
sprite[i].cstat |= (krand() & 1) << 2; sprite[i].cstat |= (krand() & 1) << 2;
sprite[i].cstat &= ~257; sprite[i].cstat &= ~257;
fi.spawn(i, TOILETWATER); fi.spawn(i, TOILETWATER);
spritesound(GLASS_HEAVYBREAK, i); S_PlayActorSound(GLASS_HEAVYBREAK, i);
break; break;
case HYDRENT: case HYDRENT:
@ -1272,30 +1272,30 @@ void checkhitsprite_d(int i, int sn)
// j = EGS(sprite[i].sectnum,sprite[i].x,sprite[i].y,sprite[i].z-(krand()%(48<<8)),SCRAP3+(krand()&3),-8,48,48,krand()&2047,(krand()&63)+64,-(krand()&4095)-(sprite[i].zvel>>2),i,5); // j = EGS(sprite[i].sectnum,sprite[i].x,sprite[i].y,sprite[i].z-(krand()%(48<<8)),SCRAP3+(krand()&3),-8,48,48,krand()&2047,(krand()&63)+64,-(krand()&4095)-(sprite[i].zvel>>2),i,5);
// sprite[j].pal = 2; // sprite[j].pal = 2;
// } // }
spritesound(GLASS_HEAVYBREAK, i); S_PlayActorSound(GLASS_HEAVYBREAK, i);
break; break;
case GRATE1: case GRATE1:
sprite[i].picnum = BGRATE1; sprite[i].picnum = BGRATE1;
sprite[i].cstat &= (65535 - 256 - 1); sprite[i].cstat &= (65535 - 256 - 1);
spritesound(VENT_BUST, i); S_PlayActorSound(VENT_BUST, i);
break; break;
case CIRCLEPANNEL: case CIRCLEPANNEL:
sprite[i].picnum = CIRCLEPANNELBROKE; sprite[i].picnum = CIRCLEPANNELBROKE;
sprite[i].cstat &= (65535 - 256 - 1); sprite[i].cstat &= (65535 - 256 - 1);
spritesound(VENT_BUST, i); S_PlayActorSound(VENT_BUST, i);
break; break;
case PANNEL1: case PANNEL1:
case PANNEL2: case PANNEL2:
sprite[i].picnum = BPANNEL1; sprite[i].picnum = BPANNEL1;
sprite[i].cstat &= (65535 - 256 - 1); sprite[i].cstat &= (65535 - 256 - 1);
spritesound(VENT_BUST, i); S_PlayActorSound(VENT_BUST, i);
break; break;
case PANNEL3: case PANNEL3:
sprite[i].picnum = BPANNEL3; sprite[i].picnum = BPANNEL3;
sprite[i].cstat &= (65535 - 256 - 1); sprite[i].cstat &= (65535 - 256 - 1);
spritesound(VENT_BUST, i); S_PlayActorSound(VENT_BUST, i);
break; break;
case PIPE1: case PIPE1:
case PIPE2: case PIPE2:
@ -1321,7 +1321,7 @@ void checkhitsprite_d(int i, int sn)
case LUKE: case LUKE:
case INDY: case INDY:
case JURYGUY: case JURYGUY:
spritesound(sprite[i].lotag, i); S_PlayActorSound(sprite[i].lotag, i);
fi.spawn(i, sprite[i].hitag); fi.spawn(i, sprite[i].hitag);
case SPACEMARINE: case SPACEMARINE:
sprite[i].extra -= sprite[sn].extra; sprite[i].extra -= sprite[sn].extra;
@ -1348,7 +1348,7 @@ void checkhitsprite_d(int i, int sn)
fi.guts(&sprite[i], JIBS4, 4, myconnectindex); fi.guts(&sprite[i], JIBS4, 4, myconnectindex);
fi.guts(&sprite[i], JIBS5, 1, myconnectindex); fi.guts(&sprite[i], JIBS5, 1, myconnectindex);
fi.guts(&sprite[i], JIBS3, 6, myconnectindex); fi.guts(&sprite[i], JIBS3, 6, myconnectindex);
sound(SQUISHED); S_PlaySound(SQUISHED);
deletesprite(i); deletesprite(i);
break; break;
case CHAIR1: case CHAIR1:
@ -1366,7 +1366,7 @@ void checkhitsprite_d(int i, int sn)
case POT2: case POT2:
case POT3: case POT3:
case TRIPODCAMERA: case TRIPODCAMERA:
spritesound(GLASS_HEAVYBREAK, i); S_PlayActorSound(GLASS_HEAVYBREAK, i);
s = &sprite[i]; s = &sprite[i];
for (j = 0; j < 16; j++) RANDOMSCRAP(s, i); for (j = 0; j < 16; j++) RANDOMSCRAP(s, i);
deletesprite(i); deletesprite(i);
@ -1509,7 +1509,7 @@ void checksectors_d(int snum)
if (sector[p->cursectnum].lotag >= 10000 && sector[p->cursectnum].lotag < 16383) if (sector[p->cursectnum].lotag >= 10000 && sector[p->cursectnum].lotag < 16383)
{ {
if (snum == screenpeek || ud.coop == 1) if (snum == screenpeek || ud.coop == 1)
spritesound(sector[p->cursectnum].lotag - 10000, p->i); S_PlayActorSound(sector[p->cursectnum].lotag - 10000, p->i);
sector[p->cursectnum].lotag = 0; sector[p->cursectnum].lotag = 0;
} }
break; break;
@ -1558,7 +1558,7 @@ void checksectors_d(int snum)
if (i < 1280 && hitscanwall >= 0 && wall[hitscanwall].overpicnum == MIRROR) if (i < 1280 && hitscanwall >= 0 && wall[hitscanwall].overpicnum == MIRROR)
if (wall[hitscanwall].lotag > 0 && S_CheckSoundPlaying(wall[hitscanwall].lotag) == 0 && snum == screenpeek) if (wall[hitscanwall].lotag > 0 && S_CheckSoundPlaying(wall[hitscanwall].lotag) == 0 && snum == screenpeek)
{ {
spritesound(wall[hitscanwall].lotag, p->i); S_PlayActorSound(wall[hitscanwall].lotag, p->i);
return; return;
} }
@ -1630,7 +1630,7 @@ void checksectors_d(int snum)
case STALL: case STALL:
if (p->last_pissed_time == 0) if (p->last_pissed_time == 0)
{ {
if (adult_lockout == 0) spritesound(DUKE_URINATE, p->i); if (adult_lockout == 0) S_PlayActorSound(DUKE_URINATE, p->i);
p->last_pissed_time = 26 * 220; p->last_pissed_time = 26 * 220;
p->transporter_hold = 29 * 2; p->transporter_hold = 29 * 2;
@ -1648,7 +1648,7 @@ void checksectors_d(int snum)
sprite[p->i].extra = max_player_health; sprite[p->i].extra = max_player_health;
} }
else if (S_CheckSoundPlaying(neartagsprite, FLUSH_TOILET) == 0) else if (S_CheckSoundPlaying(neartagsprite, FLUSH_TOILET) == 0)
spritesound(FLUSH_TOILET, neartagsprite); S_PlayActorSound(FLUSH_TOILET, neartagsprite);
return; return;
case NUKEBUTTON: case NUKEBUTTON:
@ -1674,12 +1674,12 @@ void checksectors_d(int snum)
if (sprite[p->i].extra < max_player_health) if (sprite[p->i].extra < max_player_health)
{ {
sprite[p->i].extra++; sprite[p->i].extra++;
spritesound(DUKE_DRINKING, p->i); S_PlayActorSound(DUKE_DRINKING, p->i);
} }
} }
return; return;
case PLUG: case PLUG:
spritesound(SHORT_CIRCUIT, p->i); S_PlayActorSound(SHORT_CIRCUIT, p->i);
sprite[p->i].extra -= 2 + (krand() & 3); sprite[p->i].extra -= 2 + (krand() & 3);
SetPlayerPal(p, PalEntry(32, 48, 48, 64)); SetPlayerPal(p, PalEntry(32, 48, 48, 64));
break; break;
@ -1693,7 +1693,7 @@ void checksectors_d(int snum)
if (sprite[i].picnum == CAMERA1 && sprite[i].yvel == 0 && sprite[neartagsprite].hitag == sprite[i].lotag) if (sprite[i].picnum == CAMERA1 && sprite[i].yvel == 0 && sprite[neartagsprite].hitag == sprite[i].lotag)
{ {
sprite[i].yvel = 1; //Using this camera sprite[i].yvel = 1; //Using this camera
spritesound(MONITOR_ACTIVE, neartagsprite); S_PlayActorSound(MONITOR_ACTIVE, neartagsprite);
sprite[neartagsprite].owner = i; sprite[neartagsprite].owner = i;
sprite[neartagsprite].yvel = 1; sprite[neartagsprite].yvel = 1;
@ -1748,8 +1748,8 @@ void checksectors_d(int snum)
if (abs(hits(p->i)) < 512) if (abs(hits(p->i)) < 512)
{ {
if ((krand() & 255) < 16) if ((krand() & 255) < 16)
spritesound(DUKE_SEARCH2, p->i); S_PlayActorSound(DUKE_SEARCH2, p->i);
else spritesound(DUKE_SEARCH, p->i); else S_PlayActorSound(DUKE_SEARCH, p->i);
return; return;
} }

File diff suppressed because it is too large Load diff

View file

@ -106,7 +106,7 @@ void S_PauseSounds(bool paused)
// //
//========================================================================== //==========================================================================
void cacheAllSounds(void) void S_CacheAllSounds(void)
{ {
auto& sfx = soundEngine->GetSounds(); auto& sfx = soundEngine->GetSounds();
int i = 0; int i = 0;
@ -430,7 +430,7 @@ int S_PlaySound3D(int sndnum, int spriteNum, const vec3_t* pos, int channel, ECh
bool is_playing = soundEngine->GetSoundPlayingInfo(SOURCE_Any, nullptr, sndnum+1); bool is_playing = soundEngine->GetSoundPlayingInfo(SOURCE_Any, nullptr, sndnum+1);
if (is_playing && sp->picnum != MUSICANDSFX) if (is_playing && sp->picnum != MUSICANDSFX)
S_StopEnvSound(sndnum, spriteNum); S_StopSound(sndnum, spriteNum);
int const repeatp = (userflags & SF_LOOP); int const repeatp = (userflags & SF_LOOP);
@ -478,13 +478,13 @@ int S_PlaySound(int sndnum, int channel, EChanFlags flags)
// //
//========================================================================== //==========================================================================
int A_PlaySound(int soundNum, int spriteNum, int channel, EChanFlags flags) int S_PlayActorSound(int soundNum, int spriteNum, int channel, EChanFlags flags)
{ {
return (unsigned)spriteNum >= MAXSPRITES ? S_PlaySound(soundNum, channel, flags) : return (unsigned)spriteNum >= MAXSPRITES ? S_PlaySound(soundNum, channel, flags) :
S_PlaySound3D(soundNum, spriteNum, &sprite[spriteNum].pos, channel, flags); S_PlaySound3D(soundNum, spriteNum, &sprite[spriteNum].pos, channel, flags);
} }
void S_StopEnvSound(int sndNum, int sprNum, int channel) void S_StopSound(int sndNum, int sprNum, int channel)
{ {
if (sprNum < -1 || sprNum >= MAXSPRITES) return; if (sprNum < -1 || sprNum >= MAXSPRITES) return;
@ -520,7 +520,7 @@ void S_ChangeSoundPitch(int soundNum, int spriteNum, int pitchoffset)
// //
//========================================================================== //==========================================================================
int A_CheckSoundPlaying(int spriteNum, int soundNum, int channel) int S_CheckActorSoundPlaying(int spriteNum, int soundNum, int channel)
{ {
if (spriteNum == -1) return soundEngine->GetSoundPlayingInfo(SOURCE_Any, nullptr, soundNum+1); if (spriteNum == -1) return soundEngine->GetSoundPlayingInfo(SOURCE_Any, nullptr, soundNum+1);
if ((unsigned)spriteNum >= MAXSPRITES) return false; if ((unsigned)spriteNum >= MAXSPRITES) return false;
@ -528,7 +528,7 @@ int A_CheckSoundPlaying(int spriteNum, int soundNum, int channel)
} }
// Check if actor <i> is playing any sound. // Check if actor <i> is playing any sound.
int A_CheckAnySoundPlaying(int spriteNum) int S_CheckAnyActorSoundPlaying(int spriteNum)
{ {
if ((unsigned)spriteNum >= MAXSPRITES) return false; if ((unsigned)spriteNum >= MAXSPRITES) return false;
return soundEngine->IsSourcePlayingSomething(SOURCE_Actor, &sprite[spriteNum], CHAN_AUTO, 0); return soundEngine->IsSourcePlayingSomething(SOURCE_Actor, &sprite[spriteNum], CHAN_AUTO, 0);
@ -625,7 +625,7 @@ void S_PlayRRMusic(int newTrack)
} }
void PlayBonusMusic() void S_PlayBonusMusic()
{ {
if (MusicEnabled() && mus_enabled) if (MusicEnabled() && mus_enabled)
S_PlaySound(BONUSMUSIC, CHAN_AUTO, CHANF_UI); S_PlaySound(BONUSMUSIC, CHAN_AUTO, CHANF_UI);

View file

@ -35,49 +35,39 @@ enum esound_t
kMaxUserData kMaxUserData
}; };
int A_CheckSoundPlaying(int spriteNum, int soundNum, int channel = 0); void S_InitSound();
int A_PlaySound(int soundNum, int spriteNum, int channel = CHAN_AUTO, EChanFlags flags = 0); void S_Update(void);
inline int spritesound(int soundnum, int spritenum) void S_CacheAllSounds(void);
{ int S_DefineSound(unsigned index, const char* filename, int ps, int pe, int pr, int m, int vo, float vol);
return A_PlaySound(soundnum, spritenum);
} int S_PlaySound(int num, int channel = CHAN_AUTO, EChanFlags flags = 0);
int A_CheckAnySoundPlaying(int spriteNum); int S_PlaySound3D(int num, int spriteNum, const vec3_t* pos, int channel = CHAN_AUTO, EChanFlags flags = 0);
int S_PlayActorSound(int soundNum, int spriteNum, int channel = CHAN_AUTO, EChanFlags flags = 0);
void S_MenuSound(void);
void S_StopSound(int sndNum, int sprNum = -1, int flags = -1);
int S_CheckSoundPlaying(int soundNum); int S_CheckSoundPlaying(int soundNum);
inline int S_CheckSoundPlaying(int sprnum, int soundNum) { return S_CheckSoundPlaying(soundNum); } inline int S_CheckSoundPlaying(int sprnum, int soundNum) { return S_CheckSoundPlaying(soundNum); }
void cacheAllSounds(void); int S_CheckActorSoundPlaying(int spriteNum, int soundNum, int channel = 0);
void S_MenuSound(void); int S_CheckAnyActorSoundPlaying(int spriteNum);
void S_PauseMusic(bool paused);
void S_PauseSounds(bool paused);
void S_PlayLevelMusic(MapRecord* mi);
void S_PlaySpecialMusic(unsigned int);
void S_ContinueLevelMusic(void);
int S_PlaySound(int num, int channel = CHAN_AUTO, EChanFlags flags = 0);
inline int sound(int num)
{
return S_PlaySound(num);
}
int S_PlaySound3D(int num, int spriteNum, const vec3_t *pos, int channel = CHAN_AUTO, EChanFlags flags = 0);
void S_StopEnvSound(int sndNum,int sprNum, int flags = -1);
inline void stopsound(int snd)
{
S_StopEnvSound(snd, -1);
}
#define S_StopSound(num) S_StopEnvSound(num, -1)
void S_Update(void); void S_PauseSounds(bool paused);
void S_ChangeSoundPitch(int soundNum, int spriteNum, int pitchoffset); void S_ChangeSoundPitch(int soundNum, int spriteNum, int pitchoffset);
int S_GetUserFlags(int sndnum); int S_GetUserFlags(int sndnum);
int S_DefineSound(unsigned index, const char* filename, int ps, int pe, int pr, int m, int vo, float vol);
void S_InitSound();
void S_PlayRRMusic(int newTrack = -1);
void PlayBonusMusic();
inline bool S_IsSoundValid(int num) inline bool S_IsSoundValid(int num)
{ {
return (!soundEngine->isValidSoundId(num + 1)); return (!soundEngine->isValidSoundId(num + 1));
} }
void S_PlayRRMusic(int newTrack = -1);
void S_PlayBonusMusic();
void S_PlayLevelMusic(MapRecord* mi);
void S_PlaySpecialMusic(unsigned int);
void S_ContinueLevelMusic(void);
// Placeholders. // Placeholders.
inline void StopCommentary() inline void StopCommentary()
{} {}