Overhauled texture building to be much faster, and hopefully fixed file permissions.

This commit is contained in:
David Benepe
2020-06-24 14:33:15 -05:00
parent 57d9ab7c5f
commit 9d7c9b035a
188 changed files with 5861 additions and 9173 deletions
Regular → Executable
+10 -7
View File
@@ -148,8 +148,6 @@ class LD:
matchedGroups = matches.groups()
fileExtension = matchedGroups[3]
fileProperties = matchedGroups[1].split('.')
if fileExtension == '.png' and int(fileProperties[1]) != 0:
continue
ramAddress = fileProperties[0]
if fileExtension == '.cbin' or fileExtension == '.ebin':
outFileExtension = fileExtension
@@ -164,13 +162,18 @@ class LD:
def generate_assets_file(self):
assets = self.get_asset_files()
assetsText = '# This file was generated by generate_ld.py\n\n'
assetsText += '.macro .incbinaligned filename\n .balign 16\n .incbin "\\filename"\n.endm\n\n'
prevAssetMadeAlignment = False
for asset in assets:
if 'lut' in asset[0] and not prevAssetMadeAlignment:
assetsText += '.balign 16\n'
assetsText += '.incbin "./' + asset[0] + '"\n'
if asset[2] == '.png' or asset[2] == '.cbin': # Make sure that compressed data ends on a 16-byte boundary
assetsText += '.balign 16\n'
if 'lut' in asset[0]:
#assetsText += '.balign 16\n'
prevAssetMadeAlignment = True
if prevAssetMadeAlignment:
assetsText += '.incbinaligned "./' + asset[0] + '"\n'
else:
assetsText += '.incbin "./' + asset[0] + '"\n'
if asset[2] == '.png' or asset[2] == '.cbin' or 'lut' in asset[0]: # Make sure that compressed data ends on a 16-byte boundary
#assetsText += '.balign 16\n'
prevAssetMadeAlignment = True
else:
prevAssetMadeAlignment = False