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:
terminx 2006-05-22 01:05:56 +00:00
parent fe88c2d53f
commit 76eb4ada1d
9 changed files with 461 additions and 459 deletions

View file

@ -2759,11 +2759,11 @@ static void polymost_drawalls (long bunch)
if ((oy < cy0) && (oy < cy1)) domost(x1,oy,x0,oy);
else if ((oy < cy0) != (oy < cy1))
{ /* cy1 cy0
// / \
//oy---------- oy---------
// / \
// cy0 cy1
*/
// / \
//oy---------- oy---------
// / \
// cy0 cy1
*/
ox = (oy-cy0)*(x1-x0)/(cy1-cy0) + x0;
if (oy < cy0) { domost(ox,oy,x0,oy); domost(x1,cy1,ox,oy); }
else { domost(ox,oy,x0,cy0); domost(x1,oy,ox,oy); }

View file

@ -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) )

View file

@ -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);

View file

@ -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();

View file

@ -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;

File diff suppressed because it is too large Load diff

View file

@ -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();

View file

@ -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

View file

@ -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);
}