Skip to content

Commit

Permalink
Cosmetic tweaks
Browse files Browse the repository at this point in the history
- Shifted Nugget's weapons-menu items
- Renamed "Prev/Next Skip Ammoless Weapons" to "Prev/Next Skip Empty Weapons"
- Renamed Nugget's translucent-patch drawing function
  • Loading branch information
MrAlaux committed Nov 26, 2024
1 parent 3ad6d0a commit 0c0ce76
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 36 deletions.
18 changes: 9 additions & 9 deletions src/hu_crosshair.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,23 +276,23 @@ void HU_DrawCrosshair(void)
if (crosshair.patch)
{
// [Nugget] Translucent crosshair
V_DrawPatchTranslatedTL(crosshair.x - crosshair.w,
y - crosshair.h, crosshair.patch,
crosshair.cr, xhair_tranmap);
V_DrawPatchTRTL2(crosshair.x - crosshair.w,
y - crosshair.h, crosshair.patch,
crosshair.cr, xhair_tranmap);
}

// [Nugget] Horizontal-autoaim indicators --------------------------------

if (crosshair.side == -1)
{
V_DrawPatchTranslatedTL(crosshair.x - crosshair.w - crosshair.lw,
y - crosshair.lh,
crosshair.lpatch, crosshair.cr, xhair_tranmap);
V_DrawPatchTRTL2(crosshair.x - crosshair.w - crosshair.lw,
y - crosshair.lh,
crosshair.lpatch, crosshair.cr, xhair_tranmap);
}
else if (crosshair.side == 1)
{
V_DrawPatchTranslatedTL(crosshair.x + crosshair.w,
y - crosshair.rh,
crosshair.rpatch, crosshair.cr, xhair_tranmap);
V_DrawPatchTRTL2(crosshair.x + crosshair.w,
y - crosshair.rh,
crosshair.rpatch, crosshair.cr, xhair_tranmap);
}
}
26 changes: 15 additions & 11 deletions src/mn_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1924,26 +1924,30 @@ static void NuggetResetWeaponInertia(void)
P_NuggetResetWeaponInertia();
}

#define W_X 230

static setup_menu_t weap_settings4[] =
{
{"Nugget - Gameplay", S_SKIP|S_TITLE, M_X, M_SPC},
{"Nugget - Gameplay", S_SKIP|S_TITLE, W_X, M_SPC},

{"No Horizontal Autoaim", S_ONOFF|S_STRICT|S_CRITICAL, M_X, M_SPC, {"no_hor_autoaim"}},
{"Switch on Pickup", S_ONOFF|S_STRICT|S_CRITICAL, M_X, M_SPC, {"switch_on_pickup"}},
{"Allow Switch Interruption", S_ONOFF|S_STRICT|S_CRITICAL, M_X, M_SPC, {"weapswitch_interruption"}},
{"Prev/Next Skip Ammoless Weapons", S_ONOFF|S_STRICT|S_CRITICAL, M_X, M_SPC, {"skip_ammoless_weapons"}},
{"No Horizontal Autoaim", S_ONOFF|S_STRICT|S_CRITICAL, W_X, M_SPC, {"no_hor_autoaim"}},
{"Switch on Pickup", S_ONOFF|S_STRICT|S_CRITICAL, W_X, M_SPC, {"switch_on_pickup"}},
{"Allow Switch Interruption", S_ONOFF|S_STRICT|S_CRITICAL, W_X, M_SPC, {"weapswitch_interruption"}},
{"Prev/Next Skip Empty Weapons", S_ONOFF|S_STRICT|S_CRITICAL, W_X, M_SPC, {"skip_ammoless_weapons"}},

MI_GAP,
{"Nugget - Cosmetic", S_SKIP|S_TITLE, M_X, M_SPC},
{"Nugget - Cosmetic", S_SKIP|S_TITLE, W_X, M_SPC},

{"Bobbing Style", S_CHOICE|S_STRICT, M_X, M_SPC, {"bobbing_style"}, .strings_id = str_bobbing_style},
{"Weapon Inertia", S_ONOFF |S_STRICT, M_X, M_SPC, {"weapon_inertia"}, .action = NuggetResetWeaponInertia},
{"Weapon Squat Upon Landing", S_ONOFF |S_STRICT, M_X, M_SPC, {"weaponsquat"}},
{"Translucent Flashes", S_ONOFF |S_STRICT, M_X, M_SPC, {"translucent_pspr"}},
{"Bobbing Style", S_CHOICE|S_STRICT, W_X, M_SPC, {"bobbing_style"}, .strings_id = str_bobbing_style},
{"Weapon Inertia", S_ONOFF |S_STRICT, W_X, M_SPC, {"weapon_inertia"}, .action = NuggetResetWeaponInertia},
{"Weapon Squat Upon Landing", S_ONOFF |S_STRICT, W_X, M_SPC, {"weaponsquat"}},
{"Translucent Flashes", S_ONOFF |S_STRICT, W_X, M_SPC, {"translucent_pspr"}},

MI_END
};

#undef W_X

// [Nugget] -----------------------------------------------------------------/

static setup_menu_t *weap_settings[] = {
Expand Down Expand Up @@ -2350,7 +2354,7 @@ void MN_DrawStatusHUD(void)
int y = M_Y + M_SPC + M_SPC / 2 - SHORT(patch->height) / 2 - 1; // [Nugget] Adjusted

// [Nugget] Translucent crosshair
V_DrawPatchTranslatedTL(x, y, patch, colrngs[hud_crosshair_color], xhair_tranmap);
V_DrawPatchTRTL2(x, y, patch, colrngs[hud_crosshair_color], xhair_tranmap);
}

// If the Reset Button has been selected, an "Are you sure?" message
Expand Down
10 changes: 5 additions & 5 deletions src/v_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ DRAW_COLUMN(TRTL, tranmap[(*dest << 8) + translation[source[frac >> FRACBITS]]])
DRAW_COLUMN(TRTRTL, tranmap[(*dest << 8) + translation2[translation1[source[frac >> FRACBITS]]]])

DRAW_COLUMN(
Translucent,
Translucent2,
tranmap[
(*dest << 8)
+ (translation2 ? translation2[translation1[source[frac >> FRACBITS]]] :
Expand Down Expand Up @@ -642,8 +642,8 @@ void V_DrawPatchTRTRTL(int x, int y, struct patch_s *patch,
DrawPatchInternal(x, y, patch, false);
}

void V_DrawPatchTranslucent(int x, int y, struct patch_s *patch, boolean flipped,
byte *outr1, byte *outr2, byte *tmap)
void V_DrawPatchTranslucent2(int x, int y, struct patch_s *patch, boolean flipped,
byte *outr1, byte *outr2, byte *tmap)
{
x += video.deltaw;

Expand All @@ -656,7 +656,7 @@ void V_DrawPatchTranslucent(int x, int y, struct patch_s *patch, boolean flipped
}
else { translation1 = translation2 = NULL; }

drawcolfunc = DrawPatchColumnTranslucent;
drawcolfunc = DrawPatchColumnTranslucent2;
tranmap = tmap;

DrawPatchInternal(x, y, patch, flipped);
Expand All @@ -668,7 +668,7 @@ void V_DrawPatchShadowed(int x, int y, struct patch_s *patch, boolean flipped,
if (hud_menu_shadows && drawshadows)
{
drawingshadow = true;
V_DrawPatchTranslucent(x + 1, y + 1, patch, flipped, cr_allblack, NULL, shadow_tranmap);
V_DrawPatchTranslucent2(x + 1, y + 1, patch, flipped, cr_allblack, NULL, shadow_tranmap);
drawingshadow = false;
}

Expand Down
25 changes: 14 additions & 11 deletions src/v_video.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,17 +198,20 @@ void V_SetShadowCrop(const int value);
void V_DrawPatchTRTRTL(int x, int y, struct patch_s *patch,
byte *outr1, byte *outr2, byte *tl);

void V_DrawPatchTranslucent(int x, int y, struct patch_s *patch, boolean flipped,
byte *outr1, byte *outr2, byte *tmap);
void V_DrawPatchTranslucent2(int x, int y, struct patch_s *patch, boolean flipped,
byte *outr1, byte *outr2, byte *tmap);

#define V_DrawPatchFlippedTL(x, y, p, tp) \
V_DrawPatchTranslucent(x, y, p, true, NULL, NULL, tp)
#define V_DrawPatchTL2(x, y, p, tp) \
V_DrawPatchTranslucent2(x, y, p, false, NULL, NULL, tp)

#define V_DrawPatchTranslatedTL(x, y, p, cr, tp) \
V_DrawPatchTranslucent(x, y, p, false, cr, NULL, tp)
#define V_DrawPatchFlippedTL2(x, y, p, tp) \
V_DrawPatchTranslucent2(x, y, p, true, NULL, NULL, tp)

#define V_DrawPatchTRTL2(x, y, p, cr, tp) \
V_DrawPatchTranslucent2(x, y, p, false, cr, NULL, tp)

#define V_DrawPatchTRTRTL2(x, y, p, cr1, cr2, tp) \
V_DrawPatchTranslucent(x, y, p, false, cr1, cr2, tp)
V_DrawPatchTranslucent2(x, y, p, false, cr1, cr2, tp)

void V_DrawPatchShadowed(int x, int y, struct patch_s *patch, boolean flipped,
byte *outr1, byte *outr2, byte *tmap);
Expand All @@ -225,14 +228,14 @@ void V_DrawPatchShadowed(int x, int y, struct patch_s *patch, boolean flipped,
#define V_DrawPatchTRTRSH(x, y, p, cr1, cr2) \
V_DrawPatchShadowed(x, y, p, false, cr1, cr2, NULL)

#define V_DrawPatchTRTRTLSH(x, y, p, cr1, cr2, tp) \
V_DrawPatchShadowed(x, y, p, false, cr1, cr2, tp)
#define V_DrawPatchTLSH(x, y, p, tp) \
V_DrawPatchShadowed(x, y, p, false, NULL, NULL, tp)

#define V_DrawPatchTRTLSH(x, y, p, cr, tp) \
V_DrawPatchShadowed(x, y, p, false, cr, NULL, tp)

#define V_DrawPatchTLSH(x, y, p, tp) \
V_DrawPatchShadowed(x, y, p, false, NULL, NULL, tp)
#define V_DrawPatchTRTRTLSH(x, y, p, cr1, cr2, tp) \
V_DrawPatchShadowed(x, y, p, false, cr1, cr2, tp)

void V_ShadowRect(int x, int y, int width, int height);

Expand Down

0 comments on commit 0c0ce76

Please sign in to comment.