Soldier of Fortune (Dreamcast) #117
Replies: 4 comments 12 replies
-
NVM I located 117 |
Beta Was this translation helpful? Give feedback.
-
I did also manage to locate some map name strings in the data (also some C headers?)
Removed a recurring struct thing from the middle, a little confused by the repetition |
Beta Was this translation helpful? Give feedback.
-
How does a portal file contain the map source? Do you mean the brushes of a map? |
Beta Was this translation helpful? Give feedback.
-
Extracted all import struct
def substring_indices(file, sub: bytes, buf_max: int = 2048):
# hopefully buffer alignment won't split the substring
cur = 0
while True:
file.seek(cur) # resume scanning
buf = file.read(2048)
cur = file.tell()
if sub in buf:
yield cur - 2048 + buf.index(sub)
elif len(buf) == 0:
break # reached EOF
with open("Track 06.iso", "rb") as gd_file:
for i, offset in enumerate(substring_indices(gd_file, b"IBSP\x2E\x00\x00\x00")):
gd_file.seek(offset + 8) # after ("IBSP", 46)
# assuming we only have the same 19 headers as raven.soldier_of_fortune
lump_headers = struct.iter_unpack("2I", gd_file.read(8 * 19))
bsp_size = sum(sorted(lump_headers)[-1])
gd_file.seek(offset)
print(f"{i:03d} {offset:08X} writing to 'maps/entry_{i + 1:03d}.bsp' ...")
with open(f"maps/entry_{i + 1:03d}.bsp", "wb") as bsp_file:
bsp_file.write(gd_file.read(bsp_size)) An initial glance at the extracted maps with
So
|
Beta Was this translation helpful? Give feedback.
-
Notes
Support for this format was confirmed in c08a75b
Keeping the thread up for future reference
Original Post
Trawling through a
.gdi
dump, there are enough instances of"classname" "worldspawn"
to account for 121.bsp
sHowever, I can't seem to find a way to split the
.img
holding this dataMight have to reverse engineer the executable to figure out the filesystem
I also haven't been able to locate
b"IBSP"
headers, so it's possible the format is uniqueBeta Was this translation helpful? Give feedback.
All reactions