summaryrefslogtreecommitdiff
path: root/setgen.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--setgen.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/setgen.py b/setgen.py
index 68d7f12..82c3320 100644
--- a/setgen.py
+++ b/setgen.py
@@ -1,9 +1,20 @@
import struct
-names = {}
-names['PATH'] = '/Maps/forest/pathdata.bin'
-names['SCN0'] = '/Maps/forest/mainscene.bin'
-names['3D00'] = '/Maps/forest/base.brres'
+def Goldwood():
+ names = {}
+ names['PATH'] = '/Maps/forest/pathdata.bin'
+ names['SCN0'] = '/Maps/forest/mainscene.bin'
+ names['3D00'] = '/Maps/forest/base.brres'
+ return ('SMGoldwood.fileset', names)
+
+def World():
+ names = {}
+ names['PATH'] = '/Maps/main/pathdata.bin'
+ names['SCN0'] = '/Maps/main/mainscene.bin'
+ names['3D00'] = '/Maps/main/base.brres'
+ return ('MMFullWorld.fileset', names)
+
+filename, names = World()
header = struct.pack('>4sI', b'MSet', len(names))
entrydata = b''
@@ -19,5 +30,5 @@ for key,path in names.items():
currentoffset += len(encpath) + 1
-open('SMGoldwood.fileset', 'wb').write(header + entrydata + stringtable)
+open(filename, 'wb').write(header + entrydata + stringtable)