119 lines
3.9 KiB
C++
119 lines
3.9 KiB
C++
// AUTO-GENERATED FILE, MOVE TO 'gh_fix' FOLDER PREVENT OVERWRITING!!!!!
|
|
|
|
#include <r3/binders/auto.h>
|
|
#include <gh_global.h>
|
|
|
|
extern "C" {
|
|
undefined r3_wait_for_dvd(char *param_1, char *param_2,
|
|
undefined4 param_3); // 0043e540 // r3_wait_for_dvd
|
|
|
|
// 004464f0
|
|
void r3_checkDisc(void)
|
|
|
|
{
|
|
char cVar1;
|
|
DWORD logicalDriveBits;
|
|
UINT UVar2;
|
|
int iVar3;
|
|
char *pcVar4;
|
|
char *pcVar5;
|
|
CHAR local_41c[256];
|
|
CHAR local_31c[264];
|
|
char local_214[260];
|
|
int local_110;
|
|
char local_10c[260];
|
|
int local_8;
|
|
|
|
logicalDriveBits = GetLogicalDrives();
|
|
g_driveLetter[0] = s_driveLetterTemplate[0];
|
|
g_driveLetter[1] = s_driveLetterTemplate[1];
|
|
g_driveLetter[2] = s_driveLetterTemplate[2];
|
|
g_driveLetter[3] = s_driveLetterTemplate[3];
|
|
local_110 = 0;
|
|
g_currentBinkMovie.movieName[0] = '\0';
|
|
|
|
#if RE_AUTHENTIC == 0
|
|
do {
|
|
do {
|
|
if (local_110 != 0) {
|
|
return;
|
|
}
|
|
for (local_8 = 0; local_8 < 0x20; local_8 = local_8 + 1) {
|
|
if ((logicalDriveBits & 1 << ((byte)local_8 & 0x1f)) != 0) {
|
|
g_driveLetter[0] = (byte)local_8 + 0x41;
|
|
UVar2 = GetDriveTypeA(g_driveLetter);
|
|
if (UVar2 == 5) {
|
|
GetVolumeInformationA(g_driveLetter, s_volumeNameBuffer, 0x80,
|
|
(LPDWORD)0x0, (LPDWORD)0x0, (LPDWORD)0x0,
|
|
(LPSTR)0x0, 0);
|
|
iVar3 = strcmpi(s_volumeNameBuffer, s_R3_DVD_005bdfd8);
|
|
if ((iVar3 == 0) ||
|
|
(iVar3 = strcmpi(s_volumeNameBuffer, s_R3_DVD_005be0ec),
|
|
iVar3 == 0)) {
|
|
sprintf(g_currentBinkMovie.movieName, s_fmt_c_colon_s,
|
|
local_8 + 0x41, s_r3_program_files);
|
|
local_110 = 1;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} while (local_110 != 0);
|
|
GetWindowsDirectoryA(local_31c, 0x104);
|
|
iVar3 = -1;
|
|
pcVar4 = local_31c;
|
|
do {
|
|
pcVar5 = pcVar4;
|
|
if (iVar3 == 0)
|
|
break;
|
|
iVar3 = iVar3 + -1;
|
|
pcVar5 = pcVar4 + 1;
|
|
cVar1 = *pcVar4;
|
|
pcVar4 = pcVar5;
|
|
} while (cVar1 != '\0');
|
|
*(undefined4 *)(pcVar5 + -1) = s_UbiSoft_Ubi_ini + Field<0, 4>();
|
|
*(undefined4 *)(pcVar5 + 3) = s_UbiSoft_Ubi_ini + Field<4, 4>();
|
|
*(undefined4 *)(pcVar5 + 7) = s_UbiSoft_Ubi_ini + Field<8, 4>();
|
|
*(undefined4 *)(pcVar5 + 0xb) = s_UbiSoft_Ubi_ini + Field<12, 4>();
|
|
pcVar5[0xf] = s_UbiSoft_Ubi_ini[0x10];
|
|
GetPrivateProfileStringA(lpAppName_005b68f0, s_Language_005b6840,
|
|
s_English_005b684c, local_41c, 0xff, local_31c);
|
|
iVar3 = strcmpi(local_41c, s_French_005b6828);
|
|
if (iVar3 == 0) {
|
|
sprintf(local_10c, s_Veuillez_ins_rer_le_DVD_dans_vot_005be500);
|
|
sprintf(local_214, s_Impossible_de_trouver_le_DVD_____005be238,
|
|
s_windowTitle);
|
|
} else {
|
|
iVar3 = strcmpi(local_41c, s_Spanish_005b67a0);
|
|
if (iVar3 == 0) {
|
|
sprintf(local_10c, s_Introduce_el_DVD_de_Rayman_3_en_l_005be4c0);
|
|
sprintf(local_214, s_DVD_s_no_v_lido_005be1ec, s_windowTitle);
|
|
} else {
|
|
iVar3 = strcmpi(local_41c, s_Italian_005b6730);
|
|
if (iVar3 == 0) {
|
|
sprintf(local_10c, s_Inserisci_il_DVD_di_Rayman_3_nel_005be484);
|
|
sprintf(local_214, s_Impossibile_trovare_il_DVD____s_005be198,
|
|
s_windowTitle);
|
|
} else {
|
|
iVar3 = strcmpi(local_41c, s_German_005b66c4);
|
|
if (iVar3 == 0) {
|
|
sprintf(local_10c, s_Bitte_legen_Sie_DVD_von_Rayman_3_005be438);
|
|
sprintf(local_214, s_Die__s_DVDROM_kann_nicht_gelesen_005be130,
|
|
s_windowTitle);
|
|
} else {
|
|
sprintf(local_10c, s_Please_insert_the_DVD_in_the_DVD_005be400);
|
|
sprintf(local_214, s__s_DVD_missing_005be0f4, s_windowTitle);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
iVar3 = r3_wait_for_dvd(local_10c, local_214, 5);
|
|
if (iVar3 == 2) {
|
|
/* WARNING: Subroutine does not return */
|
|
exit(-1);
|
|
}
|
|
} while (true);
|
|
#endif
|
|
}
|
|
}
|