mirror of
https://github.com/LostArtefacts/TR2X.git
synced 2025-03-01 10:36:00 +00:00
port Requester_AddItem
This commit is contained in:
parent
70acb51c97
commit
93fdf55c30
@ -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">58.62% (714)</tspan> · <tspan class="known">38.92% (474)</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">58.70% (715)</tspan> · <tspan class="known">38.83% (473)</tspan> · <tspan class="todo">0% (0)</tspan> · <tspan class="unused">2.46% (30)</tspan></tspan></text>
|
||||
<g transform="translate(0 20)">
|
||||
<rect width="437.90" height="6" x="0" y="0" class="decompiled"/>
|
||||
<rect width="290.70" height="6" x="437.90" y="0" class="known"/>
|
||||
<rect width="438.51" height="6" x="0" y="0" class="decompiled"/>
|
||||
<rect width="290.09" height="6" x="438.51" y="0" class="known"/>
|
||||
<rect width="18.40" height="6" x="728.60" y="0" class="unused"/>
|
||||
</g>
|
||||
<g transform="translate(0 31)">
|
||||
@ -446,7 +446,7 @@
|
||||
<rect width="12" height="12" x="255" y="105" class="decompiled"><title>void __cdecl Requester_SetHeading(REQUEST_INFO *req, char *text1, uint32_t flags1, char *text2, uint32_t flags2);</title></rect>
|
||||
<rect width="12" height="12" x="270" y="105" class="known"><title>void __cdecl Requster_RemoveAllItems(REQUEST_INFO *req);</title></rect>
|
||||
<rect width="12" height="12" x="285" y="105" class="decompiled"><title>void __cdecl Requester_ChangeItem(REQUEST_INFO *req, int32_t item, const char *text1, uint32_t flags1, const char *text2, uint32_t flags2);</title></rect>
|
||||
<rect width="12" height="12" x="300" y="105" class="known"><title>void __cdecl Requester_AddItem(REQUEST_INFO *req, const char *text1, uint32_t flags1, const char *text2, uint32_t flags2);</title></rect>
|
||||
<rect width="12" height="12" x="300" y="105" class="decompiled"><title>void __cdecl Requester_AddItem(REQUEST_INFO *req, const char *text1, uint32_t flags1, const char *text2, uint32_t flags2);</title></rect>
|
||||
<rect width="12" height="12" x="315" y="105" class="known"><title>void __cdecl Requester_SetSize(REQUEST_INFO *req, int32_t maxlines, int32_t ypos);</title></rect>
|
||||
<rect width="12" height="12" x="330" y="105" class="known"><title>int32_t __cdecl AddAssaultTime(uint32_t time);</title></rect>
|
||||
<rect width="12" height="12" x="345" y="105" class="decompiled"><title>void __cdecl ShowGymStatsText(char *time_str, int32_t type);</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">63.02%</tspan> · <tspan class="known">36.65%</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">63.07%</tspan> · <tspan class="known">36.60%</tspan> · <tspan class="todo">0%</tspan> · <tspan class="unused">0.33%</tspan></tspan></text>
|
||||
<g transform="translate(0 20)">
|
||||
<rect width="470.76" height="6" x="0" y="0" class="decompiled"/>
|
||||
<rect width="273.80" height="6" x="470.76" y="0" class="known"/>
|
||||
<rect width="471.14" height="6" x="0" y="0" class="decompiled"/>
|
||||
<rect width="273.42" height="6" x="471.14" y="0" class="known"/>
|
||||
<rect width="2.44" height="6" x="744.56" y="0" class="unused"/>
|
||||
</g>
|
||||
<g transform="translate(0 31)">
|
||||
@ -1803,7 +1803,7 @@
|
||||
<rect width="8.96" height="9.08" x="643.53" y="161.72" class="decompiled"><title>DWORD __cdecl CompPCX(BYTE *bitmap, DWORD width, DWORD height, RGB_888 *palette, BYTE **pcx_data);</title></rect>
|
||||
<rect width="8.96" height="9.08" x="655.49" y="161.72" class="known"><title>void __cdecl SyncSurfacePalettes(void *src_data, int32_t width, int32_t height, int32_t src_pitch, RGB_888 *src_palette, void *dst_data, int32_t dst_pitch, RGB_888 *dst_palette, bool preserve_sys_palette);</title></rect>
|
||||
<rect width="8.89" height="9.08" x="667.45" y="161.72" class="decompiled"><title>int32_t __cdecl Lara_TestEdgeCatch(ITEM_INFO *item, COLL_INFO *coll, int32_t *edge);</title></rect>
|
||||
<rect width="8.82" height="9.08" x="679.34" y="161.72" class="known"><title>void __cdecl Requester_AddItem(REQUEST_INFO *req, const char *text1, uint32_t flags1, const char *text2, uint32_t flags2);</title></rect>
|
||||
<rect width="8.82" height="9.08" x="679.34" y="161.72" class="decompiled"><title>void __cdecl Requester_AddItem(REQUEST_INFO *req, const char *text1, uint32_t flags1, const char *text2, uint32_t flags2);</title></rect>
|
||||
<rect width="8.82" height="9.08" x="691.16" y="161.72" class="known"><title>void __cdecl SpiderLeap(int16_t item_num, int16_t angle);</title></rect>
|
||||
<rect width="8.75" height="9.08" x="702.99" y="161.72" class="decompiled"><title>bool __cdecl Matrix_TranslateRel(int32_t x, int32_t y, int32_t z);</title></rect>
|
||||
<rect width="8.75" height="9.08" x="714.74" y="161.72" class="decompiled"><title>int32_t __cdecl Item_GetAnimChange(ITEM_INFO *item, const ANIM_STRUCT *anim);</title></rect>
|
||||
|
Before Width: | Height: | Size: 364 KiB After Width: | Height: | Size: 364 KiB |
@ -3246,7 +3246,7 @@ typedef enum {
|
||||
0x00426030 0x00AA + void __cdecl Requester_SetHeading(REQUEST_INFO *req, char *text1, uint32_t flags1, char *text2, uint32_t flags2);
|
||||
0x004260E0 0x0013 - void __cdecl Requster_RemoveAllItems(REQUEST_INFO *req);
|
||||
0x00426100 0x00C0 + void __cdecl Requester_ChangeItem(REQUEST_INFO *req, int32_t item, const char *text1, uint32_t flags1, const char *text2, uint32_t flags2);
|
||||
0x004261C0 0x00AC - void __cdecl Requester_AddItem(REQUEST_INFO *req, const char *text1, uint32_t flags1, const char *text2, uint32_t flags2);
|
||||
0x004261C0 0x00AC + void __cdecl Requester_AddItem(REQUEST_INFO *req, const char *text1, uint32_t flags1, const char *text2, uint32_t flags2);
|
||||
0x00426270 0x0039 - void __cdecl Requester_SetSize(REQUEST_INFO *req, int32_t maxlines, int32_t ypos);
|
||||
0x004262B0 0x0081 -R int32_t __cdecl AddAssaultTime(uint32_t time);
|
||||
0x00426340 0x01D6 +R void __cdecl ShowGymStatsText(char *time_str, int32_t type);
|
||||
|
@ -153,3 +153,31 @@ void __cdecl Requester_ChangeItem(
|
||||
req->pitem_flags2[item] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void __cdecl Requester_AddItem(
|
||||
REQUEST_INFO *const req, const char *const text1, const uint32_t flags1,
|
||||
const char *const text2, const uint32_t flags2)
|
||||
{
|
||||
req->pitem_flags1 = g_RequesterFlags1;
|
||||
req->pitem_flags2 = g_RequesterFlags2;
|
||||
|
||||
if (text1 != NULL) {
|
||||
strcpy(
|
||||
&req->pitem_strings1[req->items_count * req->item_string_len],
|
||||
text1);
|
||||
req->pitem_flags1[req->items_count] = flags1 | REQ_USE;
|
||||
} else {
|
||||
g_RequesterFlags1[req->items_count] = 0;
|
||||
}
|
||||
|
||||
if (text2 != NULL) {
|
||||
strcpy(
|
||||
&req->pitem_strings2[req->items_count * req->item_string_len],
|
||||
text2);
|
||||
req->pitem_flags2[req->items_count] = flags2 | REQ_USE;
|
||||
} else {
|
||||
req->pitem_flags2[req->items_count] = 0;
|
||||
}
|
||||
|
||||
req->items_count++;
|
||||
}
|
||||
|
@ -13,3 +13,6 @@ void __cdecl Requester_SetHeading(
|
||||
void __cdecl Requester_ChangeItem(
|
||||
REQUEST_INFO *req, int32_t item, const char *text1, uint32_t flags1,
|
||||
const char *text2, uint32_t flags2);
|
||||
void __cdecl Requester_AddItem(
|
||||
REQUEST_INFO *req, const char *text1, uint32_t flags1, const char *text2,
|
||||
uint32_t flags2);
|
||||
|
@ -122,7 +122,6 @@
|
||||
#define Inv_Ring_MotionItemDeselect ((void __cdecl (*)(RING_INFO *ring, INVENTORY_ITEM *inv_item))0x00425530)
|
||||
#define Requester_Display ((int32_t __cdecl (*)(REQUEST_INFO *req, int32_t des, int32_t backgrounds))0x004257C0)
|
||||
#define Requster_RemoveAllItems ((void __cdecl (*)(REQUEST_INFO *req))0x004260E0)
|
||||
#define Requester_AddItem ((void __cdecl (*)(REQUEST_INFO *req, const char *text1, uint32_t flags1, const char *text2, uint32_t flags2))0x004261C0)
|
||||
#define Requester_SetSize ((void __cdecl (*)(REQUEST_INFO *req, int32_t maxlines, int32_t ypos))0x00426270)
|
||||
#define AddAssaultTime ((int32_t __cdecl (*)(uint32_t time))0x004262B0)
|
||||
#define HarpoonBolt_Control ((void __cdecl (*)(int16_t item_num))0x0042C0F0)
|
||||
|
@ -366,6 +366,7 @@ static void Inject_Requester(const bool enable)
|
||||
INJECT(enable, 0x00425760, Requester_Item_RightAlign);
|
||||
INJECT(enable, 0x00426030, Requester_SetHeading);
|
||||
INJECT(enable, 0x00426100, Requester_ChangeItem);
|
||||
INJECT(enable, 0x004261C0, Requester_AddItem);
|
||||
}
|
||||
|
||||
static void Inject_Option(const bool enable)
|
||||
|
Loading…
x
Reference in New Issue
Block a user