Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strife: Add flipped weapon sprites #1108

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/strife/d_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1694,10 +1694,10 @@ void D_DoomMain (void)
// @category obscure
// @vanilla
//
// Flip player gun sprites (broken).
// Flip player gun sprites.
//

flipparm = M_CheckParm ("-flip");
flipparm = M_CheckParm("-flip") || M_CheckParm("-flipweapons"); // [crispy]

//!
// @category game
Expand Down
5 changes: 3 additions & 2 deletions src/strife/r_things.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//

Check notice on line 1 in src/strife/r_things.c

View workflow job for this annotation

GitHub Actions / cpp-linter (clang)

Run clang-format on src/strife/r_things.c

File src/strife/r_things.c does not conform to Custom style guidelines. (lines 763, 878)
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005-2014 Simon Howard
//
Expand Down Expand Up @@ -759,7 +759,8 @@
// calculate edges of the shape
tx = psp->sx2-(ORIGWIDTH/2)*FRACUNIT;

tx -= spriteoffset[lump];
// [crispy] fix sprite offsets for mirrored sprites
tx -= flip ? 2 * tx - spriteoffset[lump] + spritewidth[lump] : spriteoffset[lump];
x1 = (centerxfrac + FixedMul (tx,pspritescale) ) >>FRACBITS;

// off the right side
Expand Down Expand Up @@ -874,7 +875,7 @@
}

// [crispy] free look
vis->texturemid += FixedMul(vis->xiscale, (centery - viewheight / 2) << FRACBITS);
vis->texturemid += FixedMul(pspriteiscale, (centery - viewheight / 2) << FRACBITS);

R_DrawVisSprite (vis, vis->x1, vis->x2);
}
Expand Down
Loading