Skip to content

Commit fab1aa3

Browse files
committed
Restore key-blink feature
1 parent fc93214 commit fab1aa3

File tree

9 files changed

+201
-22
lines changed

9 files changed

+201
-22
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- **Merged changes from [Woof! 15.0.0](https://github.com/fabiangreffrath/woof/releases/tag/woof_15.0.0)**, note:
1010
- NUGHUD now partially uses SBARDEF as its backend, which may cause some rendering differences
1111
- Integrated periodic auto saves into the save/load menus
12-
- Maintained message list, message duration, and chat-message duration settings [1]
12+
- Maintained key blink, message list, message duration, and chat-message duration settings [1]
1313
- Removed `show_ssg` (now default behavior), `alt_arms` and `hud_highlight_weapon` settings
1414
- Renamed `#_bobbing_percentage` to `#_bobbing_pct` [2]
1515
- Renamed `show_berserk` to `sts_show_berserk` [2]
@@ -32,6 +32,6 @@
3232
- **Crash when loading WADs with empty lumps between `C_#` markers** (fixes `nt_rc1.wad`)
3333
- **Shadows not being drawn for HUD icons when using Boom font**
3434

35-
**[1].** Not necessarily with the same CVARs; existing config files will be affected.
35+
**[1].** Not necessarily with the same CVARs; existing config files may be affected.
3636

3737
**[2].** This will affect existing config files.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ For these settings, their CVAR names are provided alongside the _CFG-only_ label
107107
- **_Message Lines_** setting (scrolling direction determined by the CFG-only `hud_msg_scrollup` CVAR)
108108
- **_(Chat) Message Duration_** settings
109109
- **_Show Powerup Timers_** setting
110-
- **_Berserk display when using Fist** setting [partially p.f. Crispy Doom]
110+
- **_Blink Missing Keys_** setting [partially p.f. Crispy Doom]
111+
- **_Berserk display when using Fist_** setting [partially p.f. Crispy Doom]
111112
- **_Automap Level Stats Format_** setting
112113
- **Level-Stats Selection** settings (CFG-only: `hud_stats_#[_map]`)
113114
- **Event Timers:**

src/mn_setup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2252,6 +2252,7 @@ static setup_menu_t stat_settings5[] =
22522252
{"Nugget - HUD", S_SKIP|S_TITLE, M_X, M_SPC},
22532253

22542254
{"Show Powerup Timers", S_CHOICE|S_COSMETIC, M_X, M_SPC, {"hud_power_timers"}, .strings_id = str_show_widgets},
2255+
{"Blink Missing Keys", S_ONOFF, M_X, M_SPC, {"hud_blink_keys"}},
22552256
{"Berserk display when using Fist", S_ONOFF, M_X, M_SPC, {"sts_show_berserk"}},
22562257
{"Allow HUD Icons", S_ONOFF, M_X, M_SPC, {"hud_allow_icons"}},
22572258

src/p_doors.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ int EV_DoLockedDoor(line_t *line, vldoor_e type, mobj_t *thing)
272272
doomprintf(p, MESSAGES_NONE, "%s", s_PD_BLUEO); // Ty 03/27/98 - externalized
273273
S_StartSoundOptional(p->mo, sfx_locked, // [Nugget]: [NS] Locked door sound.
274274
STRICTMODE(comp_keynoway) ? sfx_noway : sfx_oof); // [Nugget]
275-
// ST_SetKeyBlink(p, KEYBLINK_EITHER, KEYBLINK_NONE, KEYBLINK_NONE);
275+
ST_SetKeyBlink(p, KEYBLINK_EITHER, KEYBLINK_NONE, KEYBLINK_NONE); // [Nugget] Key blinking
276276
return 0;
277277
}
278278
break;
@@ -284,7 +284,7 @@ int EV_DoLockedDoor(line_t *line, vldoor_e type, mobj_t *thing)
284284
doomprintf(p, MESSAGES_NONE, "%s", s_PD_REDO); // Ty 03/27/98 - externalized
285285
S_StartSoundOptional(p->mo, sfx_locked, // [Nugget]: [NS] Locked door sound.
286286
STRICTMODE(comp_keynoway) ? sfx_noway : sfx_oof); // [Nugget]
287-
// ST_SetKeyBlink(p, KEYBLINK_NONE, KEYBLINK_NONE, KEYBLINK_EITHER);
287+
ST_SetKeyBlink(p, KEYBLINK_NONE, KEYBLINK_NONE, KEYBLINK_EITHER); // [Nugget] Key blinking
288288
return 0;
289289
}
290290
break;
@@ -296,7 +296,7 @@ int EV_DoLockedDoor(line_t *line, vldoor_e type, mobj_t *thing)
296296
doomprintf(p, MESSAGES_NONE, "%s", s_PD_YELLOWO); // Ty 03/27/98 - externalized
297297
S_StartSoundOptional(p->mo, sfx_locked, // [Nugget]: [NS] Locked door sound.
298298
STRICTMODE(comp_keynoway) ? sfx_noway : sfx_oof); // [Nugget]
299-
// ST_SetKeyBlink(p, KEYBLINK_NONE, KEYBLINK_EITHER, KEYBLINK_NONE);
299+
ST_SetKeyBlink(p, KEYBLINK_NONE, KEYBLINK_EITHER, KEYBLINK_NONE); // [Nugget] Key blinking
300300
return 0;
301301
}
302302
break;
@@ -427,7 +427,7 @@ int EV_VerticalDoor(line_t *line, mobj_t *thing)
427427
doomprintf(player, MESSAGES_NONE, "%s", s_PD_BLUEK); // Ty 03/27/98 - externalized
428428
S_StartSoundOptional(player->mo, sfx_locked, // [Nugget]: [NS] Locked door sound.
429429
STRICTMODE(comp_keynoway) ? sfx_noway : sfx_oof); // [Nugget]
430-
// ST_SetKeyBlink(player, KEYBLINK_EITHER, KEYBLINK_NONE, KEYBLINK_NONE);
430+
ST_SetKeyBlink(player, KEYBLINK_EITHER, KEYBLINK_NONE, KEYBLINK_NONE); // [Nugget] Key blinking
431431
return 0;
432432
}
433433
break;
@@ -441,7 +441,7 @@ int EV_VerticalDoor(line_t *line, mobj_t *thing)
441441
doomprintf(player, MESSAGES_NONE, "%s", s_PD_YELLOWK); // Ty 03/27/98 - externalized
442442
S_StartSoundOptional(player->mo, sfx_locked, // [Nugget]: [NS] Locked door sound.
443443
STRICTMODE(comp_keynoway) ? sfx_noway : sfx_oof); // [Nugget]
444-
// ST_SetKeyBlink(player, KEYBLINK_NONE, KEYBLINK_EITHER, KEYBLINK_NONE);
444+
ST_SetKeyBlink(player, KEYBLINK_NONE, KEYBLINK_EITHER, KEYBLINK_NONE); // [Nugget] Key blinking
445445
return 0;
446446
}
447447
break;
@@ -455,7 +455,7 @@ int EV_VerticalDoor(line_t *line, mobj_t *thing)
455455
doomprintf(player, MESSAGES_NONE, "%s", s_PD_REDK); // Ty 03/27/98 - externalized
456456
S_StartSoundOptional(player->mo, sfx_locked, // [Nugget]: [NS] Locked door sound.
457457
STRICTMODE(comp_keynoway) ? sfx_noway : sfx_oof); // [Nugget]
458-
// ST_SetKeyBlink(player, KEYBLINK_NONE, KEYBLINK_NONE, KEYBLINK_EITHER);
458+
ST_SetKeyBlink(player, KEYBLINK_NONE, KEYBLINK_NONE, KEYBLINK_EITHER); // [Nugget] Key blinking
459459
return 0;
460460
}
461461
break;

src/p_mobj.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,6 +1547,19 @@ void P_SpawnMapThing (mapthing_t* mthing)
15471547
{
15481548
mobj->health = 1000 + musid;
15491549
}
1550+
1551+
// [Nugget] Key blinking:
1552+
// [crispy] blinking key or skull in the status bar
1553+
switch (mobj->sprite)
1554+
{
1555+
case SPR_BKEY: st_keyorskull[it_bluecard] |= KEYBLINK_CARD; break;
1556+
case SPR_BSKU: st_keyorskull[it_bluecard] |= KEYBLINK_SKULL; break;
1557+
case SPR_RKEY: st_keyorskull[it_redcard] |= KEYBLINK_CARD; break;
1558+
case SPR_RSKU: st_keyorskull[it_redcard] |= KEYBLINK_SKULL; break;
1559+
case SPR_YKEY: st_keyorskull[it_yellowcard] |= KEYBLINK_CARD; break;
1560+
case SPR_YSKU: st_keyorskull[it_yellowcard] |= KEYBLINK_SKULL; break;
1561+
default: break;
1562+
}
15501563
}
15511564

15521565
//

src/p_setup.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656

5757
// [Nugget]
5858
#include "m_array.h"
59+
#include "st_stuff.h"
5960

6061
//
6162
// MAP related Lookup tables.
@@ -1726,6 +1727,10 @@ void P_SetupLevel(int episode, int map, int playermask, skill_t skill)
17261727
// [crispy] fix long wall wobble
17271728
P_SegLengths(false);
17281729

1730+
// [Nugget] Key blinking:
1731+
// [crispy] blinking key or skull in the status bar
1732+
memset(st_keyorskull, 0, sizeof(st_keyorskull));
1733+
17291734
// Note: you don't need to clear player queue slots --
17301735
// a much simpler fix is in g_game.c -- killough 10/98
17311736

src/p_spec.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ boolean P_CanUnlockGenDoor(line_t *line, player_t *player)
825825
doomprintf(player, MESSAGES_NONE, "%s", s_PD_ANY); // Ty 03/27/98 - externalized
826826
S_StartSoundOptional(player->mo, sfx_locked, // [Nugget] Locked door sound
827827
STRICTMODE(comp_keynoway) ? sfx_noway : sfx_oof); // [Nugget]
828-
// ST_SetKeyBlink(player, KEYBLINK_EITHER, KEYBLINK_EITHER, KEYBLINK_EITHER);
828+
ST_SetKeyBlink(player, KEYBLINK_EITHER, KEYBLINK_EITHER, KEYBLINK_EITHER); // [Nugget] Key blinking
829829
return false;
830830
}
831831
break;
@@ -836,7 +836,7 @@ boolean P_CanUnlockGenDoor(line_t *line, player_t *player)
836836
doomprintf(player, MESSAGES_NONE, "%s", skulliscard? s_PD_REDK : s_PD_REDC); // Ty 03/27/98 - externalized
837837
S_StartSoundOptional(player->mo, sfx_locked, // [Nugget] Locked door sound
838838
STRICTMODE(comp_keynoway) ? sfx_noway : sfx_oof); // [Nugget]
839-
// ST_SetKeyBlink(player, KEYBLINK_NONE, KEYBLINK_NONE, skulliscard ? KEYBLINK_EITHER : KEYBLINK_CARD);
839+
ST_SetKeyBlink(player, KEYBLINK_NONE, KEYBLINK_NONE, skulliscard ? KEYBLINK_EITHER : KEYBLINK_CARD); // [Nugget] Key blinking
840840
return false;
841841
}
842842
break;
@@ -847,7 +847,7 @@ boolean P_CanUnlockGenDoor(line_t *line, player_t *player)
847847
doomprintf(player, MESSAGES_NONE, "%s", skulliscard? s_PD_BLUEK : s_PD_BLUEC); // Ty 03/27/98 - externalized
848848
S_StartSoundOptional(player->mo, sfx_locked, // [Nugget] Locked door sound
849849
STRICTMODE(comp_keynoway) ? sfx_noway : sfx_oof); // [Nugget]
850-
// ST_SetKeyBlink(player, skulliscard ? KEYBLINK_EITHER : KEYBLINK_CARD, KEYBLINK_NONE, KEYBLINK_NONE);
850+
ST_SetKeyBlink(player, skulliscard ? KEYBLINK_EITHER : KEYBLINK_CARD, KEYBLINK_NONE, KEYBLINK_NONE); // [Nugget] Key blinking
851851
return false;
852852
}
853853
break;
@@ -858,7 +858,7 @@ boolean P_CanUnlockGenDoor(line_t *line, player_t *player)
858858
doomprintf(player, MESSAGES_NONE, "%s", skulliscard? s_PD_YELLOWK : s_PD_YELLOWC); // Ty 03/27/98 - externalized
859859
S_StartSoundOptional(player->mo, sfx_locked, // [Nugget] Locked door sound
860860
STRICTMODE(comp_keynoway) ? sfx_noway : sfx_oof); // [Nugget]
861-
// ST_SetKeyBlink(player, KEYBLINK_NONE, skulliscard ? KEYBLINK_EITHER : KEYBLINK_CARD, KEYBLINK_NONE);
861+
ST_SetKeyBlink(player, KEYBLINK_NONE, skulliscard ? KEYBLINK_EITHER : KEYBLINK_CARD, KEYBLINK_NONE); // [Nugget] Key blinking
862862
return false;
863863
}
864864
break;
@@ -869,7 +869,7 @@ boolean P_CanUnlockGenDoor(line_t *line, player_t *player)
869869
doomprintf(player, MESSAGES_NONE, "%s", skulliscard? s_PD_REDK : s_PD_REDS); // Ty 03/27/98 - externalized
870870
S_StartSoundOptional(player->mo, sfx_locked, // [Nugget] Locked door sound
871871
STRICTMODE(comp_keynoway) ? sfx_noway : sfx_oof); // [Nugget]
872-
// ST_SetKeyBlink(player, KEYBLINK_NONE, KEYBLINK_NONE, skulliscard ? KEYBLINK_EITHER : KEYBLINK_SKULL);
872+
ST_SetKeyBlink(player, KEYBLINK_NONE, KEYBLINK_NONE, skulliscard ? KEYBLINK_EITHER : KEYBLINK_SKULL); // [Nugget] Key blinking
873873
return false;
874874
}
875875
break;
@@ -880,7 +880,7 @@ boolean P_CanUnlockGenDoor(line_t *line, player_t *player)
880880
doomprintf(player, MESSAGES_NONE, "%s", skulliscard? s_PD_BLUEK : s_PD_BLUES); // Ty 03/27/98 - externalized
881881
S_StartSoundOptional(player->mo, sfx_locked, // [Nugget] Locked door sound
882882
STRICTMODE(comp_keynoway) ? sfx_noway : sfx_oof); // [Nugget]
883-
// ST_SetKeyBlink(player, skulliscard ? KEYBLINK_EITHER : KEYBLINK_SKULL, KEYBLINK_NONE, KEYBLINK_NONE);
883+
ST_SetKeyBlink(player, skulliscard ? KEYBLINK_EITHER : KEYBLINK_SKULL, KEYBLINK_NONE, KEYBLINK_NONE); // [Nugget] Key blinking
884884
return false;
885885
}
886886
break;
@@ -891,7 +891,7 @@ boolean P_CanUnlockGenDoor(line_t *line, player_t *player)
891891
doomprintf(player, MESSAGES_NONE, "%s", skulliscard? s_PD_YELLOWK : s_PD_YELLOWS); // Ty 03/27/98 - externalized
892892
S_StartSoundOptional(player->mo, sfx_locked, // [Nugget] Locked door sound
893893
STRICTMODE(comp_keynoway) ? sfx_noway : sfx_oof); // [Nugget]
894-
// ST_SetKeyBlink(player, KEYBLINK_NONE, skulliscard ? KEYBLINK_EITHER : KEYBLINK_SKULL, KEYBLINK_NONE);
894+
ST_SetKeyBlink(player, KEYBLINK_NONE, skulliscard ? KEYBLINK_EITHER : KEYBLINK_SKULL, KEYBLINK_NONE); // [Nugget] Key blinking
895895
return false;
896896
}
897897
break;
@@ -907,7 +907,7 @@ boolean P_CanUnlockGenDoor(line_t *line, player_t *player)
907907
doomprintf(player, MESSAGES_NONE, "%s", s_PD_ALL6); // Ty 03/27/98 - externalized
908908
S_StartSoundOptional(player->mo, sfx_locked, // [Nugget] Locked door sound
909909
STRICTMODE(comp_keynoway) ? sfx_noway : sfx_oof); // [Nugget]
910-
// ST_SetKeyBlink(player, KEYBLINK_BOTH, KEYBLINK_BOTH, KEYBLINK_BOTH);
910+
ST_SetKeyBlink(player, KEYBLINK_BOTH, KEYBLINK_BOTH, KEYBLINK_BOTH); // [Nugget] Key blinking
911911
return false;
912912
}
913913
if (skulliscard &&
@@ -920,7 +920,7 @@ boolean P_CanUnlockGenDoor(line_t *line, player_t *player)
920920
doomprintf(player, MESSAGES_NONE, "%s", s_PD_ALL3); // Ty 03/27/98 - externalized
921921
S_StartSoundOptional(player->mo, sfx_locked, // [Nugget] Locked door sound
922922
STRICTMODE(comp_keynoway) ? sfx_noway : sfx_oof); // [Nugget]
923-
// ST_SetKeyBlink(player, KEYBLINK_EITHER, KEYBLINK_EITHER, KEYBLINK_EITHER);
923+
ST_SetKeyBlink(player, KEYBLINK_EITHER, KEYBLINK_EITHER, KEYBLINK_EITHER); // [Nugget] Key blinking
924924
return false;
925925
}
926926
break;

0 commit comments

Comments
 (0)