mirror of
https://github.com/LostArtefacts/TR2X.git
synced 2024-11-30 09:30:50 +00:00
port Inv_RingIsOpen
This commit is contained in:
parent
3f54c131ee
commit
e1a33df3e4
@ -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.76% (740)</tspan> · <tspan class="known">36.78% (448)</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.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>
|
||||
<g transform="translate(0 20)">
|
||||
<rect width="453.84" height="6" x="0" y="0" class="decompiled"/>
|
||||
<rect width="274.76" height="6" x="453.84" y="0" class="known"/>
|
||||
<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="18.40" height="6" x="728.60" y="0" class="unused"/>
|
||||
</g>
|
||||
<g transform="translate(0 31)">
|
||||
@ -411,7 +411,7 @@
|
||||
<rect width="12" height="12" x="480" y="90" class="decompiled"><title>void __cdecl Inv_DoInventoryPicture(void);</title></rect>
|
||||
<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="known"><title>void __cdecl RingIsOpen(RING_INFO *ring);</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="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>
|
||||
@ -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.46%</tspan> · <tspan class="known">35.21%</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.56%</tspan> · <tspan class="known">35.11%</tspan> · <tspan class="todo">0%</tspan> · <tspan class="unused">0.33%</tspan></tspan></text>
|
||||
<g transform="translate(0 20)">
|
||||
<rect width="481.51" height="6" x="0" y="0" class="decompiled"/>
|
||||
<rect width="263.05" height="6" x="481.51" y="0" class="known"/>
|
||||
<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="2.44" height="6" x="744.56" y="0" class="unused"/>
|
||||
</g>
|
||||
<g transform="translate(0 31)">
|
||||
@ -1568,7 +1568,7 @@
|
||||
<rect width="14.80" height="13.84" x="556.78" y="59.39" class="decompiled"><title>void __cdecl Boat_Animation(ITEM_INFO *boat, int32_t collide);</title></rect>
|
||||
<rect width="14.80" height="13.84" x="574.58" y="59.39" class="known"><title>void __cdecl Flare_Draw(void);</title></rect>
|
||||
<rect width="14.75" height="13.84" x="592.38" y="59.39" class="decompiled"><title>int32_t __cdecl Room_GetWaterHeight(int32_t x, int32_t y, int32_t z, int16_t room_num);</title></rect>
|
||||
<rect width="14.70" height="13.84" x="610.13" y="59.39" class="known"><title>void __cdecl RingIsOpen(RING_INFO *ring);</title></rect>
|
||||
<rect width="14.70" height="13.84" x="610.13" y="59.39" class="decompiled"><title>void __cdecl Inv_RingIsOpen(RING_INFO *ring);</title></rect>
|
||||
<rect width="14.65" height="13.84" x="627.83" y="59.39" class="decompiled"><title>void __cdecl Gun_Rifle_Draw(LARA_GUN_TYPE weapon_type);</title></rect>
|
||||
<rect width="14.60" height="13.84" x="645.48" y="59.39" class="known"><title>BOOL __cdecl S_FrontEndCheck(void);</title></rect>
|
||||
<rect width="14.55" height="13.84" x="663.08" y="59.39" class="known"><title>void __cdecl FlameControl(int16_t fx_num);</title></rect>
|
||||
|
Before Width: | Height: | Size: 364 KiB After Width: | Height: | Size: 364 KiB |
@ -3209,7 +3209,7 @@ typedef enum {
|
||||
|
||||
# game/invfunc.c
|
||||
0x00423B30 0x010A -R void __cdecl InitColours(void);
|
||||
0x00423C40 0x0167 -R void __cdecl RingIsOpen(RING_INFO *ring);
|
||||
0x00423C40 0x0167 + void __cdecl Inv_RingIsOpen(RING_INFO *ring);
|
||||
0x00423DB0 0x0081 -R void __cdecl RingIsNotOpen(RING_INFO *ring);
|
||||
0x00423E40 0x0369 -R void __cdecl RingNotActive(INVENTORY_ITEM *inv_item);
|
||||
0x004242B0 0x0032 -R void __cdecl RingActive(void);
|
||||
|
@ -305,7 +305,7 @@ int32_t __cdecl Inv_Display(int32_t inventory_mode)
|
||||
|| imo.status == RNG_SELECTED || imo.status == RNG_DESELECTING
|
||||
|| imo.status == RNG_DESELECT
|
||||
|| imo.status == RNG_CLOSING_ITEM) {
|
||||
RingIsOpen(&ring);
|
||||
Inv_RingIsOpen(&ring);
|
||||
} else {
|
||||
RingIsNotOpen(&ring);
|
||||
}
|
||||
@ -978,3 +978,61 @@ void __cdecl Inv_DoInventoryBackground(void)
|
||||
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
||||
void __cdecl Inv_RingIsOpen(RING_INFO *const ring)
|
||||
{
|
||||
if (g_Inv_Mode == INV_TITLE_MODE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_Inv_RingText == NULL) {
|
||||
switch (ring->type) {
|
||||
case RT_MAIN:
|
||||
g_Inv_RingText = Text_Create(
|
||||
0, 26, 0, g_GF_GameStrings[GF_S_GAME_HEADING_INVENTORY]);
|
||||
break;
|
||||
|
||||
case RT_OPTION:
|
||||
if (g_Inv_Mode == INV_DEATH_MODE) {
|
||||
g_Inv_RingText = Text_Create(
|
||||
0, 26, 0, g_GF_GameStrings[GF_S_GAME_HEADING_GAME_OVER]);
|
||||
} else {
|
||||
g_Inv_RingText = Text_Create(
|
||||
0, 26, 0, g_GF_GameStrings[GF_S_GAME_HEADING_OPTION]);
|
||||
}
|
||||
Text_CentreH(g_Inv_RingText, true);
|
||||
break;
|
||||
|
||||
case RT_KEYS:
|
||||
g_Inv_RingText = Text_Create(
|
||||
0, 26, 0, g_GF_GameStrings[GF_S_GAME_HEADING_ITEMS]);
|
||||
break;
|
||||
}
|
||||
|
||||
Text_CentreH(g_Inv_RingText, true);
|
||||
}
|
||||
|
||||
if (g_Inv_Mode == INV_KEYS_MODE || g_Inv_Mode == INV_DEATH_MODE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_Inv_UpArrow1 == NULL) {
|
||||
if (ring->type == RT_OPTION
|
||||
|| (ring->type == RT_MAIN && g_Inv_KeyObjectsCount > 0)) {
|
||||
g_Inv_UpArrow1 = Text_Create(20, 28, 0, "[");
|
||||
g_Inv_UpArrow2 = Text_Create(-20, 28, 0, "[");
|
||||
Text_AlignRight(g_Inv_UpArrow2, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (g_Inv_DownArrow1 == NULL
|
||||
&& ((
|
||||
(ring->type == RT_MAIN && !g_GameFlow.lockout_option_ring)
|
||||
|| ring->type == RT_KEYS))) {
|
||||
g_Inv_DownArrow1 = Text_Create(20, -15, 0, "]");
|
||||
Text_AlignBottom(g_Inv_DownArrow1, true);
|
||||
g_Inv_DownArrow2 = Text_Create(-20, -15, 0, "]");
|
||||
Text_AlignBottom(g_Inv_DownArrow2, true);
|
||||
Text_AlignRight(g_Inv_DownArrow2, true);
|
||||
}
|
||||
}
|
||||
|
@ -10,3 +10,4 @@ void __cdecl Inv_DrawInventoryItem(INVENTORY_ITEM *inv_item);
|
||||
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);
|
||||
|
@ -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 RingIsOpen ((void __cdecl (*)(RING_INFO *ring))0x00423C40)
|
||||
#define RingIsNotOpen ((void __cdecl (*)(RING_INFO *ring))0x00423DB0)
|
||||
#define RingNotActive ((void __cdecl (*)(INVENTORY_ITEM *inv_item))0x00423E40)
|
||||
#define RingActive ((void __cdecl (*)(void))0x004242B0)
|
||||
|
@ -623,6 +623,7 @@ static void Inject_Inventory(const bool enable)
|
||||
INJECT(enable, 0x00423590, Inv_DrawInventoryItem);
|
||||
INJECT(enable, 0x004239E0, Inv_DoInventoryPicture);
|
||||
INJECT(enable, 0x004239F0, Inv_DoInventoryBackground);
|
||||
INJECT(enable, 0x00423C40, Inv_RingIsOpen);
|
||||
INJECT(enable, 0x004242F0, Inv_AddItem);
|
||||
INJECT(enable, 0x00424B00, Inv_InsertItem);
|
||||
INJECT(enable, 0x00424C30, Inv_RequestItem);
|
||||
|
Loading…
Reference in New Issue
Block a user