port Inv_RingIsNotOpen

This commit is contained in:
Marcin Kurczewski 2024-09-06 00:02:02 +02:00
parent e1a33df3e4
commit 125af1f223
No known key found for this signature in database
GPG Key ID: CC65E6FD28CAE42A
6 changed files with 28 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">60.84% (741)</tspan> · <tspan class="known">36.70% (447)</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">60.92% (742)</tspan> · <tspan class="known">36.62% (446)</tspan> · <tspan class="todo">0% (0)</tspan> · <tspan class="unused">2.46% (30)</tspan></tspan></text>
<g transform="translate(0 20)">
<rect width="454.46" height="6" x="0" y="0" class="decompiled"/>
<rect width="274.15" height="6" x="454.46" y="0" class="known"/>
<rect width="455.07" height="6" x="0" y="0" class="decompiled"/>
<rect width="273.53" height="6" x="455.07" y="0" class="known"/>
<rect width="18.40" height="6" x="728.60" y="0" class="unused"/>
</g>
<g transform="translate(0 31)">
@ -412,7 +412,7 @@
<rect width="12" height="12" x="495" y="90" class="decompiled"><title>void __cdecl Inv_DoInventoryBackground(void);</title></rect>
<rect width="12" height="12" x="510" y="90" class="known"><title>void __cdecl InitColours(void);</title></rect>
<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="known"><title>void __cdecl RingIsNotOpen(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="known"><title>void __cdecl 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="585" y="90" class="decompiled"><title>int32_t __cdecl Inv_AddItem(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.56%</tspan> · <tspan class="known">35.11%</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.60%</tspan> · <tspan class="known">35.07%</tspan> · <tspan class="todo">0%</tspan> · <tspan class="unused">0.33%</tspan></tspan></text>
<g transform="translate(0 20)">
<rect width="482.30" height="6" x="0" y="0" class="decompiled"/>
<rect width="262.26" height="6" x="482.30" y="0" class="known"/>
<rect width="482.58" height="6" x="0" y="0" class="decompiled"/>
<rect width="261.98" height="6" x="482.58" y="0" class="known"/>
<rect width="2.44" height="6" x="744.56" y="0" class="unused"/>
</g>
<g transform="translate(0 31)">
@ -1926,7 +1926,7 @@
<rect width="7.59" height="7.19" x="697.28" y="196.57" class="decompiled"><title>void __cdecl Requester_Init(REQUEST_INFO *req);</title></rect>
<rect width="7.59" height="7.19" x="707.87" y="196.57" class="decompiled"><title>void __cdecl HWR_EnableZBuffer(bool z_write_enable, bool z_enable);</title></rect>
<rect width="7.51" height="7.19" x="718.46" y="196.57" class="decompiled"><title>int32_t __cdecl Inv_AnimateInventoryItem(INVENTORY_ITEM *inv_item);</title></rect>
<rect width="7.51" height="7.19" x="728.98" y="196.57" class="known"><title>void __cdecl RingIsNotOpen(RING_INFO *ring);</title></rect>
<rect width="7.51" height="7.19" x="728.98" y="196.57" class="decompiled"><title>void __cdecl Inv_RingIsNotOpen(RING_INFO *ring);</title></rect>
<rect width="7.51" height="7.19" x="739.49" y="196.57" class="decompiled"><title>int32_t __cdecl AddAssaultTime(uint32_t time);</title></rect>
<rect width="7.43" height="7.27" x="578.55" y="206.76" class="decompiled"><title>void __cdecl Lara_Col_Stop(ITEM_INFO *item, COLL_INFO *coll);</title></rect>
<rect width="7.43" height="7.27" x="578.55" y="217.03" class="decompiled"><title>void __cdecl Lara_Col_Roll(ITEM_INFO *item, COLL_INFO *coll);</title></rect>

Before

Width:  |  Height:  |  Size: 364 KiB

After

Width:  |  Height:  |  Size: 364 KiB

View File

@ -3210,7 +3210,7 @@ typedef enum {
# game/invfunc.c
0x00423B30 0x010A -R void __cdecl InitColours(void);
0x00423C40 0x0167 + void __cdecl Inv_RingIsOpen(RING_INFO *ring);
0x00423DB0 0x0081 -R void __cdecl RingIsNotOpen(RING_INFO *ring);
0x00423DB0 0x0081 + void __cdecl Inv_RingIsNotOpen(RING_INFO *ring);
0x00423E40 0x0369 -R void __cdecl RingNotActive(INVENTORY_ITEM *inv_item);
0x004242B0 0x0032 -R void __cdecl RingActive(void);
0x004242F0 0x06BE + int32_t __cdecl Inv_AddItem(GAME_OBJECT_ID object_num);

View File

@ -307,7 +307,7 @@ int32_t __cdecl Inv_Display(int32_t inventory_mode)
|| imo.status == RNG_CLOSING_ITEM) {
Inv_RingIsOpen(&ring);
} else {
RingIsNotOpen(&ring);
Inv_RingIsNotOpen(&ring);
}
if (imo.status == RNG_OPENING || imo.status == RNG_CLOSING
@ -1036,3 +1036,19 @@ void __cdecl Inv_RingIsOpen(RING_INFO *const ring)
Text_AlignRight(g_Inv_DownArrow2, true);
}
}
void __cdecl Inv_RingIsNotOpen(RING_INFO *const ring)
{
Text_Remove(g_Inv_TagText);
g_Inv_TagText = NULL;
Text_Remove(g_Inv_RingText);
g_Inv_RingText = NULL;
Text_Remove(g_Inv_UpArrow1);
g_Inv_UpArrow1 = NULL;
Text_Remove(g_Inv_UpArrow2);
g_Inv_UpArrow2 = NULL;
Text_Remove(g_Inv_DownArrow1);
g_Inv_DownArrow1 = NULL;
Text_Remove(g_Inv_DownArrow2);
g_Inv_DownArrow2 = NULL;
}

View File

@ -11,3 +11,4 @@ GAME_OBJECT_ID Inv_GetItemOption(GAME_OBJECT_ID object_id);
void __cdecl Inv_DoInventoryPicture(void);
void __cdecl Inv_DoInventoryBackground(void);
void __cdecl Inv_RingIsOpen(RING_INFO *ring);
void __cdecl Inv_RingIsNotOpen(RING_INFO *ring);

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 RingIsNotOpen ((void __cdecl (*)(RING_INFO *ring))0x00423DB0)
#define RingNotActive ((void __cdecl (*)(INVENTORY_ITEM *inv_item))0x00423E40)
#define RingActive ((void __cdecl (*)(void))0x004242B0)
#define RemoveInventoryText ((void __cdecl (*)(void))0x00424FD0)

View File

@ -624,6 +624,7 @@ static void Inject_Inventory(const bool enable)
INJECT(enable, 0x004239E0, Inv_DoInventoryPicture);
INJECT(enable, 0x004239F0, Inv_DoInventoryBackground);
INJECT(enable, 0x00423C40, Inv_RingIsOpen);
INJECT(enable, 0x00423DB0, Inv_RingIsNotOpen);
INJECT(enable, 0x004242F0, Inv_AddItem);
INJECT(enable, 0x00424B00, Inv_InsertItem);
INJECT(enable, 0x00424C30, Inv_RequestItem);