-
Notifications
You must be signed in to change notification settings - Fork 0
/
Type.java
60 lines (49 loc) · 1.39 KB
/
Type.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package red;
import java.util.regex.Pattern;
public enum Type {
UNKNOWN(null, null, null, null),
//match: scr_1_BOTTOM.
NINJAHAX(
Pattern.compile("scr_(\\d+)_(BOTTOM|TOP_LEFT|TOP_RIGHT)\\."),
Pattern.compile("TOP_RIGHT"),
Pattern.compile("BOTTOM"),
new int[] {1}
),
//match: bot_0001.
NTR(
Pattern.compile("(bot|top|sup|inf)_(\\d+)\\."),
null,
Pattern.compile("(bot|inf)"),
new int[] {2}
),
//match: 20161206_0800_LO_00000.
TESTMENU(
Pattern.compile("(\\d+)_(\\d+)_(UL|UR|LO)_(\\d+)\\."),
Pattern.compile("UR"),
Pattern.compile("LO"),
new int[] {1, 2, 4}
),
//match: 2018-10-12_21-17-00.723_top.
LUMA(
Pattern.compile("(\\d+)-(\\d+)-(\\d+)_(\\d+)-(\\d+)-(\\d+)\\.(\\d+)_(top|bot)\\."),
null,
Pattern.compile("bot"),
//I don't know if the last digits are unique, so I'll assume the whole thing is the ID
//If someone wants to change this in the future, please create a PR.
new int[] {1, 2, 3, 4, 5, 6, 7}
);
//The pattern that matches the file
public final Pattern IS;
//Should return true if the image is a right image
public final Pattern RIGHT;
//Should return true if the image is a bottom image
public final Pattern BOT;
//A list of groups that represents the ID
public final int[] GROUP;
Type(Pattern pattern, Pattern right, Pattern bot,int[] group) {
this.IS = pattern;
this.RIGHT = right;
this.BOT = bot;
this.GROUP = group;
}
}