This commit is contained in:
@ -40,7 +40,7 @@ def file_to_cpp(path: str, cpp_name: str) -> tuple[str, str]:
|
||||
cpp = ''
|
||||
hpp = ''
|
||||
data, data_len = file_to_hex(path, "\t")
|
||||
cpp += f'\nstatic constexpr ox::Array<uint8_t, {data_len}> {cpp_name}Data {{\n{data}\n}};\n'
|
||||
cpp += f'\nstatic const ox::Array<uint8_t, {data_len}> {cpp_name}Data {{\n{data}\n}};\n'
|
||||
cpp += f'\nox::SpanView<uint8_t> {cpp_name}() noexcept {{ return {cpp_name}Data; }}\n'
|
||||
hpp += f'\n[[nodiscard]]\nox::SpanView<uint8_t> {cpp_name}() noexcept;\n'
|
||||
return cpp, hpp
|
||||
@ -89,8 +89,9 @@ def proc_rsrc_file(rsrc_path: str):# Open and read the JSON file
|
||||
hpp += h
|
||||
if all_files is not None:
|
||||
all_files_func += f'\t\t{cpp_name}(),\n'
|
||||
cpp += all_files_func + '\t};\n}\n'
|
||||
hpp += all_files_func_decl
|
||||
if all_files is not None:
|
||||
cpp += all_files_func + '\t};\n}\n'
|
||||
hpp += all_files_func_decl
|
||||
cpp += pop_ns
|
||||
hpp += pop_ns
|
||||
write_txt_file(os.path.join(base_path, data['cpp']), cpp)
|
||||
|
Reference in New Issue
Block a user