mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-23 15:52:41 +02:00
Decompile mpstrings segments
This commit is contained in:
1 parent
15ee3c168e
commit
6f69f7deb5
53 files changed
+26240
-9
No files matched your search
@@ -29,6 +29,13 @@ def main():
|
||||
write_binary(fd, 0x4e850, get_inflate())
|
||||
write_binary(fd, 0x4fc40, get_gamezips())
|
||||
write_binary(fd, 0x7d0a40, get_mpconfigs())
|
||||
write_binary(fd, 0x7d1c20, get_mpstrings('E'))
|
||||
write_binary(fd, 0x7d5320, get_mpstrings('J'))
|
||||
write_binary(fd, 0x7d8a20, get_mpstrings('P'))
|
||||
write_binary(fd, 0x7dc120, get_mpstrings('G'))
|
||||
write_binary(fd, 0x7df820, get_mpstrings('F'))
|
||||
write_binary(fd, 0x7e2f20, get_mpstrings('S'))
|
||||
write_binary(fd, 0x7e6620, get_mpstrings('I'))
|
||||
write_binary(fd, 0x7f2388, get_fonts())
|
||||
write_binary(fd, 0x80a250, get_sfxctl())
|
||||
write_binary(fd, 0x839dd0, get_sfxtbl())
|
||||
@@ -85,6 +92,9 @@ def get_unknown():
|
||||
def get_mpconfigs():
|
||||
return getfilecontents(bdir() + '/ucode/mpconfigs.bin')
|
||||
|
||||
def get_mpstrings(lang):
|
||||
return getfilecontents(bdir() + '/ucode/mpstrings%s.bin' % lang)
|
||||
|
||||
def get_fonts():
|
||||
return getfrombaserom(0x7f2388, 0x17ec8)
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ class Extractor:
|
||||
self.extract_textures()
|
||||
self.extract_ucodes()
|
||||
self.extract_mpconfigs()
|
||||
self.extract_mpstrings()
|
||||
|
||||
#
|
||||
# Audio
|
||||
@@ -137,6 +138,19 @@ class Extractor:
|
||||
addr = self.val('mpconfigs')
|
||||
self.write('ucode/mpconfigs.bin', self.rom[addr:addr+0x68*44])
|
||||
|
||||
def extract_mpstrings(self):
|
||||
self.extract_mpstrings_lang(0, 'E')
|
||||
self.extract_mpstrings_lang(1, 'J')
|
||||
self.extract_mpstrings_lang(2, 'P')
|
||||
self.extract_mpstrings_lang(3, 'G')
|
||||
self.extract_mpstrings_lang(4, 'F')
|
||||
self.extract_mpstrings_lang(5, 'S')
|
||||
self.extract_mpstrings_lang(6, 'I')
|
||||
|
||||
def extract_mpstrings_lang(self, index, lang):
|
||||
addr = self.val('mpconfigs') + 0x68 * 44 + 0x3700 * index
|
||||
self.write('ucode/mpstrings%s.bin' % lang, self.rom[addr:addr+0x3700])
|
||||
|
||||
#
|
||||
# Fonts
|
||||
#
|
||||
|
||||
Reference in new issue
Block a user