summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-09-02 04:44:26 +0200
committerTreeki <treeki@gmail.com>2012-09-02 04:44:26 +0200
commite1f58a4b2b7cd3c696bb4125f6c0a665b9324430 (patch)
tree0dc9fca91d42345d48b7c205f127a26795d6bce4 /tools
parentf1d937694dc9d9f9637af8c72293dab9edeaf7a2 (diff)
downloadkamek-e1f58a4b2b7cd3c696bb4125f6c0a665b9324430.tar.gz
kamek-e1f58a4b2b7cd3c696bb4125f6c0a665b9324430.zip
added support for wide/non-wide cutscenes, might not even be useful for us, oh well
Diffstat (limited to 'tools')
-rw-r--r--tools/MovieSettings.py26
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)
+