Skip to content

Commit 19e48e2

Browse files
committed
refactor signatures (IFP/CCD/SHBIN)
1 parent 0239163 commit 19e48e2

File tree

3 files changed

+24
-7
lines changed

3 files changed

+24
-7
lines changed

db/Binary/archive.IFP.1.sg

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@
22
// Author: BJNFNE <[email protected]>
33
// Used by Grand Theft Auto San Andreas
44

5+
// https://gtamods.com/wiki/IFP
56
meta("archive", "Animation file");
67

78
function detect() {
89
if (Binary.compare("'ANP3'")) {
9-
sVersion = "3";
10-
bDetected = true;
10+
var versionNumber = Binary.getString(3, 1).trim();
11+
12+
if (/^[0-9]{1}/.test(versionNumber)) {
13+
if (X.isVerbose()) sVersion = versionNumber;
14+
bDetected = true;
15+
}
16+
1117
}
1218

1319
return result();

db/Binary/bin.CCD.1.sg

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
// Detect It Easy: detection rule file
22
// Author: BJNFNE <[email protected]>
33

4+
// https://www.elby.ch/
45
meta("format", "CloneCD Control");
56

67
function detect() {
78
if (Binary.compare("'[CloneCD]'")) {
8-
bDetected = true;
9+
var versionNumber = Binary.getString(19, 1).trim();
10+
11+
if (/^[0-9]{1}/.test(versionNumber)) {
12+
if (X.isVerbose()) sVersion = versionNumber;
13+
bDetected = true;
14+
}
15+
916
}
1017

1118
return result();
12-
}
19+
}

db/Binary/bin.SHBIN.1.sg

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ meta("format", "Shader Data");
55

66
function detect() {
77
if (Binary.compare("'DVLB'")) {
8-
sVersion = "SHBIN";
9-
bDetected = true;
10-
}
8+
var dvlp = Binary.getString(12, 4).trim();
9+
10+
if (/^[A-Z]{4}/.test(dvlp)) {
11+
if (X.isVerbose()) sOptions = dvlp;
12+
bDetected = true;
13+
}
1114

15+
}
1216
return result();
1317
}

0 commit comments

Comments
 (0)