mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 03:00:38 +00:00
Fix skill sounds when using JAudiolib instead of JFAud
git-svn-id: https://svn.eduke32.com/eduke32@179 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
fe88c2d53f
commit
76eb4ada1d
9 changed files with 461 additions and 459 deletions
|
@ -2870,7 +2870,7 @@ void moveweapons(void)
|
|||
case COOLEXPLOSION1__STATIC:
|
||||
|
||||
if( s->picnum == COOLEXPLOSION1 )
|
||||
if( !issoundplaying(WIERDSHOT_FLY) )
|
||||
if( !issoundplaying(i,WIERDSHOT_FLY) )
|
||||
spritesound(WIERDSHOT_FLY,i);
|
||||
|
||||
p = -1;
|
||||
|
@ -4907,7 +4907,7 @@ void moveexplosions(void) // STATNUM 5
|
|||
l = getflorzofslope(sect,s->x,s->y)-s->z;
|
||||
if( l > (16<<8) ) KILLIT(i);
|
||||
}
|
||||
else */ if (!issoundplaying(ITEM_SPLASH))
|
||||
else */ if (!issoundplaying(i,ITEM_SPLASH))
|
||||
spritesound(ITEM_SPLASH,i);
|
||||
}
|
||||
if(t[0] == 3)
|
||||
|
@ -5598,7 +5598,7 @@ void moveeffectors(void) //STATNUM 3
|
|||
{
|
||||
if( (sc->floorstat&1) == 0 && (sc->ceilingstat&1) == 0 )
|
||||
{
|
||||
if( !issoundplaying(hittype[i].lastvx) )
|
||||
if( !issoundplaying(i,hittype[i].lastvx) )
|
||||
spritesound(hittype[i].lastvx,i);
|
||||
}
|
||||
else if( ud.monsters_off == 0 && sc->floorpal == 0 && (sc->floorstat&1) && rnd(8) )
|
||||
|
|
|
@ -349,7 +349,7 @@ extern void onvideomodechange(int newmode);
|
|||
extern void OnEvent(int iEventID, short sActor,short sPlayer,long lDist);
|
||||
|
||||
extern int isspritemakingsound(short i, int num);
|
||||
extern int issoundplaying(int num);
|
||||
extern int issoundplaying(short i, int num);
|
||||
extern void stopspritesound(short num, short i);
|
||||
extern void updatenames(void);
|
||||
extern void sendboardname(void);
|
||||
|
|
|
@ -2174,7 +2174,7 @@ void FTA(short q,struct player_struct *p)
|
|||
pub = NUMPAGES;
|
||||
pus = NUMPAGES;
|
||||
if (p == &ps[screenpeek])
|
||||
OSD_Printf("%s\n",fta_quotes[q]);
|
||||
OSD_Printf("%s\n",strip_color_codes(fta_quotes[q]));
|
||||
}
|
||||
}
|
||||
} else OSD_Printf("%s %d null quote %d\n",__FILE__,__LINE__,p->ftq);
|
||||
|
@ -10503,19 +10503,19 @@ void dobonus(char bonusonly)
|
|||
if( ud.lockout == 0 && !KB_KeyWaiting() )
|
||||
{
|
||||
sound(ENDSEQVOL3SND5);
|
||||
while(issoundplaying(ENDSEQVOL3SND5)) { handleevents(); getpackets(); }
|
||||
while(issoundplaying(-1,ENDSEQVOL3SND5)) { handleevents(); getpackets(); }
|
||||
if(KB_KeyWaiting()) goto ENDANM;
|
||||
sound(ENDSEQVOL3SND6);
|
||||
while(issoundplaying(ENDSEQVOL3SND6)) { handleevents(); getpackets(); }
|
||||
while(issoundplaying(-1,ENDSEQVOL3SND6)) { handleevents(); getpackets(); }
|
||||
if(KB_KeyWaiting()) goto ENDANM;
|
||||
sound(ENDSEQVOL3SND7);
|
||||
while(issoundplaying(ENDSEQVOL3SND7)) { handleevents(); getpackets(); }
|
||||
while(issoundplaying(-1,ENDSEQVOL3SND7)) { handleevents(); getpackets(); }
|
||||
if(KB_KeyWaiting()) goto ENDANM;
|
||||
sound(ENDSEQVOL3SND8);
|
||||
while(issoundplaying(ENDSEQVOL3SND8)) { handleevents(); getpackets(); }
|
||||
while(issoundplaying(-1,ENDSEQVOL3SND8)) { handleevents(); getpackets(); }
|
||||
if(KB_KeyWaiting()) goto ENDANM;
|
||||
sound(ENDSEQVOL3SND9);
|
||||
while(issoundplaying(ENDSEQVOL3SND9)) { handleevents(); getpackets(); }
|
||||
while(issoundplaying(-1,ENDSEQVOL3SND9)) { handleevents(); getpackets(); }
|
||||
}
|
||||
|
||||
KB_FlushKeyBoardQueue();
|
||||
|
|
|
@ -3754,7 +3754,7 @@ char parse(void)
|
|||
|
||||
case CON_IFSOUND:
|
||||
insptr++;
|
||||
parseifelse( Sound[*insptr].num > 0 );
|
||||
parseifelse( isspritemakingsound(g_i,*insptr) );
|
||||
// parseifelse(SoundOwner[*insptr][0].i == g_i);
|
||||
break;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ extern "C" {
|
|||
# include "winlayer.h"
|
||||
#endif
|
||||
#include "osd.h"
|
||||
long numenvsnds;
|
||||
long numenvsnds;
|
||||
}
|
||||
|
||||
typedef uint64 uint64_t;
|
||||
|
@ -65,7 +65,7 @@ public:
|
|||
if (fh >= 0) kclose(fh);
|
||||
}
|
||||
|
||||
virtual bool IsOpen(void) const { return fh >= 0; }
|
||||
virtual bool IsOpen(void) const { return fh >= 0; }
|
||||
|
||||
virtual long Read(long nbytes, void *buf)
|
||||
{
|
||||
|
@ -313,7 +313,7 @@ int isspritemakingsound(short i, int num) // if num<0, check if making any sound
|
|||
return n;
|
||||
}
|
||||
|
||||
int issoundplaying(int num)
|
||||
int issoundplaying(short i, int num)
|
||||
{
|
||||
int j,n=0;
|
||||
|
||||
|
@ -403,7 +403,7 @@ int xyzsound(short num, short i, long x, long y, long z)
|
|||
}
|
||||
if(ps[screenpeek].sound_pitch)
|
||||
pitch = translatepitch(ps[screenpeek].sound_pitch);
|
||||
/*
|
||||
/*
|
||||
// XXX: this is shit
|
||||
if( Sound[num].num > 0 && PN != MUSICANDSFX )
|
||||
{
|
||||
|
@ -411,7 +411,7 @@ int xyzsound(short num, short i, long x, long y, long z)
|
|||
else if( Sound[num].num > 1 ) stopsound(num);
|
||||
else if( badguy(&sprite[i]) && sprite[i].extra <= 0 ) stopsound(num);
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
chan = jfaud->PlaySound(sounds[num], NULL, soundpr[num]);
|
||||
if (!chan) return -1;
|
||||
|
|
|
@ -999,7 +999,7 @@ void newgame(char vn,char ln,char sk)
|
|||
short i;
|
||||
|
||||
if(globalskillsound >= 0)
|
||||
while(issoundplaying(globalskillsound)) { handleevents(); getpackets(); }
|
||||
while(issoundplaying(-1,globalskillsound)) { handleevents(); getpackets(); }
|
||||
globalskillsound = -1;
|
||||
|
||||
waitforeverybody();
|
||||
|
|
|
@ -2032,7 +2032,7 @@ void checkhitsprite(short i,short sn)
|
|||
sprite[sn].xvel = (sprite[i].xvel>>1)+(sprite[i].xvel>>2);
|
||||
sprite[sn].ang -= (SA<<1)+1024;
|
||||
SA = getangle(SX-sprite[sn].x,SY-sprite[sn].y)-512;
|
||||
if(issoundplaying(POOLBALLHIT) < 2)
|
||||
if(issoundplaying(i,POOLBALLHIT) < 2)
|
||||
spritesound(POOLBALLHIT,i);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -624,10 +624,12 @@ void clearsoundlocks(void)
|
|||
int isspritemakingsound(short i, int num)
|
||||
{
|
||||
if (num < 0) num=0; // FIXME
|
||||
return issoundplaying(num) > 0;
|
||||
return (Sound[num].num > 0);
|
||||
}
|
||||
|
||||
int issoundplaying(int num)
|
||||
int issoundplaying(short i, int num)
|
||||
{
|
||||
return Sound[num].num;
|
||||
if(i == -1)
|
||||
return (Sound[num].lock != 199);
|
||||
else return (Sound[num].num);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue