mirror of
https://github.com/HackerN64/HackerOoT.git
synced 2026-01-21 10:37:37 -08:00
Merge remote-tracking branch 'decomp/master' into decomp_merge
This commit is contained in:
2
Makefile
2
Makefile
@@ -96,7 +96,7 @@ N_THREADS ?= $(shell nproc)
|
||||
|
||||
#### Tools ####
|
||||
ifneq ($(shell type $(MIPS_BINUTILS_PREFIX)ld >/dev/null 2>/dev/null; echo $$?), 0)
|
||||
$(error Please install or build $(MIPS_BINUTILS_PREFIX))
|
||||
$(error Unable to find $(MIPS_BINUTILS_PREFIX)ld. Please install or build MIPS binutils, commonly mips-linux-gnu. (or set MIPS_BINUTILS_PREFIX if your MIPS binutils install uses another prefix))
|
||||
endif
|
||||
|
||||
# Detect compiler and set variables appropriately.
|
||||
|
||||
@@ -11,10 +11,8 @@
|
||||
<Texture Name="gMoriStalfosPlatformSideTex" OutName="stalfos_platform_side" Format="rgba16" Height="32" Width="64" Offset="0x3200"/>
|
||||
<Texture Name="gMoriStalfosPlatformTopTex" OutName="stalfos_platform_top" Format="rgba16" Height="32" Width="32" Offset="0x4200"/>
|
||||
|
||||
<Texture Name="gMoriHashiraPlatformsTex" OutName="hashira_platform" Format="rgba16" Height="32" Width="32" Offset="0x4A00"/>
|
||||
|
||||
<!-- This is just a guess since its unused -->
|
||||
<Texture Name="gMoriWaterTex" OutName="water" Format="rgba16" Height="8" Width="32" Offset="0x5200"/>
|
||||
<Texture Name="gMoriHashiraPlatformsTex" OutName="hashira_platform" Format="rgba16" Height="16" Width="16" Offset="0x4A00"/>
|
||||
<Texture Name="gMoriWaterTex" OutName="water" Format="rgba16" Height="32" Width="32" Offset="0x4C00"/>
|
||||
|
||||
<Texture Name="gMoriHashigoLadderTex" OutName="ladder" Format="rgba16" Height="32" Width="32" Offset="0x5400"/>
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import os
|
||||
import signal
|
||||
import time
|
||||
import multiprocessing
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
EXTRACTED_ASSETS_NAMEFILE = ".extracted-assets.json"
|
||||
@@ -21,7 +22,13 @@ def ExtractFile(xmlPath, outputPath, outputSourcePath):
|
||||
# Don't extract if another file wasn't extracted properly.
|
||||
return
|
||||
|
||||
execStr = f"tools/ZAPD/ZAPD.out e -eh -i {xmlPath} -b baserom/ -o {outputPath} -osf {outputSourcePath} -gsf 1 -rconf tools/ZAPDConfigs/MqDbg/Config.xml {ZAPDArgs}"
|
||||
zapdPath = Path("tools") / "ZAPD" / "ZAPD.out"
|
||||
configPath = Path("tools") / "ZAPDConfigs" / "MqDbg" / "Config.xml"
|
||||
|
||||
Path(outputPath).mkdir(parents=True, exist_ok=True)
|
||||
Path(outputSourcePath).mkdir(parents=True, exist_ok=True)
|
||||
|
||||
execStr = f"{zapdPath} e -eh -i {xmlPath} -b baserom -o {outputPath} -osf {outputSourcePath} -gsf 1 -rconf {configPath} {ZAPDArgs}"
|
||||
|
||||
if "overlays" in xmlPath:
|
||||
execStr += " --static"
|
||||
@@ -143,14 +150,21 @@ def main():
|
||||
if file.endswith(".xml"):
|
||||
xmlFiles.append(fullPath)
|
||||
|
||||
class CannotMultiprocessError(Exception):
|
||||
pass
|
||||
|
||||
try:
|
||||
numCores = int(args.jobs or 0)
|
||||
if numCores <= 0:
|
||||
numCores = 1
|
||||
print("Extracting assets with " + str(numCores) + " CPU core" + ("s" if numCores > 1 else "") + ".")
|
||||
with multiprocessing.get_context("fork").Pool(numCores, initializer=initializeWorker, initargs=(mainAbort, args.unaccounted, extractedAssetsTracker, manager)) as p:
|
||||
try:
|
||||
mp_context = multiprocessing.get_context("fork")
|
||||
except ValueError as e:
|
||||
raise CannotMultiprocessError() from e
|
||||
with mp_context.Pool(numCores, initializer=initializeWorker, initargs=(mainAbort, args.unaccounted, extractedAssetsTracker, manager)) as p:
|
||||
p.map(ExtractFunc, xmlFiles)
|
||||
except (multiprocessing.ProcessError, TypeError):
|
||||
except (multiprocessing.ProcessError, TypeError, CannotMultiprocessError):
|
||||
print("Warning: Multiprocessing exception ocurred.", file=os.sys.stderr)
|
||||
print("Disabling mutliprocessing.", file=os.sys.stderr)
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user