From 7346b7f351ca708c8ede7877db14e6fe286a5559 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Fri, 6 Oct 2023 19:15:17 +0200 Subject: [PATCH] port Lara_Col_TurnLeft --- docs/progress.svg | 14 +++++++------- docs/progress.txt | 2 +- src/game/lara/lara_col.c | 5 +++++ src/game/lara/lara_col.h | 1 + src/global/funcs.h | 1 - src/inject_exec.c | 1 + 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/docs/progress.svg b/docs/progress.svg index 0b2fe45..6d76bea 100644 --- a/docs/progress.svg +++ b/docs/progress.svg @@ -69,10 +69,10 @@ Tomb2.exe progress according to the physical function order: -10% (120) · 87.58% (1051) · 0.67% (8) · 1.75% (21) +10.08% (121) · 87.50% (1050) · 0.67% (8) · 1.75% (21) - - + + @@ -524,7 +524,7 @@ void __cdecl Lara_Col_ForwardJump(struct ITEM_INFO *item, struct COLL_INFO *coll); void __cdecl Lara_Col_FastBack(struct ITEM_INFO *item, struct COLL_INFO *coll); void __cdecl Lara_Col_TurnRight(struct ITEM_INFO *item, struct COLL_INFO *coll); -void __cdecl Lara_Col_TurnLeft(struct ITEM_INFO *item, struct COLL_INFO *coll); +void __cdecl Lara_Col_TurnLeft(struct ITEM_INFO *item, struct COLL_INFO *coll); void __cdecl Lara_Col_Death(struct ITEM_INFO *item, struct COLL_INFO *coll); void __cdecl Lara_Col_FastFall(struct ITEM_INFO *item, struct COLL_INFO *coll); void __cdecl Lara_Col_Hang(struct ITEM_INFO *item, struct COLL_INFO *coll); @@ -1283,8 +1283,8 @@ Tomb2.exe progress according to the function sizes: 5.65% · 94.02% · 0.02% · 0.31% - - + + @@ -2419,7 +2419,7 @@ void __cdecl RemoveAllReqItems(struct REQUEST_INFO *req); void __cdecl Lara_State_UpJump(struct ITEM_INFO *item, struct COLL_INFO *coll); void __cdecl Lara_State_Extra_Airlock(struct ITEM_INFO *item, struct COLL_INFO *coll); -void __cdecl Lara_Col_TurnLeft(struct ITEM_INFO *item, struct COLL_INFO *coll); +void __cdecl Lara_Col_TurnLeft(struct ITEM_INFO *item, struct COLL_INFO *coll); void __cdecl Lara_Col_Compress(struct ITEM_INFO *item, struct COLL_INFO *coll); void __cdecl Lara_Col_StepLeft(struct ITEM_INFO *item, struct COLL_INFO *coll); void __cdecl Lara_Col_Roll(struct ITEM_INFO *item, struct COLL_INFO *coll); diff --git a/docs/progress.txt b/docs/progress.txt index 94992a3..3c3d745 100644 --- a/docs/progress.txt +++ b/docs/progress.txt @@ -1576,7 +1576,7 @@ typedef enum LARA_GUN_STATE { 004290D0 000000D7 + void __cdecl Lara_Col_ForwardJump(struct ITEM_INFO *item, struct COLL_INFO *coll); 004291B0 000000B3 + void __cdecl Lara_Col_FastBack(struct ITEM_INFO *item, struct COLL_INFO *coll); 00429270 00000095 + void __cdecl Lara_Col_TurnRight(struct ITEM_INFO *item, struct COLL_INFO *coll); -00429310 00000013 - void __cdecl Lara_Col_TurnLeft(struct ITEM_INFO *item, struct COLL_INFO *coll); +00429310 00000013 + void __cdecl Lara_Col_TurnLeft(struct ITEM_INFO *item, struct COLL_INFO *coll); 00429330 00000068 - void __cdecl Lara_Col_Death(struct ITEM_INFO *item, struct COLL_INFO *coll); 004293A0 00000099 - void __cdecl Lara_Col_FastFall(struct ITEM_INFO *item, struct COLL_INFO *coll); 00429440 00000127 - void __cdecl Lara_Col_Hang(struct ITEM_INFO *item, struct COLL_INFO *coll); diff --git a/src/game/lara/lara_col.c b/src/game/lara/lara_col.c index 291bffa..816cab3 100644 --- a/src/game/lara/lara_col.c +++ b/src/game/lara/lara_col.c @@ -250,3 +250,8 @@ void __cdecl Lara_Col_TurnRight(struct ITEM_INFO *item, struct COLL_INFO *coll) item->fall_speed = 0; } } + +void __cdecl Lara_Col_TurnLeft(struct ITEM_INFO *item, struct COLL_INFO *coll) +{ + Lara_Col_TurnRight(item, coll); +} diff --git a/src/game/lara/lara_col.h b/src/game/lara/lara_col.h index 13e88e9..95e0c5c 100644 --- a/src/game/lara/lara_col.h +++ b/src/game/lara/lara_col.h @@ -9,3 +9,4 @@ void __cdecl Lara_Col_ForwardJump( struct ITEM_INFO *item, struct COLL_INFO *coll); void __cdecl Lara_Col_FastBack(struct ITEM_INFO *item, struct COLL_INFO *coll); void __cdecl Lara_Col_TurnRight(struct ITEM_INFO *item, struct COLL_INFO *coll); +void __cdecl Lara_Col_TurnLeft(struct ITEM_INFO *item, struct COLL_INFO *coll); diff --git a/src/global/funcs.h b/src/global/funcs.h index 235d3dd..298cceb 100644 --- a/src/global/funcs.h +++ b/src/global/funcs.h @@ -375,7 +375,6 @@ #define Lara_ResetLook ((void __cdecl (*)(void))0x00427810) #define Lara_Fallen ((int32_t __cdecl (*)(struct ITEM_INFO *item, struct COLL_INFO *coll))0x00428C00) #define Lara_CollideStop ((void __cdecl (*)(struct ITEM_INFO *item, struct COLL_INFO *coll))0x00428C60) -#define Lara_Col_TurnLeft ((void __cdecl (*)(struct ITEM_INFO *item, struct COLL_INFO *coll))0x00429310) #define Lara_Col_Death ((void __cdecl (*)(struct ITEM_INFO *item, struct COLL_INFO *coll))0x00429330) #define Lara_Col_FastFall ((void __cdecl (*)(struct ITEM_INFO *item, struct COLL_INFO *coll))0x004293A0) #define Lara_Col_Hang ((void __cdecl (*)(struct ITEM_INFO *item, struct COLL_INFO *coll))0x00429440) diff --git a/src/inject_exec.c b/src/inject_exec.c index 1c247ef..e53df96 100644 --- a/src/inject_exec.c +++ b/src/inject_exec.c @@ -143,6 +143,7 @@ static void Inject_Lara_Col(void) INJECT(1, 0x004290D0, Lara_Col_ForwardJump); INJECT(1, 0x004291B0, Lara_Col_FastBack); INJECT(1, 0x00429270, Lara_Col_TurnRight); + INJECT(1, 0x00429310, Lara_Col_TurnLeft); } static void Inject_S_Audio_Sample(void)