mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Added support for subfolders in assets, and named object headers & models
This commit is contained in:
@@ -11,6 +11,8 @@ from file_util import FileUtil
|
||||
INCLUDE_DIRECTORY = './include'
|
||||
ASSETS_INCLUDE = INCLUDE_DIRECTORY + '/asset_sections.h'
|
||||
|
||||
ASSETS_JSON_FILENAME = 'assets.meta.json'
|
||||
|
||||
class GenerateAssets:
|
||||
def __init__(self, rootDir, version):
|
||||
self.ASSETS_ASM_DIR = rootDir + '/asm/assets'
|
||||
@@ -34,7 +36,7 @@ class GenerateAssets:
|
||||
streamdata = createAssets.communicate()[0]
|
||||
if createAssets.returncode != 0:
|
||||
raise SystemExit("An error occured while generating /asm/assets files. Error code " + str(createAssets.returncode) + ". Aborting!")
|
||||
with open(self.ASSETS_DIR + '/' + self.VERSION + '/assets.json') as jsonFile:
|
||||
with open(self.ASSETS_DIR + '/' + self.VERSION + '/' + ASSETS_JSON_FILENAME) as jsonFile:
|
||||
assetsJSON = json.load(jsonFile)
|
||||
self.numAssets = len(assetsJSON['assets']['order'])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user