From 09c7e3e03022bb8d3c74b5d8c31631a5bd103788 Mon Sep 17 00:00:00 2001 From: lahm86 <33758420+lahm86@users.noreply.github.com> Date: Mon, 4 Nov 2024 14:45:46 +0000 Subject: [PATCH] tr1/lara: add responsive swim cancel option 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 #1004. --- .../ship/data/injections/lara_animations.bin | Bin 273702 -> 275044 bytes docs/tr1/CHANGELOG.md | 1 + src/tr1/config.h | 1 + src/tr1/config_map.def | 1 + src/tr1/game/lara/state.c | 3 ++- .../TR1X_ConfigTool/Resources/Lang/en.json | 4 ++++ .../TR1X_ConfigTool/Resources/Lang/es.json | 4 ++++ .../TR1X_ConfigTool/Resources/Lang/fr.json | 4 ++++ .../TR1X_ConfigTool/Resources/Lang/it.json | 4 ++++ .../Resources/specification.json | 5 +++++ 10 files changed, 26 insertions(+), 1 deletion(-) diff --git a/data/tr1/ship/data/injections/lara_animations.bin b/data/tr1/ship/data/injections/lara_animations.bin index 4b70007e4923c370ba2b9f809572510071222f9f..3994e393e968bda8ec07481db86f9591234e52dc 100644 GIT binary patch delta 2287 zcmY+G3v5$W7{|YJ+uQZIc7-7%gq4?2M4cPkn6fcU4AvoALJUy|%m{{NWG?Zwh}hvI ztT@;d<`IQi9s-qt#Q}TDn_N=YP+d zZ9V6@a>Z3OCb10wF5|b{fP$Zrc?=qMXBtd_DWJl8FcBC8;c?WJ;6QyJ5>P8-eU+@Q z1_djXU_q?{8|nwL@}aD(0V`J4%1X7Yd?YIz24VeU7=gMDl2AW^bktArP6gJ362OZZ zY>2^U_+=2nb{K2~6Y3_2L){E!)Ggpd{Ty7VTOkp38w^3+4#QEy@F40JFb;JGj7O~n zFX~R1fVvAFLj4k+K#j;2cf&9oe}&@!gF1P!NA7s9wAd#t>gDbmjybBou&eWKdCDpuh>K zZE|Pra{R5_Yo}a%N+xj{M&sh|AQSbBtbZ@{2UG>R}!`bt)enGD4mh~R2D$pzM zyogDgpf1Hc!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zKP45&(^82%BioT@G1C*P^UsOoP@TtEhRV6K`Y<7QdBRJWEjA&kqt*J~m4Jkfb{jc5tZ{VOm?R{1 zbX)(25;%HnNFriLOcIhh`mFy`2}npH$AC2?CJ9N2|4XL?BqR|rBqj+-i9g46BqWg| zZ;fNn#v~yr@qgppkPS%a7`BmP#2ONlgrvm(qf-JBl86|`sEtWNQpcF}Q!s7=#|s;h zh#1F&jY&dM;{Vlm0SQS&42d0+HX$kT|7jVJkVM3gm?WTJ5`W=FQ#bGB>*llNd;SB4 CC|ugoal_anim_state = LS_GLIDE; + item->goal_anim_state = + g_Config.enable_tr2_swim_cancel ? LS_RESPONSIVE : LS_GLIDE; } } diff --git a/tools/tr1/config/TR1X_ConfigTool/Resources/Lang/en.json b/tools/tr1/config/TR1X_ConfigTool/Resources/Lang/en.json index e9c526be6..bb91663b5 100644 --- a/tools/tr1/config/TR1X_ConfigTool/Resources/Lang/en.json +++ b/tools/tr1/config/TR1X_ConfigTool/Resources/Lang/en.json @@ -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." diff --git a/tools/tr1/config/TR1X_ConfigTool/Resources/Lang/es.json b/tools/tr1/config/TR1X_ConfigTool/Resources/Lang/es.json index 6dac25f8b..c6e3e08fc 100644 --- a/tools/tr1/config/TR1X_ConfigTool/Resources/Lang/es.json +++ b/tools/tr1/config/TR1X_ConfigTool/Resources/Lang/es.json @@ -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." diff --git a/tools/tr1/config/TR1X_ConfigTool/Resources/Lang/fr.json b/tools/tr1/config/TR1X_ConfigTool/Resources/Lang/fr.json index 0fdadcaaf..d67f8948b 100644 --- a/tools/tr1/config/TR1X_ConfigTool/Resources/Lang/fr.json +++ b/tools/tr1/config/TR1X_ConfigTool/Resources/Lang/fr.json @@ -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." diff --git a/tools/tr1/config/TR1X_ConfigTool/Resources/Lang/it.json b/tools/tr1/config/TR1X_ConfigTool/Resources/Lang/it.json index d224b7b09..7eea280ee 100644 --- a/tools/tr1/config/TR1X_ConfigTool/Resources/Lang/it.json +++ b/tools/tr1/config/TR1X_ConfigTool/Resources/Lang/it.json @@ -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." diff --git a/tools/tr1/config/TR1X_ConfigTool/Resources/specification.json b/tools/tr1/config/TR1X_ConfigTool/Resources/specification.json index e01205f10..9bf1b6363 100644 --- a/tools/tr1/config/TR1X_ConfigTool/Resources/specification.json +++ b/tools/tr1/config/TR1X_ConfigTool/Resources/specification.json @@ -104,6 +104,11 @@ "DataType": "Bool", "DefaultValue": false }, + { + "Field": "enable_tr2_swim_cancel", + "DataType": "Bool", + "DefaultValue": false + }, { "Field": "enable_wading", "DataType": "Bool",