107 lines
4.3 KiB
C++
107 lines
4.3 KiB
C++
// AUTO-GENERATED FILE, MOVE TO 'gh_fix' FOLDER PREVENT OVERWRITING!!!!!
|
|
|
|
#include <r3/binders/auto.h>
|
|
#include <gh_global.h>
|
|
#include <r3/config/static.hpp>
|
|
|
|
extern "C" {
|
|
undefined
|
|
r3_config_setIdentifier(char *param_1); // 00470570 // r3_config_setIdentifier
|
|
void r3_set_GameDataPath(char *param_1); // 0055a8d0 // r3_set_GameDataPath
|
|
void r3_config_setTexturesMem(
|
|
char *param_1); // 00470f30 // r3_config_setTexturesMem
|
|
void r3_noop(void *p_cTxt1, void *p_cTxt2); // 00401100 // r3_noop
|
|
undefined
|
|
r3_read_game_config_udp_port(void); // 00446040 // r3_read_game_config_udp_port
|
|
undefined
|
|
r3_config_setGLIMode(char *param_1); // 004704e0 // r3_config_setGLIMode
|
|
undefined r3_read_game_config_modem_quality(
|
|
void); // 00445fc0 // r3_read_game_config_modem_quality
|
|
|
|
// 004460c0
|
|
/* WARNING: Inlined function: r3_config_set_adapter */
|
|
/* WARNING: Inlined function: r3_config_setTexturesCompressed */
|
|
/* WARNING: Inlined function: r3_config_setTnl */
|
|
/* WARNING: Inlined function: r3_config_setTrilinearFiltering */
|
|
|
|
void r3_read_gli_config(void)
|
|
|
|
{
|
|
UINT tempOutVal;
|
|
void *pcVar2;
|
|
void *pcVar3;
|
|
HANDLE hProcess;
|
|
int iVar4;
|
|
char *pcVar1;
|
|
char *pcVar4;
|
|
void *in_stack_fffffce0;
|
|
char *ptr0;
|
|
char *ptr1;
|
|
char local_218[20];
|
|
char local_204[168];
|
|
char local_15c[32];
|
|
char stringBuffer[256];
|
|
char cVar1;
|
|
DWORD_PTR dwProcessAffinityMask;
|
|
|
|
const char *iniPath = getIniPath();
|
|
|
|
GetPrivateProfileStringA(lpAppName_005b68f0, s_GLI_Mode_005be3e0,
|
|
g_default_display_mode, stringBuffer, 0xff, iniPath);
|
|
r3_config_setGLIMode(stringBuffer);
|
|
g_GLI_adapter =
|
|
GetPrivateProfileIntA(lpAppName_005b68f0, s_Adapter_005b68e4, 0, iniPath);
|
|
/* set adapter */
|
|
GetPrivateProfileStringA(lpAppName_005b68f0, s_Identifier_005b6420,
|
|
(LPCSTR)&lpDefault_005cf96c, stringBuffer, 0xff,
|
|
iniPath);
|
|
r3_config_setIdentifier(stringBuffer);
|
|
tempOutVal = GetPrivateProfileIntA(lpAppName_005b68f0,
|
|
s_TexturesCompressed_005be3cc, 0, iniPath);
|
|
g_config_tex_compressed = (undefined1)tempOutVal;
|
|
tempOutVal =
|
|
GetPrivateProfileIntA(lpAppName_005b68f0, (LPCSTR)&s_Tnl, 0, iniPath);
|
|
g_GLI_tnl = (undefined1)tempOutVal;
|
|
tempOutVal = GetPrivateProfileIntA(lpAppName_005b68f0, s_TriLinear_005be3bc,
|
|
0, iniPath);
|
|
g_GLI_trilinear = (undefined1)tempOutVal;
|
|
pcVar2 = (void *)GetPrivateProfileIntA(lpAppName_005b68f0,
|
|
s_DynamicShadows_005be3ac, 0, iniPath);
|
|
pcVar3 = (void *)GetPrivateProfileIntA(lpAppName_005b68f0,
|
|
s_StaticShadows_005be39c, 0, iniPath);
|
|
//r3_noop(pcVar2, pcVar3);
|
|
pcVar2 = (void *)GetPrivateProfileIntA(lpAppName_005b68f0, s_Outline_005be394,
|
|
0, iniPath);
|
|
//r3_noop(pcVar2, in_stack_fffffce0);
|
|
GetPrivateProfileStringA(lpAppName_005b68f0, s_TexturesMem_005be384,
|
|
(LPCSTR)&s_Agp, stringBuffer, 0xff, iniPath);
|
|
r3_config_setTexturesMem(stringBuffer);
|
|
GetPrivateProfileStringA(lpAppName_005b68f0, s_SoundOnHD_005be374, "0",
|
|
stringBuffer, 0x104, iniPath);
|
|
sscanf(stringBuffer, s_percent_d, &g_soundOnHD);
|
|
GetPrivateProfileStringA(lpAppName_005b68f0, s_Complete_005be364, "1",
|
|
stringBuffer, 0x104, iniPath);
|
|
sscanf(stringBuffer, s_percent_d, &g_complete);
|
|
g_config_unused0 = 0;
|
|
g_config_camera_hor_axis = GetPrivateProfileIntA(
|
|
lpAppName_005b68f0, s_Camera_HorizontalAxis_005be34c, 2, iniPath);
|
|
g_config_camera_ver_axis = GetPrivateProfileIntA(
|
|
lpAppName_005b68f0, s_Camera_VerticalAxis_005be338, 5, iniPath);
|
|
GetPrivateProfileStringA(lpAppName_005b68f0, s_StartDirectory_005be31c,
|
|
s_Gamedata_005be32c, stringBuffer, 0x104, iniPath);
|
|
r3_set_GameDataPath(stringBuffer);
|
|
GetPrivateProfileStringA(lpAppName_005b68f0, s_SingleProcessor_005be308, "No",
|
|
stringBuffer, 0x104, iniPath);
|
|
/* Set single processor mode */
|
|
iVar4 = strcmpi(stringBuffer, (char *)&s_Yes);
|
|
if (iVar4 == 0) {
|
|
dwProcessAffinityMask = 1;
|
|
hProcess = GetCurrentProcess();
|
|
SetProcessAffinityMask(hProcess, dwProcessAffinityMask);
|
|
}
|
|
r3_read_game_config_modem_quality();
|
|
r3_read_game_config_udp_port();
|
|
return;
|
|
}
|
|
}
|