Fix original cutscene music lifecycle and verify walking lab route

This commit is contained in:
UnixNight committed 2026-10-24 20:42:21 -04:00
1 parent c929f942e1
commit b58138d7ba
16 files changed
+282 -18

No files matched your search

+14
View File
@@ -48,6 +48,20 @@ class SoundBankTests(unittest.TestCase):
self.assertEqual(exe[0x589de:0x589e3], bytes.fromhex('e8 5d 4c 02 00'))
self.assertEqual(exe[0x7d3bc:0x7d3c2], bytes.fromhex('56 68 65 76 61 57'))
def test_cutscene_stops_music_and_default_restarts_original_handle(self):
exe = (ORIGINAL/'Neutron.exe').read_bytes()
for offset, expected in [
(0x16776, 'a1 04 60 69 00'), # CAM current music database.
(0x16790, '8b 90 38 0a 00 00'), # Jimmy music handle.
(0x16796, '53 52 e8 03 70 06 00'), # Stop(handle,0).
(0x167e1, '89 1d 04 60 69 00'), # Clear current music DB.
(0x47d5c, '3b c6 75 3f'), # DEFAULT skips restart when Jimmy owns control.
(0x47f20, 'a3 04 60 69 00'), # Restore selected music DB.
(0x47f37, '53 6a 00 6a ff 50 e8 ce 57 03 00'), # Wave0,loop.
]:
raw = bytes.fromhex(expected)
self.assertEqual(exe[offset:offset+len(raw)], raw, hex(offset+0x400000))
if __name__ == '__main__':
unittest.main()