-
Notifications
You must be signed in to change notification settings - Fork 0
/
remove_texturestxa_manual_sizes.py
25 lines (21 loc) · 1.23 KB
/
remove_texturestxa_manual_sizes.py
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
txa = open('maps/textures.txa', 'r')
output = ""
# I'm too lazy to parse it so I'm doing this
# These are all the sizes that appear in textures.txa so I'll just replace the string
sizes = ["2048 2048", "1024 1024", "512 512", "384 384", "320 320", "256 256", "256 192", "256 128", "256 96", "256 64", "256 32",
"64 256", "212 212", "200 71", "192 256", "186 87", "144 144", "131 51", "128 256", "128 128", "128 96", "128 64", "128 56",
"128 32", "128 12", "128 16", "122 122", "112 112", "112 56", "100 100", "98 98", "96 256", "96 192", "96 128", "96 96", "96 64",
"96 48", "96 32", "88 64", "64 128", "64 96", "64 64", "64 32", "64 16", "64 8", "58 58", "56 116", "54 108", "54 54", "50 50",
"48 96", "48 64", "48 48", "32 128", "32 96", "32 64", "32 32", "32 23", "32 16", "32 8", "32 4", "28 28", "27 27", "24 44",
"16 512", "16 128", "16 96", "16 64", "16 32", "16 16", "16 8", "12 12", "8 96", "8 64", "8 32", "8 16", "8 8", "8 4", "4 64",
"4 32", "4 4", "2 2", "1 1"]
lines = txa.readlines()
for line in lines:
for size in sizes:
line = line.replace(size, '100%')
output += line
txa.close()
txa = open('maps/textures-full.txa', 'w')
txa.write(output)
txa.flush()
txa.close()