port Lara_State_Extra_DinoKill

This commit is contained in:
Marcin Kurczewski 2023-10-06 09:48:27 +02:00
parent 093a06ed3c
commit c6ab116b68
No known key found for this signature in database
GPG Key ID: CC65E6FD28CAE42A
7 changed files with 26 additions and 10 deletions

View File

@ -69,10 +69,10 @@
</g>
<g transform="translate(0 116)">
<text x="0" y="7.50">Tomb2.exe progress according to the physical function order:</text>
<text class="todo" style="font-size: 12px; " x="747" y="9"><tspan text-anchor="end"><tspan class="decompiled">9.08% (109)</tspan> · <tspan class="known">88.50% (1062)</tspan> · <tspan class="todo">0.67% (8)</tspan> · <tspan class="unused">1.75% (21)</tspan></tspan></text>
<text class="todo" style="font-size: 12px; " x="747" y="9"><tspan text-anchor="end"><tspan class="decompiled">9.17% (110)</tspan> · <tspan class="known">88.42% (1061)</tspan> · <tspan class="todo">0.67% (8)</tspan> · <tspan class="unused">1.75% (21)</tspan></tspan></text>
<g transform="translate(0 20)">
<rect width="67.85" height="6" x="0" y="0" class="decompiled"/>
<rect width="661.10" height="6" x="67.85" y="0" class="known"/>
<rect width="68.48" height="6" x="0" y="0" class="decompiled"/>
<rect width="660.47" height="6" x="68.48" y="0" class="known"/>
<rect width="4.98" height="6" x="728.95" y="0" class="todo"/>
<rect width="13.07" height="6" x="733.93" y="0" class="unused"/>
</g>
@ -511,7 +511,7 @@
<rect width="12" height="12" x="465" y="120" class="decompiled"><title>void __cdecl Lara_State_Extra_SharkKill(struct ITEM_INFO *item, struct COLL_INFO *coll);</title></rect>
<rect width="12" height="12" x="480" y="120" class="decompiled"><title>void __cdecl Lara_State_Extra_Airlock(struct ITEM_INFO *item, struct COLL_INFO *coll);</title></rect>
<rect width="12" height="12" x="495" y="120" class="decompiled"><title>void __cdecl Lara_State_Extra_GongBong(struct ITEM_INFO *item, struct COLL_INFO *coll);</title></rect>
<rect width="12" height="12" x="510" y="120" class="known"><title>void __cdecl Lara_State_Extra_DinoKill(struct ITEM_INFO *item, struct COLL_INFO *coll);</title></rect>
<rect width="12" height="12" x="510" y="120" class="decompiled"><title>void __cdecl Lara_State_Extra_DinoKill(struct ITEM_INFO *item, struct COLL_INFO *coll);</title></rect>
<rect width="12" height="12" x="525" y="120" class="known"><title>void __cdecl Lara_State_Extra_PullDagger(struct ITEM_INFO *item, struct COLL_INFO *coll);</title></rect>
<rect width="12" height="12" x="540" y="120" class="known"><title>void __cdecl Lara_State_Extra_StartAnim(struct ITEM_INFO *item, struct COLL_INFO *coll);</title></rect>
<rect width="12" height="12" x="555" y="120" class="known"><title>void __cdecl Lara_State_Extra_StartHouse(struct ITEM_INFO *item, struct COLL_INFO *coll);</title></rect>
@ -1281,10 +1281,10 @@
</g>
<g transform="translate(0 531)">
<text x="0" y="7.50">Tomb2.exe progress according to the function sizes:</text>
<text class="todo" style="font-size: 12px; " x="747" y="9"><tspan text-anchor="end"><tspan class="decompiled">5.02%</tspan> · <tspan class="known">94.65%</tspan> · <tspan class="todo">0.02%</tspan> · <tspan class="unused">0.31%</tspan></tspan></text>
<text class="todo" style="font-size: 12px; " x="747" y="9"><tspan text-anchor="end"><tspan class="decompiled">5.04%</tspan> · <tspan class="known">94.63%</tspan> · <tspan class="todo">0.02%</tspan> · <tspan class="unused">0.31%</tspan></tspan></text>
<g transform="translate(0 20)">
<rect width="37.50" height="6" x="0" y="0" class="decompiled"/>
<rect width="707.03" height="6" x="37.50" y="0" class="known"/>
<rect width="37.68" height="6" x="0" y="0" class="decompiled"/>
<rect width="706.85" height="6" x="37.68" y="0" class="known"/>
<rect width="0.13" height="6" x="744.54" y="0" class="todo"/>
<rect width="2.33" height="6" x="744.67" y="0" class="unused"/>
</g>
@ -2059,7 +2059,7 @@
<rect width="5.29" height="5.06" x="709.05" y="237.46" class="known"><title>void __cdecl InitialiseLOTarray(void);</title></rect>
<rect width="5.29" height="5.06" x="717.34" y="237.46" class="known"><title>bool __cdecl WinVidGetDisplayModes(void);</title></rect>
<rect width="5.19" height="5.06" x="725.63" y="237.46" class="known"><title>void __cdecl InitialiseItemArray(int32_t numitems);</title></rect>
<rect width="5.09" height="5.06" x="733.82" y="237.46" class="known"><title>void __cdecl Lara_State_Extra_DinoKill(struct ITEM_INFO *item, struct COLL_INFO *coll);</title></rect>
<rect width="5.09" height="5.06" x="733.82" y="237.46" class="decompiled"><title>void __cdecl Lara_State_Extra_DinoKill(struct ITEM_INFO *item, struct COLL_INFO *coll);</title></rect>
<rect width="5.09" height="5.06" x="741.91" y="237.46" class="known"><title>int32_t __cdecl Lara_Fallen(struct ITEM_INFO *item, struct COLL_INFO *coll);</title></rect>
<rect width="5.18" height="4.97" x="624.75" y="245.52" class="known"><title>void __cdecl SmashItem(int16_t item_num, int32_t weapon_type);</title></rect>
<rect width="5.18" height="4.97" x="624.75" y="253.49" class="known"><title>void __cdecl S_SetupBelowWater(BOOL underwater);</title></rect>

Before

Width:  |  Height:  |  Size: 357 KiB

After

Width:  |  Height:  |  Size: 357 KiB

View File

@ -1525,7 +1525,7 @@ typedef enum LARA_GUN_STATE {
00428850 00000091 + void __cdecl Lara_State_Extra_SharkKill(struct ITEM_INFO *item, struct COLL_INFO *coll);
004288F0 00000013 + void __cdecl Lara_State_Extra_Airlock(struct ITEM_INFO *item, struct COLL_INFO *coll);
00428910 0000001D + void __cdecl Lara_State_Extra_GongBong(struct ITEM_INFO *item, struct COLL_INFO *coll);
00428930 00000051 - void __cdecl Lara_State_Extra_DinoKill(struct ITEM_INFO *item, struct COLL_INFO *coll);
00428930 00000051 + void __cdecl Lara_State_Extra_DinoKill(struct ITEM_INFO *item, struct COLL_INFO *coll);
00428990 000000BC - void __cdecl Lara_State_Extra_PullDagger(struct ITEM_INFO *item, struct COLL_INFO *coll);
00428A50 0000004D - void __cdecl Lara_State_Extra_StartAnim(struct ITEM_INFO *item, struct COLL_INFO *coll);
00428AA0 000000A5 - void __cdecl Lara_State_Extra_StartHouse(struct ITEM_INFO *item, struct COLL_INFO *coll);

View File

@ -731,3 +731,15 @@ void __cdecl Lara_State_Extra_GongBong(
g_Camera.target_elevation = CAM_GONG_BONG_ELEVATION;
g_Camera.target_distance = CAM_GONG_BONG_DISTANCE;
}
void __cdecl Lara_State_Extra_DinoKill(
struct ITEM_INFO *item, struct COLL_INFO *coll)
{
g_Camera.flags = CF_FOLLOW_CENTRE;
g_Camera.target_angle = CAM_DINO_KILL_ANGLE;
g_Camera.target_elevation = CAM_DINO_KILL_ELEVATION;
g_Lara.hit_direction = -1;
if (item->frame_num < g_Anims[item->anim_num].frame_end - 30) {
g_Lara.death_count = 1;
}
}

View File

@ -76,3 +76,5 @@ void __cdecl Lara_State_Extra_Airlock(
struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl Lara_State_Extra_GongBong(
struct ITEM_INFO *item, struct COLL_INFO *coll);
void __cdecl Lara_State_Extra_DinoKill(
struct ITEM_INFO *item, struct COLL_INFO *coll);

View File

@ -72,3 +72,5 @@
#define CAM_GONG_BONG_ANGLE (-25 * PHD_DEGREE) // = -4550
#define CAM_GONG_BONG_ELEVATION (-20 * PHD_DEGREE) // = -3640
#define CAM_GONG_BONG_DISTANCE (3 * WALL_L) // = 3072
#define CAM_DINO_KILL_ANGLE (170 * PHD_DEGREE) // = 30940
#define CAM_DINO_KILL_ELEVATION (-25 * PHD_DEGREE) // = -4550

View File

@ -373,7 +373,6 @@
#define Lara_LookUpDown ((void __cdecl (*)(void))0x00427720)
#define Lara_LookLeftRight ((void __cdecl (*)(void))0x00427790)
#define Lara_ResetLook ((void __cdecl (*)(void))0x00427810)
#define Lara_State_Extra_DinoKill ((void __cdecl (*)(struct ITEM_INFO *item, struct COLL_INFO *coll))0x00428930)
#define Lara_State_Extra_PullDagger ((void __cdecl (*)(struct ITEM_INFO *item, struct COLL_INFO *coll))0x00428990)
#define Lara_State_Extra_StartAnim ((void __cdecl (*)(struct ITEM_INFO *item, struct COLL_INFO *coll))0x00428A50)
#define Lara_State_Extra_StartHouse ((void __cdecl (*)(struct ITEM_INFO *item, struct COLL_INFO *coll))0x00428AA0)

View File

@ -126,6 +126,7 @@ static void Inject_Lara_State(void)
INJECT(1, 0x00428850, Lara_State_Extra_SharkKill);
INJECT(1, 0x004288F0, Lara_State_Extra_Airlock);
INJECT(1, 0x00428910, Lara_State_Extra_GongBong);
INJECT(1, 0x00428930, Lara_State_Extra_DinoKill);
}
static void Inject_S_Audio_Sample(void)