This commit is contained in:
parent
c0bac696dc
commit
4770bb6a93
@ -28,10 +28,7 @@ def file_to_hex(path: str, line_prefix: str) -> tuple[str, int]:
|
||||
i = 1
|
||||
for b in data:
|
||||
out += f"{b:#0{4}x},"
|
||||
if i % 10 == 0:
|
||||
out += '\n\t'
|
||||
else:
|
||||
out += ' '
|
||||
out += '\n\t' if i % 10 == 0 else ' '
|
||||
i += 1
|
||||
return out[:-1], len(data)
|
||||
|
||||
@ -50,14 +47,8 @@ def proc_rsrc_file(rsrc_path: str):# Open and read the JSON file
|
||||
with open(rsrc_path, 'r') as file:
|
||||
data = json.load(file)
|
||||
base_path = pathlib.Path(rsrc_path).parent.absolute()
|
||||
if 'all_files' in data:
|
||||
all_files = data['all_files']
|
||||
else:
|
||||
all_files = None
|
||||
if 'namespace' in data:
|
||||
namespace = data['namespace']
|
||||
else:
|
||||
namespace = ''
|
||||
all_files = data['all_files'] if 'all_files' in data else None
|
||||
namespace = data['namespace'] if 'namespace' in data else ''
|
||||
if len(namespace) > 0:
|
||||
push_ns = f'namespace {namespace} {{\n'
|
||||
pop_ns = '\n}\n'
|
||||
|
Loading…
x
Reference in New Issue
Block a user