Decompiled 4 functions from unknown_0ABDF0

This commit is contained in:
David Benepe
2022-04-06 19:58:23 -04:00
parent f54d936786
commit 3e416d33dd
46 changed files with 531 additions and 839 deletions
+2
View File
@@ -26,6 +26,8 @@ class GenerateAssets:
self.generate_ucode_files()
def generate_assets_file(self):
with open(self.ASSETS_DIR + "/" + self.VERSION + '/ignoreMe.txt', 'w') as a_file:
a_file.write("This file is automatically generated by generate_assets.py, and is used to check if the assets have been updated.")
args = ["tools/dkr_assets_tool", "-i", self.VERSION, self.ASSETS_DIR, INCLUDE_DIRECTORY, self.BUILD_DIR, self.ASSETS_ASM_DIR]
createAssets = subprocess.Popen(args, stdout=subprocess.PIPE)
createAssets.wait()
+4 -14
View File
@@ -228,19 +228,9 @@ class GenerateLD:
files.sort(key = lambda x: (x[2], x[3])) # Sort tuples by RAM address and prioritize src files first.
return files
checksum_file = './assets/' + VERSION + '/md5.txt'
if not os.path.exists('./dkr.ld') and os.path.exists(checksum_file):
os.remove(checksum_file)
if os.path.exists(checksum_file):
with open(checksum_file, "rt") as a_file:
with open('./assets/' + VERSION + '/assets.json',"rb") as f:
bytes = f.read() # read file as bytes
readable_hash = hashlib.md5(bytes).hexdigest();
compare_hash = a_file.read().rstrip()
if compare_hash != readable_hash:
with open(LD_NAME, 'w') as ldFile:
GenerateLD(ldFile)
else:
# A nice side-effect of the ./assets/<version>/ directory being "read-only" is that we can write a file to it,
# and then if it gets deleted we'll know if the assets have been updated.
if not os.path.exists('./dkr.ld') or not os.path.exists('./assets/' + VERSION + '/ignoreMe.txt'):
with open(LD_NAME, 'w') as ldFile:
GenerateLD(ldFile)