mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-31 13:10:39 +00:00
- Duke: Tidy up animateshrunken()
.
This commit is contained in:
parent
c45b755773
commit
3eb3a29a7e
3 changed files with 6 additions and 6 deletions
|
@ -277,7 +277,7 @@ void displayweapon_d(int snum, double interpfrac)
|
|||
if (p->GetActor()->spr.scale.X < 0.625)
|
||||
{
|
||||
//shrunken..
|
||||
animateshrunken(p, 0, offsets.Y + gun_pos, -offsets.X, DTILE_FIST, shade, o, interpfrac);
|
||||
animateshrunken(p, offsets.X, offsets.Y + gun_pos, DTILE_FIST, shade, o, interpfrac);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -296,7 +296,7 @@ void displayweapon_r(int snum, double interpfrac)
|
|||
|
||||
if (p->GetActor()->spr.scale.X < 0.125)
|
||||
{
|
||||
animateshrunken(p, 0, offsets.Y + gun_pos, -offsets.X, RTILE_FIST, shade, o, interpfrac);
|
||||
animateshrunken(p, offsets.X, offsets.Y + gun_pos, RTILE_FIST, shade, o, interpfrac);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -256,12 +256,12 @@ inline void hud_draw(double x, double y, int tilenum, int shade, int orientation
|
|||
hud_drawsprite(x, y, 65536, 0, tilenum, shade, p, 2 | orientation);
|
||||
}
|
||||
|
||||
inline void animateshrunken(player_struct* p, double weapon_xoffset, double looking_arc, double look_anghalf, int tilenum, int8_t shade, int o, double interpfrac)
|
||||
inline void animateshrunken(player_struct* p, double xoffset, double yoffset, int tilenum, int8_t shade, int o, double interpfrac)
|
||||
{
|
||||
const double fistsign = BobVal(interpolatedvalue<double>(p->ofistsign, p->fistsign, interpfrac)) * 16;
|
||||
if (p->jetpack_on == 0) looking_arc += 32 - (p->GetActor()->vel.X * 8);
|
||||
hud_draw(weapon_xoffset + fistsign + 250 - look_anghalf, looking_arc + 258 - fabs(fistsign * 4), tilenum, shade, o);
|
||||
hud_draw(weapon_xoffset - fistsign + 40 - look_anghalf, looking_arc + 200 + fabs(fistsign * 4), tilenum, shade, o | 4);
|
||||
if (p->jetpack_on == 0) yoffset += 32 - (p->GetActor()->vel.X * 8);
|
||||
hud_draw(250 + fistsign + xoffset, 258 - fabs(fistsign * 4) + yoffset, tilenum, shade, o);
|
||||
hud_draw(40 - fistsign + xoffset, 200 + fabs(fistsign * 4) + yoffset, tilenum, shade, o | 4);
|
||||
}
|
||||
|
||||
inline ESpriteFlags randomFlip()
|
||||
|
|
Loading…
Reference in a new issue