diff options
author | Colin Noga <Tempus@chronometry.ca> | 2012-09-01 22:06:56 -0500 |
---|---|---|
committer | Colin Noga <Tempus@chronometry.ca> | 2012-09-01 22:06:56 -0500 |
commit | 9483344fcecf669e2be98b61d1fdb6c6e3aa5520 (patch) | |
tree | d9b4a1321fecf407cc11db771c626868bc16dfeb /tools/MovieSettings.py | |
parent | 349ad50d3daefca5dfed6a79d03c6058aae7c581 (diff) | |
parent | e1f58a4b2b7cd3c696bb4125f6c0a665b9324430 (diff) | |
download | kamek-9483344fcecf669e2be98b61d1fdb6c6e3aa5520.tar.gz kamek-9483344fcecf669e2be98b61d1fdb6c6e3aa5520.zip |
Merge branch 'level-select' of ssh://treeki.rustedlogic.net:30000/Kamek into level-select
Diffstat (limited to '')
-rw-r--r-- | tools/MovieSettings.py | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/tools/MovieSettings.py b/tools/MovieSettings.py index 1a6bbaf..1269e5c 100644 --- a/tools/MovieSettings.py +++ b/tools/MovieSettings.py @@ -9,8 +9,9 @@ class Settings(object): def add_sound(self, delay, sound_id): self.sounds.append((delay, sound_id)) - def __init__(self): + def __init__(self, widescreen): self.banners = [] + self.widescreen = widescreen def add_banner(self, name): b = self.Banner(name) @@ -28,10 +29,10 @@ class Settings(object): banner_offsets.append(offset) b_header1 = 'xxxx' # will be replaced later - b_header2 = struct.pack('>I', len(b.sounds)) + b_header2 = struct.pack('>bxxxI', 1 if self.widescreen else 0, len(b.sounds)) b_sounds = map(lambda x: struct.pack('>II', *x), b.sounds) - offset += 8 + (len(b_sounds) * 8) + offset += 12 + (len(b_sounds) * 8) b_data = [b_header1, b_header2] b_data.extend(b_sounds) @@ -64,7 +65,7 @@ class Settings(object): -s = Settings() +s = Settings(widescreen=False) b = s.add_banner('/CS/Opening1.arc') b = s.add_banner('/CS/Opening3.arc') @@ -81,4 +82,21 @@ b = s.add_banner('/CS/Opening11.arc') data = s.export() open('Opening.cs', 'wb').write(data) +s = Settings(widescreen=True) + +b = s.add_banner('/CS/Kamek1_2.arc') +b = s.add_banner('/CS/Kamek3_4.arc') +b = s.add_banner('/CS/Kamek5_6.arc') +b = s.add_banner('/CS/Kamek7_8.arc') +b = s.add_banner('/CS/Kamek9_10.arc') +b = s.add_banner('/CS/Kamek11.arc') +b = s.add_banner('/CS/Kamek12.arc') +b = s.add_banner('/CS/Kamek13_14.arc') +b = s.add_banner('/CS/Kamek15_16.arc') +b = s.add_banner('/CS/Kamek17.arc') + + +data = s.export() +open('Kamek.cs', 'wb').write(data) + |