add make assets target

This commit is contained in:
Pheenoh 2021-06-13 19:47:12 -04:00
parent 1aa177a920
commit 8c2a3ae7ea
3 changed files with 31 additions and 11 deletions

View File

@ -57,14 +57,15 @@ else
SHA1SUM := sha1sum
endif
AS := $(DEVKITPPC)/bin/powerpc-eabi-as
OBJCOPY := $(DEVKITPPC)/bin/powerpc-eabi-objcopy
STRIP := $(DEVKITPPC)/bin/powerpc-eabi-strip
CC := $(WINE) tools/mwcc_compiler/$(MWCC_VERSION)/mwcceppc.exe
LD := $(WINE) tools/mwcc_compiler/$(MWCC_VERSION)/mwldeppc.exe
ELF2DOL := tools/elf2dol
PYTHON := python3
DOXYGEN := doxygen
AS := $(DEVKITPPC)/bin/powerpc-eabi-as
OBJCOPY := $(DEVKITPPC)/bin/powerpc-eabi-objcopy
STRIP := $(DEVKITPPC)/bin/powerpc-eabi-strip
CC := $(WINE) tools/mwcc_compiler/$(MWCC_VERSION)/mwcceppc.exe
LD := $(WINE) tools/mwcc_compiler/$(MWCC_VERSION)/mwldeppc.exe
ELF2DOL := tools/elf2dol
PYTHON := python3
DOXYGEN := doxygen
IMAGENAME := gz2e01.iso
POSTPROC := tools/postprocess.py
@ -111,6 +112,9 @@ clean:
tools:
@$(MAKE) -C tools
assets:
@cd game; python3 ../tools/extract_game_assets.py ../$(IMAGENAME)
docs:
$(DOXYGEN) Doxyfile

View File

@ -21,7 +21,24 @@ And will eventually build all the [RELs](./docs/rels_sha1.md).
1. Obtain a clean DOL of TP (GCN USA) and place it at the root of the repo and name it `baserom.dol`.
2. Obtain a copy of the MWCC PowerPC compiler (version 2.7 to be exact). See below for a link to our Discord server which has the CodeWarrior compilers pinned in the #tp-decomp channel.
3. Run `make` at the root of the repo.
3. Replace `tools/mwcc_compiler/2.7/mwcceppc.exe` with the custom one also pinned in the #tp-decomp channel.
4. Run `make` at the root of the repo.
## Dump Assets
1. Place a vanilla copy of the NTSC-U version at the root of the folder and call it `gz2e01.iso`.
2. Make the game directory.
```bash
mkdir game
```
3. Run make assets.
```bash
make assets
````
## Contributions

View File

@ -20,8 +20,7 @@ def getFstInfo(handler, fstOffsetPosition):
"""
Parses the fst.bin into a list of dictionaries containing
the file name, file offset into the ISO, the file size,
and the folder structure
the file entry type, the file/folder name, the ISO file offset/parent file entry, the file size/last file entry
"""
def parseFstBin(fstBinBytes):
currentByte = 0