tr2/config: make developer console optional

This adds a config setting similar to TR1X to allow players to disable
activating the console. Other game-driven console logging will
continue to display regardless.

Part of #2063.
This commit is contained in:
lahm86 2024-12-17 15:54:04 +00:00
parent 83e9c3f5cd
commit ff95935e9a
6 changed files with 14 additions and 1 deletions

View file

@ -1,5 +1,6 @@
## [Unreleased](https://github.com/LostArtefacts/TRX/compare/tr2-0.7.1...develop) - ××××-××-××
- added an option to use PS1 contrast levels, available under F8 (#1646)
- added an option to allow disabling the developer console (#2063)
- fixed Lara prioritising throwing a spent flare while mid-air, so to avoid missing ledge grabs (#1989)
## [0.7.1](https://github.com/LostArtefacts/TRX/compare/tr2-0.7...tr2-0.7.1) - 2024-12-17

View file

@ -28,6 +28,7 @@ typedef struct {
bool fix_floor_data_issues;
bool fix_flare_throw_priority;
bool enable_cheats;
bool enable_console;
bool enable_auto_item_selection;
int32_t turbo_speed;
} gameplay;

View file

@ -3,6 +3,7 @@ CFG_BOOL(g_Config, gameplay.fix_item_duplication_glitch, false)
CFG_BOOL(g_Config, gameplay.fix_floor_data_issues, true)
CFG_BOOL(g_Config, gameplay.fix_flare_throw_priority, true)
CFG_BOOL(g_Config, gameplay.enable_cheats, false)
CFG_BOOL(g_Config, gameplay.enable_console, true)
CFG_BOOL(g_Config, gameplay.enable_auto_item_selection, true)
CFG_INT32(g_Config, gameplay.turbo_speed, 0)
CFG_BOOL(g_Config, visuals.enable_3d_pickups, true)

View file

@ -193,7 +193,8 @@ static void M_HandleKeyDown(const SDL_Event *const event)
// but by the time Input_Update gets ran, we may already have lost
// some keypresses if the player types really fast, so we need to
// react sooner.
if (!FMV_IsPlaying() && !Console_IsOpened()
if (!FMV_IsPlaying() && g_Config.gameplay.enable_console
&& !Console_IsOpened()
&& Input_IsPressed(
INPUT_BACKEND_KEYBOARD, g_Config.input.keyboard_layout,
INPUT_ROLE_ENTER_CONSOLE)) {

View file

@ -26,6 +26,10 @@
"Title": "Cheats",
"Description": "Enables various cheats:\n- L: immediately end the level.\n- I: give Lara all weapons; a boost of ammo and medipacks; and all plot items for the current level.\n- O: enable DOZY cheat (swimming midair).\n - WALK key: exit DOZY.\n - GUN key: open the closest door (doesn't work in certain places)."
},
"enable_console": {
"Title": "Console",
"Description": "Enables the developer console."
},
"fix_m16_accuracy": {
"Title": "Fix M16 accuracy",
"Description": "Fixes the accuracy of the M16 while Lara is running."

View file

@ -57,6 +57,11 @@
"Field": "enable_cheats",
"DataType": "Bool",
"DefaultValue": false
},
{
"Field": "enable_console",
"DataType": "Bool",
"DefaultValue": true
}
]
},