mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
#4: allow several values in ExtraCRC parameter (separated by space)
This commit is contained in:
+2
-1
@@ -547,7 +547,8 @@ SkipCompatModeCheck=1
|
|||||||
;Set to 1 to skip the executable file size check
|
;Set to 1 to skip the executable file size check
|
||||||
SkipSizeCheck=0
|
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
|
ExtraCRC=0x00000000
|
||||||
|
|
||||||
;Set to 1 to stop fallout from deleting non readonly protos at startup
|
;Set to 1 to stop fallout from deleting non readonly protos at startup
|
||||||
|
|||||||
+9
-2
@@ -67,8 +67,15 @@ void CRC(const char* filepath) {
|
|||||||
|
|
||||||
bool matchedCRC = false;
|
bool matchedCRC = false;
|
||||||
#ifdef TRACE
|
#ifdef TRACE
|
||||||
DWORD extraCRC = GetPrivateProfileIntA("Debugging", "ExtraCRC", 0, ".\\ddraw.ini");
|
if (GetPrivateProfileStringA("Debugging", "ExtraCRC", "", buf, 512, ".\\ddraw.ini") > 0) {
|
||||||
if (crc == extraCRC) matchedCRC = true;
|
char *TestCRC;
|
||||||
|
TestCRC = strtok(buf, ",");
|
||||||
|
while (TestCRC) {
|
||||||
|
DWORD extraCRC = strtoul(TestCRC, 0, 16);
|
||||||
|
if (crc == extraCRC) matchedCRC = true;
|
||||||
|
TestCRC = strtok(0, ",");
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
for (int i=0; i < sizeof(ExpectedCRC)/4; i++) {
|
for (int i=0; i < sizeof(ExpectedCRC)/4; i++) {
|
||||||
if (crc == ExpectedCRC[i]) matchedCRC = true;
|
if (crc == ExpectedCRC[i]) matchedCRC = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user