Fries
e5dfbf0e0c
the wii does the game loop now, as i passed some c functions to javascript. those functions are inside objects to make the js api easier to read and use.
20 lines
370 B
Python
Executable file
20 lines
370 B
Python
Executable file
#!/usr/bin/env python3
|
|
|
|
from pathlib import Path
|
|
import argparse
|
|
|
|
parser = argparse.ArgumentParser()
|
|
|
|
parser.add_argument("input")
|
|
parser.add_argument("output")
|
|
|
|
args = parser.parse_args()
|
|
|
|
script = Path(args.input).read_text().replace("\n", "\\n").replace('"', '\\"')
|
|
|
|
code = f"""
|
|
const char* program = "{script}";
|
|
"""
|
|
|
|
with open(args.output, 'w') as f:
|
|
f.write(code)
|