Update from SDK 2013

This commit is contained in:
Kenzzer authored and Nicholas Hastings committed 2025-02-19 18:39:00 -05:00
1 parent 6d5c024820
commit 94b660e16e
7474 files changed
+2597282 -1254065

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
import sys
def main(filename, objname):
with open(filename, 'rb') as file:
data = file.read()
output = f"static unsigned char {objname}[] = {{\n "
for i in range(len(data)):
output += f"0x{data[i]:02x},"
if i % 20 == 19:
output += "\n "
output += "0x00\n};\n"
print(output)
if __name__ == "__main__":
if len(sys.argv) < 3:
print("Usage: python texttoarray.py <filename> <name>")
sys.exit(1)
main(sys.argv[1], sys.argv[2])