port RenderInit

This commit is contained in:
Marcin Kurczewski 2024-05-09 13:48:17 +02:00
parent 76b7a2528e
commit 09b5e3f4ea
No known key found for this signature in database
GPG Key ID: CC65E6FD28CAE42A
6 changed files with 14 additions and 8 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">37.60% (458)</tspan> · <tspan class="known">59.93% (730)</tspan> · <tspan class="todo">0.41% (5)</tspan> · <tspan class="unused">2.05% (25)</tspan></tspan></text>
<text class="todo" style="font-size: 12px; " x="747" y="9"><tspan text-anchor="end"><tspan class="decompiled">37.68% (459)</tspan> · <tspan class="known">59.85% (729)</tspan> · <tspan class="todo">0.41% (5)</tspan> · <tspan class="unused">2.05% (25)</tspan></tspan></text>
<g transform="translate(0 20)">
<rect width="280.89" height="6" x="0" y="0" class="decompiled"/>
<rect width="447.71" height="6" x="280.89" y="0" class="known"/>
<rect width="281.50" height="6" x="0" y="0" class="decompiled"/>
<rect width="447.10" height="6" x="281.50" y="0" class="known"/>
<rect width="3.07" height="6" x="728.60" y="0" class="todo"/>
<rect width="15.33" height="6" x="731.67" y="0" class="unused"/>
</g>
@ -1021,7 +1021,7 @@
<rect width="12" height="12" x="615" y="270" class="known"><title>void __cdecl RestoreLostBuffers(void);</title></rect>
<rect width="12" height="12" x="630" y="270" class="known"><title>void __cdecl UpdateFrame(bool need_run_message_loop, LPRECT rect);</title></rect>
<rect width="12" height="12" x="645" y="270" class="known"><title>void __cdecl WaitPrimaryBufferFlip(void);</title></rect>
<rect width="12" height="12" x="660" y="270" class="known"><title>bool __cdecl RenderInit(void);</title></rect>
<rect width="12" height="12" x="660" y="270" class="decompiled"><title>bool __cdecl RenderInit(void);</title></rect>
<rect width="12" height="12" x="675" y="270" class="known"><title>void __cdecl RenderStart(bool is_reset);</title></rect>
<rect width="12" height="12" x="690" y="270" class="known"><title>void __cdecl RenderFinish(bool need_to_clear_textures);</title></rect>
<rect width="12" height="12" x="705" y="270" class="known"><title>bool __cdecl ApplySettings(APP_SETTINGS *new_settings);</title></rect>
@ -1302,7 +1302,7 @@
<text class="todo" style="font-size: 12px; " x="747" y="9"><tspan text-anchor="end"><tspan class="decompiled">35.44%</tspan> · <tspan class="known">64.23%</tspan> · <tspan class="todo">0%</tspan> · <tspan class="unused">0.32%</tspan></tspan></text>
<g transform="translate(0 20)">
<rect width="264.73" height="6" x="0" y="0" class="decompiled"/>
<rect width="479.83" height="6" x="264.73" y="0" class="known"/>
<rect width="479.82" height="6" x="264.73" y="0" class="known"/>
<rect width="0.10" height="6" x="744.56" y="0" class="todo"/>
<rect width="2.40" height="6" x="744.60" y="0" class="unused"/>
</g>
@ -2518,7 +2518,7 @@
<rect width="0.10" height="0.10" x="747.59" y="372.66" class="todo"><title>sub_4523A0</title></rect>
<rect width="0.10" height="0.10" x="745.18" y="374.39" class="known"><title>LONG __cdecl CloseGameRegistryKey(void);</title></rect>
<rect width="0.10" height="0.10" x="745.18" y="376.19" class="known"><title>void __cdecl SE_SoundTestFinish(void);</title></rect>
<rect width="0.10" height="0.10" x="747.47" y="374.39" class="known"><title>bool __cdecl RenderInit(void);</title></rect>
<rect width="0.10" height="0.10" x="747.47" y="374.39" class="decompiled"><title>bool __cdecl RenderInit(void);</title></rect>
<rect width="0.10" height="0.10" x="748.74" y="374.39" class="known"><title>int32_t __cdecl SE_GraphicsTestExecute(void);</title></rect>
<rect width="0.10" height="0.10" x="747.47" y="376.36" class="unused"><title>void __cdecl Output_InsertInventoryBackground(const int16_t *obj_ptr);</title></rect>
<rect width="0.10" height="0.10" x="747.47" y="377.18" class="unused"><title>sub_444BC0</title></rect>

Before

Width:  |  Height:  |  Size: 360 KiB

After

Width:  |  Height:  |  Size: 360 KiB

View File

@ -3119,7 +3119,7 @@ typedef enum {
0x00448BF0 0x013C -R void __cdecl RestoreLostBuffers(void);
0x00448D30 0x00CF -R void __cdecl UpdateFrame(bool need_run_message_loop, LPRECT rect);
0x00448E00 0x003B -R void __cdecl WaitPrimaryBufferFlip(void);
0x00448E40 0x0003 -R bool __cdecl RenderInit(void);
0x00448E40 0x0003 +R bool __cdecl RenderInit(void);
0x00448E50 0x03A5 -R void __cdecl RenderStart(bool is_reset);
0x00449200 0x00E6 -R void __cdecl RenderFinish(bool need_to_clear_textures);
0x004492F0 0x0204 -R bool __cdecl ApplySettings(APP_SETTINGS *new_settings);

View File

@ -1250,3 +1250,8 @@ int32_t __cdecl Level_Initialise(int32_t level_num, int32_t level_type)
g_Camera.underwater = 0;
return true;
}
bool __cdecl RenderInit(void)
{
return true;
}

View File

@ -68,3 +68,4 @@ void __cdecl Lara_Control_Cutscene(int16_t item_num);
void __cdecl CutscenePlayer1_Initialise(int16_t item_num);
void __cdecl CutscenePlayerGen_Initialise(int16_t item_num);
int32_t __cdecl Level_Initialise(int32_t level_num, int32_t level_type);
bool __cdecl RenderInit(void);

View File

@ -518,7 +518,6 @@
#define RestoreLostBuffers ((void __cdecl (*)(void))0x00448BF0)
#define UpdateFrame ((void __cdecl (*)(bool need_run_message_loop, LPRECT rect))0x00448D30)
#define WaitPrimaryBufferFlip ((void __cdecl (*)(void))0x00448E00)
#define RenderInit ((bool __cdecl (*)(void))0x00448E40)
#define RenderStart ((void __cdecl (*)(bool is_reset))0x00448E50)
#define RenderFinish ((void __cdecl (*)(bool need_to_clear_textures))0x00449200)
#define ApplySettings ((bool __cdecl (*)(APP_SETTINGS *new_settings))0x004492F0)

View File

@ -116,6 +116,7 @@ static void Inject_Decomp(const bool enable)
INJECT(enable, 0x004125D0, CutscenePlayer1_Initialise);
INJECT(enable, 0x00412660, CutscenePlayerGen_Initialise);
INJECT(enable, 0x0043A280, Level_Initialise);
INJECT(enable, 0x00448E40, RenderInit);
}
static void Inject_Camera(const bool enable)