diff --git a/CHANGELOG.md b/CHANGELOG.md index e409dfcbb..e60bc1673 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,16 @@ - Toggle to apply patch offsets. - **Further Extended HUD color customization** - **_Show Kills Percentage [in Stats display]_** setting +- **Made the following cheats bindable to keys:** + - Infinite Ammo; + - Fast Weapons; + - Resurrect; + - Flight Mode; + - Repeat Last Summon; + - Linetarget Query; + - MDK Attack; + - MDK Fist; + - Explosive Hitscan. - **Show Save Messages** setting - **_Direct Vertical Aiming_ for melee attacks** - **_Disable Melee Snapping_** setting diff --git a/src/m_cheat.c b/src/m_cheat.c index f81d56b85..1408c4f84 100644 --- a/src/m_cheat.c +++ b/src/m_cheat.c @@ -106,8 +106,8 @@ static void cheat_gibbers(); // Everything gibs static void cheat_resurrect(); static void cheat_fly(); -static void cheat_nextmap(); // Emulate level exit -static void cheat_nextsecret(); // Emulate secret level exit +static void cheat_normalexit(); // Emulate normal level exit +static void cheat_secretexit(); // Emulate secret level exit static void cheat_turbo(char *buf); // Summon a mobj @@ -367,8 +367,8 @@ struct cheat_s cheat[] = { {"resurrect", NULL, not_net | not_demo, {cheat_resurrect} }, {"idres", NULL, not_net | not_demo, {cheat_resurrect} }, // 'RESURRECT' alternative {"idfly", NULL, not_net | not_demo, {cheat_fly} }, - {"nextmap", NULL, not_net | not_demo, {cheat_nextmap} }, - {"nextsecret", NULL, not_net | not_demo, {cheat_nextsecret} }, + {"nextmap", NULL, not_net | not_demo, {cheat_normalexit} }, + {"nextsecret", NULL, not_net | not_demo, {cheat_secretexit} }, {"turbo", NULL, not_net | not_demo, {cheat_turbo}, -3 }, {"summon", NULL, not_net | not_demo, {cheat_summon} }, // Summon "Menu" {"summone", NULL, not_net | not_demo, {cheat_summone0} }, // Summon Enemy "Menu" @@ -492,12 +492,12 @@ static void cheat_fly() displaymsg("Fly Mode %s", (plyr->cheats & CF_FLY) ? "ON" : "OFF"); } -static void cheat_nextmap() +static void cheat_normalexit() { G_ExitLevel(); } -static void cheat_nextsecret() +static void cheat_secretexit() { G_SecretExitLevel(); } @@ -1696,6 +1696,16 @@ static const struct { { input_notarget, not_net|not_demo, {cheat_notarget}, 0 }, { input_freeze, not_net|not_demo, {cheat_freeze}, 0 }, { input_avj, not_net|not_demo, {cheat_avj}, 0 }, + // [Nugget] ---------------------------------------------------------------- + { input_infammo, not_net|not_demo, {cheat_infammo}, 0 }, + { input_fastweaps, not_net|not_demo, {cheat_fastweaps}, 0 }, + { input_resurrect, not_net|not_demo, {cheat_resurrect}, 0 }, + { input_fly, not_net|not_demo, {cheat_fly}, 0 }, + { input_summonr, not_net|not_demo, {cheat_summonr}, 0 }, + { input_linetarget, not_net|not_demo, {cheat_linetarget}, 0 }, + { input_mdk, not_net|not_demo, {cheat_mdk}, 0 }, + { input_saitama, not_net|not_demo, {cheat_saitama}, 0 }, + { input_boomcan, not_net|not_demo, {cheat_boomcan}, 0 }, }; boolean M_CheatResponder(event_t *ev) diff --git a/src/m_input.h b/src/m_input.h index 0ba8de35b..ec602f26d 100644 --- a/src/m_input.h +++ b/src/m_input.h @@ -108,10 +108,10 @@ enum input_map_zoomout, input_map_mark, input_map_clear, - input_map_mini, // [Nugget] Minimap input_map_blink, // [Nugget] Blink marks input_map_tagfinder, // [Nugget] Tag Finder from PrBoomX input_map_teleport, // [Nugget] Teleport to Automap pointer + input_map_mini, // [Nugget] Minimap input_map_gobig, input_map_grid, input_map_overlay, @@ -141,6 +141,17 @@ enum input_notarget, input_freeze, input_avj, + // [Nugget] /------------------------ + input_infammo, + input_fastweaps, + input_resurrect, + input_fly, + input_summonr, + input_linetarget, + input_mdk, + input_saitama, + input_boomcan, + // [Nugget] ------------------------/ NUM_INPUT_ID }; diff --git a/src/m_menu.c b/src/m_menu.c index ce28580ec..e20c6bc2b 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -2821,7 +2821,10 @@ setup_menu_t keys_settings6[]; setup_menu_t keys_settings7[]; setup_menu_t keys_settings8[]; setup_menu_t keys_settings9[]; -setup_menu_t keys_settings10[], keys_settings11[]; // [Nugget] +// [Nugget] +setup_menu_t keys_settings10[]; +setup_menu_t keys_settings11[]; +setup_menu_t keys_settings12[]; // The table which gets you from one screen table to the next. setup_menu_t* keys_settings[] = @@ -2838,6 +2841,7 @@ setup_menu_t* keys_settings[] = // [Nugget] keys_settings10, keys_settings11, + keys_settings12, NULL }; @@ -3208,6 +3212,42 @@ setup_menu_t keys_settings11[] = {"Fancy Teleport", S_YESNO|S_STRICT|S_CRITICAL, m_null, KB_X, M_Y + keys11_fancytp * M_SPC, {"fancy_teleport"}}, {"<- PREV", S_SKIP|S_PREV, m_null, M_X_PREV, M_Y_PREVNEXT, {keys_settings10}}, + {"NEXT ->", S_SKIP|S_NEXT, m_null, M_X_NEXT, M_Y_PREVNEXT, {keys_settings12}}, + + // Final entry + + {0,S_SKIP|S_END,m_null} + +}; + +enum { + keys12_title1, + keys12_infammo, + keys12_fastweaps, + keys12_resurrect, + keys12_fly, + keys12_summonr, + keys12_linetarg, + keys12_mdk, + keys12_saitama, + keys12_boomcan, +}; + +setup_menu_t keys_settings12[] = +{ + {"Nugget - Cheats", S_SKIP|S_TITLE, m_null, CHEAT_X, M_Y + keys12_title1 * M_SPC}, + + {"Infinite Ammo", S_INPUT, m_scrn, CHEAT_X, M_Y + keys12_infammo * M_SPC, {0}, input_infammo}, + {"Fast Weapons", S_INPUT, m_scrn, CHEAT_X, M_Y + keys12_fastweaps * M_SPC, {0}, input_fastweaps}, + {"Resurrect", S_INPUT, m_scrn, CHEAT_X, M_Y + keys12_resurrect * M_SPC, {0}, input_resurrect}, + {"Flight Mode", S_INPUT, m_scrn, CHEAT_X, M_Y + keys12_fly * M_SPC, {0}, input_fly}, + {"Repeat Last Summon", S_INPUT, m_scrn, CHEAT_X, M_Y + keys12_summonr * M_SPC, {0}, input_summonr}, + {"Linetarget Query", S_INPUT, m_scrn, CHEAT_X, M_Y + keys12_linetarg * M_SPC, {0}, input_linetarget}, + {"MDK Attack", S_INPUT, m_scrn, CHEAT_X, M_Y + keys12_mdk * M_SPC, {0}, input_mdk}, + {"MDK Fist", S_INPUT, m_scrn, CHEAT_X, M_Y + keys12_saitama * M_SPC, {0}, input_saitama}, + {"Explosive Hitscan", S_INPUT, m_scrn, CHEAT_X, M_Y + keys12_boomcan * M_SPC, {0}, input_boomcan}, + + {"<- PREV",S_SKIP|S_PREV,m_null,M_X_PREV,M_Y_PREVNEXT, {keys_settings11}}, // Final entry diff --git a/src/m_misc.c b/src/m_misc.c index 2efa3831e..ffc74bbf0 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -1688,6 +1688,37 @@ default_t defaults[] = { input_mouselook, { {0, 0} } }, + { // [Nugget] + "input_crosshair", + NULL, NULL, + {0}, {UL,UL}, input, ss_keys, wad_no, + "key to toggle crosshair", + input_crosshair, { {0, 0} } + }, + + { // [Nugget] + "input_zoom", + NULL, NULL, + {0}, {UL,UL}, input, ss_keys, wad_no, + "key to toggle zoom", + input_zoom, { {0, 0} } + }, + + { // [Nugget] + "zoom_fov", + (config_t *) &zoom_fov, NULL, + {MINFOV}, {MINFOV,MAXFOV}, number, ss_keys, wad_no, + "Field of View when zoom is enabled" + }, + + { // [Nugget] + "input_chasecam", + NULL, NULL, + {0}, {UL,UL}, input, ss_keys, wad_no, + "key to cycle through chasecam modes", + input_chasecam, { {0, 0} } + }, + { // phares 3/7/98 "input_menu_right", NULL, NULL, @@ -1880,6 +1911,22 @@ default_t defaults[] = { input_speed, { {input_type_key, KEY_RSHIFT} } }, + { // [Nugget] + "input_jump", + NULL, NULL, + {0}, {UL,UL}, input, ss_keys, wad_no, + "key to jump", + input_jump, { {input_type_key, KEY_RALT} } + }, + + { // [Nugget] + "input_crouch", + NULL, NULL, + {0}, {UL,UL}, input, ss_keys, wad_no, + "key to crouch/duck", + input_crouch, { {input_type_key, 'c'} } + }, + { "input_savegame", NULL, NULL, @@ -2083,6 +2130,14 @@ default_t defaults[] = { {input_type_mouseb, MOUSE_BUTTON_WHEELDOWN} } }, + { // [Nugget] + "input_map_mini", + NULL, NULL, + {0}, {UL,UL}, input, ss_keys, wad_no, + "key to activate minimap mode", + input_map_mini, { {0, 0} } + }, + { "input_map_gobig", NULL, NULL, @@ -2115,6 +2170,37 @@ default_t defaults[] = { input_map_clear, { {input_type_key, 'c'} } }, + { // [Nugget] + "input_map_blink", + NULL, NULL, + {0}, {UL,UL}, input, ss_keys, wad_no, + "key to make automap markers blink", + input_map_blink, { {input_type_key, 'b'} } + }, + + { // [Nugget] + "input_map_tagfinder", + NULL, NULL, + {0}, {UL,UL}, input, ss_keys, wad_no, + "key to find associated sectors and lines", + input_map_tagfinder, { {0, 0} } + }, + + { // [Nugget] + "input_map_teleport", + NULL, NULL, + {0}, {UL,UL}, input, ss_keys, wad_no, + "key to teleport to automap pointer", + input_map_teleport, { {0, 0} } + }, + + { // [Nugget] + "fancy_teleport", + (config_t *) &fancy_teleport, NULL, + {1}, {0,1}, number, ss_keys, wad_no, + "Use effects when teleporting to pointer (fog, sound and zoom)" + }, + { "input_map_grid", NULL, NULL, @@ -2291,6 +2377,82 @@ default_t defaults[] = { input_avj, { {0, 0} } }, + // [Nugget] /--------------------------------------------------------------- + + { + "input_infammo", + NULL, NULL, + {0}, {UL,UL}, input, ss_keys, wad_no, + "key to toggle infinite ammo", + input_infammo, { {0, 0} } + }, + + { + "input_fastweaps", + NULL, NULL, + {0}, {UL,UL}, input, ss_keys, wad_no, + "key to toggle fast weapons", + input_fastweaps, { {0, 0} } + }, + + { + "input_resurrect", + NULL, NULL, + {0}, {UL,UL}, input, ss_keys, wad_no, + "key to resurrect", + input_resurrect, { {0, 0} } + }, + + { + "input_fly", + NULL, NULL, + {0}, {UL,UL}, input, ss_keys, wad_no, + "key to toggle fly mode", + input_fly, { {0, 0} } + }, + + { + "input_summonr", + NULL, NULL, + {0}, {UL,UL}, input, ss_keys, wad_no, + "key to summon last summoned mobj", + input_summonr, { {0, 0} } + }, + + { + "input_linetarget", + NULL, NULL, + {0}, {UL,UL}, input, ss_keys, wad_no, + "key to toggle linetarget query mode", + input_linetarget, { {0, 0} } + }, + + { + "input_mdk", + NULL, NULL, + {0}, {UL,UL}, input, ss_keys, wad_no, + "key to perform MDK attack", + input_mdk, { {0, 0} } + }, + + { + "input_saitama", + NULL, NULL, + {0}, {UL,UL}, input, ss_keys, wad_no, + "key to toggle MDK Fist", + input_saitama, { {0, 0} } + }, + + { + "input_boomcan", + NULL, NULL, + {0}, {UL,UL}, input, ss_keys, wad_no, + "key to toggle explosive hitscan attacks", + input_boomcan, { {0, 0} } + }, + + // [Nugget] ---------------------------------------------------------------/ + { "input_chat_dest0", NULL, NULL, @@ -2560,96 +2722,6 @@ default_t defaults[] = { "1 to invert gamepad look axis" }, - // [Nugget] /--------------------------------------------------------------- - - { - "input_jump", - NULL, NULL, - {0}, {UL,UL}, input, ss_keys, wad_no, - "key to jump", - input_jump, { {input_type_key, KEY_RALT} } - }, - - { - "input_crouch", - NULL, NULL, - {0}, {UL,UL}, input, ss_keys, wad_no, - "key to crouch/duck", - input_crouch, { {input_type_key, 'c'} } - }, - - { - "input_crosshair", - NULL, NULL, - {0}, {UL,UL}, input, ss_keys, wad_no, - "key to toggle crosshair", - input_crosshair, { {0, 0} } - }, - - { - "input_zoom", - NULL, NULL, - {0}, {UL,UL}, input, ss_keys, wad_no, - "key to toggle zoom", - input_zoom, { {0, 0} } - }, - - { - "input_chasecam", - NULL, NULL, - {0}, {UL,UL}, input, ss_keys, wad_no, - "key to cycle through chasecam modes", - input_chasecam, { {0, 0} } - }, - - { - "zoom_fov", - (config_t *) &zoom_fov, NULL, - {MINFOV}, {MINFOV,MAXFOV}, number, ss_keys, wad_no, - "Field of View when zoom is enabled" - }, - - { - "input_map_mini", - NULL, NULL, - {0}, {UL,UL}, input, ss_keys, wad_no, - "key to activate minimap mode", - input_map_mini, { {0, 0} } - }, - - { - "input_map_blink", - NULL, NULL, - {0}, {UL,UL}, input, ss_keys, wad_no, - "key to make automap markers blink", - input_map_blink, { {input_type_key, 'b'} } - }, - - { - "input_map_tagfinder", - NULL, NULL, - {0}, {UL,UL}, input, ss_keys, wad_no, - "key to find associated sectors and lines", - input_map_tagfinder, { {0, 0} } - }, - - { - "input_map_teleport", - NULL, NULL, - {0}, {UL,UL}, input, ss_keys, wad_no, - "key to teleport to automap pointer", - input_map_teleport, { {0, 0} } - }, - - { - "fancy_teleport", - (config_t *) &fancy_teleport, NULL, - {1}, {0,1}, number, ss_keys, wad_no, - "Use effects when teleporting to pointer (fog, sound and zoom)" - }, - - // [Nugget] ---------------------------------------------------------------/ - { //jff 4/3/98 allow unlimited sensitivity "mouse_sensitivity", (config_t *) &mouseSensitivity_horiz, NULL,