Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/objectmake.py
338 views
1
import os
2
from os import walk
3
4
filenames = []
5
6
for dir_, _, files in os.walk("Objects"):
7
for file_name in files:
8
rel_dir = os.path.relpath(dir_, "Objects")
9
filenames.append(f"{rel_dir}/{file_name}")
10
11
files = [f"Game/Objects/" + f[:-2] + " \\\n" for f in filenames if f.endswith(".c") and not f.endswith("All.c")]
12
13
f = open("Objects.cfg", "w")
14
f.writelines(["GAME_SOURCES += \\\n"] + files)
15
16