mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
Brightskins tweak, more whitespace
git-svn-id: https://svn.eduke32.com/eduke32@29 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e3d40c7b51
commit
b11595ad2e
13 changed files with 589 additions and 593 deletions
|
@ -107,11 +107,11 @@ void addammo( short weapon,struct player_struct *p,short amount)
|
|||
|
||||
void addweaponnoswitch( struct player_struct *p, short weapon)
|
||||
{
|
||||
if ( p->gotweapon[weapon] == 0 )
|
||||
if ( p->gotweapon[weapon] == 0 )
|
||||
{
|
||||
p->gotweapon[weapon] = 1;
|
||||
if(weapon == SHRINKER_WEAPON)
|
||||
p->gotweapon[GROW_WEAPON] = 1;
|
||||
p->gotweapon[weapon] = 1;
|
||||
if(weapon == SHRINKER_WEAPON)
|
||||
p->gotweapon[GROW_WEAPON] = 1;
|
||||
}
|
||||
switch(weapon)
|
||||
{
|
||||
|
@ -130,7 +130,7 @@ void addweapon( struct player_struct *p,short weapon)
|
|||
short snum;
|
||||
snum = sprite[p->i].yvel;
|
||||
|
||||
addweaponnoswitch(p,weapon);
|
||||
addweaponnoswitch(p,weapon);
|
||||
|
||||
if (p->reloading) return;
|
||||
|
||||
|
@ -210,8 +210,8 @@ void checkavailweapon( struct player_struct *p )
|
|||
weap = p->curr_weapon;
|
||||
if( p->gotweapon[weap] && p->ammo_amount[weap] > 0 )
|
||||
return;
|
||||
if( p->gotweapon[weap] && !(p->weaponswitch & 2))
|
||||
return;
|
||||
if( p->gotweapon[weap] && !(p->weaponswitch & 2))
|
||||
return;
|
||||
|
||||
snum = sprite[p->i].yvel;
|
||||
|
||||
|
@ -2515,24 +2515,24 @@ void moveweapons(void)
|
|||
}
|
||||
}
|
||||
|
||||
/* if(thisprojectile[i].workslike & 8192)
|
||||
{
|
||||
for(k=-3;k<2;k++)
|
||||
{
|
||||
/* if(thisprojectile[i].workslike & 8192)
|
||||
{
|
||||
for(k=-3;k<2;k++)
|
||||
{
|
||||
|
||||
x = EGS(s->sectnum,
|
||||
s->x+((k*sintable[(s->ang+512)&2047])>>9),
|
||||
s->y+((k*sintable[s->ang&2047])>>9),
|
||||
s->z+((k*ksgn(s->zvel))*klabs(s->zvel/24)),s->picnum,-40+(k<<2), // FIRELASER
|
||||
s->xrepeat,s->yrepeat,0,0,0,s->owner,5);
|
||||
x = EGS(s->sectnum,
|
||||
s->x+((k*sintable[(s->ang+512)&2047])>>9),
|
||||
s->y+((k*sintable[s->ang&2047])>>9),
|
||||
s->z+((k*ksgn(s->zvel))*klabs(s->zvel/24)),s->picnum,-40+(k<<2), // FIRELASER
|
||||
s->xrepeat,s->yrepeat,0,0,0,s->owner,5);
|
||||
|
||||
sprite[x].cstat = 128;
|
||||
sprite[x].pal = s->pal;
|
||||
sprite[x].cstat = 128;
|
||||
sprite[x].pal = s->pal;
|
||||
|
||||
}
|
||||
}
|
||||
else */
|
||||
if(thisprojectile[i].workslike & PROJECTILE_FLAG_SPIT) if(s->zvel < 6144)
|
||||
}
|
||||
}
|
||||
else */
|
||||
if(thisprojectile[i].workslike & PROJECTILE_FLAG_SPIT) if(s->zvel < 6144)
|
||||
s->zvel += gc-112;
|
||||
|
||||
if(thisprojectile[i].workslike & PROJECTILE_FLAG_WATERBUBBLES && sector[s->sectnum].lotag == 2 && rnd(140))
|
||||
|
|
|
@ -1843,33 +1843,33 @@ void Keys3d(void)
|
|||
{
|
||||
case 0:
|
||||
strcpy(tempbuf,"Wall picnum: ");
|
||||
i = getnumber256(tempbuf,wall[searchwall].picnum,MAXTILES-1,0);
|
||||
if(tilesizx[i] != 0)
|
||||
wall[searchwall].picnum = i;
|
||||
i = getnumber256(tempbuf,wall[searchwall].picnum,MAXTILES-1,0);
|
||||
if(tilesizx[i] != 0)
|
||||
wall[searchwall].picnum = i;
|
||||
break;
|
||||
case 1:
|
||||
strcpy(tempbuf,"Sector ceiling picnum: ");
|
||||
i = getnumber256(tempbuf,sector[searchsector].ceilingpicnum,MAXTILES-1,0);
|
||||
if(tilesizx[i] != 0)
|
||||
sector[searchsector].ceilingpicnum = i;
|
||||
i = getnumber256(tempbuf,sector[searchsector].ceilingpicnum,MAXTILES-1,0);
|
||||
if(tilesizx[i] != 0)
|
||||
sector[searchsector].ceilingpicnum = i;
|
||||
break;
|
||||
case 2:
|
||||
strcpy(tempbuf,"Sector floor picnum: ");
|
||||
i = getnumber256(tempbuf,sector[searchsector].floorpicnum,MAXTILES-1,0);
|
||||
if(tilesizx[i] != 0)
|
||||
sector[searchsector].floorpicnum = i;
|
||||
i = getnumber256(tempbuf,sector[searchsector].floorpicnum,MAXTILES-1,0);
|
||||
if(tilesizx[i] != 0)
|
||||
sector[searchsector].floorpicnum = i;
|
||||
break;
|
||||
case 3:
|
||||
strcpy(tempbuf,"Sprite picnum: ");
|
||||
i = getnumber256(tempbuf,sprite[searchwall].picnum,MAXTILES-1,0);
|
||||
if(tilesizx[i] != 0)
|
||||
sprite[searchwall].picnum = i;
|
||||
i = getnumber256(tempbuf,sprite[searchwall].picnum,MAXTILES-1,0);
|
||||
if(tilesizx[i] != 0)
|
||||
sprite[searchwall].picnum = i;
|
||||
break;
|
||||
case 4:
|
||||
strcpy(tempbuf,"Masked wall picnum: ");
|
||||
i = getnumber256(tempbuf,wall[searchwall].overpicnum,MAXTILES-1,0);
|
||||
if(tilesizx[i] != 0)
|
||||
wall[searchwall].overpicnum = i;
|
||||
i = getnumber256(tempbuf,wall[searchwall].overpicnum,MAXTILES-1,0);
|
||||
if(tilesizx[i] != 0)
|
||||
wall[searchwall].overpicnum = i;
|
||||
break;
|
||||
}
|
||||
asksave = 1;
|
||||
|
@ -3355,12 +3355,12 @@ void Keys2d(void)
|
|||
Bsprintf(tempbuf,"Delete all sprites of picnum: ");
|
||||
i = getnumber16(tempbuf,-1,MAXSPRITES-1,1);
|
||||
if (i >= 0)
|
||||
{
|
||||
{
|
||||
for(j=0;j<MAXSPRITES-1;j++)
|
||||
if(sprite[j].picnum == i)
|
||||
deletesprite(j);
|
||||
printmessage16("Sprites deleted.");
|
||||
}
|
||||
printmessage16("Sprites deleted.");
|
||||
}
|
||||
}
|
||||
|
||||
getpoint(searchx,searchy,&mousxplc,&mousyplc);
|
||||
|
@ -3510,40 +3510,40 @@ void Keys2d(void)
|
|||
{
|
||||
if (pointhighlight >= 16384)
|
||||
{
|
||||
keystatus[0x1f] = 0;
|
||||
Bsprintf(tempbuf,"Sprite (%d) xrepeat: ",cursprite);
|
||||
sprite[cursprite].xrepeat=getnumber16(tempbuf, sprite[cursprite].xrepeat, 256,0);
|
||||
Bsprintf(tempbuf,"Sprite (%d) yrepeat: ",cursprite);
|
||||
sprite[cursprite].yrepeat=getnumber16(tempbuf, sprite[cursprite].yrepeat, 256,0);
|
||||
Bsprintf(tempbuf,"Sprite (%d) updated",i);
|
||||
printmessage16(tempbuf);
|
||||
}
|
||||
keystatus[0x1f] = 0;
|
||||
Bsprintf(tempbuf,"Sprite (%d) xrepeat: ",cursprite);
|
||||
sprite[cursprite].xrepeat=getnumber16(tempbuf, sprite[cursprite].xrepeat, 256,0);
|
||||
Bsprintf(tempbuf,"Sprite (%d) yrepeat: ",cursprite);
|
||||
sprite[cursprite].yrepeat=getnumber16(tempbuf, sprite[cursprite].yrepeat, 256,0);
|
||||
Bsprintf(tempbuf,"Sprite (%d) updated",i);
|
||||
printmessage16(tempbuf);
|
||||
}
|
||||
}
|
||||
|
||||
if(keystatus[KEYSC_QUOTE] && keystatus[KEYSC_F]) // ' F
|
||||
{
|
||||
keystatus[KEYSC_F] = 0;
|
||||
j = 0;
|
||||
for(i=0;i<MAXSECTORS;i++)
|
||||
{
|
||||
if(tilesizx[sector[i].ceilingpicnum] <= 0)
|
||||
sector[i].ceilingpicnum = 0,j++;
|
||||
if(tilesizx[sector[i].floorpicnum] <= 0)
|
||||
sector[i].floorpicnum = 0,j++;
|
||||
}
|
||||
for(i=0;i<MAXWALLS;i++)
|
||||
{
|
||||
if(tilesizx[wall[i].picnum] <= 0)
|
||||
wall[i].picnum = 0,j++;
|
||||
if(tilesizx[wall[i].overpicnum] <= 0)
|
||||
wall[i].overpicnum = 0,j++;
|
||||
}
|
||||
for(i=0;i<MAXSPRITES;i++)
|
||||
{
|
||||
if(tilesizx[sprite[i].picnum] <= 0)
|
||||
sprite[i].picnum = 0,j++;
|
||||
}
|
||||
Bsprintf(tempbuf,"Replaced %d invalid tiles",j);
|
||||
j = 0;
|
||||
for(i=0;i<MAXSECTORS;i++)
|
||||
{
|
||||
if(tilesizx[sector[i].ceilingpicnum] <= 0)
|
||||
sector[i].ceilingpicnum = 0,j++;
|
||||
if(tilesizx[sector[i].floorpicnum] <= 0)
|
||||
sector[i].floorpicnum = 0,j++;
|
||||
}
|
||||
for(i=0;i<MAXWALLS;i++)
|
||||
{
|
||||
if(tilesizx[wall[i].picnum] <= 0)
|
||||
wall[i].picnum = 0,j++;
|
||||
if(tilesizx[wall[i].overpicnum] <= 0)
|
||||
wall[i].overpicnum = 0,j++;
|
||||
}
|
||||
for(i=0;i<MAXSPRITES;i++)
|
||||
{
|
||||
if(tilesizx[sprite[i].picnum] <= 0)
|
||||
sprite[i].picnum = 0,j++;
|
||||
}
|
||||
Bsprintf(tempbuf,"Replaced %d invalid tiles",j);
|
||||
printmessage16(tempbuf);
|
||||
}
|
||||
|
||||
|
@ -4275,7 +4275,7 @@ int ExtInit(void)
|
|||
defsfilename = getenv("DUKE3DDEF");
|
||||
initprintf("Using %s as definitions file\n", defsfilename);
|
||||
}
|
||||
loadgroupfiles(defsfilename);
|
||||
loadgroupfiles(defsfilename);
|
||||
bpp = 8;
|
||||
if (loadsetup("build.cfg") < 0) initprintf("Configuration file not found, using defaults.\n"), rv = 1;
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ void CONFIG_SetDefaults( void )
|
|||
ud.m_ffire = 1;
|
||||
ud.levelstats = 0;
|
||||
ud.drawweapon = 1;
|
||||
ud.brightskins = 0;
|
||||
ud.brightskins = 0;
|
||||
ShowOpponentWeapons = 0;
|
||||
Bstrcpy(ud.rtsname, "DUKE.RTS");
|
||||
Bstrcpy(myname, "Duke");
|
||||
|
|
|
@ -502,31 +502,31 @@ void getpackets(void)
|
|||
if (enterlevel(MODE_GAME)) backtomenu();
|
||||
|
||||
break;
|
||||
case 6:
|
||||
//slaves in M/S mode only send to master
|
||||
//Master re-transmits message to all others
|
||||
if ((!networkmode) && (myconnectindex == connecthead))
|
||||
for(i=connectpoint2[connecthead];i>=0;i=connectpoint2[i])
|
||||
if (i != other) sendpacket(i,packbuf,packbufleng);
|
||||
case 6:
|
||||
//slaves in M/S mode only send to master
|
||||
//Master re-transmits message to all others
|
||||
if ((!networkmode) && (myconnectindex == connecthead))
|
||||
for(i=connectpoint2[connecthead];i>=0;i=connectpoint2[i])
|
||||
if (i != other) sendpacket(i,packbuf,packbufleng);
|
||||
|
||||
if (packbuf[2] != BYTEVERSION)
|
||||
gameexit("\nYou cannot play Duke with different versions.");
|
||||
if (packbuf[2] != BYTEVERSION)
|
||||
gameexit("\nYou cannot play Duke with different versions.");
|
||||
|
||||
other = packbuf[1];
|
||||
other = packbuf[1];
|
||||
|
||||
for (i=3;packbuf[i];i++)
|
||||
ud.user_name[other][i-3] = packbuf[i];
|
||||
ud.user_name[other][i-3] = 0;
|
||||
i++;
|
||||
for (i=3;packbuf[i];i++)
|
||||
ud.user_name[other][i-3] = packbuf[i];
|
||||
ud.user_name[other][i-3] = 0;
|
||||
i++;
|
||||
|
||||
j = i; //This used to be Duke packet #9... now concatenated with Duke packet #6
|
||||
for (;i-j<10;i++) ud.wchoice[other][i-j] = packbuf[i];
|
||||
j = i; //This used to be Duke packet #9... now concatenated with Duke packet #6
|
||||
for (;i-j<10;i++) ud.wchoice[other][i-j] = packbuf[i];
|
||||
|
||||
ps[other].aim_mode = packbuf[i++];
|
||||
ps[other].auto_aim = packbuf[i++];
|
||||
ps[other].weaponswitch = packbuf[i++];
|
||||
ps[other].aim_mode = packbuf[i++];
|
||||
ps[other].auto_aim = packbuf[i++];
|
||||
ps[other].weaponswitch = packbuf[i++];
|
||||
|
||||
break;
|
||||
break;
|
||||
case 7:
|
||||
//slaves in M/S mode only send to master
|
||||
//Master re-transmits message to all others
|
||||
|
@ -1870,7 +1870,7 @@ void tics(void)
|
|||
i = totalclock;
|
||||
if (i != frameval[framecnt])
|
||||
{
|
||||
j=(TICRATE*AVERAGEFRAMES)/(i-frameval[framecnt]);
|
||||
j=(TICRATE*AVERAGEFRAMES)/(i-frameval[framecnt]);
|
||||
Bsprintf(b,"%ld",j>0?j:0);
|
||||
/* printext256(windowx1,windowy1,31,-21,b,1); */
|
||||
minitext(320-strlen(b)*4,ud.multimode>1&&ud.multimode<5?9:ud.multimode>4?17:1,b,(TICRATE*AVERAGEFRAMES)/(i-frameval[framecnt]) < 40?2:0,26);
|
||||
|
@ -2525,24 +2525,24 @@ void palto(char r,char g,char b,long e)
|
|||
int i;
|
||||
char temparray[768];
|
||||
long tc;
|
||||
/*
|
||||
for(i=0;i<768;i+=3)
|
||||
{
|
||||
temparray[i ] =
|
||||
ps[myconnectindex].palette[i+0]+((((long)r-(long)ps[myconnectindex].palette[i+0])*(long)(e&127))>>6);
|
||||
temparray[i+1] =
|
||||
ps[myconnectindex].palette[i+1]+((((long)g-(long)ps[myconnectindex].palette[i+1])*(long)(e&127))>>6);
|
||||
temparray[i+2] =
|
||||
ps[myconnectindex].palette[i+2]+((((long)b-(long)ps[myconnectindex].palette[i+2])*(long)(e&127))>>6);
|
||||
}
|
||||
*/
|
||||
/*
|
||||
for(i=0;i<768;i+=3)
|
||||
{
|
||||
temparray[i ] =
|
||||
ps[myconnectindex].palette[i+0]+((((long)r-(long)ps[myconnectindex].palette[i+0])*(long)(e&127))>>6);
|
||||
temparray[i+1] =
|
||||
ps[myconnectindex].palette[i+1]+((((long)g-(long)ps[myconnectindex].palette[i+1])*(long)(e&127))>>6);
|
||||
temparray[i+2] =
|
||||
ps[myconnectindex].palette[i+2]+((((long)b-(long)ps[myconnectindex].palette[i+2])*(long)(e&127))>>6);
|
||||
}
|
||||
*/
|
||||
|
||||
//setbrightness(ud.brightness>>2,temparray);
|
||||
setpalettefade(r,g,b,e&127);
|
||||
if (getrendermode() >= 3) pus = pub = NUMPAGES; // JBF 20040110: redraw the status bar next time
|
||||
setpalettefade(r,g,b,e&127);
|
||||
if (getrendermode() >= 3) pus = pub = NUMPAGES; // JBF 20040110: redraw the status bar next time
|
||||
if ((e&128) == 0) {
|
||||
nextpage();
|
||||
for (tc = totalclock; totalclock < tc + 4; handleevents(), getpackets() );
|
||||
nextpage();
|
||||
for (tc = totalclock; totalclock < tc + 4; handleevents(), getpackets() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3461,7 +3461,7 @@ short EGS(short whatsect,long s_x,long s_y,long s_z,short s_pn,signed char s_s,s
|
|||
|
||||
T1=T3=T4=T6=T7=T8=T9=0;
|
||||
|
||||
actorspriteflags[i] = 0;
|
||||
actorspriteflags[i] = 0;
|
||||
|
||||
if( actorscrptr[s_pn] )
|
||||
{
|
||||
|
@ -3591,7 +3591,7 @@ short spawn( short j, short pn )
|
|||
|
||||
T1 = T2 = T3 = T4 = T5 = T6 = T7 = T8 = T9 = 0;
|
||||
|
||||
actorspriteflags[i] = 0;
|
||||
actorspriteflags[i] = 0;
|
||||
|
||||
if( PN != SPEAKER && PN != LETTER && PN != DUCK && PN != TARGET && PN != TRIPBOMB && PN != VIEWSCREEN && PN != VIEWSCREEN2 && (CS&48) )
|
||||
if( !(PN >= CRACK1 && PN <= CRACK4) )
|
||||
|
@ -5470,15 +5470,15 @@ void animatesprites(long x,long y,short a,long smoothratio)
|
|||
|
||||
if (checkspriteflags(i,SPRITE_FLAG_NOSHADE))
|
||||
l = sprite[j].shade;
|
||||
else
|
||||
{
|
||||
if (sector[t->sectnum].ceilingstat&1)
|
||||
l = sector[t->sectnum].ceilingshade;
|
||||
else
|
||||
l = sector[t->sectnum].floorshade;
|
||||
if(l < -127) l = -127;
|
||||
if(l > 128) l = 127;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sector[t->sectnum].ceilingstat&1)
|
||||
l = sector[t->sectnum].ceilingshade;
|
||||
else
|
||||
l = sector[t->sectnum].floorshade;
|
||||
if(l < -127) l = -127;
|
||||
if(l > 128) l = 127;
|
||||
}
|
||||
t->shade = l;
|
||||
}
|
||||
|
||||
|
@ -5847,14 +5847,14 @@ PALONLY:
|
|||
if( sector[sect].floorpal && sector[sect].floorpal < numl)
|
||||
t->pal = sector[sect].floorpal;
|
||||
|
||||
if(ud.brightskins)
|
||||
t->shade = -32; // yes? no?
|
||||
|
||||
if(s->owner == -1) continue;
|
||||
|
||||
if( t->z > hittype[i].floorz && t->xrepeat < 32 )
|
||||
t->z = hittype[i].floorz;
|
||||
|
||||
if(ud.brightskins)
|
||||
t->shade -= 15;
|
||||
|
||||
break;
|
||||
|
||||
case JIBS1__STATIC:
|
||||
|
@ -5883,9 +5883,6 @@ PALONLY:
|
|||
case SCRAP3__STATIC:
|
||||
case SCRAP4__STATIC:
|
||||
case SCRAP5__STATIC:
|
||||
|
||||
|
||||
|
||||
if(hittype[i].picnum == BLIMP && t->picnum == SCRAP1 && s->yvel >= 0)
|
||||
t->picnum = s->yvel;
|
||||
else t->picnum += T1;
|
||||
|
@ -5902,7 +5899,6 @@ PALONLY:
|
|||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
if( sector[sect].floorpal && sector[sect].floorpal < numl )
|
||||
t->pal = sector[sect].floorpal;
|
||||
break;
|
||||
|
@ -6938,12 +6934,12 @@ void nonsharedkeys(void)
|
|||
{
|
||||
if(i == 5 && ps[myconnectindex].fta > 0 && ps[myconnectindex].ftq == 26)
|
||||
{
|
||||
i = (VOLUMEALL?num_volumes*11:6);
|
||||
i = (VOLUMEALL?num_volumes*11:6);
|
||||
music_select++;
|
||||
while(!music_fn[0][music_select][0] && music_select < i)
|
||||
music_select++;
|
||||
while(!music_fn[0][music_select][0] && music_select < i)
|
||||
music_select++;
|
||||
if(music_select == i)
|
||||
music_select = 0;
|
||||
music_select = 0;
|
||||
Bstrcpy(&fta_quotes[26][0],"PLAYING ");
|
||||
Bstrcat(&fta_quotes[26][0],&music_fn[0][music_select][0]);
|
||||
FTA(26,&ps[myconnectindex]);
|
||||
|
@ -7137,9 +7133,9 @@ FAKE_F3:
|
|||
screencapt = 0;
|
||||
if( lastsavedpos >= 0 )
|
||||
{
|
||||
/* inputloc = strlen(&ud.savegame[lastsavedpos][0]);
|
||||
current_menu = 360+lastsavedpos;
|
||||
probey = lastsavedpos; */
|
||||
/* inputloc = strlen(&ud.savegame[lastsavedpos][0]);
|
||||
current_menu = 360+lastsavedpos;
|
||||
probey = lastsavedpos; */
|
||||
if(ud.multimode > 1)
|
||||
saveplayer(-1-(lastsavedpos));
|
||||
else saveplayer(lastsavedpos);
|
||||
|
@ -7193,23 +7189,23 @@ FAKE_F3:
|
|||
if(lastsavedpos == -1) goto FAKE_F3;
|
||||
|
||||
if( lastsavedpos >= 0 )
|
||||
{
|
||||
KB_FlushKeyboardQueue();
|
||||
KB_ClearKeysDown();
|
||||
FX_StopAllSounds();
|
||||
{
|
||||
KB_FlushKeyboardQueue();
|
||||
KB_ClearKeysDown();
|
||||
FX_StopAllSounds();
|
||||
|
||||
if(ud.multimode > 1)
|
||||
{
|
||||
loadplayer(-1-lastsavedpos);
|
||||
ps[myconnectindex].gm = MODE_GAME;
|
||||
}
|
||||
else
|
||||
{
|
||||
i = loadplayer(lastsavedpos);
|
||||
if(i == 0)
|
||||
ps[myconnectindex].gm = MODE_GAME;
|
||||
}
|
||||
}
|
||||
if(ud.multimode > 1)
|
||||
{
|
||||
loadplayer(-1-lastsavedpos);
|
||||
ps[myconnectindex].gm = MODE_GAME;
|
||||
}
|
||||
else
|
||||
{
|
||||
i = loadplayer(lastsavedpos);
|
||||
if(i == 0)
|
||||
ps[myconnectindex].gm = MODE_GAME;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(KB_KeyPressed( sc_F10 ))
|
||||
|
@ -8284,10 +8280,10 @@ void app_main(int argc,char **argv)
|
|||
|
||||
checkcommandline(argc,argv);
|
||||
|
||||
if (VOLUMEALL)
|
||||
loadgroupfiles(duke3ddef);
|
||||
if (VOLUMEALL)
|
||||
loadgroupfiles(duke3ddef);
|
||||
|
||||
initprintf("\n");
|
||||
initprintf("\n");
|
||||
|
||||
if (condebug)
|
||||
initprintf("CON debugging activated (%d).\n\n",condebug);
|
||||
|
@ -8350,22 +8346,22 @@ void app_main(int argc,char **argv)
|
|||
|
||||
if( setgamemode(ScreenMode,ScreenWidth,ScreenHeight,ScreenBPP) < 0 )
|
||||
{
|
||||
int i = 0;
|
||||
int xres[] = {800,640,320};
|
||||
int yres[] = {600,480,240};
|
||||
int bpp[] = {32,16,8};
|
||||
int i = 0;
|
||||
int xres[] = {800,640,320};
|
||||
int yres[] = {600,480,240};
|
||||
int bpp[] = {32,16,8};
|
||||
initprintf("Failure setting video mode %dx%dx%d %s! Attempting safer mode...",
|
||||
ScreenWidth,ScreenHeight,ScreenBPP,ScreenMode?"fullscreen":"windowed");
|
||||
/* ScreenMode = 0; // JBF: was 2
|
||||
ScreenWidth = 800;
|
||||
ScreenHeight = 600; // JBF: was 200
|
||||
ScreenBPP = 32; */
|
||||
while(setgamemode(0,xres[i],yres[i],bpp[i]) < 0) {
|
||||
i++;
|
||||
}
|
||||
ScreenWidth = xres[i];
|
||||
ScreenHeight = yres[i];
|
||||
ScreenBPP = bpp[i];
|
||||
/* ScreenMode = 0; // JBF: was 2
|
||||
ScreenWidth = 800;
|
||||
ScreenHeight = 600; // JBF: was 200
|
||||
ScreenBPP = 32; */
|
||||
while(setgamemode(0,xres[i],yres[i],bpp[i]) < 0) {
|
||||
i++;
|
||||
}
|
||||
ScreenWidth = xres[i];
|
||||
ScreenHeight = yres[i];
|
||||
ScreenBPP = bpp[i];
|
||||
}
|
||||
|
||||
initprintf("Initializing OSD...\n");
|
||||
|
@ -8833,8 +8829,8 @@ RECHECK:
|
|||
}
|
||||
else
|
||||
{
|
||||
if(ud.recstat != 2)
|
||||
menus();
|
||||
if(ud.recstat != 2)
|
||||
menus();
|
||||
if( ud.multimode > 1 )
|
||||
{
|
||||
ControlInfo noshareinfo;
|
||||
|
@ -9840,23 +9836,23 @@ void dobonus(char bonusonly)
|
|||
|
||||
playanm("RADLOGO.ANM",3);
|
||||
|
||||
if( ud.lockout == 0 && !KB_KeyWaiting() )
|
||||
{
|
||||
sound(ENDSEQVOL3SND5);
|
||||
while(issoundplaying(ENDSEQVOL3SND5)) { handleevents(); getpackets(); }
|
||||
if(KB_KeyWaiting()) goto ENDANM;
|
||||
sound(ENDSEQVOL3SND6);
|
||||
while(issoundplaying(ENDSEQVOL3SND6)) { handleevents(); getpackets(); }
|
||||
if(KB_KeyWaiting()) goto ENDANM;
|
||||
sound(ENDSEQVOL3SND7);
|
||||
while(issoundplaying(ENDSEQVOL3SND7)) { handleevents(); getpackets(); }
|
||||
if(KB_KeyWaiting()) goto ENDANM;
|
||||
sound(ENDSEQVOL3SND8);
|
||||
while(issoundplaying(ENDSEQVOL3SND8)) { handleevents(); getpackets(); }
|
||||
if(KB_KeyWaiting()) goto ENDANM;
|
||||
sound(ENDSEQVOL3SND9);
|
||||
while(issoundplaying(ENDSEQVOL3SND9)) { handleevents(); getpackets(); }
|
||||
}
|
||||
if( ud.lockout == 0 && !KB_KeyWaiting() )
|
||||
{
|
||||
sound(ENDSEQVOL3SND5);
|
||||
while(issoundplaying(ENDSEQVOL3SND5)) { handleevents(); getpackets(); }
|
||||
if(KB_KeyWaiting()) goto ENDANM;
|
||||
sound(ENDSEQVOL3SND6);
|
||||
while(issoundplaying(ENDSEQVOL3SND6)) { handleevents(); getpackets(); }
|
||||
if(KB_KeyWaiting()) goto ENDANM;
|
||||
sound(ENDSEQVOL3SND7);
|
||||
while(issoundplaying(ENDSEQVOL3SND7)) { handleevents(); getpackets(); }
|
||||
if(KB_KeyWaiting()) goto ENDANM;
|
||||
sound(ENDSEQVOL3SND8);
|
||||
while(issoundplaying(ENDSEQVOL3SND8)) { handleevents(); getpackets(); }
|
||||
if(KB_KeyWaiting()) goto ENDANM;
|
||||
sound(ENDSEQVOL3SND9);
|
||||
while(issoundplaying(ENDSEQVOL3SND9)) { handleevents(); getpackets(); }
|
||||
}
|
||||
|
||||
KB_FlushKeyBoardQueue();
|
||||
totalclock = 0;
|
||||
|
|
|
@ -433,7 +433,7 @@ char *keyw[] = {
|
|||
"dynamicremap", // 285
|
||||
"setinput", // 286
|
||||
"getinput", // 287
|
||||
"save", // 288
|
||||
"save", // 288
|
||||
"<null>"
|
||||
};
|
||||
|
||||
|
@ -802,14 +802,14 @@ LABELS userdefslabels[]= {
|
|||
};
|
||||
|
||||
LABELS inputlabels[]= {
|
||||
{ "avel", INPUT_AVEL, 0, 0 },
|
||||
{ "horz", INPUT_HORZ, 0, 0 },
|
||||
{ "fvel", INPUT_FVEL, 0, 0 },
|
||||
{ "svel", INPUT_SVEL, 0, 0 },
|
||||
{ "bits", INPUT_BITS, 0, 0 },
|
||||
{ "bits2", INPUT_BITS2, 0, 0 },
|
||||
{ "", -1, 0, 0 } // END OF LIST
|
||||
};
|
||||
{ "avel", INPUT_AVEL, 0, 0 },
|
||||
{ "horz", INPUT_HORZ, 0, 0 },
|
||||
{ "fvel", INPUT_FVEL, 0, 0 },
|
||||
{ "svel", INPUT_SVEL, 0, 0 },
|
||||
{ "bits", INPUT_BITS, 0, 0 },
|
||||
{ "bits2", INPUT_BITS2, 0, 0 },
|
||||
{ "", -1, 0, 0 } // END OF LIST
|
||||
};
|
||||
|
||||
void skipcomments(void)
|
||||
{
|
||||
|
@ -3151,10 +3151,10 @@ char parsecommand(void)
|
|||
break;
|
||||
}
|
||||
|
||||
case CON_SETINPUT:
|
||||
if(!CheckEventSync(current_event))
|
||||
ReportError(WARNING_EVENTSYNC);
|
||||
case CON_GETINPUT:
|
||||
case CON_SETINPUT:
|
||||
if(!CheckEventSync(current_event))
|
||||
ReportError(WARNING_EVENTSYNC);
|
||||
case CON_GETINPUT:
|
||||
{
|
||||
long lLabelID;
|
||||
|
||||
|
@ -3463,7 +3463,7 @@ char parsecommand(void)
|
|||
case CON_OPERATEMASTERSWITCHES:
|
||||
case CON_CHECKACTIVATORMOTION:
|
||||
case CON_TIME:
|
||||
case CON_INITTIMER:
|
||||
case CON_INITTIMER:
|
||||
case CON_LOCKPLAYER:
|
||||
case CON_SHOOTVAR:
|
||||
if(!CheckEventSync(current_event))
|
||||
|
@ -3588,15 +3588,15 @@ char parsecommand(void)
|
|||
|
||||
switch(tw)
|
||||
{
|
||||
case CON_DIST:
|
||||
case CON_LDIST:
|
||||
case CON_TXDIST:
|
||||
case CON_GETANGLE:
|
||||
transvartype(GAMEVAR_FLAG_READONLY);
|
||||
break;
|
||||
case CON_MULSCALE:
|
||||
transmultvars(2);
|
||||
break;
|
||||
case CON_DIST:
|
||||
case CON_LDIST:
|
||||
case CON_TXDIST:
|
||||
case CON_GETANGLE:
|
||||
transvartype(GAMEVAR_FLAG_READONLY);
|
||||
break;
|
||||
case CON_MULSCALE:
|
||||
transmultvars(2);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
||||
|
@ -5899,59 +5899,59 @@ void ReportError(int iError)
|
|||
}
|
||||
switch(iError)
|
||||
{
|
||||
case ERROR_CLOSEBRACKET:
|
||||
initprintf("%s:%ld: error: found more `}' than `{' before `%s'.\n",compilefile,line_number,tempbuf);
|
||||
break;
|
||||
case ERROR_EVENTONLY:
|
||||
initprintf("%s:%ld: error: command `%s' only valid during events.\n",compilefile,line_number,tempbuf);
|
||||
break;
|
||||
case ERROR_EXCEEDSMAXTILES:
|
||||
initprintf("%s:%ld: error: `%s' value exceeds MAXTILES. Maximum is %d.\n",compilefile,line_number,tempbuf,MAXTILES-1);
|
||||
break;
|
||||
case ERROR_EXPECTEDKEYWORD:
|
||||
initprintf("%s:%ld: error: expected a keyword but found `%s'.\n",compilefile,line_number,tempbuf);
|
||||
break;
|
||||
case ERROR_FOUNDWITHIN:
|
||||
initprintf("%s:%ld: error: found `%s' within %s.\n",compilefile,line_number,tempbuf,parsing_event?"an event":parsing_actor?"an actor":"a state");
|
||||
break;
|
||||
case ERROR_ISAKEYWORD:
|
||||
initprintf("%s:%ld: error: symbol `%s' is a keyword.\n",compilefile,line_number,label+(labelcnt<<6));
|
||||
break;
|
||||
case ERROR_NOENDSWITCH:
|
||||
initprintf("%s:%ld: error: did not find `endswitch' before `%s'.\n",compilefile,line_number,label+(labelcnt<<6));
|
||||
break;
|
||||
case ERROR_NOTAGAMEDEF:
|
||||
initprintf("%s:%ld: error: symbol `%s' is not a game definition.\n",compilefile,line_number,label+(labelcnt<<6));
|
||||
break;
|
||||
case ERROR_NOTAGAMEVAR:
|
||||
initprintf("%s:%ld: error: symbol `%s' is not a game variable.\n",compilefile,line_number,label+(labelcnt<<6));
|
||||
break;
|
||||
case ERROR_OPENBRACKET:
|
||||
initprintf("%s:%ld: error: found more `{' than `}' before `%s'.\n",compilefile,line_number,tempbuf);
|
||||
break;
|
||||
case ERROR_PARAMUNDEFINED:
|
||||
initprintf("%s:%ld: error: parameter `%s' is undefined.\n",compilefile,line_number,tempbuf);
|
||||
break;
|
||||
case ERROR_SYMBOLNOTRECOGNIZED:
|
||||
initprintf("%s:%ld: error: symbol `%s' is not recognized.\n",compilefile,line_number,label+(labelcnt<<6));
|
||||
break;
|
||||
case ERROR_SYNTAXERROR:
|
||||
initprintf("%s:%ld: error: syntax error.\n",compilefile,line_number);
|
||||
break;
|
||||
case ERROR_VARREADONLY:
|
||||
initprintf("%s:%ld: error: variable `%s' is read-only.\n",compilefile,line_number,label+(labelcnt<<6));
|
||||
break;
|
||||
case ERROR_VARTYPEMISMATCH:
|
||||
initprintf("%s:%ld: error: variable `%s' is of the wrong type.\n",compilefile,line_number,label+(labelcnt<<6));
|
||||
break;
|
||||
case WARNING_DUPLICATEDEFINITION:
|
||||
initprintf("%s:%ld: warning: duplicate game definition `%s' ignored.\n",compilefile,line_number,label+(labelcnt<<6));
|
||||
break;
|
||||
case WARNING_EVENTSYNC:
|
||||
initprintf("%s:%ld: warning: found `%s' within a local event.\n",compilefile,line_number,tempbuf);
|
||||
break;
|
||||
case WARNING_LABELSONLY:
|
||||
initprintf("%s:%ld: warning: expected a label, found a constant.\n",compilefile,line_number);
|
||||
break;
|
||||
case ERROR_CLOSEBRACKET:
|
||||
initprintf("%s:%ld: error: found more `}' than `{' before `%s'.\n",compilefile,line_number,tempbuf);
|
||||
break;
|
||||
case ERROR_EVENTONLY:
|
||||
initprintf("%s:%ld: error: command `%s' only valid during events.\n",compilefile,line_number,tempbuf);
|
||||
break;
|
||||
case ERROR_EXCEEDSMAXTILES:
|
||||
initprintf("%s:%ld: error: `%s' value exceeds MAXTILES. Maximum is %d.\n",compilefile,line_number,tempbuf,MAXTILES-1);
|
||||
break;
|
||||
case ERROR_EXPECTEDKEYWORD:
|
||||
initprintf("%s:%ld: error: expected a keyword but found `%s'.\n",compilefile,line_number,tempbuf);
|
||||
break;
|
||||
case ERROR_FOUNDWITHIN:
|
||||
initprintf("%s:%ld: error: found `%s' within %s.\n",compilefile,line_number,tempbuf,parsing_event?"an event":parsing_actor?"an actor":"a state");
|
||||
break;
|
||||
case ERROR_ISAKEYWORD:
|
||||
initprintf("%s:%ld: error: symbol `%s' is a keyword.\n",compilefile,line_number,label+(labelcnt<<6));
|
||||
break;
|
||||
case ERROR_NOENDSWITCH:
|
||||
initprintf("%s:%ld: error: did not find `endswitch' before `%s'.\n",compilefile,line_number,label+(labelcnt<<6));
|
||||
break;
|
||||
case ERROR_NOTAGAMEDEF:
|
||||
initprintf("%s:%ld: error: symbol `%s' is not a game definition.\n",compilefile,line_number,label+(labelcnt<<6));
|
||||
break;
|
||||
case ERROR_NOTAGAMEVAR:
|
||||
initprintf("%s:%ld: error: symbol `%s' is not a game variable.\n",compilefile,line_number,label+(labelcnt<<6));
|
||||
break;
|
||||
case ERROR_OPENBRACKET:
|
||||
initprintf("%s:%ld: error: found more `{' than `}' before `%s'.\n",compilefile,line_number,tempbuf);
|
||||
break;
|
||||
case ERROR_PARAMUNDEFINED:
|
||||
initprintf("%s:%ld: error: parameter `%s' is undefined.\n",compilefile,line_number,tempbuf);
|
||||
break;
|
||||
case ERROR_SYMBOLNOTRECOGNIZED:
|
||||
initprintf("%s:%ld: error: symbol `%s' is not recognized.\n",compilefile,line_number,label+(labelcnt<<6));
|
||||
break;
|
||||
case ERROR_SYNTAXERROR:
|
||||
initprintf("%s:%ld: error: syntax error.\n",compilefile,line_number);
|
||||
break;
|
||||
case ERROR_VARREADONLY:
|
||||
initprintf("%s:%ld: error: variable `%s' is read-only.\n",compilefile,line_number,label+(labelcnt<<6));
|
||||
break;
|
||||
case ERROR_VARTYPEMISMATCH:
|
||||
initprintf("%s:%ld: error: variable `%s' is of the wrong type.\n",compilefile,line_number,label+(labelcnt<<6));
|
||||
break;
|
||||
case WARNING_DUPLICATEDEFINITION:
|
||||
initprintf("%s:%ld: warning: duplicate game definition `%s' ignored.\n",compilefile,line_number,label+(labelcnt<<6));
|
||||
break;
|
||||
case WARNING_EVENTSYNC:
|
||||
initprintf("%s:%ld: warning: found `%s' within a local event.\n",compilefile,line_number,tempbuf);
|
||||
break;
|
||||
case WARNING_LABELSONLY:
|
||||
initprintf("%s:%ld: warning: expected a label, found a constant.\n",compilefile,line_number);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1876,44 +1876,44 @@ void DoInput(char bSet, long lVar1, long lLabelID, long lVar2, short sActor, sho
|
|||
|
||||
switch(lLabelID)
|
||||
{
|
||||
case INPUT_AVEL:
|
||||
if(bSet)
|
||||
sync[iPlayer].avel=lValue;
|
||||
else
|
||||
SetGameVarID((int)lVar2, sync[iPlayer].avel, sActor, sPlayer);
|
||||
break;
|
||||
case INPUT_HORZ:
|
||||
if(bSet)
|
||||
sync[iPlayer].horz=lValue;
|
||||
else
|
||||
SetGameVarID((int)lVar2, sync[iPlayer].horz, sActor, sPlayer);
|
||||
break;
|
||||
case INPUT_FVEL:
|
||||
if(bSet)
|
||||
sync[iPlayer].fvel=lValue;
|
||||
else
|
||||
SetGameVarID((int)lVar2, sync[iPlayer].fvel, sActor, sPlayer);
|
||||
break;
|
||||
case INPUT_SVEL:
|
||||
if(bSet)
|
||||
sync[iPlayer].svel=lValue;
|
||||
else
|
||||
SetGameVarID((int)lVar2, sync[iPlayer].svel, sActor, sPlayer);
|
||||
break;
|
||||
case INPUT_BITS:
|
||||
if(bSet)
|
||||
sync[iPlayer].bits=lValue;
|
||||
else
|
||||
SetGameVarID((int)lVar2, sync[iPlayer].bits, sActor, sPlayer);
|
||||
break;
|
||||
case INPUT_BITS2:
|
||||
if(bSet)
|
||||
sync[iPlayer].bits2=lValue;
|
||||
else
|
||||
SetGameVarID((int)lVar2, sync[iPlayer].bits2, sActor, sPlayer);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case INPUT_AVEL:
|
||||
if(bSet)
|
||||
sync[iPlayer].avel=lValue;
|
||||
else
|
||||
SetGameVarID((int)lVar2, sync[iPlayer].avel, sActor, sPlayer);
|
||||
break;
|
||||
case INPUT_HORZ:
|
||||
if(bSet)
|
||||
sync[iPlayer].horz=lValue;
|
||||
else
|
||||
SetGameVarID((int)lVar2, sync[iPlayer].horz, sActor, sPlayer);
|
||||
break;
|
||||
case INPUT_FVEL:
|
||||
if(bSet)
|
||||
sync[iPlayer].fvel=lValue;
|
||||
else
|
||||
SetGameVarID((int)lVar2, sync[iPlayer].fvel, sActor, sPlayer);
|
||||
break;
|
||||
case INPUT_SVEL:
|
||||
if(bSet)
|
||||
sync[iPlayer].svel=lValue;
|
||||
else
|
||||
SetGameVarID((int)lVar2, sync[iPlayer].svel, sActor, sPlayer);
|
||||
break;
|
||||
case INPUT_BITS:
|
||||
if(bSet)
|
||||
sync[iPlayer].bits=lValue;
|
||||
else
|
||||
SetGameVarID((int)lVar2, sync[iPlayer].bits, sActor, sPlayer);
|
||||
break;
|
||||
case INPUT_BITS2:
|
||||
if(bSet)
|
||||
sync[iPlayer].bits2=lValue;
|
||||
else
|
||||
SetGameVarID((int)lVar2, sync[iPlayer].bits2, sActor, sPlayer);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -4403,14 +4403,14 @@ SKIPJIBS:
|
|||
switch(tw)
|
||||
{
|
||||
case CON_SOUNDONCEVAR:
|
||||
if(!isspritemakingsound(g_i,sound))
|
||||
if(!isspritemakingsound(g_i,sound))
|
||||
spritesound((short)sound,g_i);
|
||||
break;
|
||||
case CON_GLOBALSOUNDVAR:
|
||||
spritesound((short)sound,ps[screenpeek].i);
|
||||
break;
|
||||
case CON_STOPSOUNDVAR:
|
||||
if(isspritemakingsound(g_i,sound))
|
||||
if(isspritemakingsound(g_i,sound))
|
||||
stopspritesound((short)sound,g_i);
|
||||
break;
|
||||
case CON_SOUNDVAR:
|
||||
|
@ -4774,37 +4774,37 @@ SKIPJIBS:
|
|||
g_sp->cstat = (short) *insptr++;
|
||||
break;
|
||||
case CON_SAVE:
|
||||
{
|
||||
int i;
|
||||
time_t curtime;
|
||||
{
|
||||
int i;
|
||||
time_t curtime;
|
||||
|
||||
insptr++;
|
||||
i = *insptr++;
|
||||
if(movesperpacket == 4 && connecthead != myconnectindex)
|
||||
break;
|
||||
|
||||
lastsavedpos = i;
|
||||
curtime = time(NULL);
|
||||
Bstrcpy(tempbuf,asctime(localtime(&curtime)));
|
||||
clearbuf(ud.savegame[lastsavedpos],sizeof(ud.savegame[lastsavedpos]),0);
|
||||
Bsprintf(ud.savegame[lastsavedpos],"Auto");
|
||||
for(i=0;i<13;i++)
|
||||
Bmemcpy(&ud.savegame[lastsavedpos][i+4],&tempbuf[i+3],sizeof(tempbuf[i+3]));
|
||||
ud.savegame[lastsavedpos][i+4] = '\0';
|
||||
OSD_Printf("Saving to slot %d\n",lastsavedpos);
|
||||
|
||||
KB_FlushKeyboardQueue();
|
||||
|
||||
screencapt = 1;
|
||||
displayrooms(myconnectindex,65536);
|
||||
//savetemp("duke3d.tmp",waloff[TILE_SAVESHOT],160*100);
|
||||
screencapt = 0;
|
||||
if(ud.multimode > 1)
|
||||
saveplayer(-1-(lastsavedpos));
|
||||
else saveplayer(lastsavedpos);
|
||||
|
||||
insptr++;
|
||||
i = *insptr++;
|
||||
if(movesperpacket == 4 && connecthead != myconnectindex)
|
||||
break;
|
||||
|
||||
lastsavedpos = i;
|
||||
curtime = time(NULL);
|
||||
Bstrcpy(tempbuf,asctime(localtime(&curtime)));
|
||||
clearbuf(ud.savegame[lastsavedpos],sizeof(ud.savegame[lastsavedpos]),0);
|
||||
Bsprintf(ud.savegame[lastsavedpos],"Auto");
|
||||
for(i=0;i<13;i++)
|
||||
Bmemcpy(&ud.savegame[lastsavedpos][i+4],&tempbuf[i+3],sizeof(tempbuf[i+3]));
|
||||
ud.savegame[lastsavedpos][i+4] = '\0';
|
||||
OSD_Printf("Saving to slot %d\n",lastsavedpos);
|
||||
|
||||
KB_FlushKeyboardQueue();
|
||||
|
||||
screencapt = 1;
|
||||
displayrooms(myconnectindex,65536);
|
||||
//savetemp("duke3d.tmp",waloff[TILE_SAVESHOT],160*100);
|
||||
screencapt = 0;
|
||||
if(ud.multimode > 1)
|
||||
saveplayer(-1-(lastsavedpos));
|
||||
else saveplayer(lastsavedpos);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
case CON_IFMOVE:
|
||||
insptr++;
|
||||
parseifelse(g_t[1] == *insptr);
|
||||
|
@ -5522,8 +5522,8 @@ good:
|
|||
break;
|
||||
}
|
||||
|
||||
case CON_SETINPUT:
|
||||
case CON_GETINPUT:
|
||||
case CON_SETINPUT:
|
||||
case CON_GETINPUT:
|
||||
{
|
||||
// syntax [gs]etplayer[<var>].x <VAR>
|
||||
// <varid> <xxxid> <varid>
|
||||
|
|
|
@ -2491,7 +2491,7 @@ cheat_for_port_credits:
|
|||
gltexapplyprops();
|
||||
break;
|
||||
case 7:
|
||||
if (bpp==8) break;
|
||||
if (bpp==8) break;
|
||||
cmenu(230);
|
||||
break;
|
||||
#endif
|
||||
|
@ -3331,7 +3331,7 @@ cheat_for_port_credits:
|
|||
|
||||
break;
|
||||
case 4:
|
||||
if(SoundToggle && (FXDevice >= 0)) { VoiceToggle = (VoiceToggle == 2) ? 0 : VoiceToggle+1; }
|
||||
if(SoundToggle && (FXDevice >= 0)) { VoiceToggle = (VoiceToggle == 2) ? 0 : VoiceToggle+1; }
|
||||
onbar = 0;
|
||||
break;
|
||||
case 5:
|
||||
|
@ -3389,7 +3389,7 @@ cheat_for_port_credits:
|
|||
menutext(c,50+16+16+16+16+16+16,SHX(-8),(FXDevice<0)||SoundToggle==0,"FLIP STEREO");
|
||||
|
||||
{ char *s[] = { "OFF", "LOCAL", "ALL" };
|
||||
menutext(c+160+40,50+16+16+16+16,0,(FXDevice<0)||SoundToggle==0,s[VoiceToggle]); }
|
||||
menutext(c+160+40,50+16+16+16+16,0,(FXDevice<0)||SoundToggle==0,s[VoiceToggle]); }
|
||||
|
||||
if(AmbienceToggle) menutext(c+160+40,50+16+16+16+16+16,0,(FXDevice<0)||SoundToggle==0,"ON");
|
||||
else menutext(c+160+40,50+16+16+16+16+16,0,(FXDevice<0)||SoundToggle==0,"OFF");
|
||||
|
|
|
@ -382,7 +382,7 @@ int osdcmd_setvar(const osdfuncparm_t *parm)
|
|||
SetGameVarID(i, varval, ps[myconnectindex].i, myconnectindex);
|
||||
}
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
}
|
||||
|
||||
int osdcmd_addpath(const osdfuncparm_t *parm)
|
||||
{
|
||||
|
|
|
@ -2113,29 +2113,29 @@ char animateaccess(short gs,short snum)
|
|||
|
||||
void myospalw(long x, long y, short tilenum, signed char shade, char orientation, char p)
|
||||
{
|
||||
if(!ud.drawweapon)
|
||||
return;
|
||||
else if(ud.drawweapon == 1)
|
||||
myospal(x,y,tilenum,shade,orientation,p);
|
||||
else if(ud.drawweapon == 2)
|
||||
{
|
||||
switch(g_currentweapon)
|
||||
{
|
||||
case PISTOL_WEAPON:
|
||||
case CHAINGUN_WEAPON:
|
||||
case RPG_WEAPON:
|
||||
case FREEZE_WEAPON:
|
||||
case SHRINKER_WEAPON:
|
||||
case GROW_WEAPON:
|
||||
case DEVISTATOR_WEAPON:
|
||||
case TRIPBOMB_WEAPON:
|
||||
case HANDREMOTE_WEAPON:
|
||||
case HANDBOMB_WEAPON:
|
||||
case SHOTGUN_WEAPON:
|
||||
rotatesprite(160<<16,(180+(ps[screenpeek].weapon_pos*ps[screenpeek].weapon_pos))<<16,scale(65536,ud.statusbarscale,100),0,weapon_sprites[g_currentweapon],0,0,2,windowx1,windowy1,windowx2,windowy2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!ud.drawweapon)
|
||||
return;
|
||||
else if(ud.drawweapon == 1)
|
||||
myospal(x,y,tilenum,shade,orientation,p);
|
||||
else if(ud.drawweapon == 2)
|
||||
{
|
||||
switch(g_currentweapon)
|
||||
{
|
||||
case PISTOL_WEAPON:
|
||||
case CHAINGUN_WEAPON:
|
||||
case RPG_WEAPON:
|
||||
case FREEZE_WEAPON:
|
||||
case SHRINKER_WEAPON:
|
||||
case GROW_WEAPON:
|
||||
case DEVISTATOR_WEAPON:
|
||||
case TRIPBOMB_WEAPON:
|
||||
case HANDREMOTE_WEAPON:
|
||||
case HANDBOMB_WEAPON:
|
||||
case SHOTGUN_WEAPON:
|
||||
rotatesprite(160<<16,(180+(ps[screenpeek].weapon_pos*ps[screenpeek].weapon_pos))<<16,scale(65536,ud.statusbarscale,100),0,weapon_sprites[g_currentweapon],0,0,2,windowx1,windowy1,windowx2,windowy2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
short fistsign;
|
||||
|
@ -2285,14 +2285,14 @@ void displayweapon(short snum)
|
|||
looking_arc += ((*kb)<<3);
|
||||
else if((*kb) < 4)
|
||||
myospalw(weapon_xoffset+142-(p->look_ang>>1),
|
||||
looking_arc+234-gun_pos,HANDHOLDINGLASER+3,gs,o,pal);
|
||||
looking_arc+234-gun_pos,HANDHOLDINGLASER+3,gs,o,pal);
|
||||
|
||||
myospalw(weapon_xoffset+130-(p->look_ang>>1),
|
||||
looking_arc+249-gun_pos,
|
||||
HANDHOLDINGLASER+((*kb)>>2),gs,o,pal);
|
||||
looking_arc+249-gun_pos,
|
||||
HANDHOLDINGLASER+((*kb)>>2),gs,o,pal);
|
||||
myospalw(weapon_xoffset+152-(p->look_ang>>1),
|
||||
looking_arc+249-gun_pos,
|
||||
HANDHOLDINGLASER+((*kb)>>2),gs,o|4,pal);
|
||||
looking_arc+249-gun_pos,
|
||||
HANDHOLDINGLASER+((*kb)>>2),gs,o|4,pal);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2314,12 +2314,12 @@ void displayweapon(short snum)
|
|||
if(*kb < 8)
|
||||
{
|
||||
myospalw(weapon_xoffset+164,(looking_arc<<1)+176-gun_pos,
|
||||
RPGGUN+((*kb)>>1),gs,o,pal);
|
||||
RPGGUN+((*kb)>>1),gs,o,pal);
|
||||
}
|
||||
}
|
||||
|
||||
myospalw(weapon_xoffset+164,(looking_arc<<1)+176-gun_pos,
|
||||
RPGGUN,gs,o,pal);
|
||||
RPGGUN,gs,o,pal);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2342,13 +2342,13 @@ void displayweapon(short snum)
|
|||
case 1:
|
||||
case 2:
|
||||
myospalw(weapon_xoffset+168-(p->look_ang>>1),looking_arc+201-gun_pos,
|
||||
SHOTGUN+2,-128,o,pal);
|
||||
SHOTGUN+2,-128,o,pal);
|
||||
case 0:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
myospalw(weapon_xoffset+146-(p->look_ang>>1),looking_arc+202-gun_pos,
|
||||
SHOTGUN,gs,o,pal);
|
||||
SHOTGUN,gs,o,pal);
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
|
@ -2363,45 +2363,45 @@ void displayweapon(short snum)
|
|||
weapon_xoffset += 20;
|
||||
|
||||
myospalw(weapon_xoffset+178-(p->look_ang>>1),looking_arc+194-gun_pos,
|
||||
SHOTGUN+1+((*(kb)-1)>>1),-128,o,pal);
|
||||
SHOTGUN+1+((*(kb)-1)>>1),-128,o,pal);
|
||||
}
|
||||
|
||||
myospalw(weapon_xoffset+158-(p->look_ang>>1),looking_arc+220-gun_pos,
|
||||
SHOTGUN+3,gs,o,pal);
|
||||
SHOTGUN+3,gs,o,pal);
|
||||
|
||||
break;
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
myospalw(32+weapon_xoffset+166-(p->look_ang>>1),looking_arc+210-gun_pos,
|
||||
SHOTGUN+4,gs,o,pal);
|
||||
SHOTGUN+4,gs,o,pal);
|
||||
break;
|
||||
case 16:
|
||||
case 17:
|
||||
case 18:
|
||||
case 19:
|
||||
myospalw(64+weapon_xoffset+170-(p->look_ang>>1),looking_arc+196-gun_pos,
|
||||
SHOTGUN+5,gs,o,pal);
|
||||
SHOTGUN+5,gs,o,pal);
|
||||
break;
|
||||
case 20:
|
||||
case 21:
|
||||
case 22:
|
||||
case 23:
|
||||
myospalw(64+weapon_xoffset+176-(p->look_ang>>1),looking_arc+196-gun_pos,
|
||||
SHOTGUN+6,gs,o,pal);
|
||||
SHOTGUN+6,gs,o,pal);
|
||||
break;
|
||||
case 24:
|
||||
case 25:
|
||||
case 26:
|
||||
case 27:
|
||||
myospalw(64+weapon_xoffset+170-(p->look_ang>>1),looking_arc+196-gun_pos,
|
||||
SHOTGUN+5,gs,o,pal);
|
||||
SHOTGUN+5,gs,o,pal);
|
||||
break;
|
||||
case 28:
|
||||
case 29:
|
||||
case 30:
|
||||
myospalw(32+weapon_xoffset+156-(p->look_ang>>1),looking_arc+206-gun_pos,
|
||||
SHOTGUN+4,gs,o,pal);
|
||||
SHOTGUN+4,gs,o,pal);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2425,12 +2425,12 @@ void displayweapon(short snum)
|
|||
if(*kb > 0 && sprite[p->i].pal != 1) weapon_xoffset += 1-(rand()&3);
|
||||
|
||||
myospalw(weapon_xoffset+168-(p->look_ang>>1),looking_arc+260-gun_pos,
|
||||
CHAINGUN,gs,o,pal);
|
||||
CHAINGUN,gs,o,pal);
|
||||
switch(*kb)
|
||||
{
|
||||
case 0:
|
||||
myospalw(weapon_xoffset+178-(p->look_ang>>1),looking_arc+233-gun_pos,
|
||||
CHAINGUN+1,gs,o,pal);
|
||||
CHAINGUN+1,gs,o,pal);
|
||||
break;
|
||||
default:
|
||||
if(*kb > *aplWeaponFireDelay[CHAINGUN_WEAPON] && *kb < *aplWeaponTotalTime[CHAINGUN_WEAPON])
|
||||
|
@ -2438,21 +2438,21 @@ void displayweapon(short snum)
|
|||
i = 0;
|
||||
if(sprite[p->i].pal != 1) i = rand()&7;
|
||||
myospalw(i+weapon_xoffset-4+140-(p->look_ang>>1),i+looking_arc-((*kb)>>1)+208-gun_pos,
|
||||
CHAINGUN+5+((*kb-4)/5),gs,o,pal);
|
||||
CHAINGUN+5+((*kb-4)/5),gs,o,pal);
|
||||
if(sprite[p->i].pal != 1) i = rand()&7;
|
||||
myospalw(i+weapon_xoffset-4+184-(p->look_ang>>1),i+looking_arc-((*kb)>>1)+208-gun_pos,
|
||||
CHAINGUN+5+((*kb-4)/5),gs,o,pal);
|
||||
CHAINGUN+5+((*kb-4)/5),gs,o,pal);
|
||||
}
|
||||
if(*kb < *aplWeaponTotalTime[CHAINGUN_WEAPON]-2)
|
||||
{
|
||||
i = rand()&7;
|
||||
myospalw(i+weapon_xoffset-4+162-(p->look_ang>>1),i+looking_arc-((*kb)>>1)+208-gun_pos,
|
||||
CHAINGUN+5+((*kb-2)/5),gs,o,pal);
|
||||
CHAINGUN+5+((*kb-2)/5),gs,o,pal);
|
||||
myospalw(weapon_xoffset+178-(p->look_ang>>1),looking_arc+233-gun_pos,
|
||||
CHAINGUN+1+((*kb)>>1),gs,o,pal);
|
||||
CHAINGUN+1+((*kb)>>1),gs,o,pal);
|
||||
}
|
||||
else myospalw(weapon_xoffset+178-(p->look_ang>>1),looking_arc+233-gun_pos,
|
||||
CHAINGUN+1,gs,o,pal);
|
||||
CHAINGUN+1,gs,o,pal);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2655,21 +2655,21 @@ void displayweapon(short snum)
|
|||
}
|
||||
|
||||
myospalw(weapon_xoffset+184-(p->look_ang>>1),
|
||||
looking_arc+240-gun_pos,SHRINKER+3+((*kb)&3),-32,
|
||||
o,2);
|
||||
looking_arc+240-gun_pos,SHRINKER+3+((*kb)&3),-32,
|
||||
o,2);
|
||||
|
||||
myospalw(weapon_xoffset+188-(p->look_ang>>1),
|
||||
looking_arc+240-gun_pos,SHRINKER-1,gs,o,pal);
|
||||
looking_arc+240-gun_pos,SHRINKER-1,gs,o,pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
myospalw(weapon_xoffset+184-(p->look_ang>>1),
|
||||
looking_arc+240-gun_pos,SHRINKER+2,
|
||||
16-(sintable[p->random_club_frame&2047]>>10),
|
||||
o,2);
|
||||
looking_arc+240-gun_pos,SHRINKER+2,
|
||||
16-(sintable[p->random_club_frame&2047]>>10),
|
||||
o,2);
|
||||
|
||||
myospalw(weapon_xoffset+188-(p->look_ang>>1),
|
||||
looking_arc+240-gun_pos,SHRINKER-2,gs,o,pal);
|
||||
looking_arc+240-gun_pos,SHRINKER-2,gs,o,pal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2696,22 +2696,22 @@ void displayweapon(short snum)
|
|||
}
|
||||
|
||||
myospalw(weapon_xoffset+184-(p->look_ang>>1),
|
||||
looking_arc+240-gun_pos,SHRINKER+3+((*kb)&3),-32,
|
||||
o,0);
|
||||
looking_arc+240-gun_pos,SHRINKER+3+((*kb)&3),-32,
|
||||
o,0);
|
||||
|
||||
myospalw(weapon_xoffset+188-(p->look_ang>>1),
|
||||
looking_arc+240-gun_pos,SHRINKER+1,gs,o,pal);
|
||||
looking_arc+240-gun_pos,SHRINKER+1,gs,o,pal);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
myospalw(weapon_xoffset+184-(p->look_ang>>1),
|
||||
looking_arc+240-gun_pos,SHRINKER+2,
|
||||
16-(sintable[p->random_club_frame&2047]>>10),
|
||||
o,0);
|
||||
looking_arc+240-gun_pos,SHRINKER+2,
|
||||
16-(sintable[p->random_club_frame&2047]>>10),
|
||||
o,0);
|
||||
|
||||
myospalw(weapon_xoffset+188-(p->look_ang>>1),
|
||||
looking_arc+240-gun_pos,SHRINKER,gs,o,pal);
|
||||
looking_arc+240-gun_pos,SHRINKER,gs,o,pal);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -36,25 +36,25 @@ static int precachecount;
|
|||
static void tloadtile(short tilenume, char type)
|
||||
{
|
||||
if ((picanm[tilenume]&63) > 0) {
|
||||
int i,j;
|
||||
int i,j;
|
||||
|
||||
if ((picanm[tilenume]&192)==192) {
|
||||
i = tilenume - (picanm[tilenume]&63);
|
||||
j = tilenume;
|
||||
} else {
|
||||
i = tilenume;
|
||||
j = tilenume + (picanm[tilenume]&63);
|
||||
}
|
||||
for (;i<=j;i++) {
|
||||
if (!(gotpic[i>>3] & pow2char[i&7])) precachecount++;
|
||||
gotpic[i>>3] |= pow2char[i&7];
|
||||
precachehightile[type][i>>3] |= pow2char[i&7];
|
||||
}
|
||||
if ((picanm[tilenume]&192)==192) {
|
||||
i = tilenume - (picanm[tilenume]&63);
|
||||
j = tilenume;
|
||||
} else {
|
||||
i = tilenume;
|
||||
j = tilenume + (picanm[tilenume]&63);
|
||||
}
|
||||
for (;i<=j;i++) {
|
||||
if (!(gotpic[i>>3] & pow2char[i&7])) precachecount++;
|
||||
gotpic[i>>3] |= pow2char[i&7];
|
||||
precachehightile[type][i>>3] |= pow2char[i&7];
|
||||
}
|
||||
} else {
|
||||
if (!(gotpic[tilenume>>3] & pow2char[tilenume&7])) precachecount++;
|
||||
gotpic[tilenume>>3] |= pow2char[tilenume&7];
|
||||
precachehightile[type][tilenume>>3] |= pow2char[tilenume&7];
|
||||
}
|
||||
if (!(gotpic[tilenume>>3] & pow2char[tilenume&7])) precachecount++;
|
||||
gotpic[tilenume>>3] |= pow2char[tilenume&7];
|
||||
precachehightile[type][tilenume>>3] |= pow2char[tilenume&7];
|
||||
}
|
||||
}
|
||||
|
||||
void cachespritenum(short i)
|
||||
|
@ -162,17 +162,17 @@ void cachespritenum(short i)
|
|||
case CAMERA1__STATIC:
|
||||
maxc = 5;
|
||||
break;
|
||||
// caching of HUD sprites for weapons that may be in the level
|
||||
case CHAINGUNSPRITE__STATIC: for (j=CHAINGUN; j<=CHAINGUN+7; j++) tloadtile(j,1); break;
|
||||
case RPGSPRITE__STATIC: for (j=RPGGUN; j<=RPGGUN+2; j++) tloadtile(j,1); break;
|
||||
case FREEZESPRITE__STATIC: for (j=FREEZE; j<=FREEZE+5; j++) tloadtile(j,1); break;
|
||||
case GROWSPRITEICON__STATIC:
|
||||
case SHRINKERSPRITE__STATIC: for (j=SHRINKER-2; j<=SHRINKER+5; j++) tloadtile(j,1); break;
|
||||
case HBOMBAMMO__STATIC:
|
||||
case HEAVYHBOMB__STATIC: for (j=HANDREMOTE; j<=HANDREMOTE+5; j++) tloadtile(j,1); break;
|
||||
case TRIPBOMBSPRITE__STATIC: for (j=HANDHOLDINGLASER; j<=HANDHOLDINGLASER+4; j++) tloadtile(j,1); break;
|
||||
case SHOTGUNSPRITE__STATIC: tloadtile(SHOTGUNSHELL,1); for (j=SHOTGUN; j<=SHOTGUN+6; j++) tloadtile(j,1); break;
|
||||
case DEVISTATORSPRITE__STATIC: for (j=DEVISTATOR; j<=DEVISTATOR+1; j++) tloadtile(j,1); break;
|
||||
// caching of HUD sprites for weapons that may be in the level
|
||||
case CHAINGUNSPRITE__STATIC: for (j=CHAINGUN; j<=CHAINGUN+7; j++) tloadtile(j,1); break;
|
||||
case RPGSPRITE__STATIC: for (j=RPGGUN; j<=RPGGUN+2; j++) tloadtile(j,1); break;
|
||||
case FREEZESPRITE__STATIC: for (j=FREEZE; j<=FREEZE+5; j++) tloadtile(j,1); break;
|
||||
case GROWSPRITEICON__STATIC:
|
||||
case SHRINKERSPRITE__STATIC: for (j=SHRINKER-2; j<=SHRINKER+5; j++) tloadtile(j,1); break;
|
||||
case HBOMBAMMO__STATIC:
|
||||
case HEAVYHBOMB__STATIC: for (j=HANDREMOTE; j<=HANDREMOTE+5; j++) tloadtile(j,1); break;
|
||||
case TRIPBOMBSPRITE__STATIC: for (j=HANDHOLDINGLASER; j<=HANDHOLDINGLASER+4; j++) tloadtile(j,1); break;
|
||||
case SHOTGUNSPRITE__STATIC: tloadtile(SHOTGUNSHELL,1); for (j=SHOTGUN; j<=SHOTGUN+6; j++) tloadtile(j,1); break;
|
||||
case DEVISTATORSPRITE__STATIC: for (j=DEVISTATOR; j<=DEVISTATOR+1; j++) tloadtile(j,1); break;
|
||||
|
||||
}
|
||||
|
||||
|
@ -275,12 +275,12 @@ void cacheit(void)
|
|||
{
|
||||
long i,j,k, pc=0;
|
||||
long tc;
|
||||
unsigned long starttime, endtime;
|
||||
unsigned long starttime, endtime;
|
||||
|
||||
if(ud.recstat == 2)
|
||||
return;
|
||||
if(ud.recstat == 2)
|
||||
return;
|
||||
|
||||
starttime = getticks();
|
||||
starttime = getticks();
|
||||
|
||||
precachenecessarysounds();
|
||||
|
||||
|
@ -314,44 +314,44 @@ void cacheit(void)
|
|||
}
|
||||
}
|
||||
|
||||
tc = totalclock;
|
||||
tc = totalclock;
|
||||
j = 0;
|
||||
|
||||
for(i=0;i<MAXTILES;i++) {
|
||||
if (!(i&7) && !gotpic[i>>3]) {
|
||||
i+=7;
|
||||
continue;
|
||||
}
|
||||
if(gotpic[i>>3] & pow2char[i&7]) {
|
||||
if (waloff[i] == 0)
|
||||
loadtile((short)i);
|
||||
for(i=0;i<MAXTILES;i++) {
|
||||
if (!(i&7) && !gotpic[i>>3]) {
|
||||
i+=7;
|
||||
continue;
|
||||
}
|
||||
if(gotpic[i>>3] & pow2char[i&7]) {
|
||||
if (waloff[i] == 0)
|
||||
loadtile((short)i);
|
||||
|
||||
if (useprecache) {
|
||||
if (precachehightile[0][i>>3] & pow2char[i&7])
|
||||
for (k=0; k<MAXPALOOKUPS; k++)
|
||||
polymost_precache(i,k,0);
|
||||
if (useprecache) {
|
||||
if (precachehightile[0][i>>3] & pow2char[i&7])
|
||||
for (k=0; k<MAXPALOOKUPS; k++)
|
||||
polymost_precache(i,k,0);
|
||||
|
||||
if (precachehightile[1][i>>3] & pow2char[i&7])
|
||||
for (k=0; k<MAXPALOOKUPS; k++)
|
||||
polymost_precache(i,k,1);
|
||||
}
|
||||
if (precachehightile[1][i>>3] & pow2char[i&7])
|
||||
for (k=0; k<MAXPALOOKUPS; k++)
|
||||
polymost_precache(i,k,1);
|
||||
}
|
||||
|
||||
j++;
|
||||
pc++;
|
||||
} else continue;
|
||||
j++;
|
||||
pc++;
|
||||
} else continue;
|
||||
|
||||
if((j&7) == 0) { handleevents(); getpackets(); }
|
||||
if (totalclock - tc > TICRATE/4) {
|
||||
sprintf(tempbuf,"Loading textures ... %ld%%\n",min(100,100*pc/precachecount));
|
||||
dofrontscreens(tempbuf);
|
||||
tc = totalclock;
|
||||
}
|
||||
if((j&7) == 0) { handleevents(); getpackets(); }
|
||||
if (totalclock - tc > TICRATE/4) {
|
||||
sprintf(tempbuf,"Loading textures ... %ld%%\n",min(100,100*pc/precachecount));
|
||||
dofrontscreens(tempbuf);
|
||||
tc = totalclock;
|
||||
}
|
||||
}
|
||||
|
||||
clearbufbyte(gotpic,sizeof(gotpic),0L);
|
||||
|
||||
endtime = getticks();
|
||||
OSD_Printf("Cache time: %dms\n", endtime-starttime);
|
||||
endtime = getticks();
|
||||
OSD_Printf("Cache time: %dms\n", endtime-starttime);
|
||||
}
|
||||
|
||||
void xyzmirror(short i,short wn)
|
||||
|
@ -1004,7 +1004,7 @@ void newgame(char vn,char ln,char sk)
|
|||
short i;
|
||||
|
||||
if(globalskillsound >= 0)
|
||||
while(issoundplaying(globalskillsound)) { handleevents(); getpackets(); }
|
||||
while(issoundplaying(globalskillsound)) { handleevents(); getpackets(); }
|
||||
globalskillsound = -1;
|
||||
|
||||
waitforeverybody();
|
||||
|
@ -1113,7 +1113,7 @@ void resetpspritevars(char g)
|
|||
{
|
||||
aimmode[i] = ps[i].aim_mode;
|
||||
autoaim[i] = ps[i].auto_aim;
|
||||
weaponswitch[i] = ps[i].weaponswitch;
|
||||
weaponswitch[i] = ps[i].weaponswitch;
|
||||
if(ud.multimode > 1 && (gametype_flags[ud.coop]&GAMETYPE_FLAG_PRESERVEINVENTORYDEATH) && ud.last_level >= 0)
|
||||
{
|
||||
for(j=0;j<MAX_WEAPONS;j++)
|
||||
|
@ -1145,7 +1145,7 @@ void resetpspritevars(char g)
|
|||
{
|
||||
ps[i].aim_mode = aimmode[i];
|
||||
ps[i].auto_aim = autoaim[i];
|
||||
ps[i].weaponswitch = weaponswitch[i];
|
||||
ps[i].weaponswitch = weaponswitch[i];
|
||||
if(ud.multimode > 1 && (gametype_flags[ud.coop]&GAMETYPE_FLAG_PRESERVEINVENTORYDEATH) && ud.last_level >= 0)
|
||||
{
|
||||
for(j=0;j<MAX_WEAPONS;j++)
|
||||
|
|
|
@ -60,7 +60,7 @@ int loadpheader(char spot,struct savehead *saveh)
|
|||
|
||||
return(0);
|
||||
corrupt:
|
||||
kclose(fil);
|
||||
kclose(fil);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -203,25 +203,25 @@ int loadplayer(signed char spot)
|
|||
if (kdfread(&script[0],4,MAXSCRIPTSIZE,fil) != MAXSCRIPTSIZE) goto corrupt;
|
||||
for(i=0;i<MAXSCRIPTSIZE;i++)
|
||||
if( scriptptrs[i] )
|
||||
{
|
||||
j = (long)script[i]+(long)&script[0];
|
||||
script[i] = j;
|
||||
}
|
||||
{
|
||||
j = (long)script[i]+(long)&script[0];
|
||||
script[i] = j;
|
||||
}
|
||||
|
||||
if (kdfread(&actorscrptr[0],4,MAXTILES,fil) != MAXTILES) goto corrupt;
|
||||
for(i=0;i<MAXTILES;i++)
|
||||
if(actorscrptr[i])
|
||||
{
|
||||
j = (long)actorscrptr[i]+(long)&script[0];
|
||||
actorscrptr[i] = (long *)j;
|
||||
}
|
||||
{
|
||||
j = (long)actorscrptr[i]+(long)&script[0];
|
||||
actorscrptr[i] = (long *)j;
|
||||
}
|
||||
if (kdfread(&actorLoadEventScrptr[0],4,MAXTILES,fil) != MAXTILES) goto corrupt;
|
||||
for(i=0;i<MAXTILES;i++)
|
||||
if(actorLoadEventScrptr[i])
|
||||
{
|
||||
j = (long)actorLoadEventScrptr[i]+(long)&script[0];
|
||||
actorLoadEventScrptr[i] = (long *)j;
|
||||
}
|
||||
{
|
||||
j = (long)actorLoadEventScrptr[i]+(long)&script[0];
|
||||
actorLoadEventScrptr[i] = (long *)j;
|
||||
}
|
||||
|
||||
if (kdfread(&scriptptrs[0],1,MAXSPRITES,fil) != MAXSPRITES) goto corrupt;
|
||||
if (kdfread(&hittype[0],sizeof(struct weaponhit),MAXSPRITES,fil) != MAXSPRITES) goto corrupt;
|
||||
|
@ -326,7 +326,7 @@ int loadplayer(signed char spot)
|
|||
{
|
||||
for(x=0;x<numanimwalls;x++)
|
||||
switch(dynamictostatic[wall[animwall[x].wallnum].picnum])
|
||||
{
|
||||
{
|
||||
case FEMPIC1__STATIC:
|
||||
wall[animwall[x].wallnum].picnum = BLANKSCREEN;
|
||||
break;
|
||||
|
@ -334,7 +334,7 @@ int loadplayer(signed char spot)
|
|||
case FEMPIC3__STATIC:
|
||||
wall[animwall[x].wallnum].picnum = SCREENBREAK6;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
numinterpolations = 0;
|
||||
|
@ -345,31 +345,31 @@ int loadplayer(signed char spot)
|
|||
{
|
||||
switch(sprite[k].lotag)
|
||||
{
|
||||
case 31:
|
||||
setinterpolation(§or[sprite[k].sectnum].floorz);
|
||||
break;
|
||||
case 32:
|
||||
setinterpolation(§or[sprite[k].sectnum].ceilingz);
|
||||
break;
|
||||
case 25:
|
||||
setinterpolation(§or[sprite[k].sectnum].floorz);
|
||||
setinterpolation(§or[sprite[k].sectnum].ceilingz);
|
||||
break;
|
||||
case 17:
|
||||
setinterpolation(§or[sprite[k].sectnum].floorz);
|
||||
setinterpolation(§or[sprite[k].sectnum].ceilingz);
|
||||
break;
|
||||
case 0:
|
||||
case 5:
|
||||
case 6:
|
||||
case 11:
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 26:
|
||||
case 30:
|
||||
setsectinterpolate(k);
|
||||
break;
|
||||
case 31:
|
||||
setinterpolation(§or[sprite[k].sectnum].floorz);
|
||||
break;
|
||||
case 32:
|
||||
setinterpolation(§or[sprite[k].sectnum].ceilingz);
|
||||
break;
|
||||
case 25:
|
||||
setinterpolation(§or[sprite[k].sectnum].floorz);
|
||||
setinterpolation(§or[sprite[k].sectnum].ceilingz);
|
||||
break;
|
||||
case 17:
|
||||
setinterpolation(§or[sprite[k].sectnum].floorz);
|
||||
setinterpolation(§or[sprite[k].sectnum].ceilingz);
|
||||
break;
|
||||
case 0:
|
||||
case 5:
|
||||
case 6:
|
||||
case 11:
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 26:
|
||||
case 30:
|
||||
setsectinterpolate(k);
|
||||
break;
|
||||
}
|
||||
|
||||
k = nextspritestat[k];
|
||||
|
@ -396,7 +396,7 @@ int loadplayer(signed char spot)
|
|||
|
||||
return(0);
|
||||
corrupt:
|
||||
Bsprintf(tempbuf,"Save game file \"%s\" is corrupt.",fnptr);
|
||||
Bsprintf(tempbuf,"Save game file \"%s\" is corrupt.",fnptr);
|
||||
gameexit(tempbuf);
|
||||
return -1;
|
||||
}
|
||||
|
@ -511,38 +511,38 @@ int saveplayer(signed char spot)
|
|||
|
||||
for(i=0;i<MAXSCRIPTSIZE;i++)
|
||||
if( scriptptrs[i] )
|
||||
{
|
||||
j = script[i]+(long)&script[0];
|
||||
script[i] = j;
|
||||
}
|
||||
{
|
||||
j = script[i]+(long)&script[0];
|
||||
script[i] = j;
|
||||
}
|
||||
|
||||
for(i=0;i<MAXTILES;i++)
|
||||
if(actorscrptr[i])
|
||||
{
|
||||
j = (long)actorscrptr[i]-(long)&script[0];
|
||||
actorscrptr[i] = (long *)j;
|
||||
}
|
||||
{
|
||||
j = (long)actorscrptr[i]-(long)&script[0];
|
||||
actorscrptr[i] = (long *)j;
|
||||
}
|
||||
dfwrite(&actorscrptr[0],4,MAXTILES,fil);
|
||||
for(i=0;i<MAXTILES;i++)
|
||||
if(actorscrptr[i])
|
||||
{
|
||||
j = (long)actorscrptr[i]+(long)&script[0];
|
||||
actorscrptr[i] = (long *)j;
|
||||
}
|
||||
{
|
||||
j = (long)actorscrptr[i]+(long)&script[0];
|
||||
actorscrptr[i] = (long *)j;
|
||||
}
|
||||
|
||||
for(i=0;i<MAXTILES;i++)
|
||||
if(actorLoadEventScrptr[i])
|
||||
{
|
||||
j = (long)actorLoadEventScrptr[i]-(long)&script[0];
|
||||
actorLoadEventScrptr[i] = (long *)j;
|
||||
}
|
||||
{
|
||||
j = (long)actorLoadEventScrptr[i]-(long)&script[0];
|
||||
actorLoadEventScrptr[i] = (long *)j;
|
||||
}
|
||||
dfwrite(&actorLoadEventScrptr[0],4,MAXTILES,fil);
|
||||
for(i=0;i<MAXTILES;i++)
|
||||
if(actorLoadEventScrptr[i])
|
||||
{
|
||||
j = (long)actorLoadEventScrptr[i]+(long)&script[0];
|
||||
actorLoadEventScrptr[i] = (long *)j;
|
||||
}
|
||||
{
|
||||
j = (long)actorLoadEventScrptr[i]+(long)&script[0];
|
||||
actorLoadEventScrptr[i] = (long *)j;
|
||||
}
|
||||
|
||||
|
||||
for(i=0;i<MAXSPRITES;i++)
|
||||
|
|
|
@ -44,24 +44,24 @@ long backflag,numenvsnds;
|
|||
|
||||
void SoundStartup( void )
|
||||
{
|
||||
int32 status;
|
||||
int32 status;
|
||||
|
||||
// if they chose None lets return
|
||||
if (FXDevice < 0) return;
|
||||
// if they chose None lets return
|
||||
if (FXDevice < 0) return;
|
||||
|
||||
status = FX_Init( FXDevice, NumVoices, NumChannels, NumBits, MixRate );
|
||||
if ( status == FX_Ok ) {
|
||||
FX_SetVolume( FXVolume );
|
||||
if (ReverseStereo == 1) {
|
||||
FX_SetReverseStereo(!FX_GetReverseStereo());
|
||||
}
|
||||
status = FX_SetCallBack( testcallback );
|
||||
}
|
||||
status = FX_Init( FXDevice, NumVoices, NumChannels, NumBits, MixRate );
|
||||
if ( status == FX_Ok ) {
|
||||
FX_SetVolume( FXVolume );
|
||||
if (ReverseStereo == 1) {
|
||||
FX_SetReverseStereo(!FX_GetReverseStereo());
|
||||
}
|
||||
status = FX_SetCallBack( testcallback );
|
||||
}
|
||||
|
||||
if ( status != FX_Ok ) {
|
||||
sprintf(tempbuf, "Sound startup error: %s", FX_ErrorString( FX_Error ));
|
||||
gameexit(tempbuf);
|
||||
}
|
||||
if ( status != FX_Ok ) {
|
||||
sprintf(tempbuf, "Sound startup error: %s", FX_ErrorString( FX_Error ));
|
||||
gameexit(tempbuf);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -74,17 +74,17 @@ void SoundStartup( void )
|
|||
|
||||
void SoundShutdown( void )
|
||||
{
|
||||
int32 status;
|
||||
int32 status;
|
||||
|
||||
// if they chose None lets return
|
||||
if (FXDevice < 0)
|
||||
return;
|
||||
// if they chose None lets return
|
||||
if (FXDevice < 0)
|
||||
return;
|
||||
|
||||
status = FX_Shutdown();
|
||||
if ( status != FX_Ok ) {
|
||||
sprintf(tempbuf, "Sound shutdown error: %s", FX_ErrorString( FX_Error ));
|
||||
gameexit(tempbuf);
|
||||
}
|
||||
status = FX_Shutdown();
|
||||
if ( status != FX_Ok ) {
|
||||
sprintf(tempbuf, "Sound shutdown error: %s", FX_ErrorString( FX_Error ));
|
||||
gameexit(tempbuf);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -275,9 +275,9 @@ int xyzsound(short num,short i,long x,long y,long z)
|
|||
if( soundm[num]&4 )
|
||||
{
|
||||
if(VoiceToggle==0)
|
||||
return -1;
|
||||
return -1;
|
||||
else if (ud.multimode > 1 && PN == APLAYER && sprite[i].yvel != screenpeek && (!(gametype_flags[ud.coop]&GAMETYPE_FLAG_COOPSOUND)?1:VoiceToggle!=2))
|
||||
return -1;
|
||||
return -1;
|
||||
for(j=0;j<NUM_SOUNDS;j++)
|
||||
for(k=0;k<Sound[j].num;k++)
|
||||
if( (Sound[j].num > 0) && (soundm[j]&4) )
|
||||
|
@ -463,7 +463,7 @@ int spritesound(unsigned short num, short i)
|
|||
|
||||
void stopspritesound(short num, short i)
|
||||
{
|
||||
stopsound(num);
|
||||
stopsound(num);
|
||||
}
|
||||
|
||||
void stopsound(short num)
|
||||
|
@ -624,11 +624,11 @@ void clearsoundlocks(void)
|
|||
|
||||
int isspritemakingsound(short i, int num)
|
||||
{
|
||||
if (num < 0) num=0; // FIXME
|
||||
return issoundplaying(num) > 0;
|
||||
if (num < 0) num=0; // FIXME
|
||||
return issoundplaying(num) > 0;
|
||||
}
|
||||
|
||||
int issoundplaying(int num)
|
||||
{
|
||||
return Sound[num].num;
|
||||
return Sound[num].num;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue