mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-27 01:10:51 +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:
|
case COOLEXPLOSION1__STATIC:
|
||||||
|
|
||||||
if( s->picnum == COOLEXPLOSION1 )
|
if( s->picnum == COOLEXPLOSION1 )
|
||||||
if( !issoundplaying(WIERDSHOT_FLY) )
|
if( !issoundplaying(i,WIERDSHOT_FLY) )
|
||||||
spritesound(WIERDSHOT_FLY,i);
|
spritesound(WIERDSHOT_FLY,i);
|
||||||
|
|
||||||
p = -1;
|
p = -1;
|
||||||
|
@ -4907,7 +4907,7 @@ void moveexplosions(void) // STATNUM 5
|
||||||
l = getflorzofslope(sect,s->x,s->y)-s->z;
|
l = getflorzofslope(sect,s->x,s->y)-s->z;
|
||||||
if( l > (16<<8) ) KILLIT(i);
|
if( l > (16<<8) ) KILLIT(i);
|
||||||
}
|
}
|
||||||
else */ if (!issoundplaying(ITEM_SPLASH))
|
else */ if (!issoundplaying(i,ITEM_SPLASH))
|
||||||
spritesound(ITEM_SPLASH,i);
|
spritesound(ITEM_SPLASH,i);
|
||||||
}
|
}
|
||||||
if(t[0] == 3)
|
if(t[0] == 3)
|
||||||
|
@ -5598,7 +5598,7 @@ void moveeffectors(void) //STATNUM 3
|
||||||
{
|
{
|
||||||
if( (sc->floorstat&1) == 0 && (sc->ceilingstat&1) == 0 )
|
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);
|
spritesound(hittype[i].lastvx,i);
|
||||||
}
|
}
|
||||||
else if( ud.monsters_off == 0 && sc->floorpal == 0 && (sc->floorstat&1) && rnd(8) )
|
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 void OnEvent(int iEventID, short sActor,short sPlayer,long lDist);
|
||||||
|
|
||||||
extern int isspritemakingsound(short i, int num);
|
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 stopspritesound(short num, short i);
|
||||||
extern void updatenames(void);
|
extern void updatenames(void);
|
||||||
extern void sendboardname(void);
|
extern void sendboardname(void);
|
||||||
|
|
|
@ -2174,7 +2174,7 @@ void FTA(short q,struct player_struct *p)
|
||||||
pub = NUMPAGES;
|
pub = NUMPAGES;
|
||||||
pus = NUMPAGES;
|
pus = NUMPAGES;
|
||||||
if (p == &ps[screenpeek])
|
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);
|
} 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() )
|
if( ud.lockout == 0 && !KB_KeyWaiting() )
|
||||||
{
|
{
|
||||||
sound(ENDSEQVOL3SND5);
|
sound(ENDSEQVOL3SND5);
|
||||||
while(issoundplaying(ENDSEQVOL3SND5)) { handleevents(); getpackets(); }
|
while(issoundplaying(-1,ENDSEQVOL3SND5)) { handleevents(); getpackets(); }
|
||||||
if(KB_KeyWaiting()) goto ENDANM;
|
if(KB_KeyWaiting()) goto ENDANM;
|
||||||
sound(ENDSEQVOL3SND6);
|
sound(ENDSEQVOL3SND6);
|
||||||
while(issoundplaying(ENDSEQVOL3SND6)) { handleevents(); getpackets(); }
|
while(issoundplaying(-1,ENDSEQVOL3SND6)) { handleevents(); getpackets(); }
|
||||||
if(KB_KeyWaiting()) goto ENDANM;
|
if(KB_KeyWaiting()) goto ENDANM;
|
||||||
sound(ENDSEQVOL3SND7);
|
sound(ENDSEQVOL3SND7);
|
||||||
while(issoundplaying(ENDSEQVOL3SND7)) { handleevents(); getpackets(); }
|
while(issoundplaying(-1,ENDSEQVOL3SND7)) { handleevents(); getpackets(); }
|
||||||
if(KB_KeyWaiting()) goto ENDANM;
|
if(KB_KeyWaiting()) goto ENDANM;
|
||||||
sound(ENDSEQVOL3SND8);
|
sound(ENDSEQVOL3SND8);
|
||||||
while(issoundplaying(ENDSEQVOL3SND8)) { handleevents(); getpackets(); }
|
while(issoundplaying(-1,ENDSEQVOL3SND8)) { handleevents(); getpackets(); }
|
||||||
if(KB_KeyWaiting()) goto ENDANM;
|
if(KB_KeyWaiting()) goto ENDANM;
|
||||||
sound(ENDSEQVOL3SND9);
|
sound(ENDSEQVOL3SND9);
|
||||||
while(issoundplaying(ENDSEQVOL3SND9)) { handleevents(); getpackets(); }
|
while(issoundplaying(-1,ENDSEQVOL3SND9)) { handleevents(); getpackets(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
KB_FlushKeyBoardQueue();
|
KB_FlushKeyBoardQueue();
|
||||||
|
|
|
@ -3754,7 +3754,7 @@ char parse(void)
|
||||||
|
|
||||||
case CON_IFSOUND:
|
case CON_IFSOUND:
|
||||||
insptr++;
|
insptr++;
|
||||||
parseifelse( Sound[*insptr].num > 0 );
|
parseifelse( isspritemakingsound(g_i,*insptr) );
|
||||||
// parseifelse(SoundOwner[*insptr][0].i == g_i);
|
// parseifelse(SoundOwner[*insptr][0].i == g_i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -313,7 +313,7 @@ int isspritemakingsound(short i, int num) // if num<0, check if making any sound
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
int issoundplaying(int num)
|
int issoundplaying(short i, int num)
|
||||||
{
|
{
|
||||||
int j,n=0;
|
int j,n=0;
|
||||||
|
|
||||||
|
|
|
@ -999,7 +999,7 @@ void newgame(char vn,char ln,char sk)
|
||||||
short i;
|
short i;
|
||||||
|
|
||||||
if(globalskillsound >= 0)
|
if(globalskillsound >= 0)
|
||||||
while(issoundplaying(globalskillsound)) { handleevents(); getpackets(); }
|
while(issoundplaying(-1,globalskillsound)) { handleevents(); getpackets(); }
|
||||||
globalskillsound = -1;
|
globalskillsound = -1;
|
||||||
|
|
||||||
waitforeverybody();
|
waitforeverybody();
|
||||||
|
|
|
@ -2032,7 +2032,7 @@ void checkhitsprite(short i,short sn)
|
||||||
sprite[sn].xvel = (sprite[i].xvel>>1)+(sprite[i].xvel>>2);
|
sprite[sn].xvel = (sprite[i].xvel>>1)+(sprite[i].xvel>>2);
|
||||||
sprite[sn].ang -= (SA<<1)+1024;
|
sprite[sn].ang -= (SA<<1)+1024;
|
||||||
SA = getangle(SX-sprite[sn].x,SY-sprite[sn].y)-512;
|
SA = getangle(SX-sprite[sn].x,SY-sprite[sn].y)-512;
|
||||||
if(issoundplaying(POOLBALLHIT) < 2)
|
if(issoundplaying(i,POOLBALLHIT) < 2)
|
||||||
spritesound(POOLBALLHIT,i);
|
spritesound(POOLBALLHIT,i);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -624,10 +624,12 @@ void clearsoundlocks(void)
|
||||||
int isspritemakingsound(short i, int num)
|
int isspritemakingsound(short i, int num)
|
||||||
{
|
{
|
||||||
if (num < 0) num=0; // FIXME
|
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