-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdoom_3_bfg_edition.bms
More file actions
60 lines (56 loc) · 1.88 KB
/
doom_3_bfg_edition.bms
File metadata and controls
60 lines (56 loc) · 1.88 KB
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
# DOOM 3 BFG Edition (Windows[1], PlayStation 3, Xbox 360, Android, PlayStation 4[2], Xbox One[2], Nintendo Switch[2])
# DOOM 3: VR Edition (PlayStation 4[3])
# ---
# [1] this was re-released as DOOM 3 through Bethesda.net Launcher in 2019.
# [2] same case as [1], only this time targeted at different platforms.
# however, functionality with these versions of the game won't be guaranteed with this script
# so if i were you i'd open up an issue about it *fast* the moment i find out
# that the script doesn't work with the game files when it comes to these versions.
# [3] an PSVR adaptation of the BFG Edition game.
get name basename
get ext extension
if ext == "resources"
open FDDE "resources" 0
elif ext == "obb"
open FDDE "obb" 0
endif
open FDDE "crc" 1 EXISTS
endian big
get resources_sign long 0
if resources_sign != 0xd000000d
print " this is not a .resources file from DOOM 3 BFG Edition. "
cleanexit
endif
get resources_info_offset long 0
get resources_info_size long 0
goto resources_info_offset 0
get resources_files long 0
if EXISTS = 1
get crc_sign_01 long 1
if crc_sign_01 != 0xcc00cc00
print " this is not a .crc file from DOOM 3 BFG Edition. "
cleanexit
endif
get crc_sign_02 long 1
if crc_sign_02 != 1
print " this is not a .crc file from DOOM 3 BFG Edition. "
cleanexit
endif
get crc_name_hash long 1
get crc_files long 1
if resources_files == crc_files
math files == crc_files
endif
endif
math files = resources_files
for i = 0 < files
get file_01 long 0
xmath file_name_string_size "((file_01 & 0x000000ff) << 24) | ((file_01 & 0x0000ff00) << 8) | ((file_01 & 0x00ff0000) >> 8) | ((file_01 & 0xff000000) >> 24)"
getdstring file_name file_name_string_size 0
get file_offset long 0
get file_size long 0
if EXISTS = 1
get file_name_hash long 1
endif
log file_name file_offset file_size 0
next i