Skip to content

Commit

Permalink
tr2/input: allow customising turbo cheat key
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- committed Nov 4, 2024
1 parent 344ae2a commit 25c67cc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions data/tr2/ship/cfg/TR2X_gameflow.json5
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@
"KEYMAP_RUN": "Run",
"KEYMAP_STEP_LEFT": "Step Left",
"KEYMAP_STEP_RIGHT": "Step Right",
"KEYMAP_TURBO_CHEAT": "Turbo Speed",
"KEYMAP_USE_FLARE": "Flare",
"KEYMAP_WALK": "Walk",
"MISC_OFF": "Off",
Expand Down
1 change: 1 addition & 0 deletions src/libtrx/include/libtrx/game/game_string.def
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,4 @@ GS_DEFINE(KEYMAP_FLY_CHEAT, "Fly Cheat")
GS_DEFINE(KEYMAP_ITEM_CHEAT, "Item Cheat")
GS_DEFINE(KEYMAP_LEVEL_SKIP_CHEAT, "Level Skip")
GS_DEFINE(KEYMAP_ENTER_CONSOLE, "Dev Console")
GS_DEFINE(KEYMAP_TURBO_CHEAT, "Turbo Speed")
1 change: 0 additions & 1 deletion src/tr1/game/game_string.def
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ GS_DEFINE(SOUND_SET_VOLUMES, "Set Volumes")
GS_DEFINE(CONTROL_RESET_DEFAULTS, "Reset All: Hold %s")
GS_DEFINE(CONTROL_UNBIND, "Unbind: Hold %s")
GS_DEFINE(KEYMAP_PAUSE, "Pause")
GS_DEFINE(KEYMAP_TURBO_CHEAT, "Turbo Speed")
GS_DEFINE(KEYMAP_CHANGE_TARGET, "Change Target")
GS_DEFINE(KEYMAP_TOGGLE_UI, "Toggle UI")
GS_DEFINE(KEYMAP_TOGGLE_PHOTO_MODE, "Toggle Photo Mode")
Expand Down
2 changes: 2 additions & 0 deletions src/tr2/game/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ void Input_Update(void)
g_Input.item_cheat = 0;
g_Input.fly_cheat = 0;
g_Input.level_skip_cheat = 0;
g_Input.turbo_cheat = 0;
}

g_InputDB = M_GetDebounced(g_Input);
Expand Down Expand Up @@ -169,6 +170,7 @@ const char *Input_GetRoleName(const INPUT_ROLE role)
case INPUT_ROLE_FLY_CHEAT: return GS(KEYMAP_FLY_CHEAT);
case INPUT_ROLE_ITEM_CHEAT: return GS(KEYMAP_ITEM_CHEAT);
case INPUT_ROLE_LEVEL_SKIP_CHEAT: return GS(KEYMAP_LEVEL_SKIP_CHEAT);
case INPUT_ROLE_TURBO_CHEAT: return GS(KEYMAP_TURBO_CHEAT);
case INPUT_ROLE_ENTER_CONSOLE: return GS(KEYMAP_ENTER_CONSOLE);
default: return "";
}
Expand Down
1 change: 1 addition & 0 deletions src/tr2/game/ui/controllers/controls.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ static const INPUT_ROLE m_RightRoles_CheatsOn[] = {
INPUT_ROLE_FLY_CHEAT,
INPUT_ROLE_ITEM_CHEAT,
INPUT_ROLE_LEVEL_SKIP_CHEAT,
INPUT_ROLE_TURBO_CHEAT,
(INPUT_ROLE)-1,
// clang-format on
};
Expand Down

0 comments on commit 25c67cc

Please sign in to comment.