port Inv_RingActive

This commit is contained in:
Marcin Kurczewski 2024-09-06 00:24:34 +02:00
parent 3304a66b18
commit 7719e93a92
No known key found for this signature in database
GPG Key ID: CC65E6FD28CAE42A
6 changed files with 20 additions and 11 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">61% (743)</tspan> · <tspan class="known">36.54% (445)</tspan> · <tspan class="todo">0% (0)</tspan> · <tspan class="unused">2.46% (30)</tspan></tspan></text>
<text class="todo" style="font-size: 12px; " x="747" y="9"><tspan text-anchor="end"><tspan class="decompiled">61.08% (744)</tspan> · <tspan class="known">36.45% (444)</tspan> · <tspan class="todo">0% (0)</tspan> · <tspan class="unused">2.46% (30)</tspan></tspan></text>
<g transform="translate(0 20)">
<rect width="455.68" height="6" x="0" y="0" class="decompiled"/>
<rect width="272.92" height="6" x="455.68" y="0" class="known"/>
<rect width="456.30" height="6" x="0" y="0" class="decompiled"/>
<rect width="272.31" height="6" x="456.30" y="0" class="known"/>
<rect width="18.40" height="6" x="728.60" y="0" class="unused"/>
</g>
<g transform="translate(0 31)">
@ -414,7 +414,7 @@
<rect width="12" height="12" x="525" y="90" class="decompiled"><title>void __cdecl Inv_RingIsOpen(RING_INFO *ring);</title></rect>
<rect width="12" height="12" x="540" y="90" class="decompiled"><title>void __cdecl Inv_RingIsNotOpen(RING_INFO *ring);</title></rect>
<rect width="12" height="12" x="555" y="90" class="decompiled"><title>void __cdecl Inv_RingNotActive(INVENTORY_ITEM *inv_item);</title></rect>
<rect width="12" height="12" x="570" y="90" class="known"><title>void __cdecl RingActive(void);</title></rect>
<rect width="12" height="12" x="570" y="90" class="decompiled"><title>void __cdecl Inv_RingActive(void);</title></rect>
<rect width="12" height="12" x="585" y="90" class="decompiled"><title>int32_t __cdecl Inv_AddItem(GAME_OBJECT_ID object_num);</title></rect>
<rect width="12" height="12" x="600" y="90" class="decompiled"><title>void __cdecl Inv_InsertItem(INVENTORY_ITEM *inv_item);</title></rect>
<rect width="12" height="12" x="615" y="90" class="decompiled"><title>int32_t __cdecl Inv_RequestItem(GAME_OBJECT_ID object_num);</title></rect>
@ -1298,10 +1298,10 @@
</g>
<g transform="translate(0 546)">
<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">64.86%</tspan> · <tspan class="known">34.82%</tspan> · <tspan class="todo">0%</tspan> · <tspan class="unused">0.33%</tspan></tspan></text>
<text class="todo" style="font-size: 12px; " x="747" y="9"><tspan text-anchor="end"><tspan class="decompiled">64.87%</tspan> · <tspan class="known">34.80%</tspan> · <tspan class="todo">0%</tspan> · <tspan class="unused">0.33%</tspan></tspan></text>
<g transform="translate(0 20)">
<rect width="484.49" height="6" x="0" y="0" class="decompiled"/>
<rect width="260.07" height="6" x="484.49" y="0" class="known"/>
<rect width="484.60" height="6" x="0" y="0" class="decompiled"/>
<rect width="259.96" height="6" x="484.60" y="0" class="known"/>
<rect width="2.44" height="6" x="744.56" y="0" class="unused"/>
</g>
<g transform="translate(0 31)">
@ -2269,7 +2269,7 @@
<rect width="3.73" height="3.29" x="743.27" y="296.78" class="decompiled"><title>void __cdecl DDrawRelease(void);</title></rect>
<rect width="3.62" height="3.39" x="668.88" y="303.07" class="decompiled"><title>void __cdecl Matrix_PushUnit(void);</title></rect>
<rect width="3.62" height="3.26" x="668.88" y="309.46" class="decompiled"><title>const int16_t *__cdecl Output_CalcSkyboxLight(const int16_t *obj_ptr);</title></rect>
<rect width="3.62" height="3.26" x="668.88" y="315.73" class="known"><title>void __cdecl RingActive(void);</title></rect>
<rect width="3.62" height="3.26" x="668.88" y="315.73" class="decompiled"><title>void __cdecl Inv_RingActive(void);</title></rect>
<rect width="3.62" height="3.26" x="668.88" y="321.99" class="decompiled"><title>void __cdecl Lara_GetCollisionInfo(ITEM_INFO *item, COLL_INFO *coll);</title></rect>
<rect width="3.62" height="3.26" x="668.88" y="328.26" class="decompiled"><title>void __cdecl Lara_Col_SurfSwim(ITEM_INFO *item, COLL_INFO *coll);</title></rect>
<rect width="3.62" height="3.26" x="668.88" y="334.52" class="known"><title>void __cdecl OpenThatDoor(DOORPOS_DATA *d);</title></rect>

Before

Width:  |  Height:  |  Size: 364 KiB

After

Width:  |  Height:  |  Size: 364 KiB

View File

@ -3212,7 +3212,7 @@ typedef enum {
0x00423C40 0x0167 + void __cdecl Inv_RingIsOpen(RING_INFO *ring);
0x00423DB0 0x0081 + void __cdecl Inv_RingIsNotOpen(RING_INFO *ring);
0x00423E40 0x0369 + void __cdecl Inv_RingNotActive(INVENTORY_ITEM *inv_item);
0x004242B0 0x0032 -R void __cdecl RingActive(void);
0x004242B0 0x0032 + void __cdecl Inv_RingActive(void);
0x004242F0 0x06BE + int32_t __cdecl Inv_AddItem(GAME_OBJECT_ID object_num);
0x00424B00 0x0129 + void __cdecl Inv_InsertItem(INVENTORY_ITEM *inv_item);
0x00424C30 0x0077 + int32_t __cdecl Inv_RequestItem(GAME_OBJECT_ID object_num);

View File

@ -340,7 +340,7 @@ int32_t __cdecl Inv_Display(int32_t inventory_mode)
|| imo.status == RNG_OPTION2MAIN
|| imo.status == RNG_EXITING_INVENTORY || imo.status == RNG_DONE
|| ring.rotating) {
RingActive();
Inv_RingActive();
}
Matrix_Push();
@ -1198,3 +1198,11 @@ void __cdecl Inv_RingNotActive(const INVENTORY_ITEM *const inv_item)
break;
}
}
void __cdecl Inv_RingActive(void)
{
Text_Remove(g_Inv_ItemText[0]);
g_Inv_ItemText[0] = NULL;
Text_Remove(g_Inv_ItemText[1]);
g_Inv_ItemText[1] = NULL;
}

View File

@ -13,3 +13,4 @@ void __cdecl Inv_DoInventoryBackground(void);
void __cdecl Inv_RingIsOpen(RING_INFO *ring);
void __cdecl Inv_RingIsNotOpen(RING_INFO *ring);
void __cdecl Inv_RingNotActive(const INVENTORY_ITEM *inv_item);
void __cdecl Inv_RingActive(void);

View File

@ -94,7 +94,6 @@
#define DrawHair ((void __cdecl (*)(void))0x00421920)
#define GetDebouncedInput ((int32_t __cdecl (*)(int32_t input))0x004239C0)
#define InitColours ((void __cdecl (*)(void))0x00423B30)
#define RingActive ((void __cdecl (*)(void))0x004242B0)
#define RemoveInventoryText ((void __cdecl (*)(void))0x00424FD0)
#define HarpoonBolt_Control ((void __cdecl (*)(int16_t item_num))0x0042C0F0)
#define Rocket_Control ((void __cdecl (*)(int16_t item_num))0x0042C530)

View File

@ -626,6 +626,7 @@ static void Inject_Inventory(const bool enable)
INJECT(enable, 0x00423C40, Inv_RingIsOpen);
INJECT(enable, 0x00423DB0, Inv_RingIsNotOpen);
INJECT(enable, 0x00423E40, Inv_RingNotActive);
INJECT(enable, 0x004242B0, Inv_RingActive);
INJECT(enable, 0x004242F0, Inv_AddItem);
INJECT(enable, 0x00424B00, Inv_InsertItem);
INJECT(enable, 0x00424C30, Inv_RequestItem);