#4: allow several values in ExtraCRC parameter (separated by space)

This commit is contained in:
VladislavKolosovsky
2015-07-15 21:40:03 +07:00
parent f0ecb65962
commit 3caefe5fae
2 changed files with 11 additions and 3 deletions
+2 -1
View File
@@ -547,7 +547,8 @@ SkipCompatModeCheck=1
;Set to 1 to skip the executable file size check
SkipSizeCheck=0
;If you're testing changes to the fallout exe, you can override the crc that sfall looks for here
;If you're testing changes to the fallout exe, you can override the crc that sfall looks for here
;you can use several hex values, separated by space
ExtraCRC=0x00000000
;Set to 1 to stop fallout from deleting non readonly protos at startup
+9 -2
View File
@@ -67,8 +67,15 @@ void CRC(const char* filepath) {
bool matchedCRC = false;
#ifdef TRACE
DWORD extraCRC = GetPrivateProfileIntA("Debugging", "ExtraCRC", 0, ".\\ddraw.ini");
if (crc == extraCRC) matchedCRC = true;
if (GetPrivateProfileStringA("Debugging", "ExtraCRC", "", buf, 512, ".\\ddraw.ini") > 0) {
char *TestCRC;
TestCRC = strtok(buf, ",");
while (TestCRC) {
DWORD extraCRC = strtoul(TestCRC, 0, 16);
if (crc == extraCRC) matchedCRC = true;
TestCRC = strtok(0, ",");
}
}
#endif
for (int i=0; i < sizeof(ExpectedCRC)/4; i++) {
if (crc == ExpectedCRC[i]) matchedCRC = true;