From 58a748dcd77d0caacc9d6ef7a7e7e073ac849ad3 Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Sat, 20 Jul 2024 19:47:25 +1000 Subject: resize viewport and fix skybox --- scripts/amalgamation/gen_amalgamation.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 scripts/amalgamation/gen_amalgamation.py (limited to 'scripts/amalgamation/gen_amalgamation.py') diff --git a/scripts/amalgamation/gen_amalgamation.py b/scripts/amalgamation/gen_amalgamation.py new file mode 100644 index 0000000..45a1c21 --- /dev/null +++ b/scripts/amalgamation/gen_amalgamation.py @@ -0,0 +1,24 @@ +# Generates a single amalgamation C header file that includes all public types and functions. +# +# This makes including and linking Celeritas very easy. +import re +import sys + +def find_pub_functions(filepath): + pattern = r'PUB\s+(\w+\s+)*(\w+)\s+(\w+)\s*\((.*?)\)' + + with open(filepath, 'r') as file: + content = file.read() + + matches = re.finditer(pattern, content, re.MULTILINE) + + for match in matches: + print(match.group(0)) + +if __name__ == "__main__": + if len(sys.argv) != 2: + print("Usage: python script.py ") + sys.exit(1) + + file_path = sys.argv[1] + find_pub_functions(file_path) -- cgit v1.2.3-70-g09d2