mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-18 05:44:53 +00:00
ZAPD update: libpng, zroom improvements and others (#811)
* git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "769f5702a" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "769f5702a" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * Add `libpng` to readme * Remove `-ifp` since it doesn't exists anymore in ZAPD * Remove extra print I added * Add UNK_09 macro and other minor fixes * Simplify PNG rules * simplify gitignore * Update README.md Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update dockerfile * basic instructions for cygwin and mac * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "86160be69" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "86160be69" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * Change nanoseconds to seconds in extract_assets.py Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
This commit is contained in:
parent
676ecf06c5
commit
515ebdce9d
142 changed files with 5922 additions and 14735 deletions
|
@ -14,18 +14,12 @@ def SignalHandler(sig, frame):
|
|||
mainAbort.set()
|
||||
# Don't exit immediately to update the extracted assets file.
|
||||
|
||||
def Extract(xmlPath, outputPath, outputSourcePath):
|
||||
ExtractFile(xmlPath, outputPath, outputSourcePath, 1, 0)
|
||||
|
||||
def ExtractScene(xmlPath, outputPath, outputSourcePath):
|
||||
ExtractFile(xmlPath, outputPath, outputSourcePath, 1, 1)
|
||||
|
||||
def ExtractFile(xmlPath, outputPath, outputSourcePath, genSrcFile, incFilePrefix):
|
||||
def ExtractFile(xmlPath, outputPath, outputSourcePath):
|
||||
if globalAbort.is_set():
|
||||
# Don't extract if another file wasn't extracted properly.
|
||||
return
|
||||
|
||||
execStr = "tools/ZAPD/ZAPD.out e -eh -i %s -b baserom/ -o %s -osf %s -gsf %i -ifp %i -rconf tools/ZAPDConfigs/MqDbg/Config.xml" % (xmlPath, outputPath, outputSourcePath, genSrcFile, incFilePrefix)
|
||||
execStr = "tools/ZAPD/ZAPD.out e -eh -i %s -b baserom/ -o %s -osf %s -gsf 1 -rconf tools/ZAPDConfigs/MqDbg/Config.xml" % (xmlPath, outputPath, outputSourcePath)
|
||||
if globalUnaccounted:
|
||||
execStr += " -wu"
|
||||
|
||||
|
@ -45,10 +39,6 @@ def ExtractFunc(fullPath):
|
|||
outPath = os.path.join("assets", *pathList[2:], objectName)
|
||||
outSourcePath = outPath
|
||||
|
||||
isScene = fullPath.startswith("assets/xml/scenes/")
|
||||
if isScene:
|
||||
objectName += "_scene"
|
||||
|
||||
if not globalForce:
|
||||
if fullPath in globalExtractedAssetsTracker:
|
||||
timestamp = globalExtractedAssetsTracker[fullPath]["timestamp"]
|
||||
|
@ -59,10 +49,7 @@ def ExtractFunc(fullPath):
|
|||
|
||||
currentTimeStamp = int(time.time())
|
||||
|
||||
if isScene:
|
||||
ExtractScene(fullPath, outPath, outSourcePath)
|
||||
else:
|
||||
Extract(fullPath, outPath, outSourcePath)
|
||||
ExtractFile(fullPath, outPath, outSourcePath)
|
||||
|
||||
if not globalAbort.is_set():
|
||||
# Only update timestamp on succesful extractions
|
||||
|
@ -96,7 +83,7 @@ def main():
|
|||
|
||||
extractedAssetsTracker = manager.dict()
|
||||
if os.path.exists(EXTRACTED_ASSETS_NAMEFILE):
|
||||
with open(EXTRACTED_ASSETS_NAMEFILE) as f:
|
||||
with open(EXTRACTED_ASSETS_NAMEFILE, encoding='utf-8') as f:
|
||||
extractedAssetsTracker.update(json.load(f, object_hook=manager.dict))
|
||||
|
||||
asset_path = args.single
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue