mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Overhauled texture building to be much faster, and hopefully fixed file permissions.
This commit is contained in:
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
+10
-7
@@ -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
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Reference in New Issue
Block a user