commit
0eac7490ee
@ -802,14 +802,6 @@ static int LoadGameData()
|
||||
return 1;
|
||||
}
|
||||
|
||||
BOOL FileExists(char *szPath)
|
||||
{
|
||||
DWORD dwAttrib = GetFileAttributesA(szPath);
|
||||
|
||||
return (dwAttrib != INVALID_FILE_ATTRIBUTES &&
|
||||
!(dwAttrib & FILE_ATTRIBUTE_DIRECTORY));
|
||||
}
|
||||
|
||||
static void LoadWmmt5CarData()
|
||||
{
|
||||
if (!loadOk)
|
||||
|
1464
OpenParrot/src/Functions/Games/ES3X/WMMT5DXPlus.cpp
Normal file
1464
OpenParrot/src/Functions/Games/ES3X/WMMT5DXPlus.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -450,12 +450,6 @@ void GameDetect::DetectCurrentGame()
|
||||
SetGameId(GameID::WMMT5, "WMMT5");
|
||||
break;
|
||||
}
|
||||
// PATCHES 10-21
|
||||
if (*(uint32_t*)(moduleBase + 0x2F00) == 0x084AFF48)
|
||||
{
|
||||
SetGameId(GameID::WMMT5, "WMMT5");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
// Craft CRC detection without virtual address
|
||||
memcpy(newCrc, GetModuleHandle(nullptr), 0x400);
|
||||
@ -482,6 +476,19 @@ void GameDetect::DetectCurrentGame()
|
||||
|
||||
break;
|
||||
}
|
||||
// PATCHES 10-21 & 5DX+
|
||||
if (*(uint32_t*)(moduleBase + 0x2F00) == 0x084AFF48)
|
||||
{
|
||||
if (newCrcResult == 0x1BB6F051)
|
||||
{
|
||||
SetGameId(GameID::WMMT5DXPlus, "WMMT5DX+");
|
||||
}
|
||||
else {
|
||||
SetGameId(GameID::WMMT5, "WMMT5 Update 10-21");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
switch (newCrcResult)
|
||||
|
@ -111,5 +111,6 @@ enum class GameID
|
||||
Doa6FM12,
|
||||
Doa6FM13,
|
||||
Doa6FM14,
|
||||
Doa6Test
|
||||
Doa6Test,
|
||||
WMMT5DXPlus
|
||||
};
|
@ -45,6 +45,14 @@ int Compare(const std::string& str1, const std::string& str2, bool case_sensitiv
|
||||
return (str1.length() < str2.length() ? -1 : 1);
|
||||
}
|
||||
|
||||
BOOL FileExists(char* szPath)
|
||||
{
|
||||
DWORD dwAttrib = GetFileAttributesA(szPath);
|
||||
|
||||
return (dwAttrib != INVALID_FILE_ATTRIBUTES &&
|
||||
!(dwAttrib & FILE_ATTRIBUTE_DIRECTORY));
|
||||
}
|
||||
|
||||
bool ToBool(const std::string& s)
|
||||
{
|
||||
if (s.empty())
|
||||
|
@ -20,6 +20,8 @@ inline void safeJMP(injector::memory_pointer_tr at, injector::memory_pointer_raw
|
||||
}
|
||||
}
|
||||
|
||||
BOOL FileExists(char* szPath);
|
||||
|
||||
uint32_t GetCRC32(const void* pData, int length);
|
||||
|
||||
DWORD crc32buf(unsigned char *buf, size_t len);
|
||||
|
Loading…
Reference in New Issue
Block a user