Skip to content

Commit

Permalink
- Exhumed: pin death arms to the right side of the screen
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed May 5, 2022
1 parent f6ae967 commit 377b0fa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion source/games/exhumed/src/gun.cpp
Expand Up @@ -918,6 +918,7 @@ void DrawWeapons(double smooth)
nPal = RemapPLU(nPal);

double xOffset = 0, yOffset = 0;
bool screenalign = false;

if (cl_weaponsway)
{
Expand Down Expand Up @@ -949,6 +950,10 @@ void DrawWeapons(double smooth)
if (nWeapon == 3 && var_34 == 1) {
seq_DrawPilotLightSeq(xOffset, yOffset);
}
else if (nWeapon == 8 || nWeapon == 9)
{
screenalign = true;
}

if (nWeapon < 0) {
nShade = PlayerList[nLocalPlayer].pActor->spr.shade;
Expand All @@ -960,7 +965,7 @@ void DrawWeapons(double smooth)
xOffset -= look_anghalf;
yOffset += looking_arc;

seq_DrawGunSequence(var_28, PlayerList[nLocalPlayer].nSeqSize2, xOffset, yOffset, nShade, nPal);
seq_DrawGunSequence(var_28, PlayerList[nLocalPlayer].nSeqSize2, xOffset, yOffset, nShade, nPal, screenalign);

if (nWeapon != kWeaponM60)
return;
Expand Down
4 changes: 3 additions & 1 deletion source/games/exhumed/src/sequence.cpp
Expand Up @@ -397,7 +397,7 @@ void seq_DrawPilotLightSeq(double xOffset, double yOffset)
*/

int seq_DrawGunSequence(int nSeqOffset, int16_t dx, double xOffs, double yOffs, int nShade, int nPal)
int seq_DrawGunSequence(int nSeqOffset, int16_t dx, double xOffs, double yOffs, int nShade, int nPal, bool align)
{
int nFrame = SeqBase[nSeqOffset] + dx;
int nFrameBase = FrameBase[nFrame];
Expand All @@ -419,6 +419,8 @@ int seq_DrawGunSequence(int nSeqOffset, int16_t dx, double xOffs, double yOffs,

if (ChunkFlag[nFrameBase] & 2)
stat |= RS_YFLIPHUD;

if (align) stat |= RS_ALIGN_R;

int16_t nTile = ChunkPict[nFrameBase];

Expand Down
2 changes: 1 addition & 1 deletion source/games/exhumed/src/sequence.h
Expand Up @@ -137,7 +137,7 @@ int seq_GetSeqPicnum2(int16_t nSeq, int16_t nFrame);
int seq_GetSeqPicnum(int16_t nSeq, int16_t edx, int16_t ebx);
void seq_DrawStatusSequence(int16_t nSequence, uint16_t edx, int16_t ebx);

int seq_DrawGunSequence(int nSeqOffset, int16_t dx, double xOffs, double yOffs, int nShade, int nPal);
int seq_DrawGunSequence(int nSeqOffset, int16_t dx, double xOffs, double yOffs, int nShade, int nPal, bool align = false);
int16_t seq_GetFrameFlag(int16_t val, int16_t nFrame);
int seq_PlotSequence(int nSprite, int16_t edx, int16_t nFrame, int16_t ecx);
int seq_PlotArrowSequence(int nSprite, int16_t nSeq, int nVal);
Expand Down

0 comments on commit 377b0fa

Please sign in to comment.