mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
More documentation in memory & unknown_077A0
This commit is contained in:
@@ -5,6 +5,9 @@ import os
|
||||
|
||||
from file_util import FileUtil
|
||||
|
||||
INCLUDE_DIRECTORY = './include'
|
||||
ASSETS_INCLUDE = INCLUDE_DIRECTORY + '/asset_sections.h'
|
||||
|
||||
class GenerateAssets:
|
||||
def __init__(self, rootDir, version):
|
||||
self.ASSETS_FILENAME = rootDir + '/asm/assets/assets.s'
|
||||
@@ -22,6 +25,8 @@ class GenerateAssets:
|
||||
assetsJSON = json.load(jsonFile)
|
||||
assets = assetsJSON['assets']
|
||||
|
||||
self.generate_asset_sections_header_file(assets)
|
||||
|
||||
assetsTextFinal = '# This file was generated by generate_ld.py\n\n'
|
||||
assetsTextFinal += '.include "macros.inc"\n\n'
|
||||
|
||||
@@ -132,4 +137,14 @@ class GenerateAssets:
|
||||
def generate_ucode_file(self, label, path):
|
||||
return 'glabel ' + label + '\n.incbin "' + self.BUILD_DIR + '/' + path + '"\n'
|
||||
|
||||
def generate_asset_sections_header_file(self, assets):
|
||||
out = '/* This file was generated by generate_ld.py */\n'
|
||||
out += '\n#ifndef _ASSET_SECTIONS_H_\n#define _ASSET_SECTIONS_H_\n\n'
|
||||
|
||||
for i in range(0, len(assets)):
|
||||
asset = assets[i]
|
||||
out += '#define ASSET_' + asset['name'] + ' ' + str(i) + '\n'
|
||||
|
||||
out += '\n#endif\n'
|
||||
with open(ASSETS_INCLUDE, "w") as assetSectionsFile:
|
||||
assetSectionsFile.write(out)
|
||||
|
||||
Reference in New Issue
Block a user