-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathamplitude_ark.bms
57 lines (53 loc) · 1.31 KB
/
amplitude_ark.bms
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
# Amplitude (PS2) - main.ark
open FDDE "ark" 0
comtype gzip
get ark_version long
get ark_files long
for i = 0 < ark_files
get ark_02 long
putarray 1 i ark_02
get ark_03 long
putarray 2 i ark_03
get ark_04 long
putarray 3 i ark_04
get ark_05 long
putarray 4 i ark_05
get ark_06 long
putarray 5 i ark_06
next i
get ark_name_size long
savepos ark_pos_01
xmath ark_pos_02 "ark_pos_01 + ark_name_size"
goto ark_pos_02
get ark_entries long
for k = 0 < ark_entries
get ark_08 long
putarray 6 k ark_08
next k
for x = 0 < ark_files
set file_name string ""
getarray file_offset 1 x
getarray string_id_01 2 x
getarray string_id_02 3 x
getarray file_size_if_normal_file 4 x
getarray file_size_if_gzip_file 5 x
for y = 0 < 2
if y = 0
getarray string_offset 6 string_id_02
elif y = 1
getarray string_offset 6 string_id_01
endif
math string_offset + ark_pos_01
goto string_offset
get name_string string
string file_name + /
string file_name + name_string
next y
if file_size_if_gzip_file != 0
set file_name_without_the_gz string file_name
string file_name_without_the_gz > ".gz"
clog file_name_without_the_gz file_offset file_size_if_normal_file file_size_if_gzip_file
else
log file_name file_offset file_size_if_normal_file
endif
next x