mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 13:00:43 +00:00
- re-enabled the widescreen pinning code.
It is still off by default - the idea here is to provide a means for the user to switch it on in case a mod replaces the weapons with non-widescreen-friendly versions.
This commit is contained in:
parent
7ad0750839
commit
346921211e
3 changed files with 155 additions and 179 deletions
|
@ -38,7 +38,7 @@ struct DukeGameInfo
|
|||
int16_t max_ammo_amount[MAX_WEAPONS] = {};
|
||||
int16_t weaponsandammosprites[15] = {};
|
||||
int playerheight = PHEIGHT_DUKE;
|
||||
int displayflags = 0;
|
||||
int displayflags = DUKE3D_NO_WIDESCREEN_PINNING;
|
||||
};
|
||||
|
||||
extern DukeGameInfo gs;
|
||||
|
|
|
@ -272,7 +272,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
int i, j;
|
||||
int o,pal;
|
||||
double weapon_sway, weapon_xoffset, gun_pos, looking_arc, kickback_pic, random_club_frame, hard_landing, look_anghalf, horiz16th;
|
||||
signed char gs;
|
||||
signed char shade;
|
||||
struct player_struct *p;
|
||||
|
||||
p = &ps[snum];
|
||||
|
@ -289,17 +289,17 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
random_club_frame = p->orandom_club_frame + fmulscale16(p->random_club_frame - p->orandom_club_frame, smoothratio);
|
||||
hard_landing = p->ohard_landing + fmulscale16(p->hard_landing - p->ohard_landing, smoothratio);
|
||||
|
||||
gs = p->GetActor()->s.shade;
|
||||
if(gs > 24) gs = 24;
|
||||
shade = p->GetActor()->s.shade;
|
||||
if(shade > 24) shade = 24;
|
||||
|
||||
bool playerVars = p->newOwner != nullptr || ud.cameraactor != nullptr || p->over_shoulder_on > 0 || (p->GetActor()->s.pal != 1 && p->GetActor()->s.extra <= 0);
|
||||
bool playerAnims = animatefist(gs,snum,look_anghalf) || animateknuckles(gs,snum,hard_landing,look_anghalf,horiz16th) ||
|
||||
animatetip(gs,snum,hard_landing,look_anghalf,horiz16th) || animateaccess(gs,snum,hard_landing,look_anghalf,horiz16th);
|
||||
bool playerAnims = animatefist(shade,snum,look_anghalf) || animateknuckles(shade,snum,hard_landing,look_anghalf,horiz16th) ||
|
||||
animatetip(shade,snum,hard_landing,look_anghalf,horiz16th) || animateaccess(shade,snum,hard_landing,look_anghalf,horiz16th);
|
||||
|
||||
if(playerVars || playerAnims)
|
||||
return;
|
||||
|
||||
animateknee(gs,snum,hard_landing,look_anghalf,horiz16th);
|
||||
animateknee(shade,snum,hard_landing,look_anghalf,horiz16th);
|
||||
|
||||
int opos = p->oweapon_pos * p->oweapon_pos;
|
||||
int npos = p->weapon_pos * p->weapon_pos;
|
||||
|
@ -351,11 +351,11 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
|
||||
if (j < 5 || j > 9)
|
||||
{
|
||||
hud_drawpal(weapon_xoffset + 80 - look_anghalf, looking_arc + 250 - gun_pos, KNEE, gs, o | 4, pal);
|
||||
hud_drawpal(weapon_xoffset + 80 - look_anghalf, looking_arc + 250 - gun_pos, KNEE, shade, o | 4, pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
hud_drawpal(weapon_xoffset + 160 - 16 - look_anghalf, looking_arc + 214 - gun_pos, KNEE + 1, gs, o | 4, pal);
|
||||
hud_drawpal(weapon_xoffset + 160 - 16 - look_anghalf, looking_arc + 214 - gun_pos, KNEE + 1, shade, o | 4, pal);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -373,12 +373,12 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
weapon_xoffset += bsinf(fistsign, -10);
|
||||
hud_draw(weapon_xoffset + 250 - look_anghalf,
|
||||
looking_arc + 258 - fabs(bsinf(fistsign, -8)),
|
||||
FIST, gs, o);
|
||||
FIST, shade, o);
|
||||
weapon_xoffset = cw;
|
||||
weapon_xoffset -= bsinf(fistsign, -10);
|
||||
hud_draw(weapon_xoffset + 40 - look_anghalf,
|
||||
looking_arc + 200 + fabs(bsinf(fistsign, -8)),
|
||||
FIST, gs, o | 4);
|
||||
FIST, shade, o | 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -405,12 +405,12 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
if (*kb < 5 || *kb > 9)
|
||||
{
|
||||
hud_drawpal(weapon_xoffset + 220 - look_anghalf,
|
||||
looking_arc + 250 - gun_pos, KNEE, gs, o, pal);
|
||||
looking_arc + 250 - gun_pos, KNEE, shade, o, pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
hud_drawpal(weapon_xoffset + 160 - look_anghalf,
|
||||
looking_arc + 214 - gun_pos, KNEE + 1, gs, o, pal);
|
||||
looking_arc + 214 - gun_pos, KNEE + 1, shade, o, pal);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -436,14 +436,14 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
looking_arc += kickback_pic * 8.;
|
||||
else if (*kb < 4)
|
||||
hud_drawpal(weapon_xoffset + 142 - look_anghalf,
|
||||
looking_arc + 234 - gun_pos, HANDHOLDINGLASER + 3, gs, o, pal);
|
||||
looking_arc + 234 - gun_pos, HANDHOLDINGLASER + 3, shade, o, pal);
|
||||
|
||||
hud_drawpal(weapon_xoffset + 130 - look_anghalf,
|
||||
looking_arc + 249 - gun_pos,
|
||||
HANDHOLDINGLASER + (*kb >> 2), gs, o, pal);
|
||||
HANDHOLDINGLASER + (*kb >> 2), shade, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 152 - look_anghalf,
|
||||
looking_arc + 249 - gun_pos,
|
||||
HANDHOLDINGLASER + (*kb >> 2), gs, o | 4, pal);
|
||||
HANDHOLDINGLASER + (*kb >> 2), shade, o | 4, pal);
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -454,8 +454,8 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
|
||||
auto displayrpg = [&]()
|
||||
{
|
||||
//pin = (isWorldTour() || (duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R;
|
||||
auto rpgpic = /*isWorldTour() ? RPGGUNWIDE :*/ RPGGUN;
|
||||
pin = ((gs.displayflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R;
|
||||
auto rpgpic = RPGGUN;
|
||||
|
||||
if (p->GetActor()->s.pal == 1)
|
||||
pal = 1;
|
||||
|
@ -469,7 +469,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
if (*kb < (isWW2GI() ? aplWeaponTotalTime[RPG_WEAPON][snum] : 8))
|
||||
{
|
||||
hud_drawpal(weapon_xoffset + 164, (looking_arc * 2.) + 176 - gun_pos,
|
||||
RPGGUN + (*kb >> 1), gs, o | pin, pal);
|
||||
RPGGUN + (*kb >> 1), shade, o | pin, pal);
|
||||
}
|
||||
else if (isWW2GI())
|
||||
{
|
||||
|
@ -494,7 +494,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
}
|
||||
}
|
||||
|
||||
hud_drawpal(weapon_xoffset + 164, (looking_arc * 2.) + 176 - gun_pos, rpgpic, gs, o | pin, pal);
|
||||
hud_drawpal(weapon_xoffset + 164, (looking_arc * 2.) + 176 - gun_pos, rpgpic, shade, o | pin, pal);
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -525,13 +525,11 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
|
||||
if (*kb == 0)
|
||||
{
|
||||
hud_drawpal(weapon_xoffset + 146 - look_anghalf, looking_arc + 202 - gun_pos,
|
||||
SHOTGUN, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 146 - look_anghalf, looking_arc + 202 - gun_pos, SHOTGUN, shade, o, pal);
|
||||
}
|
||||
else if (*kb <= aplWeaponTotalTime[SHOTGUN_WEAPON][snum])
|
||||
{
|
||||
hud_drawpal(weapon_xoffset + 146 - look_anghalf, looking_arc + 202 - gun_pos,
|
||||
SHOTGUN + 1, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 146 - look_anghalf, looking_arc + 202 - gun_pos, SHOTGUN + 1, shade, o, pal);
|
||||
}
|
||||
// else we are in 'reload time'
|
||||
else if (*kb <
|
||||
|
@ -544,8 +542,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
// down
|
||||
gun_pos -= 10 * (kickback_pic - aplWeaponTotalTime[p->curr_weapon][snum]); //D
|
||||
// weapon_xoffset+=80*(*kb-aplWeaponTotalTime[cw][snum]);
|
||||
hud_drawpal(weapon_xoffset + 146 - look_anghalf, looking_arc + 202 - gun_pos,
|
||||
SHOTGUN, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 146 - look_anghalf, looking_arc + 202 - gun_pos, SHOTGUN, shade, o, pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -554,8 +551,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
// up and left
|
||||
gun_pos -= 10 * (aplWeaponReload[p->curr_weapon][snum] - kickback_pic); //U
|
||||
// weapon_xoffset+=80*(*kb-aplWeaponTotalTime[cw][snum]);
|
||||
hud_drawpal(weapon_xoffset + 146 - look_anghalf, looking_arc + 202 - gun_pos,
|
||||
SHOTGUN, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 146 - look_anghalf, looking_arc + 202 - gun_pos, SHOTGUN, shade, o, pal);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -579,14 +575,12 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
{
|
||||
case 1:
|
||||
case 2:
|
||||
hud_drawpal(weapon_xoffset + 168 - look_anghalf,looking_arc + 201 - gun_pos,
|
||||
SHOTGUN + 2,-128,o,pal);
|
||||
hud_drawpal(weapon_xoffset + 168 - look_anghalf,looking_arc + 201 - gun_pos, SHOTGUN + 2,-128,o,pal);
|
||||
case 0:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
hud_drawpal(weapon_xoffset + 146 - look_anghalf,looking_arc + 202 - gun_pos,
|
||||
SHOTGUN,gs,o,pal);
|
||||
hud_drawpal(weapon_xoffset + 146 - look_anghalf,looking_arc + 202 - gun_pos, SHOTGUN,shade,o,pal);
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
|
@ -600,46 +594,39 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
gun_pos -= 40;
|
||||
weapon_xoffset += 20;
|
||||
|
||||
hud_drawpal(weapon_xoffset + 178 - look_anghalf,looking_arc + 194 - gun_pos,
|
||||
SHOTGUN + 1 + ((*(kb)-1) >> 1),-128,o,pal);
|
||||
hud_drawpal(weapon_xoffset + 178 - look_anghalf,looking_arc + 194 - gun_pos, SHOTGUN + 1 + ((*(kb)-1) >> 1),-128,o,pal);
|
||||
}
|
||||
|
||||
hud_drawpal(weapon_xoffset + 158 - look_anghalf,looking_arc + 220 - gun_pos,
|
||||
SHOTGUN + 3,gs,o,pal);
|
||||
hud_drawpal(weapon_xoffset + 158 - look_anghalf,looking_arc + 220 - gun_pos, SHOTGUN + 3,shade,o,pal);
|
||||
|
||||
break;
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
hud_drawpal(32 + weapon_xoffset + 166 - look_anghalf,looking_arc + 210 - gun_pos,
|
||||
SHOTGUN + 4,gs,o,pal);
|
||||
hud_drawpal(32 + weapon_xoffset + 166 - look_anghalf,looking_arc + 210 - gun_pos, SHOTGUN + 4,shade,o,pal);
|
||||
break;
|
||||
case 16:
|
||||
case 17:
|
||||
case 18:
|
||||
case 19:
|
||||
hud_drawpal(64 + weapon_xoffset + 170 - look_anghalf,looking_arc + 196 - gun_pos,
|
||||
SHOTGUN + 5,gs,o,pal);
|
||||
hud_drawpal(64 + weapon_xoffset + 170 - look_anghalf,looking_arc + 196 - gun_pos, SHOTGUN + 5,shade,o,pal);
|
||||
break;
|
||||
case 20:
|
||||
case 21:
|
||||
case 22:
|
||||
case 23:
|
||||
hud_drawpal(64 + weapon_xoffset + 176 - look_anghalf,looking_arc + 196 - gun_pos,
|
||||
SHOTGUN + 6,gs,o,pal);
|
||||
hud_drawpal(64 + weapon_xoffset + 176 - look_anghalf,looking_arc + 196 - gun_pos, SHOTGUN + 6,shade,o,pal);
|
||||
break;
|
||||
case 24:
|
||||
case 25:
|
||||
case 26:
|
||||
case 27:
|
||||
hud_drawpal(64 + weapon_xoffset + 170 - look_anghalf,looking_arc + 196 - gun_pos,
|
||||
SHOTGUN + 5,gs,o,pal);
|
||||
hud_drawpal(64 + weapon_xoffset + 170 - look_anghalf,looking_arc + 196 - gun_pos, SHOTGUN + 5,shade,o,pal);
|
||||
break;
|
||||
case 28:
|
||||
case 29:
|
||||
case 30:
|
||||
hud_drawpal(32 + weapon_xoffset + 156 - look_anghalf,looking_arc + 206 - gun_pos,
|
||||
SHOTGUN + 4,gs,o,pal);
|
||||
hud_drawpal(32 + weapon_xoffset + 156 - look_anghalf,looking_arc + 206 - gun_pos, SHOTGUN + 4,shade,o,pal);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
@ -666,13 +653,11 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
{
|
||||
// hud_drawpal(weapon_xoffset+168-look_anghalf,looking_arc+260-gun_pos,
|
||||
// CHAINGUN,gs,o,pal);
|
||||
hud_drawpal(weapon_xoffset + 178 - look_anghalf, looking_arc + 233 - gun_pos,
|
||||
CHAINGUN + 1, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 178 - look_anghalf, looking_arc + 233 - gun_pos, CHAINGUN + 1, shade, o, pal);
|
||||
}
|
||||
else if (*kb <= aplWeaponTotalTime[CHAINGUN_WEAPON][snum])
|
||||
{
|
||||
hud_drawpal(weapon_xoffset + 188 - look_anghalf, looking_arc + 243 - gun_pos,
|
||||
CHAINGUN + 2, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 188 - look_anghalf, looking_arc + 243 - gun_pos, CHAINGUN + 2, shade, o, pal);
|
||||
}
|
||||
// else we are in 'reload time'
|
||||
// divide reload time into fifths.
|
||||
|
@ -697,12 +682,9 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
{
|
||||
// first segment
|
||||
//
|
||||
gun_pos += 80 - (10 * (aplWeaponTotalTime[p->curr_weapon][snum]
|
||||
+ iFifths - kickback_pic));
|
||||
weapon_xoffset += 80 - (10 * (aplWeaponTotalTime[p->curr_weapon][snum]
|
||||
+ iFifths - kickback_pic));
|
||||
hud_drawpal(weapon_xoffset + 168 - look_anghalf, looking_arc + 260 - gun_pos,
|
||||
2519, gs, o, pal);
|
||||
gun_pos += 80 - (10 * (aplWeaponTotalTime[p->curr_weapon][snum] + iFifths - kickback_pic));
|
||||
weapon_xoffset += 80 - (10 * (aplWeaponTotalTime[p->curr_weapon][snum] + iFifths - kickback_pic));
|
||||
hud_drawpal(weapon_xoffset + 168 - look_anghalf, looking_arc + 260 - gun_pos, 2519, shade, o, pal);
|
||||
}
|
||||
else if (*kb <
|
||||
(iFifths * 2
|
||||
|
@ -714,8 +696,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
// down
|
||||
gun_pos += 80; //5*(iFifthsp->kickback_pic-aplWeaponTotalTime[p->curr_weapon][snum]); //D
|
||||
weapon_xoffset += 80; //80*(*kb-aplWeaponTotalTime[p->curr_weapon][snum]);
|
||||
hud_drawpal(weapon_xoffset + 168 - look_anghalf, looking_arc + 260 - gun_pos,
|
||||
2518, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 168 - look_anghalf, looking_arc + 260 - gun_pos, 2518, shade, o, pal);
|
||||
}
|
||||
else if (*kb <
|
||||
(iFifths * 3
|
||||
|
@ -727,8 +708,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
// up
|
||||
gun_pos += 80;//5*(iFifths*2);
|
||||
weapon_xoffset += 80; //80*(*kb-aplWeaponTotalTime[p->curr_weapon][snum]);
|
||||
hud_drawpal(weapon_xoffset + 168 - look_anghalf, looking_arc + 260 - gun_pos,
|
||||
2517, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 168 - look_anghalf, looking_arc + 260 - gun_pos, 2517, shade, o, pal);
|
||||
}
|
||||
else if (*kb <
|
||||
(iFifths * 4
|
||||
|
@ -740,7 +720,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
// down
|
||||
gun_pos += 80; //5*(aplWeaponTotalTime[p->curr_weapon][snum]- p->kickback_pic); //D
|
||||
weapon_xoffset += 80; //80*(*kb-aplWeaponTotalTime[p->curr_weapon][snum]);
|
||||
hud_drawpal(weapon_xoffset + 168 - look_anghalf, looking_arc + 260 - gun_pos, 2518, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 168 - look_anghalf, looking_arc + 260 - gun_pos, 2518, shade, o, pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -751,7 +731,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
//5*(aplWeaponReload[p->curr_weapon][snum]- p->kickback_pic); //U
|
||||
weapon_xoffset += 10 * (aplWeaponReload[p->curr_weapon][snum] - kickback_pic);
|
||||
//80*(*kb-aplWeaponTotalTime[cw][snum]);
|
||||
hud_drawpal(weapon_xoffset + 168 - look_anghalf, looking_arc + 260 - gun_pos, 2519, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 168 - look_anghalf, looking_arc + 260 - gun_pos, 2519, shade, o, pal);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -775,28 +755,28 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
|
||||
if (*kb > 0 && p->GetActor()->s.pal != 1) weapon_xoffset += 1 - (rand() & 3);
|
||||
|
||||
hud_drawpal(weapon_xoffset + 168 - look_anghalf, looking_arc + 260 - gun_pos, CHAINGUN, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 168 - look_anghalf, looking_arc + 260 - gun_pos, CHAINGUN, shade, o, pal);
|
||||
switch(*kb)
|
||||
{
|
||||
case 0:
|
||||
hud_drawpal(weapon_xoffset + 178 - look_anghalf,looking_arc + 233 - gun_pos, CHAINGUN + 1,gs,o,pal);
|
||||
hud_drawpal(weapon_xoffset + 178 - look_anghalf,looking_arc + 233 - gun_pos, CHAINGUN + 1,shade,o,pal);
|
||||
break;
|
||||
default:
|
||||
if (*kb > 4 && *kb < 12)
|
||||
{
|
||||
i = 0;
|
||||
if (p->GetActor()->s.pal != 1) i = rand() & 7;
|
||||
hud_drawpal(i + weapon_xoffset - 4 + 140 - look_anghalf,i + looking_arc - (kickback_pic / 2.) + 208 - gun_pos, CHAINGUN + 5 + ((*kb - 4) / 5),gs,o,pal);
|
||||
hud_drawpal(i + weapon_xoffset - 4 + 140 - look_anghalf,i + looking_arc - (kickback_pic / 2.) + 208 - gun_pos, CHAINGUN + 5 + ((*kb - 4) / 5),shade,o,pal);
|
||||
if (p->GetActor()->s.pal != 1) i = rand() & 7;
|
||||
hud_drawpal(i + weapon_xoffset - 4 + 184 - look_anghalf,i + looking_arc - (kickback_pic / 2.) + 208 - gun_pos, CHAINGUN + 5 + ((*kb - 4) / 5),gs,o,pal);
|
||||
hud_drawpal(i + weapon_xoffset - 4 + 184 - look_anghalf,i + looking_arc - (kickback_pic / 2.) + 208 - gun_pos, CHAINGUN + 5 + ((*kb - 4) / 5),shade,o,pal);
|
||||
}
|
||||
if (*kb < 8)
|
||||
{
|
||||
i = rand() & 7;
|
||||
hud_drawpal(i + weapon_xoffset - 4 + 162 - look_anghalf,i + looking_arc - (kickback_pic / 2.) + 208 - gun_pos, CHAINGUN + 5 + ((*kb - 2) / 5),gs,o,pal);
|
||||
hud_drawpal(weapon_xoffset + 178 - look_anghalf,looking_arc + 233 - gun_pos, CHAINGUN + 1 + (*kb >> 1),gs,o,pal);
|
||||
hud_drawpal(i + weapon_xoffset - 4 + 162 - look_anghalf,i + looking_arc - (kickback_pic / 2.) + 208 - gun_pos, CHAINGUN + 5 + ((*kb - 2) / 5),shade,o,pal);
|
||||
hud_drawpal(weapon_xoffset + 178 - look_anghalf,looking_arc + 233 - gun_pos, CHAINGUN + 1 + (*kb >> 1),shade,o,pal);
|
||||
}
|
||||
else hud_drawpal(weapon_xoffset + 178 - look_anghalf,looking_arc + 233 - gun_pos, CHAINGUN + 1,gs,o,pal);
|
||||
else hud_drawpal(weapon_xoffset + 178 - look_anghalf,looking_arc + 233 - gun_pos, CHAINGUN + 1,shade,o,pal);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
@ -827,40 +807,40 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
(l - look_anghalf),
|
||||
(looking_arc + 244 - gun_pos),
|
||||
FIRSTGUN + kb_frames[*kb],
|
||||
gs, 2, pal);
|
||||
shade, 2, pal);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//pin = 0; (isWW2GI() || isWorldTour() || (duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R;
|
||||
auto pic_5 = /*isWorldTour() ? FIRSTGUNRELOADWIDE :*/ FIRSTGUN+5;
|
||||
pin = (isWW2GI() || (gs.displayflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R;
|
||||
auto pic_5 = FIRSTGUN+5;
|
||||
|
||||
const int WEAPON2_RELOAD_TIME = 50;
|
||||
auto reload_time = isWW2GI() ? aplWeaponReload[PISTOL_WEAPON][snum] : WEAPON2_RELOAD_TIME;
|
||||
if (*kb < 10)
|
||||
hud_drawpal(194 - look_anghalf, looking_arc + 230 - gun_pos, FIRSTGUN + 4, gs, o|pin, pal);
|
||||
hud_drawpal(194 - look_anghalf, looking_arc + 230 - gun_pos, FIRSTGUN + 4, shade, o|pin, pal);
|
||||
else if (*kb < 15)
|
||||
{
|
||||
hud_drawpal(244 - (kickback_pic * 8.) - look_anghalf, looking_arc + 130 - gun_pos + (kickback_pic * 16.), FIRSTGUN + 6, gs, o | pin, pal);
|
||||
hud_drawpal(224 - look_anghalf, looking_arc + 220 - gun_pos, pic_5, gs, o | pin, pal);
|
||||
hud_drawpal(244 - (kickback_pic * 8.) - look_anghalf, looking_arc + 130 - gun_pos + (kickback_pic * 16.), FIRSTGUN + 6, shade, o | pin, pal);
|
||||
hud_drawpal(224 - look_anghalf, looking_arc + 220 - gun_pos, pic_5, shade, o | pin, pal);
|
||||
}
|
||||
else if (*kb < 20)
|
||||
{
|
||||
hud_drawpal(124 + (kickback_pic * 2.) - look_anghalf, looking_arc + 430 - gun_pos - (kickback_pic * 8.), FIRSTGUN + 6, gs, o | pin, pal);
|
||||
hud_drawpal(224 - look_anghalf, looking_arc + 220 - gun_pos, pic_5, gs, o | pin, pal);
|
||||
hud_drawpal(124 + (kickback_pic * 2.) - look_anghalf, looking_arc + 430 - gun_pos - (kickback_pic * 8.), FIRSTGUN + 6, shade, o | pin, pal);
|
||||
hud_drawpal(224 - look_anghalf, looking_arc + 220 - gun_pos, pic_5, shade, o | pin, pal);
|
||||
}
|
||||
else if (*kb < (isNamWW2GI()? (reload_time - 12) : 23))
|
||||
{
|
||||
hud_drawpal(184 - look_anghalf, looking_arc + 235 - gun_pos, FIRSTGUN + 8, gs, o | pin, pal);
|
||||
hud_drawpal(224 - look_anghalf, looking_arc + 210 - gun_pos, pic_5, gs, o | pin, pal);
|
||||
hud_drawpal(184 - look_anghalf, looking_arc + 235 - gun_pos, FIRSTGUN + 8, shade, o | pin, pal);
|
||||
hud_drawpal(224 - look_anghalf, looking_arc + 210 - gun_pos, pic_5, shade, o | pin, pal);
|
||||
}
|
||||
else if (*kb < (isNamWW2GI()? (reload_time - 6) : 25))
|
||||
{
|
||||
hud_drawpal(164 - look_anghalf, looking_arc + 245 - gun_pos, FIRSTGUN + 8, gs, o | pin, pal);
|
||||
hud_drawpal(224 - look_anghalf, looking_arc + 220 - gun_pos, pic_5, gs, o | pin, pal);
|
||||
hud_drawpal(164 - look_anghalf, looking_arc + 245 - gun_pos, FIRSTGUN + 8, shade, o | pin, pal);
|
||||
hud_drawpal(224 - look_anghalf, looking_arc + 220 - gun_pos, pic_5, shade, o | pin, pal);
|
||||
}
|
||||
else if (*kb < (isNamWW2GI()? reload_time : 27))
|
||||
hud_drawpal(194 - look_anghalf, looking_arc + 235 - gun_pos, pic_5, gs, o, pal);
|
||||
hud_drawpal(194 - look_anghalf, looking_arc + 235 - gun_pos, pic_5, shade, o, pal);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -917,10 +897,10 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
else if (*kb < 20)
|
||||
gun_pos -= 9 * (kickback_pic - 14); //D
|
||||
}
|
||||
hud_drawpal(weapon_xoffset + 190 - look_anghalf, looking_arc + 250 - gun_pos, HANDTHROW + throw_frames[*kb], gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 190 - look_anghalf, looking_arc + 250 - gun_pos, HANDTHROW + throw_frames[*kb], shade, o, pal);
|
||||
}
|
||||
else
|
||||
hud_drawpal(weapon_xoffset + 190 - look_anghalf, looking_arc + 260 - gun_pos, HANDTHROW, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 190 - look_anghalf, looking_arc + 260 - gun_pos, HANDTHROW, shade, o, pal);
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -940,9 +920,9 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
weapon_xoffset = -48;
|
||||
|
||||
if (*kb)
|
||||
hud_drawpal(weapon_xoffset + 150 - look_anghalf, looking_arc + 258 - gun_pos, HANDREMOTE + remote_frames[*kb], gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 150 - look_anghalf, looking_arc + 258 - gun_pos, HANDREMOTE + remote_frames[*kb], shade, o, pal);
|
||||
else
|
||||
hud_drawpal(weapon_xoffset + 150 - look_anghalf, looking_arc + 258 - gun_pos, HANDREMOTE, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 150 - look_anghalf, looking_arc + 258 - gun_pos, HANDREMOTE, shade, o, pal);
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -965,13 +945,13 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
i = sgn(*kb >> 2);
|
||||
if (p->ammo_amount[p->curr_weapon] & 1)
|
||||
{
|
||||
hud_drawpal(weapon_xoffset + 30 - look_anghalf, looking_arc + 240 - gun_pos, DEVISTATOR, gs, o | 4, pal);
|
||||
hud_drawpal(weapon_xoffset + 30 - look_anghalf, looking_arc + 240 - gun_pos, DEVISTATOR, shade, o | 4, pal);
|
||||
hud_drawpal(weapon_xoffset + 268 - look_anghalf, looking_arc + 238 - gun_pos, DEVISTATOR + i, -32, o, pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
hud_drawpal(weapon_xoffset + 30 - look_anghalf, looking_arc + 240 - gun_pos, DEVISTATOR + i, -32, o | 4, pal);
|
||||
hud_drawpal(weapon_xoffset + 268 - look_anghalf, looking_arc + 238 - gun_pos, DEVISTATOR, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 268 - look_anghalf, looking_arc + 238 - gun_pos, DEVISTATOR, shade, o, pal);
|
||||
}
|
||||
}
|
||||
// else we are in 'reload time'
|
||||
|
@ -985,8 +965,8 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
// down
|
||||
gun_pos -= 10 * (kickback_pic - aplWeaponTotalTime[p->curr_weapon][snum]); //D
|
||||
// weapon_xoffset+=80*(*kb-aplWeaponTotalTime[cw][snum]);
|
||||
hud_drawpal(weapon_xoffset + 268 - look_anghalf, looking_arc + 238 - gun_pos, DEVISTATOR, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 30 - look_anghalf, looking_arc + 240 - gun_pos, DEVISTATOR, gs, o | 4, pal);
|
||||
hud_drawpal(weapon_xoffset + 268 - look_anghalf, looking_arc + 238 - gun_pos, DEVISTATOR, shade, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 30 - look_anghalf, looking_arc + 240 - gun_pos, DEVISTATOR, shade, o | 4, pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -995,14 +975,14 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
// up and left
|
||||
gun_pos -= 10 * (aplWeaponReload[p->curr_weapon][snum] - kickback_pic); //U
|
||||
// weapon_xoffset+=80*(*kb-aplWeaponTotalTime[cw][snum]);
|
||||
hud_drawpal(weapon_xoffset + 268 - look_anghalf, looking_arc + 238 - gun_pos, DEVISTATOR, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 30 - look_anghalf, looking_arc + 240 - gun_pos, DEVISTATOR, gs, o | 4, pal);
|
||||
hud_drawpal(weapon_xoffset + 268 - look_anghalf, looking_arc + 238 - gun_pos, DEVISTATOR, shade, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 30 - look_anghalf, looking_arc + 240 - gun_pos, DEVISTATOR, shade, o | 4, pal);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hud_drawpal(weapon_xoffset + 268 - look_anghalf, looking_arc + 238 - gun_pos, DEVISTATOR, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 30 - look_anghalf, looking_arc + 240 - gun_pos, DEVISTATOR, gs, o | 4, pal);
|
||||
hud_drawpal(weapon_xoffset + 268 - look_anghalf, looking_arc + 238 - gun_pos, DEVISTATOR, shade, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 30 - look_anghalf, looking_arc + 240 - gun_pos, DEVISTATOR, shade, o | 4, pal);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1028,18 +1008,18 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
if (p->hbomb_hold_delay)
|
||||
{
|
||||
hud_drawpal((cycloidy[*kb] >> 1) + weapon_xoffset + 268 - look_anghalf, cycloidy[*kb] + looking_arc + 238 - gun_pos, DEVISTATOR + i, -32, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 30 - look_anghalf, looking_arc + 240 - gun_pos, DEVISTATOR, gs, o | 4, pal);
|
||||
hud_drawpal(weapon_xoffset + 30 - look_anghalf, looking_arc + 240 - gun_pos, DEVISTATOR, shade, o | 4, pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
hud_drawpal(-(cycloidy[*kb] >> 1) + weapon_xoffset + 30 - look_anghalf, cycloidy[*kb] + looking_arc + 240 - gun_pos, DEVISTATOR + i, -32, o | 4, pal);
|
||||
hud_drawpal(weapon_xoffset + 268 - look_anghalf, looking_arc + 238 - gun_pos, DEVISTATOR, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 268 - look_anghalf, looking_arc + 238 - gun_pos, DEVISTATOR, shade, o, pal);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hud_drawpal(weapon_xoffset + 268 - look_anghalf, looking_arc + 238 - gun_pos, DEVISTATOR, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 30 - look_anghalf, looking_arc + 240 - gun_pos, DEVISTATOR, gs, o | 4, pal);
|
||||
hud_drawpal(weapon_xoffset + 268 - look_anghalf, looking_arc + 238 - gun_pos, DEVISTATOR, shade, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 30 - look_anghalf, looking_arc + 240 - gun_pos, DEVISTATOR, shade, o | 4, pal);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1051,8 +1031,8 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
|
||||
auto displayfreezer = [&]
|
||||
{
|
||||
//pin = (isWW2GI() || isWorldTour() || (duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R;
|
||||
auto pic = /*isWorldTour() ? FREEZEWIDE :*/ FREEZE;
|
||||
pin = (isWW2GI() || (gs.displayflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R;
|
||||
auto pic = FREEZE;
|
||||
|
||||
if (p->GetActor()->s.pal == 1)
|
||||
pal = 1;
|
||||
|
@ -1072,7 +1052,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
hud_drawpal(weapon_xoffset + 210 - look_anghalf, looking_arc + 261 - gun_pos, /*isWorldTour() ? FREEZEFIREWIDE :*/ FREEZE + 2, -32, o|pin, pal);
|
||||
hud_drawpal(weapon_xoffset + 210 - look_anghalf, looking_arc + 235 - gun_pos, FREEZE + 3 + cat_frames[*kb % 6], -32, o | pin, pal);
|
||||
}
|
||||
else hud_drawpal(weapon_xoffset + 210 - look_anghalf, looking_arc + 261 - gun_pos, /*isWorldTour() ? FREEZEWIDE :*/ FREEZE, gs, o | pin, pal);
|
||||
else hud_drawpal(weapon_xoffset + 210 - look_anghalf, looking_arc + 261 - gun_pos, /*isWorldTour() ? FREEZEWIDE :*/ FREEZE, shade, o | pin, pal);
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -1099,7 +1079,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
o, 0);
|
||||
|
||||
hud_drawpal(weapon_xoffset + 188 - look_anghalf,
|
||||
looking_arc + 240 - gun_pos, SHRINKER + 1, gs, o, pal);
|
||||
looking_arc + 240 - gun_pos, SHRINKER + 1, shade, o, pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1110,7 +1090,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
o, 0);
|
||||
|
||||
hud_drawpal(weapon_xoffset + 188 - look_anghalf,
|
||||
looking_arc + 240 - gun_pos, SHRINKER, gs, o, pal);
|
||||
looking_arc + 240 - gun_pos, SHRINKER, shade, o, pal);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1163,7 +1143,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
o, 0);
|
||||
|
||||
hud_drawpal(weapon_xoffset + 188 - look_anghalf,
|
||||
looking_arc + 240 - gun_pos, SHRINKER + 1, gs, o, pal);
|
||||
looking_arc + 240 - gun_pos, SHRINKER + 1, shade, o, pal);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1186,7 +1166,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
{
|
||||
{
|
||||
hud_drawpal(weapon_xoffset + 188 - look_anghalf,
|
||||
looking_arc + 240 - gun_pos, SHRINKER - 2, gs, o, pal);
|
||||
looking_arc + 240 - gun_pos, SHRINKER - 2, shade, o, pal);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1237,7 +1217,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
o, 2);
|
||||
|
||||
hud_drawpal(weapon_xoffset + 188 - look_anghalf,
|
||||
looking_arc + 240 - gun_pos, SHRINKER - 1, gs, o, pal);
|
||||
looking_arc + 240 - gun_pos, SHRINKER - 1, shade, o, pal);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1268,7 +1248,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
o, 2);
|
||||
|
||||
hud_drawpal(weapon_xoffset + 188 - look_anghalf,
|
||||
looking_arc + 240 - gun_pos, shrinker - 2, gs, o, pal);
|
||||
looking_arc + 240 - gun_pos, shrinker - 2, shade, o, pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1278,7 +1258,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
o, 0);
|
||||
|
||||
hud_drawpal(weapon_xoffset + 188 - look_anghalf,
|
||||
looking_arc + 240 - gun_pos, shrinker, gs, o, pal);
|
||||
looking_arc + 240 - gun_pos, shrinker, shade, o, pal);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1296,7 +1276,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
o, 2);
|
||||
|
||||
hud_drawpal(weapon_xoffset + 188 - look_anghalf,
|
||||
looking_arc + 240 - gun_pos, shrinker - 1, gs, o, pal);
|
||||
looking_arc + 240 - gun_pos, shrinker - 1, shade, o, pal);
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -1306,7 +1286,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
o, 0);
|
||||
|
||||
hud_drawpal(weapon_xoffset + 188 - look_anghalf,
|
||||
looking_arc + 240 - gun_pos, shrinker + 1, gs, o, pal);
|
||||
looking_arc + 240 - gun_pos, shrinker + 1, shade, o, pal);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1331,8 +1311,8 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
|
||||
if (*kb < 1 || sector[p->cursectnum].lotag == 2)
|
||||
{
|
||||
hud_drawpal(weapon_xoffset + 210 - look_anghalf, looking_arc + 261 - gun_pos, FLAMETHROWER, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 210 - look_anghalf, looking_arc + 261 - gun_pos, FLAMETHROWERPILOT, gs, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 210 - look_anghalf, looking_arc + 261 - gun_pos, FLAMETHROWER, shade, o, pal);
|
||||
hud_drawpal(weapon_xoffset + 210 - look_anghalf, looking_arc + 261 - gun_pos, FLAMETHROWERPILOT, shade, o, pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -118,7 +118,7 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
int i, j;
|
||||
double weapon_sway, weapon_xoffset, gun_pos, looking_arc, look_anghalf, TiltStatus;
|
||||
char o,pal;
|
||||
signed char gs;
|
||||
signed char shade;
|
||||
|
||||
auto p = &ps[snum];
|
||||
auto kb = &p->kickback_pic;
|
||||
|
@ -131,10 +131,10 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
TiltStatus = !cl_syncinput ? p->TiltStatus : p->oTiltStatus + fmulscale16((p->TiltStatus - p->oTiltStatus), smoothratio);
|
||||
|
||||
if (shadedsector[p->cursectnum] == 1)
|
||||
gs = 16;
|
||||
shade = 16;
|
||||
else
|
||||
gs = p->GetActor()->s.shade;
|
||||
if(gs > 24) gs = 24;
|
||||
shade = p->GetActor()->s.shade;
|
||||
if(shade > 24) shade = 24;
|
||||
|
||||
if(p->newOwner != nullptr || ud.cameraactor != nullptr || p->over_shoulder_on > 0 || (p->GetActor()->s.pal != 1 && p->GetActor()->s.extra <= 0))
|
||||
return;
|
||||
|
@ -172,7 +172,7 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
{
|
||||
if (*kb)
|
||||
{
|
||||
gs = 0;
|
||||
shade = 0;
|
||||
if (*kb == 1)
|
||||
{
|
||||
if ((krand()&1) == 1)
|
||||
|
@ -198,7 +198,7 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
{
|
||||
if (*kb)
|
||||
{
|
||||
gs = 0;
|
||||
shade = 0;
|
||||
if (*kb == 1)
|
||||
temp_kb = MOTOHIT+1;
|
||||
else if (*kb == 2)
|
||||
|
@ -220,9 +220,9 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
pal = sector[p->cursectnum].floorpal;
|
||||
|
||||
if (TiltStatus >= 0)
|
||||
ShowMotorcycle(160-look_anghalf, 174, temp_kb, gs, 0, pal, TiltStatus*5);
|
||||
ShowMotorcycle(160-look_anghalf, 174, temp_kb, shade, 0, pal, TiltStatus*5);
|
||||
else if (p->TiltStatus < 0)
|
||||
ShowMotorcycle(160-look_anghalf, 174, temp_kb, gs, 0, pal, TiltStatus*5+2047);
|
||||
ShowMotorcycle(160-look_anghalf, 174, temp_kb, shade, 0, pal, TiltStatus*5+2047);
|
||||
return;
|
||||
}
|
||||
if (p->OnBoat)
|
||||
|
@ -292,34 +292,30 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
temp3 = 170 + (*kb>>2);
|
||||
|
||||
if (temp2)
|
||||
gs = -96;
|
||||
shade = -96;
|
||||
|
||||
if (TiltStatus >= 0)
|
||||
ShowBoat(160-look_anghalf, temp3, temp_kb, gs, 0, pal, TiltStatus);
|
||||
ShowBoat(160-look_anghalf, temp3, temp_kb, shade, 0, pal, TiltStatus);
|
||||
else if (p->TiltStatus < 0)
|
||||
ShowBoat(160-look_anghalf, temp3, temp_kb, gs, 0, pal, TiltStatus+2047);
|
||||
ShowBoat(160-look_anghalf, temp3, temp_kb, shade, 0, pal, TiltStatus+2047);
|
||||
return;
|
||||
}
|
||||
|
||||
if( p->GetActor()->s.xrepeat < 8 )
|
||||
if (p->GetActor()->s.xrepeat < 8)
|
||||
{
|
||||
static int fistsign;
|
||||
if(p->jetpack_on == 0 )
|
||||
if (p->jetpack_on == 0)
|
||||
{
|
||||
i = p->GetActor()->s.xvel;
|
||||
looking_arc += 32-(i>>1);
|
||||
fistsign += i>>1;
|
||||
looking_arc += 32 - (i >> 1);
|
||||
fistsign += i >> 1;
|
||||
}
|
||||
cw = weapon_xoffset;
|
||||
weapon_xoffset += bsinf(fistsign, -10);
|
||||
hud_draw(weapon_xoffset+250-look_anghalf,
|
||||
looking_arc+258-abs(bsinf(fistsign, -8)),
|
||||
FIST,gs,o);
|
||||
hud_draw(weapon_xoffset + 250 - look_anghalf, looking_arc + 258 - abs(bsinf(fistsign, -8)), FIST, shade, o);
|
||||
weapon_xoffset = cw;
|
||||
weapon_xoffset -= bsinf(fistsign, -10);
|
||||
hud_draw(weapon_xoffset+40-look_anghalf,
|
||||
looking_arc+200+abs(bsinf(fistsign, -8)),
|
||||
FIST,gs,o|4);
|
||||
hud_draw(weapon_xoffset + 40 - look_anghalf, looking_arc + 200 + abs(bsinf(fistsign, -8)), FIST, shade, o | 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -347,7 +343,7 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
x = weapon_xoffset + ((kb_ox[kb_frames[*kb]] >> 1) - 12);
|
||||
y = 200 - (244 - kb_oy[kb_frames[*kb]]);
|
||||
hud_drawpal(x - look_anghalf, looking_arc + y - gun_pos,
|
||||
KNEE + kb_frames[*kb], gs, 0, pal);
|
||||
KNEE + kb_frames[*kb], shade, 0, pal);
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -366,7 +362,7 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
x = weapon_xoffset + ((kb_ox[kb_frames[*kb]] >> 1) - 12);
|
||||
y = 210 - (244 - kb_oy[kb_frames[*kb]]);
|
||||
hud_drawpal(x - look_anghalf + 20, looking_arc + y - gun_pos - 80,
|
||||
SLINGBLADE + kb_frames[*kb], gs, 0, pal);
|
||||
SLINGBLADE + kb_frames[*kb], shade, 0, pal);
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -382,12 +378,12 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
if (p->ammo_amount[BOWLING_WEAPON])
|
||||
{
|
||||
hud_drawpal(weapon_xoffset + 162 - look_anghalf,
|
||||
looking_arc + 214 - gun_pos + (*kb << 3), BOWLINGBALLH, gs, o, pal);
|
||||
looking_arc + 214 - gun_pos + (*kb << 3), BOWLINGBALLH, shade, o, pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
rdmyospal(weapon_xoffset + 162 - look_anghalf,
|
||||
looking_arc + 214 - gun_pos, HANDTHROW + 5, gs, o, pal);
|
||||
looking_arc + 214 - gun_pos, HANDTHROW + 5, shade, o, pal);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -404,14 +400,14 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
if (p->ammo_amount[POWDERKEG_WEAPON])
|
||||
{
|
||||
rdmyospal(weapon_xoffset + 180 - look_anghalf,
|
||||
looking_arc + 214 - gun_pos + (*kb << 3), POWDERH, gs, o, pal);
|
||||
looking_arc + 214 - gun_pos + (*kb << 3), POWDERH, shade, o, pal);
|
||||
rdmyospal(weapon_xoffset + 90 - look_anghalf,
|
||||
looking_arc + 214 - gun_pos + (*kb << 3), POWDERH, gs, o | 4, pal);
|
||||
looking_arc + 214 - gun_pos + (*kb << 3), POWDERH, shade, o | 4, pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
rdmyospal(weapon_xoffset + 162 - look_anghalf,
|
||||
looking_arc + 214 - gun_pos, HANDTHROW + 5, gs, o, pal);
|
||||
looking_arc + 214 - gun_pos, HANDTHROW + 5, shade, o, pal);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -423,12 +419,12 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
|
||||
auto displaycrossbow = [&]
|
||||
{
|
||||
//if (!(duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) pin = RS_ALIGN_R;
|
||||
if (!(gs.displayflags & DUKE3D_NO_WIDESCREEN_PINNING)) pin = RS_ALIGN_R;
|
||||
static const uint8_t kb_frames[] = { 0,1,1,2,2,3,2,3,2,3,2,2,2,2,2,2,2,2,2,4,4,4,4,5,5,5,5,6,6,6,6,6,6,7,7,7,7,7,7 };
|
||||
if (kb_frames[*kb] == 2 || kb_frames[*kb] == 3)
|
||||
{
|
||||
rdmyospal((weapon_xoffset + 200) - look_anghalf,
|
||||
looking_arc + 250 - gun_pos, RPGGUN + kb_frames[*kb], gs, o | pin, pal);
|
||||
looking_arc + 250 - gun_pos, RPGGUN + kb_frames[*kb], shade, o | pin, pal);
|
||||
}
|
||||
else if (kb_frames[*kb] == 1)
|
||||
{
|
||||
|
@ -438,7 +434,7 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
else
|
||||
{
|
||||
rdmyospal((weapon_xoffset + 210) - look_anghalf,
|
||||
looking_arc + 255 - gun_pos, RPGGUN + kb_frames[*kb], gs, o | pin, pal);
|
||||
looking_arc + 255 - gun_pos, RPGGUN + kb_frames[*kb], shade, o | pin, pal);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -450,14 +446,14 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
|
||||
auto displaychicken = [&]
|
||||
{
|
||||
//if (!(duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) pin = RS_ALIGN_R;
|
||||
if (!(gs.displayflags & DUKE3D_NO_WIDESCREEN_PINNING)) pin = RS_ALIGN_R;
|
||||
if (*kb)
|
||||
{
|
||||
static const uint8_t kb_frames[] = { 0,1,1,2,2,3,2,3,2,3,2,2,2,2,2,2,2,2,2,4,4,4,4,5,5,5,5,6,6,6,6,6,6,7,7,7,7,7,7 };
|
||||
if (kb_frames[*kb] == 2 || kb_frames[*kb] == 3)
|
||||
{
|
||||
rdmyospal((weapon_xoffset + 200) - look_anghalf,
|
||||
looking_arc + 250 - gun_pos, RPGGUN2 + kb_frames[*kb], gs, o | pin, pal);
|
||||
looking_arc + 250 - gun_pos, RPGGUN2 + kb_frames[*kb], shade, o | pin, pal);
|
||||
}
|
||||
else if (kb_frames[*kb] == 1)
|
||||
{
|
||||
|
@ -467,7 +463,7 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
else
|
||||
{
|
||||
rdmyospal((weapon_xoffset + 210) - look_anghalf,
|
||||
looking_arc + 255 - gun_pos, RPGGUN2 + kb_frames[*kb], gs, o | pin, pal);
|
||||
looking_arc + 255 - gun_pos, RPGGUN2 + kb_frames[*kb], shade, o | pin, pal);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -477,25 +473,25 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
if (chickenphase)
|
||||
{
|
||||
rdmyospal((weapon_xoffset + 210) - look_anghalf,
|
||||
looking_arc + 222 - gun_pos, RPGGUN2 + 7, gs, o | pin, pal);
|
||||
looking_arc + 222 - gun_pos, RPGGUN2 + 7, shade, o | pin, pal);
|
||||
}
|
||||
else if ((krand() & 15) == 5)
|
||||
{
|
||||
S_PlayActorSound(327, p->GetActor());
|
||||
rdmyospal((weapon_xoffset + 210) - look_anghalf,
|
||||
looking_arc + 222 - gun_pos, RPGGUN2 + 7, gs, o | pin, pal);
|
||||
looking_arc + 222 - gun_pos, RPGGUN2 + 7, shade, o | pin, pal);
|
||||
chickenphase = 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
rdmyospal((weapon_xoffset + 210) - look_anghalf,
|
||||
looking_arc + 225 - gun_pos, RPGGUN2, gs, o | pin, pal);
|
||||
looking_arc + 225 - gun_pos, RPGGUN2, shade, o | pin, pal);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rdmyospal((weapon_xoffset + 210) - look_anghalf,
|
||||
looking_arc + 225 - gun_pos, RPGGUN2, gs, o | pin, pal);
|
||||
looking_arc + 225 - gun_pos, RPGGUN2, shade, o | pin, pal);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -530,11 +526,11 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
if ((*kb) < 26)
|
||||
{
|
||||
if (kb_frames[*kb] == 3 || kb_frames[*kb] == 4)
|
||||
gs = 0;
|
||||
shade = 0;
|
||||
x = weapon_xoffset + ((kb_ox[kb_frames[*kb]] >> 1) - 12);
|
||||
y = tm - (244 - kb_oy[kb_frames[*kb]]);
|
||||
hud_drawpal(x + 64 - look_anghalf,
|
||||
y + looking_arc - gun_pos, SHOTGUN + kb_frames[*kb], gs, 0, pal);
|
||||
y + looking_arc - gun_pos, SHOTGUN + kb_frames[*kb], shade, 0, pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -557,9 +553,9 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
y += 30;
|
||||
break;
|
||||
}
|
||||
hud_drawpal(x + 64 - look_anghalf, y + looking_arc - gun_pos, SHOTGUN + kb_frames[*kb], gs, 0, pal);
|
||||
hud_drawpal(x + 64 - look_anghalf, y + looking_arc - gun_pos, SHOTGUN + kb_frames[*kb], shade, 0, pal);
|
||||
if (kb_frames[*kb] == 21)
|
||||
hud_drawpal(x + 96 - look_anghalf, y + looking_arc - gun_pos, SHOTGUNSHELLS, gs, 0, pal);
|
||||
hud_drawpal(x + 96 - look_anghalf, y + looking_arc - gun_pos, SHOTGUNSHELLS, shade, 0, pal);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -569,20 +565,20 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
if (p->shotgun_state[0])
|
||||
{
|
||||
if (kb_frames2[*kb] == 3 || kb_frames2[*kb] == 4)
|
||||
gs = 0;
|
||||
shade = 0;
|
||||
x = weapon_xoffset + ((kb_ox[kb_frames2[*kb]] >> 1) - 12);
|
||||
y = tm - (244 - kb_oy[kb_frames2[*kb]]);
|
||||
hud_drawpal(x + 64 - look_anghalf,
|
||||
y + looking_arc - gun_pos, SHOTGUN + kb_frames2[*kb], gs, 0, pal);
|
||||
y + looking_arc - gun_pos, SHOTGUN + kb_frames2[*kb], shade, 0, pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (kb_frames3[*kb] == 1 || kb_frames3[*kb] == 2)
|
||||
gs = 0;
|
||||
shade = 0;
|
||||
x = weapon_xoffset + ((kb_ox[kb_frames3[*kb]] >> 1) - 12);
|
||||
y = tm - (244 - kb_oy[kb_frames3[*kb]]);
|
||||
hud_drawpal(x + 64 - look_anghalf,
|
||||
y + looking_arc - gun_pos, SHOTGUN + kb_frames3[*kb], gs, 0, pal);
|
||||
y + looking_arc - gun_pos, SHOTGUN + kb_frames3[*kb], shade, 0, pal);
|
||||
}
|
||||
}
|
||||
else if (p->shotgun_state[0])
|
||||
|
@ -606,9 +602,9 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
y += 30;
|
||||
break;
|
||||
}
|
||||
hud_drawpal(x + 64 - look_anghalf, y + looking_arc - gun_pos, SHOTGUN + kb_frames2[*kb], gs, 0, pal);
|
||||
hud_drawpal(x + 64 - look_anghalf, y + looking_arc - gun_pos, SHOTGUN + kb_frames2[*kb], shade, 0, pal);
|
||||
if (kb_frames2[*kb] == 21)
|
||||
hud_drawpal(x + 96 - look_anghalf, y + looking_arc - gun_pos, SHOTGUNSHELLS, gs, 0, pal);
|
||||
hud_drawpal(x + 96 - look_anghalf, y + looking_arc - gun_pos, SHOTGUNSHELLS, shade, 0, pal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -631,18 +627,18 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
{
|
||||
case 0:
|
||||
hud_drawpal(weapon_xoffset + 178 - look_anghalf + 30, looking_arc + 233 - gun_pos + 5,
|
||||
CHAINGUN, gs, o, pal);
|
||||
CHAINGUN, shade, o, pal);
|
||||
break;
|
||||
default:
|
||||
gs = 0;
|
||||
shade = 0;
|
||||
if (*kb < 8)
|
||||
{
|
||||
i = rand() & 7;
|
||||
hud_drawpal(weapon_xoffset + 178 - look_anghalf + 30, looking_arc + 233 - gun_pos + 5,
|
||||
CHAINGUN + 1, gs, o, pal);
|
||||
CHAINGUN + 1, shade, o, pal);
|
||||
}
|
||||
else hud_drawpal(weapon_xoffset + 178 - look_anghalf + 30, looking_arc + 233 - gun_pos + 5,
|
||||
CHAINGUN + 2, gs, o, pal);
|
||||
CHAINGUN + 2, shade, o, pal);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
@ -667,10 +663,10 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
y = 244 - (244 - kb_oy[kb_frames[*kb]]);
|
||||
|
||||
if (kb_frames[*kb])
|
||||
gs = 0;
|
||||
shade = 0;
|
||||
|
||||
rdmyospal(x - look_anghalf,
|
||||
y + looking_arc - gun_pos, FIRSTGUN + kb_frames[*kb], gs, 0, pal);
|
||||
y + looking_arc - gun_pos, FIRSTGUN + kb_frames[*kb], shade, 0, pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -728,7 +724,7 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
break;
|
||||
}
|
||||
rdmyospal(x - look_anghalf - dx,
|
||||
y + looking_arc - gun_pos + dy, FIRSTGUNRELOAD + kb_frames[(*kb) - 22], gs, 0, pal);
|
||||
y + looking_arc - gun_pos + dy, FIRSTGUNRELOAD + kb_frames[(*kb) - 22], shade, 0, pal);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -742,7 +738,7 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
{
|
||||
gun_pos -= 9 * (*kb);
|
||||
|
||||
rdmyospal(weapon_xoffset + 190 - look_anghalf, looking_arc + 260 - gun_pos, HANDTHROW, gs, o, pal);
|
||||
rdmyospal(weapon_xoffset + 190 - look_anghalf, looking_arc + 260 - gun_pos, HANDTHROW, shade, o, pal);
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -761,7 +757,7 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
dy = 20;
|
||||
if ((*kb) < 20)
|
||||
{
|
||||
//if (!(duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) pin = RS_ALIGN_R;
|
||||
if (!(gs.displayflags & DUKE3D_NO_WIDESCREEN_PINNING)) pin = RS_ALIGN_R;
|
||||
static const int8_t remote_frames[] = { 1,1,1,1,1,2,2,2,2,3,3,3,4,4,4,5,5,5,5,5,6,6,6 };
|
||||
|
||||
if (*kb)
|
||||
|
@ -772,7 +768,7 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
looking_arc + 258 - gun_pos - 64 + p->detonate_count - dy, RRTILE1752, 0, o | pin, pal);
|
||||
}
|
||||
rdmyospal(weapon_xoffset + x + 190 - look_anghalf,
|
||||
looking_arc + 258 - gun_pos - dy, HANDTHROW + remote_frames[*kb], gs, o | pin, pal);
|
||||
looking_arc + 258 - gun_pos - dy, HANDTHROW + remote_frames[*kb], shade, o | pin, pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -782,7 +778,7 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
looking_arc + 258 - gun_pos - 64 + p->detonate_count - dy, RRTILE1752, 0, o | pin, pal);
|
||||
}
|
||||
rdmyospal(weapon_xoffset + x + 190 - look_anghalf,
|
||||
looking_arc + 258 - gun_pos - dy, HANDTHROW + 1, gs, o | pin, pal);
|
||||
looking_arc + 258 - gun_pos - dy, HANDTHROW + 1, shade, o | pin, pal);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -797,11 +793,11 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
{
|
||||
if (*kb)
|
||||
{
|
||||
gs = 0;
|
||||
rd3myospal(150 + (weapon_xoffset / 2.) - look_anghalf, 266 + (looking_arc / 2.) - gun_pos, DEVISTATOR, gs, o, pal);
|
||||
shade = 0;
|
||||
rd3myospal(150 + (weapon_xoffset / 2.) - look_anghalf, 266 + (looking_arc / 2.) - gun_pos, DEVISTATOR, shade, o, pal);
|
||||
}
|
||||
else
|
||||
rd3myospal(150 + (weapon_xoffset / 2.) - look_anghalf, 266 + (looking_arc / 2.) - gun_pos, DEVISTATOR + 1, gs, o, pal);
|
||||
rd3myospal(150 + (weapon_xoffset / 2.) - look_anghalf, 266 + (looking_arc / 2.) - gun_pos, DEVISTATOR + 1, shade, o, pal);
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -812,13 +808,13 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
|
||||
auto displayblaster = [&]
|
||||
{
|
||||
//if (!(duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) pin = RS_ALIGN_R;
|
||||
if (!(gs.displayflags & DUKE3D_NO_WIDESCREEN_PINNING)) pin = RS_ALIGN_R;
|
||||
if ((*kb))
|
||||
{
|
||||
char cat_frames[] = { 0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
|
||||
rdmyospal(weapon_xoffset + 260 - look_anghalf, looking_arc + 215 - gun_pos, FREEZE + cat_frames[*kb], -32, o | pin, pal);
|
||||
}
|
||||
else rdmyospal(weapon_xoffset + 260 - look_anghalf, looking_arc + 215 - gun_pos, FREEZE, gs, o | pin, pal);
|
||||
else rdmyospal(weapon_xoffset + 260 - look_anghalf, looking_arc + 215 - gun_pos, FREEZE, shade, o | pin, pal);
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -834,7 +830,7 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
if ((*kb) == 0)
|
||||
{
|
||||
rd2myospal(weapon_xoffset + 188 - look_anghalf,
|
||||
looking_arc + 240 - gun_pos, SHRINKER, gs, o, pal);
|
||||
looking_arc + 240 - gun_pos, SHRINKER, shade, o, pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -847,14 +843,14 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
if (cw == BUZZSAW_WEAPON)
|
||||
{
|
||||
rd2myospal(weapon_xoffset + 184 - look_anghalf,
|
||||
looking_arc + 240 - gun_pos, GROWSPARK + ((*kb) & 2), gs, o, 0);
|
||||
looking_arc + 240 - gun_pos, GROWSPARK + ((*kb) & 2), shade, o, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
signed char kb_frames[] = { 1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0 };
|
||||
short frm = kb_frames[*kb];
|
||||
rd2myospal(weapon_xoffset + 184 - look_anghalf,
|
||||
looking_arc + 240 - gun_pos, SHRINKER + frm, gs, o, 0);
|
||||
looking_arc + 240 - gun_pos, SHRINKER + frm, shade, o, 0);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue