mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 06:32:37 +00:00
Made the "Duke Talk" and "HUD weapon" menu options into 3 way toggles, Duke Talk now toggles between off, local player sounds and all player sounds, and HUD weapon display now toggles between full weapon drawing, weapon icon drawing and no weapon drawing.
git-svn-id: https://svn.eduke32.com/eduke32@22 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
7e9b6aaea1
commit
22abcdef79
4 changed files with 104 additions and 75 deletions
|
@ -61,7 +61,7 @@ char volume_names[MAXVOLUMES][33] = { "L.A. MELTDOWN", "LUNAR APOCALYPSE", "SHRA
|
||||||
char skill_names[5][33] = { "PIECE OF CAKE", "LET'S ROCK", "COME GET SOME", "DAMN I'M GOOD" };
|
char skill_names[5][33] = { "PIECE OF CAKE", "LET'S ROCK", "COME GET SOME", "DAMN I'M GOOD" };
|
||||||
|
|
||||||
char gametype_names[MAXGAMETYPES][33] = { "DUKEMATCH (SPAWN)","COOPERATIVE PLAY","DUKEMATCH (NO SPAWN)"};
|
char gametype_names[MAXGAMETYPES][33] = { "DUKEMATCH (SPAWN)","COOPERATIVE PLAY","DUKEMATCH (NO SPAWN)"};
|
||||||
int gametype_flags[MAXGAMETYPES] = {4+8+16+1024+2048+16384,1+2+32+64+128+256+512+4096+8192+32768,2+4+8+16+16384};
|
int gametype_flags[MAXGAMETYPES] = {4+8+16+256+1024+2048+16384,1+2+32+64+128+256+512+4096+8192+32768,2+4+8+16+256+16384};
|
||||||
char num_gametypes = 3;
|
char num_gametypes = 3;
|
||||||
|
|
||||||
long soundsiz[NUM_SOUNDS];
|
long soundsiz[NUM_SOUNDS];
|
||||||
|
|
|
@ -2194,9 +2194,10 @@ cheat_for_port_credits:
|
||||||
}
|
}
|
||||||
enabled = 1;
|
enabled = 1;
|
||||||
switch (io) {
|
switch (io) {
|
||||||
case 0: if (x==io) ud.drawweapon = 1-ud.drawweapon;
|
case 0: if (x==io) { ud.drawweapon = (ud.drawweapon == 2) ? 0 : ud.drawweapon+1; }
|
||||||
modval(0,1,(int *)&ud.drawweapon,1,probey==0);
|
modval(0,2,(int *)&ud.drawweapon,1,probey==0);
|
||||||
gametextpal(d,yy, ud.drawweapon ? "On" : "Off", 0, 0); break;
|
{ char *s[] = { "Off", "On", "Icon" };
|
||||||
|
gametextpal(d,yy, s[ud.drawweapon], 0, 0); break; }
|
||||||
case 1: if (x==io) ud.tickrate = 1-ud.tickrate;
|
case 1: if (x==io) ud.tickrate = 1-ud.tickrate;
|
||||||
modval(0,1,(int *)&ud.tickrate,1,probey==1);
|
modval(0,1,(int *)&ud.tickrate,1,probey==1);
|
||||||
gametextpal(d,yy, ud.tickrate ? "On" : "Off", 0, 0); break;
|
gametextpal(d,yy, ud.tickrate ? "On" : "Off", 0, 0); break;
|
||||||
|
@ -3326,7 +3327,7 @@ cheat_for_port_credits:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if(SoundToggle && (FXDevice >= 0)) VoiceToggle = 1-VoiceToggle;
|
if(SoundToggle && (FXDevice >= 0)) { VoiceToggle = (VoiceToggle == 2) ? 0 : VoiceToggle+1; }
|
||||||
onbar = 0;
|
onbar = 0;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
|
@ -3383,8 +3384,8 @@ cheat_for_port_credits:
|
||||||
|
|
||||||
menutext(c,50+16+16+16+16+16+16,SHX(-8),(FXDevice<0)||SoundToggle==0,"FLIP STEREO");
|
menutext(c,50+16+16+16+16+16+16,SHX(-8),(FXDevice<0)||SoundToggle==0,"FLIP STEREO");
|
||||||
|
|
||||||
if(VoiceToggle) menutext(c+160+40,50+16+16+16+16,0,(FXDevice<0)||SoundToggle==0,"ON");
|
{ char *s[] = { "OFF", "LOCAL", "ALL" };
|
||||||
else menutext(c+160+40,50+16+16+16+16,0,(FXDevice<0)||SoundToggle==0,"OFF");
|
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");
|
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");
|
else menutext(c+160+40,50+16+16+16+16+16,0,(FXDevice<0)||SoundToggle==0,"OFF");
|
||||||
|
|
|
@ -2111,6 +2111,33 @@ char animateaccess(short gs,short snum)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
short fistsign;
|
short fistsign;
|
||||||
|
|
||||||
void displayweapon(short snum)
|
void displayweapon(short snum)
|
||||||
|
@ -2217,7 +2244,7 @@ void displayweapon(short snum)
|
||||||
|
|
||||||
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
||||||
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
||||||
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0)
|
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0)
|
||||||
{
|
{
|
||||||
if( (*kb) > 0 )
|
if( (*kb) > 0 )
|
||||||
{
|
{
|
||||||
|
@ -2244,7 +2271,7 @@ void displayweapon(short snum)
|
||||||
|
|
||||||
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
||||||
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
||||||
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0)
|
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0)
|
||||||
{
|
{
|
||||||
if(sprite[p->i].pal == 1)
|
if(sprite[p->i].pal == 1)
|
||||||
pal = 1;
|
pal = 1;
|
||||||
|
@ -2257,14 +2284,13 @@ void displayweapon(short snum)
|
||||||
if((*kb) > 6)
|
if((*kb) > 6)
|
||||||
looking_arc += ((*kb)<<3);
|
looking_arc += ((*kb)<<3);
|
||||||
else if((*kb) < 4)
|
else if((*kb) < 4)
|
||||||
|
myospalw(weapon_xoffset+142-(p->look_ang>>1),
|
||||||
myospal(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);
|
||||||
|
|
||||||
myospal(weapon_xoffset+130-(p->look_ang>>1),
|
myospalw(weapon_xoffset+130-(p->look_ang>>1),
|
||||||
looking_arc+249-gun_pos,
|
looking_arc+249-gun_pos,
|
||||||
HANDHOLDINGLASER+((*kb)>>2),gs,o,pal);
|
HANDHOLDINGLASER+((*kb)>>2),gs,o,pal);
|
||||||
myospal(weapon_xoffset+152-(p->look_ang>>1),
|
myospalw(weapon_xoffset+152-(p->look_ang>>1),
|
||||||
looking_arc+249-gun_pos,
|
looking_arc+249-gun_pos,
|
||||||
HANDHOLDINGLASER+((*kb)>>2),gs,o|4,pal);
|
HANDHOLDINGLASER+((*kb)>>2),gs,o|4,pal);
|
||||||
}
|
}
|
||||||
|
@ -2274,7 +2300,7 @@ void displayweapon(short snum)
|
||||||
|
|
||||||
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
||||||
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
||||||
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0)
|
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0)
|
||||||
{
|
{
|
||||||
if(sprite[p->i].pal == 1)
|
if(sprite[p->i].pal == 1)
|
||||||
pal = 1;
|
pal = 1;
|
||||||
|
@ -2287,12 +2313,12 @@ void displayweapon(short snum)
|
||||||
{
|
{
|
||||||
if(*kb < 8)
|
if(*kb < 8)
|
||||||
{
|
{
|
||||||
myospal(weapon_xoffset+164,(looking_arc<<1)+176-gun_pos,
|
myospalw(weapon_xoffset+164,(looking_arc<<1)+176-gun_pos,
|
||||||
RPGGUN+((*kb)>>1),gs,o,pal);
|
RPGGUN+((*kb)>>1),gs,o,pal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
myospal(weapon_xoffset+164,(looking_arc<<1)+176-gun_pos,
|
myospalw(weapon_xoffset+164,(looking_arc<<1)+176-gun_pos,
|
||||||
RPGGUN,gs,o,pal);
|
RPGGUN,gs,o,pal);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2301,7 +2327,7 @@ void displayweapon(short snum)
|
||||||
|
|
||||||
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
||||||
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
||||||
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0)
|
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0)
|
||||||
{
|
{
|
||||||
if(sprite[p->i].pal == 1)
|
if(sprite[p->i].pal == 1)
|
||||||
pal = 1;
|
pal = 1;
|
||||||
|
@ -2315,13 +2341,13 @@ void displayweapon(short snum)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
case 2:
|
case 2:
|
||||||
myospal(weapon_xoffset+168-(p->look_ang>>1),looking_arc+201-gun_pos,
|
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 0:
|
||||||
case 6:
|
case 6:
|
||||||
case 7:
|
case 7:
|
||||||
case 8:
|
case 8:
|
||||||
myospal(weapon_xoffset+146-(p->look_ang>>1),looking_arc+202-gun_pos,
|
myospalw(weapon_xoffset+146-(p->look_ang>>1),looking_arc+202-gun_pos,
|
||||||
SHOTGUN,gs,o,pal);
|
SHOTGUN,gs,o,pal);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
@ -2336,45 +2362,45 @@ void displayweapon(short snum)
|
||||||
gun_pos -= 40;
|
gun_pos -= 40;
|
||||||
weapon_xoffset += 20;
|
weapon_xoffset += 20;
|
||||||
|
|
||||||
myospal(weapon_xoffset+178-(p->look_ang>>1),looking_arc+194-gun_pos,
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
myospal(weapon_xoffset+158-(p->look_ang>>1),looking_arc+220-gun_pos,
|
myospalw(weapon_xoffset+158-(p->look_ang>>1),looking_arc+220-gun_pos,
|
||||||
SHOTGUN+3,gs,o,pal);
|
SHOTGUN+3,gs,o,pal);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
case 14:
|
case 14:
|
||||||
case 15:
|
case 15:
|
||||||
myospal(32+weapon_xoffset+166-(p->look_ang>>1),looking_arc+210-gun_pos,
|
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;
|
break;
|
||||||
case 16:
|
case 16:
|
||||||
case 17:
|
case 17:
|
||||||
case 18:
|
case 18:
|
||||||
case 19:
|
case 19:
|
||||||
myospal(64+weapon_xoffset+170-(p->look_ang>>1),looking_arc+196-gun_pos,
|
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;
|
break;
|
||||||
case 20:
|
case 20:
|
||||||
case 21:
|
case 21:
|
||||||
case 22:
|
case 22:
|
||||||
case 23:
|
case 23:
|
||||||
myospal(64+weapon_xoffset+176-(p->look_ang>>1),looking_arc+196-gun_pos,
|
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;
|
break;
|
||||||
case 24:
|
case 24:
|
||||||
case 25:
|
case 25:
|
||||||
case 26:
|
case 26:
|
||||||
case 27:
|
case 27:
|
||||||
myospal(64+weapon_xoffset+170-(p->look_ang>>1),looking_arc+196-gun_pos,
|
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;
|
break;
|
||||||
case 28:
|
case 28:
|
||||||
case 29:
|
case 29:
|
||||||
case 30:
|
case 30:
|
||||||
myospal(32+weapon_xoffset+156-(p->look_ang>>1),looking_arc+206-gun_pos,
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2386,7 +2412,7 @@ void displayweapon(short snum)
|
||||||
|
|
||||||
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
||||||
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
||||||
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0)
|
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0)
|
||||||
{
|
{
|
||||||
if(sprite[p->i].pal == 1)
|
if(sprite[p->i].pal == 1)
|
||||||
pal = 1;
|
pal = 1;
|
||||||
|
@ -2398,12 +2424,12 @@ void displayweapon(short snum)
|
||||||
|
|
||||||
if(*kb > 0 && sprite[p->i].pal != 1) weapon_xoffset += 1-(rand()&3);
|
if(*kb > 0 && sprite[p->i].pal != 1) weapon_xoffset += 1-(rand()&3);
|
||||||
|
|
||||||
myospal(weapon_xoffset+168-(p->look_ang>>1),looking_arc+260-gun_pos,
|
myospalw(weapon_xoffset+168-(p->look_ang>>1),looking_arc+260-gun_pos,
|
||||||
CHAINGUN,gs,o,pal);
|
CHAINGUN,gs,o,pal);
|
||||||
switch(*kb)
|
switch(*kb)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
myospal(weapon_xoffset+178-(p->look_ang>>1),looking_arc+233-gun_pos,
|
myospalw(weapon_xoffset+178-(p->look_ang>>1),looking_arc+233-gun_pos,
|
||||||
CHAINGUN+1,gs,o,pal);
|
CHAINGUN+1,gs,o,pal);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -2411,21 +2437,21 @@ void displayweapon(short snum)
|
||||||
{
|
{
|
||||||
i = 0;
|
i = 0;
|
||||||
if(sprite[p->i].pal != 1) i = rand()&7;
|
if(sprite[p->i].pal != 1) i = rand()&7;
|
||||||
myospal(i+weapon_xoffset-4+140-(p->look_ang>>1),i+looking_arc-((*kb)>>1)+208-gun_pos,
|
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;
|
if(sprite[p->i].pal != 1) i = rand()&7;
|
||||||
myospal(i+weapon_xoffset-4+184-(p->look_ang>>1),i+looking_arc-((*kb)>>1)+208-gun_pos,
|
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)
|
if(*kb < *aplWeaponTotalTime[CHAINGUN_WEAPON]-2)
|
||||||
{
|
{
|
||||||
i = rand()&7;
|
i = rand()&7;
|
||||||
myospal(i+weapon_xoffset-4+162-(p->look_ang>>1),i+looking_arc-((*kb)>>1)+208-gun_pos,
|
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);
|
||||||
myospal(weapon_xoffset+178-(p->look_ang>>1),looking_arc+233-gun_pos,
|
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 myospal(weapon_xoffset+178-(p->look_ang>>1),looking_arc+233-gun_pos,
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2436,7 +2462,7 @@ void displayweapon(short snum)
|
||||||
|
|
||||||
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
||||||
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
||||||
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0)
|
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0)
|
||||||
{
|
{
|
||||||
if(sprite[p->i].pal == 1)
|
if(sprite[p->i].pal == 1)
|
||||||
pal = 1;
|
pal = 1;
|
||||||
|
@ -2452,36 +2478,36 @@ void displayweapon(short snum)
|
||||||
if((*kb) == *aplWeaponFireDelay[PISTOL_WEAPON])
|
if((*kb) == *aplWeaponFireDelay[PISTOL_WEAPON])
|
||||||
l -= 3;
|
l -= 3;
|
||||||
|
|
||||||
myospal((l-(p->look_ang>>1)),(looking_arc+244-gun_pos),FIRSTGUN+kb_frames[*kb],gs,2,pal);
|
myospalw((l-(p->look_ang>>1)),(looking_arc+244-gun_pos),FIRSTGUN+kb_frames[*kb],gs,2,pal);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
if((*kb) < *aplWeaponReload[PISTOL_WEAPON]-17)
|
if((*kb) < *aplWeaponReload[PISTOL_WEAPON]-17)
|
||||||
myospal(194-(p->look_ang>>1),looking_arc+230-gun_pos,FIRSTGUN+4,gs,o,pal);
|
myospalw(194-(p->look_ang>>1),looking_arc+230-gun_pos,FIRSTGUN+4,gs,o,pal);
|
||||||
else if((*kb) < *aplWeaponReload[PISTOL_WEAPON]-12)
|
else if((*kb) < *aplWeaponReload[PISTOL_WEAPON]-12)
|
||||||
{
|
{
|
||||||
myospal(244-((*kb)<<3)-(p->look_ang>>1),looking_arc+130-gun_pos+((*kb)<<4),FIRSTGUN+6,gs,o,pal);
|
myospalw(244-((*kb)<<3)-(p->look_ang>>1),looking_arc+130-gun_pos+((*kb)<<4),FIRSTGUN+6,gs,o,pal);
|
||||||
myospal(224-(p->look_ang>>1),looking_arc+220-gun_pos,FIRSTGUN+5,gs,o,pal);
|
myospalw(224-(p->look_ang>>1),looking_arc+220-gun_pos,FIRSTGUN+5,gs,o,pal);
|
||||||
}
|
}
|
||||||
else if((*kb) < *aplWeaponReload[PISTOL_WEAPON]-7)
|
else if((*kb) < *aplWeaponReload[PISTOL_WEAPON]-7)
|
||||||
{
|
{
|
||||||
myospal(124+((*kb)<<1)-(p->look_ang>>1),looking_arc+430-gun_pos-((*kb)<<3),FIRSTGUN+6,gs,o,pal);
|
myospalw(124+((*kb)<<1)-(p->look_ang>>1),looking_arc+430-gun_pos-((*kb)<<3),FIRSTGUN+6,gs,o,pal);
|
||||||
myospal(224-(p->look_ang>>1),looking_arc+220-gun_pos,FIRSTGUN+5,gs,o,pal);
|
myospalw(224-(p->look_ang>>1),looking_arc+220-gun_pos,FIRSTGUN+5,gs,o,pal);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if((*kb) < *aplWeaponReload[PISTOL_WEAPON]-4)
|
else if((*kb) < *aplWeaponReload[PISTOL_WEAPON]-4)
|
||||||
{
|
{
|
||||||
myospal(184-(p->look_ang>>1),looking_arc+235-gun_pos,FIRSTGUN+8,gs,o,pal);
|
myospalw(184-(p->look_ang>>1),looking_arc+235-gun_pos,FIRSTGUN+8,gs,o,pal);
|
||||||
myospal(224-(p->look_ang>>1),looking_arc+210-gun_pos,FIRSTGUN+5,gs,o,pal);
|
myospalw(224-(p->look_ang>>1),looking_arc+210-gun_pos,FIRSTGUN+5,gs,o,pal);
|
||||||
}
|
}
|
||||||
else if((*kb) < *aplWeaponReload[PISTOL_WEAPON]-2)
|
else if((*kb) < *aplWeaponReload[PISTOL_WEAPON]-2)
|
||||||
{
|
{
|
||||||
myospal(164-(p->look_ang>>1),looking_arc+245-gun_pos,FIRSTGUN+8,gs,o,pal);
|
myospalw(164-(p->look_ang>>1),looking_arc+245-gun_pos,FIRSTGUN+8,gs,o,pal);
|
||||||
myospal(224-(p->look_ang>>1),looking_arc+220-gun_pos,FIRSTGUN+5,gs,o,pal);
|
myospalw(224-(p->look_ang>>1),looking_arc+220-gun_pos,FIRSTGUN+5,gs,o,pal);
|
||||||
}
|
}
|
||||||
else if((*kb) < *aplWeaponReload[PISTOL_WEAPON])
|
else if((*kb) < *aplWeaponReload[PISTOL_WEAPON])
|
||||||
myospal(194-(p->look_ang>>1),looking_arc+235-gun_pos,FIRSTGUN+5,gs,o,pal);
|
myospalw(194-(p->look_ang>>1),looking_arc+235-gun_pos,FIRSTGUN+5,gs,o,pal);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2491,7 +2517,7 @@ void displayweapon(short snum)
|
||||||
{
|
{
|
||||||
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
||||||
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
||||||
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0)
|
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0)
|
||||||
{
|
{
|
||||||
if(sprite[p->i].pal == 1)
|
if(sprite[p->i].pal == 1)
|
||||||
pal = 1;
|
pal = 1;
|
||||||
|
@ -2513,11 +2539,11 @@ void displayweapon(short snum)
|
||||||
else if((*kb) < 20)
|
else if((*kb) < 20)
|
||||||
gun_pos -= 9*((*kb)-14); //D
|
gun_pos -= 9*((*kb)-14); //D
|
||||||
|
|
||||||
myospal(weapon_xoffset+190-(p->look_ang>>1),looking_arc+250-gun_pos,HANDTHROW+throw_frames[(*kb)],gs,o,pal);
|
myospalw(weapon_xoffset+190-(p->look_ang>>1),looking_arc+250-gun_pos,HANDTHROW+throw_frames[(*kb)],gs,o,pal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
myospal(weapon_xoffset+190-(p->look_ang>>1),looking_arc+260-gun_pos,HANDTHROW,gs,o,pal);
|
myospalw(weapon_xoffset+190-(p->look_ang>>1),looking_arc+260-gun_pos,HANDTHROW,gs,o,pal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2526,7 +2552,7 @@ void displayweapon(short snum)
|
||||||
{
|
{
|
||||||
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
||||||
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
||||||
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0)
|
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0)
|
||||||
{
|
{
|
||||||
signed char remote_frames[] = {0,1,1,2,1,1,0,0,0,0,0};
|
signed char remote_frames[] = {0,1,1,2,1,1,0,0,0,0,0};
|
||||||
if(sprite[p->i].pal == 1)
|
if(sprite[p->i].pal == 1)
|
||||||
|
@ -2536,9 +2562,9 @@ void displayweapon(short snum)
|
||||||
|
|
||||||
weapon_xoffset = -48;
|
weapon_xoffset = -48;
|
||||||
if((*kb))
|
if((*kb))
|
||||||
myospal(weapon_xoffset+150-(p->look_ang>>1),looking_arc+258-gun_pos,HANDREMOTE+remote_frames[(*kb)],gs,o,pal);
|
myospalw(weapon_xoffset+150-(p->look_ang>>1),looking_arc+258-gun_pos,HANDREMOTE+remote_frames[(*kb)],gs,o,pal);
|
||||||
else
|
else
|
||||||
myospal(weapon_xoffset+150-(p->look_ang>>1),looking_arc+258-gun_pos,HANDREMOTE,gs,o,pal);
|
myospalw(weapon_xoffset+150-(p->look_ang>>1),looking_arc+258-gun_pos,HANDREMOTE,gs,o,pal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2547,7 +2573,7 @@ void displayweapon(short snum)
|
||||||
|
|
||||||
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
||||||
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
||||||
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0)
|
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0)
|
||||||
{
|
{
|
||||||
if(sprite[p->i].pal == 1)
|
if(sprite[p->i].pal == 1)
|
||||||
pal = 1;
|
pal = 1;
|
||||||
|
@ -2562,19 +2588,19 @@ void displayweapon(short snum)
|
||||||
|
|
||||||
if(p->hbomb_hold_delay)
|
if(p->hbomb_hold_delay)
|
||||||
{
|
{
|
||||||
myospal( (cycloidy[*kb]>>1)+weapon_xoffset+268-(p->look_ang>>1),cycloidy[*kb]+looking_arc+238-gun_pos,DEVISTATOR+i,-32,o,pal);
|
myospalw( (cycloidy[*kb]>>1)+weapon_xoffset+268-(p->look_ang>>1),cycloidy[*kb]+looking_arc+238-gun_pos,DEVISTATOR+i,-32,o,pal);
|
||||||
myospal(weapon_xoffset+30-(p->look_ang>>1),looking_arc+240-gun_pos,DEVISTATOR,gs,o|4,pal);
|
myospalw(weapon_xoffset+30-(p->look_ang>>1),looking_arc+240-gun_pos,DEVISTATOR,gs,o|4,pal);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
myospal( -(cycloidy[*kb]>>1)+weapon_xoffset+30-(p->look_ang>>1),cycloidy[*kb]+looking_arc+240-gun_pos,DEVISTATOR+i,-32,o|4,pal);
|
myospalw( -(cycloidy[*kb]>>1)+weapon_xoffset+30-(p->look_ang>>1),cycloidy[*kb]+looking_arc+240-gun_pos,DEVISTATOR+i,-32,o|4,pal);
|
||||||
myospal(weapon_xoffset+268-(p->look_ang>>1),looking_arc+238-gun_pos,DEVISTATOR,gs,o,pal);
|
myospalw(weapon_xoffset+268-(p->look_ang>>1),looking_arc+238-gun_pos,DEVISTATOR,gs,o,pal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
myospal(weapon_xoffset+268-(p->look_ang>>1),looking_arc+238-gun_pos,DEVISTATOR,gs,o,pal);
|
myospalw(weapon_xoffset+268-(p->look_ang>>1),looking_arc+238-gun_pos,DEVISTATOR,gs,o,pal);
|
||||||
myospal(weapon_xoffset+30-(p->look_ang>>1),looking_arc+240-gun_pos,DEVISTATOR,gs,o|4,pal);
|
myospalw(weapon_xoffset+30-(p->look_ang>>1),looking_arc+240-gun_pos,DEVISTATOR,gs,o|4,pal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2583,7 +2609,7 @@ void displayweapon(short snum)
|
||||||
|
|
||||||
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
||||||
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
||||||
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0)
|
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0)
|
||||||
{
|
{
|
||||||
if(sprite[p->i].pal == 1)
|
if(sprite[p->i].pal == 1)
|
||||||
pal = 1;
|
pal = 1;
|
||||||
|
@ -2600,10 +2626,10 @@ void displayweapon(short snum)
|
||||||
looking_arc += rand()&3;
|
looking_arc += rand()&3;
|
||||||
}
|
}
|
||||||
gun_pos -= 16;
|
gun_pos -= 16;
|
||||||
myospal(weapon_xoffset+210-(p->look_ang>>1),looking_arc+261-gun_pos,FREEZE+2,-32,o,pal);
|
myospalw(weapon_xoffset+210-(p->look_ang>>1),looking_arc+261-gun_pos,FREEZE+2,-32,o,pal);
|
||||||
myospal(weapon_xoffset+210-(p->look_ang>>1),looking_arc+235-gun_pos,FREEZE+3+cat_frames[*kb%6],-32,o,pal);
|
myospalw(weapon_xoffset+210-(p->look_ang>>1),looking_arc+235-gun_pos,FREEZE+3+cat_frames[*kb%6],-32,o,pal);
|
||||||
}
|
}
|
||||||
else myospal(weapon_xoffset+210-(p->look_ang>>1),looking_arc+261-gun_pos,FREEZE,gs,o,pal);
|
else myospalw(weapon_xoffset+210-(p->look_ang>>1),looking_arc+261-gun_pos,FREEZE,gs,o,pal);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -2611,7 +2637,7 @@ void displayweapon(short snum)
|
||||||
|
|
||||||
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
||||||
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
||||||
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0)
|
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0)
|
||||||
{
|
{
|
||||||
weapon_xoffset += 28;
|
weapon_xoffset += 28;
|
||||||
looking_arc += 18;
|
looking_arc += 18;
|
||||||
|
@ -2628,21 +2654,21 @@ void displayweapon(short snum)
|
||||||
gun_pos += (rand()&3);
|
gun_pos += (rand()&3);
|
||||||
}
|
}
|
||||||
|
|
||||||
myospal(weapon_xoffset+184-(p->look_ang>>1),
|
myospalw(weapon_xoffset+184-(p->look_ang>>1),
|
||||||
looking_arc+240-gun_pos,SHRINKER+3+((*kb)&3),-32,
|
looking_arc+240-gun_pos,SHRINKER+3+((*kb)&3),-32,
|
||||||
o,2);
|
o,2);
|
||||||
|
|
||||||
myospal(weapon_xoffset+188-(p->look_ang>>1),
|
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
|
else
|
||||||
{
|
{
|
||||||
myospal(weapon_xoffset+184-(p->look_ang>>1),
|
myospalw(weapon_xoffset+184-(p->look_ang>>1),
|
||||||
looking_arc+240-gun_pos,SHRINKER+2,
|
looking_arc+240-gun_pos,SHRINKER+2,
|
||||||
16-(sintable[p->random_club_frame&2047]>>10),
|
16-(sintable[p->random_club_frame&2047]>>10),
|
||||||
o,2);
|
o,2);
|
||||||
|
|
||||||
myospal(weapon_xoffset+188-(p->look_ang>>1),
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2653,7 +2679,7 @@ void displayweapon(short snum)
|
||||||
|
|
||||||
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek);
|
||||||
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1);
|
||||||
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0)
|
if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0)
|
||||||
{
|
{
|
||||||
weapon_xoffset += 28;
|
weapon_xoffset += 28;
|
||||||
looking_arc += 18;
|
looking_arc += 18;
|
||||||
|
@ -2669,22 +2695,22 @@ void displayweapon(short snum)
|
||||||
gun_pos += (rand()&3);
|
gun_pos += (rand()&3);
|
||||||
}
|
}
|
||||||
|
|
||||||
myospal(weapon_xoffset+184-(p->look_ang>>1),
|
myospalw(weapon_xoffset+184-(p->look_ang>>1),
|
||||||
looking_arc+240-gun_pos,SHRINKER+3+((*kb)&3),-32,
|
looking_arc+240-gun_pos,SHRINKER+3+((*kb)&3),-32,
|
||||||
o,0);
|
o,0);
|
||||||
|
|
||||||
myospal(weapon_xoffset+188-(p->look_ang>>1),
|
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
|
else
|
||||||
{
|
{
|
||||||
myospal(weapon_xoffset+184-(p->look_ang>>1),
|
myospalw(weapon_xoffset+184-(p->look_ang>>1),
|
||||||
looking_arc+240-gun_pos,SHRINKER+2,
|
looking_arc+240-gun_pos,SHRINKER+2,
|
||||||
16-(sintable[p->random_club_frame&2047]>>10),
|
16-(sintable[p->random_club_frame&2047]>>10),
|
||||||
o,0);
|
o,0);
|
||||||
|
|
||||||
myospal(weapon_xoffset+188-(p->look_ang>>1),
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -274,8 +274,10 @@ int xyzsound(short num,short i,long x,long y,long z)
|
||||||
|
|
||||||
if( soundm[num]&4 )
|
if( soundm[num]&4 )
|
||||||
{
|
{
|
||||||
if(VoiceToggle==0 || (ud.multimode > 1 && PN == APLAYER && sprite[i].yvel != screenpeek && !(gametype_flags[ud.coop]&GAMETYPE_FLAG_COOPSOUND)) ) return -1;
|
if(VoiceToggle==0)
|
||||||
|
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;
|
||||||
for(j=0;j<NUM_SOUNDS;j++)
|
for(j=0;j<NUM_SOUNDS;j++)
|
||||||
for(k=0;k<Sound[j].num;k++)
|
for(k=0;k<Sound[j].num;k++)
|
||||||
if( (Sound[j].num > 0) && (soundm[j]&4) )
|
if( (Sound[j].num > 0) && (soundm[j]&4) )
|
||||||
|
|
Loading…
Reference in a new issue