mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-02 22:14:33 +00:00
Introduce extracted/VERSION, with text extracted there (#1730)
* Introduce assets/_extracted/VERSION, with text extracted there * move to `extracted/text/` * Update gitignore s * rework args for msgenc.py * put mkdir with others, until theyre all moved at once * move 0xFFFC back to being extracted, making it use specific macro `DEFINE_MESSAGE_NES` to handle its special behavior * prettier gitignore * Move messages 0xFFFC, 0xFFFD to committed message_data.h
This commit is contained in:
parent
ca45c543f6
commit
a6f646dc65
13 changed files with 88 additions and 34 deletions
13
Makefile
13
Makefile
|
@ -66,6 +66,7 @@ PROJECT_DIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
|
|||
BUILD_DIR := build/$(VERSION)
|
||||
EXPECTED_DIR := expected/$(BUILD_DIR)
|
||||
BASEROM_DIR := baseroms/$(VERSION)
|
||||
EXTRACTED_DIR := extracted/$(VERSION)
|
||||
VENV := .venv
|
||||
|
||||
MAKE = make
|
||||
|
@ -130,7 +131,7 @@ NM := $(MIPS_BINUTILS_PREFIX)nm
|
|||
|
||||
N64_EMULATOR ?=
|
||||
|
||||
INC := -Iinclude -Iinclude/libc -Isrc -I$(BUILD_DIR) -I.
|
||||
INC := -Iinclude -Iinclude/libc -Isrc -I$(BUILD_DIR) -I. -I$(EXTRACTED_DIR)
|
||||
|
||||
# Check code syntax with host compiler
|
||||
CHECK_WARNINGS := -Wall -Wextra -Wno-format-security -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-variable -Wno-missing-braces
|
||||
|
@ -230,7 +231,7 @@ TEXTURE_FILES_OUT := $(foreach f,$(TEXTURE_FILES_PNG:.png=.inc.c),$(BUILD_DIR)/$
|
|||
$(foreach f,$(TEXTURE_FILES_JPG:.jpg=.jpg.inc.c),$(BUILD_DIR)/$f) \
|
||||
|
||||
# create build directories
|
||||
$(shell mkdir -p $(BUILD_DIR)/baserom $(BUILD_DIR)/assets/text $(foreach dir,$(SRC_DIRS) $(UNDECOMPILED_DATA_DIRS) $(ASSET_BIN_DIRS),$(BUILD_DIR)/$(dir)))
|
||||
$(shell mkdir -p $(BUILD_DIR)/baserom $(EXTRACTED_DIR)/text $(BUILD_DIR)/assets/text $(foreach dir,$(SRC_DIRS) $(UNDECOMPILED_DATA_DIRS) $(ASSET_BIN_DIRS),$(BUILD_DIR)/$(dir)))
|
||||
|
||||
ifeq ($(COMPILER),ido)
|
||||
$(BUILD_DIR)/src/boot/stackcheck.o: OPTFLAGS := -O2
|
||||
|
@ -345,7 +346,7 @@ clean:
|
|||
|
||||
assetclean:
|
||||
$(RM) -r $(ASSET_BIN_DIRS)
|
||||
$(RM) -r assets/text/*.h
|
||||
$(RM) -r $(EXTRACTED_DIR)
|
||||
$(RM) -r $(BUILD_DIR)/assets
|
||||
$(RM) -r .extracted-assets.json
|
||||
|
||||
|
@ -367,7 +368,7 @@ setup: venv
|
|||
# TODO: for now, we only extract assets from the Debug ROM
|
||||
ifeq ($(VERSION),gc-eu-mq-dbg)
|
||||
$(PYTHON) extract_assets.py -j$(N_THREADS)
|
||||
$(PYTHON) tools/msgdis.py --text-out assets/text/message_data.h --staff-text-out assets/text/message_data_staff.h
|
||||
$(PYTHON) tools/msgdis.py --text-out $(EXTRACTED_DIR)/text/message_data.h --staff-text-out $(EXTRACTED_DIR)/text/message_data_staff.h
|
||||
endif
|
||||
|
||||
disasm:
|
||||
|
@ -423,8 +424,8 @@ $(BUILD_DIR)/baserom/%.o: $(BASEROM_SEGMENTS_DIR)/%
|
|||
$(BUILD_DIR)/data/%.o: data/%.s
|
||||
$(AS) $(ASFLAGS) $< -o $@
|
||||
|
||||
$(BUILD_DIR)/assets/text/%.enc.h: assets/text/%.h assets/text/charmap.txt
|
||||
$(PYTHON) tools/msgenc.py assets/text/charmap.txt $< $@
|
||||
$(BUILD_DIR)/assets/text/%.enc.h: assets/text/%.h $(EXTRACTED_DIR)/text/%.h assets/text/charmap.txt
|
||||
$(CPP) $(CPPFLAGS) -I$(EXTRACTED_DIR) $< | $(PYTHON) tools/msgenc.py - --output $@ --charmap assets/text/charmap.txt
|
||||
|
||||
# Dependencies for files including message data headers
|
||||
# TODO remove when full header dependencies are used.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue