Skip to content

Commit

Permalink
tr1/lara: add responsive swim cancel option
Browse files Browse the repository at this point in the history
This injects additional state changes to the swimming animation to
allow Lara to enter the glide state on more frame ranges, similar to
TR2+.

Resolves LostArtefacts#1004.
  • Loading branch information
lahm86 committed Nov 4, 2024
1 parent 0953a0b commit 09c7e3e
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 1 deletion.
Binary file modified data/tr1/ship/data/injections/lara_animations.bin
Binary file not shown.
1 change: 1 addition & 0 deletions docs/tr1/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## [Unreleased](https://github.com/LostArtefacts/TRX/compare/tr1-4.5.1...develop) - ××××-××-××
- added support for wading, similar to TR2+ (#1537)
- added the ability to pause during cutscenes (#1673)
- added an option to enable responsive swim cancellation, similar to TR2+ (#1004)
- changed OpenGL backend to use version 3.3, with fallback to 2.1 if initialization fails (#1738)
- changed text backend to accept named sequences. Currently supported sequences (limited by the sprites available in OG):
- `\{umlaut}`
Expand Down
1 change: 1 addition & 0 deletions src/tr1/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ typedef struct {
bool enable_swing_cancel;
bool enable_tr2_jumping;
bool enable_tr2_swimming;
bool enable_tr2_swim_cancel;
bool enable_wading;
MUSIC_LOAD_CONDITION music_load_condition;
bool load_music_triggers;
Expand Down
1 change: 1 addition & 0 deletions src/tr1/config_map.def
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ CFG_BOOL(g_Config, fix_texture_issues, true)
CFG_BOOL(g_Config, enable_swing_cancel, true)
CFG_BOOL(g_Config, enable_tr2_jumping, false)
CFG_BOOL(g_Config, enable_tr2_swimming, false)
CFG_BOOL(g_Config, enable_tr2_swim_cancel, false)
CFG_BOOL(g_Config, enable_wading, true)
CFG_ENUM(g_Config, music_load_condition, MUSIC_LOAD_NON_AMBIENT, MUSIC_LOAD_CONDITION)
CFG_BOOL(g_Config, load_music_triggers, true)
Expand Down
3 changes: 2 additions & 1 deletion src/tr1/game/lara/state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,8 @@ void Lara_State_Swim(ITEM *item, COLL_INFO *coll)
}

if (!g_Input.jump) {
item->goal_anim_state = LS_GLIDE;
item->goal_anim_state =
g_Config.enable_tr2_swim_cancel ? LS_RESPONSIVE : LS_GLIDE;
}
}

Expand Down
4 changes: 4 additions & 0 deletions tools/tr1/config/TR1X_ConfigTool/Resources/Lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@
"Title": "Smooth swimming",
"Description": "Gives Lara's underwater turn rate an acceleration curve for smoother movement, similar to TR2+."
},
"enable_tr2_swim_cancel": {
"Title": "Responsive swim cancel",
"Description": "Allows Lara to stop more responsively underwater when the swim key is released, similar to TR2+."
},
"enable_wading": {
"Title": "Wading",
"Description": "Allows Lara to wade through shallow water, similar to TR2+, rather than becoming stuck on the water surface."
Expand Down
4 changes: 4 additions & 0 deletions tools/tr1/config/TR1X_ConfigTool/Resources/Lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@
"Title": "Nadar suave",
"Description": "Le da al giro bajo el agua de Lara una curva de aceleración para un movimiento más suave, similar a TR2+."
},
"enable_tr2_swim_cancel": {
"Title": "Cancelación de natación responsiva",
"Description": "Le permite a Lara detenerse con mayor capacidad de respuesta bajo el agua cuando se suelta la tecla de natación, similar a TR2+."
},
"enable_wading": {
"Title": "Vadeando",
"Description": "Le permite a Lara caminar en aguas poco profundas, similar a TR2+, en lugar de quedarse atrapada en la superficie del agua."
Expand Down
4 changes: 4 additions & 0 deletions tools/tr1/config/TR1X_ConfigTool/Resources/Lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@
"Title": "Natation fluide",
"Description": "Donne au taux de rotation sous l'eau de Lara une courbe d'accélération pour un mouvement plus fluide, similaire à TR2+."
},
"enable_tr2_swim_cancel": {
"Title": "Annulation de natation réactive",
"Description": "Permet à Lara de s'arrêter de manière plus réactive sous l'eau lorsque la touche de natation est relâchée, similaire à TR2+."
},
"enable_wading": {
"Title": "Patauger",
"Description": "Permet à Lara de patauger dans les eaux peu profondes, comme avec TR2+, plutôt que de rester coincée à la surface de l'eau."
Expand Down
4 changes: 4 additions & 0 deletions tools/tr1/config/TR1X_ConfigTool/Resources/Lang/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@
"Title": "Nuoto regolare",
"Description": "Fornisce alla velocità di virata subacquea di Lara una curva di accelerazione per movimenti più fluidi, simile a TR2+."
},
"enable_tr2_swim_cancel": {
"Title": "Annullamento del nuoto reattivo",
"Description": "Permette a Lara di fermarsi più reattivamente sott'acqua quando viene rilasciato il tasto di nuoto, simile a TR2+."
},
"enable_wading": {
"Title": "Guadare",
"Description": "Permette a Lara di guadare acque poco profonde, simile a TR2+, invece di rimanere bloccata sulla superficie dell'acqua."
Expand Down
5 changes: 5 additions & 0 deletions tools/tr1/config/TR1X_ConfigTool/Resources/specification.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@
"DataType": "Bool",
"DefaultValue": false
},
{
"Field": "enable_tr2_swim_cancel",
"DataType": "Bool",
"DefaultValue": false
},
{
"Field": "enable_wading",
"DataType": "Bool",
Expand Down

0 comments on commit 09c7e3e

Please sign in to comment.